PLUS+1 Tools > PLUS+1 and C
ccp excample source code
Quax76:
Conversion.idl
CCP_TI_v525 Conversion 002A
{
#xclass Conversion
{
S32 Celsius(S32 fahrenheit)
{
}
}
}
Quax76:
Conversion.c
//FILE: Conversion.c
//IDL Type: CCP_TI_v525
//IDL Name: Conversion
//IDL Version: 002A
//IDL CheckSum: 1C5B
//This file is automatically generated by RatatoskT3,
//so change it only if you know what you are doing...
#include "./CCP_TI_v525.h"
#include "./Conversion.h"
//XCLASS methods:
//XCLASS Conversion
//shared data (Do not use directly, use "SELF->SHARED" instead):
Conversion_1C5B_SHARED_TYPE Conversion_1C5B_SHARED_INSTANCE;
S32 Conversion_Celsius(Conversion * SELF, S32 fahrenheit)
{
return (fahrenheit - 32) * 5 / 9;}
//Variables:
//Functions:
Quax76:
CCP_TI_v525.h
#ifndef CCP_TI_v525_H
#define CCP_TI_v525_H
#ifdef CCP_TI_v525
typedef unsigned char BOOL;
typedef unsigned char U8;
typedef signed char S8;
typedef unsigned int U16;
typedef signed int S16;
typedef unsigned long U32;
typedef signed long S32;
#endif
#endif
Quax76:
Conversion.h
//FILE: Conversion.h
//IDL Type: CCP_TI_v525
//IDL Name: Conversion
//IDL Version: 002A
//IDL CheckSum: 1C5B
//This file is automatically generated by RatatoskT3,
//so change it only if you know what you are doing...
#ifndef _CONVERSION_H
#define _CONVERSION_H
//XCLASS structs:
//XCLASS Conversion
//Shared class data:
typedef struct
{
U32 INITFLAG; //do not write to this field!
} Conversion_1C5B_SHARED_TYPE;
extern Conversion_1C5B_SHARED_TYPE Conversion_1C5B_SHARED_INSTANCE;
typedef struct
{
U32 RESERVED; //do not write to this field!
Conversion_1C5B_SHARED_TYPE * SHARED; //do not write to this field!
} Conversion;
//XCLASS headers:
//XCLASS Conversion
extern S32 Conversion_Celsius(Conversion * SELF, S32 fahrenheit);
//XCLASS macros (only used by PLUS+1 GUIDE):
//XCLASS Conversion
#define _CALL_Conversion_INIT(SELF)\
if(!Conversion_1C5B_SHARED_INSTANCE.INITFLAG)\
{\
Conversion_1C5B_SHARED_INSTANCE.INITFLAG = 1;\
}\
SELF.SHARED = &Conversion_1C5B_SHARED_INSTANCE;
//Conversion does not have a process function, empty macro:
#define _CALL_Conversion_PROCESS(SELF)
//GUIDE wrapper for method: Conversion.Celsius
#define _CALL_Conversion_Celsius(SELF, CONDITION, FAHRENHEIT_MACRO, CELSIUS_MACRO)\
if(CONDITION)\
{\
CELSIUS_MACRO = Conversion_Celsius(&SELF, FAHRENHEIT_MACRO);\
}
//Externals:
#endif
Quax76:
command lines:
cl2000 Conversion.c -d "CCP_TI_v525" -pm -me -o3 -q -g -pdr -pdv -pden -pdse225 -pds303 -d "LARGE_MODEL" -ml -v28
ar2000 -r Conversion.lib Conversion.obj
Navigation
[0] Message Index
[#] Next page
Go to full version