source: rtems/doc/new_chapters/gen_section @ 45c00d4

4.104.114.84.95
Last change on this file since 45c00d4 was 45c00d4, checked in by Joel Sherrill <joel.sherrill@…>, on 08/01/98 at 16:36:03

Now generates complete template for chapters.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1#
2#  This shell script generates the starting template for a manager chapter.
3#
4
5
6# Set this based on which chapter you want to generate a template for.
7chapter="process"
8
9case ${chapter} in
10  process)
11    CHAPTER_CAPS="Process Creation and Execution"
12    CHAPTER_LOWER="process creation and execution"
13    ROUTINES="execl execv execle execve execlp execvp pthread_atfork \
14      wait waitpid _exit"
15    ;;
16  procenv)
17    CHAPTER_CAPS="Process Environment"
18    CHAPTER_LOWER="process environment"
19    ROUTINES="getpid getppid getgid getegid setuid setgid getgroups \
20      getlogin getlogin_r getpgrp setsid setpgid uname times \
21      getenv ctermid ttyname ttyname_r isatty sysconf "
22    ;;
23  *)
24    echo "Unknown chapter name"
25    exit 1
26    ;;
27esac
28
29if [ "x${CHAPTER_CAPS}" = "x" -o "x${CHAPTER_LOWER}" = "x" \
30     -o "x${ROUTINES}" = "x" ] ; then
31  echo "initialization problem"
32  exit 1
33fi
34
35echo "@c"
36echo "@c  COPYRIGHT (c) 1988-1998."
37echo "@c  On-Line Applications Research Corporation (OAR)."
38echo "@c  All rights reserved. "
39echo "@c"
40echo "@c  \$Id\$"
41echo "@c"
42echo ""
43echo "@chapter ${CHAPTER_CAPS}" Manager
44echo ""
45echo "@section Introduction"
46echo ""
47echo "The "
48echo "${CHAPTER_LOWER} manager is ..."
49echo ""
50echo "The directives provided by the ${CHAPTER_LOWER} manager are:"
51echo ""
52echo "@itemize @bullet"
53
54for routine in ${ROUTINES}
55do
56  echo "@item @code{${routine}} - "
57done
58echo "@end itemize"
59
60echo ""
61echo "@section Background"
62echo ""
63echo "@section Operations"
64echo ""
65echo "@section Directives"
66echo ""
67echo "This section details the ${CHAPTER_LOWER} manager's directives."
68echo "A subsection is dedicated to each of this manager's directives"
69echo "and describes the calling sequence, related constants, usage,"
70echo "and status codes."
71echo ""
72
73for routine in ${ROUTINES}
74do
75  echo "@page"
76  echo "@subsection ${routine} - XXX"
77  echo ""
78  echo "@subheading CALLING SEQUENCE:"
79  echo ""
80  echo "@ifset is-C"
81  echo "@example"
82  echo "int ${routine}("
83  echo ");"
84  echo "@end example"
85  echo "@end ifset"
86  echo ""
87  echo "@ifset is-Ada"
88  echo "@end ifset"
89  echo ""
90  echo "@subheading STATUS CODES:"
91  echo ""
92  echo "@subheading DESCRIPTION:"
93  echo ""
94  echo "@subheading NOTES:"
95  echo ""
96done
97
Note: See TracBrowser for help on using the repository browser.