From 88c430b4a9562ab0aa6dc410bfbf76a1f9ebb407 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sat, 2 Feb 2008 18:44:53 +0200 Subject: [PATCH] Removed util/ directory from the tree. --- util/robodoc/AUTHORS | 8 - util/robodoc/COPYING | 340 -- util/robodoc/ChangeLog | 65 - util/robodoc/Docs/example.c | 29 - util/robodoc/Docs/example_makefile | 121 - util/robodoc/Docs/general.m4 | 14 - util/robodoc/Docs/main.css | 106 - util/robodoc/Docs/makefile.am | 30 - util/robodoc/Docs/makefile.in | 260 -- util/robodoc/Docs/robodoc.1 | 246 - util/robodoc/Docs/robodoc.html | 1320 ------ util/robodoc/Docs/robodoc.m4 | 1269 ------ util/robodoc/Docs/tocgen.m4 | 6 - util/robodoc/Examples/C/makefile | 34 - util/robodoc/Examples/C/prog1.c | 55 - util/robodoc/Examples/C/prog1.c.html | 69 - util/robodoc/Examples/C/prog2.c | 50 - util/robodoc/Examples/C/prog2.c.html | 63 - util/robodoc/Examples/CPP/makefile | 44 - util/robodoc/Examples/CPP/masterindex.html | 53 - util/robodoc/Examples/CPP/muppets.cpp | 51 - util/robodoc/Examples/CPP/muppets.cpp.html | 68 - util/robodoc/Examples/CPP/muppets.h | 25 - util/robodoc/Examples/CPP/muppets.h.html | 38 - util/robodoc/Headers/assembler.sample | 63 - util/robodoc/Headers/basic.sample | 63 - util/robodoc/Headers/c.sample | 46 - util/robodoc/Headers/cpp.sample | 68 - util/robodoc/Headers/fortan.sample | 63 - util/robodoc/Headers/html.sample | 38 - util/robodoc/Headers/tcl.sample | 39 - util/robodoc/INSTALL | 49 - util/robodoc/NEWS | 17 - util/robodoc/README | 63 - util/robodoc/Source/analyser.c | 677 --- util/robodoc/Source/analyser.h | 13 - util/robodoc/Source/config.h.in | 29 - util/robodoc/Source/folds.c | 141 - util/robodoc/Source/folds.h | 47 - util/robodoc/Source/generator.c | 1729 ------- util/robodoc/Source/generator.h | 20 - util/robodoc/Source/headers.c | 160 - util/robodoc/Source/headers.h | 72 - util/robodoc/Source/items.c | 280 -- util/robodoc/Source/items.h | 83 - util/robodoc/Source/links.c | 442 -- util/robodoc/Source/links.h | 44 - util/robodoc/Source/makefile.am | 140 - util/robodoc/Source/makefile.in | 437 -- util/robodoc/Source/makefile.plain | 215 - util/robodoc/Source/robodoc.c | 862 ---- util/robodoc/Source/robodoc.h | 91 - util/robodoc/Source/stamp-h.in | 1 - util/robodoc/Source/util.c | 686 --- util/robodoc/Source/util.h | 30 - util/robodoc/TODO | 8 - util/robodoc/aclocal.m4 | 811 ---- util/robodoc/configure | 4795 -------------------- util/robodoc/configure.in | 29 - util/robodoc/install-sh | 251 - util/robodoc/makefile.am | 87 - util/robodoc/makefile.in | 591 --- util/robodoc/missing | 190 - util/robodoc/mkinstalldirs | 40 - 64 files changed, 17874 deletions(-) delete mode 100644 util/robodoc/AUTHORS delete mode 100644 util/robodoc/COPYING delete mode 100644 util/robodoc/ChangeLog delete mode 100644 util/robodoc/Docs/example.c delete mode 100644 util/robodoc/Docs/example_makefile delete mode 100644 util/robodoc/Docs/general.m4 delete mode 100644 util/robodoc/Docs/main.css delete mode 100644 util/robodoc/Docs/makefile.am delete mode 100644 util/robodoc/Docs/makefile.in delete mode 100644 util/robodoc/Docs/robodoc.1 delete mode 100644 util/robodoc/Docs/robodoc.html delete mode 100644 util/robodoc/Docs/robodoc.m4 delete mode 100644 util/robodoc/Docs/tocgen.m4 delete mode 100644 util/robodoc/Examples/C/makefile delete mode 100644 util/robodoc/Examples/C/prog1.c delete mode 100644 util/robodoc/Examples/C/prog1.c.html delete mode 100644 util/robodoc/Examples/C/prog2.c delete mode 100644 util/robodoc/Examples/C/prog2.c.html delete mode 100644 util/robodoc/Examples/CPP/makefile delete mode 100644 util/robodoc/Examples/CPP/masterindex.html delete mode 100644 util/robodoc/Examples/CPP/muppets.cpp delete mode 100644 util/robodoc/Examples/CPP/muppets.cpp.html delete mode 100644 util/robodoc/Examples/CPP/muppets.h delete mode 100644 util/robodoc/Examples/CPP/muppets.h.html delete mode 100644 util/robodoc/Headers/assembler.sample delete mode 100644 util/robodoc/Headers/basic.sample delete mode 100644 util/robodoc/Headers/c.sample delete mode 100644 util/robodoc/Headers/cpp.sample delete mode 100644 util/robodoc/Headers/fortan.sample delete mode 100644 util/robodoc/Headers/html.sample delete mode 100644 util/robodoc/Headers/tcl.sample delete mode 100644 util/robodoc/INSTALL delete mode 100644 util/robodoc/NEWS delete mode 100644 util/robodoc/README delete mode 100644 util/robodoc/Source/analyser.c delete mode 100644 util/robodoc/Source/analyser.h delete mode 100644 util/robodoc/Source/config.h.in delete mode 100644 util/robodoc/Source/folds.c delete mode 100644 util/robodoc/Source/folds.h delete mode 100644 util/robodoc/Source/generator.c delete mode 100644 util/robodoc/Source/generator.h delete mode 100644 util/robodoc/Source/headers.c delete mode 100644 util/robodoc/Source/headers.h delete mode 100644 util/robodoc/Source/items.c delete mode 100644 util/robodoc/Source/items.h delete mode 100644 util/robodoc/Source/links.c delete mode 100644 util/robodoc/Source/links.h delete mode 100644 util/robodoc/Source/makefile.am delete mode 100644 util/robodoc/Source/makefile.in delete mode 100644 util/robodoc/Source/makefile.plain delete mode 100644 util/robodoc/Source/robodoc.c delete mode 100644 util/robodoc/Source/robodoc.h delete mode 100644 util/robodoc/Source/stamp-h.in delete mode 100644 util/robodoc/Source/util.c delete mode 100644 util/robodoc/Source/util.h delete mode 100644 util/robodoc/TODO delete mode 100644 util/robodoc/aclocal.m4 delete mode 100755 util/robodoc/configure delete mode 100644 util/robodoc/configure.in delete mode 100755 util/robodoc/install-sh delete mode 100644 util/robodoc/makefile.am delete mode 100644 util/robodoc/makefile.in delete mode 100755 util/robodoc/missing delete mode 100755 util/robodoc/mkinstalldirs diff --git a/util/robodoc/AUTHORS b/util/robodoc/AUTHORS deleted file mode 100644 index 60db402e..00000000 --- a/util/robodoc/AUTHORS +++ /dev/null @@ -1,8 +0,0 @@ -Frans Slothouber -Jacco van Weert -Petteri Kettunen -Bernd Koesling -Anthon Pang -Thomas Aglassinger -Stefan Kost - diff --git a/util/robodoc/COPYING b/util/robodoc/COPYING deleted file mode 100644 index 60549be5..00000000 --- a/util/robodoc/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) 19yy - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/util/robodoc/ChangeLog b/util/robodoc/ChangeLog deleted file mode 100644 index dbc81652..00000000 --- a/util/robodoc/ChangeLog +++ /dev/null @@ -1,65 +0,0 @@ -$Id$ - -This file lists the changes to the archive, not the changes to the -ROBODoc source code. These are listed in the main header of -Source/robodoc.c. - - -Sep 2000 - Frans Slothouber (V3.2.3) - o Added a descrip.mms file for compilation under VMS - o make install installs additional documentation. - -July 2000 - Frans Slothouber (V3.2.2) - o Documentation explains how to use ROBODoc when your sources are - in several subdirectories. - o Documentation explains master index file for LaTeX, how to view - the generated documentation, and the new options, NOSOURCE, SINGLEDOC - and TITLE. - o example makefile includes commands to view the - generated documentation. - o Updated the man page - -June 2000 - Frans Slothouber (v3.2.1) - o Improved documentation, better example makefile. - -May 2000 - Frans Slothouber (v3.2) - o Added autoconf and automake support. - -December 1999 - Frans Slothouber (v3.1e) - o Moved the C example in Examples to Examples/C - o Added an C++ example in Examples/CPP - o Added empty headers for C++ in Headers/ - o More documentation. - -December 1999 - Frans Slothouber (v3.1d) - o Added list of possible item names to the robodoc man page. - o Added list of possible header types to the robodoc man page. - o Updated manual with information on the generation of the - master index file and new header types. - -December 1999 - Frans Slothouber (v3.1c) - o Added testheader.c for debug purposes. - o Split the source code into serveral files. - o Fixed numerous typos in the documentation. - o Using m4 to create the html documentation (for table of contents ect). - o Added cross links between the documentation and examples. - -November 1999 - Frans Slothouber (v3.1b) - o Added a man page - o Cleaned-up html documentation. - -August 1999 - Frans Slothouber: - o Added GPL licence - o Added INSTALL, README, and TODO - o Converted the documentation to HTML - o Spell-checked all documentation - - - - - - - - - - diff --git a/util/robodoc/Docs/example.c b/util/robodoc/Docs/example.c deleted file mode 100644 index 32b17276..00000000 --- a/util/robodoc/Docs/example.c +++ /dev/null @@ -1,29 +0,0 @@ -/****f* Robodoc/RB_Panic [2.0d] - * NAME - * RB_Panic -- Shout panic, free resources, and shut down. - * SYNOPSIS - * RB_Panic (cause, add_info) - * RB_Panic (char *, char *) - * FUNCTION - * Prints an error message. - * Frees all resources used by robodoc. - * Terminates program. - * INPUTS - * cause - pointer to a string which describes the - * cause of the error. - * add_info - pointer to a string with additional information. - * SEE ALSO - * RB_Close_The_Shop () - * SOURCE - */ - - void RB_Panic (char *cause, char *add_info) - { - printf ("Robodoc: Error, %s\n",cause) ; - printf (" %s\n", add_info) ; - printf ("Robodoc: Panic Fatal error, closing down...\n") ; - RB_Close_The_Shop () ; /* Free All Resources */ - exit(100) ; - } - -/*******/ diff --git a/util/robodoc/Docs/example_makefile b/util/robodoc/Docs/example_makefile deleted file mode 100644 index 30059ff8..00000000 --- a/util/robodoc/Docs/example_makefile +++ /dev/null @@ -1,121 +0,0 @@ -SHELL = /bin/sh -.SUFFIXES: - -ROBODOC=robodoc -ROBOOPTS=C SORT - -# Your source files. -# -SOURCES=analyser.c generator.c items.c util.c \ - folds.c headers.c links.c robodoc.c \ - analyser.h generator.h items.h util.h \ - folds.h headers.h links.h robodoc.h - -# The name of your Project -# -PROJECT=ROBODoc - -# The various documentation files, derived from the source files. -# HTML -# -HTMLDOCS=$(SOURCES:=.html) -HTMLXREFS=$(HTMLDOCS:.html=.html.xref) -HTMLXREFSFILE=$(PROJECT)_html.xrefs -# LATEX -# -LATEXDOCS=$(SOURCES:=.tex) -LATEXXREFS=$(LATEXDOCS:.tex=.tex.xref) -LATEXXREFSFILE=$(PROJECT)_tex.xrefs -# ASCII -# -ASCIIDOCS=$(SOURCES:=.txt) -# RTF -# -RTFDOCS=$(SOURCES:=.rtf) -RTFXREFS=$(RTFDOCS:.rtf=.rtf.xref) -RTFXREFSFILE=$(PROJECT)_rtf.xrefs - -# Some common targets -xrefall: xrefhtml xreftex xrefrtf -docall: html tex ascii rtf - -# Create the xref files for the various formats. -xhtml: $(HTMLXREFSFILE) -xtex: $(LATEXXREFSFILE) -xrtf: $(RTFXREFSFILE) - -# Create the documentation files for the various formats. -html: $(HTMLDOCS) $(PROJECT)_mi.html -tex: $(LATEXDOCS) $(PROJECT)_mi.tex -rtf: $(RTFDOCS) -ascii: $(ASCIIDOCS) - -# master index file, currently works only for html and latex documentation. -$(PROJECT)_mi.html: $(HTMLXREFSFILE) - $(ROBODOC) $< $@ INDEX HTML TITLE "$(PROJECT) Master Index" - -$(PROJECT)_mi.tex: $(LATEXXREFSFILE) - $(ROBODOC) $< $@ INDEX LATEX TITLE "$(PROJECT) API Reference" - -# create xrefs file (file with the names of all .xref files). -$(HTMLXREFSFILE) : $(HTMLXREFS) - /bin/ls $(HTMLXREFS) > $@ -$(LATEXXREFSFILE) : $(LATEXXREFS) - /bin/ls $(LATEXXREFS) > $@ -$(RTFXREFSFILE) : $(RTFXREFS) - /bin/ls $(RTFXREFS) > $@ - -# Rule to create an .xref file from a source file for the various formats. -%.html.xref : % - $(ROBODOC) $< $(@:.xref=) $(ROBOOPTS) INTERNAL GENXREF $@ -%.tex.xref : % - $(ROBODOC) $< $(@:.xref=) $(ROBOOPTS) INTERNAL GENXREF $@ -%.rtf.xref : % - $(ROBODOC) $< $(@:.xref=) $(ROBOOPTS) INTERNAL GENXREF $@ - -# Rule to create html documentation from a source file. -%.html : % - $(ROBODOC) $< $@ HTML $(ROBOOPTS) XREF $(HTMLXREFSFILE) - -# Rule to create latex documentation from a source file. -# We do not include source items, and generate laxtex documents -# than can be included in a master document. -%.tex : % - $(ROBODOC) $< $@ LATEX $(ROBOOPTS) NOSOURCE SINGLEDOC XREF $(LATEXXREFSFILE) - -# Rule to create ascii documentation from a source file. -%.txt : % - $(ROBODOC) $< $@ ASCII - -# Rule to create rtf documentation from a source file. -%.rtf : % - $(ROBODOC) $< $@ RTF $(ROBOOPTS) XREF $(RTFXREFSFILE) - -# Use netscape to view the master index file for our project. -htmlview: html - netscape $(PROJECT)_mi.html - -# Use the latex programs to generate a .dvi from the master index file -# for our prokect. View this .dvi file with xdvi -texview: tex - latex $(PROJECT)_mi - makeindex $(PROJECT)_mi - latex $(PROJECT)_mi - latex $(PROJECT)_mi - xdvi $(PROJECT)_mi.dvi - -# Clean-up the mess we made -# -clean: - rm -f $(HTMLXREFS) - rm -f $(HTMLDOCS) - rm -f $(LATEXXREFS) - rm -f $(LATEXDOCS) - rm -f $(PROJECT)_mi.* *.aux - rm -f $(RTFXREFS) - rm -f $(RTFDOCS) - rm -f $(ASCIIDOCS) - rm -f $(HTMLXREFSFILE) - rm -f $(LATEXXREFSFILE) - rm -f $(RTFXREFSFILE) - diff --git a/util/robodoc/Docs/general.m4 b/util/robodoc/Docs/general.m4 deleted file mode 100644 index db7cba76..00000000 --- a/util/robodoc/Docs/general.m4 +++ /dev/null @@ -1,14 +0,0 @@ -m4_changecom(`/--*--', `--*--/')m4_dnl -m4_define(`www_docstart', `')m4_dnl -m4_define(`www_header', `$1')m4_dnl -m4_define(`www_link', `$2')m4_dnl -m4_define(`www_bodystart', `')m4_dnl -m4_define(`www_bodyend', `')m4_dnl -m4_define(`www_docend', `')m4_dnl -m4_define(`www_title', `

$1

')m4_dnl -m4_define(`www_sectionCounter',0)m4_dnl -m4_define(`www_subSectionCounter',0)m4_dnl -m4_define(`www_incrCounter',`m4_define(`$1',m4_incr($1))')m4_dnl -m4_define(`www_section', `www_incrCounter(`www_sectionCounter')

www_sectionCounter $2

m4_define(`www_subSectionCounter', 0)')m4_dnl -m4_define(`www_subSection', `www_incrCounter(`www_subSectionCounter')

www_sectionCounter.www_subSectionCounter $2

')m4_dnl - diff --git a/util/robodoc/Docs/main.css b/util/robodoc/Docs/main.css deleted file mode 100644 index 65d00437..00000000 --- a/util/robodoc/Docs/main.css +++ /dev/null @@ -1,106 +0,0 @@ -BODY { - margin-top: 1em; - margin-bottom: 1em; - margin-left: 2.5em; - margin-right: 2.5em; - font-family: sans-serif; -} - -#A:link { -# color: #00FF00; -#} -#A:visited { -# color: #003333; -#} -#A:active { -# color: #FF00FF; -#} - -p, form { - font-family:sans-serif; - font-size:12pt; -} - -#p { text-align: justify; } - -B, STRONG, I, EM, CITE, VAR, TT, CODE, KBD, SAMP, IMG -{ - display: inline; -} - -UL { - margin-top: 1em; - margin-bottom: 1em; - list-style-type: disc; - display: block; -} - -LI { - margin-bottom: 0.2em; -} - - -B, STRONG { - font-variant: small-caps; - font-weight: bold; -} - -I, CITE, EM, VAR, ADDRESS, BLOCKQUOTE { font-style: italic } - -PRE, TT, KBD, SAMP { font-family: monospace } - - -TABLE { - color: #000000; - background-color: #AAAAAA; -} - -TT { - white-space: pre; -} - -CODE { - font-family: monospace; - font-style:none; - white-space: pre; -} - -PRE { - white-space: pre; - margin-top: 0.5em; -} - -ADDRESS { - font-family: monospace; - font-size: 12pt; - text-align: left; - margin-bottom: 0.5em; -} - - - -H2, H3 { - margin-top: 0.5em; -} - -H1, H2, h3 { font-weight: bold } - -H1 { - font-family: sans-serif; - font-size:24pt; - text-align:right; - margin-right:36px; - margin-top: 0.5em; - margin-bottom: 0.5em; -} - -H2 { - font-family:sans-serif; - font-size:18pt; -} - -H3 { - font-family:sans-serif; - font-size:14pt; -} - diff --git a/util/robodoc/Docs/makefile.am b/util/robodoc/Docs/makefile.am deleted file mode 100644 index 7bed062d..00000000 --- a/util/robodoc/Docs/makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -## Process this file with automake to produce Makefile.in - -man_MANS = robodoc.1 -MAINTAINERCLEANFILES = robodoc.html stoc.html stoc.m4 - -docdir = $(prefix)/doc/$(PACKAGE)-$(VERSION) -doc_DATA = main.css robodoc.html - -# -# End of automake -# - -# -# Create the documentation in HTML format -# - -M4=/usr/bin/m4 - -myclean: - rm -f *~ stoc.html stoc.m4 robodoc.html - rm -f makefile.in makefile - -robodoc.html: robodoc.m4 stoc.html - $(M4) -P -DVERSION=$(VERSION) $< > $@ -stoc.html: stoc.m4 tocgen.m4 - $(M4) -P $< > $@ -stoc.m4: robodoc.m4 - echo "m4_include(tocgen.m4)m4_dnl" > $@ - egrep "(www).*(ection)" $< >> $@ - diff --git a/util/robodoc/Docs/makefile.in b/util/robodoc/Docs/makefile.in deleted file mode 100644 index 6c71fb15..00000000 --- a/util/robodoc/Docs/makefile.in +++ /dev/null @@ -1,260 +0,0 @@ -# makefile.in generated automatically by automake 1.4 from makefile.am - -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = .. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -CC = @CC@ -MAKEINFO = @MAKEINFO@ -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ - -man_MANS = robodoc.1 -MAINTAINERCLEANFILES = robodoc.html stoc.html stoc.m4 - -docdir = $(prefix)/doc/$(PACKAGE)-$(VERSION) -doc_DATA = main.css robodoc.html - -# -# End of automake -# - -# -# Create the documentation in HTML format -# - -M4 = /usr/bin/m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = ../Source/config.h -CONFIG_CLEAN_FILES = -man1dir = $(mandir)/man1 -MANS = $(man_MANS) - -NROFF = nroff -DATA = $(doc_DATA) - -DIST_COMMON = makefile.am makefile.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = gtar -GZIP_ENV = --best -all: all-redirect -.SUFFIXES: -$(srcdir)/makefile.in: makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Docs/makefile - -makefile: $(srcdir)/makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - - -install-man1: - $(mkinstalldirs) $(DESTDIR)$(man1dir) - @list='$(man1_MANS)'; \ - l2='$(man_MANS)'; for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ - done - -uninstall-man1: - @list='$(man1_MANS)'; \ - l2='$(man_MANS)'; for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ - rm -f $(DESTDIR)$(man1dir)/$$inst; \ - done -install-man: $(MANS) - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-man1 -uninstall-man: - @$(NORMAL_UNINSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 - -install-docDATA: $(doc_DATA) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(docdir) - @list='$(doc_DATA)'; for p in $$list; do \ - if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(docdir)/$$p"; \ - $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(docdir)/$$p; \ - else if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/$$p"; \ - $(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/$$p; \ - fi; fi; \ - done - -uninstall-docDATA: - @$(NORMAL_UNINSTALL) - list='$(doc_DATA)'; for p in $$list; do \ - rm -f $(DESTDIR)$(docdir)/$$p; \ - done -tags: TAGS -TAGS: - - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - -subdir = Docs - -distdir: $(DISTFILES) - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ - else \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done -info-am: -info: info-am -dvi-am: -dvi: dvi-am -check-am: all-am -check: check-am -installcheck-am: -installcheck: installcheck-am -install-exec-am: -install-exec: install-exec-am - -install-data-am: install-man install-docDATA -install-data: install-data-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am -uninstall-am: uninstall-man uninstall-docDATA -uninstall: uninstall-am -all-am: makefile $(MANS) $(DATA) -all-redirect: all-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: - $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(docdir) - - -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -maintainer-clean-generic: - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -mostlyclean-am: mostlyclean-generic - -mostlyclean: mostlyclean-am - -clean-am: clean-generic mostlyclean-am - -clean: clean-am - -distclean-am: distclean-generic clean-am - -distclean: distclean-am - -maintainer-clean-am: maintainer-clean-generic distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -maintainer-clean: maintainer-clean-am - -.PHONY: install-man1 uninstall-man1 install-man uninstall-man \ -uninstall-docDATA install-docDATA tags distdir info-am info dvi-am dvi \ -check check-am installcheck-am installcheck install-exec-am \ -install-exec install-data-am install-data install-am install \ -uninstall-am uninstall all-redirect all-am all installdirs \ -mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean - - -myclean: - rm -f *~ stoc.html stoc.m4 robodoc.html - rm -f makefile.in makefile - -robodoc.html: robodoc.m4 stoc.html - $(M4) -P -DVERSION=$(VERSION) $< > $@ -stoc.html: stoc.m4 tocgen.m4 - $(M4) -P $< > $@ -stoc.m4: robodoc.m4 - echo "m4_include(tocgen.m4)m4_dnl" > $@ - egrep "(www).*(ection)" $< >> $@ - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/util/robodoc/Docs/robodoc.1 b/util/robodoc/Docs/robodoc.1 deleted file mode 100644 index d8814ec8..00000000 --- a/util/robodoc/Docs/robodoc.1 +++ /dev/null @@ -1,246 +0,0 @@ -.de EX \"Begin example -.ne 5 -.if n .sp 1 -.if t .sp .5 -.nf -.in +.5i -.. -.de EE -.fi -.in -.5i -.if n .sp 1 -.if t .sp .5 -.. - -.TH ROBODoc 1 "V3.2.1 June 1999" - -.SH NAME - -ROBODoc - Extract documentation from source code. - -.SH SYNOPSIS -.B robodoc -.I source-file -.I documentation-file -.B [options] - -.SH DESCRIPTION - -ROBODoc extracts specially formated documentation from the source code. -It allows you to maintain a program and its documentation in a single -file. - -.SH OPTIONS - -.IP ASCII -Generate documentation in ASCII format. - -.IP -c -Show warranty and copyright statement. - -.IP C -Use ANSI C grammar in source items (experimental, HTML only). - -.IP FOLD -Enable folding if HTML output is selected (experimental). - -.IP "GENXREF xreffile" -Generate a xreffile. - -.IP GUIDE -Generate documentation in Amiga Guide format. - -.IP HTML -Generate documentation in HTML format. - -.IP INDEX -Create a master index file. In this case call robodoc as -robodoc INDEX - -.IP INTERNAL -Also include headers that are marked internal. - -.IP INTERNALONLY -Only extract the headers that are marked internal (that start with ****i*). - -.IP NOSOURCE -Do not include the source items in the documentation. - -.IP LATEX -Generate documentation in LaTeX format. - -.IP RTF -Generate documentation in RTF format. - -.IP SINGLEDOC -Do not create a document header and footer when creating -documentation in LaTeX format. This allows you to include -the generated documents into big document or -master index file. - -.IP SORT -Sort the headers alphabetically. - -.IP "TABSIZE " -Convert each tab into n spaces. - -.IP TITLE -Sets the title that is used for the master index file. - -.IP TOC -Generate a table of contents. Is only useful when you select ASCII as -output mode. With all other output modes the Table of contents is -generated anyway. - -.IP -v -Verbose mode, robodoc tells what it is doing. - -.IP "XREF " -Use the all xref files listed in the file xrefsfile to make -cross links between documents. - -The following abbreviations are also allowed: -s SORT, -t TOC, -x -XREF, -g GENXREF, -i INTERNAL, -io INTERNALONLY, -ts TABSIZE. - -.SH "ITEM NAMES SUPPORTED" - -.IP NAME -Item's name followed by --, then a short description. - -.IP COPYRIGHT -Who own the copyright. - -.IP "SYNOPSIS, USAGE" -How to use it. - -.IP "FUNCTION, DESCRIPTION, PURPOSE" -What does it do. - -.IP AUTHOR -Who wrote it. - -.IP "CREATION DATE" -When did the work start. - -.IP "MODIFICATION HISTORY, HISTORY" -Who has done which changes and when. - -.IP "INPUTS, ARGUMENTS, OPTIONS, PARAMETERS, SWITCHES" -What can we feed into it. - -.IP "OUTPUT, SIDE EFFECTS" -What output is made. - -.IP "RESULT, RETURN VALUE" -What do we get returned. - -.IP "EXAMPLE" -A clear example of the items use. - -.IP "NOTES" -Any annotations. - -.IP "DIAGNOSTICS" -Diagnostical output. - -.IP "WARNINGS, ERRORS" -Warning & error-messages. - -.IP BUGS -Known bugs. - -.IP "TODO, IDEAS" -What to implement next & ideas. - -.IP PORTABILITY -Where does it come from, where will it work. - -.IP "SEE ALSO" -References to other functions, man pages, other documentation. - -.IP "METHODS, NEW METHODS" -OOP methods. - -.IP "ATTRIBUTES, NEW ATTRIBUTES" -OOP attributes, could also be used for structures. - -.IP TAGS -Tagitem description. - -.IP COMMANDS -Command description. - -.IP "DERIVED FROM" -OOP super class. - -.IP "DERIVED BY" -OOP sub class. - -.IP "USES, CHILDREN" -What modules are used by this one. - -.IP "USED BY, PARENTS" -Which modules use this one. - -.IP SOURCE -Source code inclusion. - -.SH "HEADER TYPES SUPPORTED" - -.IP h -Header that describes the project. - - -.IP f -Header for a function. - -.IP s -Header for a structure. - -.IP c -Header for a class. - -.IP m -Header for a method. - -.IP v -Header for a variable - -.IP d -Header for a constant (from define). - -.IP i -Internal header. - -.IP * -Generic header, for everything else. - -.SH EXAMPLES - -A simple example, you have one tcl source file and want to extract -the documentation. - -.EX -robodoc wopr.tcl wopr.tcl.html HTML SORT -.EE - -Assume you have a program divided in two source files, gluify.c and -gluify.h. To generate the documentation for this program, complete -with cross links, you would use: - -.EX -echo "gluify.c.xref" > gluify.xrefs -echo "gluify.h.xref" >> gluify.xrefs -robodoc gluify.c gluify.c.html HTML GENXREF gluify.c.xref -robodoc gluify.h gluify.h.html HTML GENXREF gluify.h.xref -robodoc gluify.c gluify.c.html HTML XREF gluify.xrefs -robodoc gluify.h gluify.h.html HTML XREF gluify.xrefs -.EE - -.SH SEE ALSO - -The documentation in HTML format that comes with ROBODoc. Latest -version can be found on http://www.xs4all.nl/~rfsber/Robo/ or on -http://freshmeat.net/ - - diff --git a/util/robodoc/Docs/robodoc.html b/util/robodoc/Docs/robodoc.html deleted file mode 100644 index 16a17dd6..00000000 --- a/util/robodoc/Docs/robodoc.html +++ /dev/null @@ -1,1320 +0,0 @@ - - -ROBODoc Manual - -

