aded STIX_SYNERR_INCLUDE
This commit is contained in:
parent
5ba0c67dd1
commit
132e4b48bb
@ -1383,7 +1383,11 @@ static int begin_include (stix_t* stix)
|
||||
arg->colm = 1;
|
||||
arg->includer = stix->c->curinp;
|
||||
|
||||
if (stix->c->impl (stix, STIX_IO_OPEN, arg) <= -1) goto oops;
|
||||
if (stix->c->impl (stix, STIX_IO_OPEN, arg) <= -1)
|
||||
{
|
||||
set_syntax_error (stix, STIX_SYNERR_INCLUDE, &stix->c->tok.loc, &stix->c->tok.name);
|
||||
goto oops;
|
||||
}
|
||||
|
||||
stix->c->curinp = arg;
|
||||
/* stix->c->depth.incl++; */
|
||||
|
@ -80,6 +80,8 @@ static STIX_INLINE stix_ssize_t open_input (stix_t* stix, stix_ioarg_t* arg)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* TODO: make bcs relative to the includer */
|
||||
|
||||
#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__)
|
||||
arg->handle = fopen (bcs, "rb");
|
||||
#else
|
||||
@ -211,7 +213,8 @@ static char* syntax_error_msg[] =
|
||||
"too many block temporaries",
|
||||
"too many block arguments",
|
||||
"too large block",
|
||||
"wrong primitive number"
|
||||
"wrong primitive number",
|
||||
"#include error"
|
||||
};
|
||||
|
||||
stix_uch_t str_stix[] = { 'S', 't', 'i', 'x' };
|
||||
|
@ -326,7 +326,8 @@ enum stix_synerrnum_t
|
||||
STIX_SYNERR_BLKTMPRFLOOD, /* too many block temporaries */
|
||||
STIX_SYNERR_BLKARGFLOOD, /* too many block arguments */
|
||||
STIX_SYNERR_BLKFLOOD, /* too large block */
|
||||
STIX_SYNERR_PRIMNO /* wrong primitive number */
|
||||
STIX_SYNERR_PRIMNO, /* wrong primitive number */
|
||||
STIX_SYNERR_INCLUDE /* #include error */
|
||||
};
|
||||
typedef enum stix_synerrnum_t stix_synerrnum_t;
|
||||
|
||||
|
@ -376,7 +376,7 @@ enum stix_obj_type_t
|
||||
STIX_OBJ_TYPE_OOP,
|
||||
STIX_OBJ_TYPE_CHAR,
|
||||
STIX_OBJ_TYPE_BYTE,
|
||||
STIX_OBJ_TYPE_WORD,
|
||||
STIX_OBJ_TYPE_WORD
|
||||
|
||||
/*
|
||||
STIX_OBJ_TYPE_UINT8,
|
||||
|
@ -310,7 +310,7 @@ static STIX_INLINE int bcs_to_ucs_with_cmgr (
|
||||
stix_size_t mlen, wlen;
|
||||
int n;
|
||||
|
||||
for (bp = bcs; *bp != '\0'; bp++);
|
||||
for (bp = bcs; *bp != '\0'; bp++) /* nothing */ ;
|
||||
|
||||
mlen = bp - bcs; wlen = *ucslen;
|
||||
n = bcsn_to_ucsn_with_cmgr (bcs, &mlen, ucs, &wlen, cmgr, all);
|
||||
|
Loading…
Reference in New Issue
Block a user