toe.c (166124) | toe.c (174993) |
---|---|
1/**************************************************************************** | 1/**************************************************************************** |
2 * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * | 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 | 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#include <dump_entry.h> 44 | |
45#if USE_HASHED_DB 46#include <hashed_db.h> 47#endif 48 | 43#if USE_HASHED_DB 44#include <hashed_db.h> 45#endif 46 |
49MODULE_ID("$Id: toe.c,v 1.41 2006/08/19 18:18:09 tom Exp $") | 47MODULE_ID("$Id: toe.c,v 1.46 2007/10/13 22:26:38 tom Exp $") |
50 51#define isDotname(name) (!strcmp(name, ".") || !strcmp(name, "..")) 52 53const char *_nc_progname; 54 55#if NO_LEAKS 56#undef ExitProgram 57static void ExitProgram(int code) GCC_NORETURN; 58static void 59ExitProgram(int code) 60{ 61 _nc_free_entries(_nc_head); | 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); |
62 _nc_leaks_dump_entry(); 63 _nc_free_and_exit(code); | 60 _nc_free_tic(code); |
64} 65#endif 66 67#if USE_HASHED_DB 68static bool 69make_db_name(char *dst, const char *src, unsigned limit) 70{ 71 static const char suffix[] = DBM_SUFFIX; --- 249 unchanged lines hidden (view full) --- 321 bool header = FALSE; 322 int i; 323 int code; 324 int this_opt, last_opt = '?'; 325 int v_opt = 0; 326 327 _nc_progname = _nc_rootname(argv[0]); 328 | 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 |
329 while ((this_opt = getopt(argc, argv, "0123456789ahuvUV")) != EOF) { | 326 while ((this_opt = getopt(argc, argv, "0123456789ahuvUV")) != -1) { |
330 /* handle optional parameter */ 331 if (isdigit(this_opt)) { 332 switch (last_opt) { 333 case 'v': 334 v_opt = (this_opt - '0'); 335 break; 336 default: 337 if (isdigit(last_opt)) --- 164 unchanged lines hidden --- | 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 --- |