Annotation of gcl520h/_nasi.h, revision 1.1.1.1

1.1       root        1: #if !defined( __NASI_H )
                      2: #define __NASI_H
                      3: 
                      4: /*
                      5:  * _NASI.H       5.20A  June 8, 1995
                      6:  *
                      7:  * The Greenleaf Comm Library
                      8:  *
                      9:  * Copyright (C) 1985-1995 Greenleaf Software Inc.  All Rights Reserved.
                     10:  *
                     11:  * NOTES
                     12:  *
                     13:  *  This include file contains the definitions for the private
                     14:  *  functions used by the library when using the NASI driver.
                     15:  *
                     16:  * MODIFICATIONS
                     17:  *
                     18:  * June 8, 1995  5.20A : Initial release
                     19:  *
                     20:  */
                     21: #if !defined( GF_X16 ) && !defined( GF_X32 ) && !defined( GF_WIN32 )
                     22: 
                     23: typedef struct {
                     24:     char server_name[ 9 ];
                     25:     char general_port_name[ 9 ];
                     26:     char specific_port_name[ 15 ];
                     27:     char service_name[ 15 ];
                     28:     char session_name[ 17 ];
                     29:     short int vc;
                     30:     short int line_status;
                     31:     char pconfig[ 15 ];
                     32: } NASI_PORT;
                     33: 
                     34: #ifdef __cplusplus
                     35: extern "C" {
                     36: #endif
                     37: 
                     38: /*
                     39:  * These are the internal Level 1 nasi routines. They usually have
                     40:  * different implementations under DOS and Windows, although there
                     41:  * are a couple cases where they are close enough to be co-resident
                     42:  * with a bunch of #ifdefs
                     43:  */
                     44: 
                     45: int GF_CONV _DumpPortStatusNasi( PORT *port, PORT_DUMPER printer );
                     46: int GF_CONV _NasiSetServiceName( short int vc, char GF_DLL_FAR *name );
                     47: int GF_CONV _NasiAllocateVc( short int GF_DLL_FAR *pvc );
                     48: int GF_CONV _NasiDisconnectVc( unsigned short int vc );
                     49: int GF_CONV _AttachNasi( NASI_PORT GF_DLL_FAR *np );
                     50: void GF_CONV _NasiParsePortName( NASI_PORT GF_DLL_FAR *nasi_port, char GF_DLL_FAR *name );
                     51: 
                     52: /*
                     53:  * If you are running under DOS, I access all of the NASI services
                     54:  * with simple calls to int86x().  Things aren't so nice under windows.
                     55:  * I have to load up a batch of function pointers.  These function
                     56:  * pointers have horrible prototypes, which makes casting away all
                     57:  * my errors really hard.  But here is one way to get the job done:
                     58:  * create a customized typedef for each of the function types.
                     59:  */
                     60: 
                     61: #ifdef GF_WINDOWS
                     62: typedef WORD (FAR PASCAL _loadds * SET_SESSION_NAME)(char far *);
                     63: typedef WORD (FAR PASCAL _loadds * ALLOCATE_VC)(short int far *pvc);
                     64: typedef WORD (FAR PASCAL _loadds * QUERY_NAME_SERVICE)(short int vc,
                     65:                                                        short int Length,
                     66:                                                        char far *pBuffer,
                     67:                                                        char QueryType);
                     68: typedef WORD (FAR PASCAL _loadds * DISCONNECT)(short int vc);
                     69: typedef WORD (FAR PASCAL _loadds * INITIALIZE)(short int vc,
                     70:                                                char far *pConfig,
                     71:                                                char far *pPort );
                     72: typedef WORD (FAR PASCAL _loadds * SET_SERVICE_NAME)(unsigned short vc,
                     73:                                                      char far *pServiceName);
                     74: typedef WORD (FAR PASCAL _loadds *FLUSH_TX_BUFFER)(unsigned short int vc);
                     75: typedef WORD (FAR PASCAL _loadds *GET_TX_STATUS)(unsigned short int vc,
                     76:                                                  char far *pXStatus,
                     77:                                                  char far *pBoardStat);
                     78: typedef WORD (FAR PASCAL _loadds *GET_RX_STATUS)(unsigned short int vc,
                     79:                                                  char far *pXStatus);
                     80: typedef WORD (FAR PASCAL _loadds *GET_EXTERNAL_STATUS)(unsigned short int vc,
                     81:                                                        char far *pStatus);
                     82: typedef WORD (FAR PASCAL _loadds *READ_BLOCK)(unsigned short int vc,
                     83:                                               short unsigned int far *pLength,
                     84:                                               char far *pBuffer);
                     85: typedef WORD (FAR PASCAL _loadds *WRITE_BLOCK)(unsigned short int vc,
                     86:                                                unsigned short int far *pLength,
                     87:                                                char far *pBuffer);
                     88: typedef WORD (FAR PASCAL _loadds *CONTROL_REQUEST)(unsigned short int vc,
                     89:                                                    char RequestType,
                     90:                                                    char far *pBuffer);
                     91: typedef WORD (FAR PASCAL _loadds *GET_SERVER_NAME)(unsigned short int vc,
                     92:                                                    char far *pServerName);
                     93: typedef WORD (FAR PASCAL _loadds *GET_GENERAL_NAME)(unsigned short int vc,
                     94:                                                     char far *pGeneralName);
                     95: typedef WORD (FAR PASCAL _loadds *GET_SERVICE_NAME)(unsigned short int vc,
                     96:                                                     char far *pServiceName);
                     97: typedef WORD (FAR PASCAL _loadds *GET_SPECIFIC_NAME)(unsigned short int vc,
                     98:                                                      char far *pServiceName);
                     99: typedef WORD (FAR PASCAL _loadds *GET_SESSION_NAME)(char far *pSessionName);
                    100: typedef WORD (FAR PASCAL _loadds *GET_STATUS)(unsigned short int vc,
                    101:                                               unsigned short int far *pStatus );
                    102: 
                    103: /*
                    104:  * And here are those function pointer defintions.
                    105:  * At this time, all of these guys are set to 0 on startup.
                    106:  * It would probably be better to point them to routines
                    107:  * that return error codes.
                    108:  */
                    109: 
                    110: extern SET_SESSION_NAME _nasi_set_session_name;
                    111: extern ALLOCATE_VC _nasi_allocate_vc;
                    112: extern QUERY_NAME_SERVICE _nasi_query_name_service;
                    113: extern DISCONNECT _nasi_disconnect_vc;
                    114: extern INITIALIZE _nasi_initialize;
                    115: extern SET_SERVICE_NAME _nasi_set_service_name;
                    116: extern FLUSH_TX_BUFFER _nasi_flush_tx_buffer;
                    117: extern GET_TX_STATUS _nasi_get_tx_status;
                    118: extern GET_RX_STATUS _nasi_get_rx_status;
                    119: extern GET_EXTERNAL_STATUS _nasi_get_external_status;
                    120: extern READ_BLOCK _nasi_read;
                    121: extern WRITE_BLOCK _nasi_write;
                    122: extern CONTROL_REQUEST _nasi_control_request;
                    123: extern GET_SERVER_NAME _nasi_get_server_name;
                    124: extern GET_GENERAL_NAME _nasi_get_general_name;
                    125: extern GET_SERVICE_NAME _nasi_get_service_name;
                    126: extern GET_SPECIFIC_NAME _nasi_get_specific_name;
                    127: extern GET_SESSION_NAME _nasi_get_session_name;
                    128: extern GET_STATUS _nasi_get_status;
                    129: 
                    130: #endif
                    131: 
                    132: #ifdef __cplusplus
                    133: };
                    134: #endif
                    135: 
                    136: #endif /* #if !defined( GF_X16 ) && !defined( GF_X32 ) && !defined( GF_WIN32 ) */
                    137: 
                    138: #endif /* #if !defined( __NASI_H )  */
                    139: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.