2003-04-07
2003-04-07 17:28:56 by Martin Nilsson <mani@lysator.liu.se>
-
cbe8c9ef2447bc6b061b4e722e8fc1224a886a4f
(101 lines)
(+51/-50)
[
Show
| Annotate
]
Branch: 7.9
Use @expr where more approrpiate than @tt
Rev: lib/modules/ADT.pmod/Table.pmod:1.26
Rev: lib/modules/Crypto.pmod/aes.pike:1.2
Rev: lib/modules/Getopt.pmod:1.27
Rev: lib/modules/Parser.pmod/module.pmod:1.18
Rev: lib/modules/Protocols.pmod/DNS.pmod:1.72
Rev: lib/modules/Protocols.pmod/HTTP.pmod/Query.pike:1.56
Rev: lib/modules/Protocols.pmod/HTTP.pmod/Session.pike:1.11
Rev: lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:1.37
Rev: lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1.48
Rev: lib/modules/Protocols.pmod/Line.pmod:1.22
Rev: lib/modules/Protocols.pmod/SMTP.pmod:1.22
Rev: lib/modules/Sql.pmod/Sql.pike:1.64
Rev: lib/modules/Stdio.pmod/module.pmod:1.169
Rev: lib/modules/String.pmod/module.pmod:1.14
Rev: lib/modules/Tools.pmod/AutoDoc.pmod/ProcessXML.pmod:1.54
Rev: src/builtin.cmod:1.131
Rev: src/builtin_functions.c:1.483
Rev: src/cpp.c:1.117
Rev: src/dynamic_load.c:1.69
Rev: src/error.c:1.106
Rev: src/modules/DVB/dvb.c:1.19
Rev: src/modules/Gdbm/gdbmmod.c:1.24
Rev: src/modules/Gettext/gettext.c:1.15
Rev: src/modules/Gmp/mpf.cmod:1.25
Rev: src/modules/MIME/mime.c:1.37
Rev: src/modules/Mird/module.pmod.in:1.12
Rev: src/modules/Msql/msqlmod.c:1.25
Rev: src/modules/Mysql/mysql.c:1.71
Rev: src/modules/Mysql/result.c:1.29
Rev: src/modules/Yp/module.pmod.in:1.19
Rev: src/modules/_Charset/module.pmod.in:1.31
Rev: src/modules/_Crypto/arcfour.c:1.21
Rev: src/modules/_Crypto/cast.c:1.16
Rev: src/modules/_Crypto/des.c:1.28
Rev: src/modules/_Crypto/idea.c:1.22
Rev: src/modules/_Crypto/invert.c:1.17
Rev: src/modules/_Crypto/md2.c:1.17
Rev: src/modules/_Crypto/md4.c:1.6
Rev: src/modules/_Crypto/pipe.c:1.26
Rev: src/modules/_Crypto/rijndael.c:1.11
Rev: src/modules/_Crypto/sha.c:1.25
Rev: src/modules/_Ffmpeg/ffmpeg.c:1.17
Rev: src/modules/_math/math.c:1.60
Rev: src/modules/files/efuns.c:1.126
Rev: src/modules/files/file.c:1.267
Rev: src/modules/files/stat.c:1.27
Rev: src/modules/files/udp.c:1.43
Rev: src/modules/system/passwords.c:1.41
Rev: src/modules/system/system.c:1.142
Rev: src/operators.c:1.174
Rev: src/pike_search.c:1.15
Rev: src/post_modules/_ADT/circular_list.cmod:1.5
Rev: src/post_modules/_ADT/sequence.cmod:1.6
Rev: src/program.c:1.498
Rev: src/security.c:1.42
Rev: src/signal_handler.c:1.262
2:
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
- || $Id: builtin_functions.c,v 1.482 2003/04/02 19:16:03 nilsson Exp $
+ || $Id: builtin_functions.c,v 1.483 2003/04/07 17:28:55 nilsson Exp $
*/
#include "global.h"
- RCSID("$Id: builtin_functions.c,v 1.482 2003/04/02 19:16:03 nilsson Exp $");
+ RCSID("$Id: builtin_functions.c,v 1.483 2003/04/07 17:28:55 nilsson Exp $");
#include "interpret.h"
#include "svalue.h"
#include "pike_macros.h"
119:
/*! @decl int hash_7_4(string s)
*! @decl int hash_7_4(string s, int max)
*!
- *! This function will return an @tt{int@} derived from the string @[s].
+ *! This function will return an @expr{int@} derived from the string @[s].
*! The same string will always hash to the same value.
*! If @[max] is given, the result will be >= 0 and < @[max], otherwise
*! the result will be >= 0 and <= 0x7fffffff.
163:
/*! @decl int hash_7_0(string s)
*! @decl int hash_7_0(string s, int max)
*!
- *! This function will return an @tt{int@} derived from the string @[s].
+ *! This function will return an @expr{int@} derived from the string @[s].
*! The same string will always hash to the same value.
*! If @[max] is given, the result will be >= 0 and < @[max], otherwise
*! the result will be >= 0 and <= 0x7fffffff.
210:
/*! @decl int hash(string s)
*! @decl int hash(string s, int max)
*!
- *! This function will return an @tt{int@} derived from the string @[s].
+ *! This function will return an @expr{int@} derived from the string @[s].
*! The same string will always hash to the same value.
*! If @[max] is given, the result will be >= 0 and < @[max], otherwise
*! the result will be >= 0 and <= 0x7fffffff.
610:
*! @decl mixed search(mapping haystack, mixed needle, mixed|void start)
*!
*! Search for @[needle] in @[haystack]. Return the position of @[needle] in
- *! @[haystack] or @tt{-1@} if not found.
+ *! @[haystack] or @expr{-1@} if not found.
*!
*! If the optional argument @[start] is present search is started at
*! this position.
759:
/*! @decl int has_prefix(string s, string prefix)
*!
- *! Returns @tt{1@} if the string @[s] starts with @[prefix],
- *! returns @tt{0@} (zero) otherwise.
+ *! Returns @expr{1@} if the string @[s] starts with @[prefix],
+ *! returns @expr{0@} (zero) otherwise.
*/
PMOD_EXPORT void f_has_prefix(INT32 args)
{
820:
/*! @decl int has_suffix(string s, string suffix)
*!
- *! Returns @tt{1@} if the string @[s] ends with @[suffix],
- *! returns @tt{0@} (zero) otherwise.
+ *! Returns @expr{1@} if the string @[s] ends with @[suffix],
+ *! returns @expr{0@} (zero) otherwise.
*/
PMOD_EXPORT void f_has_suffix(INT32 args)
{
887:
*! Search for @[index] in @[haystack].
*!
*! @returns
- *! Returns @tt{1@} if @[index] is in the index domain of @[haystack],
- *! or @tt{0@} (zero) if not found.
+ *! Returns @expr{1@} if @[index] is in the index domain of @[haystack],
+ *! or @expr{0@} (zero) if not found.
*!
*! This function is equivalent to (but sometimes faster than):
*!
898:
*!
*! @note
*! A negative index in strings and arrays as recognized by the
- *! index operators @tt{`[]()@} and @tt{`[]=()@} is not considered
+ *! index operators @expr{`[]()@} and @expr{`[]=()@} is not considered
*! a proper index by @[has_index()]
*!
*! @seealso
977:
*! Search for @[value] in @[haystack].
*!
*! @returns
- *! Returns @tt{1@} if @[value] is in the value domain of @[haystack],
- *! or @tt{0@} (zero) if not found.
+ *! Returns @expr{1@} if @[value] is in the value domain of @[haystack],
+ *! or @expr{0@} (zero) if not found.
*!
*! This function is in all cases except when both arguments are strings
*! equivalent to (but sometimes faster than):
1088:
*! @decl string combine_path_nt(string absolute, string ... relative)
*!
*! Concatenate a relative path to an absolute path and remove any
- *! @tt{"//"@}, @tt{"/.."@} or @tt{"/."@} to produce a straightforward
- *! absolute path as result.
+ *! @expr{"//"@}, @expr{"/.."@} or @expr{"/."@} to produce a
+ *! straightforward absolute path as result.
*!
*! @[combine_path_nt()] concatenates according to NT-filesystem conventions,
*! while @[combine_path_unix()] concatenates according to UNIX-style.
1121:
*!
*! @returns
*! When doing a @[find_call_out()] or mapping lookup, @[zero_type()] on
- *! this value will return @tt{1@} if there was no such thing present in
+ *! this value will return @expr{1@} if there was no such thing present in
*! the mapping, or if no such @tt{call_out@} could be found.
*!
*! If the argument to @[zero_type()] is a destructed object or a function
- *! in a destructed object, @tt{2@} will be returned.
+ *! in a destructed object, @expr{2@} will be returned.
*!
- *! In all other cases @[zero_type()] will return @tt{0@} (zero).
+ *! In all other cases @[zero_type()] will return @expr{0@} (zero).
*!
*! @seealso
*! @[find_call_out()]
1609:
*! Throws an error if the stream is not a legal UFT8 byte-stream.
*!
*! Accepts and decodes the extension used by @[string_to_utf8()], if
- *! @[extended] is @tt{1@}.
+ *! @[extended] is @expr{1@}.
*!
*! @seealso
*! @[Locale.Charset.encoder()], @[string_to_unicode()], @[string_to_utf8()],
1962:
*!
*! Exit the whole Pike program with the given @[returncode].
*!
- *! Using @[exit()] with any other value than @tt{0@} (zero) indicates that
- *! something went wrong during execution. See your system manuals for
- *! more information about return codes.
+ *! Using @[exit()] with any other value than @expr{0@} (zero) indicates
+ *! that something went wrong during execution. See your system manuals
+ *! for more information about return codes.
*!
*! @seealso
*! @[_exit()]
2025:
*!
*! This function returns the number of seconds since 1 Jan 1970.
*!
- *! The second syntax does not call the system call @tt{time()@} as often,
+ *! The second syntax does not call the system call @[time()] as often,
*! but is only updated in the backed (when Pike code isn't running).
*!
*! The third syntax can be used to measure time more preciely than one
2068:
*! is hopefully hard to decrypt.
*!
*! The second syntax is used to verify @[typed_password] against
- *! @[crypted_password], and returns @tt{1@} if they match, and @tt{0@}
- *! (zero) otherwise.
+ *! @[crypted_password], and returns @expr{1@} if they match, and
+ *! @expr{0@} (zero) otherwise.
*/
PMOD_EXPORT void f_crypt(INT32 args)
{
2129:
*!
*! Mark an object as destructed.
*!
- *! Calls @tt{o->destroy()@}, and then clears all variables in the object.
+ *! Calls @expr{o->destroy()@}, and then clears all variables in the object.
*!
*! All pointers and function pointers to this object will become zero.
*! The destructed object will be freed from memory as soon as possible.
2473:
*! For strings an array of int with the ISO10646 codes of the characters in
*! the string is returned.
*!
- *! For a multiset an array filled with ones (@tt{1@}) is returned.
+ *! For a multiset an array filled with ones (@expr{1@}) is returned.
*!
*! For arrays a single-level copy of @[x] is returned.
*!
2606:
*!
*! Return the program from which @[o] was instantiated.
*!
- *! If @[o] is not an object or has been destructed @tt{0@} (zero)
+ *! If @[o] is not an object or has been destructed @expr{0@} (zero)
*! will be returned.
*/
PMOD_EXPORT void f_object_program(INT32 args)
3214:
*!
*! Set the value @[m] to use weak or normal references in its
*! indices and/or values (whatever is applicable). @[state] is a
- *! bitfield built by using @tt{|@} between the following flags:
+ *! bitfield built by using @expr{|@} between the following flags:
*!
*! @int
*! @value Pike.WEAK_INDICES
3224:
*! Use weak references for values. Only applicable for arrays
*! and mappings.
*! @value Pike.WEAK
- *! Shorthand for @tt{Pike.WEAK_INDICES|Pike.WEAK_VALUES@}.
+ *! Shorthand for @expr{Pike.WEAK_INDICES|Pike.WEAK_VALUES@}.
*! @endint
*!
*! If a flag is absent, the corresponding field will use normal
- *! references. @[state] can also be @tt{1@} as a compatibility
+ *! references. @[state] can also be @expr{1@} as a compatibility
*! measure; it's treated like @[Pike.WEAK].
*!
*! @returns
3277:
/*! @decl int objectp(mixed arg)
*!
- *! Returns @tt{1@} if @[arg] is an object, @tt{0@} (zero) otherwise.
+ *! Returns @expr{1@} if @[arg] is an object, @expr{0@} (zero) otherwise.
*!
*! @seealso
*! @[mappingp()], @[programp()], @[arrayp()], @[stringp()], @[functionp()],
3303:
/*! @decl int functionp(mixed arg)
*!
- *! Returns @tt{1@} if @[arg] is a function, @tt{0@} (zero) otherwise.
+ *! Returns @expr{1@} if @[arg] is a function, @expr{0@} (zero) otherwise.
*!
*! @seealso
*! @[mappingp()], @[programp()], @[arrayp()], @[stringp()], @[objectp()],
3323:
/*! @decl int callablep(mixed arg)
*!
- *! Returns @tt{1@} if @[arg] is a callable, @tt{0@} (zero) otherwise.
+ *! Returns @expr{1@} if @[arg] is a callable, @expr{0@} (zero) otherwise.
*!
*! @seealso
*! @[mappingp()], @[programp()], @[arrayp()], @[stringp()], @[objectp()],
3641:
/*! @decl int programp(mixed arg)
*!
- *! Returns @tt{1@} if @[arg] is a program, @tt{0@} (zero) otherwise.
+ *! Returns @expr{1@} if @[arg] is a program, @expr{0@} (zero) otherwise.
*!
*! @seealso
*! @[mappingp()], @[intp()], @[arrayp()], @[stringp()], @[objectp()],
3674:
/*! @decl int intp(mixed arg)
*!
- *! Returns @tt{1@} if @[arg] is an int, @tt{0@} (zero) otherwise.
+ *! Returns @expr{1@} if @[arg] is an int, @expr{0@} (zero) otherwise.
*!
*! @seealso
*! @[mappingp()], @[programp()], @[arrayp()], @[stringp()], @[objectp()],
3683:
/*! @decl int mappingp(mixed arg)
*!
- *! Returns @tt{1@} if @[arg] is a mapping, @tt{0@} (zero) otherwise.
+ *! Returns @expr{1@} if @[arg] is a mapping, @expr{0@} (zero) otherwise.
*!
*! @seealso
*! @[intp()], @[programp()], @[arrayp()], @[stringp()], @[objectp()],
3692:
/*! @decl int arrayp(mixed arg)
*!
- *! Returns @tt{1@} if @[arg] is an array, @tt{0@} (zero) otherwise.
+ *! Returns @expr{1@} if @[arg] is an array, @expr{0@} (zero) otherwise.
*!
*! @seealso
*! @[intp()], @[programp()], @[mappingp()], @[stringp()], @[objectp()],
3701:
/*! @decl int multisetp(mixed arg)
*!
- *! Returns @tt{1@} if @[arg] is a multiset, @tt{0@} (zero) otherwise.
+ *! Returns @expr{1@} if @[arg] is a multiset, @expr{0@} (zero) otherwise.
*!
*! @seealso
*! @[intp()], @[programp()], @[arrayp()], @[stringp()], @[objectp()],
3710:
/*! @decl int stringp(mixed arg)
*!
- *! Returns @tt{1@} if @[arg] is a string, @tt{0@} (zero) otherwise.
+ *! Returns @expr{1@} if @[arg] is a string, @expr{0@} (zero) otherwise.
*!
*! @seealso
*! @[intp()], @[programp()], @[arrayp()], @[multisetp()], @[objectp()],
3719:
/*! @decl int floatp(mixed arg)
*!
- *! Returns @tt{1@} if @[arg] is a float, @tt{0@} (zero) otherwise.
+ *! Returns @expr{1@} if @[arg] is a float, @expr{0@} (zero) otherwise.
*!
*! @seealso
*! @[intp()], @[programp()], @[arrayp()], @[multisetp()], @[objectp()],
4069: Inside #if defined(HAVE_LOCALTIME)
*! e.g. Windows doesn't handle a negative @[timestamp].
*!
*! @note
- *! The field @tt{"timezone"@} may not be available on all platforms.
+ *! The field @expr{"timezone"@} may not be available on all platforms.
*!
*! @seealso
*! @[Calendar], @[gmtime()], @[time()], @[ctime()], @[mktime()]
4443:
*! an asterisk matches any string.
*!
*! When the second argument is a string and @[str] matches
- *! the glob @[glob] @tt{1@} will be returned, @tt{0@} (zero) otherwise.
+ *! the glob @[glob] @expr{1@} will be returned, @expr{0@} (zero) otherwise.
*!
*! If the second array is an array and array containing the strings in
*! @[arr] that match @[glob] will be returned.
6207:
*! Find out if an object identifier is a variable.
*!
*! @returns
- *! This function returns @tt{1@} if @[var] exists as a non-static variable
- *! in @[o], and returns @tt{0@} (zero) otherwise.
+ *! This function returns @expr{1@} if @[var] exists as a non-static variable
+ *! in @[o], and returns @expr{0@} (zero) otherwise.
*!
*! @seealso
*! @[indices()], @[values()]
6511: Inside #if defined(PIKE_DEBUG)
*!
*! This function is mostly intended for debugging. It will search through
*! all data structures in Pike looking for @[o] and print the
- *! locations on stderr. @[o] can be anything but @tt{int@} or
- *! @tt{float@}.
+ *! locations on stderr. @[o] can be anything but @expr{int@} or
+ *! @expr{float@}.
*!
*! @note
*! This function only exists if the Pike runtime has been compiled
7554:
*! Returns a string with filename and linenumber where @[fun]
*! was defined.
*!
- *! Returns @tt{0@} (zero) when no line can be found, e.g. for
+ *! Returns @expr{0@} (zero) when no line can be found, e.g. for
*! builtin functions and functions in destructed objects.
*/
PMOD_EXPORT void f_function_defined(INT32 args)