Skip to content
Snippets Groups Projects
Commit 6e6655bb authored by Per Cederqvist's avatar Per Cederqvist
Browse files

The function prot_a_get_token is now static, not extern.

parent 1cb7c21d
No related branches found
No related tags found
No related merge requests found
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) 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 * main (dbck.c): Tell the user why no compression was done if he
......
/* /*
* $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. * Copyright (C) 1991 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* BUG: Not all functions are used, I think. /ceder * 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> #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 $" ...@@ -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 "config.h"
#include "log.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 long
prot_a_parse_long(Connection *client) prot_a_parse_long(Connection *client)
{ {
...@@ -267,28 +297,6 @@ prot_a_parse_misc_info(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 void
prot_a_parse_time_date(Connection *client, prot_a_parse_time_date(Connection *client,
struct tm *result) struct tm *result)
......
/* /*
* $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. * Copyright (C) 1991 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se. * 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 extern long
...@@ -47,14 +47,6 @@ extern void ...@@ -47,14 +47,6 @@ extern void
prot_a_parse_misc_info(Connection *client, prot_a_parse_misc_info(Connection *client,
Misc_info *result); 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 extern void
prot_a_parse_time_date(Connection *client, prot_a_parse_time_date(Connection *client,
struct tm *result); struct tm *result);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment