GithubHelp home page GithubHelp logo

kristapsdz / sqlite2mdoc Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 2.0 2.06 MB

extract C reference manpages from SQLite header file

License: ISC License

Makefile 0.16% C 51.43% Roff 48.42%
sqlite3 mdoc manpages

sqlite2mdoc's Introduction

Synopsis

This utility accepts an SQLite header file sqlite3.h and produces a set of decently well-formed mdoc(7) files documenting the C API. These will be roughly equivalent to the C-language Interface Specification for SQLite.

You can also use it for any file(s) using the documentation standards of SQLite. See the sqlite2mdoc.1 manpage for syntax details.

Note: this only works with sqlite3, not the original sqlite.h format.

Release snapshots are archived in https://kristaps.bsd.lv/sqlite2mdoc/snapshots.

Installation

Run ./configure then make.

This utility isn't meant for installation, but for integration into your SQLite deployment phase. You can run make install, however, if you plan on using it for other documentation.

There are no compile-time or run-time dependencies.

This software has been tested and run on OpenBSD, FreeBSD, NetBSD, IllumOS, Solaris, Mac OS X, and Linux (glibc and musl).

Examples

I've used mandoc to generate some Markdown from the mdoc(7) output.

License

All sources use the ISC (like OpenBSD) license. See the LICENSE.md file for details.

sqlite2mdoc's People

Contributors

kristapsdz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sqlite2mdoc's Issues

warning: ‘fgetln’ is deprecated: This functions cannot be safely ported, use getline(3) instead

Linux, fedora27, gcc 7.2.1 20170915 (Red Hat 7.2.1-2)


main.c: In function ‘main’:
main.c:1677:2: warning: ‘fgetln’ is deprecated: This functions cannot be safely ported, use getline(3) instead, as it is supported by GNU and POSIX.1-2008. [-Wdeprecated-declarations]
  while (NULL != (cp = fgetln(f, &len))) {
  ^~~~~
In file included from main.c:38:0:
/usr/include/bsd/stdio.h:53:7: note: declared here
 char *fgetln(FILE *fp, size_t *lenp)
       ^~~~~~
cc -o sqlite2mdoc main.o -lbsd
main.o: In function `main':
main.c:(.text.startup+0x1db): warning: This functions cannot be safely ported, use getline(3) instead, as it is supported by GNU and POSIX.1-2008.

fails with sqlite 3.41.2 ?

on the recent sqlite versions, producing the mdoc/manpage fails:

/usr/local/bin/sqlite2mdoc -p /usr/obj/ports/sqlite3-3.41.2/fake-amd64/usr/local/man/man3 /usr/obj/ports/sqlite3-3.41.2/fake-amd64/usr/local/include/sqlite3.h
sqlite2mdoc: /usr/obj/ports/sqlite3-3.41.2/fake-amd64/usr/local/include/sqlite3.h:768: warn: unexpected end of interface description
sqlite2mdoc: /usr/obj/ports/sqlite3-3.41.2/fake-amd64/usr/local/include/sqlite3.h:733: interface has errors, not producing manpage

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.