+Mon Jun 10 17:35:02 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * test_profile.c: Add usage message if not enough arguments.
+
+ * prof_parse.c (dump_profile_to_file, dump_profile): Dump the
+ profile using the correct line terminator for Windows,
+ Macintosh, etc.
+
+ * prof_parse.c:
+ * prof_file.c: Change _WINDOWS to _MSDOS, and add check for _WIN32.
+
+ * prof_int.h: Add size #defines for _WIN32. Handle prototypes
+ correctly for _WIN32.
+
+Fri Feb 16 15:18:17 1996 <tytso@rsts-11.mit.edu>
+
+ * prof_int.h: Added comment to profile state structure
+
Wed Feb 14 16:43:48 1996 <tytso@rsts-11.mit.edu>
* prof_parse.c (parse_std_line): Make parsing more flexible, so we
return 0;
}
-#ifndef _WINDOWS
+#if defined(_MSDOS) || defined(_WIN32)
+#define EOL "\r\n"
+#endif
+
+#ifdef _MACINTOSH
+#define EOL "\r"
+#endif
+
+#ifndef EOL
+#define EOL "\n"
+#endif
+
+#if !defined(_MSDOS) && !defined(_WIN32)
void dump_profile(root, level)
struct profile_node *root;
break;
for (i=0; i < level; i++)
printf(" ");
- printf("%s = '%s'\n", name, value);
+ printf("%s = '%s'%s", name, value, EOL);
} while (iter != 0);
iter = 0;
break;
for (i=0; i < level; i++)
printf(" ");
- printf("[%s]\n", name);
+ printf("[%s]%s", name, EOL);
dump_profile(p, level+1);
} while (iter != 0);
}
-#endif /* ! _WINDOWS */
+#endif /* !_MSDOS && !_WIN32 */
void dump_profile_to_file(root, level, dstfile)
break;
for (i=0; i < level; i++)
fprintf(dstfile, "\t");
- fprintf(dstfile, "%s = %s\r", name, value);
+ fprintf(dstfile, "%s = %s%s", name, value, EOL);
} while (iter != 0);
iter = 0;
if (level == 0) { /* [xxx] */
for (i=0; i < level; i++)
fprintf(dstfile, "\t");
- fprintf(dstfile, "[%s]\r", name);
+ fprintf(dstfile, "[%s]%s", name, EOL);
dump_profile_to_file(p, level+1, dstfile);
- fprintf(dstfile, "\r");
+ fprintf(dstfile, EOL);
} else { /* xxx = { ... } */
for (i=0; i < level; i++)
fprintf(dstfile, "\t");
- fprintf(dstfile, "%s = {\r", name);
+ fprintf(dstfile, "%s = {%s", name, EOL);
dump_profile_to_file(p, level+1, dstfile);
for (i=0; i < level; i++)
fprintf(dstfile, "\t");
- fprintf(dstfile, "}\r");
+ fprintf(dstfile, "}%s", EOL);
}
} while (iter != 0);
}