File: printhdr.c

package info (click to toggle)
libite 2.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,188 kB
  • sloc: sh: 4,665; ansic: 4,165; makefile: 141
file content (20 lines) | stat: -rw-r--r-- 432 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdlib.h>		/* atexit() */
#include <unistd.h>		/* usleep() */

#include "check.h"

#define SCREEN_WIDTH    80

int main(void)
{
	FILE *fp = stderr;
	char buf[SCREEN_WIDTH];

	printhdr(fp, "", 0, UNDERSCORE);
	printhdr(fp, "Neighbor Table", 0, 0);
	snprintf(buf, sizeof(buf), "%-15s %-15s %7s %-5s%10s %6s",
		 "Neighbor", "Interface", "Version", "Flags", "Uptime", "Expire");
	printhdr(fp, buf, 0, REVERSE);

	return 0;
}