diff --git a/doxymacs/AUTHORS b/doxymacs/AUTHORS new file mode 100644 index 0000000..2ed2128 --- /dev/null +++ b/doxymacs/AUTHORS @@ -0,0 +1,6 @@ +$Id: AUTHORS,v 1.8 2005/04/01 00:31:44 ryants Exp $ + +Ryan T. Sammartino +Kris Verbeeck + + diff --git a/doxymacs/COPYING b/doxymacs/COPYING new file mode 100644 index 0000000..f4e2140 --- /dev/null +++ b/doxymacs/COPYING @@ -0,0 +1,342 @@ + 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) + +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) year 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. + +$Id: COPYING,v 1.1 2001/03/25 00:41:47 ryants Exp $ diff --git a/doxymacs/ChangeLog b/doxymacs/ChangeLog new file mode 100644 index 0000000..c429b1e --- /dev/null +++ b/doxymacs/ChangeLog @@ -0,0 +1,308 @@ +2007-06-10 Ryan T. Sammartino (1.8.0) + * NEWS, configure.ac: prepare for new version release. + * lisp/doxymacs.el.in: documentation update. + + +2007-02-02 Ryan T. Sammartino + * lisp/doxymacs.el.in: + (doxymacs-mode, doxymacs-doxygan-keywords): Bug #1490021: + Allow spaces in @param [in] style documentation. + (doxymacs-user-mail-address): Bug #1496399: + New function. + (doxymacs-JavaDoc-file-comment-template, + doxymacs-Qt-file-comment-template, + doxymacs-C++-file-comment-template): Use new function to + get user's e-mail address. + +2006-04-22 Ryan T. Sammartino (1.7.0) + + * doxymacs_parser.c: + Bug #1459026: Fix compile warning with gcc 4.0. + * lisp/doxymacs.el.in: minor documentation updates. + (doxymacs-mode): Feature #1338245: Add tokens to filladapt + to match doxygen markup. + * example/doc/*: Update to use doxygen 1.4.4 output. + * NEWS, README, configure.ac: prepare for new version release. + +2005-06-04 Ryan T. Sammartino (1.6.0) + + * NEWS, README: prepare for new version release. + + * lisp/doxymacs.el.in: minor documentation updates. + + * c/doxymacs_parser.c: minor documentation updates. + + +2005-04-14 Ryan T. Sammartino + + * lisp/doxymacs.el.in: + (doxymacs-url-exists-p): New function. + (doxymacs-load-tags): Use new function. + (doxymacs-symbol-near-point): New function (to clean up + symbol-near-point hack). + (doxymacs-lookup): Use new function. + +2005-04-13 Ryan T. Sammartino + * lisp/doxymacs.el.in: feature request #868413 + (doxymacs-browse-url-function): New customizable variable. + (doxymacs-display-url): Use new variable. + +2005-04-12 Ryan T. Sammartino + + * lisp/doxymacs.el.in: bug #990123 + (doxymacs-group-comment-start), + (doxymacs-group-comment-end): New strings for grouping comments. + (doxymacs-insert-grouping-comments): Use new strings instead of + old templates. + (doxymacs-group-begin-comment-template), + (doxymacs-group-end-comment-template), + (doxymacs-JavaDoc-group-begin-comment-template), + (doxymacs-JavaDoc-group-end-comment-template), + (doxymacs-Qt-group-begin-comment-template), + (doxymacs-Qt-group-end-comment-template), + (doxymacs-C++-group-begin-comment-template), + (doxymacs-C++-group-end-comment-template): Remove old templates + for grouping comments. + (doxymacs-doxygen-keywords): New doxygen keywords. + +2005-04-01 Ryan T. Sammartino + + * AUTHORS, README: update contact info. + + * example/src/doxy.conf: update for new doxygen. + + * example/src/aclass.h: try new @param[in] etc. + + * example/doc/html/*: regenerate. + + * lisp/doxymacs.el.in (doxymacs-doxygen-keywords): patch #1102042: + handle @param[in], etc. + (doxymacs-font-lock): patch #1024026: use font-lock-add-keywords, + if available. + + * aclocal/libxml.m4: update from libxml source. + + * c/Makefile.am: fix link issues with newer libxml. + + * configure.ac: update libxml2 version requirements to match what + was used for libxml.m4. + +2003-01-25 Ryan T. Sammartino (1.5.0) + + * NEWS: version 1.5.0 news. + + * INSTALL: add instructions on avoiding byte compiling and + configuring. + + * configure.ac: set version to 1.5.0. + + * no-autoconf/Makefile.am: new file. + +2003-01-20 Georg Drenkhahn + + * lisp/doxymacs.el.in (doxymacs-doxygen-keywords): patch 667164: + fix retval fontification + +2003-01-12 Ryan T. Sammartino + + * configure.ac: add "C++" to help string for --with-default-style. + +2003-01-11 Ryan T. Sammartino + + Feature #665470: C++ style. + Bug #665099: @var missing. + Bug #665372: @example not fontified properly. + * lisp/doxymacs.el.in (doxymacs-doxygen-keywords): fix var, + example, image, dotfile, other commands. + (doxymacs-doxygen-style): new C++ style. + (doxymacs-command-character): new variable. + (doxymacs-C++-blank-multiline-comment-template): new template. + (doxymacs-C++-blank-singleline-comment-template): new template. + (doxymacs-doxygen-command-char): new function. + (doxymacs-JavaDoc-file-comment-template): use + doxymacs-doxygen-command-char + (doxymacs-Qt-file-comment-template): ditto. + (doxymacs-JavaDoc-function-comment-template): ditto. + (doxymacs-Qt-function-comment-template): ditto. + (doxymacs-parm-tempo-element): ditto and add C++ style. + (doxymacs-C++-file-comment-template): new template. + (doxymacs-C++-function-comment-template): new template. + (doxymacs-C++-group-begin-comment-template): new template. + (doxymacs-C++-group-end-comment-template): new template. + (doxymacs-invalid-style): add C++ style. + (doxymacs-insert-member-comment): add C++ style. + +2003-01-06 Ryan T. Sammartino + + * configure.ac: mention EMACSLOADPATH in the help. + * INSTALL, lisp/doxymacs.el.in: mention EMACS, EMACSLOADPATH; + other documentation fixups. + +2003-01-05 Ryan T. Sammartino (1.4.0) + + * Autoconf-ise the project. + +2002-12-09 Ryan T. Sammartino + * c/doxymacs_parser.c: terminate Encoded string with \0. + * lisp/doxymacs.el: set the doxytags buffer modified flag to false + to avoid asking user if OK to kill modified buffer. + +2002-12-08 Ryan T. Sammartino + * lisp/doxymacs.el, c/doxymacs_parser.c: work around apparent bug in + Doxygen 1.2.18. + * c/doxymacs_parser.c: fix memory leak. + +2002-12-08 Ryan T. Sammartino + * lisp/doxymacs.el: move to association lists to support multiple + Doxygen generates. + * INSTALL: update instructions. + * TODO: update. + +2002-11-30 Georg Drenkhahn + * lisp/doxymacs.el: several FIXMEs fixed, user-defined "void" types + (doxymacs-void-types). + +2002-08-31 Ryan T. Sammartino (1.3.2) + * lisp/doxymacs.el: functions with blank lines in their argument + list confused doxymacs-extract-args-list fixed. + +2002-09-05 Ryan T. Sammartino (1.3.1) + * c/doxymacs_parser.c: fix compilation issues on Mac OS X. + +2002-04-01 Ryan T. Sammartino + * lisp/doxymacs.el, README: make note of the fact that doxymacs + seems to work with GNU Emacs 21.2.1 and XEmacs 21.4 (patch 6) + +2001-11-19 Ryan T. Sammartino + * lisp/doxymacs.el, README: make note of the fact that doxymacs + seems to work with XEmacs 21.4 (patch 5) and GNU Emacs 21.1.1 + +2001-11-04 Ryan T. Sammartino (1.3.0) + * lisp/doxymacs.el: add documentation for default templates. + Implement grouping comments (C-c d @). + +2001-11-01 Ryan T. Sammartino + * README, AUTHORS, ...: make note that Ryan's homepage and e-mail + address have changed. + +2001-09-30 Ryan T. Sammartino + * lisp/doxymacs.el, README: make note of the fact that doxymacs + seems to work with XEmacs 21.4 (patch 4) + +2001-09-15 Ryan T. Sammartino (1.2.1) + * lisp/doxymacs.el: fix bug #460396: invalid number of arguments + to doxymacs-parm-tempo-element in + doxymacs-Qt-function-comment-template + +2001-08-26 Ryan T. Sammartino (1.2.0) + * lisp/doxymacs.el: implement feature request #454122 (single line + member comments) and feature request #454123 (key bindings + description in mode help). Clean up template code to make it + easier to add new templates and catch bad settings. Clean up + documentation to be more standards conforming. + * INSTALL: documentation update. + * README: if people have success/failure with untested {X}Emacs + versions, let the authors know. + +2001-08-23 Ryan T. Sammartino (1.1.4) + * lisp/doxymacs.el: fix bug #454563... missing @endlink in + fontification; fix @b, @em, @c, @p, and @link fontification. Also + clean up the fontification code a bit. + +2001-07-08 Ryan T. Sammartino (1.1.3) + * c/doxymacs_parser.c, c/Makefile: Make the external XML parser + work with the latest libxml2. Now we require libxml2 version + 2.3.4 or greater. + +2001-07-04 Ryan T. Sammartino (1.1.2) + * lisp/doxymacs.el: GNU Emacs doesn't support ?: in regexps, so + take them out. + +2001-06-20 Ryan T. Sammartino (1.1.1) + * lisp/doxymacs.el: fix bug #432837 missing @see keyword and fix + bug #432836 Font lock for @ingroup not correct + +2001-06-12 Ryan T. Sammartino (1.1.0) + * lisp/doxymacs.el: add font lock keywords for Doxygen keywords + +2001-06-06 Ryan T. Sammartino (1.0.0) + * lisp/doxymacs.el: fix bug #427660 "mouse selection problems". + +2001-05-26 Ryan T. Sammartino (0.2.1) + * lisp/doxymacs.el: fix bug #427351 "thinks "void" is a parameter" + and bug #427350 "can't document constructors/destructors", and + generally made the whole doxymacs-find-next-func function much + more robust. Small update to default styles when inserting + functions that return "void" + * INSTALL: a tip on automatically going into doxymacs-mode + whenever in C/C++ mode + +2001-05-21 Ryan T. Sammartino (0.2.0) + * lisp/doxymacs.el: now can optionally use the external XML parser + to speed things up. Some documentation updates. + * c/doxymacs_parser.c, c/Makefile: new files. doxymacs_parser.c is + the external XML parser. + * INSTALL: documentation updates. + +2001-05-12 Ryan T. Sammartino (0.1.2) + * lisp/doxymacs.el: bug fixes for GNU Emacs: symbol-near-point and + user-mail-address + * lisp/xml-parse.el: make sure progress-function is bound before + calling. + * TODO: removed "test on other version of {X}Emacs" item. + * README: let people know on which versions of {X}Emacs this has been + tested on. + +2001-05-09 Ryan T. Sammartino (0.1.1) + * lisp/doxymacs.el: change C-? to C-c d ?, add progress info while + parsing XML file, and some small optimisations. + +2001-05-07 Ryan T. Sammartino (0.1.0) + * lisp/doxymacs.el: Minor mode (thanks to Kris) and default key + bindings. + * INSTALL: some better instructions (I hope) + +2001-05-06 Ryan T. Sammartino + * lisp/doxymacs.el: Now using tempo templates for inserting comments. + Also allows for user-defined styles. + * TODO: we need some good end-user documentation. + * AUTHORS: acknowledge patch from Andreas Fuchs. + +2001-04-29 Ryan T. Sammartino + * lisp/doxymacs.el: Now parse XML tags file generated by doxygen + directly. + * lisp/xml-parse.el: Add this file so that people don't need to go + download things from all over the place just to get doxymacs working. + * perl/doxytags.pl: No longer necessary, now that we can parse the + XML tags file generated by doxygen. + +2001-04-22 Ryan T. Sammartino + * lisp/doxymacs.el: Function documentation + +2001-04-18 Ryan T. Sammartino + * lisp/doxymacs.el: Going with Kris' "new style" look up + code. It's excellent, and exactly what I wanted. Thanks Kris. Also + incorprated Andreas Fuchs' patch for loading tags from a URL. + +2001-04-11 Ryan T. Sammartino + * lisp/doxymacs.el: insert blank or "file" doxygen comments with style + specified by the user. + +2001-03-31 Ryan T. Sammartino + * lisp/doxymacs.el: if symbol matches more than one entry in the tags, + you can now select which one you really mean (but please take a look + at the FIXME comment before doxymacs-choose-match) and slightly + changed the format of the list that doxymacs-get-matches returns. + * perl/doxytag.pl, example/doc/doxy.tag: added some more info to the + third column of doxytag.pl's output. + * TODO: removed the "choose which symbol you really mean" item (yay!). + +2001-03-28 Ryan T. Sammartino + * lisp/doxymacs.el: applied patch from Kris Verbeeck so that + doxymacs customisation stuff is under the "Tools" group. Also + removed doxymacs-browser, since we'll just use the user's default + browser anyways. Minor formatting changes as well. + * README: added doxymacs' URL + +2001-03-24 Ryan T. Sammartino + * doxymacs: Initial CVS check in. diff --git a/doxymacs/INSTALL b/doxymacs/INSTALL new file mode 100644 index 0000000..bea2f2c --- /dev/null +++ b/doxymacs/INSTALL @@ -0,0 +1,82 @@ +$Id: INSTALL,v 1.15 2003/01/26 01:49:55 ryants Exp $ + +Doxymacs depends on the following packages: + +- W3 http://www.cs.indiana.edu/usr/local/www/elisp/w3/docs.html +- tempo http://www.lysator.liu.se/~davidk/elisp/ +- libxml2 http://www.libxml.org/ + +Be sure these are properly configured and installed before proceeding. + +- Use the configure script to configure doxymacs: + + $ ./configure + $ make + $ make install + + Use ./configure --help for help on customising your configuration. + + If you get + +!! File error (("Cannot open load file" "url")) + + (or something similar) then set the variable EMACSLOADPATH before + doing make: + + $ EMACSLOADPATH=... make + + where ... is a colon separated list of directories to search for + packages. To byte compile with XEmacs, set the variable EMACS: + + $ EMACS=xemacs make + + If you would rather not byte compile the .el files at all, then do: + + $ make ELCFILES= + $ make install ELCFILES= + + If you do not want to run or cannot run configure then some pre-baked + .el files are available in the no-autoconf/ directory; simply copy + these to somewhere in your load-path. + +- Customise the variable doxymacs-doxygen-dirs. + Doxymacs customisation can be done from the Options | Customize menu, + under Emacs | Programming | Tools | Doxymacs. + +- If your tags file is quite large (say, > 1 MB), consider setting + doxymacs-use-external-xml-parser to t and be sure to set + doxymacs-external-xml-parser-executable to the right value (the + default should usually be fine). A suitable program is distributed + in the directory doxymacs/c/. With an 11 MB XML tag file, the + internal process takes 20 minutes on a PIII 800 with 1 GB of RAM, + whereas the external process takes 12 seconds. + +- Put (require 'doxymacs) in your .emacs + +- Invoke doxymacs-mode with M-x doxymacs-mode. To have doxymacs-mode invoked + automatically when in C/C++ mode, put + + (add-hook 'c-mode-common-hook 'doxymacs-mode) + + in your .emacs. + +- If you want Doxygen keywords fontified use M-x doxymacs-font-lock. + To do it automatically, add the following to your .emacs: + + (defun my-doxymacs-font-lock-hook () + (if (or (eq major-mode 'c-mode) (eq major-mode 'c++-mode)) + (doxymacs-font-lock))) + (add-hook 'font-lock-mode-hook 'my-doxymacs-font-lock-hook) + + This will add the Doxygen keywords to c-mode and c++-mode only. + +- Default key bindings are: + - C-c d ? will look up documentation for the symbol under the point. + - C-c d r will rescan your Doxygen tags file. + - C-c d f will insert a Doxygen comment for the next function. + - C-c d i will insert a Doxygen comment for the current file. + - C-c d ; will insert a Doxygen comment for the current member. + - C-c d m will insert a blank multi-line Doxygen comment. + - C-c d s will insert a blank single-line Doxygen comment. + - C-c d @ will insert grouping comments around the current region. + diff --git a/doxymacs/Makefile.am b/doxymacs/Makefile.am new file mode 100644 index 0000000..2837d3a --- /dev/null +++ b/doxymacs/Makefile.am @@ -0,0 +1,4 @@ +## Process this file with automake to produce Makefile.in +# $Id: Makefile.am,v 1.2 2003/01/26 01:49:55 ryants Exp $ + +SUBDIRS = c lisp no-autoconf diff --git a/doxymacs/NEWS b/doxymacs/NEWS new file mode 100644 index 0000000..4585ccc --- /dev/null +++ b/doxymacs/NEWS @@ -0,0 +1,82 @@ +$Id: NEWS,v 1.20 2007/06/10 13:17:24 ryants Exp $ + +10/06/2007 Version 1.8.0 released. + Fix bug #1490021: Allow spaces in @param [in] style documentation. + Fix bug #1496399: Use better way to get user's e-mail address. + +22/04/2006 Version 1.7.0 released. + Fix bug #1459026: compile warning with gcc 4.0. + Feature request #1338245: make filladapt mode doxygen aware + of @param to nicely indent parameter lists. + Update the example HTML files with doxygen 1.4.4. + +04/06/2005 Version 1.6.0 released. + Many bug fixes for newer versions of {X}emacs. Some additions to + fontification to handle new Doxygen constructs. Can now customise + the browser that doxymacs uses to display documentation. + + NOTE: doxymacs-group-comment-start and doxymacs-group-comment-end + are no longer tempo templates but are now just plain strings. + + +25/01/2003 Version 1.5.0 released. + New C++ style. Pre-baked .el files for people who do not have + autoconf. Several small fontification bug fixes. + +05/01/2003 Version 1.4.0 released. + doxymacs now uses autoconf to configure, build and install itself. + +31/08/2002 Version 1.3.2 released. + Fix bug #601028: functions with blank lines in their argument lists + confused doxymacs-extract-args-list. + +09/05/2002 Version 1.3.1 released. + Fix issues compiling doxymacs_parser.c on Mac OS X. + +04/11/2001 Version 1.3.0 released. + Implement new grouping command (C-c d @) which inserts Doxygen + grouping comments around the current region. + +15/09/2001 Version 1.2.1 released. + Fix a bug in Qt style comments. + +26/08/2001 Version 1.2.0 released. + Better on-line documentation. New "member comment" command which + works much like M-; (indent-for-comment). + +23/08/2001 Version 1.1.4 released. + minor bugfixes. + +08/07/2001 Version 1.1.3 released. + The external XML parser now requires libxml2 version 2.3.4 or + greater. + +04/07/2001 Version 1.1.2 released. + GNU Emacs doesn't understand ?: in regexps, so take them out. + +20/06/2001 Version 1.1.1 released. + Fix bug #432837 missing @see keyword and fix bug #432836 Font + lock for @ingroup not correct. + +12/06/2001 Version 1.1.0 released. + New feature: font lock for Doxygen keywords. + +06/06/2001 Version 1.0.0 released. + The first stable release. There are still some bugs left (see + the FIXMEs in lisp/doxymacs.el), but they are both sufficiently + rare and hard to fix that they don't warrant holding up a stable + release. + +26/05/2001 Version 0.2.1 released. + Er... forgot to update this file the past few releases. + Oh well. Look at the ChangeLog if you really care. + +09/05/2001 Version 0.1.1 released. + Bug fix: C-? is a bad choice for "look up", since it causes the + DEL key to be mapped to "look up"... changed it to C-c d ?. + Feature add: Progress info as it parses XML tag file. + +07/05/2001 Version 0.1.0 (Alpha) released. + This represents the first public release of doxymacs. It works for us, + now let's see if it works for other people too. + diff --git a/doxymacs/README b/doxymacs/README new file mode 100644 index 0000000..836b714 --- /dev/null +++ b/doxymacs/README @@ -0,0 +1,45 @@ +doxymacs +Copyright (C) 2001-2005 Ryan T. Sammartino +ryan.sammartino at gmail dot com + +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, 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. + +------------------------------------------------------------------------------- + +doxymacs is an e-lisp package for making doxygen usage easier under XEmacs. + +doxymacs homepage: http://doxymacs.sourceforge.net/ + +Doxymacs has been tested on and works with: + - GNU Emacs 20.7.1, 21.1.1, 21.2.1, 21.3, 21.4.1 + - XEmacs 21.1 (patch 14), 21.4 (patch 4, 5, 6, 17) + +If you have success or failure with other versions of {X}Emacs, please +let the authors know. + +See COPYING for the full text of the license under which is this work +is being made available. + +See ChangeLog for recent changes. + +See AUTHORS for a list of people to blame for this mess. + +See TODO for a list of things that you can help out with. + +See INSTALL for instructions on how to install and use this. + +Feel free to contact me about any issues you may have, or to volunteer +to help out. + +Ryan T. Sammartino +ryan.sammartino at gmail dot com + +$Id: README,v 1.13 2006/04/23 01:20:15 ryants Exp $ diff --git a/doxymacs/TODO b/doxymacs/TODO new file mode 100644 index 0000000..2f788d6 --- /dev/null +++ b/doxymacs/TODO @@ -0,0 +1,11 @@ +$Id: TODO,v 1.15 2003/01/06 00:45:30 ryants Exp $ + +lisp/doxymacs.el.in: + - fix all FIXMEs (of course) + - automatic testing (DejaGnu). + - other stuff? + +README: +INSTALL: + - better end-user documentation + diff --git a/doxymacs/aclocal/libxml.m4 b/doxymacs/aclocal/libxml.m4 new file mode 100644 index 0000000..68cd824 --- /dev/null +++ b/doxymacs/aclocal/libxml.m4 @@ -0,0 +1,188 @@ +# Configure paths for LIBXML2 +# Mike Hommey 2004-06-19 +# use CPPFLAGS instead of CFLAGS +# Toshio Kuratomi 2001-04-21 +# Adapted from: +# Configure paths for GLIB +# Owen Taylor 97-11-3 + +dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS +dnl +AC_DEFUN([AM_PATH_XML2],[ +AC_ARG_WITH(xml-prefix, + [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)], + xml_config_prefix="$withval", xml_config_prefix="") +AC_ARG_WITH(xml-exec-prefix, + [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)], + xml_config_exec_prefix="$withval", xml_config_exec_prefix="") +AC_ARG_ENABLE(xmltest, + [ --disable-xmltest Do not try to compile and run a test LIBXML program],, + enable_xmltest=yes) + + if test x$xml_config_exec_prefix != x ; then + xml_config_args="$xml_config_args" + if test x${XML2_CONFIG+set} != xset ; then + XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config + fi + fi + if test x$xml_config_prefix != x ; then + xml_config_args="$xml_config_args --prefix=$xml_config_prefix" + if test x${XML2_CONFIG+set} != xset ; then + XML2_CONFIG=$xml_config_prefix/bin/xml2-config + fi + fi + + AC_PATH_PROG(XML2_CONFIG, xml2-config, no) + min_xml_version=ifelse([$1], ,2.0.0,[$1]) + AC_MSG_CHECKING(for libxml - version >= $min_xml_version) + no_xml="" + if test "$XML2_CONFIG" = "no" ; then + no_xml=yes + else + XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags` + XML_LIBS=`$XML2_CONFIG $xml_config_args --libs` + xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_xmltest" = "xyes" ; then + ac_save_CPPFLAGS="$CPPFLAGS" + ac_save_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" + LIBS="$XML_LIBS $LIBS" +dnl +dnl Now check if the installed libxml is sufficiently new. +dnl (Also sanity checks the results of xml2-config to some extent) +dnl + rm -f conf.xmltest + AC_TRY_RUN([ +#include +#include +#include +#include + +int +main() +{ + int xml_major_version, xml_minor_version, xml_micro_version; + int major, minor, micro; + char *tmp_version; + + system("touch conf.xmltest"); + + /* Capture xml2-config output via autoconf/configure variables */ + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = (char *)strdup("$min_xml_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string from xml2-config\n", "$min_xml_version"); + exit(1); + } + free(tmp_version); + + /* Capture the version information from the header files */ + tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION); + if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) { + printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION"); + exit(1); + } + free(tmp_version); + + /* Compare xml2-config output to the libxml headers */ + if ((xml_major_version != $xml_config_major_version) || + (xml_minor_version != $xml_config_minor_version) || + (xml_micro_version != $xml_config_micro_version)) + { + printf("*** libxml header files (version %d.%d.%d) do not match\n", + xml_major_version, xml_minor_version, xml_micro_version); + printf("*** xml2-config (version %d.%d.%d)\n", + $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version); + return 1; + } +/* Compare the headers to the library to make sure we match */ + /* Less than ideal -- doesn't provide us with return value feedback, + * only exits if there's a serious mismatch between header and library. + */ + LIBXML_TEST_VERSION; + + /* Test that the library is greater than our minimum version */ + if ((xml_major_version > major) || + ((xml_major_version == major) && (xml_minor_version > minor)) || + ((xml_major_version == major) && (xml_minor_version == minor) && + (xml_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of libxml (%d.%d.%d) was found.\n", + xml_major_version, xml_minor_version, xml_micro_version); + printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the xml2-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n"); + printf("*** correct copy of xml2-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + return 1; +} +],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + + if test "x$no_xml" = x ; then + AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$XML2_CONFIG" = "no" ; then + echo "*** The xml2-config script installed by LIBXML could not be found" + echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the XML2_CONFIG environment variable to the" + echo "*** full path to xml2-config." + else + if test -f conf.xmltest ; then + : + else + echo "*** Could not run libxml test program, checking why..." + CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" + LIBS="$LIBS $XML_LIBS" + AC_TRY_LINK([ +#include +#include +], [ LIBXML_TEST_VERSION; return 0;], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding LIBXML or finding the wrong" + echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means LIBXML was incorrectly installed" + echo "*** or that you have moved LIBXML since it was installed. In the latter case, you" + echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ]) + CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + + XML_CPPFLAGS="" + XML_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(XML_CPPFLAGS) + AC_SUBST(XML_LIBS) + rm -f conf.xmltest +]) diff --git a/doxymacs/bootstrap b/doxymacs/bootstrap new file mode 100755 index 0000000..26f20c5 --- /dev/null +++ b/doxymacs/bootstrap @@ -0,0 +1,5 @@ +#! /bin/sh + +aclocal +automake --gnu --add-missing +autoconf diff --git a/doxymacs/c/Makefile.am b/doxymacs/c/Makefile.am new file mode 100644 index 0000000..861f6bb --- /dev/null +++ b/doxymacs/c/Makefile.am @@ -0,0 +1,12 @@ +## Process this file with automake to produce Makefile.in +# $Id: Makefile.am,v 1.2 2005/04/01 06:20:06 ryants Exp $ + +bin_PROGRAMS = doxymacs_parser + +doxymacs_parser_SOURCES = doxymacs_parser.c + +INCLUDES = $(XML_CPPFLAGS) + +AM_CFLAGS = -Wall -Werror -fexpensive-optimizations -fomit-frame-pointer + +doxymacs_parser_LDADD = $(XML_LIBS) diff --git a/doxymacs/c/doxymacs_parser.c b/doxymacs/c/doxymacs_parser.c new file mode 100644 index 0000000..6807e8d --- /dev/null +++ b/doxymacs/c/doxymacs_parser.c @@ -0,0 +1,682 @@ +/* + * doxymacs_parser.c + * Copyright (C) 2001 Ryan T. Sammartino + * + * + * A utility program used by doxymacs to speed up building the look up + * completion list from a Doxygen XML file. + * + * This file requires libxml version 2.6.13 or greater, which you can + * get from http://www.libxml.org/ + * + * 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. + * + * Doxymacs homepage: http://doxymacs.sourceforge.net/ + * + * $Id: doxymacs_parser.c,v 1.12 2006/04/23 00:05:33 ryants Exp $ + * + */ + +#include +#include +#include +#include +#include + + +/* Our completion list */ + +typedef struct _desc_url_list +{ + char *desc; + char *url; + + struct _desc_url_list *next; +} desc_url_list; + +typedef struct _completion_list +{ + char *symbol; + desc_url_list *descs; + + struct _completion_list *next; +} completion_list; + +completion_list *comp_list = NULL; + + +/* A hash for quick look up of a symbol's entry in the completion list */ + +#define HASH_SIZE 11213 + +typedef struct _hash_entry +{ + completion_list *cl; + + struct _hash_entry *next; +} hash_entry; + +hash_entry *symbol_hash[HASH_SIZE]; + +inline unsigned int hash(const char *s) +{ + unsigned int h = 0; + + while (*s) + { + h += *s++; + } + + return abs(h % HASH_SIZE); +} + +inline void AddToHash(completion_list *cl) +{ + unsigned int h = hash(cl->symbol); + hash_entry **cur = &symbol_hash[h]; + + hash_entry *new = (hash_entry *)malloc(sizeof(hash_entry)); + + new->cl = cl; + new->next = *cur; + + *cur = new; +} + +/* mmmmm... free hash */ +inline void FreeHash(void) +{ + unsigned int i; + for (i = 0; i < HASH_SIZE; i++) + { + hash_entry *cur = symbol_hash[i]; + + while (cur) + { + hash_entry *tmp = cur; + + cur = cur->next; + + free(tmp); + } + } +} + + +/* XML Helper Functions */ + +inline char *XMLTagChild(xmlNodePtr node, const char *name) +{ + xmlNodePtr cur = node->xmlChildrenNode; + + while (cur) + { + if (!xmlStrcmp(cur->name, (const xmlChar *) name)) + { + xmlNodePtr cur_child = cur->xmlChildrenNode; + if (cur_child) + { + return (char *)cur_child->content; + } + else + { + return NULL; + } + } + cur = cur->next; + } + + return NULL; +} + +inline char *XMLTagAttr(xmlNodePtr node, const char *attr) +{ + xmlAttrPtr props = node->properties; + + while (props) + { + if (!xmlStrcmp(props->name, (const xmlChar *) attr)) + { + xmlNodePtr props_child = props->xmlChildrenNode; + if (props_child) + { + return (char *)props_child->content; + } + else + { + return NULL; + } + } + } + + return NULL; +} + + +/* Look up functions for symbols and descriptions */ + +inline completion_list *LookUpSymbol(const char *symbol) +{ + unsigned int h = hash(symbol); + hash_entry *cur = symbol_hash[h]; + + while (cur) + { + completion_list *cl = cur->cl; + + if (!strcmp(cl->symbol, symbol)) + { + return cl; + } + + cur = cur->next; + } + + return NULL; +} + +inline desc_url_list *LookUpDesc(completion_list *entry, const char *desc) +{ + desc_url_list *cur = entry->descs; + + while (cur) + { + if (!strcmp(cur->desc, desc)) + { + break; + } + + cur = cur->next; + } + + return cur; +} + +/* Add the given name, description and url to our completion list */ + +inline int AddToCompletionList(const char *name, + const char *desc, const char *url) +{ + completion_list *check; + + check = LookUpSymbol(name); + + if (check) + { + /* There is already a symbol with the same name in the list */ + if (!LookUpDesc(check, desc)) + { + /* If there is not yet a symbol with this desc, add it. */ + /* FIXME: what to do if there is already a symbol?? */ + desc_url_list *new_desc = + (desc_url_list *)malloc(sizeof(desc_url_list)); + + if (!new_desc) + { + fprintf(stderr, "malloc failed\n"); + return -1; + } + + new_desc->desc = (char *)desc; + new_desc->url = (char *)url; + new_desc->next = check->descs; + + check->descs = new_desc; + } + /* Free the name, which was strdup'ed */ + free((char*)name); + } + else + { + completion_list *new_entry = + (completion_list *)malloc(sizeof(completion_list)); + + if (!new_entry) + { + fprintf(stderr, "malloc failed\n"); + return -1; + } + + new_entry->symbol = (char *)name; + + new_entry->descs = (desc_url_list *)malloc(sizeof(desc_url_list)); + + if (!new_entry->descs) + { + fprintf(stderr, "malloc failed\n"); + return -1; + } + + new_entry->descs->desc = (char *)desc; + new_entry->descs->url = (char *)url; + new_entry->descs->next = NULL; + + new_entry->next = comp_list; + + comp_list = new_entry; + + AddToHash(new_entry); + } + + return 0; +} + +/* Encode the given string so that {X}Emacs will understand it */ +inline char *Encode(const char *s) +{ + unsigned int extra_len = 0; + char *c = (char *)s; + + if (!s) + { + return NULL; + } + + while (*c) + { + /* Is this all that needs to be escaped? */ + if (*c == '\\' || *c == '"') + { + extra_len++; + } + c++; + } + + if (!extra_len) + { + char *ret = strdup(s); + + if (!ret) + { + fprintf(stderr, "malloc failed\n"); + } + return ret; + } + else + { + char *ret = (char *)malloc(strlen(s) + extra_len + 1); + char *r = ret; + + if (!ret) + { + fprintf(stderr, "malloc failed\n"); + } + else + { + while (*s) + { + if (*s == '\\') + { + *r++ = '\\'; + *r++ = '\\'; + } + else if (*s == '"') + { + *r++ = '\\'; + *r++ = '"'; + } + else + { + *r++ = *s; + } + s++; + } + *r = '\0'; + } + return ret; + } +} + +/* Output the completion list in a way {X}Emacs can easily read in */ + +inline int OutputCompletionList(void) +{ + completion_list *cur = comp_list; + + printf("("); + + while (cur) + { + desc_url_list *desc = cur->descs; + char *encoded_symbol = Encode(cur->symbol); + + if (!encoded_symbol) + { + return -1; + } + + printf("(\"%s\" ", encoded_symbol); + + free(encoded_symbol); + + while (desc) + { + char *encoded_desc = Encode(desc->desc); + char *encoded_url = Encode(desc->url); + + if (!encoded_desc || !encoded_url) + { + return -1; + } + + printf("(\"%s\" . \"%s\")", encoded_desc, encoded_url); + + free(encoded_desc); + free(encoded_url); + + if (desc->next) + { + printf(" "); + } + desc = desc->next; + } + + printf(")"); + + if (cur->next) + { + printf(" "); + } + + cur = cur->next; + } + + printf(")\n"); + + return 0; +} + +/* Clean up */ + +inline void FreeCompletionList(void) +{ + completion_list *cur = comp_list; + + while (cur) + { + desc_url_list *desc = cur->descs; + completion_list *tmp_cl = cur; + + while (desc) + { + desc_url_list *tmp_desc = desc; + + desc = desc->next; + + free(tmp_desc->desc); + free(tmp_desc->url); + free(tmp_desc); + } + + cur = cur->next; + + free(tmp_cl->symbol); + free(tmp_cl); + } +} + +/* Add the members of a compound to the completion list */ + +inline int AddCompoundMembers(xmlNodePtr compound, + const char *name, const char *url) +{ + xmlNodePtr child = compound->xmlChildrenNode; + int ret = 0; + + while (child && !ret) + { + if (!xmlStrcmp(child->name, (const xmlChar *) "member")) + { + char *member_name = XMLTagChild(child, "name"); + char *member_anchor = XMLTagChild(child, "anchor"); + char *member_args = XMLTagChild(child, "arglist"); + + /* member_args can be NULL... just means there's no args */ + if (!member_name || !member_anchor) + { + fprintf(stderr, "Invalid Doxygen tags file\n"); + ret = -1; + } + else + { + char *member_name_copy = strdup(member_name); + + char *member_url = (char *)malloc(strlen(url) + + strlen(member_anchor) + + 2); + char *member_desc = (char *)malloc(strlen(name) + + strlen(member_name) + + (member_args ? + strlen(member_args) : 0) + + 3); + + if (member_url && member_desc && member_name_copy) + { + sprintf(member_url, "%s#%s", url, member_anchor); + sprintf(member_desc, + "%s::%s%s", + name, member_name, member_args ? member_args : ""); + + if (AddToCompletionList(member_name_copy, + member_desc, member_url) < 0) + { + ret = -1; + } + } + else + { + fprintf(stderr, "malloc failed\n"); + + if (member_url) + { + free(member_url); + } + if (member_desc) + { + free(member_desc); + } + if (member_name_copy) + { + free(member_name_copy); + } + + ret = -1; + } + } + } + child = child->next; + } + + return ret; +} + +int main(int argc, char *argv[]) +{ + xmlDocPtr doc = NULL; + xmlNodePtr cur; + int ret = 0; + int res; +#define BUFF_SIZE 25 * 1024 + char buff[BUFF_SIZE]; + + LIBXML_TEST_VERSION; + + comp_list = NULL; + memset(symbol_hash, 0, sizeof(symbol_hash)); + + res = fread(buff, 1, 4, stdin); + if (res > 0) { + xmlParserCtxtPtr ctxt = xmlCreatePushParserCtxt(NULL, NULL, + buff, res, "stdin"); + + if (!ctxt) + { + fprintf(stderr, "Failed to parse XML file\n"); + ret = -1; + goto abort; + } + + while ((res = fread(buff, 1, BUFF_SIZE, stdin)) > 0) + { + if (xmlParseChunk(ctxt, buff, res, 0) != 0) + { + fprintf(stderr, "Failed to parse XML file\n"); + ret = -1; + xmlFreeParserCtxt(ctxt); + goto abort; + } + } + if (xmlParseChunk(ctxt, buff, 0, 1) != 0) + { + fprintf(stderr, "Failed to parse XML file\n"); + ret = -1; + xmlFreeParserCtxt(ctxt); + goto abort; + } + doc = ctxt->myDoc; + xmlFreeParserCtxt(ctxt); + } + + if (!doc) + { + fprintf(stderr, "Failed to parse XML file\n"); + ret = -1; + goto abort; + } + + cur = xmlDocGetRootElement(doc); + if (!cur) + { + fprintf(stderr, "Empty XML document\n"); + ret = -1; + goto abort; + } + + if (xmlStrcmp(cur->name, (const xmlChar *) "tagfile")) + { + fprintf(stderr, "Invalid Doxygen tag file, root node != tagfile\n"); + ret = -1; + goto abort; + } + + cur = cur->xmlChildrenNode; + while (cur) + { + if (cur->type == XML_ELEMENT_NODE) + { + char *compound_name = XMLTagChild(cur, "name"); + char *compound_kind = XMLTagAttr(cur, "kind"); + char *compound_url = XMLTagChild(cur, "filename"); + char *compound_desc; + char *compound_name_copy; + char *compound_url_copy; + + if (!compound_name || !compound_kind || !compound_url) + { + fprintf(stderr, "Invalid Doxygen tags file\n"); + ret = -1; + goto abort; + } + + compound_desc = (char *)malloc(strlen(compound_kind) + + strlen(compound_name) + 3); + + if (!compound_desc) + { + fprintf(stderr, "malloc failed\n"); + ret = -1; + goto abort; + } + + sprintf(compound_desc, "%s %s", compound_kind, compound_name); + + /* Workaround for apparent Doxygen 1.2.18 bug */ + { + int copy_url = 1; + /* Some compounds don't get the .html in the URL */ + if (strcmp(compound_url + strlen(compound_url) + - strlen(".html"), + ".html") != 0) + { + compound_url_copy = (char *)malloc(strlen(compound_url) + + strlen(".html") + 1); + sprintf(compound_url_copy, "%s.html", compound_url); + compound_url = compound_url_copy; + copy_url = 0; + } + compound_name_copy = strdup(compound_name); + if (copy_url) + { + compound_url_copy = strdup(compound_url); + } + else + { + compound_url_copy = compound_url; + } + } + + if (!compound_name_copy || !compound_url_copy) + { + fprintf(stderr, "malloc failed\n"); + ret = -1; + + if (compound_name_copy) + { + free(compound_name_copy); + } + if (compound_url_copy) + { + free(compound_url_copy); + } + + goto abort; + } + + if (AddToCompletionList(compound_name_copy, + compound_desc, + compound_url_copy) < 0) + { + ret = -1; + goto abort; + } + + if (AddCompoundMembers(cur, compound_name, compound_url) < 0) + { + ret = -1; + goto abort; + } + } + + cur = cur->next; + } + + if (OutputCompletionList() < 0) + { + ret = -1; + goto abort; + } + + abort: + FreeHash(); + + FreeCompletionList(); + + if (doc) + { + xmlFreeDoc(doc); + } + + return ret; +} diff --git a/doxymacs/configure.ac b/doxymacs/configure.ac new file mode 100644 index 0000000..691b53d --- /dev/null +++ b/doxymacs/configure.ac @@ -0,0 +1,58 @@ +dnl Process this file with autoconf to produce a configure script. +dnl $Id: configure.ac,v 1.11 2007/06/10 13:17:24 ryants Exp $ +AC_INIT(doxymacs, 1.8.0, http://sourceforge.net/projects/doxymacs) + +AC_PREREQ(2.57) + +AC_REVISION($Revision: 1.11 $) + +AC_CONFIG_SRCDIR(c/doxymacs_parser.c) + +AM_INIT_AUTOMAKE(doxymacs, 1.8.0) + +AC_PREFIX_DEFAULT(${HOME}) + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_INSTALL +AM_PATH_LISPDIR + +dnl Checks for libraries. +AM_PATH_XML2(2.6.13) + +dnl Checks for header files. +AC_HEADER_STDC + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST + +dnl Checks for library functions. +AC_CHECK_FUNCS(strdup) + +dnl Doxymacs specific configure options +AC_ARG_WITH(default-style, + AC_HELP_STRING([--with-default-style=STYLE], + [Default Doxygen style to use. One of "JavaDoc", "Qt" or "C++". Default "JavaDoc". ]), + DOXYMACS_DEFAULT_STYLE="$withval", DOXYMACS_DEFAULT_STYLE="JavaDoc") + +AC_ARG_WITH(external-xml-parser, + AC_HELP_STRING([--with-external-xml-parser], + [Use external default xml parser by default. Default is to use internal xml parser.]), + DOXYMACS_USE_EXTERNAL_XML_PARSER="t", DOXYMACS_USE_EXTERNAL_XML_PARSER="nil") + +AC_SUBST(DOXYMACS_DEFAULT_STYLE) +AC_SUBST(DOXYMACS_USE_EXTERNAL_XML_PARSER) + +dnl Here is a hack to get the REAL bindir without any other +dnl embedded variables. +AC_CONFIG_COMMANDS_PRE([abs_bindir=${bindir} ; while echo ${abs_bindir} | grep '${[[A-Za-z0-9_]]\+}' > /dev/null ; do abs_bindir=`eval echo ${abs_bindir}` ; done ; DOXYMACS_PARSER=${abs_bindir}/doxymacs_parser${EXEEXT}]) + +AC_SUBST(DOXYMACS_PARSER) + +AC_ARG_VAR(EMACS, [How to invoke emacs (e.g. EMACS=xemacs to use XEmacs).]) +AC_ARG_VAR(EMACSLOADPATH, [Default load-path for EMACS.]) + +AC_CONFIG_FILES([Makefile c/Makefile lisp/Makefile lisp/doxymacs.el + no-autoconf/Makefile]) + +AC_OUTPUT diff --git a/doxymacs/elisp-comp b/doxymacs/elisp-comp new file mode 100755 index 0000000..899ba74 --- /dev/null +++ b/doxymacs/elisp-comp @@ -0,0 +1,54 @@ +#!/bin/sh +# Copyright 1995 Free Software Foundation, Inc. +# François Pinard , 1995. +# +# 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, 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. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This script byte-compiles all `.el' files which are part of its +# arguments, using GNU Emacs, and put the resulting `.elc' files into +# the current directory, so disregarding the original directories used +# in `.el' arguments. +# +# This script manages in such a way that all Emacs LISP files to +# be compiled are made visible between themselves, in the event +# they require or load-library one another. + +if test $# = 0; then + echo 1>&2 "No files given to $0" + exit 1 +else + if test -z "$EMACS" || test "$EMACS" = "t"; then + # Value of "t" means we are running in a shell under Emacs. + # Just assume Emacs is called "emacs". + EMACS=emacs + fi + + tempdir=elc.$$ + mkdir $tempdir + cp $* $tempdir + cd $tempdir + + echo "(setq load-path (cons \"..\" load-path))" > script + $EMACS -batch -q -l script -f batch-byte-compile *.el + mv *.elc .. + + cd .. + rm -fr $tempdir +fi diff --git a/doxymacs/example/doc/doxy.tag b/doxymacs/example/doc/doxy.tag new file mode 100644 index 0000000..da49583 --- /dev/null +++ b/doxymacs/example/doc/doxy.tag @@ -0,0 +1,128 @@ + + + + aclass.h + /home/rts/projects/doxymacs/example/src/ + aclass_8h + NameSpaceTest + Foo + blah + baz + + #define + SOME_OBSCURE_DEFINE + aclass_8h.html + a0 + + + + _blah + a4 + + + + FOO_SNAZ + a4a2 + + + + Foo + a4a3 + + + + int + foobazbar + namespaceNameSpaceTest.html + a0 + + + + + baz + structbaz.html + + int + z + structbaz.html + o0 + + + + + blah + structblah.html + + int + x + structblah.html + o0 + + + + int + y + structblah.html + o1 + + + + + Foo + classFoo.html + + blah_blah + w2 + + + + BAZ + w2w0 + + + + BAZ2 + w2w1 + + + + + Foo + classFoo.html + a0 + (int blah) + + + + GetBlah + classFoo.html + a1 + (void) const + + + + Foo + classFoo.html + d0 + (int &in, int &out, int &inout) + + + int + _blah + classFoo.html + r0 + + + + + NameSpaceTest + namespaceNameSpaceTest.html + + int + foobazbar + namespaceNameSpaceTest.html + a0 + + + + diff --git a/doxymacs/example/doc/html/aclass_8h-source.html b/doxymacs/example/doc/html/aclass_8h-source.html new file mode 100644 index 0000000..3696150 --- /dev/null +++ b/doxymacs/example/doc/html/aclass_8h-source.html @@ -0,0 +1,65 @@ + + +Test project: aclass.h Source File + + + + +

