* $Author$
* $Header$
*
- * Copyright (C) 1987 by the Massachusetts Institute of Technology
- *
- * $Log$
- * Revision 1.2 1988-05-10 11:34:37 mar
- * Throw away rest of field if too long
- *
- * Revision 1.1 87/07/13 03:50:02 wesommer
- * Initial revision
+ * (c) Copyright 1988 by the Massachusetts Institute of Technology.
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
*
*/
#include <sys/file.h>
#include <stdio.h>
#include <ctype.h>
+#include <mit-copyright.h>
+#include "dump_db.h"
+
/*ARGSUSED*/
main(argc, argv)
register int c;
register int val = 0;
register int sign = 1;
- while ((c = getc(f)) != EOF && c != ':' && c != '\n') {
+ while ((c = getc(f)) != EOF && c != SEP_CHAR && c != '\n') {
if (c == '-') sign = -1;
else if (isdigit(c)) {
val *= 10;
{
register int c;
- while ((c = getc(f)) != EOF && c != ':' && c != '\n' && len > 0) {
+ while ((c = getc(f)) != EOF && c != SEP_CHAR && c != '\n' && len > 0) {
if (c == '\\') {
c = getc(f);
if (isdigit(c)) {
punt("Broken \\###");
/* Convert to ASCII code: */
*buf++ = (((c-'0')<<6) + ((c1-'0')<<3) + c2-'0');
- } else if (c == '\\' || c == ':') {
+ } else if (c == '\\' || c == SEP_CHAR) {
*buf++ = c;
--len;
} else punt ("Broken '\\'");
if (c == EOF)
return;
- if (c != EOF && c != ':' && c != '\n') {
+ if (c != EOF && c != SEP_CHAR && c != '\n') {
fprintf(stderr, "Field too wide, truncated\n");
- while ((c = getc(f)) != EOF && c != ':' && c != '\n');
+ while ((c = getc(f)) != EOF && c != SEP_CHAR && c != '\n');
(void) ungetc(c, f);
} else {
*buf++ = 0;
void parse_sep(f)
FILE *f;
{
- if (getc(f) != ':') punt("Expected colon");
+ if (getc(f) != SEP_CHAR) punt("Expected Separator");
}
void parse_nl(f)
FILE *f;
fprintf(stderr, "Working on %s\n", name);
return(f);
}
-
-/*
- * Local Variables:
- * mode: c
- * c-indent-level: 4
- * c-continued-statement-offset: 4
- * c-brace-offset: -4
- * c-argdecl-indent: 4
- * c-label-offset: -4
- * End:
- */