Branch: Tag:

2003-01-20

2003-01-20 18:01:50 by Martin Nilsson <mani@lysator.liu.se>

strlen -> sizeof

Rev: bin/fake_dynamic_load.pike:1.6
Rev: bin/httpd.pike:1.5
Rev: bin/install.pike:1.109
Rev: bin/mkpeep.pike:1.30
Rev: bin/tarfilter.pike:1.4
Rev: bin/test_pike.pike:1.80
Rev: bin/unbug:1.10
Rev: lib/modules/ADT.pmod/struct.pike:1.11
Rev: lib/modules/Audio.pmod/Format.pmod/module.pmod:1.6
Rev: lib/modules/Calendar.pmod/Events.pmod:1.13
Rev: lib/modules/Calendar.pmod/Time.pmod:1.22
Rev: lib/modules/Calendar.pmod/Timezone.pmod:1.27
Rev: lib/modules/Calendar.pmod/YMD.pmod:1.48
Rev: lib/modules/Calendar.pmod/mkrules.pike:1.7
Rev: lib/modules/Colors.pmod:1.13
Rev: lib/modules/Crypto/_rsa.pike:1.7
Rev: lib/modules/Crypto/des3.pike:1.8
Rev: lib/modules/Crypto/dsa.pike:1.12
Rev: lib/modules/Crypto/hmac.pike:1.9
Rev: lib/modules/Crypto/randomness.pmod:1.24
Rev: lib/modules/Crypto/rsa.pike:1.32
Rev: lib/modules/Filesystem.pmod/System.pike:1.14
Rev: lib/modules/Filesystem.pmod/Tar.pmod:1.19
Rev: lib/modules/GTKSupport.pmod/MenuFactory.pmod:1.8
Rev: lib/modules/Getopt.pmod:1.26
Rev: lib/modules/Languages.pmod/PLIS.pmod:1.15
Rev: lib/modules/Locale.pmod/module.pmod:1.16
Rev: lib/modules/MIME.pmod/module.pmod:1.6
Rev: lib/modules/Parser.pmod/C.pmod:1.38
Rev: lib/modules/Parser.pmod/XML.pmod/DOM.pmod:1.10
Rev: lib/modules/Parser.pmod/XML.pmod/NSTree.pmod:1.7
Rev: lib/modules/Parser.pmod/XML.pmod/Tree.pmod:1.25
Rev: lib/modules/Process.pmod:1.38
Rev: lib/modules/Protocols.pmod/DNS.pmod:1.71
Rev: lib/modules/Protocols.pmod/HTTP.pmod/Query.pike:1.48
Rev: lib/modules/Protocols.pmod/HTTP.pmod/Server.pmod/Request.pike:1.15
Rev: lib/modules/Protocols.pmod/IMAP.pmod/parse_line.pike:1.26
Rev: lib/modules/Protocols.pmod/IMAP.pmod/server.pike:1.15
Rev: lib/modules/Protocols.pmod/IMAP.pmod/types.pmod:1.28
Rev: lib/modules/Protocols.pmod/IRC.pmod/Error.pmod:1.4
Rev: lib/modules/Protocols.pmod/IRC.pmod/Raw.pike:1.7
Rev: lib/modules/Protocols.pmod/Ident.pmod:1.10
Rev: lib/modules/Protocols.pmod/LDAP.pmod/protocol.pike:1.9
Rev: lib/modules/Protocols.pmod/Line.pmod:1.21
Rev: lib/modules/Protocols.pmod/LysKOM.pmod/Helper.pmod:1.7
Rev: lib/modules/Protocols.pmod/LysKOM.pmod/Raw.pike:1.14
Rev: lib/modules/Protocols.pmod/NNTP.pmod:1.11
Rev: lib/modules/Protocols.pmod/TELNET.pmod:1.19
Rev: lib/modules/Protocols.pmod/X.pmod/KeySyms.pmod:1.3
Rev: lib/modules/Protocols.pmod/X.pmod/Requests.pmod:1.32
Rev: lib/modules/Protocols.pmod/X.pmod/Xlib.pmod:1.48
Rev: lib/modules/Protocols.pmod/X.pmod/_Xlib.pmod:1.18
Rev: lib/modules/Remote.pmod/connection.pike:1.25
Rev: lib/modules/SSL.pmod/cipher.pike:1.21
Rev: lib/modules/SSL.pmod/connection.pike:1.24
Rev: lib/modules/SSL.pmod/handshake.pike:1.30
Rev: lib/modules/SSL.pmod/https.pike:1.13
Rev: lib/modules/SSL.pmod/packet.pike:1.12
Rev: lib/modules/SSL.pmod/session.pike:1.21
Rev: lib/modules/SSL.pmod/sslfile.pike:1.51
Rev: lib/modules/SSL.pmod/state.pike:1.15
Rev: lib/modules/Sql.pmod/postgres.pike:1.19
Rev: lib/modules/Standards.pmod/ASN1.pmod/Encode.pmod:1.9
Rev: lib/modules/Standards.pmod/ASN1.pmod/Types.pmod:1.21
Rev: lib/modules/Standards.pmod/EXIF.pmod:1.16
Rev: lib/modules/Standards.pmod/ID3.pmod:1.8
Rev: lib/modules/Standards.pmod/PKCS.pmod/PFX.pmod:1.7
Rev: lib/modules/Standards.pmod/PKCS.pmod/Signature.pmod:1.7
Rev: lib/modules/Stdio.pmod/Readline.pike:1.44
Rev: lib/modules/Stdio.pmod/Terminfo.pmod:1.14
Rev: lib/modules/Stdio.pmod/module.pmod:1.163
Rev: lib/modules/String.pmod/Elite.pmod:1.3
Rev: lib/modules/String.pmod/module.pmod:1.10
Rev: lib/modules/Tools.pmod/AutoDoc.pmod/CExtractor.pmod:1.25
Rev: lib/modules/Tools.pmod/AutoDoc.pmod/DocParser.pmod:1.54
Rev: lib/modules/Tools.pmod/AutoDoc.pmod/MirarDocParser.pike:1.19
Rev: lib/modules/Tools.pmod/AutoDoc.pmod/PikeExtractor.pmod:1.30
Rev: lib/modules/Tools.pmod/AutoDoc.pmod/PikeParser.pike:1.32
Rev: lib/modules/Tools.pmod/AutoDoc.pmod/ProcessXML.pmod:1.51
Rev: lib/modules/Tools.pmod/PEM.pmod:1.9
Rev: lib/modules/Tools.pmod/Shoot.pmod/module.pmod:1.6
Rev: lib/modules/Tools.pmod/Standalone.pmod/assemble_autodoc.pike:1.25
Rev: lib/modules/Tools.pmod/X509.pmod:1.17
Rev: lib/modules/Tools.pmod/_PEM.pmod:1.5
Rev: lib/modules/Tools.pmod/sed.pmod:1.5
Rev: lib/modules/Web.pmod/Crawler.pmod:1.14
Rev: lib/modules/_Image.pmod/Fonts.pmod:1.10
Rev: lib/modules/_Image.pmod/module.pmod:1.32
Rev: lib/modules/_Image_XCF.pmod:1.20
Rev: lib/modules/_Image_XPM.pmod:1.13
Rev: src/modules/Gz/flushtest.pike:1.3
Rev: src/modules/HTTPLoop/test.pike:1.3
Rev: src/modules/HTTPLoop/wwwserver.pike:1.5
Rev: src/modules/_Charset/module.pmod.in:1.28
Rev: src/modules/files/socktest.pike:1.21
Rev: src/post_modules/GTK/new_build_pgtk.pike:1.22
Rev: src/post_modules/GTK/output/doc-pikeref.pike:1.13
Rev: src/post_modules/GTK/output/few.pike:1.2
Rev: src/post_modules/GTK/output/split.pike:1.11
Rev: src/post_modules/Unicode/make_canonicals.pike:1.2
Rev: src/post_modules/Unicode/make_decompose.pike:1.4
Rev: src/post_modules/Unicode/make_wordbits.pike:1.2
Rev: src/post_modules/Unicode/test.pike:1.6

