summaryrefslogtreecommitdiff
path: root/doc/tools
diff options
context:
space:
mode:
Diffstat (limited to 'doc/tools')
-rw-r--r--doc/tools/bmenu/Makefile45
-rw-r--r--doc/tools/bmenu/address.h110
-rw-r--r--doc/tools/bmenu/address.inl105
-rw-r--r--doc/tools/bmenu/base.h113
-rw-r--r--doc/tools/bmenu/chain.c229
-rw-r--r--doc/tools/bmenu/chain.h347
-rw-r--r--doc/tools/bmenu/chain.inl271
-rw-r--r--doc/tools/bmenu/isr.h18
-rw-r--r--doc/tools/bmenu/main.c1048
-rw-r--r--doc/tools/bmenu/system.h36
-rw-r--r--doc/tools/bmenu/testdoc.texi690
-rw-r--r--doc/tools/pdl2texi/Drive.d890
-rw-r--r--doc/tools/pdl2texi/Makefile83
-rw-r--r--doc/tools/pdl2texi/address.h110
-rw-r--r--doc/tools/pdl2texi/address.inl104
-rw-r--r--doc/tools/pdl2texi/afcc.texi94
-rw-r--r--doc/tools/pdl2texi/base.h119
-rw-r--r--doc/tools/pdl2texi/chain.c229
-rw-r--r--doc/tools/pdl2texi/chain.h347
-rw-r--r--doc/tools/pdl2texi/chain.inl270
-rw-r--r--doc/tools/pdl2texi/drive.d874
-rw-r--r--doc/tools/pdl2texi/isr.h18
-rw-r--r--doc/tools/pdl2texi/main.c3615
-rw-r--r--doc/tools/pdl2texi/s.d129
-rw-r--r--doc/tools/pdl2texi/sample.d136
-rw-r--r--doc/tools/pdl2texi/system.h36
-rw-r--r--doc/tools/pdl2texi/t1.d52
-rw-r--r--doc/tools/pdl2texi/test_cases/avdas.d260
-rw-r--r--doc/tools/pdl2texi/test_cases/enum.d44
-rw-r--r--doc/tools/pdl2texi/test_cases/enumbad.d48
-rw-r--r--doc/tools/pdl2texi/test_cases/table.d27
-rw-r--r--doc/tools/src2html/Makefile38
-rw-r--r--doc/tools/src2html1.4a/Ctags/C.c444
-rw-r--r--doc/tools/src2html1.4a/Ctags/Makefile15
-rw-r--r--doc/tools/src2html1.4a/Ctags/ctags.1225
-rw-r--r--doc/tools/src2html1.4a/Ctags/ctags.c265
-rw-r--r--doc/tools/src2html1.4a/Ctags/ctags.h81
-rw-r--r--doc/tools/src2html1.4a/Ctags/fortran.c155
-rw-r--r--doc/tools/src2html1.4a/Ctags/lisp.c97
-rw-r--r--doc/tools/src2html1.4a/Ctags/print.c130
-rw-r--r--doc/tools/src2html1.4a/Ctags/strerror.c6
-rw-r--r--doc/tools/src2html1.4a/Ctags/tree.c138
-rw-r--r--doc/tools/src2html1.4a/Ctags/yacc.c144
-rw-r--r--doc/tools/src2html1.4a/Ctags/z.c20
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/FreeBSD.hdr25
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/FreeBSD.s2h68
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/conf.hdr9
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/ddb.hdr6
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/i386.i386.hdr5
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/i386.include.hdr5
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/i386.isa.hdr10
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/i386.stand.hdr14
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/kern.hdr18
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/net.hdr11
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/netinet.hdr10
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/nfs.hdr7
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/stand.hdr14
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/sys.hdr6
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/ufs.hdr10
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/vm.hdr9
-rw-r--r--doc/tools/src2html1.4a/Readme65
-rw-r--r--doc/tools/src2html1.4a/ctags-emacs/README20
-rw-r--r--doc/tools/src2html1.4a/ctags-emacs/ctagsbin145997 -> 0 bytes
-rw-r--r--doc/tools/src2html1.4a/ctags-emacs/etags.c-ada-patch424
-rw-r--r--doc/tools/src2html1.4a/ctags-wr41
-rw-r--r--doc/tools/src2html1.4a/src2html704
-rw-r--r--doc/tools/src2html1.4a/src2html.1244
-rw-r--r--doc/tools/src2html1.4a/src2html.cgi100
-rw-r--r--doc/tools/texi2www/Makefile45
-rw-r--r--doc/tools/texi2www/archive/texi2www-960103.tgzbin131143 -> 0 bytes
-rw-r--r--doc/tools/texi2www/dir-arrow.gifbin2609 -> 0 bytes
-rw-r--r--doc/tools/texi2www/missing-arrow.gifbin166 -> 0 bytes
-rw-r--r--doc/tools/texi2www/next-arrow.gifbin275 -> 0 bytes
-rw-r--r--doc/tools/texi2www/prev-arrow.gifbin279 -> 0 bytes
-rw-r--r--doc/tools/texi2www/texi2dvi218
-rwxr-xr-xdoc/tools/texi2www/texi2www1276
-rw-r--r--doc/tools/texi2www/texi2www.texi707
-rw-r--r--doc/tools/texi2www/up-arrow.gifbin264 -> 0 bytes
-rw-r--r--doc/tools/update221
-rwxr-xr-xdoc/tools/word-replace89
80 files changed, 0 insertions, 16636 deletions
diff --git a/doc/tools/bmenu/Makefile b/doc/tools/bmenu/Makefile
deleted file mode 100644
index 2a3d20ac3e..0000000000
--- a/doc/tools/bmenu/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1998.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-CC=gcc
-#CFLAGS=-O4 -fomit-frame-pointer
-CFLAGS=-g
-
-#TEXINPUTS=/home/gnu/work/binutils-2.6/texinfo:.
-PROG=bmenu
-
-all: $(PROG)
-
-$(BASE).txt: $(BASE).d ./$(PROG)
- ./$(PROG) $(BASE).d
-
-$(PROG): main.o chain.o
- gcc main.o chain.o -o $(PROG)
-
-main.o: main.c base.h
-
-chain.o: chain.c
-
-info: c_user.texinfo timer.texi
- makeinfo c_user.texinfo
-
-TESTER=init
-test: all
- #rm -f timer.txt
- #./bmenu -v timer.texi
- #cp ../user/$(TESTER).texi .
- ./bmenu -u "DOCS UP" -p "DOCS PREV" -n "DOCS NEXT" -v testdoc.txt
- #mv $(TESTER).txt $(TESTER).texi
- #makeinfo c_user.texinfo
-
-
-clean:
- rm -f *.o $(PROG) *.txt core *.html
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f c_user c_user-* _*
-
diff --git a/doc/tools/bmenu/address.h b/doc/tools/bmenu/address.h
deleted file mode 100644
index f4cd38b255..0000000000
--- a/doc/tools/bmenu/address.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* address.h
- *
- * This include file contains the information required to manipulate
- * physical addresses.
- *
- * COPYRIGHT (c) 1988-1998.
- * 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/bmenu/address.inl b/doc/tools/bmenu/address.inl
deleted file mode 100644
index ddb1f76264..0000000000
--- a/doc/tools/bmenu/address.inl
+++ /dev/null
@@ -1,105 +0,0 @@
-/* inline/address.inl
- *
- * This include file contains the bodies of the routines
- * about addresses which are inlined.
- *
- * COPYRIGHT (c) 1988-1998.
- * 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/bmenu/base.h b/doc/tools/bmenu/base.h
deleted file mode 100644
index f7c3999b69..0000000000
--- a/doc/tools/bmenu/base.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * COPYRIGHT (c) 1988-1998.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#ifndef __PDL2AMI_h
-#define __PDL2AMI_h
-
-#include "system.h"
-#include "chain.h"
-
-#ifndef EXTERN
-#define EXTERN extern
-#endif
-
-/*
- * Paragraph size should be kept down because it is allocated for each
- * Line_Control. If this number is large, the memory requirements for
- * the program increase significantly.
- */
-
-#define BUFFER_SIZE (2 * 1024)
-#define PARAGRAPH_SIZE (2 * 1024)
-
-#define NUMBER_ELEMENTS( _x ) (sizeof(_x) / sizeof _x[0])
-
-void exit_application(
- int status
-);
-
-void ProcessFile(
- char *inname,
- char *outname
-);
-
-void strtolower(
- char *dest,
- char *src
-);
-
-void strtoInitialCaps(
- char *dest,
- char *src
-);
-
-void StripBlanks( void );
-
-void MergeParagraphs( void );
-
-int CheckForIncomplete( void );
-
-int CheckOutline( void );
-
-int CheckSections( void );
-
-void GenerateLists( void );
-
-void GenerateAList(
- char *section,
- Chain_Control *the_list
-);
-
-void LookForInternalInconsistencies( void );
-
-int Match_Argument(
- char **array,
- int entries,
- char *users
-);
-
-void usage( void );
-
-void ReadFileIntoChain(
- char *inname
-);
-
-int MergeText( void );
-
-int CheckForBadWhiteSpace();
-
-void RemoveCopyright();
-
-void RemovePagebreaks();
-
-int RemoveExtraBlankLines();
-
-void FormatToTexinfo( void );
-
-void PrintFile(
- char *out
-);
-
-void DumpList(
- Chain_Control *the_list
-);
-
-void ReleaseFile();
-
-EXTERN boolean Verbose; /* status/debug msgs */
-EXTERN boolean BlankAsWarnings;
-EXTERN Chain_Control Lines;
-
-EXTERN int NumberOfAttributes;
-EXTERN int NumberOfAssociations;
-EXTERN int NumberOfAbstractTypes;
-EXTERN int NumberOfDataItems;
-EXTERN int NumberOfMethods;
-EXTERN int NumberOfTasks;
-
-#endif
diff --git a/doc/tools/bmenu/chain.c b/doc/tools/bmenu/chain.c
deleted file mode 100644
index 8ddc6add81..0000000000
--- a/doc/tools/bmenu/chain.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Chain Handler
- *
- * COPYRIGHT (c) 1988-1998.
- * 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/bmenu/chain.h b/doc/tools/bmenu/chain.h
deleted file mode 100644
index b2c220516f..0000000000
--- a/doc/tools/bmenu/chain.h
+++ /dev/null
@@ -1,347 +0,0 @@
-/* chain.h
- *
- * This include file contains all the constants and structures associated
- * with the Doubly Linked Chain Handler.
- *
- * COPYRIGHT (c) 1988-1998.
- * 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/bmenu/chain.inl b/doc/tools/bmenu/chain.inl
deleted file mode 100644
index 4316f5e5b8..0000000000
--- a/doc/tools/bmenu/chain.inl
+++ /dev/null
@@ -1,271 +0,0 @@
-/* inline/chain.inl
- *
- * This include file contains the bodies of the routines which are
- * associated with doubly linked chains and inlined.
- *
- * COPYRIGHT (c) 1988-1998.
- * 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/bmenu/isr.h b/doc/tools/bmenu/isr.h
deleted file mode 100644
index 35a2e503cc..0000000000
--- a/doc/tools/bmenu/isr.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * COPYRIGHT (c) 1988-1998.
- * 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/bmenu/main.c b/doc/tools/bmenu/main.c
deleted file mode 100644
index e0a5dc6ebd..0000000000
--- a/doc/tools/bmenu/main.c
+++ /dev/null
@@ -1,1048 +0,0 @@
-/*
- * main.c
- *
- * This program takes a texinfo file without node and menu commands,
- * build those commands and inserts them.
- *
- * It works by reading the input file into a linked list of lines
- * and then performing sweeps on that list until all formatting is
- * complete. After the program is run, there is still a little
- * clean up to be performed by hand. The following have to be fixed
- * by hand:
- * + previous of the first node
- * + next of the last node
- *
- * COPYRIGHT (c) 1988-1998.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include <ctype.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* XXX -- just for testing -- these should be set by options */
-char TopString[] = "Top";
-char EmptyString[] = "";
-
-char *DocsNextNode;
-char *DocsPreviousNode;
-char *DocsUpNode;
-int NodeNameIncludesChapter = 1;
-
-extern int optind; /* Why is this not in <stdlib.h>? */
-extern char *optarg; /* Why is this not in <stdlib.h>? */
-
-#ifndef NAME_MAX
-#define NAME_MAX 14 /* Why is the one in limits.h not showing up? */
-#endif
-#define INIT_DATA
-#define EXTERN
-
-#include "base.h"
-
-FILE *OutFile = stdout;
-
-/*************************************************************************
- *************************************************************************
- ***** DATA TYPES AND CONSTANT TABLES *****
- *************************************************************************
- *************************************************************************/
-/*
- * Usage Information
- */
-
-char *Usage_Strings[] = {
- "\n",
- "usage: cmd [-cv] [-p prev] [-n next] [-u up] files ...\n",
- "\n",
- "EOF"
-};
-
-/*
- * The page separator is not really a keyword and will be purged before
- * it is seen elsewhere.
- */
-
-#define PAGE_SEPARATOR "#PAGE"
-
-/*
- * Section Delimiter Keywords
- */
-
-#define MAXIMUM_KEYWORD_LENGTH 32
-
-/*
- * Level indicates where in the format the delimiter is allowed to occur.
- * 1 indicates a major section divider (e.g. "ATTRIBUTE DESCRIPTIONS:").
- * 2 indicates a subsection (e.g. "ATTRIBUTE:").
- * 3 indicates a heading (e.g. "DESCRIPTION:").
- */
-
-#define TEXT 0
-#define SECTION 1
-#define SUBSECTION 2
-#define SUBSUBSECTION 3
-#define HEADING 4
-
-typedef enum {
- UNUSED, /* dummy 0 slot */
- KEYWORD_CHAPTER,
- KEYWORD_CHAPHEADING,
- KEYWORD_SECTION,
- KEYWORD_SUBSECTION,
- KEYWORD_SUBSUBSECTION,
- KEYWORD_RAISE,
- KEYWORD_LOWER,
- KEYWORD_OTHER,
- KEYWORD_END
-
-} Keyword_indices_t;
-
-#define KEYWORD_FIRST KEYOWRD_CHAPTER
-#define KEYWORD_LAST KEYWORD_END
-
-/*
- * Line Management Structure
- */
-
-typedef enum {
- NO_EXTRA_FORMATTING_INFO,
- RAW_OUTPUT,
- PARAGRAPH_OUTPUT
-} ExtraFormat_info_t;
-
-typedef struct {
- Chain_Node Node;
- Keyword_indices_t keyword; /* unused is unknown/undecided */
- ExtraFormat_info_t format;
- int number;
- int level;
- char Contents[ PARAGRAPH_SIZE ];
-} Line_Control;
-
-typedef enum {
- RT_FORBIDDEN, /* no text to right allowed */
- RT_OPTIONAL, /* text to right optional -- none below */
- RT_NONE, /* text to right is "none" or nothing -- none below */
- RT_REQUIRED, /* text to right required -- none below */
- RT_BELOW, /* text to right forbidden -- text below required */
- RT_NONE_OR_BELOW, /* text to right is "none" OR there is text below */
- RT_EITHER, /* text to right OR below */
- RT_BOTH /* text to right AND below */
-} Keywords_text_mode_t;
-
-typedef enum {
- BL_FORBIDDEN, /* text below forbidden */
- BL_FORMATTED, /* text below is to be formatted as paragraphs */
- BL_RAW, /* text below is to be unprocessed by this program */
-} Keywords_text_below_t;
-
-typedef (*Keyword_validater_t)( Line_Control * );
-
-typedef struct {
- char Name[ MAXIMUM_KEYWORD_LENGTH ];
- int level;
- Keywords_text_mode_t text_mode;
- Keywords_text_below_t text_below_mode;
- Keyword_validater_t keyword_validation_routine;
-} Keyword_info_t;
-
-Keyword_info_t Keywords[] = {
- { "unused", 0, 0, 0, NULL }, /* so 0 can be invalid */
- { "@chapter", SECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "@chapheading", SECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "@section", SECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "@subsection", SUBSECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "@subsubsection", SUBSUBSECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "@raise", SUBSECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "@lower", SUBSECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "", HEADING, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "END OF FILE", SECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL }
-};
-
-#define NUMBER_OF_KEYWORDS \
- ( sizeof( Keywords ) / sizeof( Keyword_info_t ) ) - 2
-
-/*
- * exit_application
- */
-
-void exit_application(
- int status
-)
-{
- fprintf( stderr, "*** Error encountered ***\n" );
-/*
- fprintf( stderr, "*** Error encountered on line %d ***\n", CurrentLine );
-*/
- fclose( OutFile );
- exit( status );
-}
-
-/*************************************************************************
- *************************************************************************
- ***** LINE MANIPULATION ROUTINES *****
- *************************************************************************
- *************************************************************************/
-
-/*
- * PrintLine
- */
-
-void PrintLine(
- Line_Control *line
-)
-{
- assert( line );
-
- if ( line->number == -1 )
- fprintf( stderr, " " );
- else
- fprintf( stderr, "%5d", line->number );
-
-#if 0
- fprintf( stderr, "%s\n", line->Contents );
-#else
- /*
- * Include some debugging information
- */
- fprintf(
- stderr,
- "<%d,%d,%d>:%s\n",
- line->keyword,
- line->format,
- line->level,
- line->Contents
- );
-#endif
-}
-
-Chain_Control Line_Pool;
-
-/*
- * FillLinePool
- */
-
-void FillLinePool( void )
-{
- void *pool;
-
-#define LINE_POOL_FILL_COUNT 100
-
- pool = malloc( sizeof( Line_Control ) * LINE_POOL_FILL_COUNT );
- assert( pool );
-
- _Chain_Initialize(
- &Line_Pool,
- pool,
- LINE_POOL_FILL_COUNT,
- sizeof( Line_Control )
- );
-}
-
-/*
- * AllocateLine
- */
-
-Line_Control *AllocateLine( void )
-{
- Line_Control *new_line;
-
- new_line = (Line_Control *) _Chain_Get( &Line_Pool );
- if ( !new_line ) {
- FillLinePool();
- new_line = (Line_Control *) _Chain_Get( &Line_Pool );
- assert( new_line );
- }
-
-/*
- * This is commented out because although it is helpful during debug,
- * it consumes a significant percentage of the program's execution time.
-
- memset( new_line->Contents, '\0', sizeof( new_line->Contents ) );
-*/
- new_line->number = -1;
- new_line->level = -1;
-
- new_line->keyword = UNUSED;
- new_line->format = NO_EXTRA_FORMATTING_INFO;
-
- new_line->Node.next = NULL;
- new_line->Node.previous = NULL;
-
- return new_line;
-}
-
-/*
- * FreeLine
- */
-
-void FreeLine(
- Line_Control *line
-)
-{
- fflush( stdout );
- _Chain_Append( &Line_Pool, &line->Node );
-}
-
-/*
- * DeleteLine
- */
-
-Line_Control *DeleteLine(
- Line_Control *line
-)
-{
- Line_Control *next;
-
- next = (Line_Control *)line->Node.next;
- _Chain_Extract( &line->Node );
- FreeLine( line );
- return next;
-}
-
-/*
- * PrintSurroundingLines
- */
-
-void PrintSurroundingLines(
- Line_Control *line,
- int backward,
- int forward
-)
-{
- int i;
- int real_backward;
- Line_Control *local;
-
- for ( local=line, real_backward=0, i=1 ;
- i<=backward ;
- i++, real_backward++ ) {
- if ( &local->Node == Lines.first )
- break;
- local = (Line_Control *) local->Node.previous;
- }
-
- for ( i=1 ; i<=real_backward ; i++ ) {
- PrintLine( local );
- local = (Line_Control *) local->Node.next;
- }
-
- PrintLine( local );
-
- for ( i=1 ; i<=forward ; i++ ) {
- local = (Line_Control *) local->Node.next;
- if ( _Chain_Is_last( &local->Node ) )
- break;
- PrintLine( local );
- }
-
-}
-
-/*
- * SetLineFormat
- */
-
-void SetLineFormat(
- Line_Control *line,
- ExtraFormat_info_t format
-)
-{
- if ( line->format != NO_EXTRA_FORMATTING_INFO ) {
- fprintf( stderr, "Line %d is already formatted\n", line->number );
- PrintLine( line );
- assert( FALSE );
- }
-
- line->format = format;
-}
-
-/*
- * LineCopyFromRight
- */
-
-void LineCopyFromRight(
- Line_Control *line,
- char *dest
-)
-{
- char *p;
-
- for ( p=line->Contents ; *p != ' ' ; p++ )
- ;
- p++; /* skip the ' ' */
- for ( ; isspace( *p ) ; p++ )
- ;
-
- strcpy( dest, p );
-
-}
-
-/*
- * LineCopySectionName
- */
-
-void LineCopySectionName(
- Line_Control *line,
- char *dest
-)
-{
- char *p;
- char *d;
-
- p = line->Contents;
- d = dest;
-
- if ( *p == '@' ) { /* skip texinfo command */
- while ( !isspace( *p++ ) )
- ;
- }
-
- for ( ; *p ; )
- *d++ = *p++;
-
- *d = '\0';
-}
-
-/*************************************************************************
- *************************************************************************
- ***** END OF LINE MANIPULATION ROUTINES *****
- *************************************************************************
- *************************************************************************/
-
-/*
- * main
- */
-
-int main(
- int argc,
- char **argv
-)
-{
- int c;
- int index;
- boolean single_file_mode;
-
- Verbose = FALSE;
- DocsNextNode = EmptyString;
- DocsPreviousNode = TopString;
- DocsUpNode = TopString;
-
- while ((c = getopt(argc, argv, "vcp:n:u:")) != EOF) {
- switch (c) {
- case 'v':
- Verbose = TRUE;
- break;
- case 'c':
- NodeNameIncludesChapter = 0;
- break;
- case 'p':
- DocsPreviousNode = strdup(optarg);
- break;
- case 'n':
- DocsNextNode = strdup(optarg);
- break;
- case 'u':
- DocsUpNode = strdup(optarg);
- break;
-
- case '?':
- usage();
- return 0;
- }
- }
-
- if ( Verbose )
- fprintf( stderr, "Arguments successfully parsed\n" );
-
- FillLinePool();
-
- for ( index=optind ; index < argc ; index++ ) {
- ProcessFile( argv[ index ], NULL );
- }
-
- if ( Verbose )
- fprintf( stderr, "Exitting\n" );
-
- return 0;
-}
-
-/*
- * ProcessFile
- */
-
-void ProcessFile(
- char *inname,
- char *outname
-)
-{
- char out[ 256 ];
- int index;
-
- /*
- * Automatically generate the output file name.
- */
-
- if ( outname == NULL ) {
- for( index=0 ; inname[index] && inname[index] != '.' ; index++ ) {
- out[ index ] = inname[ index ];
- }
-
- if ( !strcmp( &inname[index], ".texi" ) ) {
- fprintf( stderr, "Input file already has .texi extension\n" );
- exit_application( 1 );
- }
-
- out[ index++ ] = '.';
- out[ index++ ] = 't';
- out[ index++ ] = 'e';
- out[ index++ ] = 'x';
- out[ index++ ] = 'i';
- out[ index ] = '\0';
- }
-
- /*
- * Read the file into our internal data structure
- */
-
- if ( Verbose )
- printf( "Processing (%s) -> (%s)\n", inname, out );
-
- ReadFileIntoChain( inname );
-
- if ( Verbose )
- fprintf( stderr, "-------->FILE READ IN\n" );
-
- /*
- * Remove any spaces before the keyword and mark each keyword line as
- * such. Also remove extra white space at the end of lines.
- */
-
- StripBlanks();
-
- if ( Verbose )
- fprintf( stderr, "-------->BLANKS BEFORE KEYWORDS STRIPPED\n" );
-
-
- FormatToTexinfo();
-
- if ( Verbose )
- fprintf( stderr, "-------->FILE FORMATTED TO TEXINFO\n" );
-
- /*
- * Print the file
- */
-
- PrintFile( out );
-
- if ( Verbose )
- fprintf( stderr, "-------->FILE PRINTED\n" );
-
- /*
- * Clean Up
- */
-
- ReleaseFile();
-
- if ( Verbose )
- fprintf( stderr, "-------->FILE RELEASED\n" );
-}
-
-/*
- * usage
- */
-
-void usage( void )
-{
- int index;
-
- for ( index=0 ; strcmp( Usage_Strings[ index ], "EOF" ) ; index++ )
- fprintf( stderr, Usage_Strings[ index ] );
-}
-
-/*
- * ReadFileIntoChain
- */
-
-void ReadFileIntoChain(
- char *inname
-)
-{
- FILE *InFile;
- int line_count;
- int max_length;
- char *line;
- char Buffer[ BUFFER_SIZE ];
- Line_Control *new_line;
-
- InFile = fopen( inname, "r" );
-
- if ( !InFile ) {
- fprintf( stderr, "Unable to open (%s)\n", inname );
- exit( 1 );
- }
- assert( InFile );
-
- max_length = 0;
- line_count = 0;
-
- _Chain_Initialize_empty( &Lines );
-
- for ( ;; ) {
- line = fgets( Buffer, BUFFER_SIZE, InFile );
- if ( !line )
- break;
-
- Buffer[ strlen( Buffer ) - 1 ] = '\0';
-
- new_line = AllocateLine();
-
- strcpy( new_line->Contents, Buffer );
-
- new_line->number = ++line_count;
-
- _Chain_Append( &Lines, &new_line->Node );
- }
-
- fclose( InFile );
-}
-
-/*
- * StripBlanks
- */
-
-void StripBlanks( void )
-{
- Line_Control *line;
- Keyword_indices_t index;
- int indentation;
- int length;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next
- ) {
-
- /*
- * Strip white space from the end of each line
- */
-
- length = strlen( line->Contents );
-
- while ( isspace( line->Contents[ --length ] ) )
- line->Contents[ length ] = '\0';
-
- if ( strstr( line->Contents, "@chapter" ) )
- line->keyword = KEYWORD_CHAPTER;
- else if ( strstr( line->Contents, "@chapheading" ) )
- line->keyword = KEYWORD_CHAPHEADING;
- else if ( strstr( line->Contents, "@section" ) )
- line->keyword = KEYWORD_SECTION;
- else if ( strstr( line->Contents, "@subsection" ) )
- line->keyword = KEYWORD_SUBSECTION;
- else if ( strstr( line->Contents, "@subsubsection" ) )
- line->keyword = KEYWORD_SUBSUBSECTION;
- else if ( strstr( line->Contents, "@raise" ) )
- line->keyword = KEYWORD_RAISE;
- else if ( strstr( line->Contents, "@lower" ) )
- line->keyword = KEYWORD_LOWER;
- else
- line->keyword = KEYWORD_OTHER;
-
- }
- line = AllocateLine();
- line->keyword = KEYWORD_END;
- _Chain_Append( &Lines, &line->Node );
-}
-
-/*
- * strIsAllSpace
- */
-
-boolean strIsAllSpace(
- char *s
-)
-{
- char *p;
-
- for ( p = s ; *p ; p++ )
- if ( !isspace( *p ) )
- return FALSE;
-
- return TRUE;
-}
-
-/*
- * BuildTexinfoNodes
- */
-
-void BuildTexinfoNodes( void )
-{
- char Buffer[ BUFFER_SIZE ];
- Line_Control *line;
- Line_Control *next_node;
- Line_Control *up_node;
- Line_Control *new_line;
- Line_Control *menu_insert_point;
- Line_Control *node_line;
- int next_found;
- int menu_items;
- Keyword_indices_t index;
- char ChapterName[ BUFFER_SIZE ];
- char NodeName[ BUFFER_SIZE ];
- char UpNodeName[ BUFFER_SIZE ];
- char NextNodeName[ BUFFER_SIZE ];
- char PreviousNodeName[ BUFFER_SIZE ];
-
- /*
- * Set Initial Previous Node Name
- */
-
- strcpy( PreviousNodeName, DocsPreviousNode );
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next
- ) {
-
- if ( line->level == -1 )
- continue;
-
- LineCopyFromRight( line, NodeName );
-
- if ( line->keyword == KEYWORD_CHAPTER ||
- line->keyword == KEYWORD_CHAPHEADING ) {
-
- strcpy( ChapterName, NodeName );
-
- } else if ( NodeNameIncludesChapter ) {
-
- sprintf( Buffer, "%s %s", ChapterName, NodeName );
- strcpy( NodeName, Buffer );
- }
-
- /*
- * Set Default Next Node Name
- */
-
- next_found = FALSE;
- strcpy( NextNodeName, DocsNextNode );
-
- /*
- * Go ahead and put it on the chain in the right order (ahead of
- * the menu) and we can fill it in later (after the menu is built).
- */
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "" ); /*"@ifinfo" ); */
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- node_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &node_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "" ); /* "@end ifinfo" ); */
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- next_node = (Line_Control *) line->Node.next;
- menu_insert_point = next_node;
- menu_items = 0;
-
- for ( ; ; ) {
- if ( next_node->keyword == KEYWORD_END )
- break;
-
- if ( next_node->level == -1 )
- goto continue_menu_loop;
-
- LineCopySectionName( next_node, Buffer );
- if ( !next_found ) {
- next_found = TRUE;
- if (NodeNameIncludesChapter)
- sprintf( NextNodeName, "%s %s", ChapterName, Buffer );
- else
- sprintf( NextNodeName, "%s", Buffer );
- }
-
- if ( next_node->level <= line->level )
- break;
-
- if ( next_node->level != (line->level + 1) )
- goto continue_menu_loop;
-
- if ( menu_items == 0 ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@ifinfo" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@menu" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
- }
-
- menu_items++;
-
- new_line = AllocateLine();
- if (NodeNameIncludesChapter)
- sprintf( new_line->Contents, "* %s %s::", ChapterName, Buffer );
- else
- sprintf( new_line->Contents, "* %s::", Buffer );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
-
-continue_menu_loop:
- next_node = (Line_Control *) next_node->Node.next;
- }
-
- /*
- * If menu items were generated, then insert the end of menu stuff.
- */
-
- if ( menu_items ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end menu" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end ifinfo" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
- }
-
- /*
- * Find the UpNodeName
- */
-
-/* DumpList( &Lines ); */
-
- if ( line->level == 0 ) {
- strcpy( UpNodeName, DocsUpNode );
- } else {
- for ( up_node = line;
- up_node && !_Chain_Is_first((Chain_Node *)up_node) ;
- up_node = (Line_Control *) up_node->Node.previous
- ) {
-
- if ( (up_node->level == -1) )
- continue;
-
- if ( up_node->level == (line->level - 1) ) {
- LineCopySectionName( up_node, Buffer );
- if (NodeNameIncludesChapter) {
- if (!strcmp(ChapterName, Buffer))
- sprintf( UpNodeName, "%s", Buffer );
- else
- sprintf( UpNodeName, "%s %s", ChapterName, Buffer );
- } else
- sprintf( UpNodeName, "%s", Buffer );
- break;
- }
- }
- }
-
- /*
- * Update the node information
- */
-
-#if 0
- fprintf(
- stderr,
- "@node %s, %s, %s, %s\n",
- NodeName,
- NextNodeName,
- PreviousNodeName,
- UpNodeName
- );
-#endif
-
- /* node_line was previously inserted */
- if (!NodeNameIncludesChapter) {
- sprintf(
- node_line->Contents,
- "@node %s, %s, %s, %s",
- NodeName,
- NextNodeName,
- PreviousNodeName,
- UpNodeName
- );
- } else {
- sprintf(
- node_line->Contents,
- "@node %s, %s, %s, %s",
- NodeName,
- NextNodeName,
- PreviousNodeName,
- UpNodeName
- );
- }
-
- strcpy( PreviousNodeName, NodeName );
-
- /* PrintLine( line ); */
- }
-}
-
-/*
- * FormatToTexinfo
- */
-
-void FormatToTexinfo( void )
-{
- Line_Control *line;
- int baselevel = 0;
- int currentlevel;
-
- if ( Verbose )
- fprintf( stderr, "-------->INSERTING TEXINFO MENUS\n" );
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next ) {
-
- switch (line->keyword) {
- case UNUSED:
- case KEYWORD_OTHER:
- case KEYWORD_END:
- line->level = -1;
- break;
- case KEYWORD_CHAPTER:
- case KEYWORD_CHAPHEADING:
- currentlevel = 0;
- line->level = baselevel + currentlevel;
- break;
- case KEYWORD_SECTION:
- currentlevel = 1;
- line->level = baselevel + currentlevel;
- break;
- case KEYWORD_SUBSECTION:
- currentlevel = 2;
- line->level = baselevel + currentlevel;
- break;
- case KEYWORD_SUBSUBSECTION:
- currentlevel = 3;
- line->level = baselevel + currentlevel;
- break;
- case KEYWORD_RAISE:
- assert( baselevel );
- baselevel--;
- line->level = -1;
- break;
- case KEYWORD_LOWER:
- baselevel++;
- line->level = -1;
- break;
- }
- }
-
- BuildTexinfoNodes();
-}
-
-/*
- * PrintFile
- */
-
-void PrintFile(
- char *out
-)
-{
- Line_Control *line;
-
- OutFile = fopen( out, "w+" );
-
- if ( !OutFile ) {
- fprintf( stderr, "Unable to open (%s) for output\n", out );
- exit_application( 1 );
- }
- assert( OutFile );
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next ) {
- fprintf( OutFile, "%s\n", line->Contents );
-/*
- fprintf(
- OutFile,
- "(%d,%d)%s\n",
- line->keyword,
- line->format,
- line->Contents
- );
-*/
- }
-}
-
-/*
- * DumpList
- */
-
-void DumpList(
- Chain_Control *the_list
-)
-{
- Line_Control *line;
-
- fprintf( stderr, "---> Dumping list (%p)\n", the_list );
-
- for ( line = (Line_Control *) the_list->first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next ) {
- /* if (line->level != -1) */
- PrintLine( line );
- /* fprintf( stderr, "%s\n", line->Contents ); */
- }
-}
-
-/*
- * ReleaseFile
- */
-
-void ReleaseFile()
-{
- Line_Control *line;
- Line_Control *next;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- ) {
- next = (Line_Control *) line->Node.next;
- line = next;
- }
-}
-
-/*
- * strtoInitialCaps
- */
-
-void strtoInitialCaps(
- char *dest,
- char *src
-)
-{
- char *source = src;
- char *destination = dest;
-
- source = src;
- destination = (dest) ? dest : src;
-
- while ( *source ) {
- while ( isspace( *source ) )
- *destination++ = *source++;
-
- if ( !*source )
- break;
-
- *destination++ = toupper( *source++ );
-
- for ( ; *source && !isspace( *source ) ; source++ )
- *destination++ = tolower( *source );
-
- if ( !*source )
- break;
- }
-
- *destination = '\0';
-}
diff --git a/doc/tools/bmenu/system.h b/doc/tools/bmenu/system.h
deleted file mode 100644
index 397c3afca2..0000000000
--- a/doc/tools/bmenu/system.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * COPYRIGHT (c) 1988-1998.
- * 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
diff --git a/doc/tools/bmenu/testdoc.texi b/doc/tools/bmenu/testdoc.texi
deleted file mode 100644
index da56254117..0000000000
--- a/doc/tools/bmenu/testdoc.texi
+++ /dev/null
@@ -1,690 +0,0 @@
-@ifinfo
-@node Avenger Control Electronics System, Avenger Control Electronics System General System, DOCS PREV, DOCS UP
-@end ifinfo
-@chapter Avenger Control Electronics System
-@ifinfo
-@menu
-* Avenger Control Electronics System General System::
-* Avenger Control Electronics System System Modes::
-* Avenger Control Electronics System System BIT::
-@end menu
-@end ifinfo
-
-@ifinfo
-@node General System, Avenger Control Electronics System Monitor and Control Avenger, Avenger Control Electronics System, DOCS UP
-@end ifinfo
-@section General System
-@ifinfo
-@menu
-* Avenger Control Electronics System Monitor and Control Avenger::
-* Avenger Control Electronics System Control Weapons::
-* Avenger Control Electronics System Handle Tone Signals::
-* Avenger Control Electronics System Provide AVDAS::
-* Avenger Control Electronics System Perform Initial Power-On Sequence::
-* Avenger Control Electronics System Perform Post-power-on Initialization -- Deleted::
-* Avenger Control Electronics System Update AVDAS Port::
-* Avenger Control Electronics System Handle Minor Faults::
-* Avenger Control Electronics System General Mode::
-* Avenger Control Electronics System Mode Transition::
-* Avenger Control Electronics System Boot BIT::
-* Avenger Control Electronics System Background BIT::
-@end menu
-@end ifinfo
-
-@ifinfo
-@node Monitor and Control Avenger, Avenger Control Electronics System Control Weapons, General System, Avenger Control Electronics System System Modes
-@end ifinfo
-@subsection Monitor and Control Avenger
-
-The AFCC shall be the main computer that monitors and controls all AVENGER
-system functions. [MNTMN 1-21.b, MNTMN 11-3]
-
-@ifinfo
-@node Control Weapons, Avenger Control Electronics System Handle Tone Signals, Monitor and Control Avenger, Avenger Control Electronics System System Modes
-@end ifinfo
-@subsection Control Weapons
-
-The AFCC shall be capable of tracking a single target, and controlling the
-missile and machine-gun systems. [FUNCTIONAL]
-
-@ifinfo
-@node Handle Tone Signals, Avenger Control Electronics System Provide AVDAS, Control Weapons, Avenger Control Electronics System System Modes
-@end ifinfo
-@subsection Handle Tone Signals
-
-The AFCC shall receive a tone signal from the IEA and IFF system. [MNTMN
-11-3.a(3), MNTMN 11-3.b(1)] The AFCC shall generate a test tone. [MNTMN
-11-3.a(3), MNTMN 11-3.b(2)] The AFCC shall also amplify the tone signals
-(target acquisition tone and IFF tone) from the IEA and IFF system and
-apply them to the communications system via the gunner's control box to
-the CVC helmet. [MNTMN 11-3.a(3), MNTMN 11-3.b(2)] The IFF audio tone
-shall be mixed with the missile acquisition tone and built-in-test tone
-inside the AFCC. [MNTMN 11-3.a(3), MNTMN 12-5.b(3&4)].
-
-@ifinfo
-@node Provide AVDAS, Avenger Control Electronics System Perform Initial Power-On Sequence, Handle Tone Signals, Avenger Control Electronics System System Modes
-@end ifinfo
-@subsection Provide AVDAS
-
-The AFCC shall provide system status information on the AVDAS serial test
-port. [FUNCTIONAL]
-
-@ifinfo
-@node Perform Initial Power-On Sequence, Avenger Control Electronics System Perform Post-power-on Initialization -- Deleted, Provide AVDAS, Avenger Control Electronics System System Modes
-@end ifinfo
-@subsection Perform Initial Power-On Sequence
-
-During power-on, the AFCC shall perform the following:
-
-@itemize @bullet
-
-@item initialize all software programmable peripherals,
-
-@item set all A/D output values to zero,
-
-@item safe the laser range finder by setting both first return and last return to a high state,
-
-@item safe the machine-gun system,
-
-@item set the turret drive to high speed mode,
-
-@item set the following outputs inactive
-
-@enumerate 1
-@item FLIR fire permit, missile active, RSO authorize, and uncage verify
-
-@item sight fire permit, missile active, RSO authorize, and uncage verify
-
-@item sight display active, and driven reticle
-
-@item power interlock
-
-@item FLIR field of view
-
-@item IFF challenge
-
-@item gunner palm grips and drift switch
-
-@item fire command
-
-@item uncage command
-
-@item BIT initiate command
-
-@item ATAS power on
-
-@item sequence command
-
-@item arm command
-
-@item activate command
-
-@item autotrack lock on command
-
-@item laser fire command,
-
-@end enumerate
-
-@item set the following inputs to the indicated state
-
-@enumerate 1
-@item uncage mode to AUTO
-
-@item helicopter mode to OFF
-
-@item track mode to MANUAL
-
-@item turret drive mode to STAB.
-@end enumerate
-
-@item initialize the missile range tables in RAM from values in EPROM,
-
-@item clear the north reference value and fire permit limits. [FUNCTIONAL]
-@end itemize
-
-@ifinfo
-@node Perform Post-power-on Initialization -- Deleted, Avenger Control Electronics System Update AVDAS Port, Perform Initial Power-On Sequence, Avenger Control Electronics System System Modes
-@end ifinfo
-@subsection Perform Post-power-on Initialization -- Deleted
-
-Requirement was deleted.
-
-@ifinfo
-@node Update AVDAS Port, Avenger Control Electronics System Handle Minor Faults, Perform Post-power-on Initialization -- Deleted, Avenger Control Electronics System System Modes
-@end ifinfo
-@subsection Update AVDAS Port
-
-The AFCC shall update the AVDAS port every 100ms. [FUNCTIONAL]
-
-@ifinfo
-@node Handle Minor Faults, Avenger Control Electronics System System Modes, Update AVDAS Port, Avenger Control Electronics System System Modes
-@end ifinfo
-@subsection Handle Minor Faults
-
-Detection of a minor fault shall cause an error message to be displayed on
-the CDT and the system fault light to be lit.
-
-
-@ifinfo
-@node System Modes, Avenger Control Electronics System General Mode, Handle Minor Faults, DOCS UP
-@end ifinfo
-@section System Modes
-@ifinfo
-@menu
-* Avenger Control Electronics System General Mode::
-* Avenger Control Electronics System Mode Transition::
-* Avenger Control Electronics System Boot BIT::
-* Avenger Control Electronics System Background BIT::
-@end menu
-@end ifinfo
-
-
-@ifinfo
-@node General Mode, Avenger Control Electronics System Process System Mode Periodically -- Deleted, System Modes, Avenger Control Electronics System System BIT
-@end ifinfo
-@subsection General Mode
-@ifinfo
-@menu
-* Avenger Control Electronics System Process System Mode Periodically -- Deleted::
-* Avenger Control Electronics System Determine System Mode::
-* Avenger Control Electronics System OFF Mode::
-* Avenger Control Electronics System COMM Mode::
-* Avenger Control Electronics System SAFE Mode::
-* Avenger Control Electronics System RUN Mode::
-* Avenger Control Electronics System ENGAGE Mode::
-* Avenger Control Electronics System Mode Fault::
-* Avenger Control Electronics System ENGAGE Mode Processing::
-* Avenger Control Electronics System Process Transition to OFF Mode::
-* Avenger Control Electronics System Process Transition to COMM Mode::
-* Avenger Control Electronics System Process Transition to SAFE Mode::
-* Avenger Control Electronics System Process Transition to RUN Mode::
-* Avenger Control Electronics System Process Transition to ENGAGE Mode::
-@end menu
-@end ifinfo
-
-
-@ifinfo
-@node Process System Mode Periodically -- Deleted, Avenger Control Electronics System Determine System Mode, General Mode, Avenger Control Electronics System Mode Transition
-@end ifinfo
-@subsubsection Process System Mode Periodically -- Deleted
-
-Requirement was deleted.
-
-@ifinfo
-@node Determine System Mode, Avenger Control Electronics System OFF Mode, Process System Mode Periodically -- Deleted, Avenger Control Electronics System Mode Transition
-@end ifinfo
-@subsubsection Determine System Mode
-
-The AFCC shall determine the system mode from the state of the system mode
-switch on the gunner's console and the remote mode indication from the
-remote terminal. [FUNCTIONAL]
-
-@ifinfo
-@node OFF Mode, Avenger Control Electronics System COMM Mode, Determine System Mode, Avenger Control Electronics System Mode Transition
-@end ifinfo
-@subsubsection OFF Mode
-
-If the system mode switch is in the OFF position, the system mode shall be
-OFF. [FUNCTIONAL]
-
-@ifinfo
-@node COMM Mode, Avenger Control Electronics System SAFE Mode, OFF Mode, Avenger Control Electronics System Mode Transition
-@end ifinfo
-@subsubsection COMM Mode
-
-If the system mode switch is in the COMM position, the system mode shall
-be COMM. [FUNCTIONAL]
-
-@ifinfo
-@node SAFE Mode, Avenger Control Electronics System RUN Mode, COMM Mode, Avenger Control Electronics System Mode Transition
-@end ifinfo
-@subsubsection SAFE Mode
-
-If the system mode switch is in the SAFE position, the system mode shall
-be SAFE. [FUNCTIONAL]
-
-@ifinfo
-@node RUN Mode, Avenger Control Electronics System ENGAGE Mode, SAFE Mode, Avenger Control Electronics System Mode Transition
-@end ifinfo
-@subsubsection RUN Mode
-
-If the system mode switch is in the RUN position, the system mode shall be
-RUN. [FUNCTIONAL]
-
-@ifinfo
-@node ENGAGE Mode, Avenger Control Electronics System Mode Fault, RUN Mode, Avenger Control Electronics System Mode Transition
-@end ifinfo
-@subsubsection ENGAGE Mode
-
-If the system mode switch is in the ENGAGE position, the system mode shall
-be ENGAGE or REMOTE. [FUNCTIONAL]
-
-@ifinfo
-@node Mode Fault, Avenger Control Electronics System ENGAGE Mode Processing, ENGAGE Mode, Avenger Control Electronics System Mode Transition
-@end ifinfo
-@subsubsection Mode Fault
-
-If the system mode switch is not in a valid position, the system mode
-shall remain unchanged and the AFCC shall output 'MODE FAULT' to the CDT.
-[FUNCTIONAL]
-
-@ifinfo
-@node ENGAGE Mode Processing, Avenger Control Electronics System Mode Transition, Mode Fault, Avenger Control Electronics System Mode Transition
-@end ifinfo
-@subsubsection ENGAGE Mode Processing
-
-When the system is in the ENGAGE mode, the AFCC shall:
-
-@itemize @bullet
-
-@item perform auto slew processing,
-
-@item perform lead angle processing,
-
-@item perform autotrack processing,
-
-@item output rate commands to the turret drive system,
-
-@item control the firing of the weapons systems. [FUNCTIONAL]
-
-@end itemize
-
-@ifinfo
-@node Mode Transition, Avenger Control Electronics System Process Transition to OFF Mode, ENGAGE Mode Processing, Avenger Control Electronics System System BIT
-@end ifinfo
-@subsection Mode Transition
-@ifinfo
-@menu
-* Avenger Control Electronics System Process Transition to OFF Mode::
-* Avenger Control Electronics System Process Transition to COMM Mode::
-* Avenger Control Electronics System Process Transition to SAFE Mode::
-* Avenger Control Electronics System Process Transition to RUN Mode::
-* Avenger Control Electronics System Process Transition to ENGAGE Mode::
-@end menu
-@end ifinfo
-
-The AFCC can operate in one of the following modes: OFF, COMM, SAFE, RUN,
-or ENGAGE. The mode transitions are depicted in Figure 3-1.
-
-@ifhtml
-@html
-<CENTER>
-<IMG SRC="modes.gif" ALT="Figure 3-1 Mode Transitions">
-</CENTER>
-@end html
-@end ifhtml
-
-@ifset use-ascii
-@example
-Figure 3-1 Mode Transitions - modes.gif
-@end example
-@end ifset
-
-@ifset use-tex
-@example
-Figure 3-1 Mode Transitions - modes.gif
-@end example
-@end ifset
-
-
-@ifinfo
-@node Process Transition to OFF Mode, Avenger Control Electronics System Process Transition to COMM Mode, Mode Transition, Avenger Control Electronics System Boot BIT
-@end ifinfo
-@subsubsection Process Transition to OFF Mode
-
-When the AFCC detects a valid transition to the OFF mode, the following
-actions shall be performed:
-
-@itemize @bullet
-
-@item update the elapsed time counter for the last mode the system was in,
-
-@item output 'OFF MODE' to the CDT,
-
-@item safe the laser by setting the last and first return to a high state,
-
-@item disable the turret drive system,
-
-@item disable the missile system,
-
-@item disable the machine-gun system,
-
-@item deactivate the sight and reticle,
-
-@item update the EEPROM with the current elapsed time and count values,
-
-@item disable continuous BIT,
-
-@item insure that the machine-gun cool down has completed before clearing the power hold circuit. [FUNCTIONAL]
-
-@end itemize
-
-
-@ifinfo
-@node Process Transition to COMM Mode, Avenger Control Electronics System Process Transition to SAFE Mode, Process Transition to OFF Mode, Avenger Control Electronics System Boot BIT
-@end ifinfo
-@subsubsection Process Transition to COMM Mode
-
-When the AFCC detects a valid transition to the COMM mode, the following
-actions shall be performed:
-
-@itemize @bullet
-
-@item update the elapsed time counter for the last mode the system was in,
-
-@item output `COMM MODE' to the CDT,
-
-@item safe the laser by setting the last and first return to a high state,
-
-@item disable the turret drive system,
-
-@item disable the missile system,
-
-@item disable the machine-gun system,
-
-@item deactivate the sight and reticle,
-
-@item reset the power hold circuit to insure power if the system is put in the OFF mode,
-
-@item enable current monitoring. [OPMAN 2-27.b(2), FUNCTIONAL]
-
-@end itemize
-
-@ifinfo
-@node Process Transition to SAFE Mode, Avenger Control Electronics System Process Transition to RUN Mode, Process Transition to COMM Mode, Avenger Control Electronics System Boot BIT
-@end ifinfo
-@subsubsection Process Transition to SAFE Mode
-
-When the AFCC detects a valid transition to the SAFE mode, the following
-actions shall be performed:
-
-@itemize @bullet
-
-@item update the elapsed time counter for the last mode the system was in,
-
-@item output `SAFE MODE' to the CDT,
-
-@item safe the laser by setting the last and first return to a high state,
-
-@item disable the turret drive system,
-
-@item disable the missile system,
-
-@item disable the machine-gun system,
-
-@item deactivate the sight and reticle,
-
-@item reset the power hold circuit to insure power if the system is put in the OFF mode,
-
-@item enable current monitoring. [FUNCTIONAL]
-
-@end itemize
-
-@ifinfo
-@node Process Transition to RUN Mode, Avenger Control Electronics System Process Transition to ENGAGE Mode, Process Transition to SAFE Mode, Avenger Control Electronics System Boot BIT
-@end ifinfo
-@subsubsection Process Transition to RUN Mode
-
-When the AFCC detects a valid transition to the RUN mode, the following
-actions shall be performed:
-
-@itemize @bullet
-
-@item update the elapsed time counter for the last mode the system was in,
-
-@item output `RUN MODE' to the CDT,
-
-@item safe the laser by setting the last and first return to a high state,
-
-@item enable the turret drive system,
-
-@item disable the missile system,
-
-@item disable the machine-gun system,
-
-@item deactivate the sight and reticle,
-
-@item reset the power hold circuit to insure power if the system is put in the OFF mode,
-
-@item enable current monitoring. [FUNCTIONAL]
-
-@end itemize
-
-@ifinfo
-@node Process Transition to ENGAGE Mode, Avenger Control Electronics System System BIT, Process Transition to RUN Mode, Avenger Control Electronics System Boot BIT
-@end ifinfo
-@subsubsection Process Transition to ENGAGE Mode
-
-When the AFCC detects a valid transition to the ENGAGE mode, the following
-actions shall be performed:
-
-@itemize @bullet
-
-@item update the elapsed time counter for the last mode the system was in,
-
-@item output `ENGAGE MODE' to the CDT,
-
-@item enable the turret drive system,
-
-@item enable the missile system power,
-
-@item reset the power hold circuit to insure power if the system is put in the OFF mode,
-
-@item enable current monitoring. [FUNCTIONAL]
-
-@end itemize
-
-@ifinfo
-@node System BIT, Avenger Control Electronics System Boot BIT, Process Transition to ENGAGE Mode, DOCS UP
-@end ifinfo
-@section System BIT
-@ifinfo
-@menu
-* Avenger Control Electronics System Boot BIT::
-* Avenger Control Electronics System Background BIT::
-@end menu
-@end ifinfo
-
-
-@ifinfo
-@node Boot BIT, Avenger Control Electronics System Perform ROM Checksum, System BIT, DOCS UP
-@end ifinfo
-@subsection Boot BIT
-@ifinfo
-@menu
-* Avenger Control Electronics System Perform ROM Checksum::
-* Avenger Control Electronics System Boot Test AFCC Boards::
-* Avenger Control Electronics System Boot Test CPU Board::
-* Avenger Control Electronics System Boot Test AFCC Controller Board DAC's::
-* Avenger Control Electronics System Boot Test Interface Board Discrete Inputs::
-* Avenger Control Electronics System Boot Test AFCC Controller Board Relay and Discrete Outputs::
-* Avenger Control Electronics System Boot Check Voltages::
-* Avenger Control Electronics System Boot Handle Fatal Error::
-* Avenger Control Electronics System Perform Background BIT::
-* Avenger Control Electronics System Background Process CPU and Software Exceptions::
-* Avenger Control Electronics System Background Test AFCC Controller Board DAC's::
-* Avenger Control Electronics System Background Test AFCC Controller Board Relay and Discrete Outputs::
-* Avenger Control Electronics System Perform RAM Checksum::
-* Avenger Control Electronics System Background Monitor Voltages::
-* Avenger Control Electronics System Background Handle Fatal Error::
-@end menu
-@end ifinfo
-
-
-@ifinfo
-@node Perform ROM Checksum, Avenger Control Electronics System Boot Test AFCC Boards, Boot BIT, Avenger Control Electronics System Background BIT
-@end ifinfo
-@subsubsection Perform ROM Checksum
-
-During initialization of the AFCC, the AFCC shall checksum the code image
-stored in ROM to insure that it is correct. If the checksum does not
-match the code image, the system shall halt.
-
-@ifinfo
-@node Boot Test AFCC Boards, Avenger Control Electronics System Boot Test CPU Board, Perform ROM Checksum, Avenger Control Electronics System Background BIT
-@end ifinfo
-@subsubsection Boot Test AFCC Boards
-
-During initialization of the AFCC, all boards shall be tested to determine
-their functional state. If all tests performed on a board pass, the board
-shall have a functional state of passed. If any test performed on a board
-fails, the board shall have a functional state of failed.
-
-@ifinfo
-@node Boot Test CPU Board, Avenger Control Electronics System Boot Test AFCC Controller Board DAC's, Boot Test AFCC Boards, Avenger Control Electronics System Background BIT
-@end ifinfo
-@subsubsection Boot Test CPU Board
-
-During initialization of the AFCC, the AFCC shall test the following CPU
-board components by invoking all non-destructive card-level diagnostic
-tests provided by the CPU board vendor. If any CPU board component fails
-diagnostic testing, a fatal error shall occur.
-
-@ifinfo
-@node Boot Test AFCC Controller Board DAC's, Avenger Control Electronics System Boot Test Interface Board Discrete Inputs, Boot Test CPU Board, Avenger Control Electronics System Background BIT
-@end ifinfo
-@subsubsection Boot Test AFCC Controller Board DAC's
-
-During initialization of the AFCC, the AFCC shall utilize the DAC test
-capability of the AFCC Controller board to verify that the DAC components
-of the AFCC Controller board are set to their initial values. If any DAC
-component is not properly set, a fatal error shall occur.
-
-@ifinfo
-@node Boot Test Interface Board Discrete Inputs, Avenger Control Electronics System Boot Test AFCC Controller Board Relay and Discrete Outputs, Boot Test AFCC Controller Board DAC's, Avenger Control Electronics System Background BIT
-@end ifinfo
-@subsubsection Boot Test Interface Board Discrete Inputs
-
-During initialization of the AFCC, the AFCC shall utilize the discrete
-input loopback capability of the AFCC Interface board to test that the
-discrete input components of the AFCC Interface board are working
-properly. If any discrete input component does not function properly, a
-fatal error shall occur.
-
-@ifinfo
-@node Boot Test AFCC Controller Board Relay and Discrete Outputs, Avenger Control Electronics System Boot Check Voltages, Boot Test Interface Board Discrete Inputs, Avenger Control Electronics System Background BIT
-@end ifinfo
-@subsubsection Boot Test AFCC Controller Board Relay and Discrete Outputs
-
-During initialization of the AFCC, the AFCC shall utilize the relay and
-discrete output test capability of the AFCC Controller board to verify
-that the relay and discrete output components of the AFCC Controller board
-are set to their initial values. If any relay or discrete output
-component is not properly set, a fatal error shall occur.
-
-@ifinfo
-@node Boot Check Voltages, Avenger Control Electronics System Boot Handle Fatal Error, Boot Test AFCC Controller Board Relay and Discrete Outputs, Avenger Control Electronics System Background BIT
-@end ifinfo
-@subsubsection Boot Check Voltages
-
-During initialization of the AFCC, the +5 volt, +15 volt, -15 volt, and
-+28 volt power supplies shall be checked to insure that they are within
-tolerance. If any of the power supplies are out of tolerance, a fatal
-error shall occur.
-
-@ifinfo
-@node Boot Handle Fatal Error, Avenger Control Electronics System Background BIT, Boot Check Voltages, Avenger Control Electronics System Background BIT
-@end ifinfo
-@subsubsection Boot Handle Fatal Error
-
-If a fatal error occurs during initialization, the AFCC shall attempt to
-output a diagnostic message to the CDT and halt initialization.
-
-@ifinfo
-@node Background BIT, Avenger Control Electronics System Perform Background BIT, Boot Handle Fatal Error, DOCS UP
-@end ifinfo
-@subsection Background BIT
-@ifinfo
-@menu
-* Avenger Control Electronics System Perform Background BIT::
-* Avenger Control Electronics System Background Process CPU and Software Exceptions::
-* Avenger Control Electronics System Background Test AFCC Controller Board DAC's::
-* Avenger Control Electronics System Background Test AFCC Controller Board Relay and Discrete Outputs::
-* Avenger Control Electronics System Perform RAM Checksum::
-* Avenger Control Electronics System Background Monitor Voltages::
-* Avenger Control Electronics System Background Handle Fatal Error::
-@end menu
-@end ifinfo
-
-
-@ifinfo
-@node Perform Background BIT, Avenger Control Electronics System Background Process CPU and Software Exceptions, Background BIT, DOCS UP
-@end ifinfo
-@subsubsection Perform Background BIT
-
-During normal operation of the AFCC, the AFCC shall perform background BIT
-of various system components. Background BIT shall be performed during
-system idle time.
-
-@ifinfo
-@node Background Process CPU and Software Exceptions, Avenger Control Electronics System Background Test AFCC Controller Board DAC's, Perform Background BIT, DOCS UP
-@end ifinfo
-@subsubsection Background Process CPU and Software Exceptions
-
-During normal operation of the AFCC, the AFCC shall recognize all CPU and
-software exceptions. If any exception occurs, a fatal error shall occur.
-
-@ifinfo
-@node Background Test AFCC Controller Board DAC's, Avenger Control Electronics System Background Test AFCC Controller Board Relay and Discrete Outputs, Background Process CPU and Software Exceptions, DOCS UP
-@end ifinfo
-@subsubsection Background Test AFCC Controller Board DAC's
-
-During background BIT, the AFCC shall utilize the DAC test capability of
-the AFCC Controller board to verify that the DAC components of the AFCC
-Controller board are set to their last written values. If any DAC
-component is not properly set, a fatal error shall occur.
-
-@ifinfo
-@node Background Test AFCC Controller Board Relay and Discrete Outputs, Avenger Control Electronics System Perform RAM Checksum, Background Test AFCC Controller Board DAC's, DOCS UP
-@end ifinfo
-@subsubsection Background Test AFCC Controller Board Relay and Discrete Outputs
-
-During background BIT, the AFCC shall utilize the relay and discrete
-output test capability of the AFCC Controller board to verify that the
-relay and discrete output components of the AFCC Controller board are set
-to their last written values. If any relay or discrete output component
-is not properly set, a fatal error shall occur.
-
-@ifinfo
-@node Perform RAM Checksum, Avenger Control Electronics System Background Monitor Voltages, Background Test AFCC Controller Board Relay and Discrete Outputs, DOCS UP
-@end ifinfo
-@subsubsection Perform RAM Checksum
-
-During background BIT, the AFCC shall checksum the code image to insure
-that it is correct. If the checksum does not match the code image, a
-fatal error shall occur.
-
-@ifinfo
-@node Background Monitor Voltages, Avenger Control Electronics System Background Handle Fatal Error, Perform RAM Checksum, DOCS UP
-@end ifinfo
-@subsubsection Background Monitor Voltages
-
-During background BIT, the AFCC shall monitor the +5 volt, +15 volt, -15
-volt, and +28 volt power supplies to insure that they are within
-tolerance. If any of the power supplies are out of tolerance, a fatal
-error shall occur.
-
-@ifinfo
-@node Background Handle Fatal Error, DOCS NEXT, Background Monitor Voltages, DOCS UP
-@end ifinfo
-@subsubsection Background Handle Fatal Error
-
-When the AFCC detects a fatal error, the following shall be attempted:
-
-@enumerate a
-
-@item light the fault light on the gunner console,
-
-@item stop the execution of all tasks,
-
-@item reset all hardware outputs to a safe state,
-
-@item store a failure code or message in the EEPROM,
-
-@item output a diagnostic message to the CDT and Console port,
-
-@item halt the system.
-
-@end enumerate
-
-
diff --git a/doc/tools/pdl2texi/Drive.d b/doc/tools/pdl2texi/Drive.d
deleted file mode 100644
index 82c3de020e..0000000000
--- a/doc/tools/pdl2texi/Drive.d
+++ /dev/null
@@ -1,890 +0,0 @@
-OBJECT: Drive
- DESCRIPTION:
- This object provides an interface to the elevation/azimuth
- drive system(ECA).
- THEORY OF OPERATION:
- This object encapsulates the turret drive. The object provides
- an interface to control the turret drive. A method is provided
- to set the azimuth and elevation rate of the drive. Methods are
- provided to request the drive to run in stabilized or power mode
- and set the drive speed to high or low. A method is also provided
- to allow for drift adjust.
-
- This object also tracks drive system on hours. It gets the hours
- from the EEPROM data, allows the hours to be set, updates the
- hours via the activation and deactivation of the drive, and
- provides access to the hours.
-
- + This is the first bullet.
- + This is the second bullet.
- + This is the third bullet.
- + This is the fourth bullet.
- + This is the fifth bullet.
-
- The object also provides methods to access azimuth and elevation
- displacement, and methods to process changes in the hardware
- discretes drive on, stabilized mode, thermal fault and fault.
-
- The object also provides methods to enable and disable
- both the remote and turret power interlocks which determine if
- the drive can be driven by the remote or turret handstation
- respectively.
-
-ATTRIBUTE DESCRIPTIONS:
-
-
-ATTRIBUTE: Azimuth_displacement
- DESCRIPTION:
- This attribute represents the current azimuth displacement
- of the turret.
- TYPE: floating point
- RANGE: 0-0
- UNITS: degrees
- REQUIREMENTS:
- AFS 8.2.11 Receive Azimuth Displacement and Elevation Displacement
- AIS 5.2.6 Azimuth Displacement analog
-
-
-ATTRIBUTE: Azimuth_rate
- DESCRIPTION:
- Azimuth rate command for movement of the turret.
- TYPE: floating point
- RANGE: X-Y
- UNITS: degrees / second
- DEFAULT: none
- REQUIREMENTS:
- AFS 8.2.3 Send Azimuth and Elevation Rate to ECA
- AIS 5.3.4 Elevation Rate analog
- AIS 5.3.5 Azimuth Rate analog
-
-
-ATTRIBUTE: Drift_adjust
- DESCRIPTION:
- This attribute represents the current drift adjustment mode
- of the ECA turret drive.
- TYPE: enumerated
- MEMBERS:
- ADJUST_OFF - drift adjust mode is OFF
- ADJUST_ON - drift adjust mode is ON
- REQUIREMENTS:
- AFS 8.2.6 Capable of turret drift adjustment
- AIS 5.3.1 Drift Adjust discrete
-
-
-ATTRIBUTE: Drive_on
- DESCRIPTION:
- Current status of the turret drive. The turret drive may either be
- switched on or off.
- TYPE: boolean
- MEMBERS:
- FALSE - turret drive is off
- TRUE - turret drive is on
- DEFAULT: FALSE
- REQUIREMENTS:
- AFS 8.2.9 Monitor Drive System On
- AIS 5.2.1 Drive System On discrete
-
-
-ATTRIBUTE: Drive_system_hours
- DESCRIPTION:
- Total number of hours drive has been activated.
- TYPE: integer
- RANGE: 0 - +INFINITY
- UNITS: seconds
- REQUIREMENTS:
- AFS 4.11 Respond to CDT elapsed time indicator key
-
-
-ATTRIBUTE: Elevation_displacement
- DESCRIPTION:
- This attribute represents the current elevation displacement
- of the turret.
- TYPE: floating point
- RANGE: 0-0
- UNITS: degrees
- REQUIREMENTS:
- AFS 8.2.11 Receive Azimuth Displacement and Elevation Displacement
- AIS 5.2.7 Elevation Displacement analog
-
-
-ATTRIBUTE: Elevation_rate
- DESCRIPTION:
- Elevation rate command for movement of the turret.
- TYPE: floating point
- RANGE: X - Y
- UNITS: degrees / second
- DEFAULT: none
- REQUIREMENTS:
- AFS 8.2.3 Send Azimuth and Elevation Rate to ECA
- AIS 5.3.4 Elevation Rate analog
- AIS 5.3.5 Azimuth Rate analog
-
-
-ATTRIBUTE: Fault
- DESCRIPTION:
- This attribute denotes whether a turret malfunction has occurred.
- TYPE: boolean
- MEMBERS:
- TRUE - a turret malfunction has occurred
- FALSE - no turret malfunction has occurred
- DEFAULT: FALSE
- REQUIREMENTS:
- AFS 8.2.7 Check for ECA failure indication
- AIS 5.2.4 Turret Drive Malfunction discrete
-
-
-ATTRIBUTE: Mode
- DESCRIPTION:
- Current requested drive mode.
- TYPE: enumerated
- MEMBERS:
- POWER - operate in POWER mode
- STAB - operate in STABILIZED mode
- DEFAULT: POWER
- REQUIREMENTS:
- bogus requirement
-
-
-ATTRIBUTE: Remote_power_interlock_position
- DESCRIPTION:
- This is the status of the remote's power interlock.
- TYPE: enumerated
- MEMBERS:
- OPEN - relay is open
- CLOSED - relay is closed
- REQUIREMENTS:
- AFS 8.2.12 Control Power Interlock
-
-
-ATTRIBUTE: Speed
- DESCRIPTION:
- Current speed mode of the ECA turret drive.
- TYPE: enumerated
- MEMBERS:
- LOW_SPEED - turret drive does not allow the maximum rate
- HIGH_SPEED - turret drive allows the maximum rate
- DEFAULT: HIGH
- REQUIREMENTS:
- AFS 8.2.5 Control Turret
- AIS 5.3.3 Turret High Speed Mode discrete
-
-
-ATTRIBUTE: Stabilized_mode
- DESCRIPTION:
- Current drive mode indicating whether the ECA electronics are
- operating in Stabilized mode or Power mode.
- TYPE: boolean
- MEMBERS:
- FALSE - not operating in STABILIZED mode
- TRUE - operating in STABILIZED mode
- DEFAULT: FALSE
- REQUIREMENTS:
- AFS 8.2.8 Monitor Turret Stab Mode Indicate
- AIS 5.2.3 Turret Stab Mode Indicate discrete
-
-
-ATTRIBUTE: State
- DESCRIPTION:
- Current state of the turret drive.
- TYPE: enumerated
- MEMBERS:
- ACTIVATED - turret drive is ON and active
- DEACTIVATED - turret drive is ON but deactivated
- DEFAULT: DEACTIVATED
- REQUIREMENTS:
- AFS 8.2.4 Set Plam Grips Active
- AIS 5.3.2 Palm Grips Active discrete
-
-
-ATTRIBUTE: Thermal_fault
- DESCRIPTION:
- This attribute denotes whether a turret thermal fault has occurred.
- TYPE: boolean
- MEMBERS:
- TRUE - a turret thermal fault has occurred
- FALSE - no turret thermal fault has occurred
- DEFAULT: FALSE
- REQUIREMENTS:
- AFS 8.2.7 Check for ECA failure indication
- AIS 5.2.2 Turret ECA Thermal Failure discrete
-
-
-ATTRIBUTE: Turret_power_interlock_position
- DESCRIPTION:
- This is the status of the turret's power interlock.
- TYPE: enumerated
- MEMBERS:
- OPEN - relay is open
- CLOSED - relay is closed
- REQUIREMENTS:
- AFS 8.2.12 Control Power Interlock
-
-
-ASSOCIATION DESCRIPTIONS: none
-
-ABSTRACT TYPE DESCRIPTIONS:
-
-ABSTRACT TYPE: Drift_adjust_t
- DESCRIPTION:
- This abstract type represents the current drift adjustment mode
- of the ECA turret drive.
- VISIBILITY: public
- DERIVATION: enumerated
- MEMBERS:
- ADJUST_OFF = 0 - drift adjust mode is OFF
- ADJUST_ON = 1 - drift adjust mode is ON
- REQUIREMENTS:
- AIS 5.3.1 Drift Adjust discrete
-
-ABSTRACT TYPE: Interlock_status
- DESCRIPTION:
- An interlock state being OPEN or CLOSED.
- VISIBILITY: private
- DERIVATION: enumerated
- MEMBERS:
- OPEN - interlock relay is in the open state
- CLOSED - interlock relay is in the closed state
- REQUIREMENTS:
- AFS 8.2.12 Control Power Interlock
-
-ABSTRACT TYPE: Mode
- DESCRIPTION:
- This type specifies the drive mode of the ECA turret drive.
- VISIBILITY: public
- DERIVATION: enumerated
- MEMBERS:
- POWER - operate in POWER mode
- STAB - operate in STABILIZED mode
-
-ABSTRACT TYPE: Speed
- DESCRIPTION:
- This type specifies the Speed mode of the ECA turret drive.
- VISIBILITY: public
- DERIVATION: enumerated
- MEMBERS:
- LOW_SPEED = 0 - turret drive does not allow the maximum rate
- HIGH_SPEED = 1 - turret drive allows the maximum rate
- REQUIREMENTS:
- AIS 5.3.3 Turret High Speed Mode discrete
-
-ABSTRACT TYPE: State_t
- DESCRIPTION:
- This type specifies the state of the turret drive.
- VISIBILITY: private
- DERIVATION: enumerated
- MEMBERS:
- DEACTIVATED - turret drive is ON but deactivated
- ACTIVATED - turret drive is ON and active
-
-DATA ITEM DESCRIPTIONS:
-
-DATA ITEM: Azimuth_displacement_control
- DESCRIPTION:
- This data item contains the Azimuth_displacement analog control
- information.
- TYPE: handle
-
-
-DATA ITEM: Azimuth_rate_control
- DESCRIPTION:
- This data item contains the Azimuth_rate analog control
- information.
- TYPE: handle
-
-
-DATA ITEM: Drift_adjust_control
- DESCRIPTION:
- This data item contains the Drift_adjust discrete control
- information.
- TYPE: handle
-
-
-DATA ITEM: Drive_activate_control
- DESCRIPTION:
- This data item contains the activate drive relay control information.
- TYPE: handle
-
-
-DATA ITEM: Drive_activated_timestamp
- DESCRIPTION:
- This data item stores the timestamp of the last time the drive was
- activated. It will be used to compute the activated time when a
- deactivate is received.
- TYPE: time_t
- DEFAULT: none
- NOTES:
- see C library for data type information
-
-
-DATA ITEM: Drive_on
- DESCRIPTION:
- The current status of the turret drive representing whether
- the drive is on or off.
- TYPE: boolean
- DEFAULT: FALSE
-
-
-DATA ITEM: Drive_on_control
- DESCRIPTION:
- This data item contains the Drive_on discrete flag control
- information.
- TYPE: handle
-
-
-DATA ITEM: Drive_system_hours
- DESCRIPTION:
- This data item stores the actual time the drive has been active.
- This value will be output by the Get_time method and will be set
- by the Set_time method.
- TYPE: integer
- RANGE: 0 - +INFINITY
- UNITS: seconds
- DEFAULT: 0
-
-
-DATA ITEM: Elevation_rate_control
- DESCRIPTION:
- This data item contains the Elevation_rate analog control
- information.
- TYPE: handle
-
-
-DATA ITEM: Elevation_displacement_control
- DESCRIPTION:
- This data item contains the Elevation_displacement analog control
- information.
- TYPE: handle
-
-
-DATA ITEM: Fault_control
- DESCRIPTION:
- This data item contains the Fault discrete flag control
- information.
- TYPE: handle
-
-
-DATA ITEM: Remote_power_interlock_control
- DESCRIPTION:
- This data item contains the Remote_power_interlock relay control
- information.
- TYPE: handle
-
-
-DATA ITEM: Stabilized_mode_control
- DESCRIPTION:
- This data item contains the Stabilized_mode discrete flag control
- information.
- TYPE: handle
-
-
-DATA ITEM: State
- DESCRIPTION:
- The current state of the turret drive representing an activated or
- deactivated drive.
- TYPE: State_t
- DEFAULT: DEACTIVATED
-
-
-DATA ITEM: Thermal_fault_control
- DESCRIPTION:
- This data item contains the Thermal_fault discrete flag control
- information.
- TYPE: handle
-
-
-DATA ITEM: Turret_power_interlock_control
- DESCRIPTION:
- This data item contains the Turret_power_interlock relay control
- information.
- TYPE: handle
-
-
-DATA ITEM: Turret_power_interlock_status
- DESCRIPTION:
- The accurate status of the turret power interlock relay. This value
- will be used to control the relay during a transition from the remote
- back to the turret console.
- TYPE: Interlock_status
- DEFAULT: none
-
-
-METHOD DESCRIPTIONS:
-
-METHOD: Activate
- DESCRIPTION:
- This method activates the turret drive system. A timestamp of the
- activation is recorded to keep a running count of hours the drive has
- been active.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.4 Set Palm Grips Active
- AIS 5.3.2 Palm Grips Active discrete
- PDL:
-
- if Drive_on
- if State is DEACTIVATED
- close the Drive_activate_control relay using the Relay object
- timestamp Drive_activated_timestamp for Drive_system_hours
- running total
- set State to ACTIVATED
- else
- already in the ACTIVATED state
-
-
-METHOD: Create
- DESCRIPTION:
- This method initializes the Turret Drive object. All monitors of
- turret drive signals are initialized and/or registered. All turret
- drive characteristics are set to their initial values.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- PDL:
-
- set State to DEACTIVATED
-
- get Drive_system_hours to initialize the elapsed drive time
- from the Statistics (eeprom database) object - this is
- stored upon shutdown in eeprom
-
- create Fault_control using Discrete_flag object with the
- following attributes
- true_sense - DISCRETE_FLAG_TRUE_IS_1
- is_buffered - false
- is_monitored - true
- period - 10ms
- change_routine - Change_fault
- change fault using initial value returned from create Fault_control
-
- create Thermal_fault_control using Discrete_flag object with
- the following attributes
- true_sense - DISCRETE_FLAG_TRUE_IS_0
- is_buffered - false
- is_monitored - true
- period - 10ms
- change_routine - Change_thermal_fault
- change thermal fault using initial value returned from create
- Thermal_fault_control
-
- create Stabilized_mode_control using Discrete_flag object with the
- following attributes
- true_sense - DISCRETE_FLAG_TRUE_IS_1
- is_buffered - false
- is_monitored - true
- period - 10ms
- change_routine - Change_stabilized_mode
- change stabilized mode using initial value returned from create
- Stabilized_mode_control
-
- create Drive_on_control using Discrete_flag object with the
- following attributes
- true_sense - DISCRETE_FLAG_TRUE_IS_1
- is_buffered - false
- is_monitored - true
- period - 10ms
- change_routine - Change_drive_on
- change drive on using initial value returned from create
- Drive_on_control
-
- create Azimuth_rate_control using the Linear_dac object
- with the following attributes:
- voltage_low - -10
- voltage_high - +10
- logical_low - -60
- logical_high - +60
- is_buffered - false
- period - none
- initial_value - 0
-
- create Elevation_rate_control using the Linear_dac object with the
- following attributes:
- voltage_low - -10
- voltage_high - +10
- logical_low - -60
- logical_high - +60
- is_buffered - false
- period - none
- initial_value - 0
-
- create Azimuth_displacement_control using the Linear_adc object with
- the following attributes:
- voltage low -
- voltage high -
- logical low -
- logical high -
- is_buffered - false
- is_monitored - false
- period - none
- change_routine - none
- delta - none
-
- create Elevation_displacement_control using the Linear_adc object
- with the following attributes:
- voltage low -
- voltage high -
- logical low -
- logical high -
- is_buffered - false
- is_monitored - false
- period - none
- change_routine - none
- delta - none
-
- create Drive_activate_control using the Relay object with the
- following attributes:
- open_sense - RELAY_OPEN_IS_0
- is_buffered - false
- period - none
- initial_state - RELAY_OPEN
-
- create Turret_power_interlock_control using the Relay object with
- the following attributes:
- open_sense - RELAY_OPEN_IS_0
- is_buffered - false
- period - none
- initial_state - RELAY_OPEN
- set Turret_power_interlock_status to OPEN
-
- create Remote_power_interlock_control using the Relay
- object with the following attributes:
- open_sense - RELAY_OPEN_IS_0
- is_buffered - false
- period - none
- initial_state - RELAY_OPEN
-
- create Drift_adjust_control using the Discrete_out object with
- following attributes:
- is_buffered - false
- period - 10ms
- initial_value - ADJUST_OFF
-
-
-METHOD: Deactivate
- DESCRIPTION:
- This method deactivates the turret drive system. A timestamp of the
- activation is recorded to keep a running count of hours the drive
- has been active.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.4 Set Plam Grips Active
- AIS 5.3.2 Palm Grips Active discrete
- PDL:
-
- if Drive_on
- if State is DEACTIVATED
- timestamp deactivate for Drive_system_hours running total
- deactivate drive by opening the Drive_activate_control relay
- using the Relay object
- compute running time since last activate
- add running time to Drive_system_hours
- set State to DEACTIVATED
- else
- already in the DEACTIVATED state
-
-
-METHOD: Disable_remote_power_interlock
- DESCRIPTION:
- This method disables the turret power interlock safety preventing
- the turret from being driven by the remote's handstation.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.12 Control Power Interlock
- PDL:
-
- open the remote power interlock relay
- return the turret relay to its designated state defined by the
- Turret_power_interlock_status
-
-
-METHOD: Disable_turret_power_interlock
- DESCRIPTION:
- This method disables the turret power interlock safety preventing
- the turret from being driven by the turret's handstation.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.12 Control Power Interlock
- PDL:
-
- Deactivate the Drive object
- open the turret power interlock relay
- set Turret_power_interlock_status to OPEN
-
-
-METHOD: Enable_remote_power_interlock
- DESCRIPTION:
- This method will enable the remote power interlock to allow
- the turret to be driven from the remote station.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.12 Control Power Interlock
- NOTES:
- At this time the turret's power interlock is opened to avoid
- having both relays closed at a time.
- PDL:
-
- if Drive_on
- open the turret power interlock relay using the Relay object
- close the remote power interlock relay using the Relay object
-
-
-METHOD: Enable_turret_power_interlock
- DESCRIPTION:
- This method will enable the turret power interlock to allow
- the turret to be driven from the turret station.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.12 Control Power Interlock
- NOTES:
- At this time the closed state is saved to allow the correct state
- to be returned to in the event a remote overrides the turret and the
- remote gives up its control, we must return to the previous state of
- the turret power interlock.
- PDL:
-
- if Drive_on
- close the turret power interlock relay using the Relay object
-
- set the Turret_power_interlock_status to CLOSED to return to
- when remote gives up control
-
-
-METHOD: Get_AZ_EL_displacement
- DESCRIPTION:
- This method returns the current azimuth displacement and elevation
- displacement from the ECA.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS:
- current azimuth displacement value
- current elevation displacement value
- REQUIREMENTS:
- AFS 8.2.11 Receive Azimuth Displacement and Elevation Displacement
- AIS 5.2.6 Azimuth Displacement analog
- AIS 5.2.7 Elevation Displacement analog
- NOTES:
- Currently supported as an on-demand type of signal. May change to a
- monitored analog signal.
- PDL:
-
- if Drive_on
- get and return current azimuth displacement and current elevation
- displacement from ECA using the Linear_ADC object
-
-
-METHOD: Get_hours
- DESCRIPTION:
- This method returns the current value contained in the elapsed
- turret drive active time.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS:
- elapsed turret drive time - the current elasped turret drive time
- REQUIREMENTS:
- bogus requirements
- REFERENCES:
- AFS 4.11 Respond to CDT elapsed time indicator key
- NOTES:
- bogus notes
- PDL:
-
- return the current value for Drive_system_hours
-
-
-METHOD: Set_drift_adjust
- DESCRIPTION:
- This method provides the ability to set the drift adjust to the
- value represented by the handstation. Drift adjust is either ON
- or OFF.
- VISIBILITY: public
- INPUTS:
- value - new drift adjust value
- ADJUST_OFF - drift adjust mode is OFF
- ADJUST_ON - drift adjust mode is ON
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.6 Capable of turret drift adjustment
- AIS 5.3.1 Drift Adjust discrete
- PDL:
-
- if Drive_on
- set drift adjust discrete to value using Discrete_out object
-
-METHOD: Set_hours
- DESCRIPTION:
- This method will set the turret drive activated elapsed time value
- to the specified value.
- VISIBILITY: public
- INPUTS:
- new_elapsed_time_value - specified turret drive elapsed time value
- OUTPUTS: none
- REQUIREMENTS:
- AFS 4.11 Respond to CDT elapsed time indicator key
- PDL:
-
- set the value of Drive_system_hours to the value specified by
- new_elapsed_time_value
-
-
-METHOD: Set_mode
- DESCRIPTION:
- This method sets the requested mode of the turret drive.
- VISIBILITY: public
- INPUTS:
- mode - new requested mode
- POWER - operating in POWER mode
- STAB - operating in STABILIZED mode
- OUTPUTS: none
- REQUIREMENTS:
- bogus requirements
- PDL:
- if mode is POWER
- set drive mode switchlight to PWR_LAMP using the Console object
- else if mode is STAB
- set drive mode switchlight to STB_LAMP using the Console object
-
-
-METHOD: Set_rate
- DESCRIPTION:
- This method provides the ability to send azimuth and elevation rates
- to the drive. Two parameters are used as input to designate the
- corresponding rates. These parameters must be in degrees per second.
- VISIBILITY: public
- INPUTS:
- azimuth rate - new azimuth rate in degress per second
- elevation rate - new elevation rate in degress per second
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.3 Send Azimuth and Elevation Rate to ECA
- AIS 5.3.4 Elevation Rate analog
- AIS 5.3.5 Azimuth Rate analog
- NOTES:
- May need to couple these analogs with an interface driver to close
- the window between writes and conversions.
- PDL:
-
- if Drive_on
- send the new azimuth rate to the Azimuth analog
- send the new elevation rate to Elevation analog
-
-
-METHOD: Set_speed
- DESCRIPTION:
- This method sets the turret drive speed mode to the specified value
- either high or low based on user input.
- VISIBILITY: public
- INPUTS:
- new_speed_value - new value to set the turret speed to
- LOW_SPEED - turret drive does not allow the maximum rate
- HIGH_SPEED - turret drive allows the maximum rate
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.5 Control Turret
- AIS 5.3.3 Turret High Speed Mode discrete
- PDL:
-
- if Drive_on
- set turret drive high speed mode discrete to the new_speed_value
- using Discrete_out object
-
-
-METHOD: Change_drive_on
- DESCRIPTION:
- This method will be used to report a transition of the drive system
- on discrete.
- VISIBILITY: private
- INPUTS:
- value - new drive system on value
- FALSE - indicates drive not on
- TRUE - indicates drive on
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.9 Monitor Drive System On
- AIS 5.2.1 Drive System On discrete
- REFERENCES:
- bogus references
- NOTES:
- bogus notes
- PDL:
-
- set Drive_on to value
- if Drive_on is FALSE
- deactivate the turret drive using the Drive object
-
-
-METHOD: Change_fault
- DESCRIPTION:
- This method will be used to indicate that a turret malfunction
- has been recognized by the turret drive.
- VISIBILITY: private
- INPUTS:
- value - new value resulting from a fault discrete change
- FALSE - indicates no fault
- TRUE - indicates fault
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.7 Check for ECA failure indication
- AIS 5.2.4 Turret Drive Malfunction discrete
- PDL:
-
- if value
- send turret fault message using the Display object
- else
- return
-
-
-METHOD: Change_stabilized_mode
- DESCRIPTION:
- This method will determine a transition from STAB mode to POWER mode.
- It will set the stab mode lamp on the console.
- VISIBILITY: private
- INPUTS:
- value - new value resulting from a stab mode discrete change
- FALSE - indicates not stabilized mode
- TRUE - indicates stabilized mode
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.8 Monitor Turret Stab Mode Indicate
- AIS 5.2.3 Turret Stab Mode Indicate discrete
- PDL:
-
- if value
- set STAB mode light to LAMP_ON using the Console object
- else value indicates not stabilized mode
- set STAB mode light to LAMP_OFF using the Console object
-
-
-METHOD: Change_thermal_fault
- DESCRIPTION:
- This method will be used to indicate that a thermal fault has been
- recognized by the turret drive.
- VISIBILITY: private
- INPUTS:
- value - new value resulting from a thermal fault discrete change
- FALSE - indicates no thermal fault
- TRUE - indicates thermal fault
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.7 Check for ECA failure indication
- AIS 5.2.2 Turret ECA Thermal Failure discrete
- PDL:
-
- if value
- send thermal fault message using the Display object
- else
- return
-
-TASK DESCRIPTIONS: none
-
-ENDOBJECT: Drive
diff --git a/doc/tools/pdl2texi/Makefile b/doc/tools/pdl2texi/Makefile
deleted file mode 100644
index f4867d32d6..0000000000
--- a/doc/tools/pdl2texi/Makefile
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-# COPYRIGHT (c) 1996-1997.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-CC=gcc
-#CFLAGS=-O4 -fomit-frame-pointer
-CFLAGS=-g
-
-PROJECT=afcc
-TEXINPUTS=/home/gnu/work/binutils-2.6/texinfo:.
-BASE=Drive
-FILES=afcc.texi $(BASE).txt
-PROG=pdl2texi
-
-all: $(PROG)
-
-$(BASE).texi: $(BASE).d ./$(PROG)
- ./$(PROG) $(BASE).d
-
-$(PROG): main.o chain.o
- gcc -static main.o chain.o -o $(PROG)
-
-drive: Drive
-Drive: $(BASE).txt
- /usr1/home/joel/tmp/makeinfo $(PROJECT).texi
-
-main.o: main.c base.h
-
-chain.o: chain.c
-
-dvi: $(PROJECT).dvi
-ps: $(PROJECT).ps
-info: Drive
-html: $(PROJECT).texi $(BASE).txt
- ../textools/texi2html $(PROJECT).texi
-
-$(BASE).txt: $(BASE).d
- ./$(PROG) -v -p "Turret Subsystem" -u "Turret Subsystem" $(BASE).d
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
-
-$(PROJECT).dvi: $(FILES)
- texi2dvi $(PROJECT).texi
-
-view:
- test -r $(PROJECT).ps && ghostview $(PROJECT).ps
-
-tests: test test1
-
-test: $(PROG)
- rm -f $(BASE).texi
- ./$(PROG) -v -p "Turret Subsystem" -u "Turret Subsystem" $(BASE).d
-
-test1:
- rm -f t1.txt
- ./$(PROG) -v t1.d
-
-wtest:
- rm -f $(BASE).txt
- ./$(PROG) -w -v -p "Turret Subsystem" -u "Turret Subsystem" $(BASE).d
-
-enum:
- ./$(PROG) -w -v -p "Magic Subsystem" \
- -u "Magic Subsystem" test_cases/enum.d
- ./$(PROG) -w -v -p "Magic Subsystem" \
- -u "Magic Subsystem" test_cases/enumbad.d
-
-avdas:
- ./$(PROG) -v -p "Magic Subsystem" \
- -u "Magic Subsystem" test_cases/avdas.d
- ./$(PROG) -w -v -p "Magic Subsystem" \
- -u "Magic Subsystem" test_cases/avdas.d
-
-clean:
- rm -f *.o $(PROG) *.txt core *.html $(PROJECT) Drive.texi
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f test_cases/*.txt test_cases/*.texi
-
diff --git a/doc/tools/pdl2texi/address.h b/doc/tools/pdl2texi/address.h
deleted file mode 100644
index 82d73b917d..0000000000
--- a/doc/tools/pdl2texi/address.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* 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
deleted file mode 100644
index fda92a9371..0000000000
--- a/doc/tools/pdl2texi/address.inl
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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/afcc.texi b/doc/tools/pdl2texi/afcc.texi
deleted file mode 100644
index ed5333b5be..0000000000
--- a/doc/tools/pdl2texi/afcc.texi
+++ /dev/null
@@ -1,94 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename afcc
-@settitle AFCC Internals Guide
-@paragraphindent 0
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1996-1997.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-@finalout
-
-@tex
-\global\parindent 0in
-\global\chapheadingskip = 15pt plus 4pt minus 2pt
-\global\secheadingskip = 12pt plus 4pt minus 2pt
-\global\subsecheadingskip = 9pt plus 4pt minus 2pt
-
-@ifclear smallbook
-\global\parskip 6pt plus 1pt
-@end ifclear
-@end tex
-
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* AFCC: . AFCC Objects
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-
-
-@c Joel's Questions
-@c
-@c 1. Why does paragraphindent only impact makeinfo?
-@c
-
-@setchapternewpage odd
-
-@c
-@c Master file for the C User's Guide
-@c
-@include Drive.texi
-@ifinfo
-
-@node Top, Turret Subsystem, Gunner Station Subsystem, (dir)
-@top afcc
-
-This is the info version of the object documentation for the AFCC.
-
-The following subsystems are in the AFCC:
-
-@menu
-* Turret Subsystem::
-* Vehicle Subsystem::
-* Gunner Station Subsystem::
-@end menu
-
-@node Turret Subsystem, , Top, Top
-
-The following objects are in the Turret Subsystem:
-
-@menu
-* Drive Object:: Drive Object
-@end menu
-
-@node Vehicle Subsystem, Gunner Station Subsystem, , Top
-
-@menu
-The following objects are in the Turret Subsystem:
-
-* ::
-@end menu
-
-@node Gunner Station Subsystem, Top, Vehicle Subsystem, Top
-@menu
-
-The following objects are in the Gunner Station Subsystem:
-
-* ::
-@end menu
-
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-@bye
diff --git a/doc/tools/pdl2texi/base.h b/doc/tools/pdl2texi/base.h
deleted file mode 100644
index 12d481b3c7..0000000000
--- a/doc/tools/pdl2texi/base.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * COPYRIGHT (c) 1997.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#ifndef __PDL2AMI_h
-#define __PDL2AMI_h
-
-#include "system.h"
-#include "chain.h"
-
-#ifndef EXTERN
-#define EXTERN extern
-#endif
-
-/*
- * Paragraph size should be kept down because it is allocated for each
- * Line_Control. If this number is large, the memory requirements for
- * the program increase significantly.
- */
-
-#define BUFFER_SIZE (10 * 1024)
-#define PARAGRAPH_SIZE (8 * 1024)
-
-#define NUMBER_ELEMENTS( _x ) (sizeof(_x) / sizeof _x[0])
-
-void exit_application(
- int status
-);
-
-void ProcessFile(
- char *inname,
- char *outname
-);
-
-void strtolower(
- char *dest,
- char *src
-);
-
-void strtoInitialCaps(
- char *dest,
- char *src
-);
-
-void StripBlanks( void );
-
-void MergeParagraphs( void );
-
-int CheckForIncomplete( void );
-
-int CheckOutline( void );
-
-int CheckSections( void );
-
-void GenerateLists( void );
-
-void GenerateAList(
- char *section,
- Chain_Control *the_list
-);
-
-void LookForInternalInconsistencies( void );
-
-int Match_Argument(
- char **array,
- int entries,
- char *users
-);
-
-void usage( void );
-
-void ReadFileIntoChain(
- char *inname
-);
-
-int MergeText( void );
-
-int CheckForBadWhiteSpace();
-
-void RemoveCopyright();
-
-void RemovePagebreaks();
-
-int RemoveExtraBlankLines();
-
-void FormatToTexinfo( void );
-
-void FormatToWord( void );
-
-void PrintFile(
- char *out
-);
-
-void DumpList(
- Chain_Control *the_list
-);
-
-void ReleaseFile();
-
-EXTERN boolean Verbose; /* status/debug msgs */
-EXTERN boolean Statistics; /* statistics msgs */
-EXTERN boolean OutputWord; /* Output MS-Word */
-EXTERN boolean IncompletesAreErrors;
-EXTERN boolean InsertTBDs;
-EXTERN Chain_Control Lines;
-
-EXTERN int NumberOfAttributes;
-EXTERN int NumberOfAssociations;
-EXTERN int NumberOfAbstractTypes;
-EXTERN int NumberOfDataItems;
-EXTERN int NumberOfMethods;
-EXTERN int NumberOfTasks;
-
-
-#endif
diff --git a/doc/tools/pdl2texi/chain.c b/doc/tools/pdl2texi/chain.c
deleted file mode 100644
index 10c96308e9..0000000000
--- a/doc/tools/pdl2texi/chain.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * 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
deleted file mode 100644
index e9221aec60..0000000000
--- a/doc/tools/pdl2texi/chain.h
+++ /dev/null
@@ -1,347 +0,0 @@
-/* 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
deleted file mode 100644
index 7393fee7b8..0000000000
--- a/doc/tools/pdl2texi/chain.inl
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * 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/drive.d b/doc/tools/pdl2texi/drive.d
deleted file mode 100644
index ff41d5ad38..0000000000
--- a/doc/tools/pdl2texi/drive.d
+++ /dev/null
@@ -1,874 +0,0 @@
-OBJECT: Drive
- DESCRIPTION:
- This object provides an interface to the elevation/azimuth
- drive system(ECA).
- THEORY OF OPERATION:
- This object encapsulates the turret drive. The object provides
- an interface to control the turret drive. A method is provided
- to set the azimuth and elevation rate of the drive. Methods are
- provided to request the drive to run in stabilized or power mode
- and set the drive speed to high or low. A method is also provided
- to allow for drift adjust.
-
- This object also tracks drive system on hours. It gets the hours
- from the EEPROM data, allows the hours to be set, updates the
- hours via the activation and deactivation of the drive, and
- provides access to the hours.
-
- The object also provides methods to access azimuth and elevation
- displacement, and methods to process changes in the hardware
- discretes drive on, stabilized mode, thermal fault and fault.
-
- The object also provides methods to enable and disable
- both the remote and turret power interlocks which determine if
- the drive can be driven by the remote or turret handstation
- respectively.
-
-ATTRIBUTE DESCRIPTIONS:
-
-
-ATTRIBUTE: Azimuth_displacement
- DESCRIPTION:
- This attribute represents the current azimuth displacement
- of the turret.
- TYPE: floating point
- RANGE: ???
- UNITS: degrees
- REQUIREMENTS:
- AFS 8.2.11 Receive Azimuth Displacement and Elevation Displacement
- AIS 5.2.6 Azimuth Displacement analog
-
-
-ATTRIBUTE: Azimuth_rate
- DESCRIPTION:
- Azimuth rate command for movement of the turret.
- TYPE: floating point
- UNITS: degrees / second
- DEFAULTS: none
- REQUIREMENTS:
- AFS 8.2.3 Send Azimuth and Elevation Rate to ECA
- AIS 5.3.4 Elevation Rate analog
- AIS 5.3.5 Azimuth Rate analog
-
-
-ATTRIBUTE: Drift_adjust
- DESCRIPTION:
- This attribute represents the current drift adjustment mode
- of the ECA turret drive.
- TYPE: enumerated
- MEMBERS:
- ADJUST_OFF - drift adjust mode is OFF
- ADJUST_ON - drift adjust mode is ON
- REQUIREMENTS:
- AFS 8.2.6 Capable of turret drift adjustment
- AIS 5.3.1 Drift Adjust discrete
-
-
-ATTRIBUTE: Drive_on
- DESCRIPTION:
- Current status of the turret drive. The turret drive may either be
- switched on or off.
- TYPE: boolean
- MEMBERS:
- FALSE - turret drive is off
- TRUE - turret drive is on
- DEFAULTS: FALSE
- REQUIREMENTS:
- AFS 8.2.9 Monitor Drive System On
- AIS 5.2.1 Drive System On discrete
-
-
-ATTRIBUTE: Drive_system_hours
- DESCRIPTION:
- Total number of hours drive has been activated.
- TYPE: integer
- RANGE: 0 - +INFINITY
- UNITS: seconds
- REQUIREMENTS:
- AFS 4.11 Respond to CDT elapsed time indicator key
-
-
-ATTRIBUTE: Elevation_displacement
- DESCRIPTION:
- This attribute represents the current elevation displacement
- of the turret.
- TYPE: floating point
- RANGE: ???
- UNITS: degrees
- REQUIREMENTS:
- AFS 8.2.11 Receive Azimuth Displacement and Elevation Displacement
- AIS 5.2.7 Elevation Displacement analog
-
-
-ATTRIBUTE: Elevation_rate
- DESCRIPTION:
- Elevation rate command for movement of the turret.
- TYPE: floating point
- UNITS: degrees / second
- DEFAULTS: none
- REQUIREMENTS:
- AFS 8.2.3 Send Azimuth and Elevation Rate to ECA
- AIS 5.3.4 Elevation Rate analog
- AIS 5.3.5 Azimuth Rate analog
-
-
-ATTRIBUTE: Fault
- DESCRIPTION:
- This attribute denotes whether a turret malfunction has occurred.
- TYPE: boolean
- MEMBERS:
- TRUE - a turret malfunction has occurred
- FALSE - no turret malfunction has occurred
- DEFAULTS: FALSE
- REQUIREMENTS:
- AFS 8.2.7 Check for ECA failure indication
- AIS 5.2.4 Turret Drive Malfunction discrete
-
-
-ATTRIBUTE: Mode
- DESCRIPTION:
- Current requested drive mode.
- TYPE: enumerated
- MEMBERS:
- POWER - operate in POWER mode
- STAB - operate in STABILIZED mode
- DEFAULTS: POWER
- REQUIREMENTS:
-
-
-ATTRIBUTE: Remote_power_interlock_position
- DESCRIPTION:
- This is the status of the remote's power interlock.
- TYPE: enumerated
- MEMBERS:
- OPEN - relay is open
- CLOSED - relay is closed
- REQUIREMENTS:
- AFS 8.2.12 Control Power Interlock
-
-
-ATTRIBUTE: Speed
- DESCRIPTION:
- Current speed mode of the ECA turret drive.
- TYPE: enumerated
- MEMBERS:
- LOW_SPEED - turret drive does not allow the maximum rate
- HIGH_SPEED - turret drive allows the maximum rate
- DEFAULTS: HIGH
- REQUIREMENTS:
- AFS 8.2.5 Control Turret
- AIS 5.3.3 Turret High Speed Mode discrete
-
-
-ATTRIBUTE: Stabilized_mode
- DESCRIPTION:
- Current drive mode indicating whether the ECA electronics are
- operating in Stabilized mode or Power mode.
- TYPE: boolean
- MEMBERS:
- FALSE - not operating in STABILIZED mode
- TRUE - operating in STABILIZED mode
- DEFAULTS: FALSE
- REQUIREMENTS:
- AFS 8.2.8 Monitor Turret Stab Mode Indicate
- AIS 5.2.3 Turret Stab Mode Indicate discrete
-
-
-ATTRIBUTE: State
- DESCRIPTION:
- Current state of the turret drive.
- TYPE: enumerated
- MEMBERS:
- ACTIVATED - turret drive is ON and active
- DEACTIVATED - turret drive is ON but deactivated
- DEFAULTS: DEACTIVATED
- REQUIREMENTS:
- AFS 8.2.4 Set Plam Grips Active
- AIS 5.3.2 Palm Grips Active discrete
-
-
-ATTRIBUTE: Thermal_fault
- DESCRIPTION:
- This attribute denotes whether a turret thermal fault has occurred.
- TYPE: boolean
- MEMBERS:
- TRUE - a turret thermal fault has occurred
- FALSE - no turret thermal fault has occurred
- DEFAULTS: FALSE
- REQUIREMENTS:
- AFS 8.2.7 Check for ECA failure indication
- AIS 5.2.2 Turret ECA Thermal Failure discrete
-
-
-ATTRIBUTE: Turret_power_interlock_position
- DESCRIPTION:
- This is the status of the turret's power interlock.
- TYPE: enumerated
- MEMBERS:
- OPEN - relay is open
- CLOSED - relay is closed
- REQUIREMENTS:
- AFS 8.2.12 Control Power Interlock
-
-
-ASSOCIATION DESCRIPTIONS: none
-
-ABSTRACT TYPE DESCRIPTIONS:
-
-ABSTRACT TYPE: Drift_adjust_t
- DESCRIPTION:
- This abstract type represents the current drift adjustment mode
- of the ECA turret drive.
- VISIBILITY: public
- DERIVATION: enumerated
- MEMBERS:
- ADJUST_OFF = 0 - drift adjust mode is OFF
- ADJUST_ON = 1 - drift adjust mode is ON
- REQUIREMENTS:
- AIS 5.3.1 Drift Adjust discrete
-
-ABSTRACT TYPE: Interlock_status
- DESCRIPTION:
- An interlock state being OPEN or CLOSED.
- VISIBILITY: private
- DERIVATION: enumerated
- MEMBERS:
- OPEN - interlock relay is in the open state
- CLOSED - interlock relay is in the closed state
- REQUIREMENTS:
- AFS 8.2.12 Control Power Interlock
-
-ABSTRACT TYPE: Mode
- DESCRIPTION:
- This type specifies the drive mode of the ECA turret drive.
- VISIBILITY: public
- DERIVATION: enumerated
- MEMBERS:
- POWER - operate in POWER mode
- STAB - operate in STABILIZED mode
-
-ABSTRACT TYPE: Speed
- DESCRIPTION:
- This type specifies the Speed mode of the ECA turret drive.
- VISIBILITY: public
- DERIVATION: enumerated
- MEMBERS:
- LOW_SPEED = 0 - turret drive does not allow the maximum rate
- HIGH_SPEED = 1 - turret drive allows the maximum rate
- REQUIREMENTS:
- AIS 5.3.3 Turret High Speed Mode discrete
-
-ABSTRACT TYPE: State_t
- DESCRIPTION:
- This type specifies the state of the turret drive.
- VISIBILITY: private
- DERIVATION: enumerated
- MEMBERS:
- DEACTIVATED - turret drive is ON but deactivated
- ACTIVATED - turret drive is ON and active
-
-DATA ITEM DESCRIPTIONS:
-
-DATA ITEM: Azimuth_displacement_control
- DESCRIPTION:
- This data item contains the Azimuth_displacement analog control
- information.
- TYPE: handle
-
-
-DATA ITEM: Azimuth_rate_control
- DESCRIPTION:
- This data item contains the Azimuth_rate analog control
- information.
- TYPE: handle
-
-
-DATA ITEM: Drift_adjust_control
- DESCRIPTION:
- This data item contains the Drift_adjust discrete control
- information.
- TYPE: handle
-
-
-DATA ITEM: Drive_activate_control
- DESCRIPTION:
- This data item contains the activate drive relay control information.
- TYPE: handle
-
-
-DATA ITEM: Drive_activated_timestamp
- DESCRIPTION:
- This data item stores the timestamp of the last time the drive was
- activated. It will be used to compute the activated time when a
- deactivate is received.
- TYPE: time_t
- DEFAULT: none
- NOTES:
- see C library for data type information ???
-
-
-DATA ITEM: Drive_on
- DESCRIPTION:
- The current status of the turret drive representing whether
- the drive is on or off.
- TYPE: boolean
- DEFAULT: FALSE
-
-
-DATA ITEM: Drive_on_control
- DESCRIPTION:
- This data item contains the Drive_on discrete flag control
- information.
- TYPE: handle
-
-
-DATA ITEM: Drive_system_hours
- DESCRIPTION:
- This data item stores the actual time the drive has been active.
- This value will be output by the Get_time method and will be set
- by the Set_time method.
- TYPE: integer
- RANGE: 0 - +INFINITY
- UNITS: seconds
- DEFAULT: 0
-
-
-DATA ITEM: Elevation_rate_control
- DESCRIPTION:
- This data item contains the Elevation_rate analog control
- information.
- TYPE: handle
-
-
-DATA ITEM: Elevation_displacement_control
- DESCRIPTION:
- This data item contains the Elevation_displacement analog control
- information.
- TYPE: handle
-
-
-DATA ITEM: Fault_control
- DESCRIPTION:
- This data item contains the Fault discrete flag control
- information.
- TYPE: handle
-
-
-DATA ITEM: Remote_power_interlock_control
- DESCRIPTION:
- This data item contains the Remote_power_interlock relay control
- information.
- TYPE: handle
-
-
-DATA ITEM: Stabilized_mode_control
- DESCRIPTION:
- This data item contains the Stabilized_mode discrete flag control
- information.
- TYPE: handle
-
-
-DATA ITEM: State
- DESCRIPTION:
- The current state of the turret drive representing an activated or
- deactivated drive.
- TYPE: State_t
- DEFAULT: DEACTIVATED
-
-
-DATA ITEM: Thermal_fault_control
- DESCRIPTION:
- This data item contains the Thermal_fault discrete flag control
- information.
- TYPE: handle
-
-
-DATA ITEM: Turret_power_interlock_control
- DESCRIPTION:
- This data item contains the Turret_power_interlock relay control
- information.
- TYPE: handle
-
-
-DATA ITEM: Turret_power_interlock_status
- DESCRIPTION:
- The accurate status of the turret power interlock relay. This value
- will be used to control the relay during a transition from the remote
- back to the turret console.
- TYPE: Interlock_status
- DEFAULT: none
-
-
-METHODS DESCRIPTIONS:
-
-METHOD: Activate
- DESCRIPTION:
- This method activates the turret drive system. A timestamp of the
- activation is recorded to keep a running count of hours the drive has
- been active.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.4 Set Palm Grips Active
- AIS 5.3.2 Palm Grips Active discrete
- PDL:
-
- if Drive_on
- if State is DEACTIVATED
- close the Drive_activate_control relay using the Relay object
- timestamp Drive_activated_timestamp for Drive_system_hours
- running total
- set State to ACTIVATED
- else
- already in the ACTIVATED state
-
-
-METHOD: Create
- DESCRIPTION:
- This method initializes the Turret Drive object. All monitors of
- turret drive signals are initialized and/or registered. All turret
- drive characteristics are set to their initial values.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- PDL:
-
- set State to DEACTIVATED
-
- get Drive_system_hours to initialize the elapsed drive time
- from the Statistics (eeprom database ???) object - this is
- stored upon shutdown in eeprom
-
- create Fault_control using Discrete_flag object with the
- following attributes
- true_sense - DISCRETE_FLAG_TRUE_IS_1
- is_buffered - false
- is_monitored - true
- period - 10ms
- change_routine - Change_fault
- change fault using initial value returned from create Fault_control
-
- create Thermal_fault_control using Discrete_flag object with
- the following attributes
- true_sense - DISCRETE_FLAG_TRUE_IS_0
- is_buffered - false
- is_monitored - true
- period - 10ms
- change_routine - Change_thermal_fault
- change thermal fault using initial value returned from create
- Thermal_fault_control
-
- create Stabilized_mode_control using Discrete_flag object with the
- following attributes
- true_sense - DISCRETE_FLAG_TRUE_IS_1
- is_buffered - false
- is_monitored - true
- period - 10ms
- change_routine - Change_stabilized_mode
- change stabilized mode using initial value returned from create
- Stabilized_mode_control
-
- create Drive_on_control using Discrete_flag object with the
- following attributes
- true_sense - DISCRETE_FLAG_TRUE_IS_1
- is_buffered - false
- is_monitored - true
- period - 10ms
- change_routine - Change_drive_on
- change drive on using initial value returned from create
- Drive_on_control
-
- create Azimuth_rate_control using the Linear_dac object
- with the following attributes:
- none voltage_low - -10
- voltage_high - +10
- logical_low - -60
- logical_high - +60
- is_buffered - false
- period - none
- initial_value - 0
-
- create Elevation_rate_control using the Linear_dac object with the
- following attributes:
- voltage_low - -10
- voltage_high - +10
- logical_low - -60
- logical_high - +60
- is_buffered - false
- period - none
- initial_value - 0
-
- create Azimuth_displacement_control using the Linear_adc object with
- the following attributes:
- voltage low -
- voltage high -
- logical low -
- logical high -
- is_buffered - false
- is_monitored - false
- period - none
- change_routine - none
- delta - none
-
- create Elevation_displacement_control using the Linear_adc object
- with the following attributes:
- voltage low -
- voltage high -
- logical low -
- logical high -
- is_buffered - false
- is_monitored - false
- period - none
- change_routine - none
- delta - none
-
- create Drive_activate_control using the Relay object with the
- following attributes:
- open_sense - RELAY_OPEN_IS_0
- is_buffered - false
- period - none
- initial_state - RELAY_OPEN
-
- create Turret_power_interlock_control using the Relay object with
- the following attributes:
- open_sense - RELAY_OPEN_IS_0
- is_buffered - false
- period - none
- initial_state - RELAY_OPEN
- set Turret_power_interlock_status to OPEN
-
- create Remote_power_interlock_control using the Relay
- object with the following attributes:
- open_sense - RELAY_OPEN_IS_0
- is_buffered - false
- period - none
- initial_state - RELAY_OPEN
-
- create Drift_adjust_control using the Discrete_out object with
- following attributes:
- is_buffered - false
- period - 10ms
- initial_value - ADJUST_OFF
-
-
-METHOD: Deactivate
- DESCRIPTION:
- This method deactivates the turret drive system. A timestamp of the
- activation is recorded to keep a running count of hours the drive
- has been active.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.4 Set Plam Grips Active
- AIS 5.3.2 Palm Grips Active discrete
- PDL:
-
- if Drive_on
- if State is DEACTIVATED
- timestamp deactivate for Drive_system_hours running total
- deactivate drive by opening the Drive_activate_control relay
- using the Relay object
- compute running time since last activate
- add running time to Drive_system_hours
- set State to DEACTIVATED
- else
- already in the DEACTIVATED state
-
-
-METHOD: Disable_remote_power_interlock
- DESCRIPTION:
- This method disables the turret power interlock safety preventing
- the turret from being driven by the remote's handstation.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.12 Control Power Interlock
- PDL:
-
- open the remote power interlock relay
- return the turret relay to its designated state defined by the
- Turret_power_interlock_status
-
-
-METHOD: Disable_turret_power_interlock
- DESCRIPTION:
- This method disables the turret power interlock safety preventing
- the turret from being driven by the turret's handstation.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.12 Control Power Interlock
- PDL:
-
- Deactivate the Drive object
- open the turret power interlock relay
- set Turret_power_interlock_status to OPEN
-
-
-METHOD: Enable_remote_power_interlock
- DESCRIPTION:
- This method will enable the remote power interlock to allow
- the turret to be driven from the remote station.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.12 Control Power Interlock
- NOTES:
- At this time the turret's power interlock is opened to avoid
- having both relays closed at a time.
- PDL:
-
- if Drive_on
- open the turret power interlock relay using the Relay object
- close the remote power interlock relay using the Relay object
-
-
-METHOD: Enable_turret_power_interlock
- DESCRIPTION:
- This method will enable the turret power interlock to allow
- the turret to be driven from the turret station.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.12 Control Power Interlock
- NOTES:
- At this time the closed state is saved to allow the correct state
- to be returned to in the event a remote overrides the turret and the
- remote gives up its control, we must return to the previous state of
- the turret power interlock.
- PDL:
-
- if Drive_on
- close the turret power interlock relay using the Relay object
-
- set the Turret_power_interlock_status to CLOSED to return to
- when remote gives up control
-
-
-METHOD: Get_AZ_EL_displacement
- DESCRIPTION:
- This method returns the current azimuth displacement and elevation
- displacement from the ECA.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS:
- current azimuth displacement value
- current elevation displacement value
- REQUIREMENTS:
- AFS 8.2.11 Receive Azimuth Displacement and Elevation Displacement
- AIS 5.2.6 Azimuth Displacement analog
- AIS 5.2.7 Elevation Displacement analog
- NOTES:
- Currently supported as an on-demand type of signal. May change to a
- monitored analog signal.
- PDL:
-
- if Drive_on
- get and return current azimuth displacement and current elevation
- displacement from ECA using the Linear_ADC object
-
-
-METHOD: Get_hours
- DESCRIPTION:
- This method returns the current value contained in the elapsed
- turret drive active time.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS:
- elapsed turret drive time - the current elasped turret drive time
- REQUIREMENTS:
- REFERENCES:
- AFS 4.11 Respond to CDT elapsed time indicator key
- NOTES:
- PDL:
-
- return the current value for Drive_system_hours
-
-
-METHOD: Set_drift_adjust
- DESCRIPTION:
- This method provides the ability to set the drift adjust to the
- value represented by the handstation. Drift adjust is either ON
- or OFF.
- VISIBILITY: public
- INPUTS:
- value - new drift adjust value
- ADJUST_OFF - drift adjust mode is OFF
- ADJUST_ON - drift adjust mode is ON
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.6 Capable of turret drift adjustment
- AIS 5.3.1 Drift Adjust discrete
- PDL:
-
- if Drive_on
- set drift adjust discrete to value using Discrete_out object
-
-METHOD: Set_hours
- DESCRIPTION:
- This method will set the turret drive activated elapsed time value
- to the specified value.
- VISIBILITY: public
- INPUTS:
- new_elapsed_time_value - specified turret drive elapsed time value
- OUTPUTS: none
- REQUIREMENTS:
- AFS 4.11 Respond to CDT elapsed time indicator key
- PDL:
-
- set the value of Drive_system_hours to the value specified by
- new_elapsed_time_value
-
-
-METHOD: Set_mode
- DESCRIPTION:
- This method sets the requested mode of the turret drive.
- VISIBILITY: public
- INPUTS:
- mode - new requested mode
- POWER - operating in POWER mode
- STAB - operating in STABILIZED mode
- OUTPUTS: none
- REQUIREMENTS:
- PDL:
- if mode is POWER
- set drive mode switchlight to PWR_LAMP using the Console object
- else if mode is STAB
- set drive mode switchlight to STB_LAMP using the Console object
-
-
-METHOD: Set_rate
- DESCRIPTION:
- This method provides the ability to send azimuth and elevation rates
- to the drive. Two parameters are used as input to designate the
- corresponding rates. These parameters must be in degrees per second.
- VISIBILITY: public
- INPUTS:
- azimuth rate - new azimuth rate in degress per second
- elevation rate - new elevation rate in degress per second
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.3 Send Azimuth and Elevation Rate to ECA
- AIS 5.3.4 Elevation Rate analog
- AIS 5.3.5 Azimuth Rate analog
- NOTES:
- May need to couple these analogs with an interface driver to close
- the window between writes and conversions.
- PDL:
-
- if Drive_on
- send the new azimuth rate to the Azimuth analog
- send the new elevation rate to Elevation analog
-
-
-METHOD: Set_speed
- DESCRIPTION:
- This method sets the turret drive speed mode to the specified value
- either high or low based on user input.
- VISIBILITY: public
- INPUTS:
- new_speed_value - new value to set the turret speed to
- LOW_SPEED - turret drive does not allow the maximum rate
- HIGH_SPEED - turret drive allows the maximum rate
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.5 Control Turret
- AIS 5.3.3 Turret High Speed Mode discrete
- PDL:
-
- if Drive_on
- set turret drive high speed mode discrete to the new_speed_value
- using Discrete_out object
-
-
-METHOD: Change_drive_on
- DESCRIPTION:
- This method will be used to report a transition of the drive system
- on discrete.
- VISIBILITY: private
- INPUTS:
- value - new drive system on value
- FALSE - indicates drive not on
- TRUE - indicates drive on
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.9 Monitor Drive System On
- AIS 5.2.1 Drive System On discrete
- REFERENCES:
- NOTES:
- PDL:
-
- set Drive_on to value
- if Drive_on is FALSE
- deactivate the turret drive using the Drive object
-
-
-METHOD: Change_fault
- DESCRIPTION:
- This method will be used to indicate that a turret malfunction
- has been recognized by the turret drive.
- VISIBILITY: private
- INPUTS:
- value - new value resulting from a fault discrete change
- FALSE - indicates no fault
- TRUE - indicates fault
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.7 Check for ECA failure indication
- AIS 5.2.4 Turret Drive Malfunction discrete
- PDL:
-
- if value
- send turret fault message using the Display object
- else
- return
-
-
-METHOD: Change_stabilized_mode
- DESCRIPTION:
- This method will determine a transition from STAB mode to POWER mode.
- It will set the stab mode lamp on the console.
- VISIBILITY: private
- INPUTS:
- value - new value resulting from a stab mode discrete change
- FALSE - indicates not stabilized mode
- TRUE - indicates stabilized mode
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.8 Monitor Turret Stab Mode Indicate
- AIS 5.2.3 Turret Stab Mode Indicate discrete
- PDL:
-
- if value
- set STAB mode light to LAMP_ON using the Console object
- else value indicates not stabilized mode
- set STAB mode light to LAMP_OFF using the Console object
-
-
-METHOD: Change_thermal_fault
- DESCRIPTION:
- This method will be used to indicate that a thermal fault has been
- recognized by the turret drive.
- VISIBILITY: private
- INPUTS:
- value - new value resulting from a thermal fault discrete change
- FALSE - indicates no thermal fault
- TRUE - indicates thermal fault
- OUTPUTS: none
- REQUIREMENTS:
- AFS 8.2.7 Check for ECA failure indication
- AIS 5.2.2 Turret ECA Thermal Failure discrete
- PDL:
-
- if value
- send thermal fault message using the Display object
- else
- return
-
-END OBJECT: Drive
diff --git a/doc/tools/pdl2texi/isr.h b/doc/tools/pdl2texi/isr.h
deleted file mode 100644
index b9a78fabbc..0000000000
--- a/doc/tools/pdl2texi/isr.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * 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/main.c b/doc/tools/pdl2texi/main.c
deleted file mode 100644
index 3c52d4871a..0000000000
--- a/doc/tools/pdl2texi/main.c
+++ /dev/null
@@ -1,3615 +0,0 @@
-/*
- * main.c
- *
- * This program error checks the OAR PDL and converts it into
- * It works by reading the input file into a linked list of lines
- * and then performing sweeps on that list until all formatting is
- * complete.
- *
- * FEATURES:
- * + rudimentary statistics
- * + forgiveness features
- * + output in Texinfo format
- * + output in a form that a sibling MS-Word VBA program can format
- *
- * CHECKS PERFORMED:
- * + unable to open file
- * + unexpected end of file
- * + line should have a colon
- * + basic text (to right or below) associated with keyword
- * improperly placed
- * + an "incomplete marker" is still in place
- * + missing keywords within a subsection
- * + duplicated keywords withing a subsection
- * + subsections in correct order
- * + section header indicates no subsections and there are subsections
- * + section header indicates subsections and there are no subsections
- * + inconsistent spacing in RAW text. This tends to be 1st line with
- * text is indented further than a subsequent line.
- * + missing components on line (incomplete)
- * + invalid repitition of a subsection
- * + type keyword validated for class, type, and spacing between
- * + both members and range are present
- * + neither members and range are present
- * + enumerated types and attributes have members
- * + non-enumerated types and attributes have ranges.
- * + Object name and end object have the same name
- * + booleans in attribute section list both true and false
- * + task synchronization keyword is checked. There must be a valid
- * type of synchronization primitive and a description when expected.
- * + sections in correct order
- *
- * INTERNAL ERRORS:
- * + attempting to reformat an already formatted line
- * + end of processing reached and no formatting assigned to line
- *
- * CHECKS NOT PERFORMED:
- *
- * TODO:
- *
- * IDEAS NOT IMPLEMENTED:
- * + smarter reporting of sections not in the right order
- * + task which uses multiple synchronization types
- * + improved error messages
- * + no introductions inserted to sections
- * + recognize special "symbols" like infinity, +-, etc.
- *
- * QUESTIONS:
- * + "what do I know" is actually a table and should not be reformatted.
- *
- * COPYRIGHT (c) 1997.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include <ctype.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* XXX -- just for testing -- these should be set by options */
-char DocsNextNode[256] = "";
-char DocsPreviousNode[256] = "";
-char DocsUpNode[256] = "";
-
-extern int optind; /* Why is this not in <stdlib.h>? */
-extern char *optarg; /* Why is this not in <stdlib.h>? */
-
-#ifndef NAME_MAX
-#define NAME_MAX 14 /* Why is the one in limits.h not showing up? */
-#endif
-#define INIT_DATA
-#define EXTERN
-
-#include "base.h"
-
-FILE *OutFile = stdout;
-
-/*************************************************************************
- *************************************************************************
- ***** DATA TYPES AND CONSTANT TABLES *****
- *************************************************************************
- *************************************************************************/
-/*
- * Usage Information
- */
-
-char *Usage_Strings[] = {
- "\n",
- "usage: cmd [-vti?] [-p previous_node] [-u up_node] files ...\n",
- "\n",
- "EOF"
-};
-
-/*
- * The page separator is not really a keyword and will be purged before
- * it is seen elsewhere.
- */
-
-#define PAGE_SEPARATOR "#PAGE"
-
-/*
- * Section Delimiter Keywords
- */
-
-#define MAXIMUM_KEYWORD_LENGTH 32
-
-/*
- * Level indicates where in the format the delimiter is allowed to occur.
- * 1 indicates a major section divider (e.g. "ATTRIBUTE DESCRIPTIONS:").
- * 2 indicates a subsection (e.g. "ATTRIBUTE:").
- * 3 indicates a heading (e.g. "DESCRIPTION:").
- */
-
-#define TEXT 0
-#define SECTION 1
-#define SUBSECTION 2
-#define HEADING 3
-
-typedef enum {
- UNUSED, /* dummy 0 slot */
- OBJECT, /* sections */
- ATTRIBUTE_DESCRIPTIONS,
- ASSOCIATION_DESCRIPTIONS,
- ABSTRACT_TYPE_DESCRIPTIONS,
- DATA_ITEM_DESCRIPTIONS,
- METHOD_DESCRIPTIONS,
- TASK_DESCRIPTIONS,
- END_OBJECT,
-
- ATTRIBUTE, /* subsections */
- ASSOCIATION,
- ABSTRACT_TYPE,
- DATA_ITEM,
- METHOD,
- TASK,
-
- DESCRIPTION, /* headings */
- COPYRIGHT,
- PORTING,
- THEORY_OF_OPERATION,
- DERIVATION,
- DEPENDENCIES,
- NOTES,
- TYPE,
- RANGE,
- MEMBERS,
- UNITS,
- SCALE_FACTOR,
- DEFAULT,
- TOLERANCE,
- REQUIREMENTS,
- REFERENCES,
- VISIBILITY,
- ASSOCIATED_WITH,
- MULTIPLICITY,
- INPUTS,
- OUTPUTS,
- PDL,
- SYNCHRONIZATION,
- TIMING,
-
- RAW_EXAMPLE, /* our own */
-
-} Keyword_indices_t;
-
-#define KEYWORD_FIRST OBJECT
-#define KEYWORD_LAST TIMING
-
-/*
- * Line Management Structure
- */
-
-typedef enum {
- NO_EXTRA_FORMATTING_INFO,
- RAW_OUTPUT,
- PARAGRAPH_OUTPUT,
- BULLET_OUTPUT,
-} ExtraFormat_info_t;
-
-typedef struct {
- Chain_Node Node;
- Keyword_indices_t keyword; /* unused is unknown/undecided */
- ExtraFormat_info_t format;
- int number;
- char Contents[ PARAGRAPH_SIZE ];
-} Line_Control;
-
-typedef enum {
- RT_NO_CHECK, /* don't do this at all */
- RT_FORBIDDEN, /* no text to right allowed */
- RT_OPTIONAL, /* text to right optional -- none below */
- RT_NONE, /* text to right is "none" or nothing -- none below */
- RT_REQUIRED, /* text to right required -- none below */
- RT_BELOW, /* text to right forbidden -- text below required */
- RT_NONE_OR_BELOW, /* text to right is "none" OR there is text below */
- RT_MAYBE_BELOW, /* text to right required -- text below optional */
- RT_EITHER, /* text to right OR below */
- RT_BOTH /* text to right AND below */
-} Keywords_text_mode_t;
-
-typedef enum {
- BL_FORBIDDEN, /* text below forbidden */
- BL_FORMATTED, /* text below is to be formatted as paragraphs */
- BL_RAW, /* text below is to be unprocessed by this program */
-} Keywords_text_below_t;
-
-typedef int (*Keyword_validater_t)( Line_Control * );
-
-typedef struct {
- char Name[ MAXIMUM_KEYWORD_LENGTH ];
- int level;
- Keywords_text_mode_t text_mode;
- Keywords_text_below_t text_below_mode;
- Keyword_validater_t keyword_validation_routine;
-} Keyword_info_t;
-
-/*
- * Keyword Validation Routines
- */
-
-int Validate_visibility(
- Line_Control *line
-);
-
-int Validate_synchronization(
- Line_Control *line
-);
-
-Keyword_info_t Keywords[] = {
- { "unused",
- 0, 0, 0, NULL }, /* so 0 can be invalid */
- { "OBJECT:",
- SECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "ATTRIBUTE DESCRIPTIONS:",
- SECTION, RT_NONE, BL_FORBIDDEN, NULL },
- { "ASSOCIATION DESCRIPTIONS:",
- SECTION, RT_NONE, BL_FORBIDDEN, NULL },
- { "ABSTRACT TYPE DESCRIPTIONS:",
- SECTION, RT_NONE, BL_FORBIDDEN, NULL },
- { "DATA ITEM DESCRIPTIONS:",
- SECTION, RT_NONE, BL_FORBIDDEN, NULL },
- { "METHOD DESCRIPTIONS:",
- SECTION, RT_NONE, BL_FORBIDDEN, NULL },
- { "TASK DESCRIPTIONS:",
- SECTION, RT_NONE, BL_FORBIDDEN, NULL },
- { "ENDOBJECT:",
- SECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
-
- { "ATTRIBUTE:",
- SUBSECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "ASSOCIATION:",
- SUBSECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "ABSTRACT TYPE:",
- SUBSECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "DATA ITEM:",
- SUBSECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "METHOD:",
- SUBSECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "TASK:",
- SUBSECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
-
- { "DESCRIPTION:",
- HEADING, RT_BELOW, BL_FORMATTED, NULL },
- { "COPYRIGHT:",
- HEADING, RT_BELOW, BL_FORMATTED, NULL },
- { "PORTING:",
- HEADING, RT_BELOW, BL_FORMATTED, NULL },
- { "THEORY OF OPERATION:",
- HEADING, RT_BELOW, BL_FORMATTED, NULL },
- { "DERIVATION:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "DEPENDENCIES:",
- HEADING, RT_BELOW, BL_FORMATTED, NULL },
- { "NOTES:",
- HEADING, RT_BELOW, BL_FORMATTED, NULL },
- { "TYPE:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "RANGE:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "MEMBERS:",
- HEADING, RT_BELOW, BL_RAW, NULL },
- { "UNITS:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "SCALE FACTOR:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "DEFAULT:",
- HEADING, RT_EITHER, BL_RAW, NULL },
- { "TOLERANCE:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "REQUIREMENTS:",
- HEADING, RT_BELOW, BL_RAW, NULL },
- { "REFERENCES:",
- HEADING, RT_BELOW, BL_RAW, NULL },
- { "VISIBILITY:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, Validate_visibility },
- { "ASSOCIATED WITH:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "MULTIPLICITY:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "INPUTS:",
- HEADING, RT_NONE_OR_BELOW, BL_RAW, NULL },
- { "OUTPUTS:",
- HEADING, RT_NONE_OR_BELOW, BL_RAW, NULL },
- { "PDL:",
- HEADING, RT_BELOW, BL_RAW, NULL },
- { "SYNCHRONIZATION:",
- HEADING, RT_MAYBE_BELOW, BL_RAW, Validate_synchronization },
- { "TIMING:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "",
- TEXT, RT_NO_CHECK, BL_RAW, NULL }
-};
-
-#define NUMBER_OF_KEYWORDS \
- ( sizeof( Keywords ) / sizeof( Keyword_info_t ) ) - 2
-
-/*
- * Section Descriptions
- */
-
-#define MAXIMUM_ELEMENTS 16
-
-typedef struct {
- Keyword_indices_t keyword;
- boolean is_required;
-} Element_info_t;
-
-typedef struct Section_info_struct_t Section_info_t;
-
-typedef (*Section_validater_t)(
- Section_info_t *,
- Line_Control *, /* start */
- Line_Control * /* next_section */
-);
-
-struct Section_info_struct_t {
- boolean repeats;
- Keyword_indices_t This_section;
- Keyword_indices_t Next_section;
- Section_validater_t section_validation_routine;
- Element_info_t Description[MAXIMUM_ELEMENTS];
-};
-
-int Validate_object(
- Section_info_t *section,
- Line_Control *start,
- Line_Control *next_section
-);
-
-int Validate_attribute(
- Section_info_t *section,
- Line_Control *start,
- Line_Control *next_section
-);
-
-int Validate_abstract_type(
- Section_info_t *section,
- Line_Control *start,
- Line_Control *next_section
-);
-
-
-Section_info_t ObjectSection = {
- FALSE, /* subsections repeat */
- OBJECT, /* this section */
- ATTRIBUTE_DESCRIPTIONS, /* next section */
- Validate_object, /* validation routine */
- {
- { OBJECT, TRUE }, /* 0 */
- { DESCRIPTION, TRUE }, /* 1 */
- { COPYRIGHT, FALSE }, /* 2 */
- { PORTING, FALSE }, /* 3 */
- { THEORY_OF_OPERATION, TRUE }, /* 4 */
- { DERIVATION, FALSE }, /* 5 */
- { DEPENDENCIES, FALSE }, /* 6 */
- { REQUIREMENTS, FALSE }, /* 7 */
- { REFERENCES, FALSE }, /* 8 */
- { NOTES, FALSE }, /* 9 */
- { UNUSED, FALSE }, /* 10 */
- { UNUSED, FALSE }, /* 11 */
- { UNUSED, FALSE }, /* 12 */
- { UNUSED, FALSE }, /* 13 */
- { UNUSED, FALSE }, /* 14 */
- { UNUSED, FALSE }, /* 15 */
- }
-};
-
-Section_info_t AttributeSection = {
- TRUE, /* subsections repeat */
- ATTRIBUTE_DESCRIPTIONS, /* this section */
- ASSOCIATION_DESCRIPTIONS, /* next section */
- Validate_attribute, /* validation routine */
- {
- { ATTRIBUTE, TRUE }, /* 0 */
- { DESCRIPTION, TRUE }, /* 1 */
- { TYPE, TRUE }, /* 2 */
- { MEMBERS, FALSE }, /* 3 */
- { RANGE, FALSE }, /* 4 */
- { UNITS, FALSE }, /* 5 */
- { SCALE_FACTOR, FALSE }, /* 6 */
- { DEFAULT, FALSE }, /* 7 */
- { TOLERANCE, FALSE }, /* 8 */
- { REQUIREMENTS, FALSE }, /* 9 */
- { REFERENCES, FALSE }, /* 10 */
- { NOTES, FALSE }, /* 11 */
- { UNUSED, FALSE }, /* 12 */
- { UNUSED, FALSE }, /* 13 */
- { UNUSED, FALSE }, /* 14 */
- { UNUSED, FALSE }, /* 15 */
- }
-};
-
-Section_info_t AssociationSection = {
- TRUE, /* subsections repeat */
- ASSOCIATION_DESCRIPTIONS, /* this section */
- ABSTRACT_TYPE_DESCRIPTIONS, /* next section */
- NULL, /* validation routine */
- {
- { ASSOCIATION, TRUE }, /* 0 */
- { DESCRIPTION, TRUE }, /* 1 */
- { VISIBILITY, TRUE }, /* 2 */
- { ASSOCIATED_WITH, TRUE }, /* 3 */
- { MULTIPLICITY, TRUE }, /* 4 */
- { REQUIREMENTS, FALSE }, /* 5 */
- { REFERENCES, FALSE }, /* 6 */
- { NOTES, FALSE }, /* 7 */
- { UNUSED, FALSE }, /* 8 */
- { UNUSED, FALSE }, /* 9 */
- { UNUSED, FALSE }, /* 10 */
- { UNUSED, FALSE }, /* 11 */
- { UNUSED, FALSE }, /* 12 */
- { UNUSED, FALSE }, /* 13 */
- { UNUSED, FALSE }, /* 14 */
- { UNUSED, FALSE }, /* 15 */
- }
-};
-
-Section_info_t AbstractTypeSection = {
- TRUE, /* subsections repeat */
- ABSTRACT_TYPE_DESCRIPTIONS, /* this section */
- DATA_ITEM_DESCRIPTIONS, /* next section */
- Validate_abstract_type, /* validation routine */
- {
- { ABSTRACT_TYPE, TRUE }, /* 0 */
- { DESCRIPTION, TRUE }, /* 1 */
- { VISIBILITY, TRUE }, /* 2 */
- { DERIVATION, TRUE }, /* 3 */
- { MEMBERS, FALSE }, /* 4 */
- { RANGE, FALSE }, /* 5 */
- { UNITS, FALSE }, /* 6 */
- { SCALE_FACTOR, FALSE }, /* 7 */
- { DEFAULT, FALSE }, /* 8 */
- { TOLERANCE, FALSE }, /* 9 */
- { REQUIREMENTS, FALSE }, /* 10 */
- { REFERENCES, FALSE }, /* 11 */
- { NOTES, FALSE }, /* 12 */
- { UNUSED, FALSE }, /* 13 */
- { UNUSED, FALSE }, /* 14 */
- { UNUSED, FALSE }, /* 15 */
- }
-};
-
-Section_info_t DataItemSection = {
- TRUE, /* subsections repeat */
- DATA_ITEM_DESCRIPTIONS, /* this section */
- METHOD_DESCRIPTIONS, /* next section */
- NULL, /* validation routine */
- {
- { DATA_ITEM, TRUE }, /* 0 */
- { DESCRIPTION, TRUE }, /* 1 */
- { TYPE, TRUE }, /* 2 */
- { UNITS, FALSE }, /* 3 */
- { SCALE_FACTOR, FALSE }, /* 4 */
- { DEFAULT, FALSE }, /* 5 */
- { TOLERANCE, FALSE }, /* 6 */
- { NOTES, FALSE }, /* 7 */
- { UNUSED, FALSE }, /* 8 */
- { UNUSED, FALSE }, /* 9 */
- { UNUSED, FALSE }, /* 10 */
- { UNUSED, FALSE }, /* 11 */
- { UNUSED, FALSE }, /* 12 */
- { UNUSED, FALSE }, /* 13 */
- { UNUSED, FALSE }, /* 14 */
- { UNUSED, FALSE }, /* 15 */
- }
-};
-
-Section_info_t MethodSection = {
- TRUE, /* subsections repeat */
- METHOD_DESCRIPTIONS, /* this section */
- TASK_DESCRIPTIONS, /* next section */
- NULL, /* validation routine */
- {
- { METHOD, TRUE }, /* 0 */
- { DESCRIPTION, TRUE }, /* 1 */
- { VISIBILITY, TRUE }, /* 2 */
- { INPUTS, TRUE }, /* 3 */
- { OUTPUTS, TRUE }, /* 4 */
- { REQUIREMENTS, FALSE }, /* 5 */
- { REFERENCES, FALSE }, /* 6 */
- { NOTES, FALSE }, /* 7 */
- { PDL, TRUE }, /* 8 */
- { UNUSED, FALSE }, /* 9 */
- { UNUSED, FALSE }, /* 10 */
- { UNUSED, FALSE }, /* 11 */
- { UNUSED, FALSE }, /* 12 */
- { UNUSED, FALSE }, /* 13 */
- { UNUSED, FALSE }, /* 14 */
- { UNUSED, FALSE }, /* 15 */
- }
-};
-
-Section_info_t TaskSection = {
- TRUE, /* subsections repeat */
- TASK_DESCRIPTIONS, /* this section */
- END_OBJECT, /* next section */
- NULL, /* validation routine */
- {
- { METHOD, TRUE }, /* 0 */
- { DESCRIPTION, TRUE }, /* 1 */
- { VISIBILITY, TRUE }, /* 2 */
- { INPUTS, TRUE }, /* 3 */
- { SYNCHRONIZATION, TRUE }, /* 4 */
- { TIMING, TRUE }, /* 5 */
- { REQUIREMENTS, FALSE }, /* 6 */
- { REFERENCES, FALSE }, /* 7 */
- { NOTES, FALSE }, /* 8 */
- { PDL, TRUE }, /* 9 */
- { UNUSED, FALSE }, /* 10 */
- { UNUSED, FALSE }, /* 11 */
- { UNUSED, FALSE }, /* 12 */
- { UNUSED, FALSE }, /* 13 */
- { UNUSED, FALSE }, /* 14 */
- { UNUSED, FALSE }, /* 15 */
- }
-};
-
-
-Section_info_t *Sections[] = {
- &ObjectSection,
- &AttributeSection,
- &AssociationSection,
- &AbstractTypeSection,
- &DataItemSection,
- &MethodSection,
- &TaskSection
-};
-
-/*
- * exit_application
- */
-
-void exit_application(
- int status
-)
-{
- fprintf( stderr, "*** Error encountered ***\n" );
-/*
- fprintf( stderr, "*** Error encountered on line %d ***\n", CurrentLine );
-*/
- fclose( OutFile );
- exit( 1 );
-}
-
-/*************************************************************************
- *************************************************************************
- ***** LINE MANIPULATION ROUTINES *****
- *************************************************************************
- *************************************************************************/
-
-/*
- * PrintLine
- */
-
-void PrintLine(
- Line_Control *line
-)
-{
- assert( line );
-
- if ( line->number == -1 )
- fprintf( stderr, " " );
- else
- fprintf( stderr, "%5d", line->number );
-
-#if 0
- fprintf( stderr, "%s\n", line->Contents );
-#else
- /*
- * Include some debugging information
- */
- fprintf(
- stderr,
- "<%d,%d>:%s\n",
- line->keyword,
- line->format,
- line->Contents
- );
-#endif
-}
-
-Chain_Control Line_Pool;
-
-/*
- * FillLinePool
- */
-
-void FillLinePool( void )
-{
- void *pool;
-
-#define LINE_POOL_FILL_COUNT 100
-
- pool = malloc( sizeof( Line_Control ) * LINE_POOL_FILL_COUNT );
- assert( pool );
-
- _Chain_Initialize(
- &Line_Pool,
- pool,
- LINE_POOL_FILL_COUNT,
- sizeof( Line_Control )
- );
-}
-
-/*
- * AllocateLine
- */
-
-Line_Control *AllocateLine( void )
-{
- Line_Control *new_line;
-
- new_line = (Line_Control *) _Chain_Get( &Line_Pool );
- if ( !new_line ) {
- FillLinePool();
- new_line = (Line_Control *) _Chain_Get( &Line_Pool );
- assert( new_line );
- }
-
-/*
- * This is commented out because although it is helpful during debug,
- * it consumes a significant percentage of the program's execution time.
- */
-
- memset( new_line->Contents, '\0', sizeof( new_line->Contents ) );
- new_line->number = -1;
-
- new_line->keyword = UNUSED;
- new_line->format = NO_EXTRA_FORMATTING_INFO;
-
- new_line->Node.next = NULL;
- new_line->Node.previous = NULL;
-
- return new_line;
-}
-
-/*
- * FreeLine
- */
-
-void FreeLine(
- Line_Control *line
-)
-{
- fflush( stdout );
- _Chain_Append( &Line_Pool, &line->Node );
-}
-
-/*
- * DeleteLine
- */
-
-Line_Control *DeleteLine(
- Line_Control *line
-)
-{
- Line_Control *next;
-
- next = (Line_Control *)line->Node.next;
- _Chain_Extract( &line->Node );
- FreeLine( line );
- return next;
-}
-
-/*
- * PrintSurroundingLines
- */
-
-void PrintSurroundingLines(
- Line_Control *line,
- int backward,
- int forward
-)
-{
- int i;
- int real_backward;
- Line_Control *local;
-
- for ( local=line, real_backward=0, i=1 ;
- i<=backward ;
- i++, real_backward++ ) {
- if ( &local->Node == Lines.first )
- break;
- local = (Line_Control *) local->Node.previous;
- }
-
- for ( i=1 ; i<=real_backward ; i++ ) {
- PrintLine( local );
- local = (Line_Control *) local->Node.next;
- }
-
- PrintLine( local );
-
- for ( i=1 ; i<=forward ; i++ ) {
- local = (Line_Control *) local->Node.next;
- if ( _Chain_Is_last( &local->Node ) )
- break;
- PrintLine( local );
- }
-
-}
-
-/*
- * SetLineFormat
- */
-
-void SetLineFormat(
- Line_Control *line,
- ExtraFormat_info_t format
-)
-{
- if ( line->format != NO_EXTRA_FORMATTING_INFO ) {
- fprintf( stderr, "Line %d is already formatted\n", line->number );
- PrintLine( line );
- assert( FALSE );
- }
-
- line->format = format;
-}
-
-/*
- * LineCopyFromRight
- */
-
-void LineCopyFromRight(
- Line_Control *line,
- char *dest
-)
-{
- char *p;
-
- for ( p=line->Contents ; *p != ':' ; p++ )
- ;
- p++; /* skip the ':' */
- for ( ; isspace( *p ) ; p++ )
- ;
-
- strcpy( dest, p );
-
-}
-
-/*
- * LineCopySectionName
- */
-
-void LineCopySectionName(
- Line_Control *line,
- char *dest
-)
-{
- char *p;
- char *d;
-
- p = line->Contents;
- d = dest;
-
- if ( *p == '@' ) { /* skip texinfo command */
- while ( !isspace( *p++ ) )
- ;
- }
-
- for ( ; *p != ':' ; )
- *d++ = *p++;
-
- *d = '\0';
-}
-
-/*
- * FormatParagraph
- */
-
-Line_Control *FormatParagraph(
- Line_Control *starting
-)
-{
- Chain_Node *insert_after;
- Line_Control *to_add;
- Line_Control *new_line;
- char Paragraph[ PARAGRAPH_SIZE ];
- int starting_line;
- char *src;
- char *dest;
- boolean do_loop;
- boolean is_bullet;
- int length;
- int i;
-
- length = 0;
-
- starting_line = starting->number;
- insert_after = starting->Node.previous;
- to_add = starting;
-
- dest = Paragraph;
-
- is_bullet = FALSE;
-
- for ( ; ; ) {
- src = to_add->Contents;
-
- for ( ; *src && isspace( *src ) ; src++ ); /* skip leading spaces */
-
- if ( !strncmp( src, "@table", 6 ) ) {
-
- to_add = DeleteLine( to_add );
- src = to_add->Contents;
- for ( i=4 ; *src && isspace( *src ) && i-- ; src++ );
- /* skip leading spaces */
-
- for ( ; ; ) {
- if ( _Chain_Is_last( &to_add->Node ) ) {
- fprintf(
- stderr,
- "Missing end table for table starting at line %d\n",
- starting_line
- );
- exit_application( 1 );
- }
- if ( !strncmp( src, "@end table", 10 ) ) {
- to_add = DeleteLine( to_add );
- return to_add;
- }
- strcpy( Paragraph, src );
- strcpy( to_add->Contents, Paragraph );
- SetLineFormat( to_add, PARAGRAPH_OUTPUT );
- to_add->keyword = RAW_EXAMPLE;
- to_add = (Line_Control *) to_add->Node.next;
-
- src = to_add->Contents;
- for ( i=4 ; *src && isspace( *src ) && i-- ; src++ );
- /* skip leading spaces */
-
- }
- }
-
- if ( *src == '+' ) {
- if ( is_bullet == TRUE )
- break;
- is_bullet = TRUE;
- for ( src++ ; isspace(*src) ; src++ ) ;
- }
-
- do_loop = TRUE;
- while ( *src && do_loop == TRUE ) {
-
- if ( isspace( *src ) ) { /* convert multiple spaces to 1 */
-
- if ( *(dest-1) == '.' ) { /* two spaces after period */
- *dest++ = ' ';
- length++;
- }
-
- assert( length < PARAGRAPH_SIZE );
-
- *dest++ = ' ';
- length++;
-
- assert( length < PARAGRAPH_SIZE );
-
- for ( ; isspace( *src ) ; src++ )
- if ( !*src ) {
- do_loop = FALSE;
- break;
- }
-
- continue;
-
- } else {
- *dest++ = *src;
- length++;
- assert( length < PARAGRAPH_SIZE );
- src++;
- }
- }
-
- to_add = DeleteLine( to_add );
-
- if ( _Chain_Is_last( &to_add->Node ) )
- break;
-
- if ( !strlen( to_add->Contents ) )
- break;
-
- if ( to_add->keyword )
- break;
-
- if ( !isspace( *(dest-1) ) ) {
- if ( *(dest-1) == '.' ) {
- *dest++ = ' ';
- length++;
- assert( length < PARAGRAPH_SIZE );
- }
- *dest++ = ' ';
- length++;
- assert( length < PARAGRAPH_SIZE );
- }
- }
-
- new_line = AllocateLine();
-
- SetLineFormat( new_line, (is_bullet) ? BULLET_OUTPUT : PARAGRAPH_OUTPUT );
-
- *dest = '\0';
-
- strcpy( new_line->Contents, Paragraph );
-
- new_line->number = starting_line;
-
- _Chain_Insert( insert_after, &new_line->Node );
-
- return new_line;
-}
-
-/*
- * FormatMultipleParagraphs
- */
-
-Line_Control *FormatMultipleParagraphs(
- Line_Control *starting
-)
-{
- Line_Control *line = starting;
-
- if ( _Chain_Is_last( &line->Node ) ) {
- fprintf( stderr, "end of file reached when expecting text\n" );
- exit_application( 0 );
- }
-
- if ( line->keyword ) {
- line = (Line_Control *) line->Node.next;
-
- if ( _Chain_Is_last( &line->Node ) ) {
- fprintf( stderr, "end of file reached when expecting text\n" );
- exit_application( 0 );
- }
- }
-
- for ( ;; ) {
- assert( line );
-
- if ( _Chain_Is_last( &line->Node ) )
- break;
-
- if ( line->keyword )
- break;
-
- if ( !strlen( line->Contents ) ) {
- line = DeleteLine( line );
- continue;
- }
-
- line = FormatParagraph( line );
- line = (Line_Control *) line->Node.next;
- }
-}
-
-/*************************************************************************
- *************************************************************************
- ***** END OF LINE MANIPULATION ROUTINES *****
- *************************************************************************
- *************************************************************************/
-
-/*
- * CountKeywordOccurrences
- */
-
-int CountKeywordOccurrences(
- Keyword_indices_t keyword
-)
-{
- int count = 0;
- Line_Control *line;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next ) {
- if ( line->keyword == keyword )
- count += 1;
- }
-
- return count;
-}
-
-/*
- * main
- */
-
-int main(
- int argc,
- char **argv
-)
-{
- int c;
- int index;
- boolean single_file_mode;
-
- Verbose = FALSE;
- Statistics = FALSE;
- OutputWord = FALSE;
- IncompletesAreErrors = TRUE;
- InsertTBDs = FALSE;
-
- while ((c = getopt(argc, argv, "istvw?n:p:u:")) != EOF) {
- switch (c) {
- case 'i':
- IncompletesAreErrors = FALSE;
- break;
- case 't':
- InsertTBDs = TRUE;
- break;
- case 'v':
- Verbose = TRUE;
- break;
- case 'n':
- strcpy( DocsNextNode, optarg );
- break;
- case 'p':
- strcpy( DocsPreviousNode, optarg );
- break;
- case 'u':
- strcpy( DocsUpNode, optarg );
- break;
- case 's':
- Statistics = TRUE;
- break;
- case 'w':
- OutputWord = TRUE;
- break;
- case '?':
- usage();
- return 0;
- }
- }
-
- if ( Verbose ) {
- fprintf( stderr, "Arguments successfully parsed\n" );
- fprintf( stderr, "Next Node = (%s)\n", DocsNextNode );
- fprintf( stderr, "Previous Node = (%s)\n", DocsPreviousNode );
- fprintf( stderr, "Up Node = (%s)\n", DocsUpNode );
- fprintf( stderr, "Output Format = (%s)\n", (OutputWord) ? "Word" : "Texi" );
- }
-
- FillLinePool();
-
- for ( index=optind ; index < argc ; index++ ) {
- ProcessFile( argv[ index ], NULL );
- }
-
- if ( Verbose )
- fprintf( stderr, "Exitting\n" );
-
- return 0;
-}
-
-/*
- * ProcessFile
- */
-
-void ProcessFile(
- char *inname,
- char *outname
-)
-{
- char out[ 256 ];
- int index;
- int out_index;
-
- /*
- * Automatically generate the output file name.
- */
-
- if ( outname == NULL ) {
- out_index = 0;
- for( index=0 ; inname[index] && inname[index] != '.' ; index++ ) {
-/*
- if ( inname[ index ] != '_' )
-*/
- out[ out_index++ ] = inname[ index ];
- }
-
- if ( OutputWord ) {
- out[ out_index++ ] = '.';
- out[ out_index++ ] = 't';
- out[ out_index++ ] = 'x';
- out[ out_index++ ] = 't';
- } else {
- out[ out_index++ ] = '.';
- out[ out_index++ ] = 't';
- out[ out_index++ ] = 'e';
- out[ out_index++ ] = 'x';
- out[ out_index++ ] = 'i';
- }
- out[ out_index ] = '\0';
-
- }
-
- /*
- * Read the file into our internal data structure
- */
-
- if ( Verbose )
- printf( "Processing (%s) -> (%s)\n", inname, out );
-
- ReadFileIntoChain( inname );
-
- if ( Verbose )
- fprintf( stderr, "-------->FILE READ IN\n" );
-
- /*
- * Remove any spaces before the keyword and mark each keyword line as
- * such. Also remove extra white space at the end of lines.
- */
-
- StripBlanks();
-
- if ( Verbose )
- fprintf( stderr, "-------->BLANKS BEFORE KEYWORDS STRIPPED\n" );
-
- /*
- * Count the number of each type of thing
- */
-
- NumberOfAttributes = CountKeywordOccurrences( ATTRIBUTE );
- NumberOfAssociations = CountKeywordOccurrences( ASSOCIATION );
- NumberOfAbstractTypes = CountKeywordOccurrences( ABSTRACT_TYPE );
- NumberOfDataItems = CountKeywordOccurrences( DATA_ITEM );
- NumberOfMethods = CountKeywordOccurrences( METHOD );
- NumberOfTasks = CountKeywordOccurrences( TASK );
-
- if ( Verbose || Statistics ) {
- fprintf( stderr, "NUMBER OF ATTRIBUTES = %d\n", NumberOfAttributes );
- fprintf( stderr, "NUMBER OF ASSOCIATIONS = %d\n", NumberOfAssociations );
- fprintf( stderr, "NUMBER OF ABSTRACT TYPES = %d\n", NumberOfAbstractTypes);
- fprintf( stderr, "NUMBER OF DATA ITEMS = %d\n", NumberOfDataItems );
- fprintf( stderr, "NUMBER OF METHODS = %d\n", NumberOfMethods );
- fprintf( stderr, "NUMBER OF TASKS = %d\n", NumberOfTasks );
- }
-
- /*
- * 1. Merge paragraphs entered as multiple lines into a single node
- * on the chain.
- * 2. Clean up "colon lines".
- */
-
- if ( MergeText() == -1 )
- exit_application( 1 );
-
- if ( Verbose )
- fprintf( stderr, "-------->PARAGRAPHS MERGED\n" );
-
- RemovePagebreaks();
-
- /*
- * Remove extraneous white space
- */
-
- if ( Verbose )
- fprintf( stderr, "-------->PAGEBREAKS REMOVED\n" );
-
- /*
- * At this point, the only unmarked lines should be empty or errors.
- * This deletes empty unmarked lines and flags the others as errors.
- */
-
- if ( RemoveExtraBlankLines() == -1 )
- exit_application( 1 );
-
- if ( Verbose )
- fprintf( stderr, "-------->EXTRA BLANK LINES REMOVED\n" );
-
- /*
- * Now report which lines do not appear to be complete
- */
-
- if ( CheckForIncomplete() == -1 )
- exit_application( 1 );
-
- if ( Verbose )
- fprintf( stderr, "-------->CHECKED FOR INCOMPLETE KEYWORDS\n" );
-
- /*
- * Check that all the required sections are present.
- */
-
- if ( CheckOutline() == -1 )
- exit_application( 1 );
-
- if ( Verbose )
- fprintf( stderr, "-------->CHECKED FOR HIGH LEVEL SECTION PROBLEMS\n" );
-
- /*
- * Check for problems in each section.
- */
-
- if ( CheckSections() == -1 )
- exit_application( 1 );
-
- if ( Verbose )
- fprintf( stderr, "-------->CHECKED FOR INTERNAL SECTION PROBLEMS\n" );
-
- /*
- * Look for Internal Consistencies
- */
-
- if ( Verbose )
- fprintf( stderr, "-------->LOOKING FOR ERRORS\n" );
-
- LookForInternalInconsistencies();
-
- /*
- * Formatting the file
- */
-
- if ( OutputWord ) {
- FormatToWord();
- if ( Verbose )
- fprintf( stderr, "-------->FILE FORMATTED TO WORD\n" );
- } else {
- FormatToTexinfo();
- if ( Verbose )
- fprintf( stderr, "-------->FILE FORMATTED TO TEXINFO\n" );
- }
-
- /*
- * Print the file
- */
-
- PrintFile( out );
-
- if ( Verbose )
- fprintf( stderr, "-------->FILE PRINTED\n" );
-
- /*
- * Clean Up
- */
-
- ReleaseFile();
-
- if ( Verbose )
- fprintf( stderr, "-------->FILE RELEASED\n" );
-}
-
-/*
- * LookForInternalInconsistencies
- *
- * This routine looks for lines with no formatting information and
- * lines with too much formatting information.
- */
-
-void LookForInternalInconsistencies( void )
-{
- Line_Control *line;
- int i;
- int errors = 0;
- char *src;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *)line->Node.next
- ) {
- if ( !line->keyword && line->format == NO_EXTRA_FORMATTING_INFO ) {
- fprintf(
- stderr,
- "\nLine %d has no keyword or formatting:\n",
- line->number
- );
- PrintSurroundingLines( line, 3, 3 );
- errors++;
- }
- }
-
- if ( errors )
- exit_application( 1 );
-}
-
-/*
- * usage
- */
-
-void usage( void )
-{
- int index;
-
- for ( index=0 ; strcmp( Usage_Strings[ index ], "EOF" ) ; index++ )
- fprintf( stderr, Usage_Strings[ index ] );
-}
-
-/*
- * ReadFileIntoChain
- */
-
-void ReadFileIntoChain(
- char *inname
-)
-{
- FILE *InFile;
- int line_count;
- int max_length;
- char *line;
- char Buffer[ BUFFER_SIZE ];
- Line_Control *new_line;
-
- InFile = fopen( inname, "r" );
-
- if ( !InFile ) {
- fprintf( stderr, "Unable to open (%s)\n", inname );
- exit( 1 );
- }
- assert( InFile );
-
- max_length = 0;
- line_count = 0;
-
- _Chain_Initialize_empty( &Lines );
-
- for ( ;; ) {
- line = fgets( Buffer, BUFFER_SIZE, InFile );
- if ( !line )
- break;
-
- Buffer[ strlen( Buffer ) - 1 ] = '\0';
-
- new_line = AllocateLine();
-
- strcpy( new_line->Contents, Buffer );
-
- new_line->number = ++line_count;
-
- _Chain_Append( &Lines, &new_line->Node );
- }
-
- fclose( InFile );
-}
-
-/*
- * StripBlanks
- */
-
-void StripBlanks( void )
-{
- Line_Control *line;
- Keyword_indices_t index;
- int indentation;
- int length;
- Keyword_info_t *key;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next
- ) {
-
- /*
- * Strip white space from the end of each line
- */
-
- length = strlen( line->Contents );
-
- while ( isspace( line->Contents[ --length ] ) )
- line->Contents[ length ] = '\0';
-
- /*
- * Strip white space from the front of each keyword line.
- */
-
- for ( index=KEYWORD_FIRST ; index <= KEYWORD_LAST ; index++ ) {
- key = &Keywords[ index ];
-
- switch ( key->level ) {
- case SECTION: indentation = 0; break;
- case SUBSECTION: indentation = 0; break;
- case HEADING: indentation = 2; break;
- default: assert( FALSE );
- }
-
- if ( !strncmp( &line->Contents[ indentation ], key->Name,
- strlen( key->Name ) ) ) {
- if ( indentation )
- strcpy( line->Contents, &line->Contents[ indentation ] );
- line->keyword = index;
- break;
- }
- }
- }
-}
-
-/*
- * CrunchRight
- */
-
-boolean CrunchRight(
- Line_Control *line
-)
-{
- char Buffer[ PARAGRAPH_SIZE ];
- char *src;
- char *dest;
- boolean is_text_to_right = FALSE;
-
- src = line->Contents;
- dest = Buffer;
-
- while( *src != ':' ) {
- if ( !*src ) {
- fprintf(
- stderr,
- "Line %d should have had a colon\n",
- line->number
- );
- exit_application( 1 );
- }
- *dest++ = *src++;
- }
-
- *dest++ = *src++; /* this is the ':' */
-
- if ( *src ) {
- *dest++ = ' ';
- while ( *src && isspace( *src ) )
- src++;
-
- if ( *src )
- is_text_to_right = TRUE;
-
- while ( *src )
- *dest++ = *src++;
- }
-
- *dest = '\0';
-
- strcpy( line->Contents, Buffer );
-
- return is_text_to_right;
-}
-
-/*
- * CrunchBelow
- */
-
-void CrunchBelow(
- Line_Control *start_line,
- Keywords_text_below_t text_below_mode
-)
-{
- Line_Control *line;
- int i;
- int leading_white;
- int length;
-
- switch ( text_below_mode ) {
- case BL_FORBIDDEN:
- assert( FALSE );
- case BL_FORMATTED:
- (void) FormatMultipleParagraphs( start_line );
- break;
- case BL_RAW:
- for ( line = (Line_Control *) start_line->Node.next;
- !_Chain_Is_last( &line->Node ) ;
- ) {
- if ( strlen( line->Contents ) )
- break;
- line = DeleteLine( line );
- }
-
- for ( i=0 ; isspace( line->Contents[ i ] ) ; i++ )
- ;
-
- leading_white = i;
-
- for ( ;
- !_Chain_Is_last( &line->Node ) ;
- ) {
-
- assert( line );
-
- if ( line->keyword )
- break;
-
- assert( !_Chain_Is_last( &line->Node ) );
-
- length = strlen( line->Contents );
-
- if ( length ) {
- if ( length < leading_white ) {
- fprintf(
- stderr,
- "\nLine %d %s:\n",
- line->number,
- "has inconsistent spacing -- is too short -- see 1st line of text"
- );
- PrintSurroundingLines( line, 0, 0 );
- fprintf( stderr, "\n" );
-
- }
- for ( i=0 ; i < leading_white ; i++ ) {
- if ( !isspace( line->Contents[ i ] ) ) {
- fprintf(
- stderr,
- "\nLine %d %s:\n",
- line->number,
- "has inconsistent spacing -- see 1st line of text"
- );
- PrintSurroundingLines( line, 0, 0 );
- fprintf( stderr, "\n" );
- break;
- }
- }
-
- strcpy( line->Contents, &line->Contents[ leading_white ] );
-
- SetLineFormat( line, RAW_OUTPUT );
- line = (Line_Control *) line->Node.next;
- } else {
- SetLineFormat( line, RAW_OUTPUT );
- /* line = DeleteLine( line ); */
- line = (Line_Control *) line->Node.next;
- }
- }
- break;
- }
-}
-
-/*
- * MergeText
- */
-
-/* XXX expand this and address the error numbers */
-char *Format_Errors[] = {
- /* unused */ "no formatting error",
- /* RT_NO_CHECK */ "why am I here",
- /* RT_FORBIDDEN */ "no text allowed to right or below",
- /* RT_OPTIONAL */ "text to right optional -- none below",
- /* RT_NONE */ "text to right is \"none\" or nothing -- none below",
- /* RT_REQUIRED */ "text to right required -- none below",
- /* RT_BELOW */ "text to right forbidden -- text below required",
- /* RT_NONE_OR_BELOW */ "text to right is \"none\" OR there is text below",
- /* RT_MAYBE_BELOW */ "text to right required -- text below optional",
- /* RT_EITHER */ "text to right OR below",
- /* RT_BOTH */ "text to right AND below"
-};
-
-
-int MergeText( void )
-{
- Line_Control *line;
- Line_Control *next;
- Line_Control *new_line;
- Keyword_info_t *key;
- boolean is_text_to_right;
- boolean is_text_below;
- boolean add_text_to_right;
- boolean add_text_below;
- int errors = 0;
- int error_code = 0;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- ) {
-
- if ( error_code ) {
-
- fprintf(
- stderr,
- "\nLine %d %s:\n",
- line->number,
- Format_Errors[ error_code ]
- );
- PrintSurroundingLines( line, 0, 3 );
- fprintf( stderr, "\n" );
- error_code = 0;
- line = (Line_Control *) line->Node.next;
- }
-
- key = &Keywords[ line->keyword ];
-
- if ( !line->keyword || key->text_mode == RT_NO_CHECK ) {
- line = (Line_Control *) line->Node.next;
- continue;
- }
-
- /*
- * Figure out where the text is for this keyword. It is a pretty
- * ugly thing to look ahead for text below because of intermediate
- * blank lines which we are not allowed to remove.
- */
-
- add_text_to_right = FALSE;
- add_text_below = FALSE;
-
- is_text_to_right = CrunchRight( line );
-
- is_text_below = FALSE;
-
- for ( next = (Line_Control *) line->Node.next ;
- !_Chain_Is_last( &next->Node ) ;
- next = (Line_Control *) next->Node.next ) {
-
- if ( next->keyword )
- break;
-
- if ( strlen( next->Contents ) ) {
- is_text_below = TRUE;
- break;
- }
- }
-
- switch ( key->text_mode ) {
- case RT_NO_CHECK: /* no requirements */
- break;
-
- case RT_FORBIDDEN: /* no text to right or below allowed */
- if ( is_text_to_right || is_text_below ) {
- error_code = 1;
- errors++;
- continue;
- }
- break;
-
- case RT_OPTIONAL: /* text to right optional -- none below */
- if ( is_text_below ) {
- error_code = 2;
- errors++;
- continue;
- }
- break;
-
- case RT_NONE: /* text to right is "none" or nothing -- none below */
- if ( (is_text_to_right && !strstr( line->Contents, "none" )) ||
- is_text_below ) {
- error_code = 3;
- errors++;
- continue;
- }
- break;
-
- case RT_REQUIRED: /* text to right required -- none below */
- if ( is_text_below ) {
- error_code = 4;
- errors++;
- continue;
- }
-
- if ( !is_text_to_right ) {
- if ( !InsertTBDs ) {
- error_code = 4;
- errors++;
- continue;
- } else
- add_text_to_right = TRUE;
- }
- break;
-
- case RT_BELOW: /* text to right forbidden -- text below required */
- if ( is_text_to_right ) {
- error_code = 5;
- errors++;
- continue;
- }
-
- if ( !is_text_below ) {
- if ( !InsertTBDs ) {
- error_code = 5;
- errors++;
- continue;
- } else
- add_text_below = TRUE;
- }
- break;
-
- case RT_NONE_OR_BELOW: /* text to right is "none" OR text below */
-
- if ( is_text_to_right ) {
- if ( strstr( line->Contents, "none" ) )
- break;
- error_code = 6;
- errors++;
- continue;
- }
-
- if ( !is_text_below ) {
- if ( !InsertTBDs ) {
- error_code = 6;
- errors++;
- continue;
- } else
- add_text_to_right = TRUE;
- }
- break;
- /* text to right required -- text below optional */
- case RT_MAYBE_BELOW:
- if ( !is_text_to_right ) {
- error_code = 7;
- errors++;
- continue;
- }
- break;
-
- case RT_EITHER: /* text to right OR below */
- if ( !(is_text_to_right || is_text_below) ) {
- if ( !InsertTBDs ) {
- error_code = 8;
- errors++;
- continue;
- } else
- add_text_to_right = TRUE;
- }
- break;
-
- case RT_BOTH: /* text to right AND below */
- if ( !(is_text_to_right && is_text_below) ) {
- if ( !InsertTBDs ) {
- error_code = 9;
- errors++;
- continue;
- } else {
- add_text_to_right = TRUE;
- add_text_below = TRUE;
- }
- }
- break;
- }
-
- if ( add_text_to_right )
- strcat( line->Contents, " TBD" );
-
- if ( add_text_below ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "TBD" );
- _Chain_Insert( &line->Node, &new_line->Node );
- is_text_below = TRUE;
- }
-
- if ( is_text_below )
- CrunchBelow( line, key->text_below_mode );
-
- line = (Line_Control *) line->Node.next;
- }
- return (errors) ? -1 : 0;
-}
-
-/*
- * CheckForIncomplete
- */
-
-char *IncompleteMarkers[] = {
- "??",
- "xxx",
- "XXX",
- "xyz",
- "XYZ"
-};
-
-int CheckForIncomplete()
-{
- Line_Control *line;
- int i;
- int errors = 0;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next
- ) {
- for ( i=0 ; i < NUMBER_ELEMENTS( IncompleteMarkers ) ; i++ ) {
- if ( !strstr( line->Contents, IncompleteMarkers[ i ] ) )
- continue;
-
- fprintf(
- stderr,
- "\nLine %d %s:\n",
- line->number,
- "appears to be incomplete"
- );
- PrintSurroundingLines( line, 0, 0 );
- fprintf( stderr, "\n" );
- if ( IncompletesAreErrors )
- errors++;
- break;
- }
- }
- return ( errors ) ? -1 : 0;
-}
-
-/*
- * CheckOutline
- *
- * Insure all section headers are present.
- * Check sections which say "none", really have subsections.
- * Check sections which have subsections, don't say none.
- */
-
-int CheckOutline( void )
-{
- Line_Control *line;
- int count;
- int errors = 0;
- void *none_present;
- boolean KeywordsPresent[ KEYWORD_LAST + 1 ];
- Keyword_indices_t keyword;
-
- for ( keyword=0 ; keyword <= KEYWORD_LAST ; keyword++ )
- KeywordsPresent[ keyword ] = FALSE;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next
- ) {
-
- KeywordsPresent[ line->keyword ] = TRUE;
-
- switch ( line->keyword ) {
- case ATTRIBUTE_DESCRIPTIONS:
- count = NumberOfAttributes;
- break;
- case ASSOCIATION_DESCRIPTIONS:
- count = NumberOfAssociations;
- break;
- case ABSTRACT_TYPE_DESCRIPTIONS:
- count = NumberOfAbstractTypes;
- break;
- case DATA_ITEM_DESCRIPTIONS:
- count = NumberOfDataItems;
- break;
- case METHOD_DESCRIPTIONS:
- count = NumberOfMethods;
- break;
- case TASK_DESCRIPTIONS:
- count = NumberOfTasks;
- break;
- default:
- count = -1;
- break;
- }
- if ( count == -1 )
- continue;
-
- none_present = strstr( line->Contents, "none" );
-
- /* valid cases are (none_present && !count) AND (!none_present && count) */
- if ( none_present && count ) {
- fprintf(
- stderr,
- "\nLine %d : %s\n",
- line->number,
- "section header says \"none\" and there are subsections"
- );
- PrintSurroundingLines( line, 0, 0 );
- fprintf( stderr, "\n" );
- errors++;
- }
- if ( !none_present && !count ) {
- fprintf(
- stderr,
- "\nLine %d : %s\n",
- line->number,
- "section header does not say \"none\" and there are no subsections"
- );
- PrintSurroundingLines( line, 0, 0 );
- fprintf( stderr, "\n" );
- errors++;
- }
- }
-
- for ( keyword=0 ; keyword <= KEYWORD_LAST ; keyword++ ) {
- if ( Keywords[ keyword ].level != SECTION )
- continue;
-
- if ( !KeywordsPresent[ keyword ] ) {
- fprintf(
- stderr,
- "Section (%s) is missing\n",
- Keywords[ keyword ].Name
- );
- errors++;
- }
- }
-
- return (errors) ? -1 : 0;
-}
-
-/*
- * ReportMissingKeywords
- */
-
-int ReportMissingKeywords(
- Section_info_t *section,
- Line_Control *line,
- int elements_present[ MAXIMUM_ELEMENTS ]
-)
-{
- int i;
- int errors = 0;
- int last_found;
-
-#ifdef SECTION_DEBUG
- PrintLine( line );
- for ( i=0 ; i < MAXIMUM_ELEMENTS ; i++ )
- fprintf( stderr, "%d ", elements_present[ i ] );
- fprintf( stderr, "\n" );
-#endif
-
- /*
- * Check for missing sections
- */
-
- for ( i=0 ; i < MAXIMUM_ELEMENTS ; i++ ) {
- if ( section->Description[ i ].keyword == UNUSED )
- break;
-
-#ifdef SECTION_DEBUG
- fprintf(
- stderr,
- "%d %d %s\n",
- section->Description[ i ].is_required,
- elements_present[ i ],
- Keywords[ section->Description[ i ].keyword ].Name
- );
-#endif
-
- if ( section->Description[ i ].is_required && elements_present[i] == -1 ) {
- fprintf(
- stderr,
- "Section starting at line %d is missing the %s keyword\n",
- line->number,
- Keywords[ section->Description[ i ].keyword ].Name
- );
- errors++;
- }
- }
-
- last_found = -1;
-
- for ( i=0 ; i < MAXIMUM_ELEMENTS ; i++ ) {
- if ( section->Description[ i ].keyword == UNUSED )
- break;
-
- if ( elements_present[i] == -1 )
- continue;
-
- if ( elements_present[i] > last_found ) {
- last_found = elements_present[i];
- continue;
- }
-
- fprintf(
- stderr,
- "Keywords in the section starting at line %d are in the wrong order\n",
- line->number
- );
- errors++;
- break;
-
- }
-
- return errors;
-}
-
-/*
- * ScanForNextSection
- */
-
-Line_Control *ScanForNextSection(
- Line_Control *start_line,
- Section_info_t *section
-)
-{
- Line_Control *line;
- Element_info_t *Elements;
-
- line = start_line;
- Elements = section->Description;
-
- for ( ;; ) {
- line = (Line_Control *) line->Node.next;
-
- if ( line->keyword == END_OBJECT )
- break;
-
- assert( line );
- assert( !_Chain_Is_last( &line->Node ) );
-
- if ( Keywords[ line->keyword ].level == SECTION &&
- section->Next_section != line->keyword ) {
-
- fprintf(
- stderr,
- "Sections appear to be out of order at line %d\n",
- start_line->number
- );
- return NULL;
- }
-
- if ( section->Next_section == line->keyword ) /* next section */
- break;
-
- if ( Elements[ 0 ].keyword == line->keyword ) /* repeating subsection */
- break;
- }
-
- return line;
-}
-
-/*
- * CheckSections
- */
-
-int CheckSections( void )
-{
- Line_Control *line;
- Line_Control *scan_line;
- Section_info_t *section;
- Keyword_info_t *key;
- Element_info_t *Elements;
- int elements_present[ MAXIMUM_ELEMENTS ];
- boolean stay_in_subsection;
- int i;
- int errors;
- int subsection;
- int element;
- int keyword_count;
- Line_Control *next_section;
-
- errors = 0;
- line = (Line_Control *) Lines.first;
-
- for ( i=0 ; i < NUMBER_ELEMENTS( Sections ) ; i++ ) {
- section = Sections[ i ];
- Elements = section->Description;
- subsection = 0;
-
- if ( strstr( line->Contents, "none" ) ) {
- next_section = ScanForNextSection( line, section );
- if ( !next_section ) {
- errors++;
- goto end_object;
- }
- line = next_section;
- if ( line->keyword == END_OBJECT )
- goto end_object;
- continue;
- }
-
- while ( Elements[ 0 ].keyword != line->keyword ) {
- if ( line->keyword == END_OBJECT )
- goto end_object;
-
- if( !line || _Chain_Is_last( &line->Node ) ) {
- fprintf( stderr, "out of sync -- aborting\n" );
- errors++;
- goto end_object;
- }
- line = (Line_Control *) line->Node.next;
- }
-
-repeating_subsection:
-
-#ifdef SECTION_DEBUG
- fprintf( stderr, "Checking Section %d Subsection %d\n", i, subsection );
-#endif
- assert( line );
- assert( !_Chain_Is_last( &line->Node ) );
-
- /*
- * Per Subsection Initialization
- */
-
- subsection++;
-
- keyword_count = 0;
-
- next_section = ScanForNextSection( line, section );
- if ( !next_section ) {
- errors++;
- goto end_object;
- }
-
- for ( element=0 ; element < MAXIMUM_ELEMENTS ; element++ )
- elements_present[ element ] = -1;
-
- /*
- * Do a subsection
- */
-
- /* validate each keyword */
-
- for ( scan_line = line ; ; ) {
-
- if ( !scan_line->keyword ) {
- scan_line = (Line_Control *) scan_line->Node.next;
- continue;
- }
-
- if ( scan_line == next_section )
- break;
-
- if ( *Keywords[ scan_line->keyword ].keyword_validation_routine ) {
- if ( (*Keywords[ scan_line->keyword ].keyword_validation_routine )(
- scan_line
- ) ) errors++;
- }
-
- scan_line = (Line_Control *) scan_line->Node.next;
- }
-
- /* scan subsection for keywords */
-
- for ( scan_line = line ; ; ) {
-
- if ( !scan_line->keyword ) {
- scan_line = (Line_Control *) scan_line->Node.next;
- continue;
- }
-
- if ( scan_line == next_section )
- break;
-
- for ( element=0 ; element < MAXIMUM_ELEMENTS ; element++ ) {
- if ( scan_line->keyword == Elements[ element ].keyword ) {
- if ( elements_present[ element ] != -1 ) {
- fprintf(
- stderr,
- "Section starting at line %d has the %s keyword more than once\n",
- line->number,
- Keywords[ Elements[ i ].keyword ].Name
- );
- errors++;
- }
-
-#ifdef SECTION_DEBUG
- fprintf( stderr, "FOUND %s %d %d\n",
- Keywords[ Elements[ element ].keyword ].Name,
- element, keyword_count );
-#endif
- elements_present[ element ] = keyword_count++;
- break;
- }
- if ( Elements[ element ].keyword == UNUSED )
- break;
- }
-
- scan_line = (Line_Control *) scan_line->Node.next;
- }
- errors += ReportMissingKeywords( section, line, elements_present );
-
- /*
- * Validate the section as a whole
- */
-
- if ( section->section_validation_routine ) {
- if ( (*section->section_validation_routine)(section, line, next_section) )
- errors++;
- }
-
-scan_for_next_section:
- /*
- * Scan forward until next subsection or next section
- */
-
-#ifdef SECTION_DEBUG
- fprintf( stderr, "End of Subsection\n" );
-#endif
- line = next_section;
- if ( line->keyword == END_OBJECT ) {
- goto end_object;
- }
-
- if ( Elements[ 0 ].keyword == line->keyword ) { /* repeating subsection */
- if ( !section->repeats ) {
- fprintf(
- stderr,
- "Invalid repeating subsection starting at line %d\n",
- line->number
- );
- errors++;
- goto end_object;
- }
- goto repeating_subsection;
- }
-
- }
-
-end_object:
- return (errors) ? -1 : 0;
-}
-/*
- * RemovePagebreaks
- */
-
-void RemovePagebreaks()
-{
- Line_Control *line;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- ) {
- if ( !strcmp( line->Contents, PAGE_SEPARATOR ) )
- line = DeleteLine( line );
- else
- line = (Line_Control *) line->Node.next;
- }
-}
-
-/*
- * strIsAllSpace
- */
-
-boolean strIsAllSpace(
- char *s
-)
-{
- char *p;
-
- for ( p = s ; *p ; p++ )
- if ( !isspace( *p ) )
- return FALSE;
-
- return TRUE;
-}
-
-/*
- * RemoveExtraBlankLines
- *
- * NOTE: Be careful not remove to remove white space in raw text.
- */
-
-int RemoveExtraBlankLines()
-{
- Line_Control *line;
- Line_Control *previous;
- int errors;
-
- errors = 0;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next
- ) {
- if ( line->keyword || line->format )
- continue;
-
- if ( !strlen( line->Contents ) ) {
- line = DeleteLine( line );
- line = (Line_Control *) line->Node.previous;
- continue;
- }
-
- fprintf(
- stderr,
- "\nLine %d is not associated with a keyword:\n",
- line->number
- );
- PrintSurroundingLines( line, 0, 0 );
- fprintf( stderr, "\n" );
- errors++;
- }
- return ( errors ) ? -1 : 0;
-}
-
-/*
- * strCopyToColon
- */
-
-void strCopyToColon(
- char *src,
- char *dest
-)
-{
- char *s = src;
- char *d = dest;
-
- for ( ; *s && *s != ':' ; )
- *d++ = *s++;
- *d ='\0';
-}
-
-/*
- * BuildTexinfoNodes
- */
-
-void BuildTexinfoNodes( void )
-{
- Line_Control *line;
- Line_Control *new_line;
- Line_Control *next_node;
- char Buffer[ BUFFER_SIZE ];
- char ObjectName[ BUFFER_SIZE ];
- char NodeName[ BUFFER_SIZE ];
- char NextNode[ BUFFER_SIZE ];
- char NextNodeName[ BUFFER_SIZE ];
- char PreviousNodeName[ BUFFER_SIZE ];
- char UpNodeName[ BUFFER_SIZE ];
- char SectionName[ BUFFER_SIZE ];
- char MenuBuffer[ BUFFER_SIZE ];
- Line_Control *menu_insert_point;
- Line_Control *node_line;
- boolean next_found;
- int menu_items;
-
- strcpy( PreviousNodeName, DocsPreviousNode );
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next
- ) {
- menu_insert_point = (Line_Control *) line->Node.next;
-
- switch ( Keywords[ line->keyword ].level ) {
- case TEXT:
- case HEADING:
- break;
- case SECTION:
- if ( line->keyword == END_OBJECT )
- goto bottom;
-
- if ( line->keyword == OBJECT ) {
- LineCopyFromRight( line, Buffer );
- sprintf( ObjectName, "%s Object", Buffer );
- strcpy( NodeName, ObjectName );
- strcpy( UpNodeName, DocsUpNode );
- } else {
- LineCopySectionName( line, Buffer );
- sprintf( NodeName, "%s %s", ObjectName, Buffer );
- strcpy( UpNodeName, ObjectName );
- }
- strtoInitialCaps( NULL, NodeName );
- strtoInitialCaps( NULL, UpNodeName );
- strcpy( SectionName, NodeName );
-
- /*
- * Go ahead and put it on the chain in the right order (ahead of
- * the menu) and we can fill it in later (after the menu is built).
- */
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@ifinfo" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- node_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &node_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end ifinfo" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- menu_items = 0;
-
- if ( line->keyword == OBJECT ) {
- next_node = (Line_Control *) line->Node.next;
- next_found = FALSE;
- for ( ; ; ) {
- if ( next_node->keyword == END_OBJECT )
- break;
- if ( Keywords[ next_node->keyword ].level == SECTION ) {
- LineCopySectionName( next_node, Buffer );
- strtoInitialCaps( NULL, Buffer );
-
- if ( !next_found ) {
- next_found = TRUE;
- sprintf( NextNodeName, "%s %s", ObjectName, Buffer );
- }
- if ( menu_items == 0 ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@ifinfo" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@menu" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
- }
-
- menu_items++;
-
- new_line = AllocateLine();
- sprintf( new_line->Contents, "* %s %s::", ObjectName, Buffer );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node);
- }
- next_node = (Line_Control *) next_node->Node.next;
- }
- } else {
- next_node = (Line_Control *) line->Node.next;
-
- next_found = FALSE;
- for ( ; ; ) {
- if ( Keywords[ next_node->keyword ].level == SECTION ) {
- if ( !next_found ) {
- if ( next_node->keyword == END_OBJECT ) {
- strcpy( NextNodeName, DocsNextNode );
- } else {
- LineCopySectionName( next_node, Buffer );
- sprintf( NextNodeName, "%s %s", ObjectName, Buffer );
- strtoInitialCaps( NULL, NextNodeName );
- }
- next_found = TRUE;
- }
- break;
- } else if ( Keywords[ next_node->keyword ].level == SUBSECTION ) {
- LineCopySectionName( next_node, Buffer );
- strtoInitialCaps( NULL, Buffer );
- sprintf( MenuBuffer, "%s %s - ", ObjectName, Buffer );
- LineCopyFromRight( next_node, Buffer );
- strcat( MenuBuffer, Buffer );
-
- if ( menu_items == 0 ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@ifinfo" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@menu" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
- }
-
- menu_items++;
-
- new_line = AllocateLine();
- sprintf( new_line->Contents, "* %s::", MenuBuffer );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
-
- if ( !next_found ) {
- next_found = TRUE;
- strcpy( NextNodeName, MenuBuffer );
- }
- }
- next_node = (Line_Control *) next_node->Node.next;
- }
- }
-
- if ( menu_items ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end menu" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end ifinfo" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
- }
-
-#if 0
- fprintf(
- stderr,
- "@node %s, %s, %s, %s\n",
- NodeName,
- NextNodeName,
- PreviousNodeName,
- UpNodeName
- );
-#endif
- /* node_line was previously inserted */
- sprintf(
- node_line->Contents,
- "@node %s, %s, %s, %s",
- NodeName,
- NextNodeName,
- PreviousNodeName,
- UpNodeName
- );
-
- strcpy( PreviousNodeName, NodeName );
- break;
-
- case SUBSECTION:
- strcpy( UpNodeName, SectionName );
-
- LineCopySectionName( line, Buffer );
- strtoInitialCaps( NULL, Buffer );
- sprintf( NodeName, "%s %s - ", ObjectName, Buffer );
- LineCopyFromRight( line, Buffer );
- strcat( NodeName, Buffer );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@ifinfo" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- next_node = (Line_Control *) line->Node.next;
- for ( ; ; ) {
- if ( Keywords[ next_node->keyword ].level == SECTION ) {
- if ( next_node->keyword == END_OBJECT ) {
- strcpy( NextNodeName, DocsNextNode );
- } else {
- LineCopySectionName( next_node, Buffer );
- sprintf( NextNodeName, "%s %s", ObjectName, Buffer );
- strtoInitialCaps( NULL, NextNodeName );
- }
- break;
- } else if ( Keywords[ next_node->keyword ].level == SUBSECTION ) {
- LineCopySectionName( next_node, Buffer );
- strtoInitialCaps( NULL, Buffer );
- sprintf( NextNodeName, "%s %s - ", ObjectName, Buffer );
- LineCopyFromRight( next_node, Buffer );
- strcat( NextNodeName, Buffer );
- break;
- }
- next_node = (Line_Control *) next_node->Node.next;
- }
-
-#if 0
- fprintf(
- stderr,
- "@node %s, %s, %s, %s\n",
- NodeName,
- NextNodeName,
- PreviousNodeName,
- UpNodeName
- );
-#endif
- new_line = AllocateLine();
- sprintf(
- new_line->Contents,
- "@node %s, %s, %s, %s",
- NodeName,
- NextNodeName,
- PreviousNodeName,
- UpNodeName
- );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end ifinfo" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- strcpy( PreviousNodeName, NodeName );
- break;
- }
- }
-bottom:
-}
-
-/*
- * FormatToTexinfo
- */
-
-char *Texinfo_Headers[] = {
- "\\input texinfo @c -*-texinfo-*-",
- "@c %**start of header",
- "@setfilename ",
- "@settitle ",
- "@paragraphindent 0",
- "@c %**end of header",
- "",
- "@c",
- "@c COPYRIGHT (c) 1996.",
- "@c On-Line Applications Research Corporation (OAR).",
- "@c All rights reserved.",
- "@c",
- "@c This file is automatically generated. DO NOT EDIT!!",
- "@c",
- "",
- "@c This prevents a black box from being printed on overfull lines.",
- "@c The alternative is to rework a sentence to avoid this problem.",
- "@finalout",
- "",
- "@tex",
- "\\global\\parindent 0in",
- "\\global\\chapheadingskip = 15pt plus 4pt minus 2pt",
- "\\global\\secheadingskip = 12pt plus 4pt minus 2pt",
- "\\global\\subsecheadingskip = 9pt plus 4pt minus 2pt",
- "",
- "@ifclear smallbook",
- "\\global\\parskip 6pt plus 1pt",
- "@end ifclear",
- "@end tex",
- "@setchapternewpage odd",
- "@ifinfo",
- "@top ",
- "@node Top, (dir), (dir), (dir)",
- "@end ifinfo",
- "@c ",
- "@c This is the end of the header block",
- "@c "
-};
-
-void FormatToTexinfo( void )
-{
- Line_Control *line;
- Line_Control *new_line;
- char Buffer[ PARAGRAPH_SIZE ];
- int i;
- char ChapterTitle[ PARAGRAPH_SIZE ];
- char InfoFile[ PARAGRAPH_SIZE ];
- char *p;
- boolean new_section;
- boolean in_bullets;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- ) {
-
- switch ( line->keyword ) {
- case UNUSED:
- line = (Line_Control *) line->Node.next;
- break;
-
- case OBJECT:
- LineCopyFromRight( line, ChapterTitle );
- strcpy( InfoFile, ChapterTitle );
-
- for ( p=InfoFile ; *p ; *p++ ) /* turn this into a file name */
- if ( isspace( *p ) )
- *p = '_';
-
- sprintf( Buffer, "@chapter %s", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case ATTRIBUTE_DESCRIPTIONS:
- case ASSOCIATION_DESCRIPTIONS:
- case ABSTRACT_TYPE_DESCRIPTIONS:
- case DATA_ITEM_DESCRIPTIONS:
- case METHOD_DESCRIPTIONS:
- case TASK_DESCRIPTIONS:
- sprintf( Buffer, "@section %s", line->Contents );
- strcpy( line->Contents, Buffer );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@page" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- line = (Line_Control *) line->Node.next;
- new_section = TRUE;
- break;
-
- case END_OBJECT:
- line->Contents[ 0 ] = '\0';
- goto bottom;
-
- case ATTRIBUTE:
- case ASSOCIATION:
- case ABSTRACT_TYPE:
- case DATA_ITEM:
- if ( !new_section ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@need 4000" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
- }
- new_section = FALSE;
- sprintf( Buffer, "@subsection %s", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case METHOD:
- case TASK:
- if ( !new_section ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@page" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
- }
- new_section = FALSE;
- sprintf( Buffer, "@subsection %s", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case DESCRIPTION:
- case COPYRIGHT:
- case PORTING:
- case THEORY_OF_OPERATION:
- case DEPENDENCIES:
- case NOTES:
- sprintf( Buffer, "@subheading %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
-
- /* now take care of the paragraphs which are here */
-
- in_bullets = FALSE;
- do {
- line = (Line_Control *) line->Node.next;
- if ( line->format == BULLET_OUTPUT ) {
- if ( !in_bullets ) {
- in_bullets = TRUE;
-
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@itemize @bullet" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
- }
- sprintf( Buffer, "@item %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- } else if ( in_bullets ) {
- in_bullets = FALSE;
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end itemize" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- } else {
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- }
- } while ( !line->keyword );
-
- break;
-
- case DERIVATION:
- case TYPE:
- case RANGE:
- case UNITS:
- case SCALE_FACTOR:
- case TOLERANCE:
- case VISIBILITY:
- case ASSOCIATED_WITH:
- case MULTIPLICITY:
- case TIMING:
- sprintf( Buffer, "@subheading %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case MEMBERS:
- case DEFAULT:
- case REQUIREMENTS:
- case REFERENCES:
- case INPUTS:
- case OUTPUTS:
- case PDL:
- case SYNCHRONIZATION:
- sprintf( Buffer, "@subheading %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
-
- /* now take care of the raw text which is here */
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@example" );
- _Chain_Insert( &line->Node, &new_line->Node );
-
- do {
- line = (Line_Control *) line->Node.next;
- if ( !strlen( line->Contents ) ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end example" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@example" );
- _Chain_Insert( &line->Node, &new_line->Node );
-
- }
- } while ( !line->keyword );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end example" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
- /* at this point line points to the next keyword */
- break;
-
- case RAW_EXAMPLE:
-
- /* now take care of the raw text which is here */
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@example" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- while ( line->keyword == RAW_EXAMPLE ) {
- line = (Line_Control *) line->Node.next;
- }
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end example" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- /* at this point line points to the next keyword */
- break;
-
- }
- }
-
-bottom:
-#if 0
- for ( i=NUMBER_ELEMENTS( Texinfo_Headers ) - 1 ; i >= 0 ; i-- ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, Texinfo_Headers[ i ] );
- if ( !strcmp( "@setfilename ", new_line->Contents ) )
- strcat( new_line->Contents, ChapterTitle );
- else if ( !strcmp( "@settitle ", new_line->Contents ) )
- strcat( new_line->Contents, InfoFile );
- else if ( !strcmp( "@top ", new_line->Contents ) )
- strcat( new_line->Contents, InfoFile );
- _Chain_Insert( _Chain_Head( &Lines ), &new_line->Node );
- }
-
- /*
- * Remove the special end of object string. No one wants to see
- * it in the printed output and the node is already marked "END_OBJECT".
- */
-
- ((Line_Control *)Lines.last)->Contents[ 0 ] = '\0';
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@bye" );
- _Chain_Append( &Lines, &new_line->Node );
-
-#endif
- if ( Verbose )
- fprintf( stderr, "-------->INSERTING TEXINFO MENUS\n" );
-
- BuildTexinfoNodes();
-}
-
-/*
- * FormatToWord
- */
-
-void FormatToWord( void )
-{
- Line_Control *line;
- Line_Control *new_line;
- char Buffer[ PARAGRAPH_SIZE ];
- int i;
- int length;
- char ChapterTitle[ PARAGRAPH_SIZE ];
- char InfoFile[ PARAGRAPH_SIZE ];
- char *p;
- boolean new_section;
- boolean in_bullets;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- ) {
-
- switch ( line->keyword ) {
- case UNUSED:
- line = (Line_Control *) line->Node.next;
- break;
-
- case OBJECT:
- LineCopyFromRight( line, ChapterTitle );
- strcpy( InfoFile, ChapterTitle );
-
- for ( p=InfoFile ; *p ; *p++ ) /* turn this into a file name */
- if ( isspace( *p ) )
- *p = '_';
-
- sprintf( Buffer, "@Chapter = %s", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case ATTRIBUTE_DESCRIPTIONS:
- case ASSOCIATION_DESCRIPTIONS:
- case ABSTRACT_TYPE_DESCRIPTIONS:
- case DATA_ITEM_DESCRIPTIONS:
- case METHOD_DESCRIPTIONS:
- case TASK_DESCRIPTIONS:
- sprintf( Buffer, "@Section = %s", line->Contents );
- strcpy( line->Contents, Buffer );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@Page" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- line = (Line_Control *) line->Node.next;
- new_section = TRUE;
- break;
-
- case END_OBJECT:
- line->Contents[ 0 ] = '\0';
- goto bottom;
-
- case ATTRIBUTE:
- case ASSOCIATION:
- case ABSTRACT_TYPE:
- case DATA_ITEM:
- if ( !new_section ) {
- /*
- * Do something with the style to keep subsection
- * contents together
- */
- ;
- }
- new_section = FALSE;
- sprintf( Buffer, "@Subsection = %s", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case METHOD:
- case TASK:
- if ( !new_section ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@Page" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
- }
- new_section = FALSE;
- sprintf( Buffer, "@Subsection = %s", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case DESCRIPTION:
- case COPYRIGHT:
- case PORTING:
- case THEORY_OF_OPERATION:
- case DEPENDENCIES:
- case NOTES:
- sprintf( Buffer, "@Subheading = %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
-
- /* now take care of the paragraphs which are here */
-
- in_bullets = FALSE;
- do {
- line = (Line_Control *) line->Node.next;
- if ( line->format == BULLET_OUTPUT ) {
- if ( !in_bullets ) {
- in_bullets = TRUE;
-
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- }
- sprintf( Buffer, "@Bullet = %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- } else if ( in_bullets ) {
- in_bullets = FALSE;
-
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- } else {
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- }
- } while ( !line->keyword );
-
- break;
-
- case DERIVATION:
- case TYPE:
- case RANGE:
- case UNITS:
- case SCALE_FACTOR:
- case TOLERANCE:
- case VISIBILITY:
- case ASSOCIATED_WITH:
- case MULTIPLICITY:
- case TIMING:
- sprintf( Buffer, "@Subheading = %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case MEMBERS:
- case DEFAULT:
- case REQUIREMENTS:
- case REFERENCES:
- case INPUTS:
- case OUTPUTS:
- case PDL:
- case SYNCHRONIZATION:
- sprintf( Buffer, "@Subheading = %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
-
- /* now take care of the raw text which is here */
-
-#if 0
- while ( !line->keyword ) {
- sprintf( Buffer, "@Example = %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- }
-
- /* at this point line points to the next keyword */
-#endif
-
- /* now take care of the raw text which is here */
-
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- strcpy( new_line->Contents, "@Example = " );
-
- while ( !line->keyword ) {
- if ( strlen( line->Contents ) ) {
- new_line->keyword = line->keyword;
- new_line->format = line->format;
- length = strlen(new_line->Contents);
- if ( (length + strlen(line->Contents) + 12) > PARAGRAPH_SIZE ) {
- fprintf( stderr, "Output line too long at %d\n", line->number );
- exit_application( 1 );
- }
-
- strcat( new_line->Contents, line->Contents );
- strcat( new_line->Contents, "<@ManualCR>" );
- line = DeleteLine( line );
- } else {
- line = (Line_Control *) line->Node.next;
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- strcpy( new_line->Contents, "@Example = " );
- }
- }
-
- /* at this point line points to the next keyword */
- break;
-
- case RAW_EXAMPLE:
-
- /* now take care of the raw text which is here */
-
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- strcpy( new_line->Contents, "@Example = " );
-
-
- while ( line->keyword == RAW_EXAMPLE ) {
- if ( strlen( line->Contents ) ) {
- new_line->keyword = line->keyword;
- new_line->format = line->format;
- length = strlen(new_line->Contents);
- if ( (length + strlen(line->Contents) + 12) > PARAGRAPH_SIZE ) {
- fprintf( stderr, "Output line too long at %d\n", line->number );
- exit_application( 1 );
- }
-
- strcat( new_line->Contents, line->Contents );
- strcat( new_line->Contents, "<@ManualCR>" );
- line = DeleteLine( line );
- } else {
- line = (Line_Control *) line->Node.next;
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- strcpy( new_line->Contents, "@Example = " );
- }
- }
-
- /* at this point line points to the next keyword */
- break;
-
- }
- }
-
-bottom:
-}
-
-/*
- * PrintFile
- */
-
-void PrintFile(
- char *out
-)
-{
- Line_Control *line;
-
- OutFile = fopen( out, "w+" );
-
- if ( !OutFile ) {
- fprintf( stderr, "Unable to open (%s) for output\n", out );
- exit_application( 1 );
- }
- assert( OutFile );
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next ) {
- fprintf( OutFile, "%s\n", line->Contents );
-/*
- fprintf(
- OutFile,
- "(%d,%d)%s\n",
- line->keyword,
- line->format,
- line->Contents
- );
-*/
- }
-}
-
-/*
- * DumpList
- */
-
-void DumpList(
- Chain_Control *the_list
-)
-{
- Line_Control *line;
-
- fprintf( stderr, "---> Dumping list (%p)\n", the_list );
-
- for ( line = (Line_Control *) the_list->first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next ) {
- fprintf( stderr, "%s\n", line->Contents );
- }
-}
-
-/*
- * ReleaseFile
- */
-
-void ReleaseFile()
-{
- Line_Control *line;
- Line_Control *next;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- ) {
- next = (Line_Control *) line->Node.next;
- line = next;
- }
-}
-
-/*
- * strtoInitialCaps
- */
-
-void strtoInitialCaps(
- char *dest,
- char *src
-)
-{
- char *source = src;
- char *destination = dest;
-
- if ( !dest )
- return;
- strcpy( dest, src );
-#if 0
- source = src;
- destination = (dest) ? dest : src;
-
- while ( *source ) {
- while ( isspace( *source ) )
- *destination++ = *source++;
-
- if ( !*source )
- break;
-
- *destination++ = toupper( *source++ );
-
- for ( ; *source && !isspace( *source ) ; source++ )
- *destination++ = tolower( *source );
-
- if ( !*source )
- break;
- }
-
- *destination = '\0';
-#endif
-}
-
-/*
- * Validate_visibility
- */
-
-char *Valid_visibilities[] = {
- "public",
- "private"
-};
-
-int Validate_visibility(
- Line_Control *line
-)
-{
- char *s;
- char *d;
- char Buffer[ BUFFER_SIZE ];
- char Visibility[ BUFFER_SIZE ];
- int i;
- boolean found;
- int errors = 0;
-
- LineCopyFromRight( line, Buffer );
-
- memset( Visibility, '\0', sizeof( Visibility ) );
- s = Buffer;
-
- for ( d=Visibility ; ; s++, d++ ) {
- *d = *s;
- if ( !*s || isspace(*s) )
- break;
- }
- *d = '\0';
-
- if ( isspace(*s) ) {
- fprintf(
- stderr,
- "Unexpected white space on line %d -- are there multiple words?\n",
- line->number
- );
- errors++;
- }
-
- /*
- * Check out the type part of this keyword
- */
-
- for ( found=FALSE, i=0 ; i<NUMBER_ELEMENTS(Valid_visibilities) ; i++ ) {
- if ( !strcmp( Valid_visibilities[ i ], Visibility ) ) {
- found = TRUE;
- break;
- }
- }
-
- if ( !found ) {
- if ( !(InsertTBDs && !strcmp( Visibility, "TBD" )) ) {
- fprintf(
- stderr,
- "Invalid visibility type (%s) on line %d\n",
- Visibility,
- line->number
- );
- errors++;
- }
- }
-
- return (errors) ? -1 : 0;
-}
-
-/*
- * Validate_synchronization
- */
-
-char *Valid_synchronization[] = {
- "delay",
- "event",
- "mutex",
- "semaphore",
- "message",
- "signal",
- "period"
-};
-
-boolean Valid_synchronization_text_below[] = {
- FALSE, /* delay */
- TRUE, /* event */
- TRUE, /* mutex */
- TRUE, /* semaphore */
- TRUE, /* message */
- TRUE, /* signal */
- FALSE /* period */
-};
-
-int Validate_synchronization(
- Line_Control *line
-)
-{
- char *s;
- char *d;
- char Buffer[ BUFFER_SIZE ];
- char Synchronization[ BUFFER_SIZE ];
- int i;
- boolean found;
- int errors = 0;
-
- LineCopyFromRight( line, Buffer );
-
- memset( Synchronization, '\0', sizeof( Synchronization ) );
- s = Buffer;
-
- for ( d=Synchronization ; ; s++, d++ ) {
- *d = *s;
- if ( !*s || isspace(*s) )
- break;
- }
- *d = '\0';
-
- if ( isspace(*s) ) {
- fprintf(
- stderr,
- "Unexpected white space on line %d -- invalid use of multiple words\n",
- line->number
- );
- errors++;
- }
-
- /*
- * Check out the type part of this keyword
- */
-
- for ( found=FALSE, i=0 ; i<NUMBER_ELEMENTS(Valid_synchronization) ; i++ ) {
- if ( !strcmp( Valid_synchronization[ i ], Synchronization ) ) {
- found = TRUE;
- break;
- }
- }
-
- if ( !found ) {
- fprintf(
- stderr,
- "Invalid synchronization type (%s) on line %d\n",
- Synchronization,
- line->number
- );
- errors++;
- }
-
- if ( line->keyword && !Valid_synchronization_text_below[ i ] ) {
- fprintf(
- stderr,
- "Expected text below synchronization type (%s) on line %d\n",
- Synchronization,
- line->number
- );
- errors++;
- }
-
- return (errors) ? -1 : 0;
-}
-
-/*
- * Validate_abstract_type
- *
- * presence of range or members but not both
- */
-
-int Validate_abstract_type(
- Section_info_t *section,
- Line_Control *start,
- Line_Control *next_section
-)
-{
- boolean range_found = FALSE;
- boolean members_found = FALSE;
- boolean enumerated_found = FALSE;
- boolean no_range_or_members = FALSE;
- boolean true_found = FALSE;
- boolean false_found = FALSE;
- Line_Control *line;
- int errors = 0;
-
- for ( line = start;
- line != next_section ;
- line = (Line_Control *) line->Node.next ) {
- if ( line->keyword == RANGE )
- range_found = TRUE;
- else if ( line->keyword == MEMBERS ) {
- members_found = TRUE;
- } else if ( line->keyword == TYPE ) {
- if ( strstr( line->Contents, "enumerated" ) ||
- strstr( line->Contents, "structure" ) )
- enumerated_found = TRUE;
- } else if ( line->keyword == DERIVATION ) {
- if ( strstr( line->Contents, "enumerated" ) ||
- strstr( line->Contents, "structure" ) ) {
- enumerated_found = TRUE;
- } else if ( strstr( line->Contents, "handle" ) ||
- strstr( line->Contents, "array" ) ||
- strstr( line->Contents, "string" ) ) {
- no_range_or_members = TRUE;
- }
- }
- }
-
- if ( no_range_or_members ) {
-/* This code does not like:
-
-ABSTRACT TYPE: Times
- DESCRIPTION:
- This type specifies mode elapsed times.
- VISIBILITY: public
- DERIVATION: array of Elapsed_Seconds of Timeutil
- RANGE: COMM - ENGAGE of Current_mode_t
-
- if ( range_found ) {
- fprintf(
- stderr,
- "Range should not be specified in subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-*/
- if ( members_found ) {
- fprintf(
- stderr,
- "Members should not be specified in subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
- } else {
- if ( !range_found && !members_found ) {
- fprintf(
- stderr,
- "Neither range nor members keyword present in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- if ( !enumerated_found && !range_found ) {
- fprintf(
- stderr,
- "Type does not have range specified in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- }
-
- if ( !InsertTBDs ) {
- if ( range_found && members_found ) {
- fprintf(
- stderr,
- "Both range and members keyword present in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
- }
-
- if ( enumerated_found && !members_found ) {
- fprintf(
- stderr,
- "Enumerated type without list of members in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- return (errors) ? -1 : 0;
-}
-
-/*
- * Validate_attribute
- *
- * presence of range or members but not both
- */
-
-int Validate_attribute(
- Section_info_t *section,
- Line_Control *start,
- Line_Control *next_section
-)
-{
- boolean range_found = FALSE;
- boolean members_found = FALSE;
- boolean enumerated_found = FALSE;
- boolean boolean_found = FALSE;
- boolean true_found = FALSE;
- boolean false_found = FALSE;
- Line_Control *line;
- int errors = 0;
-
- for ( line = start;
- line != next_section ;
- line = (Line_Control *) line->Node.next ) {
- if ( line->keyword == RANGE )
- range_found = TRUE;
- else if ( line->keyword == MEMBERS ) {
- members_found = TRUE;
- if ( boolean_found == TRUE ) {
- line = (Line_Control *) line->Node.next;
- while ( !_Chain_Is_last( &line->Node ) ) {
- if ( line->keyword )
- break;
- if ( strstr( line->Contents, "FALSE" ) )
- false_found = TRUE;
- else if ( strstr( line->Contents, "TRUE" ) )
- true_found = TRUE;
- line = (Line_Control *) line->Node.next;
- }
- line = (Line_Control *) line->Node.previous;
- }
- } else if ( line->keyword == TYPE || line->keyword == DERIVATION ) {
- if ( strstr( line->Contents, "enumerated" ) )
- enumerated_found = TRUE;
- else if ( strstr( line->Contents, "boolean" ) ) {
- enumerated_found = TRUE;
- boolean_found = TRUE;
- }
- }
- }
-
- if ( !range_found && !members_found ) {
- fprintf(
- stderr,
- "Neither range nor members keyword present in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- if ( !InsertTBDs ) {
- if ( range_found && members_found ) {
- fprintf(
- stderr,
- "Both range and members keyword present in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
- }
-
- if ( enumerated_found && !members_found ) {
- fprintf(
- stderr,
- "Enumerated type without list of members in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- if ( !enumerated_found && !range_found ) {
- fprintf(
- stderr,
- "Type does not have range specified in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- if ( boolean_found && !true_found ) {
- fprintf(
- stderr,
- "Boolean without a TRUE case specified in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- if ( boolean_found && !false_found ) {
- fprintf(
- stderr,
- "Boolean without a FALSE case specified in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- return (errors) ? -1 : 0;
-}
-
-/*
- * Validate_object
- *
- * presence of range or members but not both
- */
-
-int Validate_object(
- Section_info_t *section,
- Line_Control *start,
- Line_Control *next_section
-)
-{
- char ObjectName[ BUFFER_SIZE ];
- char EndObjectName[ BUFFER_SIZE ];
- Line_Control *line;
- int errors = 0;
-
-
- LineCopyFromRight( start, ObjectName );
-
- for ( line = start;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next ) {
- if ( line->keyword == END_OBJECT ) {
- LineCopyFromRight( line, EndObjectName );
- break;
- }
- }
-
- if ( strcmp( ObjectName, EndObjectName ) ) {
- fprintf(
- stderr,
- "Object and End Object names do not match\n"
- );
- errors++;
- }
-
- return (errors) ? -1 : 0;
-}
-
diff --git a/doc/tools/pdl2texi/s.d b/doc/tools/pdl2texi/s.d
deleted file mode 100644
index a434bf4523..0000000000
--- a/doc/tools/pdl2texi/s.d
+++ /dev/null
@@ -1,129 +0,0 @@
-
-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
deleted file mode 100644
index c381cb3de2..0000000000
--- a/doc/tools/pdl2texi/sample.d
+++ /dev/null
@@ -1,136 +0,0 @@
-(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
deleted file mode 100644
index 173e48ce04..0000000000
--- a/doc/tools/pdl2texi/system.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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
diff --git a/doc/tools/pdl2texi/t1.d b/doc/tools/pdl2texi/t1.d
deleted file mode 100644
index 4f54e74738..0000000000
--- a/doc/tools/pdl2texi/t1.d
+++ /dev/null
@@ -1,52 +0,0 @@
-OBJECT: Drive
- DESCRIPTION:
- This object provides an interface to the elevation/azimuth
- drive system(ECA).
- THEORY OF OPERATION:
- This object encapsulates the turret drive. The object provides
- an interface to control the turret drive. A method is provided
- to set the azimuth and elevation rate of the drive. Methods are
- provided to request the drive to run in stabilized or power mode
- and set the drive speed to high or low. A method is also provided
- to allow for drift adjust.
-
- This object also tracks drive system on hours. It gets the hours
- from the EEPROM data, allows the hours to be set, updates the
- hours via the activation and deactivation of the drive, and
- provides access to the hours.
-
- The object also provides methods to access azimuth and elevation
- displacement, and methods to process changes in the hardware
- discretes drive on, stabilized mode, thermal fault and fault.
-
- The object also provides methods to enable and disable
- both the remote and turret power interlocks which determine if
- the drive can be driven by the remote or turret handstation
- respectively.
-
-ATTRIBUTE DESCRIPTIONS:
-
-
-ATTRIBUTE: Azimuth_displacement
- DESCRIPTION:
- This attribute represents the current azimuth displacement
- of the turret.
- TYPE: float constant
- RANGE: 0-0
- UNITS: degrees
- REQUIREMENTS:
- AFS 8.2.11 Receive Azimuth Displacement and Elevation Displacement
- AIS 5.2.6 Azimuth Displacement analog
-
-
-ASSOCIATION DESCRIPTIONS: none
-
-ABSTRACT TYPE DESCRIPTIONS: none
-
-DATA ITEM DESCRIPTIONS: none
-
-METHOD DESCRIPTIONS: none
-
-TASK DESCRIPTIONS: none
-
-END OBJECT: Drive
diff --git a/doc/tools/pdl2texi/test_cases/avdas.d b/doc/tools/pdl2texi/test_cases/avdas.d
deleted file mode 100644
index 1d79a319f1..0000000000
--- a/doc/tools/pdl2texi/test_cases/avdas.d
+++ /dev/null
@@ -1,260 +0,0 @@
-OBJECT: AVDAS
- DESCRIPTION:
- This object collects various values from other objects in the system
- and outputs the values in a message on a serial interface. The message
- can be read and used as diagnostic information.
- THEORY OF OPERATION:
- This object contains a Server task which periodically collects
- diagnostic values from other objects in the system and outputs the
- values in a message on a serial interface. The diagnostic values
- collected and formatted reflect system status.
- NOTES:
- The following engineering note consists of a chart to aid in the
- decision making process of whether the AVDAS should reflect System
- status or Switch status. As it is right now, it was decided to
- reflect System status.
-
- @table
- System Switch
- Gun Manual Weapon_control Gunner_console
- Gun Air ------- -------
- Gun Ground ------- -------
- *Remote Status Remote Remote
- *Msl Armed Indicate Missiles Missiles
- *Rain Mode FOV FOV
- *Msl Uncage Verified Missiles Missiles
- *Msl Activate Status Missiles Missiles
- *RSO Status Weapon_control Weapon_control
- *Fire Permit Weapon_control_(new) Weapon_control_(new)
- *Stab Mode Status Drive_(new) Drive_(new)
- Uncage Mode Status Weapon_control Gunner_console_(new)
- Engage Mode Status Mode Gunner_console_(new)
- *Palm Grip Status Gunner_handstation Gunner_handstation
- *System Fault Status Fault (Add) Fault_(new)
- FLIR FOV Status FOV Gunner_console
- *Autotrack Status Video_tracker Video_tracker
- Arm Switch Status Weapon_control Gunner_console
- *Uncage Switch Status Gunner_handstation Gunner_handstation
- *Trig Switch Status Gunner_handstation Gunner_handstation
- *Msl Fire Cmd Status Missiles_(new) Missiles_(new)
- Helicopter Mode Weapon_control Gunner_console_(new)
- IFF Challenge Switch IFF_(new) Gunner_console
- *Auto Slew Status Autoslew_Is_on Autoslew_Is_on
-
- @end table
-
- Message bytes 26 through 29 are not set at this time pending
- completion of the Super Elevate object.
-
-ATTRIBUTE DESCRIPTIONS: none
-
-ASSOCIATION DESCRIPTIONS: none
-
-ABSTRACT TYPE DESCRIPTIONS: none
-
-DATA ITEM DESCRIPTIONS:
-
-DATA ITEM: Message
- DESCRIPTION:
- This data item is the buffer used to build an AVDAS data message.
- The first two bytes are place-holders for the header bytes. The
- last byte is a place-holder for the checksum byte.
- DERIVATION: array[ 36 ]
- TYPE: bytes
- DEFAULT:
- all bytes = 0x00
-
-DATA ITEM: The_Channel
- DESCRIPTION:
- This data item contains the handle to the AVDAS channel.
- TYPE: Channel_Control handle
- DEFAULT: NULL
-
-METHOD DESCRIPTIONS:
-
-METHOD: Break_Up
- DESCRIPTION:
- This method converts a floating point number to two ascii bytes
- based on an input range and weighting factor.
- VISIBILITY: private
- INPUTS:
- max_range
- min_range
- value
- weight_factor
- OUTPUTS:
- lower_byte
- upper_byte
- PDL:
- if value between 0 and min_range
- set temp2 to min_range
- set bit_ratio to absolute value( temp2 / 0x8000 )
- else if value between 0 and max_range
- set temp2 to max_range
- set bit_ratio to absolute value( temp2 / 0x7FF0 )
-
- set temp3 to (value / temp2) * weight_factor
-
- set temp4 to temp3 converted to unsigned 16 bit value
-
- set temp4 to two's compliment of temp4
-
- set lower_byte to lower 8 bits of temp4
-
- set upper_byte to upper 8 bits of temp4
-
-METHOD: Create
- DESCRIPTION:
- This method performs the necessary actions to create this object.
- VISIBILITY: public
- INPUTS: none
- OUTPUTS: none
- PDL:
- initialize Message to default
-
- get AVDAS protocol information using the AVDAS_protocol object
- create a channel for the AVDAS interface using the Channel object
- attach the channel to the AVDAS interface using the Channel object
- with the following parameters:
- flush - FALSE
- major_number - CONFIGURATION_AVDAS_MAJOR
- minor_number - CONFIGURATION_AVDAS_MINOR
-
-TASK DESCRIPTIONS:
-
-TASK: Server
- DESCRIPTION:
- This task periodically collects diagnostic values and outputs the
- values in a message on a serial interface.
- INPUTS: none
- SYNCHRONIZATION: period
- TIMING: 100 ms
- REQUIREMENTS:
- AFS 3.1.4 Provide AVDAS
- AFS 3.1.7 Update AVDAS port
- PDL:
- create a period
-
- wait for completion using the Initialization object
-
- loop forever
- wait for period to expire
-
- initialize Message
-
- get absolute azimuth using the Turret object
- format absolute azimuth and store in Message[2] and Message[3]
-
- get elevation using the Turret object
- format elevation and store in Message[4] and Message[5]
-
- get drive rate using the Drive object
- format azimuth rate and store in Message[6] and Message[7]
- format elevation rate and store in Message[8] and Message[9]
-
- get drive displacement using the Drive object
- format azimuth displacement and store in Message[10] and Message[11]
- format elevation displacement and
- store in Message[12] and Message[13]
-
- get seeker position error using the Seeker object
- format azimuth position error and
- store in Message[14] and Message[15]
- format elevation position error and
- store in Message[16] and Message[17]
-
- get range using the Laser object
- format range and store in Message[18] and Message[19]
-
- get north reference using the Turret object
- format north reference and store in Message[20] and Message[21]
-
- get video tracker position error using the Video_tracker object
- format azimuth position error and
- store in Message[22] and Message[23]
- format elevation position error and
- store in Message[24] and Message[25]
-
- ?get lead command?
-
- get gun mode switch using the Weapon_control object
- format gun mode switch and store in Message[30]
-
- determine if remote is active using the Remote object
- format remote active and store in Message[30]
-
- determine if missile is safed using the Missiles object
- format missile safed and store in Message[30]
-
- determine if rain mode is active using the FOV object
- format rain mode active and store in Message[30]
-
- get missile inventory using the Missiles object
- format present indicators and store in Message[31]
- format selected indicators and store in Message[32]
-
- determine if missile uncage verified using the Missiles object
- format missile uncage verified and store in Message[32]
-
- determine if missile activated using the Missiles object
- format missile activated and store in Message[32]
-
- determine if RSO is authorized using the Weapon_control object
- format RSO authorized and store in Message[32]
-
- determine if fire permit using the Weapon_control object
- format fire permit and store in Message[32]
-
- determine if stab mode using the Drive object
- format stab mode and store in Message[33]
-
- determine if uncage mode is WEAPON_CONTROL_MANUAL_UNCAGE using
- the Weapon_control object
- format uncage mode and store in Message[33]
-
- determine if current mode is MODE_ENGAGE using the Mode object
- format current mode and store in Message[33]
-
- determine if palmgrip switch is pressed using the
- Gunner_handstation object
- format palmgrip switch pressed and store in Message[33]
-
- determine if fault is active using the Fault object
- format fault active and store in Message[33]
-
- determine if FOV FLIR zoom is FOV_ZOOM_NARROW using the FOV object
- format FOV FLIR zoom and store in Message[33]
-
- determine if video tracker is on using the Video_tracker object
- format video tracker on and store in Message[34]
-
- determine if armed using the Weapon_control object
- format armed and store in Message[34]
-
- determine if uncage trigger switch pressed using the
- Gunner_handstation object
- format uncage trigger switch pressed and store in Message[34]
-
- determine if fire trigger switch pressed using the
- Gunner_handstation object
- format fire trigger switch pressed and store in Message[34]
-
- determine if missiles is firing using the Missiles object
- format missiles firing and store in Message[34]
-
- determine if helicopter mode is WEAPON_CONTROL_ON using the
- Weapon_control object
- format helicopter mode and store in Message[34]
-
- determine if IFF challenge using the IFF object
- format IFF challenge and store in Message[34]
-
- determine if autoslew is on using the Autoslew object
- format autoslew is on and store in Message[34]
-
- loop until successful
- write Message using the Channel object
- if unsuccessful
- reset the Channel object
-
-ENDOBJECT: AVDAS
diff --git a/doc/tools/pdl2texi/test_cases/enum.d b/doc/tools/pdl2texi/test_cases/enum.d
deleted file mode 100644
index fc03c04f44..0000000000
--- a/doc/tools/pdl2texi/test_cases/enum.d
+++ /dev/null
@@ -1,44 +0,0 @@
-OBJECT: Testfile
- DESCRIPTION:
- This file contains one abstract type without a range and two
- abstract types with filler ranges.
- THEORY OF OPERATION:
- This file will be used to test the .d compiler.
-
-ATTRIBUTE DESCRIPTIONS: none
-
-ASSOCIATION DESCRIPTIONS: none
-
-ABSTRACT TYPE DESCRIPTIONS:
-
-ABSTRACT TYPE: ID
- DESCRIPTION:
- This type defines an identifier for an event set that may be manipulated.
- VISIBILITY: public
- DERIVATION: Bin_type handle
-
-ABSTRACT TYPE: Test_ID
- DESCRIPTION:
- This is the abstract type with the range made optional.
- VISIBILITY: public
- DERIVATION: Bin_type handle
-
-ABSTRACT TYPE: Input_Buffer
- DESCRIPTION:
- This type indicates the maximum input buffer.
- VISIBILITY: public
- DERIVATION: string
-
-ABSTRACT TYPE: Image_t
- DESCRIPTION:
- This type specifies the data maintained for the screen.
- VISIBILITY: public
- DERIVATION: array [LINES][COLUMNS] of character
-
-DATA ITEM DESCRIPTIONS: none
-
-METHOD DESCRIPTIONS: none
-
-TASK DESCRIPTIONS: none
-
-ENDOBJECT: Testfile
diff --git a/doc/tools/pdl2texi/test_cases/enumbad.d b/doc/tools/pdl2texi/test_cases/enumbad.d
deleted file mode 100644
index 8bcd9f823e..0000000000
--- a/doc/tools/pdl2texi/test_cases/enumbad.d
+++ /dev/null
@@ -1,48 +0,0 @@
-OBJECT: Testfile
- DESCRIPTION:
- This file contains one abstract type without a range and two
- abstract types with filler ranges.
- THEORY OF OPERATION:
- This file will be used to test the .d compiler.
-
-ATTRIBUTE DESCRIPTIONS: none
-
-ASSOCIATION DESCRIPTIONS: none
-
-ABSTRACT TYPE DESCRIPTIONS:
-
-ABSTRACT TYPE: ID
- DESCRIPTION:
- This type defines an identifier for an event set that may be manipulated.
- VISIBILITY: public
- DERIVATION: Bin_type handle
- RANGE: 99 - 99
-
-ABSTRACT TYPE: Test_ID
- DESCRIPTION:
- This is the abstract type with the range made optional.
- VISIBILITY: public
- DERIVATION: Bin_type handle
-
-ABSTRACT TYPE: Input_Buffer
- DESCRIPTION:
- This type indicates the maximum input buffer.
- VISIBILITY: public
- DERIVATION: string
- RANGE: 99 - 99
-
-ABSTRACT TYPE: Image_t
- DESCRIPTION:
- This type specifies the data maintained for the screen.
- VISIBILITY: public
- DERIVATION: array [LINES][COLUMNS] of character
- RANGE: 0 - 1 QQQ
-
-DATA ITEM DESCRIPTIONS: none
-
-METHOD DESCRIPTIONS: none
-
-TASK DESCRIPTIONS: none
-
-ENDOBJECT: Testfile
-
diff --git a/doc/tools/pdl2texi/test_cases/table.d b/doc/tools/pdl2texi/test_cases/table.d
deleted file mode 100644
index 954a9b419b..0000000000
--- a/doc/tools/pdl2texi/test_cases/table.d
+++ /dev/null
@@ -1,27 +0,0 @@
-OBJECT: AVDAS
- DESCRIPTION:
- This file contains a test case which blows up pdl2texi when optimization
- is enabled. See the makefile for details.
- THEORY OF OPERATION:
- This object ..
- NOTES:
- The following blows up pdl2texi when -O is set.
-
-@table
- System Switch
-
-@end table
-
-ATTRIBUTE DESCRIPTIONS: none
-
-ASSOCIATION DESCRIPTIONS: none
-
-ABSTRACT TYPE DESCRIPTIONS: none
-
-DATA ITEM DESCRIPTIONS: none
-
-METHOD DESCRIPTIONS: none
-
-TASK DESCRIPTIONS: none
-
-ENDOBJECT: AVDAS
diff --git a/doc/tools/src2html/Makefile b/doc/tools/src2html/Makefile
deleted file mode 100644
index 208f901559..0000000000
--- a/doc/tools/src2html/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1998.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-CC=gcc
-CFLAGS=-g
-
-PROGS=ctags-wr ctags-new ctags src2html
-
-SRC2HTMLDIR=src2html1.4a
-
-all: tools
-
-tools: $(PROGS)
- chmod +x $(PROGS)
-
-ctags-wr:
- cp ../$(SRC2HTMLDIR)/ctags-wr .
-
-ctags-new:
- cd ../$(SRC2HTMLDIR)/Ctags ; gmake
- cp ../$(SRC2HTMLDIR)/Ctags/ctags-new .
-
-# EMACS ctags with Ada awareness
-ctags:
- cp ../$(SRC2HTMLDIR)/ctags-emacs/ctags ctags
-
-src2html:
- cp ../$(SRC2HTMLDIR)/src2html .
-
-clean:
- rm -f $(PROGS)
- cd ../$(SRC2HTMLDIR)/Ctags ; gmake clean
-
diff --git a/doc/tools/src2html1.4a/Ctags/C.c b/doc/tools/src2html1.4a/Ctags/C.c
deleted file mode 100644
index f091fcedad..0000000000
--- a/doc/tools/src2html1.4a/Ctags/C.c
+++ /dev/null
@@ -1,444 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)C.c 5.5 (Berkeley) 2/26/91";
-#endif /* not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include "ctags.h"
-
-static int func_entry(), str_entry();
-static void hash_entry();
-
-/*
- * c_entries --
- * read .c and .h files and call appropriate routines
- */
-c_entries()
-{
- extern int tflag; /* -t: create tags for typedefs */
- register int c, /* current character */
- level; /* brace level */
- register char *sp; /* buffer pointer */
- int token, /* if reading a token */
- t_def, /* if reading a typedef */
- t_level; /* typedef's brace level */
- char tok[MAXTOKEN]; /* token buffer */
- int st; /* Symbol type */
- int rparen; /* State of last rparen */
-
- lineftell = ftell(inf);
- sp = tok; token = t_def = NO; t_level = -1; level = 0; lineno = 1;
- rparen=0;
- while (GETC(!=,EOF)) {
- rparen--;
- switch ((char)c) {
- /*
- * Here's where it DOESN'T handle:
- * foo(a)
- * {
- * #ifdef notdef
- * }
- * #endif
- * if (a)
- * puts("hello, world");
- * }
- */
- case '{':
- ++level;
- goto endtok;
- case '}':
- /*
- * if level goes below zero, try and fix
- * it, even though we've already messed up
- */
- if (--level < 0)
- level = 0;
- goto endtok;
-
- case '\n':
- SETLINE;
- /*
- * the above 3 cases are similar in that they
- * are special characters that also end tokens.
- */
-endtok: if (sp > tok) {
- *sp = EOS;
- token = YES;
- sp = tok;
- }
- else
- token = NO;
- continue;
-
- /* we ignore quoted strings and comments in their entirety */
- case '"':
- case '\'':
- (void)skip_key(c);
- break;
- /* We ignore everything between [] */
- case '[':
- (void)skip_key(']');
- goto storec;
-
- /*
- * comments can be fun; note the state is unchanged after
- * return, in case we found:
- * "foo() XX comment XX { int bar; }"
- */
- case '/':
- if (GETC(==,'*')) {
- skip_comment();
- continue;
- }
- (void)ungetc(c,inf);
- c = '/';
- goto storec;
-
- /* hash marks flag #define's. */
- case '#':
- if (sp == tok) {
- hash_entry();
- break;
- }
- goto storec;
-
- /*
- * if we have a current token, parenthesis on
- * level zero indicates a function.
- */
- case '(':
- if (!level && token) {
- int curline;
-
- if (sp != tok)
- *sp = EOS;
- /*
- * grab the line immediately, we may
- * already be wrong, for example,
- * foo\n
- * (arg1,
- */
- getline();
- curline = lineno;
- if (func_entry()) {
- ++level;
- pfnote(tok,curline,SY_FUN);
- } else rparen=2;
- break;
- }
- goto storec;
-
- /*
- * semi-colons indicate the end of a typedef; if we find a
- * typedef we search for the next semi-colon of the same
- * level as the typedef. Ignoring "structs", they are
- * tricky, since you can find:
- *
- * "typedef long time_t;"
- * "typedef unsigned int u_int;"
- * "typedef unsigned int u_int [10];"
- *
- * If looking at a typedef, we save a copy of the last token
- * found. Then, when we find the ';' we take the current
- * token if it starts with a valid token name, else we take
- * the one we saved. There's probably some reasonable
- * alternative to this...
- */
- case ';':
- if (t_def && level == t_level) {
- t_def = NO;
- getline();
- if (sp != tok)
- *sp = EOS;
- pfnote(tok,lineno,SY_TYP);
- break;
- }
- /*
- * Catch global variables by the fact that they end in ; or ,
- * and they are at level zero.
- */
- case ',':
- if (sp != tok) *sp = EOS;
- if (level==0 && rparen!=1) {
- pfnote(tok,lineno,SY_VAR);
- break;
- }
- goto storec;
-
- /*
- * store characters until one that can't be part of a token
- * comes along; check the current token against certain
- * reserved words.
- */
- default:
-storec: if (!intoken(c)) {
- if (sp == tok)
- break;
- *sp = EOS;
- if (tflag) {
- /* no typedefs inside typedefs */
- if (!t_def && !bcmp(tok,"typedef",8)) {
- t_def = YES;
- t_level = level;
- break;
- }
- /* catch "typedef struct" */
- if ((!t_def || t_level < level)
- && (!bcmp(tok,"struct",7)
- || !bcmp(tok,"union",6)
- || !bcmp(tok,"enum",5))) {
- /* Get type of symbol */
- st=0;
- switch (*tok) {
- case 's' : st= SY_STR; break;
- case 'u' : st= SY_UNI; break;
- case 'e' : st= SY_ENU; break;
- }
- /*
- * get line immediately;
- * may change before '{'
- */
- getline();
- if (str_entry(c,st))
- ++level;
- break;
- }
- }
- sp = tok;
- }
- else if (sp != tok || begtoken(c)) {
- *sp++ = c;
- token = YES;
- }
- continue;
- }
- sp = tok;
- token = NO;
- }
-}
-
-/*
- * func_entry --
- * handle a function reference
- */
-static
-func_entry()
-{
- register int c; /* current character */
-
- /*
- * we assume that the character after a function's right paren
- * is a token character if it's a function and a non-token
- * character if it's a declaration. Comments don't count...
- */
- (void)skip_key((int)')');
- for (;;) {
- while (GETC(!=,EOF) && iswhite(c))
- if (c == (int)'\n')
- SETLINE;
- if (intoken(c) || c == (int)'{')
- break;
- if (c == (int)'/' && GETC(==,'*'))
- skip_comment();
- else { /* don't ever "read" '/' */
- (void)ungetc(c,inf);
- return(NO);
- }
- }
- if (c != (int)'{')
- (void)skip_key((int)'{');
- return(YES);
-}
-
-/*
- * hash_entry --
- * handle a line starting with a '#'
- */
-static void
-hash_entry()
-{
- extern int dflag; /* -d: non-macro defines */
- register int c, /* character read */
- curline; /* line started on */
- register char *sp; /* buffer pointer */
- char tok[MAXTOKEN]; /* storage buffer */
-
- curline = lineno;
- for (sp = tok;;) { /* get next token */
- if (GETC(==,EOF))
- return;
- if (iswhite(c))
- break;
- *sp++ = c;
- }
- *sp = EOS;
- if (bcmp(tok,"define",6)) /* only interested in #define's */
- goto skip;
- for (;;) { /* this doesn't handle "#define \n" */
- if (GETC(==,EOF))
- return;
- if (!iswhite(c))
- break;
- }
- for (sp = tok;;) { /* get next token */
- *sp++ = c;
- if (GETC(==,EOF))
- return;
- /*
- * this is where it DOESN'T handle
- * "#define \n"
- */
- if (!intoken(c))
- break;
- }
- *sp = EOS;
- if (dflag || c == (int)'(') { /* only want macros */
- getline();
- if (c == (int)'(') pfnote(tok,curline,SY_MAC);
- else pfnote(tok,curline,SY_DEF);
- }
-skip: if (c == (int)'\n') { /* get rid of rest of define */
- SETLINE
- if (*(sp - 1) != '\\')
- return;
- }
- (void)skip_key((int)'\n');
-}
-
-/*
- * str_entry --
- * handle a struct, union or enum entry
- */
-static
-str_entry(c,st)
- register int c; /* current character */
- int st; /* type of symbol */
-{
- register char *sp; /* buffer pointer */
- int curline; /* line started on */
- char tok[BUFSIZ]; /* storage buffer */
-
- curline = lineno;
- while (iswhite(c))
- if (GETC(==,EOF))
- return(NO);
- if (c == (int)'{') /* it was "struct {" */
- return(YES);
- for (sp = tok;;) { /* get next token */
- *sp++ = c;
- if (GETC(==,EOF))
- return(NO);
- if (!intoken(c))
- break;
- }
- switch ((char)c) {
- case '{': /* it was "struct foo{" */
- --sp;
- break;
- case '\n': /* it was "struct foo\n" */
- SETLINE;
- /*FALLTHROUGH*/
- default: /* probably "struct foo " */
- while (GETC(!=,EOF))
- if (!iswhite(c))
- break;
- if (c != (int)'{') {
- (void)ungetc(c, inf);
- return(NO);
- }
- }
- *sp = EOS;
- pfnote(tok,curline,st);
- return(YES);
-}
-
-/*
- * skip_comment --
- * skip over comment
- */
-skip_comment()
-{
- register int c, /* character read */
- star; /* '*' flag */
-
- for (star = 0;GETC(!=,EOF);)
- switch((char)c) {
- /* comments don't nest, nor can they be escaped. */
- case '*':
- star = YES;
- break;
- case '/':
- if (star)
- return;
- break;
- case '\n':
- SETLINE;
- /*FALLTHROUGH*/
- default:
- star = NO;
- }
-}
-
-/*
- * skip_key --
- * skip to next char "key"
- */
-skip_key(key)
- register int key;
-{
- register int c,
- skip,
- retval;
-
- for (skip = retval = NO;GETC(!=,EOF);)
- switch((char)c) {
- case '\\': /* a backslash escapes anything */
- skip = !skip; /* we toggle in case it's "\\" */
- break;
- case ';': /* special case for yacc; if one */
- case '|': /* of these chars occurs, we may */
- retval = YES; /* have moved out of the rule */
- break; /* not used by C */
- case '\n':
- SETLINE;
- /*FALLTHROUGH*/
- default:
- if (c == key && !skip)
- return(retval);
- skip = NO;
- }
- return(retval);
-}
diff --git a/doc/tools/src2html1.4a/Ctags/Makefile b/doc/tools/src2html1.4a/Ctags/Makefile
deleted file mode 100644
index c6dd7f0d6a..0000000000
--- a/doc/tools/src2html1.4a/Ctags/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-# @(#)Makefile 5.6 (Berkeley) 5/11/90
-
-CC=gcc
-
-PROG= ctags-new
-CFLAGS+=-I. -g
-
-SRCS= C.c ctags.c fortran.c lisp.c print.c tree.c yacc.c strerror.c
-
-ctags: C.o ctags.o fortran.o lisp.o print.o tree.o yacc.o strerror.o
- $(CC) -o ctags-new C.o ctags.o fortran.o lisp.o print.o tree.o yacc.o \
- strerror.o
-
-clean:
- rm -f *.o ctags-new
diff --git a/doc/tools/src2html1.4a/Ctags/ctags.1 b/doc/tools/src2html1.4a/Ctags/ctags.1
deleted file mode 100644
index aea23f9826..0000000000
--- a/doc/tools/src2html1.4a/Ctags/ctags.1
+++ /dev/null
@@ -1,225 +0,0 @@
-.\" Ctags-new is a modified version of the ctags produced by UCB and
-.\" distributed in their BSD distributions.
-.\" You should be able to diff this version against theirs to see what I
-.\" have changed.
-.\" Warren Toomey
-.\"
-.\" Copyright (c) 1987, 1990 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ctags.1 6.8 (Berkeley) 4/24/91
-.\"
-.Dd April 24, 1991
-.Dt CTAGS 1
-.Os BSD 4
-.Sh NAME
-.Nm ctags-new
-.Nd create a tags file
-.Sh SYNOPSIS
-.Nm ctags-new
-.Op Fl BFadtuwvx
-.Op Fl f Ar tagsfile
-.Ar name ...
-.Sh DESCRIPTION
-.Nm Ctags-new
-makes a tags file for
-.Xr ex 1
-from the specified C,
-Pascal, Fortran,
-.Tn YACC ,
-lex, and lisp sources. A tags file gives the
-locations of specified objects in a group of files. Each line of the
-tags file contains the object name, the file in which it is defined,
-and a search pattern for the object definition, separated by white-space.
-Using the
-.Ar tags
-file,
-.Xr ex 1
-can quickly locate these object
-definitions. Depending on the options provided to
-.Nm ctags-new ,
-objects will consist of subroutines, typedefs, defines, structs,
-enums and unions.
-.Bl -tag -width Ds
-.It Fl B
-use backward searching patterns
-.Pq Li ?...? .
-.It Fl F
-use forward searching patterns
-.Pq Li /.../
-(the default).
-.It Fl a
-append to
-.Ar tags
-file.
-.It Fl d
-create tags for
-.Li #defines
-that don't take arguments;
-.Li #defines
-that take arguments are tagged automatically.
-.It Fl f
-Places the tag descriptions in a file called
-.Ar tagsfile .
-The default behaviour is to place them in a file
-.Ar tags .
-.It Fl t
-create tags for typedefs, structs, unions, and enums.
-.It Fl u
-update the specified files in the
-.Ar tags
-file, that is, all
-references to them are deleted, and the new values are appended to the
-file. (Beware: this option is implemented in a way which is rather
-slow; it is usually faster to simply rebuild the
-.Ar tags
-file.)
-.It Fl v
-An index of the form expected by
-.Xr vgrind 1
-is produced on the standard output. This listing
-contains the object name, file name, and page number (assuming 64
-line pages). Since the output will be sorted into lexicographic order,
-it may be desired to run the output through
-.Xr sort 1 .
-Sample use:
-.Bd -literal -offset indent
-ctags-new \-v files \&| sort \-f > index
-vgrind \-x index
-.Ed
-.It Fl y
-Yet another output format. This produces lines with the information:
-symbol, line number, file name, type of symbol, each separated by whitespace.
-This is used by the
-.Xr src2html 1L
-program.
-.It Fl w
-suppress warning diagnostics.
-.It Fl x
-.Nm ctags-new
-produces a list of object
-names, the line number and file name on which each is defined, as well
-as the text of that line and prints this on the standard output. This
-is a simple index which can be printed out as an off-line readable
-function index.
-.El
-.Pp
-Files whose names end in
-.Nm \&.c
-or
-.Nm \&.h
-are assumed to be C
-source files and are searched for C style routine and macro definitions.
-Files whose names end in
-.Nm \&.y
-are assumed to be
-.Tn YACC
-source files.
-Files whose names end in
-.Nm \&.l
-are assumed to be lisp files if their
-first non-blank character is `;', `(', or `[',
-otherwise, they are
-treated as lex files. Other files are first examined to see if they
-contain any Pascal or Fortran routine definitions, and, if not, are
-searched for C style definitions.
-.Pp
-The tag
-.Li main
-is treated specially in C programs. The tag formed
-is created by prepending
-.Ar M
-to the name of the file, with the
-trailing
-.Nm \&.c
-and any leading pathname components removed. This
-makes use of
-.Nm ctags-new
-practical in directories with more than one
-program.
-.Pp
-Yacc and lex files each have a special tag.
-.Ar Yyparse
-is the start
-of the second section of the yacc file, and
-.Ar yylex
-is the start of
-the second section of the lex file.
-.Sh FILES
-.Bl -tag -width tags -compact
-.It Pa tags
-default output tags file
-.El
-.Sh DIAGNOSTICS
-.Nm Ctags-new
-exits with a value of 1 if an error occurred, where
-duplicate objects are not considered errors, 0 otherwise.
-.Sh SEE ALSO
-.Xr ex 1 ,
-.Xr vi 1
-.Sh BUGS
-Recognition of
-.Nm functions ,
-.Nm subroutines
-and
-.Nm procedures
-for
-.Tn FORTRAN
-and Pascal is done is a very simpleminded way. No attempt
-is made to deal with block structure; if you have two Pascal procedures
-in different blocks with the same name you lose.
-.Nm Ctags-new
-doesn't
-understand about Pascal types.
-.Pp
-The method of deciding whether to look for C, Pascal or
-.Tn FORTRAN
-functions is a hack.
-.Pp
-.Nm Ctags-new
-relies on the input being well formed, and any syntactical
-errors will completely confuse it. It also finds some legal syntax
-confusing; for example, as it doesn't understand
-.Li #ifdef Ns 's ,
-(incidentally, that's a feature, not a bug) any code with unbalanced
-braces inside
-.Li #ifdef Ns 's
-will cause it to become somewhat disoriented.
-In a similar fashion, multiple line changes within a definition will
-cause it to enter the last line of the object, rather than the first, as
-the searching pattern. The last line of multiple line
-.Li typedef Ns 's
-will similarly be noted.
-.Sh HISTORY
-The
-.Nm
-command appeared in
-.Bx 3.0 .
diff --git a/doc/tools/src2html1.4a/Ctags/ctags.c b/doc/tools/src2html1.4a/Ctags/ctags.c
deleted file mode 100644
index 08d01a2ba0..0000000000
--- a/doc/tools/src2html1.4a/Ctags/ctags.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-char copyright[] =
-"@(#) Copyright (c) 1987 The Regents of the University of California.\n\
- All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)ctags.c 5.8 (Berkeley) 2/26/91";
-#endif /* not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "ctags.h"
-
-/*
- * ctags: create a tags file
- */
-
-NODE *head; /* head of the sorted binary tree */
-
- /* boolean "func" (see init()) */
-bool _wht[0177],_etk[0177],_itk[0177],_btk[0177],_gd[0177];
-
-FILE *inf, /* ioptr for current input file */
- *outf; /* ioptr for tags file */
-
-long lineftell; /* ftell after getc( inf ) == '\n' */
-
-int lineno, /* line number of current line */
- dflag, /* -d: non-macro defines */
- tflag, /* -t: create tags for typedefs */
- wflag, /* -w: suppress warnings */
- vflag, /* -v: vgrind style index output */
- xflag, /* -x: cxref style output */
- yflag; /* -y: yet another style output */
-
-char *curfile, /* current input file name */
- searchar = '/', /* use /.../ searches by default */
- lbuf[BUFSIZ];
-
-main(argc,argv)
- int argc;
- char **argv;
-{
- extern char *optarg; /* getopt arguments */
- extern int optind;
- static char *outfile = "tags"; /* output file */
- int aflag, /* -a: append to tags */
- uflag, /* -u: update tags */
- exit_val, /* exit value */
- step, /* step through args */
- ch; /* getopts char */
- char cmd[100]; /* too ugly to explain */
-
- aflag = uflag = NO;
- while ((ch = getopt(argc,argv,"BFadf:tuwvxy")) != EOF)
- switch((char)ch) {
- case 'B':
- searchar = '?';
- break;
- case 'F':
- searchar = '/';
- break;
- case 'a':
- aflag++;
- break;
- case 'd':
- dflag++;
- break;
- case 'f':
- outfile = optarg;
- break;
- case 't':
- tflag++;
- break;
- case 'u':
- uflag++;
- break;
- case 'w':
- wflag++;
- break;
- case 'v':
- vflag++;
- case 'x':
- xflag++;
- break;
- case 'y':
- yflag++;
- break;
- case '?':
- default:
- goto usage;
- }
- argv += optind;
- argc -= optind;
- if (!argc) {
-usage: puts("Usage: ctags [-BFadtuwvx] [-f tagsfile] file ...");
- exit(1);
- }
-
- init();
-
- for (exit_val = step = 0;step < argc;++step)
- if (!(inf = fopen(argv[step],"r"))) {
- perror(argv[step]);
- exit_val = 1;
- }
- else {
- curfile = argv[step];
- find_entries(argv[step]);
- (void)fclose(inf);
- }
-
- if (head)
- if (xflag)
- put_entries(head);
- else {
- if (uflag) {
- for (step = 0;step < argc;step++) {
- (void)sprintf(cmd,"mv %s OTAGS;fgrep -v '\t%s\t' OTAGS >%s;rm OTAGS",outfile,argv[step],outfile);
- system(cmd);
- }
- ++aflag;
- }
- if (!(outf = fopen(outfile, aflag ? "a" : "w"))) {
- perror(outfile);
- exit(exit_val);
- }
- put_entries(head);
- (void)fclose(outf);
- if (uflag) {
- (void)sprintf(cmd,"sort %s -o %s",outfile,outfile);
- system(cmd);
- }
- }
- exit(exit_val);
-}
-
-/*
- * init --
- * this routine sets up the boolean psuedo-functions which work by
- * setting boolean flags dependent upon the corresponding character.
- * Every char which is NOT in that string is false with respect to
- * the pseudo-function. Therefore, all of the array "_wht" is NO
- * by default and then the elements subscripted by the chars in
- * CWHITE are set to YES. Thus, "_wht" of a char is YES if it is in
- * the string CWHITE, else NO.
- */
-init()
-{
- register int i;
- register char *sp;
-
- for (i = 0; i < 0177; i++) {
- _wht[i] = _etk[i] = _itk[i] = _btk[i] = NO;
- _gd[i] = YES;
- }
-#define CWHITE " \f\t\n"
- for (sp = CWHITE; *sp; sp++) /* white space chars */
- _wht[*sp] = YES;
-#define CTOKEN " \t\n\"'#()[]{}=-+%*/&|^~!<>;,.:?"
- for (sp = CTOKEN; *sp; sp++) /* token ending chars */
- _etk[*sp] = YES;
-#define CINTOK "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz0123456789"
- for (sp = CINTOK; *sp; sp++) /* valid in-token chars */
- _itk[*sp] = YES;
-#define CBEGIN "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz"
- for (sp = CBEGIN; *sp; sp++) /* token starting chars */
- _btk[*sp] = YES;
-#define CNOTGD ",;"
- for (sp = CNOTGD; *sp; sp++) /* invalid after-function chars */
- _gd[*sp] = NO;
-}
-
-/*
- * find_entries --
- * this routine opens the specified file and calls the function
- * which searches the file.
- */
-find_entries(file)
- char *file;
-{
- register char *cp;
-
- lineno = 0; /* should be 1 ?? KB */
- if (cp = rindex(file, '.')) {
- if (cp[1] == 'l' && !cp[2]) {
- register int c;
-
- for (;;) {
- if (GETC(==,EOF))
- return;
- if (!iswhite(c)) {
- rewind(inf);
- break;
- }
- }
-#define LISPCHR ";(["
-/* lisp */ if (index(LISPCHR,(char)c)) {
- l_entries();
- return;
- }
-/* lex */ else {
- /*
- * we search all 3 parts of a lex file
- * for C references. This may be wrong.
- */
- toss_yysec();
- (void)strcpy(lbuf,"%%$");
- pfnote("yylex",lineno);
- rewind(inf);
- }
- }
-/* yacc */ else if (cp[1] == 'y' && !cp[2]) {
- /*
- * we search only the 3rd part of a yacc file
- * for C references. This may be wrong.
- */
- toss_yysec();
- (void)strcpy(lbuf,"%%$");
- pfnote("yyparse",lineno);
- y_entries();
- }
-/* fortran */ else if ((cp[1] != 'c' && cp[1] != 'h') && !cp[2]) {
- if (PF_funcs())
- return;
- rewind(inf);
- }
- }
-/* C */ c_entries();
-}
diff --git a/doc/tools/src2html1.4a/Ctags/ctags.h b/doc/tools/src2html1.4a/Ctags/ctags.h
deleted file mode 100644
index 7b28018714..0000000000
--- a/doc/tools/src2html1.4a/Ctags/ctags.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ctags.h 5.4 (Berkeley) 2/26/91
- */
-
-#include <strings.h>
-#define bool char
-
-#define YES 1
-#define NO 0
-#define EOS '\0'
-
-#define ENDLINE 50 /* max length of pattern */
-#define MAXTOKEN 250 /* max size of single token */
-
-#define SETLINE {++lineno;lineftell = ftell(inf);}
-#define GETC(op,exp) ((c = getc(inf)) op (int)exp)
-
-#define iswhite(arg) (_wht[arg]) /* T if char is white */
-#define begtoken(arg) (_btk[arg]) /* T if char can start token */
-#define intoken(arg) (_itk[arg]) /* T if char can be in token */
-#define endtoken(arg) (_etk[arg]) /* T if char ends tokens */
-#define isgood(arg) (_gd[arg]) /* T if char can be after ')' */
-
- /* Symbol types */
-#define SY_MAC 1 /* Preprocessor Macros */
-#define SY_DEF 2 /* Preprocessor Defines */
-#define SY_FUN 3 /* C Functions */
-#define SY_VAR 4 /* C Variables */
-#define SY_STR 5 /* C Structs */
-#define SY_UNI 6 /* C Unions */
-#define SY_TYP 7 /* C Typedefs */
-#define SY_ENU 8 /* C Enums */
-
-typedef struct nd_st { /* sorting structure */
- struct nd_st *left,
- *right; /* left and right sons */
- char *entry, /* function or type name */
- *file, /* file name */
- *pat; /* search pattern */
- int symbtype; /* Type of symbol */
- int lno; /* for -x option */
- bool been_warned; /* set if noticed dup */
-} NODE;
-
-extern FILE *inf; /* ioptr for current input file */
-extern long lineftell; /* ftell after getc( inf ) == '\n' */
-extern int lineno, /* line number of current line */
- xflag; /* -x: cxref style output */
-extern bool _wht[0177],_etk[0177],_itk[0177],_btk[0177],_gd[0177];
-extern char lbuf[BUFSIZ];
diff --git a/doc/tools/src2html1.4a/Ctags/fortran.c b/doc/tools/src2html1.4a/Ctags/fortran.c
deleted file mode 100644
index 025a204b6b..0000000000
--- a/doc/tools/src2html1.4a/Ctags/fortran.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)fortran.c 5.5 (Berkeley) 2/26/91";
-#endif /* not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include "ctags.h"
-
-static void takeprec();
-
-char *lbp; /* line buffer pointer */
-
-PF_funcs()
-{
- register bool pfcnt; /* pascal/fortran functions found */
- register char *cp;
- char tok[MAXTOKEN],
- *gettoken();
-
- for (pfcnt = NO;;) {
- lineftell = ftell(inf);
- if (!fgets(lbuf,sizeof(lbuf),inf))
- return(pfcnt);
- ++lineno;
- lbp = lbuf;
- if (*lbp == '%') /* Ratfor escape to fortran */
- ++lbp;
- for (;isspace(*lbp);++lbp);
- if (!*lbp)
- continue;
- switch (*lbp | ' ') { /* convert to lower-case */
- case 'c':
- if (cicmp("complex") || cicmp("character"))
- takeprec();
- break;
- case 'd':
- if (cicmp("double")) {
- for (;isspace(*lbp);++lbp);
- if (!*lbp)
- continue;
- if (cicmp("precision"))
- break;
- continue;
- }
- break;
- case 'i':
- if (cicmp("integer"))
- takeprec();
- break;
- case 'l':
- if (cicmp("logical"))
- takeprec();
- break;
- case 'r':
- if (cicmp("real"))
- takeprec();
- break;
- }
- for (;isspace(*lbp);++lbp);
- if (!*lbp)
- continue;
- switch (*lbp | ' ') {
- case 'f':
- if (cicmp("function"))
- break;
- continue;
- case 'p':
- if (cicmp("program") || cicmp("procedure"))
- break;
- continue;
- case 's':
- if (cicmp("subroutine"))
- break;
- default:
- continue;
- }
- for (;isspace(*lbp);++lbp);
- if (!*lbp)
- continue;
- for (cp = lbp + 1;*cp && intoken(*cp);++cp);
- if (cp = lbp + 1)
- continue;
- *cp = EOS;
- (void)strcpy(tok,lbp);
- getline(); /* process line for ex(1) */
- pfnote(tok,lineno);
- pfcnt = YES;
- }
- /*NOTREACHED*/
-}
-
-/*
- * cicmp --
- * do case-independent strcmp
- */
-cicmp(cp)
- register char *cp;
-{
- register int len;
- register char *bp;
-
- for (len = 0,bp = lbp;*cp && (*cp &~ ' ') == (*bp++ &~ ' ');
- ++cp,++len);
- if (!*cp) {
- lbp += len;
- return(YES);
- }
- return(NO);
-}
-
-static void
-takeprec()
-{
- for (;isspace(*lbp);++lbp);
- if (*lbp == '*') {
- for (++lbp;isspace(*lbp);++lbp);
- if (!isdigit(*lbp))
- --lbp; /* force failure */
- else
- while (isdigit(*++lbp));
- }
-}
diff --git a/doc/tools/src2html1.4a/Ctags/lisp.c b/doc/tools/src2html1.4a/Ctags/lisp.c
deleted file mode 100644
index 652313d4fe..0000000000
--- a/doc/tools/src2html1.4a/Ctags/lisp.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)lisp.c 5.5 (Berkeley) 2/26/91";
-#endif /* not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include "ctags.h"
-
-extern char *lbp; /* pointer shared with fortran */
-
-/*
- * lisp tag functions
- * just look for (def or (DEF
- */
-l_entries()
-{
- register int special;
- register char *cp,
- savedc;
- char tok[MAXTOKEN];
-
- for (;;) {
- lineftell = ftell(inf);
- if (!fgets(lbuf,sizeof(lbuf),inf))
- return;
- ++lineno;
- lbp = lbuf;
- if (!cicmp("(def"))
- continue;
- special = NO;
- switch(*lbp | ' ') {
- case 'm':
- if (cicmp("method"))
- special = YES;
- break;
- case 'w':
- if (cicmp("wrapper") || cicmp("whopper"))
- special = YES;
- }
- for (;!isspace(*lbp);++lbp);
- for (;isspace(*lbp);++lbp);
- for (cp = lbp;*cp && *cp != '\n';++cp);
- *cp = EOS;
- if (special) {
- if (!(cp = index(lbp,')')))
- continue;
- for (;cp >= lbp && *cp != ':';--cp);
- if (cp < lbp)
- continue;
- lbp = cp;
- for (;*cp && *cp != ')' && *cp != ' ';++cp);
- }
- else
- for (cp = lbp + 1;
- *cp && *cp != '(' && *cp != ' ';++cp);
- savedc = *cp;
- *cp = EOS;
- (void)strcpy(tok,lbp);
- *cp = savedc;
- getline();
- pfnote(tok,lineno);
- }
- /*NOTREACHED*/
-}
diff --git a/doc/tools/src2html1.4a/Ctags/print.c b/doc/tools/src2html1.4a/Ctags/print.c
deleted file mode 100644
index 1c1c545ab6..0000000000
--- a/doc/tools/src2html1.4a/Ctags/print.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)print.c 5.4 (Berkeley) 2/26/91";
-#endif /* not lint */
-
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "ctags.h"
-
-extern char searchar; /* ex search character */
-
-/*
- * getline --
- * get the line the token of interest occurred on,
- * prepare it for printing.
- */
-getline()
-{
- register long saveftell;
- register int c,
- cnt;
- register char *cp;
-
- saveftell = ftell(inf);
- (void)fseek(inf,lineftell,SEEK_SET);
- if (xflag)
- for (cp = lbuf;GETC(!=,'\n');*cp++ = c);
- /*
- * do all processing here, so we don't step through the
- * line more than once; means you don't call this routine
- * unless you're sure you've got a keeper.
- */
- else for (cnt = 0,cp = lbuf;GETC(!=,EOF) && cnt < ENDLINE;++cnt) {
- if (c == (int)'\\') { /* backslashes */
- if (cnt > ENDLINE - 2)
- break;
- *cp++ = '\\'; *cp++ = '\\';
- ++cnt;
- }
- else if (c == (int)searchar) { /* search character */
- if (cnt > ENDLINE - 2)
- break;
- *cp++ = '\\'; *cp++ = c;
- ++cnt;
- }
- else if (c == (int)'\n') { /* end of keep */
- *cp++ = '$'; /* can find whole line */
- break;
- }
- else
- *cp++ = c;
- }
- *cp = EOS;
- (void)fseek(inf,saveftell,SEEK_SET);
-}
-
-char *symtype[]= {
- "Unknown",
- "Preprocessor macro",
- "Preprocessor define",
- "C function",
- "C variable",
- "C struct",
- "C union",
- "C typedef",
- "C enum"
-};
-
-/*
- * put_entries --
- * write out the tags
- */
-put_entries(node)
- register NODE *node;
-{
- extern FILE *outf; /* ioptr for tags file */
- extern int vflag; /* -v: vgrind style output */
- extern int yflag; /* -y: yet another style output */
-
- if (node->left)
- put_entries(node->left);
- if (vflag)
- printf("%s %s %d\n",
- node->entry,node->file,(node->lno + 63) / 64);
- else if (xflag)
- printf("%-16s %4d %-16s %s\n",
- node->entry,node->lno,node->file,node->pat);
- else if (yflag)
- printf("%-16s %4d %-16s %s\n",
- node->entry,node->lno,node->file,symtype[node->symbtype]);
- else
- fprintf(outf,"%s\t%s\t%c^%s%c\n",
- node->entry,node->file,searchar,node->pat,searchar);
- if (node->right)
- put_entries(node->right);
-}
diff --git a/doc/tools/src2html1.4a/Ctags/strerror.c b/doc/tools/src2html1.4a/Ctags/strerror.c
deleted file mode 100644
index 7a82b869bf..0000000000
--- a/doc/tools/src2html1.4a/Ctags/strerror.c
+++ /dev/null
@@ -1,6 +0,0 @@
-char *strerror(i)
- int i;
- {
- extern char *sys_errlist[];
- return sys_errlist[i];
- }
diff --git a/doc/tools/src2html1.4a/Ctags/tree.c b/doc/tools/src2html1.4a/Ctags/tree.c
deleted file mode 100644
index e82c72c404..0000000000
--- a/doc/tools/src2html1.4a/Ctags/tree.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)tree.c 5.5 (Berkeley) 2/26/91";
-#endif /* not lint */
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "ctags.h"
-
-/*
- * pfnote --
- * enter a new node in the tree
- */
-pfnote(name,ln,type)
- char *name;
- int ln;
- int type;
-{
- extern NODE *head; /* head of the sorted binary tree */
- extern char *curfile; /* current input file name */
- register NODE *np;
- register char *fp;
- char nbuf[MAXTOKEN];
-
- /*NOSTRICT*/
- if (!(np = (NODE *)malloc(sizeof(NODE)))) {
- fputs("ctags: too many entries to sort\n",stderr);
- put_entries(head);
- free_tree(head);
- /*NOSTRICT*/
- if (!(head = np = (NODE *)malloc(sizeof(NODE)))) {
- fputs("ctags: out of space.\n",stderr);
- exit(1);
- }
- }
- if (!xflag && !strcmp(name,"main")) {
- if (!(fp = rindex(curfile,'/')))
- fp = curfile;
- else
- ++fp;
- (void)sprintf(nbuf,"M%s",fp);
- fp = rindex(nbuf,'.');
- if (fp && !fp[2])
- *fp = EOS;
- name = nbuf;
- }
- if (!(np->entry = strdup(name))) {
- (void)fprintf(stderr, "ctags: %s\n", strerror(errno));
- exit(1);
- }
- np->file = curfile;
- np->lno = ln; np->symbtype= type;
- np->left = np->right = 0;
- if (!(np->pat = strdup(lbuf))) {
- (void)fprintf(stderr, "ctags: %s\n", strerror(errno));
- exit(1);
- }
- if (!head)
- head = np;
- else
- add_node(np,head);
-}
-
-add_node(node,cur_node)
- register NODE *node,
- *cur_node;
-{
- extern int wflag; /* -w: suppress warnings */
- register int dif;
-
- dif = strcmp(node->entry,cur_node->entry);
- if (!dif) {
- if (node->file == cur_node->file) {
- if (!wflag)
- fprintf(stderr,"Duplicate entry in file %s, line %d: %s\nSecond entry ignored\n",node->file,lineno,node->entry);
- return;
- }
- if (!cur_node->been_warned)
- if (!wflag)
- fprintf(stderr,"Duplicate entry in files %s and %s: %s (Warning only)\n",node->file,cur_node->file,node->entry);
- cur_node->been_warned = YES;
- }
- else if (dif < 0)
- if (cur_node->left)
- add_node(node,cur_node->left);
- else
- cur_node->left = node;
- else if (cur_node->right)
- add_node(node,cur_node->right);
- else
- cur_node->right = node;
-}
-
-free_tree(node)
- register NODE *node;
-{
- NODE *nl;
- while (node) {
- if (node->right)
- free_tree(node->right);
- nl= node->left; free(node);
- node = nl;
- }
-}
diff --git a/doc/tools/src2html1.4a/Ctags/yacc.c b/doc/tools/src2html1.4a/Ctags/yacc.c
deleted file mode 100644
index f073f2bb7c..0000000000
--- a/doc/tools/src2html1.4a/Ctags/yacc.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)yacc.c 5.6 (Berkeley) 2/26/91";
-#endif /* not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include "ctags.h"
-
-/*
- * y_entries:
- * find the yacc tags and put them in.
- */
-y_entries()
-{
- register int c;
- register char *sp;
- register bool in_rule;
- char tok[MAXTOKEN];
-
- while (GETC(!=,EOF))
- switch ((char)c) {
- case '\n':
- SETLINE;
- /* FALLTHROUGH */
- case ' ':
- case '\f':
- case '\r':
- case '\t':
- break;
- case '{':
- if (skip_key((int)'}'))
- in_rule = NO;
- break;
- case '\'':
- case '"':
- if (skip_key(c))
- in_rule = NO;
- break;
- case '%':
- if (GETC(==,'%'))
- return;
- (void)ungetc(c,inf);
- break;
- case '/':
- if (GETC(==,'*'))
- skip_comment();
- else
- (void)ungetc(c,inf);
- break;
- case '|':
- case ';':
- in_rule = NO;
- break;
- default:
- if (in_rule || !isalpha(c) && c != (int)'.'
- && c != (int)'_')
- break;
- sp = tok;
- *sp++ = c;
- while (GETC(!=,EOF) && (intoken(c) || c == (int)'.'))
- *sp++ = c;
- *sp = EOS;
- getline(); /* may change before ':' */
- while (iswhite(c)) {
- if (c == (int)'\n')
- SETLINE;
- if (GETC(==,EOF))
- return;
- }
- if (c == (int)':') {
- pfnote(tok,lineno);
- in_rule = YES;
- }
- else
- (void)ungetc(c,inf);
- }
-}
-
-/*
- * toss_yysec --
- * throw away lines up to the next "\n%%\n"
- */
-toss_yysec()
-{
- register int c, /* read character */
- state;
-
- /*
- * state == 0 : waiting
- * state == 1 : received a newline
- * state == 2 : received first %
- * state == 3 : recieved second %
- */
- lineftell = ftell(inf);
- for (state = 0;GETC(!=,EOF);)
- switch ((char)c) {
- case '\n':
- ++lineno;
- lineftell = ftell(inf);
- if (state == 3) /* done! */
- return;
- state = 1; /* start over */
- break;
- case '%':
- if (state) /* if 1 or 2 */
- ++state; /* goto 3 */
- break;
- default:
- state = 0; /* reset */
- }
-}
diff --git a/doc/tools/src2html1.4a/Ctags/z.c b/doc/tools/src2html1.4a/Ctags/z.c
deleted file mode 100644
index 4c90e6ec95..0000000000
--- a/doc/tools/src2html1.4a/Ctags/z.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#define fred 23
-#define jim(a) (a+2)
-
-int helo;
-
-struct thing {
- int v;
-} doris;
-
-union what {
- int v;
- char q;
-} mary;
-
-enum thinddd { 1,2,3,4,5 } zoo;
-
-typedef unsigned int uinty;
-
-int rain()
- { printf("Hello world\n"); }
diff --git a/doc/tools/src2html1.4a/FreeBSD/FreeBSD.hdr b/doc/tools/src2html1.4a/FreeBSD/FreeBSD.hdr
deleted file mode 100644
index 6c2f8e185c..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/FreeBSD.hdr
+++ /dev/null
@@ -1,25 +0,0 @@
-Welcome to the hyperlinked source code tree for FreeBSD-2.1.0. This is an
-attempt at a WWW document that allows you to find functions, structs
-etc. in the FreeBSD source code by name.<p>
-
-If you are interested in a particular type of symbols (e.g functions), use
-the type links below. If you are interested in a particular directory in
-FreeBSD, choose the directory link below.<p>
-
-Follow the links until you reach the source code you are interested in.<p>
-
-<h3>Bugs and Missing Features</h3>
-
-I am using ctags and perl to find the symbols and produce the html documents.
-My parsing of the ctags output (especially for variables) seems slightly
-wrong. I'd appreciate a better way of doing things.<p>
-
-The final code should have hyperlinks that allow you to follow references
-to other symbols in the tree (e.g calls to bread() etc). This is difficult
-given C's scoping rules, and I don't want to write a C grammar parser.
-Until I can think of a clean way, I'll omit the desired hyperlinks.<p>
-
-<author>
-<a href="http://minnie.cs.adfa.oz.au/warren.html">Warren Toomey</a>
-wkt@cs.adfa.oz.au, January 1996
-</author>
diff --git a/doc/tools/src2html1.4a/FreeBSD/FreeBSD.s2h b/doc/tools/src2html1.4a/FreeBSD/FreeBSD.s2h
deleted file mode 100644
index 925eefeb58..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/FreeBSD.s2h
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-#
-# Input description for the FreeBSD 2.1.0 source tree
-# Place this file and all the .hdr files in a directory,
-# cd into that directory, and say `src2html FreeBSD.s2h'.
-#
-set Formdir /cgi-bin
-set Htmldir FreeBSD-srctree
-set Htmlroot .
-set Newsrctree newsrc
-set Srctree sys
-#
-dir conf Kernel configuration parameters
-dir ddb Kernel debugging routines
-dir dev/aic7xxx Adaptec AIC7770/AIC7870 sequencer code
-dir dev/vn Vnode disk driver
-dir gnu/i386/fpemul GNU's i387 floating point emulator
-dir gnu/i386/isa Device drivers with GNU licensing
-dir gnu/isdn An ISDN driver
-dir i386/apm i386-specific power management
-dir i386/apm/apm_init i386-specific power management
-dir i386/boot/biosboot i386-specific boot code
-dir i386/boot/dosboot i386-specific boot code
-dir i386/boot/kzipboot i386-specific boot code
-dir i386/boot/netboot i386-specific boot code
-dir i386/eisa Device drivers for peripherals on the EISA bus
-dir i386/i386 i386-specific code
-dir i386/ibcs2 Intel Unix Binary Compatibility code
-dir i386/include i386-specific C-language include files
-dir i386/include/pc i386-specific C-language include files
-dir i386/isa Device drivers for peripherals on the ISA bus
-dir i386/isa/ic Device drivers for peripherals on the ISA bus
-dir i386/isa/matcd Matsushita device driver
-dir i386/isa/pcvt VT-220 emulation code
-dir i386/isa/sound Device drivers for sound peripherals on the ISA bus
-dir i386/linux Linux binaries support
-dir i386/scsi Device drivers for SCSI peripherals on the ISA bus
-dir isofs/cd9660 ISO CD9660 file-system code
-dir kern The core OS routines: processes, scheduling, syscalls
-dir libkern The kernel library
-dir miscfs/deadfs Miscellaneous file systems
-dir miscfs/devfs Miscellaneous file systems
-dir miscfs/fdesc Miscellaneous file systems
-dir miscfs/fifofs Miscellaneous file systems
-dir miscfs/kernfs Miscellaneous file systems
-dir miscfs/nullfs Miscellaneous file systems
-dir miscfs/portal Miscellaneous file systems
-dir miscfs/procfs Miscellaneous file systems
-dir miscfs/specfs Miscellaneous file systems
-dir miscfs/umapfs Miscellaneous file systems
-dir miscfs/union Miscellaneous file systems
-dir msdosfs The MS-DOS file system code
-dir net Routing and general network interfaces
-dir netccitt CCITT Networking code
-dir netinet Internet protocols
-dir netiso ISO Networking code
-dir netiso/xebec ISO Networking code
-dir netns Xerox NS Networking code
-dir nfs The Network File System
-dir pccard Interface code for PC-CARD controllers.
-dir pci Device drivers for peripherals on the PCI bus
-dir scsi Device drivers for peripherals on the SCSI bus
-dir sys Widely used C-language include files
-dir ufs/ffs The Berkeley Fast Filesystem
-dir ufs/lfs The Log Filesystem
-dir ufs/mfs The Memory Filesystem
-dir ufs/ufs The Unix Filesystem
-dir vm The Virtual Memory Management subsystem
diff --git a/doc/tools/src2html1.4a/FreeBSD/conf.hdr b/doc/tools/src2html1.4a/FreeBSD/conf.hdr
deleted file mode 100644
index 103742dbe2..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/conf.hdr
+++ /dev/null
@@ -1,9 +0,0 @@
-The <tt>conf</tt> directory holds miscellaneous files, such as the list of
-files which are needed/optional in the OS. The main file of concern is
-<tt>param.c</tt>, which describes the system-dependent configuration
-parameters of FreeBSD.
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-doesn't really cover this directory. It is vaguely covered in Chapter 8 of
-the "System Performance Tuning" Nutshell book by Mike Loukides.
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/ddb.hdr b/doc/tools/src2html1.4a/FreeBSD/ddb.hdr
deleted file mode 100644
index 2882f3dfa8..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/ddb.hdr
+++ /dev/null
@@ -1,6 +0,0 @@
-The <tt>ddb</tt> directory holds routines used to debug the kernel.
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-doesn't really cover this directory. However, some information has been
-presented by Kirk KcKusick and Keith Bostic in their "UNIX Kernel Internals"
-notes, which they have presented in many places in the past few years.
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/i386.i386.hdr b/doc/tools/src2html1.4a/FreeBSD/i386.i386.hdr
deleted file mode 100644
index 72ea58d1f1..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/i386.i386.hdr
+++ /dev/null
@@ -1,5 +0,0 @@
-The <tt>i386/i386</tt> directory holds the routines that deal with the Intel
-386/486 CPU in the PC architecture.
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-doesn't describe this anywhere at all, because this is machine-specific.
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/i386.include.hdr b/doc/tools/src2html1.4a/FreeBSD/i386.include.hdr
deleted file mode 100644
index 7acfb0ec1b..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/i386.include.hdr
+++ /dev/null
@@ -1,5 +0,0 @@
-The <tt>i386/include</tt> directory holds C-language include files that
-define things that are specific about the PC architecture.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-doesn't describe this anywhere at all. <p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/i386.isa.hdr b/doc/tools/src2html1.4a/FreeBSD/i386.isa.hdr
deleted file mode 100644
index ec13230f00..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/i386.isa.hdr
+++ /dev/null
@@ -1,10 +0,0 @@
-The <tt>i386/isa</tt> directory holds the routines that deal with the ISA
-I/O bus in the PC architecture.
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-doesn't describe this anywhere at all, because this is machine-specific.
-You can however glean some information from the following chapter:
-
-<dl>
-<dt> <b>Chapter 8</b>, pp 225-256 <i>Device Drivers</i>.
-</dl>
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/i386.stand.hdr b/doc/tools/src2html1.4a/FreeBSD/i386.stand.hdr
deleted file mode 100644
index c548c044b0..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/i386.stand.hdr
+++ /dev/null
@@ -1,14 +0,0 @@
-The <tt>i386/stand</tt> directory holds functions that are useful, but cannot
-be called from the kernel. For example printf() is great, but if the kernel
-called printf() it would generate a TRAP and wind up back in the kernel.<p>
-
-The functions here emulate these functions by dealing directly with the
-hardware on the system.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-covers machine-independent <tt>stand</tt> functionality in:
-
-<dl>
-<dt> <b>Chapter 13.2</b>, pg 394 <i>Bootstrapping</i>.
-</dl>
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/kern.hdr b/doc/tools/src2html1.4a/FreeBSD/kern.hdr
deleted file mode 100644
index f8ec13e4a1..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/kern.hdr
+++ /dev/null
@@ -1,18 +0,0 @@
-The <tt>kern</tt> directory holds the core functionality of FreeBSD:
-system startup, core system calls and syscall dispatching, process
-management, scheduling, signals, file descriptors, top-level filesystem
-code, interprocess communication and terminal handling.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-covers <tt>kern</tt> in:
-
-<dl>
-<dt> <b>Chapter 2</b>, pp 19-42 <i>Overview of the Kernel</i>.
-<dt> <b>Chapter 3</b>, pp 43-66 <i>Kernel Services</i>.
-<dt> <b>Chapter 4</b>, pp 69-108 <i>Process Management</i>.
-<dt> <b>Chapter 6</b>, pp 169-186 <i>I/O System Overview</i>.
-<dt> <b>Chapter 9</b>, pp 259-278 <i>Terminal Handling</i>.
-<dt> <b>Chapter 10</b>, pp 281-309 <i>Interprocess Communication</i>.
-<dt> <b>Chapter 13</b>, pp 393-411 <i>System Startup</i>.
-</dl>
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/net.hdr b/doc/tools/src2html1.4a/FreeBSD/net.hdr
deleted file mode 100644
index 59c1f67741..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/net.hdr
+++ /dev/null
@@ -1,11 +0,0 @@
-The <tt>net</tt> directory holds the network functionality of FreeBSD that
-deals with routing and generic interfaces: SLIP, PPP, Ethernet, packet
-filters.
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-covers <tt>kern</tt> in:
-
-<dl>
-<dt> <b>Chapter 11</b>, pp 311-341 <i>Network Communication</i>.
-</dl>
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/netinet.hdr b/doc/tools/src2html1.4a/FreeBSD/netinet.hdr
deleted file mode 100644
index 19cdffa577..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/netinet.hdr
+++ /dev/null
@@ -1,10 +0,0 @@
-The <tt>netinet</tt> directory holds the code for the Internet network
-protocols used in FreeBSD: TCP, IP, ICMP, ARP.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-covers <tt>netinet</tt> in:
-
-<dl>
-<dt> <b>Chapter 12</b>, pp 343-389 <i>Network Protocols</i>.
-</dl>
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/nfs.hdr b/doc/tools/src2html1.4a/FreeBSD/nfs.hdr
deleted file mode 100644
index f9aeab2bbb..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/nfs.hdr
+++ /dev/null
@@ -1,7 +0,0 @@
-The <tt>nfs</tt> directory holds the code for the Network File System.
-The code was developed from a specification of NFS from Sun Microsystems.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-doesn't cover <tt>nfs</tt>. You probably don't really want to delve into
-it too much, but there is an RFC around describing the protocol, but not
-the code here. <p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/stand.hdr b/doc/tools/src2html1.4a/FreeBSD/stand.hdr
deleted file mode 100644
index 9e7df8861f..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/stand.hdr
+++ /dev/null
@@ -1,14 +0,0 @@
-The <tt>stand</tt> directory holds functions that are useful, but cannot be
-called from the kernel. For example printf() is great, but if the kernel
-called printf() it would generate a TRAP and wind up back in the kernel.<p>
-
-The functions here emulate these functions by dealing directly with the
-hardware on the system.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-covers <tt>stand</tt> in:
-
-<dl>
-<dt> <b>Chapter 13.2</b>, pg 394 <i>Bootstrapping</i>.
-</dl>
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/sys.hdr b/doc/tools/src2html1.4a/FreeBSD/sys.hdr
deleted file mode 100644
index 2624741a87..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/sys.hdr
+++ /dev/null
@@ -1,6 +0,0 @@
-The <tt>sys</tt> directory holds C-language include files that are used
-by all parts of the FreeBSD source tree.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-doesn't cover these files specifically, but discussion of their contents
-crops up everywhere.<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/ufs.hdr b/doc/tools/src2html1.4a/FreeBSD/ufs.hdr
deleted file mode 100644
index 8cec8cddac..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/ufs.hdr
+++ /dev/null
@@ -1,10 +0,0 @@
-The <tt>ufs</tt> directory holds the code for the Berkeley Fast Filesystem,
-which is the filesystem used on locally mounted hard and floppy disks.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-covers <tt>ufs</tt> in:
-
-<dl>
-<dt> <b>Chapter 7</b>, pp 187-223 <i>The Filesystem</i>.
-</dl>
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/vm.hdr b/doc/tools/src2html1.4a/FreeBSD/vm.hdr
deleted file mode 100644
index 26205175a8..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/vm.hdr
+++ /dev/null
@@ -1,9 +0,0 @@
-The <tt>vm</tt> directory holds the virtual memory subsystem used by
-FreeBSD. This was derived from the VM system used in the Mach kernel,
-with the interface to the rest of the kernel rewritten. As such, it is
-not described in the
-4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman,
-but it is described by Kirk KcKusick and Keith Bostic in their
-"UNIX Kernel Internals"
-notes, which they have presented in many places in the past few years.
-<p>
diff --git a/doc/tools/src2html1.4a/Readme b/doc/tools/src2html1.4a/Readme
deleted file mode 100644
index 2153411891..0000000000
--- a/doc/tools/src2html1.4a/Readme
+++ /dev/null
@@ -1,65 +0,0 @@
- src2html - Hyperlink a C source code tree using HTML, Version 1.3-alpha
-
- Warren Toomey wkt@cs.adfa.oz.au June 1995
-
-
-Src2html is a program which takes a C source tree and creates a set of
-HTML hypertext documents that allows the most important symbols in the
-source tree to be found easily. As well, a HTML version of the source
-tree is created, with the symbols given in bold font where they are defined
-in the source.
-
-
-REQUIREMENTS
-
-You will need:
-
- + Perl 4.x
- + a standard Unix sort(1) command.
- + a mkdir(1) that supports recursive creation of directories.
- src2html is configured to use `mkdir -p' to do this.
- + an egrep(1) if you're going to use the search facility.
- + httpd(1) if you're going to use the search facility.
- + Ctags-new, which is bundled with src2html, and a C compiler
- to compile it.
-
-
-INSTALLATION
-
-Extract the src2html archive, including the Ctags-new and Example directories;
-you probably have already done that. Go into the Ctags-new directory and make
-ctags-new. This should be very straight-forward.
-
-Install ctags-new and src2html in a directory on your path, make them
-executable and install their man pages as well. If your mkdir(1) uses a
-different option to -p, edit src2html to fix this.
-
-If you want to use the search facility, you need to install src2html.cgi
-in your httpd script directory, and edit it to reflect the root of your
-HTML documents, as set in DirectryRoot in conf/srm.conf.
-
-Make sure that ctags-new, src2html and src2html.cgi are executable, and
-that the latter two can find the Perl interpreter. Installation is complete.
-
-
-USING SRC2HTML
-
-Using src2html is pretty straight-forward. Print out and read the man page
-before trying anything. In the FreeBSD directory I have included the config
-file and header files for my src2html conversion of the FreeBSD-2.0.5 source
-tree; read the man page and FreeBSD/FreeBSD.s2h in tandem. The root document of
-this HTML tree is at http://minnie.cs.adfa.oz.au/FreeBSD-srctree/FreeBSD.html.
-
-
-COMMENTS AND QUESTIONS
-
-Surprisingly, src2html is reasonably fast even on large source trees. This was
-my first Perl program, so it could probably be made faster and smaller. I've
-placed comments in the source to give you an idea of what each section does. If
-you have any questions or comments, please email them to me at
-wkt@cs.adfa.oz.au. Now that it's finished I'm not that keen on overhauling it
-etc. I consider it as a good prototype. Getting inter-source hyperlinks done
-would be great, but I really don't want to write a C parser myself.
-
-Cheers,
- Warren Toomey
diff --git a/doc/tools/src2html1.4a/ctags-emacs/README b/doc/tools/src2html1.4a/ctags-emacs/README
deleted file mode 100644
index 83415c92f4..0000000000
--- a/doc/tools/src2html1.4a/ctags-emacs/README
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# $Id$
-#
-
-Included in this directory is a patch for the file lib-src/etags.c
-from emacs-20.2. This patch and the following instructions may
-or may not work for any other emacs version.
-
-mkdir work
-tar xzf ..../emacs-20.2.tar.gz
-cd emacs-20.2/lib-src
-patch <...../etags.c-ada-patch
-cd ../..
-mkdir build
-cd build
-../emacs-20.2/configure
-cd lib-src
-gmake ctags
-
-The ctags file in this directory is a pre-compiled binary.
diff --git a/doc/tools/src2html1.4a/ctags-emacs/ctags b/doc/tools/src2html1.4a/ctags-emacs/ctags
deleted file mode 100644
index 7fc51e6e9c..0000000000
--- a/doc/tools/src2html1.4a/ctags-emacs/ctags
+++ /dev/null
Binary files differ
diff --git a/doc/tools/src2html1.4a/ctags-emacs/etags.c-ada-patch b/doc/tools/src2html1.4a/ctags-emacs/etags.c-ada-patch
deleted file mode 100644
index 7f660ce864..0000000000
--- a/doc/tools/src2html1.4a/ctags-emacs/etags.c-ada-patch
+++ /dev/null
@@ -1,424 +0,0 @@
-*** etags.c.orig Wed Aug 6 02:09:19 1997
---- etags.c Wed Nov 5 13:30:11 1997
-***************
-*** 31,37 ****
- * Francesco Potorti` (F.Potorti@cnuce.cnr.it) is the current maintainer.
- */
-
-! char pot_etags_version[] = "@(#) pot revision number is 12.11";
-
- #define TRUE 1
- #define FALSE 0
---- 31,37 ----
- * Francesco Potorti` (F.Potorti@cnuce.cnr.it) is the current maintainer.
- */
-
-! char pot_etags_version[] = "@(#) pot revision number is 12.11/patched for Ada";
-
- #define TRUE 1
- #define FALSE 0
-***************
-*** 182,193 ****
---- 182,195 ----
- char *relative_filename (), *absolute_filename (), *absolute_dirname ();
- void grow_linebuffer ();
- long *xmalloc (), *xrealloc ();
-+ char *basename_no_extension ();
-
- typedef void Lang_function ();
- /* Many compilers barf on this:
- Lang_function Asm_labels;
- so let's write it this way */
- void Asm_labels ();
-+ void Ada_funcs ();
- void C_entries ();
- void default_C_entries ();
- void plain_C_entries ();
-***************
-*** 300,305 ****
---- 302,309 ----
- bool cxref_style; /* -x: create cxref style output */
- bool cplusplus; /* .[hc] means C++, not C */
- bool noindentypedefs; /* -I: ignore indentation in C */
-+ bool packages_only; /* -P: only ada packages */
-+ bool do_filename_tags; /* -F: insert a tag for the filename */
-
- #ifdef LONG_OPTIONS
- struct option longopts[] =
-***************
-*** 330,335 ****
---- 334,341 ----
- { "update", no_argument, NULL, 'u' },
- { "version", no_argument, NULL, 'V' },
- { "vgrind", no_argument, NULL, 'v' },
-+ { "packages-only", no_argument, NULL, 'P' },
-+ { "do-filename-tags", no_argument, NULL, 'F' },
- { 0 }
- };
- #endif /* LONG_OPTIONS */
-***************
-*** 371,376 ****
---- 377,386 ----
- NULL
- };
-
-+ /* Ada code */
-+ char *Ada_suffixes [] =
-+ { "ads", "adb", "ada", NULL };
-+
- /* Note that .c and .h can be considered C++, if the --c++ flag was
- given. That is why default_C_entries is called here. */
- char *default_C_suffixes [] =
-***************
-*** 445,450 ****
---- 455,461 ----
- struct lang_entry lang_names [] =
- {
- { "asm", Asm_labels, Asm_suffixes, NULL },
-+ { "Ada", Ada_funcs, Ada_suffixes, NULL },
- { "c", default_C_entries, default_C_suffixes, NULL },
- { "c++", Cplusplus_entries, Cplusplus_suffixes, NULL },
- { "c*", Cstar_entries, Cstar_suffixes, NULL },
-***************
-*** 609,614 ****
---- 620,631 ----
- which you like.");
- }
-
-+ puts ("-P, --packages-only\n\
-+ For Ada files, generates tags entries only for packages.");
-+
-+ puts ("-F, --do-filename-tags\n\
-+ Generates a tag entry with tagname being file basename without suffix.");
-+
- puts ("-V, --version\n\
- Print the version of the program.\n\
- -h, --help\n\
-***************
-*** 816,824 ****
- char *optstring;
-
- #ifdef ETAGS_REGEXPS
-! optstring = "-aCdDf:Il:o:r:RStTi:BuvxwVhH";
- #else
-! optstring = "-aCdDf:Il:o:StTi:BuvxwVhH";
- #endif /* ETAGS_REGEXPS */
-
- #ifndef LONG_OPTIONS
---- 833,841 ----
- char *optstring;
-
- #ifdef ETAGS_REGEXPS
-! optstring = "-aCdDf:Il:o:r:RStTi:BuvxwVhHPF";
- #else
-! optstring = "-aCdDf:Il:o:StTi:BuvxwVhHPF";
- #endif /* ETAGS_REGEXPS */
-
- #ifndef LONG_OPTIONS
-***************
-*** 892,897 ****
---- 909,923 ----
- case 'T':
- typedefs = typedefs_and_cplusplus = TRUE;
- break;
-+
-+ case 'P':
-+ packages_only++;
-+ break;
-+
-+ case 'F':
-+ do_filename_tags++;
-+ break;
-+
- #if (!CTAGS)
- /* Etags options */
- case 'i':
-***************
-*** 1169,1174 ****
---- 1195,1201 ----
- if (!CTAGS)
- {
- char *filename;
-+ char *tagfilename;
-
- if (absolutefn (file))
- {
-***************
-*** 1181,1186 ****
---- 1208,1220 ----
- to the directory of the tags file. */
- filename = relative_filename (file, tagfiledir);
- }
-+ if (do_filename_tags)
-+ {
-+ tagfilename = basename_no_extension(filename);
-+ pfnote(savestr(tagfilename), FALSE, tagfilename, 0, 1, 0);
-+ free (tagfilename);
-+ }
-+
- fprintf (tagf, "\f\n%s,%d\n", filename, total_size_of_entries (head));
- free (filename);
- put_entries (head);
-***************
-*** 2954,2959 ****
---- 2988,3198 ----
- C_entries (YACC, inf);
- }
-
-+ /* ada parsing */
-+
-+ char *adbp;
-+ int apfcnt;
-+
-+ void
-+ Ada_funcs(fi)
-+ FILE *fi;
-+ {
-+ int inquote;
-+
-+ inquote = 0;
-+ lineno = 0;
-+ charno = 0;
-+ apfcnt = 0;
-+
-+ while (!feof (fi))
-+ {
-+ if (adbp == NULL || *adbp == 0)
-+ {
-+ lineno++;
-+ linecharno = charno;
-+ charno += readline (&lb, fi) + 1;
-+ adbp = lb.buffer;
-+ }
-+ if (*adbp == '-')
-+ {
-+ adbp++ ;
-+ if (*adbp == '-')
-+ {
-+ while (*adbp)
-+ adbp++;
-+ continue;
-+ }
-+ }
-+ if (*adbp == '\'')
-+ {
-+ adbp++ ;
-+ if (*adbp) adbp++;
-+ continue;
-+ }
-+ if (inquote || (*adbp == '"'))
-+ {
-+ inquote = 1;
-+ adbp++ ;
-+ while (*adbp && *adbp != '"')
-+ adbp++;
-+ if (*adbp == '"')
-+ {
-+ adbp++;
-+ inquote = 0;
-+ }
-+ continue;
-+ }
-+ while (*adbp && !begtoken(*adbp))
-+ {
-+ if ((*adbp == '-') || (*adbp == '"') || (*adbp == '\''))
-+ break;
-+ adbp++;
-+ }
-+ if ((*adbp == '-') || (*adbp == '"') || (*adbp == '\''))
-+ continue;
-+ if (*adbp == 0)
-+ continue;
-+ switch (*adbp)
-+ {
-+ case 'f':
-+ case 'F':
-+ if (adatail("function") && !packages_only)
-+ adagetit(fi, "/f");
-+ else
-+ adaskip();
-+ continue;
-+ case 'p':
-+ case 'P':
-+ if (adatail("procedure") && !packages_only)
-+ adagetit(fi, "/p");
-+ else if (adatail("package"))
-+ adagetit(fi, "/s");
-+ else
-+ adaskip();
-+ continue;
-+ case 't':
-+ case 'T':
-+ if (adatail("task") && !packages_only)
-+ adagetit(fi, "/k");
-+ else if (typedefs && adatail("type") && !packages_only)
-+ adagetit(fi, "/t");
-+ else
-+ adaskip();
-+ continue;
-+
-+ default:
-+ adaskip();
-+ continue;
-+ }
-+ }
-+ }
-+ adaskip()
-+ {
-+ while (*adbp && !endtoken(*adbp))
-+ adbp++;
-+ while (*adbp && !begtoken(*adbp))
-+ {
-+ if ((*adbp == '"') || (*adbp == '\'') || (*adbp == '-'))
-+ return;
-+ adbp++;
-+ }
-+ }
-+
-+ adatail(cp)
-+ char *cp;
-+ {
-+ register int len = 0;
-+
-+ while (*cp && (*cp == tolower(*(adbp+len))))
-+ cp++, len++;
-+ if (*cp == 0)
-+ {
-+ adbp += len;
-+ if (intoken(*adbp))
-+ return (0);
-+ else
-+ return (1);
-+ }
-+ return (0);
-+ }
-+
-+ adagetit(fi, name_qualifier)
-+ FILE *fi;
-+ char *name_qualifier;
-+
-+ {
-+ register char *cp;
-+ char c;
-+ char nambuf[BUFSIZ];
-+ char * local_name_qualifier;
-+
-+ local_name_qualifier = name_qualifier;
-+
-+ while (!feof (fi))
-+ {
-+ if (*adbp == '\0')
-+ {
-+ lineno++;
-+ linecharno = charno;
-+ charno += readline (&lb, fi) + 1;
-+ adbp = lb.buffer;
-+ }
-+ if (*adbp == '-')
-+ {
-+ adbp++ ;
-+ if (*adbp == '-')
-+ {
-+ while (*adbp)
-+ adbp++;
-+ continue;
-+ }
-+ }
-+ while (isspace(*adbp))
-+ adbp++;
-+ if (*adbp == 0)
-+ continue;
-+ if (*adbp == '-')
-+ continue;
-+ switch(*adbp)
-+ {
-+ case 'b':
-+ case 'B':
-+ if (adatail("body"))
-+ {
-+ local_name_qualifier = "/b";
-+ continue;
-+ }
-+ break;
-+
-+ case 't':
-+ case 'T':
-+ if (adatail("type"))
-+ continue;
-+ break;
-+ }
-+ if (*adbp == '"')
-+ {
-+ for (cp = adbp+1; *cp && *cp != '"'; cp++)
-+ continue;
-+ }
-+ else
-+ for (cp = adbp+1;
-+ *cp && (isalpha(*cp) || isdigit(*cp) || *cp == '_');
-+ cp++)
-+ continue;
-+ c = cp[0];
-+ cp[0] = 0;
-+ strcpy(nambuf, adbp);
-+ strcat(nambuf, local_name_qualifier);
-+ cp[0] = c;
-+ pfnote(savenstr (nambuf, strlen(nambuf)), TRUE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
-+ /* I am not really sure what the name is used for. */
-+ /* probably to be used to add a qualifier like /f /p /b /s /k /t */
-+ apfcnt++;
-+ return;
-+ }
-+ }
-+
- /* Fortran parsing */
-
- char *dbp;
-***************
-*** 4684,4689 ****
---- 4923,4968 ----
- return path.buffer;
- #endif /* not MSDOS */
- #endif /* not HAVE_GETCWD */
-+ }
-+
-+ /* Returna newly allocated string containing the filename
-+ of FILE without any precending directory and without
-+ extension. */
-+ char *
-+ basename_no_extension (file)
-+ char *file;
-+ {
-+ char *begin = file + strlen(file);
-+ char *end = begin;
-+ char *res, *rescp;
-+ bool in_extension;
-+
-+
-+ /* position begin at the begining of the basename
-+ end will point to the end of the basename
-+ without extension */
-+ in_extension = TRUE;
-+
-+ while (begin > file && *begin != '/')
-+ {
-+ if (*begin == '.' && in_extension)
-+ {
-+ end = begin;
-+ in_extension = FALSE;
-+ }
-+ begin--;
-+ }
-+ if (*begin == '/')
-+ begin++;
-+
-+ res = xnew(strlen(begin) - strlen(end) + 1, char);
-+ rescp = res;
-+ while (begin != end)
-+ {
-+ *rescp++ = *begin++;
-+ }
-+ *rescp = '\0';
-+ return res;
- }
-
- /* Return a newly allocated string containing the file name
diff --git a/doc/tools/src2html1.4a/ctags-wr b/doc/tools/src2html1.4a/ctags-wr
deleted file mode 100644
index d514e85cab..0000000000
--- a/doc/tools/src2html1.4a/ctags-wr
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-#
-# Ctags wrapper
-#
-# Invokes the version shipped with src2html for C.
-# Invokes the Ada patched GNU Emacs version for Ada.
-#
-# $Id$
-
-TOOLSBASE=/usr1/rtems/rtemsdoc-work/tools/src2html
-
-if [ ! -f ${TOOLSBASE}/ctags-new ]; then
- echo Can not find ${TOOLSBASE}/ctags-new for C programs.
- exit 1
-fi
-
-if [ ! -f ${TOOLSBASE}/ctags ]; then
- echo Can not find ${TOOLSBASE}/ctags for Ada programs.
- exit 1
-fi
-
-cfiles=`find $1 -name "*.[ch]" -o "*.inl" 2>/dev/null | grep -v "/no-"`
-adafiles=`find $1 -name "*.ad[sb]" 2>/dev/null | grep -v "/no-"`
-adafiles=`ls -1 $1/*.ad[sb] 2>/dev/null`
-
-#cfiles=`ls -1 $1/*.[ch] $1/*.inl 2>/dev/null | grep -v "/no-"`
-#adafiles=`ls -1 $1/*.ad[sb] 2>/dev/null`
-
-if [ "x${cfiles}" != x ] ; then
- ${TOOLSBASE}/ctags-new -d -t -w -y ${cfiles}
- #mv tags tags.c
-fi
-
-if [ "x${adafiles}" != x ] ; then
- ${TOOLSBASE}-src/ctags -d -t -x --no-warn ${adafiles}
-fi
-# cat tags
-#mv tags tags.ada
-#
-#cat tags.c tags.ada
-#rm -f tags.c tags.ada
diff --git a/doc/tools/src2html1.4a/src2html b/doc/tools/src2html1.4a/src2html
deleted file mode 100644
index 98d9d83d7f..0000000000
--- a/doc/tools/src2html1.4a/src2html
+++ /dev/null
@@ -1,704 +0,0 @@
-#!/usr/bin/perl
-# Src2html: Take a source tree and generate Html documents that have hyperlinks
-# to the definition of structures, variables, functions, and preprocessor
-# definitions. Read the manual page for details on how to use the program.
-#
-# Version 1.4-alpha. Written by Warren Toomey wkt@cs.adfa.oz.au
-#
-# 19th January 1996
-#
-# $Id$
-#
-
-if ($#ARGV <= 0 || $#ARGV > 4) { # Check arg count
- print(STDERR "Usage: $0 [-na] [-nl] [-d num] input_description\n");
- print(STDERR " -na: Don't produce top-level category files\n");
- print(STDERR " -nl: Don't produce per-letter files\n");
- print(STDERR " -d: Set debugging to given number (0-3)\n");
- exit(1);
-}
-
-# Set up default option values
-$NoLetters= 0;
-$NoAll= 0;
-$Debug=0;
-$Top= $ARGV[$#ARGV];
-$Top=~ s/\.s2h$//;
-
-# Parse the options
-for ($i=0; $i<= $#ARGV; $i++) {
- if ($ARGV[$i] eq "-na") { $NoAll= 1; next; }
- if ($ARGV[$i] eq "-nl") { $NoLetters= 1; next; }
- if ($ARGV[$i] eq "-d") { $i++; $Debug= $ARGV[$i]; next; }
-}
-
-$Title{"m"}= "C Macros";
-$Title{"d"}= "C Defines";
-$Title{"f"}= "C Functions";
-$Title{"v"}= "C Variables";
-$Title{"s"}= "C Structs";
-$Title{"u"}= "C Unions";
-$Title{"t"}= "C Typedefs";
-$Title{"e"}= "C Enums";
-$Title{"AdaType"}= "Ada Types";
-$Title{"AdaProcedure"}= "Ada Procedures";
-$Title{"AdaFunction"}= "Ada Functions";
-$Title{"AdaPackage"}= "Ada Packages";
-$Title{"AdaTask"}= "Ada Tasks";
-$Title{"g"}= "All symbols";
-
-&get_s2h; # Read the description file
-&make_dirs; # Make directories as needed
-&make_ctags; # Generate ctags for all src
-&parse_ctags; # Parse ctags, generate html ptr files
-foreach $i (keys(%Dirinfo))
-{ &rewrite_src($i); } # Rewrite the src code
-exit(0); # and exit
-
-
-## get_s2h: Opens the source description file, reads it, and sets up some
-## variables describing where some directories are, and the source directories
-## to process. Variables used are:
-## Srctree - The root of the source tree we are processing
-## Htmlroot - The directory where all WWW documents are kept
-## Htmldir - The directory under Htmlroot for this source tree
-## Htmltree - The root of the destination tree for the Html code
-## Newsrctree - The directory in Htmltree to store the new Htmlised code
-## Headers - The directory where we keep information to prepend in some docs
-## Formdir - The place to put the index searching script
-## Dirinfo{} - The list of dirs and the info about the directory
-## Dotdir{} - The directory name with /'s -> .'s
-
-sub get_s2h {
- $Newsrctree= 'newsrc'; # Set up as default
- $Headers= '.';
-
-
- #########################################################
- # make sure we dump out the last bit of the last file....
-
- # Print out the remainder of the
- # current file, incl. the buffered line
- if ($In_file == 1) {
- if ("$line" ne "") { print OUT $line; }
- while (<IN>) {
- s/\&/&amp;/g; s/\</&lt;/g; s/\>/&gt;/g; print OUT;
- }
- print OUT "\n\n\n\n\n\n\n\n</pre></body>\n";
- close(IN); close(OUT);
- }
- #########################################################
-
- open(S2H,$ARGV[$#ARGV]) # Open descript
- || die "$0: can't open $ARGV[$#ARGV]: $!\n";
-
- while(<S2H>) { # Read in input lines
- next if /^#/; # Skip comments
- if ( /^set\s+Srctree\s+(\S+)/ ) {
- $Srctree = $1; next; # Set the variable
- }
- if ( /^set\s+Htmlroot\s+(\S+)/ ) {
- $Htmlroot = $1; next; # Set the variable
- }
- if ( /^set\s+Htmldir\s+(\S+)/ ) {
- $Htmldir = $1; next; # Set the variable
- }
- if ( /^set\s+Newsrctree\s+(\S+)/ ) {
- $Newsrctree = $1; next; # Set the variable
- }
- if ( /^set\s+Headers\s+(\S+)/ ) {
- $Headers = $1; next; # Set the variable
- }
- if ( /^set\s+Formdir\s+(\S+)/ ) {
- $Formdir = $1; next; # Set the variable
- }
- if ( /^dir\s+(\S+)\s+(.*)/ ) {
- $Dirinfo{$1}= $2; $Dotdir{$1}=$1;
- $Dotdir{$1}=~ s/\//./g;
- next; # Get dir commands
- }
- if ( /^\n/ ) { next; } # Ignore blank lines
- # Bad input line, give warning
- chop; print "$_: Bad line, ignoring\n"; next;
- }
- close(S2H);
- if (!defined($Srctree)) { die "$0: Srctree undefined in $ARGV[$#ARGV]\n"; }
- if (!defined($Htmlroot)) { die "$0: Htmlroot undefined in $ARGV[$#ARGV]\n"; }
- if (!defined($Htmldir)) { die "$0: Htmldir undefined in $ARGV[$#ARGV]\n"; }
- $Htmltree= "$Htmlroot/$Htmldir";
-}
-
-## make_dirs: Make the directories need to store the Html documents, and also
-## check to make sure that the input directories exist. We depend upon mkdir(1)
-## having the -p option to make intermediate directories as needed.
-
-sub make_dirs {
- local($i);
-
- foreach $i (keys(%Dirinfo)) { # Check that the directories exist
- if (! -e "$Srctree/$i") {
- die "$0: Input dir $Srctree/$i doesn't exist\n";
- }
- if (! -d "$Srctree/$i") {
- die "$0: Input dir $Srctree/$i is not a directory\n";
- }
- }
- if (! -e "$Htmltree") {
- system("mkdir -p $Htmltree") && die "$0: Can't mkdir $Htmltree\n";
- }
- if (! -e "$Htmltree/$Newsrctree") {
- system("mkdir -p $Htmltree/$Newsrctree")
- && die "$0: Can't mkdir $Htmltree/$Newsrctree\n";
- }
- if (! -e "$Htmltree/ctags") {
- system("mkdir -p $Htmltree/ctags") && die "$0: Can't mkdir ctags\n";
- }
- foreach $i (keys(%Dirinfo)) {
- if (! -e "$Htmltree/$Newsrctree/$i") {
- system("mkdir -p $Htmltree/$Newsrctree/$i")
- && die "$0: Can't mkdir $Htmltree/$Newsrctree/$i\n";
- }
- }
-}
-
-## make_ctags: Process all the source code, creating the ctags files.
-## The Ctagsfile{} array is set up to hold the name of the ctags files
-## created.
-
-sub make_ctags {
- local($i);
-
- foreach $i (keys(%Dirinfo)) {
- $Ctagsfile{$i}= "$Htmltree/ctags/$Dotdir{$i}.ctags";
- if ($Debug > 0 ) { print "Generating ctags for $Ctagsfile{$i}\n"; }
- system("(cd $Srctree; /usr1/rtems/rtemsdoc-work/tools/src2html/ctags-wr $i) > $Ctagsfile{$i}")
- && print "$0: ctags failed on $Srctree/$i\n";
- }
-}
-
-
-## parse_ctags: Parse the ctags file produced by make_ctags, creating several
-## arrays of information. The arrays created are:
-## Macro{} - The name of every macro and its name lowercased
-## Def{} - The name of every define and its name lowercased
-## Func{} - The name of every function and its name lowercased
-## Var{} - The name of every variable and its name lowercased
-## Struct{} - The name of every struct and its name lowercased
-## Union{} - The name of every union and its name lowercased
-## Type{} - The name of every typedef and its name lowercased
-## Enum{} - The name of every enum and its name lowercased
-## Nfile{} - The directory in which the symbol was found
-## Nline{} - The line number where the symbol was found
-
-sub parse_ctags {
- local($i);
- local($low);
- local($count);
-
- $count = 0;
-
- foreach $i (keys(%Dirinfo)) {
- open(CTAGS,$Ctagsfile{$i}) || die "$0: Can't open $Ctagsfile{$i}, $!\n";
- if ($Debug > 0) { print "Parsing $Ctagsfile{$i} to build ptr files\n"; }
- while (<CTAGS>) {
- $count ++;
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+Preprocessor macro/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Macro{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+Preprocessor define/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Def{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+C struct/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Struct{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+C union/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Union{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+C typedef/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Type{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+C enum/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Enum{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+C function/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Func{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+C variable/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Var{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(return)\/.\s+(\d+)\s+(\S+)\s+.*/ ) {
- next;
- # Code like the following line results in "return" as ctag
- # "type Action is access function return Boolean;
- }
- if ( /^(\w+)\/.\s+(\d+)\s+(\S+)\s+use .*/ ) {
- next;
- # throw away lines like "use type System"
- }
-
- if ( /^(\w+)\/.\s+(\d+)\s+(\S+)\s+type .*/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $AdaType{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\/.+\s+(\d+)\s+(\S+)\s+procedure .*/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $AdaProcedure{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\/.+\s+(\d+)\s+(\S+)\s+function .*/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $AdaFunction{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\".+)\/.+\s+(\d+)\s+(\S+)\s+function .*/ ) {
- next;
- # throw away functions like "*"
- }
- if ( /^(\w+)\/.\s+(\d+)\s+(\S+)\s+package .*/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $AdaPackage{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\/.\s+(\d+)\s+(\S+)\s+task .*/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $AdaTask{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^([\w\/]+)\s+(\d+)\s+(\S+)\s+use type .*/ ) {
- next;
- }
- if ( /^([\w\/\(]+)\s+(\d+)\s+(\S+)\s+type .*/ ) {
- next;
- }
- if ( /^;([\w\/\(]+)\s+(\d+)\s+(\S+)\s+type .*/ ) {
- next;
- }
- if ( /^\(([\w\/\(]+)\s+(\d+)\s+(\S+)\s+procedure .*/ ) {
- next;
- }
- print "$0: In Ctagsfile{$i}, don't recognise $_";
- }
- close(CTAGS);
- &make_dir_html($i);
- undef %Macro; undef %Def; undef %Func; undef %Var;
- undef %Struct; undef %Union; undef %Type; undef %Enum;
- undef %AdaType; undef %AdaProcedure; undef %AdaFunction;
- undef %AdaPackage; undef %AdaTask;
- }
- &make_top_html;
-}
-
-## make_letters_html: Make the lowest HTML documents, i.e those per-directory
-## per-type per-letter Htmls that point directly at the source code.
-## Arguments are: Dir name, prefix, title, Name/dir list
-## If the file is created, set $Exists(letter) positive, else to 0.
-
-sub make_letters_html {
- local($dir)= $_[0];
- local($pref)= $_[1];
- local($title)= $_[2];
- local(*type)= $_[3];
- local($htmlfile);
- local($let)="@";
-
- foreach $i ( "a".."z",
- "AdaType", "AdaProcedure", "AdaFunction", "AdaPackage", "AdaTask" ) {
- $Exists{$i}=0;
- }
- foreach $name (sort keys( %type )) {
- if (substr($name,0,1) ne $let) {
- if ($let ne "@") {
- print HTML "</ul></body>\n";
- close(HTML);
- $Exists{$let}= 1;
- }
- $let= substr($name, 0, 1);
- $htmlfile= "$Htmltree/$Dotdir{$dir}.$pref$let.html";
- open(HTML, "> $htmlfile") || die "$0: Can't open $htmlfile, $!\n";
-
- print HTML "<head>\n<title>$title starting with ";
- print HTML "`$let' in $dir</title>\n";
- print HTML "</head><body><h1>$title starting with ";
- print HTML "`$let' in $dir</h1><p>\n";
- print HTML "<ul>\n";
- }
- # print HTML "<li><a href=\"$Newsrctree/$Nfile{$type{$name}}";
- # print HTML ".html#$type{$name}\">$type{$name}</a> ";
- # print HTML "$Nfile{$type{$name}}:$Nline{$type{$name}}\n"; next;
-
- print HTML "<li><a href=\"$Newsrctree/$Nfile{$name}";
- print HTML ".html#$type{$name}\">$type{$name}</a> ";
- print HTML "$Nfile{$name}:$Nline{$name}\n"; next;
- }
- print HTML "</ul></body>\n";
- close(HTML);
- $Exists{$let}= 1;
-}
-
-## make_type_html: Make the type htmls. If there are <50 symbols for the
-## directory, create the per-directory per-type html document only. Otherwise
-## for every letter grep symbols, call make_lowest_letter_html, and
-## finally create the per-directory per-type html document that points only
-## at the letter files created.
-## Arguments are: Dir name, prefix, title, Name/dir list
-
-sub make_type_html {
- local($dir)= $_[0];
- local($pref)= $_[1];
- local($title)= $_[2];
- local(*type)= $_[3];
- local($i);
- local($htmlfile);
- local(@keys)= keys(%type);
- local($name);
-
- $Exists{$title}=0;
- if ( $#keys < 0 ) { return; }
- if ($Debug > 0) {
- $i= $#keys + 1;
- print "The associative array for $dir $title has $i elements\n";
- }
- if ( ($#keys < 50) || ($NoLetters == 1) ) {
- $htmlfile= "$Htmltree/$Dotdir{$dir}.$pref.html";
- open(HTML, "> $htmlfile") || die "$0: Can't open $htmlfile, $!\n";
- print HTML "<head>\n<title>$title in $dir</title>\n";
- print HTML "</head><body><h1>$title in $dir</h1>\n";
- print HTML "<ul>\n";
- foreach $name (sort keys( %type )) {
- # print HTML "<li><a href=\"$Newsrctree/$Nfile{$type{$name}}";
- # print HTML ".html#$type{$name}\">$type{$name}</a> ";
- # print HTML "$Nfile{$type{$name}}:$Nline{$type{$name}}\n"; next;
-
- print HTML "<li><a href=\"$Newsrctree/$Nfile{$name}";
- print HTML ".html#$type{$name}\">$type{$name}</a> ";
- print HTML "$Nfile{$name}:$Nline{$name}\n"; next;
- }
- print HTML "</ul></body>\n";
- close(HTML);
- $Exists{$title}=1;
- }
- else {
- &make_letters_html($dir, $pref, $title, *type);
-
- open(HTML, "> $Htmltree/$Dotdir{$dir}.$pref.html")
- || die "$0: Can't open $htmlfile.$pref.html, $!\n";
- print HTML "<head>\n<title>$title in $dir</title>\n";
- print HTML "</head><body><h1>$title in $dir</h1><p>\n";
- print HTML "<ul>\n";
-
- foreach $i ( "a".."z",
- "AdaType", "AdaProcedure", "AdaFunction", "AdaPackage", "AdaTask" ) {
- if ($Exists{$i} > 0) { # A file exists
- print HTML "<li><a href=\"$Dotdir{$dir}.$pref$i.html\">";
- print HTML "$i</a>\n"; $Exists{$title}++; $Exists{$i}=0;
- }
- }
- print HTML "</ul></body>\n";
- close(HTML);
- if ($Exists{$title} == 0) { unlink($htmlfile); }
- }
-}
-
-## asappend: Append the contents of the second associative array to the
-## first.
-
-sub asappend {
- local(*To)= $_[0];
- local(*From)= $_[1];
- local($i);
-
- foreach $i (keys(%From)) { $To{$i}= $From{$i} ; }
-}
-
-## make_dir_html: Make the html document for the directory. Use the
-## Exist{} array to determine what types to include on the document.
-## Arguments are: Dir name
-
-sub make_dir_html {
- local($dir)= $_[0];
- local($i);
- local(@keys);
-
- if ($Debug > 1) { print"In makedir, dir is $dir\n"; }
- &make_type_html($dir, "f", $Title{"f"}, *Func);
- &make_type_html($dir, "m", $Title{"m"}, *Macro);
- &make_type_html($dir, "d", $Title{"d"}, *Def);
- &make_type_html($dir, "v", $Title{"v"}, *Var);
- &make_type_html($dir, "s", $Title{"s"}, *Struct);
- &make_type_html($dir, "u", $Title{"u"}, *Union);
- &make_type_html($dir, "t", $Title{"t"}, *Type);
- &make_type_html($dir, "e", $Title{"e"}, *Enum);
- &make_type_html($dir, "AdaType", $Title{"AdaType"}, *AdaType);
- &make_type_html($dir,
- "AdaProcedure", $Title{"AdaProcedure"}, *AdaProcedure);
- &make_type_html($dir, "AdaFunction", $Title{"AdaFunction"}, *AdaFunction);
- &make_type_html($dir, "AdaPackage", $Title{"AdaPackage"}, *AdaPackage);
- &make_type_html($dir, "AdaTask", $Title{"AdaTask"}, *AdaTask);
-
- if ($NoAll != 1) {
- &asappend(*GFunc, *Func);
- &asappend(*GMacro, *Macro);
- &asappend(*GDef, *Def);
- &asappend(*GVar, *Var);
- &asappend(*GStruct, *Struct);
- &asappend(*GUnion, *Union);
- &asappend(*GType, *Type);
- &asappend(*GEnum, *Enum);
- &asappend(*GAdaType, *AdaType);
- &asappend(*GAdaProcedure, *AdaProcedure);
- &asappend(*GAdaFunction, *AdaFunction);
- &asappend(*GAdaPackage, *AdaPackage);
- &asappend(*GAdaTask, *AdaTask);
- }
-
- &asappend(*Alldir, *Func);
- &asappend(*Alldir, *Macro);
- &asappend(*Alldir, *Def);
- &asappend(*Alldir, *Var);
- &asappend(*Alldir, *Struct);
- &asappend(*Alldir, *Union);
- &asappend(*Alldir, *Type);
- &asappend(*Alldir, *Enum);
- &asappend(*Alldir, *AdaType);
- &asappend(*Alldir, *AdaProcedure);
- &asappend(*Alldir, *AdaFunction);
- &asappend(*Alldir, *AdaPackage);
- &asappend(*Alldir, *AdaTask);
-
- if ($NoLetters != 1) {
- &make_letters_html($dir, "g", $Title{"g"}, *Alldir);
- }
- undef %Alldir;
-
- open(HTML, "> $Htmltree/$Dotdir{$dir}.html")
- || die "$0: Can't open $Htmltree/$Dotdir{$dir}.html, $!\n";
- print HTML "<head>\n<title>Cross-references for $dir</title>\n";
- print HTML "</head><body><h1>Cross-references for $dir</h1><p>\n";
- if (-f "$Headers/$Dotdir{$dir}.hdr" ) {
- open(TOPHDR, "$Headers/$Dotdir{$dir}.hdr");
- while (<TOPHDR>) { print HTML; }
- close(TOPHDR);
- }
-
- if (defined($Formdir)) {
- print HTML "<hr><form action=\"$Formdir/src2html.cgi\" ";
- print HTML "method=\"POST\">\n";
- print HTML "<input type=\"submit\" value=\"Search\">\n";
- print HTML "<input type= \"text\" ";
- print HTML "name=\"$Htmldir/$Newsrctree\">\n";
- print HTML "Enter a symbol's name here to quickly find it.\n";
- print HTML "</form><hr>\n";
- }
- print HTML "<h1>Cross-references for $dir by type</h1><p><ul>\n";
-
- foreach $i ( "f","m","d","v","s","u","t","e",
- "AdaType", "AdaProcedure", "AdaFunction", "AdaPackage", "AdaTask" ) {
- if ($Exists{$Title{$i}} > 0) { # A type exists
- print HTML "<li><a href=\"$Dotdir{$dir}.$i.html\">";
- print HTML "$Title{$i}</a>\n";
- $Exists{$dir}++; $Exists{$Title{$i}}=0;
- }
- }
- print HTML "</ul><p>\n";
- if ($NoLetters != 1) {
- print HTML "<h1>Cross-references for $dir by letter</h1><p><ul>\n";
- foreach $i ( "a".."z" ) {
- if ($Exists{$i} > 0) { # A letter exists
- print HTML "<li><a href=\"$Dotdir{$dir}.g$i.html\">";
- print HTML "$i</a>\n"; $Exists{$i}=0;
- }
- }
- }
- print HTML "</ul></body>\n";
- close(HTML);
-}
-
-## Make_top_html: Make the top html document by making the ones below
-## it and then adding links to them.
-
-sub make_top_html {
- local($i);
- local(@keys);
-
- $Dotdir{$Top}=$Top;
- &make_type_html($Top, "f", $Title{"f"}, *GFunc);
- &make_type_html($Top, "m", $Title{"m"}, *GMacro);
- &make_type_html($Top, "d", $Title{"d"}, *GDef);
- &make_type_html($Top, "v", $Title{"v"}, *GVar);
- &make_type_html($Top, "s", $Title{"s"}, *GStruct);
- &make_type_html($Top, "u", $Title{"u"}, *GUnion);
- &make_type_html($Top, "t", $Title{"t"}, *GType);
- &make_type_html($Top, "e", $Title{"e"}, *GEnum);
- &make_type_html($Top, "AdaType", $Title{"AdaType"}, *GAdaType);
- &make_type_html($Top, "AdaProcedure", $Title{"AdaProcedure"}, *GAdaProcedure);
- &make_type_html($Top, "AdaFunction", $Title{"AdaFunction"}, *GAdaFunction);
- &make_type_html($Top, "AdaPackage", $Title{"AdaPackage"}, *GAdaPackage);
- &make_type_html($Top, "AdaTask", $Title{"AdaTask"}, *GAdaTask);
-
- open(HTMLTOP, "> $Htmltree/$Top.html")
- || die "$0: Can't open $Htmltree/$Top.html, $!\n";
- print HTMLTOP "<head>\n<title>Cross-references for $Top</title>\n";
- print HTMLTOP "</head><body><h1>Cross-references for $Top</h1><p>\n";
-
- if (-f "$Headers/$Top.hdr" ) {
- open(TOPHDR, "$Headers/$Top.hdr");
- while (<TOPHDR>) { print HTMLTOP; }
- close(TOPHDR);
- }
-
- if (defined($Formdir)) {
- print HTMLTOP "<hr><form action=\"$Formdir/src2html.cgi\" ";
- print HTMLTOP "method=\"POST\">\n";
- print HTMLTOP "<input type=\"submit\" value=\"Search\">\n";
- print HTMLTOP "<input type= \"text\" ";
- print HTMLTOP "name=\"$Htmldir/$Newsrctree\">\n";
- print HTMLTOP "Enter a symbol's name here to quickly find it.\n";
- print HTMLTOP "</form><hr>\n";
- }
- print HTMLTOP "<h2>Cross-references by directory</h2><p>\n";
- print HTMLTOP "<ul>\n";
-
- foreach $i (sort keys(%Dirinfo)) {
- if ($Exists{$i} > 0) { # A dir exists
- print HTMLTOP "<li><a href=\"$Dotdir{$i}.html\">";
- print HTMLTOP "$i</a> $Dirinfo{$i}\n"; $Exists{$i}=0;
- }
- }
- if ($NoAll != 1) {
- print HTMLTOP "</ul><p><h2>Cross-references by type</h2><p><ul>\n";
- foreach $i ( "f","m","d","v","s","u","t","e",
- "AdaType", "AdaProcedure", "AdaFunction", "AdaPackage", "AdaTask" ) {
- if ($Exists{$Title{$i}} > 0) { # A type exists
- print HTMLTOP "<li><a href=\"$Top.$i.html\">";
- print HTMLTOP "$Title{$i}</a>\n";
- }
- }
- if ($NoLetters != 1) {
- print HTMLTOP "</ul><p><h2>All Cross-references for $Top";
- print HTMLTOP "</h2><p><ul>\n";
- &asappend(*Alltop, *GFunc);
- &asappend(*Alltop, *GMacro);
- &asappend(*Alltop, *GDef);
- &asappend(*Alltop, *GVar);
- &asappend(*Alltop, *GStruct);
- &asappend(*Alltop, *GUnion);
- &asappend(*Alltop, *GType);
- &asappend(*Alltop, *GEnum);
- &asappend(*Alltop, *GAdaType);
- &asappend(*Alltop, *GAdaProcedure);
- &asappend(*Alltop, *GAdaFunction);
- &asappend(*Alltop, *GAdaPackage);
- &asappend(*Alltop, *GAdaTask);
-
- if ($Debug > 0) { print "Making top letters\n"; }
- &make_letters_html($Top, "g", $Title{"g"}, *Alltop);
- if ($Debug > 0) { print "Making top letters, part 2\n"; }
- foreach $i ( "a".."z" ) {
- if ($Exists{$i} > 0) {
- print HTMLTOP "<li><a href=\"$Dotdir{$Top}.g$i.html\">";
- print HTMLTOP "$i</a>\n";
- }
- }
- }
- }
- print HTMLTOP "</ul>\n";
- print HTMLTOP "<hr>This source tree was made with ";
- print HTMLTOP "<a href=\"http://minnie.cs.adfa.oz.au/Src2html/index.html";
- print HTMLTOP "\">src2html</a>.</body>\n";
- close(HTMLTOP);
-}
-
-
-## rewrite_src: Reread the ctags file for the given directory, and
-## rewrite the source code, adding in anchor points and bolding symbols.
-## This is messy as we can have multiple symbols on a single source line,
-## therefore we must buffer each line while reading from the ctags file.
-##
-sub rewrite_src {
- local($dir)= $_[0];
- local($i);
- local($file)="";
- local($line)="";
- local($symb);
- local($cnt);
- local($nextcnt);
-
- $In_file=0;
- open(CTAGS,"sort +2 -3 +1n -2 $Ctagsfile{$dir} |")
- || die "$0: Can't open sorted $Ctagsfile{$dir}, $!\n";
- if ($Debug > 0) { print "Rewriting source in $dir\n"; }
- while (<CTAGS>) {
- # Get the next file, line, symbol
- if (/^([\w\/]+)\s+(\d+)\s+([A-Za-z0-9_\+\-\.\/]+)/) {
- if ($Debug > 2) { print "Symb $1 at $2 in $3\n"; }
- $fname=$3; $nextcnt= $2; $symb=$1;
- $symb=~ s/\/.//g;
-
- # If it's in a new file
- if ("$file" ne "$fname") {
- # Print out the remainder of the
- # current file, incl. the buffered line
- if ($In_file == 1) {
- if ("$line" ne "") { print OUT $line; }
- while (<IN>) {
- s/\&/&amp;/g; s/\</&lt;/g; s/\>/&gt;/g; print OUT;
- }
- print OUT "\n\n\n\n\n\n\n\n\n\n</pre></body>\n";
- close(IN); close(OUT);
- }
- $file= "$fname";
- # Open the new file & do the preamble
- open(IN, "$Srctree/$file") ||
- print "Cannot open $Srctree/$file\n";
- open(OUT, "> $Htmltree/$Newsrctree/$file.html");
- $In_file=1;
- print OUT "<head>\n<title>$file Source</title>\n";
- print OUT "</head><body>\n";
- print OUT "<h1>Source to $file</h1>\n";
- if (defined($Formdir)) {
- print OUT "<hr><form action=\"$Formdir/src2html.cgi\" ";
- print OUT "method=\"POST\">\n";
- print OUT "<input type=\"submit\" value=\"Search\">\n";
- print OUT "<input type= \"text\" ";
- print OUT "name=\"$Htmldir/$Newsrctree\">\n";
- print OUT "Enter a symbol's name here to quickly find it.\n";
- print OUT "</form><hr>\n";
- }
- print OUT "<pre>\n";
- # Get the first line
- $cnt=1; $line = <IN>;
- $line=~ s/\&/&amp;/g;
- $line=~ s/\</&lt;/g;
- $line=~ s/\>/&gt;/g;
- }
- }
- # Print all lines until one with a symb
- while ($cnt < $nextcnt) {
- print OUT $line; $cnt++; $line= <IN>;
- $line=~ s/\&/&amp;/g;
- $line=~ s/\</&lt;/g;
- $line=~ s/\>/&gt;/g;
- }
- # Now rewrite the line
- $line=~ s/\b$symb\b/<a name="$symb"<\/a><b>$symb<\/b>/;
- next;
- }
- close(CTAGS); close(IN); close(OUT);
-}
diff --git a/doc/tools/src2html1.4a/src2html.1 b/doc/tools/src2html1.4a/src2html.1
deleted file mode 100644
index 7401859ca8..0000000000
--- a/doc/tools/src2html1.4a/src2html.1
+++ /dev/null
@@ -1,244 +0,0 @@
-.TH src2html 1L "June 1994"
-.SH NAME
-src2html \- Hyperlink a C source code tree using HTML, Version 1.3-alpha
-
-.SH SYNOPSIS
-.B src2html
-[
-.I \-na
-] [
-.I \-nl
-] [
-.I \-d debug_level
-]
-.I configuration_file
-
-.SH DESCRIPTION
-
-.B src2html
-is a program which takes a C source tree and creates a set of
-HTML hypertext documents that allows the most important symbols in the
-source tree to be found easily. As well, a HTML version of the source
-tree is created, with the symbols given in bold font where they are defined
-in the source.
-
-.B src2html
-finds and hyperlinks the following C symbols: Preprocessor defines
-and macros, C functions, global variables, structs, unions, enums and typedefs.
-If defined in the
-.I configuration file,
-a query document is used so that symbols can be located by an index query
-as well as following the hyperlinks.
-
-.SH OPTIONS
-The
-.I debug level
-was used when debugging the program, and its only use is
-to assure the user that something is actually happening, especially for large
-source trees. The highest debug level of 3 is not particularly verbose.
-.PP
-By default,
-.B src2html
-produces html pages for each category of C symbols. If there are more than
-50 in each category,
-.B src2html
-then further subdivides the symbols on a first-letter basis, making HTML
-documents for each letter.
-.PP
-If the
-.I -nl
-flag is set, no first-letter HTML documents will ever be produced.
-Similarly,
-.B src2html
-creates a top-level document with category links. If the
-.I -na
-flag is set, no top-level category links will be produced.
-
-.SH CONFIGURATION FILE
-
-.B src2html
-takes as an argument a
-.I configuration file
-which describes the directories in a source tree to process, and
-where to place the resulting HTML documents. Lines beginning with a #
-sign are ignored, as are blank lines. The following lines have special meaning:
-.P
-.IP "set Srctree source_tree"
-Set the root of the tree where the original source is kept, e.g
-/usr/src/sys. Do not leave a trailing slash on the tree name.
-This line must appear in the configuration file.
-.P
-.IP "set Htmlroot html_tree"
-Set the root of the tree where HTML documents are normally kept.
-This is the same as DocumentRoot in the httpd(1L) configuration.
-Again, do not leave a trailing slash on the tree name.
-This line must appear in the configuration file.
-.P
-.IP "set Htmldir html_dir"
-Set the directory within Htmlroot where the HTML documents for this
-tree will be placed.
-Again, do not leave a trailing slash on the tree name.
-This line must appear in the configuration file.
-.P
-.IP "set Newsrctree new_source_tree"
-Set the directory within the Htmltree where the marked up source code
-is placed, e.g src. This allows the source to be kept separate from the
-`pointer' documents which point at the source; see the next section for
-more details. This line is optional, and the default value of
-Newsrctree is `newsrc'.
-.P
-.IP "set Headers header_dir"
-.B src2html
-allows information to be placed at the beginning of the HTML
-documents created, e.g to describe the contents of a particular
-subdirectory. Files containing this information are kept in this
-directory. This line is optional, and the default value of
-Headers is `.'.
-.P
-.IP "set Formdir form_dir"
-If set, this tells
-.B src2html
-that the active HTML document which can
-perform index lookups for the source tree is located in this
-directory. If not set,
-.B src2html
-will not put query boxes in the
-HTML documents created. This line is optional, and there is no
-default value.
-.P
-.IP "dir directory comments_about_the_dir"
-This line may appear may times, and tells
-.B src2html
-to process
-source files in the directory Srctree/dir. This allows only particular
-sections of the source tree to be marked up. The comments after the
-directory are placed in the top-level HTML document to explain
-what that directory contains.
-
-.SH DIRECTORY STRUCTURE
-
-.B src2html
-expects to be given a source tree to process, and it produces
-a new tree with HTML documents. The configuration file should have a suffix
-of `.s2h', although this is strictly not needed.
-
-As an example, consider the following configuration file named BSD.s2h:
-.PP
-.nf
-# Comments
-set Srctree /usr/src/sys
-set Htmltree /usr/local/WWW
-set Htmldir sys
-set Newsrctree newsrc # Comments here too
-set Headers /home/staff/warren/sys_headers
-set Formdir /cgi
-dir kern The core OS routines: processes, scheduling, syscalls
-dir sys Widely used C-language include files
-dir i386/isa Device drivers for peripherals on the ISA bus
-.fi
-.PP
-Three directories containing C source will be processed,
-.nf
- /usr/src/sys/kern,
- /usr/src/sys/sys and
- /usr/src/sys/i386/isa
-.fi
-
-The resulting marked up source code will be placed in
-.nf
- /usr/local/WWW/sys/newsrc/kern,
- /usr/local/WWW/sys/newsrc/sys and
- /usr/local/WWW/sys/newsrc/i386/isa
-.fi
-respectivey.
-.PP
-The directory /usr/local/WWW/sys will itself contain a set of pointer
-documents which point to the source code documents on a per-directory,
-per-symbol-type and per-first-letter basis (and combinations of the
-above). One file, BSD.html (named from the configuration file name), is the
-root of the hyperlinks, and the entire source tree can be browsed from this
-one document.
-
-.SH HEADER FILES
-
-.B src2html
-creates a root HTML document, and HTML documents for each directory
-named in the configuration file. Textual information can be placed in the
-head of these documents to describe the contents of the tree/directory,
-give references etc. The files that hold this information are kept in the
-Headers directory. Taking the above configuration file as an example,
-
- /home/staff/warren/sys_headers/BSD.hdr
- /home/staff/warren/sys_headers/kern.hdr
- /home/staff/warren/sys_headers/sys.hdr
- /home/staff/warren/sys_headers/i386.isa.hdr
-
-can hold the information to be placed in the head of the appropriate
-documents. Note that if a directory name has a slash as given in the
-configuration file, the name of the header file has a dot instead.
-.PP
-Header files are placed `as is' into the head of the document, and thus
-can contain HTML markup commands. Any and all header files are optional;
-if the file does not exist, nothing will be placed in the head of the
-appropriate HTML document.
-.PP
-Once
-.B src2html
-has completed, the header files may be removed. However,
-you may wish to keep them in case you ever need to re-run
-.B src2html
-on the same source tree.
-
-.SH SEARCH SCRIPT
-
-During execution,
-.B src2html
-builds a ctags directory in Htmltree and places
-the output of ctags-new(1L) on the source tree directories in this place.
-This information is needed if a search script is also requested.
-.PP
-If the Formdir is set in the configuration file,
-.B src2html
-will configure the HTML code produced to use the search script
-.I src2html.cgi
-to search for symbols in the source tree. This script
-conforms to the cgi query format as used by httpd(1). You must move the
-supplied
-.I src2html.cgi
-file into the Formdir in the httpd hierachy before the query functionality
-can be used.
-.PP
-Again, from the example configuration file above,
-/usr/local/httpd/cgi/src2html.cgi is where to place the script, if the
-httpd hierachy is kept in /usr/local/httpd.
-
-.SH EXAMPLE SOURCE TREE
-
-The output from
-.B src2html
-for the full FreeBSD 2.0.5 kernel source directory can be browsed
-from the Web page http://minnie.cs.adfa.oz.au/FreeBSD-srctree/FreeBSD.html.
-
-.SH BUGS AND SHORTCOMINGS
-
-.B src2html
-uses the ctags-new(1L) program, which does not correctly parse C variable
-declarations and function pointer usage. Someone should rewrite this in Perl.
-.PP
-Ideally,
-.B src2html
-should include hyperlinks within each source file,
-but this is difficult given C's scoping rules, and would need a more
-sophisticated parser than ctags(1L).
-.PP
-.B src2html
-looks at all files in the named source directories, including
-files that don't end in .c and .h. This may be construed as a feature.
-
-.SH SEE ALSO
-.PD
-ctags-new(1L), httpd(1L), perl(1L)
-
-.SH AUTHOR
-.PD
-Warren Toomey wkt@cs.adfa.oz.au
diff --git a/doc/tools/src2html1.4a/src2html.cgi b/doc/tools/src2html1.4a/src2html.cgi
deleted file mode 100644
index cfc93d4134..0000000000
--- a/doc/tools/src2html1.4a/src2html.cgi
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/usr/local/bin/perl
-#
-# src2html.cgi -- A search script to file symbols in a src2html tree.
-# You need to install this in your httpd script directory AND set the
-# httpd web root below.
-#
-# We need the cgi-lib.pl package to be available to Perl
-require 'cgi-lib.pl';
-#
-## We MUST know the root of the httpd server, so we can find the ctags
-##
-#
-$Http_root= "/usr/pub/pub/www";
-
- # Parse input -> %in
-&ReadParse; # and print first 2 lines
-
-@keys= keys(%in); # We only expect one name/val pair
-if ($#keys != 0) { # Otherwise, return an error document
- print <<"query_error";
-Content-type: text/html
-
- <header><title>Query Error</title></header><body>
- <h1>Query Error</h1>
- The document you used to query this source tree has an error in it.
- You should email the maintainer of the source tree with a copy of the
- document with the query form in it.
- </body>
-query_error
- exit(1);
-}
- # Given the name, determine which tree
-$Htmltree= "$Http_root/$keys[0]";
-$Htmltree=~ s/\/[^\/]*$//; # Location of the Html tree root
-$Srctree= "/$keys[0]"; # URL of the actual source
-$Ctags= "$Htmltree/ctags"; # Location of the ctags files
-
-@symbol= split(/\s+/, $in{$keys[0]}); # Get one symbol to search for
-
-if ($#symbol != 0) { # Hmm, <> 1 symbol, return an error
- print <<"symbol_error";
-Content-type: text/html
-
- <header><title>$Htmltree Search Error</title></header><body>
- <h1>$Htmltree Search Error</h1>
- Hmm, you either sent in no symbols to me to search, or a number of
- symbols to find, separated by whitespace.<p>
- The search function can only handle regexp expressions with no
- whitespace. Try resubmitting your query.
- </body>
-symbol_error
- exit(1);
-}
- # Let's go to work, egrep the ctags
-
-# Naftali Schwartz (nschwart@SLINKY.CS.NYU.EDU) reports that using the ^
-# on the following line stops the script from working under SunOS 4.1.3.
-# Sounds like ctags-new doesn't start the symbol in the 1st column.
-open(IN, "cat $Ctags/* | egrep ^$symbol[0] |") || die "$0: egrep failed\n";
-$cnt=0;
-while(<IN>) {
- ($sym, $line, $file, $com)= split(/\s+/);
- $Sym[$cnt]=$sym; $Line[$cnt]= $line; $File[$cnt]= $file; $cnt++;
-}
-close(IN);
- # How many did we get? Zero, no symbol
-if ($cnt == 0) {
- print <<"symbol_missing";
-Content-type: text/html
-
- <header><title>$Htmltree Search Error</title></header><body>
- <h1>$Htmltree Search Error</h1>
- The symbol $symbol[0] does not appear in the source tree.
- </body>
-symbol_missing
- exit(1);
-}
-
-if ($cnt == 1) { # Exactly one, return ptr to that doc
- print "Location: $Srctree/$File[0]";
-
-# I used to use the commented out line under NCSA httpd because the other
-# line didn't work. You may need to try things out on your server.
- print ".html\#$Sym[0]\n\n";
-# print ".html\n\n";
- exit(0);
-}
- # Else return a list of choices
-print <<"many_found";
-Content-type: text/html
-
-<header><title>$Htmltree Search</title></header><body>
-<h1>$Htmltree Search</h1><ul>
-many_found
-for ($i = 0; $i < $cnt; $i++) {
- print "<li><a href= \"$Srctree/$File[$i]";
- print ".html#$Sym[$i]\">$Sym[$i]</a> $File[$i]:$Line[$i]\n";
-}
-print "</ul></body>\n";
-exit(0);
diff --git a/doc/tools/texi2www/Makefile b/doc/tools/texi2www/Makefile
deleted file mode 100644
index c66db06399..0000000000
--- a/doc/tools/texi2www/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1998.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=texi2www
-DISTRIBUTION_LEVEL=internal
-
-include ../../Make.config
-
-all: html info ps
-
-dirs:
- $(make-dirs)
-
-FILES= texi2www.texi
-
-info:
-
-dvi: $(PROJECT).dvi
-
-ps: dirs $(PROJECT).ps
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(PS_INSTALL)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) -v $(PROJECT).texi
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core
- rm -f *.dvi *.ps *.log *.aux *.cp *.cps \
- rm -f *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT)-* $(GENERATED_FILES)
- rm -f *.fixed _*
-
diff --git a/doc/tools/texi2www/archive/texi2www-960103.tgz b/doc/tools/texi2www/archive/texi2www-960103.tgz
deleted file mode 100644
index b0851552c2..0000000000
--- a/doc/tools/texi2www/archive/texi2www-960103.tgz
+++ /dev/null
Binary files differ
diff --git a/doc/tools/texi2www/dir-arrow.gif b/doc/tools/texi2www/dir-arrow.gif
deleted file mode 100644
index 5d661527cc..0000000000
--- a/doc/tools/texi2www/dir-arrow.gif
+++ /dev/null
Binary files differ
diff --git a/doc/tools/texi2www/missing-arrow.gif b/doc/tools/texi2www/missing-arrow.gif
deleted file mode 100644
index c686c80b5f..0000000000
--- a/doc/tools/texi2www/missing-arrow.gif
+++ /dev/null
Binary files differ
diff --git a/doc/tools/texi2www/next-arrow.gif b/doc/tools/texi2www/next-arrow.gif
deleted file mode 100644
index 57f5cddb81..0000000000
--- a/doc/tools/texi2www/next-arrow.gif
+++ /dev/null
Binary files differ
diff --git a/doc/tools/texi2www/prev-arrow.gif b/doc/tools/texi2www/prev-arrow.gif
deleted file mode 100644
index 350785be10..0000000000
--- a/doc/tools/texi2www/prev-arrow.gif
+++ /dev/null
Binary files differ
diff --git a/doc/tools/texi2www/texi2dvi b/doc/tools/texi2www/texi2dvi
deleted file mode 100644
index 913904a921..0000000000
--- a/doc/tools/texi2www/texi2dvi
+++ /dev/null
@@ -1,218 +0,0 @@
-#!/usr/bin/perl
-#
-# $Id$
-#
-
-$version = <<END_VERSION;
-Jan 2 1996
-END_VERSION
-
-$copyright = <<END_COPYRIGHT;
-texi2dvi - converts texinfo to dvi
-Copyright (C) 1996 Tim Singletary
-
-This program is freely distributable under the terms of the GNU
-GENERAL PUBLIC LICENSE. In particular, modified versions of this
-program must retain this copyright notice and must remain freely
-distributable.
-END_COPYRIGHT
-
-$usage = <<END_USAGE;
-Usage: texi2dvi [option ...] texinfo_file ...
- -k (-nocleanup) -- don't ``rm -f'' the intermediate files.
- -v (-verbose) -- print additional output.
- -copyright -- print the copyright and die.
- -version -- print the version and die.
-Generates a .dvi file from each texinfo (.texi or .texinfo) file.
-Understands texi2www extensions (\@gif, etc.).
-END_USAGE
-
-unless ($tex = $ENV{TEX}) {$tex = tex;}
-unless ($texindex = $ENV{TEXINDEX}) {$texindex = texindex;}
-$texinputs = $ENV{TEXINPUTS};
-
-$cleanup = 1;
-while ($ARGV[0] =~ /^-/) {
- $_ = shift;
- if (/-k$/ || /-nocleanup/) {$cleanup = 0; next;}
- if (/-v$/ || /-verbose/) {$verbose = 1; next;}
- if (/-d$/ || /-vv$/ || /-debug/) {$verbose = 2; next;}
- if (/-copyright/) {die $copyright;}
- if (/-version/) {die $version;}
- die $usage;
-}
-
-$font_prefix = "xx";
-while (&prefix_in_use($font_prefix)) {
- ++$font_prefix;
- if (length($font_prefix) > 2) {
- $font_prefix = "aa";
- }
-}
-
-$unique_base = "_" . $$ . "a-";
-while (&prefix_in_use($unique_base)) {++$unique_base;}
-
-print "Generated files will begin with \`$unique_base\'\n" if $verbose;
-
-$arg_index = 'a';
-foreach $raw_texi (@ARGV) {
- $base = $unique_base . $arg_index;
- ++$arg_index;
-
- # $tawtexifile is a texinfo file; suffix must be either `.texi' or
- # `.texinfo'. If arg is in a different directory, adjust
- # TEXINPUTS environment variable to include that (and the current)
- # directory.
- unless ($raw_texi =~ /(.*).texi(nfo)?$/) {
- print "skipping $raw_texi -- has unknown extension!\n";
- next;
- }
- $raw_texi_base = $1;
- if ($raw_texi_base =~ m|^(.*)/([^/]*)$|) {
- $raw_texi_base = $2;
- $ENV{TEXINPUTS} = ".:$1:$texinputs";
- } else {
- $ENV{TEXINPUTS} = ".:$texinputs";
- }
-
- unless (-r $raw_texi) {
- print "skipping $raw_texi -- not readable or doesn't exist!\n";
- next;
- }
-
- # Preprocesses the $rawtexifile (because of @gif{} and other extensions)
- $processed_texi = "$base.texi";
- print "Preprocessing $raw_texi into $processed_texi:\n" if $verbose;
- &preprocess_texinfo($raw_texi,$processed_texi,$base);
-
- print "$tex $processed_texi\n" if $verbose;
- if (system("$tex $processed_texi") == 0) {
-
- # @possible_index_file = <$base.??>; only works for the
- # first value of $base ... so,
- opendir(DIR,".") || die "Couldn't read current directory -- $!\n";
- @possible_index_files = ();
- while ($_ = readdir(DIR)) {
- if (/^$base\...$/) {
- push(@possible_index_files,$_);
- }
- }
- closedir(DIR);
-
- @index_files = ();
- foreach $possible_index_file (@possible_index_files) {
- print "DEBUG: possible_index_file $possible_index_file\n"
- if ($verbose > 1);
- next unless (-s $possible_index_file);
- push(@index_files,$possible_index_file);
- }
-
- if (@index_files > 0) {
- $texindex_cmd = "$texindex " . join(' ',@index_files);
- print "$texindex_cmd\n" if $verbose;
- if (system($texindex_cmd) == 0) {
- print "$tex $processed_texi\n" if $verbose;
- system("$tex $processed_texi");
- }
- }
- }
-
- # At this point, $base.dvi should exist -- rename it
- # to $raw_texi_base.dvi
- if (-e "$base.dvi") {
- rename("$base.dvi","$raw_texi_base.dvi")
- || die "rename $base.dvi $raw_texi_base.dvi -- $!\n";
- }
-}
-if ($cleanup) {unlink(<$base*>);}
-
-sub preprocess_texinfo
-{
- local ($infile,$outfile,$b) = @_;
-
- open(IN,"<$infile") || die "Couldn't open $infile -- $!\n";
- open(OUT,">$outfile") || die "Couldn't open $outfile -- $!\n";
-
- $gif_index = 'a';
- while (<IN>) {
-
- # @gif{gif} or @gif{html_gif, tex_gif}
- if (/(.*)\@gif\{([^{]*)\}(.*)/) {
- $prefix = $1;
- $arg = $2;
- $suffix = $3;
- print OUT "$prefix\n" if $prefix;
-
- while (1) {
- $gif_base = $b . $gif_index;
- last unless (-e $gif_base . ".gif");
- ++$gif_index;
- }
-
- $gif_file = '';
- if ($arg =~ /.*,(..*\.gif)/) {
- $gif_file = $1;
- $font_base = $gif_file;
- } else {
- $font_base = $arg;
- $gif_file = $gif_base . ".gif";
- print "Scaling $arg into $gif_file:\n" if $verbose;
- $scale_cmd = "giftopnm $arg | pnmscale 2 | pnmnlfilt 2 1 "
- . "| ppmquant 255 | ppmtogif > $gif_file";
- print "$scale_cmd\n" if $verbose;
- if (system($scale_cmd) != 0) {
- print "$scale_cmd failed\n";
- $gif_file = '';
- }
- }
-
- if ($gif_file =~ /.*\.gif/) {
-
-
- $font_base =~ s|.*/||;
- $font_base =~ s|\..*||;
-
- # $font_base, due to bm2font requirements, can't be more
- # than six characters long and must consist entirely of
- # lower case letters.
- $font_base =~ s/[^a-z]//g;
- $font_base = $font_prefix . substr($font_base,0,5);
- while (&prefix_in_use($font_base)) {++$font_base;}
-
- $bm2font_cmd = "bm2font -f$font_base $gif_file";
- print "$bm2font_cmd\n" if $verbose;
- if (system($bm2font_cmd) != 0) {
- print "$bm2font_cmd failed\n";
- } else {
- print OUT "\@tex\n";
- print OUT "\\input $font_base.tex\n";
- print OUT "\\set$font_base\n";
- print OUT "\@end tex\n";
- }
- }
-
- print OUT "$suffix \n" if $suffix;
- } else {
- print OUT "$_";
- }
- }
- close OUT;
- close IN;
-}
-
-sub prefix_in_use
-{
- local ($p) = @_;
-
- # Returns true or false; returns true if any file in the current
- # directory begins with $p. This function is here because
- # `<$p*>' only works for the first value of $p!
-
- opendir(DIR,".") || die "Couldn't read current directory -- $!\n";
- while ($_ = readdir(DIR)) {
- last if /^$p/;
- }
- closedir(DIR);
- $rc = /^$p/;
-}
diff --git a/doc/tools/texi2www/texi2www b/doc/tools/texi2www/texi2www
deleted file mode 100755
index 3e677936b9..0000000000
--- a/doc/tools/texi2www/texi2www
+++ /dev/null
@@ -1,1276 +0,0 @@
-#!/usr/bin/perl
-# (Works with both perl 4 and perl 5)
-#
-# $Id$
-#
-
-$version = 'Jan 2 1996';
-$copyright = <<EOT;
-texi2www - converts texinfo to HTML
-Copyright (C) 1994, 1995, 1996 Tim Singletary
-
-This program is freely distributable under the terms of the GNU
-GENERAL PUBLIC LICENSE. In particular, modified versions of this
-program must retain this copyright notice and must remain freely
-distributable.
-
-EOT
-$usage = <<EOT;
-Usage: texi2www [option ...] texinfo_file
-where options are:
- -dir directory -- Specify output directory. Default is `.'.
- -dirfile path -- Specifies a replacement for ../dir.html
- -header path -- Specifies the path to a file containing HTML;
- this files gets inserted near the top of each
- generated HTML file.
- -footer path -- Specifies the path to a file containing HTML;
- this files gets inserted near the bottom of each
- generated HTML file.
- -icons path -- Specifies the path, relative to the output directory,
- to the arrow files. Default is `..'.
- -base -- Specify the base part fo the genrated short file names
- -uselongnames -- Use long names for generated html files
- -verbose -- Verbose output.
-
-The complete user\'s is available at
-http://sunland.gsfc.nasa.gov/info/texi2www/Top.html
-EOT
-
-########################################################################
-
-%lookup = (); # clear the name mapping hash
-$uselongnames=0; # default to using short names
-$base = "a"; # default short name base (BASEnnnnn.html)
-$outcount = 0; # count for the nnnnn part of short names
-$icons = ".."; # where are the icons
-$dir = "."; # where are the generated files to go
-$dirfile = "../dir.html"; # "up" node pointer
-while ($ARGV[0] =~ /^-/) {
- $_ = shift;
- if (/-base/) {$base = shift; next;}
- if (/-dirfile/) {$dirfile = shift; next;}
- if (/-dir/) {$_ = shift; s!/$!!; s!$!/!; $dir = $_; next;}
- if (/-footer/) {$footer = shift; next;}
- if (/-header/) {$header = shift; next;}
- if (/-icons/) {$_ = shift; s!\/$!!; $icons = $_; next;}
- if (/-uselongnames/) {$uselongnames = 1; next;}
- if (/-verbose/) {$verbose = 1; next;}
- die $usage;
-}
-
-&initialize_tables();
-
-#
-# Read the texinfo input into @texinfo
-#
-&open_input_file($ARGV[0]);
-&read_input(1,'/^\@bye/',"$texinfo_file[0] line 1");
-$texinfo[$ntexinfo] = "\@bye\n";
-$origin[$ntexinfo] = "$texinfo_file[0] line $.";
-
-#
-# Parse @texinfo
-#
-$texinfo_index = 0;
-while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@bye/) {
- &terminate_node();
- print "Normal completion\n";
- exit;
- }
- &parse();
-}
-
-print "Huh? didn't parse the \@bye directive!\n";
-
-########################################################################
-sub canonical # (node_name)
-{
- local ($n) = @_;
-
- $n =~ s/^\s+//; $n =~ s/\s+$//; # strip whitespace
-
- return "$dirfile" if ($n =~ /\(dir\)/i); # handle (dir)
-
- if ($n =~ /^\(([^\)]+)\)(.*)/) {
- $p = $1; $p =~ s/^\s+//; $p =~ s/\s+$//; $p .= "/";
- $n = $2; $n =~ s/^\s+//; $n =~ s/\s+$//;
- } else {
- $p = "";
- }
-
-
- $n =~ s/\$/\$\$/; # `$' -> `$$'
- $n =~ s/_/\$_/g; # `_' -> `$_'
- $n =~ s/\s+/_/g; # whitespace -> `_'
-
- # anything else that's funky get
- # translated to `$xx' where `xx'
- # are hex digits.
- while ($n =~ /(.*)([^-a-zA-Z0-9\$_.])(.*)/) {
- $n = $1 . sprintf("\$%02x",ord($2)) . $3;
- }
-
- if ($uselongnames) {
- return "$p$n.html" if ($n);
- } else {
- if ($n eq 'Top') {
- $lookup{"$p$n"}= "index.html";
- return $lookup{"$p$n"};
- } elsif ($n) {
- if (! $lookup{"$p$n"}) {
- $outcount = $outcount + 1;
- #$lookup{"$p$n"}= "$base$outcount.html";
- $lookup{"$p$n"} = sprintf "%s%05d.html", $base, $outcount;
- }
- return $lookup{"$p$n"};
- }
- }
- return "";
-} # canonical
-
-########################################################################
-sub deduce_node_links
-#
-# On entry, $_ is a node line and $start_index is the index (in @texinfo)
-# the node line.
-#
-# &deduce_node_links() sets $next, $prev, and $up.
-{
- local ($level,$i,$node,$j);
-
- # First, search down from this node to the next sectioning command.
- $level = &determine_node_level($start_index+1);
-
- # Next, look for the `next' node (i.e., the next node at the
- # same or a higher level).
- undef($next);
- for ($i=$start_index+1; $i < $ntexinfo; ++$i) {
- $_ = $texinfo[$i];
- next unless /^\@node +([^,]+).*\n/;
- $j = &determine_node_level($i+1);
- if ($j <= $level) {
- if ($j == $level) {$next = $1;}
- last;
- }
- }
-
- # Look for the `prev' and `up' nodes
- undef($prev);
- undef($up);
- for ($i=$start_index-1; $i > 1; --$i) {
- $_ = $texinfo[$i];
- next unless /^\@node\s+([^,]+).*\n/;
- $j = &determine_node_level($i+1);
- if ($j == $level) {
- unless ($prev) {$prev = $1;}
- } elsif ($j < $level) {
- $up = $1;
- last;
- }
- }
- unless (defined($up)) {$up = "(dir)";}
-
- $xthis = $this;
- $xthis =~ s/\n//;
-
-} # deduce_node_links
-
-########################################################################
-sub determine_node_level
-{
- local ($i) = @_;
- local ($level);
-
- $level = 0;
- while ($i < $ntexinfo) {
- $_ = $texinfo[$i];
- ++$i;
- next if /^\s+$/;
- last if (/\@node/);
- last unless (/\@(\w+)/);
- if ($directive_section{$1}) {
- $level = $directive_section{$1};
- last;
- }
- }
-
- return $level;
-} # determine_node_level
-
-
-########################################################################
-sub expand_xref
-{
- local ($cmd,$arg) = @_;
- local ($node,$xrefname,$topic,$infofile,$manual,$url,$x);
-
- if ($cmd eq 'inforef') {
- ($node,$xrefname,$infofile) = split(/,/,$arg);
- $topic = $manual = '';
- } elsif ($cmd eq 'href') {
- ($xrefname,$node,$infofile,$url) = split(/,/,$arg);
- } else {
- ($node,$xrefname,$topic,$infofile,$manual) = split(/,/,$arg);
- }
- $xrefname =~ s/^\s+//; $infofile =~ s/^\s+//;
- $xrefname =~ s/\s+$//; $infofile =~ s/\s+$//;
- $xrefname =~ s/\s+/ /; $infofile =~ s/\s+/ /;
- $infofile =~ s/\.texi$//;
- $infofile =~ s/\.texinfo$//;
-
- if ($xrefname =~ /^$/) {$xrefname = $node;}
-
- $node = &canonical($node);
- unless ($url) {
- unless ($infofile =~ /^$/) {$url = "../$infofile/";}
- $url = $url . $node;
- }
- $x = "<A HREF=\"$url\">$xrefname</A>";
-} # expand_xref
-
-########################################################################
-sub get_more_stuff_to_parse
-{
- $start_index = $texinfo_index;
-
- $_ = '';
- do {
- if ($texinfo_index >= @texinfo) {
- print "Unclosed \@x{y} in chunk beginning at "
- . "$origin[$start_index]\n";
- return;
- }
- s/\n$/ /;
- $more = $texinfo[$texinfo_index++];
- $more =~ s/\@\*/<BR>\n/g;
- $more =~ s/\@\./\./g;
- $more =~ s/\@\://g;
- $more =~ s/\@refill//g;
-
- $_ .= $more;
-
- # Expand all @a{b} in line
- while (/\@(\w+)\{([^{}]*)\}/) {
- $atcmd = $1;
- $atarg = $2;
-
- if ($z = $atxy_2_zyz{$atcmd}) {
- if ($z =~ /(.+),(.+),(.+)/) {
- $left = $1; $z = $2; $right = $3;
- } else {
- $left = ''; $right = '';
- }
- if ($z =~ s/^\^//) {$atarg =~ tr/a-z/A-Z/;}
- $x = "$left<$z>$atarg</$z>$right";
- } elsif ($atxy_2_y{$atcmd}) {
- $x = $atarg;
- } elsif ($z = $atxy_2_z{$atcmd}) {
- $x = $z;
- } elsif ($z = $atxy_2_ref{$atcmd}) {
- $x = $z . &expand_xref($atcmd,$atarg);
- $x =~ s/^X//; # works because $z must start with 'X'!
- } elsif ($atcmd eq 'value') {
- $x = $texinfo_variable{$atarg};
- } elsif ($atcmd eq 'today') {
- $x = &today();
- } elsif ($atcmd eq 'footnote') {
- $footnote[$nfootnotes++] = $atarg;
- $x = "\[$nfootnotes\]";
- } elsif ($atcmd eq 'gif') {
- $atarg =~ s/,.*//;
- &copy_to_destdir($atarg);
- $atarg =~ s|.*/||;
- $x = "<IMG SRC=\"$atarg\">";
- } else {
- print "**WARNING** Don't know how to expand "
- . "\@$atcmd\{$atarg\}\n";
- $debug = 1;
- $x = "?$atcmd\?$atarg\?";
- }
-
- print "$origin[$start_index]: \@$atcmd\{$atarg\} => $x\n"
- if $debug{expansions};
-
- s/\@\w+\{[^{}]*\}/$x/;
- }
- } while (/\@\w+\{[^}]*$/);
- print "$origin[$start_index]: $_" if $debug{chunks};
-} # get_more_stuff_to_parse
-
-########################################################################
-sub parse
-# On entry:
-# $_ -- the line(s) to parse.
-# $start_index -- where, in $texinfo, $_ begins.
-{
- local ($x);
-
- if (/^\@(\w+)/) {
- if ($x=$directive_block{$1}) { # @example, @quotation, etc.
- &parse_block($1,$x);
- } elsif ($directive_section{$1}) { # @chapter, @subsection, etc.
- &process_section();
- } elsif ($1 eq 'bye') {
- if ($nfootnotes > 0) {
- &printHTML("<P><HR>\n");
- for ($n=0; $n < $nfootnotes; ++$n) {
- &printHTML("<P>\[" . ($n+1) . "\] $footnote[$n]</P>\n");
- }
- }
- &printHTML("<P><HR>\n");
- &print_arrows;
- &printHTML("</P>\n");
- &print_footer if $footer;
- &printHTML("</BODY></HTML>\n");
- close (HTML);
- return;
- } elsif ($1 eq 'center') {
- /^\@center\s+(.*)/;
- &printHTML("$paragraph_end") if $in_paragraph;
- &printHTML("<P ALIGN=CENTER>$1</P>\n");
- $in_paragraph = 0;
- } elsif ($1 eq 'clear') {
- /^\@clear\s+(\S+)/;
- undef($texinfo_variable{$1});
- } elsif ($1 =~ /^def(code)?index/) {
- /^\@(def|defcode)index\s+(\w+)/;
- $index_name{$2} = $2 . "index";
- $index_style{$2} = 'CODE' if ($1 eq "defcode");
- } elsif ($1 =~ /^(def.*)/) { # @defn, @defun, ... @deftp
- &parse_def($1);
- } elsif ($1 eq 'enumerate') {
- &parse_enumerate();
- } elsif ($1 eq 'exdent') {
- /^\@exdent\s+(.*)/;
- &printHTML("$paragraph_end") if $in_paragraph;
- # A bug -- doesn't exdent the line!
- &printHTML("<P>$1</P>\n");
- $in_paragraph = 0;
- } elsif ($1 eq 'flushleft' || $1 eq 'flushright') {
- &parse_flush();
- } elsif ($1 eq 'html') {
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- last if (/^\@end\s+html/);
- s/\&quot;/\"/g; s/\&gt;/\>/g; s/\&lt;/\</g; s/\&amp;/\&/g;
- &printHTML("$_");
- }
- } elsif ($1 eq 'itemize') {
- &parse_itemize();
- } elsif ($1 eq 'menu') {
- &parse_menu();
- } elsif ($1 eq 'node') {
- $node=$_;
- &process_node();
- } elsif ($1 eq 'printindex') {
- /^\@printindex\s+([a-z]+)/;
- &print_index($1);
- } elsif ($1 eq 'settitle') {
- /^\@settitle\s+(.*)/;
- unless ($title) {$title = $1;}
- } elsif ($1 eq 'set') {
- if (/^\@set\s+(\S+)\s+(.+)$/) {
- $texinfo_variable{$1} = $2;
- } else {
- /^\@set\s+(\S+)/;
- $texinfo_variable{$1} = 1;
- }
- } elsif ($1 eq 'syncodeindex') {
- &process_synindex(1);
- } elsif ($1 eq 'synindex') {
- &process_synindex(0);
- } elsif ($1 =~ /^.?table/) { # @table, @vtable, @ftable
- unless (/^\@(.?table)\s*\@(\w*)/
- && ($2 eq 'asis' || ($tbltype=$atxy_2_zyz{$2}))) {
- print "**WARNING** $origin[$start_index]: assuming "
- . "\@table \@asis\n";
- $tbltype = '';
- }
- &parse_table($1,$tbltype);
- } elsif ($1 =~ /..?index/) { # @cindex, @findex, .. @auindex, etc.
- &process_index();
- } else {
- print "**WARNING** $origin[$start_index]: ignoring $_";
- }
- } else {
- if (/^\s*$/) {
- if ($in_paragraph) {
- &printHTML("$paragraph_end");
- } elsif ($in_preformatted) {
- &printHTML("\n");
- }
- $in_paragraph = 0;
- } else {
- unless ($in_preformatted) {
- unless ($in_paragraph) {
- &printHTML("<P>\n");
- $in_paragraph = 1;
- $paragraph_end = "</P>\n";
- }
- }
- &printHTML("$_");
- }
- }
-} # parse
-
-########################################################################
-sub parse_block
-#
-# Handles @example, @display, etc.
-#
-# > @example > <PRE>
-# > a + b = c ==> > a + b = c
-# > @end example > </PRE>
-{
- local ($block,$pre) = @_;
- local ($started_at);
-
- $started_at = $start_index;
-
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- if ($pre eq '>PRE') {
- &printHTML("<DL><DT><DD>\n<PRE>\n");
- } else {
- &printHTML("<$pre>\n") unless ($pre eq '-');
- }
- $in_preformatted = $block;
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@end\s+$block/) {
- if ($pre eq 'HR') {
- &printHTML("</HR>\n");
- } elsif ($pre eq '>PRE') {
- &printHTML("</PRE>\n</DL>\n");
- } else {
- &printHTML("</$pre>\n") unless ($pre eq '-');
- }
- $in_preformatted = 0;
- return;
- }
- &parse();
- }
- print "**ERROR** reached EOF while searching for end of the \@$block "
- . "block that started on $origin[$started_at]\n";
-} # parse_block
-
-########################################################################
-sub parse_def
-# $_ contains a @def* command
-{
- local ($def) = @_;
- local ($started_at,$in_dd);
-
- $started_at = $start_index;
-
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- &printHTML("<DL>\n");
-
- &printdef();
-
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@end\s+$def/) {
- &printHTML("</DL>\n");
- $in_paragraph = 0;
- return;
- }
- if (s/^(\@def\w+)x\s/$1 /) {&printdef();}
- else {
- unless ($in_dd) {
- &printHTML("<DD>\n");
- ++$in_dd;
- $in_paragraph = 1;
- $paragraph_end = "\n";
- }
- &parse();
- }
- }
- print "**ERROR** reached EOF while searching for end of the $def "
- . "definition that started on $origin[$started_at]\n";
-
-} # parse_def
-sub printdef
-{
-
- s/\@defun(x?)\s/\@deffn Function /
- || s/\@defmac(x?)\s/\@deffn Macro /
- || s/\@defspec(x?)\s/\@deffn \{Special Form\} /
- || s/\@defvar(x?)\s/\@defvr Variable /
- || s/\@defopt(x?)\s/\@defvr \{User Option\} /
- || s/\@deftypefun(x?)\s/\@deftypefn Function /
- || s/\@deftypevar(x?)\s/\@deftypefn Variable /
- || s/\@defivar(x?)\s/\@defcv \{Instance Variable\} /
- || s/\@defmethod(x?)\s/\@defop Method /;
- s/(\@\w+)x\s/$1 /;
-
- @words = split;
-
- $i = 1;
- $category = $words[$i++];
- while ($i < @words && $category =~ /^\{[^}]*$/) {
- $category .= ' ' . $words[$i++];
- }
- if ($i>=@words) {
- print "def error at $origin{$started_at}\n";
- }
- $category =~ s/^\{//;
- $category =~ s/\}$//;
-
- &printHTML("<DT>$category: ");
-
- if ($words[0] eq '@deftypefn' || $words[0] eq '@deftypevr'
- || $words[0] eq '@defcv' || $words[0] eq '@defop') {
- if ($words[$i] =~ s/^\{//) {
- &printHTML("<VAR>");
- until ($words[$i] =~ s/\}$//) {&printHTML("$words[$i++]");}
- &printHTML("$words[$i++]</VAR> ");
- } else {
- &printHTML("<VAR>$words[$i++]</VAR> ");
- }
- $words[0] =~ /.*([a-z][a-z])/;
- $_ = "\@" . $1 . "index " . $words[$i];
- &process_index;
- }
- &printHTML("<STRONG>$words[$i++]</STRONG>\n<VAR>");
-
- while ($i < @words) {&printHTML(" $words[$i++]");}
- &printHTML("</VAR>\n");
-
-} # printdef
-
-########################################################################
-sub parse_enumerate
-# $_ is `@enumerate'. Note that @enumerate with an arg (`@enumerate 3',
-# for example) is kinda funky due to HTML limitations.
-{
- local ($count,$started_at);
-
- $started_at = $start_index;
-
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- if (/^\@enumerate\s*(\S+)/) {$count = $1;}
-
- &printHTML("<" . ($count ? "UL" : "OL") . ">\n");
-
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@end\s+enumerate/) {
- &printHTML("</" . ($count ? "UL" : "OL") . ">\n");
- return;
- }
- if (/^\@item\s+(.*)/ || /^\@item()$/) {
- if ($count) {
- &printHTML("<LI>$count: $1\n");
- ++$count;
- } else {
- &printHTML("<LI>$1\n");
- }
- $in_paragraph = 1;
- $paragraph_end = "\n";
- } else {
- &parse();
- }
- }
- print "**ERROR** reached EOF while searching for end of the \@enumerate "
- . "that started on $origin[$started_at]\n";
-} # parse_enumerate
-
-########################################################################
-sub parse_flush
-{
- local ($started_at,$flush);
-
- /^\@(\w+)\s/;
- $flush = $1;
- $started_at = $start_index;
-
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@end\s+$flush/) {
- return;
- }
- &parse();
- }
- print "**ERROR** reached EOF while searching for end of the $flush "
- . "that started on $origin[$started_at]\n";
-
-
-} # parse_flush
-
-########################################################################
-sub parse_itemize
-# $_ is `@itemize'. Due to HTML limitation, `@itemize @bullet' comes
-# out the same as `@itemize @minus'.
-{
- local ($started_at);
-
- $started_at = $start_index;
-
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- &printHTML("<UL>\n");
-
-
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@end\s+itemize/) {
- &printHTML("</UL>\n");
- return;
- }
- if (/^\@item\s+(.*)/ || /^\@item()$/) {
- &printHTML("<LI>$1\n");
- $in_paragraph = 1;
- $paragraph_end = "\n";
- } else {
- &parse();
- }
- }
- print "**ERROR** reached EOF while searching for end of the itemize "
- . "that started on $origin[$started_at]\n";
-} # parse_itemize
-
-########################################################################
-sub parse_menu
-{
- local ($started_at);
-
- $started_at = $start_index;
-
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- &printHTML("<MENU>\n");
-
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@end\s+menu/) {
- &printHTML("</MENU>\n");
- return;
- }
-
- # Like ` * menu-item:: description of item'
- if (/^\s*\*\s*([^:]*)\s*::\s*(.*)$/) {
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
- $node = &canonical($1);
- &printHTML("<LI><A HREF=\"$node\">$1</A>\n");
- &printHTML("$2\n") if $2;
- # Like ` * menu-item: cross-reference. description of item'
- } elsif (/^\s*\*\s*([^:]*)\s*:([^.]*)\.\s*(.*)$/) {
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
- $node = &canonical($2);
- &printHTML("<LI><A HREF=\"$node\">$1</A>\n");
- &printHTML("$3\n");
- } elsif (/^\@/) {
- print "**WARNING** Don\'t know how to process \`$_\' inside "
- . "a menu!\n";
- } else {
- if (/^\s*$/ && !$in_paragraph) {
- &printHTML("<P>");
- $in_paragraph = "1";
- $paragraph_end = "</P>\n";
- }
- &printHTML("$_");
- }
- }
- print "**ERROR** reached EOF while searching for end of the menu "
- . "that started on $origin[$started_at]\n";
-} # parse_menu
-
-########################################################################
-sub parse_table
-# $_ is `@itemize'. Due to HTML limitation, `@itemize @bullet' comes
-# out the same as `@itemize @minus'.
-{
- local ($table,$ttype,$after_DT,$started_at,$first_para);
- ($table,$ttype) = @_;
-
- $started_at = $start_index;
-
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- &printHTML("<DL>\n");
-
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@end\s+$table/) {
- &printHTML("</DL>\n");
- return;
- }
- if (/^\@item(x?)\s+(.*)/ || /^\@item(x?)()$/) {
- $atarg = $2;
- if ($ttype) {
- if ($ttype =~ /(.+),(.+),(.+)/) {
- $left = $1; $z = $2; $right = $3;
- } else {
- $left = ''; $z = $ttype; $right = '';
- }
- if ($z =~ s/^\^//) {$atarg =~ tr/a-z/A-Z/;}
- &printHTML("<DT>$left<$z>$atarg</$z>$right\n");
- } else {
- &printHTML("<DT>$2\n");
- }
- $item = $2;
- if ($item && $table =~ /([fv])table/) {
- $_ = "\@" . $1 . "index " . $item;
- &process_index;
- }
- $after_DT = 1;
- } else {
- if ($after_DT) {
- &printHTML("<DD>\n");
- $in_paragraph = 1;
- $paragraph_end = "\n";
- $after_DT = 0;
- $first_para = 1;
- }
- unless ($first_para && /^\s*$/) {
- $first_para = 0;
- &parse();
- }
- }
- }
- print "**ERROR** reached EOF while searching for end of the table "
- . "that started on $origin[$started_at]\n";
-} # parse_table
-
-########################################################################
-sub print_index
-{
- local ($index) = @_;
- $index = $index_name{$index};
-
- eval "\@keys = keys \%$index";
-
- &printHTML("<MENU>\n");
- foreach $item (sort texinfo_sort @keys) {
- eval "\$val = \$$index\{\$item\}";
- &printHTML("<LI>$val\n");
- }
- &printHTML("</MENU>\n");
-} # print_index
-
-sub texinfo_sort
-{
- $x = $a; $x =~ s/<[^>]*>//g; $x =~ tr/A-Z/a-z/;
- $y = $b; $y =~ s/<[^>]*>//g; $y =~ tr/A-Z/a-z/;
- $x cmp $y;
-} # texinfo_sort
-
-########################################################################
-sub process_index
-#
-# For example, `@cindex whatever' generates an entry in %cpindex
-#
-{
- s/\@cindex/\@cpindex/ || s/\@findex/\@fnindex/
- || s/\@vindex/\@vrindex/ || s/\@kindex/\@kyindex/
- || s/\@pindex/\@pgindex/ || s/\@tindex/\@tpindex/;
-
- /\@(..)index\s+(.*)/;
-
- if ($x=$index_style{$1}) {
- $entry = "<A HREF=\"$cthis\"><$x>$2</$x></A>";
- } else {
- $entry = "<A HREF=\"$cthis\">$2</A>";
- }
-
- print "*** \$$index_name{$1}\{$2\} = $entry\n" if $debug{'index'};
- eval "\$$index_name{$1}\{\$2\} = \$entry";
-} # process_index
-
-########################################################################
-sub print_arrows
-{
- &printHTML("<LINK REL=\"Precedes\" HREF=\"$cnext\">\n") if $next;
- &printHTML("<LINK REV=\"Precedes\" HREF=\"$cprev\">\n") if $prev;
- &printHTML("<LINK REV=\"Subdocument\" HREF=\"$cup\">\n") if $up;
- &printHTML("<LINK REV=\"Library\" HREF=\"$dirfile\">\n") if $dirfile;
- &printHTML("</HEAD><BODY><P>\n");
- if ($cprev) {
- &printHTML("<A HREF=\"$cprev\"><IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/prev-arrow.gif\" ALT=\"PREV\"></A>\n");
- } else {
- &printHTML("<A><IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/missing-arrow.gif\" ALT=\"prev\"></A>\n");
- }
- if ($cup) {
- &printHTML("<A HREF=\"$cup\"> <IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/up-arrow.gif\" ALT=\"UP\"></A>\n");
- } else {
- &printHTML("<A><IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/missing-arrow.gif\" ALT=\"up\"></A>\n");
- }
- if ($cnext) {
- &printHTML("<A HREF=\"$cnext\"><IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/next-arrow.gif\" ALT=\"NEXT\"></A>\n");
- } else {
- &printHTML("<A><IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/missing-arrow.gif\" ALT=\"next\"></A>\n");
- }
- if ($dirfile) {
-# XXX need new graphic for this one
- &printHTML("<A HREF=\"$dirfile\"> <IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/dir-arrow.gif\" ALT=\"Bookshelf\"></A>\n");
- } else {
- &printHTML("<A><IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/missing-arrow.gif\" ALT=\"Bookshelf\"></A>\n");
- }
- &printHTML("<CITE>$title</CITE>") if $title;
-}
-
-########################################################################
-sub process_node
-# On entry, $_ is an @node line.
-{
- s/^\@node\s+//;
- ($this,$next,$prev,$up) = split(/,/);
-
- &deduce_node_links() unless ($next || $prev || $up);
-
- &terminate_node();
-
- $cthis = &canonical($this);
- $cnext = &canonical($next);
- $cprev = &canonical($prev);
- $cup = &canonical($up);
-
- print "... opening $dir$cthis ...\n" if $debug{nodes};
- open(HTML,">$dir/$cthis") || die "Couldn't open $dir$cthis -- $!\n";
-
- $nfootnotes = 0;
-
- &printHTML("<HTML>\n");
- &printHTML("<!-- created $today from " .
- $origin[$start_index] . " via texi2www -->\n");
- &print_header if $header;
- &printHTML("<HEAD>\n<TITLE>$this</TITLE>\n");
- &print_arrows;
- &printHTML("</P>\n");
-
-} # process_node
-
-sub terminate_node
-{
- if ($nfootnotes) {
- &printHTML("<P><HR>\n");
- for ($n=0; $n < $nfootnotes; ++$n) {
- &printHTML("<P>\[" . ($n+1) . "\] $footnote[$n]</P>\n");
- }
- }
-
-
- &printHTML("<P><HR>\n");
- &print_arrows;
- &printHTML("</P>\n");
- &print_footer if $footer;
- &printHTML("</BODY></HTML>\n");
- close (HTML);
-}
-
-########################################################################
-sub process_section
-#
-# On entry:
-# $_ is the section command (I.e. `@chapter Overview')
-# $i is the index to $_ in @lines
-{
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- /^\@(\w+)\s+(.*)/;
-
- $section_number = '';
- if ($1 eq 'chapter') {
- ++$chapter; $section=$subsection=$subsubsection=0;
- $section_number = "Chapter $chapter: ";
- } elsif ($1 eq 'section') {
- ++$section; $subsection=$subsubsection=0;
- $section_number = "$chapter.$section: ";
- } elsif ($1 eq 'subsection') {
- ++$subsection; $subsubsection=0;
- $section_number = "$chapter.$section.$subsection: ";
- } elsif ($1 eq 'subsubsection') {
- ++$subsubsection;
- $section_number = "$chapter.$section.$subsection.$subsubsection: ";
- } elsif ($1 eq 'appendix') {
- ++$appendix; $section=$subsection=$subsubsection=0;
- $x = ('A'..'Z')[$appendix-1];
- $section_number = "Appendix $x: ";
- } elsif ($1 eq 'appendixsec') {
- ++$section; $subsection=$subsubsection=0;
- $x = ('A'..'Z')[$appendix-1];
- $section_number = "$x.$section: ";
- } elsif ($1 eq 'appendixsubsec') {
- ++$subsection; $subsubsection=0;
- $x = ('A'..'Z')[$appendix-1];
- $section_number = "$x.$section.$subsection: ";
- } elsif ($1 eq 'appendixsubsubsec') {
- ++$subsubsection;
- $x = ('A'..'Z')[$appendix-1];
- $section_number = "$x.$section.$subsection.$subsubsection: ";
- }
-
- $x = $directive_section{$1};
- &printHTML("<H$x>$section_number$2</H$x>\n");
-} # process_section
-
-########################################################################
-sub process_synindex
-#
-# There's perhaps a bug here -- this presumes the @synindex comes before
-# any @?index directives; anything already in <from> doesn't get merged
-# into <to>!
-#
-{
- local ($code) = @_; # Either 0 or 1; 1 means @syncodeindex
-
- /\@syn\w*index\s+(\w+)\s+(\w+)/;
-
- print "*** synindex $1 $2\n" if $debug{'index'};
-
- $index_name{$1} = $2 . "index";
- $index_style{$1} = 'CODE' if $code;
-} # process_synindex
-
-########################################################################
-sub printHTML
-{
- local ($line) = @_;
- $line =~ s/\$R/\}/g;
- $line =~ s/\$L/\{/g;
- $line =~ s/\$A/\@/g;
- $line =~ s/\$D/\$/g;
- if ($debug{printHTML}) {
- print $line;
- } else {
- print HTML $line;
- }
-} # printHTML
-
-########################################################################
-sub print_header
-{
- unless (open(HEADER,$header)) {
- print "WARNING -- couldn't open header file \"$header\" -- $!\n";
- $header = 0;
- return;
- }
- while (<HEADER>) {
- &printHTML($_);
- }
- close(HEADER);
-}
-
-########################################################################
-sub print_footer
-{
- unless (open(FOOTER,$footer)) {
- print "WARNING -- couldn't open footer file \"$footer\" -- $!\n";
- $footer = 0;
- return;
- }
- while (<FOOTER>) {
- &printHTML($_);
- }
- close(FOOTER);
-}
-
-########################################################################
-sub read_input
-#
-# Read the texinfo source into @texinfo. Don't copy comments or the
-# `@ifxxx' and `@end ifxxx' surrounding [or the contents of] conditional
-# blocks. Read `@include' files.
-{
- local ($echo,$terminator_re,$started_at) = @_;
-
- while (&texinfo_read()) {
-
- next if (/^\@c$/ || /^\@c\s/ || /^\@comment/);
-
- if (/^\@ifinfo/) {
- &read_input($echo,'/^\@end\s+ifinfo/',
- "$texinfo_file[0] line $.");
- next;
- }
- if (/^\@ifhtml/) {
- &read_input($echo,'/^\@end\s+ifhtml/',
- "$texinfo_file[0] line $.");
- next;
- }
- if (/^\@iftex/) {
- &read_input(0,'/^\@end\s+iftex/',
- "$texinfo_file[0] line $.");
- next;
- }
- if (/^\@tex/) {
- &read_input(0,'/^\@end\s+tex/',
- "$texinfo_file[0] line $.");
- next;
- }
- if (/^\@ignore/) {
- # @ignore doesn't nest
- $ignore_from = "$texinfo_file[0] line $.";
- while (&texinfo_read()) {
- last if (/^\@end\s+ignore/);
- }
- unless (/^\@end\s+ignore/) {
- print "Unexpected EOF while searching from $ignore_from "
- . "for \'\@end ignore\'\n";
- }
- next;
- }
- if (/^\@titlepage/) {
- &read_input(0,'/^\@end\s+titlepage/',"$texinfo_file[0] line $.");
- next;
- }
-
- if (/^\@ifclear\s+(\S+)/) {
- &read_input($echo&&(!defined($set{$1})),'/^\@end\s+ifclear/',
- "$texinfo_file[0] line $.");
- next;
- }
- if (/^\@ifset\s+(\S+)/) {
- &read_input($echo&&defined($set{$1}),'/^\@end\s+ifset/',
- "$texinfo_file[0] line $.");
- next;
- }
-
- return if eval "$terminator_re";
-
- if (/^\@include\s+(\S+)/) {
- &open_input_file($1);
- next;
- }
-
- if (/^\@(set|clear)\s+(\S+)/) {
- if ($1 eq "set") {
- $set{$2} = 1;
- } else {
- undef($set{$2});
- }
- }
-
- next unless $echo;
-
- if (/^\@(\w+)/) {next if $ignore_these_directives{$1};}
-
- # Hide @@, @{, and @} so later on it'll be easier to process
- # stuff like `@code{@@TeX@{@}}'.
- s/\$/\$D/g; s/\@\@/\$A/g; s/\@{/\$L/g; s/\@}/\$R/g;
-
- # Convert the HTML special characters
- s/\&/\&amp;/g; s/\</\&lt;/g; s/\>/\&gt;/g; s/\"/\&quot;/g;
-
- $texinfo[$ntexinfo] = $_;
- $origin[$ntexinfo] = "$texinfo_file[0] line $.";
- ++$ntexinfo;
- }
-
- print "Unexpected EOF while searching from $started_at "
- . "for $terminator_re\n";
-} # read_input
-
-########################################################################
-sub initialize_tables
-{
- # Lists which `@x{y}' get expanded into `y'.
- %atxy_2_y = (
- 'asis', 1,
- 'r', 1,
- 'w', 1,
- );
-
- # Describes which `@x{y}' get expanded into `<z>y</z>' and what `z'
- # is in those expansions! (If the expansion matches
- # ``/(.*),(.*),(.*)/'' then y actually expands to ``$1<$2>y</$2>$3'';
- # if z (or $2) begins with ^ then uppercase y before doing the
- # expansion).
- %atxy_2_zyz= (
- 'b', 'STRONG',
- 'cite', 'CITE',
- 'code', "CODE",
- 'dfn', 'EM',
- 'dmn', 'EM',
- 'emph', 'EM',
- 'file', "`,CODE,'",
- 'i', 'EM',
- 'kbd', 'KBD',
- 'key', '^CODE',
- 'math', 'CODE',
- 'samp', "`,CODE,'",
- 'sc', '^EM',
- 'strong', 'STRONG',
- 't', 'CODE',
- 'titlefont', 'CITE',
- 'var', 'VAR',
- );
-
- # Describes which `@x{y}' can be expanded into `z' and what `z' is in
- # those expansions!
- %atxy_2_z = (
- 'TeX', '<i>T</i>e<i>X</i>',
- 'bullet', '*',
- 'copyright', '(C)',
- 'dots', '...',
- 'equiv', '==',
- 'error', 'error-->',
- 'expansion', '==>',
- 'minus', '-',
- 'point', '-!-',
- 'print', '-|',
- 'result', '=>',
- 'today', &today(),
- );
-
- # Lists the '@x{y}' cross reference commands, and describes how they get
- # expanded. Note the 'X' beginning each expansion -- it's there so 'ref'
- # doesn't get expanded to ''!
- %atxy_2_ref = (
- 'xref', 'XSee ',
- 'ref', 'X',
- 'pxref', 'Xsee ',
- 'href', 'X',
- 'inforef', 'XSee ',
- );
-
- %ignore_these_directives = (
- 'author', 1,
- 'break', 1,
- 'contents', 1,
- 'evenfooting', 1,
- 'everyfooting', 1,
- 'everyheading', 1,
- 'finalout', 1,
- 'footnotestyle', 1,
- 'headings', 1,
- 'need', 1,
- 'noindent', 1,
- 'oddfooting', 1,
- 'page', 1,
- 'paragraphindent', 1,
- 'setchapternewpage', 1,
- 'setfilename', 1,
- 'shortcontents', 1,
- 'shorttitlepage', 1,
- 'smallbook', 1,
- 'sp', 1,
- 'subtitle', 1,
- 'summarycontents', 1,
- 'top', 1,
- 'vskip', 1,
- );
-
- # List the section directives and indicate what heading level
- # each one gets.
- %directive_section = (
- 'chapter', 1,
- 'section', 2,
- 'subsection', 3,
- 'subsubsection',4,
- 'appendix', 1,
- 'appendixsec', 2,
- 'appendixsubsec', 3,
- 'appendixsubsubsec', 4,
- 'chapheading', 1,
- 'majorheading', 1,
- 'heading', 2,
- 'subheading', 3,
- 'subsubheading', 4,
- 'unnumbered', 1,
- 'unnumberedsec', 2,
- 'unnumberedsubsec', 3,
- 'unnumberedsubsubsec', 4,
- );
-
- # These @ directives begin a block of preformatted text
- # (">PRE" means indented inside <PRE>...</PRE>)
- %directive_block = (
- 'cartouche', 'HR',
- 'display', '>PRE',
- 'example', '>PRE',
- 'format', 'PRE',
- 'group', '-',
- 'lisp', '>PRE',
- 'quotation', 'BLOCKQUOTE',
- 'smallexample','>PRE',
- );
-
- %index_name = (
- 'cp', 'cpindex',
- 'fn', 'fnindex',
- 'ky', 'kyindex',
- 'pg', 'pgindex',
- 'tp', 'tpindex',
- 'vr', 'vrindex',
- );
- %index_style = (
- 'fn', 'CODE',
- 'ky', 'CODE',
- 'pg', 'CODE',
- 'tp', 'CODE',
- 'vr', 'CODE',
- );
-} # initialize_tables
-
-########################################################################
-sub open_input_file
-{
- unshift(@texinfo_file,$_[0]);
- print "opening $_[0] ...\n" if $debug{open_input_file};
- open($texinfo_file[0],$_[0]) || die "Couldn't open $_[0]: $!\n";
-} # open_input_file
-
-########################################################################
-sub texinfo_read
-# Reads the next line of texinfo input into $_.
-{
- do {
- $fd = $texinfo_file[0];
- $_ = <$fd>;
- } while ($_ eq '' && shift @texinfo_file);
- return $_;
-} # texinfo_read
-
-########################################################################
-sub today
-{
- $today = `date`;
- $today =~ s/\w+ (\w+ +[0-9]+) [0-9]+:[0-9]+:[0-9]+ \w+ ([0-9]+)\n/$1 $2/;
- $today =~ s/ +/ /g;
- return $today;
-} # today
-
-########################################################################
-sub copy_to_destdir
-{
- ($copy_from) = @_;
-
- if ($copy_from =~ m|(.*)/([^/]*)|) {
- $copy_from_dir = $1;
- $copy_from_file = $2;
- } else {
- $copy_from_dir = ".";
- $copy_from_file = $copy_from;
- }
-
- if ($copy_from_dir ne $dir && !-e "$dir/$copy_from_file") {
- system("cp $copy_from $dir")
- && die "Couldn\'t \`cp $copy_from $dir\'\n";
- }
-}
diff --git a/doc/tools/texi2www/texi2www.texi b/doc/tools/texi2www/texi2www.texi
deleted file mode 100644
index c726564c39..0000000000
--- a/doc/tools/texi2www/texi2www.texi
+++ /dev/null
@@ -1,707 +0,0 @@
-\input ../../texinfo/texinfo @c -*-texinfo-*-
-
-@comment %**start of header
-@setfilename texi2www
-@settitle texi2www user's guide
-@comment %**end of header
-
-@finalout
-
-@titlepage
-@title texi2www
-@author Tim Singletary
-@end titlepage
-
-@iftex
-@everyfooting @| Jan 2 1996
-@end iftex
-
-@comment ******************************************************** TOP
-@node Top,,,(dir)
-@ifhtml
-This document describes @var{texi2www}, a utility for converting
-texinfo to HTML.
-
-This document provides a pretty good example of @var{texi2www}'s texinfo
-to HTML conversion. @href{Click here,,,texi2wwwdoc.texi.txt} to view
-the texinfo source to this document.
-@end ifhtml
-
-@menu
-* Overview:: What is texi2www? texinfo? HTML? mosaic? WWW?
-* Real life:: A real-life example using texi2www
-* Invocation:: Command line args, etc.
-* Extensions:: @@ commands not in GNU texinfo
-* Known Bugs:: Oops!
-* Demo:: What various things look like
-
-* texi2dvi::
-
-* Index::
-@end menu
-
-@ifhtml
-@today{}.
-@end ifhtml
-
-
-@comment **************************************************** CHAPTER
-@node Overview
-@unnumbered Overview
-@cindex What is HTML
-@cindex What is texinfo
-@cindex What is mosaic
-@cindex texi2html
-@cindex info2html
-@cindex Other texinfo to HTML converters
-
-@var{Texi2www} converts texinfo to HTML:
-
-@table @asis
-@item
-@table @asis
-@item texinfo
-A documentation system that uses a single source file to produce both
-on-line documentation and printed output. For details see
-@ref{Top,the Texinfo User's Guide,Overview,texinfo,The Texinfo User's Guide}.
-@item HTML
-@href{HyperText Markup Language,,,
-http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html}
-used in World Wide Web documents. Programs like mosaic
-understand HTML.
-@end table
-@end table
-
-Texinfo's on-line documentation viewers (emacs, info, xinfo, etc.) are
-quite limited when compared to mosaic. Mosaic supports multiple fonts,
-variable width fonts, embedded images, and hypertext links to anywhere
-(not just to other texinfo documents). In addition, mosaic keeps a
-history of nodes visited and can easily go back to previously visited
-nodes.
-
-@var{Texinfo} converts @var{texinfo} directly to @var{HTML} without
-going through an intermediate @var{info} conversion.
-
-Other @var{texinfo} to @var{HTML} converters include:
-
-@table @asis
-@item
-@href{@var{http://wwwcn.cern.ch/dci/texi2html/},,,
- http://wwwcn.cern.ch/dci/texi2html/}; and
-@item
-@href{@var{http://www.ericsson.nl/info2www/info2www.html},,,
- http://www.ericsson.nl/info2www/info2www.html}
-@end table
-
-Texi2html is very good, but is different from texi2www in several respects,
-including:
-
-@itemize
-@item Texi2www processes @@ifinfo blocks, whereas texi2html processes
- @@iftex blocks.
-@item Texi2www always generates menus, whereas menu generation is
- optional in texi2html.
-@item Texi2www generates a seperate document for each node, wherease
- texi2html can combine several nodes into one document.
-@item Texi2www adds @href{@code{@@ifhtml} blocks,ifhtml blocks},
- @href{@code{@@html} blocks,html blocks}, and @href{@code{@@href@{@}},
- href}. Texi2html has @code{@@ifhtml} blocks, but they work like
- texi2www's @code{@@html} blocks.
-@item Texi2www uses icons for the prev, up, and next links; texi2html
- doesn't.
-@end itemize
-
-Texi2www is written in perl and may be used and distributed under the
-terms of the @href{GNU General Public License,Copying,emacs}.
-
-Texi2www was written by
-@href{Tim Singletary,,,
-http://sunland.gsfc.nasa.gov/personnel/aam/singletary.html}
-(@cite{tsingle@@sunland.gsfc.nasa.gov}) and is available at
-@href{@var{ftp://sunland.gsfc.nasa.gov/pub/tarfiles/texi2www.tgz},,,
-ftp://sunland.gsfc.nasa.gov/pub/tarfiles/texi2www.tgz}.
-
-@comment **************************************************** CHAPTER
-@node Real life
-@chapter A Real Life Example
-
-Here's how I used texi2www to set up a
-@href{directory of texinfo documents,,,
- http://sunland.gsfc.nasa.gov/info/dir.html}.
-This discussion is the minimum I had to do to set up
-@href{texinfo,,,http://sunland.gsfc.nasa.gov/info/texinfo/Top.html} and
-texi2www.
-First, I created the directory ``@var{$HTDOCS/info}'' (@var{$HTDOCS} is
-the root directory of my web server).
-
-Then, I copied arrow icons ``@var{missing-arrow.gif}'',
-``@var{next-arrow.gif}'', ``@var{prev-arrow.gif}'', and
-``@var{up-arrow.gif}'' into ``@var{$HTDOCS/info}''.
-(I obtained my icons from
-@cite{Rutgers University Network Services} at
-@href{http://ns2.rutgers.edu/doc-images/buttons,,,
- http://ns2.rutgers.edu/doc-images/buttons}.)
-
-Next, I created subdirectories ``@var{$HTDOCS/info/texinfo}'' and
-``@var{$HTDOCS/info/texi2wwwdoc}''.
-(I determined the names of these subdirectories by examining the
-``@var{@@setfilename}'' line in the texinfo files.
-files; @var{texi2wwwdoc.texi} contains the line
-``@var{@@setfilename texi2wwwdoc.info}'' and @var{texinfo.texi} contains
-``@var{@@setfilename texinfo.info}''.
-
-Next, I copied the texinfo files into the appropriate directories. This
-step isn't strictly required, but I think its a good idea since it makes
-it simple to keep track of which texinfo files generated which set of
-html documents.
-
-Then I generated the html documents. I used the commands:
-@example
-> cd $HTDOCS/info/texinfo
-> texi2www texinfo.texi
-Normal completion.
-> cd ../texi2wwwdoc
-> texi2www texi2wwwdoc.texi
-Normal completion.
-@end example
-Examing these directories shows that a bunch of @var{.html} files got
-generated, including, in each directory, ``@var{Top.html}''.
-
-Finally, I created a table of contents file
-``@var{$HTDOCS/info/dir.html}''. The first version of that file looked
-like:
-
-@example
-<HTML>
-<HEAD><TITLE>info directory table of contents</TITLE></HEAD>
-<BODY>
-<MENU>
-<LI><A HREF="texinfo/Top.html">texinfo</A>
- GNU texinfo version 3.1
-<LI><A HREF="texi2wwwdoc/Top.html">texi2www</A>
- Converts texinfo to html
-</MENU>
-</BODY></HTML>
-@end example
-
-@comment **************************************************** CHAPTER
-@node Invocation
-@chapter Invocation
-@cindex Command line options
-@cindex Obtaining gif files
-
-@unnumberedsec Synopsys
-
-@code{texi2www [options] texinfo-file}
-
-@unnumberedsec Options
-@table @asis
-
-@item @code{-dir} @var{path}
- Specifies the path to the directory where the
- generated files get placed. If not specified, the current
- directory is assumed.
-
-@item @code{-footer} @var{file}
- Specifies a file whose contents get
- appended at the bottom of each generated HTML file. Typically
- looks something like:
-
-@example
-<HR>
-<P>Back to our <A HREF="../../homepage.html">home page</A>.</P>
-@end example
-
-@item @code{-icons} @var{path}
- Specifies the path (relative to the directory where the generated
- files get placed) to the arrow files. If not specified, @file{..}
- is assumed. The names of the arrow
- files are @file{up_arrow.gif}, @file{left_arrow.gif},
- @file{right_arrow.gif}, and @file{missing_arrow.gif}
-
-@end table
-
-@unnumberedsec Directory structure
-
-Texi2www will generate a set of HTML files from each texinfo document;
-each set of HTML files must go in a seperate directory (why? one reason
-is because each set includes a file named @code{Top.html}!).
-
-These directories should be subdirectories of the same base directory.
-Assume the base directory is @code{$TEXIBASE}. Then HTML files for
-emacs go in directory @code{$TEXIBASE/emacs}, HTML files for texinfo go
-in @code{$TEXIBASE/texinfo}, etc, where the name of the subdirectory is
-the same as the name of the info file (so cross references between
-documents will work).
-
-In addition to the subdirectories of HTML files, @code{$TEXIBASE}
-contains a file @code{dir.html} and the four arrow gif files
-@code{up_arrow.gif}, @code{left_arrow.gif}, @code{right_arrow.gif}, and
-@code{missing_arrow.gif}.
-
-@code{$TEXIBASE/dir.html} is typically just a menu of links to the
-subdirectories and can be as simple as
-
-@example
-<HTML><HEAD><TITLE>dir</TITLE></HEAD>
-<BODY>
-<MENU>
-<LI><A HREF="emacs/Top.html">emacs</A>
-<LI><A HREF="texinfo/Top.html">texinfo</A>
-</MENU>
-</BODY></HTML>
-@end example
-
-(@code{$TEXIBASE/dir.html} is not generated via texi2www and must be
-created by hand).
-
-
-
-@comment **************************************************** CHAPTER
-@node Extensions
-@chapter Extensions
-@ifhtml
-Texi2www understands the following extensions to pure texinfo:
-@end ifhtml
-@menu
-* ifhtml blocks:: @code{@@ifhtml} and @code{@@end ifhtml}
-* html blocks:: @code{@@html} and @code{@@end html}
-* href:: @code{@@href@{text,node,file,URL@}}
-* gif:: @code{@@gif@{gif-file@}}
-@end menu
-
-@comment ******************************************************* NODE
-@comment Top -> Extensions ->
-@node ifhtml blocks
-@section @code{@@ifhtml} and @code{@@end ifhtml}
-@cindex Conditional HTML blocks
-
-@var{@@ifhtml} blocks are similar to @var{@@ifinfo} and @var{@@iftex}
-blocks. Lines between @var{@@ifhtml} and @var{@@end ifhtml} get
-processed when generating the hypertext manual but get ignored when
-generating the printed manual.
-
-@var{texinfo.tex} (in @var{/usr/local/lib/tex/macros} on my machine)
-needs to be modified in order to use @@ifhtml. I inserted
-@example
-\def\ifhtml@{\doignore@{ifhtml@}@}
-@end example
-after the @code{\def\ifinfo@{\doignore@{ifinfo@}@}} line (line
-596 ???).
-
-In most cases, it is better to use @var{@@ifinfo} than @var{@@ifhtml}.
-
-@comment ******************************************************* NODE
-@node html blocks
-@section @code{@@html} and @code{@@end html}
-@cindex Pure HTML blocks
-
-@var{@@html} blocks are similar to @var{@@tex} blocks; @var{@@html}
-blocks only get processed when generating HTML and lines within
-@var{@@html} blocks may contain HTML commands.
-
-@ifhtml
-For example,
-
-@example
-@@html
-produces <EM>&lt;EM&gt;</EM> in HTML is like @@var@{@@@@var@} in texinfo.
-@@end html
-@end example
-
-@html
-produces <EM>&lt;EM&gt;</EM> in HTML is like @var{@@var} in texinfo.
-@end html
-@end ifhtml
-
-@var{texinfo.tex} (in @var{/usr/local/lib/tex/macros} on my machine)
-needs to be modified in order to use @@ifhtml. I inserted
-@example
-\def\html@{\doignore@{html@}@}
-@end example
-after the @code{\def\ifinfo@{\doignore@{ifinfo@}@}} line (line
-596 ???).
-
-@comment ******************************************************* NODE
-@node href
-@section @code{@@href@{text,node,file,URL@}}
-
-Use @code{@@href@{text,node,file,URL@}} when you want a hypertext link in an
-HTML document and plain text everywhere else.
-
-@var{Text} is the text you want displayed in the document.
-@var{Node},@var{file}, and @var{URL} indicate what @var{text} is linked to.
-@var{Node} and @var{file} are a normal texinfo style node reference;
-@var{URL} is a HTML URL.
-One of @var{node} or @var{URL} must be specified (if both are specified,
-@var{URL} is used).
-
-The @href{texinfo source used to create this
-document,,,texi2wwwdoc.texi.txt} contains numerous examples of how
-@@href might be used.
-
-@var{texinfo.tex} (in @var{/usr/local/lib/tex/macros} on my machine)
-needs to be modified in order to use @@href@{@}. All I did was insert
-@example
-\def\href#1{\hrefX[#1,,,]}
-\def\hrefX[#1,#2,#3,#4]{#1}
-@end example
-before the @code{\def\pxref} line (line 3497 ???).
-
-@comment ******************************************************* NODE
-@node gif
-@section @code{@@gif@{@var{pict.gif}@}}
-
-This extension provides a method for inserting a gif file in both the
-html and printed document. For example, here are my arrow icons:
-@*
-prev: @gif{prev-arrow.gif},
-up: @gif{up-arrow.gif},
-and next: @gif{next-arrow.gif}
-
-@subsection @code{@@gif@{@}} and @var{texi2www}
-
-@var{texi2www} copies @var{pict.gif} to the destination directory.
-
-@subsection @code{@@gif@{@}} and @var{texi2dvi}
-
-@href{@var{texi2dvi},texi2dvi} converts @var{pict.gif} to a font and
-uses this font to insert the picture in the document. This conversion
-to a font requires that the pbmplus and bm2font utilities be installed on
-your system:
-
-@table @asis
-@item pbmplus
- A suite of utilities for manipulating images. @var{texi2dvi} uses
- @var{giftopnm}, @var{pnmscale}, @var{pnmnlfilt}, @var{ppmquant},
- and @var{ppmtogif}. These utilities can be obtained from
- @href{@code{
- <ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.tar.gz>},,,
- ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.tar.gz}.
-
-
-@item bm2font
- @var{bm2font} converts a bitmap images (including ``@code{.gif}''
- images) to a font that can be used in a @TeX{} document.
- @var{bm2font} can be obtained from
- @href{@code{<ftp://ftp.shsu.edu/tex-archive/graphics/bm2font.tar.gz>},,,
- ftp://ftp.shsu.edu/tex-archive/graphics/bm2font.tar.gz}.
-@end table
-
-@comment **************************************************** CHAPTER
-@node Known Bugs
-@chapter Known Bugs
-
-@enumerate
-
-@item The @href{@code{@@center},titlefont center sp,texinfo} command
- doesn't work since HTML doesn't support centering yet.
-
-@item The @href{@code{@@noindent},noindent,texinfo} and
- @href{@code{@@exdent},exdent,texinfo} commands don't work since
- HTML doesn't include any facility to control indentation.
-
-@item Mark specifications in the @href{@code{@@itemize},itemize,texinfo}
- command are ignored since HTML doesn't include any facility to
- specify the tag in itemized lists.
-
-@item The @href{emacs texinfo files need to be tweaked,
- problems with emacs} to work with @var{texi2www}.
-
-@item One @href{@code{@@gif},gif} command is allowed per line.
-
-@end enumerate
-
-@unnumberedsec Fixed Bugs
-
-@enumerate
-
-@item Previous versions didn't handle nested tables correctly. The
- @@item following an inner @@table would be drawn in the wrong
- font. @var{(tsingle, Jan 2 1996)}
-
-@item Previous versions didn't capitalize
- @href{@code{@@sc@{@}},Smallcaps,texinfo} text. (There's still
- the problem of HTML not supporting true smallcaps, however).
- @var{(tsingle, Sep 6 1995)}
-
-@item Previous versions of @var{texi2www} didn't correctly index
- @href{@code{@@ftable} and @code{@@vtable},ftable vtable,texinfo}
- items; this bug has been fixed! @var{(tsingle, Aug 17 1995)}
-
-@end enumerate
-
-@node problems with emacs
-@section emacs.texi @result{} HTML problems
-
-The file @var{man/commands.texi} distributed with GNU Emacs version
-version 19.25 contains, near the top of the file:
-
-@example
-@@c See file emacs.texi for copying conditions.
-@@iftex
-@@chapter Characters, Keys and Commands
-
- This chapter explains the character set used by Emacs for input commands
-and for the contents of files, and also explains the concepts of
-@@dfn@{keys@} and @@dfn@{commands@} which are necessary for understanding how
-your keyboard input is understood by Emacs.
-@@end iftex
-@@node User Input, Keys, Screen, Top
-@@section Keyboard Input
-@end example
-
-Texi2www doesn't see the @@chapter since it's inside an @@iftex block;
-this confuses texi2www's chapter numbering. My fix was to change this
-section to:
-
-@example
-@@c See file emacs.texi for copying conditions.
-@@node User Input, Keys, Screen, Top
-@@chapter Characters, Keys and Commands
-@@iftex
-
- This chapter explains the character set used by Emacs for input commands
-and for the contents of files, and also explains the concepts of
-@@dfn@{keys@} and @@dfn@{commands@} which are necessary for understanding how
-your keyboard input is understood by Emacs.
-@@end iftex
-@@section Keyboard Input
-@end example
-
-@var{killing.texi}, @var{misc.texi}, and @var{trouble.texi} have similar
-problems.
-
-@comment **************************************************** CHAPTER
-@node Demo
-@appendix Sample output
-
-This document itself is a pretty good example of what texi2www supports
-and produces. Following are some examples to really make things clear;
-to fully appreciate these examples compare the source and printed output
-to your html viewer.
-
-@menu
-* Fonts:: @@var@{@}, etc.
-* Glyphs:: @@result@{@}, etc.
-* Blocks:: @@example ... @@end example, etc.
-* Tables and Lists:: @@table .. @@end table, etc.
-@end menu
-
-@comment **************************************************** SECTION
-@node Fonts
-@unnumberedsec Text markup
-
-Texi2www supports:
-
-@table @asis
-
-@item @@b@{@var{bold text}@} @result{} @b{bold text}
-Here is @b{some text} in the @@b font.
-
-@item @@cite@{@var{reference}@} @result{} @cite{reference}
-Indicate the name of a book.
-Here is @cite{some text} in the @@cite font.
-
-@item @@code@{@var{sample-code}@} @result{} @code{sample-code}
-Indicate text that is a literal example of a piece of a program.
-Here is @code{some text} in the @@code font.
-
-@item @@dfn@{@var{term}@} @result{} @dfn{term}
-Indicate the introductory or defining use of a term.
-Here is @dfn{some text} in the @@dfn font.
-
-@item @@dmn@{@var{text}@} @result{} @dmn{text}
-Here is @dmn{some text} in the @@dmn font.
-
-@item @@emph@{@var{text}@} @result{} @emph{text}
-Here is @emph{some text} in the @@emph font.
-
-@item @@file@{@var{file-name}@} @result{} @file{file-name}
-Indicate the name of a file.
-Here is @file{some text} in the @@file font.
-
-@item @@i@{@var{italic text}@} @result{} @i{italic text}
-Here is @i{some text} in the @@i font.
-
-@item @@kbd@{@var{keyboard-characters}@} @result{} @kbd{keyboard-characters}
-Indicate keyboard input.
-Here is @kbd{some text} in the @@kbd font.
-
-@item @@key@{@var{key-name}@} @result{} @key{key-name}
-Indicate the conventional name for a key on a keyboard.
-Here is @key{some text} in the @@key font.
-
-@item @@math@{@var{ax^2+b}@} @result{} @math{ax^2+b}
-Here is @r{some text} in the @@math font.
-
-@item @@r@{@var{roman font text}@} @result{} @r{roman font text}
-Here is @r{some text} in the @@r font.
-
-@item @@samp@{@var{text}@} @result{} @samp{text}
-Indicate text that is a literal example of a sequence of characters.
-Here is @samp{some text} in the @@samp font.
-
-@item @@sc@{@var{text}@} @result{} @sc{text}
-Here is @sc{some text} in the @@sc font.
-
-@item @@strong@{@var{text}@} @result{} @strong{text}
-Here is @strong{some text} in the @@strong font.
-
-@item @@t@{@var{fixed-width text}@} @result{} @t{fixed-width text}
-Here is @t{some text} in the @@t font.
-
-@item @@titlefont@{@var{text}@} @result{} @titlefont{text}
-Here is @titlefont{some text} in the @@titlefont font.
-
-@item @@var@{@var{metasyntactic-variable}@} @result{} @var{metasyntactic-variable}
-Indicate a metasyntactic variable.
-Here is @var{some text} in the @@var font.
-
-@end table
-
-
-@comment **************************************************** SECTION
-@node Glyphs
-@unnumberedsec Glyphs
-
-@table @asis
-
-@item @@TeX@{@} @result{} @TeX{}
-@item @@bullet@{@} @result{} @bullet{}
-@item @@copyright@{@} @result{} @copyright{}
-@item @@dots@{@} @result{} @dots{}
-@item @@equiv@{@} @result{} @equiv{}
-@item @@error@{@} @result{} @error{}
-@item @@expansion@{@} @result{} @expansion{}
-@item @@minus@{@} @result{} @minus{}
-@item @@point@{@} @result{} @point{}
-@item @@print@{@} @result{} @print{}
-@item @@result@{@} @result{} @result{}
-@item @@today@{@} @result{} @today{}
-
-@end table
-
-@comment **************************************************** SECTION
-@node Blocks
-@unnumberedsec Blocks
-
-@example
-@cartouche
-@@example
-@@cartouche
-Here's two lines
-of text
-@@end cartouche
-@@end example
-@end cartouche
-@end example
-
-@display
-@@display
-Here's two lines
-of text
-@@end display
-@end display
-
-@example
-@@example
-Here's two lines
-of text
-@@end example
-@end example
-
-@format
-@@format
-Here's two lines
-of text
-@@end format
-@end format
-
-@lisp
-@@lisp
-Here's two lines
-of text
-@@end lisp
-@end lisp
-
-@quotation
-@@quotation
-Here's two lines
-of text
-@@end quotation
-@end quotation
-
-@smallexample
-@@smallexample
-Here's two lines
-of text
-@@end smallexample
-@end smallexample
-
-@comment **************************************************** SECTION
-@node Tables and Lists
-@unnumberedsec Tables and Lists
-
-@example
-@@table @@code
-@@item code-one
-@@table @@var
-@@item var-one
-@@table @@samp
-@@item samp-one
-Hmmm.
-@@item samp-two
-Mmmmh.
-@@end table
-@@item var-two
-Huh?
-@@end table
-@@item code-two
-Duh?
-@@end table
-@end example
-
-@table @code
-@item code-one
-@table @var
-@item var-one
-@table @samp
-@item samp-one
-Hmmm.
-@item samp-two
-Mmmmh.
-@end table
-@item var-two
-Huh?
-@end table
-@item code-two
-Duh?
-@end table
-
-
-@comment **************************************************** CHAPTER
-@node texi2dvi
-@appendix texi2dvi & texinfo.tex
-
-Versions of ``@code{texi2dvi}'' and ``@code{texinfo.tex}'' are included
-with this package. These are compatible with the
-@href{texi2www extensions,Extensions}.
-
-@appendixsec texi2dvi
-
-@appendixsec texinfo.tex
-
-``@code{texinfo.tex}'' is a @TeX{} macro used during the @var{texinfo}
-@result{} @var{dvi} conversion.
-
-
-
-
-@comment **************************************************** CHAPTER
-@node Index
-@unnumbered Index
-@printindex cp
-
-@contents
-@bye
diff --git a/doc/tools/texi2www/up-arrow.gif b/doc/tools/texi2www/up-arrow.gif
deleted file mode 100644
index 82aa8ccc68..0000000000
--- a/doc/tools/texi2www/up-arrow.gif
+++ /dev/null
Binary files differ
diff --git a/doc/tools/update b/doc/tools/update
deleted file mode 100644
index 6199707a74..0000000000
--- a/doc/tools/update
+++ /dev/null
@@ -1,221 +0,0 @@
-#!/bin/ksh
-#
-# Either bash or ksh will be ok for this; requires 'test -ot'
-# (-p above just says to not parse $ENV file; makes it faster for
-# those of us who set $ENV)
-#
-#
-# NOTE
-#
-# This is potentially a very dangerous program.
-#
-# $Id$
-#
-
-# progname=`basename $0`
-progname=${0##*/} # fast basename hack for ksh, bash
-
-USAGE=\
-"
-usage: $progname [ -vs ] [ -b base_directory ] [-p file] [-f] [files...]
- -v -- verbose
- -p -- file with replacement instructions
- -s -- skip prompt for backup verification
- -f -- do files at end of line
-
-base_directory is the root directory of the source code to update. It
-defaults to the current directory.
-
-This program updates C, H, and .inl files.
-"
-
-fatal() {
- if [ "$1" ]
- then
- echo >&2
- echo $* >&2
- echo >&2
- fi
- echo "$USAGE" 1>&2
- exit 1
-}
-
-#
-# KLUDGE to figure out at runtime how to echo a line without a
-# newline.
-#
-count=`echo "\\c" | wc -c`
-if [ ${count} -ne 0 ] ; then
- EARG="-n"
- EOL=""
-else
- EARG=""
- EOL="\\c"
-fi
-
-#
-# Function to make sure they do a backup
-#
-
-WARNING=\
-"
-
-*******************************************************************************
-*******************************************************************************
-*******************************************************************************
-**** ****
-**** WARNING!!! WARNING!!! WARNING!!! ****
-**** ****
-**** ALL SOURCE CODE SHOULD BE BACKED UP BEFORE RUNNING THIS PROGRAM!! ****
-**** ****
-**** WARNING!!! WARNING!!! WARNING!!! ****
-**** ****
-*******************************************************************************
-*******************************************************************************
-*******************************************************************************
-
-"
-
-verify_backup()
-{
- echo "$WARNING"
- continue="yes"
- while [ $continue = "yes" ]
- do
-echo ${EARG} "Do you wish to update the source tree at this time [y|n]? " ${EOL}
- read answer
- case $answer in
- [yY]*)
- continue="no"
- ;;
- [nN]*)
- echo
- echo "Exitting at user request"
- echo
- exit 0
- ;;
- esac
- done
-}
-
-#
-# Default tools to use...
-#
-# NOTE: The GNU versions of both of these are faster.
-#
-find_prog=find
-xargs_prog=xargs
-
-#
-# process the options
-#
-
-verbose=""
-suffix=""
-mode=""
-base_directory=.
-do_files="no"
-do_prompt="yes"
-replacement_file=""
-
-while getopts sfp:b:v OPT
-do
- case "$OPT" in
- v)
- verbose="yes";;
- s)
- do_prompt="no";;
- b)
- base_directory=${OPTARG};;
- p)
- replacement_file=${OPTARG};;
- f)
- do_files="yes";;
- *)
- fatal
- esac
-done
-
-let $((shiftcount = $OPTIND - 1))
-shift $shiftcount
-
-args=$*
-
-#
-# Make sure they have done a backup
-#
-
-if [ ${do_prompt} = "yes" ]
-then
- verify_backup
-fi
-
-#
-# Validate the base directory
-#
-
-if [ ! -d $base_directory ]
-then
- fatal "${base_directory} does not exist"
-fi
-
-#
-# Validate the replacement file
-#
-
-if [ ! -r $replacement_file ]
-then
- fatal "${replacement_file} does not exist or is not readable"
-fi
-
-
-#
-# Verify enough of the RTEMS environment variables are set
-#
-
-RTEMS_HOME=/usr1/rtems/rtemsdoc-work
-if [ ! -d "${RTEMS_HOME}" ]
-then
- fatal "RTEMS_HOME environment variable is not initialized"
-fi
-
-#
-# Update the files
-#
-
-generate_list()
-{
- if [ ${do_files} = "yes" ]
- then
- for i in $args
- do
- echo $i
- done
- else
- ${find_prog} ${base_directory} \( -name "*.[ch]" -o -name "*.inl" \) -print
- fi
-}
-
-generate_list | ${xargs_prog} |
- while read line
- do
-
- if [ ${verbose} = yes ] ; then
- echo ${RTEMS_HOME}/tools/word-replace -p ${replacement_file} ${line}
- fi
- ${RTEMS_HOME}/tools/word-replace -p ${replacement_file} ${line}
- if [ $? -ne 0 ]
- then
- exit 1
- fi
- for file in ${line}
- do
- mv ${file}.fixed ${file}
- done
- done
-
-exit 0
-
-# Local Variables: ***
-# mode:ksh ***
-# End: ***
diff --git a/doc/tools/word-replace b/doc/tools/word-replace
deleted file mode 100755
index 90e72117fd..0000000000
--- a/doc/tools/word-replace
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/perl
-#
-# $Id$
-#
-
-eval "exec /usr/local/bin/perl -S $0 $*"
- if $running_under_some_shell;
-
-require 'getopts.pl';
-&Getopts("p:vh"); # help, pattern file, verbose,
-
-if ($opt_h || ! $opt_p) {
- print STDERR <<NO_MORE_HELP;
-word-replace
-
- Replace *words* with patterns. Pattern file specifies which patterns
- to replace on each line. All patterns are wrapped with perl \\b regexp
- specifiers.
-
-Usage: $0 [-v] -p pattern-file files to replace
-
- -v -- possibly more verbose
- -p file -- pattern file
- -h -- help
-
- anything else == this help message
-
-Pattern file looks like this:
-
-# Example:
-# ignores all lines with beginning with # or not exactly 2 fields
-_Dorky_Name rtems_dorky_name # comments, and blank lines are cool
-_Dorky_Name2 rtems_dorky_name2 # comments, and blank lines are cool
-NO_MORE_HELP
- exit 0;
-}
-
-$verbose = $opt_v;
-$pattern_file = $opt_p;
-
-# make standard outputs unbuffered (so the '.'s come out ok)
-$oldfh = select(STDERR); $| = 1; select($oldfh);
-$oldfh = select(STDOUT); $| = 1; select($oldfh);
-
-# pull in the patterns
-open(PATTERNS, "<$pattern_file") ||
- die "could not open $pattern_file: $!, crapped out at";
-
-foreach (<PATTERNS>)
-{
- chop;
- s/#.*//;
- next if /^$/;
- ($orig, $new, $junk, @rest) = split;
- next if ( ! $orig || ! $new || $junk); # <2 or >2 patterns
- die "pattern appears 2x: '$orig' in '$pattern_file'--" if defined($patterns{$orig});
- $patterns{$orig} = $new;
-}
-close PATTERNS;
-
-# walk thru each line in each file
-foreach $file (@ARGV)
-{
- print "$file\t";
-
- open (INFILE, "<$file") ||
- die "could not open input file $file: $!";
-
- $outfile = $file . ".fixed";;
- open (OUTFILE, ">$outfile") ||
- die "could not open output file $outfile: $!";
-
- while (<INFILE>)
- {
- study; # maybe make s/// faster
- foreach $key (keys %patterns)
- {
- if ( s/\b$key\b/$patterns{$key}/ge )
- {
- print ".";
- }
- }
- print OUTFILE $_;
- }
- print "\n";
- close INFILE;
- close OUTFILE;
-}
-