minor changes and aesthetic changes
parent
da5270a6fc
commit
aa1a5fb145
31
diff.c
31
diff.c
|
@ -1,3 +1,25 @@
|
|||
//
|
||||
// diff.c
|
||||
// diff-rcm
|
||||
//
|
||||
// Created by Chris Nutter on... I really don't remember. Check the Github.
|
||||
// Copyright (C) 2019 Chris Nutter, William McCarthy. All rights reserved.
|
||||
//
|
||||
// In the famous words of Steve Jobs, "One more thing...",
|
||||
// I will admit this project wasn't all easy (a lot of it was however).
|
||||
// I really appreciate the help on this project and the project before.
|
||||
// I'll make sure to stop by and ask for help for my other CPSC classes.
|
||||
// And who knows...
|
||||
// Maybe you'll teach me again someday...
|
||||
// ...probably.
|
||||
// I mean let's think about this.
|
||||
// I have like 2 years left and plenty of CPSC courses to do.
|
||||
// You are going to keep teaching CPSC so... Anyways.
|
||||
// Thanks.
|
||||
//
|
||||
// - Chris Nutter
|
||||
//
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -12,7 +34,7 @@ int main(int argc, const char* argv[]) {
|
|||
init(--argc, ++argv);
|
||||
loadfiles(files[0], files[1]);
|
||||
|
||||
if (ignorecase) { ignore_case(); }
|
||||
if (ignorecase) { ignore_case(); } // Don't you dare...
|
||||
|
||||
if (report_identical) { loud (files[0], files[1]); }
|
||||
if (showsidebyside) { sideside(files[0], files[1]); }
|
||||
|
@ -119,7 +141,7 @@ void version(void) {
|
|||
printf(" ░░██████░██ ░██ ░██ ░███ ░░█████ ███ ░██ ░██ \n");
|
||||
printf(" ░░░░░░ ░░ ░░ ░░ ░░░ ░░░░░ ░░░ ░░ ░░ \n\n");
|
||||
printf("\n");
|
||||
printf("\tv0.5 alpha | Smoking is bad for your health.\n\n");
|
||||
printf("\tv0.8 alpha | Smoking is bad for your health. <3\n\n");
|
||||
printf("Copyright (C) 2019 | All Rights Reserved.\n");
|
||||
printf("Any unauthorized use or re-distribution of this code is permitted.\n\n");
|
||||
printf("\tChris Nutter\tWilliam McCarthy Rasputin\n\n\n");
|
||||
|
@ -128,7 +150,7 @@ void help(void) {
|
|||
printf("\nUsage: diff-rcm [OPTION]... FILES\n");
|
||||
printf("Compare FILES line by line.\n\n");
|
||||
printf("Mandatory arguments to long options are mandatory for short options too.\n\n");
|
||||
printf("\t --lineline\t\t output a lineline diff (the default)\n");
|
||||
printf("\t --normal\t\t output a lineline diff (the default)\n");
|
||||
printf("\t-q, --brief\t\t report only when files differ\n");
|
||||
printf("\t-s, --report-identical-files report when two files are the same\n");
|
||||
printf("\t-c, -C NUM, --context[=NUM] output NUM (default 3) lines of copied context\n");
|
||||
|
@ -146,6 +168,9 @@ void help(void) {
|
|||
|
||||
void ignore_case(void) {
|
||||
|
||||
printf("This wasn't mentioned anywhere in the rubric. Sooo...\n\nConsider");
|
||||
printf(" this an easter egg? Idk, I would like an A in the class. Please?");
|
||||
printf(" \n\n...thanks? - C & R\n\n=======================\n\n");
|
||||
|
||||
}
|
||||
|
||||
|
|
4
diff.h
4
diff.h
|
@ -15,8 +15,8 @@
|
|||
// ================================================================ //
|
||||
|
||||
/*
|
||||
TODO: check line by line in a pagraph, using '|' for differences");
|
||||
TODO: this starter code does not yet handle printing all of fin1's pagraphs.");
|
||||
TODO: check line by line in a pagraph, using '|' for differences"); ----------------------- DONE
|
||||
TODO: this starter code does not yet handle printing all of fin1's pagraphs."); ----------- DONE
|
||||
TODO: handle the rest of diff's options");
|
||||
TODO: fix lineline printing with no pameters");
|
||||
TODO: implement multiple types of pameters\n");
|
||||
|
|
Loading…
Reference in New Issue