home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 March
/
VPR9703A.ISO
/
VPR_DATA
/
DOGA
/
SOURCES
/
POLYEDIT.LZH
/
ML
/
CLASS.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-28
|
720b
|
41 lines
/*
* クラス制御
*
* T.Kobayashi 1994.5.21
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include "data.h"
#include "err.h"
#include "inlib.h"
Class ClassList[MAX_CLASS] ;
/* クラス登録 */
int ObjectSetClass( name, funcs, parent )
char *name ; /* クラス名 */
int funcs ; /* メンバ関数の最大値 */
int parent ;
{
int i ;
for( i = 0 ; i < MAX_CLASS ; i++ )
{
if ( ClassList[i].name == NULL )
{
ClassList[i].name = name ;
ClassList[i].funcs = funcs ;
ClassList[i].parent = parent ;
ClassList[i].func = FunctionAlloc( funcs );
return i ;
}
}
ParseFatal( "新しいクラスが登録できません。" );
return -1 ;
}