ROBODoc 3.2.3 Manual

- -

Updated July 2000

- -

ROBODoc is a documentation tool for C, C++, Java, Assembler, Basic, -Fortran, LaTeX, Postscript, Tcl/Tk, LISP, Forth, Perl, Shell -Scripts, Occam, COBOL, HTML and many other languages. Additional -languages can be supported by a few modifications to the source -code.

- -

Copyright (C) 1994-2000 Frans Slothouber and Jacco van Weert.

- -

This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of -the License, or (at your option) any later version.

- -

This program is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied -warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU General Public License for more details.

- -

You should have received a copy of the GNU General Public -License along with this program; if not, write to the Free -Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -02111-1307 USA

- - - -

1 Credits

- -
    - -
  • Original program and idea: Jacco van Weert
  • - -
  • Versions 2.0 and up: Frans Slothouber, Petteri Kettunen, - Bernd Koesling, Anthon Pang, Thomas Aglassinger, - and Stefan Kost, Guillaume Etorre, Simo Muinonen, - Petter Reinholdtsen. -
  • - -
  • Maintainer: Frans Slothouber (fslothouber@acm.org), - The Netherlands.
  • - -
- - -

2 Table of Contents

- -01......... Credits
-02......... Table of Contents
-03......... Introduction
-04......... Hardware and software requirements
-05......... Goals and Limitations
-06......... How to Format Your Code for use with ROBODoc
-06.01.......... Header Names
-06.02.......... Header Types
-06.03.......... Begin Marker
-06.04.......... Remark Marker
-06.05.......... End Marker
-06.06.......... Header Items
-06.07.......... Item Name Limitations
-06.08.......... Source Item
-07......... Creating Cross Links
-07.01.......... Limitations
-08......... Master Index File
-08.01.......... examples
-09......... Automation with make
-10......... What to do if You have Sources in Multiple Directories
-11......... The ROBODoc Defaults File
-12......... ROBODoc Command Line Options
-13......... Adding New Languages
-14......... Suggestions and Bugs
- - - - -

3 Introduction

- -

ROBODoc is based on the AutoDocs program written some time ago -by Commodore. The idea is to include for every function a -standard header containing all sorts of information about that -procedure/function. An AutoDocs program extracts these headers -from the source file and puts them in an autodocs file. This -allows you to include the program documentation in the source -code and makes it unnecessary to maintain two documents.

- - -

ROBODoc is such a program, however ROBODoc has several -additions. For one it can generate the documentation in -different formats, ASCII, HTML, RTF, LaTeX, and AmigaGuide. -Another feature is that it automatically creates links within the -document, and to other documents. It is also possible to include -parts of the source in you documentation, complete with links. -For instance it is possible to include the complete source code -of a function, and have the function names in the source point to -their documentation. Besides documenting functions, you can also -document classes, methods, structures, variables, and -constants.

- - -

If you never have used AutoDoc or ROBODoc before you might -take a look at the example in the Source/. Run the -command:

- -
-  make xhtml
-  make example
-
- - -

This creates the ROBODoc -documentation for the -ROBODoc program itself and then starts netscape to view the -documentation. Also have a look at the source files, they -illustrates the use of headers.

- -

ROBODoc can generate documentation in five different -formats:

- -
    -
  • HTML format complete with hyperlinks and mark-ups.
  • - -
  • LaTeX, based on D. Knuth excellent typesetting system.
  • - -
  • Plain ASCII text file, this file is very close to what the - original AutoDocs program would generate.
  • - -
  • RTF, Rich Text Format, mostly used on Windows machines - before WWW revolution.
  • - -
  • AmigaGuide format, it is the Amiga computer's equivalent - HTML. The AmigaGuide program is necessary to view the - resulting autodocs-file. (This was the preferred format when the - program was written in 1994.)
  • - -
- - -

4 Hardware and software requirements

- -

ROBODoc was developed in 1994 on a standard Amiga 1200, a -system with a 20MHz 68020 processor and 2 Mbyte of RAM. It should -therefore be no problem to run it on any of the currently -available systems :) The complete source code consists of a -series of file that can be found in the Source -directory. It is written according (hopefully) to the ANSI C -standard and uses no special functions, so it should run on every -system with an ANSI C-compiler.

- - -

5 Goals and Limitations

- -

ROBODoc is intended for small to medium sized projects -that have a relatively flat structure and especially projects -that use a mix of different programming languages.

- -

-ROBODoc was designed to be easy to use and to work with a lot of -different programming languages. It has no knowledge of the -syntax of a programming languages. It just some knowledge about -how remarks start and end in some programming languages. This -means that you sometimes have to do a little more work compared -to other tools that have detailed knowledge of the syntax of a -particular language. They can use that knowledge to figure out -some of the information automatically. This usually also means -that they work only with one or two languages. -

- -

ROBODoc operates on one file at a time. It has no mechanism to -process whole sets of source files. Makefiles should be used for -this. How to do this is explained in this document with various -example makefiles. Have a look at them. -

- -

ROBODoc can work with projects where the source code is located -in different subdirectories. However the generated documentation is -expected to go into one single directory.

- - -

6 How to Format Your Code for use with ROBODoc

- -

ROBODoc allows you to mix the program documentation with the -source code. It does require though that this documentation has -a particular layout so ROBODoc can recognize it. The following -header was taken from the original ROBODoc program (many versions -back).

- - - - - -
-
-           ------------------------------- Header Name
-          /                          \
-  /****f* financial.library/StealMoney  <---- Begin Marker
-  *    ^------- Header Type
-  *
-  *  <---- Remark Marker
-  *  NAME
-  *    StealMoney -- Steal money from the Federal Reserve Bank. (V77)
-  *  SYNOPSIS  <---- Item Name
-  *    error = StealMoney( userName,amount,destAccount,falseTrail )
-  *    D0,Z                D0       D1.W    A0         [A1]
-  *
-  *    BYTE StealMoney
-  *         ( STRPTR,UWORD,struct AccountSpec *,struct falseTrail *);
-  *  FUNCTION
-  *    Transfer money from the Federal Reserve Bank into the
-  *    specified interest-earning checking account.  No records of
-  *    the transaction will be retained.
-  *  INPUTS
-  *    userName    - name to make the transaction under.  Popular
-  *                  favorites include "Ronald Reagan" and
-  *                  "Mohamar Quadaffi".
-  *    amount      - Number of dollars to transfer (in thousands).
-  *    destAccount - A filled-in AccountSpec structure detailing the
-  *                  destination account (see financial/accounts.h).
-  *                  If NULL, a second Great Depression will be
-  *                  triggered.
-  *    falseTrail  - If the DA_FALSETRAIL bit is set in the
-  *                  destAccount, a falseTrail structure must be
-  *                  provided.
-  *  RESULT
-  *    error - zero for success, else an error code is returned
-  *           (see financial/errors.h).  The Z condition code
-  *           is guaranteed.
-  *  EXAMPLE
-  *    Federal regulations prohibit a demonstration of this function.
-  *  NOTES
-  *    Do not run on Tuesdays!
-  *  BUGS
-  *    Before V88, this function would occasionally print the
-  *    address and home phone number of the caller on local police
-  *    976 terminals.  We are confident that this problem has been
-  *    resolved.
-  *  SEE ALSO
-  *    CreateAccountSpec(),security.device/SCMD_DESTROY_EVIDENCE,
-  *    financial/misc.h
-  *
-  ******  <---- End Marker
-  *
-  * You can use this space for remarks that should not be included
-  * in the documentation.
-  *
-  */
-
-
- -

You would place this headers in front of functions, classes, -methods, structure definitions, or any of the major components in -your program. The header itself contains a number of items that -provide structured information about the component.

- -

There are a number of special markers in a header (indicated -in red above). There are two special markers that mark the begin -and end of a header. Each line in a header should start with a -remark marker. The starts of each item is marked by an Item Name -(in all capitals).

- - -

6.1 Header Names

- -

ROBODoc makes some assumptions about the structure a project. -It assumes that a project consists of a number of modules, and -that each module consists of a number of components. These -components can be anything that you care to document; functions, -variables, structures, classes, methods etc.

- -

Projects, modules, and components all have names. The names -allow ROBODoc to structure the documentation and create -cross-links. Names are defined in the header name. It is either -of the form <project name>/<module name> -for a module header, or of the form <module -name>/<component name> for all other headers.

- -

6.2 Header Types

- -

You can provide ROBODoc with some additional information -by specifying the header type. The header type tells ROBODoc -what kind of component you are documenting. This information -allows ROBODoc to create more useful index tables.

- -

The type is identified by a single character, as listed in the -following table

- - - - - - - - - - - -
hHeader for a module in a project.
fHeader for a function.
sHeader for a structure.
cHeader for a class.
mHeader for a method.
vHeader for a variable.
dHeader for a constant -(from define).
*Generic header for every thing else.
iInternal header.
- -

Internal headers are special. They can be used to hide certain -headers. They are only extracted if requested. You could use to -document internal functions that you do now want clients to -see.

- - -

6.3 Begin Marker

- -

The beginning of a header is marked with a special marker. -The above header is intended for a program in C. In other -programming languages the marker looks slightly different, since -each language has its own convention for starting remarks. -ROBODoc recognizes the following begin markers:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"/****" - C, C++
"//****"C++
";****"Assembler
"****"Assembler
"{****"Pascal
"REM ****"Basic (Rem, rem, or even rEM also works)
"C ****"Fortran (c **** also works)
"%****"LaTeX, TeX, Postscript.
"#****"Tcl/Tk, Perl, makefiles, gnuplot etc.
"(****"Pascal, Modula-2, LISP
"--****"Occam
"<!--****"HTML
"<!---****"HTML
"|****"GNU Assembler
"!!****"Fortran 90
- -

After these initial four asterisks, there is the character to -identify the kind of header, then another asterisks, and then -header name. After this you can specify a version number -surrounded by "[]". The version number is stored but not used for -anything at the moment. All characters after that are -ignored.

- -

This might sound terribly complicated, it is not. Here are -some examples:

- -

A header for a module called analyser in a project called ChessMaster -for C, is has version number 1.0

-
-  /****h* ChessMaster/analyser [1.0] *
-
- -

In Assembler, a function header, for the function init() in the - module finance.library:

-
-  ****f* finance.library/init *
-
- -

In C++, a class header for class Puppet, for the module puppetmaster, -version v2.12

-
-  /****c* puppetMaster/Puppet [v2.12] ******
-
- -

For the same class a method called Puppet::Talk

-
-  /****m* puppetMaster/Puppet::Talk [v2.12] ******
-
- -

A project header, in Fortran

-
-  C     ****h* ChessMaster/analyser              C
-
- -

In Basic

-
-  REM ****h* ChessMaster/analyser
-
- - - -

6.4 Remark Marker

- -

Each line in the body of a header should start with a remark -marker. This marker is stripped from the line and the remaining -part is used to generated the documentation. The following -markers are recognized by ROBODoc.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"*"C, C++, Pascal, Modula-2
"//"C++
" *"C, C++, M68K assembler, Pascal, Modula-2, HTML
";*"M68K assembler
";"M68K assembler
"C "Fortran
"REM "BASIC
"%"LaTeX, TeX, Postscript
"#"Tcl/Tk, shell scripts, makefiles
" *"COBOL
"--"Occam
"|"GNU Assembler
"!!"Fortan 90
- - - - -

6.5 End Marker

- -

A header ends with an end marker. An end marker is a remark -marker followed by three asterisks. ROBODoc recognizes following -strings as end markers:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"/***" C, C++
"//***" C++
" ****" C, C++, Pascal, Modula-2
"{***" Pascal
"(***" Pascal, Modula-2, B52 LISP
";***" M68K assembler
"****" M68K assembler
"C ***" Fortran
"REM ***" BASIC
"%***" LaTeX, TeX, Postscript
"#***" Tcl/Tk, Perl, Makefiles, Shell scripts
" ****" COBOL
"--***" Occam
"<!--***" HTML
"<!---***" HTML
"|***"GNU Assembler
"!!***"Fortan 90
- - - - -

6.6 Header Items

- -

When ROBODoc has found a header it will try to identify the -items in this header. It does this by looking for the item name. The following -item names are currently supported:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NAME Item name plus a short description.
COPYRIGHT Who own the copyright : "(c) <year>-<year> by - <company/person>"
SYNOPSIS, USAGE How to use it.
FUNCTION, DESCRIPTION, PURPOSE What does it do.
AUTHOR Who wrote it.
CREATION DATE When did the work start.
MODIFICATION HISTORY, HISTORY Who has done which changes and when.
INPUTS, ARGUMENTS, OPTIONS, PARAMETERS, SWITCHES What can we feed into it.
OUTPUT, SIDE EFFECTS What output is made.
RESULT, RETURN VALUE What do we get returned.
EXAMPLE A clear example of the items use.
NOTES Any annotations
DIAGNOSTICS Diagnostical output
WARNINGS, ERRORS Warning & error-messages.
BUGS Known bugs.
TODO, IDEAS What to implement next & ideas.
PORTABILITY Where does it come from, where will it work.
SEE ALSO References to other functions, man pages, other documentation.
METHODS, NEW METHODS OOP methods.
ATTRIBUTES, NEW ATTRIBUTES OOP attributes
TAGS Tag-item description.
COMMANDS Command description.
DERIVED FROM OOP super class.
DERIVED BY OOP sub class.
USES, CHILDREN What modules are used by this one.
USED BY, PARENTS Which modules do use this one.
SOURCE Source code inclusion.
- -

ROBODoc does this so that it can format each item with a -different style (colour, font, etc.) if the user want it. These -can be specified in the robodoc.defaults file, see the next -section more information.

- - -

6.7 Item Name Limitations

- -

If you happen to have a function which name is in all uppercase, -this sometimes conflicts with where ROBODoc thinks an item name -starts and where the item body starts. -Bernhard Roessmann suggest the following workaround: -Example header producing this error:

-
-/***** basic.c/RETURN
-* NAME
-*  RETURN : Return from subroutine
-* SYNOPSIS
-*  RETURN
-* FUNCTION
-*  Return from subroutine
-******/
-
-

Here the item name "FUNCTION" will be interpreted as ordinary text, -not as an item name. Workaround: Add an empty line:

-
-/***** basic.c/RETURN
-* NAME
-*  RETURN : Return from subroutine
-* SYNOPSIS
-*  RETURN
-*
-* FUNCTION
-*  Return from subroutine
-******/
-
- - - -

6.8 Source Item

- -

The source item allows you to include part of the source in -the documentation as is demonstrated by the following -example.

- -
-/****f* Robodoc/RB_Panic [2.0d]
- * NAME
- *   RB_Panic -- Shout panic, free resources, and shut down.
- * SYNOPSIS
- *   RB_Panic (cause, add_info)
- *   RB_Panic (char *, char *)
- * FUNCTION
- *   Prints an error message.
- *   Frees all resources used by robodoc.
- *   Terminates program.
- * INPUTS
- *   cause    - pointer to a string which describes the
- *              cause of the error.
- *   add_info - pointer to a string with additional information.
- * SEE ALSO
- *   RB_Close_The_Shop ()
- * SOURCE
- */
-
-  void RB_Panic (char *cause, char *add_info)
-  {
-    printf ("Robodoc: Error, %s\n",cause) ;
-    printf ("         %s\n", add_info) ;
-    printf ("Robodoc: Panic Fatal error, closing down...\n") ;
-    RB_Close_The_Shop () ; /* Free All Resources */
-    exit(100) ;
-  }
-
-/*******/
-
-
- -

This would create the following documentation

- -
-NAME -
   RB_Panic -- Shout panic, free resources, and shut down.
-
SYNOPSIS -
   RB_Panic (cause, add_info)
-   RB_Panic (char *, char *)
-
FUNCTION -
   Prints an error message.
-   Frees all resources used by robodoc.
-   Terminates program.
-
INPUTS -
   cause    - pointer to a string which describes the
-              cause of the error.
-   add_info - pointer to a string with additional information.
-
SEE ALSO -
   RB_Close_The_Shop ()
-
SOURCE -
      void RB_Panic (char *cause, char *add_info)
-      {
-        printf ("Robodoc: Error, %s\n",cause) ;
-        printf ("         %s\n", add_info) ;
-        printf ("Robodoc: Panic Fatal error, closing down...\n") ;
-        RB_Close_The_Shop () ; /* Free All Resources */
-        exit(100) ;
-      }    
-
- - - - -

7 Creating Cross Links

- -

Creating hyper links within a document and across documents -is the most interesting feature of ROBODoc. A document with such -links is much more easier to read. If your source code consists -of just one file, creating links is easy. Just tell ROBODoc that -you want to have the output in HTML or AmigaGuide format, and it -will automatically generate the links. That is, at the beginning -of the document it will create a table of contents that consists -of links to all your function headers.

- -

ROBODoc will also search the complete text of you -documentation for reference to function names, and it will create -a link to the documentation of that function.

- -

In most cases, however, your source code does not consists of -a single file. It is also possible, however, to create links to -other files. This does require the use of some additional files, -called xref files. These files can be generated with ROBODoc. -These files contain information about in which file and where in -the file references can be found.

- -

Lets assume your project is split up in five different source -files, and you want to generate links between these five files. -What you have to do to accomplish this is to create a xref file -for each of those five files.

- -

With the GENXREF option ROBODoc will generate such a xref file -from the a source-file. When you use this option, only the xref -file is created not the autodocs-file, however you still have to -specify the name of the autodocs file because this name is needed -for the creation of the xref file.

- -

When all xref files are created you are ready to create the -documentation. To do so you use ROBODOC with the XREF option. It -needs a parameter which is the name of the file in which the -names of all xref files are defined. Notice: this is a file with -file names, it has to be created it by hand.

- -

An example will make things more clear. In the ROBODoc -archive, under examples/C there are two source files -prog1.c and -prog2.c. We can create -documentation with hyper links from these two files as follows: -

- -

First create the xref files:

- - - - - -
-
-  robodoc prog1.c prog1.c.html GENXREF prog1.c.xref HTML INTERNAL
-  robodoc prog2.c prog2.c.html GENXREF prog2.c.xref HTML INTERNAL
-
-
- -

Now there are two xref files: prog1.c.xref and prog2.c.xref. -Note that ROBODoc did not create any HTML files, just the xref -files. The name prog1.c.html is needed to create the correct xref -files. For prog1.c internal headers were also included.

- -

Now create a file with the xref file names. This file will -hold only two lines. You can give it any name, say -xref_files.

- - - - -
-
-  echo prog1.c.xref >  xref_files 
-  echo prog2.c.xref >> xref_files
-
-
-

Now generate the final documentation:

- - - - -
-
-  robodoc prog1.c prog1.c.html XREF xref_files HTML INTERNAL
-  robodoc prog2.c prog2.c.html XREF xref_files HTML INTERNAL
-
-
- -

Have a look the the documentation generated:

-
    -
  1. prog1.c.html
  2. -
  3. prog2.c.html
  4. -
- - - -

7.1 Limitations

- -

