[asterisk-commits] russell: trunk r58932 - in /trunk: ./ apps/ build_tools/ doc/ main/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Mar 15 15:29:46 MST 2007


Author: russell
Date: Thu Mar 15 17:29:45 2007
New Revision: 58932

URL: http://svn.digium.com/view/asterisk?view=rev&rev=58932
Log:
Merged revisions 58931 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r58931 | russell | 2007-03-15 17:25:12 -0500 (Thu, 15 Mar 2007) | 13 lines

Merge changes from svn/asterisk/team/russell/LaTeX_docs.

* Convert most of the doc directory into a single LaTeX formatted document
  so that we can generate a PDF, HTML, or other formats from this
  information.
* Add a CLI command to dump the application documentation into LaTeX format
  which will only be include if the configure script is run with 
  --enable-dev-mode.
* The PDF turned out to be close to 1 MB, so it is not included.  However, you
  can simply run "make asterisk.pdf" to generate it yourself.  We may include
  it in release tarballs or have automatically generated ones on the web site,
  but that has yet to be decided.

........

Added:
    trunk/doc/ael.tex
      - copied unchanged from r58931, branches/1.4/doc/ael.tex
    trunk/doc/ajam.tex
      - copied unchanged from r58931, branches/1.4/doc/ajam.tex
    trunk/doc/app-sms.tex
      - copied unchanged from r58931, branches/1.4/doc/app-sms.tex
    trunk/doc/ast_appdocs.tex
      - copied unchanged from r58931, branches/1.4/doc/ast_appdocs.tex
    trunk/doc/asterisk-conf.tex
      - copied unchanged from r58931, branches/1.4/doc/asterisk-conf.tex
    trunk/doc/asterisk.tex
      - copied unchanged from r58931, branches/1.4/doc/asterisk.tex
    trunk/doc/billing.tex
      - copied unchanged from r58931, branches/1.4/doc/billing.tex
    trunk/doc/cdrdriver.tex
      - copied unchanged from r58931, branches/1.4/doc/cdrdriver.tex
    trunk/doc/chaniax.tex
      - copied unchanged from r58931, branches/1.4/doc/chaniax.tex
    trunk/doc/channelvariables.tex
      - copied unchanged from r58931, branches/1.4/doc/channelvariables.tex
    trunk/doc/cliprompt.tex
      - copied unchanged from r58931, branches/1.4/doc/cliprompt.tex
    trunk/doc/configuration.tex
      - copied unchanged from r58931, branches/1.4/doc/configuration.tex
    trunk/doc/dundi.tex
      - copied unchanged from r58931, branches/1.4/doc/dundi.tex
    trunk/doc/enum.tex
      - copied unchanged from r58931, branches/1.4/doc/enum.tex
    trunk/doc/extensions.tex
      - copied unchanged from r58931, branches/1.4/doc/extensions.tex
    trunk/doc/freetds.tex
      - copied unchanged from r58931, branches/1.4/doc/freetds.tex
    trunk/doc/hardware.tex
      - copied unchanged from r58931, branches/1.4/doc/hardware.tex
    trunk/doc/ices.tex
      - copied unchanged from r58931, branches/1.4/doc/ices.tex
    trunk/doc/imapstorage.tex
      - copied unchanged from r58931, branches/1.4/doc/imapstorage.tex
    trunk/doc/ip-tos.tex
      - copied unchanged from r58931, branches/1.4/doc/ip-tos.tex
    trunk/doc/jitterbuffer.tex
      - copied unchanged from r58931, branches/1.4/doc/jitterbuffer.tex
    trunk/doc/localchannel.tex
      - copied unchanged from r58931, branches/1.4/doc/localchannel.tex
    trunk/doc/manager.tex
      - copied unchanged from r58931, branches/1.4/doc/manager.tex
    trunk/doc/misdn.tex
      - copied unchanged from r58931, branches/1.4/doc/misdn.tex
    trunk/doc/mp3.tex
      - copied unchanged from r58931, branches/1.4/doc/mp3.tex
    trunk/doc/odbcstorage.tex
      - copied unchanged from r58931, branches/1.4/doc/odbcstorage.tex
    trunk/doc/privacy.tex
      - copied unchanged from r58931, branches/1.4/doc/privacy.tex
    trunk/doc/queuelog.tex
      - copied unchanged from r58931, branches/1.4/doc/queuelog.tex
    trunk/doc/queues-with-callback-members.tex
      - copied unchanged from r58931, branches/1.4/doc/queues-with-callback-members.tex
    trunk/doc/realtime.tex
      - copied unchanged from r58931, branches/1.4/doc/realtime.tex
    trunk/doc/security.tex
      - copied unchanged from r58931, branches/1.4/doc/security.tex
