Giter VIP home page Giter VIP logo

robodoc's Introduction

ROBODoc Version 4.99.45 Feb 2021

The Idea

ROBODoc is program documentation tool. The idea is to include for every function or procedure a standard header containing all sorts of information about the procedure or function. ROBODoc extracts these headers from the source file and puts them in a separate autodocs-file. ROBODoc thus allows you to include the program documentation in the source code and avoid having to maintain two separate documents. Or as Petteri puts it: "robodoc is very useful - especially for programmers who don't like writing documents with Word or some other strange tool."

ROBODoc can format the headers in a number of different formats: HTML, RTF, LaTeX, or XML DocBook. In HTML mode it can generate cross links between headers. You can even include parts of your source code.

ROBODoc works with many programming languages: For instance C, Pascal, Shell Scripts, Assembler, COBOL, Occam, Postscript, Forth, Tcl/Tk, C++, Java -- basically any program in which you can use remarks/comments.

More information

  • For information on how to build and install see INSTALL.md
  • For information to tailor the build and install see INSTALL
  • For information on how to use ROBODoc see Docs/manual.html.
  • Blank headers for various languages can be found in Headers/
  • For an example on how ROBODoc can be used see the ROBODoc source code in Source/
  • For licence information see COPYING
  • For a change log see Source/robodoc.c

Contributors

Many people contributed to ROBODoc, to name a few:

  • Petteri Kettunen <petterik -a-t- iki.fi> Bug fixes, FOLD, C features.
  • Bernd Koesling <KOESSI -a-t- CHESSY.aworld.de> Bug fixes, functional improvements, code cleanup.
  • Anthon Pang <apang -a-t- mindlink.net> RTF support, Bug fixes.
  • Thomas Aglassinger <agi -a-t- sbox.tu-graz.ac.at> Fixes and cleanup of HTML-output
  • Stefan Kost <kost -a-t- imn.htwk-leipzig.de> Idea of the master index file and different header types.

Questions, found a bug or a typo; send an email to [rfsber -a-t- xs4all.nl]

(c) 1994-2021 Frans Slothouber, Petteri Kettunen, and Jacco van Weert

robodoc's People

Contributors

cashy avatar gumpu avatar janusw avatar lutzmad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

robodoc's Issues

fail to create configure file with Ubuntu

Hello, both using automake or autoconf, here the error:

automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
automake: warning: 'configure.ac' and 'configure.in' both present.
automake: proceeding with 'configure.ac'
configure.ac: error: no proper invocation of AM_INIT_AUTOMAKE was found.
configure.ac: You should verify that configure.ac invokes AM_INIT_AUTOMAKE,
configure.ac: that aclocal.m4 is present in the top-level directory,
configure.ac: and that aclocal.m4 was recently regenerated (using aclocal)
configure.ac:32: error: required file './config.guess' not found
configure.ac:32: 'automake --add-missing' can install 'config.guess'
configure.ac:32: error: required file './config.sub' not found
configure.ac:32: 'automake --add-missing' can install 'config.sub'
Docs/makefile.am:5: error: FINK does not appear in AM_CONDITIONAL
Docs/makefile.am:17: error: FINK does not appear in AM_CONDITIONAL
Source/makefile.am: error: required file './depcomp' not found
Source/makefile.am: 'automake --add-missing' can install 'depcomp'
/usr/share/automake-1.14/am/depend2.am: error: am__fastdepCC does not appear in AM_CONDITIONAL
/usr/share/automake-1.14/am/depend2.am: The usual way to define 'am__fastdepCC' is to add 'AC_PROG_CC'
/usr/share/automake-1.14/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again
/usr/share/automake-1.14/am/depend2.am: error: AMDEP does not appear in AM_CONDITIONAL
/usr/share/automake-1.14/am/depend2.am: The usual way to define 'AMDEP' is to add one of the compiler tests
/usr/share/automake-1.14/am/depend2.am: AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC, AC_PROG_OBJCXX,
/usr/share/automake-1.14/am/depend2.am: AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC
/usr/share/automake-1.14/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
automake: warning: 'configure.ac' and 'configure.in' both present.
automake: proceeding with 'configure.ac'
makefile.am:25: error: FINK does not appear in AM_CONDITIONAL
makefile.am:44: error: FINK does not appear in AM_CONDITIONAL

