From 82b3ae254c867d1ba7d305d3595502a50346218f Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 5 Mar 1991 17:52:37 +0000 Subject: [PATCH] Added -S flag --- lang/cem/cemcom/BigPars | 2 +- lang/cem/cemcom/SmallPars | 2 +- lang/cem/cemcom/options | 1 + lang/cem/cemcom/options.c | 4 ++++ lang/cem/cemcom/switch.c | 3 ++- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lang/cem/cemcom/BigPars b/lang/cem/cemcom/BigPars index b3b746eb4..f875eaeb0 100644 --- a/lang/cem/cemcom/BigPars +++ b/lang/cem/cemcom/BigPars @@ -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 diff --git a/lang/cem/cemcom/SmallPars b/lang/cem/cemcom/SmallPars index a55ebb2c6..d4e1ae18a 100644 --- a/lang/cem/cemcom/SmallPars +++ b/lang/cem/cemcom/SmallPars @@ -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 diff --git a/lang/cem/cemcom/options b/lang/cem/cemcom/options index b14bdc686..0dd646879 100644 --- a/lang/cem/cemcom/options +++ b/lang/cem/cemcom/options @@ -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 diff --git a/lang/cem/cemcom/options.c b/lang/cem/cemcom/options.c index 296ed59af..346c88dfb 100644 --- a/lang/cem/cemcom/options.c +++ b/lang/cem/cemcom/options.c @@ -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 } } diff --git a/lang/cem/cemcom/switch.c b/lang/cem/cemcom/switch.c index 27ea92aca..7f2579c3e 100644 --- a/lang/cem/cemcom/switch.c +++ b/lang/cem/cemcom/switch.c @@ -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; -- 2.34.1