Commit Graph

202 Commits

Author SHA1 Message Date
Guy Harris 35ce35ebf5 Include the new Makefile.common file.
svn path=/trunk/; revision=25659
2008-07-02 02:18:53 +00:00
Guy Harris a04774395f Add Makefile.common files for epan/dfilter and epan/ftypes.
Add checkapi rules to Makefile.am files.

svn path=/trunk/; revision=25656
2008-07-02 01:44:30 +00:00
Guy Harris b6e20d89be Put printf into a separate "termoutput" API group. For most files,
check for it - but not for TShark plugins, as they are expected to
print to the standard output.

svn path=/trunk/; revision=25653
2008-07-01 21:13:32 +00:00
Guy Harris 884a635762 Assign pointers to strings to a const pointer.
svn path=/trunk/; revision=25582
2008-06-24 18:22:26 +00:00
Stig Bjørlykke 0766be81b4 Rename some variables to avoid shadowing warnings.
svn path=/trunk/; revision=25544
2008-06-23 20:24:52 +00:00
Guy Harris caa183b45b We require GLib 2.4 or later, and they define G_MININT32, G_MAXIN32,
G_MAXUINT32, and G_MAXUINT64; don't check whether we need to define them
ourselves.

svn path=/trunk/; revision=25420
2008-06-03 23:57:47 +00:00
Anders Broman 2640b786f4 Fix run checkapi for more targets.
svn path=/trunk/; revision=25414
2008-06-03 05:35:19 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.

While doing that, rename the eth_* functions to ws_*.

svn path=/trunk/; revision=25354
2008-05-22 15:46:27 +00:00
Bill Meier fe5c2d9820 g_string_sprintf --> g_string_printf and g_string_sprintfa --> g_string_append_printf
svn path=/trunk/; revision=25276
2008-05-11 18:33:49 +00:00
Bill Meier 2bce8b248c Bug 2493: Fix (Part 3 of 3):
To prevent Windows compiler errors when using flex 2.5.35.
  Ignore 'signed /unsigned mismatch' warnings


svn path=/trunk/; revision=25174
2008-04-25 18:26:54 +00:00
Bill Meier 0d4b874b44 Bug 2493: Fix (Part 2):
To prevent Windows compiler errors when using flex 2.5.35.
 Fixes "missing unistd.h" and yywrap "mismatched parameter" warnings
 [Upcoming Part 3: ignore 'signed /unsigned mismatch' errors]

svn path=/trunk/; revision=25173
2008-04-25 17:40:29 +00:00
Anders Broman 63c5c71cf8 Remove:
#ifdef NEED_G_ASCII_STRCASECMP_H
#include "g_ascii_strcasecmp.h"
#endif

svn path=/trunk/; revision=24859
2008-04-09 05:36:08 +00:00
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
  g_strsplit code for the no longer supported GLIB1 builds


svn path=/trunk/; revision=24829
2008-04-07 05:22:54 +00:00
Jaap Keuter 098d297303 Running glib 2.16 on 32 bit platform requires this lempar.c change in addition to revision 24710.
Makefiles updated to make new lempar.c effective in build rules.

svn path=/trunk/; revision=24718
2008-03-23 08:58:52 +00:00
Anders Broman 1a2b14d60c In glib 2.16 g_malloc Changed from:
- gpointer g_malloc         (gulong	 n_bytes) G_GNUC_MALLOC;
to:
+ gpointer g_malloc         (gsize	 n_bytes) G_GNUC_MALLOC;

svn path=/trunk/; revision=24710
2008-03-21 16:10:47 +00:00
Stig Bjørlykke fdc980e79d Added an option to uat_new() to set if configuration shall be saved in the
selected profile.

Don't save SMI Paths and SMI Modules in the profiles because reloading
currently doesn't work (bug 2309).

svn path=/trunk/; revision=24580
2008-03-06 22:13:24 +00:00
Stig Bjørlykke 42fe2398b9 Added missing "svn:keywords Id" and "svn:eol-style native" for some
c and h files.

svn path=/trunk/; revision=24290
2008-02-08 09:45:36 +00:00
Stig Bjørlykke ee8b8b0ad7 Hmmm. Second try to fix the const problems.
svn path=/trunk/; revision=24238
2008-01-31 23:10:09 +00:00
Stig Bjørlykke dc5b4a8239 Removed a const to make it compile.
svn path=/trunk/; revision=24237
2008-01-31 22:31:01 +00:00
Gerald Combs a4a1f2a69e Make the "!="/"ne" change compile under Windows.
svn path=/trunk/; revision=24234
2008-01-31 20:18:07 +00:00
Gerald Combs 9703c2bb75 If "!=" or "ne" are used in a display filter, warn the user that the results
may be unexpected.