Removed:
    trunk/doc/00README.1st
    trunk/doc/ael.txt
    trunk/doc/ajam.txt
    trunk/doc/app-sms.txt
    trunk/doc/apps.txt
    trunk/doc/asterisk-conf.txt
    trunk/doc/billing.txt
    trunk/doc/callingpres.txt
    trunk/doc/cdrdriver.txt
    trunk/doc/chaniax.txt
    trunk/doc/channels.txt
    trunk/doc/channelvariables.txt
    trunk/doc/cliprompt.txt
    trunk/doc/configuration.txt
    trunk/doc/cygwin.txt
    trunk/doc/dundi.txt
    trunk/doc/enum.txt
    trunk/doc/extconfig.txt
    trunk/doc/extensions.txt
    trunk/doc/freetds.txt
    trunk/doc/h323.txt
    trunk/doc/hardware.txt
    trunk/doc/iax.txt
    trunk/doc/ices.txt
    trunk/doc/imapstorage.txt
    trunk/doc/ip-tos.txt
    trunk/doc/jitterbuffer.txt
    trunk/doc/localchannel.txt
    trunk/doc/manager.txt
    trunk/doc/math.txt
    trunk/doc/misdn.txt
    trunk/doc/model.txt
    trunk/doc/mp3.txt
    trunk/doc/musiconhold-fpm.txt
    trunk/doc/mysql.txt
    trunk/doc/odbcstorage.txt
    trunk/doc/privacy.txt
    trunk/doc/queuelog.txt
    trunk/doc/queues-with-callback-members.txt
    trunk/doc/radius.txt
    trunk/doc/realtime.txt
    trunk/doc/security.txt
    trunk/doc/sla.pdf
Modified:
    trunk/   (props changed)
    trunk/Makefile
    trunk/apps/app_voicemail.c
    trunk/build_tools/make_buildopts_h
    trunk/configure
    trunk/configure.ac
    trunk/doc/PEERING
    trunk/doc/sla.tex
    trunk/main/pbx.c
    trunk/makeopts.in

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?view=diff&rev=58932&r1=58931&r2=58932
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Thu Mar 15 17:29:45 2007
@@ -46,6 +46,7 @@
 export ASTCONFPATH
 export NOISY_BUILD
 export MENUSELECT_CFLAGS
+export AST_DEVMODE
 export CC
 export CXX
 export AR
@@ -683,4 +684,21 @@
 	@echo "Generating input for menuselect ..."
 	@build_tools/prep_moduledeps > $@
 
+asterisk.pdf: doc/asterisk.pdf
+
+doc/asterisk.pdf:
+ifeq ($(findstring rubber,$(RUBBER)),)
+	@echo "**********************************************"
+	@echo "** You must install the \"rubber\" tool      ***"
+	@echo "** to generate the Asterisk reference PDF. ***"
+	@echo "**********************************************"
+else
+	@echo "**********************************************"
+	@echo "** The Asterisk reference PDF will now be  ***"
+	@echo "** generated.  When complete, it will be   ***"
+	@echo "** located at doc/asterisk.pdf.            ***"	
+	@echo "**********************************************"
+	@cd doc && rubber asterisk.tex
+endif
+
 .PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS)

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=58932&r1=58931&r2=58932
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Thu Mar 15 17:29:45 2007
@@ -1956,7 +1956,7 @@
 		fprintf(p, "Subject: New message %d in mailbox %s" ENDL, msgnum + 1, mailbox);
 	else
 		fprintf(p, "Subject: [PBX]: New message %d in mailbox %s" ENDL, msgnum + 1, mailbox);
