#include stdio #include stdlib #include descrip #include ssdef #include iodef #include secdef #include psldef #include jpidef #include libdef #include libdtdef #include sys_types void sys_wait_seconds ( float *seconds ) { lib$wait( seconds ); } int sys_get_proc_id ( SYS_PROC_ID_PTR proc_id ) { int stat, item; unsigned int pid; item = JPI$_PID; stat = lib$getjpi( &item, 0, 0, &pid, 0, 0 ); if ( stat % 2 ) proc_id->id = pid; else proc_id->id = 0; return stat; } int sys_get_user_name ( int max_chars, char *name ) { struct dsc$descriptor dsc; int stat, item; short len; MAKE_FIXED_DESCRIP( name, max_chars, dsc ); item = JPI$_USERNAME; stat = lib$getjpi( &item, 0, 0, 0, &dsc, &len ); name[len] = 0; return stat; } int sys_get_time ( SYS_TIME_PTR time ) { int stat; stat = sys$gettim( time ); return stat; } int sys_get_datetime_string ( int string_size, char *string ) { SYS_TIME_TYPE time; struct dsc$descriptor dsc; int i, flag, stat; short len; stat = sys$gettim( &time ); for ( i=0; i