/********************************************************************/ /* Functionprototypes for functions which are used to simplify the communication with programs which understand the VA-Protocol. (c) 1990,91,92 by Stephan Gerle E-Mail: Maus Net: Stephan Gerle @ DO Internet: sg@do.maus.de Stand: 9.3.92 Draft english version. You get the result 1 from all functions if the main program understand the required protocol message. Otherwise the functions return 0 as the result. See VAPROTO.H for further informations and the definitions of the message numbers. */ #ifndef __VAFUNC_H #define __VAFUNC_H #include /*** Macros **********************************************************/ /* AVSTR2MSG converts the value of a string pointer into the two Words of a message array. msg : Name of the Word-Array offset : Smaller index of the two Word-Entries. str : Pointer to string */ #define AVSTR2MSG(msg,offset,str) (*(char **)(msg+offset) = str) /* AVMSG2STR converts two Words into one String-Pointer. msg : Name of the Word-Array offset : Smaller inex of the two Word-Entries */ #define AVMSG2STR(msg,offset) ((char *)(((long)msg[offset]<<16)|(((long)msg[offset+1])&0xffff))) /* AVHasProto() tests if the main program understands a particular VA-Protocol message. Parameters are the number of the word (0-2) and the bitnumber of message (used by VA_PROTOSTATUS). See also VAPROTO.H at VA_PROTOSTATUS */ #define AVHasProto(word,bit) (AVStatus[word]&(1<=0) { ... AVInit(gl_apid,"ACCNAME ",1|2); if (MultiAES()) "Wait until status comes or user acts." else { "open window or do something else" EventLoop(); } ... appl_exit(); } } #endif #endif