#include #include #include #include #include #include #include #include #include #include #include #include #include #define __NEW_STARLET 1 /* ** ** ADC DEFINITONS ** */ #include "adcdef.h" #include "macros.h" #if 0 /* **++ ** FUNCTIONAL DESCRIPTION: ** ** Put formated message to standard output device (SYS$OUTPUT). ** ** FORMAL PARAMETERS: ** ** ctx: A session context ** msgid: VMS condition code ** variable agriments list ** ** RETURN VALUE: ** ** VMS condition code ** ** **-- */ void _adc_trace ( ADC_CTX * ctx, char * faos, ... ) { int status; va_list ap; char fao[255] = {"!%D %ADC-I-TRACE:"},buf[4096]; struct dsc$descriptor buf_dsc,fao_dsc; int argc,argl[32] = {0},idx,flag=15,lvl; /* ** Get a message text with given msgid */ status = strlen(faos); memcpy(&fao[17],faos,status); INIT_SDESC(fao_dsc,status + 17,fao); /* ** Reorganize parameters list for $FAOL */ va_start(ap,faos); for (idx = 1,va_count(argc);idx < argc;idx++) argl[idx] = va_arg(ap,unsigned); va_end((void *) faos); /* ** Format a message, put it to SYS$OUTPUT */ INIT_SDESC(buf_dsc, sizeof(buf),buf); if ( !(1 & (status = sys$faol(&fao_dsc,&buf_dsc.dsc$w_length,&buf_dsc,argl))) ) lib$signal(status); lib$put_output(&buf_dsc); } void main (void) { int status; char sdig[] = {"101586841125"}; unsigned __int64 dig = 0; struct dsc$descriptor buf_dsc; INIT_SDESC(buf_dsc,sizeof(sdig)-1,sdig); status = ots$cvt_tu_l(&buf_dsc,&dig,sizeof(dig),0); // _adc_trace(NULL,"!UL !XL",123,0x456); } #endif void main (void) { int status; $DESCRIPTOR(fao_dsc,"!+ !0%CAW!1%CAW1!%EAW2!%F"); struct dsc$descriptor tmp_dsc; char buf[128]; INIT_SDESC(tmp_dsc,sizeof(buf),buf); if ( !(1 & (status = sys$fao(&fao_dsc,&tmp_dsc.dsc$w_length,&tmp_dsc,1))) ) lib$signal(status); lib$put_output(&tmp_dsc); if ( !(1 & (status = sys$fao(&fao_dsc,&tmp_dsc.dsc$w_length,&tmp_dsc,0))) ) lib$signal(status); lib$put_output(&tmp_dsc); }