diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-04-25 17:22:25 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-04-25 17:22:25 +0200 |
commit | 0accbd0364e0333e0b119aa9ce93e34ded9df6cb (patch) | |
tree | bdf0738c29dc1f57fbfba3a1754524e238f15b52 /mysys/mf_iocache2.c | |
parent | 37f87d73ae8dc6c30594867b40a5d70159acf63c (diff) | |
download | mariadb-git-0accbd0364e0333e0b119aa9ce93e34ded9df6cb.tar.gz |
lots of post-merge changes
Diffstat (limited to 'mysys/mf_iocache2.c')
-rw-r--r-- | mysys/mf_iocache2.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c index 04a5214e2d4..c74504e4fa8 100644 --- a/mysys/mf_iocache2.c +++ b/mysys/mf_iocache2.c @@ -474,52 +474,3 @@ err: return (size_t) -1; } - -int init_strvar_from_file(char *var, int max_size, IO_CACHE *f, - const char *default_val) -{ - uint length; - DBUG_ENTER("init_strvar_from_file"); - - if ((length=my_b_gets(f,var, max_size))) - { - char* last_p = var + length -1; - if (*last_p == '\n') - *last_p = 0; /* if we stopped on newline, kill it */ - else - { - /* - If we truncated a line or stopped on last char, remove all chars - up to and including newline. - */ - int c; - while (((c=my_b_get(f)) != '\n' && c != my_b_EOF)) - ; - } - DBUG_RETURN(0); - } - else if (default_val) - { - strmake(var, default_val, max_size-1); - DBUG_RETURN(0); - } - DBUG_RETURN(1); -} - -int init_intvar_from_file(int* var, IO_CACHE* f, int default_val) -{ - char buf[32]; - DBUG_ENTER("init_intvar_from_file"); - - if (my_b_gets(f, buf, sizeof(buf))) - { - *var = atoi(buf); - DBUG_RETURN(0); - } - else if (default_val) - { - *var = default_val; - DBUG_RETURN(0); - } - DBUG_RETURN(1); -} |