diff --git a/src/modules/gdbmmod/doc/gdbm b/src/modules/gdbmmod/doc/gdbm deleted file mode 100644 index ddf660a79389a58a1644428b22f3b07b92d9a9e4..0000000000000000000000000000000000000000 --- a/src/modules/gdbmmod/doc/gdbm +++ /dev/null @@ -1,150 +0,0 @@ -NAME - /precompiled/gdbm - database interface - -DESCRIPTION - 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. - - 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. - -============================================================================ -NAME - create - open database - -SYNTAX - int gdbm->create(); - or - int gdbm->create(string file); - or - int gdbm->create(string file, string mode); - -DESCRIPTION - 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: - - r open database for reading - w open database for writing - c create database if it does not exist - t overwrite existing database - f fast mode - - 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. - - The default mode is "rwc". - -NOTA BENE - 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. - -============================================================================ -NAME - close - close database - -SYNTAX - void gdbm->close(); - -DESCRIPTION - This closes the database. - -============================================================================ -NAME - store - store a value in the database - -SYNTAX - int gdbm->store(string key, string data); - -DESCRIPTION - 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. - -============================================================================ -NAME - fetch - fetch a value from the databse - -SYNTAX - string gdbm->fetch(string key); - -DESCRIPTION - Return the data associated with the key 'key' in the database. - If there was no such key in the database, zero is returned. - -============================================================================ -NAME - delete - delete a value from the database - -SYNTAX - int gdbm->delete(string key); - -DESCRIPTION - Remove a key from the database. Note that no error will be generated - if the key does not exist. - -============================================================================ -NAME - firstkey - get first key in database - -SYNTAX - string gdbm->firstkey(); - -DESCRIPTION - Return the first key in the database, this can be any key in the - database. - -============================================================================ -NAME - nextkey - get next key in database - -SYNTAX - string gdbm->nextkey(string key); - -DESCRIPTION - 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. - -EXAMPLE - /* Write the contents of the database */ - for(key=gdbm->firstkey(); k; k=gdbm->nextkey(k)) - write(k+":"+gdbm->fetch(k)+"\n"); - -============================================================================ -NAME - reorganize - reorganize database - -SYNTAX - int gdbm->reorganize(); - -DESCRIPTION - 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. - -============================================================================ -NAME - sync - synchronize database - -SYNTAX - void gdbm->sync(); - -DESCRIPTION - 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. - -============================================================================ diff --git a/src/modules/gmpmod/doc/mpz b/src/modules/gmpmod/doc/mpz deleted file mode 100644 index 2b4c0bc67e9772761fb52f512397cf08b2198f03..0000000000000000000000000000000000000000 --- a/src/modules/gmpmod/doc/mpz +++ /dev/null @@ -1,136 +0,0 @@ -NAME - /precompiled/mpz - bignum program - -DESCRIPTION - /precompiled/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. - - The mpz object implements all the normal integer operations. - (except xor) There are also some extra operators: - -NOTA BENE - This module is only available if libgmp.a was available and - found when Pike was compiled. - -============================================================================ -NAME - create - initialize a bignum - -SYNTAX - object Mpz(); - or - object Mpz(int|object|float i); - or - object Mpz(string digits, int base); - - -DESCRIPTION - 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. - -SEE ALSO - builtin/clone - -============================================================================ -NAME - powm - raise and modulo - -SYNTAX - object mpz->powm(int|string|float|object a,int|string|float|object b); - -DESCRIPTION - This function returns ( mpz ** a ) % b - -============================================================================ -NAME - sqrt - square root - -SYNTAX - object mpz->sqrt(); - -DESCRIPTION - This function return the the truncated integer part of the square - root of the value of mpz. - -============================================================================ -NAME - probably_prime_p - is this number a prime? - -SYNTAX - int mpz->probably_prime_p(); - -DESCRIPTION - This function returns 1 if mpz is a prime, and 0 most of the time - if it is not. - -============================================================================ -NAME - gcd - greatest common divisor - -SYNTAX - object mpz->gcd(object|int|float|string arg) - -DESCRIPTION - This function returns the greatest common divisor for arg and mpz. - -============================================================================ -NAME - cast - cast to other type - -SYNTAX - object mpz->gcd( "string" | "int" | "float" ); - or - (string) mpz - or - (int) mpz - or - (float) mpz - - -DESCRIPTION - 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. - -SEE ALSO - cast - -============================================================================ -NAME - digits - convert mpz to a string - -SYNTAX - string mpz->digits(); - or - string mpz->digits(int base); - -DESCRIPTION - 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. - -SEE ALSO - mpz->cast - -============================================================================ -NAME - size - how long is a number - -SYNTAX - string mpz->size(); - or - string mpz->size(int base); - -DESCRIPTION - This function returns how long the mpz would be represented in the - specified base. The default base is 2. - -SEE ALSO - mpz->digits - -============================================================================ diff --git a/src/modules/image/doc/image.html b/src/modules/image/doc/image.html deleted file mode 100644 index 10dca57176c0858f7754b0d1aa597b9fac189827..0000000000000000000000000000000000000000 --- a/src/modules/image/doc/image.html +++ /dev/null @@ -1,568 +0,0 @@ -<!-- $id$ --> - -<center> -<i>Pike module: </i> -<h1>image</h1> -Pontus Hagland <a href=law@infovav.se><i>law@infovav.se</i></a> -<br>Per Hedbor <a href=per@infovav.se><i>per@infovav.se</i></a> -<br>David K�gedal <a href=kg@infovav.se><i>kg@infovav.se</i></a> -</center> - -<hr> - -This package adds two Pike progams: - -<ul> -<li><tt><a href=#image>"precompiled/image"</a></tt> and -<li><tt><a href=#font>"precompiled/font"</a></tt>. -</ul> - -<hr> - -<a name=image><h2>methods in precompiled/image:</h2></a> - -Methods resulting in a new object: - -<br><a name=cloner><tt>object <a href=#clone><b>clone</b></a>( </tt>[<tt>int <b>xsize</b>,int <b>ysize</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b></tt>]<tt> </b>);</tt></a> -<p><a name=copyr><tt>object <a href=#copy><b>copy</b></a>( </tt>[<tt>int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b></tt>]<tt> </b>);</tt></a> -<br><a name=autocropr><tt>object <a href=#autocrop><b>autocrop</b></a>( </tt>[<tt>int <b>border_width</b> </tt>[<tt>,int <b>left</b>,int <b>right</b>,int <b>top</b>,int <b>bottom</b></tt>]<tt></b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b></tt>]<tt> </b>);</tt></a> -<p><a name=grayr><tt>object <a href=#gray><b>gray</b></a>();</tt></a> -<br><a name=colorr><tt>object <a href=#color><b>color</b></a>(int <b>r</b>,int <b>g</b>,int <b>b</b>);</tt></a> -<br><a name=invertr><tt>object <a href=#invert><b>invert</b></a>();</tt></a> - -<p><a name=mirrorxr><tt>object <a href=#mirrorx><b>mirrorx</b></a>(void);</tt></a> -<br><a name=mirroryr><tt>object <a href=#mirrory><b>mirrory</b></a>(void);</tt></a> -<br><a name=rotate_cwr><tt>object <a href=#rotate_cw><b>rotate_cw</b></a>(void);</tt></a> -<br><a name=rotate_ccwr><tt>object <a href=#rotate_ccw><b>rotate_ccw</b></a>(void);</tt></a> -<br><a name=thresholdr><tt>object <a href=#threshold><b>threshold</b></a>(</tt>[<tt>int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt></b>); </tt></a> -<br><a name=apply_matrixr><tt>object <a href=#apply_matrix><b>apply_matrix</b></a>(array(array(int)) <b>matrix</b>,</tt>[<tt>int <b>r</b>,int <b>g</b>,int <b>b</b></tt>[<tt>,int <b>div</b></tt>]]<tt>);</tt></a> -<p><a name=scaler><tt>object <a href=#scale><b>scale</b></a>(float <b>factor</b>);</tt></a> -<br><a name=scaler><tt>object <a href=#scale><b>scale</b></a>(float <b>factorx</b>,float <b>factory</b>);</tt></a> -<br><a name=scaler><tt>object <a href=#scale><b>scale</b></a>(int <b>newx</b></tt>|<tt><b>0</b>,int <b>newy</b></tt>|<tt><b>0</b>);</tt></a> - -<p>Methods operating on current object: - -<br><a name=toppmr><tt>string <a href=#toppm><b>toppm</b></a>(void</b>);</tt></a> -<br><a name=fromppmr><tt>string|object <a href=#fromppm><b>fromppm</b></a>(string <b>s</b>);</tt></a> -<br><a name=togifr><tt>string <a href=#togif><b>togif</b></a>( </tt>[<tt>int <b>r</b>,inr g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> -<p><a name=paster><tt>object <a href=#paste><b>paste</b></a>(object <b>img</b> </tt>[<tt>,int <b>x</b>,int <b>y</b></tt>]<tt></b>)</tt></a> -<br><a name=paste_alphar><tt>object <a href=#paste_alpha><b>paste_alpha</b></a>(object <b>img</b>, int <b>alpha</b> </tt>[<tt>,int <b>x</b>, int <b>y</b></tt>]<tt></b>);</tt></a> -<br><a name=paste_maskr><tt>object <a href=#paste_mask><b>paste_mask</b></a>(object <b>img</b>, object <b>alpha_mask</b> </tt>[<tt>,int <b>x</b>,int <b>y</b></tt>]<tt></b>);</tt></a> -<p><a name=setcolorr><tt>object <a href=#setcolor><b>setcolor</b></a>(int <b>r</b>,int <b>g</b>,int <b>b</b>);</tt></a> -<br><a name=setpixelr><tt>object <a href=#setpixel><b>setpixel</b></a>(int <b>x</b>,int <b>y</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> -<br><a name=liner><tt>object <a href=#line><b>line</b></a>(int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> -<br><a name=boxr><tt>object <a href=#box><b>box</b></a>(int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> -<br><a name=circler><tt>object <a href=#circle><b>circle</b></a>(int <b>x</b>,int <b>y</b>,int <b>radx</b>,int <b>rady</b> </tt>[<tt>,int <b>r</b>,int <b>b</b>,int <b>g</b></tt>]<tt> </b>);</tt></a> -<br><a name=tuned_boxr><tt>object <a href=#tuned_box><b>tuned_box</b></a>(int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b>,array(array(int)) corner_rgb</b>);</tt></a> - -<p>Information giving methods: -<br><a name=xsizer><tt>object <a href=#xsize><b>xsize</b></a>();</tt></a> -<br><a name=ysizer><tt>object <a href=#ysize><b>ysize</b></a>();</tt></a> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=apply_matrix><tt>object <a href=#apply_matrixr><b>apply_matrix</b></a>(array(array(int)) <b>matrix</b>,</tt>[<tt>int <b>r</b>,int <b>g</b>,int <b>b</b></tt>[<tt>,int <b>div</b></tt>]]<tt>);</tt></a> -<dt>DESCRIPTION - -<dd>This method applies a matrix on the image. Each surrounding pixel -is multiplied with the value of the matrix element in that point, -these values are added and divided by the total sum of the matrix -values (and the <b>div</b> argument) and stored on the pixel -(eventually added to the <b>r</b>,<b>g</b>,<b>b</b> argument given as -'mean' value). - -<p>It is possible to use a matrix of RGB groups (ie an array of three -integers) instead of the simple values, this making it possible to -apply different matrices on red, green and blue channel. - -<dt>RETURN VALUE -<dd>the new object -<dt>EXAMPLE -<dd> -A 'blur' operation (3x3, gaussian): -<pre>blurred=image->apply_matrix( ({ ({1,2,1}), ({2,3,2}), ({1,2,1}) }) );</pre> -<p>A 'Emboss' operation (3x3): -<pre>emossed=image->apply_matrix(({ ({0,1,8}), ({-1,0,1}), ({-8,-1,0}) }), 128,128,128, 15 );</pre> -Here i'm using 128,128,128 (gray) as a mean, because i get negative values. -<br>A division by 15 is good to give 'normal' edges. - -<dt>BUGS -<dd>not known -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=autocrop><tt>object <a href=#autocropr><b>autocrop</b></a>( </tt>[<tt>int <b>border_width</b> </tt>[<tt>,int <b>left</b>,int <b>right</b>,int <b>top</b>,int <b>bottom</b></tt>]<tt></b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b></tt>]<tt> </b>);</tt></a> -<dt>DESCRIPTION - -<dd>Crops away unneccesary borders from the image. The <b>border</b> -argument is to define the new thickness of the surrounding border and -the <b>r</b>,<b>g</b>,<b>b</b> is the newly created border color. - -<p>The <b>left</b>, <b>right</b>, ... arguments is used to tell which -edges should be autocropped. - -<dt>RETURN VALUE -<dd>the new object -<dt>EXAMPLE -<dd><pre>cropped=image->autocrop();</pre> -<dt>BUGS -<dd>now known -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=box><tt>object <a href=#boxr><b>box</b></a>(int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> -<dt>DESCRIPTION - -<dd>Draw a box of the default or specified color. - -<dt>RETURN VALUE -<dd>the image object -<dt>EXAMPLE -<dd> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=circle><tt>object <a href=#circler><b>circle</b></a>(int <b>x</b>,int <b>y</b>,int <b>radx</b>,int <b>rady</b> </tt>[<tt>,int <b>r</b>,int <b>b</b>,int <b>g</b></tt>]<tt> </b>);</tt></a> -<dt>DESCRIPTION -<dd>Draw a circle. The coordinates given are the center of the image and the radius in x (horisontal) and y (vertical), this making it possible to draw an ellipse too. <tt>:-)</tt> -<dt>RETURN VALUE -<dd>the image object -<dt>EXAMPLE -<dd> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=clone><tt>object <a href=#cloner><b>clone</b></a>( </tt>[<tt>int <b>xsize</b>,int <b>ysize</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b></tt>]<tt> </b>);</tt></a> -<dt>DESCRIPTION -<dd>make a new object and return it -<ul> -<li>no arguments -> old image is copied -<li>size is given -> old image is copied cropped -<li>color is given -> new default color -</ul> -<dt>RETURN VALUE -<dd>the new object -<dt>SEE ALSO -<dd><a href=#copy>copy</a>, <a href=#clear>clear</a> -<dt>EXAMPLE -<dd> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=color><tt>object <a href=#colorr><b>color</b></a>(int <b>r</b>,int <b>g</b>,int <b>b</b>);</tt></a> -<dt>DESCRIPTION -<dd>Apply a color filter on the image. -<dt>RETURN VALUE -<dd>the new object -<dt>EXAMPLE -<dd><pre>cyan=image->color(64,255,192);</pre> -This function is most usable on a image that has been <a href=#gray>gray</a>ed first. -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=copy><tt>object <a href=#copyr><b>copy</b></a>( </tt>[<tt>int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b></tt>]<tt> </b>);</tt></a> -<dt>DESCRIPTION -<dd>Make a copy, or a copy of a part of the image. - It is possible to copy more then the image, to extend the image, - this area is filled with the current (or given) color. -<dt>RETURN VALUE -<dd>the new image object -<dt>EXAMPLE -<dd><pre>copy=image->copy(); - -copy=image->copy(-10,-10,image->xsize()+9,image->ysize()+9);</pre> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=fromppm><tt>string|object <a href=#fromppmr><b>fromppm</b></a>(string <b>s</b>);</tt></a> -<dt>DESCRIPTION -<dd>Import a ppm image. -<dt>RETURN VALUE -<dd>0 (object) upon success, else the error message (string). -<dt>EXAMPLE -<dd><pre>image=clone( (program)"precompiled/image" ); -image->fromppm(read_bytes("my_image.ppm",0,10000000));</pre> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=gray><tt>object <a href=#grayr><b>gray</b></a>(</tt>[<tt>int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt>);</tt></a> -<dt>DESCRIPTION - -<dd>Make this image gray (each r,g,b gets the same value).<br> If a -color is given, that specifies the amount of r, g, and b that is used -to compute the gray level. Default is 87,127,41. - -<dt>RETURN VALUE -<dd>the new object -<dt>EXAMPLE -<dd><pre>gray=image->gray()</pre> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=invert><tt>object <a href=#invertr><b>invert</b></a>();</tt></a> -<dt>DESCRIPTION -<dd>Invert the image. -<dt>RETURN VALUE -<dd>the new object -<dt>EXAMPLE -<dd><pre>inverted=image->invert()</pre> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=line><tt>object <a href=#liner><b>line</b></a>(int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> -<dt>DESCRIPTION -<dd>Draw a line from <b>x1</b>,<b>y1</b> to <b>x2</b>,<b>y2</b>. -<dt>RETURN VALUE -<dd>the image object -<dt>EXAMPLE -<dd><pre>image->line(17,100,42,1000);</pre> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=mirrorx><tt>object <a href=#mirrorxr><b>mirrorx</b></a>(void);</tt></a> -<dd><a name=mirrory><tt>object <a href=#mirroryr><b>mirrory</b></a>(void);</tt></a> -<dt>DESCRIPTION -<dd>Mirrors the image, horisontally or vertically. -<dt>RETURN VALUE -<dd>the new image object -<dt>EXAMPLE -<dd><pre>mirrored=image->mirrorx();</pre> -<dt>BUGS -<dd> -</dl> - -<hr> -<dl> -<dt>METHOD -<dd><a name=rotate_cw><tt>object <a href=#rotate_cwr><b>rotate_cw</b></a>(void);</tt></a> -<dd><a name=rotate_ccw><tt>object <a href=#rotate_ccwr><b>rotate_ccw</b></a>(void);</tt></a> -<dt>DESCRIPTION -<dd>Rotate the image, clockwise or counterclockwise, 90 degrees. -<br>This operation is very fast compared to rotating any angle. -<dt>RETURN VALUE -<dd>the new image object -<dt>EXAMPLE -<dd><pre>snurr=image->rotate_cw();</pre> -<dt>BUGS -<dd> -</dl> -<hr> - -<dl> -<dt>METHOD -<dd><a name=paste><tt>object <a href=#paster><b>paste</b></a>(object <b>img</b> </tt>[<tt>,int <b>x</b>,int <b>y</b></tt>]<tt></b>)</tt></a> -<dd><a name=paste_alpha><tt>object <a href=#paste_alphar><b>paste_alpha</b></a>(object <b>img</b>, int <b>alpha</b> </tt>[<tt>,int <b>x</b>, int <b>y</b></tt>]<tt></b>);</tt></a> -<dd><a name=paste_mask><tt>object <a href=#paste_maskr><b>paste_mask</b></a>(object <b>img</b>, object <b>alpha_mask</b> </tt>[<tt>,int <b>x</b>,int <b>y</b></tt>]<tt></b>);</tt></a> -<dt>DESCRIPTION -<dd>Paste an image on this image. Use the specified alpha channel -value or the second specified image as an alpha channel.<br> -The first argument is the image that will be pasted. -<dt>RETURN VALUE -<dd>the image object -this function doesn't return anything -<dt>EXAMPLE -<dd><pre>image->paste(other_smaller_image,17,42); - -image->paste_mask(other_image,alpha_channel_image);</pre> -Paste a dog on a landscape:<pre>landscape->paste(dog,dog_alpha_channel,xpos,ypos);</pre> -Write some text:<pre>text=font->write("some text"); -foreground=text->clear(255,255,255); // white -background->paste(foreground,text,xpos,ypos);</pre> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=scale><tt>object <a href=#scaler><b>scale</b></a>(float <b>factor</b>);</tt> (1</a> -<dd><a name=scale><tt>object <a href=#scaler><b>scale</b></a>(float <b>factorx</b>,float <b>factory</b>);</tt> (2</a> -<dd><a name=scale><tt>object <a href=#scaler><b>scale</b></a>(int <b>newx</b></tt>|<tt><b>0</b>,int <b>newy</b></tt>|<tt><b>0</b>);</tt> (3</a> -<dt>DESCRIPTION -<dd>Scale this image. -<ol> -<li>scale the image with a (line scale) factor -<li>scale the image with different factors on x and y -<li>scale the image to a new size -<br>with newx or newy set to zero, just scale the image to fit the x -or y size and keep proportions. -</ol> -<dt>RETURN VALUE -<dd>the new object -this function doesn't return anything -<dt>EXAMPLE -<dd> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dt>METHOD -<dd><a name=setcolor><tt>object <a href=#setcolorr><b>setcolor</b></a>(int <b>r</b>,int <b>g</b>,int <b>b</b>);</tt></a> -<dt>DESCRIPTION -<dd>set the default color used for drawing lines, etc -<dt>RETURN VALUE -<dd>the image object -<dt>EXAMPLE -<dd> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dt>METHOD -<dd><a name=setpixel><tt>object <a href=#setpixelr><b>setpixel</b></a>(int <b>x</b>,int <b>y</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> -<dt>DESCRIPTION -<dd>set the color of the specified pixel -<dt>RETURN VALUE -<dd>the image object -<dt>EXAMPLE -<dd> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=threshold><tt>object <a href=#thresholdr><b>threshold</b></a>(</tt>[<tt>int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt></b>); </tt></a> -<dt>DESCRIPTION -<dd>make image black-and-white using the given value as the threshold -<dt>RETURN VALUE -<dd>the new object -<dt>EXAMPLE -<dd> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=togif><tt>string <a href=#togifr><b>togif</b></a>( </tt>[<tt>int <b>r</b>,inr g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> -<dt>DESCRIPTION -<dd>export gif -<br>if the color are given, this is the transparent color -<dt>RETURN VALUE -<dd>the gifimage as a string -<dt>EXAMPLE -<dd> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=toppm><tt>string <a href=#toppmr><b>toppm</b></a>(object</b>);</tt></a> -<dt>DESCRIPTION -<dd>export ppm -<dt>RETURN VALUE -<dd>the ppm image as a string -<dt>EXAMPLE -<dd> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=tuned_box><tt>object <a href=#tuned_boxr><b>tuned_box</b></a>(int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b>,array(array(int)) corner_rgb</b>);</tt></a> -<dt>DESCRIPTION -<dd>draw a box with the specified corner colours, and shade the colors between -<dt>RETURN VALUE -<dd>the image object -<dt>EXAMPLE -<dd><pre>image->tuned_box(0,0,img->xsize()-1,img->ysize()-1, - ({({0,0,64}),({16,16,128}), - ({16,16,128}),({192,160,128})}));</pre> -<dt>BUGS -<dd> -</dl> - -<hr> -<dl> -<dt>METHOD -<dd><a name=xsize><tt>object <a href=#xsizer><b>xsize</b></a>();</tt></a> -<dd><a name=ysize><tt>object <a href=#ysizer><b>ysize</b></a>();</tt></a> -<dt>DESCRIPTION -<dd> -<dt>RETURN VALUE -<dd>Gives the x- or the y-size (horisontal or vertical size) of the image. -<dt>EXAMPLE -<dd> -<dt>BUGS -<dd> -</dl> - - -<hr> - -<a name=font><h2>methods in precompiled/font:</h2></a> - -<a name=loadr><tt>int <a href=#load><b>load</b></a>(string <b>file_name</b>);</tt> -<br><a name=writer><tt>object <a href=#write><b>write</b></a>(string <b>line</b>, </tt>...<tt>);</tt> - -<hr> -<dl> -<dt>METHOD -<dd><a name=load><tt>int <a href=#loadr><b>load</b></a>(string <b>file_name</b>);</tt> -<dt>DESCRIPTION -<dd>load this font object with the font from the specified file -<dt>RETURN VALUE -<dd>true on success -<dt>EXAMPLE -<dd> -<dt>BUGS -<dd> -</dl> - -<hr> - -<dl> -<dt>METHOD -<dd><a name=write><tt>object <a href=#writer><b>write</b></a>(string <b>line</b>, </tt>...<tt>);</tt> -<dt>DESCRIPTION -<dd>make a new image object from the specified text, each argument representing a line -<dt>RETURN VALUE -<dd>the new image object -<dt>EXAMPLE -<dd> -<dt>BUGS -<dd> -</dl> - -<hr> - -<h2>Example program:</h2> -(pike) -<pre> - -int main() -{ - object txt,o,shad,font; - int i; - - txt = - (font=clone((program)"/precompiled/font")) - ->load("/usr/local/lib/pike/fonts/64/helvetica_bold_r") - ->write("The Image Module") - ->autocrop(20,0,0,0); - - shad=txt->mirrory()->scale(1.0,0.3)->color(64,64,64); - - o=clone((program)"/precompiled/image", - txt->xsize(),txt->ysize(), 0,0,100) - ->tuned_box(0,0,txt->xsize(),txt->ysize(), - ({({0,0,0}),({0,0,0}), - ({0,0,255}),({128,128,0})})); - - o->setcolor(255,255,255,200); - for (i=0; i<30; i++) - if (random(2)) - o->line(random(o->xsize()),o->ysize()-10-random(20+i*3), - o->xsize()-1-random(30),o->ysize()-1); - else - o->line(random(o->xsize()),o->ysize()-10-random(20+i), - random(30),o->ysize()-1); - - for (i=0; i<10; i++) - o->box(random(o->xsize()),random(o->ysize()), - random(o->xsize()),random(o->ysize()), - random(256),random(256),random(256),220); - - o -> paste_mask(txt->clear(0,255,0), - shad,0,(int)(font->baseline()*0.7)+shad->ysize()-10) - -> paste_mask(txt->clear(255,255,0), - txt->apply_matrix(({({1,2,1}),({2,4,2}),({1,2,1})})) - ->apply_matrix(({({1,2,1}),({2,4,2}),({1,2,1})})) - ->modify_by_intensity(1,0,0, 0,255,255,255,255,255)) - -> paste_mask(txt->clone() - ->tuned_box(0,0,txt->xsize()-1,txt->ysize()-1, - ({({128,128,128}),({64,128,0}), - ({64,128,0}),({255,255,0})})), - txt); - write(o->togif_fs()); - return 0; -} -</pre> - -<h2>Undocumented, yet:</h2> -<pre> -object image->select_from(int x,int y); -object image->distancesq(int r,int g,int b); -array(int) image->getpixel(int x,int y); -object image->skewx(int diff,rgb); -object image->skewy(int diff,rgb); -object image->skewx_expand(int diff,rgb); -object image->skewy_expand(int diff,rgb); -object image->rotate(int|float angle,rgb); -object image->rotate_expand(int|float angle,rgb); -object image->turbulence(colorrange,int octaves=3,float scale=1, - float xdiff=0,float ydiff=0,float cscale=1); -object image->noise(colorrange,float scale=0.1, - float xdiff=0,float ydiff=0,float cscale=1); - where colorrange is ({ float position=0..1, ({r,g,b}), - float position=0..1, ({r,g,b}), ... }) -</pre> \ No newline at end of file diff --git a/src/modules/mysql/doc/mysql b/src/modules/mysql/doc/mysql deleted file mode 100644 index 8e11cefe880f1606993e05bb220d75cabed3e657..0000000000000000000000000000000000000000 --- a/src/modules/mysql/doc/mysql +++ /dev/null @@ -1,378 +0,0 @@ -NAME - /precompiled/sql/mysql - Interface to the Mysql database (ALPHA) - -DESCRIPTION - /precompiled/sql/mysql is a pre-compiled Pike program. It enables - access to the Mysql database from within Pike. /precompiled/sql/mysql - is a part of the mysql module. - - Mysql is available from http://www.tcx.se/ . - -KEYWORDS - sql, database - - -============================================================================ -NAME - create - connect to the Mysql database - -SYNTAX - #include <mysql.h> - - object(Mysql) Mysql(); - or - object(Mysql) Mysql(string hostname); - or - object(Mysql) Mysql(string hostname, string database); - or - object(Mysql) Mysql(string hostname, string database, string user); - or - object(Mysql) Mysql(string hostname, string database, string user, - string password); - -DESCRIPTION - To access the Mysql database, you must first connect to it. This is - done with the function Mysql(). - - If you give no argument, or give "" as hostname it will connect with - a UNIX-domain socket, which is a big performance gain. - - -============================================================================ -NAME - affected_rows - return the number of affected rows in the table - -SYNTAX - #include <mysql.h> - - int mysql->affected_rows(); - -DESCRIPTION - Returns the number of affected rows. - - -============================================================================ -NAME - insert_id - return the insert id - -SYNTAX - #include <mysql.h> - - int mysql->insert_id(); - -DESCRIPTION - Returns the insert id. - - -============================================================================ -NAME - error - return the last error in Mysql - -SYNTAX - #include <mysql.h> - - string mysql->error(); - -DESCRIPTION - When a Mysql-method fails you can get a description of why with this - function. - - -============================================================================ -NAME - select_db - select database - -SYNTAX - #include <mysql.h> - - void select_db(string database); - -DESCRIPTION - The Mysql-server can hold several databases. You select which one - you want to access with this function. - -SEE ALSO - mysql->create, mysql->create_db, mysql->drop_db - - -============================================================================ -NAME - query - make an SQL query - -SYNTAX - #include <mysql.h> - - int|object(Mysql_result) mysql->query(string q); - -DESCRIPTION - This function sends an SQL query to the Mysql-server. The result - of the query is returned as a /precompiled/sql/mysql_result object. - Returns 0 if the query didn't return any result (e.g. INSERT or - similar). - -SEE ALSO - /precompiled/sql/mysql_result - - -============================================================================ -NAME - create_db - create a new database - -SYNTAX - #include <mysql.h> - - void mysql->create_db(string database); - -DESCRIPTION - This function creates a new database in the Mysql-server. - -SEE ALSO - mysql->select_db, mysql->drop_db - - -============================================================================ -NAME - drop_db - drop a database - -SYNTAX - #include <mysql.h> - - void mysql->drop_db(string database); - -DESCRIPTION - This function drops a database from a Mysql-server. - -SEE ALSO - mysql->create_db, mysql->select_db - - -============================================================================ -NAME - shutdown - shutdown the Mysql-server - -SYNTAX - #include <mysql.h> - - void mysql->shutdown(); - -DESCRIPTION - This function shuts down a running Mysql-server. - -SEE ALSO - mysql->reload - - -============================================================================ -NAME - reload - reload the tables - -SYNTAX - #include <mysql.h> - - void mysql->reload(); - -DESCRIPTION - This function causes the Mysql-server to reload its tables. - -SEE ALSO - mysql->shutdown - - -============================================================================ -NAME - statistics - some Mysql-server statistics - -SYNTAX - #include <mysql.h> - - string mysql->statistics(); - -DESCRIPTION - This function returns some server statistics. - -EXAMPLE - - #include <mysql.h> - - int main() - { - write(Mysql()->statistics()); - return(0); - } - -SEE ALSO - mysql->server_info, mysql->host_info, mysql->protocol_info - - -============================================================================ -NAME - server_info - give the version number of the Mysql-server - -SYNTAX - #include <mysql.h> - - string mysql->server_info(); - -DESCRIPTION - This function returns the version number of the Mysql-server. - -SEE ALSO - mysql->statistics, mysql->host_info, mysql->protocol_info - - -============================================================================ -NAME - host_info - give information about the Mysql-server connection - -SYNTAX - #include <mysql.h> - - string mysql->host_info(); - -DESCRIPTION - This function returns a string describing the connection to - the Mysql-server. - -SEE ALSO - mysql->statistics, mysql->server_info, mysql->protocol_info - - -============================================================================ -NAME - protocol_info - give the Mysql protocol version - -SYNTAX - #include <mysql.h> - - int mysql->protocol_info(); - -DESCRIPTION - This function returns the version number of the protocol the - Mysql-server uses. - -SEE ALSO - mysql->statistics, mysql->server_info, mysql->host_info - - -============================================================================ -NAME - list_dbs - list databases - -SYNTAX - #include <mysql.h> - - object(Mysql_result) mysql->list_dbs(); - or - object(Mysql_result) mysql->list_dbs(string wild); - -DESCRIPTION - Returns a table containing the names of all databases in the - Mysql-server. If an argument is specified, only those matching - wild are returned. - -SEE ALSO - mysql->list_tables, mysql->list_fields, mysql->list_processes, - /precompiled/sql/mysql_result - - -============================================================================ -NAME - list_tables - list tables in the current database - -SYNTAX - #include <mysql.h> - - object(Mysql_result) mysql->list_tables(); - or - object(Mysql_result) mysql->list_tables(string wild); - -DESCRIPTION - Returns a table containing the names of all tables in the current - database. If an argument is given, only those matching wild are - returned. - -SEE ALSO - mysql->list_dbs, mysql->list_fields, mysql->list_processes, - /precompiled/sql/mysql_result - - -============================================================================ -NAME - list_fields - list all fields - -SYNTAX - #include <mysql.h> - - array(int|mapping(string:mixed)) mysql->list_fields(string table); - or - array(int|mapping(string:mixed)) mysql->list_fields(string table, - string wild); - -DESCRIPTION - Returns an array of mappings with information about the fields in the - specified table. - - The mappings contain the following entries: - - "name": string The name of the field. - "table": string The name of the table. - "default": string The default value for the field. - "type": string The type of the field. - "length": int The length of the field. - "max_length": int The length of the longest element in this field. - "flags": multiset(string) Some flags. - "decimals": int The number of decimalplaces. - - The type of the field can be any of: - "decimal", "char", "short", "long", "float", "double", "null", - "time", "longlong", "int24", "tiny blob", "medium blob", - "long blob", "var string", "string" or "unknown". - - The flags multiset can contain any of - "primary_key": This field is part of the primary key for this table. - "not_null": This field may not be NULL. - "blob": This field is a blob field. - -NOTA BENE - Michael Widenius recomends usage of the following query instead: - show fields in 'table' like "wild" - -SEE ALSO - mysql->list_dbs, mysql->list_tables, mysql->list_processes, - mysql_result->fetch_fields - - -============================================================================ -NAME - list_processes - list all processes in the Mysql-server - -SYNTAX - #include <mysql.h> - - object(Mysql_result) mysql->list_processes(); - -DESCRIPTION - Returns a table containing the names of all processes in the - Mysql-server. - -SEE ALSO - mysql->list_dbs, mysql->list_tables, mysql->list_fields, - /precompiled/sql/mysql_result - - -============================================================================ -NAME - binary_data - inform if this version of mysql supports binary data - -SYNTAX - int mysql->binary_data(); - -DESCRIPTION - This function returns non-zero if binary data can be reliably stored - and retreived with this version of the mysql-module. - - Usually, there is no problem storing binary data in mysql-tables, - but data containing '\0' (NUL) couldn't be fetched with old - versions (prior to 3.20.5) of the mysql-library. - - diff --git a/src/modules/mysql/doc/mysql_result b/src/modules/mysql/doc/mysql_result deleted file mode 100644 index f62e5baa142f76ee1d89d7a964bc3fd227afea74..0000000000000000000000000000000000000000 --- a/src/modules/mysql/doc/mysql_result +++ /dev/null @@ -1,204 +0,0 @@ -NAME - /precompiled/sql/mysql_result - result of an Mysql query (ALPHA) - -DESCRIPTION - /precompiled/sql/mysql_result is a pre-compiled Pike program. It - contains the result of a Mysql-query. /precompiled/sql/mysql_result - is a part of the mysql module. - - Mysql is available from http://www.tcx.se/ . - -KEYWORDS - sql, database - -SEE ALSO - /precompiled/sql/mysql - - -============================================================================ -NAME - create - make a new mysql_result object - -SYNTAX - #include <mysql.h> - - object(Mysql_result) mysql->query(string q); - or - object(Mysql_result) mysql->list_dbs(); - or - object(Mysql_result) mysql->list_dbs(string wild); - or - object(Mysql_result) mysql->list_tables(); - or - object(Mysql_result) mysql->list_tables(string wild); - or - object(Mysql_result) mysql->list_processes(); - -DESCRIPTION - Creates a Mysql result table. - -SEE ALSO - mysql->query, mysql->list_dbs, mysql->list_tables, - mysql->list_processes, /precompiled/sql/mysql - - -============================================================================ -NAME - num_rows - number of rows in the result - -SYNTAX - #include <mysql.h> - - int mysql_result->num_rows(); - -DESCRIPTION - Returns the number of rows in the result. - -SEE ALSO - mysql_result->num_fields - - -============================================================================ -NAME - num_fields - number of fields in the result - -SYNTAX - #include <mysql.h> - - int mysql_result->num_fields(); - -DESCRIPTION - Returns the number of fields in the result. - -SEE ALSO - mysql_result->num_rows - - -============================================================================ -NAME - field_seek - skip to specified field (OPTIONAL) - -SYNTAX - #include <mysql.h> - - void mysql_result->field_seek(int field_no); - -DESCRIPTION - Places the field cursor at the specified position. This affects - which field mysql_result->fetch_field() will return next. - - Fields are numbered starting with 0. - -NOTA BENE - This function exists only if SUPPORT_FIELD_SEEK was defined when - compiling the mysql-module. - -SEE ALSO - mysql_result->fetch_field, mysql_result->fetch_fields - - -============================================================================ -NAME - eof - at end of result table - -SYNTAX - #include <mysql.h> - - int mysql_result->eof(); - -DESCRIPTION - Returns non-zero when all rows have been read. - -SEE ALSO - mysql_result->fetch_row - - -============================================================================ -NAME - fetch_field - return specification of current field (OPTIONAL) - -SYNTAX - #include <mysql.h> - - int|mapping(string:mixed) mysql_result->fetch_field(); - -DESCRIPTION - Returns a mapping with information about the current field, and - advances the field cursor one step. Returns 0 if there are no more - fields. - - The mapping contains the same entries as those returned by - mysql->list_fields(), except that the "default" entry is missing. - -NOTA BENE - This function exists only if SUPPORT_FIELD_SEEK was defined when - compiling the mysql-module. - -SEE ALSO - mysql_result->fetch_fields, mysql_result->field_seek, - sql->list_fields - - -============================================================================ -NAME - fetch_fields - return specification of all remaining fields - -SYNTAX - #include <mysql.h> - - array(int|mapping(string:mixed)) mysql_result->fetch_fields(); - -DESCRIPTION - Returns an array with one mapping for every remaining field in the - result table. - - It returns data similar to mysql->list_fields(), except for that - the "default" entry is missing. - -NOTA BENE - Resets the field cursor to 0. - - This function exists even if SUPPORT_FIELD_SEEK wasn't defined when - the Mysql-module was compiled. - -SEE ALSO - mysql_result->fetch_field, mysql_result->field_seek, - mysql->list_fields - - -============================================================================ -NAME - seek - skip ahead a number of rows - -SYNTAX - #include <mysql.h> - - void mysql_result->seek(int r); - -DESCRIPTION - Skips ahead the specified number of rows. - -BUGS - Can only seek forward (limitation in Mysql). - -SEE ALSO - mysql_result->fetch_row - - -============================================================================ -NAME - fetch_row - fetch the next row from the result - -SYNTAX - #include <mysql.h> - - int|array(string|int) mysql_result->fetch_row(); - -DESCRIPTION - Returns an array with the contents of the next row in the result. - Advances the row cursor to the next row. Returns 0 at end of table. - -SEE ALSO - mysql_result->seek - - diff --git a/src/modules/readlinemod/doc/readline b/src/modules/readlinemod/doc/readline deleted file mode 100644 index 01f3204c02d443f207edaa5b1348f320f1031c28..0000000000000000000000000000000000000000 --- a/src/modules/readlinemod/doc/readline +++ /dev/null @@ -1,14 +0,0 @@ -NAME - readline - read a line from stdin - -SYNTAX - string readline(string prompt); - -DESCRIPTION - This function writes the string 'prompt' and then waits until the - user has entered a line from the keyboard. If the readline library - was available when Pike was compiled the user will have history and - line edithing at his/her disposal when entering the line. - -SEE ALSO - files/file diff --git a/src/modules/regexp/doc/regexp b/src/modules/regexp/doc/regexp deleted file mode 100644 index b7358e616d66fdccc1ae4354f73a8d14715dafa1..0000000000000000000000000000000000000000 --- a/src/modules/regexp/doc/regexp +++ /dev/null @@ -1,91 +0,0 @@ -NAME - /precompiled/regexp - regexp handling module - -DESCRIPTION - /precompiled/regexp is a precompiled Pike program that interfaces a - regexp package written in C. It contains a few simple functions to - handle regexps. A short description of regexp follows: - - . Matches any character - [abc] Matches a, b or c - [a-z] Matches any character a to z inclusive - [^ac] Matches any character except a and c - (x) Matches x (x might be any regexp) If used with split, this - also puts the string matching x into the result array. - x* Matches zero or more occurances of 'x' (x may be any regexp) - x+ Matches one or more occurances of 'x' (x may be any regexp) - x|y Matches x or y. (x or y may be any regexp) - xy Matches xy (x and y may be any regexp) - ^ Matches beginning of string (but no characters) - $ Matches end of string (but no characters) - \< matches the beginning of a word (but no characters) - \> matches the end of a word (but no characters) - - Note that \ can be used to quote these characters in which case - they match themselves, nothing else. Also note that when quoting - these something in Pike you need two \ because Pike also uses - this character for quoting. - - For more information about regexps, refer to your unix manuals such - as sed or ed. - - Descriptions of all functions in /precompiled/regexp follows: - -============================================================================ -NAME - create - compile regexp - -SYNTAX - void create(); - or - void create(string regexp); - or - object clone((program)"/precompiled/file"); - or - object clone((program)"/precompiled/file",string regexp); - -DESCRIPTION - When create is called, the current regexp bound to this object is - cleared. If a string is sent to create(), this string will be compiled - to an internal representation of the regexp and bound to this object - for laters calls to match or split. Calling create() without an - argument can be used to free up a little memory after the regexp has - been used. - -SEE ALSO - builtin/clone, regexp->match - -============================================================================ -NAME - match - match a regexp - -SYNTAX - int regexp->match(string s) - -DESCRIPTION - Return 1 if s matches the regexp bound to the object regexp, - zero otherwise - -SEE ALSO - regexp->create, regexp->split - -============================================================================ -NAME - split - split a string according to a pattern - -SYNTAX - string *regexp->split(string s) - -DESCRIPTION - Works as regexp->match, but returns an array of the strings that - matched the subregexps. Subregexps are those contained in ( ) in - the regexp. Subregexps that were not matched will contain zero. - If the total regexp didn't match, zero is returned. - -BUGS - You can only have 40 subregexps. - -SEE ALSO - regexp->create, regexp->split - -============================================================================ diff --git a/src/modules/zlibmod/doc/gz_deflate b/src/modules/zlibmod/doc/gz_deflate deleted file mode 100644 index 7873bfcf42f182718c72942e53c2ca53e6f0fdf4..0000000000000000000000000000000000000000 --- a/src/modules/zlibmod/doc/gz_deflate +++ /dev/null @@ -1,61 +0,0 @@ -NAME - Gz_deflate - gzip packer - -DESCRIPTION - Gz_inflate is a builtin program written in C. It interfaces the - packing routines in the libz library. - -NOTA BENE - This program is only available if libz was available and found when - Pike was compiled. - -SEE ALSO - gz_inflate - -============================================================================ -NAME - create - initialize gzip packer - -SYNTAX - void create(int X) - or - object(Gz_deflate) Gz_deflate(int X) - -DESCRIPTION - 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. - - This function can also be used to re-initialize a gz_deflate object - so it can be re-used. - -============================================================================ -NAME - deflate - pack data - -SYNTAX - string deflate(string data, int flush); - -DESCRIPTION - 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: - - Gz_deflate->NO_FLUSH Only data that doesn't fit in the - internal buffers is returned. - Gz_deflate->PARTIAL_FLUSH All input is packed and returned. - Gz_deflate->SYNC_FLUSH All input is packed and returned. - Packing is syncronized. - Gz_deflate->FINISH All input is packed and an 'end of - data' marker is appended. - - 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. - -SEE ALSO - gz_inflate->inflate - -============================================================================ diff --git a/src/modules/zlibmod/doc/gz_inflate b/src/modules/zlibmod/doc/gz_inflate deleted file mode 100644 index 153f1727d56c5459a27e69463cb6defaaba13ef1..0000000000000000000000000000000000000000 --- a/src/modules/zlibmod/doc/gz_inflate +++ /dev/null @@ -1,53 +0,0 @@ -NAME - Gz_inflate - gzip unpacker - -DESCRIPTION - Gz_inflate is a builtin program written in C. It interfaces the - packing routines in the libz library. - -NOTA BENE - This program is only available if libz was available and found when - Pike was compiled. - -SEE ALSO - gz_deflate - -============================================================================ -NAME - create - initialize gzip packer - -SYNTAX - void create() - or - object(Gz_inflate) Gz_inflate() - -DESCRIPTION - 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. - -============================================================================ -NAME - inflate - unpack data - -SYNTAX - string inflate(string data); - -DESCRIPTION - This function preforms gzip style decompression. It can inflate - a whole file at once or in blocks. - -EXAMPLES - #include <stdio.h> - // whole file - write(Gz_inflate()->inflate(stdin->read(0x7fffffff)); - - // streaming (blocks) - function inflate=Gz_inflate()->inflate; - while(string s=stdin->read(8192)) - write(inflate(s)); - -SEE ALSO - gz_deflate->deflate - -============================================================================