expand.c (213760) | expand.c (213775) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 1997-2005 5 * Herbert Xu <herbert@gondor.apana.org.au>. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Kenneth Almquist. --- 24 unchanged lines hidden (view full) --- 33 */ 34 35#ifndef lint 36#if 0 37static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95"; 38#endif 39#endif /* not lint */ 40#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 1997-2005 5 * Herbert Xu <herbert@gondor.apana.org.au>. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Kenneth Almquist. --- 24 unchanged lines hidden (view full) --- 33 */ 34 35#ifndef lint 36#if 0 37static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95"; 38#endif 39#endif /* not lint */ 40#include <sys/cdefs.h> |
41__FBSDID("$FreeBSD: head/bin/sh/expand.c 213760 2010-10-13 04:01:01Z obrien $"); | 41__FBSDID("$FreeBSD: head/bin/sh/expand.c 213775 2010-10-13 13:22:11Z jhb $"); |
42 43#include <sys/types.h> 44#include <sys/time.h> 45#include <sys/stat.h> | 42 43#include <sys/types.h> 44#include <sys/time.h> 45#include <sys/stat.h> |
46#include <errno.h> | |
47#include <dirent.h> | 46#include <dirent.h> |
48#include <unistd.h> 49#include <pwd.h> 50#include <stdlib.h> | 47#include <errno.h> 48#include <inttypes.h> |
51#include <limits.h> | 49#include <limits.h> |
50#include <pwd.h> |
|
52#include <stdio.h> | 51#include <stdio.h> |
52#include <stdlib.h> |
|
53#include <string.h> | 53#include <string.h> |
54#include <unistd.h> |
|
54 55/* 56 * Routines to expand arguments to commands. We have to deal with 57 * backquotes, shell variables, and file metacharacters. 58 */ 59 60#include "shell.h" 61#include "main.h" --- 430 unchanged lines hidden (view full) --- 492 if (in.fd >= 0) 493 close(in.fd); 494 if (in.buf) 495 ckfree(in.buf); 496 if (in.jp) 497 exitstatus = waitforjob(in.jp, (int *)NULL); 498 if (quoted == 0) 499 recordregion(startloc, dest - stackblock(), 0); | 55 56/* 57 * Routines to expand arguments to commands. We have to deal with 58 * backquotes, shell variables, and file metacharacters. 59 */ 60 61#include "shell.h" 62#include "main.h" --- 430 unchanged lines hidden (view full) --- 493 if (in.fd >= 0) 494 close(in.fd); 495 if (in.buf) 496 ckfree(in.buf); 497 if (in.jp) 498 exitstatus = waitforjob(in.jp, (int *)NULL); 499 if (quoted == 0) 500 recordregion(startloc, dest - stackblock(), 0); |
500 TRACE(("evalbackq: size=%d: \"%.*s\"\n", 501 (dest - stackblock()) - startloc, 502 (dest - stackblock()) - startloc, | 501 TRACE(("expbackq: size=%td: \"%.*s\"\n", 502 ((dest - stackblock()) - startloc), 503 (int)((dest - stackblock()) - startloc), |
503 stackblock() + startloc)); 504 expdest = dest; 505 INTON; 506} 507 508 509 510STATIC int --- 1073 unchanged lines hidden --- | 504 stackblock() + startloc)); 505 expdest = dest; 506 INTON; 507} 508 509 510 511STATIC int --- 1073 unchanged lines hidden --- |