-const char loaders_rcs[] = "$Id: loaders.c,v 1.36 2002/01/22 23:46:18 jongfoster Exp $";
+const char loaders_rcs[] = "$Id: loaders.c,v 1.38 2002/03/06 22:54:35 jongfoster Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/loaders.c,v $
*
* Revisions :
* $Log: loaders.c,v $
+ * Revision 1.38 2002/03/06 22:54:35 jongfoster
+ * Automated function-comment nitpicking.
+ *
+ * Revision 1.37 2002/03/03 15:07:49 oes
+ * Re-enabled automatic config reloading
+ *
* Revision 1.36 2002/01/22 23:46:18 jongfoster
* Moving edit_read_line() and simple_read_line() to loaders.c, and
* extending them to support reading MS-DOS, Mac and UNIX style files
jb_err simple_read_line(FILE *fp, char **dest, int *newline)
{
int len = 0;
- int buflen = BUFFER_SIZE;
+ size_t buflen = BUFFER_SIZE;
char * buf;
char * p;
int ch;
* 1 : buf = Buffer to use.
* 2 : buflen = Size of buffer in bytes.
* 3 : fp = File to read from
- * 4 : linenum = linenumber in file
+ * 4 : linenum = linenumber in file
*
* Returns : NULL on EOF or error
* Otherwise, returns buf.
*
*********************************************************************/
-char *read_config_line(char *buf, int buflen, FILE *fp, unsigned long *linenum)
+char *read_config_line(char *buf, size_t buflen, FILE *fp, unsigned long *linenum)
{
jb_err err;
char *buf2 = NULL;
else
{
assert(buf2);
- assert(strlen(buf2) + 1U < (unsigned)buflen);
+ assert(strlen(buf2) + 1U < buflen);
strncpy(buf, buf2, buflen - 1);
free(buf2);
buf[buflen - 1] = '\0';