summaryrefslogtreecommitdiff
path: root/doc/examples/filtering/files/hello/hello.c
blob: 338baf797f47ef1c2aea3c362ef6fb432f5ae9c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * hello.c - Simple hello program
 */
#include <stdio.h>
#include <libhello.h>

int main(int argc, char *argv[])
{
  const char *person = NULL;

  if (argc > 1)
    person = argv[1];

  if (person)
    hello(person);
  else {
#ifdef DEFAULT_PERSON
    hello(DEFAULT_PERSON);
#else
    hello("stranger");
#endif
  }

  return 0;
}