Re: [Tinycc-devel] tinycc manpage
Sudipto Mallick: > I am new here, I do not know whose approval I need > to push the changes. Whom to ask for approval? Not being a contributor to TCC, I can't tell you. Since nobody has answered, chances are no one among the readers of this mailing list is interested in tranditional hand-crafted man-pages for TCC and libtcc, but I think many users ourside may like the idea... Good luck. ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] tinycc manpage
On 12/26/20, Anton Shepelev wrote: > I agree that *roff syntax is simultaneosly concise, > writable, and readable, whereas texinfo is a huge > package with a verbose syntax and dependencies on > LaTeX and other third-party formatters. That said, > *roff would be the natural choice for TCC because of > its similar minimalist ideology, but since the offi- > cial documentaion tool for TCC is Texinfo, I fear > your good effort will not appreciated... Hmm. I am just asking for the change only of the manpage, not the whole documentation. The documentation and manpage can be kept in sync without much problem, I think. I am new here, I do not know whose approval I need to push the changes. Whom to ask for approval? >> There's also texi2mdoc which is written in C, but >> I haven't tried that. > That means using the makrup language from a large > system, but converting into the language of a sim- > pler system by means of a C program. Everybody will > not like it... I think that using Texinfo directly > is better. Well... Same with the current texi2pod.pl. except for being written in C means texi2mdoc do not need an external dependency :-) --Sudipto ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] tinycc manpage
Sudipto Mallick to Michael Matz: > As I am reformatting it, I do not find it hard to > write. It must have been writable enough to be > used in writing almost all manual pages in OpenBSD > etc. Also current setup depends on perl to be in- > stalled, which is not a hard requirement, but > still ... I agree that *roff syntax is simultaneosly concise, writable, and readable, whereas texinfo is a huge package with a verbose syntax and dependencies on LaTeX and other third-party formatters. That said, *roff would be the natural choice for TCC because of its similar minimalist ideology, but since the offi- cial documentaion tool for TCC is Texinfo, I fear your good effort will not appreciated... > There's also texi2mdoc which is written in C, but > I haven't tried that. That means using the makrup language from a large system, but converting into the language of a sim- pler system by means of a C program. Everybody will not like it... I think that using Texinfo directly is better. ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] tinycc manpage
Hello, On Fri, 25 Dec 2020, Sudipto Mallick wrote: When I compiled a recent version of tinycc from mob, I looked at the source of the manpage. I don't like it. In which sense? tcc.1 is a generated file, it's not supposed to be edited. The source is tcc-doc.texi, i.e. texinfo, via texi2pod and pod2man. So, are you sure you're barking at the right tree? I learnt about the mdoc(7) format for writing man pages and thought to use that format for the tcc man page. The rewrite is attached. While -mdoc certainly is nicer than -man it's both trumped (IMHO) by perlpod and texinfo, in writability. What do you think about this mdoc formatted manual page? I think it's nicer than the current generated tcc.1 file, and I think it's somewhat more purist to directly write mdoc files for a project like TCC, instead of generating them. But I also think that something like this needs to be easy to write/edit, and in this case I'd argue that texinfo is just fine. This is not yet complete (see TODOs). Please give suggestion to complete it. Ciao, Michael. ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] tinycc manpage
Sudipto Mallick: > When I compiled a recent version of tinycc from mob, I > looked at the source of the manpage. I don't like it. What did not you like? > I learnt about the mdoc(7) format for writing man pages > and thought to use that format for the tcc man page. The > rewrite is attached. The processed result is attached. While processing, GNU Troff reported the following warnings: mdoc warning: A .Bl directive has no matching .El (#287) mdoc warning: Empty input line #376 mdoc warning: Empty input line #387 mdoc warning: Empty input line #392 mdoc warning: Empty input line #394 mdoc warning: Empty input line #409 > What do you think about this mdoc formatted manual page? I disike lines longer than 78 characters and lack of vertical spacing between logical sections. You can do them like this: end of previous secgtion . .Sh SYNOPSIS . text text text. > Please give suggestion to complete it. I personally prefer the original -man package to -mdoc... TCC(1)BSD General Commands Manual TCC(1) NAME tcc -- Tiny C Compiler SYNOPSIS tcc [options] [infile1 infile2 ...] [-run infile args ...] DESCRIPTION Tiny C Compiler is a lightweight and fast C compiler. Unlike other C compilers, it can run programs directly from memory without generating executable files, almost like scripting languages! tcc runs on Linux, Windows, macOS, FreeBSD, NetBSD and OpenBSD operating systems. tcc can compile C code for i386, x86_64, arm, arm64 and riscv64 architectures. OPTIONS General options -c Generate an object file. -o outfile Put object file, executable, or dll into output file outfile. -run source [args ...] Compile file source and run it with the command line arguments args. In order to be able to give more than one argument to a script, several tcc options can be given after the -run option, separated by spaces: tcc "-run -L/usr/X11R6/lib -lX11" ex4.c In a script, it gives the following header: #!/usr/local/bin/tcc -run -L/usr/X11R6/lib -lX11 -v Display TCC version. -vv Show included files. As sole argument, print search dirs. -vvv shows too. -bench Display compilation statistics. Preprocessor options -Idir Specify an additional include path. Include paths are searched in the order they are specified. System include paths are always searched after. The default sys- tem include paths are: /usr/local/include, /usr/include and PREFIX/lib/tcc/include. (PREFIX is usually /usr or /usr/local). -Dsym[=val] Define preprocessor symbol `sym' to `val'. If `val' is not pre- sent, its value is `1'. Function-like macros can also be defined: `-DF(a)=a+1' -Usym Undefine preprocessor symbol `sym'. -E Preprocess only, to stdout or file (with -o). Compilation flags Note: each of the following options has a negative form beginning with -fno-. -funsigned-char Let the char type be unsigned. -fsigned-char Let the char type be signed. -fno-common Do not generate common symbols for uninitialized data. -fleading-underscore Add a leading underscore at the beginning of each C symbol. -fms-extensions Allow a MS C compiler extensions to the language. Currently this assumes a nested named structure declaration without an identi- fier behaves like an unnamed one. -fdollars-in-identifiers Allow dollar signs in identifiers. Warning options -w Disable all warnings. Note: each of the following warning options has a negative form beginning with -Wno-. -Wimplicit-function-declaration Warn about implicit function declaration. -Wunsupported Warn about unsupported GCC features that are ignored by TCC. -Wwrite-strings Make string constants be of type const char * instead of char *. -Werror Abort compilation if warnings are issued. -Wall Activate all warnings, except -Werror, -Wunusupported and -Wwrite-strings. Linker options -Ldir Specify an additional static library path for the -l option. The default library paths are /usr/local/lib, /usr/lib and /lib. -lname Link your program with dynamic library libname.so or static library libname.a. The library is searched in the paths speci- fied by the -L option and LIBRARY_PATH variable. -Bdir Set the path where the tcc internal libraries (and include files) can be found (default is PREFIX/lib/tcc). -shared Generate a shared
[Tinycc-devel] tinycc manpage
When I compiled a recent version of tinycc from mob, I looked at the source of the manpage. I don't like it. I learnt about the mdoc(7) format for writing man pages and thought to use that format for the tcc man page. The rewrite is attached. What do you think about this mdoc formatted manual page? This is not yet complete (see TODOs). Please give suggestion to complete it. tcc.1 Description: Binary data ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel