Commit f734c058 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Initial RCS checkin.

parent 15a05389
This diff is collapsed.
This is a list of all files in the server directory.
Atomic calls
------------
* services.h
* manipulate.h
* admin.c
* admin.h
* conference.c
* membership.c
* person.c
* session.c
* text.c
* version.incl
Inkluderas av admin.c. Inneh}ller versionsnummret multiplicerat med 100.
I b-server blir det en str{ng.
* parser.c@
* parser.h@
Matchar namn. Samma fil som anv{nds i tty-klienten. Ska bort till b-server.
Data cache
----------
* cache.c
* cache.h
H{r skulle det ha legat en fungerande cache om inte mud funnits...
Highest level of I/O
--------------------
* async.h
* send-async.c
* send-async.h
* call-switch.incl
* com-h.awk
* com.h
* connections.c
* connections.h
* end-of-atomic.c
* end-of-atomic.h
* fnc-def-init.awk
* fnc-def-init.incl
* fncdef-no-str-limit.txt
* fncdef.txt
* isc-parse.c
* isc-parse.h
Low-level I/O
-------------
* isc-server.c
* isc-server.h
* printf.c
Awk scripts
-----------
* call-switch.awk
Misc
----
* config.c
* kom-types.c
* kom-errno.c@
* log.c
* log.h
* minmax.h
* missing-ansi.c
* smalloc.c
* smalloc.h
* std-disclaimer.h
Dbck
----
* dbck
* dbck-cache.c
* dbck.c
* misc-parser.c@
* misc-parser.h@
Non-sources
-----------
* ChangeLog
* FileList
* Makefile
* TAGS
* To-do
Main
----
* lyskomd.c
* lyskomd.h
* text-garb.c
* text-garb.h
Protocol A
----------
* prot-a-output.c
* prot-a-output.h
* prot-a-parse-arg-c.awk
* prot-a-parse-arg-h.awk
* prot-a-parse-arg.c
* prot-a-parse-arg.h
* prot-a-parse.c
* prot-a-parse.h
* prot-a-send-async.c
* prot-a-send-async.h
* prot-a.c
* prot-a.h
String packet
-------------
* s-collat-tables.c@
* s-string.c@
Ramkomd
-------
* ram-cache.c
* ram-output.c
* ram-output.h
* ram-output2.c
* ram-parse.c
* ram-parse.h
* ram-smalloc.c
* ramkomd
* ramkomd.c
SMALLOC:
alloc = 0x12FE56A0
free = 0xCA348E63
Connection:
alloc = 0x18F4AE74
free = 0x67A7B144
Mux:
alloc = 0x56AE17DB
free = 0xF24A6BE7
ISC:
alloc = 0x12F54ACE
free = 0xEE47A37F
Borde ha en skedjuler f|r sync&garb. Sync&garb borde returnera antalet
millisekunder tills de skall bli anropade igen. Det minsta av dessa
v{rden borde vara timeout till isc_getnextevent.
-----------------
membership.c : adjust_read() har l|ss. (Suck. Vilka l|ss? Jag minns
inte nu. D{remot s} b|rjar det ju dyka upp rapporter om att folk f}r
l{sa samma inl{gg flera g}nger, s} det st{mmer nog... /ceder)
-----------------
log() borde se ut s} h{r:
void
log ( Severity sev
char *format;
...)
enum severity {
MSG,
ERR,
FATAL
}
typedef enum severity Severity;
Om log() f}r FATAL s} {r det samma sak som restart_lyskom(). Om log f}r f|r m}nga ERR f|r snabbt (eller f|r m}nga likadana?) s} startas lyskom om.
--------------------
\ No newline at end of file
BEGIN {
printf("/* Don't edit this file - it is generated automatically");
printf(" from\n call-switch.awk and fncdef.txt */\n");
printf("\tswitch(client->function)\n\t{\n");
}
$1 != "#" {
printf("\tcase call_fnc_%s:\n\t ", $2);
if ( $1 == "success" )
printf("status = %s(", $2);
else
printf("res->number = %s(", $2);
num=0;
string=0;
c_string=0;
for ( i = 3; i <= NF; i++)
{
if ( i != 3 )
printf(", ");
if ( $i == ":" )
{
printf("&res->%s", $(i+1));
break;
}
if ( $i == "num" )
printf("client->num%d", num++);
else if ( $i == "string" )
printf("client->string%d", string++);
else if ( $i == "c_string" )
printf("client->c_string%d", c_string++);
else if ( $i == "priv_bits" )
printf("client->priv_bits");
else if ( $i == "conf_type" )
printf("client->conf_type");
else if ( $i == "c_local_text_no_p" )
printf("client->c_local_text_no_p");
else if ( $i == "c_misc_info_p" )
printf("client->c_misc_info_p");
else
printf("\n#error in file server/fncdef.txt\n");
}
printf(");\n");
if ( $1 == "number" )
{
if ( $2 == "get_time" )
printf("\t status = OK;\n");
else
printf("\t status = (res->number != 0) ? OK : FAILURE;\n");
}
printf("\t break;\n\n");
}
END { printf("\t}\n"); }
BEGIN {
printf("/*\n");
printf(" * Don't edit this file! It is generated from fncdef.txt\n");
printf(" * and com-h.awk.\n");
printf(" */\n\n");
printf("enum call_header {");
cnt = 0;
}
$1 == "#" {
next;
}
cnt > 0 {
printf(",");
}
{
printf("\n call_fnc_%-20s = %d", $2, cnt++);
}
END { printf("\n};\n\n");
printf("typedef enum call_header Call_header;\n");
}
BEGIN {
printf("/* Don't edit this file - it is generated automatically");
printf(" from\n fnc-def-init.awk and fncdef.txt */\n\n");
printed_flg=0;
}
printed_flg==1 {
printf(",\n");
}
$1 != "#" {
printf(" {");
if ( $(NF-1) == ":" )
printf("%7s,", $NF);
else
printf("%7s,", $1);
printf("prot_a_parse_arg_%s}", $2);
printed_flg=1;
}
END {
printf("\n");
}
#
# This file is used to describe the functions in services.c. All
# functions that are reachable from the clients are listed here, together
# with their argument and return types.
#
# NEVER alter any functions that have been in use for a while! Add
# new/modified functions last on this list!
#
# Functions that are reachable when using protocal A:
#
# (Functions whose name end in _old are obsolete and should not be used.)
#
success login num c_string (PWD_LEN)
success logout
success pepsi num
success change_name num c_string (CONF_NAME_LEN)
success change_what_i_am_doing string (WHAT_DO_LEN)
number create_person c_string (CONF_NAME_LEN) c_string (PWD_LEN)
success get_person_stat_old num num : person
success set_priv_bits num priv_bits
success set_passwd num c_string (PWD_LEN) c_string (PWD_LEN)
success query_read_texts num num : membership
number create_conf c_string (CONF_NAME_LEN) conf_type
success delete_conf num
success lookup_name c_string (CONF_NAME_LEN) : conf_list
success get_conf_stat_old num num : conference
success add_member num num num num
success sub_member num num
success set_presentation num num
success set_etc_motd num num
success set_supervisor num num
success set_permitted_submitters num num
success set_super_conf num num
success set_conf_type num conf_type
success set_garb_nice num num
success get_marks : mark_list
success mark_text num num
success get_text num num num : string
success get_text_stat num : text_stat
success mark_as_read num num c_local_text_no_p
number create_text string (TEXT_LEN) num c_misc_info_p
success delete_text num
success add_recipient num num num
success sub_recipient num num
success add_comment num num
success sub_comment num num
success get_map num num num : text_list
success get_time : time_date
success get_info : info
success add_footnote num num
success sub_footnote num num
success who_is_on_old : who_info_list_old
success set_unread num num
success set_motd_of_lyskom num
success enable num
success sync
success shutdown num
success broadcast c_string (BROADCAST_LEN)
success get_membership num num num num : membership_list
success get_created_texts num num num : text_list
success get_members num num num : member_list
success get_person_stat num : person
success get_conf_stat num : conference
success who_is_on : who_info_list
success get_unread_confs num : conf_no_list
success send_message num c_string (BROADCAST_LEN)
success get_session_info num : session_info
success disconnect num
success who_am_i : session_no
BEGIN {
printf("/* Don't edit this file - it is generated automatically");
printf(" from\n prot-a-parse-arg-c.awk and fncdef.txt */\n\n");
printf("#include <setjmp.h>\n");
printf("#include <kom-types.h>\n");
printf("#include \"com.h\"\n");
printf("#include \"isc.h\"\n");
printf("#include \"connections.h\"\n");
printf("#include \"isc-parse.h\"\n");
printf("#include \"smalloc.h\"\n");
printf("#include \"prot-a.h\"\n");
printf("#include \"prot-a-parse.h\"\n");
printf("#include \"prot-a-parse-arg.h\"\n");
printf("#include <config.h>\n\n");
}
$1 != "#" {
printf("void\nprot_a_parse_arg_%s(Connection *client)\n{\n", $2);
printf(" switch( client->fnc_parse_pos )\n");
printf(" {\n");
num=0;
string=0;
c_string=0;
for ( i = 3; i <= NF; i++)
{
if ( $i == ":" )
break;
printf(" case %d:\n", i - 3);
if ( $i == "num" )
printf("\tclient->num%d = prot_a_parse_long(client);\n", num++);
else if ( $i == "c_string" )
printf("\tprot_a_parse_string(client, &client->c_string%d, %s);\n",
c_string++, $(++i));
else if ( $i == "string" )
printf("\tprot_a_parse_string(client, &client->string%d, %s);\n",
string++, $(++i));
else if ( $i == "priv_bits" )
printf("\tprot_a_parse_priv_bits(client, &client->priv_bits);\n");
else if ( $i == "conf_type" )
printf("\tprot_a_parse_conf_type(client, &client->conf_type);\n");
else if ( $i == "c_local_text_no_p" )
{
printf("\tif ( parse_nonwhite_char(client) != '{' )\n");
printf("\t longjmp(parse_env, ISC_PROTOCOL_ERR);\n");
printf("\tif ( client->num%d > MARK_AS_READ_CHUNK )\n", num-1);
printf("\t longjmp(parse_env, ISC_PROTOCOL_ERR);\n");
printf("\n");
printf("\tclient->c_local_text_no_p = ");
printf("smalloc(client->num%d\n", num-1);
printf("\t\t\t\t\t * sizeof(Local_text_no));\n\n");
printf("\tclient->array_parse_pos = 0;\n");
printf("\tclient->fnc_parse_pos = %d;\n", i - 2);
printf(" case %d:\n", i - 2);
printf("\twhile( client->array_parse_pos < ");
printf("client->num%d )\n", num-1);
printf("\t{\n");
printf("\t client->c_local_text_no_p[ client->");
printf("array_parse_pos ]\n");
printf("\t\t= prot_a_parse_long(client);\n");
printf("\t ++client->array_parse_pos;\n");
printf("\t}\n");
printf("\tclient->fnc_parse_pos = %d;", i - 1);
printf(" case %d:\n", i - 1);
printf("\tif ( parse_nonwhite_char(client) != '}' )\n");
printf("\t longjmp(parse_env, ISC_PROTOCOL_ERR);\n");
}
else if ( $i == "c_misc_info_p" )
{
printf("\tif ( parse_nonwhite_char(client) != '{' )\n");
printf("\t longjmp(parse_env, ISC_PROTOCOL_ERR);\n");
printf("\tif ( client->num%d > MAX_CREA_MISC )\n", num-1);
printf("\t longjmp(parse_env, ISC_PROTOCOL_ERR);\n");
printf("\n");
printf("\tclient->c_misc_info_p = ");
printf("smalloc(client->num%d\n", num-1);
printf("\t\t\t\t\t* sizeof(Misc_info));\n");
printf("\tclient->array_parse_pos = 0;\n");
printf("\tclient->fnc_parse_pos = %d;\n", i - 2);
printf(" case %d:\n", i - 2);
printf("\twhile( client->array_parse_pos < ");
printf("client->num%d )\n", num-1);
printf("\t{\n");
printf("\t prot_a_parse_misc_info(client,");
printf(" &client->c_misc_info_p");
printf("[ client->array_parse_pos ]);\n");
printf("\t ++client->array_parse_pos;\n");
printf("\t}\n");
printf("\tclient->fnc_parse_pos = %d;\n", i - 1);
printf(" case %d:\n", i - 1);
printf("\tif ( parse_nonwhite_char(client) != '}' )\n");
printf("\t longjmp(parse_env, ISC_PROTOCOL_ERR);\n");
}
else
printf("#error in prot-a-parse-arg-c.awk: not ready yet.\n");
if ( i != NF && $(i+1) != ":")
printf("\tclient->fnc_parse_pos = %d;\n", i - 2);
}
printf(" default:\n");
printf("\tclient->fnc_parse_pos = 0;\n");
printf(" }\n");
printf("}\n\n");
}
END {
printf("/* end of this auto generated file. */\n");
}
BEGIN {
printf("/* Don't edit this file - it is generated automatically");
printf(" from\n prot-a-parse-arg-h.awk and fncdef.txt */\n\n");
}
$1 != "#" {
printf("void prot_a_parse_arg_%s(Connection *client);\n", $2);
}
END { printf("/* end of this auto generated file. */\n");
}
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