Index: HTDialog.html =================================================================== RCS file: /sources/public/libwww/Library/src/HTDialog.html,v retrieving revision 2.9 diff -C2 -r2.9 HTDialog.html *** HTDialog.html 1999/04/01 19:35:39 2.9 --- HTDialog.html 2000/09/06 07:52:19 *************** *** 280,283 **** --- 280,293 ---- HTAlertPar * reply); +

+ Accessing status message strings +

+

+ A convenience function to access the message string for a given error code. + This can come in handy when generating error messages in server applications + (or the like) +

+ extern const char *HTError_message (int code);
+ 
  #endif /* HTDIALOG_H */
Index: HTDialog.c
===================================================================
RCS file: /sources/public/libwww/Library/src/HTDialog.c,v
retrieving revision 2.35
diff -C2 -r2.35 HTDialog.c
*** HTDialog.c	1999/03/01 13:39:31	2.35
--- HTDialog.c	2000/09/06 07:52:19
***************
*** 13,16 ****
--- 13,17 ----
  ** Authors
  **	HFN	Henrik Frystyk
+ **	PS	Peter Stamfest 
  */
  
***************
*** 384,386 ****
--- 385,402 ----
  {
      return NO;
+ }
+ 
+ /*	HTError_message
+ **	---------------
+ **	Added by PS, a convenience function to access the message string for
+ **	a given error code. This can come in handy when generating error 
+ **	messages in server applications (or the like)
+ */
+ PUBLIC const char *HTError_message (int code)
+ {
+     int i;
+     for (i = 0 ; i < HTERR_ELEMENTS ; i++) {
+ 	if (HTErrors[i].code == code) return HTErrors[i].msg;
+     }
+     return NULL;
  }