Eliminate extra period in OS/2 error messages.
authorChris Hanson <org/chris-hanson/cph>
Fri, 6 Jan 1995 22:12:13 +0000 (22:12 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 6 Jan 1995 22:12:13 +0000 (22:12 +0000)
v7/src/microcode/os2top.c

index 080b4662add87dbe0f16bf0d3fb14db09b39a93c..08d6b803af64869baf8551090b532718c91091e4 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: os2top.c,v 1.6 1995/01/06 17:41:46 cph Exp $
+$Id: os2top.c,v 1.7 1995/01/06 22:12:13 cph Exp $
 
 Copyright (c) 1994-95 Massachusetts Institute of Technology
 
@@ -1545,6 +1545,15 @@ OS_error_code_to_message (unsigned int syserr)
   if (last_message != 0)
     free ((void *) last_message);
   last_message = (dos_error_message (code));
+  /* Many of OS/2's error messages are terminated with a period, but
+     the runtime system is assuming that the messages have no period,
+     and adding its own.  */
+  if (last_message != 0)
+    {
+      length = (strlen (last_message));
+      if ((length > 0) && ((last_message [length - 1]) == '.'))
+       (last_message [length - 1]) = '\0';
+    }
   return (last_message);
 }
 \f