aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-11-01 09:41:36 +0000
committerGuy Harris <guy@alum.mit.edu>2002-11-01 09:41:36 +0000
commit749d00f331056b34906a273da60f5859a933b3a9 (patch)
tree82652bb545d3933510f83fe85412e8912014c968
parentd24c2bc5b9a6c3fb2dc7aac3d9e864ab607fc384 (diff)
Put in a portability note telling people to use "strchr()" and
"strrchr()", not "index()" and "rindex()"; MSVC++ doesn't declare "index()" or "rindex()" if you include <string.h>, and they're non-standard routines (the ANSI C names for those functions are "strchr()" and "strrchr()"). Add a bit more to the other portability note on the topic of non-standard vs. ANSI standard functions. svn path=/trunk/; revision=6539
-rw-r--r--doc/README.developer13
1 files changed, 9 insertions, 4 deletions
diff --git a/doc/README.developer b/doc/README.developer
index 3104ff294b..ba5921a656 100644
--- a/doc/README.developer
+++ b/doc/README.developer
@@ -1,4 +1,4 @@
-$Id: README.developer,v 1.62 2002/10/17 20:05:04 guy Exp $
+$Id: README.developer,v 1.63 2002/11/01 09:41:36 guy Exp $
This file is a HOWTO for Ethereal developers. It describes how to start coding
a Ethereal protocol dissector and the use some of the important functions and
@@ -91,12 +91,17 @@ routines
and "memcmp()" (note that "memcmp()" returns 0, 1, or -1, doing
an ordered comparison, rather than just returning 0 for "equal"
- and 1 for "not equal").
+ and 1 for "not equal", as "bcmp()" does).
Not all platforms necessarily have "bzero()"/"bcopy()"/"bcmp()", and
those that do might not declare them in the header file on which they're
declared on your platform.
+Don't use "index()" or "rindex()"; instead, use the ANSI C equivalents,
+"strchr()" and "strrchr()". Not all platforms necessarily have
+"index()" or "rindex()", and those that do might not declare them in the
+header file on which they're declared on your platform.
+
Don't fetch data from packets by getting a pointer to data in the packet
with "tvb_get_ptr()", casting that pointer to a pointer to a structure,
and dereferencing that pointer. That point won't necessarily be aligned
@@ -144,7 +149,7 @@ code inside
is needed only if you are using the "snprintf()" function.
-The "$Id: README.developer,v 1.62 2002/10/17 20:05:04 guy Exp $"
+The "$Id: README.developer,v 1.63 2002/11/01 09:41:36 guy Exp $"
in the comment will be updated by CVS when the file is
checked in; it will allow the RCS "ident" command to report which
version of the file is currently checked out.
@@ -154,7 +159,7 @@ version of the file is currently checked out.
* Routines for PROTONAME dissection
* Copyright 2000, YOUR_NAME <YOUR_EMAIL_ADDRESS>
*
- * $Id: README.developer,v 1.62 2002/10/17 20:05:04 guy Exp $
+ * $Id: README.developer,v 1.63 2002/11/01 09:41:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>