lessecho.c (009e81b16465ea457c0e63fd49fe77f47cc27a5a) | lessecho.c (1ea316270f1f75922ac53976d5d8808a41442f46) |
---|---|
1/* 2 * Copyright (C) 1984-2015 Mark Nudelman 3 * 4 * You may distribute under the terms of either the GNU General Public 5 * License or the Less License, as specified in the README file. 6 * 7 * For more information, see the README file. 8 */ --- 24 unchanged lines hidden (view full) --- 33static char openquote = '"'; 34static char closequote = '"'; 35static char *meta_escape = "\\"; 36static char meta_escape_buf[2]; 37static char metachars[64] = ""; 38static int num_metachars = 0; 39 40 static void | 1/* 2 * Copyright (C) 1984-2015 Mark Nudelman 3 * 4 * You may distribute under the terms of either the GNU General Public 5 * License or the Less License, as specified in the README file. 6 * 7 * For more information, see the README file. 8 */ --- 24 unchanged lines hidden (view full) --- 33static char openquote = '"'; 34static char closequote = '"'; 35static char *meta_escape = "\\"; 36static char meta_escape_buf[2]; 37static char metachars[64] = ""; 38static int num_metachars = 0; 39 40 static void |
41pr_usage() | 41pr_usage(void) |
42{ 43 fprintf(stderr, 44 "usage: lessecho [-ox] [-cx] [-pn] [-dn] [-mx] [-nn] [-ex] [-fn] [-a] file ...\n"); 45} 46 47 static void | 42{ 43 fprintf(stderr, 44 "usage: lessecho [-ox] [-cx] [-pn] [-dn] [-mx] [-nn] [-ex] [-fn] [-a] file ...\n"); 45} 46 47 static void |
48pr_version() | 48pr_version(void) |
49{ 50 char *p; 51 char buf[10]; 52 char *pbuf = buf; 53 54 for (p = version; *p != ' '; p++) 55 if (*p == '\0') 56 return; 57 for (p++; *p != '$' && *p != ' ' && *p != '\0'; p++) 58 *pbuf++ = *p; 59 *pbuf = '\0'; 60 printf("%s\n", buf); 61} 62 63 static void | 49{ 50 char *p; 51 char buf[10]; 52 char *pbuf = buf; 53 54 for (p = version; *p != ' '; p++) 55 if (*p == '\0') 56 return; 57 for (p++; *p != '$' && *p != ' ' && *p != '\0'; p++) 58 *pbuf++ = *p; 59 *pbuf = '\0'; 60 printf("%s\n", buf); 61} 62 63 static void |
64pr_error(s) 65 char *s; | 64pr_error(char *s) |
66{ 67 fprintf(stderr, "%s\n", s); 68 exit(1); 69} 70 71 static long | 65{ 66 fprintf(stderr, "%s\n", s); 67 exit(1); 68} 69 70 static long |
72lstrtol(s, radix, pend) 73 char *s; 74 int radix; 75 char **pend; | 71lstrtol(char *s, int radix, char **pend) |
76{ 77 int v; 78 int neg = 0; 79 long n = 0; 80 81 /* Skip leading white space. */ 82 while (*s == ' ' || *s == '\t') 83 s++; --- 188 unchanged lines hidden --- | 72{ 73 int v; 74 int neg = 0; 75 long n = 0; 76 77 /* Skip leading white space. */ 78 while (*s == ' ' || *s == '\t') 79 s++; --- 188 unchanged lines hidden --- |