Messages defgb 2.9  7 Apr 97
  [Approximate.  I probably didn't keep this strictly up to date.  Sorry]
Many messages print diagnostic on one line and diagnosed text on next
Existence & destination of messages controlled via diagnostics optional file
  &/or compilation switches

        ID info
" No data files open"
" Lowest level file open is level %d\n   Name = %s\n",i,datafiles[i].source
" Lowest level file open is level %d  File is output of command\n   
	Command & params = %s\n",i,datafiles.source[i]
" Last record read was # %d\n",datafiles[i].nrecs
"(Count includes comments, blanks, etc; excludes addl diag info, if any)\n"
" REMOTE_HOST = %s",getenv("REMOTE_HOST")	/* if non-empty */
" REMOTE_ADDR = %s",getenv("REMOTE_ADDR")	/* if no REMOTE_HOST & non-empty */
" No remote ID info"				/* if both above empty */
" REMOTE_USER = %s",getenv("REMOTE_USER")	/* if non-empty */
" This message issued %s",ctime(&timbuf);
" This msg from method %s.  Source: %s %s\n",METHOD,INNER_SOURCE,INNER_VERSION);
		Extra ID info (if requested)
" Data file open at level %d\n   Name = %s\n",i,datafiles[i].source
" Data file open at level %d  File is output of command\n   
	Command & params = %s\n",i,datafiles.source[i]
" Indirect file %s open\n",indirect_file.source
" %s optional file open\n   Name = %s\n",files[j].descrip,files[j].sink
" No optional files open"
" %s output sink open\n   Name = %s\n",output_opts.file[j].descrip,
	output_opts.file[j].sink
" No output sinks open\n"


	Error info from script
  /* If a problem occurred and the highest level data file open has its */
  /* data coming from a script, defgb attempts to copy more lines from  */
  /* the script in case they contain error information.  The first line	*/
  /* below is printed, followed by up to 5 more lines from the script.  */
  /* If there is a 6th, the "Too many diags" message occurs		*/
  /* The "5" can be controlled at compile time and/or run time.  See	*/
  /* switch and opt file documentation					*/
" More diagnostic info from command(?) follows:\n"
" *** Too many diags\n"

	Comment line processing 
"Comment buffer overflow attempting to add comment ",tmp
"Comment line containing html tag too long\n   Comment = ",comment
 ...	/* at end of comment indicates that comment was truncated to fit */
		Following 2 errors probably represent comments added by
		program rather than comments in data file
"Comment contains embedded newline char\n   Bad comment = ",comment
		I/O errs from fgets system call
"EOF/error at or before variable list"

	Fixed format data processing 
"Non-numeric input width for variable ",tabnames[ncnt]
		Format/data mismatches
"More than one datum in single fixed field\n   Field = ",tmp+impstarts[i]
"Bad record structure near end of data record ",tmp

	Free format data processing
"Too few variables in data record\n   Record = ",tmp
"Too many variables in data record\n   Extra var = ",tok

	Data file name/indirect file processing
		Inserted comment line
"Indirect file: ",indirect_name," {",methodname,"}"
		Errors
"Inner got no args from outer.  # args = ",*nparams
"Could not open file of file names\n   File = ",indirect_name
"Unknown file descriptor in indirect file\n   Descriptor = ",prefix
"Illegal file descriptor prefix in indirect file\n    Prefix precedes 
	descriptor ",descrip
"Cannot supply prefix for descriptor ",descrip
"0 length indirect file entry for file descriptor ",descrip /*  Get variant*/
	/* of this message if descriptor determined by location in indir file */
"2nd entry for optional file\n   Attempted entry = ",source
"Null input specifier for ", descrip," file."
"Extra parameter in input specifier for ", descrip," file.  Specifier = ",tok
opt_name," required option missing"
opt_name," option provided and it must not be"
opt_name," data must come from optional or indirect file\n   Bad source = ",source
"Level 0 input specifier not found in indirect file ", s[0]+1
"Embedded blank or tab in file name.  Name = ",lev0name
		Trying to get source from .objects file
  /*  For next 4 errors, the reported "Bad param" is from the indirect	*/
  /*  file.  For the 2nd & 3rd errors, compare the bad number against,	*/
  /*  respectively, the number of parameters in the .objects file entry	*/
  /*  and .objects file entry # "badparam", which, if the message is	*/
  /*  accurate, should also look like ".objects_parameter_N"		*/
  /*  For the 4th error, look for 2 .objects_parameter_N strings that	*/
  /*  are identical							*/
