1/**************************************************************************** |
2 * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * |
3 * * 4 * Permission is hereby granted, free of charge, to any person obtaining a * 5 * copy of this software and associated documentation files (the * 6 * "Software"), to deal in the Software without restriction, including * 7 * without limitation the rights to use, copy, modify, merge, publish, * 8 * distribute, distribute with modifications, sublicense, and/or sell * 9 * copies of the Software, and to permit persons to whom the Software is * 10 * furnished to do so, subject to the following conditions: * --- 24 unchanged lines hidden (view full) --- 35/* 36 * toe.c --- table of entries report generator 37 */ 38 39#include <progs.priv.h> 40 41#include <sys/stat.h> 42 |
43#if USE_HASHED_DB 44#include <hashed_db.h> 45#endif 46 |
47MODULE_ID("$Id: toe.c,v 1.46 2007/10/13 22:26:38 tom Exp $") |
48 49#define isDotname(name) (!strcmp(name, ".") || !strcmp(name, "..")) 50 51const char *_nc_progname; 52 53#if NO_LEAKS 54#undef ExitProgram 55static void ExitProgram(int code) GCC_NORETURN; 56static void 57ExitProgram(int code) 58{ 59 _nc_free_entries(_nc_head); |
60 _nc_free_tic(code); |
61} 62#endif 63 64#if USE_HASHED_DB 65static bool 66make_db_name(char *dst, const char *src, unsigned limit) 67{ 68 static const char suffix[] = DBM_SUFFIX; --- 249 unchanged lines hidden (view full) --- 318 bool header = FALSE; 319 int i; 320 int code; 321 int this_opt, last_opt = '?'; 322 int v_opt = 0; 323 324 _nc_progname = _nc_rootname(argv[0]); 325 |
326 while ((this_opt = getopt(argc, argv, "0123456789ahuvUV")) != -1) { |
327 /* handle optional parameter */ 328 if (isdigit(this_opt)) { 329 switch (last_opt) { 330 case 'v': 331 v_opt = (this_opt - '0'); 332 break; 333 default: 334 if (isdigit(last_opt)) --- 164 unchanged lines hidden --- |