svn path=/trunk/; revision=24232
2008-01-31 19:50:38 +00:00
Stig Bjørlykke 6d4a2e7ebf Changed email address for Gerald from zing.org to wireshark.org
in a lot of files, which I suppose is correct.

svn path=/trunk/; revision=24034
2008-01-08 22:54:51 +00:00
Sake Blok 173fe99eb5 Fix for bug 2068 from Jim Young:
After a new display filter macro (dfmacro) has been defined, the first attempt
to use the dfmacro will result in a crash of Wireshark when the closing "}"
character is entered into the "Filter:" text entry field.


svn path=/trunk/; revision=23969
2007-12-29 09:12:29 +00:00
Bill Meier b436aeaf5f From Didier Gautheron: Bug #2042: Move constants initialisation at compile time.
svn path=/trunk/; revision=23659
2007-11-28 22:44:37 +00:00
Bill Meier 6d4dda3327 From Didier Gautheron: Bug #2040: Fix up goto at compilation time in gencode.c
svn path=/trunk/; revision=23658
2007-11-28 22:37:33 +00:00
Bill Meier 437b861f47 Fropm Anders: Broman: Fix for bug #2041
svn path=/trunk/; revision=23655
2007-11-28 22:13:50 +00:00
Guy Harris 9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
Stephen Fisher 849e628334 Introduce a new field type called FT_EBCDIC. This field works the same as
FT_STRING, except that it converts the data from the packet from EBCDIC
to ASCII for display in Wireshark.


svn path=/trunk/; revision=23503
2007-11-19 21:27:01 +00:00
Anders Broman 377793fc54 Apply yet another set of the optimization patches:
small memory leak when freeing compiled filter insns.

svn path=/trunk/; revision=23408
2007-11-09 05:54:16 +00:00
Jeff Morriss 53489c8f5d A few more s/fopen/eth_fopen/
svn path=/trunk/; revision=23207
2007-10-16 15:58:25 +00:00
Bill Meier 0534c6982c macro_name_chk: return valid error string for fail return when empty macro name field;
fixes bug #1813

svn path=/trunk/; revision=22767
2007-09-02 12:37:24 +00:00
Luis Ontanon 0b43610ea8 Use '~' as a synonim for "matches" replace rogue "s with \042 to avoid some text editors going wild
svn path=/trunk/; revision=22486
2007-08-11 22:05:44 +00:00
Guy Harris 5be4499ad1 Add a script as a front-end for Flex, to work around various problems,
such as the fact that Flex strips all but the last component of the "-o"
argument, and that it doesn't generate a header file to declare routines
the generated lexical analyzer defines.  Use that script when building
lexical analyzers, and, for each lexical analyzer, include the generated
header file in the generated analyzer.

svn path=/trunk/; revision=22446
2007-08-04 02:13:52 +00:00
Guy Harris 46be54cee3 Add a Makefile.nmake.inc file, to hold rules etc. used by multiple
Makefile.nmake files; currently, it has the (F)lex-to-C rule and a
.SUFFIXES pseudo-rule to add .l to the list of suffixes.  Have
Makefile.nmake files with .l.c rules include Makefile.nmake.inc to get
that rule.

The names Makefile.am.inc and Makefile.nmake.inc aren't necessarily the
right names for the files in question.

Use $(PACKAGE) in the Mate plugin's Makefile, rather than "mate".

svn path=/trunk/; revision=22437
2007-08-01 22:20:38 +00:00
Guy Harris 159e795100 Add a Makefile.am.inc file, to hold rules etc. used by multiple
Makefile.am files; currently, it has the (F)lex-to-C rule.  Have
Makefile.am files with .l.c rules include Makefile.am.inc to get that
rule.

svn path=/trunk/; revision=22436
2007-08-01 20:35:05 +00:00
Guy Harris 61dd46fa9c Use a common .l.c rule for running Flex on .l files, just as is done on
UN*X.

svn path=/trunk/; revision=22434
2007-08-01 00:22:25 +00:00
Luis Ontanon 9865b6346f As per Ulf's request add ${proto.field} macros that will use the value of the given field has in the last selected packet.
svn path=/trunk/; revision=22427
2007-07-30 23:32:47 +00:00
Guy Harris 968d363f11 Add comments to various %option items to explain what they're doing.
Move the %options to the beginning if they weren't already there, and
put them in the same order in all files.

