Skip to content
Advertisement

Draw table in C — like table on manual page of Linux

I want to make nice tables like you see on some manual page of Linux documentation in C programming language. Is there any library or functions to create a table like them. For example a table that you can find on man syslog like the following, produced by running man syslog:

   ┌──────────────────────┬───────────────┬────────────────────┐
   │Interface             │ Attribute     │ Value              │
   ├──────────────────────┼───────────────┼────────────────────┤
   │openlog(), closelog() │ Thread safety │ MT-Safe            │
   ├──────────────────────┼───────────────┼────────────────────┤
   │syslog(), vsyslog()   │ Thread safety │ MT-Safe env locale │
   └──────────────────────┴───────────────┴────────────────────┘

Advertisement

Answer

You can take a look at the ncurses library here: http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement