Integrating patchs from Roland Stigge (Debian).
* Differing definitions of <ctp_name> structure in ctp. * Parsing command line in <asimut>, <m2e> & <mips_asm> (Debian bugs #715651, #716529 & #716217)
This commit is contained in:
parent
17ace03ec5
commit
7d2cea9213
|
@ -151,8 +151,8 @@ char *argv[];
|
|||
arg_flg [i ] = 1;
|
||||
}
|
||||
|
||||
if ((!strcmp (argv [i], "-fixeddelay"))
|
||||
|| (!strcmp (argv [i], "-fd")))
|
||||
if (((!strcmp (argv [i], "-fixeddelay"))
|
||||
|| (!strcmp (argv [i], "-fd"))) && (argc > i + 1))
|
||||
{
|
||||
fixdly_flg = 1;
|
||||
delay_mode |= BEH_DELAY_FIXED;
|
||||
|
@ -161,8 +161,8 @@ char *argv[];
|
|||
arg_flg [i+1] = 1;
|
||||
}
|
||||
|
||||
if ((!strcmp (argv [i], "-backdelay"))
|
||||
|| (!strcmp (argv [i], "-bd")))
|
||||
if (((!strcmp (argv [i], "-backdelay"))
|
||||
|| (!strcmp (argv [i], "-bd"))) && (argc > i + 1))
|
||||
{
|
||||
bckdly_flg = i + 2;
|
||||
delay_mode |= BEH_DELAY_BACKANOTATED;
|
||||
|
@ -217,14 +217,14 @@ char *argv[];
|
|||
arg_flg [i] = 1;
|
||||
}
|
||||
|
||||
if (!strcmp (argv [i], "-p"))
|
||||
if (!strcmp (argv [i], "-p") && (argc > i + 1))
|
||||
{
|
||||
sscanf (argv [i+1], "%u", &max_pat);
|
||||
arg_flg [i ] = 1;
|
||||
arg_flg [i+1] = 1;
|
||||
}
|
||||
|
||||
if (!strcmp (argv [i], "-l"))
|
||||
if (!strcmp (argv [i], "-l") && (argc > i + 1))
|
||||
{
|
||||
sscanf (argv [i+1], "%u", &labelsiz);
|
||||
arg_flg [i ] = 1;
|
||||
|
@ -237,7 +237,7 @@ char *argv[];
|
|||
arg_flg [i] = 1;
|
||||
}
|
||||
|
||||
if (!strcmp (argv [i], "-stat"))
|
||||
if (!strcmp (argv [i], "-stat") && (argc > i + 1))
|
||||
{
|
||||
stat_flg = i + 2;
|
||||
sscanf (argv [i+1], "%u", &ref_date);
|
||||
|
@ -260,7 +260,7 @@ char *argv[];
|
|||
arg_flg [i+1] = 1;
|
||||
}
|
||||
|
||||
if (!strcmp (argv [i], "-inspect"))
|
||||
if (!strcmp (argv [i], "-inspect") && (argc > i + 1))
|
||||
{
|
||||
str = namealloc (argv [i+1]);
|
||||
pt_pains = pat_addpains (pt_pains, str, str);
|
||||
|
|
|
@ -38,25 +38,7 @@
|
|||
#include "vex.h"
|
||||
#include "ctl.h"
|
||||
|
||||
typedef struct ctp_expr
|
||||
{
|
||||
vexexpr *IDENT; /* identifier or constant name */
|
||||
vexexpr *VEX; /* pointer on bvl_abllst list */
|
||||
short WIDTH;
|
||||
short TYPE;
|
||||
}
|
||||
ctp_vexstr;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *NAME; /* identifier name */
|
||||
long LEFT; /* vector's left index */
|
||||
long RIGHT; /* vector's right index */
|
||||
short WIDTH;
|
||||
char FLAG;
|
||||
}
|
||||
ctp_name;
|
||||
|
||||
#include "ctp_bspec.h"
|
||||
#include "ctp_y.h"
|
||||
#include "ctp_bedef.h"
|
||||
#include "ctp_blex.h"
|
||||
|
|
|
@ -102,6 +102,8 @@ int ParseCommand(int argc,char *argv[])
|
|||
switch(argv[i][1])
|
||||
{
|
||||
case 'v':
|
||||
if (argc <= i + 1)
|
||||
break;
|
||||
i++;
|
||||
sscanf(argv[i],"%11d",&VerboseMode);
|
||||
if(VerboseMode>=VMINFO)
|
||||
|
@ -109,6 +111,8 @@ int ParseCommand(int argc,char *argv[])
|
|||
break;
|
||||
|
||||
case 'o':
|
||||
if (argc <= i + 1)
|
||||
break;
|
||||
i++;
|
||||
OutputName=argv[i];
|
||||
if(VerboseMode>=VMINFO)
|
||||
|
|
|
@ -99,14 +99,14 @@ char *argv [];
|
|||
{
|
||||
if (arg_flg [i] == 0)
|
||||
{
|
||||
if (!strcmp (argv[i], "-textsize"))
|
||||
if (!strcmp (argv[i], "-textsize") && argc > i + 1)
|
||||
{
|
||||
sscanf (argv[i+1], "%u", &txt_siz);
|
||||
arg_flg [i ] = 1;
|
||||
arg_flg [i+1] = 1;
|
||||
}
|
||||
|
||||
if (!strcmp (argv[i], "-datasize"))
|
||||
if (!strcmp (argv[i], "-datasize") && argc > i + 1)
|
||||
{
|
||||
sscanf (argv[i+1], "%u", &dat_siz);
|
||||
arg_flg [i ] = 1;
|
||||
|
@ -119,7 +119,7 @@ char *argv [];
|
|||
arg_flg [i] = 1 ;
|
||||
}
|
||||
|
||||
if (!strcmp (argv[i], "-symbol"))
|
||||
if (!strcmp (argv[i], "-symbol") && argc > i + 1)
|
||||
{
|
||||
MPS_SYMBOL = 'y' ;
|
||||
symbol_fil = argv [i+1];
|
||||
|
|
Loading…
Reference in New Issue