"Requested .objects param must be positive\n   Bad param = ",param_num
"Requested .objects param beyond end of param list\n   Bad param = ",i
".objects param may not request another .objects param\n   Bad param = ",i
"Requested .objects param already processed\n   Bad param = ",i

	Variable name/attribute processing
"Non-numeric display width for variable ",ptr /* Look in dispwidths opt file */
"0 length or non-numeric width attribute for variable ",ptr
"Attribute too long\n   Attribute = ",attr
"Duplicate variable name (after translation, if any)\n   Name = ",tok
"Too many data levels.  Allowed maximum = ",MAXLEVELS
"Zero length variable name in record ",tmp
"Variable name too long\n   Name = ",tok
"Translated variable name too long\n   Name (pre-trans) = ",tok
"No variables found after scan of level 0 list"
"Too many variables found after scan of level 0 list.  Max = ",NVAR
		I/O errs from fgets system call
"EOF/error trying to read a variable list record"

===========
	Optional file processing. * will be the description of an opt file
		Comments
"* file: ",source
"* data: contained in indirect input file"
"{*}" /* Postfixes comments from opt file in general comment stream */
		Errors
	/* Next error detected in init_file_structs			*/
"Compile-time entry separator appears in compile-time item separator list"
	/* Next few errors will include additional lines ID'ing the 	*/
	/* opt file type and data record that includes the bad entry	*/
"Entry appears twice in list\n   Entry = ",tok
"Third item in entry ",tok
"List overflow attempting to add item ",this_var or tok
	/* Next error: Opt file entry must be a=b, not a or a=b=c	*/
	/* Check the b string for embedded separators, too		*/
	/* (a=b=c no longer tested for as of 2.7)			*/
"Incomplete entry\n   Variable/keyword = ",tok
"Table separator appears in item ",tok	/* WJSTBL_SEPARATOR may not  */
					/*   be in opt file data     */
			I/O err from fopen system call
"Error opening ",opt_name," file ",source
			I/O err from fgets system call
"EOF/error before opt file data records"

		data field options
			Errors
  /*  Next error comes from init_file_structs				*/
"Compile-time ALT_SEPARATOR string 0 len or too long.  String = ",ALT_SEPARATORS  
"alt_separators string too long.  String = ",ptr
	/* Next error: check REQUIRED_SEPARATORS constant.  Usually	*/
	/* tab & newline						*/
"Separator string missing one or more required separators\nCharacters
	not printed here since they may be unprintable-sorry"
	/* Next error: "separator character" is datafieldopts separators */
	/* input (if present), SEPARATOR [sic] compilation switch (if	*/
	/* not); or command-input or object-input delimiter		*/
"Alt_separators character may not be separator character\nCharacters 
	not printed here since they may be unprintable-sorry"
"Illegal escaped string ->",string,"<-	/* illegal \ sequence (no char 	   */
					/* after \ or illegal char after \) */

		variable removals
			Errors
"Removal variable doesn't exist\n   Name (after trans) = ",tok
"removals file may not be command\n   Command = ",source
"Removed all variables"
				I/O err from fopen system call
"Error opening removals file ",files[REMOVALS].source
				I/O err from fgets system call
"EOF/error before removals file data records"

		Diagnostics control
			Errors
"Bad internal table format"	/* Problem parsing a wjstbl ??	*/
"Invalid prefix in diag opt file keyword ",keyword
"Diag sink specified more than once.  Sink = ",keyword
"> 1 sinks to one file, but different modes spec'd\n   File = ",errout->sink
"Non-numeric input for value corresponding to keyword ",keyword
"Integer value too big or too small for keyword ",keyword
"Cannot trace diagnostic lines from diagnostics file" /* no print_diagnostic_lines */
"Error info to stdout because cannot open error sink ",errout->sink
				I/O err from fopen system call
"Cannot open diagnostic sink\n   File = ",output_opts.file[DIAG_SINK].sink);

		Messages common to several kinds of opt files
			Message will id the opt file involved
