Deleted Added
full compact
expand.c (200988) expand.c (201053)
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[] = "@(#)expand.c 8.5 (Berkeley) 5/15/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[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/bin/sh/expand.c 200988 2009-12-25 15:29:18Z jilles $");
39__FBSDID("$FreeBSD: head/bin/sh/expand.c 201053 2009-12-27 18:04:05Z jilles $");
40
41#include <sys/types.h>
42#include <sys/time.h>
43#include <sys/stat.h>
44#include <errno.h>
45#include <dirent.h>
46#include <unistd.h>
47#include <pwd.h>

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

850 */
851
852STATIC void
853varvalue(char *name, int quoted, int subtype, int flag)
854{
855 int num;
856 char *p;
857 int i;
40
41#include <sys/types.h>
42#include <sys/time.h>
43#include <sys/stat.h>
44#include <errno.h>
45#include <dirent.h>
46#include <unistd.h>
47#include <pwd.h>

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

850 */
851
852STATIC void
853varvalue(char *name, int quoted, int subtype, int flag)
854{
855 int num;
856 char *p;
857 int i;
858 extern int oexitstatus;
859 char sep;
860 char **ap;
861 char const *syntax;
862
863#define STRTODEST(p) \
864 do {\
865 if (flag & (EXP_FULL | EXP_CASE) && subtype != VSLENGTH) { \
866 syntax = quoted? DQSYNTAX : BASESYNTAX; \

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

974STATIC void
975ifsbreakup(char *string, struct arglist *arglist)
976{
977 struct ifsregion *ifsp;
978 struct strlist *sp;
979 char *start;
980 char *p;
981 char *q;
858 char sep;
859 char **ap;
860 char const *syntax;
861
862#define STRTODEST(p) \
863 do {\
864 if (flag & (EXP_FULL | EXP_CASE) && subtype != VSLENGTH) { \
865 syntax = quoted? DQSYNTAX : BASESYNTAX; \

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

973STATIC void
974ifsbreakup(char *string, struct arglist *arglist)
975{
976 struct ifsregion *ifsp;
977 struct strlist *sp;
978 char *start;
979 char *p;
980 char *q;
982 char *ifs;
981 const char *ifs;
983 const char *ifsspc;
984 int had_param_ch = 0;
985
986 start = string;
987
988 if (ifslastp == NULL) {
989 /* Return entire argument, IFS doesn't apply to any of it */
990 sp = (struct strlist *)stalloc(sizeof *sp);

--- 584 unchanged lines hidden ---
982 const char *ifsspc;
983 int had_param_ch = 0;
984
985 start = string;
986
987 if (ifslastp == NULL) {
988 /* Return entire argument, IFS doesn't apply to any of it */
989 sp = (struct strlist *)stalloc(sizeof *sp);

--- 584 unchanged lines hidden ---