home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / x11 / lib2 / message.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-15  |  2.2 KB  |  96 lines

  1. /*
  2. *    message.c - messages
  3. %
  4. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  5.  
  6. This software is copyright (C) by the Lawrence Berkeley Laboratory.
  7. Permission is granted to reproduce this software for non-commercial
  8. purposes provided that this notice is left intact.
  9.  
  10. It is acknowledged that the U.S. Government has rights to this software
  11. under Contract DE-AC03-765F00098 between the U.S.  Department of Energy
  12. and the University of California.
  13.  
  14. This software is provided as a professional and academic contribution
  15. for joint exchange. Thus, it is experimental, and is provided ``as is'',
  16. with no warranties of any kind whatsoever, no support, no promise of
  17. updates, or printed documentation. By using this software, you
  18. acknowledge that the Lawrence Berkeley Laboratory and Regents of the
  19. University of California shall have no liability with respect to the
  20. infringement of other copyrights by any part of this software.
  21.  
  22. For further information about this notice, contact William Johnston,
  23. Bld. 50B, Rm. 2239, Lawrence Berkeley Laboratory, Berkeley, CA, 94720.
  24. (wejohnston@lbl.gov)
  25.  
  26. For further information about this software, contact:
  27.     Jin Guojun
  28.     Bld. 50B, Rm. 2275, Lawrence Berkeley Laboratory, Berkeley, CA, 94720.
  29.     g_jin@lbl.gov
  30.  
  31. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  32. %
  33. % AUTHOR:    Jin Guojun - LBL    10/1/90
  34. */
  35.  
  36. #include "header.def"
  37.  
  38. /* only init_header() uses this
  39. char    *desc_massage(s)
  40. char*    s;
  41. {
  42. int    i, beg=1, len=strlen(s);
  43.  
  44. for (i=0; i < len; i++)    {
  45.     if (beg && *(s+i) == '.' && *(s+i+1) == '\n')    {
  46.     i--;
  47.     len -= 2;
  48.     memcpy(s+i, s+i+2, len-i);
  49.     }
  50.     else    beg = (s[i]=='\n');
  51. }
  52. return(s);
  53. }
  54. */
  55.  
  56. #if defined TC_Need
  57. #    include <stdarg.h>
  58.  
  59. message(const char *vform, ...)
  60. {
  61. vfprintf(stderr, vform, ...);
  62. return    fflush(stderr);
  63. }
  64.  
  65. #else
  66.  
  67. #    include <varargs.h>
  68.  
  69. #ifndef    NO_V_LIST
  70.  
  71. #ifdef    MIPS
  72. message(char* vform, ...)
  73. #else
  74. message(vform, va_alist)
  75. va_list    va_alist;
  76. #endif
  77. {
  78. va_list    ap;
  79. va_start(ap);
  80. vfprintf(stderr, (char*)vform, ap);
  81. return    fflush(stderr);
  82. }
  83.  
  84. #else
  85.  
  86. message(form, a0, a1, a2, a3, a4, a5, a6, ap)
  87. char*    form;
  88. va_list    ap;
  89. {
  90. return    fprintf(stderr, form, a0, a1, a2, a3, a4, a5, a6, ap);
  91. }
  92.  
  93. #endif    V_LIST
  94.  
  95. #endif    TC_Need
  96.