summaryrefslogtreecommitdiffstats
path: root/doc/new_chapters/gen_section
blob: 596fd073866cc3f9607081a95f066b5ea5098521 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
format=man
#format=list

case ${format} in
  man)  
    ;;
  list)
    echo "@itemize @bullet"
    ;;
  *)
    echo "unknown format -- ${format}"
    exit 1
    ;;
esac


while read routine
do
  case ${format} in
    man)
      echo "@page"
      echo "@subsection sigaddset"
      echo ""
      echo "@subheading CALLING SEQUENCE:"
      echo ""
      echo "@example"
      echo "int ${routine}("
      echo "@end example"
      echo ""
      echo "@subheading STATUS CODES:"
      echo ""
      echo "@subheading DESCRIPTION:"
      echo ""
      echo "@subheading NOTES:"
      echo ""
      ;;
    list)
      ;;
    *)
      echo "unknown format -- ${format}"
      exit 1
      ;;
  esac
      
done <<EOF
execl
execv
execle
execve
execlp
execvp
EOF

case ${format} in
  man)
    ;;
  list)
    echo "@end itemize"
    ;;
  *)
    echo "unknown format -- ${format}"
    exit 1
    ;;
esac