summaryrefslogtreecommitdiff
path: root/src/common/strlib.h
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-15 13:49:40 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-15 13:49:40 +0000
commite6276c539a165616071dc46355a9579d4a7ae647 (patch)
tree7a988dcf949b0149d7b6c674bb2292333ae20e96 /src/common/strlib.h
parentbbadf310e83b4c8b3c683065f016892cf2b36a8a (diff)
downloadhercules-e6276c539a165616071dc46355a9579d4a7ae647.tar.gz
hercules-e6276c539a165616071dc46355a9579d4a7ae647.tar.bz2
hercules-e6276c539a165616071dc46355a9579d4a7ae647.tar.xz
hercules-e6276c539a165616071dc46355a9579d4a7ae647.zip
* Corrected some invalid syntax in skill_db.txt (wrong usage of commas)
* Renamed BA_FROSTJOKE to BA_FROSTJOKER (aegis server-side name) * Implemented a generic framework for parsing delimited db files (allows specifying min/max column ranges and max number of rows to read) * Corrected a typo in quest_update_objective() * Cleaned up pc.c a bit git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12599 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/strlib.h')
-rw-r--r--src/common/strlib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/strlib.h b/src/common/strlib.h
index d4b514089..3c4075902 100644
--- a/src/common/strlib.h
+++ b/src/common/strlib.h
@@ -91,6 +91,10 @@ size_t sv_escape_c(char* out_dest, const char* src, size_t len, const char* esca
/// out_dest should be len+1 in size and can be the same buffer as src.
size_t sv_unescape_c(char* out_dest, const char* src, size_t len);
+/// Opens and parses a file containing delim-separated columns, feeding them to the specified callback function row by row.
+/// Tracks the progress of the operation (current line number, number of successfully processed rows).
+/// Returns 'true' if it was able to process the specified file, or 'false' if it could not be read.
+bool sv_readdb(const char* directory, const char* filename, char delim, int mincols, int maxcols, int maxrows, bool (*parseproc)(char* fields[], int columns, int current));
/// StringBuf - dynamic string