+Wed Feb 14 16:43:48 1996 <tytso@rsts-11.mit.edu>
+
+ * prof_parse.c (parse_std_line): Make parsing more flexible, so we
+ don't barf over lack of spaces around the equals sign.
+
Tue Dec 12 19:18:14 1995 Mark Eichin <eichin@cygnus.com>
* krb5.conf: use host:portnum in example files, not host,portnum.
/*
* Parse the relations
*/
- p = strchr(cp, ' ');
- if (!p)
- return PROF_RELATION_SYNTAX;
- *p = '\0';
tag = cp;
- cp = skip_over_blanks(p+1);
- if (*cp != '=')
+ cp = strchr(cp, '=');
+ if (!cp)
return PROF_RELATION_SYNTAX;
+ *cp = '\0';
+ p = strchr(tag, ' ');
+ if (p) {
+ *p = '\0';
+ p = skip_over_blanks(p+1);
+ if (p != cp)
+ return PROF_RELATION_SYNTAX;
+ }
cp = skip_over_blanks(cp+1);
value = cp;
if (value[0] == 0) {
&name, &p);
if (retval)
break;
- if (level == 0) /* [xxx] */
- {
+ if (level == 0) { /* [xxx] */
for (i=0; i < level; i++)
fprintf(dstfile, "\t");
fprintf(dstfile, "[%s]\r", name);
dump_profile_to_file(p, level+1, dstfile);
fprintf(dstfile, "\r");
- }
- else if (level == 1) /* xxx = { ... } */
- {
+ } else { /* xxx = { ... } */
for (i=0; i < level; i++)
fprintf(dstfile, "\t");
fprintf(dstfile, "%s = {\r", name);
fprintf(dstfile, "\t");
fprintf(dstfile, "}\r");
}
- else /* +xxx+ */
- {
- /* don't know what comes next, this should get someones attention */
- fprintf(dstfile, "+%s+");
- }
} while (iter != 0);
}