Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Sun, 07 Aug 2016 16:31:30 UTC Commit: 967b572240513689fc2f6f9aefa929e7d54f6bfc https://github.com/geany/geany/commit/967b572240513689fc2f6f9aefa929e7d54f6b...
Log Message: ----------- Rename MIO variables from fp to mio
Modified Paths: -------------- ctags/main/entry.c ctags/main/read.c ctags/main/read.h
Modified: ctags/main/entry.c 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -366,8 +366,8 @@ extern void openTagFile (void) static int replacementTruncate (const char *const name, const long size) { char *tempName = NULL; - FILE *fp = tempFile ("w", &tempName); - fclose (fp); + MIO *mio = tempFile ("w", &tempName); + fclose (mio); copyFile (name, tempName, size); copyFile (tempName, name, WHOLE_FILE); remove (tempName);
Modified: ctags/main/read.c 14 lines changed, 7 insertions(+), 7 deletions(-) =================================================================== @@ -247,7 +247,7 @@ static boolean parseLineDirective (void) */
/* This function opens an input file, and resets the line counter. If it - * fails, it will display an error message and leave the File.fp set to NULL. + * fails, it will display an error message and leave the File.mio set to NULL. */ extern boolean fileOpen (const char *const fileName, const langType language) { @@ -539,12 +539,12 @@ extern const unsigned char *readLineFromInputFile (void) /* * Raw file line reading with automatic buffer sizing */ -extern char *readLineRaw (vString *const vLine, MIO *const fp) +extern char *readLineRaw (vString *const vLine, MIO *const mio) { char *result = NULL;
vStringClear (vLine); - if (fp == NULL) /* to free memory allocated to buffer */ + if (mio == NULL) /* to free memory allocated to buffer */ error (FATAL, "NULL file pointer"); else { @@ -560,13 +560,13 @@ extern char *readLineRaw (vString *const vLine, MIO *const fp) char *const pLastChar = vStringValue (vLine) + vStringSize (vLine) -2; long startOfLine;
- startOfLine = mio_tell(fp); + startOfLine = mio_tell(mio); reReadLine = FALSE; *pLastChar = '\0'; - result = mio_gets (fp, vStringValue (vLine), (int) vStringSize (vLine)); + result = mio_gets (mio, vStringValue (vLine), (int) vStringSize (vLine)); if (result == NULL) { - if (! mio_eof (fp)) + if (! mio_eof (mio)) error (FATAL | PERROR, "Failure on attempt to read file"); } else if (*pLastChar != '\0' && @@ -575,7 +575,7 @@ extern char *readLineRaw (vString *const vLine, MIO *const fp) /* buffer overflow */ reReadLine = vStringAutoResize (vLine); if (reReadLine) - mio_seek (fp, startOfLine, SEEK_SET); + mio_seek (mio, startOfLine, SEEK_SET); else error (FATAL | PERROR, "input line too big; out of memory"); }
Modified: ctags/main/read.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -114,7 +114,7 @@ extern int getNthPrevCFromInputFile (unsigned int nth, int def); extern int skipToCharacterInInputFile (int c); extern void ungetcToInputFile (int c); extern const unsigned char *readLineFromInputFile (void); -extern char *readLineRaw (vString *const vLine, MIO *const fp); +extern char *readLineRaw (vString *const vLine, MIO *const mio); extern char *readSourceLine (vString *const vLine, MIOPos location, long *const pSeekValue); extern boolean bufferOpen (unsigned char *buffer, size_t buffer_size, const char *const fileName, const langType language );
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).