histedit.c (199629) | histedit.c (200956) |
---|---|
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[] = "@(#)histedit.c 8.2 (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[] = "@(#)histedit.c 8.2 (Berkeley) 5/4/95"; 36#endif 37#endif /* not lint */ 38#include <sys/cdefs.h> |
39__FBSDID("$FreeBSD: head/bin/sh/histedit.c 199629 2009-11-21 14:28:32Z jilles $"); | 39__FBSDID("$FreeBSD: head/bin/sh/histedit.c 200956 2009-12-24 18:41:14Z jilles $"); |
40 41#include <sys/param.h> 42#include <limits.h> 43#include <paths.h> 44#include <stdio.h> 45#include <stdlib.h> 46#include <unistd.h> 47/* --- 353 unchanged lines hidden (view full) --- 401 } 402 STACKSTRNUL(dest); 403 dest = grabstackstr(dest); 404 405 return (dest); 406} 407 408int | 40 41#include <sys/param.h> 42#include <limits.h> 43#include <paths.h> 44#include <stdio.h> 45#include <stdlib.h> 46#include <unistd.h> 47/* --- 353 unchanged lines hidden (view full) --- 401 } 402 STACKSTRNUL(dest); 403 dest = grabstackstr(dest); 404 405 return (dest); 406} 407 408int |
409not_fcnumber(char *s) | 409not_fcnumber(const char *s) |
410{ 411 if (s == NULL) 412 return (0); 413 if (*s == '-') 414 s++; 415 return (!is_number(s)); 416} 417 418int | 410{ 411 if (s == NULL) 412 return (0); 413 if (*s == '-') 414 s++; 415 return (!is_number(s)); 416} 417 418int |
419str_to_event(char *str, int last) | 419str_to_event(const char *str, int last) |
420{ 421 HistEvent he; | 420{ 421 HistEvent he; |
422 char *s = str; | 422 const char *s = str; |
423 int relative = 0; 424 int i, retval; 425 426 retval = history(hist, &he, H_FIRST); 427 switch (*s) { 428 case '-': 429 relative = 1; 430 /*FALLTHROUGH*/ --- 64 unchanged lines hidden --- | 423 int relative = 0; 424 int i, retval; 425 426 retval = history(hist, &he, H_FIRST); 427 switch (*s) { 428 case '-': 429 relative = 1; 430 /*FALLTHROUGH*/ --- 64 unchanged lines hidden --- |