ROBODoc knows very little about the grammar of programming -languages. Links are created by looking up words in a table. -This means that it sometimes creates links where there should be -none. For instance if you have a function called usage(); every -time you use the word usage in any of your documentation a link -will show up. It also means that sometimes is does not create -links where you would like it to create a link. Say you include -the source code of a method using the source item. Your method -uses other methods of the class. You would like to have links -pointing to the documentation of these methods each time you use -one. They will not appear though. Since to ROBODoc stores the -whole name of a method, ie, someClass::MethodName. In -the method source you will use just MethodName().

- - - -

8 Master Index File

- -

If your project consists of many source files you might want -to create a master index file.

- -

For HTML output this file contains links to the documentation -generated from each of your source files as well as a list of all -"objects" that you documented. All "objects" are listed according -to header type, using the following order: Projects, Classes, -Methods, Stuctures, Functions, Variables, Constants, Generic, -Internal.

- -

For LaTeX output this file is one big document that contains -the documentation generated from all your source files. It also -includes a table of contents and an index section. This index -lists the page number of the page a function's documentation. -

- -

This index file is generated based on the information found in -your xrefs file. That is the file with the names of all your xref -files. So before you can create the master index file you have to -create all your xref files.

- -

To generate a master index file use:

-
-   robodoc <xrefs file> <master index file> INDEX HTML TITLE "Master Index"
-
-

or

-
-   robodoc <xrefs file> <master index file> INDEX LATEX TITLE "ROBODoc API Documentation"
-
-

The master index file can currently only be generated in HTML or LaTeX.

- -

If you use if for LaTeX documentation you need to use the option -SINGLEDOC when you generate the documentation from your various -source files. This ensures that no document preambles are generated. -The master index file contains command that includes all your documentation -files and make it into one single document.

- - -

8.1 examples

- -

Here are some examples of master index files

- - - - -

9 Automation with make

- -

The whole process of creating documentation with ROBODoc is of -course best automated with make. -Have a look at the following makefile.

- -
-SHELL = /bin/sh
-.SUFFIXES:
-
-ROBODOC=robodoc
-ROBOOPTS=C SORT 
-
-# Your source files.
-#
-SOURCES=analyser.c generator.c items.c util.c \
-  folds.c headers.c links.c robodoc.c \
-  analyser.h generator.h items.h util.h \
-  folds.h headers.h links.h robodoc.h
-
-# The name of your Project
-#
-PROJECT=robodoc
-
-# The various documentation files, derived from the source files.
-# HTML
-#
-HTMLDOCS=$(SOURCES:=.html)
-HTMLXREFS=$(HTMLDOCS:.html=.html.xref)
-HTMLXREFSFILE=$(PROJECT)_html.xrefs
-# LATEX
-#
-LATEXDOCS=$(SOURCES:=.tex)
-LATEXXREFS=$(LATEXDOCS:.tex=.tex.xref)
-LATEXXREFSFILE=$(PROJECT)_tex.xrefs
-# ASCII
-#
-ASCIIDOCS=$(SOURCES:=.txt)
-# RTF
-#
-RTFDOCS=$(SOURCES:=.rtf)
-RTFXREFS=$(RTFDOCS:.rtf=.rtf.xref)
-RTFXREFSFILE=$(PROJECT)_rtf.xrefs
-
-# Some common targets
-xrefall: xrefhtml xreftex xrefrtf
-docall: html tex ascii rtf
-
-# Create the xref files for the various formats.
-xhtml: $(HTMLXREFSFILE) 
-xtex: $(LATEXXREFSFILE) 
-xrtf: $(RTFXREFSFILE)
-
-# Create the documentation files for the various formats.
-html: $(HTMLDOCS) $(PROJECT)_mi.html 
-tex: $(LATEXDOCS) $(PROJECT)_mi.tex
-rtf: $(RTFDOCS)
-ascii: $(ASCIIDOCS)
-
-# master index file, currently works only for html and latex documentation.
-# Note that you can define the title of the document.
-$(PROJECT)_mi.html: $(HTMLXREFSFILE) 
-	$(ROBODOC) $< $@ INDEX HTML TITLE "$(PROJECT) Master Index"
-
-$(PROJECT)_mi.tex: $(LATEXXREFSFILE)
-	$(ROBODOC) $< $@ INDEX LATEX TITLE "$(PROJECT) API Reference"
-
-# create xrefs file (file with the names of all .xref files).
-$(HTMLXREFSFILE) : $(HTMLXREFS)
-	/bin/ls $(HTMLXREFS) > $@
-$(LATEXXREFSFILE) : $(LATEXXREFS)
-	/bin/ls  $(LATEXXREFS) > $@
-$(RTFXREFSFILE) : $(RTFXREFS)
-	/bin/ls  $(RTFXREFS) > $@
-
-# Rule to create an .xref file from a source file for the various formats.
-%.html.xref : %
-	$(ROBODOC) $< $(@:.xref=) $(ROBOOPTS) INTERNAL GENXREF $@
-%.tex.xref : %
-	$(ROBODOC) $< $(@:.xref=) $(ROBOOPTS) INTERNAL GENXREF $@
-%.rtf.xref : %
-	$(ROBODOC) $< $(@:.xref=) $(ROBOOPTS) INTERNAL GENXREF $@
-
-# Rule to create html documentation from a source file.
-%.html : %
-	$(ROBODOC) $< $@ HTML $(ROBOOPTS) XREF $(HTMLXREFSFILE)
-
-# Rule to create latex documentation from a source file.
-# We do not include source items, and generate laxtex documents
-# than can be included in a master document.
-%.tex : %
-	$(ROBODOC) $< $@ LATEX $(ROBOOPTS) NOSOURCE SINGLEDOC XREF $(LATEXXREFSFILE)
-
-# Rule to create ascii documentation from a source file.
-%.txt : %
-	$(ROBODOC) $< $@ ASCII 
-
-# Rule to create rtf documentation from a source file.
-%.rtf : %
-	$(ROBODOC) $< $@ RTF $(ROBOOPTS) XREF $(RTFXREFSFILE)
-
-# Use netscape to view the master index file for our project.
-htmlview: html
-	netscape $(PROJECT)_mi.html
-
-# Use the latex programs to generate a .dvi from the master index file
-# for our prokect. View this .dvi file with xdvi
-texview:  tex
-	latex $(PROJECT)_mi
-	makeindex $(PROJECT)_mi
-	latex $(PROJECT)_mi
-	latex $(PROJECT)_mi
-	xdvi  $(PROJECT)_mi.dvi
-
-# Clean-up the mess we made
-#
-clean:
-	rm -f $(HTMLXREFS) 
-	rm -f $(HTMLDOCS) 
-	rm -f $(LATEXXREFS)
-	rm -f $(LATEXDOCS) 
-	rm -f $(PROJECT)_mi.* *.aux
-	rm -f $(RTFXREFS)
-	rm -f $(RTFDOCS)
-	rm -f $(ASCIIDOCS)
-	rm -f $(HTMLXREFSFILE) 
-	rm -f $(LATEXXREFSFILE) 
-	rm -f $(RTFXREFSFILE)
-
- -

It includes all the necessary commands to generate and view the documentation for you project. You create documentation in any of the four formats. -For instance to create documentation in html format use:

-
-  make xhtml
-  make html
-
-

To make documentation in LaTeX format use:

-
-  make xtex
-  make tex
-
-

To view your documentation use:

-
-  make xhtml
-  make texview
-
-

or

-
-  make xtex
-  make texview
-
- - -

To clean up all the documentation files use:

-
-  make clean
-
- -

To use this make file in project set the variable -SOURCE to the names of your source files and set the -variable PROJECT to the name of your project.

- -

You can find a copy of the above makefile -Docs/example_makefile. This should get you started in -no time.

- -

10 What to do if You have Sources in Multiple Directories

- -

It is possible to have your sources in multiple -subdirectories. However the generated documentation is expected -to be in one single directory. If not the cross references will -be wrong, at least in the HTML documentation.

- -

Say you have the following directory structure:

-
-  Project/
-     Dir1/
-        program1.c 
-     Dir2/
-        program2.c 
-
- -

You can create the documentation for that as follows (assuming -you are in Project): -

-
-  robodoc Dir1/prog1.c prog1.c.html HTML GENXREF Dir1/prog1.xref 
-  robodoc Dir2/prog2.c prog2.c.html HTML GENXREF Dir2/prog2.xref 
-  echo "Dir1/prog1.xref" > xreffiles 
-  echo "Dir2/prog2.xref" >> xreffiles 
-  robodoc Dir1/prog1.c prog1.c.html HTML XREF xreffiles 
-  robodoc Dir2/prog2.c prog2.c.html HTML XREF xreffiles 
-  robodoc xreffiles master_index.html INDEX HTML 
-
-

-This generates the following files: -

-
-   prog1.c.html
-   prog2.c.html
-   master_index.html
-
- - -

With some version of make (for instance the gnu version) you -can strip the directory part of a filename with $(notdir NAME) -How this can be used is shown in the following example -makefile. Here we have the sources for robodoc, the .c files are -in the directory Sources/ and .h files are in the -directory Headers/.

- -
-SHELL = /bin/sh
-.SUFFIXES:
-
-ROBODOC=./robodoc
-ROBOOPTS=C SORT 
-
-# Your source files.
-#
-SOURCES=Sources/analyser.c Sources/generator.c Sources/items.c Sources/util.c \
-  Sources/folds.c Sources/headers.c Sources/links.c Sources/robodoc.c \
-  Headers/analyser.h Headers/generator.h Headers/items.h Headers/util.h \
-  Headers/folds.h Headers/headers.h Headers/links.h Headers/robodoc.h
-
-# The name of your Project
-#
-PROJECT=ROBODoc
-
-# The various documentation files, derived from the source files.
-#
-HTMLDOCS=$(SOURCES:=.html)
-HTMLXREFS=$(HTMLDOCS:.html=.html.xref)
-HTMLXREFSFILE=$(PROJECT)_html.xrefs
-
-# Create the xref files for the various formats.
-xhtml: $(HTMLXREFSFILE) 
-
-# Create the documentation 
-html: $(HTMLDOCS) $(PROJECT)_mi.html 
-
-# Create master index file.
-$(PROJECT)_mi.html: $(HTMLXREFSFILE) 
-	$(ROBODOC) $< $@ INDEX HTML TITLE "$(PROJECT) Master Index"
-
-# Create the file with the names of all xref files.
-$(HTMLXREFSFILE) : $(HTMLXREFS)
-	/bin/ls $(HTMLXREFS) > $@
-
-# Rule to create an .xref file from a source file 
-%.html.xref : %
-	$(ROBODOC) $< $(notdir $(@:.xref=)) $(ROBOOPTS) INTERNAL GENXREF $@
-
-# Rule to create html documentation from a source file.
-%.html : %
-	$(ROBODOC) $< $(notdir ${@}) HTML $(ROBOOPTS) XREF $(HTMLXREFSFILE)
-
- - - -

11 The ROBODoc Defaults File

- -

The robodoc.default file can be used to change the appearance -of the documentation. For each item type you can define how the -corresponding text should be rendered. Each line in the default -file consists of two parts, the item type and the item -attributes. For instance

- -
-AUTHOR                    LARGE ITALICS BOLD UNDERLINE
-
- -

Specifies that the AUTHOR item has the attributes LARGE, -ITALICS, BOLD, and UNDERLINE. The effect of each attribute is -listed in the following table.

- - - - - - - - - - - - - - - - - - - - - - - -
Item AttributesEffect in HTML
LARGE<FONT SIZE=5>,</FONT>
SMALL<FONT SIZE=-1>,</FONT>
ITALICS<I>,</I>
BOLD<B>,</B>
UNDERLINE<U>,</U>
HIGHLIGHT<EM>,</EM>
- - -

12 ROBODoc Command Line Options

- -

When using ROBODoc you should provide at least two -parameters

- -
-  robodoc <source file> <documentation file> [options]
-
- -

Here sourcefile is the file with the program source from which -the documentation is to be extracted. The documentation file is -the file that will contain the extracted documentation.

- -

In case you are creating a master index file you have to -specify three parameters

-
-  robodoc <xrefs file> <master index file> INDEX [options]
-
- - -

In addition to this you can specify one or more of the -following options:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ASCIIGenerate documentation in ASCII format (default)
GUIDEGenerate documentation in AmigaGuide format.
HTMLGenerate documentation in HTML format.
LATEXGenerate documentation in LaTeX format. (Experimental)
RTFGenerate documentation in RTF format.
CUse ANSI C grammar in source items (test, HTML only)
FOLDEnable folding. (Experimental)
GENXREF <xref file>Generate a xref file, which can be used to create - cross links between documents.
XREF <xrefs file>Use a set of xref files to create references (links) to other - documents or within the document. <xrefs file> - is a file with xref file names.
INDEXCreate a master index file.
INTERNALAlso include headers that are marked internal.
INTERNALONLYOnly extract the headers marked internal.
NOSOURCEDo not include the source items in the documentation.
SORTSort the headers alphabetically.
SINGLEDOCDo not create a document header and footer when creating - documentation in LaTeX format. This allows you to include - the generated documents into big document or - master index file.
TITLE <title>Sets the title that is used for the - master index file.
TOCGenerate a table of contents. It is only useful when you select - ASCII as output mode. With all other output modes the - table of contents is generated anyway.
TABSIZE <n>Convert each tab into n spaces.
-vVerbose option, ROBODoc will tell you what it is doing.
- -

If you wonder why all the odd ALL CAPS flags are used instead -of for instance "-x"; this was how it was done on the Amiga.

- -

The following abbreviations are also allowed:

- - - - - - - - -
-s SORT
-t TOC
-x XREF
-g GENXREF
-i INTERNAL
-ioINTERNALONLY
-tsTABSIZE
- - -

13 Adding New Languages

- -

To add a new programming language to ROBODoc you have to edit -headers.c. Here you find three variables: -header_markers, remark_markers, and -end_markers. There are all arrays, and you have to add -an new entry to each of these three arrays.

- -

Say your programming language uses the following type of remarks:

-
-   $%% This is a remark with some text       
-       and some more and some more  %%$
-
- -

That is is starts with three spaces and then $%%, and -has to end with %%$. Then you would add to header_markers -

-
-   "   $%%****",
-
-

To remark_markers you would add

-
-   "   *",
-
-

And to end_markers you would add

-
-   "   $%%***",
-
-

You can then use the following kind of headers in your program:

-
-   $%%****f* Test/afunction ***** 
-   * NAME  
-   *   afunction
-   * FUNCTION
-   *   A test.
-   * SOURCE
-   *%%$
-     afunction(test,test) [
-       print hello world ;
-     ]
-   $%%***%%$
-
- - - - - -

14 Suggestions and Bugs

- -

If you find any bugs, catch them, put them in a jar, and send -them to:

-
fslothouber@acm.org
-

Suggestions are also welcome at this address. Flames can be -directed to the sun.

- - - - diff --git a/util/robodoc/Docs/robodoc.m4 b/util/robodoc/Docs/robodoc.m4 deleted file mode 100644 index b60b52ab..00000000 --- a/util/robodoc/Docs/robodoc.m4 +++ /dev/null @@ -1,1269 +0,0 @@ -m4_include(`general.m4')m4_dnl -www_docstart() -www_header(`ROBODoc Manual') -www_bodystart -www_title(`ROBODoc VERSION Manual') - -

Updated July 2000

- -

ROBODoc is a documentation tool for C, C++, Java, Assembler, Basic, -Fortran, LaTeX, Postscript, Tcl/Tk, LISP, Forth, Perl, Shell -Scripts, Occam, COBOL, HTML and many other languages. Additional -languages can be supported by a few modifications to the source -code.

- -

Copyright (C) 1994-2000 Frans Slothouber and Jacco van Weert.

- -

This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of -the License, or (at your option) any later version.

- -

This program is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied -warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU General Public License for more details.

- -

You should have received a copy of the GNU General Public -License along with this program; if not, write to the Free -Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -02111-1307 USA

