PRSTAB

Section: C Library Functions (3)
Updated: 4/16/80
Index Return to Main Contents
 

NAME

prstab, fprstab - print string table using multiple columns  

SYNOPSIS

prstab(table);
char **table;

fprstab(file, list)
FILE *file;
char **list;  

DESCRIPTION

Prstab prints all the strings in the string table table. It uses some heuristics to decide how many columns should be printed, and prints the names in order reading down the columns (i.e. column-major order). It's usually superior to just listing all the names in one long column, and it's smart enough to use a single column if there are just a few names.

The string table for prstab can be declared just like a table for stablk(3), i.e.:

        char *table[] = { "first", "second", ..., "last", 0};
 

SEE ALSO

stablk(3)  

BUGS

Several constants are wired-in. Prstab assumes that there are 80 columns on the page, and that a leading tab is like 7 or 8 spaces. It leaves 5 spaces more than the longest of all strings between columns, and likes to print at least 8 rows if there are just a few strings.


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
BUGS

This document was created by man2html, using the manual pages.
Time: 12:50:26 GMT, May 26, 2025