The source does not compile with hardened compilation

Hello! I am Anderson, a Nixpkgs commmiter.

When I was writing the expression, the compiler terminated with an error message related to "warnings treated as errors". I circumvented it by loosening the compiler constraints.

Here is the output of compilation with format-security enabled:

build flags: SHELL=/nix/store/cwnwyy82wrq53820z6yg7869z8dl5s7g-bash-4.4-p23/bin/bash
Making all in Source
make[1]: Entering directory '/mnt/sources/z-sandbox/0-descartavel/source/Source'
make  all-am
make[2]: Entering directory '/mnt/sources/z-sandbox/0-descartavel/source/Source'
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT optioncheck.o -MD -MP -MF .deps/optioncheck.Tpo -c -o optioncheck.o optioncheck.c
mv -f .deps/optioncheck.Tpo .deps/optioncheck.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT analyser.o -MD -MP -MF .deps/analyser.Tpo -c -o analyser.o analyser.c
mv -f .deps/analyser.Tpo .deps/analyser.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT generator.o -MD -MP -MF .deps/generator.Tpo -c -o generator.o generator.c
generator.c: In function ‘Generate_Item’:
generator.c:2051:13: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 2051 |             system( line );
      |             ^~~~~~~~~~~~~~
mv -f .deps/generator.Tpo .deps/generator.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT headers.o -MD -MP -MF .deps/headers.Tpo -c -o headers.o headers.c
mv -f .deps/headers.Tpo .deps/headers.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT headertypes.o -MD -MP -MF .deps/headertypes.Tpo -c -o headertypes.o headertypes.c
mv -f .deps/headertypes.Tpo .deps/headertypes.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT items.o -MD -MP -MF .deps/items.Tpo -c -o items.o items.c
mv -f .deps/items.Tpo .deps/items.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT links.o -MD -MP -MF .deps/links.Tpo -c -o links.o links.c
mv -f .deps/links.Tpo .deps/links.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT globals.o -MD -MP -MF .deps/globals.Tpo -c -o globals.o globals.c
mv -f .deps/globals.Tpo .deps/globals.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT robodoc.o -MD -MP -MF .deps/robodoc.Tpo -c -o robodoc.o robodoc.c
mv -f .deps/robodoc.Tpo .deps/robodoc.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
util.c: In function ‘RB_ReadWholeLine’:
util.c:1037:9: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1037 |         fgets( buf, MAX_LINE_LEN, file );
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
util.c: In function ‘RB_Change_Back_To_CWD’:
util.c:1199:9: warning: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1199 |         chdir( cwd );
      |         ^~~~~~~~~~~~
util.c: In function ‘RB_Change_To_Docdir’:
util.c:1227:5: warning: ignoring return value of ‘getcwd’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1227 |     getcwd( tmp, sizeof( tmp ) );
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
util.c:1234:5: warning: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1234 |     chdir( tmp );
      |     ^~~~~~~~~~~~
mv -f .deps/util.Tpo .deps/util.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT html_generator.o -MD -MP -MF .deps/html_generator.Tpo -c -o html_generator.o html_generator.c
mv -f .deps/html_generator.Tpo .deps/html_generator.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT xmldocbook_generator.o -MD -MP -MF .deps/xmldocbook_generator.Tpo -c -o xmldocbook_generator.o xmldocbook_generator.c
mv -f .deps/xmldocbook_generator.Tpo .deps/xmldocbook_generator.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT latex_generator.o -MD -MP -MF .deps/latex_generator.Tpo -c -o latex_generator.o latex_generator.c
mv -f .deps/latex_generator.Tpo .deps/latex_generator.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT rtf_generator.o -MD -MP -MF .deps/rtf_generator.Tpo -c -o rtf_generator.o rtf_generator.c
mv -f .deps/rtf_generator.Tpo .deps/rtf_generator.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT test_generator.o -MD -MP -MF .deps/test_generator.Tpo -c -o test_generator.o test_generator.c
mv -f .deps/test_generator.Tpo .deps/test_generator.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT ascii_generator.o -MD -MP -MF .deps/ascii_generator.Tpo -c -o ascii_generator.o ascii_generator.c
mv -f .deps/ascii_generator.Tpo .deps/ascii_generator.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT troff_generator.o -MD -MP -MF .deps/troff_generator.Tpo -c -o troff_generator.o troff_generator.c
troff_generator.c: In function ‘RB_TROFF_Generate_Item_Line_Number’:
troff_generator.c:563:5: error: format not a string literal and no format arguments [-Werror=format-security]
  563 |     fprintf( dest_doc, line_number_string );
      |     ^~~~~~~
