From 45c00d4090b5c76bbf52d3cc6595b8e092d3cc35 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sat, 1 Aug 1998 16:36:03 +0000 Subject: Now generates complete template for chapters. --- doc/new_chapters/gen_section | 138 ++++++++++++++++++++++++++----------------- 1 file changed, 85 insertions(+), 53 deletions(-) (limited to 'doc/new_chapters') diff --git a/doc/new_chapters/gen_section b/doc/new_chapters/gen_section index 596fd07386..658f8ce45a 100644 --- a/doc/new_chapters/gen_section +++ b/doc/new_chapters/gen_section @@ -1,65 +1,97 @@ -format=man -#format=list +# +# This shell script generates the starting template for a manager chapter. +# -case ${format} in - man) + +# Set this based on which chapter you want to generate a template for. +chapter="process" + +case ${chapter} in + process) + CHAPTER_CAPS="Process Creation and Execution" + CHAPTER_LOWER="process creation and execution" + ROUTINES="execl execv execle execve execlp execvp pthread_atfork \ + wait waitpid _exit" ;; - list) - echo "@itemize @bullet" + procenv) + CHAPTER_CAPS="Process Environment" + CHAPTER_LOWER="process environment" + ROUTINES="getpid getppid getgid getegid setuid setgid getgroups \ + getlogin getlogin_r getpgrp setsid setpgid uname times \ + getenv ctermid ttyname ttyname_r isatty sysconf " ;; *) - echo "unknown format -- ${format}" + echo "Unknown chapter name" exit 1 ;; esac +if [ "x${CHAPTER_CAPS}" = "x" -o "x${CHAPTER_LOWER}" = "x" \ + -o "x${ROUTINES}" = "x" ] ; then + echo "initialization problem" + exit 1 +fi + +echo "@c" +echo "@c COPYRIGHT (c) 1988-1998." +echo "@c On-Line Applications Research Corporation (OAR)." +echo "@c All rights reserved. " +echo "@c" +echo "@c \$Id\$" +echo "@c" +echo "" +echo "@chapter ${CHAPTER_CAPS}" Manager +echo "" +echo "@section Introduction" +echo "" +echo "The " +echo "${CHAPTER_LOWER} manager is ..." +echo "" +echo "The directives provided by the ${CHAPTER_LOWER} manager are:" +echo "" +echo "@itemize @bullet" -while read routine +for routine in ${ROUTINES} 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 <