From e7db41ab669949e4fa767e775b7f5dc8a7a9023d Mon Sep 17 00:00:00 2001 From: David Capello Date: Tue, 26 Oct 2010 13:50:31 -0700 Subject: [PATCH] Minor style changes. --- src/effect/convmatr.cpp | 2 +- src/util/filetoks.cpp | 20 ++++++++++---------- src/util/filetoks.h | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/effect/convmatr.cpp b/src/effect/convmatr.cpp index da950734d..40584e655 100644 --- a/src/effect/convmatr.cpp +++ b/src/effect/convmatr.cpp @@ -182,7 +182,7 @@ void reload_matrices_stock() strcpy(leavings, ""); /* read the matrix name */ - while (tok_read (f, buf, leavings, sizeof (leavings))) { + while (tok_read(f, buf, leavings, sizeof(leavings))) { /* name of the matrix */ name = jstrdup(buf); diff --git a/src/util/filetoks.cpp b/src/util/filetoks.cpp index e96990f08..d80a4a8ba 100644 --- a/src/util/filetoks.cpp +++ b/src/util/filetoks.cpp @@ -23,32 +23,32 @@ static int line_num; -static char *tok_fgets (char *buf, int size, FILE *file); +static char* tok_fgets(char* buf, int size, FILE* file); -void tok_reset_line_num () +void tok_reset_line_num() { line_num = 0; } -int tok_line_num () +int tok_line_num() { return line_num; } -char *tok_read (FILE *f, char *buf, char *leavings, int sizeof_leavings) +char* tok_read(FILE* f, char* buf, char* leavings, int sizeof_leavings) { int ch, len = 0; - char *s; + char* s; *buf = 0; - if (feof (f)) + if (feof(f)) return NULL; while (!*buf) { if (!*leavings) { line_num++; - if (!tok_fgets (leavings, sizeof_leavings, f)) + if (!tok_fgets(leavings, sizeof_leavings, f)) return NULL; } @@ -59,7 +59,7 @@ char *tok_read (FILE *f, char *buf, char *leavings, int sizeof_leavings) s++; } else if (ch == '#') { - s += strlen (s); + s += strlen(s); break; } else if (ch == '\"') { @@ -68,7 +68,7 @@ char *tok_read (FILE *f, char *buf, char *leavings, int sizeof_leavings) for (ch=*s; ; ch=*s) { if (!ch) { line_num++; - if (!tok_fgets (leavings, sizeof_leavings, f)) + if (!tok_fgets(leavings, sizeof_leavings, f)) break; else { s = leavings; @@ -100,7 +100,7 @@ char *tok_read (FILE *f, char *buf, char *leavings, int sizeof_leavings) } } - memmove (leavings, s, strlen (s)+1); + memmove(leavings, s, strlen(s)+1); } buf[len] = 0; diff --git a/src/util/filetoks.h b/src/util/filetoks.h index d7a1931fe..0acc8c19d 100644 --- a/src/util/filetoks.h +++ b/src/util/filetoks.h @@ -21,9 +21,9 @@ #include -void tok_reset_line_num (); -int tok_line_num (); +void tok_reset_line_num(); +int tok_line_num(); -char *tok_read (FILE *f, char *buf, char *leavings, int sizeof_leavings); +char* tok_read(FILE* f, char* buf, char* leavings, int sizeof_leavings); #endif