aclass.h

Go to the documentation of this file.
00001 // $Id: aclass_8h-source.html,v 1.6 2006/04/23 01:04:30 ryants Exp $
+00002 // This is just some silly sample file to test out doxymacs with.
+00003 #ifndef _ACLASS_H_
+00004 #define _ACLASS_H_
+00005 
+00006 
+00007 #define SOME_OBSCURE_DEFINE 76
+00008 
+00013 class Foo
+00014 {
+00015   public:
+00021     Foo(int blah)
+00022         : _blah(blah)
+00023         {}
+00024 
+00028     GetBlah(void) const { return _blah; }
+00029 
+00030     enum blah_blah
+00031         {
+00032             BAZ,
+00033             BAZ2,
+00034         };
+00035 
+00036   private:
+00037 
+00045     Foo(int &in, int &out, int &inout) { out = in + inout; }
+00046 
+00048     int _blah;
+00049 };
+00050 
+00052 struct blah
+00053 {
+00054     int x;
+00055     int y;
+00056 };
+00057 
+00058 typedef struct
+00059 {
+00060     int z;
+00061 } baz;
+00062 
+00064 enum _blah
+00065 {
+00066     FOO_SNAZ,                   
+00067     Foo
+00068 };
+00069 
+00071 namespace NameSpaceTest
+00072 {
+00073     int foobazbar;
+00074 }
+00075 
+00076 #endif // _ACLASS_H_
+

Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/aclass_8h.html b/doxymacs/example/doc/html/aclass_8h.html new file mode 100644 index 0000000..da7fe67 --- /dev/null +++ b/doxymacs/example/doc/html/aclass_8h.html @@ -0,0 +1,109 @@ + + +Test project: aclass.h File Reference + + + + +

