X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/045b7419593b1b8f95c56e352326bb504b5fa44b..d43d1075666c90460941d74f5a568d29707cd540:/usr/src/usr.bin/tn3270/tools/mkmake.y?ds=inline diff --git a/usr/src/usr.bin/tn3270/tools/mkmake.y b/usr/src/usr.bin/tn3270/tools/mkmake.y index 086bf5c3d3..67f7b8176d 100644 --- a/usr/src/usr.bin/tn3270/tools/mkmake.y +++ b/usr/src/usr.bin/tn3270/tools/mkmake.y @@ -1,4 +1,24 @@ %{ + +/* + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)mkmake.y 4.1 (Berkeley) %G% + */ + typedef struct string { int hashval, @@ -127,7 +147,7 @@ action: white_space command_list NL for_statement: maybe_at_minus FOR white_space token in tokens semi_colon { - $$ = for_statement($1, $4, expand_variables($6, 0)); + $$ = for_statement($1, $4, ws_merge(expand_variables($6, 0))); } ; @@ -667,14 +687,14 @@ int free; char *string = token->string->string; same_t *tmp = same_unlink(token); - if ((string[0] == '$') && (string[1] == '{')) {/* '}' Expand time */ + if ((string[0] == '$') && (string[1] == '{')) { /* Expand time */ int len = strlen(string); string[len-1] = 0; head = same_cat(head, expand_variables( value_of(same_item(string_lookup(string+2))), 1)); string[len-1] = '}'; - } else if (!isspace(string[0])) { + } else { head = same_cat(head, token); } token = tmp; @@ -935,7 +955,12 @@ yylex() Return(c,c); case '\'': case '"': - { + if (bufptr != buffer) { + if (bufptr[-1] == '\\') { + bufptr[-1] = c; + } + break; + } else { int newc; ret_token(c); @@ -975,6 +1000,10 @@ yylex() Return(EOF, 0); } +#ifndef lint +static char sccsid[] = "@(#)mkmake.y 4.1 (Berkeley) %G%"; +#endif /* not lint */ + main() { #define YYDEBUG