/[gentoo-projects]/pax-utils/scanelf.c
Gentoo

Diff of /pax-utils/scanelf.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.220 Revision 1.221
1/* 1/*
2 * Copyright 2003-2007 Gentoo Foundation 2 * Copyright 2003-2007 Gentoo Foundation
3 * Distributed under the terms of the GNU General Public License v2 3 * Distributed under the terms of the GNU General Public License v2
4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.220 2010/12/08 00:54:40 vapier Exp $ 4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.221 2010/12/08 01:16:01 vapier Exp $
5 * 5 *
6 * Copyright 2003-2007 Ned Ludd - <solar@gentoo.org> 6 * Copyright 2003-2007 Ned Ludd - <solar@gentoo.org>
7 * Copyright 2004-2007 Mike Frysinger - <vapier@gentoo.org> 7 * Copyright 2004-2007 Mike Frysinger - <vapier@gentoo.org>
8 */ 8 */
9 9
10static const char *rcsid = "$Id: scanelf.c,v 1.220 2010/12/08 00:54:40 vapier Exp $"; 10static const char *rcsid = "$Id: scanelf.c,v 1.221 2010/12/08 01:16:01 vapier Exp $";
11const char argv0[] = "scanelf"; 11const char argv0[] = "scanelf";
12 12
13#include "paxinc.h" 13#include "paxinc.h"
14 14
15#define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+') 15#define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+')
1729 } 1729 }
1730 1730
1731 free(path); 1731 free(path);
1732} 1732}
1733 1733
1734/* usage / invocation handling functions */ /* Free Flags: c d j u w C G H J K P Q U W */ 1734/* usage / invocation handling functions */ /* Free Flags: c d j u w G H J K P Q U W */
1735#define PARSE_FLAGS "plRmyAXz:xetrnLibSs:k:gN:TaqvF:f:o:E:M:DIYO:ZBhV" 1735#define PARSE_FLAGS "plRmyAXz:xetrnLibSs:k:gN:TaqvF:f:o:E:M:DIYO:ZCBhV"
1736#define a_argument required_argument 1736#define a_argument required_argument
1737static struct option const long_opts[] = { 1737static struct option const long_opts[] = {
1738 {"path", no_argument, NULL, 'p'}, 1738 {"path", no_argument, NULL, 'p'},
1739 {"ldpath", no_argument, NULL, 'l'}, 1739 {"ldpath", no_argument, NULL, 'l'},
1740 {"recursive", no_argument, NULL, 'R'}, 1740 {"recursive", no_argument, NULL, 'R'},
1768 {"quiet", no_argument, NULL, 'q'}, 1768 {"quiet", no_argument, NULL, 'q'},
1769 {"verbose", no_argument, NULL, 'v'}, 1769 {"verbose", no_argument, NULL, 'v'},
1770 {"format", a_argument, NULL, 'F'}, 1770 {"format", a_argument, NULL, 'F'},
1771 {"from", a_argument, NULL, 'f'}, 1771 {"from", a_argument, NULL, 'f'},
1772 {"file", a_argument, NULL, 'o'}, 1772 {"file", a_argument, NULL, 'o'},
1773 {"nocolor", no_argument, NULL, 'C'},
1773 {"nobanner", no_argument, NULL, 'B'}, 1774 {"nobanner", no_argument, NULL, 'B'},
1774 {"help", no_argument, NULL, 'h'}, 1775 {"help", no_argument, NULL, 'h'},
1775 {"version", no_argument, NULL, 'V'}, 1776 {"version", no_argument, NULL, 'V'},
1776 {NULL, no_argument, NULL, 0x0} 1777 {NULL, no_argument, NULL, 0x0}
1777}; 1778};
1810 "Only output 'bad' things", 1811 "Only output 'bad' things",
1811 "Be verbose (can be specified more than once)", 1812 "Be verbose (can be specified more than once)",
1812 "Use specified format for output", 1813 "Use specified format for output",
1813 "Read input stream from a filename", 1814 "Read input stream from a filename",
1814 "Write output stream to a filename", 1815 "Write output stream to a filename",
1816 "Don't emit color in output",
1815 "Don't display the header", 1817 "Don't display the header",
1816 "Print this help and exit", 1818 "Print this help and exit",
1817 "Print version and exit", 1819 "Print version and exit",
1818 NULL 1820 NULL
1819}; 1821};
1954 case 'Z': show_size = 1; break; 1956 case 'Z': show_size = 1; break;
1955 case 'g': g_match = 1; break; 1957 case 'g': g_match = 1; break;
1956 case 'L': use_ldcache = 1; break; 1958 case 'L': use_ldcache = 1; break;
1957 case 'y': scan_symlink = 0; break; 1959 case 'y': scan_symlink = 0; break;
1958 case 'A': scan_archives = 1; break; 1960 case 'A': scan_archives = 1; break;
1961 case 'C': color_init(true); break;
1959 case 'B': show_banner = 0; break; 1962 case 'B': show_banner = 0; break;
1960 case 'l': scan_ldpath = 1; break; 1963 case 'l': scan_ldpath = 1; break;
1961 case 'p': scan_envpath = 1; break; 1964 case 'p': scan_envpath = 1; break;
1962 case 'R': dir_recurse = 1; break; 1965 case 'R': dir_recurse = 1; break;
1963 case 'm': dir_crossmount = 0; break; 1966 case 'm': dir_crossmount = 0; break;
2119 return envvals; 2122 return envvals;
2120} 2123}
2121 2124
2122static void parseenv(void) 2125static void parseenv(void)
2123{ 2126{
2127 color_init(false);
2124 qa_textrels = get_split_env("QA_TEXTRELS"); 2128 qa_textrels = get_split_env("QA_TEXTRELS");
2125 qa_execstack = get_split_env("QA_EXECSTACK"); 2129 qa_execstack = get_split_env("QA_EXECSTACK");
2126 qa_wx_load = get_split_env("QA_WX_LOAD"); 2130 qa_wx_load = get_split_env("QA_WX_LOAD");
2127} 2131}
2128 2132

Legend:
Removed from v.1.220  
changed lines
  Added in v.1.221

  ViewVC Help
Powered by ViewVC 1.1.20