diff --git a/src/server/ChangeLog b/src/server/ChangeLog index f252d905d54d2fde4243bca674b25cbde0fe2a6b..a7ed43faa422653e3d620bc9861f1bfaea4eb9c0 100644 --- a/src/server/ChangeLog +++ b/src/server/ChangeLog @@ -1,3 +1,7 @@ +Sun Jan 12 02:30:34 1992 Per Cederqvist (ceder at lysator) + + * prot_a_get_token (prot-a-parse.[ch]): Then function is now static. + Sun Jan 5 19:10:20 1992 Per Cederqvist (ceder at lysator) * main (dbck.c): Tell the user why no compression was done if he diff --git a/src/server/prot-a-parse.c b/src/server/prot-a-parse.c index 4ff3d030263be4822cb0134a0d83656d3eb78d7c..e8ce8bdaba599923681a28e6ce6def4f0796bffb 100644 --- a/src/server/prot-a-parse.c +++ b/src/server/prot-a-parse.c @@ -1,5 +1,5 @@ /* - * $Id: prot-a-parse.c,v 0.9 1991/12/17 22:20:57 ceder Exp $ + * $Id: prot-a-parse.c,v 0.10 1992/01/12 01:32:34 ceder Exp $ * Copyright (C) 1991 Lysator Academic Computer Association. * * This file is part of the LysKOM server. @@ -28,7 +28,7 @@ * BUG: Not all functions are used, I think. /ceder */ -static char *rcsid = "$Id: prot-a-parse.c,v 0.9 1991/12/17 22:20:57 ceder Exp $"; +static char *rcsid = "$Id: prot-a-parse.c,v 0.10 1992/01/12 01:32:34 ceder Exp $"; #include <setjmp.h> @@ -47,6 +47,36 @@ static char *rcsid = "$Id: prot-a-parse.c,v 0.9 1991/12/17 22:20:57 ceder Exp $" #include "config.h" #include "log.h" + +/* + * Return next token from the input stream. Note that the String returned + * by this call points into data that might be freed by the next call to + * get_token or any function which reads from the stream. + */ + +static String +prot_a_get_token(Connection *client) +{ + String result; + String_size old_first; + + old_first = client->first_to_parse; + + result = s_strtok(client->unparsed, &client->first_to_parse, + s_fcrea_str(WHITESPACE)); + + /* Check that there was at least one trailing blank. */ + + if ( client->first_to_parse >= s_strlen(client->unparsed) ) + { + client->first_to_parse = old_first; + longjmp(parse_env, ISC_MSG_INCOMPLETE); + } + + return result; +} + + long prot_a_parse_long(Connection *client) { @@ -267,28 +297,6 @@ prot_a_parse_misc_info(Connection *client, } -String -prot_a_get_token(Connection *client) -{ - String result; - String_size old_first; - - old_first = client->first_to_parse; - - result = s_strtok(client->unparsed, &client->first_to_parse, - s_fcrea_str(WHITESPACE)); - - /* Check that there was at least one trailing blank. */ - - if ( client->first_to_parse >= s_strlen(client->unparsed) ) - { - client->first_to_parse = old_first; - longjmp(parse_env, ISC_MSG_INCOMPLETE); - } - - return result; -} - void prot_a_parse_time_date(Connection *client, struct tm *result) diff --git a/src/server/prot-a-parse.h b/src/server/prot-a-parse.h index 70f1ae489e664eb1002f542468adcee64dd9a0b1..a6ef44da2dd98f182197b2f574204c98964953e2 100644 --- a/src/server/prot-a-parse.h +++ b/src/server/prot-a-parse.h @@ -1,5 +1,5 @@ /* - * $Id: prot-a-parse.h,v 0.4 1991/12/17 22:20:55 ceder Exp $ + * $Id: prot-a-parse.h,v 0.5 1992/01/12 01:32:32 ceder Exp $ * Copyright (C) 1991 Lysator Academic Computer Association. * * This file is part of the LysKOM server. @@ -23,7 +23,7 @@ * Please mail bug reports to bug-lyskom@lysator.liu.se. */ /* - * $Id: prot-a-parse.h,v 0.4 1991/12/17 22:20:55 ceder Exp $ + * $Id: prot-a-parse.h,v 0.5 1992/01/12 01:32:32 ceder Exp $ * */ extern long @@ -47,14 +47,6 @@ extern void prot_a_parse_misc_info(Connection *client, Misc_info *result); -/* - * Return next token from the input stream. Note that the String returned - * by this call points into data that might be freed by the next call to - * get_token or any function which reads from the stream. - */ -extern String -prot_a_get_token(Connection *client); - extern void prot_a_parse_time_date(Connection *client, struct tm *result);