X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Frepeat.c;h=42467096808b98d9a6891584c383b41eb65ce6da;hb=05e356b2a3087e819ef3b5388e29c822f41502e1;hp=4a5bf2f9dc1a983c8edd235b547082441a2b6012;hpb=a7cc8b259f0fe963aa30d4e64f7d39551ded1454;p=pspp-builds.git diff --git a/src/repeat.c b/src/repeat.c index 4a5bf2f9..42467096 100644 --- a/src/repeat.c +++ b/src/repeat.c @@ -40,7 +40,7 @@ struct repeat_entry { int type; /* 1=variable names, 0=any other. */ - char id[9]; /* Macro identifier. */ + char id[SHORT_NAME_LEN + 1]; /* Macro identifier. */ char **replacement; /* Macro replacement. */ struct repeat_entry *next; }; @@ -125,7 +125,7 @@ static int internal_cmd_do_repeat (void) { /* Name of first DO REPEAT macro. */ - char first_name[9]; + char first_name[SHORT_NAME_LEN + 1]; /* Current filename. */ const char *current_filename = NULL; @@ -553,12 +553,12 @@ perform_DO_REPEAT_substitutions (void) /* Collect an identifier. */ { - char name[9]; + char name[SHORT_NAME_LEN + 1]; char *start = cp; char *np = name; char *substitution; - while (CHAR_IS_IDN (*cp) && np < &name[8]) + while (CHAR_IS_IDN (*cp) && np < &name[SHORT_NAME_LEN]) *np++ = *cp++; while (CHAR_IS_IDN (*cp)) cp++;