/****************************************************************************
- * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. *
+ * Copyright 2018-2020,2021 Thomas E. Dickey *
+ * Copyright 1998-2013,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#include <hashed_db.h>
#endif
-MODULE_ID("$Id: toe.c,v 1.78 2018/11/17 22:41:46 tom Exp $")
+MODULE_ID("$Id: toe.c,v 1.81 2021/04/03 22:54:52 tom Exp $")
#define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
#if NO_LEAKS
#undef ExitProgram
-static void ExitProgram(int code) GCC_NORETURN;
+static GCC_NORETURN void ExitProgram(int code);
static void
ExitProgram(int code)
{
}
#endif
-static void failed(const char *) GCC_NORETURN;
+static GCC_NORETURN void failed(const char *);
static void
failed(const char *msg)
static void
show_termdata(int eargc, char **eargv)
{
- int j, k;
- size_t n;
-
if (use_termdata) {
+ size_t n;
+
if (eargc > 1) {
+ int j;
+
for (j = 0; j < eargc; ++j) {
+ int k;
+
for (k = 0; k <= j; ++k) {
printf("--");
}
*/
if (eargc > 1) {
unsigned long check = 0;
- k = 0;
+ int k = 0;
for (;;) {
for (; k < ptr_termdata[n].db_index; ++k) {
printf("--");
bool invert_dependencies = FALSE;
bool header = FALSE;
char *report_file = 0;
- unsigned i;
int code;
int this_opt, last_opt = '?';
unsigned v_opt = 0;
/* maybe we want a reverse-dependency listing? */
if (invert_dependencies) {
ENTRY *qp, *rp;
- int matchcount;
for_entry_list(qp) {
- matchcount = 0;
+ int matchcount = 0;
+
for_entry_list(rp) {
+ unsigned i;
+
if (rp->nuses == 0)
continue;
DBDIRS state;
int offset;
int pass;
- const char *path;
char **eargv = 0;
code = EXIT_FAILURE;
for (pass = 0; pass < 2; ++pass) {
size_t count = 0;
+ const char *path;
_nc_first_db(&state, &offset);
while ((path = _nc_next_db(&state, &offset)) != 0) {