home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftptest.leeds.ac.uk
/
2015.02.ftptest.leeds.ac.uk.tar
/
ftptest.leeds.ac.uk
/
bionet
/
CAE-GROUP
/
SCL-WIN3x
/
FED_PLUS.EXE
/
CASEITEM.H
< prev
next >
Wrap
C/C++ Source or Header
|
1994-07-25
|
3KB
|
108 lines
#ifndef CASEITEM_H
#define CASEITEM_H
/* $Id: caseitem.h,v 1.2 1993/10/15 18:48:24 libes Exp $ */
/************************************************************************
** Module: Case_Item
** Description: This module implements the Case_Item abstraction. A
** case item represents a single branch in a case statement; it
** thus consists of a list of labels and a statement to execute
** when one of the labels matches the selector.
** Constants:
** CASE_ITEM_NULL - the null item
**
************************************************************************/
/*
* This software was developed by U.S. Government employees as part of
* their official duties and is not subject to copyright.
*
* $Log: caseitem.h,v $
* Revision 1.2 1993/10/15 18:48:24 libes
* CADDETC certified
*
* Revision 1.4 1992/08/18 17:12:41 libes
* rm'd extraneous error messages
*
* Revision 1.3 1992/06/08 18:06:24 libes
* prettied up interface to print_objects_when_running
*
*/
/*************/
/* constants */
/*************/
#define CASE_ITEM_NULL (struct Case_Item *)0
/*****************/
/* packages used */
/*****************/
#include "expbasic.h" /* get basic definitions */
#include "scope.h"
#include "memory.h"
/************/
/* typedefs */
/************/
typedef struct Case_Item *Case_Item;
/****************/
/* modules used */
/****************/
#include "stmt.h"
/***************************/
/* hidden type definitions */
/***************************/
struct Case_Item {
Symbol symbol;
Linked_List labels;
struct Statement *action;
};
/********************/
/* global variables */
/********************/
#ifdef CASEITEM_C
#include "defstart.h"
#else
#include "decstart.h"
#endif /*CASE_ITEM_C*/
GLOBAL struct freelist_head CASE_IT_fl;
#include "de_end.h"
/******************************/
/* macro function definitions */
/******************************/
#define CASE_ITget_labels(ci) ((ci)->labels)
#define CASE_ITget_statement(ci) ((ci)->action)
/***********************/
/* function prototypes */
/***********************/
#define CASE_IT_new() (struct Case_Item *)MEM_new(&CASE_IT_fl)
#define CASE_IT_destroy(x) MEM_destroy(&CASE_IT_fl,(Freelist *)(Generic)x)
extern Case_Item CASE_ITcreate PROTO((Linked_List, struct Statement *));
extern void CASE_ITinitialize PROTO((void));
/********************/
/* inline functions */
/********************/
#if supports_inline_functions || defined(CASEITEM_C)
#endif /* supports_inline_functions || defined(CASE_ITEM_C) */
#endif /*CASE_ITEM_H*/