Compare commits
3 Commits
d711e2150d
...
0c17a7f390
Author | SHA1 | Date | |
---|---|---|---|
0c17a7f390 | |||
62be20817e | |||
302764d09b |
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
sample1.txt
|
||||
program3-4
|
||||
program3-4-2.c
|
||||
test1.c
|
2
Makefile
2
Makefile
@@ -1,2 +1,2 @@
|
||||
program3-4: program3-4.c texted.c fileman.c
|
||||
gcc -g program3-4.c texted.c fileman.c -o program3-4 -Llib -lncursest -Wl,-rpath=lib
|
||||
gcc program3-4.c texted.c fileman.c -o program3-4 -Llib -lncursest -Wl,-rpath=lib
|
||||
|
@@ -42,7 +42,7 @@ int main(int argc,char** argv) {
|
||||
int rowCounter; //Number of rows to skip reading in a file, when the user presses Page Down
|
||||
bool eofFound; //Self-explanatory; is EOF found?
|
||||
int colorScheme; //stores the value of the color scheme - changes when user hits Ctrl-D
|
||||
int colCounter; //ISN'T USED ELSEWHERE IN THE PROGRAM - SHOULD BE REMOVED
|
||||
// int colCounter; //ISN'T USED ELSEWHERE IN THE PROGRAM - SHOULD BE REMOVED
|
||||
char tempChar; //Holds the 'current' character while reading from a file.
|
||||
int numCharsToPrint; //Weird naming - should be renamed to 'numLinesToPrint' - Number of lines to print in the file explorer.
|
||||
int numDowns=0; //Stores the number of times the user has pressed the Down Arrow / Page Down
|
||||
@@ -96,7 +96,7 @@ int main(int argc,char** argv) {
|
||||
colorScheme=1; // Default value for the color scheme.
|
||||
|
||||
rowCounter = 1; // Set this to zero, because we don't want to skip anything
|
||||
colCounter = 1;
|
||||
// colCounter = 1;
|
||||
|
||||
WINDOW* mainwin = newwin(yLen-7,xLen-9,START_WIN,START_WIN); /*NCURSES - This creates our 'main' window, that will be
|
||||
used to display ~99% of the actual content.*/
|
||||
|
8
texted.c
8
texted.c
@@ -33,7 +33,7 @@
|
||||
int run(char* dir) {
|
||||
char* text;
|
||||
char* saveLocation;
|
||||
char* tempSaveLoc;
|
||||
// char* tempSaveLoc;
|
||||
int textCounter;
|
||||
int selRow=1;
|
||||
// int numCharsCurrent;
|
||||
@@ -46,7 +46,7 @@ int run(char* dir) {
|
||||
int numLines;
|
||||
bool newLineFound;
|
||||
// int textIndex;
|
||||
char* shortText;
|
||||
// char* shortText;
|
||||
int upArrowDistance;
|
||||
int charsOnLine;
|
||||
|
||||
@@ -82,7 +82,7 @@ int run(char* dir) {
|
||||
int numNewLinesFound=0;
|
||||
int indexToBegin=0;
|
||||
FILE* readFile;
|
||||
int tempSelRow,tempSelCol;
|
||||
// int tempSelRow,tempSelCol;
|
||||
|
||||
// if (argc > 1) {
|
||||
if (readFile = fopen(dir,"r")) {
|
||||
@@ -432,7 +432,7 @@ int run(char* dir) {
|
||||
|
||||
endwin();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user