troff_generator.c: In function ‘RB_TROFF_Generate_Header_Start’:
troff_generator.c:226:13: warning: ignoring return value of ‘symlink’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  226 |             symlink( basename( manpage ), buf );
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [makefile:461: troff_generator.o] Error 1
make[2]: Leaving directory '/mnt/sources/z-sandbox/0-descartavel/source/Source'
make[1]: *** [makefile:323: all] Error 2
make[1]: Leaving directory '/mnt/sources/z-sandbox/0-descartavel/source/Source'
make: *** [makefile:540: all-recursive] Error 1

Disabling this flag the project runs fine.

execlp failed no tags

Hello,
after install ROBODoc on my virtual machine with Ubuntu 12.04, I have tried the special tool robohdrs, but when I have ran it on a c test file it returns "execlp failed no tags".
After some research I found that I didn't have ctags installed.
I'm a kinda of newbie and I didn't know ctags, but I wonder if there's a chance to add a test when run ./configure.

Luca

Finer sign/keyword highlighting control

Currently, all signs and keywords use the same css classes span.sign and span.keyword, respectively. I'd like to have finer control to give code elements more specific styling.

A possible solution could be to specify the class to use for a specific code element in the config file…

# robodoc.rc

# syntax: <element(s)> <css_classname>
signs:
  {} sign_braces
  () sign_parens
  =  sign_assignment

# syntax: <keyword(s)> <css_classname>
keywords:
  new               keyword_new
  return            keyword_return
  if, elseif, else  keyword_conditional
  try, catch, throw keyword_exception

We could then customize those css classes…

