From: Joey Schulze Date: Sun, 11 Nov 2001 18:06:45 +0000 (+0000) Subject: Whoops, there is another unused text field. If we use this one as X-Git-Url: https://git.infodrom.org/?p=infodrom%2Fdtaus;a=commitdiff_plain;h=262f496c6c7498f2b02f8c29548d826e570757b4 Whoops, there is another unused text field. If we use this one as well we may use up to 62 text fields --- diff --git a/dtaus.5 b/dtaus.5 index 7b593ce..a6d9810 100644 --- a/dtaus.5 +++ b/dtaus.5 @@ -65,7 +65,7 @@ Here's a short sample for a control file: ... -You may use up to 61 fields entitle +You may use up to 62 fields entitle .BR Text . They will be recorded one by one and stored into additional data records. This way you could add a detailed description of the type of diff --git a/dtaus.c b/dtaus.c index 35ebd44..4ad2310 100644 --- a/dtaus.c +++ b/dtaus.c @@ -98,7 +98,7 @@ dtaus_record recC[] = { #define C_EXT 11 #define C_LEN 12 -#define MAX_TEXT 60 +#define MAX_TEXT 61 dtaus_record recE[] = { {"Anzahl", 10, 7, IGN}, @@ -491,7 +491,7 @@ void dtaus_prepareC (char *buf, int normaltext, int maxtext) if (normaltext) appendix = 1; if (maxtext) { - res = div (maxtext, 4); + res = div (maxtext-1, 4); appendix += res.quot; if (res.rem) appendix++; } @@ -644,7 +644,12 @@ int dtaus_writeC(FILE *f, char **valuesA, char **values, char **text) } if (text) { - res = div (maxtext, 4); + buf[recC[C_EXT].pos+0] = '0'; + buf[recC[C_EXT].pos+1] = '2'; + sprintf (tmp, "%-27s", upcase(text[0])); + for (i=0; i 1) { + fieldnr=1; while (fieldnr