"Unprocessed * parameters.  Number skipped = ",n  /* Check spelling of keywords in opt file  */
"Illegal logical value ",keyword_identifier /* Not TRUE, FALSE or valid synonym */
===========

	EXEC processing
	  /* Method compiled with READ_COMMANDS switch set FALSE	*/
"Command/script input requested but method not compiled with this capability\n
	Desired command was ",file->source
"May not do piping or i/o redirection in command\n   Command was ",*poss_comm_string);
		Will copy up to 5 lines from script to stdout after error
		(# lines is configurable)
"More diagnostic info(?) from script follows:\n"
" *** Too many diags\n"		/* ... if script supplies > 5 lines	*/
		From startchild
"no pipes"
"bad fork"
"*** Error: startchild exec error in child process"

	JGOFS object processing
"Failure to access JGOFS data object ",file->source /* Got negative	*/
	/* return code from jdbopen-see its code.  May be preceded by	*/
	/* message from that routine; may crash method printing that	*/
	/* message if in html environment				*/
"Too many data levels in JGOFS object.  Allowed maximum = ",MAXLEVELS
  /*  Next error: Not sure <= 0 is possible.  For too many, listvar	*/
  /*  object & compare with NVAR compiled into method.  NB: overflow	*/
  /*  has already occurred in jdbopen, so method may crash before	*/
  /*  printing this out							*/
"0, negative, or too many variables in JGOFS object ",file->source 
	  /* Method compiled with READ_OBJECTS switch set FALSE	*/
"JGOFS object input requested but method not compiled with this capability\n
	Desired object was ",file->source


	Calculations
  /*  In next section, * will be an opt file name pertaining to the type */
  /*  of calculation.							 */
"Required * param missing.  Param = ",name
"Translated variable in * calculation too long\n  Truncated, post-trans 
	variable = ",varname
"Variable provided for * calculations not in dataset\n  Variable = ",var
    /*  Next message probably due to internal error		*/
"Parameter provided for * calculation too long\n  Param = ",param

	Lat/lon conversions
    /* * in next message is latitude or longitude  */
"* work requested but * input variable name not supplied"
"Lat/lon format string too long.  String = ",ptr
"Illegal lat/lon format.  Format = ",ptr
"No code to do X to Y latlon conversion /* X & Y are legal formats, but we */
				/* forgot to write the code to do the work */
    /* * in next 2 messages is input or output  */
"* latitude convention not N or S.  Convention = ",ptr
"* longitude convention not E or W.  Convention = ",ptr
"Output lat/lon not big enough to accept input lat/lon degrees\n   Input 
    lat/lon = ",instr

	Time/date conversions
    /* * in next message is input or output  */
"* time convention not UTC, GMT, or local.  Convention = ",ptr);
"No template for time/date input variable invar",ninformats+1
"Duplicate time/date input fields, types ",this_type," and ",
  previously_found_type
"Unrecognized time/date template specifier ",ptr
keyword," time/date keyword did not specify any input fields"
"Bad time/date skipfield character.  Char is ",template_type  /* This is */
		/* caused by a compilation error (in v 2.5, anyway)	 */
"Time/date format/data mismatch.\n  Datum = ",buffer,
    "\n   Variable is pointed to by time/date invar",N
  /* * in next error will be year, month, day, hour, min, sec or Julian.    */
"Illegal * value ",ptr2
"Illegal AM/PM flag ",ptr2	/* Must be a, A, p, P w/opt trailing m or M */
"Illegal month abbreviation ",ptr2 /* b format must be exactly 3 char long? */
"Illegal month name ",ptr2	   /* B format must be full length name?    */
"Illegal UTC displacement ",in_ptr
"Illegal DST flag or displacement ",in_ptr
  /* Following fragment type error indicates coding errors in ioroutines */
  /* (should be "unrecognized template specifier" errors)		*/
"Illegal * fragment type",out_timedate[*_FRAG].source_field_type
"No input time/date variables provide info for output ",out_td[i].var_type
"No AM/PM input variable for 12 hour clock input time"
  /* For next error, problem is what input and output levels are.	*/
  /* Inputs must be as close to level 0 as output.			*/
"Output time/date ",out->var_type,
   " variable occurs before its input variable invar",n
  /* Next 2 errors could be level problems as well as missing input problems */
