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

(prepare_aux_item): Now a static function.

(filter_aux_item_list): Comment updated.
parent 806601a5
/*
* $Id: aux-items.c,v 1.36 2001/12/29 15:50:25 ceder Exp $
* $Id: aux-items.c,v 1.37 2001/12/29 22:57:42 ceder Exp $
* Copyright (C) 1994-2001 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -89,6 +89,9 @@ static Bool aux_item_validate_existing_text(Aux_item_validation_data *data);
static const Aux_item *
find_aux_item(const Aux_item_list *list, unsigned long aux_no);
static void prepare_aux_item(Aux_item *item, Pers_no creator,
const Aux_item_definition *def);
/* Symbol table for the triggers */
......@@ -910,9 +913,10 @@ prepare_aux_item_list(Aux_item_list *list,
}
}
void prepare_aux_item(Aux_item *item,
Pers_no creator,
const Aux_item_definition *def)
static void
prepare_aux_item(Aux_item *item,
Pers_no creator,
const Aux_item_definition *def)
{
if (item == NULL)
return;
......@@ -1067,7 +1071,7 @@ static Bool aux_item_validate(Aux_item_validation_data validation_data)
* ADD_TO_LIST is the item list to add to, or NULL.
* START_LOOKING_AT is the first index in add_to_list to start
* looking at for possible duplicates.
* CREATING is true if we are checking while creating an object
* CREATING is true if we are checking while creating an object.
*/
static Bool
......@@ -1299,14 +1303,12 @@ aux_inherit_items(Aux_item_list *target,
}
}
/*
* filter_aux_item_list
*
* Filter out information in ORIGINAL that VIEWER is not allowed
* to see. Copies of the items are placed in RESULT. VIEWER_P is
* the Person corresponding to viewer or NULL. All memory is
* allocated with tmp_alloc
*/
/* Filter the items in ORIGINAL for sending to the person logged in on
* connection CONN. On entry, RESULT should be a pointer to an empty
* aux_item_list. It will be filled with copies of those items in
* ORIGINAL that CONN is allowed to see. All memory allocated in this
* call is allocated with tmp_alloc. */
void
filter_aux_item_list(const Aux_item_list *original,
......
/*
* $Id: aux-items.h,v 1.20 2001/12/28 20:11:22 ceder Exp $
* $Id: aux-items.h,v 1.21 2001/12/29 22:57:13 ceder Exp $
* Copyright (C) 1994-2001 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -117,7 +117,7 @@ typedef struct
} Aux_item_trigger_mapping;
struct Aux_item_definition_s {
char * name;
char * name;
unsigned long tag;
Aux_item_flags clear_flags;
Aux_item_flags set_flags;
......@@ -171,9 +171,6 @@ void aux_inherit_items(Aux_item_list *target,
* functions. */
void prepare_aux_item_list(Aux_item_list *list, Pers_no creator);
void prepare_aux_item(Aux_item *item, Pers_no creator,
const Aux_item_definition *def);
/* Get the function pointer for a named trigger */
......@@ -186,10 +183,11 @@ Aux_item_validation_function
aux_item_find_validator(const char *validator_name);
/* Filter the items in original for sending to viewer. Result is a
* pointer to an empty aux_item_list, in which copies of the items in
* original will be places. All memory allocated in this call is
* allocaed with tmp_alloc */
/* Filter the items in ORIGINAL for sending to the person logged in on
* connection CONN. On entry, RESULT should be a pointer to an empty
* aux_item_list. It will be filled with copies of those items in
* ORIGINAL that CONN is allowed to see. All memory allocated in this
* call is allocated with tmp_alloc. */
void filter_aux_item_list(const Aux_item_list *original,
Aux_item_list *result,
......
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