From a66872f6576191a59a834430f85170adc2f6b981 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 16 Jun 1997 21:30:08 +0000 Subject: base PDL 2 TEXI --- doc/tools/pdl2texi/address.h | 110 +++++++++++++ doc/tools/pdl2texi/address.inl | 104 ++++++++++++ doc/tools/pdl2texi/chain.c | 229 +++++++++++++++++++++++++++ doc/tools/pdl2texi/chain.h | 347 +++++++++++++++++++++++++++++++++++++++++ doc/tools/pdl2texi/chain.inl | 270 ++++++++++++++++++++++++++++++++ doc/tools/pdl2texi/isr.h | 18 +++ doc/tools/pdl2texi/s.d | 129 +++++++++++++++ doc/tools/pdl2texi/sample.d | 136 ++++++++++++++++ doc/tools/pdl2texi/system.h | 36 +++++ 9 files changed, 1379 insertions(+) create mode 100644 doc/tools/pdl2texi/address.h create mode 100644 doc/tools/pdl2texi/address.inl create mode 100644 doc/tools/pdl2texi/chain.c create mode 100644 doc/tools/pdl2texi/chain.h create mode 100644 doc/tools/pdl2texi/chain.inl create mode 100644 doc/tools/pdl2texi/isr.h create mode 100644 doc/tools/pdl2texi/s.d create mode 100644 doc/tools/pdl2texi/sample.d create mode 100644 doc/tools/pdl2texi/system.h (limited to 'doc') diff --git a/doc/tools/pdl2texi/address.h b/doc/tools/pdl2texi/address.h new file mode 100644 index 0000000000..82d73b917d --- /dev/null +++ b/doc/tools/pdl2texi/address.h @@ -0,0 +1,110 @@ +/* address.h + * + * This include file contains the information required to manipulate + * physical addresses. + * + * COPYRIGHT (c) 1997. + * On-Line Applications Research Corporation (OAR). + * All rights reserved. + * + * $Id$ + */ + +#ifndef __ADDRESSES_h +#define __ADDRESSES_h + +/* + * _Addresses_Add_offset + * + * DESCRIPTION: + * + * This function is used to add an offset to a base address. + * It returns the resulting address. This address is typically + * converted to an access type before being used further. + */ + +STATIC INLINE void *_Addresses_Add_offset ( + void *base, + unsigned32 offset +); + +/* + * _Addresses_Subtract_offset + * + * DESCRIPTION: + * + * This function is used to subtract an offset from a base + * address. It returns the resulting address. This address is + * typically converted to an access type before being used further. + */ + +STATIC INLINE void *_Addresses_Subtract_offset( + void *base, + unsigned32 offset +); + +/* + * _Addresses_Add + * + * DESCRIPTION: + * + * This function is used to add two addresses. It returns the + * resulting address. This address is typically converted to an + * access type before being used further. + */ + +STATIC INLINE void *_Addresses_Add ( + void *left, + void *right +); + +/* + * _Addresses_Subtract + * + * DESCRIPTION: + * + * This function is used to subtract two addresses. It returns the + * resulting offset. + */ + +STATIC INLINE unsigned32 _Addresses_Subtract ( + void *left, + void *right +); + +/* + * _Addresses_Is_aligned + * + * DESCRIPTION: + * + * This function returns TRUE if the given address is correctly + * aligned for this processor and FALSE otherwise. Proper alignment + * is based on correctness and efficiency. + */ + +STATIC INLINE boolean _Addresses_Is_aligned ( + void *address +); + +/* + * _Addresses_Is_in_range + * + * DESCRIPTION: + * + * This function returns TRUE if the given address is within the + * memory range specified and FALSE otherwise. base is the address + * of the first byte in the memory range and limit is the address + * of the last byte in the memory range. The base address is + * assumed to be lower than the limit address. + */ + +STATIC INLINE boolean _Addresses_Is_in_range ( + void *address, + void *base, + void *limit +); + +#include "address.inl" + +#endif +/* end of include file */ diff --git a/doc/tools/pdl2texi/address.inl b/doc/tools/pdl2texi/address.inl new file mode 100644 index 0000000000..fda92a9371 --- /dev/null +++ b/doc/tools/pdl2texi/address.inl @@ -0,0 +1,104 @@ +/* + * This include file contains the bodies of the routines + * about addresses which are inlined. + * + * COPYRIGHT (c) 1997. + * On-Line Applications Research Corporation (OAR). + * All rights reserved. + * + * $Id$ + */ + +#ifndef __INLINE_ADDRESSES_inl +#define __INLINE_ADDRESSES_inl + +/*PAGE + * + * _Addresses_Add_offset + * + */ + +STATIC INLINE void *_Addresses_Add_offset ( + void *base, + unsigned32 offset +) +{ + return (base + offset); +} + +/*PAGE + * + * _Addresses_Subtract_offset + * + */ + +STATIC INLINE void *_Addresses_Subtract_offset ( + void *base, + unsigned32 offset +) +{ + return (base - offset); +} + +/*PAGE + * + * _Addresses_Add + * + * NOTE: The cast of an address to an unsigned32 makes this code + * dependent on an addresses being thirty two bits. + */ + +STATIC INLINE void *_Addresses_Add ( + void *left, + void *right +) +{ + return (left + (unsigned32)right); +} + +/*PAGE + * + * _Addresses_Subtract + * + * NOTE: The cast of an address to an unsigned32 makes this code + * dependent on an addresses being thirty two bits. + */ + +STATIC INLINE unsigned32 _Addresses_Subtract ( + void *left, + void *right +) +{ + return (left - right); +} + +/*PAGE + * + * _Addresses_Is_aligned + * + */ + +STATIC INLINE boolean _Addresses_Is_aligned ( + void *address +) +{ + return ( ( (unsigned32)address % 4 ) == 0 ); +} + +/*PAGE + * + * _Addresses_Is_aligned + * + */ + +STATIC INLINE boolean _Addresses_Is_in_range ( + void *address, + void *base, + void *limit +) +{ + return ( address >= base && address <= limit ); +} + +#endif +/* end of include file */ diff --git a/doc/tools/pdl2texi/chain.c b/doc/tools/pdl2texi/chain.c new file mode 100644 index 0000000000..10c96308e9 --- /dev/null +++ b/doc/tools/pdl2texi/chain.c @@ -0,0 +1,229 @@ +/* + * Chain Handler + * + * COPYRIGHT (c) 1997. + * On-Line Applications Research Corporation (OAR). + * All rights reserved. + * + * $Id$ + */ + +#include "system.h" +#include "address.h" +#include "chain.h" +#include "isr.h" + +/*PAGE + * + * _Chain_Initialize + * + * This kernel routine initializes a doubly linked chain. + * + * Input parameters: + * the_chain - pointer to chain header + * starting_address - starting address of first node + * number_nodes - number of nodes in chain + * node_size - size of node in bytes + * + * Output parameters: NONE + */ + +void _Chain_Initialize( + Chain_Control *the_chain, + void *starting_address, + unsigned32 number_nodes, + unsigned32 node_size +) +{ + unsigned32 count; + Chain_Node *current; + Chain_Node *next; + + count = number_nodes; + current = _Chain_Head( the_chain ); + the_chain->permanent_null = NULL; + next = (Chain_Node *)starting_address; + while ( count-- ) { + current->next = next; + next->previous = current; + current = next; + next = (Chain_Node *) + _Addresses_Add_offset( (void *) next, node_size ); + } + current->next = _Chain_Tail( the_chain ); + the_chain->last = current; +} + +/*PAGE + * + * _Chain_Get_first_unprotected + */ + +#ifndef USE_INLINES +STATIC INLINE Chain_Node *_Chain_Get_first_unprotected( + Chain_Control *the_chain +) +{ + Chain_Node *return_node; + Chain_Node *new_first; + + return_node = the_chain->first; + new_first = return_node->next; + the_chain->first = new_first; + new_first->previous = _Chain_Head( the_chain ); + + return return_node; +} +#endif /* USE_INLINES */ + +/*PAGE + * + * _Chain_Get + * + * This kernel routine returns a pointer to a node taken from the + * given chain. + * + * Input parameters: + * the_chain - pointer to chain header + * + * Output parameters: + * return_node - pointer to node in chain allocated + * CHAIN_END - if no nodes available + * + * INTERRUPT LATENCY: + * only case + */ + +Chain_Node *_Chain_Get( + Chain_Control *the_chain +) +{ + ISR_Level level; + Chain_Node *return_node; + + return_node = NULL; + _ISR_Disable( level ); + if ( !_Chain_Is_empty( the_chain ) ) + return_node = _Chain_Get_first_unprotected( the_chain ); + _ISR_Enable( level ); + return return_node; +} + +/*PAGE + * + * _Chain_Append + * + * This kernel routine puts a node on the end of the specified chain. + * + * Input parameters: + * the_chain - pointer to chain header + * node - address of node to put at rear of chain + * + * Output parameters: NONE + * + * INTERRUPT LATENCY: + * only case + */ + +void _Chain_Append( + Chain_Control *the_chain, + Chain_Node *node +) +{ + ISR_Level level; + + _ISR_Disable( level ); + _Chain_Append_unprotected( the_chain, node ); + _ISR_Enable( level ); +} + +/*PAGE + * + * _Chain_Extract + * + * This kernel routine deletes the given node from a chain. + * + * Input parameters: + * node - pointer to node in chain to be deleted + * + * Output parameters: NONE + * + * INTERRUPT LATENCY: + * only case + */ + +void _Chain_Extract( + Chain_Node *node +) +{ + ISR_Level level; + + _ISR_Disable( level ); + _Chain_Extract_unprotected( node ); + _ISR_Enable( level ); +} + +/*PAGE + * + * _Chain_Insert + * + * This kernel routine inserts a given node after a specified node + * a requested chain. + * + * Input parameters: + * after_node - pointer to node in chain to be inserted after + * node - pointer to node to be inserted + * + * Output parameters: NONE + * + * INTERRUPT LATENCY: + * only case + */ + +void _Chain_Insert( + Chain_Node *after_node, + Chain_Node *node +) +{ + ISR_Level level; + + _ISR_Disable( level ); + _Chain_Insert_unprotected( after_node, node ); + _ISR_Enable( level ); +} + +/*PAGE + * + * _Chain_Insert_chain + * + * This routine inserts a chain after the specified node in another + * chain. It is assumed that the insert after node is not on the + * second chain. + * + * Input parameters: + * insert_after - insert the chain after this node + * to_insert - the chain to insert + */ + +void _Chain_Insert_chain( + Chain_Node *insert_after, + Chain_Control *to_insert +) +{ + Chain_Node *first; + Chain_Node *last; + Chain_Node *insert_after_next; + + first = to_insert->first; + last = to_insert->last; + + insert_after_next = insert_after->next; + + insert_after->next = first; + first->previous = insert_after; + + insert_after_next->previous = last; + last->next = insert_after_next; + + _Chain_Initialize_empty( to_insert ); +} diff --git a/doc/tools/pdl2texi/chain.h b/doc/tools/pdl2texi/chain.h new file mode 100644 index 0000000000..e9221aec60 --- /dev/null +++ b/doc/tools/pdl2texi/chain.h @@ -0,0 +1,347 @@ +/* chain.h + * + * This include file contains all the constants and structures associated + * with the Doubly Linked Chain Handler. + * + * COPYRIGHT (c) 1997. + * On-Line Applications Research Corporation (OAR). + * All rights reserved. + * + * $Id$ + */ + +#ifndef __CHAIN_h +#define __CHAIN_h + +#include "address.h" + +/* + * This is used to manage each element (node) which is placed + * on a chain. + * + * NOTE: Typically, a more complicated structure will use the + * chain package. The more complicated structure will + * include a chain node as the first element in its + * control structure. It will then call the chain package + * with a pointer to that node element. The node pointer + * and the higher level structure start at the same address + * so the user can cast the pointers back and forth. + */ + +typedef struct Chain_Node_struct Chain_Node; + +struct Chain_Node_struct { + Chain_Node *next; + Chain_Node *previous; +}; + +/* + * This is used to manage a chain. A chain consists of a doubly + * linked list of zero or more nodes. + * + * NOTE: This implementation does not require special checks for + * manipulating the first and last elements on the chain. + * To accomplish this the chain control structure is + * treated as two overlapping chain nodes. The permanent + * head of the chain overlays a node structure on the + * first and permanent_null fields. The permanent tail + * of the chain overlays a node structure on the + * permanent_null and last elements of the structure. + */ + +typedef struct { + Chain_Node *first; + Chain_Node *permanent_null; + Chain_Node *last; +} Chain_Control; + +/* + * _Chain_Initialize + * + * This routine initializes the_chain structure to manage the + * contiguous array of number_nodes nodes which starts at + * starting_address. Each node is of node_size bytes. + */ + +void _Chain_Initialize( + Chain_Control *the_chain, + void *starting_address, + unsigned32 number_nodes, + unsigned32 node_size +); + +/* + * _Chain_Initialize_empty + * + * This routine initializes the specified chain to contain zero nodes. + */ + +STATIC INLINE void _Chain_Initialize_empty( + Chain_Control *the_chain +); + +/* + * _Chain_Extract_unprotected + * + * This routine extracts the_node from the chain on which it resides. + * It does NOT disable interrupts to insure the atomicity of the + * extract operation. + */ + +STATIC INLINE void _Chain_Extract_unprotected( + Chain_Node *the_node +); + +/* + * _Chain_Extract + * + * This routine extracts the_node from the chain on which it resides. + * It disables interrupts to insure the atomicity of the + * extract operation. + */ + +void _Chain_Extract( + Chain_Node *the_node +); + +/* + * _Chain_Get_unprotected + * + * This function removes the first node from the_chain and returns + * a pointer to that node. If the_chain is empty, then NULL is returned. + * It does NOT disable interrupts to insure the atomicity of the + * get operation. + */ + +STATIC INLINE Chain_Node *_Chain_Get_unprotected( + Chain_Control *the_chain +); + +/* + * _Chain_Get + * + * This function removes the first node from the_chain and returns + * a pointer to that node. If the_chain is empty, then NULL is returned. + * It disables interrupts to insure the atomicity of the + * get operation. + */ + +Chain_Node *_Chain_Get( + Chain_Control *the_chain +); + +/* + * _Chain_Get_first_unprotected + * + * This function removes the first node from the_chain and returns + * a pointer to that node. It does NOT disable interrupts to insure + * the atomicity of the get operation. + */ + +STATIC INLINE Chain_Node *_Chain_Get_first_unprotected( + Chain_Control *the_chain +); + +/* + * _Chain_Insert_unprotected + * + * This routine inserts the_node on a chain immediately following + * after_node. It does NOT disable interrupts to insure the atomicity + * of the extract operation. + */ + +STATIC INLINE void _Chain_Insert_unprotected( + Chain_Node *after_node, + Chain_Node *the_node +); + +/* + * _Chain_Insert + * + * This routine inserts the_node on a chain immediately following + * after_node. It disables interrupts to insure the atomicity + * of the extract operation. + */ + +void _Chain_Insert( + Chain_Node *after_node, + Chain_Node *the_node +); + +/* + * _Chain_Append_unprotected + * + * This routine appends the_node onto the end of the_chain. + * It does NOT disable interrupts to insure the atomicity of the + * append operation. + */ + +STATIC INLINE void _Chain_Append_unprotected( + Chain_Control *the_chain, + Chain_Node *the_node +); + +/* + * _Chain_Append + * + * This routine appends the_node onto the end of the_chain. + * It disables interrupts to insure the atomicity of the + * append operation. + */ + +void _Chain_Append( + Chain_Control *the_chain, + Chain_Node *the_node +); + +/* + * _Chain_Prepend_unprotected + * + * This routine prepends the_node onto the front of the_chain. + * It does NOT disable interrupts to insure the atomicity of the + * prepend operation. + */ + +STATIC INLINE void _Chain_Prepend_unprotected( + Chain_Control *the_chain, + Chain_Node *the_node +); + +/* + * _Chain_Prepend + * + * This routine prepends the_node onto the front of the_chain. + * It disables interrupts to insure the atomicity of the + * prepend operation. + */ + +STATIC INLINE void _Chain_Prepend( + Chain_Control *the_chain, + Chain_Node *the_node +); + +/* + * _Chain_Insert_chain + * + * This routine inserts a chain after the specified node in another + * chain. It is assumed that the insert after node is not on the + * second chain. + */ + +void _Chain_Insert_chain( + Chain_Node *insert_after, + Chain_Control *to_insert +); + +/* + * _Chain_Head + * + * This function returns a pointer to the first node on the chain. + */ + +STATIC INLINE Chain_Node *_Chain_Head( + Chain_Control *the_chain +); + +/* + * _Chain_Tail + * + * This function returns a pointer to the last node on the chain. + */ + +STATIC INLINE Chain_Node *_Chain_Tail( + Chain_Control *the_chain +); + +/* + * _Chain_Is_head + * + * This function returns TRUE if the_node is the head of the_chain and + * FALSE otherwise. + */ + +STATIC INLINE boolean _Chain_Is_head( + Chain_Control *the_chain, + Chain_Node *the_node +); + +/* + * _Chain_Is_tail + * + * This function returns TRUE if the_node is the tail of the_chain and + * FALSE otherwise. + */ + +STATIC INLINE boolean _Chain_Is_tail( + Chain_Control *the_chain, + Chain_Node *the_node +); + +/* + * _Chain_Is_first + * + * This function returns TRUE if the_node is the first node on a chain and + * FALSE otherwise. + */ + +STATIC INLINE boolean _Chain_Is_first( + Chain_Node *the_node +); + +/* + * _Chain_Is_last + * + * This function returns TRUE if the_node is the last node on a chain and + * FALSE otherwise. + */ + +STATIC INLINE boolean _Chain_Is_last( + Chain_Node *the_node +); + +/* + * _Chain_Is_empty + * + * This function returns TRUE if there a no nodes on the_chain and + * FALSE otherwise. + */ + +STATIC INLINE boolean _Chain_Is_empty( + Chain_Control *the_chain +); + +/* + * _Chain_Has_only_one_node + * + * This function returns TRUE if there is only one node on the_chain and + * FALSE otherwise. + */ + +STATIC INLINE boolean _Chain_Has_only_one_node( + Chain_Control *the_chain +); + +/* + * _Chain_Is_null + * + * This function returns TRUE if the_chain is NULL and FALSE otherwise. + */ + +STATIC INLINE boolean _Chain_Is_null( + Chain_Control *the_chain +); + +/* + * _Chain_Is_null_node + * + * This function returns TRUE if the_node is NULL and FALSE otherwise. + */ + +STATIC INLINE boolean _Chain_Is_null_node( + Chain_Node *the_node +); + +#include "chain.inl" + +#endif +/* end of include file */ diff --git a/doc/tools/pdl2texi/chain.inl b/doc/tools/pdl2texi/chain.inl new file mode 100644 index 0000000000..7393fee7b8 --- /dev/null +++ b/doc/tools/pdl2texi/chain.inl @@ -0,0 +1,270 @@ +/* + * This include file contains the bodies of the routines which are + * associated with doubly linked chains and inlined. + * + * COPYRIGHT (c) 1997. + * On-Line Applications Research Corporation (OAR). + * All rights reserved. + * + * $Id$ + */ + +#ifndef __INLINE_CHAIN_inl +#define __INLINE_CHAIN_inl + +/*PAGE + * + * _Chain_Is_null + */ + +STATIC INLINE boolean _Chain_Is_null( + Chain_Control *the_chain +) +{ + return ( the_chain == NULL ); +} + +/*PAGE + * + * _Chain_Is_null_node + */ + +STATIC INLINE boolean _Chain_Is_null_node( + Chain_Node *the_node +) +{ + return ( the_node == NULL ); +} + +/*PAGE + * + * _Chain_Head + */ + +STATIC INLINE Chain_Node *_Chain_Head( + Chain_Control *the_chain +) +{ + return (Chain_Node *) the_chain; +} + +/*PAGE + * + * _Chain_Tail + */ + +STATIC INLINE Chain_Node *_Chain_Tail( + Chain_Control *the_chain +) +{ + return (Chain_Node *) &the_chain->permanent_null; +} + +/*PAGE + * + * _Chain_Is_empty + */ + +STATIC INLINE boolean _Chain_Is_empty( + Chain_Control *the_chain +) +{ + return ( the_chain->first == _Chain_Tail( the_chain ) ); +} + +/*PAGE + * + * _Chain_Is_first + */ + +STATIC INLINE boolean _Chain_Is_first( + Chain_Node *the_node +) +{ + return ( the_node->previous == NULL ); +} + +/*PAGE + * + * _Chain_Is_last + */ + +STATIC INLINE boolean _Chain_Is_last( + Chain_Node *the_node +) +{ + return ( the_node->next == NULL ); +} + +/*PAGE + * + * _Chain_Has_only_one_node + */ + +STATIC INLINE boolean _Chain_Has_only_one_node( + Chain_Control *the_chain +) +{ + return ( the_chain->first == the_chain->last ); +} + +/*PAGE + * + * _Chain_Is_head + */ + +STATIC INLINE boolean _Chain_Is_head( + Chain_Control *the_chain, + Chain_Node *the_node +) +{ + return ( the_node == _Chain_Head( the_chain ) ); +} + +/*PAGE + * + * _Chain_Is_tail + */ + +STATIC INLINE boolean _Chain_Is_tail( + Chain_Control *the_chain, + Chain_Node *the_node +) +{ + return ( the_node == _Chain_Tail( the_chain ) ); +} + +/*PAGE + * + * Chain_Initialize_empty + */ + +STATIC INLINE void _Chain_Initialize_empty( + Chain_Control *the_chain +) +{ + the_chain->first = _Chain_Tail( the_chain ); + the_chain->permanent_null = NULL; + the_chain->last = _Chain_Head( the_chain ); +} + +/*PAGE + * + * _Chain_Extract_unprotected + */ + +STATIC INLINE void _Chain_Extract_unprotected( + Chain_Node *the_node +) +{ + Chain_Node *next; + Chain_Node *previous; + + next = the_node->next; + previous = the_node->previous; + next->previous = previous; + previous->next = next; +} + +/*PAGE + * + * _Chain_Get_first_unprotected + */ + +STATIC INLINE Chain_Node *_Chain_Get_first_unprotected( + Chain_Control *the_chain +) +{ + Chain_Node *return_node; + Chain_Node *new_first; + + return_node = the_chain->first; + new_first = return_node->next; + the_chain->first = new_first; + new_first->previous = _Chain_Head( the_chain ); + + return return_node; +} + +/*PAGE + * + * Chain_Get_unprotected + */ + +STATIC INLINE Chain_Node *_Chain_Get_unprotected( + Chain_Control *the_chain +) +{ + if ( !_Chain_Is_empty( the_chain ) ) + return _Chain_Get_first_unprotected( the_chain ); + else + return NULL; +} + +/*PAGE + * + * _Chain_Insert_unprotected + */ + +STATIC INLINE void _Chain_Insert_unprotected( + Chain_Node *after_node, + Chain_Node *the_node +) +{ + Chain_Node *before_node; + + the_node->previous = after_node; + before_node = after_node->next; + after_node->next = the_node; + the_node->next = before_node; + before_node->previous = the_node; +} + +/*PAGE + * + * _Chain_Append_unprotected + */ + +STATIC INLINE void _Chain_Append_unprotected( + Chain_Control *the_chain, + Chain_Node *the_node +) +{ + Chain_Node *old_last_node; + + the_node->next = _Chain_Tail( the_chain ); + old_last_node = the_chain->last; + the_chain->last = the_node; + old_last_node->next = the_node; + the_node->previous = old_last_node; +} + +/*PAGE + * + * _Chain_Prepend_unprotected + */ + +STATIC INLINE void _Chain_Prepend_unprotected( + Chain_Control *the_chain, + Chain_Node *the_node +) +{ + _Chain_Insert_unprotected( _Chain_Head( the_chain ), the_node ); + +} + +/*PAGE + * + * _Chain_Prepend + */ + +STATIC INLINE void _Chain_Prepend( + Chain_Control *the_chain, + Chain_Node *the_node +) +{ + _Chain_Insert( _Chain_Head( the_chain ), the_node ); +} + +#endif +/* end of include file */ diff --git a/doc/tools/pdl2texi/isr.h b/doc/tools/pdl2texi/isr.h new file mode 100644 index 0000000000..b9a78fabbc --- /dev/null +++ b/doc/tools/pdl2texi/isr.h @@ -0,0 +1,18 @@ +/* + * COPYRIGHT (c) 1997. + * On-Line Applications Research Corporation (OAR). + * All rights reserved. + * + * $Id$ + */ + + +#ifndef __ISR_h +#define __ISR_h + +typedef unsigned32 ISR_Level; + +#define _ISR_Disable +#define _ISR_Enable + +#endif diff --git a/doc/tools/pdl2texi/s.d b/doc/tools/pdl2texi/s.d new file mode 100644 index 0000000000..a434bf4523 --- /dev/null +++ b/doc/tools/pdl2texi/s.d @@ -0,0 +1,129 @@ + +OBJECT: Object_name + DESCRIPTION: + This object ... + (briefly describe the object's primary responsibility or purpose) + COPYRIGHT: + Copyright (c) 1995, On-Line Applications Research Corporation (OAR) + PORTING: + THEORY OF OPERATION: + DERIVATION: + DEPENDENCIES: + NOTES: + +ATTRIBUTE DESCRIPTIONS: + +ATTRIBUTE: An_attribute + DESCRIPTION: + This attribute ... + (briefly describe the attribute's primary purpose) + TYPE: float [constant]|integer [constant] + (indicate one of the above) + RANGE|MEMBERS: 0 - +INFINITY or MEMBER1, MEMBER2, MEMBER3 + (indicate RANGE or MEMBERS and specify, MEMBERS should be listed + in all caps, RANGE can use +/-INFINITY) + UNITS: + SCALE FACTOR: + DEFAULTS: + TOLERANCE: + REQUIREMENTS: + ABCD 3.2.4 A paragraph title + (indicate document, paragraph number, paragraph title) + REFERENCES: + NOTES: + +ASSOCIATION DESCRIPTIONS: + +ASSOCIATION: + DESCRIPTION: + VISIBILTY: + ASSOCIATED WITH: + MULTIPLICITY: + REQUIREMENTS: + ABCD 3.2.4 A paragraph title + (indicate document, paragraph number, paragraph title) + REFERENCES: + NOTES: + +ABSTRACT TYPE DESCRIPTIONS: + +ABSTRACT TYPE: + DESCRIPTION: + This type ... + (briefly describe the type's primary purpose) + VISIBILITY: private|public + (indicate one of the above) + DERIVATION: + MEMBERS|RANGE: 0 - +INFINITY or MEMBER1, MEMBER2, MEMBER3 + (indicate RANGE or MEMBERS and specify, MEMBERS should be listed + in all caps, RANGE can use +/-INFINITY) + UNITS: + SCALE FACTOR: + DEFAULTS: + TOLERANCE: + REQUIREMENTS: + ABCD 3.2.4 A paragraph title + (indicate document, paragraph number, paragraph title) + REFERENCES: + NOTES: + +DATA ITEM DESCRIPTIONS: + +DATA ITEM: + DESCRIPTION: + This data item ... + (briefly describe the data item's primary purpose) + TYPE: + UNITS: + SCALE FACTOR: + DEFAULTS: + TOLERANCE: + NOTES: + +METHODS DESCRIPTIONS: + (List methods alphabetically grouping public methods followed + by private methods.) + +METHOD: Some_method + DESCRIPTION: + This method ... + (briefly describe the method's primary responsibility) + VISIBILITY: private|public + (indicate one of the above) + INPUTS: + input_one - the first and only input + (specify the logical inputs followed by a description, + indicate 'none' if there are no inputs) + OUTPUTS: + output_one - the first and only output + (specify the logical outputs followed by a description, + indicate 'none' if there are no outputs, use 'result' if the + method is a boolean function) + REQUIREMENTS: + ABCD 3.2.4 A paragraph title + (indicate document, paragraph number, paragraph title) + REFERENCES: + NOTES: + PDL: + +TASK DESCRIPTIONS: + +TASK: + DESCRIPTION: + This task ... + (briefly describe the task's primary responsibility) + INPUTS: + SYNCHRONIZATION: delay|event|message|semaphore|signal|period + (indicate one or more of the above and list any events, + messages, or signals that can be received) + TIMING: + (specify any timing information that is related to the + synchronization specified above) + REQUIREMENTS: + ABCD 3.2.4 A paragraph title + (indicate document, paragraph number, paragraph title) + REFERENCES: + NOTES: + PDL: + +ENDOBJECT: Object_name diff --git a/doc/tools/pdl2texi/sample.d b/doc/tools/pdl2texi/sample.d new file mode 100644 index 0000000000..c381cb3de2 --- /dev/null +++ b/doc/tools/pdl2texi/sample.d @@ -0,0 +1,136 @@ +(All fields marked with an '*' are optional and can be deleted if + there is no applicable information. + All entity names (OBJECT, ATTRIBUTE, METHOD, etc.) are proper nouns + and thus should only have the first letter capitalized.) + +OBJECT: Object_name + DESCRIPTION: + This object ... + (briefly describe the object's primary responsibility or purpose) + *COPYRIGHT: + Copyright (c) 1995, On-Line Applications Research Corporation (OAR) + *PORTING: + THEORY OF OPERATION: + *DERIVATION: + *DEPENDENCIES: + *NOTES: + +ATTRIBUTE DESCRIPTIONS: + +ATTRIBUTE: An_attribute + DESCRIPTION: + This attribute ... + (briefly describe the attribute's primary purpose) + TYPE: float [constant]|integer [constant] + (indicate one of the above) + MEMBERS|RANGE: 0 - +INFINITY or MEMBER1, MEMBER2, MEMBER3 + (indicate RANGE or MEMBERS and specify, MEMBERS should be listed + in all caps, RANGE can use +/-INFINITY) + *UNITS: + *SCALE FACTOR: + *DEFAULTS: + *TOLERANCE: + *REQUIREMENTS: + ABCD 3.2.4 A paragraph title + (indicate document, paragraph number, paragraph title) + *REFERENCES: + *NOTES: + +ASSOCIATION DESCRIPTIONS: + +ASSOCIATION: name + DESCRIPTION: + This association ... + (briefly describe the association's primary purpose) + VISIBILITY: private|public + (indicate one of the above) + ASSOCIATED WITH: object_name + MULTIPLICITY: + *REQUIREMENTS: + ABCD 3.2.4 A paragraph title + (indicate document, paragraph number, paragraph title) + *REFERENCES: + *NOTES: + +ABSTRACT TYPE DESCRIPTIONS: + +ABSTRACT TYPE: name + DESCRIPTION: + This type ... + (briefly describe the type's primary purpose) + VISIBILITY: private|public + (indicate one of the above) + DERIVATION: + MEMBERS|RANGE: 0 - +INFINITY or MEMBER1, MEMBER2, MEMBER3 + (indicate RANGE or MEMBERS and specify, MEMBERS should be listed + in all caps, RANGE can use +/-INFINITY) + *UNITS: + *SCALE FACTOR: + *DEFAULTS: + *TOLERANCE: + *REQUIREMENTS: + ABCD 3.2.4 A paragraph title + (indicate document, paragraph number, paragraph title) + *REFERENCES: + *NOTES: + +DATA ITEM DESCRIPTIONS: + +DATA ITEM: name + DESCRIPTION: + This data item ... + (briefly describe the data item's primary purpose) + TYPE: + *UNITS: + *SCALE FACTOR: + *DEFAULTS: + *TOLERANCE: + *NOTES: + +METHOD DESCRIPTIONS: + (List methods alphabetically grouping public methods followed + by private methods.) + +METHOD: Some_method + DESCRIPTION: + This method ... + (briefly describe the method's primary responsibility) + VISIBILITY: private|public + (indicate one of the above) + INPUTS: + input_one - the first and only input + (specify the logical inputs followed by a description, + indicate 'none' if there are no inputs) + OUTPUTS: + output_one - the first and only output + (specify the logical outputs followed by a description, + indicate 'none' if there are no outputs, use 'result' if the + method is a boolean function) + *REQUIREMENTS: + ABCD 3.2.4 A paragraph title + (indicate document, paragraph number, paragraph title) + *REFERENCES: + *NOTES: + PDL: + +TASK DESCRIPTIONS: + +TASK: name + DESCRIPTION: + This task ... + (briefly describe the task's primary responsibility) + INPUTS: + SYNCHRONIZATION: delay|event|message|semaphore|signal|period + (indicate one or more of the above and list any events, + messages, or signals that can be received) + TIMING: + (specify any timing information that is related to the + synchronization specified above) + *REQUIREMENTS: + ABCD 3.2.4 A paragraph title + (indicate document, paragraph number, paragraph title) + *REFERENCES: + *NOTES: + PDL: + +ENDOBJECT: Object_name diff --git a/doc/tools/pdl2texi/system.h b/doc/tools/pdl2texi/system.h new file mode 100644 index 0000000000..173e48ce04 --- /dev/null +++ b/doc/tools/pdl2texi/system.h @@ -0,0 +1,36 @@ +/* + * COPYRIGHT (c) 1997. + * On-Line Applications Research Corporation (OAR). + * All rights reserved. + * + * $Id$ + */ + +#ifndef __SYSTEM_h +#define __SYSTEM_h + +typedef unsigned int unsigned32; +typedef unsigned short unsigned16; +typedef unsigned char unsigned8; + +#define USE_INLINES +#define STATIC static +#define INLINE inline + +#ifndef NULL +#define NULL 0 +#endif + +typedef unsigned int boolean; + +#if !defined( TRUE ) || (TRUE != 1) +#undef TRUE +#define TRUE (1) +#endif + +#if !defined( FALSE ) || (FALSE != 0) +#undef FALSE +#define FALSE 0 +#endif + +#endif -- cgit v1.2.3