[asterisk-commits] tilghman: branch tilghman/issue16461 r272087 - /team/tilghman/issue16461/funcs/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jun 23 00:28:09 CDT 2010
Author: tilghman
Date: Wed Jun 23 00:28:06 2010
New Revision: 272087
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=272087
Log:
Fix ugly red spots; also line-wrap docs.
Modified:
team/tilghman/issue16461/funcs/func_env.c
Modified: team/tilghman/issue16461/funcs/func_env.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/issue16461/funcs/func_env.c?view=diff&rev=272087&r1=272086&r2=272087
==============================================================================
--- team/tilghman/issue16461/funcs/func_env.c (original)
+++ team/tilghman/issue16461/funcs/func_env.c Wed Jun 23 00:28:06 2010
@@ -17,7 +17,7 @@
/*! \file
*
* \brief Environment related dialplan functions
- *
+ *
* \ingroup functions
*/
@@ -74,8 +74,7 @@
Read or write text file.
</synopsis>
<syntax>
- <parameter name="filename" required="true">
- <para>File to write or modify.</para>
+ <parameter name="filename" required="true" />
</parameter>
<parameter name="offset">
<para>Maybe specified as any number. If negative, <replaceable>offset</replaceable> specifies the number
@@ -88,18 +87,25 @@
<parameter name="options">
<optionlist>
<option name="l">
- <para>Line mode: offset and length are assumed to be measured in lines, instead of byte offsets.</para>
+ <para>Line mode: offset and length are assumed to be
+ measured in lines, instead of byte offsets.</para>
</option>
<option name="a">
- <para>In write mode only, the append option is used to append to the end of the file, instead of overwriting the existing file.</para>
+ <para>In write mode only, the append option is used to
+ append to the end of the file, instead of overwriting
+ the existing file.</para>
</option>
<option name="d">
- <para>In write mode and line mode only, the delete option is used to eliminate a line, instead of setting it to blank.</para>
+ <para>In write mode and line mode only, this option does
+ not automatically append a newline string to the end of
+ a value. This is useful for deleting lines, instead of
+ setting them to blank.</para>
</option>
</optionlist>
</parameter>
<parameter name="format">
- <para>The <replaceable>format</replaceable> parameter may be used to delimit the type of line terminators in line mode.</para>
+ <para>The <replaceable>format</replaceable> parameter may be
+ used to delimit the type of line terminators in line mode.</para>
<optionlist>
<option name="u">
<para>Unix newline format.</para>
@@ -115,7 +121,7 @@
</syntax>
<description>
<para>Read and write text file in character and line mode.</para>
- <para>Examples :</para>
+ <para>Examples:</para>
<para/>
<para>Read mode (byte):</para>
<para> ;reads the entire content of the file.</para>
@@ -1001,7 +1007,7 @@
}
for (pos = fbuf; pos < fbuf + sizeof(fbuf); pos++) {
LINE_COUNTER(pos, newline_format, count);
-
+
if (count == offset) {
offset_offset = i + (pos - fbuf) + 1;
break;
@@ -1012,7 +1018,7 @@
}
}
}
-
+
if (offset_offset < 0) {
ast_log(LOG_ERROR, "Offset '%s' refers to before the beginning of the file!\n", args.offset);
fclose(ff);
More information about the asterisk-commits
mailing list