pike.git / lib / modules / Tools.pmod / Standalone.pmod / extract_autodoc.pike

version» Context lines:

pike.git/lib/modules/Tools.pmod/Standalone.pmod/extract_autodoc.pike:327:    string res = extract(srcdir+fn, imgdir, builddir, root);    if(!res) {    if (!(flags & Tools.AutoDoc.FLAG_KEEP_GOING))    exit(1);    res = "";    }       if (sizeof(res) && (res != "\n")) {    // Validate the extracted XML.    mixed err = catch { +  Parser.XML.Tree.SimpleRootNode root =    Parser.XML.Tree.simple_parse_input(res); -  +  Parser.XML.Tree.Node n = root->get_children()[0]; +  if ((n->get_node_type() == Parser.XML.Tree.XML_HEADER) && +  (lower_case(n->get_attributes()->encoding||"") == "utf-8")) { +  // Validate UTF-8 encoding. +  string dec = utf8_to_string(res); +  }    };    if (err) {    werror("Extractor generated broken XML for file %s:\n"    "%s",    builddir + fn + ".xml", describe_error(err));    Stdio.write_file(builddir+fn+".brokenxml", res);    if (Stdio.exist(builddir+fn+".xml")) {    num_updated_files++;    rm(builddir+fn+".xml");    }
pike.git/lib/modules/Tools.pmod/Standalone.pmod/extract_autodoc.pike:703:       result = Tools.AutoDoc.ProcessXML.extractXML(filename, 1, type,    name, root, flags);    }    };       if (err) {    if (!verbosity)    ;    werror("\nERROR: %s\n", describe_error(err)); -  // return 0; +  +  return 0;    }       if(!result) result="";       if(sizeof(result) && imgdest)    result = Tools.AutoDoc.ProcessXML.moveImages(result,    combine_path(filename, ".."),    imgdest, !verbosity);    return result+"\n";   }