From: <wda...@us...> - 2010-05-10 13:35:02
|
Revision: 5931 http://oorexx.svn.sourceforge.net/oorexx/?rev=5931&view=rev Author: wdashley Date: 2010-05-10 13:34:54 +0000 (Mon, 10 May 2010) Log Message: ----------- Put nixclib back into the incubator. This is preperation for pulling all the APIs from nixclib back out of rexxutil. Added Paths: ----------- incubator/nixclib/ incubator/nixclib/Makefile incubator/nixclib/Readme.txt incubator/nixclib/docs/ incubator/nixclib/docs/SysAccess.sgml incubator/nixclib/docs/SysChown.sgml incubator/nixclib/docs/SysChroot.sgml incubator/nixclib/docs/SysEuidaccess.sgml incubator/nixclib/docs/SysGetegid.sgml incubator/nixclib/docs/SysGeteuid.sgml incubator/nixclib/docs/SysGetgid.sgml incubator/nixclib/docs/SysGetgrgid.sgml incubator/nixclib/docs/SysGetgrnam.sgml incubator/nixclib/docs/SysGetpgrp.sgml incubator/nixclib/docs/SysGetpid.sgml incubator/nixclib/docs/SysGetppid.sgml incubator/nixclib/docs/SysGetpwnam.sgml incubator/nixclib/docs/SysGetpwuid.sgml incubator/nixclib/docs/SysGetservbyname.sgml incubator/nixclib/docs/SysGetservbyport.sgml incubator/nixclib/docs/SysGetsid.sgml incubator/nixclib/docs/SysGetuid.sgml incubator/nixclib/docs/SysGetxattr.sgml incubator/nixclib/docs/SysLink.sgml incubator/nixclib/docs/SysListxattr.sgml incubator/nixclib/docs/SysRemovexattr.sgml incubator/nixclib/docs/SysSetegid.sgml incubator/nixclib/docs/SysSeteuid.sgml incubator/nixclib/docs/SysSetgid.sgml incubator/nixclib/docs/SysSetpgid.sgml incubator/nixclib/docs/SysSetpgrp.sgml incubator/nixclib/docs/SysSetsid.sgml incubator/nixclib/docs/SysSetuid.sgml incubator/nixclib/docs/SysSetxattr.sgml incubator/nixclib/docs/SysSignal.sgml incubator/nixclib/docs/SysStat.sgml incubator/nixclib/docs/SysSymlink.sgml incubator/nixclib/docs/SysUmask.sgml incubator/nixclib/docs/SysUname.sgml incubator/nixclib/docs/SysWordexp.sgml incubator/nixclib/nixclib.cpp incubator/nixclib/nixclib.h incubator/nixclib/nixtest.rex Added: incubator/nixclib/Makefile =================================================================== --- incubator/nixclib/Makefile (rev 0) +++ incubator/nixclib/Makefile 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,62 @@ +#/*----------------------------------------------------------------------------*/ +#/* */ +#/* Copyright (c) 2009-2010 Rexx Language Association. All rights reserved. */ +#/* */ +#/* This program and the accompanying materials are made available under */ +#/* the terms of the Common Public License v1.0 which accompanies this */ +#/* distribution. A copy is also available at the following address: */ +#/* http://www.oorexx.org/license.html */ +#/* */ +#/* Redistribution and use in source and binary forms, with or */ +#/* without modification, are permitted provided that the following */ +#/* conditions are met: */ +#/* */ +#/* Redistributions of source code must retain the above copyright */ +#/* notice, this list of conditions and the following disclaimer. */ +#/* Redistributions in binary form must reproduce the above copyright */ +#/* notice, this list of conditions and the following disclaimer in */ +#/* the documentation and/or other materials provided with the distribution. */ +#/* */ +#/* Neither the name of Rexx Language Association nor the names */ +#/* of its contributors may be used to endorse or promote products */ +#/* derived from this software without specific prior written permission. */ +#/* */ +#/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +#/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +#/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +#/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +#/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +#/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +#/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +#/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +#/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +#/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +#/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#/* */ +#/*----------------------------------------------------------------------------*/ + + +# Setup +ORXLFLAGS = --export-dynamic -shared -nostartfiles +ORXCFLAGS = -fPIC +OBJECTS = nixclib.o + + +# Build the shared library +libnixclib.so: $(OBJECTS) + gcc $(ORXLFLAGS) -lrexx -lrexxapi -o libnixclib.so $(OBJECTS) + + +# Build the objects +# Compile *.cpp to *.o inference rule +.cpp.o: + gcc -c $(ORXCFLAGS) $< + +# Dependencies +nixclib.o: nixclib.cpp nixclib.h + + + +clean: + rm *.so *.o + Added: incubator/nixclib/Readme.txt =================================================================== --- incubator/nixclib/Readme.txt (rev 0) +++ incubator/nixclib/Readme.txt 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,11 @@ + Notes for nixclib + +1. These APIs are eventually going to be merged into RexxUtil. They are currently being + compiled into a library of their own for testing purposes. +2. All of these APIs have been tested on Fedora 12. Additional testing on other *nix + platforms is needed. +3. None of these APIs (that I am aware of) are available for Windows. + +2009-12-13 +David Ashley + Added: incubator/nixclib/docs/SysAccess.sgml =================================================================== --- incubator/nixclib/docs/SysAccess.sgml (rev 0) +++ incubator/nixclib/docs/SysAccess.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,35 @@ + +<section id="utlSysAccess"><title>SysAccess (Unix only)</title> +<indexterm><primary>SysAccess</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysAccess</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysAccess(file, mode)--------------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Checks to see if the user has access permissions on a file.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">file</emphasis></term> +<listitem><para>The path/file name to check access permissions. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">mode</emphasis></term> +<listitem><para>The access permissions to check on the file. Must be a decilam number. +</para></listitem></varlistentry> +</variablelist> +<para>Returns zero on success (all access rights available) or -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* do others have write permission on the file? */ + +retc = SysAccess("/home/dashley/temp.txt", 2) + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysChown.sgml =================================================================== --- incubator/nixclib/docs/SysChown.sgml (rev 0) +++ incubator/nixclib/docs/SysChown.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,38 @@ + +<section id="utlSysChown"><title>SysChown (Unix only)</title> +<indexterm><primary>SysChown</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysChown</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysChown(srcpath, uid, gid)--------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Change the user and group ownership attributes of a file.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">srcpath</emphasis></term> +<listitem><para>The path/filename of the source file to change. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">uid</emphasis></term> +<listitem><para>The new numerical user id. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">gid</emphasis></term> +<listitem><para>The new numerical group id. +</para></listitem></varlistentry> +</variablelist> +<para>Returns zero on success and -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* change the ownership attributes of a file */ + +call SysChown "/home/username/myfile", 501, 530 + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysChroot.sgml =================================================================== --- incubator/nixclib/docs/SysChroot.sgml (rev 0) +++ incubator/nixclib/docs/SysChroot.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,32 @@ + +<section id="utlSysChroot"><title>SysChroot (Unix only)</title> +<indexterm><primary>SysChroot</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysChroot</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysChroot(srcpath)------------------------------------------>< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Change the root directory of the current process.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">srcpath</emphasis></term> +<listitem><para>The path/filename of the source file to change. +</para></listitem></varlistentry> +</variablelist> +<para>Returns zero on success and -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* change the ownership attributes of a file */ + +call SysChroot "/home/username/" + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysEuidaccess.sgml =================================================================== --- incubator/nixclib/docs/SysEuidaccess.sgml (rev 0) +++ incubator/nixclib/docs/SysEuidaccess.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,35 @@ + +<section id="utlSysEuidaccess"><title>SysEuidaccess (Unix only)</title> +<indexterm><primary>SysEuidaccess</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysEuidaccess</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysEuidaccess(file, mode)----------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Checks to see if the effective user has access permissions on a file.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">file</emphasis></term> +<listitem><para>The path/file name to check access permissions. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">mode</emphasis></term> +<listitem><para>The access permissions to check on the file. Must be a decilam number. +</para></listitem></varlistentry> +</variablelist> +<para>Returns zero on success (all access rights available) or -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* do others have write permission on the file? */ + +retc = SysEuidaccess("/home/dashley/temp.txt", 2) + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGetegid.sgml =================================================================== --- incubator/nixclib/docs/SysGetegid.sgml (rev 0) +++ incubator/nixclib/docs/SysGetegid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,28 @@ + +<section id="utlSysGetegid"><title>SysGetegid (Unix only)</title> +<indexterm><primary>SysGetegid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGetegid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGetegid()------------------------------------------------>< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Gets the current numerical effective group id.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<para>None</para>para> +<para>Returns the current numerical effective group id.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* get the current effective group id */ + +mygid = SysGetegid() + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGeteuid.sgml =================================================================== --- incubator/nixclib/docs/SysGeteuid.sgml (rev 0) +++ incubator/nixclib/docs/SysGeteuid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,28 @@ + +<section id="utlSysGeteuid"><title>SysGeteuid (Unix only)</title> +<indexterm><primary>SysGeteuid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGeteuid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGeteuid()------------------------------------------------>< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Gets the current numerical effective user id.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<para>None</para>para> +<para>Returns the current numerical effective user id.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* get the current effective user id */ + +myuid = SysGeteuid() + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGetgid.sgml =================================================================== --- incubator/nixclib/docs/SysGetgid.sgml (rev 0) +++ incubator/nixclib/docs/SysGetgid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,28 @@ + +<section id="utlSysGetgid"><title>SysGetgid (Unix only)</title> +<indexterm><primary>SysGetgid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGetgid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGetgid()------------------------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Gets the current numerical group id.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<para>None</para>para> +<para>Returns the current numerical group id.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* get the current group id */ + +mygid = SysGetgid() + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGetgrgid.sgml =================================================================== --- incubator/nixclib/docs/SysGetgrgid.sgml (rev 0) +++ incubator/nixclib/docs/SysGetgrgid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,54 @@ + +<section id="utlSysGetgrgid"><title>SysGetgrgid (Unix only)</title> +<indexterm><primary>SysGetgrgid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGetgrgid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGetgrgid(gid, option)------------------------------------>< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Returns information about a group.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">gid</emphasis></term> +<listitem><para>The numerical group id. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">option</emphasis></term> +<listitem><para>An option specifying the information to return. +The values are all case insensitive and only the first letter of the option value is checked. +Allowed values are: +<variablelist> +<varlistentry><term>"NAME"</term> +<listitem><para>The group name. +</para></listitem></varlistentry> +<varlistentry><term>"GROUP"</term> +<listitem><para>The numerical group id. +</para></listitem></varlistentry> +<varlistentry><term>"MEMBERS"</term> +<listitem><para>The members of the group are returned in an array. +</para></listitem></varlistentry> +<varlistentry><term>"PASSWORD"</term> +<listitem><para>Always returns a zero-length string. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +</variablelist> +<para>Returns information specified by the <emphasis>option</emphasis>.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* the following examples came from a Linux laptop running Fedora 12 */ + +SysGetpwgid(100, "n") --> users +SysGetpwgid(100, "g") --> 100 +SysGetpwgid(100, "m") --> an array with the members "dashley" and "games" +SysGetpwgid(100, "p") --> "" + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGetgrnam.sgml =================================================================== --- incubator/nixclib/docs/SysGetgrnam.sgml (rev 0) +++ incubator/nixclib/docs/SysGetgrnam.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,54 @@ + +<section id="utlSysGetgrnam"><title>SysGetgrnam (Unix only)</title> +<indexterm><primary>SysGetgrnam</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGetgrnam</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGetgrnam(grpname, option)-------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Returns information about a group.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">grpname</emphasis></term> +<listitem><para>The group name. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">option</emphasis></term> +<listitem><para>An option specifying the information to return. +The values are all case insensitive and only the first letter of the option value is checked. +Allowed values are: +<variablelist> +<varlistentry><term>"NAME"</term> +<listitem><para>The group name. +</para></listitem></varlistentry> +<varlistentry><term>"GROUP"</term> +<listitem><para>The numerical group id. +</para></listitem></varlistentry> +<varlistentry><term>"MEMBERS"</term> +<listitem><para>The members of the group are returned in an array. +</para></listitem></varlistentry> +<varlistentry><term>"PASSWORD"</term> +<listitem><para>Always returns a zero-length string. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +</variablelist> +<para>Returns information specified by the <emphasis>option</emphasis>.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* the following examples came from a Linux laptop running Fedora 12 */ + +SysGetpwgrp("users", "n") --> users +SysGetpwgrp("users", "g") --> 100 +SysGetpwgrp("users", "m") --> an array with the members "dashley" and "games" +SysGetpwgrp("users", "p") --> "" + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGetpgrp.sgml =================================================================== --- incubator/nixclib/docs/SysGetpgrp.sgml (rev 0) +++ incubator/nixclib/docs/SysGetpgrp.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,28 @@ + +<section id="utlSysGetpgrp"><title>SysGetpgrp (Unix only)</title> +<indexterm><primary>SysGetpgrp</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGetpgrp</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGetpgrp()------------------------------------------------>< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Gets the current numerical process group id.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<para>None</para>para> +<para>Returns the current numerical process group id.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* get the current process group id */ + +mypgrp = SysGetpgrp() + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGetpid.sgml =================================================================== --- incubator/nixclib/docs/SysGetpid.sgml (rev 0) +++ incubator/nixclib/docs/SysGetpid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,28 @@ + +<section id="utlSysGettid"><title>SysGettid (Unix only)</title> +<indexterm><primary>SysGettid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGettid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGettid()------------------------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Gets the current thread id.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<para>None</para>para> +<para>Returns the current numerical thread id.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* get the current thread id */ + +mytid = SysGettid() + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGetppid.sgml =================================================================== --- incubator/nixclib/docs/SysGetppid.sgml (rev 0) +++ incubator/nixclib/docs/SysGetppid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,28 @@ + +<section id="utlSysGetppid"><title>SysGetppid (Unix only)</title> +<indexterm><primary>SysGetppid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGetppid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGetppid()------------------------------------------------>< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Gets the parent process id of the current process.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<para>None</para>para> +<para>Returns the current parent process id.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* get the parent process id */ + +myppid = SysGetppid() + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGetpwnam.sgml =================================================================== --- incubator/nixclib/docs/SysGetpwnam.sgml (rev 0) +++ incubator/nixclib/docs/SysGetpwnam.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,66 @@ + +<section id="utlSysGetpwnam"><title>SysGetpwnam (Unix only)</title> +<indexterm><primary>SysGetpwnam</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGetpwnam</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGetpwnam(username, option)------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Returns information about a user.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">username</emphasis></term> +<listitem><para>The user name. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">option</emphasis></term> +<listitem><para>An option specifying the information to return. +The values are all case insensitive and only the first letter of the option value is checked. +Allowed values are: +<variablelist> +<varlistentry><term>"NAME"</term> +<listitem><para>The user name. +</para></listitem></varlistentry> +<varlistentry><term>"USER"</term> +<listitem><para>The numerical user id. +</para></listitem></varlistentry> +<varlistentry><term>"GROUP"</term> +<listitem><para>The numerical group id of the user. +</para></listitem></varlistentry> +<varlistentry><term>"REALNAME"</term> +<listitem><para>The user's full (real) name. +</para></listitem></varlistentry> +<varlistentry><term>"DIRECTORY"</term> +<listitem><para>The user's home directory. +</para></listitem></varlistentry> +<varlistentry><term>"SHELL"</term> +<listitem><para>The user's default shell. +</para></listitem></varlistentry> +<varlistentry><term>"PASSWORD"</term> +<listitem><para>Always returns a zero-length string. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +</variablelist> +<para>Returns information specified by the <emphasis>option</emphasis>.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* the following examples came from a Linux laptop running Fedora 12 */ + +SysGetpwnam("dashley", "n") --> dashley +SysGetpwnam("dashley", "u") --> 500 +SysGetpwnam("dashley", "g") --> 500 +SysGetpwnam("dashley", "r") --> David Ashley +SysGetpwnam("dashley", "d") --> /home/dashley +SysGetpwnam("dashley", "s") --> bash +SysGetpwnam("dashley", "p") --> "" + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGetpwuid.sgml =================================================================== --- incubator/nixclib/docs/SysGetpwuid.sgml (rev 0) +++ incubator/nixclib/docs/SysGetpwuid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,66 @@ + +<section id="utlSysGetpwuid"><title>SysGetpwuid (Unix only)</title> +<indexterm><primary>SysGetpwuid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGetpwuid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGetpwuid(uid, option)------------------------------------>< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Returns information about a user.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">uid</emphasis></term> +<listitem><para>The numerical user id. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">option</emphasis></term> +<listitem><para>An option specifying the information to return. +The values are all case insensitive and only the first letter of the option value is checked. +Allowed values are: +<variablelist> +<varlistentry><term>"NAME"</term> +<listitem><para>The user name. +</para></listitem></varlistentry> +<varlistentry><term>"USER"</term> +<listitem><para>The numerical user id. +</para></listitem></varlistentry> +<varlistentry><term>"GROUP"</term> +<listitem><para>The numerical group id of the user. +</para></listitem></varlistentry> +<varlistentry><term>"REALNAME"</term> +<listitem><para>The user's full (real) name. +</para></listitem></varlistentry> +<varlistentry><term>"DIRECTORY"</term> +<listitem><para>The user's home directory. +</para></listitem></varlistentry> +<varlistentry><term>"SHELL"</term> +<listitem><para>The user's default shell. +</para></listitem></varlistentry> +<varlistentry><term>"PASSWORD"</term> +<listitem><para>Always returns a zero-length string. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +</variablelist> +<para>Returns information specified by the <emphasis>option</emphasis>.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* the following examples came from a Linux laptop running Fedora 12 */ + +SysGetpwuid(500, "n") --> dashley +SysGetpwuid(500, "u") --> 500 +SysGetpwuid(500, "g") --> 500 +SysGetpwuid(500, "r") --> David Ashley +SysGetpwuid(500, "d") --> /home/dashley +SysGetpwuid(500, "s") --> bash +SysGetpwuid(500, "p") --> "" + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGetservbyname.sgml =================================================================== --- incubator/nixclib/docs/SysGetservbyname.sgml (rev 0) +++ incubator/nixclib/docs/SysGetservbyname.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,52 @@ + +<section id="utlSysGetservbyname"><title>SysGetservbyname (Unix only)</title> +<indexterm><primary>SysGetservbyname</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGetservbyname</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGetservbyname(name, proto, option)----------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Returns information about a service.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">name</emphasis></term> +<listitem><para>The service name. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">proto</emphasis></term> +<listitem><para>The protocol name, usually TCP or UDP. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">option</emphasis></term> +<listitem><para>An option specifying the information to return. +The values are all case insensitive and only the first letter of the option value is checked. +Allowed values are: +<variablelist> +<varlistentry><term>"NAME"</term> +<listitem><para>The service name. +</para></listitem></varlistentry> +<varlistentry><term>"PORT"</term> +<listitem><para>The service port number. +</para></listitem></varlistentry> +<varlistentry><term>"Aliases"</term> +<listitem><para>The services alias names are returned in an array. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +</variablelist> +<para>Returns information specified by the <emphasis>option</emphasis>.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* the following examples came from a Linux laptop running Fedora 12 */ + +SysGetservbyname("HTTP", "TCP", "n") --> HTTP +SysGetservbyname("HTTP", "TCP", "p") --> 80 + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGetservbyport.sgml =================================================================== --- incubator/nixclib/docs/SysGetservbyport.sgml (rev 0) +++ incubator/nixclib/docs/SysGetservbyport.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,52 @@ + +<section id="utlSysGetservbyport"><title>SysGetservbyport (Unix only)</title> +<indexterm><primary>SysGetservbyport</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGetservbyport</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGetservbyport(port, proto, option)----------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Returns information about a service.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">port</emphasis></term> +<listitem><para>The service port number. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">proto</emphasis></term> +<listitem><para>The protocol name, usually TCP or UDP. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">option</emphasis></term> +<listitem><para>An option specifying the information to return. +The values are all case insensitive and only the first letter of the option value is checked. +Allowed values are: +<variablelist> +<varlistentry><term>"NAME"</term> +<listitem><para>The service name. +</para></listitem></varlistentry> +<varlistentry><term>"PORT"</term> +<listitem><para>The service port number. +</para></listitem></varlistentry> +<varlistentry><term>"Aliases"</term> +<listitem><para>The services alias names are returned in an array. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +</variablelist> +<para>Returns information specified by the <emphasis>option</emphasis>.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* the following examples came from a Linux laptop running Fedora 12 */ + +SysGetservbyport(80, "TCP", "n") --> HTTP +SysGetservbyport(80, "TCP", "p") --> 80 + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGetsid.sgml =================================================================== --- incubator/nixclib/docs/SysGetsid.sgml (rev 0) +++ incubator/nixclib/docs/SysGetsid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,28 @@ + +<section id="utlSysGetsid"><title>SysGetsid (Unix only)</title> +<indexterm><primary>SysGetsid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGetsid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGetsid()------------------------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Gets the current session id.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<para>None</para>para> +<para>Returns the current sid or -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* get the session id */ + +mysid = SysGetsid() + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGetuid.sgml =================================================================== --- incubator/nixclib/docs/SysGetuid.sgml (rev 0) +++ incubator/nixclib/docs/SysGetuid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,28 @@ + +<section id="utlSysGetuid"><title>SysGetuid (Unix only)</title> +<indexterm><primary>SysGetuid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGetuid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGetuid()------------------------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Gets the current numerical user id.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<para>None</para>para> +<para>Returns the current numerical user id.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* get the current user id */ + +myuid = SysGetuid() + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysGetxattr.sgml =================================================================== --- incubator/nixclib/docs/SysGetxattr.sgml (rev 0) +++ incubator/nixclib/docs/SysGetxattr.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,35 @@ + +<section id="utlSysGetxattr"><title>SysGetxattr (Unix only, not available in AIX)</title> +<indexterm><primary>SysGetxattr</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysGetxattr</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysGetxattr(fname, xname)----------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Gets an extended attribute from the specified file.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">fname</emphasis></term> +<listitem><para>The file name. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">xname</emphasis></term> +<listitem><para>The extended attribute name. +</para></listitem></varlistentry> +</variablelist> +<para>Returns the extended attribute value on success or a zero-length string on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* get an extended attribute */ + +mimetype = SysGetxattr('/home/dashley/example.txt', 'mimetype') + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysLink.sgml =================================================================== --- incubator/nixclib/docs/SysLink.sgml (rev 0) +++ incubator/nixclib/docs/SysLink.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,35 @@ + +<section id="utlSysLink"><title>SysLink (Unix only)</title> +<indexterm><primary>SysLink</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysLink</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysLink(srcpath, targetpath)-------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Create a symbolic (hard) link.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">srcpath</emphasis></term> +<listitem><para>The path/filename of the source file. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">targetpath</emphasis></term> +<listitem><para>The new path/filname that will become the hard link. +</para></listitem></varlistentry> +</variablelist> +<para>Returns zero on success and -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* create a new link */ + +call SysLink "/pub", "/home/username/myownpublink" + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysListxattr.sgml =================================================================== --- incubator/nixclib/docs/SysListxattr.sgml (rev 0) +++ incubator/nixclib/docs/SysListxattr.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,35 @@ + +<section id="utlSysGetxattr"><title>SysListxattr (Unix only, not available in AIX)</title> +<indexterm><primary>SysListxattr</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysListxattr</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysListxattr(fname)----------------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Returns an array of the extended attribut names from the specified file.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">fname</emphasis></term> +<listitem><para>The file name. +</para></listitem></varlistentry> +</variablelist> +<para>Returns an array of the extended attribute names on success. The array will be empty on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* list the extended attribute names */ + +names = SysListxattr('/home/dashley/example.txt') +do name over names + say name +end + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysRemovexattr.sgml =================================================================== --- incubator/nixclib/docs/SysRemovexattr.sgml (rev 0) +++ incubator/nixclib/docs/SysRemovexattr.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,35 @@ + +<section id="utlSysRemovexattr"><title>SysRemovexattr (Unix only, not available in AIX)</title> +<indexterm><primary>SysRemovexattr</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysRemovexattr</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysRemovexattr(fname, xname)-------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Removes an extended attribute from the specified file.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">fname</emphasis></term> +<listitem><para>The file name. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">xname</emphasis></term> +<listitem><para>The extended attribute name. +</para></listitem></varlistentry> +</variablelist> +<para>Returns 0 on success or -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* remove an extended attribute */ + +retc = SysRemovexattr('/home/dashley/example.txt', 'mimetype') + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysSetegid.sgml =================================================================== --- incubator/nixclib/docs/SysSetegid.sgml (rev 0) +++ incubator/nixclib/docs/SysSetegid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,32 @@ + +<section id="utlSysSetegid"><title>SysSetegid (Unix only)</title> +<indexterm><primary>SysSetegid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysSetegid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysSetegid(gid)--------------------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Set the numerical effective group id.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">gid</emphasis></term> +<listitem><para>The new numerical effective group id. +</para></listitem></varlistentry> +</variablelist> +<para>Returns zero on success or -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* set the effective group id to 520 */ + +call SysSetegid 520 + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysSeteuid.sgml =================================================================== --- incubator/nixclib/docs/SysSeteuid.sgml (rev 0) +++ incubator/nixclib/docs/SysSeteuid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,32 @@ + +<section id="utlSysSeteuid"><title>SysSeteuid (Unix only)</title> +<indexterm><primary>SysSeteuid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysSeteuid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysSetuid(euid)--------------------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Set the numerical effective user id.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">uid</emphasis></term> +<listitem><para>The new numerical effective user id. +</para></listitem></varlistentry> +</variablelist> +<para>Returns zero on success or -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* set the effective user id to 520 */ + +call SysSeteuid 520 + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysSetgid.sgml =================================================================== --- incubator/nixclib/docs/SysSetgid.sgml (rev 0) +++ incubator/nixclib/docs/SysSetgid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,32 @@ + +<section id="utlSysSetgid"><title>SysSetgid (Unix only)</title> +<indexterm><primary>SysSetgid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysSetgid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysSetgid(gid)---------------------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Set the numerical group id.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">gid</emphasis></term> +<listitem><para>The new numerical group id. +</para></listitem></varlistentry> +</variablelist> +<para>Returns zero on success or -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* set the group id to 520 */ + +call SysSetgid 520 + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysSetpgid.sgml =================================================================== --- incubator/nixclib/docs/SysSetpgid.sgml (rev 0) +++ incubator/nixclib/docs/SysSetpgid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,35 @@ + +<section id="utlSysSetpgid"><title>SysSetpgid (Unix only)</title> +<indexterm><primary>SysSetpgid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysSetpgid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysSetpgid(pid, pgid)--------------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Set a numerical process id to use the specified process group id.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">pid</emphasis></term> +<listitem><para>The process id to modify. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">pgid</emphasis></term> +<listitem><para>The new process group id. +</para></listitem></varlistentry> +</variablelist> +<para>Returns zero on success and -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* set process group id */ + +call SysSetpgid 9321, 520 + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysSetpgrp.sgml =================================================================== --- incubator/nixclib/docs/SysSetpgrp.sgml (rev 0) +++ incubator/nixclib/docs/SysSetpgrp.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,28 @@ + +<section id="utlSysSetpgrp"><title>SysSetpgrp (Unix only)</title> +<indexterm><primary>SysSetpgrp</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysSetpgrp</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysSetpgrp()------------------------------------------------>< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Sets the current numerical process usr id to zero and the group id to zero.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<para>None</para>para> +<para>Returns zero on success and -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* set the current process group id */ + +call SysSetpgrp + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysSetsid.sgml =================================================================== --- incubator/nixclib/docs/SysSetsid.sgml (rev 0) +++ incubator/nixclib/docs/SysSetsid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,32 @@ + +<section id="utlSysSetsid"><title>SysSetsid (Unix only)</title> +<indexterm><primary>SysSetsid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysSetsid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysSetsid(sid)---------------------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Set the session id.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">sid</emphasis></term> +<listitem><para>Thenew numeric session id. +</para></listitem></varlistentry> +</variablelist> +<para>Returns the new sid or -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* set the session id to zero */ + +call SysSetsid 0 + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysSetuid.sgml =================================================================== --- incubator/nixclib/docs/SysSetuid.sgml (rev 0) +++ incubator/nixclib/docs/SysSetuid.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,32 @@ + +<section id="utlSysSetuid"><title>SysSetuid (Unix only)</title> +<indexterm><primary>SysSetuid</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysSetuid</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysSetuid(uid)---------------------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Set the numerical user id.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">uid</emphasis></term> +<listitem><para>The new numerical user id. +</para></listitem></varlistentry> +</variablelist> +<para>Returns zero on success or -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* set the user id to 520 */ + +call SysSetuid 520 + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysSetxattr.sgml =================================================================== --- incubator/nixclib/docs/SysSetxattr.sgml (rev 0) +++ incubator/nixclib/docs/SysSetxattr.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,38 @@ + +<section id="utlSysSetxattr"><title>SysSetxattr (Unix only, not available in AIX)</title> +<indexterm><primary>SysSetxattr</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysSetxattr</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysSetxattr(fname, xname, val)------------------------------>< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Sets an extended attribute on the specified file.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">fname</emphasis></term> +<listitem><para>The file name. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">xname</emphasis></term> +<listitem><para>The extended attribute name. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">val</emphasis></term> +<listitem><para>The value to be set for the extended attribute. +</para></listitem></varlistentry> +</variablelist> +<para>Returns the 0 on success or -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* set an extended attribute */ + +retc = SysSetxattr('/home/dashley/example.txt', 'mimetype', 'text/plain') + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysSignal.sgml =================================================================== --- incubator/nixclib/docs/SysSignal.sgml (rev 0) +++ incubator/nixclib/docs/SysSignal.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,87 @@ + +<section id="utlSysSignal"><title>SysSignal (Unix only)</title> +<indexterm><primary>SysSignal</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysSignal</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysSignal(signum, option)----------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Sets the disposition of a signal to either SIG_IGN (ignore) or SIG_DFL (default).</para> +<note><title>Note</title><para>You should be VERY carefull when calling this function as it can +cause problems with the Rexx interpreter. If you don't know what you are doing then you +should not call this function.</para> +</note> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">signum</emphasis></term> +<listitem><para>The signal number to change. This is an integer and cooresponds to the +setof system signal numbers. The following is a list of valid values: +<programlisting> +SIGHUP 1 Hangup (POSIX) +SIGINT 2 Terminal interrupt (ANSI) +SIGQUIT 3 Terminal quit (POSIX) +SIGILL 4 Illegal instruction (ANSI) +SIGTRAP 5 Trace trap (POSIX) +SIGIOT 6 IOT Trap (4.2 BSD) +SIGBUS 7 BUS error (4.2 BSD) +SIGFPE 8 Floating point exception (ANSI) +SIGKILL 9 Kill(can't be caught or ignored) (POSIX) +SIGUSR1 10 User defined signal 1 (POSIX) +SIGSEGV 11 Invalid memory segment access (ANSI) +SIGUSR2 12 User defined signal 2 (POSIX) +SIGPIPE 13 Write on a pipe with no reader, Broken pipe (POSIX) +SIGALRM 14 Alarm clock (POSIX) +SIGTERM 15 Termination (ANSI) +SIGSTKFLT 16 Stack fault +SIGCHLD 17 Child process has stopped or exited, changed (POSIX) +SIGCONT 18 Continue executing, if stopped (POSIX) +SIGSTOP 19 Stop executing(can't be caught or ignored) (POSIX) +SIGTSTP 20 Terminal stop signal (POSIX) +SIGTTIN 21 Background process trying to read, from TTY (POSIX) +SIGTTOU 22 Background process trying to write, to TTY (POSIX) +SIGURG 23 Urgent condition on socket (4.2 BSD) +SIGXCPU 24 CPU limit exceeded (4.2 BSD) +SIGXFSZ 25 File size limit exceeded (4.2 BSD) +SIGVTALRM 26 Virtual alarm clock (4.2 BSD) +SIGPROF 27 Profiling alarm clock (4.2 BSD) +SIGWINCH 28 Window size change (4.3 BSD, Sun) +SIGIO 29 I/O now possible (4.2 BSD) +SIGPWR 30 Power failure restart (System V) +</programlisting> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">opt</emphasis></term> +<listitem><para>An option specifying the signal action. +The values are all case insensitive and only the first letter of the option value is checked. +Allowed values are: +<variablelist> +<varlistentry><term>"DEFAULT"</term> +<listitem><para>The default action is to be set. +</para></listitem></varlistentry> +<varlistentry><term>"IGNORE"</term> +<listitem><para>Ignore this signal. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +</variablelist> +<para>Returns previous signal value. This is meaningless to the Rexx programmer.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* Cause alarm signals to be ignored */ +call SysSignal 14, "ignore" + +/* Cause terminal interrupts to take the default action */ +call SysSignal 2, "default" + +/* Cause HUPs to be ignored */ +call SysSignal 1, "I" + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysStat.sgml =================================================================== --- incubator/nixclib/docs/SysStat.sgml (rev 0) +++ incubator/nixclib/docs/SysStat.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,77 @@ + +<section id="utlSysStat"><title>SysStat (Unix only)</title> +<indexterm><primary>SysStat</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysStat</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysStat(file, option)--------------------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Returns information about a file.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">file</emphasis></term> +<listitem><para>The path/file name. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">option</emphasis></term> +<listitem><para>An option specifying the information to return. +The values are all case insensitive and only the first letter of the option value is checked. +Allowed values are: +<variablelist> +<varlistentry><term>"DEVICE"</term> +<listitem><para>The file's owning device id. +</para></listitem></varlistentry> +<varlistentry><term>"INODE"</term> +<listitem><para>The inode number. +</para></listitem></varlistentry> +<varlistentry><term>"PERMISSIONS"</term> +<listitem><para>The permissions in a 10 character string similar to that produced by the +shell command "ls -l". +</para></listitem></varlistentry> +<varlistentry><term>"NUMBERLINKS"</term> +<listitem><para>The number of links to the file. +</para></listitem></varlistentry> +<varlistentry><term>"UID"</term> +<listitem><para>The file's owner numerical user id. +</para></listitem></varlistentry> +<varlistentry><term>"GID"</term> +<listitem><para>The file's numerical group id. +</para></listitem></varlistentry> +<varlistentry><term>"REALDEV"</term> +<listitem><para>The file's real device id (if any). +</para></listitem></varlistentry> +<varlistentry><term>"SIZE"</term> +<listitem><para>The file's size in bytes. +</para></listitem></varlistentry> +<varlistentry><term>"ACCESS"</term> +<listitem><para>The file's last access timestamp in the form YYYY-MM-DD HH:MM:SS. +</para></listitem></varlistentry> +<varlistentry><term>"MODIFIED"</term> +<listitem><para>The file's last modified timestamp in the form YYYY-MM-DD HH:MM:SS. +</para></listitem></varlistentry> +<varlistentry><term>"CHANGED"</term> +<listitem><para>The file's last changed timestamp in the form YYYY-MM-DD HH:MM:SS. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +</variablelist> +<para>Returns information specified by the <emphasis>option</emphasis>.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* the following examples came from a Linux laptop running Fedora 12 */ + +SysStat("/home/dashley/temp.txt", "n") --> 1 +SysStat("/home/dashley/temp.txt", "u") --> 500 +SysStat("/home/dashley/temp.txt", "g") --> 500 +SysStat("/home/dashley/temp.txt", "s") --> 427 +SysStat("/home/dashley/temp.txt", "a") --> 2009-12-02 13:22:16 + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysSymlink.sgml =================================================================== --- incubator/nixclib/docs/SysSymlink.sgml (rev 0) +++ incubator/nixclib/docs/SysSymlink.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,35 @@ + +<section id="utlSysSymlink"><title>SysSymlink (Unix only)</title> +<indexterm><primary>SysSymlink</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysSymlink</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysSymlink(srcpath, targetpath)----------------------------->< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Create a symbolic (soft) link.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">srcpath</emphasis></term> +<listitem><para>The path/filename of the source file. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="italic">targetpath</emphasis></term> +<listitem><para>The new path/filname that will become the soft link. +</para></listitem></varlistentry> +</variablelist> +<para>Returns zero on success and -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* create a new symlink */ + +call SysSymlink "/pub", "/home/username/myownpublink" + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysUmask.sgml =================================================================== --- incubator/nixclib/docs/SysUmask.sgml (rev 0) +++ incubator/nixclib/docs/SysUmask.sgml 2010-05-10 13:34:54 UTC (rev 5931) @@ -0,0 +1,32 @@ + +<section id="utlSysSetumask"><title>SysSetumask (Unix only)</title> +<indexterm><primary>SysSetumask</primary></indexterm> +<indexterm><primary>rexxutil functions</primary> +<secondary>SysSetumask</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-SysSetumask(umask)------------------------------------------>< +]]> +</programlisting> + +<para><emphasis role="bold">Returns</emphasis></para> +<para>Set the umask.</para> +<para><emphasis role="bold">Parameter:</emphasis></para> +<variablelist> +<varlistentry><term><emphasis role="italic">umask</emphasis></term> +<listitem><para>The new umask. This MUST be a decimal number (not octal). +</para></listitem></varlistentry> +</variablelist> +<para>Returns zero on success or -1 on an error.</para> +<para><emphasis role="bold">Example:</emphasis></para> +<programlisting> +<![CDATA[ + +/* set the umask */ + +call SysSetumask 2 + +]]> +</programlisting> +</section> + Added: incubator/nixclib/docs/SysUname.sgml ==================... [truncated message content] |