forked from bonsai/harakit
dj(1): better ASV formatting and comments
This commit is contained in:
parent
7e347bebdf
commit
8d23c7fbac
16
src/dj.c
16
src/dj.c
@ -49,10 +49,6 @@ struct Io {
|
||||
int fl; /* file opening flags */
|
||||
};
|
||||
|
||||
/* To be assigned to main:fmt and used with printio(). */
|
||||
static char *fmt_asv = "%d\037%d\036%d\037%d\035%d\036%d\034";
|
||||
static char *fmt_human = "%d+%d > %d+%d; %d > %d\n";
|
||||
|
||||
static char *stdin_name = "<stdin>";
|
||||
static char *stdout_name = "<stdout>";
|
||||
|
||||
@ -132,6 +128,18 @@ fprintio(FILE *stream, char *fmt, struct Io io[2]) {
|
||||
);
|
||||
}
|
||||
|
||||
/* To be assigned to main:fmt and used with printio(). */
|
||||
static char *fmt_asv =
|
||||
"%d" /* io[0].rec */ "\037" /* ASCII US */
|
||||
"%d" /* io[0].prec */ "\036" /* ASCII RS */
|
||||
"%d" /* io[1].rec */ "\037" /* ASCII US */
|
||||
"%d" /* io[1].prec */ "\035" /* ASCII GS */
|
||||
"%d" /* io[0].bytes */ "\036" /* ASCII RS */
|
||||
"%d" /* io[1].bytes */ "\034" /* ASCII FS */
|
||||
"\n"
|
||||
;
|
||||
static char *fmt_human = "%d+%d > %d+%d; %d > %d\n";
|
||||
|
||||
/* Parses the string s to an integer, returning either the integer or in the
|
||||
* case of an error a negative integer. This is used for argument parsing
|
||||
* (e.g. -B [int]) in dj and no negative integer would be valid anyway. */
|
||||
|
Loading…
Reference in New Issue
Block a user