Deleted Added
full compact
filename.c (191930) filename.c (195941)
1/*
1/*
2 * Copyright (C) 1984-2008 Mark Nudelman
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;
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 if (*lessopen == '-') {
847 /*
848 * Lessopen preprocessor will accept "-" as a filename.
849 */
850 lessopen++;
851 } else {
852 if (strcmp(filename, "-") == 0)
853 return (NULL);
854 }
855#endif
856 }
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 ---
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 ---