~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/file/dicom.old/CTN/thrcond.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2           Copyright (C) 1996 RSNA and Washington University
  3 
  4           The software and supporting documentation for the Radiological
  5           Society of North America (RSNA) 1993, 1994 Digital Imaging and
  6           Communications in Medicine (DICOM) Demonstration were developed
  7           at the
  8                   Electronic Radiology Laboratory
  9                   Mallinckrodt Institute of Radiology
 10                   Washington University School of Medicine
 11                   510 S. Kingshighway Blvd.
 12                   St. Louis, MO 63110
 13           as part of the 1993-1996 DICOM Central Test Node project for, and
 14           under contract with, the Radiological Society of North America.
 15 
 16           THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER RSNA NOR
 17           WASHINGTON UNIVERSITY MAKE ANY WARRANTY ABOUT THE SOFTWARE, ITS
 18           PERFORMANCE, ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
 19           USE, FREEDOM FROM ANY COMPUTER DISEASES OR ITS CONFORMITY TO ANY
 20           SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF
 21           THE SOFTWARE IS WITH THE USER.
 22 
 23           Copyright of the software and supporting documentation is
 24           jointly owned by RSNA and Washington University, and free access
 25           is hereby granted as a license to use this software, copy this
 26           software and prepare derivative works based upon this software.
 27           However, any distribution of this software source code or
 28           supporting documentation or derivative works (source code and
 29           supporting documentation) must include the three paragraphs of
 30           the copyright notice.
 31 */
 32 /* Copyright marker.  Copyright will be inserted above.  Do not remove */
 33 
 34 /*
 35 **                              DICOM 96
 36 **                   Electronic Radiology Laboratory
 37 **                 Mallinckrodt Institute of Radiology
 38 **              Washington University School of Medicine
 39 **
 40 ** Module Name(s):      THR_Message
 41 ** Author, Date:        Stephen M. Moore, 16-Sep-96
 42 ** Intent:              Define the ASCIZ messages for errors and provide
 43 **                      a function for table lookup of the error messages.
 44 ** Last Update:         $Author: smm $, $Date: 1998/07/31 19:56:17 $
 45 ** Source File:         $RCSfile: thrcond.c,v $
 46 ** Revision:            $Revision: 1.3 $
 47 ** Status:              $State: Exp $
 48 */
 49 
 50 static char rcsid[] = "$Revision: 1.3 $ $RCSfile: thrcond.c,v $";
 51 
 52 #include <stdio.h>
 53 #include <sys/types.h>
 54 
 55 #include "dicom.h"
 56 #include "ctnthread.h"
 57 
 58 typedef struct vector {
 59     CONDITION cond;
 60     char *message;
 61 }   VECTOR;
 62 
 63 static VECTOR messageVector[] = {
 64     {THR_NORMAL, "Normal return from THR routine"},
 65     {THR_GENERICFAILURE, "THR Generic Failure: %s in %s"},
 66     {THR_NOTINITIALIZED, "THR Threads not initialized in call to %s"},
 67     {0, NULL}
 68 };
 69 
 70 
 71 /* THR_Message
 72 **
 73 ** Purpose:
 74 **      Issue an error message depending on the condition.
 75 **
 76 ** Parameter Dictionary:
 77 **      condition       Condition indicating type of error.
 78 **
 79 ** Return Values:
 80 **      message
 81 **      NULL, if condition doesn't exist.
 82 **
 83 ** Algorithm:
 84 **      Description of the algorithm (optional) and any other notes.
 85 */
 86 
 87 char *
 88 THR_Message(CONDITION condition)
 89 {
 90     int
 91         index;
 92 
 93     for (index = 0; messageVector[index].message != NULL; index++)
 94         if (condition == messageVector[index].cond)
 95             return messageVector[index].message;
 96 
 97     return NULL;
 98 }
 99 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.