27: Inside #if 0
  int eolp()   {    skip_whitespace(); -  return !strlen(buffer); +  return !sizeof(buffer);   }   #endif   
36:   {    skip_whitespace();    -  if (!strlen(buffer)) +  if (!sizeof(buffer))    return -1;       int i; -  for(i = 0; i<strlen(buffer); i++) +  for(i = 0; i<sizeof(buffer); i++)    if ( (buffer[i] < '0') || ('9' < buffer[i]) )    break;   
66:    atom, buffer);       werror(sprintf("=> atom: %O\n", atom)); -  return strlen(atom) && atom; +  return sizeof(atom) && atom;   }      string|object get_string()
75:       skip_whitespace();    -  if (!strlen(buffer)) +  if (!sizeof(buffer))    return 0;       switch(buffer[0])
100:    }    case '{':    { -  if (buffer[strlen(buffer)-1..] != "}") +  if (buffer[sizeof(buffer)-1..] != "}")    return 0; -  string n = buffer[1..strlen(buffer)-2]; +  string n = buffer[1..sizeof(buffer)-2];       buffer = "";    if ( (sizeof(values(n) - values("0123456789")))
121:    werror("get_astring: buffer = '%s'\n", buffer);       skip_whitespace(); -  if (!strlen(buffer)) +  if (!sizeof(buffer))    return 0;    switch(buffer[0])    {
153:   mapping get_token(int eol, int accept_options)   {    skip_whitespace(); -  if (!strlen(buffer)) +  if (!sizeof(buffer))    return (eol == -1) && ([ "type" : "eol", "eol" : 1 ]);       if (eol && (buffer[0] == eol))
188:   /* Reads a <start.size> suffix */   mapping get_range(mapping atom)   { -  if (!strlen(buffer) || (buffer[0] != '<')) +  if (!sizeof(buffer) || (buffer[0] != '<'))    return atom;       buffer = buffer[1..];       int start = get_number(); -  if ((start < 0) || !strlen(buffer) || (buffer[0] != '.')) +  if ((start < 0) || !sizeof(buffer) || (buffer[0] != '.'))    return 0;       buffer = buffer[1..];       int size = get_number(); -  if ((size <= 0) || !strlen(buffer) || (buffer[0] != '>')) +  if ((size <= 0) || !sizeof(buffer) || (buffer[0] != '>'))    return 0;       buffer = buffer[1..];
217:   {    skip_whitespace();    -  if (!strlen(buffer) || (buffer[0] != '(') ) +  if (!sizeof(buffer) || (buffer[0] != '(') )    return 0;       buffer = buffer[1..];
234:    }    skip_whitespace(); // This one shouldn't be needed, but...    -  if (!strlen(buffer)) +  if (!sizeof(buffer))    return 0;       if (buffer[0] = ')')
259:   mapping get_simple_list(int max_depth)   {    skip_whitespace(); -  if (!strlen(buffer)) +  if (!sizeof(buffer))    return 0;       if (buffer[0] == '(') {
289:    {    skip_whitespace();    -  if (!strlen(buffer)) +  if (!sizeof(buffer))    return 0;       if (buffer[0] == terminator)
332:       mapping res = ([ "type" : "atom",    "atom" : atom ]); -  if (!strlen(buffer) || (buffer[0] != '[')) +  if (!sizeof(buffer) || (buffer[0] != '['))    {    res->raw = atom;    return res;
355:    option_start[..sizeof(option_start) - sizeof(buffer) - 1];       -  if (!strlen(buffer) || (buffer[0] != '<')) +  if (!sizeof(buffer) || (buffer[0] != '<'))    return res;       /* Parse <start.size> suffix */    buffer = buffer[1..];       int start = get_number(); -  if ((start < 0) || !strlen(buffer) || (buffer[0] != '.')) +  if ((start < 0) || !sizeof(buffer) || (buffer[0] != '.'))    return 0;       buffer = buffer[1..];       int size = get_number(); -  if ((size < 0) || !strlen(buffer) || (buffer[0] != '>')) +  if ((size < 0) || !sizeof(buffer) || (buffer[0] != '>'))    return 0;       buffer = buffer[1..];