home *** CD-ROM | disk | FTP | other *** search
- /* für die XACC-Bibliothek benötigte Funktionen
-
- (c) 1993 Harald Sommerfeldt @ KI
- E-Mail: Harald_Sommerfeldt@ki.maus.de
- */
-
- #include <stddef.h>
- #ifdef __PUREC__
- #include <tos.h>
- #endif
- #ifdef __GNUC__
- #include <osbind.h>
- #include <gemext.h>
- #endif
-
- /* benötigte allgemeine Definitionen */
- typedef enum { FALSE, TRUE } bool;
-
-
- /* Wert eines Cookies holen, zurückgegeben wird TRUE bei Erfolg */
-
- typedef struct {
- long cookie, value;
- } cookiejar;
-
- int getcookie( long cookie, long *value )
- {
- cookiejar *_p_cookies;
- void *sp;
-
- sp = (void *)Super( NULL );
- _p_cookies = *(void **)0x5A0; /* Zeiger auf Cookiejar holen */
- Super( sp );
- if ( _p_cookies != NULL ) { /* wenn Cookiejar installiert ... */
- /* ... dann Cookies abklappern ... */
- for (; _p_cookies->cookie != 0L; _p_cookies++ ) {
- if ( _p_cookies->cookie == cookie ) {
- /* ... bis der gewünschte Eintrag ist */
- if ( value != NULL ) *value = _p_cookies->value;
- return TRUE;
- }
- }
- }
- return FALSE;
- }
-
- #ifdef __GNUC__
- int appl_search( int ap_smode, char *ap_sname, int *ap_stype, int *ap_sid )
- {
- int retval;
-
- _int_in[0] = ap_smode;
- _addrin[0] = ap_sname;
- retval = __aes__(AES_CONTROL_ENCODE(18, 1, 3, 1));
- *ap_stype = _int_out[1];
- *ap_sid = _int_out[2];
- return retval;
- }
- #endif
-