-	fprintf(p, "Message-ID: <Asterisk-%d-%d-%s-%d@%s>" ENDL, msgnum, (unsigned int)ast_random(), mailbox, getpid(), host);
+	fprintf(p, "Message-ID: <Asterisk-%d-%d-%s-%d@%s>" ENDL, msgnum + 1, (unsigned int)ast_random(), mailbox, getpid(), host);
 	if(imap) {
 		/* additional information needed for IMAP searching */
 		fprintf(p, "X-Asterisk-VM-Message-Num: %d" ENDL, msgnum + 1);

Modified: trunk/build_tools/make_buildopts_h
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/make_buildopts_h?view=diff&rev=58932&r1=58931&r2=58932
==============================================================================
--- trunk/build_tools/make_buildopts_h (original)
+++ trunk/build_tools/make_buildopts_h Thu Mar 15 17:29:45 2007
@@ -9,5 +9,9 @@
 END
 TMP=`grep MENUSELECT_CFLAGS menuselect.makeopts | sed 's/MENUSELECT_CFLAGS\=//g' | sed 's/-D//g'`
 for x in ${TMP}; do
-     echo "#define ${x} 1"
+	echo "#define ${x} 1"
 done
+if grep AST_DEVMODE makeopts | grep -q yes
+then
+	echo "#define AST_DEVMODE 1"
+fi

Modified: trunk/configure
URL: http://svn.digium.com/view/asterisk/trunk/configure?view=diff&rev=58932&r1=58931&r2=58932
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Thu Mar 15 17:29:45 2007
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 58858 .
+# From configure.ac Revision: 58866 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.60.
 #
@@ -692,6 +692,7 @@
 DOT
 STRIP
 WGET
+RUBBER
 FETCH
 DOWNLOAD
 acx_pthread_config
@@ -7432,6 +7433,47 @@
 fi
 
 
+# Extract the first word of "rubber", so it can be a program name with args.
+set dummy rubber; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_RUBBER+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $RUBBER in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_RUBBER="$RUBBER" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_RUBBER="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_RUBBER" && ac_cv_path_RUBBER=":"
+  ;;
+esac
+fi
+RUBBER=$ac_cv_path_RUBBER
+if test -n "$RUBBER"; then
+  { echo "$as_me:$LINENO: result: $RUBBER" >&5
+echo "${ECHO_T}$RUBBER" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
 if test "${WGET}" != ":" ; then
   DOWNLOAD=${WGET}
 else
@@ -39650,13 +39692,13 @@
 DOT!$DOT$ac_delim
 STRIP!$STRIP$ac_delim
 WGET!$WGET$ac_delim
+RUBBER!$RUBBER$ac_delim
 FETCH!$FETCH$ac_delim
 DOWNLOAD!$DOWNLOAD$ac_delim
 acx_pthread_config!$acx_pthread_config$ac_delim
 PTHREAD_CC!$PTHREAD_CC$ac_delim
 PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim
 PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim
-AST_DEVMODE!$AST_DEVMODE$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -39698,6 +39740,7 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+AST_DEVMODE!$AST_DEVMODE$ac_delim
 ALSA_LIB!$ALSA_LIB$ac_delim
 ALSA_INCLUDE!$ALSA_INCLUDE$ac_delim
 ALSA_DIR!$ALSA_DIR$ac_delim
@@ -39794,7 +39837,6 @@
 SS7_INCLUDE!$SS7_INCLUDE$ac_delim
 SS7_DIR!$SS7_DIR$ac_delim
 PBX_SS7!$PBX_SS7$ac_delim
-PWLIB_LIB!$PWLIB_LIB$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -39836,6 +39878,7 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+PWLIB_LIB!$PWLIB_LIB$ac_delim
 PWLIB_INCLUDE!$PWLIB_INCLUDE$ac_delim
 PWLIB_DIR!$PWLIB_DIR$ac_delim
 PBX_PWLIB!$PBX_PWLIB$ac_delim
@@ -39932,7 +39975,6 @@
 OPENH323_SUFFIX!$OPENH323_SUFFIX$ac_delim
 OPENH323_BUILD!$OPENH323_BUILD$ac_delim
 QTMOC!$QTMOC$ac_delim
-EDITLINE_LIB!$EDITLINE_LIB$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -39974,6 +40016,7 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+EDITLINE_LIB!$EDITLINE_LIB$ac_delim
 PBX_H323!$PBX_H323$ac_delim
 PBX_IXJUSER!$PBX_IXJUSER$ac_delim
 GTKCONFIG!$GTKCONFIG$ac_delim
@@ -39984,7 +40027,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 8; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 9; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?view=diff&rev=58932&r1=58931&r2=58932
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Thu Mar 15 17:29:45 2007
@@ -153,6 +153,7 @@
 AC_PATH_PROG([DOT], [dot], :)
 AC_PATH_PROG([STRIP], [strip], :)
 AC_PATH_PROG([WGET], [wget], :)
+AC_PATH_PROG([RUBBER], [rubber], :)
 if test "${WGET}" != ":" ; then
   DOWNLOAD=${WGET}
 else

Modified: trunk/doc/PEERING
URL: http://svn.digium.com/view/asterisk/trunk/doc/PEERING?view=diff&rev=58932&r1=58931&r2=58932
==============================================================================
--- trunk/doc/PEERING (original)
+++ trunk/doc/PEERING Thu Mar 15 17:29:45 2007
@@ -1,3 +1,5 @@
+\begin{verbatim}
+
                     DIGIUM GENERAL PEERING AGREEMENT (TM)
                       Version 1.0.0, September 2004 
  Copyright (C) 2004 Digium, Inc.
@@ -497,3 +499,5 @@
 accordance with this GPA.
 
 DUNDi, IAX, Asterisk and GPA are trademarks of Digium, Inc.
+
+\end{verbatim}

Modified: trunk/doc/sla.tex
URL: http://svn.digium.com/view/asterisk/trunk/doc/sla.tex?view=diff&rev=58932&r1=58931&r2=58932
==============================================================================
--- trunk/doc/sla.tex (original)
+++ trunk/doc/sla.tex Thu Mar 15 17:29:45 2007
@@ -1,13 +1,13 @@
-\documentclass[12pt,a4]{article}
-\usepackage{hyperref}
-
-\author{Russell Bryant \\ Software Engineer \\  Digium, Inc.}
-\title{Shared Line Appearances}
-
-\begin{document}
-\maketitle
-
-\tableofcontents
+%\documentclass[12pt,a4]{article}
+%\usepackage{hyperref}
+
+%\author{Russell Bryant \\ Software Engineer \\  Digium, Inc.}
+%\title{Shared Line Appearances}
+
+%\begin{document}
+%\maketitle
+
+%\tableofcontents
 
 \section{Introduction}
 
@@ -375,4 +375,4 @@
 of this trunk on this station will then show in use.  All stations that are not
 currently connected to this trunk will show it on hold.
 
-\end{document}
+%\end{document}

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=58932&r1=58931&r2=58932
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Thu Mar 15 17:29:45 2007
@@ -3056,6 +3056,56 @@
 	return RESULT_SUCCESS;
 }
 
+#ifdef AST_DEVMODE
+static char core_dumpappdocs_help[] =
+"Usage: core dumpappdocs [application]\n"
+"       Dump Application documentation to \\tmp\\ast_appdocs.tex.\n";
+
+static int handle_core_dumpappdocs(int fd, int argc, char *argv[])
+{
+	struct ast_app *app;
+	FILE *f;
+	char *appname = NULL;
+	const char *fn = "/tmp/ast_appdocs.tex";
+
+	if (argc > 3)
+		appname = argv[3];
+
+	if (!(f = fopen(fn, "w+"))) {
+		ast_cli(fd, "Unable to open %s for writing!\n", fn);
+		return RESULT_FAILURE;
+	}
+
+	fprintf(f, "%% This file is automatically generated.  Any manual edits will be lost.\n");
+
+	AST_LIST_LOCK(&apps);
+	AST_LIST_TRAVERSE(&apps, app, list) {
+		if (appname && strcasecmp(app->name, appname))
+			continue;
+
+		fprintf(f, "\\section{%s}\n"
+				"\\subsection{Synopsis}\n"
+				"\\begin{verbatim}\n"
+				"%s\n"
+				"\\end{verbatim}\n"
+				"\\subsection{Description}\n"
+				"\\begin{verbatim}\n"
+				"%s\n"
+				"\\end{verbatim}\n\n\n", app->name, app->synopsis, app->description);
+
+		if (appname)
+			break;
+	}
+	AST_LIST_UNLOCK(&apps);
+
+	fclose(f);
+
+	ast_cli(fd, "Documentation has been dumped to %s\n", fn);
+
+	return RESULT_SUCCESS;
+}
+#endif
+
 /*! \brief  handle_show_hints: CLI support for listing registered dial plan hints */
 static int handle_show_hints(int fd, int argc, char *argv[])
 {
@@ -3729,6 +3779,12 @@
 	{ { "core", "show", "application", NULL },
 	handle_show_application, "Describe a specific dialplan application",
 	show_application_help, complete_show_application },
+
+#ifdef AST_DEVMODE
+	{ { "core", "dumpappdocs", NULL },
+	handle_core_dumpappdocs, "Dump App docs in LaTeX format",
+	core_dumpappdocs_help, NULL },
+#endif
 
 	{ { "core", "set", "global", NULL },
 	handle_set_global, "Set global dialplan variable",

Modified: trunk/makeopts.in
URL: http://svn.digium.com/view/asterisk/trunk/makeopts.in?view=diff&rev=58932&r1=58931&r2=58932
==============================================================================
--- trunk/makeopts.in (original)
+++ trunk/makeopts.in Thu Mar 15 17:29:45 2007
@@ -22,6 +22,7 @@
 WGET=@WGET@
 FETCH=@FETCH@
 DOWNLOAD=@DOWNLOAD@
+RUBBER=@RUBBER@
 
 BUILD_PLATFORM=@BUILD_PLATFORM@
 BUILD_CPU=@BUILD_CPU@



More information about the asterisk-commits mailing list