/* stylesheet */
span.sign_braces{color:red}
span.sign_parens{color:blue}
span.sign_assignment{color:#FF00FF}

span.keyword_new{color:#00FFFF}
span.keyword_return{green}
span.keyword_conditional{color:yellow}
span.keyword_exception{color:red}

SOURCE keyword and overloaded functions

This is #69 from the sourceforge page.

In FORTRAN I can overload a function and have multiple interfaces for the same function, for example:

INTERFACE write_data
MODULE PROCEDURE write_int
MODULE PROCEDURE write_real
END INTERFACE

SUBROUTINE write_int( InVar )
INTEGER :: Invar
END SUBROUTINE write_int
SUBROUTINE write_real( InVar )
REAL :: Invar
END SUBROUTINE write_int

Now I want to provide using the SOURCE keyword the interface for write_data, and not the source for write_int and write_real subroutines. The problem is the source interface does not exists for write_data.

It would be nice if I could do something like

!****s* H5A write_data
!
! NAME
! write_data
!
! INPUT
! Myvalue - Print value
!
! SOURCE
! SUBROUTINE write_data(Myvalue)
!*****

and have items in the SOURCE block written as source code without the "!"

Jade pipe support (Feature Request)

I'd like to be able to write jade pipes…

* |jade
* #myDiv.myclass div content
*     p(style='border:1px solid red') paragraph inside div
* |jade end

which would output…

<div id="myDiv" class="myClass">
    <p style="border:1px solid red">paragraph inside div</p>
</div>

see jade-lang.com

Use the section names like namespaces

I have an issue though with the way it (doesn't) analyze namespaces. In my Systemverilog code, I have 2 packages that have a class named driver. Moreover as they both inherit from uvm_driver, they hold the same functions: build_phase, connect_phase.

At first I gave the section names the same hierarchy as the code namespace. So I had
my_project/event_package
my_project/host_package
event_package/driver
host_package/driver

But this caused some confusion when building the TOC, as event_package/driver held driver/constraint_x but in the TOC, it would be under host_package/driver.

So I renamed the sections which is a shame, but I devided as long as the section NAME would hold the actual name of the class this would be OK.

So now, none of the code/comments hyperlinks driver which I can live with. But some of the code obviously references the functions and again I have the same issue: Both calls to build_phase hyperlinks to the same class. Although they should reference separate classes.

TOC sorted backwards

The "table of contents" page ("toc_index.html", generated via --toc) lists the top-level items in reversed alphabetical order, which is a bit awkward.

Error when running ROBODoc after upgrade to CentOS

I get the following error when I try and run ROBODoc after our system was upgraded from redhat to CentOS.

-bash: /robodoc/Source/robodoc: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Header file "sys/unistd.h" not found in a AIX environment

Hello,
the ROBODoc build does not find the "sys/unistd.h" header in a AIX environment.

"troff_generator.c", line 33.10: 1506-296 (S) #include file <sys/unistd.h> not found.
"troff_generator.c", line 225.13: 1506-1421 (W) Implicit function declaration for function "unlink".

I modified "Source/troff_generator.c" to fix the problem therefore

#include <sys/param.h>
#if defined(_AIX)
#include <unistd.h>
#else
#include <sys/unistd.h>
#endif

Based on the content of "sys/unistd.h" (in a Linux environment) I suggest to use "unistd.h" in general,
like in "Source/document.c" or "Source/robodoc.c", "Source/robohdrs.c".
#include <sys/unistd.h>
Should changed to
#include <unistd.h>

See also Issue #22 Does not build on macOS as unistd.h is not included

With regards,
Lutz

p.s.
The used build steps based on the github sources.
autoreconf -fi
./configure CC="c99 -D_XOPEN_SOURCE"
make

Feature request: generate long-term html links

I need to link to the generated HTML docs for specific API functions from a manually edited web page. As described by the user manual, these links need the escaped version of the whole header name, for example, Analyser2fRB5fToBeAdded for Analyser/RB_ToBeAdded. When creating the links from my web page, I have to type these in manually, but I would find it much easier if the generated documentation itself would contain links which use this label type, because then I could right click on the link and copy the link address.

As far as I know, there is no option to use these labels in the generated documentation links, but I think it would be very useful.

--sectionnameonly does not work for LaTeX

When using LaTeX output (i.e. --latex), the option --sectionnameonly has no effect.
It can very easily be implemented though, by replacing in Source/latex_generator.c:

cur_header->name

with

course_of_action.do_sectionnameonly ? cur_header->function_name : cur_header->name

The combination --latex --sections also has no effect, but that bothers me less.

Does not build on macOS as `unistd.h` is not included

Should fail the same way on many other POSIX systems as unlink and symlink are documented to be declared in unistd.h which isn't ever included.

troff_generator.c:225:13: error: implicit declaration of function 'unlink' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            unlink( buf );
            ^
troff_generator.c:226:13: error: implicit declaration of function 'symlink' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            symlink( basename( manpage ), buf );
            ^

See POSIX reference to confirm that those functions are supposed to be declared by unistd.h

Also see man page:

SYNOPSIS
     #include <unistd.h>

     int
     unlink(const char *path);

Source :man 2 unlink

Note that sys/unistd.h is no official header, neither by C nor by POSIX standard, you should never be required to include that one. Same holds true for sys/param.h. These headers are automatically included for you if you included the correct standard headers.

Syntax highlighting for example code within the header

I was thinking a good feature would be this: to have a new block type that allows you to put sourcecode within a commented portion of the header, and still have it be syntax highlighted as though it were not commented. Here is an example:

!*****************************************************************************************
!****f* json_module/json_create_array
!
!  NAME
!    json_create_array
!
!  DESCRIPTION
!    Allocate a json_value pointer and make it an array variable.
!    The pointer should not already be allocated.
!
!  EXAMPLE
!    type(json_value),pointer :: p
!    call json_create(p,'arrayname')
!
!  SOURCE

    subroutine json_create_array(me,name)

    implicit none

    type(json_value),pointer            :: me
    character(kind=CK,len=*),intent(in) :: name

    call json_value_create(me)
    call to_array(me,name)

    end subroutine json_create_array
!*****************************************************************************************

Currently, the output looks like this

What I would like is to be able to indicate that the EXAMPLE block should be syntax highlighted, excluding the first comment character. Note that I can't put it in the source items block, because it would highlight each line as a comment. It might also be useful to be able to specify some different settings for this type of block (for example, perhaps I wouldn't want to show the line numbers for these, but I do for the main SOURCE).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.