"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "termcap/cap.c" between
schily-2021-08-14.tar.bz2 and schily-2021-09-18.tar.bz2

About: Schily Tools are a collection of programs like cdrecord, cdda2wav, mkisofs, star and much more. In memoriam of the author Jörg Schilling, who passed away in October 2021.

cap.c  (schily-2021-08-14.tar.bz2):cap.c  (schily-2021-09-18.tar.bz2)
/* @(#)cap.c 1.59 21/07/22 Copyright 2000-2021 J. Schilling */ /* @(#)cap.c 1.60 21/08/20 Copyright 2000-2021 J. Schilling */
#include <schily/mconfig.h> #include <schily/mconfig.h>
#ifndef lint #ifndef lint
static UConst char sccsid[] = static UConst char sccsid[] =
"@(#)cap.c 1.59 21/07/22 Copyright 2000-2021 J. Schilling"; "@(#)cap.c 1.60 21/08/20 Copyright 2000-2021 J. Schilling";
#endif #endif
/* /*
* termcap a TERMCAP compiler * termcap a TERMCAP compiler
* *
* The termcap database is an ASCII representation of the data * The termcap database is an ASCII representation of the data
* so people may believe that there is no need for a compiler. * so people may believe that there is no need for a compiler.
* Syntax checks and unification however are a property of compilers. * Syntax checks and unification however are a property of compilers.
* We check for correct data types, output all entries in a unique * We check for correct data types, output all entries in a unique
* order and recode all strings with the same escape notation. * order and recode all strings with the same escape notation.
* This is needed in to compare two entries and it makes life easier. * This is needed in to compare two entries and it makes life easier.
skipping to change at line 42 skipping to change at line 42
#include <schily/stdio.h> #include <schily/stdio.h>
#include <schily/stdlib.h> #include <schily/stdlib.h>
#include <schily/unistd.h> #include <schily/unistd.h>
#include <schily/standard.h> #include <schily/standard.h>
#include <schily/fcntl.h> #include <schily/fcntl.h>
#include <schily/string.h> #include <schily/string.h>
#include <schily/termcap.h> #include <schily/termcap.h>
#include <schily/getargs.h> #include <schily/getargs.h>
#define SCHILY_PRINT #define SCHILY_PRINT
#define GT_COMERR /* #define comerr gtcomerr */
#define GT_ERROR /* #define error gterror */
#include <schily/schily.h> #include <schily/schily.h>
#include <schily/nlsdefs.h>
#define TBUF 2048 #define TBUF 2048
typedef struct { typedef struct {
char *tc_name; /* Termcap name */ char *tc_name; /* Termcap name */
char *tc_iname; /* Terminfo name */ char *tc_iname; /* Terminfo name */
char *tc_var; /* Curses Variable name */ char *tc_var; /* Curses Variable name */
char *tc_comment; /* Explanation */ char *tc_comment; /* Explanation */
int tc_flags; int tc_flags;
} clist; } clist;
skipping to change at line 338 skipping to change at line 341
BOOL inorder = FALSE; BOOL inorder = FALSE;
BOOL noinorder = FALSE; BOOL noinorder = FALSE;
BOOL sflag = FALSE; BOOL sflag = FALSE;
int verbose = 0; int verbose = 0;
BOOL do_tc = FALSE; BOOL do_tc = FALSE;
BOOL useenv = FALSE; BOOL useenv = FALSE;
char *infile = NULL; char *infile = NULL;
save_args(ac, av); save_args(ac, av);
(void) setlocale(LC_ALL, "");
#ifdef USE_NLS
#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */
#define TEXT_DOMAIN "termcap" /* Use this only if it weren't */
#endif
{ char *dir;
dir = searchfileinpath("share/locale", F_OK,
SIP_ANY_FILE|SIP_NO_PATH, NULL);
if (dir)
(void) bindtextdomain(TEXT_DOMAIN, dir);
else
#if defined(PROTOTYPES) && defined(INS_BASE)
(void) bindtextdomain(TEXT_DOMAIN, INS_BASE "/share/locale");
#else
(void) bindtextdomain(TEXT_DOMAIN, "/usr/share/locale");
#endif
(void) textdomain(TEXT_DOMAIN);
}
#endif /* USE_NLS */
#ifdef HAVE_SETVBUF #ifdef HAVE_SETVBUF
setvbuf(stdout, obuf, _IOFBF, sizeof (obuf)); setvbuf(stdout, obuf, _IOFBF, sizeof (obuf));
#else #else
#ifdef HAVE_SETVBUF #ifdef HAVE_SETVBUF
setbuf(stdout, obuf); setbuf(stdout, obuf);
#endif #endif
#endif #endif
init_clist(); init_clist();
cac = ac; cac = ac;
skipping to change at line 368 skipping to change at line 392
&infile, &infile,
&nodisabled, &nounknown, &nodisabled, &nounknown,
&nowarn, &dooctal, &docaret, &nowarn, &dooctal, &docaret,
&gnugoto) < 0) { &gnugoto) < 0) {
errmsgno(EX_BAD, "Bad option '%s'\n", cav[0]); errmsgno(EX_BAD, "Bad option '%s'\n", cav[0]);
usage(EX_BAD); usage(EX_BAD);
} }
if (help) if (help)
usage(0); usage(0);
if (prvers) { if (prvers) {
printf("termcap %s %s (%s-%s-%s)\n\n", "1.59", "2021/07/22", gtprintf("termcap %s %s (%s-%s-%s)\n\n", "1.60", "2021/08/20",
HOST_CPU, HOST_VENDOR, HOST_OS); HOST_CPU, HOST_VENDOR, HOST_OS);
printf("Copyright (C) 2000-2021 Jörg Schilling\n"); gtprintf("Copyright (C) 2000-2021 %s\n", _("Jörg Schilling"));
printf("This is free software; see the source for copying conditi gtprintf("This is free software; see the source for copying condi
ons. There is NO\n"); tions. There is NO\n");
printf("warranty; not even for MERCHANTABILITY or FITNESS FOR A P gtprintf("warranty; not even for MERCHANTABILITY or FITNESS FOR A
ARTICULAR PURPOSE.\n"); PARTICULAR PURPOSE.\n");
exit(0); exit(0);
} }
if (dodump) { if (dodump) {
dumplist(); dumplist();
exit(0); exit(0);
} }
if (infile) if (infile)
inorder = TRUE; inorder = TRUE;
 End of changes. 7 change blocks. 
8 lines changed or deleted 32 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)