September 2002
Beginner to intermediate
216 pages
7h 43m
English
To demonstrate how to create a package, we’ll create a short C program and its associated manpage. Example 6-1 shows hellow.c and Example 6-2 shows its manpage, hellow.1.
/*
* hellow.c - Prints a friendly greeting.
*/
#include <stdio.h>
int main( )
{
printf("Hello, world!\n");
return 0;
}.\" Copyright (c) 2002, O'Reilly & Associates, Inc. .\" .Dd April 15, 2002 .Dt HELLOW 1 .Os Mac OS X .Sh NAME .Nm hellow .Nd Greeting generator .Sh DESCRIPTION This command prints a friendly greeting.