X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Froomops.c;h=aa38db4db7fb0fe0f9aef0f1dcde84b3fe27a30d;hb=44c30618e25ce2eb103b87e84e10dcd51dad0879;hp=db99379d98392e16a1804ac840fb8a27a590892a;hpb=63deece5bd2380725f32c42b5af0e74272afa140;p=citadel.git diff --git a/webcit/roomops.c b/webcit/roomops.c index db99379d9..aa38db4db 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -1,34 +1,32 @@ /* * $Id$ - * - * Lots of different room-related operations. */ - +/** + * \defgroup RoomOps Lots of different room-related operations. + */ +/*@{*/ #include "webcit.h" -struct folder { - int floor; - char room[SIZ]; - char name[SIZ]; - int hasnewmsgs; - int is_mailbox; - int selectable; - int view; -}; +char floorlist[128][SIZ]; /**< list of our floor names */ -char *viewdefs[] = { - "Bulletin Board", - "Mail Folder", - "Address Book", - "Calendar", - "Task List", - "Notes List" -}; +char *viewdefs[7]; /**< the different kinds of available views */ -char floorlist[128][SIZ]; +/** + * \brief initialize the viewdefs with localized strings + */ +void initialize_viewdefs(void) { + viewdefs[0] = _("Bulletin Board"); + viewdefs[1] = _("Mail Folder"); + viewdefs[2] = _("Address Book"); + viewdefs[3] = _("Calendar"); + viewdefs[4] = _("Task List"); + viewdefs[5] = _("Notes List"); + viewdefs[6] = _("Wiki"); +} -/* - * load the list of floors + +/** + * \brief load the list of floors */ void load_floorlist(void) { @@ -50,8 +48,8 @@ void load_floorlist(void) } -/* - * remove a room from the march list +/** + * \brief remove a room from the march list */ void remove_march(char *aaa) { @@ -81,7 +79,10 @@ void remove_march(char *aaa) - +/** + * \brief display rooms in tree structure??? + * \param rp the roomlist to build a tree from + */ void room_tree_list(struct roomlisting *rp) { char rmname[64]; @@ -116,8 +117,11 @@ void room_tree_list(struct roomlisting *rp) } -/* - * Room ordering stuff (compare first by floor, then by order) +/** + * \brief Room ordering stuff (compare first by floor, then by order) + * \param r1 first roomlist to compare + * \param r2 second roomlist co compare + * \return are they the same??? */ int rordercmp(struct roomlisting *r1, struct roomlisting *r2) { @@ -139,8 +143,9 @@ int rordercmp(struct roomlisting *r1, struct roomlisting *r2) } -/* - * Common code for all room listings +/** + * \brief Common code for all room listings + * \param variety what??? */ void listrms(char *variety) { @@ -152,7 +157,7 @@ void listrms(char *variety) struct roomlisting *rs; - /* Ask the server for a room list */ + /** Ask the server for a room list */ serv_puts(variety); serv_getln(buf, sizeof buf); if (buf[0] != '1') { @@ -194,15 +199,16 @@ void listrms(char *variety) room_tree_list(rl); - /* If no rooms were listed, print an nbsp to make the cell + /** + * If no rooms were listed, print an nbsp to make the cell * borders show up anyway. */ if (num_rooms == 0) wprintf(" "); } -/* - * list all forgotten rooms +/** + * \brief list all forgotten rooms */ void zapped_list(void) { @@ -220,8 +226,8 @@ void zapped_list(void) } -/* - * read this room's info file (set v to 1 for verbose mode) +/** + * \brief read this room's info file (set v to 1 for verbose mode) */ void readinfo(void) { @@ -232,12 +238,17 @@ void readinfo(void) if (buf[0] == '1') { fmout("CENTER"); } + else { + wprintf(" "); + } } -/* Display room banner icon. The server doesn't actually +/** + * \brief Display room banner icon. + * The server doesn't actually * need the room name, but we supply it in order to * keep the browser from using a cached icon from * another room. @@ -295,14 +306,16 @@ void embed_room_graphic(void) { -/* - * Display the current view and offer an option to change it +/** + * \brief Display the current view and offer an option to change it */ void embed_view_o_matic(void) { int i; wprintf("