aclass.h File Reference

+

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + +

Namespaces

namespace  NameSpaceTest

Classes

class  Foo
 This class does blah. More...
struct  blah
 This struct does something useless. More...
struct  baz

Defines

#define SOME_OBSCURE_DEFINE   76

Enumerations

enum  _blah { FOO_SNAZ, +Foo + }
 This is a useless enum. More...

Variables

int NameSpaceTest::foobazbar
+


Define Documentation

+

+ + + + +
+ + + + +
#define SOME_OBSCURE_DEFINE   76
+
+ + + + + +
+   + + +

+ +

+Definition at line 7 of file aclass.h.

+


Enumeration Type Documentation

+

+ + + + +
+ + + + +
enum _blah
+
+ + + + + +
+   + + +

+This is a useless enum. +

+

Enumerator:
+ + + +
FOO_SNAZ  +More silly stuff.
Foo  +
+
+ +

+Definition at line 64 of file aclass.h.

00065 {
+00066     FOO_SNAZ,                   
+00067     Foo
+00068 };
+
+

+

+


Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/annotated.html b/doxymacs/example/doc/html/annotated.html new file mode 100644 index 0000000..32aa5be --- /dev/null +++ b/doxymacs/example/doc/html/annotated.html @@ -0,0 +1,17 @@ + + +Test project: Class List + + + + +

Test project Class List

Here are the classes, structs, unions and interfaces with brief descriptions: + + + +
baz
blahThis struct does something useless
FooThis class does blah
+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/classFoo-members.html b/doxymacs/example/doc/html/classFoo-members.html new file mode 100644 index 0000000..a2fe85b --- /dev/null +++ b/doxymacs/example/doc/html/classFoo-members.html @@ -0,0 +1,20 @@ + + +Test project: Member List + + + + +

Foo Member List

This is the complete list of members for Foo, including all inherited members.

+ + + + + + + +
_blahFoo [private]
BAZ enum valueFoo
BAZ2 enum valueFoo
blah_blah enum nameFoo
Foo(int blah)Foo [inline]
Foo(int &in, int &out, int &inout)Foo [inline, private]
GetBlah(void) const Foo [inline]


Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/classFoo.html b/doxymacs/example/doc/html/classFoo.html new file mode 100644 index 0000000..54488db --- /dev/null +++ b/doxymacs/example/doc/html/classFoo.html @@ -0,0 +1,250 @@ + + +Test project: Foo Class Reference + + + + +

Foo Class Reference

This class does blah. +More... +

+#include <aclass.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + +

Public Types

enum  blah_blah { BAZ, +BAZ2 + }

Public Member Functions

 Foo (int blah)
 The constructor.
 GetBlah (void) const
 Gets the current value of blah.

Private Member Functions

 Foo (int &in, int &out, int &inout)
 Testing the in/out parameter stuff.

Private Attributes

int _blah
 This is a measure of our blahness.
+


Detailed Description

+This class does blah. +

+ +

+Definition at line 13 of file aclass.h.


Member Enumeration Documentation

+

+ + + + +
+ + + + +
enum Foo::blah_blah
+
+ + + + + +
+   + + +

+

Enumerator:
+ + + +
BAZ  +
BAZ2  +
+
+ +

+Definition at line 30 of file aclass.h.

00031         {
+00032             BAZ,
+00033             BAZ2,
+00034         };
+
+

+

+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
Foo::Foo int  blah  )  [inline]
+
+ + + + + +
+   + + +

+The constructor. +

+

Parameters:
+ + +
blah Some kind of fish.
+
+ +

+Definition at line 21 of file aclass.h.

00022         : _blah(blah)
+00023         {}
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Foo::Foo int &  in,
int &  out,
int &  inout
[inline, private]
+
+ + + + + +
+   + + +

+Testing the in/out parameter stuff. +

+

Parameters:
+ + + + +
[in] in An "in" parameter
[out] out An "out" parameter
[in,out] inout An "inout" parameter
+
+ +

+Definition at line 45 of file aclass.h.

00045 { out = in + inout; }
+
+

+

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + +
Foo::GetBlah void   )  const [inline]
+
+ + + + + +
+   + + +

+Gets the current value of blah. +

+ +

+Definition at line 28 of file aclass.h.

00028 { return _blah; }
+
+

+

+


Member Data Documentation

+

+ + + + +
+ + + + +
int Foo::_blah [private]
+
+ + + + + +
+   + + +

+This is a measure of our blahness. +

+ +

+Definition at line 48 of file aclass.h.

+


The documentation for this class was generated from the following file: +
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/doxygen.css b/doxymacs/example/doc/html/doxygen.css new file mode 100644 index 0000000..decae9e --- /dev/null +++ b/doxymacs/example/doc/html/doxygen.css @@ -0,0 +1,309 @@ +BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { + font-family: Geneva, Arial, Helvetica, sans-serif; +} +BODY,TD { + font-size: 90%; +} +H1 { + text-align: center; + font-size: 160%; +} +H2 { + font-size: 120%; +} +H3 { + font-size: 100%; +} +CAPTION { font-weight: bold } +DIV.qindex { + width: 100%; + background-color: #eeeeff; + border: 1px solid #b0b0b0; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.nav { + width: 100%; + background-color: #eeeeff; + border: 1px solid #b0b0b0; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navtab { + background-color: #eeeeff; + border: 1px solid #b0b0b0; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +TD.navtab { + font-size: 70%; +} +A.qindex { + text-decoration: none; + font-weight: bold; + color: #1A419D; +} +A.qindex:visited { + text-decoration: none; + font-weight: bold; + color: #1A419D +} +A.qindex:hover { + text-decoration: none; + background-color: #ddddff; +} +A.qindexHL { + text-decoration: none; + font-weight: bold; + background-color: #6666cc; + color: #ffffff; + border: 1px double #9295C2; +} +A.qindexHL:hover { + text-decoration: none; + background-color: #6666cc; + color: #ffffff; +} +A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } +A.el { text-decoration: none; font-weight: bold } +A.elRef { font-weight: bold } +A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} +A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} +A.codeRef:link { font-weight: normal; color: #0000FF} +A.codeRef:visited { font-weight: normal; color: #0000FF} +A:hover { text-decoration: none; background-color: #f2f2ff } +DL.el { margin-left: -1cm } +.fragment { + font-family: Fixed, monospace; + font-size: 95%; +} +PRE.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + margin-top: 4px; + margin-bottom: 4px; + margin-left: 2px; + margin-right: 8px; + padding-left: 6px; + padding-right: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } +TD.md { background-color: #F4F4FB; font-weight: bold; } +TD.mdPrefix { + background-color: #F4F4FB; + color: #606060; + font-size: 80%; +} +TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; } +TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; } +DIV.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; +} +DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } +BODY { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} +TD.indexkey { + background-color: #eeeeff; + font-weight: bold; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TD.indexvalue { + background-color: #eeeeff; + font-style: italic; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TR.memlist { + background-color: #f0f0f0; +} +P.formulaDsp { text-align: center; } +IMG.formulaDsp { } +IMG.formulaInl { vertical-align: middle; } +SPAN.keyword { color: #008000 } +SPAN.keywordtype { color: #604020 } +SPAN.keywordflow { color: #e08000 } +SPAN.comment { color: #800000 } +SPAN.preprocessor { color: #806020 } +SPAN.stringliteral { color: #002080 } +SPAN.charliteral { color: #008080 } +.mdTable { + border: 1px solid #868686; + background-color: #F4F4FB; +} +.mdRow { + padding: 8px 10px; +} +.mdescLeft { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.mdescRight { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplParams { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + color: #606060; + background-color: #FAFAFA; + font-size: 80%; +} +.search { color: #003399; + font-weight: bold; +} +FORM.search { + margin-bottom: 0px; + margin-top: 0px; +} +INPUT.search { font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #eeeeff; +} +TD.tiny { font-size: 75%; +} +a { + color: #252E78; +} +a:visited { + color: #3D2185; +} +.dirtab { padding: 4px; + border-collapse: collapse; + border: 1px solid #b0b0b0; +} +TH.dirtab { background: #eeeeff; + font-weight: bold; +} +HR { height: 1px; + border: none; + border-top: 1px solid black; +} diff --git a/doxymacs/example/doc/html/doxygen.png b/doxymacs/example/doc/html/doxygen.png new file mode 100644 index 0000000..f0a274b Binary files /dev/null and b/doxymacs/example/doc/html/doxygen.png differ diff --git a/doxymacs/example/doc/html/files.html b/doxymacs/example/doc/html/files.html new file mode 100644 index 0000000..1eee0e8 --- /dev/null +++ b/doxymacs/example/doc/html/files.html @@ -0,0 +1,15 @@ + + +Test project: File Index + + + + +

Test project File List

Here is a list of all files with brief descriptions: + +
aclass.h [code]
+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/functions.html b/doxymacs/example/doc/html/functions.html new file mode 100644 index 0000000..2535287 --- /dev/null +++ b/doxymacs/example/doc/html/functions.html @@ -0,0 +1,26 @@ + + +Test project: Class Members + + + + + +Here is a list of all class members with links to the classes they belong to: +

+

+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/functions_enum.html b/doxymacs/example/doc/html/functions_enum.html new file mode 100644 index 0000000..b4b1f9e --- /dev/null +++ b/doxymacs/example/doc/html/functions_enum.html @@ -0,0 +1,18 @@ + + +Test project: Class Members - Enumerations + + + + + + +

+

    +
  • blah_blah +: Foo
+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/functions_eval.html b/doxymacs/example/doc/html/functions_eval.html new file mode 100644 index 0000000..f760434 --- /dev/null +++ b/doxymacs/example/doc/html/functions_eval.html @@ -0,0 +1,19 @@ + + +Test project: Class Members - Enumerator + + + + + + +

+

+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/functions_func.html b/doxymacs/example/doc/html/functions_func.html new file mode 100644 index 0000000..2eeeb3e --- /dev/null +++ b/doxymacs/example/doc/html/functions_func.html @@ -0,0 +1,19 @@ + + +Test project: Class Members - Functions + + + + + + +

+

    +
  • Foo() +: Foo
  • GetBlah() +: Foo
+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/functions_vars.html b/doxymacs/example/doc/html/functions_vars.html new file mode 100644 index 0000000..478ac74 --- /dev/null +++ b/doxymacs/example/doc/html/functions_vars.html @@ -0,0 +1,21 @@ + + +Test project: Class Members - Variables + + + + + + +

+

+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/globals.html b/doxymacs/example/doc/html/globals.html new file mode 100644 index 0000000..51f1129 --- /dev/null +++ b/doxymacs/example/doc/html/globals.html @@ -0,0 +1,22 @@ + + +Test project: Class Members + + + + + +Here is a list of all file members with links to the files they belong to: +

+

+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/globals_defs.html b/doxymacs/example/doc/html/globals_defs.html new file mode 100644 index 0000000..d3537b7 --- /dev/null +++ b/doxymacs/example/doc/html/globals_defs.html @@ -0,0 +1,18 @@ + + +Test project: Class Members + + + + + + +

+

+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/globals_enum.html b/doxymacs/example/doc/html/globals_enum.html new file mode 100644 index 0000000..dcbe172 --- /dev/null +++ b/doxymacs/example/doc/html/globals_enum.html @@ -0,0 +1,18 @@ + + +Test project: Class Members + + + + + + +

+

+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/globals_eval.html b/doxymacs/example/doc/html/globals_eval.html new file mode 100644 index 0000000..b83d872 --- /dev/null +++ b/doxymacs/example/doc/html/globals_eval.html @@ -0,0 +1,19 @@ + + +Test project: Class Members + + + + + + +

+

+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/globals_vars.html b/doxymacs/example/doc/html/globals_vars.html new file mode 100644 index 0000000..1d18a81 --- /dev/null +++ b/doxymacs/example/doc/html/globals_vars.html @@ -0,0 +1,18 @@ + + +Test project: Class Members + + + + + + +

+

+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/index.html b/doxymacs/example/doc/html/index.html new file mode 100644 index 0000000..453c5c9 --- /dev/null +++ b/doxymacs/example/doc/html/index.html @@ -0,0 +1,14 @@ + + +Test project: Main Page + + + + +

Test project Documentation

+

+


Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/namespaceNameSpaceTest.html b/doxymacs/example/doc/html/namespaceNameSpaceTest.html new file mode 100644 index 0000000..2e05e6b --- /dev/null +++ b/doxymacs/example/doc/html/namespaceNameSpaceTest.html @@ -0,0 +1,48 @@ + + +Test project: NameSpaceTest Namespace Reference + + + + +

NameSpaceTest Namespace Reference

Some namespace. +More... +

+ + + + + +

Variables

int foobazbar
+


Detailed Description

+Some namespace.

Variable Documentation

+

+ + + + +
+ + + + +
int NameSpaceTest::foobazbar
+
+ + + + + +
+   + + +

+ +

+Definition at line 73 of file aclass.h.

+


Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/namespacemembers.html b/doxymacs/example/doc/html/namespacemembers.html new file mode 100644 index 0000000..e448d24 --- /dev/null +++ b/doxymacs/example/doc/html/namespacemembers.html @@ -0,0 +1,18 @@ + + +Test project: Class Members + + + + + +Here is a list of all namespace members with links to the namespace documentation for each member: +

+

+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/namespacemembers_vars.html b/doxymacs/example/doc/html/namespacemembers_vars.html new file mode 100644 index 0000000..3ad78fb --- /dev/null +++ b/doxymacs/example/doc/html/namespacemembers_vars.html @@ -0,0 +1,18 @@ + + +Test project: Class Members + + + + + + +

+

+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/namespaces.html b/doxymacs/example/doc/html/namespaces.html new file mode 100644 index 0000000..eeb28f8 --- /dev/null +++ b/doxymacs/example/doc/html/namespaces.html @@ -0,0 +1,15 @@ + + +Test project: Namespace Index + + + + +

Test project Namespace List

Here is a list of all namespaces with brief descriptions: + +
NameSpaceTestSome namespace
+
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/structbaz-members.html b/doxymacs/example/doc/html/structbaz-members.html new file mode 100644 index 0000000..de10173 --- /dev/null +++ b/doxymacs/example/doc/html/structbaz-members.html @@ -0,0 +1,14 @@ + + +Test project: Member List + + + + +

baz Member List

This is the complete list of members for baz, including all inherited members.

+ +
zbaz


Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/structbaz.html b/doxymacs/example/doc/html/structbaz.html new file mode 100644 index 0000000..a63ec47 --- /dev/null +++ b/doxymacs/example/doc/html/structbaz.html @@ -0,0 +1,53 @@ + + +Test project: baz Struct Reference + + + + +

baz Struct Reference

#include <aclass.h> +

+List of all members. + + + + +

Public Attributes

int z
+


Detailed Description

+ +

+ +

+Definition at line 58 of file aclass.h.


Member Data Documentation

+

+ + + + +
+ + + + +
int baz::z
+
+ + + + + +
+   + + +

+ +

+Definition at line 60 of file aclass.h.

+


The documentation for this struct was generated from the following file: +
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/structblah-members.html b/doxymacs/example/doc/html/structblah-members.html new file mode 100644 index 0000000..0341432 --- /dev/null +++ b/doxymacs/example/doc/html/structblah-members.html @@ -0,0 +1,15 @@ + + +Test project: Member List + + + + +

blah Member List

This is the complete list of members for blah, including all inherited members.

+ + +
xblah
yblah


Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/doc/html/structblah.html b/doxymacs/example/doc/html/structblah.html new file mode 100644 index 0000000..1d0b79d --- /dev/null +++ b/doxymacs/example/doc/html/structblah.html @@ -0,0 +1,83 @@ + + +Test project: blah Struct Reference + + + + +

blah Struct Reference

This struct does something useless. +More... +

+#include <aclass.h> +

+List of all members. + + + + + + +

Public Attributes

int x
int y
+


Detailed Description

+This struct does something useless. +

+ +

+Definition at line 52 of file aclass.h.


Member Data Documentation

+

+ + + + +
+ + + + +
int blah::x
+
+ + + + + +
+   + + +

+ +

+Definition at line 54 of file aclass.h.

+

+ + + + +
+ + + + +
int blah::y
+
+ + + + + +
+   + + +

+ +

+Definition at line 55 of file aclass.h.

+


The documentation for this struct was generated from the following file: +
Generated on Sat Apr 22 17:58:57 2006 for Test project by  + +doxygen 1.4.4
+ + diff --git a/doxymacs/example/src/aclass.h b/doxymacs/example/src/aclass.h new file mode 100644 index 0000000..3efeb6e --- /dev/null +++ b/doxymacs/example/src/aclass.h @@ -0,0 +1,76 @@ +// $Id: aclass.h,v 1.3 2005/04/01 06:05:06 ryants Exp $ +// This is just some silly sample file to test out doxymacs with. +#ifndef _ACLASS_H_ +#define _ACLASS_H_ + + +#define SOME_OBSCURE_DEFINE 76 + +/** + * This class does blah. + * + */ +class Foo +{ + public: + /** + * The constructor. + * + * @param blah Some kind of fish. + */ + Foo(int blah) + : _blah(blah) + {} + + /** + * Gets the current value of blah. + */ + GetBlah(void) const { return _blah; } + + enum blah_blah + { + BAZ, + BAZ2, + }; + + private: + + /** + * Testing the in/out parameter stuff. + * + * @param[in] in An "in" parameter + * @param[out] out An "out" parameter + * @param[in,out] inout An "inout" parameter + */ + Foo(int &in, int &out, int &inout) { out = in + inout; } + + /** This is a measure of our blahness. */ + int _blah; +}; + +/** This struct does something useless */ +struct blah +{ + int x; + int y; +}; + +typedef struct +{ + int z; +} baz; + +/** This is a useless enum */ +enum _blah +{ + FOO_SNAZ, /**< More silly stuff. */ + Foo +}; + +/** Some namespace */ +namespace NameSpaceTest +{ + int foobazbar; +} + +#endif // _ACLASS_H_ diff --git a/doxymacs/example/src/doxy.conf b/doxymacs/example/src/doxy.conf new file mode 100644 index 0000000..4523d55 --- /dev/null +++ b/doxymacs/example/src/doxy.conf @@ -0,0 +1,1142 @@ +# Doxyfile 1.3.7 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = "Test project" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = ../doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 2 levels of 10 sub-directories under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of source +# files, where putting all generated files in the same directory would otherwise +# cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, +# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en +# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, +# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for +# all platforms other than Windows). + +USE_WINDOWS_ENCODING = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is used +# as the annotated text. Otherwise, the brief description is used as-is. If left +# blank, the following values are used ("$name" is automatically replaced with the +# name of the entity): "The $name class" "The $name widget" "The $name file" +# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = YES + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited +# members of a class in the documentation of that class as if those members were +# ordinary class members. Constructors, destructors and assignment operators of +# the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = YES + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources +# only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = . + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp +# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = doxy.conf + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories +# that are symbolic links (a Unix filesystem feature) are excluded from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. + +EXCLUDE_PATTERNS = *~ + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. + +INPUT_FILTER = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = YES + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_PREDEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse the +# parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = ../doc/doxy.tag + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = YES + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or +# super classes. Setting the tag to NO turns the diagrams off. Note that this +# option is superseded by the HAVE_DOT option below. This is only a fallback. It is +# recommended to install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found on the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 1024 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes that +# lay further from the root node will be omitted. Note that setting this option to +# 1 or 2 may greatly reduce the computation time needed for large code bases. Also +# note that a graph may be further truncated if the graph's image dimensions are +# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). +# If 0 is used for the depth value (the default), the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/doxymacs/htdocs/index.html b/doxymacs/htdocs/index.html new file mode 100644 index 0000000..1ee3dab --- /dev/null +++ b/doxymacs/htdocs/index.html @@ -0,0 +1,287 @@ + + + + + Doxymacs = Doxygen + Emacs + + + +

Doxymacs

+

+ Doxymacs is Doxygen + + {X}Emacs. +

+ +

+ The purpose of the doxymacs project is to create a LISP package + that will make using Doxygen from within {X}Emacs easier. +

+ +

+ Version 1.8.0, + released 2007-06-10, has the following features: +

+ + + +

+ Please direct any bug reports or feature requests to the + appropriate forum on Doxymacs' + SourceForge page. +

+ +

Requirements

+ + Doxymacs depends on the following packages: + +
    + +
  • + W3 +
  • + +
  • + tempo +
  • + +
  • + version 2.6.13 or greater of libxml2. +
  • +
+ + Make sure these are properly configured and installed before + proceeding. + +

Installation

+ +
    + +
  • + Use the configure script to configure and build doxymacs: +
    +$ ./configure
    +$ make
    +$ make install
    +	
    + + Be sure to put ${datadir}/share/${EMACS}/site-lisp + in your load-path in your .emacs + file, or wherever you configured the .elc files to end up. +

    + NOTE If you get: +
    +!! File error (("Cannot open load file" "url"))
    +	
    + (or something similar) when you do make, + then set the variable EMACSLOADPATH: +
    +$ EMACSLOADPATH=... make
    +        
    + where ... is a colon separated list of directories + to seach for packages. +

    + To byte compile with XEmacs, set the variable EMACS: +
    +$ EMACS=xemacs make
    +        
    + + If you want to avoid byte-compiling altogether: +
    +$ make ELCFILES=
    +$ make install ELCFILES=
    +	
    + + For a complete list of configuration options: +
    +$ ./configure --help
    +        
    + + If you do not want to run or cannot run configure + then pre-baked .el files are available in the + no-autoconf/ directory; simply + copy these to somewhere in your load-path. + +
  • + +
  • + Customise the variables doxymacs-doxygen-root and + doxymacs-doxygen-tags. You can customise these + via the customisation menu Programming | Tools | Doxymacs. +
  • + +
  • + (Optional) Customise doxymacs-doxygen-style. The + default is "JavaDoc". See the + Doxygen manual for examples of the three available styles + (JavaDoc, Qt and C++). +
  • + +
  • + To use the external XML parser, set + doxymacs-use-external-xml-parser to non-nil (can + be done via the customisation menu). +
  • + +
  • + Put (require 'doxymacs) in your .emacs + file. +
  • + +
  • + Invoke doxymacs-mode with M-x + doxymacs-mode. To have doxymacs-mode + automatically come up whenever you visit a C/C++ file, put + (add-hook 'c-mode-common-hook'doxymacs-mode) in + your .emacs. +
  • + +
  • + If you want Doxygen keywords fontified use M-x + doxymacs-font-lock. To do it automatically, add + the following to your .emacs: + +
    +  (defun my-doxymacs-font-lock-hook ()
    +    (if (or (eq major-mode 'c-mode) (eq major-mode 'c++-mode))
    +        (doxymacs-font-lock)))
    +  (add-hook 'font-lock-mode-hook 'my-doxymacs-font-lock-hook)
    +	
    + + This will add the Doxygen keywords to c-mode and c++-mode + only. +
  • + +
  • + Default key bindings are: + +
      + +
    • + C-c d ? will look up documentation for the symbol + under the point. +
    • + +
    • + C-c d r will rescan your Doxygen tags file. +
    • + +
    • + C-c d f will insert a Doxygen comment for the + next function. +
    • + +
    • + C-c d i will insert a Doxygen comment for the + current file. +
    • + +
    • + C-c d ; will insert a Doxygen comment for a + member variable on the current line (like M-;). +
    • + +
    • + C-c d m will insert a blank multi-line Doxygen + comment. +
    • + +
    • + C-c d s will insert a blank single-line Doxygen + comment. +
    • + +
    • + C-c d @ will insert grouping comments around the + current region. +
    • +
    +
  • +
+ + Doxymacs has been tested on and works with: + +
    +
  • GNU Emacs 20.7.1, 21.1.1, 21.2.1, 21.3, 21.4.1.
  • +
  • XEmacs 21.1 (patch 14), XEmacs 21.4 (patch 4, 5, 6, 17).
  • +
  • Up to doxygen version 1.4.4
  • +
+ + If you have success or failure with other versions of {X}Emacs and + doxygen, please let the authors know. + +

+ +

Links

+ + + +

+ SourceForge Logo +

+ +

+ Valid HTML 4.01! +

+ +
+
Ryan T. Sammartino
+ + Last modified: Sun Jun 10 14:28:09 BST 2007 +

+ $Id: index.html,v 1.13 2007/06/10 13:30:33 ryants Exp $ +

+ + + + + + + diff --git a/doxymacs/lisp/Makefile.am b/doxymacs/lisp/Makefile.am new file mode 100644 index 0000000..31a231b --- /dev/null +++ b/doxymacs/lisp/Makefile.am @@ -0,0 +1,6 @@ +## Process this file with automake to produce Makefile.in +# $Id: Makefile.am,v 1.2 2003/01/06 00:45:15 ryants Exp $ + +lisp_LISP = xml-parse.el doxymacs.el + +EXTRA_DIST = xml-parse.el diff --git a/doxymacs/lisp/doxymacs.el.in b/doxymacs/lisp/doxymacs.el.in new file mode 100644 index 0000000..d20f771 --- /dev/null +++ b/doxymacs/lisp/doxymacs.el.in @@ -0,0 +1,1623 @@ +;;; -*-emacs-lisp-*- +;;; doxymacs.el --- ELisp package for making doxygen related stuff easier. +;; +;; +;; Copyright (C) 2001-2007 Ryan T. Sammartino +;; +;; Author: Ryan T. Sammartino +;; Kris Verbeeck +;; Created: 24/03/2001 +;; Version: @VERSION@ +;; Keywords: doxygen documentation +;; +;; This file is NOT part of GNU Emacs or XEmacs. +;; +;; 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. +;; +;; Doxymacs homepage: http://doxymacs.sourceforge.net/ +;; +;; $Id: doxymacs.el.in,v 1.27 2007/10/08 20:05:15 ryants Exp $ + +;; Commentary: +;; +;; Doxymacs depends on the following packages: +;; +;; - W3 http://www.cs.indiana.edu/usr/local/www/elisp/w3/docs.html +;; - tempo http://www.lysator.liu.se/~davidk/elisp/ +;; - libxml2 http://www.libxml.org/ +;; +;; Be sure these are properly configured and installed before proceeding. +;; +;; - Use the configure script to configure doxymacs: +;; +;; $ ./configure +;; $ make +;; $ make install +;; +;; Use ./configure --help for help on customising your configuration. +;; +;; If you get +;; +;; !! File error (("Cannot open load file" "url")) +;; +;; (or something similar) then set the variable EMACSLOADPATH before +;; doing make: +;; +;; $ EMACSLOADPATH=... make +;; +;; where ... is a colon separated list of directories to search for +;; packages. To byte compile with XEmacs, set the variable EMACS: +;; +;; $ EMACS=xemacs make +;; +;; If you would rather not byte compile the .el files at all, then do: +;; +;; $ make ELCFILES= +;; +;; - Customise the variable doxymacs-doxygen-dirs. +;; +;; - If your tags file is quite large (say, > 1 MB), consider setting +;; doxymacs-use-external-xml-parser to t and be sure to set +;; doxymacs-external-xml-parser-executable to the right value (the +;; default should usually be fine). A suitable program is +;; distributed along with this file in the directory doxymacs/c/. +;; With an 11 MB XML tag file, the internal process takes 20 minutes +;; on a PIII 800 with 1 GB of RAM, whereas the external process +;; takes 12 seconds. +;; +;; - Put (require 'doxymacs) in your .emacs +;; +;; - Invoke doxymacs-mode with M-x doxymacs-mode. To have doxymacs-mode +;; invoked automatically when in C/C++ mode, put +;; +;; (add-hook 'c-mode-common-hook 'doxymacs-mode) +;; +;; in your .emacs. +;; +;; - If you want Doxygen keywords fontified use M-x doxymacs-font-lock. +;; To do it automatically, add the following to your .emacs: +;; +;; (defun my-doxymacs-font-lock-hook () +;; (if (or (eq major-mode 'c-mode) (eq major-mode 'c++-mode)) +;; (doxymacs-font-lock))) +;; (add-hook 'font-lock-mode-hook 'my-doxymacs-font-lock-hook) +;; +;; This will add the Doxygen keywords to c-mode and c++-mode only. +;; +;; - Default key bindings are: +;; - C-c d ? will look up documentation for the symbol under the point. +;; - C-c d r will rescan your Doxygen tags file. +;; - C-c d f will insert a Doxygen comment for the next function. +;; - C-c d i will insert a Doxygen comment for the current file. +;; - C-c d ; will insert a Doxygen comment for the current member. +;; - C-c d m will insert a blank multiline Doxygen comment. +;; - C-c d s will insert a blank singleline Doxygen comment. +;; - C-c d @ will insert grouping comments around the current region. +;; +;; Doxymacs has been tested on and works with: +;; - GNU Emacs 20.7.1, 21.1.1, 21.2.1, 21.2.92.1, 21.3, 21.4.1 +;; - XEmacs 21.1 (patch 14), 21.4 (patches 4-17) +;; +;; If you have success or failure with other version of {X}Emacs, please +;; let the authors know. + +;; Change log: +;; +;; 10/06/2007 - version 1.8.0 +;; 02/02/2007 - bug #1490021: Allow spaces in @param [in] documentation. +;; bug #1496399: Allow for different ways of user-mail-address +;; to be defined. +;; 22/04/2006 - feature #1338245: Add tokens to filladapt to match +;; doxygen markup. +;; - version 1.7.0 +;; 04/06/2005 - version 1.6.0 +;; 14/04/2005 - Use doxymacs-url-exists-p to wrap the various ways of +;; checking whether a URL exists. +;; - Clean up symbol-near-point hack. +;; 13/04/2005 - feature request #868413: ability to customize the browser +;; doxymacs uses to display documentation. +;; 12/04/2005 - bug #990123: grouping comments do not work. +;; - add some missing doxygen keywords. +;; 01/04/2005 - patch #1024026: use new font-lock-add-keywords function if +;; available. +;; 31/03/2005 - patch #1102042: handle @param[in] etc. constructs +;; 25/01/2003 - remove hard coded version number from comments. +;; - add instructions to avoid byte compiling files. +;; - version 1.5.0 +;; 11/01/2003 - feature #665470: C++ style. +;; - fix bug #665099: missing @var fontification. +;; - fix bug #665372: @example not fontified properly. +;; - fix fontification for other keywords as well. +;; - new customisation variable doxymacs command-character +;; which allows for customisation of the character used +;; to introduce Doxygen commands independent of the +;; current style. +;; 05/01/2003 - autoconf-ise. +;; - version 1.4.0 +;; 09/12/2002 - turn off buffer modified flag for doxytags to avoid +;; prompting user for killing a modified buffer. +;; 08/12/2002 - move to association lists to support multiple Doxygen +;; generates. +;; 30/11/2002 - apply patch 636146: +;; - several FIXMEs fixed +;; - user-defined "void" types +;; - thanks to Georg Drenkhahn +;; 31/08/2002 - bug #601028 fixed... functions with blank lines in their +;; argument list confused doxymacs-extract-args-list +;; - version 1.3.2 +;; 09/05/2002 - fix issues compiling doxymacs_parser.c on Mac OS X. +;; - version 1.3.1 +;; 19/11/2001 - doxymacs has been tested on and works with XEmacs 21.4 +;; (patch 5) and GNU Emacs 21.1.1 +;; 04/11/2001 - add some documentation for default templates. +;; - implement grouping comments (C-c d @) +;; - version 1.3.0 +;; 30/09/2001 - doxymacs has been tested on and works with XEmacs 21.4 +;; (patch 4) +;; 15/09/2001 - bug #460396 fixed... wrong number of arguments for +;; doxymacs-parm-tempo-element in +;; doxymacs-Qt-function-comment-template +;; - version 1.2.1 +;; 26/08/2001 - feature request #454122 (single line member comments) done. +;; - feature request #454123 (key bindings description) done. +;; - clean up template code to make it easier to add new templates +;; and to catch bad settings. +;; - clean up documentation to be more standards conforming. +;; - version 1.2.0 +;; 23/08/2001 - fix bug #454563... missing @endlink in fontification, +;; fix @b, @em, @c, @p and @link fontification. +;; - make fontification regexps easier to read. +;; - version 1.1.4 +;; 07/07/2001 - make external XML parser work with libxml2. Now requires +;; version 2.3.4 or greater +;; - version 1.1.3 +;; 04/07/2001 - GNU Emacs doesn't understand ?: in regexps, so take them out +;; - version 1.1.2 +;; 20/06/2001 - fix bug #432837 missing @see keyword +;; - fix bug #432836 Font lock for @ingroup not correct +;; - version 1.1.1 +;; 12/06/2001 - add font lock keywords for Doxygen keywords +;; - version 1.1.0 +;; 06/06/2001 - fix bug #427660 (mouse selection problems). +;; - version 1.0.0 +;; 26/05/2001 - fix bug #427351 (thinks "void" is a parameter) and bug +;; #427350 (can't document constructors/destructors), and +;; generally made the whole doxymacs-find-next-func function +;; much more robust. Small update to default styles when +;; inserting functions that return "void" +;; - version 0.2.1 +;; 21/05/2001 - now able to optionally use an "external" XML parser to speed +;; things up. +;; - version 0.2.0 +;; 12/05/2001 - fix some bugs on GNU Emacs... tested and works with GNU +;; Emacs 20.7.1 +;; - version 0.1.2 +;; 09/05/2001 - change C-? to C-c d ?, since hitting DEL also triggers C-? +;; - update progress while parsing XML file +;; - version 0.1.1 +;; 07/05/2001 - minor mode thanks to Kris, and default key map. +;; - released as version 0.1.0 (Alpha) +;; 06/05/2001 - Now using tempo templates for the comments... also allow for +;; user defined templates. +;; 29/04/2001 - The doxytags.pl PERL script is no longer necessary, as we can +;; now parse the XML file that doxygen creates directly. +;; 22/04/2001 - Function documentation. +;; 18/04/2001 - Going with Kris' "new style" look up code. It's excellent. +;; - Load tags from URL. +;; 11/04/2001 - added ability to insert blank doxygen comments with either +;; Qt or JavaDoc style. +;; - also did "file" comments +;; 31/03/2001 - added ability to choose which symbol to look up if more than +;; one match +;; - slightly changed the format of the list that +;; doxymacs-get-matches returns +;; 28/03/2001 - added doxymacs to the "tools" customisation group. +;; - removed doxymacs-browser (just use user's default browser) +;; - minor formatting updates +;; 24/03/2001 - initial version. Pretty lame. Need some help. + +;; TODO: +;; +;; - better end-user documentation +;; - fix all FIXMEs (of course) +;; - other stuff? + +;; Front matter and variables + +(provide 'doxymacs) + +(require 'custom) +(require 'xml-parse) +(require 'url) +(require 'tempo) + +(defconst doxymacs-version "@VERSION@" + "Doxymacs version number") + +(defun doxymacs-version () + "Report the current version of doxymacs in the minibuffer." + (interactive) + (message "Using doxymacs version %s" doxymacs-version)) + + +(defgroup doxymacs nil + "Find documentation created by Doxygen, and create Doxygen comments." + :group 'tools) + +(defcustom doxymacs-doxygen-dirs + nil + "List associating pathnames with Doxygen documentation. +Each item on the list is a list of the form (DIR-REGEXP XML URL) +where: + + DIR-REGEXP is a regular expression that matches a directory; + XML is the file name or URL of the corresponding Doxygen XML tags; and + URL is the URL of the Doxygen documentation that matches that directory. + +For example, if all the files in /home/me/project/foo have their documentation +at http://someplace.com/doc/foo/ and the XML tags file is at +http://someplace.com/doc/foo/foo.xml, and all the files in +/home/me/project/bar have their documentation at +file:///home/me/project/bar/doc/ and the XML tags file is at +/home/me/project/bar/doc/bar.xml, then you would set this list to + + '((\"^/home/me/project/foo/\" + \"http://someplace.com/doc/foo/foo.xml\" + \"http://someplace.com/doc/foo/\") + (\"^/home/me/project/bar/\" + \"~/project/bar/doc/bar.xml\" + \"file:///home/me/project/bar/doc/\"))" + :type 'list + :group 'doxymacs) + +(defcustom doxymacs-doxygen-style + "@DOXYMACS_DEFAULT_STYLE@" + "The style of comments to insert into code. +See http://www.stack.nl/~dimitri/doxygen/docblocks.html#docblocks for examples +of the various styles. + +Must be one of \"JavaDoc\", \"Qt\" or \"C++\". Setting this variable +to anything else will generate errors." + :type '(radio (const :tag "JavaDoc" "JavaDoc") + (const :tag "Qt" "Qt") + (const :tag "C++" "C++")) + :group 'doxymacs) + +(defcustom doxymacs-command-character + nil + "The character to use to introduce Doxygen commands when inserting comments. +If nil, then use the default dictated by `doxymacs-doxygen-style'. Otherwise, +must be one of \"@\" or \"\\\"." + :type '(choice (const :tag "None" nil) + string) + :group 'doxymacs) + +(defcustom doxymacs-use-external-xml-parser + @DOXYMACS_USE_EXTERNAL_XML_PARSER@ + "*Use the external (written in C) XML parser or the internal (LISP) parser. +For smallish tag files, you are better off with the internal parser. +For larger tag files, you are better off with the external one. +Set to non-nil to use the external XML parser." + :type '(choice (const :tag "Yes" t) + (const :tag "No" nil)) + :group 'doxymacs) + +(defcustom doxymacs-external-xml-parser-executable + "@DOXYMACS_PARSER@" + "*Where the external XML parser executable is." + :type 'string + :group 'doxymacs) + +(defcustom doxymacs-browse-url-function + 'browse-url + "*Function to call to launch a browser to display Doxygen documentation. +This function should take one argument, a string representing the URL to +display." + :type 'function + :group 'doxymacs) + +(defcustom doxymacs-blank-multiline-comment-template + nil + "A tempo template to insert for `doxymacs-insert-blank-multiline-comment'. +If nil, then a default template based on the current style as indicated +by `doxymacs-doxygen-style' will be used. + +For help with tempo templates, see http://www.lysator.liu.se/~davidk/elisp/" + :type 'list + :group 'doxymacs) + +(defcustom doxymacs-blank-singleline-comment-template + nil + "A tempo template to insert for `doxymacs-insert-blank-singleline-comment'. +If nil, then a default template based on the current style as indicated +by `doxymacs-doxygen-style' will be used. + +For help with tempo templates, see http://www.lysator.liu.se/~davidk/elisp/" + :type 'list + :group 'doxymacs) + +(defcustom doxymacs-file-comment-template + nil + "A tempo template to insert for `doxymacs-insert-file-comment'. +If nil, then a default template based on the current style as indicated +by `doxymacs-doxygen-style' will be used. + +For help with tempo templates, see http://www.lysator.liu.se/~davidk/elisp/" + :type 'list + :group 'doxymacs) + +(defcustom doxymacs-function-comment-template + nil + "A tempo template to insert for `doxymacs-insert-function-comment'. +If nil, then a default template based on the current style as +indicated by `doxymacs-doxygen-style' will be used. Note that the +function `doxymacs-find-next-func' is available to you... it returns +an assoc list with the function's name, argument list (BUG: may be +incorrect for parameters that require parentheses), and return +value: + +(cdr (assoc 'func (doxymacs-find-next-func))) is the function name (string). +(cdr (assoc 'args (doxymacs-find-next-func))) is a list of arguments. +(cdr (assoc 'return (doxymacs-find-next-func))) is the return type (string). + +The argument list is a list of strings. + +For help with tempo templates, see http://www.lysator.liu.se/~davidk/elisp/" + :type 'list + :group 'doxymacs) + +(defcustom doxymacs-void-types + "void" + "String with void-kind variable types. Extend this string if there +are typedefs of void. Example: \"void tVOID\"." + :type 'string + :group 'doxymacs) + +(defcustom doxymacs-member-comment-start + nil + "String to insert to start a new member comment. +If nil, use a default one based on the current style as indicated by +`doxymacs-doxygen-style'." + :type '(choice (const :tag "None" nil) + string) + :group 'doxymacs) + +(defcustom doxymacs-member-comment-end + nil + "String to insert to end a new member comment. +If nil, use a default one based on the current style as indicated by +`doxymacs-doxygen-style'. + +Should be an empty string if comments are terminated by end-of-line." + :type '(choice (const :tag "None" nil) + string) + :group 'doxymacs) + +(defcustom doxymacs-group-comment-start + nil + "A string to begin a grouping comment (`doxymacs-insert-grouping-comments'). +If nil, then a default template based on the current style as indicated +by `doxymacs-doxygen-style' will be used." + :type '(choice (const :tag "None" nil) + string) + :group 'doxymacs) + +(defcustom doxymacs-group-comment-end + nil + "A string to end a grouping comment (`doxymacs-insert-grouping-comments'). +If nil, then a default template based on the current style as indicated +by `doxymacs-doxygen-style' will be used." + :type '(choice (const :tag "None" nil) + string) + :group 'doxymacs) + +;; End of customisable variables + +(defvar doxymacs-tags-buffers nil + "The buffers with our Doxygen tags; a list of the form +'((DIR . BUFFER) (...)) where: + + DIR is one of the directories from `doxymacs-doxygen-dirs'; and + BUFFER is the buffer holding the Doxygen tags for that DIR.") + +;; The structure of this list has been chosen for ease of use in the +;; completion functions. +(defvar doxymacs-completion-lists nil + "The lists with doxytags completions. +The structure is as follows: + + ( (dir1 . (symbol-1 . ((description-1a . url-1a) (description-1b . url-1b))) + (symbol-2 . ((description-2a . url-2a)))) + ... ) + +where + + dir1 is one of the directories from `doxymacs-doxygen-dirs'; + symbol-1 is one of the symbols in the associated Doxygen XML file; + description-1a is one of symbol-1's description from the XML file; and + url-1a is the associated URL.") + +(defvar doxymacs-current-completion-list nil + "The current list we are building") + +(defvar doxymacs-completion-buffer "*Completions*" + "The buffer used for displaying multiple completions.") + + + +;; Minor mode implementation + +(defvar doxymacs-mode nil + "nil disables doxymacs, non-nil enables.") + +(make-variable-buffer-local 'doxymacs-mode) + +(defun doxymacs-mode (&optional arg) + ;; All of the following text shows up in the "mode help" (C-h m) + "Minor mode for using/creating Doxygen documentation. +To submit a problem report, request a feature or get support, please +visit doxymacs' homepage at http://doxymacs.sourceforge.net/. + +To see what version of doxymacs you are running, enter +`\\[doxymacs-version]'. + +In order for `doxymacs-lookup' to work you will need to customise the +variable `doxymacs-doxygen-dirs'. + +Key bindings: +\\{doxymacs-mode-map}" + (interactive "P") + (setq doxymacs-mode + (if (null arg) + ;; Toggle mode + (not doxymacs-mode) + ;; Enable/Disable according to arg + (> (prefix-numeric-value arg) 0))) + (when doxymacs-mode + (when (boundp 'filladapt-token-table) + ;; add tokens to filladapt to match doxygen markup + (let ((bullet-regexp (concat "[@\\]" + "\\(param\\(?:\\s-*" + "\\[\\(?:in\\|out\\|in,out\\)\\]\\)?" + "\\s-+\\sw+" + "\\|return\\|attention\\|note" + "\\|brief\\|li\\|arg\\|remarks" + "\\|invariant\\|post\\|pre" + "\\|todo\\|warning\\|bug" + "\\|deprecated\\|since\\|test\\)"))) + (unless (assoc bullet-regexp filladapt-token-table) + (setq filladapt-token-table + (append filladapt-token-table + (list (list bullet-regexp 'bullet))))))))) + +;; Keymap + +(defvar doxymacs-mode-map (make-sparse-keymap) + "Keymap for doxymacs minor mode.") + +(define-key doxymacs-mode-map "\C-cd?" + 'doxymacs-lookup) +(define-key doxymacs-mode-map "\C-cdr" + 'doxymacs-rescan-tags) + +(define-key doxymacs-mode-map "\C-cdf" + 'doxymacs-insert-function-comment) +(define-key doxymacs-mode-map "\C-cdi" + 'doxymacs-insert-file-comment) +(define-key doxymacs-mode-map "\C-cdm" + 'doxymacs-insert-blank-multiline-comment) +(define-key doxymacs-mode-map "\C-cds" + 'doxymacs-insert-blank-singleline-comment) +(define-key doxymacs-mode-map "\C-cd;" + 'doxymacs-insert-member-comment) +(define-key doxymacs-mode-map "\C-cd@" + 'doxymacs-insert-grouping-comments) + + +;;;###autoload +(or (assoc 'doxymacs-mode minor-mode-alist) + (setq minor-mode-alist + (cons '(doxymacs-mode " doxy") minor-mode-alist))) + +(or (assoc 'doxymacs-mode minor-mode-map-alist) + (setq minor-mode-map-alist + (cons (cons 'doxymacs-mode doxymacs-mode-map) + minor-mode-map-alist))) + +;; This stuff has to do with fontification +;; Thanks to Alec Panovici for the idea. + +(defconst doxymacs-doxygen-keywords + (list + (list + ;; One shot keywords that take no arguments + (concat "\\([@\\\\]\\(brief\\|li\\|\\(end\\)?code\\|sa" + "\\|note\\|\\(end\\)?verbatim\\|return\\|arg\\|fn" + "\\|hideinitializer\\|showinitializer" + ;; FIXME + ;; How do I get & # < > % to work? + ;;"\\|\\\\&\\|\\$\\|\\#\\|<\\|>\\|\\%" + "\\|\\$" + "\\|internal\\|nosubgrouping\\|author\\|date\\|endif" + "\\|invariant\\|post\\|pre\\|remarks\\|since\\|test\\|version" + "\\|\\(end\\)?htmlonly\\|\\(end\\)?latexonly\\|f\\$\\|file" + "\\|\\(end\\)?xmlonly\\|\\(end\\)?manonly\\|property" + "\\|mainpage\\|name\\|overload\\|typedef\\|deprecated\\|par" + "\\|addindex\\|line\\|skip\\|skipline\\|until\\|see" + "\\|endlink\\|callgraph\\|endcond\\|else\\)\\)\\>") + '(0 font-lock-keyword-face prepend)) + ;; attention, warning, etc. given a different font + (list + "\\([@\\\\]\\(attention\\|warning\\|todo\\|bug\\)\\)\\>" + '(0 font-lock-warning-face prepend)) + ;; keywords that take a variable name as an argument + (list + (concat "\\([@\\\\]\\(param\\(?:\\s-*\\[\\(?:in\\|out\\|in,out\\)\\]\\)?" + "\\|a\\|namespace\\|relates\\(also\\)?" + "\\|var\\|def\\)\\)\\s-+\\(\\sw+\\)") + '(1 font-lock-keyword-face prepend) + '(4 font-lock-variable-name-face prepend)) + ;; keywords that take a type name as an argument + (list + (concat "\\([@\\\\]\\(class\\|struct\\|union\\|exception\\|enum" + "\\|throw\\|interface\\|protocol\\)\\)\\s-+\\(\\(\\sw\\|:\\)+\\)") + '(1 font-lock-keyword-face prepend) + '(3 font-lock-type-face prepend)) + ;; keywords that take a function name as an argument + (list + "\\([@\\\\]retval\\)\\s-+\\([^ \t\n]+\\)" + '(1 font-lock-keyword-face prepend) + '(2 font-lock-function-name-face prepend)) + ;; bold + (list + "\\([@\\\\]b\\)\\s-+\\([^ \t\n]+\\)" + '(1 font-lock-keyword-face prepend) + '(2 (quote bold) prepend)) + ;; code + (list + "\\([@\\\\][cp]\\)\\s-+\\([^ \t\n]+\\)" + '(1 font-lock-keyword-face prepend) + '(2 (quote underline) prepend)) + ;; italics/emphasised + (list + "\\([@\\\\]e\\(m\\)?\\)\\s-+\\([^ \t\n]+\\)" + '(1 font-lock-keyword-face prepend) + '(3 (quote italic) prepend)) + ;; keywords that take a list + (list + "\\([@\\\\]ingroup\\)\\s-+\\(\\(\\sw+\\s-*\\)+\\)\\s-*$" + '(1 font-lock-keyword-face prepend) + '(2 font-lock-string-face prepend)) + ;; one argument that can contain arbitrary non-whitespace stuff + (list + (concat "\\([@\\\\]\\(link\\|copydoc\\|xrefitem" + "\\|if\\(not\\)?\\|elseif\\)\\)" + "\\s-+\\([^ \t\n]+\\)") + '(1 font-lock-keyword-face prepend) + '(4 font-lock-string-face prepend)) + ;; one optional argument that can contain arbitrary non-whitespace stuff + (list + "\\([@\\\\]\\(cond\\|dir\\)\\(\\s-+[^ \t\n]+\\)?\\)" + '(1 font-lock-keyword-face prepend) + '(3 font-lock-string-face prepend t)) + ;; one optional argument with no space between + (list + "\\([@\\\\]\\(~\\)\\([^ \t\n]+\\)?\\)" + '(1 font-lock-keyword-face prepend) + '(3 font-lock-string-face prepend t)) + ;; one argument that has to be a filename + (list + (concat "\\([@\\\\]\\(example\\|\\(dont\\)?include\\|includelineno" + "\\|htmlinclude\\|verbinclude\\)\\)\\s-+" + "\\(\"?[~:\\/a-zA-Z0-9_. ]+\"?\\)") + '(1 font-lock-keyword-face prepend) + '(4 font-lock-string-face prepend)) + ;; dotfile ["caption"] + (list + (concat "\\([@\\\\]dotfile\\)\\s-+" + "\\(\"?[~:\\/a-zA-Z0-9_. ]+\"?\\)\\(\\s-+\"[^\"]+\"\\)?") + '(1 font-lock-keyword-face prepend) + '(2 font-lock-string-face prepend) + '(3 font-lock-string-face prepend t)) + ;; image ["caption"] [=] + (list + "\\([@\\\\]image\\)\\s-+\\(html\\|latex\\)\\s-+\\(\"?[~:\\/a-zA-Z0-9_. ]+\"?\\)\\(\\s-+\"[^\"]+\"\\)?\\(\\s-+\\sw+=[0-9]+\\sw+\\)?" + '(1 font-lock-keyword-face prepend) + '(2 font-lock-string-face prepend) + '(3 font-lock-string-face prepend) + '(4 font-lock-string-face prepend t) + '(5 font-lock-string-face prepend t)) + ;; one argument that has to be a word + (list + (concat "\\([@\\\\]\\(addtogroup\\|defgroup\\|weakgroup" + "\\|page\\|anchor\\|ref\\|section\\|subsection" + "\\)\\)\\s-+\\(\\sw+\\)") + '(1 font-lock-keyword-face prepend) + '(3 font-lock-string-face prepend)))) + +(defun doxymacs-font-lock () + "Turn on font-lock for Doxygen keywords." + ;; FIXME How do I turn *off* font-lock for Doxygen keywords? + (interactive) + (if (functionp 'font-lock-add-keywords) + ;; Use new (proper?) font-lock-add-keywords function + (font-lock-add-keywords nil doxymacs-doxygen-keywords) + ;; Use old-school way + (let ((old (if (eq (car-safe font-lock-keywords) t) + (cdr font-lock-keywords) + font-lock-keywords))) + (setq font-lock-keywords (append old doxymacs-doxygen-keywords))))) + + + + +;;These functions have to do with looking stuff up in doxygen generated +;;documentation + + +;; Utility functions to look up filenames in the various association lists +;; we have + +(defun doxymacs-filename-to-element (f a) + "Lookup filename in one of our association lists and return associated +element" + (catch 'done + (while a + (if (string-match (caar a) f) + (throw 'done + (cdar a)) + (setq a (cdr a)))))) + +(defun doxymacs-filename-to-xml (f) + "Lookup filename in `doxymacs-doxygen-dirs' and return associated XML tags +file." + (let ((xml-url (doxymacs-filename-to-element f doxymacs-doxygen-dirs))) + (if xml-url + (car xml-url)))) + +(defun doxymacs-filename-to-url (f) + "Lookup filename in `doxymacs-doxygen-dirs' and return associated Doxygen +documentation URL root." + (let ((xml-url (doxymacs-filename-to-element f doxymacs-doxygen-dirs))) + (if xml-url + (cadr xml-url)))) + +(defun doxymacs-filename-to-buffer (f) + "Lookup filename in `doxymacs-tags-buffers' and return associated buffer." + (doxymacs-filename-to-element f doxymacs-tags-buffers)) + +(defun doxymacs-filename-to-completion-list (f) + "Lookup filename in `doxymacs-completion-lists' and return associated +completion list." + (doxymacs-filename-to-element f doxymacs-completion-lists)) + +(defun doxymacs-filename-to-dir (f) + "Lookup filename in `doxymacs-doxygen-dirs' and return associated dir." + (catch 'done + (let ((dirs doxymacs-doxygen-dirs)) + (while dirs + (if (string-match (caar dirs) f) + (throw 'done + (caar dirs)) + (setq dirs (cdr dirs))))))) + +(defun doxymacs-set-dir-element (dir l e) + "Set the element associated with dir in l to e." + (catch 'done + (while l + (let ((pair (car l))) + (if (string= (car pair) dir) + (throw 'done + (setcdr pair e)) + (setq l (cdr l))))))) + +(defun doxymacs-set-tags-buffer (dir buffer) + "Set the buffer associated with dir in `doxymacs-tags-buffers' to the given +buffer." + (doxymacs-set-dir-element dir doxymacs-tags-buffers buffer)) + +(defun doxymacs-set-completion-list (dir comp-list) + "Set the completion list associated with dir in `doxymcas-completion-lists' +to comp-list." + (doxymacs-set-dir-element dir doxymacs-completion-lists comp-list)) + +(defun doxymacs-url-exists-p (url) + "Return t iff the URL exists." + (let* ((urlobj (url-generic-parse-url url)) + (type (url-type urlobj)) + (exists nil)) + (cond + ((equal type "http") + (cond + ;; Try url-file-exists, if it exists + ((fboundp 'url-file-exists) + (setq exists (url-file-exists url))) + ;; Otherwise, try url-file-exists-p (newer url.el) + ((fboundp 'url-file-exists-p) + (setq exists (url-file-exists-p url))) + ;; Otherwise, try wget + ((executable-find (if (eq system-type 'windows-nt) "wget.exe" "wget")) + (if (string-match "200 OK" + (shell-command-to-string + (concat "wget -S --spider " url))) + (setq exists t))) + ;; Otherwise, try lynx + ((executable-find (if (eq system-type 'windows-nt) "lynx.exe" "lynx")) + (if (string-match "200 OK" + (shell-command-to-string + (concat "lynx -head -source " url))) + (setq exists t))) + ;; Give up. + (t (error "Could not find url-file-exists, url-file-exists-p, wget or lynx")))) + ((equal type "file") + (setq exists (file-exists-p (url-filename urlobj)))) + (t (error (concat "Scheme " type " not supported for URL " url)))) + exists)) + +(defun doxymacs-load-tags (f) + "Loads a Doxygen generated XML tags file into the buffer *doxytags*." + (let* ((tags-buffer (doxymacs-filename-to-buffer f)) + (dir (doxymacs-filename-to-dir f)) + (xml (doxymacs-filename-to-xml f))) + (if (and xml dir) + (if (or (eq tags-buffer nil) + (eq (buffer-live-p tags-buffer) nil)) + (let ((new-buffer (generate-new-buffer "*doxytags"))) + (if tags-buffer + ;; tags-buffer is non-nil, which means someone + ;; killed the buffer... so reset it + (doxymacs-set-tags-buffer dir new-buffer) + ;; Otherwise add to list + (setq doxymacs-tags-buffers + (cons (cons dir new-buffer) doxymacs-tags-buffers))) + (message (concat "Loading " xml "...")) + (let ((currbuff (current-buffer))) + (if (file-regular-p xml) + ;;It's a regular file, so just grab it. + (progn + (set-buffer new-buffer) + (insert-file-contents xml)) + ;; Otherwise, try and grab it as a URL + (progn + (if (doxymacs-url-exists-p xml) + (progn + (set-buffer new-buffer) + (url-insert-file-contents xml) + (set-buffer-modified-p nil)) + (progn + (kill-buffer new-buffer) + (set-buffer currbuff) + (error (concat + "Tag file " xml " not found.")))))) + (set-buffer currbuff)))) + ;; Couldn't find this file in doxymacs-doxygen-dirs + (error (concat "File " (buffer-file-name) + " does not match any directories in" + " doxymacs-doxygen-dirs."))))) + +(defun doxymacs-add-to-completion-list (symbol desc url) + "Add a symbol to our completion list, along with its description and URL." + (let ((check (assoc symbol doxymacs-current-completion-list))) + (if check + ;; There is already a symbol with the same name in the list + (if (not (assoc desc (cdr check))) + ;; If there is not yet a symbol with this desc, add it + ;; FIXME: what to do if there is already a symbol?? + (setcdr check (cons (cons desc url) + (cdr check)))) + ;; There is not yet a symbol with this name in the list + (setq doxymacs-current-completion-list + (cons (cons symbol (list (cons desc url))) + doxymacs-current-completion-list))))) + +(defun doxymacs-fill-completion-list-with-external-parser (f) + "Use external parser to parse Doxygen XML tags file and get the +completion list." + (doxymacs-load-tags f) + (let ((currbuff (current-buffer)) + (dir (doxymacs-filename-to-dir f)) + (comp-list (doxymacs-filename-to-completion-list f)) + (tags-buffer (doxymacs-filename-to-buffer f))) + (set-buffer tags-buffer) + (goto-char (point-min)) + (doxymacs-set-completion-list dir nil) + (message (concat + "Executing external process " + doxymacs-external-xml-parser-executable + "...")) + (let ((status (call-process-region + (point-min) (point-max) + doxymacs-external-xml-parser-executable + t t))) + (if (eq status 0) + (progn + (goto-char (point-min)) + (message "Reading completion list...") + (let ((new-list (read (current-buffer)))) + (if comp-list + ;; Replace + (doxymacs-set-completion-list dir new-list) + ;; Add + (setq doxymacs-completion-lists + (cons (cons dir new-list) + doxymacs-completion-lists)))) + (message "Done.") + (set-buffer-modified-p nil) + (kill-buffer tags-buffer) + (set-buffer currbuff)) + (progn + (switch-to-buffer tags-buffer) + (message (concat + "There were problems parsing " + (doxymacs-filename-to-xml f) "."))))))) + + +(defun doxymacs-xml-progress-callback (amount-done) + "Let the user know how far along the XML parsing is." + (message (concat "Parsing ... " (format "%0.1f" amount-done) "%%"))) + +(defun doxymacs-fill-completion-list-with-internal-parser (f) + "Load and parse the tags from the *doxytags* buffer, constructing our +`doxymacs-completion-list' from it using the internal XML file parser." + (doxymacs-load-tags f) + (let ((currbuff (current-buffer)) + (dir (doxymacs-filename-to-dir f)) + (tags-buffer (doxymacs-filename-to-buffer f))) + (set-buffer tags-buffer) + (goto-char (point-min)) + (setq doxymacs-current-completion-list nil) + (let ((xml (read-xml 'doxymacs-xml-progress-callback))) ;Parse the file + (let* ((compound-list (xml-tag-children xml)) + (num-compounds (length compound-list)) + (curr-compound-num 0)) + (if (not (string= (xml-tag-name xml) "tagfile")) + (error (concat "Invalid tag file: " (doxymacs-filename-to-xml f))) + ;; Go through the compounds, adding them and their members to the + ;; completion list. + (while compound-list + (let* ((curr-compound (car compound-list)) + (compound-name (cadr (xml-tag-child curr-compound "name"))) + (compound-kind (xml-tag-attr curr-compound "kind")) + (compound-url (cadr + (xml-tag-child curr-compound "filename"))) + (compound-desc (concat compound-kind " " compound-name))) + ;; Work around apparent bug in Doxygen 1.2.18 + (if (not (string-match "\\.html$" compound-url)) + (setq compound-url (concat compound-url ".html"))) + + ;; Add this compound to our completion list for this directory + (doxymacs-add-to-completion-list compound-name + compound-desc + compound-url) + ;; Add its members + (doxymacs-add-compound-members curr-compound + compound-name + compound-url) + ;; On to the next compound + (message (concat + "Building completion table... " + (format "%0.1f" + (* (/ + (float curr-compound-num) + (float num-compounds)) + 100)) + "%%")) + (setq curr-compound-num (1+ curr-compound-num)) + (setq compound-list (cdr compound-list))))))) + (if (doxymacs-filename-to-completion-list f) + ;; Replace + (doxymacs-set-completion-list dir doxymacs-current-completion-list) + ;; Add + (setq doxymacs-completion-lists + (cons (cons dir doxymacs-current-completion-list) + doxymacs-completion-lists))) + (setq doxymacs-current-completion-list nil) + (message "Done.") + ;; Don't need the doxytags buffer anymore + (set-buffer-modified-p nil) + (kill-buffer tags-buffer) + (set-buffer currbuff))) + +(defun doxymacs-add-compound-members (compound compound-name compound-url) + "Get the members of the given compound" + (let ((children (xml-tag-children compound))) + ;; Run through the children looking for ones with the "member" tag + (while children + (let* ((curr-child (car children))) + (if (string= (xml-tag-name curr-child) "member") + ;; Found a member. Throw it on the list. + (let* ((member-name (cadr (xml-tag-child curr-child "name"))) + (member-anchor (cadr (xml-tag-child curr-child "anchor"))) + (member-url (concat compound-url "#" member-anchor)) + (member-args (if (cdr (xml-tag-child curr-child "arglist")) + (cadr (xml-tag-child curr-child "arglist")) + "")) + (member-desc (concat compound-name "::" + member-name member-args))) + (doxymacs-add-to-completion-list member-name + member-desc + member-url))) + (setq children (cdr children)))))) + +(defun doxymacs-display-url (root url) + "Displays the given match." + (apply doxymacs-browse-url-function (list (concat root "/" url)))) + +;; Some versions of GNU Emacs don't have symbol-near-point apparently +;; stolen from browse-cltl2.el, and in turn: +;; stolen from XEmacs 19.15 syntax.el +(defun doxymacs-symbol-near-point () + "Return the first textual item to the nearest point." + (if (fboundp 'symbol-near-point) + (symbol-near-point) + ;;alg stolen from etag.el + (save-excursion + (if (not (memq (char-syntax (preceding-char)) '(?w ?_))) + (while (not (looking-at "\\sw\\|\\s_\\|\\'")) + (forward-char 1))) + (while (looking-at "\\sw\\|\\s_") + (forward-char 1)) + (if (re-search-backward "\\sw\\|\\s_" nil t) + (regexp-quote + (progn (forward-char 1) + (buffer-substring (point) + (progn (forward-sexp -1) + (while (looking-at "\\s'") + (forward-char 1)) + (point))))) + nil)))) + +(defun doxymacs-lookup (symbol &optional filename) + "Look up the symbol under the cursor in Doxygen generated documentation." + (interactive + (let* ((f (buffer-file-name)) + (completion-list (doxymacs-filename-to-completion-list f))) + (if (eq f nil) + (error "Current buffer has no file name associated with it.") + (progn + (save-excursion + (if (eq completion-list nil) + ;;Build our completion list if not already done + (if doxymacs-use-external-xml-parser + (doxymacs-fill-completion-list-with-external-parser f) + (doxymacs-fill-completion-list-with-internal-parser f))) + (let ((symbol (completing-read + "Look up: " + completion-list nil nil + (doxymacs-symbol-near-point))) + (filename f)) + (list symbol filename))))))) + (let ((url (doxymacs-symbol-completion + symbol + (doxymacs-filename-to-completion-list filename)))) + (if url + (doxymacs-display-url (doxymacs-filename-to-url filename) url)))) + +(defun doxymacs-display-completions (initial collection &optional pred) + "Display available completions." + (let ((matches (all-completions initial collection pred))) + ;; FIXME - Is this the proper way of doing this? Seems to work, but... + (set-buffer (format " *Minibuf-%d*" + ;; Here's a kludge. + (if (featurep 'xemacs) + (minibuffer-depth) + (1+ (minibuffer-depth))))) + (with-output-to-temp-buffer doxymacs-completion-buffer + (display-completion-list (sort matches 'string-lessp))))) + +(defun doxymacs-symbol-completion (initial collection &optional pred) + "Do completion for given symbol." + (let ((completion (try-completion initial collection pred))) + (cond ((eq completion t) + ;; Only one completion found. Validate it. + (doxymacs-validate-symbol-completion initial collection pred)) + ((null completion) + ;; No completion found + (message "No documentation for '%s'" initial) + (ding)) + (t + ;; There is more than one possible completion + (doxymacs-display-completions initial collection pred) + (let ((completion (completing-read + "Select: " + collection pred nil initial))) + (delete-window (get-buffer-window doxymacs-completion-buffer)) + (if completion + ;; If there is a completion, validate it. + (doxymacs-validate-symbol-completion + completion collection pred) + ;; Otherwise just return nil + nil)))))) + +(defun doxymacs-validate-symbol-completion (initial collection &optional pred) + "Checks whether the symbol (initial) has multiple descriptions, and if so +continue completion on those descriptions. In the end it returns the URL for +the completion or nil if canceled by the user." + (let ((new-collection (cdr (assoc initial collection)))) + (if (> (length new-collection) 1) + ;; More than one + (doxymacs-description-completion "" new-collection pred) + ;; Only one, return the URL + (cdar new-collection)))) + +(defun doxymacs-description-completion (initial collection &optional pred) + "Do completion for given description." + (doxymacs-display-completions initial collection pred) + (let ((completion (completing-read "Select: " collection pred nil initial))) + (delete-window (get-buffer-window doxymacs-completion-buffer)) + (if completion + ;; Return the URL if there is a completion + (cdr (assoc completion collection))))) + +;;This is mostly a convenience function for the user +(defun doxymacs-rescan-tags () + "Rescan the Doxygen XML tags file in `doxymacs-doxygen-tags'." + (interactive) + (let* ((f (buffer-file-name)) + (tags-buffer (doxymacs-filename-to-buffer f))) + (if (buffer-live-p tags-buffer) + (kill-buffer tags-buffer)) + (if doxymacs-use-external-xml-parser + (doxymacs-fill-completion-list-with-external-parser f) + (doxymacs-fill-completion-list-with-internal-parser f)))) + + +;; These functions have to do with inserting doxygen commands in code + +;; FIXME +;; So, in the source code for XEmacs 21.1.14, they commented out the +;; definition of deactivate-mark for some reason... and the tempo package +;; needs it. So, here is a placeholder just to get it to stop +;; complaining. This is a hack, since I don't know what the proper fix +;; should be. +(if (not (fboundp 'deactivate-mark)) + (defsubst deactivate-mark () + (zmacs-deactivate-region))) ; Is this correct? +;; Also need a hack for mark-active +(if (not (boundp 'mark-active)) + (defvar mark-active nil)) ; Is this correct? Probably not. + + +;; Default templates + +(defconst doxymacs-JavaDoc-blank-multiline-comment-template + '("/**" > n "* " p > n "* " > n "*/" > n) + "Default JavaDoc-style template for a blank multiline doxygen comment.") + +(defconst doxymacs-Qt-blank-multiline-comment-template + '("//! " p > n "/*! " > n > n "*/" > n) + "Default Qt-style template for a blank multiline doxygen comment.") + +(defconst doxymacs-C++-blank-multiline-comment-template + '("///" > n "/// " p > n "///" > n) + "Default C++-style template for a blank multiline doxygen comment.") + +(defconst doxymacs-JavaDoc-blank-singleline-comment-template + '("/// " > p) + "Default JavaDoc-style template for a blank single line doxygen comment.") + +(defconst doxymacs-Qt-blank-singleline-comment-template + '("//! " > p) + "Default Qt-style template for a blank single line doxygen comment.") + +(defconst doxymacs-C++-blank-singleline-comment-template + '("/// " > p) + "Default C++-style template for a blank single line doxygen comment.") + +(defun doxymacs-doxygen-command-char () + (cond + (doxymacs-command-character doxymacs-command-character) + ((string= doxymacs-doxygen-style "JavaDoc") "@") + ((string= doxymacs-doxygen-style "Qt") "\\") + ((string= doxymacs-doxygen-style "C++") "@") + (t "@"))) + +(defun doxymacs-user-mail-address () + "Return the user's email address" + (or + (and (and (fboundp 'user-mail-address) (user-mail-address)) + (list 'l " <" (user-mail-address) ">")) + (and (and (boundp 'user-mail-address) user-mail-address) + (list 'l " <" user-mail-address ">")))) + +(defconst doxymacs-JavaDoc-file-comment-template + '("/**" > n + " * " (doxymacs-doxygen-command-char) "file " + (if (buffer-file-name) + (file-name-nondirectory (buffer-file-name)) + "") > n + " * " (doxymacs-doxygen-command-char) "author " (user-full-name) + (doxymacs-user-mail-address) + > n + " * " (doxymacs-doxygen-command-char) "date " (current-time-string) > n + " * " > n + " * " (doxymacs-doxygen-command-char) "brief " (p "Brief description of this file: ") > n + " * " > n + " * " p > n + " */" > n) + "Default JavaDoc-style template for file documentation.") + +(defconst doxymacs-Qt-file-comment-template + '("/*!" > n + " " (doxymacs-doxygen-command-char) "file " + (if (buffer-file-name) + (file-name-nondirectory (buffer-file-name)) + "") > n + " " (doxymacs-doxygen-command-char) "author " (user-full-name) + (doxymacs-user-mail-address) + > n + " " (doxymacs-doxygen-command-char) "date " (current-time-string) > n + " " > n + " " (doxymacs-doxygen-command-char) "brief " (p "Brief description of this file: ") > n + " " > n + " " p > n + "*/" > n) + "Default Qt-style template for file documentation.") + +(defconst doxymacs-C++-file-comment-template + '("///" > n + "/// " (doxymacs-doxygen-command-char) "file " + (if (buffer-file-name) + (file-name-nondirectory (buffer-file-name)) + "") > n + "/// " (doxymacs-doxygen-command-char) "author " (user-full-name) + (doxymacs-user-mail-address) + > n + "/// " (doxymacs-doxygen-command-char) "date " (current-time-string) > n + "/// " > n + "/// " (doxymacs-doxygen-command-char) "brief " (p "Brief description of this file: ") > n + "/// " > n + "/// " p > n + "///" > n) + "Default C++-style template for file documentation.") + + +(defun doxymacs-parm-tempo-element (parms) + "Inserts tempo elements for the given parms in the given style." + (if parms + (let ((prompt (concat "Parameter " (car parms) ": "))) + (cond + ((string= doxymacs-doxygen-style "JavaDoc") + (list 'l " * " (doxymacs-doxygen-command-char) + "param " (car parms) " " (list 'p prompt) '> 'n + (doxymacs-parm-tempo-element (cdr parms)))) + ((string= doxymacs-doxygen-style "Qt") + (list 'l " " (doxymacs-doxygen-command-char) + "param " (car parms) " " (list 'p prompt) '> 'n + (doxymacs-parm-tempo-element (cdr parms)))) + ((string= doxymacs-doxygen-style "C++") + (list 'l "/// " (doxymacs-doxygen-command-char) + "param " (car parms) " " (list 'p prompt) '> 'n + (doxymacs-parm-tempo-element (cdr parms)))) + (t + (doxymacs-invalid-style)))) + nil)) + + +(defconst doxymacs-JavaDoc-function-comment-template + '((let ((next-func (doxymacs-find-next-func))) + (if next-func + (list + 'l + "/** " '> 'n + " * " 'p '> 'n + " * " '> 'n + (doxymacs-parm-tempo-element (cdr (assoc 'args next-func))) + (unless (string-match + (regexp-quote (cdr (assoc 'return next-func))) + doxymacs-void-types) + '(l " * " > n " * " (doxymacs-doxygen-command-char) + "return " (p "Returns: ") > n)) + " */" '>) + (progn + (error "Can't find next function declaration.") + nil)))) + "Default JavaDoc-style template for function documentation.") + +(defconst doxymacs-Qt-function-comment-template + '((let ((next-func (doxymacs-find-next-func))) + (if next-func + (list + 'l + "//! " 'p '> 'n + "/*! " '> 'n + " " '> 'n + (doxymacs-parm-tempo-element (cdr (assoc 'args next-func))) + (unless (string-match + (regexp-quote (cdr (assoc 'return next-func))) + doxymacs-void-types) + '(l " " > n " " (doxymacs-doxygen-command-char) + "return " (p "Returns: ") > n)) + " */" '>) + (progn + (error "Can't find next function declaraton.") + nil)))) + "Default Qt-style template for function documentation.") + +(defconst doxymacs-C++-function-comment-template + '((let ((next-func (doxymacs-find-next-func))) + (if next-func + (list + 'l + "/// " 'p '> 'n + "///" '> 'n + (doxymacs-parm-tempo-element (cdr (assoc 'args next-func))) + (unless (string-match + (regexp-quote (cdr (assoc 'return next-func))) + doxymacs-void-types) + '(l "///" > n "/// " (doxymacs-doxygen-command-char) + "return " (p "Returns: ") > n)) + "///" '>) + (progn + (error "Can't find next function declaraton.") + nil)))) + "Default C++-style template for function documentation.") + +(defun doxymacs-invalid-style () + "Warn the user that he has set `doxymacs-doxygen-style' to an invalid +style." + (error (concat + "Invalid `doxymacs-doxygen-style': " + doxymacs-doxygen-style + ": must be one of \"JavaDoc\", \"Qt\" or \"C++\"."))) + +;; This should make it easier to add new templates and cut down +;; on copy-and-paste programming. +(defun doxymacs-call-template (template-name) + "Insert the given template." + (let* ((user-template-name (concat "doxymacs-" template-name "-template")) + (user-template (car (read-from-string user-template-name))) + (default-template-name (concat "doxymacs-" + doxymacs-doxygen-style "-" + template-name "-template")) + (default-template (car (read-from-string default-template-name)))) + (cond + ((and (boundp user-template) ; Make sure it is a non-nil list + (listp (eval user-template)) + (eval user-template)) + ;; Use the user's template + (tempo-insert-template user-template tempo-insert-region)) + ((and (boundp default-template) + (listp (eval default-template)) + (eval default-template)) + ;; Use the default template, based on the current style + (tempo-insert-template default-template tempo-insert-region)) + (t + ;; Most likely, `doxymacs-doxygen-style' has been set wrong. + (doxymacs-invalid-style))))) + +(defun doxymacs-insert-blank-multiline-comment () + "Inserts a multi-line blank Doxygen comment at the current point." + (interactive "*") + (doxymacs-call-template "blank-multiline-comment")) + +(defun doxymacs-insert-blank-singleline-comment () + "Inserts a single-line blank Doxygen comment at current point." + (interactive "*") + (doxymacs-call-template "blank-singleline-comment")) + +(defun doxymacs-insert-file-comment () + "Inserts Doxygen documentation for the current file at current point." + (interactive "*") + (doxymacs-call-template "file-comment")) + +(defun doxymacs-insert-function-comment () + "Inserts Doxygen documentation for the next function declaration at +current point." + (interactive "*") + (doxymacs-call-template "function-comment")) + +;; FIXME +;; The following was borrowed from "simple.el". +;; If anyone knows of a better/simpler way of doing this, please let me know. +(defconst doxymacs-comment-indent-function + (lambda (skip) + (save-excursion + (beginning-of-line) + (let ((eol (save-excursion (end-of-line) (point)))) + (and skip + (re-search-forward skip eol t) + (setq eol (match-beginning 0))) + (goto-char eol) + (skip-chars-backward " \t") + (max comment-column (1+ (current-column)))))) + "Function to compute desired indentation for a comment. +This function is called with skip and with point at the beginning of +the comment's starting delimiter.") + +(defun doxymacs-insert-member-comment () + "Inserts Doxygen documentation for the member on the current line in +the column given by `comment-column' (much like \\[indent-for-comment])." + (interactive "*") + (let* ((empty (save-excursion (beginning-of-line) + (looking-at "[ \t]*$"))) + (starter (or doxymacs-member-comment-start + (cond + ((string= doxymacs-doxygen-style "JavaDoc") + "/**< ") + ((string= doxymacs-doxygen-style "Qt") + "/*!< ") + ((string= doxymacs-doxygen-style "C++") + "///< ") + (t + (doxymacs-invalid-style))))) + (skip (concat (regexp-quote starter) "*")) + (ender (or doxymacs-member-comment-end + (cond + ((string= doxymacs-doxygen-style "JavaDoc") + " */") + ((string= doxymacs-doxygen-style "Qt") + " */") + ((string= doxymacs-doxygen-style "C++") + "") + (t + (doxymacs-invalid-style)))))) + (if empty + ;; Insert a blank single-line comment on empty lines + (doxymacs-insert-blank-singleline-comment) + (if (null starter) + (error "No Doxygen member comment syntax defined") + (let* ((eolpos (save-excursion (end-of-line) (point))) + cpos indent begpos) + (beginning-of-line) + (if (re-search-forward skip eolpos 'move) + (progn (setq cpos (point-marker)) + ;; Find the start of the comment delimiter. + ;; If there were paren-pairs in skip, + ;; position at the end of the first pair. + (if (match-end 1) + (goto-char (match-end 1)) + ;; If skip matched a string with + ;; internal whitespace (not final whitespace) then + ;; the delimiter start at the end of that + ;; whitespace. Otherwise, it starts at the + ;; beginning of what was matched. + (skip-syntax-backward " " (match-beginning 0)) + (skip-syntax-backward "^ " (match-beginning 0))))) + (setq begpos (point)) + ;; Compute desired indent. + (cond + ((= (current-column) 0) + (goto-char begpos)) + ((= (current-column) + (setq indent (funcall doxymacs-comment-indent-function skip))) + (goto-char begpos)) + (t + ;; If that's different from current, change it. + (skip-chars-backward " \t") + (delete-region (point) begpos) + (indent-to indent))) + ;; An existing comment? + (if cpos + (progn (goto-char cpos) + (set-marker cpos nil)) + ;; No, insert one. + (insert starter) + (save-excursion + (insert ender)))))))) + +(defun doxymacs-insert-grouping-comments (start end) + "Inserts doxygen grouping comments around the current region." + (interactive "*r") + (let* ((starter (or doxymacs-group-comment-start + (cond + ((string= doxymacs-doxygen-style "JavaDoc") + "//@{") + ((string= doxymacs-doxygen-style "Qt") + "/*@{*/") + ((string= doxymacs-doxygen-style "C++") + "/// @{") + (t + (doxymacs-invalid-style))))) + (ender (or doxymacs-group-comment-end + (cond + ((string= doxymacs-doxygen-style "JavaDoc") + "//@}") + ((string= doxymacs-doxygen-style "Qt") + "/*@}*/") + ((string= doxymacs-doxygen-style "C++") + "/// @}") + (t + (doxymacs-invalid-style)))))) + (save-excursion + (goto-char end) + (end-of-line) + (insert ender) + (goto-char start) + (beginning-of-line) + (insert starter)))) + + + +;; These are helper functions that search for the next function +;; declerations/definition and extract its name, return type and +;; argument list. Used for documenting functions. + +(defun doxymacs-extract-args-list (args-string) + "Extracts the arguments from the given list (given as a string)." + (cond + ;; arg list is empty + ((string-match "\\`[ \t\n]*\\'" args-string) + nil) + ;; argument list consists of one word + ((string-match "\\`[ \t\n]*\\([a-zA-Z0-9_]+\\)[ \t\n]*\\'" args-string) + ;; ... extract this word + (let ((arg (substring args-string (match-beginning 1) (match-end 1)))) + ;; if this arg is a void type return nil + (if (string-match (regexp-quote arg) doxymacs-void-types) + nil + ;; else return arg + (list arg)))) + ;; else split the string and extact var names from args + (t + (doxymacs-extract-args-list-helper + (doxymacs-save-split args-string))))) + + +(defun doxymacs-save-split (args-string) + "Splits a declaration list as string and returns list of single +declarations." + (let ((comma-pos (string-match "," args-string)) + (paren-pos (string-match "(" args-string))) + (cond + ;; no comma in string found + ((null comma-pos) (list args-string)) + ;; comma but no parenthethes: split-string is save + ((null paren-pos) (split-string args-string ",")) + ;; comma first then parenthesis + ((< comma-pos paren-pos) + (cons (substring args-string 0 comma-pos) + (doxymacs-save-split (substring args-string (1+ comma-pos))))) + ;; parenthesis first then comma. there must exist a closing parenthesis + (t + ;; cut off the (...) part + (save-excursion + ;; create temporary buffer + (set-buffer (get-buffer-create "*doxymacs-scratch*")) + (erase-buffer) + (insert args-string) + (beginning-of-buffer) + (search-forward "(") + (prog1 + (let ((depth 1) + (exit) + (comma-found)) + (while (not exit) + ;; step through buffer + (forward-char 1) + (cond + ;; end of buffer: exit + ((= (point) (point-max)) (setq exit t)) + ;; decrease depth counter + ((looking-at ")") (setq depth (1- depth))) + ;; increase depth counter + ((looking-at "(") (setq depth (1+ depth))) + ;; comma at depth 0, thats it! + ((and (looking-at ",") (= 0 depth)) + (setq exit t) + (setq comma-found t)))) + (if (not comma-found) + ;; whole string is one arg + (list (buffer-substring 1 (point))) + ;; else split at comma ... + (cons (buffer-substring 1 (point)) + ;; and split rest of declaration list + (doxymacs-save-split + (buffer-substring (1+ (point)) (point-max)))))) + (kill-buffer (current-buffer)))))))) + + +;; This regexp fails if the opt. parentheses +;; contain another level of parentheses. E.g. for: +;; int f(int (*g)(int (*h)())) +(defun doxymacs-extract-args-list-helper (args-list) + "Recursively get names of arguments." + (if args-list + (if (string-match + (concat + "\\(" + "([ \t\n]*\\*[ \t\n]*\\([a-zA-Z0-9_]+\\)[ \t\n]*)"; (*varname) + "\\|" ; or + "\\*?[ \t\n]*\\([a-zA-Z0-9_]+\\)" ; opt. *, varname + "\\)" + "[ \t\n]*" ; opt. spaces + "\\(\\[[ \t\n]*[a-zA-Z0-9_]*[ \t\n]*\\]\\|" ; opt. array bounds + "([^()]*)\\)?" ; or opt. func args + "[ \t\n]*" ; opt. spaces + "\\(=[ \t\n]*[^ \t\n]+[ \t\n]*\\)?" ; optional assignment + "[ \t\n]*\\'" ; end + ) (car args-list)) + (cons + (cond + ;; var name in: (*name) + ((match-beginning 2) + (substring (car args-list) (match-beginning 2) (match-end 2))) + ;; var name in: *name + ((match-beginning 3) + (substring (car args-list) (match-beginning 3) (match-end 3))) + ;; no match: return complete declaration + (t + (car args-list))) + (doxymacs-extract-args-list-helper (cdr args-list))) + ;; else there is no match + nil))) + +(defun doxymacs-core-string (s) + "Returns the argument string with leading and trailing blank +and new-line characters cut off." + (string-match "\\`[ \t\n]*\\(.*?\\)[ \t\n]*\\'" s) + (if (match-beginning 1) + (substring s (match-beginning 1) (match-end 1)) + s)) + +(defun doxymacs-find-next-func () + "Returns a list describing next function declaration, or nil if not found. + +(cdr (assoc 'func (doxymacs-find-next-func))) is the function name (string). +(cdr (assoc 'args (doxymacs-find-next-func))) is a list of arguments. +(cdr (assoc 'return (doxymacs-find-next-func))) is the return type (string). + +The argument list is a list of strings." + (interactive) + (save-excursion + (if (re-search-forward + (concat + ;; return type + "\\(\\(const[ \t\n]+\\)?[a-zA-Z0-9_]+[ \t\n*&]+\\)?" + + ;; name + "\\(\\([a-zA-Z0-9_~:<,>*&]\\|\\([ \t\n]+::[ \t\n]+\\)\\)+" + "\\(o?perator[ \t\n]*.[^(]*\\)?\\)[ \t\n]*(" + ) nil t) + + (let* ((func (buffer-substring (match-beginning 3) (match-end 3))) + (args (buffer-substring (point) (progn + (backward-char 1) + (forward-list) + (backward-char 1) + (point)))) + (ret (cond + ;; Return type specified + ((match-beginning 1) + (buffer-substring (match-beginning 1) (match-end 1))) + ;;Constructor/destructor + ((string-match + "^\\([a-zA-Z0-9_<,>:*&]+\\)[ \t\n]*::[ \t\n]*~?\\1$" + func) "void") + ;;Constructor in class decl. + ((save-match-data + (re-search-backward + (concat + "class[ \t\n]+" (regexp-quote func) "[ \t\n]*{") + nil t)) + "void") + ;;Destructor in class decl. + ((save-match-data + (and (string-match "^~\\([a-zA-Z0-9_]+\\)$" func) + (save-match-data + (re-search-backward + (concat + "class[ \t\n]+" (regexp-quote + (match-string 1 func)) + "[ \t\n]*{") nil t)))) + "void") + ;;Default + (t "int")))) + (list (cons 'func func) + (cons 'args (doxymacs-extract-args-list args)) + (cons 'return (doxymacs-core-string ret)))) + nil))) + +;;; doxymacs.el ends here diff --git a/doxymacs/lisp/xml-parse.el b/doxymacs/lisp/xml-parse.el new file mode 100644 index 0000000..2caa556 --- /dev/null +++ b/doxymacs/lisp/xml-parse.el @@ -0,0 +1,379 @@ +;;; xml-parse --- code to efficiently read/write XML data with Elisp +;;; +;;; $Id: xml-parse.el,v 1.4 2001/05/12 22:36:13 ryants Exp $ + +;; Copyright (C) 2001 John Wiegley. + +;; Author: John Wiegley +;; Version: 1.5 +;; Created: Feb 15, 2001 +;; Keywords: convenience languages lisp xml parse data +;; URL: http://www.gci-net.com/~johnw/emacs.html + +;; This file is NOT (yet) part of GNU Emacs. + +;; This 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, or (at your option) +;; any later version. + +;; This software 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: +;; +;; XML is yet another way of expressing recursive, attributed data +;; structures -- something which Lisp has had the capacity to do for +;; decades. +;; +;; The approach taken by xml-parse.el is to read XML data into Lisp +;; structures, and allow those same Lisp structures to be written out +;; as XML. It should facilitate the manipulation and use of XML by +;; Elisp programs. + +;; NOTE: This is not a validating parser, and makes no attempt to read +;; DTDs. See psgml.el if you need that kind of power. +;; +;; Also, tags beginning with +;; +;; +;; My own book! +;; First +;; +;; +;; John +;; Wiegley +;; +;; +;; +;; +;; +;; A very small chapter +;; Wonder where the content is... +;; +;; +;; +;; It would be parsed into this Lisp structure: +;; +;; '(("book" ("id" . "compiler")) +;; ("bookinfo" +;; ("bookbiblio" +;; ("title" "My own book!") +;; ("edition" "FIrst") +;; ("authorgroup" +;; ("author" +;; ("firstname" "John") +;; ("surname" "Wiegley"))))) +;; ("chapter" +;; ("title" "A very small chapter") +;; ("para" "Wonder where the content is..."))) +;; +;; Now it can easily be modified and interpreted using ordinary Lisp +;; code, without the ordeal of manipulating textual XML. When you're +;; done modifying it, you can write it back out (complete with proper +;; indentation and newlines) using: +;; +;; (insert-xml t) +;; +;; See the documentation for `read-xml' and `insert-xml' for more +;; information. +;; +;; There are also a set of helper functions for accessing parts of a +;; parsed tag: +;; +;; xml-tag-name get the name of a tag +;; xml-tag-attrlist returns a tag's attribute alist +;; xml-tag-attr lookup a specific tag attribute +;; xml-tag-children returns a tag's child list +;; xml-tag-child lookup a specific child tag by name +;; +;; Also, the attribute list and child lists can be searched using +;; `assoc', since they roughly have the same format as an alist. + +;;;###autoload +(defun read-xml (&optional progress-callback) + "Parse XML data at point into a Lisp structure. +See `insert-xml' for a description of the format of this structure. +Point is left at the end of the XML structure read." + (cdr (xml-parse-read progress-callback))) + +(defsubst xml-tag-with-attributes-p (tag) + "Does the TAG have attributes or not?" + (listp (car tag))) + +(defsubst xml-tag-name (tag) + "Return the name of an xml-parse'd XML TAG." + (cond ((xml-tag-text-p tag) + (car tag)) + ((xml-tag-with-attributes-p tag) + (caar tag)) + (t (car tag)))) + +(defun xml-tag-text-p (tag) + "Is the given TAG really just a text entry?" + (stringp tag)) + +(defsubst xml-tag-special-p (tag) + "Return the name of an xml-parse'd XML TAG." + (and (xml-tag-text-p tag) + (eq (aref tag 0) ?\<))) + +(defsubst xml-tag-attrlist (tag) + "Return the attribute list of an xml-parse'd XML TAG." + (and (not (stringp (car tag))) + (cdar tag))) + +(defsubst xml-tag-attr (tag attr) + "Return a specific ATTR of an xml-parse'd XML TAG." + (cdr (assoc attr (xml-tag-attrlist tag)))) + +(defsubst xml-tag-children (tag) + "Return the list of child tags of an xml-parse'd XML TAG." + (cdr tag)) + +(defun xml-tag-child (tag name) + "Return the first child matching NAME, of an xml-parse'd XML TAG." + (catch 'found + (let ((children (xml-tag-children tag))) + (while children + (if (string= name (xml-tag-name (car children))) + (throw 'found (car children))) + (setq children (cdr children)))))) + +;;;###autoload +(defun insert-xml (data &optional add-newlines public system depth ret-depth) + "Insert DATA, a recursive Lisp structure, at point as XML. +DATA has the form: + + ENTRY ::= (TAG CHILD*) + CHILD ::= STRING | ENTRY + TAG ::= TAG_NAME | (TAG_NAME ATTR+) + ATTR ::= (ATTR_NAME . ATTR_VALUE) + TAG_NAME ::= STRING + ATTR_NAME ::= STRING + ATTR_VALUE ::= STRING + +If ADD-NEWLINES is non-nil, newlines and indentation will be added to +make the data user-friendly. + +If PUBLIC and SYSTEM are non-nil, a !DOCTYPE tag will be added at the +top of the document to identify it as an XML document. + +DEPTH is normally for internal use only, and controls the depth of the +indentation." + (when (and (not depth) public system) + (insert "\n") + (insert "\n")) + (if (stringp data) + (insert data) + (let ((node (car data)) (add-nl t)) + (and depth (bolp) + (insert (make-string (* depth 2) ? ))) + (if (stringp node) + (insert "<" node) + (setq node (caar data)) + (insert "<" node) + (let ((attrs (cdar data))) + (while attrs + (insert " " (caar attrs) "=\"" (cdar attrs) "\"") + (setq attrs (cdr attrs))))) + (if (null (cdr data)) + (insert "/>") + (insert ">") + (setq data (cdr data)) + (while data + (and add-newlines add-nl + (not (stringp (car data))) + (insert ?\n)) + (setq add-nl (insert-xml (car data) add-newlines + nil nil (1+ (or depth 0))) + data (cdr data))) + (when add-nl + (and add-newlines (insert ?\n)) + (and depth (insert (make-string (* depth 2) ? )))) + (insert "")) + t))) + +;;;###autoload +(defun xml-reformat-tags () + "If point is on the open bracket of an XML tag, reformat that tree. +Note that this only works if the opening tag starts at column 0." + (interactive) + (save-excursion + (let* ((beg (point)) (tags (read-xml))) + (delete-region beg (point)) + (insert-xml tags t)))) + +;;; Internal Functions + + +;;; RTS did this 30/04/2001 +(if (featurep 'xemacs) + (defalias 'match-string-no-properties 'match-string)) + + +(defun xml-parse-profile () + (interactive) + (let ((elp-function-list + '(buffer-substring-no-properties + char-after + char-before + forward-char + looking-at + match-string-no-properties + match-beginning + match-end + point + re-search-forward + read-xml + xml-parse-read + search-forward + string= + stringp + substring + xml-parse-concat))) + (elp-instrument-list))) + +(defsubst xml-parse-skip-tag () + (cond + ((eq (char-after) ??) + (search-forward "?>")) + ((looking-at "!--") + (search-forward "-->")) + (t ; must be + (re-search-forward "[[>]") + (if (eq (char-before) ?\[) + (let ((depth 1)) + (while (and (> depth 0) + (if (re-search-forward "[][]") + t + (error "Pos %d: Unclosed open bracket in ")))))) + +(defsubst xml-parse-add-non-ws (text lst) + (let ((i 0) (l (length text)) non-ws) + (while (< i l) + (unless (memq (aref text i) '(?\n ?\t ? )) + (setq i l non-ws t)) + (setq i (1+ i))) + (if (not non-ws) + lst + (setcdr lst (list text)) + (cdr lst)))) + +(defsubst xml-parse-concat (beg end lst) + "Add the string from BEG to END to LST, ignoring pure whitespace." + (save-excursion + (goto-char beg) + (while (search-forward "<" end t) + (setq lst (xml-parse-add-non-ws + (buffer-substring-no-properties beg (1- (point))) lst) + beg (1- (point))) + (xml-parse-skip-tag) + (setq lst (xml-parse-add-non-ws + (buffer-substring-no-properties beg (point)) lst) + beg (point))) + (if (/= beg end) + (setq lst (xml-parse-add-non-ws + (buffer-substring-no-properties beg end) lst))) + lst)) + +(defun xml-parse-read (&optional progress-callback) + (let ((beg (search-forward "<" nil t)) after) + (if progress-callback + (funcall progress-callback + (* (/ (float (point)) (float (point-max))) 100))) + (while (and beg (memq (setq after (char-after)) '(?! ??))) + (xml-parse-skip-tag) + (setq beg (search-forward "<" nil t))) + (when beg + (if (eq after ?/) + (progn + (search-forward ">") + (cons (1- beg) + (buffer-substring-no-properties (1+ beg) (1- (point))))) + (skip-chars-forward "^ \t\n/>") + (cons + (1- beg) + (progn + (setq after (point)) + (skip-chars-forward " \t\n") + (let* ((single (eq (char-after) ?/)) + (tag (buffer-substring-no-properties beg after)) + attrs data-beg data) + ;; handle the attribute list, if present + (cond + (single + (skip-chars-forward " \t\n/>")) + ((eq (char-after) ?\>) + (forward-char 1)) + (t + (let* ((attrs (list t)) + (lastattr attrs) + (end (search-forward ">"))) + (goto-char after) + (while (re-search-forward + "\\([^ \t\n=]+\\)=\"\\([^\"]+\\)\"" end t) + (let ((attr (cons (match-string-no-properties 1) + (match-string-no-properties 2)))) + (setcdr lastattr (list attr)) + (setq lastattr (cdr lastattr)))) + (goto-char end) + (setq tag (cons tag (cdr attrs)) + single (eq (char-before (1- end)) ?/))))) + ;; return the tag and its data + (if single + (list tag) + (setq tag (list tag)) + (let ((data-beg (point)) (tag-end (last tag))) + (while (and (setq data (xml-parse-read progress-callback)) + (not (stringp (cdr data)))) + (setq tag-end (xml-parse-concat data-beg (car data) + tag-end) + data-beg (point)) + (setcdr tag-end (list (cdr data))) + (setq tag-end (cdr tag-end))) + (xml-parse-concat data-beg (or (car data) + (point-max)) tag-end) + tag))))))))) + +(provide 'xml-parse) + +;;; xml-parse.el ends here diff --git a/doxymacs/no-autoconf/Makefile.am b/doxymacs/no-autoconf/Makefile.am new file mode 100644 index 0000000..67ad010 --- /dev/null +++ b/doxymacs/no-autoconf/Makefile.am @@ -0,0 +1,15 @@ +## Process this file with automake to produce Makefile.in +# $Id: Makefile.am,v 1.1 2003/01/26 01:49:56 ryants Exp $ + +# When creating the tarball, create .el files with default values +# substituted in the .el.in files for people who don't want to run +# autoconf. + +EXTRA_DIST=doxymacs.el xml-parse.el +CONFIG_CLEAN_FILES=doxymacs.el xml-parse.el + +doxymacs.el: ${top_srcdir}/lisp/doxymacs.el.in ${top_srcdir}/configure.ac + sed -e 's/\@VERSION\@/${VERSION}/g ; s/\@DOXYMACS_DEFAULT_STYLE\@/${DOXYMACS_DEFAULT_STYLE}/g ; s/\@DOXYMACS_USE_EXTERNAL_XML_PARSER\@/nil/g ; s/\@DOXYMACS_PARSER\@//g' < $< > $@ + +xml-parse.el: ${top_srcdir}/lisp/xml-parse.el + cp $< $@