expand.c (d899be7d43d8df9cb485af5705e2724165a461c7) expand.c (a4652c280b6f8a5b34143413f685d94b86e8b78c)
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.

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

1279 * Add a file name to the list.
1280 */
1281
1282static void
1283addfname(char *name)
1284{
1285 char *p;
1286 struct strlist *sp;
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.

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

1279 * Add a file name to the list.
1280 */
1281
1282static void
1283addfname(char *name)
1284{
1285 char *p;
1286 struct strlist *sp;
1287 size_t len;
1288
1287
1289 len = strlen(name);
1290 p = stalloc(len + 1);
1291 memcpy(p, name, len + 1);
1288 p = stsavestr(name);
1292 sp = (struct strlist *)stalloc(sizeof *sp);
1293 sp->text = p;
1294 *exparg.lastp = sp;
1295 exparg.lastp = &sp->next;
1296}
1297
1298
1299/*

--- 373 unchanged lines hidden ---
1289 sp = (struct strlist *)stalloc(sizeof *sp);
1290 sp->text = p;
1291 *exparg.lastp = sp;
1292 exparg.lastp = &sp->next;
1293}
1294
1295
1296/*

--- 373 unchanged lines hidden ---