2003-07-01 20:37:09 +00:00
|
|
|
// The contents of this file are subject to the BOINC Public License
|
2002-04-30 22:22:54 +00:00
|
|
|
// Version 1.0 (the "License"); you may not use this file except in
|
|
|
|
// compliance with the License. You may obtain a copy of the License at
|
2003-07-01 20:37:09 +00:00
|
|
|
// http://boinc.berkeley.edu/license_1.0.txt
|
2002-04-30 22:22:54 +00:00
|
|
|
//
|
|
|
|
// Software distributed under the License is distributed on an "AS IS"
|
|
|
|
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
|
|
|
// License for the specific language governing rights and limitations
|
|
|
|
// under the License.
|
|
|
|
//
|
|
|
|
// The Original Code is the Berkeley Open Infrastructure for Network Computing.
|
|
|
|
//
|
|
|
|
// The Initial Developer of the Original Code is the SETI@home project.
|
|
|
|
// Portions created by the SETI@home project are Copyright (C) 2002
|
|
|
|
// University of California at Berkeley. All Rights Reserved.
|
|
|
|
//
|
|
|
|
// Contributor(s):
|
|
|
|
//
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2003-06-16 19:06:08 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string>
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2003-06-17 01:03:45 +00:00
|
|
|
extern bool parse(char* , char* );
|
|
|
|
extern bool parse_int(const char* buf, const char*tag, int&);
|
|
|
|
extern bool parse_double(const char*, const char*, double&);
|
|
|
|
extern bool parse_str(const char*, const char*, char*, int);
|
2003-06-17 18:43:13 +00:00
|
|
|
extern void parse_attr(const char* buf, const char* attrname, char* out, int len);
|
2003-06-17 01:03:45 +00:00
|
|
|
extern bool match_tag(const char*, const char*);
|
|
|
|
extern bool match_tag(const std::string &, const char*);
|
2002-04-30 22:22:54 +00:00
|
|
|
extern void copy_stream(FILE* in, FILE* out);
|
2002-07-05 05:33:40 +00:00
|
|
|
extern void strcatdup(char*& p, char* buf);
|
2003-06-17 01:03:45 +00:00
|
|
|
extern int dup_element_contents(FILE* in, const char* end_tag, char** pp);
|
|
|
|
extern int copy_element_contents(FILE* in, const char* end_tag, char* p, int len);
|
|
|
|
extern int read_file_malloc(const char* pathname, char*& str);
|
2002-12-20 02:12:27 +00:00
|
|
|
extern void replace_element(char* buf, char* start, char* end, char* replacement);
|
2003-06-17 01:03:45 +00:00
|
|
|
extern void extract_venue(const char* in, const char* venue_name, char* out);
|
2003-05-20 00:03:39 +00:00
|
|
|
extern char* sgets(char* buf, int len, char* &in);
|
2003-06-16 19:06:08 +00:00
|
|
|
extern bool extract_xml_record(const std::string &field, const char *tag, std::string &record);
|
|
|
|
|