"Time/date Julian day input requires year information"
"Time zone conversion requires time displacement input"
  /* Next error means that for some instance of the input variable	*/
  /* specified by opt file keyword "invarNname", the format of the	*/
  /* datum did not match the template provided by opt file keyword	*/
  /* "invarNtemplate"							*/
  /* Limit in next error is a compilation constant			*/
"Excessive output time precision ignored.  Max digits = ",n
"Time zone abbrev not on defgb's list.  Zone = ",in_ptr	/* See doc for list */
"Cannot spec DST input if time zone abbrev spec's DST\n   Zone = ",in_ptr

	Memory allocation errors
	  All these errors occurred when a malloc failed.  Since it's
	unlikely that the system ran out of space for the sizes we are
	allocating, problem is most likely not directly related to some
	size we actually need.  Messages are to try to indicate where
	failure occurred
	  Message actually comes from buildstring or lengthen_str.
"Error trying to get nnn (0xXXXXXXX) bytes of memory.\n   Purpose = ",reason
Reasons:			   Subr:
" marking end of comments"	/* ioopen_ */
" saving directory string"	/* ioopen_ */
" saving level 0 source info"	/* ioopen_ */
" saving sublevel source info"  /* scanheader */
" saving xxx source info"	/* objects_param_for_source */
	   `-> /* where xxx is an opt file type */
" building oversize comment"	/* add_to_comment_string */
" building opt file item separator list"  /* init_file_structs */
" building opt file entry separator list" /* init_file_structs */
" copying removals separator list"	/* init_file_structs */
" copying item separator list"	/* init_file_structs */
" copying entry separator list"	/* init_file_structs */
" building postfix"		/* init_file_structs */
" init of next data source"	/* ioreadrec */
" indirect file msg"		/* get_files */
" bracketing method name"	/* have_opt_input or get_files */
" have_opt_ msg"		/* have_opt_input */
" get_var_from_keyword"		/* that subr handles opt files w/keywords */
" building trace msg"		      /* open_datafile */
" building open_datafile err string"  /* open_datafile */
" building object selection string N" /* open_datafile */
" putting filespec together"	/* analy_source */
" analy_source err msg1"	/* analy_source */
" analy_source err msg2"	/* analy_source */
" analy_source temp buffer"	/* analy_source */
" building time/date error string"  /* affects_frag */
" building reformat_latlon msg"	    /* reformat_latlon */
" saving output sink name"	    /* configure_output */
" building unique sink name"	    /* configure_output */
" creating null output sink name"   /* configure_output */
" building input line diag keyword" /* configure_output */
" building time/date keyword"	    /* get_timedateparams */
" building calc_timedate err msg"   /* calc_timedate */
" building get_timedate_frag err msg" /* get_timedate_frag */
" creating opt_file_id string"	/* create_wjs_tbl */
" creating rec_id string"	/* create_wjs_tbl */
" creating err msg N"		/* create_wjs_tbl */
""  /* No message provided.  Probably a call to attempt to build an error msg */

	Miscellany
  /*  Next 2 messages probably indicate some kind of internal error	*/
"Fixed-field/free-field status not determined for level ",lev
"Too many string lengthenings in progress.  Max is ",ntbl

"Mixed fixed/free format input variable ",tabnames[j] /* NG within a level */
"Token too long. Bad token = ",tok
	/* Next 2 messages probably mean inp record had no newline char	*/
	/* within # chars read						*/
"Input record exceeds buffer size or no newline\n   Inp record = ",file->source  
"Input record exceeds buffer size or no newline\n   Inp record begins with ",buf
  /*  Next message is due to some kind of internal logic problem  */
  /*  Source types are defined in defgb_nonconfigurable.h	  */
"Attempt to open illegal file type as data file\n   File type = ",file->descrip,
  "File source type = ",file->source_type
"File read error",file->source	/* Non-zero ferror after fread system call */
"Closing delimiter not last character of field.  Field = ",ptr
"Unclosed delimited field.  Field = ",rtn
"May not have tabs or returns in delimited field.  Field = ",rtn

  /*  Next message due to bad spec of compilation constants.  See param1 */
  /*  doc for list of special strings					*/
" Special strings may not begin with comment character"

	From defw
"New variable name in file. Name = ",tok  /* Slightly modified */
"Bad file structure"
"Bad header file name ",s[0]
"Missing file ",subfilename
