alias.c (218306) | alias.c (222684) |
---|---|
1/*- 2 * Copyright (c) 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[] = "@(#)alias.c 8.3 (Berkeley) 5/4/95"; 36#endif 37#endif /* not lint */ 38#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 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[] = "@(#)alias.c 8.3 (Berkeley) 5/4/95"; 36#endif 37#endif /* not lint */ 38#include <sys/cdefs.h> |
39__FBSDID("$FreeBSD: head/bin/sh/alias.c 218306 2011-02-04 22:47:55Z jilles $"); | 39__FBSDID("$FreeBSD: head/bin/sh/alias.c 222684 2011-06-04 15:05:52Z jilles $"); |
40 41#include <stdlib.h> 42#include "shell.h" 43#include "output.h" 44#include "error.h" 45#include "memalloc.h" 46#include "mystring.h" 47#include "alias.h" --- 185 unchanged lines hidden (view full) --- 233 234 if (argc == 1) { 235 printaliases(); 236 return (0); 237 } 238 while ((n = *++argv) != NULL) { 239 if ((v = strchr(n+1, '=')) == NULL) /* n+1: funny ksh stuff */ 240 if ((ap = lookupalias(n, 0)) == NULL) { | 40 41#include <stdlib.h> 42#include "shell.h" 43#include "output.h" 44#include "error.h" 45#include "memalloc.h" 46#include "mystring.h" 47#include "alias.h" --- 185 unchanged lines hidden (view full) --- 233 234 if (argc == 1) { 235 printaliases(); 236 return (0); 237 } 238 while ((n = *++argv) != NULL) { 239 if ((v = strchr(n+1, '=')) == NULL) /* n+1: funny ksh stuff */ 240 if ((ap = lookupalias(n, 0)) == NULL) { |
241 warning("%s not found", n); | 241 warning("%s: not found", n); |
242 ret = 1; 243 } else 244 printalias(ap); 245 else { 246 *v++ = '\0'; 247 setalias(n, v); 248 } 249 } --- 31 unchanged lines hidden --- | 242 ret = 1; 243 } else 244 printalias(ap); 245 else { 246 *v++ = '\0'; 247 setalias(n, v); 248 } 249 } --- 31 unchanged lines hidden --- |