- - - -www_section(`creds', `Credits') - -
    - -
  • Original program and idea: Jacco van Weert
  • - -
  • Versions 2.0 and up: Frans Slothouber, Petteri Kettunen, - Bernd Koesling, Anthon Pang, Thomas Aglassinger, - and Stefan Kost, Guillaume Etorre, Simo Muinonen, - Petter Reinholdtsen. -
  • - -
  • Maintainer: Frans Slothouber (fslothouber@acm.org), - The Netherlands.
  • - -
- - -www_section(`toc', `Table of Contents') - -m4_include(stoc.html) - - - -www_section(`INTRO', `Introduction') - -

ROBODoc is based on the AutoDocs program written some time ago -by Commodore. The idea is to include for every function a -standard header containing all sorts of information about that -procedure/function. An AutoDocs program extracts these headers -from the source file and puts them in an autodocs file. This -allows you to include the program documentation in the source -code and makes it unnecessary to maintain two documents.

- - -

ROBODoc is such a program, however ROBODoc has several -additions. For one it can generate the documentation in -different formats, ASCII, HTML, RTF, LaTeX, and AmigaGuide. -Another feature is that it automatically creates links within the -document, and to other documents. It is also possible to include -parts of the source in you documentation, complete with links. -For instance it is possible to include the complete source code -of a function, and have the function names in the source point to -their documentation. Besides documenting functions, you can also -document classes, methods, structures, variables, and -constants.

- - -

If you never have used AutoDoc or ROBODoc before you might -take a look at the example in the Source/. Run the -command:

- -
-  make xhtml
-  make example
-
- - -

This creates the ROBODoc -www_link(`../Source/ROBODoc_mi.html', `documentation') for the -ROBODoc program itself and then starts netscape to view the -documentation. Also have a look at the source files, they -illustrates the use of headers.

- -

ROBODoc can generate documentation in five different -formats:

- -
    -
  • HTML format complete with hyperlinks and mark-ups.
  • - -
  • LaTeX, based on D. Knuth excellent typesetting system.
  • - -
  • Plain ASCII text file, this file is very close to what the - original AutoDocs program would generate.
  • - -
  • RTF, Rich Text Format, mostly used on Windows machines - before WWW revolution.
  • - -
  • AmigaGuide format, it is the Amiga computer's equivalent - HTML. The AmigaGuide program is necessary to view the - resulting autodocs-file. (This was the preferred format when the - program was written in 1994.)
  • - -
- - -www_section(`HSR', `Hardware and software requirements') - -

ROBODoc was developed in 1994 on a standard Amiga 1200, a -system with a 20MHz 68020 processor and 2 Mbyte of RAM. It should -therefore be no problem to run it on any of the currently -available systems :) The complete source code consists of a -series of file that can be found in the Source -directory. It is written according (hopefully) to the ANSI C -standard and uses no special functions, so it should run on every -system with an ANSI C-compiler.

- - -www_section(`LMT', `Goals and Limitations') - -

ROBODoc is intended for small to medium sized projects -that have a relatively flat structure and especially projects -that use a mix of different programming languages.

- -

-ROBODoc was designed to be easy to use and to work with a lot of -different programming languages. It has no knowledge of the -syntax of a programming languages. It just some knowledge about -how remarks start and end in some programming languages. This -means that you sometimes have to do a little more work compared -to other tools that have detailed knowledge of the syntax of a -particular language. They can use that knowledge to figure out -some of the information automatically. This usually also means -that they work only with one or two languages. -

- -

ROBODoc operates on one file at a time. It has no mechanism to -process whole sets of source files. Makefiles should be used for -this. How to do this is explained in this document with various -example makefiles. Have a look at them. -

- -

ROBODoc can work with projects where the source code is located -in different subdirectories. However the generated documentation is -expected to go into one single directory.

- - -www_section(`HFCWR', `How to Format Your Code for use with ROBODoc') - -

ROBODoc allows you to mix the program documentation with the -source code. It does require though that this documentation has -a particular layout so ROBODoc can recognize it. The following -header was taken from the original ROBODoc program (many versions -back).

- - - - - -
-
-           ------------------------------- Header Name
-          /                          \
-  /****f* financial.library/StealMoney  <---- Begin Marker
-  *    ^------- Header Type
-  *
-  *  <---- Remark Marker
-  *  NAME
-  *    StealMoney -- Steal money from the Federal Reserve Bank. (V77)
-  *  SYNOPSIS  <---- Item Name
-  *    error = StealMoney( userName,amount,destAccount,falseTrail )
-  *    D0,Z                D0       D1.W    A0         [A1]
-  *
-  *    BYTE StealMoney
-  *         ( STRPTR,UWORD,struct AccountSpec *,struct falseTrail *);
-  *  FUNCTION
-  *    Transfer money from the Federal Reserve Bank into the
-  *    specified interest-earning checking account.  No records of
-  *    the transaction will be retained.
-  *  INPUTS
-  *    userName    - name to make the transaction under.  Popular
-  *                  favorites include "Ronald Reagan" and
-  *                  "Mohamar Quadaffi".
-  *    amount      - Number of dollars to transfer (in thousands).
-  *    destAccount - A filled-in AccountSpec structure detailing the
-  *                  destination account (see financial/accounts.h).
-  *                  If NULL, a second Great Depression will be
-  *                  triggered.
-  *    falseTrail  - If the DA_FALSETRAIL bit is set in the
-  *                  destAccount, a falseTrail structure must be
-  *                  provided.
-  *  RESULT
-  *    error - zero for success, else an error code is returned
-  *           (see financial/errors.h).  The Z condition code
-  *           is guaranteed.
-  *  EXAMPLE
-  *    Federal regulations prohibit a demonstration of this function.
-  *  NOTES
-  *    Do not run on Tuesdays!
-  *  BUGS
-  *    Before V88, this function would occasionally print the
-  *    address and home phone number of the caller on local police
-  *    976 terminals.  We are confident that this problem has been
-  *    resolved.
-  *  SEE ALSO
-  *    CreateAccountSpec(),security.device/SCMD_DESTROY_EVIDENCE,
-  *    financial/misc.h
-  *
-  ******  <---- End Marker
-  *
-  * You can use this space for remarks that should not be included
-  * in the documentation.
-  *
-  */
-
-
- -

You would place this headers in front of functions, classes, -methods, structure definitions, or any of the major components in -your program. The header itself contains a number of items that -provide structured information about the component.

- -

There are a number of special markers in a header (indicated -in red above). There are two special markers that mark the begin -and end of a header. Each line in a header should start with a -remark marker. The starts of each item is marked by an Item Name -(in all capitals).

- - -www_subSection(`hname', `Header Names') - -

ROBODoc makes some assumptions about the structure a project. -It assumes that a project consists of a number of modules, and -that each module consists of a number of components. These -components can be anything that you care to document; functions, -variables, structures, classes, methods etc.

- -

Projects, modules, and components all have names. The names -allow ROBODoc to structure the documentation and create -cross-links. Names are defined in the header name. It is either -of the form <project name>/<module name> -for a module header, or of the form <module -name>/<component name> for all other headers.

- -www_subSection(`htypes', `Header Types') - -

You can provide ROBODoc with some additional information -by specifying the header type. The header type tells ROBODoc -what kind of component you are documenting. This information -allows ROBODoc to create more useful index tables.

- -

The type is identified by a single character, as listed in the -following table

- - - - - - - - - - - -
hHeader for a module in a project.
fHeader for a function.
sHeader for a structure.
cHeader for a class.
mHeader for a method.
vHeader for a variable.
dHeader for a constant -(from define).
*Generic header for every thing else.
iInternal header.
- -

Internal headers are special. They can be used to hide certain -headers. They are only extracted if requested. You could use to -document internal functions that you do now want clients to -see.

- - -www_subSection(`bmar', `Begin Marker') - -

The beginning of a header is marked with a special marker. -The above header is intended for a program in C. In other -programming languages the marker looks slightly different, since -each language has its own convention for starting remarks. -ROBODoc recognizes the following begin markers:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"/****" - C, C++
"//****"C++
";****"Assembler
"****"Assembler
"{****"Pascal
"REM ****"Basic (Rem, rem, or even rEM also works)
"C ****"Fortran (c **** also works)
"%****"LaTeX, TeX, Postscript.
"#****"Tcl/Tk, Perl, makefiles, gnuplot etc.
"(****"Pascal, Modula-2, LISP
"--****"Occam
"<!--****"HTML
"<!---****"HTML
"|****"GNU Assembler
"!!****"Fortran 90
- -

After these initial four asterisks, there is the character to -identify the kind of header, then another asterisks, and then -header name. After this you can specify a version number -surrounded by "[]". The version number is stored but not used for -anything at the moment. All characters after that are -ignored.

- -

This might sound terribly complicated, it is not. Here are -some examples:

- -

A header for a module called analyser in a project called ChessMaster -for C, is has version number 1.0

-
-  /****h* ChessMaster/analyser [1.0] *
-
- -

In Assembler, a function header, for the function init() in the - module finance.library:

-
-  ****f* finance.library/init *
-
- -

In C++, a class header for class Puppet, for the module puppetmaster, -version v2.12

-
-  /****c* puppetMaster/Puppet [v2.12] ******
-
- -

For the same class a method called Puppet::Talk

-
-  /****m* puppetMaster/Puppet::Talk [v2.12] ******
-
- -

A project header, in Fortran

-
-  C     ****h* ChessMaster/analyser              C
-
- -

In Basic

-
-  REM ****h* ChessMaster/analyser
-
- - - -www_subSection(`rmarker', `Remark Marker') - -

Each line in the body of a header should start with a remark -marker. This marker is stripped from the line and the remaining -part is used to generated the documentation. The following -markers are recognized by ROBODoc.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"*"C, C++, Pascal, Modula-2
"//"C++
" *"C, C++, M68K assembler, Pascal, Modula-2, HTML
";*"M68K assembler
";"M68K assembler
"C "Fortran
"REM "BASIC
"%"LaTeX, TeX, Postscript
"#"Tcl/Tk, shell scripts, makefiles
" *"COBOL
"--"Occam
"|"GNU Assembler
"!!"Fortan 90
- - - - -www_subSection(`emar', `End Marker') - -

A header ends with an end marker. An end marker is a remark -marker followed by three asterisks. ROBODoc recognizes following -strings as end markers:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"/***" C, C++
"//***" C++
" ****" C, C++, Pascal, Modula-2
"{***" Pascal
"(***" Pascal, Modula-2, B52 LISP
";***" M68K assembler
"****" M68K assembler
"C ***" Fortran
"REM ***" BASIC
"%***" LaTeX, TeX, Postscript
"#***" Tcl/Tk, Perl, Makefiles, Shell scripts
" ****" COBOL
"--***" Occam
"<!--***" HTML
"<!---***" HTML
"|***"GNU Assembler
"!!***"Fortan 90
- - - - -www_subSection(`hitem', `Header Items') - -

When ROBODoc has found a header it will try to identify the -items in this header. It does this by looking for the item name. The following -item names are currently supported:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NAME Item name plus a short description.
COPYRIGHT Who own the copyright : "(c) <year>-<year> by - <company/person>"
SYNOPSIS, USAGE How to use it.
FUNCTION, DESCRIPTION, PURPOSE What does it do.
AUTHOR Who wrote it.
CREATION DATE When did the work start.
MODIFICATION HISTORY, HISTORY Who has done which changes and when.
INPUTS, ARGUMENTS, OPTIONS, PARAMETERS, SWITCHES What can we feed into it.
OUTPUT, SIDE EFFECTS What output is made.
RESULT, RETURN VALUE What do we get returned.
EXAMPLE A clear example of the items use.
NOTES Any annotations
DIAGNOSTICS Diagnostical output
WARNINGS, ERRORS Warning & error-messages.
BUGS Known bugs.
TODO, IDEAS What to implement next & ideas.
PORTABILITY Where does it come from, where will it work.
SEE ALSO References to other functions, man pages, other documentation.
METHODS, NEW METHODS OOP methods.
ATTRIBUTES, NEW ATTRIBUTES OOP attributes
TAGS Tag-item description.
COMMANDS Command description.
DERIVED FROM OOP super class.
DERIVED BY OOP sub class.
USES, CHILDREN What modules are used by this one.
USED BY, PARENTS Which modules do use this one.
SOURCE Source code inclusion.
- -

ROBODoc does this so that it can format each item with a -different style (colour, font, etc.) if the user want it. These -can be specified in the robodoc.defaults file, see the next -section more information.

- - -www_subSection(`inlimits', `Item Name Limitations') - -

If you happen to have a function which name is in all uppercase, -this sometimes conflicts with where ROBODoc thinks an item name -starts and where the item body starts. -Bernhard Roessmann suggest the following workaround: -Example header producing this error:

-
-/***** basic.c/RETURN
-* NAME
-*  RETURN : Return from subroutine
-* SYNOPSIS
-*  RETURN
-* FUNCTION
-*  Return from subroutine
-******/
-
-

Here the item name "FUNCTION" will be interpreted as ordinary text, -not as an item name. Workaround: Add an empty line:

-
-/***** basic.c/RETURN
-* NAME
-*  RETURN : Return from subroutine
-* SYNOPSIS
-*  RETURN
-*
-* FUNCTION
-*  Return from subroutine
-******/
-
- - - -www_subSection(`SI', `Source Item') - -

The source item allows you to include part of the source in -the documentation as is demonstrated by the following -example.

- -
-m4_include(`example.c')
-
- -

This would create the following documentation

- -
-NAME -
   RB_Panic -- Shout panic, free resources, and shut down.
-
SYNOPSIS -
   RB_Panic (cause, add_info)
-   RB_Panic (char *, char *)
-
FUNCTION -
   Prints an error message.
-   Frees all resources used by robodoc.
-   Terminates program.
-
INPUTS -
   cause    - pointer to a string which describes the
-              cause of the error.
-   add_info - pointer to a string with additional information.
-
SEE ALSO -
   RB_Close_The_Shop ()
-
SOURCE -
      void RB_Panic (char *cause, char *add_info)
-      {
-        printf ("Robodoc: Error, %s\n",cause) ;
-        printf ("         %s\n", add_info) ;
-        printf ("Robodoc: Panic Fatal error, closing down...\n") ;
-        RB_Close_The_Shop () ; /* Free All Resources */
-        exit(100) ;
-      }    
-
- - - - -www_section(`CLD', `Creating Cross Links') - -

Creating hyper links within a document and across documents -is the most interesting feature of ROBODoc. A document with such -links is much more easier to read. If your source code consists -of just one file, creating links is easy. Just tell ROBODoc that -you want to have the output in HTML or AmigaGuide format, and it -will automatically generate the links. That is, at the beginning -of the document it will create a table of contents that consists -of links to all your function headers.

- -

ROBODoc will also search the complete text of you -documentation for reference to function names, and it will create -a link to the documentation of that function.

- -

In most cases, however, your source code does not consists of -a single file. It is also possible, however, to create links to -other files. This does require the use of some additional files, -called xref files. These files can be generated with ROBODoc. -These files contain information about in which file and where in -the file references can be found.

- -

Lets assume your project is split up in five different source -files, and you want to generate links between these five files. -What you have to do to accomplish this is to create a xref file -for each of those five files.

- -

With the GENXREF option ROBODoc will generate such a xref file -from the a source-file. When you use this option, only the xref -file is created not the autodocs-file, however you still have to -specify the name of the autodocs file because this name is needed -for the creation of the xref file.

- -

When all xref files are created you are ready to create the -documentation. To do so you use ROBODOC with the XREF option. It -needs a parameter which is the name of the file in which the -names of all xref files are defined. Notice: this is a file with -file names, it has to be created it by hand.

- -

An example will make things more clear. In the ROBODoc -archive, under examples/C there are two source files -www_link(`../Examples/C/prog1.c', `prog1.c') and -www_link(`../Examples/C/prog2.c', `prog2.c'). We can create -documentation with hyper links from these two files as follows: -

- -

First create the xref files:

- - - - - -
-
-  robodoc prog1.c prog1.c.html GENXREF prog1.c.xref HTML INTERNAL
-  robodoc prog2.c prog2.c.html GENXREF prog2.c.xref HTML INTERNAL
-
-
- -

Now there are two xref files: prog1.c.xref and prog2.c.xref. -Note that ROBODoc did not create any HTML files, just the xref -files. The name prog1.c.html is needed to create the correct xref -files. For prog1.c internal headers were also included.

- -

Now create a file with the xref file names. This file will -hold only two lines. You can give it any name, say -xref_files.

- - - - -
-
-  echo prog1.c.xref >  xref_files 
-  echo prog2.c.xref >> xref_files
-
-
-

Now generate the final documentation:

- - - - -
-
-  robodoc prog1.c prog1.c.html XREF xref_files HTML INTERNAL
-  robodoc prog2.c prog2.c.html XREF xref_files HTML INTERNAL
-
-
- -

Have a look the the documentation generated:

-
    -
  1. www_link(`../Examples/C/prog1.c.html', `prog1.c.html')
  2. -
  3. www_link(`../Examples/C/prog2.c.html', `prog2.c.html')
  4. -
- - - -www_subSection(`limits', `Limitations') - -

ROBODoc knows very little about the grammar of programming -languages. Links are created by looking up words in a table. -This means that it sometimes creates links where there should be -none. For instance if you have a function called usage(); every -time you use the word usage in any of your documentation a link -will show up. It also means that sometimes is does not create -links where you would like it to create a link. Say you include -the source code of a method using the source item. Your method -uses other methods of the class. You would like to have links -pointing to the documentation of these methods each time you use -one. They will not appear though. Since to ROBODoc stores the -whole name of a method, ie, someClass::MethodName. In -the method source you will use just MethodName().

- - - -www_section(`MAIND', `Master Index File') - -

If your project consists of many source files you might want -to create a master index file.

- -

For HTML output this file contains links to the documentation -generated from each of your source files as well as a list of all -"objects" that you documented. All "objects" are listed according -to header type, using the following order: Projects, Classes, -Methods, Stuctures, Functions, Variables, Constants, Generic, -Internal.

- -

For LaTeX output this file is one big document that contains -the documentation generated from all your source files. It also -includes a table of contents and an index section. This index -lists the page number of the page a function's documentation. -

- -

This index file is generated based on the information found in -your xrefs file. That is the file with the names of all your xref -files. So before you can create the master index file you have to -create all your xref files.

- -

To generate a master index file use:

-
-   robodoc <xrefs file> <master index file> INDEX HTML TITLE "Master Index"
-
-

or

-
-   robodoc <xrefs file> <master index file> INDEX LATEX TITLE "ROBODoc API Documentation"
-
-

The master index file can currently only be generated in HTML or LaTeX.

- -

If you use if for LaTeX documentation you need to use the option -SINGLEDOC when you generate the documentation from your various -source files. This ensures that no document preambles are generated. -The master index file contains command that includes all your documentation -files and make it into one single document.

- - -www_subSection(`MIEXM', `examples') - -

Here are some examples of master index files

-
    - -
  • www_link(`../Examples/CPP/masterindex.html', - `Master index for a C++ project') to be found in - Examples/CPP/
  • - -
  • www_link(`../Source/ROBODoc_mi.html', - `Master index for ROBODoc') to be found in - Source/. -
  • - -
- - - -www_section(`makefile', `Automation with make') - -

The whole process of creating documentation with ROBODoc is of -course best automated with make. -Have a look at the following makefile.

- -
-SHELL = /bin/sh
-.SUFFIXES:
-
-ROBODOC=robodoc
-ROBOOPTS=C SORT 
-
-# Your source files.
-#
-SOURCES=analyser.c generator.c items.c util.c \
-  folds.c headers.c links.c robodoc.c \
-  analyser.h generator.h items.h util.h \
-  folds.h headers.h links.h robodoc.h
-
-# The name of your Project
-#
-PROJECT=robodoc
-
-# The various documentation files, derived from the source files.
-# HTML
-#
-HTMLDOCS=$(SOURCES:=.html)
-HTMLXREFS=$(HTMLDOCS:.html=.html.xref)
-HTMLXREFSFILE=$(PROJECT)_html.xrefs
-# LATEX
-#
-LATEXDOCS=$(SOURCES:=.tex)
-LATEXXREFS=$(LATEXDOCS:.tex=.tex.xref)
-LATEXXREFSFILE=$(PROJECT)_tex.xrefs
-# ASCII
-#
-ASCIIDOCS=$(SOURCES:=.txt)
-# RTF
-#
-RTFDOCS=$(SOURCES:=.rtf)
-RTFXREFS=$(RTFDOCS:.rtf=.rtf.xref)
-RTFXREFSFILE=$(PROJECT)_rtf.xrefs
-
-# Some common targets
-xrefall: xrefhtml xreftex xrefrtf
-docall: html tex ascii rtf
-
-# Create the xref files for the various formats.
-xhtml: $(HTMLXREFSFILE) 
-xtex: $(LATEXXREFSFILE) 
-xrtf: $(RTFXREFSFILE)
-
-# Create the documentation files for the various formats.
-html: $(HTMLDOCS) $(PROJECT)_mi.html 
-tex: $(LATEXDOCS) $(PROJECT)_mi.tex
-rtf: $(RTFDOCS)
-ascii: $(ASCIIDOCS)
-
-# master index file, currently works only for html and latex documentation.
-# Note that you can define the title of the document.
-$(PROJECT)_mi.html: $(HTMLXREFSFILE) 
-	$(ROBODOC) $< $@ INDEX HTML TITLE "$(PROJECT) Master Index"
-
-$(PROJECT)_mi.tex: $(LATEXXREFSFILE)
-	$(ROBODOC) $< $@ INDEX LATEX TITLE "$(PROJECT) API Reference"
-
-# create xrefs file (file with the names of all .xref files).
-$(HTMLXREFSFILE) : $(HTMLXREFS)
-	/bin/ls $(HTMLXREFS) > $@
-$(LATEXXREFSFILE) : $(LATEXXREFS)
-	/bin/ls  $(LATEXXREFS) > $@
-$(RTFXREFSFILE) : $(RTFXREFS)
-	/bin/ls  $(RTFXREFS) > $@
-
-# Rule to create an .xref file from a source file for the various formats.
-%.html.xref : %
-	$(ROBODOC) $< $(@:.xref=) $(ROBOOPTS) INTERNAL GENXREF $@
-%.tex.xref : %
-	$(ROBODOC) $< $(@:.xref=) $(ROBOOPTS) INTERNAL GENXREF $@
-%.rtf.xref : %
-	$(ROBODOC) $< $(@:.xref=) $(ROBOOPTS) INTERNAL GENXREF $@
-
-# Rule to create html documentation from a source file.
-%.html : %
-	$(ROBODOC) $< $@ HTML $(ROBOOPTS) XREF $(HTMLXREFSFILE)
-
-# Rule to create latex documentation from a source file.
-# We do not include source items, and generate laxtex documents
-# than can be included in a master document.
-%.tex : %
-	$(ROBODOC) $< $@ LATEX $(ROBOOPTS) NOSOURCE SINGLEDOC XREF $(LATEXXREFSFILE)
-
-# Rule to create ascii documentation from a source file.
-%.txt : %
-	$(ROBODOC) $< $@ ASCII 
-
-# Rule to create rtf documentation from a source file.
-%.rtf : %
-	$(ROBODOC) $< $@ RTF $(ROBOOPTS) XREF $(RTFXREFSFILE)
-
-# Use netscape to view the master index file for our project.
-htmlview: html
-	netscape $(PROJECT)_mi.html
-
-# Use the latex programs to generate a .dvi from the master index file
-# for our prokect. View this .dvi file with xdvi
-texview:  tex
-	latex $(PROJECT)_mi
-	makeindex $(PROJECT)_mi
-	latex $(PROJECT)_mi
-	latex $(PROJECT)_mi
-	xdvi  $(PROJECT)_mi.dvi
-
-# Clean-up the mess we made
-#
-clean:
-	rm -f $(HTMLXREFS) 
-	rm -f $(HTMLDOCS) 
-	rm -f $(LATEXXREFS)
-	rm -f $(LATEXDOCS) 
-	rm -f $(PROJECT)_mi.* *.aux
-	rm -f $(RTFXREFS)
-	rm -f $(RTFDOCS)
-	rm -f $(ASCIIDOCS)
-	rm -f $(HTMLXREFSFILE) 
-	rm -f $(LATEXXREFSFILE) 
-	rm -f $(RTFXREFSFILE)
-
- -

It includes all the necessary commands to generate and view the documentation for you project. You create documentation in any of the four formats. -For instance to create documentation in html format use:

-
-  make xhtml
-  make html
-
-

To make documentation in LaTeX format use:

-
-  make xtex
-  make tex
-
-

To view your documentation use:

-
-  make xhtml
-  make texview
-
-

or

-
-  make xtex
-  make texview
-
- - -

To clean up all the documentation files use:

-
-  make clean
-
- -

To use this make file in project set the variable -SOURCE to the names of your source files and set the -variable PROJECT to the name of your project.

- -

You can find a copy of the above makefile -Docs/example_makefile. This should get you started in -no time.

- -www_section(`MDSO', `What to do if You have Sources in Multiple Directories') - -

It is possible to have your sources in multiple -subdirectories. However the generated documentation is expected -to be in one single directory. If not the cross references will -be wrong, at least in the HTML documentation.

- -

Say you have the following directory structure:

-
-  Project/
-     Dir1/
-        program1.c 
-     Dir2/
-        program2.c 
-
- -

You can create the documentation for that as follows (assuming -you are in Project): -

-
-  robodoc Dir1/prog1.c prog1.c.html HTML GENXREF Dir1/prog1.xref 
-  robodoc Dir2/prog2.c prog2.c.html HTML GENXREF Dir2/prog2.xref 
-  echo "Dir1/prog1.xref" > xreffiles 
-  echo "Dir2/prog2.xref" >> xreffiles 
-  robodoc Dir1/prog1.c prog1.c.html HTML XREF xreffiles 
-  robodoc Dir2/prog2.c prog2.c.html HTML XREF xreffiles 
-  robodoc xreffiles master_index.html INDEX HTML 
-
-

-This generates the following files: -

-
-   prog1.c.html
-   prog2.c.html
-   master_index.html
-
- - -

With some version of make (for instance the gnu version) you -can strip the directory part of a filename with $(notdir NAME) -How this can be used is shown in the following example -makefile. Here we have the sources for robodoc, the .c files are -in the directory Sources/ and .h files are in the -directory Headers/.

- -
-SHELL = /bin/sh
-.SUFFIXES:
-
-ROBODOC=./robodoc
-ROBOOPTS=C SORT 
-
-# Your source files.
-#
-SOURCES=Sources/analyser.c Sources/generator.c Sources/items.c Sources/util.c \
-  Sources/folds.c Sources/headers.c Sources/links.c Sources/robodoc.c \
-  Headers/analyser.h Headers/generator.h Headers/items.h Headers/util.h \
-  Headers/folds.h Headers/headers.h Headers/links.h Headers/robodoc.h
-
-# The name of your Project
-#
-PROJECT=ROBODoc
-
-# The various documentation files, derived from the source files.
-#
-HTMLDOCS=$(SOURCES:=.html)
-HTMLXREFS=$(HTMLDOCS:.html=.html.xref)
-HTMLXREFSFILE=$(PROJECT)_html.xrefs
-
-# Create the xref files for the various formats.
-xhtml: $(HTMLXREFSFILE) 
-
-# Create the documentation 
-html: $(HTMLDOCS) $(PROJECT)_mi.html 
-
-# Create master index file.
-$(PROJECT)_mi.html: $(HTMLXREFSFILE) 
-	$(ROBODOC) $< $@ INDEX HTML TITLE "$(PROJECT) Master Index"
-
-# Create the file with the names of all xref files.
-$(HTMLXREFSFILE) : $(HTMLXREFS)
-	/bin/ls $(HTMLXREFS) > $@
-
-# Rule to create an .xref file from a source file 
-%.html.xref : %
-	$(ROBODOC) $< $(notdir $(@:.xref=)) $(ROBOOPTS) INTERNAL GENXREF $@
-
-# Rule to create html documentation from a source file.
-%.html : %
-	$(ROBODOC) $< $(notdir ${@}) HTML $(ROBOOPTS) XREF $(HTMLXREFSFILE)
-
- - - -www_section(`RDF', `The ROBODoc Defaults File') - -

The robodoc.default file can be used to change the appearance -of the documentation. For each item type you can define how the -corresponding text should be rendered. Each line in the default -file consists of two parts, the item type and the item -attributes. For instance

- -
-AUTHOR                    LARGE ITALICS BOLD UNDERLINE
-
- -

Specifies that the AUTHOR item has the attributes LARGE, -ITALICS, BOLD, and UNDERLINE. The effect of each attribute is -listed in the following table.

- - - - - - - - - - - - - - - - - - - - - - - -
Item AttributesEffect in HTML
LARGE<FONT SIZE=5>,</FONT>
SMALL<FONT SIZE=-1>,</FONT>
ITALICS<I>,</I>
BOLD<B>,</B>
UNDERLINE<U>,</U>
HIGHLIGHT<EM>,</EM>
- - -www_section(`UOB', `ROBODoc Command Line Options') - -

When using ROBODoc you should provide at least two -parameters

- -
-  robodoc <source file> <documentation file> [options]
-
- -

Here sourcefile is the file with the program source from which -the documentation is to be extracted. The documentation file is -the file that will contain the extracted documentation.

- -

In case you are creating a master index file you have to -specify three parameters

-
-  robodoc <xrefs file> <master index file> INDEX [options]
-
- - -

In addition to this you can specify one or more of the -following options:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ASCIIGenerate documentation in ASCII format (default)
GUIDEGenerate documentation in AmigaGuide format.
HTMLGenerate documentation in HTML format.
LATEXGenerate documentation in LaTeX format. (Experimental)
RTFGenerate documentation in RTF format.
CUse ANSI C grammar in source items (test, HTML only)
FOLDEnable folding. (Experimental)
GENXREF <xref file>Generate a xref file, which can be used to create - www_link(`#CLD', `cross links') between documents.
XREF <xrefs file>Use a set of xref files to create references (links) to other - documents or within the document. <xrefs file> - is a file with xref file names.
INDEXCreate a www_link(`#MAIND', `master index file').
INTERNALAlso include headers that are marked internal.
INTERNALONLYOnly extract the headers marked internal.
NOSOURCEDo not include the source items in the documentation.
SORTSort the headers alphabetically.
SINGLEDOCDo not create a document header and footer when creating - documentation in LaTeX format. This allows you to include - the generated documents into big document or - www_link(`#MAIND', `master index file').
TITLE <title>Sets the title that is used for the - www_link(`#MAIND', `master index file').
TOCGenerate a table of contents. It is only useful when you select - ASCII as output mode. With all other output modes the - table of contents is generated anyway.
TABSIZE <n>Convert each tab into n spaces.
-vVerbose option, ROBODoc will tell you what it is doing.
- -

If you wonder why all the odd ALL CAPS flags are used instead -of for instance "-x"; this was how it was done on the Amiga.

- -

The following abbreviations are also allowed:

- - - - - - - - -
-s SORT
-t TOC
-x XREF
-g GENXREF
-i INTERNAL
-ioINTERNALONLY
-tsTABSIZE
- - -www_section(`ADV', `Adding New Languages') - -

To add a new programming language to ROBODoc you have to edit -headers.c. Here you find three variables: -header_markers, remark_markers, and -end_markers. There are all arrays, and you have to add -an new entry to each of these three arrays.

- -

Say your programming language uses the following type of remarks:

-
-   $%% This is a remark with some text       
-       and some more and some more  %%$
-
- -

That is is starts with three spaces and then $%%, and -has to end with %%$. Then you would add to header_markers -

-
-   "   $%%****",
-
-

To remark_markers you would add

-
-   "   *",
-
-

And to end_markers you would add

-
-   "   $%%***",
-
-

You can then use the following kind of headers in your program:

-
-   $%%****f* Test/afunction ***** 
-   * NAME  
-   *   afunction
-   * FUNCTION
-   *   A test.
-   * SOURCE
-   *%%$
-     afunction(test,test) [
-       print hello world ;
-     ]
-   $%%***%%$
-
- - - - - -www_section(`SAB', `Suggestions and Bugs') - -

If you find any bugs, catch them, put them in a jar, and send -them to:

-
fslothouber@acm.org
-

Suggestions are also welcome at this address. Flames can be -directed to the sun.

- -www_bodyend -www_docend - diff --git a/util/robodoc/Docs/tocgen.m4 b/util/robodoc/Docs/tocgen.m4 deleted file mode 100644 index 94d2f515..00000000 --- a/util/robodoc/Docs/tocgen.m4 +++ /dev/null @@ -1,6 +0,0 @@ -m4_changecom(`/-*', `*-/')m4_dnl -m4_define(`www_sectionCounter',0)m4_dnl -m4_define(`www_subSectionCounter',0)m4_dnl -m4_define(`www_incrCounter',`m4_define(`$1',m4_incr($1))')m4_dnl -m4_define(`www_section', `www_incrCounter(`www_sectionCounter')m4_format(`%02d', www_sectionCounter)......... $2
m4_define(`www_subSectionCounter', 0)')m4_dnl -m4_define(`www_subSection', `www_incrCounter(`www_subSectionCounter')m4_format(`%02d.%02d', www_sectionCounter, www_subSectionCounter).......... $2
')m4_dnl diff --git a/util/robodoc/Examples/C/makefile b/util/robodoc/Examples/C/makefile deleted file mode 100644 index 12dd8658..00000000 --- a/util/robodoc/Examples/C/makefile +++ /dev/null @@ -1,34 +0,0 @@ -# -# $Id$ -# -# - -myclean: - rm -f *~ - rm -f *.xref - rm -f *.html - rm -f xref_files - -# -# Creates the example used in the documentation. -# Assumed robodoc has been installed. -# -# It also shows how to make some plain makefile rules to -# generate documentation. -# - -xref_files : prog1.c.xref prog2.c.xref - echo "prog1.c.xref" > xref_files - echo "prog2.c.xref" >> xref_files - -prog1.c.xref : prog1.c - robodoc prog1.c prog1.c.html GENXREF prog1.c.xref HTML INTERNAL - -prog2.c.xref : prog2.c - robodoc prog2.c prog2.c.html GENXREF prog2.c.xref HTML INTERNAL - -prog1.c.html : prog1.c xref_files - robodoc prog1.c prog1.c.html XREF xref_files HTML INTERNAL - -prog2.c.html : prog2.c xref_files - robodoc prog2.c prog2.c.html XREF xref_files HTML INTERNAL diff --git a/util/robodoc/Examples/C/prog1.c b/util/robodoc/Examples/C/prog1.c deleted file mode 100644 index ba29eb2a..00000000 --- a/util/robodoc/Examples/C/prog1.c +++ /dev/null @@ -1,55 +0,0 @@ -/****h* TEST/Prog1 *** -* NAME -* Prog1 -- Test program 1. (v1.0) -* COPYRIGHT -* Maverick Software Development (C) 1995 -* FUNCTION -* Totally nothing and useless. -* AUTHOR -* Jacco van Weert -* CREATION DATE -* 15-Feb-95 -* MODIFICATION HISTORY -* 15-Feb-95 - v1.0 - First version -* NOTES -* Nothing special -*********** -*/ - -/****i* Prog1/Proc_Internal1 *** -* NAME -* Proc_Internal1 -- Internal procedure test program. (v1.0) -* SYNOPSIS -* Proc_Internal1 -* FUNCTION -* Just for fun. -* BUGS -* The procedure does not exist :) -* PURPOSE -* The purpose of the procedure, whatever it is. -* SEE ALSO -* Proc_Normal1, Proc_Internal2 -* Proc_Normal2, prog2.c -********* -*/ - -/****** Prog1/Proc_Normal1 ** -* -* NAME -* Proc_Normal1 -- Normal procedure. (v1.0) -* SYNOPSIS -* Proc_Normal1 -* FUNCTION -* Useless. -* SEE ALSO -* Proc_Internal1, -* Proc_Normal2, -* prog2.c, -* Prog2 -*********** -*/ - - - - - diff --git a/util/robodoc/Examples/C/prog1.c.html b/util/robodoc/Examples/C/prog1.c.html deleted file mode 100644 index b7cabbb1..00000000 --- a/util/robodoc/Examples/C/prog1.c.html +++ /dev/null @@ -1,69 +0,0 @@ - - -prog1.c.html - - - - -Generated from prog1.c with ROBODoc v3.2.2 on Mon Apr 02 20:03:02 2001 -
-

TABLE OF CONTENTS

-
    -
  1. TEST/Prog1 -
  2. Prog1/Proc_Internal1 -
  3. Prog1/Proc_Normal1 -
-
- -

TEST/Prog1

- -NAME -
    Prog1 -- Test program 1. (v1.0)
-
COPYRIGHT -
    Maverick Software Development (C) 1995
-
FUNCTION -
    Totally nothing and useless.
-
AUTHOR -
    Jacco van Weert
-
CREATION DATE -
    15-Feb-95
-
MODIFICATION HISTORY -
    15-Feb-95 - v1.0 - First version
-
NOTES -
    Nothing special
-
-
- -

Prog1/Proc_Internal1

- -NAME -
    Proc_Internal1 -- Internal procedure test program. (v1.0)
-
SYNOPSIS -
    Proc_Internal1
-
FUNCTION -
    Just for fun.
-
BUGS -
    The procedure does not exist :)
-
PURPOSE -
    The purpose of the procedure, whatever it is.
-
SEE ALSO -
    Proc_Normal1, Proc_Internal2
-    Proc_Normal2, prog2.c
-
-
- -

Prog1/Proc_Normal1

- -NAME -
   Proc_Normal1 -- Normal procedure. (v1.0)
-
SYNOPSIS -
   Proc_Normal1
-
FUNCTION -
    Useless.
-
SEE ALSO -
  Proc_Internal1, 
-  Proc_Normal2,
-  prog2.c, 
-  Prog2
-
- diff --git a/util/robodoc/Examples/C/prog2.c b/util/robodoc/Examples/C/prog2.c deleted file mode 100644 index b7124366..00000000 --- a/util/robodoc/Examples/C/prog2.c +++ /dev/null @@ -1,50 +0,0 @@ -/****h* TEST/Prog2 ***** -* NAME -* Prog2 -- Test program 2. (v1.0) -* COPYRIGHT -* Maverick Software Development (C) 1995 -* FUNCTION -* Totally nothing and useless. -* AUTHOR -* Jacco van Weert -* MODIFICATION HISTORY -* 15-Feb-95 - v1.0 - First version -* NOTES -* Nothing special -****** -*/ - - -/****i* Prog2/Proc_Internal2 ** -* NAME -* Proc_Internal2 -- Internal procedure test program. (v1.0) -* SYNOPSIS -* Proc_Internal2 -* FUNCTION -* Just for fun. -* INPUTS -* No inputs -* BUGS -* The procedure does not exist :) -* SEE ALSO -* Proc_Normal1, Proc_Internal1, Proc_Normal2, prog1.c -************ -*/ - -/****** Prog2/Proc_Normal2 *** -* NAME -* Proc_Normal2 -- Normal procedure. (v1.0) -* SYNOPSIS -* Proc_Normal2 -* FUNCTION -* Useless. -* SEE ALSO -* Proc_Internal1, Proc_Normal1, prog1.c -****** -*/ - - - - - - diff --git a/util/robodoc/Examples/C/prog2.c.html b/util/robodoc/Examples/C/prog2.c.html deleted file mode 100644 index 8410c010..00000000 --- a/util/robodoc/Examples/C/prog2.c.html +++ /dev/null @@ -1,63 +0,0 @@ - - -prog2.c.html - - - - -Generated from prog2.c with ROBODoc v3.2.2 on Mon Apr 02 20:03:02 2001 -
-

TABLE OF CONTENTS

-
    -
  1. TEST/Prog2 -
  2. Prog2/Proc_Internal2 -
  3. Prog2/Proc_Normal2 -
-
- -

TEST/Prog2

- -NAME -
   Prog2 -- Test program 2. (v1.0)
-
COPYRIGHT -
   Maverick Software Development (C) 1995
-
FUNCTION -
  Totally nothing and useless.
-
AUTHOR -
  Jacco van Weert
-
MODIFICATION HISTORY -
   15-Feb-95 - v1.0 - First version
-
NOTES -
   Nothing special
-
-
- -

Prog2/Proc_Internal2

- -NAME -
    Proc_Internal2 -- Internal procedure test program. (v1.0)
-
SYNOPSIS -
    Proc_Internal2
-
FUNCTION -
    Just for fun.
-
INPUTS -
    No inputs
-
BUGS -
    The procedure does not exist :)
-
SEE ALSO -
  Proc_Normal1, Proc_Internal1, Proc_Normal2, prog1.c
-
-
- -

Prog2/Proc_Normal2

- -NAME -
    Proc_Normal2 -- Normal procedure. (v1.0)
-
SYNOPSIS -
    Proc_Normal2
-
FUNCTION -
    Useless.
-
SEE ALSO -
    Proc_Internal1, Proc_Normal1, prog1.c
-
- diff --git a/util/robodoc/Examples/CPP/makefile b/util/robodoc/Examples/CPP/makefile deleted file mode 100644 index 7fc75ae6..00000000 --- a/util/robodoc/Examples/CPP/makefile +++ /dev/null @@ -1,44 +0,0 @@ -# $Id$ - -ROBODOC=robodoc -DOCS=muppets.cpp.html muppets.h.html -XREF=$(DOCS:.html=.xref) - -all: masterindex.html - -myclean: - rm -f *~ - rm -f *.xref - rm -f *.xrefs - rm -f *.html - rm -f xref_files -# -# This makefile shows how with a few rules you can generate -# the documentation from all your sources. -# - -# -# create xrefs file (file with the names of all .xref files). -# -muppets.xrefs : $(XREF) - /bin/ls *.xref > $@ - -# -# Rule to create an .xref file. -# -%.xref : % muppets.xrefs - $(ROBODOC) $< $(@:.xref=.html) INTERNAL -g $@ -v - -# -# Rule to create an .html file. -# -%.html : % - $(ROBODOC) $< $@ HTML INTERNAL -x muppets.xrefs -v - -# -# -# -masterindex.html : muppets.xrefs $(DOCS) - $(ROBODOC) $< $@ INDEX HTML - - diff --git a/util/robodoc/Examples/CPP/masterindex.html b/util/robodoc/Examples/CPP/masterindex.html deleted file mode 100644 index 396d0aaf..00000000 --- a/util/robodoc/Examples/CPP/masterindex.html +++ /dev/null @@ -1,53 +0,0 @@ - - -Master Index File - - - - -Generated from muppets.xrefs with ROBODoc v3.2.2 on Mon Apr 02 20:03:03 2001 -
-

Master Index File

-

Source Files

- - - - - - - - - -
muppets.cppmuppets.h
-

Classes

- - - - - - - - - - - - - - -
puppetstage
-

Methods

- - - - - - - - - - - - - -
puppet::actpuppet::talkpuppet::walkstage::lights
stage::open_curtains
- diff --git a/util/robodoc/Examples/CPP/muppets.cpp b/util/robodoc/Examples/CPP/muppets.cpp deleted file mode 100644 index d5a96e13..00000000 --- a/util/robodoc/Examples/CPP/muppets.cpp +++ /dev/null @@ -1,51 +0,0 @@ - -/****m* Mupputs/puppet::walk - * NAME - * puppet::walk - * PURPOSE - * Let puppet walk. - ****** - */ - -/****m* Mupputs/puppet::talk - * NAME - * puppet::talk - * PURPOSE - * Let puppet talk. - ****** - */ - -/****m* Mupputs/puppet::act - * NAME - * puppet::act - * PURPOSE - * Let puppet walk and talk. - ****** - */ - - -/****m* Mupputs/stage::open_curtains - * NAME - * stage::open_curtains -- - * PURPOSE - * Open the curtains. - * SOURCE - */ - -void stage::open_curtains() -{ - lights(ON); -} - -/*********/ - - - -/****m* Mupputs/stage::lights - * NAME - * stage::lights -- switch lights on or off. - * PURPOSE - * Switch lights on or off. - ****** - */ - diff --git a/util/robodoc/Examples/CPP/muppets.cpp.html b/util/robodoc/Examples/CPP/muppets.cpp.html deleted file mode 100644 index db88b30e..00000000 --- a/util/robodoc/Examples/CPP/muppets.cpp.html +++ /dev/null @@ -1,68 +0,0 @@ - - -muppets.cpp.html - - - - -Generated from muppets.cpp with ROBODoc v3.2.2 on Mon Apr 02 20:03:03 2001 -
-

TABLE OF CONTENTS

-
    -
  1. Mupputs/puppet::walk -
  2. Mupputs/puppet::talk -
  3. Mupputs/puppet::act -
  4. Mupputs/stage::open_curtains -
  5. Mupputs/stage::lights -
-
- -

Mupputs/puppet::walk

- -NAME -
   puppet::walk
-
PURPOSE -
   Let puppet walk.
-
-
- -

Mupputs/puppet::talk

- -NAME -
   puppet::talk
-
PURPOSE -
   Let puppet talk.
-
-
- -

Mupputs/puppet::act

- -NAME -
   puppet::act
-
PURPOSE -
   Let puppet walk and talk.
-
-
- -

Mupputs/stage::open_curtains

- -NAME -
   stage::open_curtains -- 
-
PURPOSE -
   Open the curtains.
-
SOURCE -
    void stage::open_curtains()
-    {
-      lights(ON);
-    }    
-
-
- -

Mupputs/stage::lights

- -NAME -
   stage::lights -- switch lights on or off.
-
PURPOSE -
   Switch lights on or off.
-
- diff --git a/util/robodoc/Examples/CPP/muppets.h b/util/robodoc/Examples/CPP/muppets.h deleted file mode 100644 index 873cbc9f..00000000 --- a/util/robodoc/Examples/CPP/muppets.h +++ /dev/null @@ -1,25 +0,0 @@ - -/****c* Mupputs/puppet - * NAME - * pupput -- - * PURPOSE - * Little monsters that can walk and talk on a stage. - * METHODS - * puppet::walk -- make a puppet walk - * puppet::talk -- make a puppet talk - * puppet::act -- make a puppet act - ******* - */ - - -/****c* Mupputs/stage - * NAME - * stage -- the floor on which the puppets act. - * METHODS - * stage::open_curtains - * stage::lights - ****** - */ - - - diff --git a/util/robodoc/Examples/CPP/muppets.h.html b/util/robodoc/Examples/CPP/muppets.h.html deleted file mode 100644 index c91e78e3..00000000 --- a/util/robodoc/Examples/CPP/muppets.h.html +++ /dev/null @@ -1,38 +0,0 @@ - - -muppets.h.html - - - - -Generated from muppets.h with ROBODoc v3.2.2 on Mon Apr 02 20:03:03 2001 -
-

TABLE OF CONTENTS

-
    -
  1. Mupputs/puppet -
  2. Mupputs/stage -
-
- -

Mupputs/puppet

- -NAME -
   pupput --
-
PURPOSE -
   Little monsters that can walk and talk on a stage.
-
METHODS -
   puppet::walk -- make a puppet walk
-   puppet::talk -- make a puppet talk
-   puppet::act  -- make a puppet act
-
-
- -

Mupputs/stage

- -NAME -
   stage -- the floor on which the puppets act. 
-
METHODS -
   stage::open_curtains
-   stage::lights
-
- diff --git a/util/robodoc/Headers/assembler.sample b/util/robodoc/Headers/assembler.sample deleted file mode 100644 index dbf066b1..00000000 --- a/util/robodoc/Headers/assembler.sample +++ /dev/null @@ -1,63 +0,0 @@ -****h* main_module/module [1.0] * -* -* NAME -* -* COPYRIGHT -* -* FUNCTION -* -* AUTHOR -* -* CREATION DATE -* -* MODIFICATION HISTORY -* -* NOTES -* -******* - - -****f* module/procname [1.0] * -* -* NAME -* -* SYNOPSIS -* -* FUNCTION -* -* INPUTS -* -* RESULT -* -* EXAMPLE -* -* NOTES -* -* BUGS -* -* SEE ALSO -* -********** - - -****i* module/i_procname [1.0] * -* -* NAME -* -* SYNOPSIS -* -* FUNCTION -* -* INPUTS -* -* RESULT -* -* EXAMPLE -* -* NOTES -* -* BUGS -* -* SEE ALSO -* -********** diff --git a/util/robodoc/Headers/basic.sample b/util/robodoc/Headers/basic.sample deleted file mode 100644 index 22fca0c3..00000000 --- a/util/robodoc/Headers/basic.sample +++ /dev/null @@ -1,63 +0,0 @@ -REM ****h* main_module/module [1.0] * -REM -REM NAME -REM -REM COPYRIGHT -REM -REM FUNCTION -REM -REM AUTHOR -REM -REM CREATION DATE -REM -REM MODIFICATION HISTORY -REM -REM NOTES -REM -REM ***** - - -REM ***** module/procname [1.0] * -REM -REM NAME -REM -REM SYNOPSIS -REM -REM FUNCTION -REM -REM INPUTS -REM -REM RESULT -REM -REM EXAMPLE -REM -REM NOTES -REM -REM BUGS -REM -REM SEE ALSO -REM -REM ******** - - -REM ****i* module/i_procname [1.0] * -REM -REM NAME -REM -REM SYNOPSIS -REM -REM FUNCTION -REM -REM INPUTS -REM -REM RESULT -REM -REM EXAMPLE -REM -REM NOTES -REM -REM BUGS -REM -REM SEE ALSO -REM -REM ******** diff --git a/util/robodoc/Headers/c.sample b/util/robodoc/Headers/c.sample deleted file mode 100644 index beca449c..00000000 --- a/util/robodoc/Headers/c.sample +++ /dev/null @@ -1,46 +0,0 @@ -/****h* projectname/module_name [1.0] -* NAME -* COPYRIGHT -* FUNCTION -* AUTHOR -* CREATION DATE -* MODIFICATION HISTORY -* NOTES -******* -*/ - - -/****f* module_name/funtion_name [1.0] * -* NAME -* SYNOPSIS -* FUNCTION -* INPUTS -* RESULT -* EXAMPLE -* NOTES -* BUGS -* SEE ALSO -********** -*/ - - -/****s* module_name/stucture_name [1.0] * -* NAME -* PURPOSE -* ATTRIBUTES -* NOTES -* BUGS -* SEE ALSO -********** -*/ - - -/****v* module_name/variable_name [1.0] * -* NAME -* PURPOSE -* NOTES -* BUGS -* SEE ALSO -********** -*/ - diff --git a/util/robodoc/Headers/cpp.sample b/util/robodoc/Headers/cpp.sample deleted file mode 100644 index 056d33ff..00000000 --- a/util/robodoc/Headers/cpp.sample +++ /dev/null @@ -1,68 +0,0 @@ -/****h* projectname/module_name [1.0] -* NAME -* COPYRIGHT -* FUNCTION -* AUTHOR -* CREATION DATE -* MODIFICATION HISTORY -* NOTES -******* -*/ - - -/****f* module_name/funtion_name [1.0] * -* NAME -* SYNOPSIS -* FUNCTION -* INPUTS -* RESULT -* EXAMPLE -* NOTES -* BUGS -* SEE ALSO -********** -*/ - -/****f* module_name/funtion_name [1.0] * -* NAME -* SYNOPSIS -* FUNCTION -* INPUTS -* RESULT -* EXAMPLE -* NOTES -* BUGS -* SEE ALSO -* SOURCE -*/ - -example() - -/**********/ - - -/****c* module_name/class_name [1.0] * -* NAME -* PURPOSE -* METHODS -* DERIVED FROM -* DERIVED BY -* EXAMPLE -* NOTES -* BUGS -* SEE ALSO -********** -*/ - - -/****m* module_name/method_name [1.0] * -* NAME -* SYNOPSIS -* PURPOSE -* EXAMPLE -* NOTES -* BUGS -* SEE ALSO -********** -*/ - diff --git a/util/robodoc/Headers/fortan.sample b/util/robodoc/Headers/fortan.sample deleted file mode 100644 index b646a733..00000000 --- a/util/robodoc/Headers/fortan.sample +++ /dev/null @@ -1,63 +0,0 @@ -C ****h* main_module/module [1.0] * -C -C NAME -C -C COPYRIGHT -C -C FUNCTION -C -C AUTHOR -C -C CREATION DATE -C -C MODIFICATION HISTORY -C -C NOTES -C -C ***** - - -C ***** module/procname [1.0] * -C -C NAME -C -C SYNOPSIS -C -C FUNCTION -C -C INPUTS -C -C RESULT -C -C EXAMPLE -C -C NOTES -C -C BUGS -C -C SEE ALSO -C -C ******** - - -C ****i* module/i_procname [1.0] * -C -C NAME -C -C SYNOPSIS -C -C FUNCTION -C -C INPUTS -C -C RESULT -C -C EXAMPLE -C -C NOTES -C -C BUGS -C -C SEE ALSO -C -C ******** diff --git a/util/robodoc/Headers/html.sample b/util/robodoc/Headers/html.sample deleted file mode 100644 index 7f3e5576..00000000 --- a/util/robodoc/Headers/html.sample +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - -

Example Source

- - diff --git a/util/robodoc/Headers/tcl.sample b/util/robodoc/Headers/tcl.sample deleted file mode 100644 index be76e768..00000000 --- a/util/robodoc/Headers/tcl.sample +++ /dev/null @@ -1,39 +0,0 @@ -#****h* main_module/module [1.0] * -# NAME -# COPYRIGHT -# FUNCTION -# AUTHOR -# CREATION DATE -# MODIFICATION HISTORY -# NOTES -#****** -# - -#****f* module/procname [1.0] * -# NAME -# SYNOPSIS -# FUNCTION -# INPUTS -# RESULT -# EXAMPLE -# NOTES -# BUGS -# SEE ALSO -#******** -# - -#****f* module/procname [1.0] * -# NAME -# SYNOPSIS -# FUNCTION -# INPUTS -# RESULT -# EXAMPLE -# NOTES -# BUGS -# SEE ALSO -# SOURCE - -example() - -#******** diff --git a/util/robodoc/INSTALL b/util/robodoc/INSTALL deleted file mode 100644 index 3a22cdd4..00000000 --- a/util/robodoc/INSTALL +++ /dev/null @@ -1,49 +0,0 @@ -$Id$ - - -There are two possibilities, if you have a system that supports -auto configuration (most Unix systems), then use: - - ./configure - make - make docall - -become root and do - - make install - - -If your system does not support auto-configuration, then -have a look at Source/makefile.plain -you can build robodoc with - - - make -f makefile.plain - - -Additional documentation is provided in Docs/, in the form of -robodoc.html. For a good example of how to use ROBODoc see the -ROBODoc source code. To see what kind of documentation can -generated with ROBODoc, change to Source/ and do a - - make xhtml - make example - -or - - make -f makefile.plain example - -It assumes you have netscape installed. - -If you want to see the LaTeX documentation use - make xtex - make texview - gv ROBODoc_mi.ps - - -Also have a look at the example makefile in the Docs/ directory. - - -Have fun, -Frans. - diff --git a/util/robodoc/NEWS b/util/robodoc/NEWS deleted file mode 100644 index 0348612a..00000000 --- a/util/robodoc/NEWS +++ /dev/null @@ -1,17 +0,0 @@ -V3.2.3 o Bug fix. The crosslink generator did not recognize links that - contained a '/' and ended with an '.' or ','. - o make install installs additional documentation. - -V3.2.2 o Added a Master Index File for LaTeX output. - o New NOSOURCE option to exclude source items from the documentation. - o New SINGLEDOC option to all documentation to be included into one - single document. - o New TITLE option to set the title for a master index file. - example make files includes commands to view the - generated documentation. - o Made the search for remark markers case insensitive. So you - can use REM and Rem or even rEM. - -V3.2.1 Some small bugfixes, support for mailto:... links, and updates -in the manual. - diff --git a/util/robodoc/README b/util/robodoc/README deleted file mode 100644 index ed54c745..00000000 --- a/util/robodoc/README +++ /dev/null @@ -1,63 +0,0 @@ -_______________________________________________________________________________ - - - THIS IS MODIFIED VERSION OF ROBODOC FOR SILC DISTRIBUTION - - Pekka Riikonen - -_______________________________________________________________________________ - - -$Id$ - -ROBODoc Version 3.2.3 May 2001. - -ROBODoc is program documentation tool. The idea is to include for -every function or procedure a standard header containing all -sorts of information about the procedure or function. ROBODoc -extracts these headers from the source file and puts them in a -separate autodocs-file. ROBODoc thus allows you to include the -program documentation in the source code and avoid having to -maintain two separate documents. Or as Petteri puts it: "robodoc -is very useful - especially for programmers who don't like -writing documents with Word or some other strange tool." - -ROBODoc can format the headers in a number of different formats: -HTML, ASCII, AmigaGuide, LaTeX, or RTF. In HTML mode it can -generate cross links between headers. You can even include parts -of your source code. - -ROBODoc works with many programming languages: For instance C, -Pascal, Shell Scripts, Assembler, COBOL, Occam, Postscript, -Forth, Tcl/Tk, C++, Java -- basically any program in which you -can use remarks/comments. - - o For information on how to build and install see INSTALL - o For information on how to use ROBODoc see Docs/robodoc.html. - o Blank headers for various languages can be found in Headers/ - o For an example on how ROBODoc can be used - (1) The ROBODoc source code in Source/ - (2) The C++ example in Examples/CPP/ - o For licence information see COPYING - o For a change log see Source/robodoc.c - -Many people contributed to ROBODoc, to name a few: - -o Petteri Kettunen - Bug fixes, FOLD, C features. -o Bernd Koesling - Bug fixes, functional improvements, code cleanup. -o Anthon Pang - RTF support, Bug fixes. -o Thomas Aglassinger - Fixes and cleanup of HTML-output -o Stefan Kost kost@imn.htwk-leipzig.de - Idea of the master index file and different header types. - - -Questions, found a bug or a typo; send an email to - -(c) 1994-2000 Frans Slothouber and Jacco van Weert - - - diff --git a/util/robodoc/Source/analyser.c b/util/robodoc/Source/analyser.c deleted file mode 100644 index 0a6c0874..00000000 --- a/util/robodoc/Source/analyser.c +++ /dev/null @@ -1,677 +0,0 @@ -#include -#include -#include -#include - -#include "robodoc.h" -#include "headers.h" -#include "items.h" -#include "util.h" -#include "folds.h" -#include "links.h" -#include "analyser.h" - - -/****** ROBODoc/RB_Analyse_Document [3.0i] - * NAME - * RB_Analyse_Document -- scan document for headers and store them - * SYNOPSIS - * RB_Analyse_Document (document) - * RB_Analyse_Document (FILE *) - * FUNCTION - * Searches the document for headers. Stores information about - * any headers that are found in a linked list. Information - * that is stored includes, the name of the header, its version - * number, and its contents. - * INPUTS - * document - a pointer to a file with the document to be - * analysed - * the gobal buffer line_buffer. - * RESULT - * 1) A linked list pointed to by the global variable - * first_header that contains information about each - * header. - * NOTES - * Using fseek and ftell because gcc doesn't know fgetpos and fsetpos, - * on the sun unix system that I use. - * SEE ALSO - * RB_Find_Marker - * SOURCE - */ - -void -RB_Analyse_Document (FILE * document) -{ - int header_type; - int real_size; - char *name; - - for (; - (header_type = RB_Find_Marker (document)) != NO_HEADER; - ) - { - struct RB_header *new_header; - - if (! - ( - ((header_type == INTERNAL_HEADER) && - !(course_of_action & (DO_INCLUDE_INTERNAL | DO_INTERNAL_ONLY))) - || - ((header_type != INTERNAL_HEADER) && - (course_of_action & DO_INTERNAL_ONLY)) - || - (header_type == BLANK_HEADER) - ) - ) - { - long cur_file_pos; - - new_header = RB_Alloc_Header (); - RB_Insert_In_List (&first_header, new_header); - new_header->type = header_type; - if ((new_header->name = RB_Find_Header_Name ()) != NULL) - { - RB_Say ("found header [line %5d]: \"%s\"\n", - line_number, new_header->name); -#if 0 - if ((new_header->function_name - = RB_Function_Name (new_header->name)) == NULL) -#endif - if ((new_header->function_name - = RB_Function_Name (line_buffer)) == NULL) - { - RB_Panic ("Can't determine the \"function\" name.\n"); - } - cur_file_pos = (long) ftell (document); - if ((real_size = RB_Find_End_Marker (document, - &new_header->size)) - != 0) - { - char *contents; - - fseek (document, cur_file_pos, 0); - if ((contents = malloc ((new_header->size + - 2) * sizeof (char))) - != NULL) - { - fread (contents, new_header->size, sizeof (char), document); - - contents[real_size] = '\0'; - new_header->contents = contents; - new_header->size = real_size; - } - else - RB_Panic ("out of memory! [Alloc Header Contents]\n"); - } - else - { - RB_Panic ("found header with no end marker \"%s\"\n", - new_header->name); - } - } - else - { - RB_Panic ("found header marker but no name [line %d]\n", - line_number); - } - } - else - { - if (header_type != BLANK_HEADER) - { - if ((name = RB_Find_Header_Name ()) != NULL) - { - new_header = RB_Alloc_Header (); - if ((real_size = - RB_Find_End_Marker (document, &new_header->size)) - == 0) - { - RB_Free_Header (new_header); - RB_Panic ("found header with no end marker \"%s\"\n", name); - } - else - { - RB_Free_Header (new_header); - } - } - else - { - RB_Panic ("found header marker but no name [line %d]\n", - line_number); - } - } - } - } -} - -/****** END RB_Analyse_Document *******/ - - - - -/****f* ROBODoc/RB_Function_Name [2.0x] - * NAME - * RB_Function_Name -- get pointer to the function name. - * SYNOPSIS - * char *RB_NamePart(char *header_name) - * FUNCTION - * A header name is consists of two parts. The module name and - * the function name. This returns a pointer to the function name. - * The name "function name" is a bit obsolete. It is really the name - * of any of objects that can be documented; classes, methods, - * variables, functions, projects, etc. - * SOURCE - */ - -char * -RB_Function_Name (char *header_name) -{ - char *cur_char; - char c; - char *name; - - name = NULL; - if ((cur_char = header_name) != NULL) - { - for (; (c = *cur_char) != '\0'; ++cur_char) - { - if ('/' == *cur_char) - { - ++cur_char; - if (*cur_char) - name = cur_char; - } - } - } - if (name) { - char *temp; - temp = malloc((strlen(name) + 1) * sizeof(char)); - strcpy(temp, name); - return temp; - } else { - return (name); - } -} - -/*** RB_Name_Part ***/ - - - -/****** ROBODoc/RB_Find_Marker [3.0h] - * NAME - * RB_Find_Marker -- Search for header marker in document. - * SYNOPSIS - * header_type = RB_Find_Marker (document) - * int RB_Find_Marker (FILE *) - * FUNCTION - * Read document file line by line, and search each line for the - * any of the headers defined in the array header_markers - * INPUTS - * document - pointer to the file to be searched. - * the gobal buffer line_buffer. - * RESULT - * header type - * can be: - * (1) NO_HEADER - no header found, end of file reached - * (2) MAIN_HEADER - * (3) GENERIC_HEADER - * (4) INTERNAL_HEADER - * BUGS - * Bad use of feof(), fgets(). - * SEE ALSO - * RB_Find_End_Marker - * SOURCE - */ - -int -RB_Find_Marker (FILE * document) -{ - int found; - int marker, marker_type; - char *cur_char, *cur_mchar; - - marker_type = NO_HEADER; - cur_char = NULL; - found = FALSE; - while (!feof (document) && !found) - { - *line_buffer = '\0'; - fgets (line_buffer, MAX_LINE_LEN, document); - if (!feof (document)) - { - line_number++; - for (marker = 0; - ((cur_mchar = header_markers[marker]) != NULL) && !found; - marker++) - { - for (found = TRUE, cur_char = line_buffer; - *cur_mchar && *cur_char && found; - cur_mchar++, cur_char++) - { - if (tolower(*cur_mchar) != tolower(*cur_char)) - found = FALSE; - } - } - if (found) - { - switch (*cur_char) - { - case 'h': - marker_type = MAIN_HEADER; - break; - case '*': - marker_type = GENERIC_HEADER; - break; - case 'i': - marker_type = INTERNAL_HEADER; - break; - case 'f': - marker_type = FUNCTION_HEADER; - break; - case 's': - marker_type = STRUCT_HEADER; - break; - case 'c': - marker_type = CLASS_HEADER; - break; - case 'm': - marker_type = METHOD_HEADER; - break; - case 'd': - marker_type = CONSTANT_HEADER; - break; - case 'v': - marker_type = VARIABLE_HEADER; - break; - default: - RB_Say ("%s: WARNING, [line %d] undefined headertype," - " using GENERIC\n", whoami, line_number); - marker_type = GENERIC_HEADER; - } - } - } - } - if (!found || feof (document)) - { - marker_type = NO_HEADER; - } - else if (marker_type == GENERIC_HEADER) - { - skip_while (*cur_char == '*'); - if (*cur_char == '/') - { - marker_type = BLANK_HEADER; - } - } - return marker_type; -} - -/******** END RB_Find_Marker ******/ - - -/****** ROBODoc/RB_Find_End_Marker [3.0h] - * NAME - * RB_Find_End_Marker -- Search for end marker in document. - * SYNOPSIS - * result = RB_Find_End_Marker (document) - * int RB_Find_End_Marker (FILE *) - * FUNCTION - * Searches line by line till any of the markers in the - * array: end_markers is found. - * INPUTS - * document - pointer to the file to be searched. - * int *total_size - external size - * the gobal buffer line_buffer. - * RESULT - * real_size if end marker was found - * 0 - no end marker was found - * SEE ALSO - * RB_Find_Marker - * SOURCE - */ - -int -RB_Find_End_Marker (FILE * document, int *total_size) -{ - int real_size = 0; - int found = FALSE; - int marker; - int line_len = 0; - char *cur_char, *cur_mchar; - - while (!feof (document) && !found) - { - cur_char = line_buffer; - *cur_char = '\0'; - fgets (cur_char, MAX_LINE_LEN, document); - ++line_number; /* global linecounter *koessi */ - - line_len = strlen (cur_char); - real_size += line_len; - - if (!feof (document)) - { - for (marker = 0; - ((cur_mchar = end_markers[marker]) != NULL) && !found; - marker++) - { - for (found = TRUE, cur_char = line_buffer; - *cur_mchar && *cur_char && found; - cur_mchar++, cur_char++) - { - if (tolower(*cur_mchar) != tolower(*cur_char)) - found = FALSE; - } - } - } - } - if (total_size) - *total_size = real_size; - if (found) - return real_size - line_len; - else - return 0; -} - -/***** RB_Find_End_Marker *****/ - - -/****** ROBODoc/RB_Find_Header_Name [3.0b] - * NAME - * RB_Find_Header_Name -- search for header name - * SYNOPSIS - * result = RB_Find_Header_Name () - * char *RB_Find_Header_Name () - * FUNCTION - * Searches the line buffer for the header name. - * It assumes that the header name follows after the - * header marker, seperated by one or more spaces, and terminated - * by one or more spaces or a '\n'. - * It allocates an array of chars and copies the name to this array. - * INPUTS - * the gobal buffer line_buffer. - * RESULT - * pointer to the allocated array of chars that contains the name, - * terminated with a '\0'. - * NULL if no header name was found. - * MODIFICATION HISTORY - * 8. August 1995 -- optimized by koessi - * SEE ALSO - * RB_Find_Function_Name(), RB_WordLen(), RB_StrDup() - * SOURCE - */ - -char * -RB_Find_Header_Name (void) -{ - char *cur_char; - - cur_char = line_buffer; - skip_while (*cur_char != '*'); - skip_while (!isspace (*cur_char)); - skip_while (isspace (*cur_char)); - if (*cur_char) - { - char *n; - int len; - - if (strchr(cur_char, '\n')) - *strchr(cur_char, '\n') = '\0'; - - len = RB_WordLen(cur_char); - - n = calloc(len + 1, sizeof(*cur_char)); - strncpy(n, cur_char, len); - return n; - } - return (NULL); -} - -/***** RB_Find_Header_Name *****/ - - -/****** ROBODoc/RB_Find_Item [3.0b] - * NAME - * RB_Find_Item -- find item in header contents. - * SYNOPSIS - * item_type = RB_Find_Item (next_line,item_line) - * - * int RB_Find_Item (char **, char **) - * FUNCTION - * Searches the header contents line by line, looking - * for an item Indicator. - * INPUTS - * next_line - pointer to a pointer that points to line - * at which the search will start. - * SIDE-EFFECTS - * next_line - pointer to a pointer that points to begin of the line - * after the line the item was found on. - * item_line - pointer to a pointer that points to the line the item - * was found on. - * RESULT - * item_type - one of possible items indicators. - * SOURCE - */ - -int -RB_Find_Item (char **next_line, char **item_line) -{ - char *cur_char = *next_line; - int item_type; - - for (item_type = NO_ITEM; - *cur_char && (item_type == NO_ITEM); - ) - { - *item_line = cur_char; - cur_char = RB_Skip_Remark_Marker (cur_char); - - skip_while (isspace (*cur_char) && *cur_char != '\n'); - if (isupper (*cur_char)) - { - char *item_begin = cur_char; - char *item_end; - - skip_while (isupper (*cur_char)); - item_end = cur_char; - if (isspace (*cur_char) && *cur_char) - { - skip_while (isspace (*cur_char) && *cur_char != '\n'); - - /* Item consists of two words ? */ - if (isupper (*cur_char) && *cur_char) - { - skip_while (isupper (*cur_char)); - item_end = cur_char; - skip_while (isspace (*cur_char) && *cur_char != '\n'); - } - if (*cur_char == '\n') - { - char old_char = *item_end; - - *item_end = '\0'; - item_type = RB_Get_Item_Type (item_begin); - *item_end = old_char; - cur_char++; - } - } - } - if (item_type == NO_ITEM) - { - find_eol; - if (*cur_char) - cur_char++; - } - } - - /* advance item_line to end of comment block when we have no more items */ - if (item_type == NO_ITEM) - { - *item_line = cur_char; - } - *next_line = cur_char; - return item_type; -} - -/***** RB_Find_Item *****/ - - -/****** ROBODoc/RRB_Number_Duplicate_Headers - * NAME - * RB_Number_Duplicate_Headers -- number duplicate headers - * SYNOPSIS - * RB_Number_Duplicate_Headers (void) - * FUNCTION - * Extends the function name with an additional number if there - * are several components with the same name. - * Otherwise there will be labels with the same name in HTML - * which confuses the browser. - * SOURCE - */ - -void -RB_Number_Duplicate_Headers (void) -{ - struct RB_header *cur_header; - struct RB_header *dup_header; - for (cur_header = first_header; - cur_header; - cur_header = cur_header->next_header) - { - char number[20]; - int nr = 0; - for (dup_header = cur_header->next_header; - dup_header; - dup_header = dup_header->next_header) - { - if (strcmp(cur_header->function_name, - dup_header->function_name) == 0) { - char *new_name; - nr++; - sprintf(number, "(%d)", nr); - new_name = malloc ((strlen(number) + 1 + - strlen(dup_header->function_name) + 1 ) * sizeof(char)); - if (new_name == NULL) - RB_Panic ("out of memory! [Number Duplicates]\n"); - sprintf(new_name, "%s%s", dup_header->function_name, - number); - free(dup_header->function_name); - dup_header->function_name = new_name; - } - } - } -} - -/******/ - - -/****** ROBODoc/RB_Make_Index_Tables [3.0b] - * NAME - * RB_Make_Index_Tables - * SYNOPSIS - * void RB_Make_Index_Tables (void) - * FUNCTION - * Creates sorted index tables of headers and links to speed up - * matching links later on. - * INPUTS - * none - * SIDE EFFECTS - * Modifies header_index & link_index - * RESULT - * none - * SOURCE - */ - -void -RB_Make_Index_Tables () -{ - int nr_of_headers, header; - int nr_of_links, link; - struct RB_link *cur_link; - struct RB_header *cur_header; - - for (cur_header = first_header, nr_of_headers = 0; - cur_header; - cur_header = cur_header->next_header) - nr_of_headers++; - - for (cur_link = first_link, nr_of_links = 0; - cur_link; - cur_link = cur_link->next_link) - nr_of_links++; - - if (nr_of_headers) - { - int sort1, sort2; - - RB_Say ("Allocating Header Index Table\n"); - header_index = malloc (nr_of_headers * sizeof (struct RB_header **)); - - header_index_size = nr_of_headers; - if (!header_index) - RB_Panic ("out of memory! [Make Index Tables]\n"); - - /* Fill Index Table */ - for (cur_header = first_header, header = 0; - cur_header; - cur_header = cur_header->next_header, header++) - header_index[header] = cur_header; - - /* Sort Index Table */ - RB_Say ("Sorting Header Index Table\n"); - for (sort1 = 0; sort1 < nr_of_headers; sort1++) - { - struct RB_header *temp; - - for (sort2 = sort1; sort2 < nr_of_headers; sort2++) - { - if (strcmp (header_index[sort1]->function_name, - header_index[sort2]->function_name) > 0) - { - temp = header_index[sort1]; - header_index[sort1] = header_index[sort2]; - header_index[sort2] = temp; - } - } - } - } - if (nr_of_links) - { - int sort1, sort2; - - RB_Say ("Allocating Link Index Table\n"); - link_index = malloc (nr_of_links * sizeof (struct RB_link **)); - - link_index_size = nr_of_links; - if (!link_index) - RB_Panic ("out of memory! [Make Index Tables]\n"); - - /* Fill Index Table */ - for (cur_link = first_link, link = 0; - cur_link; - cur_link = cur_link->next_link, link++) - { - link_index[link] = cur_link; - } - - /* Sort Index Table */ - RB_Say ("Sorting Link Index Table\n"); - for (sort1 = 0; sort1 < nr_of_links; sort1++) - { - struct RB_link *temp; - - for (sort2 = sort1; sort2 < nr_of_links; sort2++) - { - if (strcmp (link_index[sort1]->label_name, - link_index[sort2]->label_name) > 0) - { - temp = link_index[sort1]; - link_index[sort1] = link_index[sort2]; - link_index[sort2] = temp; - } - } - } - } -} - -/****** RB_Make_Index_Tables *****/ diff --git a/util/robodoc/Source/analyser.h b/util/robodoc/Source/analyser.h deleted file mode 100644 index ce1be2a1..00000000 --- a/util/robodoc/Source/analyser.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef ROBODOC_ANALYSER_H -#define ROBODOC_ANALYSER_H - -void RB_Analyse_Document (FILE *); -int RB_Find_Marker (FILE *); -char *RB_Find_Header_Name (void); -int RB_Find_End_Marker (FILE *, int *); -int RB_Find_Item (char **, char **); -void RB_Number_Duplicate_Headers(void); -void RB_Make_Index_Tables (void); -char *RB_Function_Name (char *header_name); - -#endif /* ROBODOC_ANALYSER_H */ diff --git a/util/robodoc/Source/config.h.in b/util/robodoc/Source/config.h.in deleted file mode 100644 index 44659489..00000000 --- a/util/robodoc/Source/config.h.in +++ /dev/null @@ -1,29 +0,0 @@ -/* Source/config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Define to empty if the keyword does not work. */ -#undef const - -/* Define if you don't have vprintf but do have _doprnt. */ -#undef HAVE_DOPRNT - -/* Define if you have the strftime function. */ -#undef HAVE_STRFTIME - -/* Define if you have the vprintf function. */ -#undef HAVE_VPRINTF - -/* Define to `unsigned' if doesn't define. */ -#undef size_t - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if you have the strstr function. */ -#undef HAVE_STRSTR - -/* Name of package */ -#undef PACKAGE - -/* Version number of package */ -#undef VERSION - diff --git a/util/robodoc/Source/folds.c b/util/robodoc/Source/folds.c deleted file mode 100644 index 4138b707..00000000 --- a/util/robodoc/Source/folds.c +++ /dev/null @@ -1,141 +0,0 @@ -#include -#include -#include "robodoc.h" -#include "folds.h" - - -/****v* ROBODoc/fold_start_markers - * NAME - * fold_start_markers - * FUNCTION - * Strings for fold start. - * SOURCE - */ -fold_mark_t fold_start_markers[] = -{ - {"/*{{{", "*/"}, /* C, C++ */ - {"--{{{", "\n"}, /* Occam, line ends with newline */ - {"#{{{", "\n"}, /* Various scripts, line ends with newline */ - {NULL, NULL} -}; - -/****/ - - -/****v* ROBODoc/fold_end_markers - * NAME - * fold_start_end - * FUNCTION - * Strings for fold end. - * SOURCE - */ -fold_mark_t fold_end_markers[] = -{ - {"/*}}}", "*/"}, - {"--}}}", "\n"}, - {"#}}}", "\n"}, - {NULL, NULL} -}; - -/****/ - -int extra_flags = 0; - -/****v* ROBODoc/fold -* NAME -* fold -* FUNCTION -* Fold counter - true global. -* SOURCE -*/ - -int fold = 0; - -/****/ - - - -/****f* ROBODoc/RB_Check_Fold_End [3.0h] -* NAME -* RB_Check_Fold_End -* AUTHOR -* PetteriK -* FUNCTION -* See if a fold end is found. -* RETURN VALUE -* 1 if end mark is found -* SOURCE -*/ - -char -RB_Check_Fold_End (char *cur_char) -{ - fold_mark_t *t = fold_end_markers; - char found = 0; - - while (found == 0 && t->start != NULL) - { - if (strncmp (t->start, cur_char, strlen (t->start)) == 0) - { - found = 1; - break; - } - t++; /* try the next fold mark string */ - } - return found; -} - -/*******/ - -/****f* ROBODoc/RB_Check_Fold_Start - * NAME - * RB_Check_Fold_Start - * AUTHOR - * PetteriK - * FUNCTION - * Check if a fold start is found. - * RETURN VALUE - * Pointer to the item body, fold mark and name skipped. - * SIDE EFFECTS - * *found = 1 if fold mark is found. Fold name is copied to *foldname. - ******* - */ - -char * -RB_Check_Fold_Start (char *cur_char, char *foldname, char *found) -{ - int n = 0; - fold_mark_t *t = fold_start_markers; - - *found = 0; - while (*found == 0 && t->start != NULL) - { - if (strncmp (t->start, cur_char, strlen (t->start)) == 0) - { - *found = 1; - break; - } - t++; /* try the next fold mark string */ - } - if (*found == 0) - { - return cur_char; /* not found, get out of here */ - } - cur_char += strlen (t->start); /* skip fold mark */ - /* get the fold name */ - while (strncmp (t->end, cur_char, strlen (t->end)) != 0) - { - foldname[n++] = *cur_char++; - } - /* if fold mark does not end with newline, skip chars... */ - if (t->end[0] != '\n') - { - cur_char += strlen (t->end); - } - foldname[n] = '\0'; - while (*cur_char != '\n') - { - cur_char++; /* not so sure about this */ - } - return cur_char; -} diff --git a/util/robodoc/Source/folds.h b/util/robodoc/Source/folds.h deleted file mode 100644 index 93d8df39..00000000 --- a/util/robodoc/Source/folds.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef ROBODOC_FOLDS_H -#define ROBODOC_FOLDS_H - - - -/****s* ROBODoc/fold_mark_t - * NAME - * fold_mark_t - * FUNCTION - * Handy structure for fold start/end markers. - * SOURCE - */ - -typedef struct _fold_mark_t - { - char *start; - char *end; - } -fold_mark_t; - -/*******/ - -/****d* ROBODoc/extra_flags -* NAME -* extra_flags -* AUTHOR -* PetteriK -* FUNCTION -* Bitflags for extra controls. -* SOURCE -*/ - -#define FOLD (1<<0) -#define C_MODE (1<<1) - - -/****/ - -extern fold_mark_t fold_start_markers[]; -extern fold_mark_t fold_end_markers[]; -extern int extra_flags; -extern int fold; - -char RB_Check_Fold_End (char *cur_char); -char *RB_Check_Fold_Start (char *cur_char, char *foldname, char *found); - -#endif /* ROBODOC_FOLDS_H */ diff --git a/util/robodoc/Source/generator.c b/util/robodoc/Source/generator.c deleted file mode 100644 index 632c2990..00000000 --- a/util/robodoc/Source/generator.c +++ /dev/null @@ -1,1729 +0,0 @@ -#include -#include -#include -#include -#include "robodoc.h" -#include "headers.h" -#include "items.h" -#include "folds.h" -#include "util.h" -#include "links.h" -#include "generator.h" -#include "analyser.h" -#include - -/****f* ROBODoc/RB_Generate_Documentation [3.0h] - * NAME - * RB_Generate_Documentation - * SYNOPSIS - * RB_Generate_Documentation (dest_doc, name, name) - * - * RB_Generate_Documentation (FILE *, char *, char *) - * FUNCTION - * Generates the autodoc documentation from the list of - * function headers that has been created by - * RB_Analyse_Document. - * INPUTS - * dest_doc - Pointer to the file to which the output will be written. - * src_name - The name of the source file. - * dest_name - The name of this file. - * BUGS - * There might be plenty. - * SEE ALSO - * RB_Generate_Doc_Start, - * RB_Generate_Doc_End, - * RB_Generate_Header_Start, - * RB_Generate_Header_End, - * RB_Generate_Header_Name, - * RB_Generate_Item_Name, - * RB_Generate_Item_Doc, - * RB_Generate_Item_Body . - * SOURCE - */ - -void -RB_Generate_Documentation ( - FILE * dest_doc, char *src_name, char *dest_name) -{ - struct RB_header *cur_header; - char fname[256]; - FILE *orig_doc = dest_doc; - - RB_Make_Index_Tables (); - - RB_Generate_Doc_Start (dest_doc, src_name, dest_name, 1); - - for (cur_header = first_header; - cur_header; - cur_header = cur_header->next_header) - { - int item_type; - char *next_line, *item_line = NULL; - - RB_Say ("generating documentation for \"%s\"\n", cur_header->name); - -#if 1 - /* If MAIN_HEADER, do not create file */ - if (cur_header->type == MAIN_HEADER) - continue; -#endif - - if (output_mode == HTML) - { - sprintf(fname, "%s-%s.html", doc_base, cur_header->function_name); - dest_doc = fopen(fname, "w"); - if (!dest_doc) - { - fprintf(stderr, "%s\n", strerror(errno)); - exit(1); - } - } - - RB_Generate_Header_Start (dest_doc, cur_header, src_name); - - next_line = cur_header->contents; - item_type = RB_Find_Item (&next_line, &item_line); - - if (item_type != NO_ITEM) - { - int old_item_type; - char *old_next_line; - - do - { - if (course_of_action & DO_TELL) - printf ("[%s] ", item_names[item_type]); - - if (!((item_type == SOURCE_ITEM) && - (course_of_action & DO_NOSOURCE))) - RB_Generate_Item_Name (dest_doc, item_type); - - old_next_line = next_line; - old_item_type = item_type; - - item_type = RB_Find_Item (&next_line, &item_line); - - if (!((old_item_type == SOURCE_ITEM) && - (course_of_action & DO_NOSOURCE))) - RB_Generate_Item_Doc (dest_doc, dest_name, - old_next_line, item_line, - cur_header->function_name, - old_item_type); - } - while (item_type != NO_ITEM); - if (course_of_action & DO_TELL) - putchar ('\n'); - } - else - printf ("%s: WARNING, header \"%s\" has no items\n", - whoami, cur_header->name); - - RB_Generate_Header_End (dest_doc, cur_header); - - if (output_mode == HTML) - fclose(dest_doc); - } - - dest_doc = orig_doc; - RB_Generate_Doc_End (dest_doc, dest_name); -} - -/***** RB_Generate_Documentation ***/ - - - - - -/****f* ROBODoc/RB_Generate_Doc_Start [3.0j] - * NAME - * RB_Generate_Doc_Start -- Generate document header. - * SYNOPSIS - * RB_Generate_Doc_Start (dest_doc, src_name, name, toc) - * - * RB_Generate_Doc_Start (FILE *, char *, char *, char) - * FUNCTION - * Generates for depending on the output_mode the text that - * will be at the start of a document. - * Including the table of contents. - * INPUTS - * dest_doc - pointer to the file to which the output will - * be written. - * src_name - the name of the source file. - * name - the name of this file. - * output_mode - global variable that indicates the output - * mode. - * toc - generate table of contens - * SEE ALSO - * RB_Generate_Doc_End - * SOURCE - */ - -void -RB_Generate_Doc_Start ( - FILE * dest_doc, char *src_name, char *name, char toc) -{ - struct RB_header *cur_header; - int cur_len, max_len, header_nr; - - switch (output_mode) - { - case AMIGAGUIDE: - if (strstr (name + 1, ".guide") == NULL) - fprintf (dest_doc, "@database %s.guide\n", name); - else - fprintf (dest_doc, "@database %s\n", name); - fprintf (dest_doc, "@rem Source: %s\n", src_name); -/* fprintf (dest_doc, "@rem " COMMENT_ROBODOC); */ - fprintf (dest_doc, "@rem " COMMENT_COPYRIGHT); - fprintf (dest_doc, "@node Main %s\n", name); - fprintf (dest_doc, "@{jcenter}\n"); - fprintf (dest_doc, - "@{fg highlight}@{b}TABLE OF CONTENTS@{ub}@{fg text}\n\n"); - - max_len = 0; - for (cur_header = first_header; - cur_header; - cur_header = cur_header->next_header) - { - if (cur_header->name) - { - cur_len = strlen (cur_header->name); - if (cur_len > max_len) - max_len = cur_len; - } - } - - for (cur_header = first_header; - cur_header; - cur_header = cur_header->next_header) - { - if (cur_header->name && cur_header->function_name) - { - fprintf (dest_doc, "@{\"%s", cur_header->name); - - for (cur_len = strlen (cur_header->name); - cur_len < max_len; - ++cur_len) - fputc (' ', dest_doc); - fprintf (dest_doc, "\" Link \"%s\"}\n", cur_header->function_name); - } - } - - fprintf (dest_doc, "@{jleft}\n"); - fprintf (dest_doc, "@endnode\n"); - break; - - case HTML: - /* Append document type and title */ - fprintf (dest_doc, - "\n"); - fprintf (dest_doc, "\n%s\n", name); - - /* append SGML-comment with document- and copyright-info. This code - * ensures that every line has an own comment to avoid problems with - * buggy browsers */ - fprintf (dest_doc, "\n", src_name); - { - static const char copyright_text[] - = COMMENT_ROBODOC COMMENT_COPYRIGHT; - size_t i = 0; - char previous_char = '\n'; - char current_char = copyright_text[i]; - - while (current_char) - { - if (previous_char == '\n') - { - fprintf (dest_doc, ""); - } - else if ((current_char == '-') && (previous_char == '-')) - { - /* avoid "--" inside SGML-comment, and use "-_" instead; this - * looks a bit strange, but one should still be able to figure - * out what is meant when reading the output */ - current_char = '_'; - } - fputc (current_char, dest_doc); - i += 1; - previous_char = current_char; - current_char = copyright_text[i]; - } - } - - /* append heading and start list of links to functions */ - fprintf (dest_doc, "\n"); -#if 0 - fprintf (dest_doc, "Generated from %s with ROBODoc v" - VERSION - " on ", - src_name, src_name); - RB_TimeStamp (dest_doc); -#endif - fprintf (dest_doc, "
\n"); - if (toc) - { - char iname[256]; - FILE *index; - int start = 0; - - /* do toc if not in fold */ -#if 0 - fprintf (dest_doc, - "

TABLE OF CONTENTS

\n"); - fprintf (dest_doc, "
    \n"); -#endif - - /* Generate quick index file, for fast referencing */ - sprintf(iname, "%s-index.tmpl", doc_base); - index = fopen(iname, "w"); - if (!index) - { - fprintf(stderr, "%s\n", strerror(errno)); - exit(1); - } - - for (cur_header = first_header; - cur_header; - cur_header = cur_header->next_header) - { - char fname[256]; - - sprintf(fname, "%s-%s.html", RB_FilePart(doc_base), - cur_header->function_name); - - if (cur_header->name && cur_header->function_name) - { - if (start == 0) - { - int item_type; - char *next_line, *item_line = NULL; - - RB_Generate_Header_Start (dest_doc, cur_header, - src_name); - - next_line = cur_header->contents; - item_type = RB_Find_Item (&next_line, &item_line); - - if (item_type != NO_ITEM) - { - int old_item_type; - char *old_next_line; - - do - { - if (course_of_action & DO_TELL) - printf ("[%s] ", item_names[item_type]); - - if (!((item_type == SOURCE_ITEM) && - (course_of_action & DO_NOSOURCE))) - RB_Generate_Item_Name (dest_doc, item_type); - - old_next_line = next_line; - old_item_type = item_type; - - item_type = RB_Find_Item (&next_line, - &item_line); - - if (!((old_item_type == SOURCE_ITEM) && - (course_of_action & DO_NOSOURCE))) - RB_Generate_Item_Doc(dest_doc, name, - old_next_line, item_line, - cur_header->function_name, - old_item_type); - } - while (item_type != NO_ITEM); - if (course_of_action & DO_TELL) - putchar ('\n'); - } - - if (index) - { - fprintf (index, "\"\"%s
    \n", - name, cur_header->function_name); - } - - start = 1; - } - else - { - fprintf (dest_doc, "
  1. %s\n", - fname, cur_header->function_name); - if (index) - fprintf (index, "\"\"%s
    \n", - fname, cur_header->function_name); - } - } - } - -#if 0 - fprintf (dest_doc, "
\n"); -#endif - - if (index) - fclose(index); - } - break; - - case LATEX: - fprintf (dest_doc, "%% Document: %s\n", name); - fprintf (dest_doc, "%% Source: %s\n", src_name); -/* fprintf (dest_doc, "%% " COMMENT_ROBODOC);*/ - fprintf (dest_doc, "%% " COMMENT_COPYRIGHT); - if (course_of_action & DO_SINGLEDOC) { - if (!strchr(src_name, '_')) { - fprintf (dest_doc, "\\section{%s}\n", src_name); - } else { - char *tmp = calloc(strlen(src_name) + 2, sizeof(*tmp)); - *strchr(src_name, '_') = '\\'; - strncat(tmp, src_name, strcspn(src_name, "\\") + 1); - strncat(tmp, "_", 1); - strncat(tmp, src_name + strcspn(src_name, "\\") + 1, - strlen(src_name) - strcspn(src_name, "\\") - 1); - fprintf (dest_doc, "\\section{%s}\n", tmp); - free(tmp); - } - } else { - fprintf (dest_doc, "\\documentclass{article}\n"); - fprintf (dest_doc, "\\usepackage{makeidx}\n"); - fprintf (dest_doc, "\\oddsidemargin 0.15 in\n"); - fprintf (dest_doc, "\\evensidemargin 0.35 in\n"); - fprintf (dest_doc, "\\marginparwidth 1 in \n"); - fprintf (dest_doc, "\\oddsidemargin 0.25 in \n"); - fprintf (dest_doc, "\\evensidemargin 0.25 in\n"); - fprintf (dest_doc, "\\marginparwidth 0.75 in\n"); - fprintf (dest_doc, "\\textwidth 5.875 in\n"); - - fprintf (dest_doc, "\\setlength{\\parindent}{0in}\n"); - fprintf (dest_doc, "\\setlength{\\parskip}{.08in}\n\n"); - - /* changed default header to use boldface (vs slant) */ - fprintf (dest_doc, "\\pagestyle{headings}\n"); - - if (document_title) { - fprintf (dest_doc, "\\title{%s}\n", - document_title); - } else { - fprintf (dest_doc, "\\title{API Reference}\n"); - } -/* fprintf (dest_doc, "\\author{%s}\n", COMMENT_ROBODOC); */ - fprintf (dest_doc, "\\makeindex\n"); - fprintf (dest_doc, "\\begin{document}\n"); - fprintf (dest_doc, "\\maketitle\n"); - /* autogenerate table of contents! */ - fprintf (dest_doc, "\\printindex\n"); - fprintf (dest_doc, "\\tableofcontents\n"); - fprintf (dest_doc, "\\newpage\n"); - /* trick to disable the autogenerated \newpage */ - fprintf (dest_doc, "\n"); - } - break; - - case RTF: - { - char *cook_link; - - /* RTF header */ - fprintf (dest_doc, "{\\rtf1\\ansi \\deff0" - "{\\fonttbl;" - "\\f0\\fswiss MS Sans Serif;" - "\\f1\\fmodern Courier New;" - "\\f2\\ftech Symbol;" - "}" - "{\\colortbl;" - "\\red255\\green255\\blue255;" - "\\red0\\green0\\blue0;" - "\\red0\\green0\\blue255;" - "}"); - - /* RTF document info */ - fprintf (dest_doc, "{\\info" - "{\\title %s}" - "{\\comment\n" - " Source: %s\n" - " " COMMENT_COPYRIGHT - "}" - "}", name, src_name); - - /* RTF document format */ - fprintf (dest_doc, "{\\margl1440\\margr1440}\n"); - - /* RTF document section */ - fprintf (dest_doc, "\\f0\\cb1\\cf3\\fs28\\b1\\qc" - "{\\super #{\\footnote{\\super #}%s_TOC}}" - "{\\super ${\\footnote{\\super $}Contents}}" - "{TABLE OF CONTENTS}\\ql\\b0\\fs20\\cf2\\par\n", src_name); - for (cur_header = first_header; - cur_header; - cur_header = cur_header->next_header) - { - if (cur_header->name && cur_header->function_name) - { - cook_link = RB_CookStr (cur_header->function_name); - fprintf (dest_doc, "{\\uldb %s}{\\v %s}\\line\n", - cur_header->name, cook_link); - free (cook_link); - } - } - fprintf (dest_doc, "\\par\n"); - } - break; - case ASCII: - if (course_of_action & DO_TOC) - { - fprintf (dest_doc, "TABLE OF CONTENTS\n"); - for (cur_header = first_header, header_nr = 1; - cur_header; - cur_header = cur_header->next_header, header_nr++) - { - if (cur_header->name && cur_header->function_name) - { - fprintf (dest_doc, "%4.4d %s\n", - header_nr, cur_header->name); - } - } - fputc ('\f', dest_doc); - } - default: - break; - } -} - -/***************/ - - -/****f* ROBODoc/RB_Generate_Doc_End [3.0h] - * NAME - * RB_Generate_Doc_End -- generate document trailer. - * SYNOPSIS - * RB_Generate_Doc_End (dest_doc, name) - * - * RB_Generate_Doc_End (FILE *, char *) - * FUNCTION - * Generates for depending on the output_mode the text that - * will be at the end of a document. - * INPUTS - * dest_doc - pointer to the file to which the output will - * be written. - * name - the name of this file. - * output_mode - global variable that indicates the output - * mode. - * NOTES - * Doesn't do anything with its arguments, but that might - * change in the future. - * BUGS - * SOURCE - */ - -void -RB_Generate_Doc_End (FILE * dest_doc, char *name) -{ - switch (output_mode) - { - case AMIGAGUIDE: - fputc ('\n', dest_doc); - break; - case HTML: - fprintf (dest_doc, "\n"); - break; - case LATEX: - if (!(course_of_action & DO_SINGLEDOC)) { - fprintf (dest_doc, "\\end{document}\n"); - } - break; - case RTF: - fputc ('}', dest_doc); - break; - case ASCII: - break; - } -} - -/************/ - - -/****f* ROBODoc/RB_Generate_Header_Start [3.0h] - * NAME - * RB_Generate_Header_Start -- generate header start text. - * SYNOPSIS - * void RB_Generate_Header_Start (dest_doc, cur_header) - * - * void RB_Generate_Header_Start (FILE *, struct RB_header *) - * FUNCTION - * Generates depending on the output_mode the text that - * will be at the end of each header. - * INPUTS - * dest_doc - pointer to the file to which the output will - * be written. - * cur_header - pointer to a RB_header structure. - * SEE ALSO - * RB_Generate_Header_End - * SOURCE - */ - -void -RB_Generate_Header_Start (FILE * dest_doc, struct RB_header *cur_header, - const char *src_name) -{ - char *cook_link; - - switch (output_mode) - { /* switch by *koessi */ - case AMIGAGUIDE: - if (cur_header->name && cur_header->function_name) - { - fprintf (dest_doc, "@Node \"%s\" \"%s\"\n", - cur_header->function_name, - cur_header->name); - fprintf (dest_doc, "%s", att_start_command[MAKE_SHINE][output_mode]); - fprintf (dest_doc, "%s", cur_header->name); - fprintf (dest_doc, "%s", att_stop_command[MAKE_SHINE][output_mode]); - fprintf (dest_doc, "\n\n"); - } - break; - case HTML: - if (cur_header->name && cur_header->function_name) - { -#if 0 - fprintf (dest_doc, "
\n"); -#endif - if (cur_header->type == FUNCTION_HEADER) - fprintf (dest_doc, - "\n" - "Function %s" - "

\n\n", - cur_header->function_name, - cur_header->function_name); - else if (cur_header->type == STRUCT_HEADER) - fprintf (dest_doc, - "\n" - "Structure %s" - "

\n\n", - cur_header->function_name, - cur_header->function_name); - else if (cur_header->type == VARIABLE_HEADER) - fprintf (dest_doc, - "\n" - "Variable %s" - "

\n\n", - cur_header->function_name, - cur_header->function_name); - else if (cur_header->type == MAIN_HEADER) - fprintf (dest_doc, - "\n" - "%s" - "
Header: %s

\n\n", - cur_header->function_name, - cur_header->function_name, src_name); - else - fprintf (dest_doc, - "\n" - "%s" - "

\n\n", - cur_header->function_name, - cur_header->function_name); - } - break; - case LATEX: - cook_link = RB_CookStr (cur_header->name); - if (!(course_of_action & DO_SINGLEDOC)) { - fprintf (dest_doc, "\\newpage\n"); - } - fprintf (dest_doc, "\\subsection{%s}\n", cook_link); - free (cook_link); - if (cur_header->function_name) { - cook_link = RB_CookStr (cur_header->function_name); - fprintf (dest_doc, "\\index{unsorted!%s}\\index{%s!%s}\n", cook_link, - RB_header_type_names[cur_header->type], cook_link); - free (cook_link); - } - break; - case RTF: - if (cur_header->name && cur_header->function_name) - { - cook_link = RB_CookStr (cur_header->function_name); - fprintf (dest_doc, "\\page" - "{\\super #{\\footnote{\\super #}%s}}" - "{\\super ${\\footnote{\\super $}%s}}" - "\\cf3 %s\\cf2\\line\n", - cur_header->function_name, - cur_header->name, - cur_header->name); - free (cook_link); - } - break; - case ASCII: - { - fprintf (dest_doc, "%s", att_start_command[MAKE_SHINE][output_mode]); - fprintf (dest_doc, "%s", cur_header->name); - fprintf (dest_doc, "%s", att_stop_command[MAKE_SHINE][output_mode]); - fprintf (dest_doc, "\n\n"); - } - break; - } -} - -/******/ - - -/****f* ROBODoc/RB_Generate_Header_End [3.0h] - * NAME - * RB_Generate_Header_End - * SYNOPSIS - * void RB_Generate_Header_End (dest_doc, cur_header) - * - * void RB_Generate_Header_End (FILE *, struct RB_header *) - * FUNCTION - * Generates for depending on the output_mode the text that - * will be at the end of a header. - * INPUTS - * dest_doc - pointer to the file to which the output will - * be written. - * cur_header - pointer to a RB_header structure. - * SEE ALSO - * RB_Generate_Header_Start - * SOURCE - */ - -void -RB_Generate_Header_End (FILE * dest_doc, struct RB_header *cur_header) -{ - switch (output_mode) - { /* switch by *koessi */ - case AMIGAGUIDE: - if (cur_header->name && cur_header->function_name) - fprintf (dest_doc, "@endnode\n"); - break; - case HTML: - case LATEX: - fputc ('\n', dest_doc); - break; - case RTF: - fprintf (dest_doc, "\\par\n"); - break; - case ASCII: - fputc ('\f', dest_doc); - default: - break; - } -} - -/*****/ - - -/****f* ROBODoc/RB_Generate_Header_Name [3.0c] - * NAME - * RB_Generate_Header_Name - * SYNOPSIS - * RB_Generate_Header_Name (dest_doc, name) - * - * RB_Generate_Header_Name (FILE *, char *) - * INPUTS - * dest_doc - pointer to the file to which the output will - * be written. - * name - pointer to the header name. - * SOURCE - */ - -void -RB_Generate_Header_Name (FILE * dest_doc, char *name) -{ - char format_str[] = "%s"; - - fprintf (dest_doc, format_str, att_start_command[MAKE_SHINE][output_mode]); - fprintf (dest_doc, format_str, name); - fprintf (dest_doc, format_str, att_stop_command[MAKE_SHINE][output_mode]); - fprintf (dest_doc, "\n\n"); -} - -/*** RB_Generate_Header_Name ***/ - - -/****** ROBODoc/RB_Generate_Item_Name [2.01] - * NAME - * RB_Generate_Item_Name -- fast&easy - * SYNOPSIS - * void RB_Generate_Item_Name( FILE * dest_doc, int item_type ) - * FUNCTION - * write the items name to the doc - * INPUTS - * FILE * dest_doc -- document in progress - * int item_type -- this leads to the name and makes colors - * AUTHOR - * Koessi - * NOTES - * uses globals: output_mode, item_names[] - * SOURCE - */ - -void -RB_Generate_Item_Name (FILE * dest_doc, int item_type) -{ - char format_str[] = "%s"; - - if (item_attributes[item_type] & ITEM_NAME_LARGE_FONT) - { - fprintf (dest_doc, format_str, - att_start_command[MAKE_LARGE][output_mode]); - fprintf (dest_doc, format_str, - att_start_command[MAKE_BOLD][output_mode]); - if (output_mode == HTML) - fprintf (dest_doc, "\n"); - fprintf (dest_doc, format_str, item_names[item_type]); - if (output_mode == HTML) - fprintf (dest_doc, "\n"); - fprintf (dest_doc, format_str, - att_stop_command[MAKE_BOLD][output_mode]); - fprintf (dest_doc, format_str, - att_stop_command[MAKE_LARGE][output_mode]); - } - else - fprintf (dest_doc, format_str, item_names[item_type]); - - fputc ('\n', dest_doc); -} - -/*****/ - - - -/****f* ROBODoc/RB_Generate_Item_Doc [3.0j] - * NAME - * RB_Generate_Item_Doc - * SYNOPSIS - * void RB_Generate_Item_Doc(FILE * dest_doc, char *dest_name, - * char *begin_of_item, - * char *end_of_item, - * char *function_name, - * int item_type) - * FUNCTION - * Generates the body text of an item, applying predefined attributes - * to the text. - * NOTES - * Body text is always non-proportional for several reasons: - * 1) text is rarely written with prop spacing and text wrapping - * in mind -- e.g., see SYNOPSIS above - * 2) source code looks better - * 3) it simplifies LaTeX handling - * SOURCE - */ - -void -RB_Generate_Item_Doc (FILE * dest_doc, char *dest_name, - char *begin_of_item, - char *end_of_item, - char *function_name, - int item_type) -{ - char format_str[] = "%s"; - - if (begin_of_item == end_of_item) - { - switch (output_mode) - { - case HTML: - fprintf (dest_doc, "
\n"); - break; - case LATEX: - fprintf (dest_doc, "\\\\\n"); - break; - case RTF: - fprintf (dest_doc, "\n"); - break; - default: - break; - } - return; - } - /* For text body in HTML, change to non-prop _before_ changing font - * style. * To conform to DTD, this avoids
 and instead uses
-   * 
 */
-  if (output_mode == HTML)
-    {
-      fprintf (dest_doc, "
");
-    }
-  /* change font style */
-  if (item_attributes[item_type] & TEXT_BODY_LARGE_FONT)
-    fprintf (dest_doc, format_str,
-	     att_start_command[MAKE_LARGE][output_mode]);
-  if (item_attributes[item_type] & TEXT_BODY_ITALICS)
-    fprintf (dest_doc, format_str,
-	     att_start_command[MAKE_ITALICS][output_mode]);
-  if (item_attributes[item_type] & TEXT_BODY_NON_PROP)
-    fprintf (dest_doc, format_str,
-	     att_start_command[MAKE_NON_PROP][output_mode]);
-  if (item_attributes[item_type] & TEXT_BODY_SMALL_FONT)
-    fprintf (dest_doc, format_str,
-	     att_start_command[MAKE_SMALL][output_mode]);
-  if (item_attributes[item_type] & TEXT_BODY_BOLD)
-    fprintf (dest_doc, format_str,
-	     att_start_command[MAKE_BOLD][output_mode]);
-  if (item_attributes[item_type] & TEXT_BODY_UNDERLINE)
-    fprintf (dest_doc, format_str,
-	     att_start_command[MAKE_UNDERLINE][output_mode]);
-  if (item_attributes[item_type] & TEXT_BODY_SHINE)
-    fprintf (dest_doc, format_str,
-	     att_start_command[MAKE_SHINE][output_mode]);
-  if (item_attributes[item_type] & TEXT_BODY_DEFAULT)
-    fprintf (dest_doc, format_str,
-	     att_start_command[MAKE_DEFAULT][output_mode]);
-
-  /* 
-   * For some modes, the text body is always non-prop
-   */
-  switch (output_mode)
-    {
-    case LATEX:
-      fprintf (dest_doc, "\\begin{verbatim}\n");
-      break;
-    case RTF:
-      fprintf (dest_doc, "{\\f1{}");
-      break;
-    default:
-      break;
-    }
-
-  RB_Generate_Item_Body (dest_doc, dest_name, begin_of_item, end_of_item,
-			 function_name, item_type, 0);
-
-  switch (output_mode)
-    {
-    case LATEX:
-      /* split the text so LaTeX doesn't get confused ;) */
-      fprintf (dest_doc, "\\" "end{verbatim}\n");
-      break;
-    case RTF:
-      fputc ('}', dest_doc);
-    default:
-      break;
-    }
-
-  /* restore font style */
-  if (item_attributes[item_type] & TEXT_BODY_SHINE)
-    fprintf (dest_doc, format_str,
-	     att_stop_command[MAKE_SHINE][output_mode]);
-  if (item_attributes[item_type] & TEXT_BODY_UNDERLINE)
-    fprintf (dest_doc, format_str,
-	     att_stop_command[MAKE_UNDERLINE][output_mode]);
-  if (item_attributes[item_type] & TEXT_BODY_BOLD)
-    fprintf (dest_doc, format_str,
-	     att_stop_command[MAKE_BOLD][output_mode]);
-  if (item_attributes[item_type] & TEXT_BODY_SMALL_FONT)
-    fprintf (dest_doc, format_str,
-	     att_stop_command[MAKE_SMALL][output_mode]);
-  if (item_attributes[item_type] & TEXT_BODY_NON_PROP)
-    fprintf (dest_doc, format_str,
-	     att_stop_command[MAKE_NON_PROP][output_mode]);
-  if (item_attributes[item_type] & TEXT_BODY_ITALICS)
-    fprintf (dest_doc, format_str,
-	     att_stop_command[MAKE_ITALICS][output_mode]);
-  if (item_attributes[item_type] & TEXT_BODY_LARGE_FONT)
-    fprintf (dest_doc, format_str,
-	     att_stop_command[MAKE_LARGE][output_mode]);
-  if (item_attributes[item_type] & TEXT_BODY_DEFAULT)
-    fprintf (dest_doc, format_str,
-	     att_stop_command[MAKE_DEFAULT][output_mode]);
-
-  if (output_mode != HTML)
-    {
-      fputc ('\n', dest_doc);
-    }
-  /* for HTML, switch back to prop-font after restoring font style */
-  if (output_mode == HTML)
-    {
-      fprintf (dest_doc, "
"); - } -} - -/******/ - - - -/****f* ROBODoc/RB_Generate_Item_Body [3.0h] - * NAME - * RB_Generate_Item_Body - * SYNOPSIS - * char * RB_Generate_Item_Body(FILE * dest_doc, char *dest_name, - * char *begin_of_item, char *end_of_item, - * char *function_name, - * int item_type, int tabs_to_skip) - * - * FUNCTION - * Generates body of an item in output-specific form - * INPUTS - * dest_doc - pointer to the file to which - * the output will be written. - * dest_name - the name of this file. - * begin_of_item - - * end_of_item - - * function_name - - * item_type - - * tabs_to_skip - how many tabs to skip in this fold. - * BUGS - * o Unbalanced fold marks lead to crash. - * NOTES - * o Almost completely rewritten by koessi - * o Almost completely Re-Rewritten by Slothouber :) - * o Folding mode by PetteriK. - * o Linking fixed inside folds / PetteriK 08.04.2000 - * SOURCE - */ - -char * -RB_Generate_Item_Body (FILE * dest_doc, char *dest_name, - char *begin_of_item, char *end_of_item, - char *function_name, - int item_type, int tabs_to_skip) -{ - char *cur_char, old_char, c; - int html_incr; - char fname[128], foldname[128]; - static int in_fold = 0; /* PetteriK 08.04.2000 */ - - cur_char = begin_of_item; - - if (item_type == SOURCE_ITEM) - { - /* skip end_comment_marker */ - for (; *cur_char && *cur_char != '\n'; cur_char++); - - /* skip blank lines leading up to source code */ - while (*cur_char == '\n') - cur_char++; - - /* trim blanks following source code */ - do - { - end_of_item--; - } - while (end_of_item > cur_char && isspace (*end_of_item)); - end_of_item++; /* advance 1 for placement of the NUL */ - } - old_char = *end_of_item; - *end_of_item = '\0'; - - for (; *cur_char; cur_char++) - { - int tb = tab_size; - int do_search = TRUE; - int was_link = FALSE; - int tabs = 0; - - if (item_type != SOURCE_ITEM) - { - /* Skip empty lines */ - while (*cur_char == '\n') { - cur_char++; - } - cur_char = RB_Skip_Remark_Marker (cur_char); - } - else - { - /* indent source */ - switch (output_mode) - { - case RTF: - fprintf (dest_doc, "\\tab "); - break; - - case AMIGAGUIDE: - case HTML: - case LATEX: - default: - fprintf (dest_doc, " "); - } - } - - while (((c = *cur_char) != '\0') && (c != '\n')) - { - char *label_name, *file_name; - char found = 0; - int tmp; - - if (!do_search) - { - if (!isalnum (c) && (c != '_')) - { - do_search = TRUE; - } - } - else - { - if (isalpha (c) || (c == '_')) - { - if (((was_link = RB_Find_Link (cur_char, &label_name, - &file_name)) == FALSE)) - { - do_search = FALSE; - } - } - else - was_link = FALSE; - } - - if (!was_link) - { - switch (output_mode) - { - case AMIGAGUIDE: - switch (c) - { - case '\n': - --cur_char; - break; - case '\t': - for (tb %= tab_size; tb < tab_size; ++tb) - fputc (' ', dest_doc); - break; - case '@': - fprintf (dest_doc, "\\@"); - tb++; - break; - case '\\': - fprintf (dest_doc, "\\\\"); - tb++; - break; - default: - fputc (c, dest_doc); - tb++; - } - break; - - case HTML: - /* PetteriK 26.07.1999 */ - if (extra_flags & FOLD) - { - cur_char = RB_Check_Fold_Start (cur_char, - foldname, &found); - } - if ((extra_flags & FOLD) && found) - { - FILE *fp; - - RB_Say ("fold name %s\n", foldname); - RB_Say ("fold begin %d\n", ++fold); - RB_Say ("tabs %d\n", tabs); - sprintf (fname, "%s_fold_%d.html", doc_base, fold); - RB_Say ("opening file %s\n", fname); - fp = fopen (fname, "w"); - RB_Generate_Doc_Start (fp, foldname, foldname, 0); - fprintf (fp, "
\n");
-		      fprintf (dest_doc, "... %s",
-			       fname, foldname);
-		      in_fold++;	/* PetteriK 08.04.2000 */
-		      cur_char = RB_Generate_Item_Body (fp, dest_name,
-						      cur_char, end_of_item,
-							function_name,
-							item_type, tabs);
-		      in_fold--;	/* PetteriK 08.04.2000 */
-		      /* skip chars until newline */
-		      while (*cur_char != '\n')
-			{
-			  cur_char++;
-			}
-		      cur_char--;
-		      fprintf (fp, "\n
\n"); - RB_Generate_Doc_End (fp, foldname); - fclose (fp); - } - else if ((extra_flags & FOLD) && RB_Check_Fold_End (cur_char)) - { - RB_Say ("fold end found\n"); - return cur_char; - } - else if ((html_incr = RB_HTML_Extra (dest_doc, - item_type, cur_char))) - { - cur_char += html_incr; - } - else - { - switch (c) - { - case '\n': - --cur_char; - break; - case '\t': - if (extra_flags & FOLD) - { - if (tabs >= tabs_to_skip) - { - for (tb %= tab_size; tb < tab_size; ++tb) - { - fputc (' ', dest_doc); - } - } - tabs++; - } - else - { - for (tb %= tab_size; tb < tab_size; ++tb) - { - fputc (' ', dest_doc); - } - } - break; - case '<': - fprintf (dest_doc, "<"); - tb++; - break; - case '>': - fprintf (dest_doc, ">"); - tb++; - break; - case '&': - fprintf (dest_doc, "&"); - tb++; - break; - default: - fputc (c, dest_doc); - tb++; - } - } - break; /* end case HTML */ - - case LATEX: - switch (c) - { - case '\n': - --cur_char; - break; - case '\t': - for (tb %= tab_size; tb < tab_size; ++tb) - fputc (' ', dest_doc); - break; -#if 0 - /* not used in LaTeX's verbatim environment */ - case '$': - case '&': - case '%': - case '#': - case '_': - case '{': - case '}': - fputc ('\\', dest_doc); - fputc (c, dest_doc); - tb++; - break; - case '\\': - fprintf (dest_doc, "$\\backslash$"); - tb++; - break; - case '~': - fprintf (dest_doc, "$\\tilde$"); - tb++; - break; - case '^': - fprintf (dest_doc, "$\\,\\!^{\\sim}$"); - tb++; - break; -#endif - default: - fputc (c, dest_doc); - tb++; - } - break; - - case RTF: - switch (c) - { - case '\n': - --cur_char; - break; - case '\t': - for (tb %= tab_size; tb < tab_size; ++tb) - fputc (' ', dest_doc); - break; - case '\\': - case '{': - case '}': - fputc ('\\', dest_doc); - fputc (c, dest_doc); - tb++; - break; - default: - fputc (c, dest_doc); - tb++; - } - break; - - default: - fputc (c, dest_doc); - tb++; - } - cur_char++; - } - else - { - switch (output_mode) - { - case AMIGAGUIDE: - if (file_name && strcmp (file_name, dest_name)) - fprintf (dest_doc, "@{\"%s\" Link \"%s/%s\"}", - label_name, file_name, label_name); - else - { - if (strcmp (label_name, function_name)) - fprintf (dest_doc, "@{\"%s\" Link \"%s\"}", - label_name, label_name); - else - { - fprintf (dest_doc, "%s", - att_start_command[MAKE_BOLD][output_mode]); - fprintf (dest_doc, "%s", label_name); - fprintf (dest_doc, "%s", - att_stop_command[MAKE_BOLD][output_mode]); - } - } - break; - - case HTML: - /* Include the file name in the link if we are in fold - * PetteriK 08.04.2000 - */ - if (in_fold) - { - /* We are in fold, always use the file name in the link, - * in file_name == NULL (i.e. the label is in the current file - * that we are processing), refer to value in dest_name. - * This also makes sure that we link correctly if function_name - * is the same as label_name. - */ - fprintf (dest_doc, "%s", - (file_name ? file_name : dest_name), - label_name, label_name); - } - else if (file_name && strcmp (file_name, dest_name)) - { -#if 0 - fprintf (dest_doc, "%s", - file_name, label_name, label_name); -#endif - fprintf (dest_doc, "%s", - RB_FilePartStart(file_name), label_name, - label_name); - } - else - { - if (strcmp (label_name, function_name)) - { -#if 0 - fprintf (dest_doc, "%s", - label_name, label_name); -#endif - fprintf (dest_doc, "%s", - RB_FilePart(doc_base), label_name, - label_name); - } - else - { - fprintf (dest_doc, "%s", - att_start_command[MAKE_BOLD][output_mode]); - fprintf (dest_doc, "%s", label_name); - fprintf (dest_doc, "%s", - att_stop_command[MAKE_BOLD][output_mode]); - } - } - break; - - case RTF: - if (strcmp (label_name, function_name)) - { - char *cook_link; - - cook_link = RB_CookStr (label_name); - fprintf (dest_doc, "{\\uldb %s}{\\v %s}", - label_name, cook_link); - free (cook_link); - } - else - { - fprintf (dest_doc, "%s", - att_start_command[MAKE_BOLD][output_mode]); - fprintf (dest_doc, "%s", label_name); - fprintf (dest_doc, "%s", - att_stop_command[MAKE_BOLD][output_mode]); - } - break; - default: - fprintf (dest_doc, "%s", label_name); - } - tmp = strlen (label_name); - cur_char += tmp; - tb += tmp; - } /* end if */ - } - - if (*cur_char) - { - if (output_mode == RTF) - fprintf (dest_doc, "\\line"); - fputc ('\n', dest_doc); - tabs = 0; - } - } - *end_of_item = old_char; - return (char *) 0; -} - - -/***************/ - - -/****f* ROBODoc/RB_HTML_Extra -* NAME -* RB_HTML_Extra -* AUTHOR -* PetteriK -* HISTORY -* 05/15/2000 Added mailto: support (Guillaume Etorre) -* FUNCTION -* Check and process embedded hyperlinks. -* RETURN VAL* FUNCTION -* Check and process embedded hyperlinks. -* RETURN VALUE -* Number of chars processed from *cur_char -* TODO -* Flag for C and other grammars. -* BUGS -* As the documentation generated for this functions shows, if -* the C source code contains a string with " / * " in it, this -* function fails :) -* SOURCE -*/ - -int -RB_HTML_Extra (FILE * dest_doc, int item_type, char *cur_char) -{ - int res = 0; - char link[1024]; - - if (strncmp ("http://", cur_char, strlen ("http://")) == 0) - { - sscanf (cur_char, "%s", link); - RB_Say ("found link %s\n", link); - res = (strlen (link) - 1); - fprintf (dest_doc, "%s", link, link); - } - else if (strncmp ("href:", cur_char, strlen ("href:")) == 0) - { - /* handy in relative hyperlink paths, e.g. href:../../modulex/ */ - sscanf ((cur_char + strlen ("href:")), "%s", link); - RB_Say ("found link %s\n", link); - res = (strlen (link) + strlen ("href:") - 1); - fprintf (dest_doc, "%s", link, link); - } - else if (strncmp ("mailto:", cur_char, strlen ("mailto:")) == 0) - { - sscanf ((cur_char + strlen ("mailto:")), "%s", link); - RB_Say ("found mail to %s\n", link); - res = (strlen (link) + strlen ("mailto:") - 1); - fprintf (dest_doc, "%s", link, link); - } - else if ((extra_flags & C_MODE) && (item_type == SOURCE_ITEM) && - (strncmp ("/*", cur_char, 2) == 0)) - { - /* start of C comment */ - fprintf (dest_doc, "/*"); - res = 1; - } - else if ((extra_flags & C_MODE) && (item_type == SOURCE_ITEM) && - (strncmp ("*/", cur_char, 2) == 0)) - { - /* end of C comment */ - fprintf (dest_doc, "*/"); - res = 1; - } - return res; -} - -/**********/ - - -/****f* ROBODoc/RB_Generate_Index - * NAME - * RB_Generate_Index -- generate index file based on xref files. - * SYNOPSIS - * void RB_Generate_Index(FILE *dest, char *name) - * FUNCTION - * Create a master index file. It contains pointers to the - * documentation generated for each source file, as well as all - * "objects" found in the source files. - ******** - */ - -void -RB_Generate_Index (FILE * dest, char *source) -{ - RB_Slow_Sort_Links (); - - switch (output_mode) - { - case HTML: - { - if (document_title) { - RB_Generate_Doc_Start (dest, source, document_title, 0); - fprintf (dest, "

%s

\n", document_title); - } else { - RB_Generate_Doc_Start (dest, source, "Master Index File", 0); - fprintf (dest, "

Master Index File

\n"); - } - if (RB_Number_Of_Links (MAIN_HEADER, NULL)) - RB_Generate_Index_Table (dest, MAIN_HEADER, "Modules"); -// RB_Generate_Index_Table (dest, NO_HEADER, "Source Files"); - if (RB_Number_Of_Links (CLASS_HEADER, NULL)) - RB_Generate_Index_Table (dest, CLASS_HEADER, "Classes"); - if (RB_Number_Of_Links (METHOD_HEADER, NULL)) - RB_Generate_Index_Table (dest, METHOD_HEADER, "Methods"); - if (RB_Number_Of_Links (STRUCT_HEADER, NULL)) - RB_Generate_Index_Table (dest, STRUCT_HEADER, "Structures"); - if (RB_Number_Of_Links (FUNCTION_HEADER, NULL)) - RB_Generate_Index_Table (dest, FUNCTION_HEADER, "Functions"); - if (RB_Number_Of_Links (VARIABLE_HEADER, NULL)) - RB_Generate_Index_Table (dest, VARIABLE_HEADER, "Global Variables"); - if (RB_Number_Of_Links (CONSTANT_HEADER, NULL)) - RB_Generate_Index_Table (dest, CONSTANT_HEADER, "Constants"); - if (RB_Number_Of_Links (GENERIC_HEADER, NULL)) - RB_Generate_Index_Table (dest, GENERIC_HEADER, "Generic"); - if (RB_Number_Of_Links (INTERNAL_HEADER, NULL)) - RB_Generate_Index_Table (dest, INTERNAL_HEADER, "Internal"); - RB_Generate_Doc_End (dest, source); - } break; - case LATEX: - { - RB_Generate_Doc_Start (dest, source, "Master File", 0); - RB_Generate_LaTeX_Includes (dest); - RB_Generate_Doc_End (dest, source); - } - } -} - - -/****f* ROBODoc/Generate_LaTeX_Includes - * NAME - * Generate_LaTeX_Includes -- generate include commands - * SYNOPSIS - * void RB_Generate_LaTeX_Includes (FILE *dest) - * FUNCTION - * Generates a series of \include commands to include the - * documentation generated for each source file into one - * big file. - **** - */ - -void -RB_Generate_LaTeX_Includes (FILE *dest) -{ - struct RB_link *cur_link; - for (cur_link = first_link; - cur_link; - cur_link = cur_link->next_link) { - { - if (cur_link->type == NO_HEADER) - fprintf (dest, "\\include{%s}\n", cur_link->label_name); - } - } -} - -/****f* ROBODoc/RB_Generate_Index_Table - * NAME - * RB_Generate_Index -- - * SYNOPSIS - * void RB_Generate_Index_Table(FILE *, int type, char *title) - * RB_Generate_Index_Table(dest, type, title) - * FUNCTION - * Creates a table with index items of a particular type. - * If the type is NO_HEADER, then the table is a table of - * source files. In this case no link is added if the - * source file did not contain any documentation. - * INPUTS - * dest -- output file - * type -- kind of header index. - * title -- title for the table - * SOURCE - */ - -void -RB_Generate_Index_Table (FILE * dest, int type, char *title) -{ - struct RB_link *cur_link; - int number_of_columns; - int cur_column; - - number_of_columns = 60 / RB_Max_Name_Length (type, NULL); - - fprintf (dest, "

%s

\n", title); - fprintf (dest, "\n"); - cur_column = 0; - for (cur_link = first_link; - cur_link; - cur_link = cur_link->next_link) - { - if (cur_link->type == type) - { - if (cur_column == 0) - { - fprintf (dest, "\n"); - } - if (type == NO_HEADER) - { - if (RB_Number_Of_Links (NO_HEADER, cur_link->file_name) > 1) - { - fprintf (dest, - "\n", - RB_FilePartStart(cur_link->file_name), - cur_link->label_name, - cur_link->label_name); - } - else - { - fprintf (dest, "\n", cur_link->label_name); - } - } - else - { - if (type == MAIN_HEADER) - { - fprintf (dest, "\n", - RB_FilePartStart(cur_link->file_name), - cur_link->label_name); - } - else - { - fprintf (dest, "\n", - RB_FilePartStart(cur_link->file_name), - cur_link->label_name, - cur_link->label_name); - } - }; - cur_column++; - if (cur_column > number_of_columns) - { - fprintf (dest, "\n"); - cur_column = 0; - } - } - } - for (; cur_column <= number_of_columns;) - { - if (cur_column == 0) - { - fprintf (dest, "\n"); - } - fprintf (dest, "\n"); - cur_column++; - } - fprintf (dest, "\n"); - fprintf (dest, "
%s%s%s%s
\n"); -} - -/******* END RB_Generate_Index_Table *****/ - - -/****f* ROBODoc/RB_Number_Of_Links - * NAME - * RB_Number_Of_Links -- Count the number of links. - * FUNCTION - * Counts the number of links that are of a particular type - * and that can be found in a particular file. - * INPUTS - * type -- the header type of the header the link is pointing to. - * If NO_HEADER, all header types are counted. - * file_name -- name of the file the link comes from, can be NULL, in - * which case only the type is checked. - * RESULT - * number of links. - ****** - */ - -int -RB_Number_Of_Links (int type, char *file_name) -{ - struct RB_link *cur_link; - int n = 0; - - for (cur_link = first_link; - cur_link; - cur_link = cur_link->next_link) - { - if (cur_link->type == type || (type == NO_HEADER)) - { - if (file_name) - { - if (strcmp (file_name, cur_link->file_name) == 0) - { - n++; - } - } - else - { - n++; - } - } - } - - return n; -} - - -/****f* ROBODoc/RB_Max_Name_Length - * NAME - * RB_Max_Name_Length -- find longest label name. - * FUNCTION - * Find the length of the longest label name in a sub list - * of the list with links. This is used to determine how - * many columns can be displayed in a table. - * The sublist is specified by the type of header the link - * should point to, as well as by the name of the documentation - * file. - * EXAMPLE - * RB_Max_Name_Length(CLASS_HEADER, "muppets.c.html") - * longest label name in the list of links to class headers - * in muppets.c.html. - * RB_Max_Name_Length(CLASS_HEADER, NULL) - * longest label name in the list of links to class headers. - * INPUTS - * type -- type of header - * file_name -- file the header come from, can be NULL. - * In which links from all files are used. - * SOURCE - */ - -int -RB_Max_Name_Length (int type, char *file_name) -{ - struct RB_link *cur_link; - int n = 1; - - for (cur_link = first_link; - cur_link; - cur_link = cur_link->next_link) - { - if (cur_link->type == type) - { - if (file_name) - { - if (strcmp (file_name, cur_link->file_name) == 0) - { - if (strlen (cur_link->label_name) > n) - { - n = strlen (cur_link->label_name); - } - } - } - else - { - if (strlen (cur_link->label_name) > n) - { - n = strlen (cur_link->label_name); - } - } - } - } - return n; -} - -/*********/ diff --git a/util/robodoc/Source/generator.h b/util/robodoc/Source/generator.h deleted file mode 100644 index c886974c..00000000 --- a/util/robodoc/Source/generator.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef ROBODOC_GENERATOR_H -#define ROBODOC_GENERATOR_H - -void RB_Generate_Documentation (FILE *, char *, char *); -void RB_Generate_Item_Doc (FILE *, char *, char *, char *, char *, int); -char *RB_Generate_Item_Body (FILE *, char *, char *, char *, char *, int, int); -void RB_Generate_Header_Name (FILE *, char *); -void RB_Generate_Item_Name (FILE *, int); -void RB_Generate_Doc_Start (FILE *, char *, char *, char); -void RB_Generate_Doc_End (FILE *, char *); -void RB_Generate_Header_Start (FILE *, struct RB_header *, const char *); -void RB_Generate_Header_End (FILE *, struct RB_header *); -int RB_HTML_Extra (FILE * dest_doc, int item_type, char *cur_char); -void RB_Generate_Index (FILE * dest, char *name); -void RB_Generate_LaTeX_Includes (FILE *dest); -void RB_Generate_Index_Table (FILE * dest, int type, char *source); -int RB_Max_Name_Length (int type, char *file_name); -int RB_Number_Of_Links (int type, char *file_name); - -#endif /* ROBODOC_GENERATOR_H */ diff --git a/util/robodoc/Source/headers.c b/util/robodoc/Source/headers.c deleted file mode 100644 index bb2bf985..00000000 --- a/util/robodoc/Source/headers.c +++ /dev/null @@ -1,160 +0,0 @@ -#include -#include -#include "robodoc.h" -#include "headers.h" - - -/****v* ROBODoc/header_markers [3.0h] - * NAME - * header_markers -- strings that mark the begin of a header. - * FUNCTION - * These specify what robodoc recognizes as the beginning - * of a header. - * SOURCE - */ - -char *header_markers[] = -{ - "/****", /* C, C++ */ - "//****", /* C++ */ - "(****", /* Pascal, Modula-2, B52 */ - "{****", /* Pascal */ - ";****", /* M68K assembler */ - "****", /* M68K assembler */ - "C ****", /* Fortran */ - "REM ****", /* BASIC */ - "%****", /* LaTeX, TeX, Postscript */ - "#****", /* Tcl/Tk */ - " ****", /* COBOL */ - "--****", /* Occam */ - "