X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=progs%2Ftoe.c;h=6ef921abb1d00db313c9d8ca35e45e20bc30e14c;hb=c2650100f80134924eda8f22cd7cc1d1d919ee3d;hp=5abb46de1ea90875b9256a63e1ab79b298309933;hpb=aed072e27e60c2abc5ac0ab8113aacf9b4908d50;p=ncurses.git diff --git a/progs/toe.c b/progs/toe.c index 5abb46de..6ef921ab 100644 --- a/progs/toe.c +++ b/progs/toe.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2013,2017 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 * @@ -44,7 +45,7 @@ #include #endif -MODULE_ID("$Id: toe.c,v 1.77 2017/12/23 19:23:40 tom Exp $") +MODULE_ID("$Id: toe.c,v 1.80 2021/03/20 16:06:15 tom Exp $") #define isDotname(name) (!strcmp(name, ".") || !strcmp(name, "..")) @@ -63,7 +64,7 @@ static size_t len_termdata; /* allocated size of ptr_termdata[] */ #if NO_LEAKS #undef ExitProgram -static void ExitProgram(int code) GCC_NORETURN; +static GCC_NORETURN void ExitProgram(int code); static void ExitProgram(int code) { @@ -72,7 +73,7 @@ ExitProgram(int code) } #endif -static void failed(const char *) GCC_NORETURN; +static GCC_NORETURN void failed(const char *); static void failed(const char *msg) @@ -497,8 +498,8 @@ typelist(int eargc, char *eargv[], } } } -#endif -#endif +#endif /* USE_HASHED_DB */ +#endif /* NCURSES_USE_DATABASE */ #if NCURSES_USE_TERMCAP #if HAVE_BSD_CGETENT { @@ -700,6 +701,8 @@ main(int argc, char *argv[]) _nc_first_db(&state, &offset); while ((path = _nc_next_db(&state, &offset)) != 0) { + if (quick_prefix(path)) + continue; if (pass) { eargv[count] = strmalloc(path); } @@ -725,7 +728,8 @@ main(int argc, char *argv[]) failed("eargv"); _nc_first_db(&state, &offset); if ((path = _nc_next_db(&state, &offset)) != 0) { - eargv[count++] = strmalloc(path); + if (!quick_prefix(path)) + eargv[count++] = strmalloc(path); } code = typelist((int) count, eargv, header, hook);