/*
- * $Id: file.c,v 1.6 2001-06-25 20:13:45 rufustfirefly Exp $
+ * $Id: file.c,v 1.9.12.1 2009-02-03 08:25:00 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include "config.h"
#endif /* HAVE_CONFIG_H */
-#include <sys/syslog.h>
+#include <atalk/logger.h>
#include <sys/param.h>
#include <stdio.h>
#include <stdlib.h>
#include "file.h"
+/*
+*/
int markline( pf, start, linelength, crlflength )
char **start;
int *linelength, *crlflength;
(p[*crlflength]=='\r' || p[*crlflength]=='\n')) {
(*crlflength)++;
}
+
+ if (!*crlflength) {
+ /* line is way too long, something fishy is going on, give up */
+ LOG(log_error, logtype_papd, "markline: no crlf in comment, give up" );
+ return( -2 );
+ }
- return *linelength;
+ /* success, return 1 */
+ return( 1 );
}
void morespace( pf, data, len )