Commit ccf697f9 authored by Per Cederqvist's avatar Per Cederqvist

(fparse_conference_2): Remove dead code that depends on the

	long-obsolete DISKERR symbol.
(fparse_conference_0): Likewise.
(fparse_person_0): Likewise.
(fparse_person_2): Likewise.
(fparse_text_stat_2): Likewise.
(fparse_text_stat_0): Likewise.
parent 4d07f229
/*
* $Id: ram-parse.c,v 0.39 1999/06/26 11:38:28 ceder Exp $
* $Id: ram-parse.c,v 0.40 1999/07/05 21:20:17 ceder Exp $
* Copyright (C) 1991, 1993-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -22,9 +22,7 @@
*
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
/*#define DISKERR*/ /* Some corrections
that are needed by diskomd 0.29.
*/
/*
* ram-parse.c -- parse objects from disk file.
*/
......@@ -35,7 +33,7 @@
#endif
static const char *
rcsid = "$Id: ram-parse.c,v 0.39 1999/06/26 11:38:28 ceder Exp $";
rcsid = "$Id: ram-parse.c,v 0.40 1999/07/05 21:20:17 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -228,39 +226,6 @@ fparse_conference_2(FILE *fp,
result->nice = fparse_long(fp);
#ifdef DISKERR
if ( fparse_long_errors != 0 )
{
kom_log("fparse_conference(): Error parsing 'nice' at pos %d. "
"nice set to 77 and error ignored.\n", ftell(fp));
fparse_long_errors = 0;
result->nice = 77;
}
if ( result->nice < 10 )
{
char *name;
int new_nice;
name = s_crea_c_str(result->name);
new_nice = 10 * result->nice + 7;
if ( name == NULL )
{
kom_log("fparse_conference(): nice in (null) was %d, set to %d.\n",
result->nice, new_nice);
}
else
{
kom_log("fparse_conference(): nice in %s was %d, set to %d.\n",
name, result->nice, new_nice);
string_free(name);
}
result->nice = new_nice;
}
#endif
result->keep_commented = fparse_long(fp);
result->expire = fparse_long(fp);
result->highest_aux = fparse_long(fp);
......@@ -316,40 +281,6 @@ fparse_conference_0(FILE *fp,
}
result->nice = fparse_long(fp);
#ifdef DISKERR
if ( fparse_long_errors != 0 )
{
kom_log("fparse_conference(): Error parsing 'nice' at pos %d. "
"nice set to 77 and error ignored.\n", ftell(fp));
fparse_long_errors = 0;
result->nice = 77;
}
if ( result->nice < 10 )
{
char *name;
int new_nice;
name = s_crea_c_str(result->name);
new_nice = 10 * result->nice + 7;
if ( name == NULL )
{
kom_log("fparse_conference(): nice in (null) was %d, set to %d.\n",
result->nice, new_nice);
}
else
{
kom_log("fparse_conference(): nice in %s was %d, set to %d.\n",
name, result->nice, new_nice);
string_free(name);
}
result->nice = new_nice;
}
#endif
result->highest_aux = 0;
result->aux_item_list.length = 0;
result->aux_item_list.items = 0;
......@@ -433,16 +364,6 @@ fparse_person_0(FILE *fp,
person->created_confs = fparse_long(fp);
#ifdef DISKERR
if ( fparse_long_errors != 0 )
{
kom_log("fparse_person(): Error parsing 'created_confs' at pos %d. "
"created_confs set to 0 and error ignored.\n", ftell(fp));
fparse_long_errors = 0;
person->created_confs = 0;
}
#endif
fskipwhite(fp);
return OK;
}
......@@ -501,16 +422,6 @@ fparse_person_2(FILE *fp,
person->created_confs = fparse_long(fp);
#ifdef DISKERR
if ( fparse_long_errors != 0 )
{
kom_log("fparse_person(): Error parsing 'created_confs' at pos %d. "
"created_confs set to 0 and error ignored.\n", ftell(fp));
fparse_long_errors = 0;
person->created_confs = 0;
}
#endif
fskipwhite(fp);
return OK;
......@@ -1226,23 +1137,11 @@ fparse_text_stat_2(FILE *fp,
fskipwhite(fp);
if ( (c = getc(fp)) != '}' )
{
#ifdef DISKERR
if ( c == '@' || c == '+' )
{
ungetc(c, fp);
kom_log("fparse_text_stat(): got '%c' when expecting '}'.\n."
"Character ungetc'd and interpreted as a '}'."
" (pos %d).\n", c, ftell(fp));
}
else
#endif
{
kom_log("fparse_text_stat(): expected '}' at pos %lu.\n",
kom_log("fparse_text_stat(): expected '}' at pos %lu.\n",
(unsigned long)ftell(fp));
err_stat = 16;
kom_errno = KOM_LDB_ERR;
return FAILURE;
}
err_stat = 16;
kom_errno = KOM_LDB_ERR;
return FAILURE;
}
break;
......@@ -1275,23 +1174,11 @@ fparse_text_stat_2(FILE *fp,
fskipwhite(fp);
if ( (c = getc(fp)) != '*' )
{
#ifdef DISKERR
if ( c == '@' || c == '+' )
{
ungetc(c, fp);
kom_log("fparse_text_stat(): got '%c' when expecting '*'.\n."
"Character ungetc'd and interpreted as a '*'."
" (pos %d).\n", c, ftell(fp));
}
else
#endif
{
kom_log("fparse_text_stat(): expected '*' at pos %lu.\n",
kom_log("fparse_text_stat(): expected '*' at pos %lu.\n",
(unsigned long)ftell(fp));
err_stat = 18;
kom_errno = KOM_LDB_ERR;
return FAILURE;
}
err_stat = 18;
kom_errno = KOM_LDB_ERR;
return FAILURE;
}
if ( result->misc_items != NULL )
......@@ -1366,23 +1253,11 @@ fparse_text_stat_0(FILE *fp,
fskipwhite(fp);
if ( (c = getc(fp)) != '}' )
{
#ifdef DISKERR
if ( c == '@' || c == '+' )
{
ungetc(c, fp);
kom_log("fparse_text_stat(): got '%c' when expecting '}'.\n."
"Character ungetc'd and interpreted as a '}'."
" (pos %d).\n", c, ftell(fp));
}
else
#endif
{
kom_log("fparse_text_stat(): expected '}' at pos %lu.\n",
kom_log("fparse_text_stat(): expected '}' at pos %lu.\n",
(unsigned long)ftell(fp));
err_stat = 19;
kom_errno = KOM_LDB_ERR;
return FAILURE;
}
err_stat = 19;
kom_errno = KOM_LDB_ERR;
return FAILURE;
}
break;
......@@ -1415,23 +1290,11 @@ fparse_text_stat_0(FILE *fp,
fskipwhite(fp);
if ( (c = getc(fp)) != '*' )
{
#ifdef DISKERR
if ( c == '@' || c == '+' )
{
ungetc(c, fp);
kom_log("fparse_text_stat(): got '%c' when expecting '*'.\n."
"Character ungetc'd and interpreted as a '*'."
" (pos %d).\n", c, ftell(fp));
}
else
#endif
{
kom_log("fparse_text_stat(): expected '*' at pos %lu.\n",
kom_log("fparse_text_stat(): expected '*' at pos %lu.\n",
(unsigned long)ftell(fp));
err_stat = 21;
kom_errno = KOM_LDB_ERR;
return FAILURE;
}
err_stat = 21;
kom_errno = KOM_LDB_ERR;
return FAILURE;
}
if ( result->misc_items != NULL )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment