Category : OS/2 Files
Archive   : APING12.ZIP
Filename : CPICDEFS.H

 
Output of file : CPICDEFS.H contained in archive : APING12.ZIP
/*****************************************************************************
*
* MODULE NAME: CPICDEFS.H
*
* COPYRIGHTS:
* This module contains code made available by IBM
* Corporation on an AS IS basis. Any one receiving the
* module is considered to be licensed under IBM copyrights
* to use the IBM-provided source code in any way he or she
* deems fit, including copying it, compiling it, modifying
* it, and redistributing it, with or without
* modifications. No license under any IBM patents or
* patent applications is to be implied from this copyright
* license.
*
* A user of the module should understand that IBM cannot
* provide technical support for the module and will not be
* responsible for any consequences of use of the program.
*
* Any notices, including this one, are not to be removed
* from the module without the prior written consent of
* IBM.
*
* AUTHOR: Peter J. Schwaller
* VNET: PJS at RALVM6 Tie Line: 444-4376
* Internet: [email protected] (919) 254-4376
*
* AVAILABILITY:
* These sample programs and source are also available on
* CompuServe through the APPC Information Exchange. To get
* to the APPC forum just type 'GO APPC' from any CompuServe
* prompt. The samples are available in the Sample Programs
* library section. Just search on the keyword CPICPGMS to
* find all the samples in this series.
*
* Updates for the sample programs and support for many more
* CPI-C platforms will also be made available on CompuServe.
*
* RELATED FILES:
* Used by CPICPORT.C
*
* CHANGE HISTORY:
* Date Description
* 08/01/92 This file was created.
* 08/05/92 Version 2.31 of APING, ATELL and AREXEC released to CompuServe.
* This version was also distributed at the APPC/APPN Platform
* Developer's Conference held in Raleigh, NC.
* 08/17/92 Added FAPI to list of SUPPORTS_SETTING_SECURITY.
*
*
*****************************************************************************/

#ifndef INCL_CPICDEFS
#define INCL_CPICDEFS


/*
* Define the operating system string.
*/

#if defined(OS2)
#define OPSYS_STRING "OS/2"

#elif defined(OS2_20)

#define OPSYS_STRING "OS/2 2.0"

#elif defined(FAPI)

#define OPSYS_STRING "OS/2 or DOS (Family API)"

#elif defined(DOS)

#define OPSYS_STRING "DOS"

#elif defined(VM)

#define OPSYS_STRING "VM/CMS"

#elif defined(MVS)

#define OPSYS_STRING "MVS"

#elif defined(OS400)

#define OPSYS_STRING "OS/400"

#elif defined(AIX)

#define OPSYS_STRING "AIX"

#else

#define OPSYS_STRING "Unknown"
#endif



/*
* Text strings that are sent between ASCII and EBCDIC machines must
* be translated in order to be understood.
*
* This constant is referenced in the CPICPORT.H and CPICPORT.C files.
*
* If you are porting to another EBCDIC computer, you should add your
* platform constant to the OR'ed list below.
*/

#if defined(VM) || defined(MVS) || defined(OS400)
#define EBCDIC_HOST
#endif

/*
* Integers sent in binary form must be in a particular byte order.
* I have chosen little endian as the byte order for sending integers.
* Therefore, big endian computers must be identified and must
* perform byte swapping on all integers that are sent in binary form.
*
* This constant is referenced in the CPICPORT.H file.
*
* If you are porting to another big endian computer, you should add your
* platform constant to the OR'ed list below.
*/
#if defined(VM) || defined(MVS) || defined(OS400)
#define BIG_ENDIAN
#endif


/*
* The C/370 requires that identifiers (variable and function names)
* be unique in the first 8 characters. Many of the function calls
* in these source files are intentionally long to enhance readability.
* If the following constant is defined, the source and header files
* will map the long names to shorter ones using #define.
*
* This constant is referenced in the following files:
* CPICERR.H
* CPICINIT.H
* CPICPORT.H
*/
#if defined(VM) || defined(MVS)
#define SHORT_IDENTIFIERS
#endif

/*
* Most platforms do not define strupr(), since it is not part of the
* ANSI standard. On platforms where strupr() exists, we shouldn't
* redefine it.
*
* If your platform already has a strupr() function, add the appropriate
* constant to the list.
*
* This constant is referenced in the following files:
* CPICPORT.H
* CPICPORT.C
*/
#if defined(OS2) || defined(FAPI) || defined(DOS) || defined(BCC) || \
defined(OS2_20)
#define DOES_NOT_NEED_STRUPR
#endif



/*
* There are a few CPI-C extensions that are not supported across all
* platforms and a few local names that are handled differently. Many
* of these are treated the same on a group of platforms. To avoid
* testing for each platform throughout the code, I have established
* a number of constants that indicate whether a feature is supported
* or not.
*
* If you are porting this application to another platform, you can
* add your platform to the list with an or (||) clause.
*/

/*
* Setting security type and userid/password information is not part of
* the SAA CPI-C base.
*
* This constant is referenced in the CPICINIT.C file.
*/
#if defined(OS2) || defined(DOS) || defined(VM) || defined(AIX) || \
defined(FAPI) || defined(OS2_20)
#define SUPPORTS_SETTING_SECURITY
#endif

/*
* On most platforms partner LU names will always be in uppercase.
* Some platforms allow you to specify a partner LU name that can
* contain lowercase characters (e.g., OS/2 partner LU aliases).
* If this constant is defined, the partner LU name will only be
* converted to uppercase if it is a fully qualified LU name.
*
* This constant is referenced in the CPICINIT.C file.
*/
#if defined(OS2) || defined(FAPI) || defined(OS2_20) \
|| defined (AIX)
#define PLN_COULD_REQUIRE_LOWERCASE
#endif

/*
* Some platforms do not support the base function, Extract Conversation
* State.
*
* This constant is referenced in the CPICERR.C file.
*/
#if defined(OS400) || defined(MVS)
#define ECS_NOT_SUPPORTED
#endif



/* min and max macros */
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif

#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif


#ifndef TRUE
#define TRUE (1)
#endif

#ifndef FALSE
#define FALSE (0)
#endif


#endif


  3 Responses to “Category : OS/2 Files
Archive   : APING12.ZIP
Filename : CPICDEFS.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/