"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "match/match.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.

match.c  (schily-2021-08-14.tar.bz2):match.c  (schily-2021-09-18.tar.bz2)
/* @(#)match.c 1.39 19/12/11 Copyright 1985-2019 J. Schilling */ /* @(#)match.c 1.41 21/08/20 Copyright 1985-2021 J. Schilling */
#include <schily/mconfig.h> #include <schily/mconfig.h>
#ifndef lint #ifndef lint
static UConst char sccsid[] = static UConst char sccsid[] =
"@(#)match.c 1.39 19/12/11 Copyright 1985-2019 J. Schilling"; "@(#)match.c 1.41 21/08/20 Copyright 1985-2021 J. Schilling";
#endif #endif
/* /*
* search file(s) for a pattern * search file(s) for a pattern
* *
* Copyright (c) 1985-2019 J. Schilling * Copyright (c) 1985-2021 J. Schilling
*/ */
/* /*
* The contents of this file are subject to the terms of the * The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only * Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance * (the "License"). You may not use this file except in compliance
* with the License. * with the License.
* *
* See the file CDDL.Schily.txt in this distribution for details. * See the file CDDL.Schily.txt in this distribution for details.
* A copy of the CDDL is also available via the Internet at * A copy of the CDDL is also available via the Internet at
* http://www.opensource.org/licenses/cddl1.txt * http://www.opensource.org/licenses/cddl1.txt
skipping to change at line 34 skipping to change at line 34
*/ */
#include <schily/stdio.h> #include <schily/stdio.h>
#include <schily/stdlib.h> #include <schily/stdlib.h>
#include <schily/unistd.h> /* Include sys/types.h to make off_t available */ #include <schily/unistd.h> /* Include sys/types.h to make off_t available */
#include <schily/string.h> #include <schily/string.h>
#include <schily/utypes.h> #include <schily/utypes.h>
#include <schily/patmatch.h> #include <schily/patmatch.h>
#include <schily/standard.h> #include <schily/standard.h>
#include <schily/ctype.h> #include <schily/ctype.h>
#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 UC (unsigned char *) #define UC (unsigned char *)
#ifndef HAVE_VALLOC #ifndef HAVE_VALLOC
#define valloc(a) malloc(a) #define valloc(a) malloc(a)
#endif #endif
#define BUFSIZE 8192 #define BUFSIZE 8192
#define MAXLINE 8192 #define MAXLINE 8192
skipping to change at line 133 skipping to change at line 136
int cac = ac; int cac = ac;
char * const *cav = av; char * const *cav = av;
char *name; char *name;
int plen; int plen;
int matches; int matches;
int anymatch = 0; int anymatch = 0;
BOOL prversion = 0; BOOL prversion = 0;
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 "match" /* 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 */
if (getallargs(&cac, &cav, options, if (getallargs(&cac, &cav, options,
&notflag, &notflag, &notflag, &notflag,
&Vflag, &Vflag,
&igncase, &igncase,
&magic, &magic,
&nomagic, &nomagic,
&wordflag, &wordflag,
&xflag, &xflag,
&cntflag, &lflag, &Lflag, &sflag, &cntflag, &lflag, &Lflag, &sflag,
&hflag, &nflag, &bflag, &help, &prversion, &hflag, &nflag, &bflag, &help, &prversion,
&debug) < 0) { &debug) < 0) {
errmsgno(EX_BAD, "Bad flag: %s.\n", cav[0]); errmsgno(EX_BAD, "Bad flag: %s.\n", cav[0]);
usage(EX_BAD); usage(EX_BAD);
} }
if (help) if (help)
usage(0); usage(0);
if (prversion) { if (prversion) {
printf("Match release %s (%s-%s-%s) Copyright (C) 1985-2019 Jörg gtprintf("Match release %s (%s-%s-%s) Copyright (C) 1985-2021 %s\
Schilling\n", n",
"1.39", "1.41",
HOST_CPU, HOST_VENDOR, HOST_OS); HOST_CPU, HOST_VENDOR, HOST_OS,
_("Jörg Schilling"));
exit(0); exit(0);
} }
if (Vflag) if (Vflag)
sflag++; /* Be silent while searching */ sflag++; /* Be silent while searching */
cac = ac; cac = ac;
cav = av; cav = av;
cac--, cav++; cac--, cav++;
if (getfiles(&cac, &cav, options) <= 0) { if (getfiles(&cac, &cav, options) <= 0) {
 End of changes. 7 change blocks. 
7 lines changed or deleted 32 lines changed or added

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