Added -S flag

This commit is contained in:
ceriel 1991-03-05 17:52:37 +00:00
parent 3a715f5479
commit 82b3ae254c
5 changed files with 9 additions and 3 deletions

View file

@ -30,7 +30,7 @@
!File: density.h
#define DENSITY 2 /* see switch.[ch] for an explanation */
#define DENSITY 3 /* see switch.[ch] for an explanation */
!File: lapbuf.h

View file

@ -30,7 +30,7 @@
!File: density.h
#define DENSITY 2 /* see switch.[ch] for an explanation */
#define DENSITY 3 /* see switch.[ch] for an explanation */
!File: lapbuf.h

View file

@ -13,6 +13,7 @@ L don't generate linenumbers and filename indications
p trace
P in running the preprocessor do not output '# line' lines
R restricted C
S density for CSA/CSB
T take path following as directory for storing temporary file(s)
U undefine predefined name
V set objectsize and alignment requirements

View file

@ -38,6 +38,7 @@ char loptions[128]; /* one for every char */
#endif LINT
extern int idfsize;
extern int density;
static int txt2int();
@ -337,6 +338,9 @@ deleted, is now a debug-flag
break;
}
#endif NOCROSS
case 'S':
density = txt2int(&text);
break;
#endif LINT
}
}

View file

@ -28,6 +28,7 @@
#include "noRoption.h"
extern char options[];
int density = DENSITY;
compact(nr, low, up)
arith low, up;
@ -38,7 +39,7 @@ compact(nr, low, up)
*/
arith diff = up - low;
return (nr == 0 || (diff >= 0 && diff / nr <= (DENSITY - 1)));
return (nr == 0 || (diff >= 0 && diff / nr <= (density - 1)));
}
static struct switch_hdr *switch_stack = 0;