source: rtems/doc/new_chapters/gen_section @ f6b9fc6

4.104.114.84.9
Last change on this file since f6b9fc6 was f6b9fc6, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 1, 1998 at 5:03:01 PM

Added files and directories.

  • Property mode set to 100644
File size: 2.5 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="files"
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  files)
24    CHAPTER_CAPS="Files and Directories"
25    CHAPTER_LOWER="files and directories"
26    ROUTINES="opendir readdir readdir_r rewinddir closedir \
27       chdir getcwd open creat umask link mkdir mkfifo unlink \
28       rmdir rename stat fstat access chmod fchmod chown \
29       utime ftrunctate pathconf fpathconf"
30    ;;
31  *)
32    echo "Unknown chapter name"
33    exit 1
34    ;;
35esac
36
37if [ "x${CHAPTER_CAPS}" = "x" -o "x${CHAPTER_LOWER}" = "x" \
38     -o "x${ROUTINES}" = "x" ] ; then
39  echo "initialization problem"
40  exit 1
41fi
42
43echo "@c"
44echo "@c  COPYRIGHT (c) 1988-1998."
45echo "@c  On-Line Applications Research Corporation (OAR)."
46echo "@c  All rights reserved. "
47echo "@c"
48echo "@c  \$Id\$"
49echo "@c"
50echo ""
51echo "@chapter ${CHAPTER_CAPS}" Manager
52echo ""
53echo "@section Introduction"
54echo ""
55echo "The "
56echo "${CHAPTER_LOWER} manager is ..."
57echo ""
58echo "The directives provided by the ${CHAPTER_LOWER} manager are:"
59echo ""
60echo "@itemize @bullet"
61
62for routine in ${ROUTINES}
63do
64  echo "@item @code{${routine}} - "
65done
66echo "@end itemize"
67
68echo ""
69echo "@section Background"
70echo ""
71echo "@section Operations"
72echo ""
73echo "@section Directives"
74echo ""
75echo "This section details the ${CHAPTER_LOWER} manager's directives."
76echo "A subsection is dedicated to each of this manager's directives"
77echo "and describes the calling sequence, related constants, usage,"
78echo "and status codes."
79echo ""
80
81for routine in ${ROUTINES}
82do
83  echo "@page"
84  echo "@subsection ${routine} - XXX"
85  echo ""
86  echo "@subheading CALLING SEQUENCE:"
87  echo ""
88  echo "@ifset is-C"
89  echo "@example"
90  echo "int ${routine}("
91  echo ");"
92  echo "@end example"
93  echo "@end ifset"
94  echo ""
95  echo "@ifset is-Ada"
96  echo "@end ifset"
97  echo ""
98  echo "@subheading STATUS CODES:"
99  echo ""
100  echo "@subheading DESCRIPTION:"
101  echo ""
102  echo "@subheading NOTES:"
103  echo ""
104done
105
Note: See TracBrowser for help on using the repository browser.