/*---------------------------------------------------------------------------*/ /* */ /* Copyright 1992-1998 Silicon Graphics, Inc. */ /* All Rights Reserved. */ /* */ /* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics Inc.; */ /* contents of this file may not be disclosed to third parties, copied or */ /* duplicated in any form, in whole or in part, without the prior written */ /* permission of Silicon Graphics, Inc. */ /* */ /* RESTRICTED RIGHTS LEGEND: */ /* Use,duplication or disclosure by the Government is subject to restrictions*/ /* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data */ /* and Computer Software clause at DFARS 252.227-7013, and/or in similar or */ /* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - */ /* rights reserved under the Copyright Laws of the United States. */ /* */ /*---------------------------------------------------------------------------*/ #ident "$Revision: 1.5 $" #include "subsrg.h" /*---------------------------------------------------------------------------*/ /* Function Prototypes */ /*---------------------------------------------------------------------------*/ void SUBSRGDisplayHeader(int, int, char *, char *, char *); void SUBSRGDisplayFooter(int, int); void SUBSRGDisplayConfirmation(char *, int, class_data_t *); void SUBSRGDisplayError(int, int, __uint32_t, char *, ...); void SUBSRGPrintOptionString(char *, int); int MyStrTokR(char *, char *, char **); int SUBSRGPrintSelectBox(char *, char *, char *, int, int); void SUBSRGErr(__uint32_t); /*---------------------------------------------------------------------------*/ /* SUBSRGDisplayHeader */ /* Displays HTML Header information */ /*---------------------------------------------------------------------------*/ void SUBSRGDisplayHeader(int displayhelp, int displayscript, char *formname, char *varname, char *action) { @ @ @ @ System Support Software - Ver 1.0 @ if ( displayhelp || (displayscript && formname && varname) ) { @ } @ @ if ( displayhelp || (displayscript && formname && varname) ) { @
" formname } @table border=0 cellpadding=0 cellspacing=0 width=100% @row @cell bgcolor="#cccc99" width=15 @      @endcell @cell bgcolor="#cccc99" @ SETUP > Events > Subscribe/Unsubscribe @endcell @endrow @row @cell colspan=2 if ( displayhelp ) @   else @  

  @endcell @endrow if ( displayhelp ) { @row @cell align=right colspan=2 @ @endcell @endrow @row @cell colspan=2 @   @endcell @endrow } return; } /*---------------------------------------------------------------------------*/ /* SUBSRGDisplayFooter */ /* Displays HTML Footer information */ /*---------------------------------------------------------------------------*/ void SUBSRGDisplayFooter(int displayhelp, int displayscript) { @endtable if ( displayhelp || displayscript ) { @

} @ @ return; } /*---------------------------------------------------------------------------*/ /* SUBSRGDisplayConfirmation */ /* Displays confirmation of operation performed */ /*---------------------------------------------------------------------------*/ void SUBSRGDisplayConfirmation(char *host, int proc, class_data_t *myclass) { class_data_t *tmpclass = myclass; type_data_t *tmptype; SUBSRGDisplayHeader(0, 0, NULL, NULL, NULL); @row @cell @endcell @cell @ The following events from @format "host %s have been %s for class %s
" host (proc==SUBSCRIBEPROC?"subscribed":"unsubscribed") tmpclass->class_desc @ @endcell @endrow SUBSRGDisplayFooter(0, 0); return; } /*---------------------------------------------------------------------------*/ /* SUBSRGDisplayError */ /* Displays an error message. If an error is passed, then it decodes */ /* the error message and prints it. */ /*---------------------------------------------------------------------------*/ void SUBSRGDisplayError(int proc, int func, __uint32_t err, char *format, ...) { va_list args; char errStr[1024]; int nobytes = 0; if ( format != NULL ) { va_start(args, format); nobytes = vsnprintf(errStr, sizeof(errStr), format, args); } SUBSRGDisplayHeader(0, 0, NULL, NULL, NULL); @row @cell @endcell @cell @ @ The following error happened in @format " %s" (proc==SUBSCRIBEPROC?"Subscription":"UnSubscription") @ while switch(func) { case GETCLASSDATA: @ retrieving Class Information : break; case GETTYPEDATA: @ retrieving Event Information : break; case PROCESSDATA: @ processing Event Information : break; } @
@ @
@endcell @endrow SUBSRGDisplayFooter(0, 0); return; } /*---------------------------------------------------------------------------*/ /* SUBSRGPrintOptionString */ /* Takes a string and converts all special characters to their relevent */ /* tags and prints an