From ca95ab4dff48f8b314629b7374480193e220a64c Mon Sep 17 00:00:00 2001 From: Chris Lightfoot Date: Mon, 8 Jul 2002 20:57:17 +0000 Subject: [PATCH] "" --- driftnet.c | 8 +++++++- gif.c | 6 +++++- img.c | 7 ++++++- img.h | 6 +++++- jpeg.c | 6 +++++- 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/driftnet.c b/driftnet.c index 755c86a..0be2e6b 100644 --- a/driftnet.c +++ b/driftnet.c @@ -7,7 +7,7 @@ * */ -static const char rcsid[] = "$Id: driftnet.c,v 1.24 2002/06/10 23:16:37 chris Exp $"; +static const char rcsid[] = "$Id: driftnet.c,v 1.25 2002/07/08 20:57:17 chris Exp $"; #undef NDEBUG @@ -466,7 +466,9 @@ int main(int argc, char *argv[]) { struct bpf_program filter; char ebuf[PCAP_ERRBUF_SIZE]; int c; +#ifndef NO_DISPLAY_WINDOW extern char *savedimgpfx; /* in display.c */ +#endif extern char *audio_mpeg_player; /* in playaudio.c */ int newpfx = 0; int mpeg_player_specified = 0; @@ -522,10 +524,12 @@ int main(int argc, char *argv[]) { tmpdir_specified = 1; /* so we don't delete it. */ break; +#ifndef NO_DISPLAY_WINDOW case 'x': savedimgpfx = optarg; newpfx = 1; break; +#endif case '?': default: @@ -618,8 +622,10 @@ int main(int argc, char *argv[]) { fprintf(stderr, PROGNAME": using filter expression `%s'\n", filterexpr); +#ifndef NO_DISPLAY_WINDOW if (verbose && newpfx && !adjunct) fprintf(stderr, PROGNAME": using saved image prefix `%s'\n", savedimgpfx); +#endif setup_signals(); diff --git a/gif.c b/gif.c index fecd079..ca2e706 100644 --- a/gif.c +++ b/gif.c @@ -7,7 +7,9 @@ * */ -static const char rcsid[] = "$Id: gif.c,v 1.3 2002/06/10 21:25:48 chris Exp $"; +#ifndef NO_DISPLAY_WINDOW + +static const char rcsid[] = "$Id: gif.c,v 1.4 2002/07/08 20:57:17 chris Exp $"; #include @@ -116,3 +118,5 @@ int gif_load_img(img I) { return ret; } + +#endif /* !NO_DISPLAY_WINDOW */ diff --git a/img.c b/img.c index 0916366..7c49983 100644 --- a/img.c +++ b/img.c @@ -7,7 +7,9 @@ * */ -static const char rcsid[] = "$Id: img.c,v 1.8 2002/06/10 21:25:48 chris Exp $"; +#ifndef NO_DISPLAY_WINDOW + +static const char rcsid[] = "$Id: img.c,v 1.9 2002/07/08 20:57:17 chris Exp $"; #include #include @@ -286,4 +288,7 @@ void img_blt(img dest, const int dx, const int dy, img src, const int sx, const /* Different images; simple copy. */ img_simple_blt(dest, destx, desty, src, srcx, srcy, width, height); } + #endif + +#endif /* !NO_DISPLAY_WINDOW */ diff --git a/img.h b/img.h index d43b6da..4ab61c6 100644 --- a/img.h +++ b/img.h @@ -5,10 +5,12 @@ * Copyright (c) 2001 Chris Lightfoot. All rights reserved. * Email: chris@ex-parrot.com; WWW: http://www.ex-parrot.com/~chris/ * - * $Id: img.h,v 1.6 2002/06/10 21:25:48 chris Exp $ + * $Id: img.h,v 1.7 2002/07/08 20:57:17 chris Exp $ * */ +#ifndef NO_DISPLAY_WINDOW + #ifndef __IMG_H_ /* include guard */ #define __IMG_H_ @@ -83,3 +85,5 @@ void img_delete(img I); void img_simple_blt(img dest, const int dx, const int dy, img src, const int sx, const int sy, const int w, const int h); #endif /* __IMG_H_ */ + +#endif /* !NO_DISPLAY_WINDOW */ diff --git a/jpeg.c b/jpeg.c index 6f9daab..194c940 100644 --- a/jpeg.c +++ b/jpeg.c @@ -7,7 +7,9 @@ * */ -static const char rcsid[] = "$Id: jpeg.c,v 1.4 2002/06/10 21:25:48 chris Exp $"; +#ifndef NO_DISPLAY_WINDOW + +static const char rcsid[] = "$Id: jpeg.c,v 1.5 2002/07/08 20:57:17 chris Exp $"; #include #include @@ -162,3 +164,5 @@ int jpeg_save_img(const img I, FILE *fp) { return 1; } + +#endif /* !NO_DISPLAY_WINDOW */