1/* |
2 * Copyright (C) 1984-2009 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 about less, or for information on how to 8 * contact the author, see the README file. 9 */ 10 --- 827 unchanged lines hidden (view full) --- 838 * a "pipe preprocessor". 839 */ 840#if !HAVE_FILENO 841 error("LESSOPEN pipe is not supported", NULL_PARG); 842 return (NULL); 843#else 844 lessopen++; 845 returnfd = 1; |
846#endif 847 } |
848 if (*lessopen == '-') { 849 /* 850 * Lessopen preprocessor will accept "-" as a filename. 851 */ 852 lessopen++; 853 } else { 854 if (strcmp(filename, "-") == 0) 855 return (NULL); 856 } |
857 858 len = strlen(lessopen) + strlen(filename) + 2; 859 cmd = (char *) ecalloc(len, sizeof(char)); 860 SNPRINTF1(cmd, len, lessopen, filename); 861 fd = shellcmd(cmd); 862 free(cmd); 863 if (fd == NULL) 864 { --- 195 unchanged lines hidden --- |