Ethereal-dev: [Ethereal-dev] Preferences module name limitation

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Gilbert Ramirez <gram@xxxxxxxxxxxxxxx>
Date: Tue, 6 Nov 2001 21:49:49 -0600
I'm attempting to add a preference to the X.25 dissector, but
as the name ("x.25") is currently defined, I can't because of the
limitation on the name (in prefs_register_module in prefs.c):

	/*
	 * Make sure that only lower-case ASCII letters, numbers, and
	 * underscores appear in the module name.
	 *
	 * Crash if there is, as that's an error in the code;
	 * you can make the title a nice string with capitalization,
	 * white space, punctuation, etc., but the name can be used
	 * on the command line, and shouldn't require quoting,
	 * shifting, etc.
	 */
	for (p = name; *p != '\0'; p++)
		g_assert(isascii(*p) &&
		    (islower(*p) || isdigit(*p) || *p == '_'));

Is it safe to add a test of *p == '.' to this? I mean, it *works*,
but does it break any other assumptions?

--gilbert