Deleted Added
full compact
parser.c (199629) parser.c (199660)
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 22 unchanged lines hidden (view full) ---

31 */
32
33#ifndef lint
34#if 0
35static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 22 unchanged lines hidden (view full) ---

31 */
32
33#ifndef lint
34#if 0
35static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/bin/sh/parser.c 199629 2009-11-21 14:28:32Z jilles $");
39__FBSDID("$FreeBSD: head/bin/sh/parser.c 199660 2009-11-22 18:23:30Z jilles $");
40
41#include <stdlib.h>
42#include <unistd.h>
43
44#include "shell.h"
45#include "parser.h"
46#include "nodes.h"
47#include "expand.h" /* defines rmescapes() */

--- 1259 unchanged lines hidden (view full) ---

1307 union node *n;
1308 char *volatile str;
1309 struct jmploc jmploc;
1310 struct jmploc *const savehandler = handler;
1311 int savelen;
1312 int saveprompt;
1313 const int bq_startlinno = plinno;
1314
40
41#include <stdlib.h>
42#include <unistd.h>
43
44#include "shell.h"
45#include "parser.h"
46#include "nodes.h"
47#include "expand.h" /* defines rmescapes() */

--- 1259 unchanged lines hidden (view full) ---

1307 union node *n;
1308 char *volatile str;
1309 struct jmploc jmploc;
1310 struct jmploc *const savehandler = handler;
1311 int savelen;
1312 int saveprompt;
1313 const int bq_startlinno = plinno;
1314
1315 str = NULL;
1315 if (setjmp(jmploc.loc)) {
1316 if (str)
1317 ckfree(str);
1318 handler = savehandler;
1319 if (exception == EXERROR) {
1320 startlinno = bq_startlinno;
1321 synerror("Error in command substitution");
1322 }
1323 longjmp(handler->loc, 1);
1324 }
1325 INTOFF;
1316 if (setjmp(jmploc.loc)) {
1317 if (str)
1318 ckfree(str);
1319 handler = savehandler;
1320 if (exception == EXERROR) {
1321 startlinno = bq_startlinno;
1322 synerror("Error in command substitution");
1323 }
1324 longjmp(handler->loc, 1);
1325 }
1326 INTOFF;
1326 str = NULL;
1327 savelen = out - stackblock();
1328 if (savelen > 0) {
1329 str = ckmalloc(savelen);
1330 memcpy(str, stackblock(), savelen);
1331 }
1332 handler = &jmploc;
1333 INTON;
1334 if (oldstyle) {

--- 341 unchanged lines hidden ---
1327 savelen = out - stackblock();
1328 if (savelen > 0) {
1329 str = ckmalloc(savelen);
1330 memcpy(str, stackblock(), savelen);
1331 }
1332 handler = &jmploc;
1333 INTON;
1334 if (oldstyle) {

--- 341 unchanged lines hidden ---