Skip to content

Commit

Permalink
Snprintf fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Aug 30, 2023
1 parent 6557217 commit 6195087
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,12 @@ char *strerror(int errno);
/* Need _setmode under MS-DOS, to set stdin/stdout to binary mode */
/* Need _fsetmode under OS/2 for the same reason */
/* Windows has _isatty and _snprintf, not the normal versions */
/* Windows has _isatty, not isatty */
/* Modern Windows has _snprintf, but we prefer snprintf */
#if defined(_MSDOS) || defined(_WIN32) || defined(__EMX__) || defined(__DJGPP__)
# include <fcntl.h>
# include <io.h>
# define isatty _isatty
# define snprintf _snprintf
#endif
#ifndef HAVE_SNPRINTF
Expand Down
2 changes: 1 addition & 1 deletion include/lcdf/clp.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extern "C" {
/* clp.h - Public interface to CLP.
* This file is part of CLP, the command line parser package.
*
* Copyright (c) 1997-2021 Eddie Kohler, ekohler@gmail.com
* Copyright (c) 1997-2023 Eddie Kohler, ekohler@gmail.com
*
* CLP is free software. It is distributed under the GNU General Public
* License, Version 2, or, alternatively and at your discretion, under the
Expand Down
2 changes: 1 addition & 1 deletion include/lcdfgif/gifx.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extern "C" {
#endif

/* gifx.h - Functions to turn GIFs in memory into X Pixmaps.
Copyright (C) 1997-2021 Eddie Kohler, ekohler@gmail.com
Copyright (C) 1997-2023 Eddie Kohler, ekohler@gmail.com
This file is part of the LCDF GIF library.
The LCDF GIF library is free software*. It is distributed under the GNU
Expand Down
2 changes: 1 addition & 1 deletion src/clp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* clp.c - Complete source code for CLP.
* This file is part of CLP, the command line parser package.
*
* Copyright (c) 1997-2021 Eddie Kohler, ekohler@gmail.com
* Copyright (c) 1997-2023 Eddie Kohler, ekohler@gmail.com
*
* CLP is free software. It is distributed under the GNU General Public
* License, Version 2, or, alternatively and at your discretion, under the
Expand Down
4 changes: 2 additions & 2 deletions src/gifdiff.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* gifdiff.c - Gifdiff compares GIF images for identical appearance.
Copyright (C) 1998-2021 Eddie Kohler, ekohler@gmail.com
Copyright (C) 1998-2023 Eddie Kohler, ekohler@gmail.com
This file is part of gifdiff, in the gifsicle package.
Gifdiff is free software. It is distributed under the GNU Public License,
Expand Down Expand Up @@ -560,7 +560,7 @@ main(int argc, char *argv[])

case VERSION_OPT:
printf("gifdiff (LCDF Gifsicle) %s\n", VERSION);
printf("Copyright (C) 1998-2021 Eddie Kohler\n\
printf("Copyright (C) 1998-2023 Eddie Kohler\n\
This is free software; see the source for copying conditions.\n\
There is NO warranty, not even for merchantability or fitness for a\n\
particular purpose.\n");
Expand Down
2 changes: 1 addition & 1 deletion src/gifread.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* gifread.c - Functions to read GIFs.
Copyright (C) 1997-2021 Eddie Kohler, ekohler@gmail.com
Copyright (C) 1997-2023 Eddie Kohler, ekohler@gmail.com
This file is part of the LCDF GIF library.
The LCDF GIF library is free software. It is distributed under the GNU
Expand Down
4 changes: 2 additions & 2 deletions src/gifsicle.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- c-basic-offset: 2 -*- */
/* gifsicle.c - gifsicle's main loop.
Copyright (C) 1997-2021 Eddie Kohler, ekohler@gmail.com
Copyright (C) 1997-2023 Eddie Kohler, ekohler@gmail.com
This file is part of gifsicle.
Gifsicle is free software. It is distributed under the GNU Public License,
Expand Down Expand Up @@ -2126,7 +2126,7 @@ main(int argc, char *argv[])
#else
printf("LCDF Gifsicle %s\n", VERSION);
#endif
printf("Copyright (C) 1997-2021 Eddie Kohler\n\
printf("Copyright (C) 1997-2023 Eddie Kohler\n\
This is free software; see the source for copying conditions.\n\
There is NO warranty, not even for merchantability or fitness for a\n\
particular purpose.\n");
Expand Down
2 changes: 1 addition & 1 deletion src/giftoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ main(int argc, char *argv[])
&& directory[0]) {
size_t len = strlen(directory) + 2;
char *ndirectory = (char *)fmalloc(len);
sprintf(ndirectory, len, "%s%c", directory, PATHNAME_SEPARATOR);
snprintf(ndirectory, len, "%s%c", directory, PATHNAME_SEPARATOR);
directory = ndirectory;
}
} else
Expand Down
2 changes: 1 addition & 1 deletion src/gifunopt.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* gifunopt.c - Unoptimization function for the GIF library.
Copyright (C) 1997-2021 Eddie Kohler, ekohler@gmail.com
Copyright (C) 1997-2023 Eddie Kohler, ekohler@gmail.com
This file is part of the LCDF GIF library.
The LCDF GIF library is free software. It is distributed under the GNU
Expand Down
4 changes: 2 additions & 2 deletions src/gifview.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* gifview.c - gifview's main loop.
Copyright (C) 1997-2021 Eddie Kohler, ekohler@gmail.com
Copyright (C) 1997-2023 Eddie Kohler, ekohler@gmail.com
This file is part of gifview, in the gifsicle package.
Gifview is free software. It is distributed under the GNU Public License,
Expand Down Expand Up @@ -1356,7 +1356,7 @@ main(int argc, char *argv[])

case VERSION_OPT:
printf("gifview (LCDF Gifsicle) %s\n", VERSION);
printf("Copyright (C) 1997-2021 Eddie Kohler\n\
printf("Copyright (C) 1997-2023 Eddie Kohler\n\
This is free software; see the source for copying conditions.\n\
There is NO warranty, not even for merchantability or fitness for a\n\
particular purpose.\n");
Expand Down
2 changes: 1 addition & 1 deletion src/gifwrite.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- mode: c; c-basic-offset: 2 -*- */
/* gifwrite.c - Functions to write GIFs.
Copyright (C) 1997-2021 Eddie Kohler, ekohler@gmail.com
Copyright (C) 1997-2023 Eddie Kohler, ekohler@gmail.com
This file is part of the LCDF GIF library.
The LCDF GIF library is free software. It is distributed under the GNU
Expand Down
2 changes: 1 addition & 1 deletion src/gifx.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* gifx.c - Functions to turn GIFs in memory into X Pixmaps.
Copyright (C) 1997-2021 Eddie Kohler, ekohler@gmail.com
Copyright (C) 1997-2023 Eddie Kohler, ekohler@gmail.com
This file is part of the LCDF GIF library.
The LCDF GIF library is free software. It is distributed under the GNU
Expand Down
2 changes: 1 addition & 1 deletion src/quantize.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* quantize.c - Histograms and quantization for gifsicle.
Copyright (C) 1997-2021 Eddie Kohler, ekohler@gmail.com
Copyright (C) 1997-2023 Eddie Kohler, ekohler@gmail.com
This file is part of gifsicle.
Gifsicle is free software. It is distributed under the GNU Public License,
Expand Down
2 changes: 1 addition & 1 deletion src/support.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* support.c - Support functions for gifsicle.
Copyright (C) 1997-2021 Eddie Kohler, ekohler@gmail.com
Copyright (C) 1997-2023 Eddie Kohler, ekohler@gmail.com
This file is part of gifsicle.
Gifsicle is free software. It is distributed under the GNU Public License,
Expand Down
2 changes: 1 addition & 1 deletion src/ungifwrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ungifwrt.c - Functions to write unGIFs -- GIFs with run-length compression,
not LZW compression. Idea due to Hutchinson Avenue Software Corporation
<http://www.hasc.com>.
Copyright (C) 1997-2021 Eddie Kohler, ekohler@gmail.com
Copyright (C) 1997-2023 Eddie Kohler, ekohler@gmail.com
This file is part of the LCDF GIF library.
The LCDF GIF library is free software. It is distributed under the GNU
Expand Down
2 changes: 1 addition & 1 deletion src/xform.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* xform.c - Image transformation functions for gifsicle.
Copyright (C) 1997-2021 Eddie Kohler, ekohler@gmail.com
Copyright (C) 1997-2023 Eddie Kohler, ekohler@gmail.com
This file is part of gifsicle.
Gifsicle is free software. It is distributed under the GNU Public License,
Expand Down

0 comments on commit 6195087

Please sign in to comment.