a1c5881995-08-09Fredrik Hübinette (Hubbe) <?xml version='1.0' encoding='utf-8'?> <autodoc>
431c431998-12-31Fredrik Hübinette (Hubbe) <namespace name='predef'> <docgroup homogen-name='_do_call_outs' homogen-type='method'> <method name='_do_call_outs'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>_do_call_outs</tt> - do all pending call_outs.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>void _do_call_out();<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><dl><group><text>This function runs all pending call_outs that should have been<br/> run if pike returned to the backend. It should not be used in<br/> normal operation.<br/> </text></group></dl> </p> <p>As a side-effect, this function sets the value returned by time(1) to the current time.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text> <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::call_out' to='call_out'>call_out</ref>, <ref resolved='predef::remove_call_out' to='remove_call_out'>remove_call_out</ref>, <ref resolved='predef::call_out_info' to='call_out_info'>call_out_info</ref> and <ref to='time'>time</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='acos' homogen-type='method'> <method name='acos'/><doc placeholder='true'>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>acos</tt> - Trigonometrical inverse cosine</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>float acos(float <i>f</i>);<br/>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Return the arcus cosinus value for f.</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) float</text>
c3eeb11996-12-15Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::cos' to='predef::cos'>math/cos</ref> and <ref resolved='predef::asin' to='predef::asin'>math/asin</ref></p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='asin' homogen-type='method'> <method name='asin'/><doc placeholder='true'>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>asin</tt> - Trigonometrical inverse sine</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>float asin(float <i>f</i>);<br/>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Return the arcus sinus value for f.</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) float</text>
c3eeb11996-12-15Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::sin' to='predef::sin'>math/sin</ref> and <ref resolved='predef::acos' to='predef::acos'>math/acos</ref></p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='atan' homogen-type='method'> <method name='atan'/><doc placeholder='true'>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>atan</tt> - Trigonometrical inverse tangent</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>float atan(float <i>f</i>);<br/> </p> </tt> <p>Return the arcus tangent value for f.</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) float</text>
c3eeb11996-12-15Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::tan' to='predef::tan'>math/tan</ref>, <ref resolved='predef::asin' to='predef::asin'>math/asin</ref> and <ref resolved='predef::acos' to='predef::acos'>math/acos</ref></p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </text></group>
6559661996-11-06Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='call_out' homogen-type='method'> <method name='call_out'/><doc placeholder='true'>
6559661996-11-06Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>call_out</tt> - make a delayed call to a function</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>mixed call_out(function <i>f</i>, int <i>delay</i>, mixed ... <i>args</i>);<br/>
6559661996-11-06Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Call_out places a call to the function f with the argument args in a queue to be called in about delay seconds. The return value identifies this call out. The return value can be sent to find_call_out or remove_call_out to remove the call out again.</p> </text>
6559661996-11-06Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::remove_call_out' to='remove_call_out'>remove_call_out</ref>, <ref resolved='predef::find_call_out' to='find_call_out'>find_call_out</ref> and <ref resolved='predef::call_out_info' to='call_out_info'>call_out_info</ref></p>
6559661996-11-06Fredrik Hübinette (Hubbe) </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='call_out_info' homogen-type='method'> <method name='call_out_info'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>call_out_info</tt> - get info about all call outs</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>mixed **call_out_info();<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function returns an array with one entry for each entry in the call out queue. The first in the queue will be in index 0. Each index contains an array that looks like this: </p> <p>({<br/> <dl><group><text><matrix> <r><c> time_left, </c><c> /* an int */ </c></r> <r><c> caller, </c><c> /* the object that made the call out */ </c></r> <r><c> function, </c><c> /* the function to be called */ </c></r> <r><c> arg1, </c><c> /* the first argument, if any */ </c></r> <r><c> arg2, </c><c> /* the second argument, if any */ </c></r> <r><c> ... </c><c> /* and so on... */ </c></r> </matrix> </text></group></dl>})<br/> </p> </text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::call_out' to='call_out'>call_out</ref>, <ref resolved='predef::find_call_out' to='find_call_out'>find_call_out</ref> and <ref resolved='predef::remove_call_out' to='remove_call_out'>remove_call_out</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group>
6559661996-11-06Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='cd' homogen-type='method'> <method name='cd'/><doc placeholder='true'>
6559661996-11-06Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>cd</tt> - change directory</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int cd(string <i>s</i>);<br/>
6559661996-11-06Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Change the current directory for the whole Pike process, return 1 for success, 0 otherwise.</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) file</text>
6559661996-11-06Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::getcwd' to='predef::getcwd'>files/getcwd</ref></p>
6559661996-11-06Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='ceil' homogen-type='method'> <method name='ceil'/><doc placeholder='true'>
6559661996-11-06Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>ceil</tt> - Truncate a number upward</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>float ceil(float <i>f</i>);<br/>
6559661996-11-06Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Return the closest integral value higher or equal to x. Note that ceil() does _not_ return an int, merely an integral value.</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) float</text>
6559661996-11-06Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::floor' to='predef::floor'>math/floor</ref></p>
6559661996-11-06Fredrik Hübinette (Hubbe) </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='chroot' homogen-type='method'> <method name='chroot'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>chroot</tt> - change the root directory</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int chroot(string <i>newroot</i>);<br/> or<br/> int chroot(object(File) <i>obj</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Changes the root directory for this process to the indicated directory.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text> <group><note/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Since this function modifies the directory structure as seen from Pike, you have to modify the environment variables PIKE_MODULE_PATH and PIKE_INCLUDE_PATH to compensate for the new root-directory.
6130721996-11-01Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function only exists on systems that have the chroot(2) system call. The second variant only works on systems that also have the fchroot(2) system call.
6130721996-11-01Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='cos' homogen-type='method'> <method name='cos'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>cos</tt> - Trigonometrical cosine</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>float cos(float <i>f</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Return the cosinus value for f.</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) float</text>
6559661996-11-06Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::acos' to='predef::acos'>math/acos</ref> and <ref resolved='predef::sin' to='predef::sin'>math/sin</ref></p>
6559661996-11-06Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='errno' homogen-type='method'> <method name='errno'/><doc placeholder='true'>
6559661996-11-06Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>errno</tt> - return system error number</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int errno();<br/>
6559661996-11-06Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function returns the system error from the last file operation. Note that you should normally use the function errno in the file object instead.</p> </text>
6559661996-11-06Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='file/errno'>file/errno</ref></p>
6559661996-11-06Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='exece' homogen-type='method'> <method name='exece'/><doc placeholder='true'>
6559661996-11-06Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>exece</tt> - execute a program</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int exece(string <i>file</i>, string *<i>args</i>);<br/> or<br/> int exece(string <i>file</i>, string *<i>args</i>, mapping(string:string) <i>env</i>);<br/>
6559661996-11-06Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function transforms the Pike process into a process running the program specified in the argument 'file' with the argument 'args'. If the mapping 'env' is present, it will completely replace all environment variables before the new program is executed. This function only returns if something went wrong during exece(), and in that case it returns zero.</p>
6559661996-11-06Fredrik Hübinette (Hubbe) </text> <group><note/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>The Pike driver _dies_ when this function is called. You must use fork() if you wish to execute a program and still run the Pike driver.</p> </text></group>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><example/><text> <tt><p>exece("/bin/ls", ({"-l"}));<br/> exece("/bin/sh", ({"-c", "echo $HOME"}), (["HOME":"/not/home"]));<br/> </p> </tt></text></group>
6559661996-11-06Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::fork' to='predef::fork'>files/fork</ref> and <ref to='file-&gt;pipe'>&gt;file-&gt;pipe</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group>
6559661996-11-06Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='exp' homogen-type='method'> <method name='exp'/><doc placeholder='true'>
6559661996-11-06Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>exp</tt> - Natural exponent</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>float exp(float <i>f</i>);<br/>
6559661996-11-06Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Return the natural exponent of f. log( exp( x ) ) == x as long as exp(x) doesn't overflow an int.</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) float</text>
6559661996-11-06Fredrik Hübinette (Hubbe) 
6130721996-11-01Fredrik Hübinette (Hubbe) <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::pow' to='predef::pow'>math/pow</ref> and <ref resolved='predef::log' to='predef::log'>math/log</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='file_stat' homogen-type='method'> <method name='file_stat'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>file_stat</tt> - stat a file</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int *file_stat(string <i>file</i>);<br/> or<br/> int *file_stat(string <i>file</i>, <i>1</i>);<br/> or<br/> int *file-&gt;stat();<br/> </p> </tt> <p>file_stat returns an array of integers describing some properties<br/> about the file. Currently file_stat returns 7 entries:<br/> ({<br/> <dl><group><text><matrix> <r><c> mode, </c><c> /* file mode, protection bits etc. etc. */ </c></r> <r><c> size, </c><c> /* file size for regular files, -2 for dirs, -3 for links, -4 for otherwise */ </c></r> <r><c> atime, </c><c> /* last access time */ </c></r> <r><c> mtime, </c><c> /* last modify time */ </c></r> <r><c> ctime, </c><c> /* last status time change */ </c></r> <r><c> uid, </c><c> /* The user who owns this file */ </c></r> <r><c> gid </c><c> /* The group this file belongs to */ </c></r> </matrix> </text></group></dl>})<br/> If you give 1 as a second argument, file_stat does not follow links.<br/> You can never get -3 as size if you don't give a second argument.<br/> </p> <p>If there is no such file or directory, zero is returned.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) file</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::get_dir' to='predef::get_dir'>files/get_dir</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='filesystem_stat' homogen-type='method'> <method name='filesystem_stat'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>filesystem_stat</tt> - stat a filesystem <br/> <dl><group><text><br/> </text></group></dl>SYNTAX<br/> <dl><group><text>mapping(string:atring|int) filesystem_stat(string file);<br/> </text></group></dl></p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <p><dl><group><text>filesystem_stat returns a mapping describing some properties<br/> about the filesystem.<br/> Currently nine fields of the mapping are defined:<br/> </text></group></dl> </p> <p>([<br/> <dl><group><text>"blocksize":int, /* filesystem block size */<br/> <dl><group><text>"blocks":int, /* total # of blocks on file system<br/> <dl><group><text>* in units of blocksize */<br/> </text></group></dl>"bfree":int, /* total # of free blocks */<br/> "bavail":int, /* total # of free blocks<br/> <dl><group><text>* available to non-super-user */<br/> </text></group></dl>"files":int, /* total # of files */<br/> "ffree":int, /* total # of free files */<br/> "favail":int, /* total # of free files<br/> <dl><group><text>* available to non-super-user */<br/> </text></group></dl>"fstype":string /* target fs type name */<br/> "fsname":string /* target fs name */<br/> }) <br/> <br/> If there is no such file or directory, zero is returned.<br/> </text></group></dl></text></group></dl></p> </text>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><note/><text> <p>This function does not exist on all Operating Systems.
6130721996-11-01Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Depending on Operating System some of the above values may not<br/> be returned.<br/> <dl><group><text><br/> </text></group></dl>KEYWORDS<br/> <dl><group><text>file<br/> <dl><group><text><br/> </text></group></dl></text></group></dl>SEE ALSO<br/> <dl><group><text>files/file_stat<br/> <dl><group><text><br/> <br/> </text></group></dl></text></group></dl><br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='find_call_out' homogen-type='method'> <method name='find_call_out'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>find_call_out</tt> - find a call out in the queue</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int find_call_out(function <i>f</i>);<br/> or<br/> int find_call_out(mixed <i>id</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function searches the call out queue. If given a function as argument, it looks for the first call out scheduled to that function. The argument can also be a call out id as returned by call_out, in which case that call_out will be found. (Unless it has already been called.) find_call_out will then return how many seconds remains before that call will be executed. If no call is found, zero_type(find_call_out(f)) will return 1.</p> </text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::call_out' to='call_out'>call_out</ref>, <ref resolved='predef::remove_call_out' to='remove_call_out'>remove_call_out</ref> and <ref resolved='predef::call_out_info' to='call_out_info'>call_out_info</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group>
6559661996-11-06Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='floor' homogen-type='method'> <method name='floor'/><doc placeholder='true'>
6559661996-11-06Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>floor</tt> - Truncate a number downward</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>float floor(float <i>f</i>);<br/>
6559661996-11-06Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Return the closest integral value lower or equal to x. Note that floor() does _not_ return an int, merely an integral value.</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) float</text> <group><seealso/><text> <p><ref resolved='predef::ceil' to='predef::ceil'>math/ceil</ref></p> </text></group>
6559661996-11-06Fredrik Hübinette (Hubbe) 
6130721996-11-01Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='fork' homogen-type='method'> <method name='fork'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>fork</tt> - fork the process in two</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int fork();<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Fork splits the process in two, and for the parent it returns the pid of the child. Refer to your unix manual for further details.</p> </text>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><note/><text> <p>This function cause endless bugs if used without proper care.</p> </text></group>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><seealso/><text> <p><ref to='predef::exec'>files/exec</ref> and <ref to='file-&gt;pipe'>&gt;file-&gt;pipe</ref></p> </text></group>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
6559661996-11-06Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='get_dir' homogen-type='method'> <method name='get_dir'/><doc placeholder='true'>
6559661996-11-06Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>get_dir</tt> - read a directory</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>string *get_dir(string <i>dirname</i>);<br/>
6559661996-11-06Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Return an array of all filenames in the directory dir, or zero if no such directory exists.</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) file</text>
6559661996-11-06Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::mkdir' to='predef::mkdir'>files/mkdir</ref> and <ref resolved='predef::cd' to='predef::cd'>files/cd</ref></p>
6559661996-11-06Fredrik Hübinette (Hubbe) </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='getcwd' homogen-type='method'> <method name='getcwd'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>getcwd</tt> - return current working directory</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>string getcwd();<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>getcwd returns the current working directory.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) file</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::cd' to='predef::cd'>files/cd</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='getegid' homogen-type='method'> <method name='getegid'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>getegid</tt> - get the effective group ID</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int getegid();<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Get the effective group ID.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) Usersecurity</text>
c3eeb11996-12-15Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/getuid'>system/getuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/geteuid'>system/geteuid</ref> and <ref to='system/setegid'>system/setegid</ref></p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='geteuid' homogen-type='method'> <method name='geteuid'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>geteuid</tt> - get the effective user ID</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int geteuid();<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Get the effective user ID.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) Usersecurity</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/getuid'>system/getuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/setegid'>system/setegid</ref> and <ref to='system/getegid'>system/getegid</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='getgid' homogen-type='method'> <method name='getgid'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>getgid</tt> - get the group ID</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int getgid();<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Get the real group ID.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) Usersecurity</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/getuid'>system/getuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/geteuid'>system/geteuid</ref>, <ref to='system/setegid'>system/setegid</ref> and <ref to='system/getegid'>system/getegid</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='gethostbyaddr' homogen-type='method'> <method name='gethostbyaddr'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>gethostbyaddr</tt> - gets information about a host given it's address</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>array gethostbyaddr(string <i>addr</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Returns an array with information about the specified IP address. </p> <p>The returned array contains the same information as that returned by gethostbyname().</p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text> <group><note/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function only exists on systems that have the gethostbyaddr(2) or similar system call.</p> </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><seealso/><text> <p><ref resolved='predef::gethostbyname' to='gethostbyname'>gethostbyname</ref></p> </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='gethostbyname' homogen-type='method'> <method name='gethostbyname'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>gethostbyname</tt> - gets information about a host given it's name</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>array gethostbyname(string <i>hostname</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Returns an array with information about the specified host. </p> <p>The array contains three elements: </p> <p>The first element is the hostname. </p> <p>The second element is an array(string) of IP numbers for the host. </p> <p>The third element is an array(string) of aliases for the host.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text> <group><note/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function only exists on systems that have the gethostbyname(2) or similar system call.</p> </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><seealso/><text> <p><ref resolved='predef::gethostbyaddr' to='gethostbyaddr'>gethostbyaddr</ref></p> </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='gethostname' homogen-type='method'> <method name='gethostname'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>gethostname</tt> - get the name of this host</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>string gethostname();<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Returns a string with the name of the host.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text> <group><note/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function only exists on systems that have the gethostname(2) or uname(2) system calls. </p> </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='getpgrp' homogen-type='method'> <method name='getpgrp'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>getpgrp</tt> - get the process group ID</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int getpgrp();<br/> or<br/> int getpgrp(int <i>pid</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>With no argguments or with 'pid' equal to zero, returns the process group ID of this process. </p> <p>If 'pid' is specified, returns the process group ID of that process.</p> Processes</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='system/getpid'>system/getpid</ref> and <ref to='system/getppid'>system/getppid</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='getpid' homogen-type='method'> <method name='getpid'/><doc placeholder='true'>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>getpid</tt> - get the process ID</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int getpid();<br/>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Returns the process ID of this process.</p> Processes</text>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><seealso/><text> <p><ref to='system/getppid'>system/getppid</ref> and <ref to='system/getpgrp'>system/getpgrp</ref></p> </text></group>
c3eeb11996-12-15Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='getppid' homogen-type='method'> <method name='getppid'/><doc placeholder='true'>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>getppid</tt> - get the parent process ID</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int getppid();<br/>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Returns the process ID of the parent process.</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) Processes</text>
c3eeb11996-12-15Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='system/getpid'>system/getpid</ref> and <ref to='system/getpgrp'>system/getpgrp</ref></p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='getuid' homogen-type='method'> <method name='getuid'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>getuid</tt> - get the user ID</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int getuid();<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Get the real user ID.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) Usersecurity</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/geteuid'>system/geteuid</ref>, <ref to='system/setegid'>system/setegid</ref> and <ref to='system/getegid'>system/getegid</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='hardlink' homogen-type='method'> <method name='hardlink'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>hardlink</tt> - create a hardlink</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>void hardlink(string <i>from</i>, string <i>to</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Creates a hardlink named 'to' from the file 'from'.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) file</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='system/symlink'>system/symlink</ref>, <ref resolved='predef::mv' to='predef::mv'>files/mv</ref> and <ref resolved='predef::rm' to='predef::rm'>files/rm</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='initgroups' homogen-type='method'> <method name='initgroups'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>initgroups</tt> - initialize the group access list</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>void initgroups(string <i>username</i>, int <i>base_gid</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Initializes the group access list according to the system group database. 'base_gid' is also added to the group access list.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) Usersecurity</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/getuid'>system/getuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/geteuid'>system/geteuid</ref>, <ref to='system/setegid'>system/setegid</ref>, <ref to='system/getegid'>system/getegid</ref>, <ref to='system/getgroups'>system/getgroups</ref> and <ref to='system/setgroups'>system/setgroups</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='log' homogen-type='method'> <method name='log'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>log</tt> - Natural logarithm</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>float log(float <i>f</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Return the natural logarithm of f. exp( log(x) ) == x for x &gt; 0.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) float</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::pow' to='predef::pow'>math/pow</ref> and <ref resolved='predef::exp' to='predef::exp'>math/exp</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='mkdir' homogen-type='method'> <method name='mkdir'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>mkdir</tt> - make directory</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int mkdir(string <i>dirname</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Create a directory, return zero if it fails and nonzero if it fails.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) file</text>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><seealso/><text> <p><ref resolved='predef::rm' to='predef::rm'>files/rm</ref> and <ref resolved='predef::cd' to='predef::cd'>files/cd</ref></p> </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='mv' homogen-type='method'> <method name='mv'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>mv</tt> - move a file (may handle directiories as well)</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int mv(string <i>from</i>,string <i>to</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Rename or move a file between directories. If the destination file already exists, it will be overwritten. Returns 1 on sucess, 0 otherwise.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) file</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::rm' to='predef::rm'>files/rm</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='openlog' homogen-type='method'> <method name='openlog'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>openlog</tt> - initializes the connection to syslogd</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>void openlog(string <i>ident</i>, int <i>options</i>, <i>facility</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Initializes the connection to syslogd. </p> <p>The 'ident' argument specifies an identifier to tag all logentries with. </p> <p>'options' is a bitfield specifying the behaviour of the message logging. Valid options are: </p> <p><dl><group><text><matrix> <r><c> LOG_PID </c><c> Log the process ID with each message. </c></r> <r><c> LOG_CONS </c><c> Write messages to the console if they can't be sent to syslogd. </c></r> <r><c> LOG_NDELAY </c><c> Open the connection to syslogd now and not later. </c></r> <r><c> LOG_NOWAIT </c><c> Do not wait for subprocesses talking to syslogd. </c></r> </matrix> </text></group></dl> </p> <p>'facility' specifies what subsystem you want to log as. Valid facilities are: </p> <p><dl><group><text><matrix> <r><c> LOG_AUTH </c><c> Authorization subsystem </c></r> <r><c> LOG_AUTHPRIV </c></r> <r><c> LOG_CRON </c><c> Crontab subsystem </c></r> <r><c> LOG_DAEMON </c><c> System daemons </c></r> <r><c> LOG_KERN </c><c> Kernel subsystem (NOT USABLE) </c></r> <r><c> LOG_LOCAL </c><c> For local use </c></r> <r><c> LOG_LOCAL[1-7] </c><c> For local use </c></r> <r><c> LOG_LPR </c><c> Line printer spooling system </c></r> <r><c> LOG_MAIL </c><c> Mail subsystem </c></r> <r><c> LOG_NEWS </c><c> Network news subsystem </c></r> <r><c> LOG_SYSLOG </c></r> <r><c> LOG_USER </c></r> <r><c> LOG_UUCP </c><c> UUCP subsystem </c></r> </matrix> </text></group></dl></p> </text> <group><note/><text> <p>Only available on systems with syslog(3).
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) BUGS LOG_NOWAIT should probably always be specified.</p> </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='syslog'>syslog</ref>, <ref to='closelog'>closelog</ref> and <ref to='setlogmask'>setlogmask</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='pow' homogen-type='method'> <method name='pow'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>pow</tt> - Raise a number to the power of another.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>float pow(float <i>n</i>, float <i>x</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Return n raised to the power of x.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) float</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::exp' to='predef::exp'>math/exp</ref> and <ref resolved='predef::log' to='predef::log'>math/log</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='readlink' homogen-type='method'> <method name='readlink'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>readlink</tt> - read a symbolic link</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>string readlink(string <i>linkname</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Returns what the symbolic link 'linkname' points to.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) file</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='system/symlink'>system/symlink</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='remove_call_out' homogen-type='method'> <method name='remove_call_out'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>remove_call_out</tt> - remove a call out from the call out queue</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int remove_call_out(function <i>f</i>);<br/> or<br/> int remove_call_out(function <i>id</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function finds the first call to the function f in the call out queue and removes it. The time left to that call out will be returned. If no call out was found, zero_type(remove_call_out(f)) will return 1. You can also give a call out id as argument. (as returned by call_out)</p> </text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::call_out_info' to='call_out_info'>call_out_info</ref>, <ref resolved='predef::call_out' to='call_out'>call_out</ref> and <ref resolved='predef::find_call_out' to='find_call_out'>find_call_out</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='rm' homogen-type='method'> <method name='rm'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>rm</tt> - remove file or directory</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int rm(string <i>f</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Remove a file or directory, return 0 if it fails. Nonzero otherwise.</p> file</text>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><seealso/><text> <p><ref resolved='predef::mkdir' to='predef::mkdir'>files/mkdir</ref></p> </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='setegid' homogen-type='method'> <method name='setegid'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>setegid</tt> - set the effective group ID</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>void setegid(int <i>uid</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Sets the effective group ID to 'gid'.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) Usersecurity</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/getuid'>system/getuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/geteuid'>system/geteuid</ref> and <ref to='system/getegid'>system/getegid</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='seteuid' homogen-type='method'> <method name='seteuid'/><doc placeholder='true'>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>seteuid</tt> - set the effective user ID</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>void seteuid(int <i>uid</i>);<br/>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Sets the effective user ID to 'uid'.</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) Usersecurity</text>
c3eeb11996-12-15Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/getuid'>system/getuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/geteuid'>system/geteuid</ref>, <ref to='system/setegid'>system/setegid</ref> and <ref to='system/getegid'>system/getegid</ref></p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='setgid' homogen-type='method'> <method name='setgid'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>setgid</tt> - set the group ID</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>void setgid(int <i>gid</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Sets the real group ID, effective group ID and saved group ID to 'gid'.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) Usersecurity</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/getuid'>system/getuid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/geteuid'>system/geteuid</ref>, <ref to='system/setegid'>system/setegid</ref> and <ref to='system/getegid'>system/getegid</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='setuid' homogen-type='method'> <method name='setuid'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>setuid</tt> - set the user ID</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>void setuid(int <i>uid</i>);<br/>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Sets the real user ID, effective user ID and saved user ID to 'uid'.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) Usersecurity</text>
6130721996-11-01Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='system/getuid'>system/getuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/geteuid'>system/geteuid</ref>, <ref to='system/setegid'>system/setegid</ref> and <ref to='system/getegid'>system/getegid</ref></p>
6130721996-11-01Fredrik Hübinette (Hubbe) </text></group>
6be0031996-11-03Mirar (Pontus Hagland) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='sin' homogen-type='method'> <method name='sin'/><doc placeholder='true'>
6be0031996-11-03Mirar (Pontus Hagland) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>sin</tt> - Trigonometrical sine</p>
6be0031996-11-03Mirar (Pontus Hagland) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>float sin(float <i>f</i>);<br/>
6559661996-11-06Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Return the sinus value for f.</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) float</text>
6559661996-11-06Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::asin' to='predef::asin'>math/asin</ref> and <ref resolved='predef::cos' to='predef::cos'>math/cos</ref></p>
6559661996-11-06Fredrik Hübinette (Hubbe) </text></group>
6130721996-11-01Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='sprintf' homogen-type='method'> <method name='sprintf'/><doc placeholder='true'>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>sprintf</tt> - print the result from sprintf</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>string sprintf(string <i>format</i>,mixed <i>arg</i>,....);<br/> </p> </tt> <p>The format string is a string containing a description of how to output the data in the rest of the arguments. This string should generally speaking have one %&lt;modifiers&gt;&lt;operator&gt; (examples: %s, %0d, %-=20s) for each of the rest arguments. </p> <p>Modifiers: </p> <p><matrix> <r><c> 0 </c><c> Zero pad numbers (implies right justification) </c></r> <r><c> ! </c><c> Toggle truncation </c></r> <r><c> ' ' (space) </c><c> pad positive integers with a space </c></r> <r><c> + </c><c> pad positive integers with a plus sign </c></r> <r><c> - </c><c> left adjusted within field size (default is right) </c></r> <r><c> | </c><c> centered within field size </c></r> <r><c> = </c><c> column mode if strings are greater than field size </c></r> <r><c> / </c><c> Rough linebreak (break at exactly fieldsize instead of between words) </c></r> <r><c> # </c><c> table mode, print a list of '\n' separated word (top-to-bottom order) </c></r> <r><c> $ </c><c> Inverse table mode (left-to-right order) </c></r> <r><c> n </c><c> (where n is a number or *) a number specifies field size </c></r> <r><c> .n </c><c> set precision </c></r> <r><c> :n </c><c> set field size &amp; precision </c></r> <r><c> ;n </c><c> Set column width </c></r> <r><c> * </c><c> if n is a * then next argument is used for precision/field size </c></r> <r><c> 'X' </c><c> Set a pad string. ' cannot be a part of the pad_string (yet) </c></r> <r><c> ~ </c><c> Get pad string from argument list. </c></r> <r><c> &lt; </c><c> Use same arg again </c></r> <r><c> ^ </c><c> repeat this on every line produced </c></r> <r><c> @ </c><c> do this format for each entry in argument array </c></r> <r><c> &gt; </c><c> Put the string at the bottom end of column instead of top </c></r> <r><c> _ </c><c> Set width to the length of data </c></r> </matrix>
6130721996-11-01Fredrik Hübinette (Hubbe)  </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Operators:
6130721996-11-01Fredrik Hübinette (Hubbe) </p> <p><matrix>
431c431998-12-31Fredrik Hübinette (Hubbe) <r><c> %% </c><c> percent </c></r> <r><c> %d </c><c> signed decimal int </c></r> <r><c> %u </c><c> unsigned decimal int (doesn't really exist in Pike) </c></r> <r><c> %o </c><c> unsigned octal int </c></r> <r><c> %x </c><c> lowercase unsigned hexadecimal int </c></r> <r><c> %X </c><c> uppercase unsigned hexadecimal int </c></r> <r><c> %c </c><c> char (or short with %2c, %3c gives 3 bytes etc.) </c></r> <r><c> %f </c><c> float </c></r> <r><c> %g </c><c> heruistically chosen representation of float </c></r> <r><c> %e </c><c> exponential notation float </c></r> <r><c> %s </c><c> string </c></r> <r><c> %O </c><c> any type (debug style) </c></r> <r><c> %n </c><c> nop </c></r> <r><c> %t </c><c> type of argument </c></r> <r><c> %&lt;modifiers&gt;{format%} </c><c> do a format for every index in an array. </c></r>
6130721996-11-01Fredrik Hübinette (Hubbe) </matrix> </p> </text>
431c431998-12-31Fredrik Hübinette (Hubbe) <group><example/><text> <tt><p>Pike v0.1 Running Hilfe v1.2 (Incremental Pike Frontend)<br/> &gt; int screen_width=70;<br/> Result: 70<br/> &gt; mixed sample;<br/> &gt; write(sprintf("fish: %c\n", 65));<br/> fish: A<br/> Result: 0<br/> &gt; write(sprintf("Hello green friends\n"));<br/> Hello green friends<br/> Result: 0<br/> &gt; write(sprintf("num: %d\n", 10));<br/> num: 10<br/> Result: 0<br/> &gt; write(sprintf("num: %+10d\n", 10));<br/> num: +10<br/> Result: 0<br/> &gt; write(sprintf("num: %010d\n", 5*2));<br/> num: 0000000010<br/> Result: 0<br/> &gt; write(sprintf("num: %|10d\n", 20/2));<br/> num: 10 <br/> Result: 0<br/> &gt; write(sprintf("%|*s\n",screen_width,"THE NOT END"));<br/> <dl><group><text>THE NOT END <br/> </text></group></dl>Result: 0<br/> &gt; write(sprintf("%|=*s\n",screen_width, "fun with penguins\n"));<br/> <dl><group><text>fun with penguins <br/> </text></group></dl>Result: 0<br/> &gt; write(sprintf("%-=*O\n",screen_width,({ "fish", 9, "gumbies", 2 })));<br/> ({ /* 4 elements */ <br/> <dl><group><text>"fish", <br/> 9, <br/> "gumbies", <br/> 2 <br/> </text></group></dl>}) <br/> Result: 0<br/> &gt; write(sprintf("%-=*s\n", screen_width,<br/> <dl><group><text>"This will wordwrap the specified string within the "+<br/> "specified field size, this is useful say, if you let "+<br/> "users specify their screen size, then the room "+<br/> "descriptions will automagically word-wrap as appropriate.\n"+<br/> "slosh-n's will of course force a new-line when needed.\n"));<br/> </text></group></dl>This will wordwrap the specified string within the specified field <br/> size, this is useful say, if you let users specify their screen size, <br/> then the room descriptions will automagically word-wrap as <br/> appropriate. <br/> slosh-n's will of course force a new-line when needed. <br/> Result: 0<br/> &gt; write(sprintf("%-=*s %-=*s\n", screen_width/2,<br/> <dl><group><text>"Two columns next to each other (any number of columns will "+<br/> "of course work) independantly word-wrapped, can be useful.",<br/> screen_width/2-1,<br/> "The - is to specify justification, this is in addherence "+<br/> "to std sprintf which defaults to right-justification, "+<br/> "this version also supports centre and right justification."));<br/> </text></group></dl>Two columns next to each other (any The - is to specify justification,<br/> number of columns will of course this is in addherence to std <br/> work) independantly word-wrapped, sprintf which defaults to <br/> can be useful. right-justification, this version <br/> <dl><group><text>also supports centre and right <br/> justification. <br/> </text></group></dl>Result: 0<br/> &gt; write(sprintf("%-$*s\n", screen_width,<br/> <dl><group><text>"Given a\nlist of\nslosh-n\nseparated\n'words',\nthis option\n"+<br/> "creates a\ntable out\nof them\nthe number of\ncolumns\n"+<br/> "be forced\nby specifying a\npresision.\nThe most obvious\n"+<br/> "use is for\nformatted\nls output."));<br/> </text></group></dl>Given a list of slosh-n <br/> separated 'words', this option <br/> creates a table out of them <br/> the number of columns be forced <br/> by specifying a presision. The most obvious <br/> use is for formatted ls output. <br/> Result: 0<br/> &gt; write(sprintf("%-#*s\n", screen_width,<br/> <dl><group><text>"Given a\nlist of\nslosh-n\nseparated\n'words',\nthis option\n"+<br/> "creates a\ntable out\nof them\nthe number of\ncolumns\n"+<br/> "be forced\nby specifying a\npresision.\nThe most obvious\n"+<br/> "use is for\nformatted\nls output."));<br/> </text></group></dl>Given a creates a by specifying a <br/> list of table out presision. <br/> slosh-n of them The most obvious <br/> separated the number of use is for <br/> 'words', columns formatted <br/> this option be forced ls output. <br/> Result: 0<br/> &gt; sample = ({ "first column: bing", "second column: womble" });<br/> Result: ({ /* 2 elements */<br/> <dl><group><text>"first column: bing",<br/> "second column: womble"<br/> </text></group></dl>})<br/> &gt; write(sprintf("%-=*s\n%-=@*s\n", screen_width,<br/> <dl><group><text>"Another bizarre option is the @ operator, it applies the "+<br/> "format string it is in to each element of the array:",<br/> screen_width/sizeof(sample),<br/> sample));<br/> </text></group></dl>Another bizarre option is the @ operator, it applies the format string<br/> it is in to each element of the array: <br/> first column: bing second column: womble <br/> Result: 0<br/> &gt; write(sprintf("Better use these instead: %{gurksallad: %s\n%}\n",<br/> <dl><group><text>sample));<br/> </text></group></dl>Better use these instead: gurksallad: first column: bing<br/> gurksallad: second column: womble<br/> <br/> Result: 0<br/> &gt; write(sprintf("Of course all the simple printf options "+<br/> <dl><group><text>"are supported:\n %s: %d %x %o %c\n",<br/> "65 as decimal, hex, octal and a char",<br/> 65, 65, 65, 65));<br/> </text></group></dl>Of course all the simple printf options are supported:<br/> <dl><group><text>65 as decimal, hex, octal and a char: 65 41 101 A<br/> </text></group></dl>Result: 0<br/> &gt; write(sprintf("%|*s\n",screen_width, "THE END"));<br/> <dl><group><text>THE END <br/> </text></group></dl>Result: 0<br/> &gt; quit<br/> Exiting.<br/>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) string</text></group>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><seealso/><text> <p><ref to='sscanf'>sscanf</ref></p> </text></group>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
6559661996-11-06Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='sqrt' homogen-type='method'> <method name='sqrt'/><doc placeholder='true'>
6559661996-11-06Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>sqrt</tt> - Square root</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>float sqrt(float <i>f</i>);<br/> or<br/> int sqrt(int <i>i</i>);<br/>
6559661996-11-06Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Return the square root of f, or in the second case, the square root truncated to the closest lower integer.</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) float and int</text>
6559661996-11-06Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::pow' to='predef::pow'>math/pow</ref>, <ref resolved='predef::log' to='predef::log'>math/log</ref>, <ref resolved='predef::exp' to='predef::exp'>math/exp</ref> and <ref resolved='predef::floor' to='predef::floor'>math/floor</ref></p>
6559661996-11-06Fredrik Hübinette (Hubbe) </text></group>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='strerror' homogen-type='method'> <method name='strerror'/><doc placeholder='true'>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>strerror</tt> - return a string describing an error</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>string strerror(int <i>errno</i>);<br/>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function returns a description of an error code. The error code is usually obtained from the file-&gt;errno() call.</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) file</text>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><note/><text> <p>This function may not be available on all platforms. </p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </text></group>
6559661996-11-06Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='symlink' homogen-type='method'> <method name='symlink'/><doc placeholder='true'>
6559661996-11-06Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>symlink</tt> - create a symbolic link</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>void symlink(string <i>from</i>, string <i>to</i>);<br/>
6559661996-11-06Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Creates a symbolic link named 'to' pointing to 'from'.</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) file</text>
6559661996-11-06Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='system/hardlink'>system/hardlink</ref>, <ref to='system/readlink'>system/readlink</ref>, <ref resolved='predef::mv' to='predef::mv'>files/mv</ref> and <ref resolved='predef::rm' to='predef::rm'>files/rm</ref></p>
6559661996-11-06Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='tan' homogen-type='method'> <method name='tan'/><doc placeholder='true'>
6559661996-11-06Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>tan</tt> - Trigonometrical tangent</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>float tan(float <i>f</i>);<br/>
6559661996-11-06Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Return the tangent value for f.</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) float</text>
6559661996-11-06Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::atan' to='predef::atan'>math/atan</ref>, <ref resolved='predef::sin' to='predef::sin'>math/sin</ref> and <ref resolved='predef::cos' to='predef::cos'>math/cos</ref></p>
6559661996-11-06Fredrik Hübinette (Hubbe) </text></group>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='uname' homogen-type='method'> <method name='uname'/><doc placeholder='true'>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>uname</tt> - get operating system information</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>mapping(string:string) <i>uname</i>();<br/>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Returns a mapping describing the operating system.
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>The mapping contains the following fields:
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><matrix> <r><c> </c><c> "sysname": </c><c> Operating system name </c></r> <r><c> </c><c> "nodename": "release": "version": "machine": </c><c> Host name Release of this OS Version number of this OS Machine architecture </c></r> </matrix>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><note/><text> <p>This function only exists on systems that have the uname(2) system call. </p> <p/>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='werror' homogen-type='method'> <method name='werror'/><doc placeholder='true'>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>werror</tt> - write to stderr</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>void werror(string <i>s</i>);<br/>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Writes a message to stderr. Stderr is normally the console, even if the process output has been redirected to a file or pipe.</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) file</text>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
6559661996-11-06Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <module name='Calendar'> <doc>
6559661996-11-06Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p> This module implements calendar calculations, and base classes
d918e91999-05-27Mirar (Pontus Hagland) for time units. </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text>
6559661996-11-06Fredrik Hübinette (Hubbe) 
6665341999-11-23Mirar (Pontus Hagland) </doc> <module name='Gregorian'> <doc> <text> <p>time units: <ref resolved='predef::Calendar.Gregorian.Year'>Year</ref>, <ref>Month</ref>, <ref>Week</ref>, <ref>Day</ref> </p> </text>
6559661996-11-06Fredrik Hübinette (Hubbe) </doc>
46999f1999-02-13Fredrik Noring <docgroup homogen-name='datetime' homogen-type='method'> <method name='datetime'> <returntype><mixed/></returntype> <arguments><argument name='unix_time'><type> <or><int/><void/></or></type></argument> </arguments> </method><doc> <text> <p>Replacement for localtime. </p> </text> </doc> </docgroup> <docgroup homogen-name='datetime_name' homogen-type='method'> <method name='datetime_name'> <returntype><mixed/></returntype> <arguments><argument name='unix_time'><type> <or><int/><void/></or></type></argument> </arguments> </method><doc> <text> <p>Replacement for ctime. </p> </text> </doc> </docgroup> <docgroup homogen-name='datetime_short_name' homogen-type='method'> <method name='datetime_short_name'> <returntype><mixed/></returntype> <arguments><argument name='unix_time'><type> <or><int/><void/></or></type></argument> </arguments> </method><doc> <text> <p>Replacement for ctime. </p> </text> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe)  <class name='Year'> <doc>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>A <ref resolved='predef::Calendar.time_unit'>Calendar.time_unit</ref>.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Lesser units: <ref>Month</ref>, <ref>Week</ref>, <ref>Day</ref> Greater units: none</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <p/> </text> </doc> <docgroup homogen-name='parse' homogen-type='method'> <method name='parse'> <returntype> <object>object </object></returntype> <arguments><argument name='fmt'><type><string/></type></argument> <argument name='arg'><type><string/></type></argument>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments> </method><doc> <text> <p>parse a date, create relevant object fmt is in the format "abc%xdef..." where abc and def is matched, and %x is one of those time units: %Y absolute year %y year (70-99 is 1970-1999, 0-69 is 2000-2069) %M month (number, name or short name) (needs %y) %W week (needs %y) %D date (needs %y, %m) %a day (needs %y) %e weekday (needs %y, %w) %h hour (needs %d, %D or %W) %m minute (needs %h)
6665341999-11-23Mirar (Pontus Hagland) %s second (needs %s) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text>
6130721996-11-01Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) </class> </module> <module name='Stardate'> <doc>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>time unit: TNGDate</p> </text>
6130721996-11-01Fredrik Hübinette (Hubbe) 
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </doc>
431c431998-12-31Fredrik Hübinette (Hubbe) <class name='TNGDate'> <doc>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>implements ST:TNG stardates can be used as create argument to Day</p> </text>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) </doc> </class> </module> <class name='time_unit'> <docgroup homogen-type='method'> <method name='next'> <returntype> <object>object </object></returntype> <arguments> </arguments> </method><method name='prev'> <returntype> <object>object </object></returntype> <arguments> </arguments> </method><method name='`+'> <returntype> <object>object </object></returntype> <arguments><argument name='n'><type><int/></type></argument>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments> </method><method name='`-'> <returntype> <object>object </object></returntype> <arguments><argument name='n'><type><int/></type></argument>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments> </method><method name='`-'> <returntype> <object>object </object></returntype> <arguments><argument name='x'><type><object resolved='predef::Calendar.time_unit.next'/></type></argument>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments> </method><doc> <text> <p>next and prev gives the logical next and previous object. The <tt>+</tt> operator gives that logical relative object, ie <tt>my_day+14</tt> gives 14 days ahead. <tt>-</tt> works the same way, but can also take an object
6665341999-11-23Mirar (Pontus Hagland) of the same type and give the difference as an integer.</p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
6130721996-11-01Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='greater' homogen-type='method'> <method name='greater'> <returntype> <array><valuetype><string/></valuetype></array></returntype> <arguments> </arguments> </method><doc>
6130721996-11-01Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Gives a list of methods to get greater (longer) time units from this object. For a month, this gives back <tt>({"year"})</tt>, thus the method <tt>month-&gt;year()</tt> gives the year object.
6130721996-11-01Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text>
6559661996-11-06Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='lesser' homogen-type='method'> <method name='lesser'> <returntype> <array><valuetype><string/></valuetype></array></returntype> <arguments> </arguments> </method><doc>
6559661996-11-06Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Gives a list of methods to get lesser (shorter) time units. ie, for a month, this gives back <tt>({"day"})</tt> and the method <tt>day(mixed n)</tt> gives back that day object. The method <tt>days()</tt> gives back a list of possible argument values to the method <tt>day</tt>. Concurrently, <tt>Array.map(o-&gt;days(),o-&gt;day)</tt> gives a list of day objects in the object <tt>o</tt>.</p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <p> Ie:<pre> array(string) lesser() - gives back a list of possible xxx's. object xxxs() - gives back a list of possible n's. object xxx(mixed n) - gives back xxx n object xxx(object(Xxx) o) - gives back the corresponing xxx </pre></p>
6559661996-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <p>The list of n's (as returned from xxxs) are always in order.</p>
6130721996-11-01Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <p>There are two n's with special meaning, 0 and -1. 0 always gives the first xxx, equal to my_obj-&gt;xxx(my_obj-&gt;xxxs()[0]), and -1 gives the last, equal to my_obj-&gt;xxx(my_obj-&gt;xxxs()[-1]).</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <p>To get all xxxs in the object, do something like <tt>Array.map(my_obj-&gt;xxxs(),my_obj-&gt;xxx)</tt>.</p>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <p>xxx(object) may return zero, if there was no correspondning xxx.
c3eeb11996-12-15Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text>
c3eeb11996-12-15Fredrik Hübinette (Hubbe) 
6130721996-11-01Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) </class> </module>
29a5091999-08-25Henrik Grubbström (Grubba) <module name='Crypto'> <module name='randomness'> <doc> <text> <p>Assorted stronger or weaker randomnumber generators.</p> </text> </doc> <class name='pike_random'> <doc> <text> <p>A pseudo random generator based on the ordinary random() function.</p> </text> </doc> <docgroup homogen-name='read' homogen-type='method'> <method name='read'> <returntype> <object>string </object></returntype> <arguments><argument name='len'><type><int/></type></argument> </arguments> </method><doc> <text> <p>Returns a string of length len with pseudo random values.</p> </text> </doc> </docgroup> </class> <class name='rc4_random'> <doc> <text> <p>A pseudo random generator based on the rc4 crypto.</p> </text> </doc> <docgroup homogen-name='create' homogen-type='method'> <method name='create'> <returntype> <object>void </object></returntype> <arguments><argument name='secret'><type><string/></type></argument> </arguments> </method><doc> <text> <p>Initialize and seed the rc4 random generator.</p> </text> </doc> </docgroup> <docgroup homogen-name='read' homogen-type='method'> <method name='read'> <returntype> <object>string </object></returntype> <arguments><argument name='len'><type><int/></type></argument> </arguments> </method><doc> <text> <p>Return a string of the next len random characters from the rc4 random generator.</p> </text> </doc> </docgroup> </class> </module> </module>
431c431998-12-31Fredrik Hübinette (Hubbe) <module name='Gdbm'> <class name='gdbm'>
a44f221996-02-24Fredrik Hübinette (Hubbe) <doc placeholder='true'> <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>Gdbm.gdbm</tt> - database interface</p> <p>This is the an interface to the gdbm library. This module might or might not be available in your Pike depending on weather gdbm was available when Pike was compiled. </p> <p>A gdbm database has essentially the same functionality as a mapping, except the syntax is different, and it is located on disk, not in memory. Each gdbm database is one file which contains a set of key-value pairs. Both keys and values are strings and all keys are unique. </p> <p/> </text>
a44f221996-02-24Fredrik Hübinette (Hubbe)  </doc>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='close' homogen-type='method'> <method name='close'> </method>
a44f221996-02-24Fredrik Hübinette (Hubbe) <doc placeholder='true'> <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>close</tt> - close database</p>
a44f221996-02-24Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>void gdbm-&gt;close();<br/>
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </tt> <p>This closes the database.
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p/>
a44f221996-02-24Fredrik Hübinette (Hubbe) </text> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='create' homogen-type='method'> <method name='create'> </method>
a44f221996-02-24Fredrik Hübinette (Hubbe) <doc placeholder='true'> <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>create</tt> - open database</p>
a44f221996-02-24Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int gdbm-&gt;create();<br/> or<br/> int gdbm-&gt;create(string <i>file</i>);<br/> or<br/> int gdbm-&gt;create(string <i>file</i>, string <i>mode</i>);<br/>
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </tt> <p>Without arguments, this function does nothing. With one argument it opens the given file as a gdbm database, if this fails for some reason, an error will be generated. If a second argument is present, it specifies how to open the database using one or more of the follow flags in a string:
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><matrix> <r><c> r </c><c> open database for reading </c></r> <r><c> w </c><c> open database for writing </c></r> <r><c> c </c><c> create database if it does not exist </c></r> <r><c> t </c><c> overwrite existing database </c></r> <r><c> f </c><c> fast mode </c></r> </matrix>
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>The fast mode prevents the database from syncronizing each change in the database immediately. This is dangerous because the database can be left in an unusable state if Pike is terminated abnormally.
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>The default mode is "rwc".</p>
a44f221996-02-24Fredrik Hübinette (Hubbe) </text>
431c431998-12-31Fredrik Hübinette (Hubbe) <group><note/><text> <p>The gdbm manual states that it is important that the database is closed properly. Unfortunately this will not be the case if Pike calls exit() or returns from main(). You should therefore make sure you call close or destruct your gdbm objects when exiting your program. This will probably be done automatically in the future.
563f981996-08-15Fredrik Hübinette (Hubbe) </p> <p/> </text></group>
a44f221996-02-24Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='delete' homogen-type='method'> <method name='delete'> </method>
a44f221996-02-24Fredrik Hübinette (Hubbe) <doc placeholder='true'> <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>delete</tt> - delete a value from the database</p>
a44f221996-02-24Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int gdbm-&gt;delete(string <i>key</i>);<br/>
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </tt> <p>Remove a key from the database. Note that no error will be generated if the key does not exist.
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p/>
a44f221996-02-24Fredrik Hübinette (Hubbe) </text>
431c431998-12-31Fredrik Hübinette (Hubbe) </doc> </docgroup> <docgroup homogen-name='fetch' homogen-type='method'> <method name='fetch'> </method> <doc placeholder='true'> <text> <p><tt>fetch</tt> - fetch a value from the databse</p>
a44f221996-02-24Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>string gdbm-&gt;fetch(string <i>key</i>);<br/>
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </tt> <p>Return the data associated with the key 'key' in the database. If there was no such key in the database, zero is returned.
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p/> </text>
a44f221996-02-24Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='firstkey' homogen-type='method'> <method name='firstkey'> </method>
a44f221996-02-24Fredrik Hübinette (Hubbe) <doc placeholder='true'> <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>firstkey</tt> - get first key in database</p>
a44f221996-02-24Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>string gdbm-&gt;firstkey();<br/>
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </tt> <p>Return the first key in the database, this can be any key in the database. </p> <p/> </text>
a44f221996-02-24Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='nextkey' homogen-type='method'> <method name='nextkey'> </method>
a44f221996-02-24Fredrik Hübinette (Hubbe) <doc placeholder='true'> <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>nextkey</tt> - get next key in database</p>
a44f221996-02-24Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>string gdbm-&gt;nextkey(string <i>key</i>);<br/> </p> </tt> <p>This returns the key in database that follows the key 'key' key. This is of course used to iterate over all keys in the database.</p>
a44f221996-02-24Fredrik Hübinette (Hubbe) </text> <group><example/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>/* Write the contents of the database */<br/> for(key=gdbm-&gt;firstkey(); k; k=gdbm-&gt;nextkey(k))<br/> <dl><group><text>write(k+":"+gdbm-&gt;fetch(k)+"\n");<br/> </text></group></dl> </p> <p><br/>
a44f221996-02-24Fredrik Hübinette (Hubbe) </p> </tt></text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='reorganize' homogen-type='method'> <method name='reorganize'> </method>
a44f221996-02-24Fredrik Hübinette (Hubbe) <doc placeholder='true'> <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>reorganize</tt> - reorganize database</p>
a44f221996-02-24Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int gdbm-&gt;reorganize();<br/>
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </tt> <p>Deletions and insertions into the database can cause fragmentation which will make the database bigger. This routine reorganizes the contents to get rid of fragmentation. Note however that this function can take a LOT of time to run.
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p/> </text>
a44f221996-02-24Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='store' homogen-type='method'> <method name='store'> </method>
a44f221996-02-24Fredrik Hübinette (Hubbe) <doc placeholder='true'> <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>store</tt> - store a value in the database</p>
a44f221996-02-24Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int gdbm-&gt;store(string <i>key</i>, string <i>data</i>);<br/>
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </tt> <p>Associate the contents of 'data' with the key 'key'. If the key 'key' already exists in the database the data for that key will be replaced. If it does not exist it will be added. An error will be generated if the database was not open for writing. </p> <p/>
a44f221996-02-24Fredrik Hübinette (Hubbe) </text> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='sync' homogen-type='method'> <method name='sync'> </method>
a44f221996-02-24Fredrik Hübinette (Hubbe) <doc placeholder='true'> <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>sync</tt> - synchronize database</p>
a44f221996-02-24Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>void gdbm-&gt;sync();<br/>
a44f221996-02-24Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </tt> <p>When opening the database with the 'f' flag writings to the database can be cached in memory for a long time. Calling sync will write all such caches to disk and not return until everything is stored on the disk. </p> <p/> </text>
a44f221996-02-24Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) </class> </module>
e76a112000-02-29David Hedbor <module name='Gettext'> <doc> <text> <p> This module enables access to localization functions from within Pike. </p> </text> </doc> <docgroup homogen-name='bindtextdomain' homogen-type='method'> <method name='bindtextdomain'> <returntype> <object>string </object></returntype> <arguments><argument name='domainname'><type> <or><string/><void/></or></type></argument> <argument name='string|voiddirname'><type> <object resolved='predef::Gettext.bindtextdomain'/></type></argument> </arguments> </method><doc> <text> <p>The bindtextdomain() function binds the path predicate for a message domain domainname to the value contained in dirname. If domainname is a non-empty string and has not been bound previously, bindtextdomain() binds domainname with dirname.</p> <p>If domainname is a non-empty string and has been bound previously, bindtextdomain() replaces the old binding with dirname. The dirname argument can be an absolute or relative pathname being resolved when gettext(), dgettext(), or dcgettext() are called. If domainname is null pointer or an empty string, bindtextdomain() returns 0. User defined domain names cannot begin with the string SYS_. Domain names beginning with this string are reserved for system use.</p> <p>The return value from bindtextdomain() is a string containing dirname or the directory binding associated with domainname if dirname is void. If no binding is found, the default locale path is returned. If domainname is void or an empty string, bindtextdomain() takes no action and returns a 0. </p> </text> <group> <param name='domainname'/> <text><p>The domain to query or bind a path to.</p></text></group> <group> <param name='dirname'/> <text><p>The directory name to bind to the choosen domain.</p></text></group> <group><seealso/><text> <p><ref resolved='predef::Gettext.textdomain'>textdomain</ref>, <ref resolved='predef::Gettext.gettext'>gettext</ref>, <ref resolved='predef::Gettext.dgettext'>dgettext</ref>, <ref resolved='predef::Gettext.dcgettext'>dcgettext</ref>, <ref resolved='predef::Gettext.setlocale'>setlocale</ref>, <ref resolved='predef::Gettext.localeconv'>localeconv</ref></p></text></group> </doc> </docgroup> <docgroup homogen-name='dcgettext' homogen-type='method'> <method name='dcgettext'> <returntype> <object>string </object></returntype> <arguments><argument name='domain'><type><string/></type></argument> <argument name='stringmsg'><type> <object resolved='predef::Gettext.dcgettext'/></type></argument> <argument name='intcategory'><type> <object resolved='predef::Gettext.dcgettext'/></type></argument> </arguments> </method><doc> <text> <p>Return a translated version of msg within the context of the specified domain and current locale for the specified category. Calling dcgettext with category Locale.Gettext.LC_MESSAGES gives the same result as dgettext.</p> <p>If there is not translation available, msg is returned. </p> </text> <group> <param name='domain'/> <text><p>The domain to lookup the message in.</p></text></group> <group> <param name='msg'/> <text><p>The message to translate.</p></text></group> <group> <param name='category'/> <text><p>The category which locale should be used.</p></text></group> <group><seealso/><text> <p><ref resolved='predef::Gettext.bindtextdomain'>bindtextdomain</ref>, <ref resolved='predef::Gettext.textdomain'>textdomain</ref>, <ref resolved='predef::Gettext.gettext'>gettext</ref>, <ref resolved='predef::Gettext.dgettext'>dgettext</ref>, <ref resolved='predef::Gettext.setlocale'>setlocale</ref>, <ref resolved='predef::Gettext.localeconv'>localeconv</ref></p></text></group> </doc> </docgroup> <docgroup homogen-name='dgettext' homogen-type='method'> <method name='dgettext'> <returntype> <object>string </object></returntype> <arguments><argument name='domain'><type><string/></type></argument> <argument name='stringmsg'><type> <object resolved='predef::Gettext.dgettext'/></type></argument> </arguments> </method><doc> <text> <p>Return a translated version of msg within the context of the specified domain and current locale.</p> <p>If there is not translation available, msg is returned. </p> </text> <group> <param name='domain'/> <text><p>The domain to lookup the message in.</p></text></group> <group> <param name='msg'/> <text><p>The message to translate.</p></text></group> <group><seealso/><text> <p><ref resolved='predef::Gettext.bindtextdomain'>bindtextdomain</ref>, <ref resolved='predef::Gettext.textdomain'>textdomain</ref>, <ref resolved='predef::Gettext.gettext'>gettext</ref>, <ref resolved='predef::Gettext.dcgettext'>dcgettext</ref>, <ref resolved='predef::Gettext.setlocale'>setlocale</ref>, <ref resolved='predef::Gettext.localeconv'>localeconv</ref></p></text></group> </doc> </docgroup> <docgroup homogen-name='gettext' homogen-type='method'> <method name='gettext'> <returntype> <object>string </object></returntype> <arguments><argument name='msg'><type><string/></type></argument> </arguments> </method><doc> <text> <p>Return a translated version of msg within the context of the current domain and locale.</p> <p>If there is not translation available, msg is returned.</p> </text> <group> <param name='msg'/> <text><p>The message to translate.</p></text></group> <group><seealso/><text> <p><ref resolved='predef::Gettext.bindtextdomain'>bindtextdomain</ref>, <ref resolved='predef::Gettext.textdomain'>textdomain</ref>, <ref resolved='predef::Gettext.dgettext'>dgettext</ref>, <ref resolved='predef::Gettext.dcgettext'>dcgettext</ref>, <ref resolved='predef::Gettext.setlocale'>setlocale</ref>, <ref resolved='predef::Gettext.localeconv'>localeconv</ref></p></text></group> </doc> </docgroup> <docgroup homogen-name='localeconv' homogen-type='method'> <method name='localeconv'> <returntype> <object>mapping </object></returntype> <arguments> </arguments> </method><doc> <text> <p>The localeconv() function returns a mapping with settings for the current locale. This mapping contains all values associated with the locale categories LC_NUMERIC and LC_MONETARY.</p> <p><b>string decimal_point:</b> The decimal-point character used to format non-monetary quantities.</p> <p><b>string thousands_sep:</b> The character used to separate groups of digits to the left of the decimal-point character in formatted non-monetary quantities.</p> <p><b>string int_curr_symbol:</b> The international currency symbol applicable to the current locale, left-justified within a four-character space-padded field. The character sequences should match with those specified in ISO 4217 Codes for the Representation of Currency and Funds.</p> <p><b>string currency_symbol:</b> The local currency symbol applicable to the current locale.</p> <p><b>string mon_decimal_point:</b> The decimal point used to format monetary quantities.</p> <p><b>string mon_thousands_sep:</b> The separator for groups of digits to the left of the decimal point in formatted monetary quantities.</p> <p><b>string positive_sign:</b> The string used to indicate a non-negative-valued formatted monetary quantity.</p> <p><b>string negative_sign:</b> The string used to indicate a negative-valued formatted monetary quantity.</p> <p><b>int int_frac_digits:</b> The number of fractional digits (those to the right of the decimal point) to be displayed in an internationally formatted monetary quantity.</p> <p><b>int frac_digits:</b> The number of fractional digits (those to the right of the decimal point) to be displayed in a formatted monetary quantity.</p> <p><b>int p_cs_precedes:</b> Set to 1 or 0 if the currency_symbol respectively precedes or succeeds the value for a non-negative formatted monetary quantity.</p> <p><b>int p_sep_by_space:</b> Set to 1 or 0 if the currency_symbol respectively is or is not separated by a space from the value for a non-negative formatted monetary quantity.</p> <p><b>int n_cs_precedes:</b> Set to 1 or 0 if the currency_symbol respectively precedes or succeeds the value for a negative formatted monetary quantity.</p> <p><b>int n_sep_by_space:</b> Set to 1 or 0 if the currency_symbol respectively is or is not separated by a space from the value for a negative formatted monetary quantity.</p> <p><b>int p_sign_posn:</b> Set to a value indicating the positioning of the positive_sign for a non-negative formatted monetary quantity. The value of p_sign_posn is interpreted according to the following:</p> <p> 0 - Parentheses surround the quantity and currency_symbol.</p> <p> 1 - The sign string precedes the quantity and currency_symbol.</p> <p> 2 - The sign string succeeds the quantity and currency_symbol.</p> <p> 3 - The sign string immediately precedes the currency_symbol.</p> <p> 4 - The sign string immediately succeeds the currency_symbol.</p> <p><b>int n_sign_posn:</b> Set to a value indicating the positioning of the negative_sign for a negative formatted monetary quantity. The value of n_sign_posn is interpreted according to the rules described under p_sign_posn.</p> </text> </doc> </docgroup> <docgroup homogen-name='setlocale' homogen-type='method'> <method name='setlocale'> <returntype> <object>int </object></returntype> <arguments><argument name='category'><type><int/></type></argument> <argument name='stringlocale'><type> <object resolved='predef::Gettext.setlocale'/></type></argument> </arguments> </method><doc> <text> <p>The setlocale() function is used to set the program's current locale. If locale is "C" or "POSIX", the current locale is set to the portable locale.</p> <p>If locale is "", the locale is set to the default locale which is selected from the environment variable LANG.</p> <p>The argument category determines which functions are influenced by the new locale:</p> <p><b>Locale.Gettext.LC_ALL</b> for all of the locale.</p> <p><b>Locale.Gettext.LC_COLLATE</b> for the functions strcoll() and strxfrm() (used by pike, but not directly accessible).</p> <p><b>Locale.Gettext.LC_CTYPE</b> for the character classification and conversion routines.</p> <p><b>Locale.Gettext.LC_MONETARY</b> for localeconv().</p> <p><b>Locale.Gettext.LC_NUMERIC</b> for the decimal character.</p> <p><b>Locale.Gettext.LC_TIME</b> for strftime() (currently not accessible from Pike). </p> </text> <group> <param name='category'/> <text><p>The category in which to set the locale.</p></text></group> <group> <param name='locale'/> <text><p>The locale to change to</p></text></group> <group><returns/><text> <p>1 if the locale setting successed, 0 for failure</p> </text></group> <group><seealso/><text> <p><ref resolved='predef::Gettext.bindtextdomain'>bindtextdomain</ref>, <ref resolved='predef::Gettext.textdomain'>textdomain</ref>, <ref resolved='predef::Gettext.gettext'>gettext</ref>, <ref resolved='predef::Gettext.dgettext'>dgettext</ref>, <ref resolved='predef::Gettext.dcgettext'>dcgettext</ref>, <ref resolved='predef::Gettext.localeconv'>localeconv</ref></p></text></group> </doc> </docgroup> <docgroup homogen-name='textdomain' homogen-type='method'> <method name='textdomain'> <returntype> <object>string </object></returntype> <arguments><argument name='domain|void'><type><string/></type></argument> </arguments> </method><method name='textdomain'> <returntype> <object>string </object></returntype> <arguments><argument/> </arguments> </method><doc> <text> <p>The textdomain() function sets or queries the name of the current domain of the active LC_MESSAGES locale category. The domainname argument is a string that can contain only the characters allowed in legal filenames.</p> <p>The domainname argument is the unique name of a domain on the system. If there are multiple versions of the same domain on one system, namespace collisions can be avoided by using bindtextdomain(). If textdomain() is not called, a default domain is selected. The setting of domain made by the last valid call to textdomain() remains valid across subsequent calls to setlocale, and gettext().</p> <p>The normal return value from textdomain() is a string containing the current setting of the domain. If domainname is void, textdomain() returns a string containing the current domain. If textdomain() was not previously called and domainname is void, the name of the default domain is returned.</p> </text> <group> <param name='domainname'/> <text><p>The name of the domain to be made the current domain.</p></text></group> <group><seealso/><text> <p><ref resolved='predef::Gettext.bindtextdomain'>bindtextdomain</ref>, <ref resolved='predef::Gettext.gettext'>gettext</ref>, <ref resolved='predef::Gettext.dgettext'>dgettext</ref>, <ref resolved='predef::Gettext.dcgettext'>dcgettext</ref>, <ref resolved='predef::Gettext.setlocale'>setlocale</ref>, <ref resolved='predef::Gettext.localeconv'>localeconv</ref></p></text></group> </doc> </docgroup> </module>
431c431998-12-31Fredrik Hübinette (Hubbe) <module name='Gmp'> <class name='mpz'> <doc placeholder='true'>
94e6f41996-05-02Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>Gmp.mpz</tt> - bignum program</p>
94e6f41996-05-02Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Gmp.mpz is a builtin program written in C. It implements large, very large integers. In fact, the only limitation on these integers is the available memory.
94e6f41996-05-02Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>The mpz object implements all the normal integer operations. (except xor) There are also some extra operators:</p> </text>
94e6f41996-05-02Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><note/><text> <p>This module is only available if libgmp.a was available and found when Pike was compiled. </p> <p/>
94e6f41996-05-02Fredrik Hübinette (Hubbe) </text></group> </doc>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='cast' homogen-type='method'> <method name='cast'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>cast</tt> - cast to other type</p>
d8215a1996-09-22Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>object mpz-&gt;gcd( "string" | "int" | "<i>float</i>" );<br/> or<br/> (string) mpz<br/> or<br/> (int) mpz<br/> or<br/> (float) mpz<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function converts an mpz to a string, int or float. This is nessesary when you want to view, store or use the result of an mpz calculation.</p> </text>
3b8e841996-02-10Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><seealso/><text> <p><ref resolved='predef::Gmp.mpz.cast' to='cast'>cast</ref></p> </text></group>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
b06f481997-09-01Per Hedbor </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='create' homogen-type='method'> <method name='create'> </method> <doc placeholder='true'>
b06f481997-09-01Per Hedbor <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>create</tt> - initialize a bignum</p>
b06f481997-09-01Per Hedbor 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>object Mpz();<br/> or<br/> object Mpz(int|object|float <i>i</i>);<br/> or<br/> object Mpz(string <i>digits</i>, int <i>base</i>);<br/> <br/>
b06f481997-09-01Per Hedbor </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>When cloning an mpz it is by default initalized to zero. However, you can give a second argument to clone to initialize the new object to that value. The argument can be an int, float another mpz object, or a string containing an ascii number. You can also give the number in the string in another base by specifying the base as a second argument. Valid bases are 2-36 and 256.</p>
b06f481997-09-01Per Hedbor </text> <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='Builtin.clone'>Builtin.clone</ref></p>
b06f481997-09-01Per Hedbor </text></group>
3801711996-12-05Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='digits' homogen-type='method'> <method name='digits'> </method> <doc placeholder='true'>
3801711996-12-05Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>digits</tt> - convert mpz to a string</p>
3801711996-12-05Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>string mpz-&gt;digits();<br/> or<br/> string mpz-&gt;digits(int <i>base</i>);<br/>
3801711996-12-05Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function converts an mpz to a string. If a base is given the number will be represented in that base. Valid bases are 2-36 and 256. The default base is 10.</p>
3801711996-12-05Fredrik Hübinette (Hubbe) </text> <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref resolved='predef::Gmp.mpz.cast' to='mpz-&gt;cast'>&gt;mpz-&gt;cast</ref></p>
3801711996-12-05Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='gcd' homogen-type='method'> <method name='gcd'> </method> <doc placeholder='true'>
3801711996-12-05Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>gcd</tt> - greatest common divisor</p>
3801711996-12-05Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>object mpz-&gt;gcd(object|int|float|string arg)<br/>
3801711996-12-05Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function returns the greatest common divisor for arg and mpz. </p> <p/>
3801711996-12-05Fredrik Hübinette (Hubbe) </text> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='powm' homogen-type='method'> <method name='powm'> </method> <doc placeholder='true'>
3801711996-12-05Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>powm</tt> - raise and modulo</p>
3801711996-12-05Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>object mpz-&gt;powm(int|string|float|object <i>a</i>,int|string|float|object <i>b</i>);<br/>
3801711996-12-05Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function returns ( mpz ** a ) % b </p> <p/>
3801711996-12-05Fredrik Hübinette (Hubbe) </text>
ab5bd41996-06-21Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='probably_prime_p' homogen-type='method'> <method name='probably_prime_p'> </method> <doc placeholder='true'>
ab5bd41996-06-21Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>probably_prime_p</tt> - is this number a prime?</p>
ab5bd41996-06-21Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>int mpz-&gt;probably_prime_p();<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p>
ab5bd41996-06-21Fredrik Hübinette (Hubbe) </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function returns 1 if mpz is a prime, and 0 most of the time if it is not. </p> <p/> </text>
ab5bd41996-06-21Fredrik Hübinette (Hubbe) 
516e681996-02-26Fredrik Hübinette (Hubbe) </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='size' homogen-type='method'> <method name='size'> </method> <doc placeholder='true'>
516e681996-02-26Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>size</tt> - how long is a number</p>
516e681996-02-26Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>string mpz-&gt;size();<br/>
516e681996-02-26Fredrik Hübinette (Hubbe) or<br/>
431c431998-12-31Fredrik Hübinette (Hubbe) string mpz-&gt;size(int <i>base</i>);<br/>
516e681996-02-26Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function returns how long the mpz would be represented in the specified base. The default base is 2.</p> </text>
516e681996-02-26Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <group><seealso/><text> <p><ref resolved='predef::Gmp.mpz.digits' to='mpz-&gt;digits'>&gt;mpz-&gt;digits</ref></p> </text></group>
516e681996-02-26Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='sqrt' homogen-type='method'> <method name='sqrt'> </method> <doc placeholder='true'>
516e681996-02-26Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>sqrt</tt> - square root</p>
516e681996-02-26Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>object mpz-&gt;sqrt();<br/>
516e681996-02-26Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function return the the truncated integer part of the square root of the value of mpz. </p> <p/> </text>
516e681996-02-26Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) </class> </module> <class name='Gz_deflate'> <doc placeholder='true'>
516e681996-02-26Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>Gz_deflate</tt> - gzip packer</p>
516e681996-02-26Fredrik Hübinette (Hubbe) 
bc9bc82000-01-17Andreas Sigfridsson <p>Gz_deflate is a builtin program written in C. It interfaces the
431c431998-12-31Fredrik Hübinette (Hubbe) packing routines in the libz library.</p>
516e681996-02-26Fredrik Hübinette (Hubbe) </text>
431c431998-12-31Fredrik Hübinette (Hubbe) <group><note/><text> <p>This program is only available if libz was available and found when Pike was compiled.</p> </text></group>
516e681996-02-26Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='gz_inflate'>gz_inflate</ref></p>
516e681996-02-26Fredrik Hübinette (Hubbe) </text></group> </doc>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='create' homogen-type='method'> <method name='create'> </method> <doc placeholder='true'>
516e681996-02-26Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>create</tt> - initialize gzip packer</p>
516e681996-02-26Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>void create(int X)<br/>
516e681996-02-26Fredrik Hübinette (Hubbe) or<br/>
431c431998-12-31Fredrik Hübinette (Hubbe) object(Gz_deflate) Gz_deflate(int X)<br/>
516e681996-02-26Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This functionion is called when a new Gz_deflate is created. If given, X should be a number from 0 to 9 indicating the packing / cpu ratio. Zero means no packing, 2-3 is considered 'fast', 6 is default and higher is considered 'slow' but gives better packing.
516e681996-02-26Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function can also be used to re-initialize a gz_deflate object so it can be re-used.
516e681996-02-26Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p/> </text>
516e681996-02-26Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='deflate' homogen-type='method'> <method name='deflate'> </method> <doc placeholder='true'>
516e681996-02-26Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>deflate</tt> - pack data</p>
516e681996-02-26Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>string deflate(string <i>data</i>, int <i>flush</i>);<br/>
516e681996-02-26Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function preforms gzip style compression on a string and returns the packed data. Streaming can be done by calling this functon several time and concatenating the returned data. The optional 'flush' argument should be one f the following: </p> <p><matrix> <r><c> Gz_deflate-&gt;NO_FLUSH </c><c> Only data that doesn't fit in the </c></r> <r><c> </c></r> </matrix> <dl><group><text><matrix> <r><c> </c><c> internal buffers is returned. </c></r> <r><c> </c></r> </matrix> </text></group></dl><matrix> <r><c> Gz_deflate-&gt;PARTIAL_FLUSH </c><c> All input is packed and returned. </c></r> <r><c> Gz_deflate-&gt;SYNC_FLUSH </c><c> All input is packed and returned. </c></r> </matrix> <dl><group><text><matrix> <r><c> </c><c> Packing is syncronized. </c></r> <r><c> </c></r> </matrix> </text></group></dl><matrix> <r><c> Gz_deflate-&gt;FINISH </c><c> All input is packed and an 'end of </c></r> <r><c> </c><c> </c><c> </c><c> </c><c> data' marker is appended. </c></r>
516e681996-02-26Fredrik Hübinette (Hubbe) </matrix>
431c431998-12-31Fredrik Hübinette (Hubbe) 
516e681996-02-26Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Using flushing will degrade packing. Normally NO_FLUSH should be used until the end of the data when FINISH should be used. For interactive data PARTIAL_FLUSH should be used.</p> </text>
516e681996-02-26Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='gz_inflate-&gt;inflate'>&gt;gz_inflate-&gt;inflate</ref></p>
516e681996-02-26Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) </class> <class name='Gz_inflate'> <doc placeholder='true'>
516e681996-02-26Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>Gz_inflate</tt> - gzip unpacker</p>
516e681996-02-26Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <p>Gz_inflate is a builtin program written in C. It interfaces the packing routines in the libz library.</p>
516e681996-02-26Fredrik Hübinette (Hubbe) </text>
431c431998-12-31Fredrik Hübinette (Hubbe) <group><note/><text> <p>This program is only available if libz was available and found when Pike was compiled.</p> </text></group>
516e681996-02-26Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='gz_deflate'>gz_deflate</ref></p>
516e681996-02-26Fredrik Hübinette (Hubbe) </text></group> </doc>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='create' homogen-type='method'> <method name='create'> </method> <doc placeholder='true'>
516e681996-02-26Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>create</tt> - initialize gzip packer</p>
516e681996-02-26Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>void create()<br/>
516e681996-02-26Fredrik Hübinette (Hubbe) or<br/>
431c431998-12-31Fredrik Hübinette (Hubbe) object(Gz_inflate) Gz_inflate()<br/>
516e681996-02-26Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This functionion is called when a new Gz_inflate is created. It can also be called after the object has been used to re-initialize it.
516e681996-02-26Fredrik Hübinette (Hubbe) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p/> </text>
516e681996-02-26Fredrik Hübinette (Hubbe)  </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) <docgroup homogen-name='inflate' homogen-type='method'> <method name='inflate'> </method> <doc placeholder='true'>
516e681996-02-26Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><tt>inflate</tt> - unpack data</p>
516e681996-02-26Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>string inflate(string <i>data</i>);<br/>
516e681996-02-26Fredrik Hübinette (Hubbe) </p> </tt>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>This function preforms gzip style decompression. It can inflate a whole file at once or in blocks.</p>
516e681996-02-26Fredrik Hübinette (Hubbe) </text> <group><example/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <tt><p>#include &lt;stdio.h&gt;<br/> // whole file<br/> write(Gz_inflate()-&gt;inflate(stdin-&gt;read(0x7fffffff));<br/>
516e681996-02-26Fredrik Hübinette (Hubbe)  </p>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>// streaming (blocks)<br/> function inflate=Gz_inflate()-&gt;inflate;<br/> while(string s=stdin-&gt;read(8192))<br/> <dl><group><text>write(inflate(s));<br/> </text></group></dl></p> </tt></text></group>
516e681996-02-26Fredrik Hübinette (Hubbe)  <group><seealso/><text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p><ref to='gz_deflate-&gt;deflate'>&gt;gz_deflate-&gt;deflate</ref></p>
516e681996-02-26Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
431c431998-12-31Fredrik Hübinette (Hubbe) </class> <module name='Image'>
5561351999-03-01Henrik Wallin <doc> <group><note/><text> <p>Experimental functions.</p> </text></group> </doc>
bea55f1999-05-28Mirar (Pontus Hagland) <docgroup homogen-type='method'> <method name='load'> <returntype> <object resolved='predef::Image.Image'>Image.Image</object></returntype> <arguments> </arguments> </method><method name='load'> <returntype> <object resolved='predef::Image.Image'>Image.Image</object></returntype> <arguments><argument name='file'><type><object resolved='predef::Image.load'/></type></argument> </arguments> </method><method name='load'> <returntype> <object resolved='predef::Image.Image'>Image.Image</object></returntype> <arguments><argument name='filename'><type><string/></type></argument> </arguments> </method><method name='load_layer'> <returntype>
d71ce31999-08-12Mirar (Pontus Hagland)  <object resolved='predef::Image.Layer'>Image.Layer</object></returntype>
bea55f1999-05-28Mirar (Pontus Hagland)  <arguments> </arguments> </method><method name='load_layer'> <returntype>
d71ce31999-08-12Mirar (Pontus Hagland)  <object resolved='predef::Image.Layer'>Image.Layer</object></returntype>
bea55f1999-05-28Mirar (Pontus Hagland)  <arguments><argument name='file'><type><object resolved='predef::Image.load'/></type></argument> </arguments> </method><method name='load_layer'> <returntype>
d71ce31999-08-12Mirar (Pontus Hagland)  <object resolved='predef::Image.Layer'>Image.Layer</object></returntype>
bea55f1999-05-28Mirar (Pontus Hagland)  <arguments><argument name='filename'><type><string/></type></argument> </arguments> </method><method name='_load'> <returntype> <object>mapping </object></returntype> <arguments> </arguments> </method><method name='_load'> <returntype> <object>mapping </object></returntype> <arguments><argument name='file'><type><object resolved='predef::Image.load'/></type></argument> </arguments> </method><method name='_load'> <returntype> <object>mapping </object></returntype> <arguments><argument name='filename'><type><string/></type></argument> </arguments> </method><doc> <text> <p>Helper function to load an image from a file. If no filename is given, Stdio.stdin is used. The result is the same as from the decode functions in <ref resolved='predef::Image.ANY'>Image.ANY</ref>.</p> </text> <group><note/><text> <p>All data is read, ie nothing happens until the file is closed. Throws upon error.</p> </text></group>
d71ce31999-08-12Mirar (Pontus Hagland) </doc> </docgroup> <docgroup homogen-name='lay' homogen-type='method'> <method name='lay'> <returntype> <object resolved='predef::Image.Layer'>Image.Layer </object></returntype> <arguments><argument><value>array(Image.Layer|mapping)</value></argument> </arguments> </method><method name='lay'> <returntype> <object resolved='predef::Image.Layer'>Image.Layer </object></returntype> <arguments><argument><value>array(Image.Layer|mapping)</value></argument><argument name='xoffset'><type><int/></type></argument> <argument name='yoffset'><type><int/></type></argument> <argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument> </arguments> </method><doc> <text> <p>Combine layers.</p> </text> <group><returns/><text> <p>a new layer object.</p> </text></group> <group><seealso/><text> <p><ref resolved='predef::Image.Layer'>Image.Layer</ref></p></text></group>
0946981999-04-17Mirar (Pontus Hagland) </doc> </docgroup>
44aff01999-02-24Mirar (Pontus Hagland) <module name='ANY'> <doc> <text> <p> This method calls the other decoding methods and has some heuristics for what type of image this is.</p> <p>Methods:
a4d12d1999-04-12Mirar (Pontus Hagland) <ref resolved='predef::Image.ANY.decode'>decode</ref>, <ref resolved='predef::Image.ANY.decode_alpha'>decode_alpha</ref>,
ec774b1999-04-09Mirar (Pontus Hagland) <ref resolved='predef::Image.ANY._decode'>_decode</ref></p>
44aff01999-02-24Mirar (Pontus Hagland)  <p/> </text> <group><seealso/><text>
1755091999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image'>Image</ref></p></text></group>
44aff01999-02-24Mirar (Pontus Hagland)  </doc>
a4d12d1999-04-12Mirar (Pontus Hagland) <docgroup homogen-type='method'>
ec774b1999-04-09Mirar (Pontus Hagland) <method name='_decode'> <returntype> <object>mapping </object></returntype> <arguments><argument name='data'><type><string/></type></argument>
a4d12d1999-04-12Mirar (Pontus Hagland)  </arguments> </method><method name='decode'> <returntype> <object>object </object></returntype> <arguments><argument name='data'><type><string/></type></argument> </arguments> </method><method name='decode_alpha'> <returntype> <object>object </object></returntype> <arguments><argument name='data'><type><string/></type></argument>
ec774b1999-04-09Mirar (Pontus Hagland)  </arguments> </method><doc> <text> <p>Tries heuristics to find the correct method of decoding the data, then calls that method.</p> <p>The result of _decode() is a mapping that contains <pre> "type":image data type (ie, "image/jpeg" or similar) "image":the image object, "alpha":the alpha channel or 0 if N/A </pre> </p> </text> <group><note/><text> <p>Throws upon failure.</p> </text></group>
b1a60f1999-04-12Per Hedbor </doc> </docgroup> </module> <module name='AVS'> <docgroup homogen-type='method'> <method name='decode'> <returntype> <object>object </object></returntype> <arguments><argument name='data'><type><string/></type></argument> </arguments> </method><method name='_decode'> <returntype> <object>mapping </object></returntype> <arguments><argument name='data'><type><string/></type></argument> </arguments> </method><method name='encode'> <returntype> <object>string </object></returntype> <arguments><argument name='image'><type><object resolved='predef::Image.AVS.decode'/></type></argument> </arguments> </method><doc> <text> <p>Handle encoding and decoding of AVS-X images. AVS is rather trivial, and not really useful, but:</p> <p>An AVS file is a raw (uncompressed) 24 bit image file with alpha. The alpha channel is 8 bit, and there is no separate alpha for r, g and b.</p> </text>
ec774b1999-04-09Mirar (Pontus Hagland) </doc> </docgroup>
44aff01999-02-24Mirar (Pontus Hagland) </module>
120ee61999-03-22Mirar (Pontus Hagland) <module name='BMP'> <doc> <text> <p> This submodule keeps the BMP (Windows Bitmap)
1755091999-04-13Mirar (Pontus Hagland) encode/decode capabilities of the <ref resolved='predef::Image.Image'>Image</ref> module.</p>
120ee61999-03-22Mirar (Pontus Hagland)  <p>BMP is common in the Windows environment.</p> <p>Simple encoding:<br/>
a4d12d1999-04-12Mirar (Pontus Hagland) <ref resolved='predef::Image.BMP.encode'>encode</ref>
120ee61999-03-22Mirar (Pontus Hagland) </p> </text> <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image'>Image</ref>, <ref resolved='predef::Image.Image'>Image.Image</ref>, <ref resolved='predef::Image.Colortable'>Image.Colortable</ref></p></text></group>
120ee61999-03-22Mirar (Pontus Hagland)  </doc>
3885b91999-04-11Mirar (Pontus Hagland) <docgroup homogen-type='method'>
6dde141999-05-02Mirar (Pontus Hagland) <method name='decode'> <returntype> <object>object </object></returntype> <arguments><argument name='data'><type><string/></type></argument> </arguments> </method><method name='_decode'>
3885b91999-04-11Mirar (Pontus Hagland)  <returntype> <object>mapping </object></returntype> <arguments><argument name='data'><type><string/></type></argument> </arguments> </method><method name='decode_header'> <returntype> <object>mapping </object></returntype> <arguments><argument name='data'><type><string/></type></argument> </arguments> </method><method name='decode'> <returntype> <object>object </object></returntype> <arguments><argument name='data'><type><string/></type></argument>
6dde141999-05-02Mirar (Pontus Hagland) <argument name='options'><type><mapping/></type></argument>
3885b91999-04-11Mirar (Pontus Hagland) 
1d2f361999-05-02Mirar (Pontus Hagland)  </arguments> </method><method name='_decode'> <returntype> <object>mapping </object></returntype> <arguments><argument name='data'><type><string/></type></argument> <argument name='options'><type><mapping/></type></argument> </arguments> </method><method name='decode_header'> <returntype> <object>mapping </object></returntype> <arguments><argument name='data'><type><string/></type></argument> <argument name='options'><type><mapping/></type></argument>
3885b91999-04-11Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
6dde141999-05-02Mirar (Pontus Hagland) <p>Decode a BMP.</p>
3885b91999-04-11Mirar (Pontus Hagland)  <p><ref resolved='predef::Image.BMP.decode'>decode</ref> gives an image object, <ref resolved='predef::Image.BMP._decode'>_decode</ref> gives a mapping in the format <pre> "type":"image/bmp", "image":image object, "colortable":colortable object (if applicable) "xsize":int, "ysize":int, "compression":int, "bpp":int, "windows":int, </pre></p> <p/> </text> <group><returns/><text> <p>the encoded image as a string</p> </text></group> <group><bugs/><text> <p>Doesn't support all BMP modes. At all.</p> </text></group> <group><seealso/><text> <p><ref resolved='predef::Image.BMP.encode'>encode</ref></p></text></group> </doc> </docgroup>
120ee61999-03-22Mirar (Pontus Hagland) <docgroup homogen-name='encode' homogen-type='method'> <method name='encode'> <returntype> <object>string </object></returntype> <arguments><argument name='image'><type><object resolved='predef::Image.BMP.encode'/></type></argument>
1b125a1999-05-03Mirar (Pontus Hagland)  </arguments> </method><method name='encode'> <returntype> <object>string </object></returntype> <arguments><argument name='image'><type><object resolved='predef::Image.BMP.encode'/></type></argument> <argument name='options'><type><mapping/></type></argument>
120ee61999-03-22Mirar (Pontus Hagland)  </arguments> </method><method name='encode'> <returntype> <object>string </object></returntype> <arguments><argument name='image'><type><object resolved='predef::Image.BMP.encode'/></type></argument> <argument name='colortable'><type><object resolved='predef::Image.BMP.encode'/></type></argument>
1b125a1999-05-03Mirar (Pontus Hagland)  </arguments> </method><method name='encode'> <returntype> <object>string </object></returntype> <arguments><argument name='image'><type><object resolved='predef::Image.BMP.encode'/></type></argument> <argument name='bpp'><type><int/></type></argument>
120ee61999-03-22Mirar (Pontus Hagland)  </arguments> </method><doc> <text> <p>Make a BMP. It default to a 24 bpp BMP file, but if a colortable is given, it will be 8bpp
1d2f361999-05-02Mirar (Pontus Hagland) with a palette entry.</p>
1b125a1999-05-03Mirar (Pontus Hagland) <p><tt>option</tt> is a mapping that may contain: <pre> "colortable": Image.Colortable - palette "bpp": 1|4|8|24 - force this many bits per pixel "rle": 0|1 - run-length encode (default is 0) </pre> </p>
120ee61999-03-22Mirar (Pontus Hagland) </text> <group> <param name='image'/> <text><p>Source image.</p></text></group> <group> <param name='colortable'/>
1d2f361999-05-02Mirar (Pontus Hagland) <text><p>Colortable object, shortcut for "colortable" in options.</p>
120ee61999-03-22Mirar (Pontus Hagland)  <p/></text></group> <group><returns/><text> <p>the encoded image as a string</p> </text></group> <group><bugs/><text>
1b125a1999-05-03Mirar (Pontus Hagland) <p>Doesn't support old BMP mode, only "windows" mode.</p>
120ee61999-03-22Mirar (Pontus Hagland) </text></group>
3885b91999-04-11Mirar (Pontus Hagland) <group><seealso/><text> <p><ref resolved='predef::Image.BMP.decode'>decode</ref></p></text></group>
120ee61999-03-22Mirar (Pontus Hagland)  </doc> </docgroup> </module>
3250c11999-04-13Mirar (Pontus Hagland) <module name='Color'>
431c431998-12-31Fredrik Hübinette (Hubbe) <doc>
516e681996-02-26Fredrik Hübinette (Hubbe) <text>
431c431998-12-31Fredrik Hübinette (Hubbe) <p>
91b4751999-06-15Mirar (Pontus Hagland)  This module keeps names and easy handling for easy color support. It gives you an easy way to get colors from names.</p> <p> A color is here an object, containing color information and methods for conversion, see below.</p> <p> <ref resolved='predef::Image.Color'>Image.Color</ref> can be called to make a color object. <ref resolved='predef::Image.Color'>Image.Color()</ref> takes the following arguments: <pre> Image.Color(string name) // "red" Image.Color(string prefix_string) // "lightblue" Image.Color(string hex_name) // "#ff00ff" Image.Color(string cmyk_string) // "%17,42,0,19.4" Image.Color(string hsv_string) // "%@327,90,32" Image.Color(int red, int green, int blue) </pre></p> <p> The color names available can be listed by using indices on Image.Color. The colors are available by name directly as <tt>Image.Color.name</tt>, too: <pre> ...Image.Color.red... ...Image.Color.green... or, maybe import Image.Color; ...red... ...green... ...lightgreen... </pre></p> <p> Giving red, green and blue values is equal to calling <ref resolved='predef::Image.Color.rgb'>Image.Color.rgb</ref>().</p> <p> The prefix_string method is a form for getting modified colors, it understands all modifiers (<ref to='image.color.color.light'>light</ref>, <ref to='image.color.color.dark'>dark</ref>, <ref to='image.color.color.bright'>bright</ref>, <ref to='image.color.color.dull'>dull</ref> and <ref to='image.color.color.neon'>neon</ref>). Simply use "method"+"color"; (as in <tt>lightgreen</tt>, <tt>dullmagenta</tt>, <tt>lightdullorange</tt>).</p> <p> The <tt>hex_name</tt> form is a simple <tt>#rrggbb</tt> form, as in HTML or X-program argument. A shorter form (<tt>#rgb</tt>) is also accepted. This is the inverse to the <ref resolved='predef::Image.Color.Color.hex'>Image.Color.Color-&gt;hex</ref>() method.</p> <p> The <tt>cmyk_string</tt> is a string form of giving <i>cmyk</i> (cyan, magenta, yellow, black) color. These values are floats representing percent.</p> <p> The <tt>hsv_string</tt> is another hue, saturation, value representation, but in floats; hue is in degree range (0..360), and saturation and value is given in percent. <i>This is not the same as returned or given to the <ref resolved='predef::Image.Color.hsv'>hsv</ref>() methods!</i></p>
516e681996-02-26Fredrik Hübinette (Hubbe) 
91b4751999-06-15Mirar (Pontus Hagland) <p>
1a56671999-07-23Mirar (Pontus Hagland) <add_appendix name='colors' title='image.color colors'><image file='predef.Image.Color.1.png' height='120' width='348'>colors.c.0.png</image><br/> <image file='predef.Image.Color.2.png' height='120' width='348'>colors.c.1.png</image><br/> <image file='predef.Image.Color.3.png' height='120' width='348'>colors.c.2.png</image><br/><image file='predef.Image.Color.4.png' height='120' width='348'>colors.c.3.png</image><br/><image file='predef.Image.Color.5.png' height='120' width='348'>colors.c.4.png</image><br/><image file='predef.Image.Color.6.png' height='120' width='348'>colors.c.5.png</image><br/><image file='predef.Image.Color.7.png' height='120' width='348'>colors.c.6.png</image><br/><image file='predef.Image.Color.8.png' height='120' width='348'>colors.c.7.png</image><br/><image file='predef.Image.Color.9.png' height='120' width='348'>colors.c.8.png</image><br/><image file='predef.Image.Color.10.png' height='120' width='348'>colors.c.9.png</image><br/><image file='predef.Image.Color.11.png' height='120' width='348'>colors.c.10.png</image><br/><image file='predef.Image.Color.12.png' height='120' width='348'>colors.c.11.png</image><br/><image file='predef.Image.Color.13.png' height='120' width='348'>colors.c.12.png</image><br/><image file='predef.Image.Color.14.png' height='120' width='348'>colors.c.13.png</image><br/><image file='predef.Image.Color.15.png' height='120' width='348'>colors.c.14.png</image><br/><image file='predef.Image.Color.16.png' height='120' width='348'>colors.c.15.png</image><br/><image file='predef.Image.Color.17.png' height='120' width='348'>colors.c.16.png</image><br/><image file='predef.Image.Color.18.png' height='120' width='348'>colors.c.17.png</image><br/><image file='predef.Image.Color.19.png' height='120' width='348'>colors.c.18.png</image><br/><image file='predef.Image.Color.20.png' height='120' width='348'>colors.c.19.png</image><br/><image file='predef.Image.Color.21.png' height='120' width='348'>colors.c.20.png</image><br/><image file='predef.Image.Color.22.png' height='120' width='348'>colors.c.21.png</image><br/><image file='predef.Image.Color.23.png' height='120' width='348'>colors.c.22.png</image><br/><image file='predef.Image.Color.24.png' height='120' width='348'>colors.c.23.png</image><br/><image file='predef.Image.Color.25.png' height='120' width='348'>colors.c.24.png</image><br/><image file='predef.Image.Color.26.png' height='120' width='348'>colors.c.25.png</image><br/><image file='predef.Image.Color.27.png' height='120' width='348'>colors.c.26.png</image><br/><image file='predef.Image.Color.28.png' height='120' width='348'>colors.c.27.png</image><br/><image file='predef.Image.Color.29.png' height='120' width='348'>colors.c.28.png</image><br/><image file='predef.Image.Color.30.png' height='120' width='348'>colors.c.29.png</image><br/><image file='predef.Image.Color.31.png' height='120' width='348'>colors.c.30.png</image><br/><image file='predef.Image.Color.32.png' height='120' width='348'>colors.c.31.png</image><br/><image file='predef.Image.Color.33.png' height='120' width='348'>colors.c.32.png</image><br/><image file='predef.Image.Color.34.png' height='120' width='348'>colors.c.33.png</image><br/><image file='predef.Image.Color.35.png' height='120' width='348'>colors.c.34.png</image><br/><image file='predef.Image.Color.36.png' height='120' width='348'>colors.c.35.png</image><br/><image file='predef.Image.Color.37.png' height='120' width='348'>colors.c.36.png</image><br/><image file='predef.Image.Color.38.png' height='120' width='348'>colors.c.37.png</image><br/><image file='predef.Image.Color.39.png' height='120' width='348'>colors.c.38.png</image><br/><image file='predef.Image.Color.40.png' height='120' width='348'>colors.c.39.png</image><br/><image file='predef.Image.Color.41.png' height='120' width='348'>colors.c.40.png</image><br/><image file='predef.Image.Color.42.png' height='120' width='348'>colors.c.41.png</image><br/><image file='predef.Image.Color.43.png' height='120' width='348'>colors.c.42.png</image><br/><image file='predef.Image.Color.44.png' height='120' width='348'>colors.c.43.png</image><br/><image file='predef.Image.Color.45.png' height='120' width='348'>colors.c.44.png</image><br/><image file='predef.Image.Color.46.png' height='120' width='348'>colors.c.45.png</image><br/><image file='predef.Image.Color.47.png' height='120' width='348'>colors.c.46.png</image><br/><image file='predef.Image.Color.48.png' height='120' width='348'>colors.c.47.png</image><br/><image file='predef.Image.Color.49.png' height='120' width='348'>colors.c.48.png</image><br/><image file='predef.Image.Color.50.png' height='120' width='348'>colors.c.49.png</image><br/><image file='predef.Image.Color.51.png' height='120' width='348'>colors.c.50.png</image><br/><image file='predef.Image.Color.52.png' height='120' width='348'>colors.c.51.png</image><br/><image file='predef.Image.Color.53.png' height='120' width='348'>colors.c.52.png</image><br/><image file='predef.Image.Color.54.png' height='120' width='348'>colors.c.53.png</image><br/><image file='predef.Image.Color.55.png' height='120' width='348'>colors.c.54.png</image><br/><image file='predef.Image.Color.56.png' height='120' width='348'>colors.c.55.png</image><br/><image file='predef.Image.Color.57.png' height='120' width='348'>colors.c.56.png</image><br/><image file='predef.Image.Color.58.png' height='60' width='348'>colors.c.57.png</image><br/>
91b4751999-06-15Mirar (Pontus Hagland) </add_appendix></p>
3250c11999-04-13Mirar (Pontus Hagland)  <p>
431c431998-12-31Fredrik Hübinette (Hubbe) </p> </text>
3250c11999-04-13Mirar (Pontus Hagland) <group><note/><text> <p><tt>Image.Color["something"]</tt> will never(!) generate an error, but a zero_type 0, if the color is unknown. This is enough to give the error "not present in module", if used as <tt>Image.Color.something</tt>, though.</p> <p>If you are using colors from for instance a webpage, you might want to create the color from <ref resolved='predef::Image.Color.guess'>Image.Color.guess</ref>(), since that method is more tolerant for mistakes and errors.</p> <p><tt>Image.Color</tt>() is case- and space-sensitive. Use <ref resolved='predef::Image.Color.guess'>Image.Color.guess</ref>() to catch all variants.</p> <p>and subtract with a space (lower_case(x)-" ") to make sure you get all variants.</p> <p/> </text></group>
516e681996-02-26Fredrik Hübinette (Hubbe) <group><seealso/><text>
91b4751999-06-15Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Color.Color.name'>Image.Color.Color-&gt;name</ref>, <ref resolved='predef::Image.Color.Color.rgb'>Image.Color.Color-&gt;rgb</ref>, <ref>colors</ref>, <ref resolved='predef::Image.Color.Color'>Image.Color.Color</ref>, <ref resolved='predef::Image.Color.guess'>Image.Color.guess</ref>, <ref resolved='predef::Image.Image'>Image</ref>, <ref resolved='predef::Image.Colortable'>Image.Colortable</ref></p></text></group>
516e681996-02-26Fredrik Hübinette (Hubbe)  </doc>
9c0eaf1999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'>
3250c11999-04-13Mirar (Pontus Hagland) <method name='_indices'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <array><valuetype><string/></valuetype></array></returntype> <arguments>
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='_values'> <returntype> <array><valuetype><object resolved='predef::Image.Color._indices'/></valuetype></array></returntype> <arguments> </arguments> </method><doc> <text> <p>(ie as <tt>indices(Image.Color)</tt> or <tt>values(Image.Color)</tt>) <tt>indices</tt> gives a list of all the known color names, <tt>values</tt> gives there corresponding objects.</p> </text> <group><seealso/><text> <p><ref resolved='predef::Image.Color'>Image.Color</ref></p></text></group> </doc> </docgroup> <docgroup homogen-type='method'> <method name='rgb'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='red'><type><int/></type></argument> <argument name='intgreen'><type> <object resolved='predef::Image.Color.rgb'/></type></argument> <argument name='intblue'><type> <object resolved='predef::Image.Color.rgb'/></type></argument>
516e681996-02-26Fredrik Hübinette (Hubbe) 
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='hsv'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='hue'><type><int/></type></argument> <argument name='intsaturation'><type> <object resolved='predef::Image.Color.rgb'/></type></argument> <argument name='intvalue'><type> <object resolved='predef::Image.Color.rgb'/></type></argument>
516e681996-02-26Fredrik Hübinette (Hubbe) 
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='cmyk'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='c'><type><float/></type></argument> <argument name='m'><type><float/></type></argument> <argument name='y'><type><float/></type></argument> <argument name='k'><type><float/></type></argument>
516e681996-02-26Fredrik Hübinette (Hubbe) 
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='greylevel'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='level'><type><int/></type></argument>
516e681996-02-26Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='html'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='html_color'><type><string/></type></argument>
516e681996-02-26Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Creates a new color object from given red, green and blue, hue, saturation and value, or greylevel, in color value range. It could also be created from <i>cmyk</i> values in percent.</p>
516e681996-02-26Fredrik Hübinette (Hubbe) 
3250c11999-04-13Mirar (Pontus Hagland) <p>The <ref resolved='predef::Image.Color.html'>html</ref>() method only understands the HTML color names, or the <tt>#rrggbb</tt> form. It is case insensitive.
9c0eaf1999-04-13Mirar (Pontus Hagland) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text> <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the created object.</p>
516e681996-02-26Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='guess' homogen-type='method'> <method name='guess'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument><value>string</value></argument>
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>This is equivalent to <tt><ref resolved='predef::Image.Color'>Image.Color</ref>(lower_case(str)-" ")</tt>, and tries the color with a prepending '#' if no corresponding color is found. </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>a color object or zero_type</p>
516e681996-02-26Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <class name='Color'> <doc>
431c431998-12-31Fredrik Hübinette (Hubbe) <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>This is the color object. It has six readable variables, <tt>r</tt>, <tt>g</tt>, <tt>b</tt>, for the <i>red</i>, <i>green</i> and <i>blue</i> values, and <tt>h</tt>, <tt>s</tt>, <tt>v</tt>, for the <i>hue</i>, <i>saturation</i> anv <i>value</i> values.</p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text>
d8215a1996-09-22Fredrik Hübinette (Hubbe)  </doc>
fbd19d1999-10-21Mirar (Pontus Hagland) <docgroup homogen-name='_sprintf' homogen-type='method'> <method name='_sprintf'> <returntype><mixed/></returntype> <arguments><argument name='s'><type><string/></type></argument> <argument name='mappingflags'><type> <object resolved='predef::Image.Color.Color._sprintf'/></type></argument> </arguments> </method> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='`==' homogen-type='method'> <method name='`=='>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>int </object></returntype> <arguments><argument name='other_color'><type><object resolved='predef::Image.Color.Color.`=='/></type></argument>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`=='>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>int </object></returntype> <arguments><argument name='rgb'><type> <array><valuetype><int/></valuetype></array></type></argument>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`=='>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>int </object></returntype> <arguments><argument name='greylevel'><type><int/></type></argument>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`=='>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>int </object></returntype> <arguments><argument name='name'><type><string/></type></argument>
fceb841995-11-16David Hedbor 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><doc> <text> <p>Compares this object to another color, or color name. Example: <pre> object red=Image.Color.red; object other=Image.Color. ...; object black=Image.Color.black; if (red==other) ... if (red==({255,0,0})) ... if (black==0) ... if (red=="red") ... </pre> </p> </text> <group><returns/><text> <p>1 or 0</p> </text></group> <group><note/><text> <p>The other datatype (not color object) must be to the right!</p> </text></group> <group><seealso/><text> <p><ref resolved='predef::Image.Color.Color.`==.rgb'>rgb</ref>, <ref resolved='predef::Image.Color.Color.grey'>grey</ref>, <ref resolved='predef::Image.Color.Color.`==.name'>name</ref></p></text></group>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
3250c11999-04-13Mirar (Pontus Hagland) </doc> </docgroup> <docgroup homogen-type='method'> <method name='light'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments>
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='dark'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments>
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='neon'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments>
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='bright'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments>
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='dull'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments>
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments> </method><doc>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Color modification methods. These returns a new color. <table> <tr><th>method</th><th width='50%'>effect</th> <th>h</th><th>s</th><th>v</th><th>as</th></tr> <tr><td>light </td><td>raise light level</td><td>±0</td><td> ±0</td><td>+50</td>
fd3eba1999-06-22Mirar (Pontus Hagland) <td><image file='predef.Image.Color.Color.light.1.png' height='20' width='20'>colors.c58.png</image> <image file='predef.Image.Color.Color.light.2.png' height='20' width='20'>colors.c59.png</image> <image file='predef.Image.Color.Color.light.3.png' height='20' width='20'>colors.c60.png</image> <image file='predef.Image.Color.Color.light.4.png' height='20' width='20'>colors.c61.png</image></td></tr>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <tr><td>dark </td><td>lower light level</td><td>±0</td><td> ±0</td><td>-50</td>
fd3eba1999-06-22Mirar (Pontus Hagland) <td><image file='predef.Image.Color.Color.light.5.png' height='20' width='20'>colors.c62.png</image> <image file='predef.Image.Color.Color.light.6.png' height='20' width='20'>colors.c63.png</image> <image file='predef.Image.Color.Color.light.7.png' height='20' width='20'>colors.c64.png</image> <image file='predef.Image.Color.Color.light.8.png' height='20' width='20'>colors.c65.png</image></td></tr>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <tr><td>bright</td><td>brighter color </td><td>±0</td><td>+50</td><td>+50</td>
fd3eba1999-06-22Mirar (Pontus Hagland) <td><image file='predef.Image.Color.Color.light.9.png' height='20' width='20'>colors.c66.png</image> <image file='predef.Image.Color.Color.light.10.png' height='20' width='20'>colors.c67.png</image> <image file='predef.Image.Color.Color.light.11.png' height='20' width='20'>colors.c68.png</image> <image file='predef.Image.Color.Color.light.12.png' height='20' width='20'>colors.c69.png</image></td></tr>
3250c11999-04-13Mirar (Pontus Hagland)  <tr><td>dull </td><td>greyer color </td><td>±0</td><td>-50</td><td>-50</td>
fd3eba1999-06-22Mirar (Pontus Hagland) <td><image file='predef.Image.Color.Color.light.13.png' height='20' width='20'>colors.c70.png</image> <image file='predef.Image.Color.Color.light.14.png' height='20' width='20'>colors.c71.png</image> <image file='predef.Image.Color.Color.light.15.png' height='20' width='20'>colors.c72.png</image> <image file='predef.Image.Color.Color.light.16.png' height='20' width='20'>colors.c73.png</image></td></tr>
3250c11999-04-13Mirar (Pontus Hagland)  <tr><td>neon </td><td>set to extreme </td><td>±0</td><td>max</td><td>max</td>
fd3eba1999-06-22Mirar (Pontus Hagland) <td><image file='predef.Image.Color.Color.light.17.png' height='20' width='20'>colors.c74.png</image> <image file='predef.Image.Color.Color.light.18.png' height='20' width='20'>colors.c75.png</image></td></tr>
3250c11999-04-13Mirar (Pontus Hagland)  </table></p>
a9cad81999-05-20Mirar (Pontus Hagland)  <p><ref resolved='predef::Image.Color.Color.light'>light</ref> and <ref resolved='predef::Image.Color.Color.dark'>dark</ref> lower/highers saturation when value is min-/maximised respective. </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text>
3250c11999-04-13Mirar (Pontus Hagland) <group><returns/><text> <p>the new color object</p> </text></group>
431c431998-12-31Fredrik Hübinette (Hubbe) <group><note/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>The opposites may not always take each other out. The color is maximised at white and black levels, so, for instance <ref resolved='predef::Image.Color'>Image.Color</ref>.white-&gt;<ref resolved='predef::Image.Color.Color.light'>light</ref>()-&gt;<ref resolved='predef::Image.Color.Color.dark'>dark</ref>() doesn't give the white color back, but the equal to <ref resolved='predef::Image.Color'>Image.Color</ref>.white-&gt;<ref resolved='predef::Image.Color.Color.dark'>dark</ref>(), since white can't get any <ref resolved='predef::Image.Color.Color.light'>light</ref>er.</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
9c0eaf1999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='cast' homogen-type='method'> <method name='cast'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <or><array/><object>string </object></or></returntype> <arguments>
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments> </method><doc>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>cast the object to an array, representing red, green and blue (equal to <tt>-&gt;<ref resolved='predef::Image.Color.Color.rgb'>rgb</ref>()</tt>), or to a string, giving the name (equal to <tt>-&gt;<ref resolved='predef::Image.Color.Color.name'>name</ref>()</tt>).</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text>
3250c11999-04-13Mirar (Pontus Hagland) <group><returns/><text> <p>the name as string or rgb as array</p> </text></group> <group><seealso/><text> <p><ref resolved='predef::Image.Color.Color.rgb'>rgb</ref>, <ref resolved='predef::Image.Color.Color.name'>name</ref></p></text></group>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'> <method name='rgb'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <array><valuetype><int/></valuetype></array></returntype> <arguments> </arguments> </method><method name='hsv'> <returntype> <array><valuetype><int/></valuetype></array></returntype> <arguments> </arguments> </method><method name='cmyk'> <returntype> <array><valuetype><int/></valuetype></array></returntype> <arguments> </arguments> </method><method name='greylevel'> <returntype> <object>int </object></returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <arguments>
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='greylevel'> <returntype> <object>int </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='intg'><type> <object resolved='predef::Image.Color.Color.rgb'/></type></argument> <argument name='intb'><type> <object resolved='predef::Image.Color.Color.rgb'/></type></argument>
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
9c0eaf1999-04-13Mirar (Pontus Hagland) </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>This is methods of getting information from an <ref resolved='predef::Image.Color.Color'>Image.Color.Color</ref> object.</p> <p>They give an array of red, green and blue (rgb) values (color value),<br/> hue, saturation and value (hsv) values (range as color value), <br/> cyan, magenta, yellow, black (cmyk) values (in percent) <br/> or the greylevel value (range as color value).</p> <p>The greylevel is calculated by weighting red, green and blue. Default weights are 87, 127 and 41, respective, and could be given by argument. </p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text>
3250c11999-04-13Mirar (Pontus Hagland) <group><returns/><text> <p>array(int) respective int</p> </text></group> <group><seealso/><text> <p><ref resolved='predef::Image.Color.Color'>Image.Color.Color</ref>, <ref resolved='predef::Image.Color.Color.grey'>grey</ref></p></text></group>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
9c0eaf1999-04-13Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='create' homogen-type='method'> <method name='create'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>void </object></returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><doc> <text> <p>This is the main <ref resolved='predef::Image.Color.Color'>Image.Color.Color</ref> creation method, mostly for internal use. </p> </text> </doc> </docgroup> <docgroup homogen-name='grey' homogen-type='method'> <method name='grey'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments> </arguments> </method><method name='grey'> <returntype> <object>object </object></returntype> <arguments><argument name='red'><type><int/></type></argument> <argument name='green'><type><int/></type></argument> <argument name='blue'><type><int/></type></argument>
7629641995-11-06Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments> </method><doc>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Gives a new color, containing a grey color, which is calculated by the <ref resolved='predef::Image.Color.Color.greylevel'>greylevel</ref> method.</p> </text> <group><returns/><text> <p>a new <ref resolved='predef::Image.Color.Color'>Image.Color.Color</ref> object</p> </text></group> <group><seealso/><text> <p><ref resolved='predef::Image.Color.Color.greylevel'>greylevel</ref></p></text></group>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'> <method name='hex'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>string </object></returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <arguments> </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='hex'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>string </object></returntype> <arguments><argument name='n'><type><int/></type></argument>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='name'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>string </object></returntype> <arguments> </arguments> </method><method name='html'> <returntype> <object>string </object></returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <arguments> </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Information methods.</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Color.Color.hex'>hex</ref>() simply gives a string on the <tt>#rrggbb</tt> format. If <tt>n</tt> is given, the number of significant digits is set to this number. (Ie, <tt>n=3</tt> gives <tt>#rrrgggbbb</tt>.)</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Color.Color.name'>name</ref>() is a simplified method; if the color exists in the database, the name is returned, per default is the <ref resolved='predef::Image.Color.Color.hex'>hex</ref>() method use.</p> <p><ref resolved='predef::Image.Color.Color.html'>html</ref>() gives the <tt>HTML</tt> name of the color, or the <ref resolved='predef::Image.Color.Color.hex'>hex</ref>(2) if it isn't one of the 16 <tt>HTML</tt> colors.
9c0eaf1999-04-13Mirar (Pontus Hagland) </p> </text> <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>a new <ref resolved='predef::Image.Color.Color'>Image.Color.Color</ref> object</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text></group> <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Color.Color.rgb'>rgb</ref>, <ref resolved='predef::Image.Color.Color.hsv'>hsv</ref>, <ref resolved='predef::Image.Color'>Image.Color</ref></p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) </class> </module> <class name='Colortable'> <doc>
9c0eaf1999-04-13Mirar (Pontus Hagland) <text>
3250c11999-04-13Mirar (Pontus Hagland) <p> This object keeps colortable information, mostly for image re-coloring (quantization).</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>The object has color reduction, quantisation, mapping and dithering capabilities.
9c0eaf1999-04-13Mirar (Pontus Hagland) </p> </text>
3250c11999-04-13Mirar (Pontus Hagland) <group><seealso/><text> <p><ref resolved='predef::Image.Image'>Image</ref>, <ref resolved='predef::Image.Image'>Image.Image</ref>, <ref resolved='predef::Image.Font'>Image.Font</ref>, <ref resolved='predef::Image.GIF'>Image.GIF</ref></p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </doc>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'> <method name='map'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='image'><type><object resolved='predef::Image.Colortable.map'/></type></argument>
a9858a1996-10-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='`*'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='image'><type><object resolved='predef::Image.Colortable.map'/></type></argument>
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='``*'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='image'><type><object resolved='predef::Image.Colortable.map'/></type></argument>
a9858a1996-10-13Mirar (Pontus Hagland) 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='map'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='data'><type><string/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland) <argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument>
a9858a1996-10-13Mirar (Pontus Hagland) 
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`*'>
431c431998-12-31Fredrik Hübinette (Hubbe)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='data'><type><string/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland) <argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument> </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='``*'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='data'><type><string/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland) <argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument>
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments> </method><doc>
a9858a1996-10-13Mirar (Pontus Hagland) <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Map colors in an image object to the colors in the colortable, and creates a new image with the closest colors.</p>
a9858a1996-10-13Mirar (Pontus Hagland) 
9c0eaf1999-04-13Mirar (Pontus Hagland) <p><table><tr valign='center'> <td/>
3250c11999-04-13Mirar (Pontus Hagland) <td><image file='predef.Image.Colortable.map.1.png' height='115' width='80'>colortable.c6.png</image></td> <td><image file='predef.Image.Colortable.map.2.png' height='115' width='80'>colortable.c7.png</image></td> <td><image file='predef.Image.Colortable.map.3.png' height='115' width='80'>colortable.c8.png</image></td> <td><image file='predef.Image.Colortable.map.4.png' height='115' width='80'>colortable.c9.png</image></td> <td><image file='predef.Image.Colortable.map.5.png' height='115' width='80'>colortable.c10.png</image></td> <td>no dither</td> </tr><tr valign='center'>
9c0eaf1999-04-13Mirar (Pontus Hagland) <td/>
3250c11999-04-13Mirar (Pontus Hagland) <td><image file='predef.Image.Colortable.map.6.png' height='115' width='80'>colortable.c11.png</image></td> <td><image file='predef.Image.Colortable.map.7.png' height='115' width='80'>colortable.c12.png</image></td> <td><image file='predef.Image.Colortable.map.8.png' height='115' width='80'>colortable.c13.png</image></td> <td><image file='predef.Image.Colortable.map.9.png' height='115' width='80'>colortable.c14.png</image></td> <td><image file='predef.Image.Colortable.map.10.png' height='115' width='80'>colortable.c15.png</image></td> <td><ref resolved='predef::Image.Colortable.floyd_steinberg'>floyd_steinberg</ref> dither</td> </tr><tr valign='center'>
9c0eaf1999-04-13Mirar (Pontus Hagland) <td/>
3250c11999-04-13Mirar (Pontus Hagland) <td><image file='predef.Image.Colortable.map.11.png' height='115' width='80'>colortable.c16.png</image></td> <td><image file='predef.Image.Colortable.map.12.png' height='115' width='80'>colortable.c17.png</image></td> <td><image file='predef.Image.Colortable.map.13.png' height='115' width='80'>colortable.c18.png</image></td> <td><image file='predef.Image.Colortable.map.14.png' height='115' width='80'>colortable.c19.png</image></td> <td><image file='predef.Image.Colortable.map.15.png' height='115' width='80'>colortable.c20.png</image></td> <td><ref resolved='predef::Image.Colortable.ordered'>ordered</ref> dither</td> </tr><tr valign='center'> <td><image file='predef.Image.Colortable.map.16.png' height='115' width='80'>colortable.c21.png</image></td> <td><image file='predef.Image.Colortable.map.17.png' height='115' width='80'>colortable.c22.png</image></td> <td><image file='predef.Image.Colortable.map.18.png' height='115' width='80'>colortable.c23.png</image></td> <td><image file='predef.Image.Colortable.map.19.png' height='115' width='80'>colortable.c24.png</image></td> <td><image file='predef.Image.Colortable.map.20.png' height='115' width='80'>colortable.c25.png</image></td> <td><image file='predef.Image.Colortable.map.21.png' height='115' width='80'>colortable.c26.png</image></td> <td><ref resolved='predef::Image.Colortable.randomcube'>randomcube</ref> dither</td> </tr><tr valign='center'> <td>original</td> <td>2</td> <td>4</td> <td>8</td> <td>16</td> <td>32 colors</td>
9c0eaf1999-04-13Mirar (Pontus Hagland) </tr></table>
6130721996-11-01Fredrik Hübinette (Hubbe) </p> </text>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>a new image object</p> </text></group> <group><note/><text> <p>Flat (not cube) colortable and not '<ref resolved='predef::Image.Colortable.full'>full</ref>' method: this method does figure out the data needed for the lookup method, which may take time the first use of the colortable - the second use is quicker. </p>
a9858a1996-10-13Mirar (Pontus Hagland) </text></group>
431c431998-12-31Fredrik Hübinette (Hubbe) <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Colortable.cubicles'>cubicles</ref>, <ref resolved='predef::Image.Colortable.full'>full</ref></p></text></group>
a9858a1996-10-13Mirar (Pontus Hagland) 
b1a60f1999-04-12Per Hedbor </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='`+' homogen-type='method'> <method name='`+'>
361d6f1999-04-06Marcus Comstedt  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='with'><type><object resolved='predef::Image.Colortable.`+'/></type></argument> <argument><value>...</value></argument>
361d6f1999-04-06Marcus Comstedt  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>sums colortables</p>
361d6f1999-04-06Marcus Comstedt </text>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='with'/> <text><p><ref resolved='predef::Image.Colortable'>Colortable</ref> object with colors to add</p></text></group>
361d6f1999-04-06Marcus Comstedt <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the resulting new <ref resolved='predef::Image.Colortable'>Colortable</ref> object</p>
361d6f1999-04-06Marcus Comstedt </text></group> </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='`-' homogen-type='method'> <method name='`-'>
361d6f1999-04-06Marcus Comstedt  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='with'><type><object resolved='predef::Image.Colortable.`-'/></type></argument> <argument><value>...</value></argument>
361d6f1999-04-06Marcus Comstedt  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>subtracts colortables</p>
361d6f1999-04-06Marcus Comstedt </text>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='with'/> <text><p><ref resolved='predef::Image.Colortable'>Colortable</ref> object with colors to subtract</p></text></group>
361d6f1999-04-06Marcus Comstedt <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the resulting new <ref resolved='predef::Image.Colortable'>Colortable</ref> object</p>
361d6f1999-04-06Marcus Comstedt </text></group>
fa3d301999-04-09Marcus Comstedt  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'> <method name='create'>
fa3d301999-04-09Marcus Comstedt  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>void </object></returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <arguments>
fa3d301999-04-09Marcus Comstedt  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='create'>
fa3d301999-04-09Marcus Comstedt  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>void </object></returntype> <arguments><argument name='colors'><type> <array><valuetype> <array><valuetype><int/></valuetype></array></valuetype></array></type></argument>
fa3d301999-04-09Marcus Comstedt  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='create'> <returntype> <object>void </object></returntype> <arguments><argument name='image'><type> <object resolved='predef::Image.Image'>Image.Image</object></type></argument> <argument name='number'><type><int/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='create'> <returntype> <object>void </object></returntype> <arguments><argument name='image'><type> <object resolved='predef::Image.Image'>Image.Image</object></type></argument> <argument name='number'><type><int/></type></argument> <argument name='needed'><type> <array><valuetype> <array><valuetype><int/></valuetype></array></valuetype></array></type></argument>
361d6f1999-04-06Marcus Comstedt 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='create'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>void </object></returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='create'> <returntype> <object>void </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='array(int'><type> <object resolved='predef::Image.Colortable.create'/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='add'> <returntype> <object>object </object></returntype> <arguments><argument name='colors'><type> <array><valuetype> <array><valuetype><int/></valuetype></array></valuetype></array></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='add'> <returntype> <object>object </object></returntype> <arguments><argument name='image'><type> <object resolved='predef::Image.Image'>Image.Image</object></type></argument> <argument name='number'><type><int/></type></argument> </arguments> </method><method name='add'> <returntype> <object>object </object></returntype> <arguments><argument name='image'><type> <object resolved='predef::Image.Image'>Image.Image</object></type></argument> <argument name='number'><type><int/></type></argument> <argument name='needed'><type> <array><valuetype> <array><valuetype><int/></valuetype></array></valuetype></array></type></argument> </arguments> </method><method name='add'> <returntype> <object>object </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> </arguments> </method><method name='add'> <returntype> <object>object </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='array(int'><type> <object resolved='predef::Image.Colortable.create'/></type></argument> </arguments> </method><doc>
9c0eaf1999-04-13Mirar (Pontus Hagland) <text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Colortable.create'>create</ref> initiates a colortable object. Default is that no colors are in the colortable.</p>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Colortable.add'>add</ref> takes the same argument(s) as <ref resolved='predef::Image.Colortable.create'>create</ref>, thus adding colors to the colortable.</p>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>The colortable is mostly a list of colors, or more advanced, colors and weight.</p>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>The colortable could also be a colorcube, with or without additional scales. A colorcube is the by-far fastest way to find colors.</p>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>Example: <pre> ct=colortable(my_image,256); // the best 256 colors ct=colortable(my_image,256,({0,0,0})); // black and the best other 255 ct=colortable(({({0,0,0}),({255,255,255})})); // black and white ct=colortable(6,7,6); // a colortable of 252 colors ct=colortable(7,7,5, ({0,0,0}),({255,255,255}),11); // a colorcube of 245 colors, and a greyscale of the rest -&gt; 256 </pre>
1755091999-04-13Mirar (Pontus Hagland) </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text>
3250c11999-04-13Mirar (Pontus Hagland) <group> <param name='colors'/> <text><p>list of colors</p></text></group> <group> <param name='image'/> <text><p>source image </p></text></group> <group> <param name='number'/> <text><p>number of colors to get from the image</p> <p>0 (zero) gives all colors in the image.</p> <p>Default value is 256.</p></text></group> <group> <param name='needed'/> <text><p>needed colors (to optimize selection of others to these given)</p> <p>this will add to the total number of colors (see argument 'number')</p></text></group> <group> <param name='r'/> <param name='g'/> <param name='b'/> <text><p>size of sides in the colorcube, must (of course) be equal or larger than 2 - if smaller, the cube is ignored (no colors). This could be used to have only scales (like a greyscale) in the output.</p></text></group> <group> <param name='fromi'/> <param name='toi'/> <param name='stepi'/> <text><p>This is to add the possibility of adding a scale of colors to the colorcube; for instance a grayscale using the arguments <tt>({0,0,0}),({255,255,255}),17</tt>, adding a scale from black to white in 17 or more steps.</p> <p>Colors already in the cube is used again to add the number of steps, if possible.</p> <p>The total number of colors in the table is therefore <tt>r*b*g+step1+...+stepn</tt>.</p></text></group> <group><note/><text> <p>max hash size is (probably, set by a <tt>#define</tt>) 32768 entries, giving maybe half that number of colors as maximum.</p> </text></group>
a44f221996-02-24Fredrik Hübinette (Hubbe) 
a1c5881995-08-09Fredrik Hübinette (Hubbe) </doc>
3250c11999-04-13Mirar (Pontus Hagland) </docgroup> <docgroup homogen-name='cast' homogen-type='method'> <method name='cast'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='to'><type><string/></type></argument>
431c431998-12-31Fredrik Hübinette (Hubbe)  </arguments> </method><doc>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>cast the colortable to an array or mapping, the array consists of <ref resolved='predef::Image.Color'>Image.Color</ref> objects and are not in index order. The mapping consists of index:<ref resolved='predef::Image.Color'>Image.Color</ref> pairs, where index is the index (int) of that color.</p>
431c431998-12-31Fredrik Hübinette (Hubbe) 
3250c11999-04-13Mirar (Pontus Hagland) <p>example: <tt>(mapping)Image.Colortable(img)</tt>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </text>
3250c11999-04-13Mirar (Pontus Hagland) <group> <param name='to'/> <text><p>must be "string", "array" or "mapping".</p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) </doc> </docgroup> <docgroup homogen-name='corners' homogen-type='method'> <method name='corners'> <returntype> <array><valuetype><object resolved='predef::Image.Colortable.corners'/></valuetype></array></returntype> <arguments> </arguments> </method><doc> <text> <p>Gives the eight corners in rgb colorspace as an array. The "black" and "white" corners are the first two.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='cubicles' homogen-type='method'> <method name='cubicles'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments> </arguments> </method><method name='cubicles'> <returntype> <object>object </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='cubicles'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='accuracy'><type><int/></type></argument>
3d992e1997-04-09Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Set the colortable to use the cubicles algorithm to lookup the closest color. This is a mostly very fast and very accurate way to find the correct color, and the default algorithm.</p>
0f05e51997-11-07Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p> The colorspace is divided in small cubes, each cube containing the colors in that cube. Each cube then gets a list of the colors in the cube, and the closest from the corners and midpoints between corners.</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>When a color is needed, the algorithm first finds the correct cube and then compares with all the colors in the list for that cube.</p> <p>example: <tt>colors=Image.Colortable(img)-&gt;cubicles();</tt></p> <p>algorithm time: between O[m] and O[m * n], where n is numbers of colors and m is number of pixels</p> <p>The arguments can be heavy trimmed for the usage of your colortable; a large number (10×10×10 or bigger) of cubicles is recommended when you use the colortable repeatedly, since the calculation takes much more time than usage.</p> <p>recommended values:</p>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <p><pre>
3250c11999-04-13Mirar (Pontus Hagland) image size setup 100×100 cubicles(4,5,4) (default) 1000×1000 cubicles(12,12,12) (factor 2 faster than default)
9c0eaf1999-04-13Mirar (Pontus Hagland) </pre></p>
3250c11999-04-13Mirar (Pontus Hagland) <p>In some cases, the <ref resolved='predef::Image.Colortable.full'>full</ref> method is faster.</p> <p><table><tr valign='center'> <td><image file='predef.Image.Colortable.cubicles.1.png' height='115' width='80'>colortable.c0.png</image></td> <td><image file='predef.Image.Colortable.cubicles.2.png' height='115' width='80'>colortable.c1.png</image></td> <td><image file='predef.Image.Colortable.cubicles.3.png' height='115' width='80'>colortable.c2.png</image></td> </tr><tr valign='center'> <td>original</td> <td>default cubicles,<br/>16 colors</td> <td>accuracy=200</td> </tr></table> </p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='r'/> <param name='g'/> <param name='b'/> <text><p>Size, ie how much the colorspace is divided. Note that the size of each cubicle is at least about 8b, and that it takes time to calculate them. The number of cubicles are <tt>r*g*b</tt>, and default is 4,5,4, ie 80 cubicles. This works good for 200±100 colors. </p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='accuracy'/> <text><p>Accuracy when checking sides of cubicles. Default is 16. A value of 1 gives complete accuracy, ie cubicle() method gives exactly the same result as full(), but takes (in worst case) 16× the time to calculate.
9c0eaf1999-04-13Mirar (Pontus Hagland) </p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the called object</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text></group> <group><note/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>this method doesn't figure out the cubicles, this is done on the first use of the colortable.</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>Not applicable to colorcube types of colortable.</p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text></group>
0f05e51997-11-07Mirar (Pontus Hagland) 
431c431998-12-31Fredrik Hübinette (Hubbe) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='floyd_steinberg' homogen-type='method'> <method name='floyd_steinberg'>
0f05e51997-11-07Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments> </arguments> </method><method name='floyd_steinberg'> <returntype> <object>object </object></returntype> <arguments><argument name='bidir'><type><int/></type></argument> <argument name='forward'><type> <or><int/><float/></or></type></argument> <argument name='downforward'><type> <or><int/><float/></or></type></argument> <argument name='down'><type> <or><int/><float/></or></type></argument> <argument name='downback'><type> <or><int/><float/></or></type></argument> <argument name='factor'><type> <or><int/><float/></or></type></argument>
0f05e51997-11-07Mirar (Pontus Hagland)  </arguments>
9c0eaf1999-04-13Mirar (Pontus Hagland) </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Set dithering method to floyd_steinberg.</p> <p>The arguments to this method is for fine-tuning of the algorithm (for computer graphics wizards).</p> <p><table><tr valign='center'> <td><image file='predef.Image.Colortable.floyd_steinberg.1.png' height='115' width='80'>colortable.c3.png</image></td> <td><image file='predef.Image.Colortable.floyd_steinberg.2.png' height='115' width='80'>colortable.c4.png</image></td> <td><image file='predef.Image.Colortable.floyd_steinberg.3.png' height='115' width='80'>colortable.c5.png</image></td> </tr><tr valign='center'> <td>original</td> <td>floyd_steinberg to a 4×4×4 colorcube</td> <td>floyd_steinberg to 16 chosen colors</td> </tr></table>
9c0eaf1999-04-13Mirar (Pontus Hagland) </p> </text> <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='bidir'/> <text><p>Set algorithm direction of forward. -1 is backward, 1 is forward, 0 for toggle of direction each line (default).</p></text></group> <group> <param name='forward'/> <param name='downforward'/> <param name='down'/> <param name='downback'/> <text><p>Set error correction directions. Default is forward=7, downforward=1, down=5, downback=3.</p></text></group> <group> <param name='factor'/> <text><p>Error keeping factor. Error will increase if more than 1.0 and decrease if less than 1.0. A value of 0.0 will cancel any dither effects. Default is 0.95.</p></text></group> <group><returns/><text> <p>the called object</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text></group>
1755091999-04-13Mirar (Pontus Hagland) 
9c0eaf1999-04-13Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='full' homogen-type='method'> <method name='full'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments>
0f05e51997-11-07Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Set the colortable to use full scan to lookup the closest color.</p> <p>example: <tt>colors=Image.Colortable(img)-&gt;full();</tt></p> <p>algorithm time: O[n*m], where n is numbers of colors and m is number of pixels
0f05e51997-11-07Mirar (Pontus Hagland) </p> </text>
3250c11999-04-13Mirar (Pontus Hagland) <group><returns/><text> <p>the called object</p> </text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><note/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Not applicable to colorcube types of colortable.</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Colortable.cubicles'>cubicles</ref>, <ref resolved='predef::Image.Colortable.map'>map</ref></p></text></group>
cc02261999-04-06Per Hedbor 
19c0971999-04-10Per Hedbor </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='image' homogen-type='method'> <method name='image'>
19c0971999-04-10Per Hedbor  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments>
19c0971999-04-10Per Hedbor  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>cast the colortable to an image object</p> <p>each pixel in the image object is an entry in the colortable
9c0eaf1999-04-13Mirar (Pontus Hagland) </p>
19c0971999-04-10Per Hedbor </text>
3250c11999-04-13Mirar (Pontus Hagland) <group><returns/><text> <p>the resulting image object</p> </text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) </doc> </docgroup> <docgroup homogen-name='nodither' homogen-type='method'> <method name='nodither'> <returntype> <object>object </object></returntype> <arguments> </arguments> </method><doc> <text> <p>Set no dithering (default). </p> </text> <group><returns/><text> <p>the called object</p>
1755091999-04-13Mirar (Pontus Hagland) </text></group>
19c0971999-04-10Per Hedbor 
cc02261999-04-06Per Hedbor </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='ordered' homogen-type='method'> <method name='ordered'>
cc02261999-04-06Per Hedbor  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments> </arguments> </method><method name='ordered'> <returntype> <object>object </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
cc02261999-04-06Per Hedbor  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='ordered'>
9101991997-04-03Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument>
9101991997-04-03Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='ordered'>
9101991997-04-03Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument> <argument name='x'><type><int/></type></argument> <argument name='y'><type><int/></type></argument> </arguments> </method><method name='ordered'> <returntype> <object>object </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument> <argument name='rx'><type><int/></type></argument> <argument name='ry'><type><int/></type></argument> <argument name='gx'><type><int/></type></argument> <argument name='gy'><type><int/></type></argument> <argument name='bx'><type><int/></type></argument> <argument name='by'><type><int/></type></argument>
9101991997-04-03Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Set ordered dithering, which gives a position-dependent error added to the pixel values.</p>
431c431998-12-31Fredrik Hübinette (Hubbe) 
3250c11999-04-13Mirar (Pontus Hagland) <p><table><tr valign='center'> <td><image file='predef.Image.Colortable.ordered.1.png' height='115' width='80'>colortable.c27.png</image></td> <td><image file='predef.Image.Colortable.ordered.2.png' height='115' width='80'>colortable.c28.png</image></td> <td><image file='predef.Image.Colortable.ordered.3.png' height='115' width='80'>colortable.c29.png</image></td> <td><image file='predef.Image.Colortable.ordered.4.png' height='115' width='80'>colortable.c30.png</image></td> </tr><tr valign='top'> <td>original</td> <td colspan='2'>mapped to <br/><tt>Image.Colortable(6,6,6)-&gt;</tt></td> </tr><tr valign='top'> <td/> <td><tt>ordered<br/> (42,42,42,2,2)</tt></td> <td><tt>ordered()</tt></td> <td><tt>ordered<br/> (42,42,42, 8,8,<br/> 0,0, 0,1, 1,0)</tt></td> </tr><tr valign='top'> <td><image file='predef.Image.Colortable.ordered.5.png' height='115' width='80'>colortable.c31.png</image></td> <td><image file='predef.Image.Colortable.ordered.6.png' height='115' width='80'>colortable.c32.png</image></td> <td><image file='predef.Image.Colortable.ordered.7.png' height='115' width='80'>colortable.c33.png</image></td> <td><image file='predef.Image.Colortable.ordered.8.png' height='115' width='80'>colortable.c34.png</image></td> </tr></table> </p>
9101991997-04-03Mirar (Pontus Hagland) </text>
3250c11999-04-13Mirar (Pontus Hagland) <group> <param name='r'/> <param name='g'/> <param name='b'/> <text><p>The maximum error. Default is 32, or colorcube steps (256/size). </p></text></group> <group> <param name='xsize'/> <param name='ysize'/> <text><p>Size of error matrix. Default is 8×8. Only values which factors to multiples of 2 and 3 are possible to choose (2,3,4,6,8,12,...). </p></text></group> <group> <param name='x'/> <param name='y'/> <param name='rx'/> <param name='ry'/> <param name='gx'/> <param name='gy'/> <param name='bx'/> <param name='by'/> <text><p>Offset for the error matrix. <tt>x</tt> and <tt>y</tt> is for both red, green and blue values, the other is individual. </p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the called object</p>
431c431998-12-31Fredrik Hübinette (Hubbe) </text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Colortable.randomcube'>randomcube</ref>, <ref resolved='predef::Image.Colortable.nodither'>nodither</ref>, <ref resolved='predef::Image.Colortable.floyd_steinberg'>floyd_steinberg</ref>, <ref resolved='predef::Image.Colortable.create'>create</ref></p></text></group>
431c431998-12-31Fredrik Hübinette (Hubbe)  </doc> </docgroup>
9c0eaf1999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'>
3250c11999-04-13Mirar (Pontus Hagland) <method name='randomcube'>
9101991997-04-03Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='randomcube'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
9101991997-04-03Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='randomgrey'>
9101991997-04-03Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments>
9101991997-04-03Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='randomgrey'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='err'><type><int/></type></argument>
9101991997-04-03Mirar (Pontus Hagland) 
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><doc> <text> <p>Set random cube dithering. Color choosen is the closest one to color in picture plus (flat) random error; <tt>color±random(error)</tt>.</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>The randomgrey method uses the same random error on red, green and blue and the randomcube method has three random errors.</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><table><tr valign='center'> <td><image file='predef.Image.Colortable.randomcube.1.png' height='115' width='80'>colortable.c35.png</image></td> <td><image file='predef.Image.Colortable.randomcube.2.png' height='115' width='80'>colortable.c36.png</image></td> <td><image file='predef.Image.Colortable.randomcube.3.png' height='115' width='80'>colortable.c37.png</image></td> </tr><tr valign='top'> <td>original</td> <td colspan='2'>mapped to <br/><tt>Image.Colortable(4,4,4)-&gt;</tt></td> </tr><tr valign='top'> <td/> <td>randomcube()</td> <td>randomgrey()</td> </tr><tr valign='top'> <td><image file='predef.Image.Colortable.randomcube.4.png' height='115' width='80'>colortable.c38.png</image></td> <td><image file='predef.Image.Colortable.randomcube.5.png' height='115' width='80'>colortable.c39.png</image></td> <td><image file='predef.Image.Colortable.randomcube.6.png' height='115' width='80'>colortable.c40.png</image></td> </tr></table> </p> </text> <group> <param name='r'/> <param name='g'/> <param name='b'/> <param name='err'/> <text><p>The maximum error. Default is 32, or colorcube step. </p></text></group> <group><returns/><text> <p>the called object</p> </text></group> <group><note/><text> <p><ref resolved='predef::Image.Colortable.randomgrey'>randomgrey</ref> method needs colorcube size to be the same on red, green and blue sides to work properly. It uses the red colorcube value as default.</p> </text></group> <group><seealso/><text> <p><ref resolved='predef::Image.Colortable.ordered'>ordered</ref>, <ref resolved='predef::Image.Colortable.nodither'>nodither</ref>, <ref resolved='predef::Image.Colortable.floyd_steinberg'>floyd_steinberg</ref>, <ref resolved='predef::Image.Colortable.create'>create</ref></p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) </doc> </docgroup> <docgroup homogen-type='method'> <method name='reduce'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='colors'><type><int/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='reduce_fs'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='colors'><type><int/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>reduces the number of colors</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>All needed (see <ref resolved='predef::Image.Colortable.create'>create</ref>) colors are kept.</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Colortable.reduce_fs'>reduce_fs</ref> creates and keeps the outmost corners of the color space, to improve floyd-steinberg dithering result. (It doesn't work very well, though.)
9101991997-04-03Mirar (Pontus Hagland) </p> </text>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group> <param name='colors'/>
3250c11999-04-13Mirar (Pontus Hagland) <text><p>target number of colors
9c0eaf1999-04-13Mirar (Pontus Hagland) </p></text></group>
3250c11999-04-13Mirar (Pontus Hagland) <group><returns/><text> <p>the new <ref resolved='predef::Image.Colortable'>Colortable</ref> object</p> </text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><note/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>this algorithm assumes all colors are different to begin with (!)</p> <p><ref resolved='predef::Image.Colortable.reduce_fs'>reduce_fs</ref> keeps the "corners" as "needed colors". </p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text></group>
3250c11999-04-13Mirar (Pontus Hagland) <group><seealso/><text> <p><ref resolved='predef::Image.Colortable.corners'>corners</ref></p></text></group>
9101991997-04-03Mirar (Pontus Hagland)  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='rigid' homogen-type='method'> <method name='rigid'>
9101991997-04-03Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
1755091999-04-13Mirar (Pontus Hagland)  <arguments>
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='rigid'> <returntype> <object>object </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
9c0eaf1999-04-13Mirar (Pontus Hagland) </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Set the colortable to use the "rigid" method of looking up colors.</p> <p>This is a very simple way of finding the correct color. The algorithm initializes a cube with <tt>r</tt> x <tt>g</tt> x <tt>b</tt> colors, where every color is chosen by closest match to the corresponding coordinate.</p> <p>This format is not recommended for exact match, but may be usable when it comes to quickly view pictures on-screen.</p> <p>It has a high init-cost and low use-cost. The structure is initiated at first usage.
9c0eaf1999-04-13Mirar (Pontus Hagland) </p> </text> <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the called object</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text></group> <group><note/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Not applicable to colorcube types of colortable.</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text></group> <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Colortable.cubicles'>cubicles</ref>, <ref resolved='predef::Image.Colortable.map'>map</ref>, <ref resolved='predef::Image.Colortable.full'>full</ref></p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='spacefactors' homogen-type='method'> <method name='spacefactors'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='r'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
9101991997-04-03Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Colortable tuning option, this sets the color space distance factors. This is used when comparing distances in the colorspace and comparing grey levels.</p>
431c431998-12-31Fredrik Hübinette (Hubbe) 
3250c11999-04-13Mirar (Pontus Hagland) <p>Default factors are 3, 4 and 1; blue is much darker than green. Compare with <ref resolved='predef::Image.Image.grey'>Image.Image-&gt;grey</ref>().
431c431998-12-31Fredrik Hübinette (Hubbe) </p>
9101991997-04-03Mirar (Pontus Hagland) </text>
1755091999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the called object</p>
9101991997-04-03Mirar (Pontus Hagland) </text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><note/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>This has no sanity check. Some functions may bug if the factors are to high - color reduction functions sums grey levels in the image, this could exceed maxint in the case of high factors. Negative values may also cause strange effects. *grin*</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text></group> </doc>
9101991997-04-03Mirar (Pontus Hagland) </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) </class> <class name='Font'> <doc>
9101991997-04-03Mirar (Pontus Hagland) <text>
3250c11999-04-13Mirar (Pontus Hagland) <p/>
9101991997-04-03Mirar (Pontus Hagland) </text>
3250c11999-04-13Mirar (Pontus Hagland) <group><note/><text> <p>Short technical documentation on a font file: This object adds the text-drawing and -creation capabilities of the <ref resolved='predef::Image.Image'>Image</ref> module.</p>
9101991997-04-03Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>For simple usage, see <ref resolved='predef::Image.Font.write'>write</ref> and <ref resolved='predef::Image.Font.load'>load</ref>.</p>
5e9ad71998-04-15Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>other methods: <ref resolved='predef::Image.Font.baseline'>baseline</ref>, <ref resolved='predef::Image.Font.height'>height</ref>, <ref resolved='predef::Image.Font.set_xspacing_scale'>set_xspacing_scale</ref>, <ref resolved='predef::Image.Font.set_yspacing_scale'>set_yspacing_scale</ref>, <ref resolved='predef::Image.Font.text_extents'>text_extents</ref></p>
5e9ad71998-04-15Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><pre> struct file_head { unsigned INT32 cookie; - 0x464f4e54 unsigned INT32 version; - 1 unsigned INT32 chars; - number of chars unsigned INT32 height; - height of font unsigned INT32 baseline; - font baseline unsigned INT32 o[1]; - position of char_head's } *fh; struct char_head { unsigned INT32 width; - width of this character unsigned INT32 spacing; - spacing to next character unsigned char data[1]; - pixmap data (1byte/pixel) } *ch; version 2: On-disk syntax (everything in N.B.O), int is 4 bytes, a byte is 8 bits: pos 0 int cookie = 'FONT'; or 0x464f4e54 4 int version = 2; 1 was the old version without the last four chars 8 int numchars; Always 256 in this version of the dump program 12 int height; in (whole) pixels 16 int baseline; in (whole) pixels 20 char direction; 1==right to left, 0 is left to right 21 char format; Font format 22 char colortablep; Colortable format 23 char kerningtablep; Kerning table format 24 int offsets[numchars]; pointers into the data, realative to &amp;cookie. [colortable] [kerningtable] At each offset: 0 int width; in pixels 4 int spacing; in 1/1000:th of a pixels 8 char data[]; Enough data to plot width * font-&gt;height pixels Please note that if width is 0, there is no data. Font formats: id type 0 Raw 8bit data 1 RLE encoded data, char length, char data, 70% more compact than raw data 2 ZLib compressed data 60% more compact than RLE Colortable types: 0 No colortable (the data is an alpha channel) 1 24bit RGB with alpha (index-&gt;color, 256*4 bytes, rgba) 2 8bit Greyscale with alpha (index-&gt;color, 256*2 bytes) Kerningtable types: 0 No kerning table 1 numchars*numchars entries, each a signed char with the kerning value 2 numchar entries, each with a list of kerning pairs, like this: int len len * (short char, short value) **! </pre> </p> </text></group> <group><seealso/><text> <p><ref resolved='predef::Image.Image'>Image</ref>, <ref resolved='predef::Image.Image'>Image.Image</ref></p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) </doc> <docgroup homogen-name='baseline' homogen-type='method'> <method name='baseline'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>int </object></returntype> <arguments>
5e9ad71998-04-15Mirar (Pontus Hagland)  </arguments> </method><doc>
3250c11999-04-13Mirar (Pontus Hagland) <group><returns/><text> <p>font baseline (pixels from top)</p>
5e9ad71998-04-15Mirar (Pontus Hagland) </text></group> <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Font.height'>height</ref>, <ref resolved='predef::Image.Font.text_extents'>text_extents</ref></p></text></group>
431c431998-12-31Fredrik Hübinette (Hubbe)  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='create' homogen-type='method'> <method name='create'>
9101991997-04-03Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>void </object></returntype> <arguments><argument name='filename'><type><string/></type></argument>
9101991997-04-03Mirar (Pontus Hagland)  </arguments>
1755091999-04-13Mirar (Pontus Hagland) </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Loads a font file to this font object. Similar to <ref resolved='predef::Image.Font.load'>load</ref>().</p>
1755091999-04-13Mirar (Pontus Hagland) </text>
9101991997-04-03Mirar (Pontus Hagland) 
1755091999-04-13Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'> <method name='height'>
26c8521997-03-25Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>int </object></returntype>
1755091999-04-13Mirar (Pontus Hagland)  <arguments>
26c8521997-03-25Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='text_extents'> <returntype> <array><valuetype><int/></valuetype></array></returntype> <arguments><argument name='text'><type><string/></type></argument> <argument><value>...</value></argument> </arguments>
26c8521997-03-25Mirar (Pontus Hagland) </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Calculate extents of a text-image, that would be created by calling <ref resolved='predef::Image.Font.write'>write</ref> with the same arguments.</p>
26c8521997-03-25Mirar (Pontus Hagland) </text>
3250c11999-04-13Mirar (Pontus Hagland) <group> <param name='text, ...'/> <text><p>One or more lines of text.</p></text></group>
26c8521997-03-25Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>an array of width and height</p>
26c8521997-03-25Mirar (Pontus Hagland) </text></group>
3250c11999-04-13Mirar (Pontus Hagland) <group><seealso/><text> <p><ref resolved='predef::Image.Font.baseline'>baseline</ref>, <ref resolved='predef::Image.Font.text_extents'>text_extents</ref>, <ref resolved='predef::Image.Font.write'>write</ref>, <ref resolved='predef::Image.Font.height'>height</ref>, <ref resolved='predef::Image.Font.baseline'>baseline</ref></p></text></group>
26c8521997-03-25Mirar (Pontus Hagland) 
28e5681999-04-06Per Hedbor </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='load' homogen-type='method'> <method name='load'>
28e5681999-04-06</