Add "prefix=" options to .l files that don't already have them, so we
don't have to pass a "-P" option.

Add "never-interactive" and "noyywrap" options to our lexical analyzers,
to remove extra isatty() checks and to eliminate the need for yywrap()
from the Flex library.

Get rid of %option nostdinit - that's the default.

Add .l.c: rules to Makefile.am files, replacing the rules for specific
.l files.  Have those rules all check that $(LEX) is set.

Update the address for the FSF.

svn path=/trunk/; revision=22424
2007-07-30 20:22:37 +00:00
Guy Harris fad7133f81 Fix yet more casts of ctype.h macro arguments - and fix some cases where
we were passing an uncasted "char" to those macros.

svn path=/trunk/; revision=22306
2007-07-14 00:37:01 +00:00
Guy Harris 6ea3d47e77 "make maintainer-clean" cleans up everything that "make distclean" does;
there's no need for files in DISTCLEANFILES to be in
MAINTAINERCLEANFILES as well.

In epan, split the generated source files into those that should be
cleaned by "make distclean" and those that shouldn't, and have
DISTCLEANFILES include only the ones that should be cleaned by "make
distclean" and have MAINTAINERCLEANFILES include the ones that shouldn't
be cleaned by "make distclean".  This should fix bug 1595.

The generated source files don't need to be in EXTRA_DIST.

Use LIBWIRESHARK_DISTCLEAN_GENERATED_SRC and
LIBWIRESHARK_NODISTCLEAN_GENERATED_SRC in epan/Makefile.nmake.

svn path=/trunk/; revision=21882
2007-05-22 07:21:12 +00:00
Luis Ontanon 2b9b4cdc14 Terminate the strings of the various parts and advance the write pointer.
svn path=/trunk/; revision=21805
2007-05-16 17:35:07 +00:00
Gerald Combs 5713fbc9b9 Handle cases where our macro doesn't have any arguments. We should
probably provide feedback to the user, but at least we don't crash now.
Fixes Coverity CID 232.

svn path=/trunk/; revision=21664
2007-05-03 16:11:18 +00:00
Guy Harris 0be322bad8 Try to squelch an alignment warning (we put "int"s into the array, so we
know the pointer's aligned appropriately for an array of "int"s).

svn path=/trunk/; revision=21552
2007-04-24 06:43:01 +00:00
Guy Harris 1bc049906a Add some GCC warnings to the standard set, and add some others to the
--enable-extra-gcc-checks set.

If we turn on -pedantic, try turning on -Wno-long-long as well, so that
it's not *so* pedantic that it rejects the 64-bit integral data types
that we explicitly require.

Constify a bunch of stuff, and make some other changes, to get rid of
warnings.

Clean up some indentation.

svn path=/trunk/; revision=21526
2007-04-23 10:59:26 +00:00
Sebastien Tandel def734249e Since code generated by lex may trigger gcc warnings, we are now generating two
libraries.  A single library is generated with the lex code without the barrier
"stop on warning". An other library is generated from the remaining source
files with the "stop on warning" barrier.


svn path=/trunk/; revision=21481
2007-04-20 14:30:48 +00:00
Luis Ontanon 869b908463 Make sure ENDTRY gets evaluated
svn path=/trunk/; revision=21455
2007-04-17 15:13:17 +00:00
Sebastien Tandel 2878fd21d6 don't treat warnings as errors until a solution is found for scanner.c
depending on the lex used, it may generates warning.

svn path=/trunk/; revision=21424
2007-04-13 23:40:50 +00:00
Stephen Fisher fa57c8fc44 Fix some Solaris buildbot warnings
svn path=/trunk/; revision=21423
2007-04-13 23:32:21 +00:00
Richard van der Hoff 794b272985 From Sake Blok:
wireshark SHOULD be able to filter on multiple hf's with the
same field-name, BUT there is a little bug in the code. I have pinpointed it to
the following in epan/dfilter/dfvm.c:
...
It actually loops through all the hf's with the same name, but only checks
against the original (first) hf.


svn path=/trunk/; revision=21372
2007-04-10 18:31:36 +00:00
Stephen Fisher 6625e7503f Fix warnings on Linux/gcc 4.1.1
svn path=/trunk/; revision=21330
2007-04-03 21:17:13 +00:00