From: <wda...@us...> - 2010-06-08 19:32:53
|
Revision: 5996 http://oorexx.svn.sourceforge.net/oorexx/?rev=5996&view=rev Author: wdashley Date: 2010-06-08 19:32:46 +0000 (Tue, 08 Jun 2010) Log Message: ----------- Added SysGettzname1 and SysGettzname2 functions. Modified Paths: -------------- incubator/nixclib/docs/namelookup.xml incubator/nixclib/rxunixsys.cpp incubator/nixclib/testrxunixsys.rex Modified: incubator/nixclib/docs/namelookup.xml =================================================================== --- incubator/nixclib/docs/namelookup.xml 2010-06-07 00:26:13 UTC (rev 5995) +++ incubator/nixclib/docs/namelookup.xml 2010-06-08 19:32:46 UTC (rev 5996) @@ -127,8 +127,50 @@ </section> +<section id="utlSysGettzname1"><title>SysGettzname1</title> +<indexterm><primary>SysGettzname1</primary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGettzname1()--------------------------------------------->< +]]> +</programlisting> +<para><emphasis role="bold">Returns</emphasis></para> +<para>Returns the time zone name.</para> +<para>This function uses the <filename>time.h</filename> +C header file to obtain the time zone name.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<para>None.</para> +<para>Returns the time zone name.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ +say SysGettzname1() +]]> +</programlisting> +</section> +<section id="utlSysGettzname2"><title>SysGettzname2</title> +<indexterm><primary>SysGettzname2</primary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGettzname2()--------------------------------------------->< +]]> +</programlisting> +<para><emphasis role="bold">Returns</emphasis></para> +<para>Returns the daylight savings time zone name.</para> +<para>This function uses the <filename>time.h</filename> +C header file to obtain the time zone name.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<para>None.</para> +<para>Returns the daylight savings time zone name.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ +say SysGettzname2() +]]> +</programlisting> +</section> @@ -137,5 +179,9 @@ + + + + </chapter> Modified: incubator/nixclib/rxunixsys.cpp =================================================================== --- incubator/nixclib/rxunixsys.cpp 2010-06-07 00:26:13 UTC (rev 5995) +++ incubator/nixclib/rxunixsys.cpp 2010-06-08 19:32:46 UTC (rev 5996) @@ -1637,6 +1637,36 @@ } +/** + * Method: SysGettzname1 + * + * Return the timezone name. + * + * @return RexxStringObject. + */ +RexxRoutine0(RexxObjectPtr, + SysGettzname1) +{ + + return (RexxObjectPtr)context->NewStringFromAsciiz(tzname[0]); +} + + +/** + * Method: SysGettzname2 + * + * Return the altername timezone name. + * + * @return RexxStringObject. + */ +RexxRoutine0(RexxObjectPtr, + SysGettzname2) +{ + + return (RexxObjectPtr)context->NewStringFromAsciiz(tzname[1]); +} + + // initialize the libvirt library static void orxnixclib_loader(RexxThreadContext *context) { } @@ -1695,6 +1725,8 @@ REXX_TYPED_ROUTINE(SysMkdir, SysMkdir), REXX_TYPED_ROUTINE(SysRmdir, SysRmdir), REXX_TYPED_ROUTINE(SysGetdirlist, SysGetdirlist), + REXX_TYPED_ROUTINE(SysGettzname1, SysGettzname1), + REXX_TYPED_ROUTINE(SysGettzname2, SysGettzname2), REXX_LAST_ROUTINE() }; Modified: incubator/nixclib/testrxunixsys.rex =================================================================== --- incubator/nixclib/testrxunixsys.rex 2010-06-07 00:26:13 UTC (rev 5995) +++ incubator/nixclib/testrxunixsys.rex 2010-06-08 19:32:46 UTC (rev 5996) @@ -171,6 +171,10 @@ say " "entry end +say 'Calling SysGettzname' +say 'The system time zone name is' SysGettzname1() +say 'The system alternate time zone name is' SysGettzname2() + return ::requires 'rxunixsys' library This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |