From 44c30618e25ce2eb103b87e84e10dcd51dad0879 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Mon, 23 Jan 2006 13:35:50 +0000 Subject: [PATCH] Done with doxygenizing --- webcit/Doxyfile | 7 +- webcit/netconf.c | 36 +++-- webcit/notes.c | 20 ++- webcit/paging.c | 71 +++++---- webcit/preferences.c | 65 +++++--- webcit/roomops.c | 359 ++++++++++++++++++++++++------------------ webcit/rss.c | 55 ++++--- webcit/serv_func.c | 63 +++++--- webcit/siteconfig.c | 20 ++- webcit/snprintf.c | 37 ++++- webcit/subst.c | 51 +++--- webcit/summary.c | 57 ++++--- webcit/sysmsgs.c | 26 +++- webcit/tabs.c | 25 ++- webcit/tcp_sockets.c | 52 +++++-- webcit/tools.c | 152 ++++++++++++------ webcit/useredit.c | 60 +++++-- webcit/userlist.c | 24 ++- webcit/vcard.c | 68 +++++--- webcit/vcard.h | 28 ++-- webcit/vcard_edit.c | 30 +++- webcit/webcit.c | 305 +++++++++++++++++++++++------------- webcit/webcit.h | 363 ++++++++++++++++++++++--------------------- webcit/webserver.c | 189 +++++++++++++--------- webcit/who.c | 39 +++-- 25 files changed, 1367 insertions(+), 835 deletions(-) diff --git a/webcit/Doxyfile b/webcit/Doxyfile index 7c1a3f92f..65f044bb0 100644 --- a/webcit/Doxyfile +++ b/webcit/Doxyfile @@ -480,8 +480,7 @@ RECURSIVE = NO # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = webcit.h and vcard.h and userlist.c -#!!!!!!!! for now +EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded @@ -1007,7 +1006,7 @@ INCLUDE_FILE_PATTERNS = # undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = WEBCIT_WITH_CALENDAR_SERVICE HAVE_OPENSSL ENABLE_NLS HAVE_ICONV +PREDEFINED = WEBCIT_WITH_CALENDAR_SERVICE HAVE_OPENSSL ENABLE_NLS HAVE_ICONV HAVE_ZLIB # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then @@ -1117,7 +1116,7 @@ GROUP_GRAPHS = YES # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. -UML_LOOK = NO +UML_LOOK = YES # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. diff --git a/webcit/netconf.c b/webcit/netconf.c index eb4d8f2d7..87cdda642 100644 --- a/webcit/netconf.c +++ b/webcit/netconf.c @@ -1,12 +1,16 @@ /* * $Id$ - * - * Functions which handle network and sharing configuration. + */ +/** + * \defgroup NetShareConf Functions which handle network and sharing configuration. * */ - +/*@{*/ #include "webcit.h" +/** + * \brief edit a network node + */ void edit_node(void) { char buf[SIZ]; char node[SIZ]; @@ -51,7 +55,9 @@ void edit_node(void) { } - +/** + * \brief add a node + */ void display_add_node(void) { output_headers(1, 1, 2, 0, 0, 0); @@ -82,6 +88,9 @@ void display_add_node(void) wDumpContent(1); } +/** + * \brief modify an existing node + */ void display_edit_node(void) { char buf[512]; @@ -143,7 +152,7 @@ void display_edit_node(void) } } - else { /* command error getting configuration */ + else { /** command error getting configuration */ wprintf("%s
\n", &buf[4]); } @@ -151,7 +160,9 @@ void display_edit_node(void) } - +/** + * \brief display all configured nodes + */ void display_netconf(void) { char buf[SIZ]; @@ -203,7 +214,9 @@ void display_netconf(void) wDumpContent(1); } - +/** + * \brief display the dialog to verify the deletion + */ void display_confirm_delete_node(void) { char node[SIZ]; @@ -234,7 +247,9 @@ void display_confirm_delete_node(void) wDumpContent(1); } - +/** + * \brief actually delete the node + */ void delete_node(void) { char buf[SIZ]; @@ -272,7 +287,9 @@ void delete_node(void) display_netconf(); } - +/** + * \brief add a new node + */ void add_node(void) { char node[SIZ]; @@ -299,3 +316,4 @@ void add_node(void) } +/*@}*/ diff --git a/webcit/notes.c b/webcit/notes.c index 51cdc8960..89f2c84ca 100644 --- a/webcit/notes.c +++ b/webcit/notes.c @@ -1,13 +1,18 @@ /* * $Id$ - * - * Functions which handle "sticky notes" + */ +/** + * \defgroup StickyNotes Functions which handle "sticky notes" * */ - +/*@{*/ #include "webcit.h" #include "webserver.h" +/** + * \brief display sticky notes + * \param msgnum the citadel mesage number + */ void display_note(long msgnum) { char buf[SIZ]; char notetext[SIZ]; @@ -27,7 +32,7 @@ void display_note(long msgnum) { strcpy(notetext, ""); while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) { - /* Fill the buffer to at least 256 characters */ + /** Fill the buffer to at least 256 characters */ if ( (in_text) && (strlen(notetext) < 256) ) { strcat(notetext, buf); } @@ -37,13 +42,16 @@ void display_note(long msgnum) { } } - /* Now sanitize the buffer, and shorten it to just a small snippet */ + /** Now sanitize the buffer, and shorten it to just a small snippet */ for (i=0; i\n", display_notetext); } + + +/*@}*/ diff --git a/webcit/paging.c b/webcit/paging.c index ddc2fbbea..097b6b74b 100644 --- a/webcit/paging.c +++ b/webcit/paging.c @@ -1,13 +1,14 @@ /* * $Id$ - * - * Functions which implement the chat and paging facilities. */ - +/** + * \defgroup PageFunc Functions which implement the chat and paging facilities. + */ +/*@{*/ #include "webcit.h" -/* - * display the form for paging (x-messaging) another user +/** + * \brief display the form for paging (x-messaging) another user */ void display_page(void) { @@ -60,8 +61,8 @@ void display_page(void) wDumpContent(1); } -/* - * page another user +/** + * \brief page another user */ void page_user(void) { @@ -114,14 +115,14 @@ void page_user(void) -/* - * multiuser chat +/** + * \brief multiuser chat */ void do_chat(void) { char buf[SIZ]; - /* First, check to make sure we're still allowed in this room. */ + /** First, check to make sure we're still allowed in this room. */ serv_printf("GOTO %s", WC->wc_roomname); serv_getln(buf, sizeof buf); if (buf[0] != '2') { @@ -129,7 +130,8 @@ void do_chat(void) return; } - /* If the chat socket is still open from a previous chat, + /** + * If the chat socket is still open from a previous chat, * close it -- because it might be stale or in the wrong room. */ if (WC->chat_sock < 0) { @@ -137,7 +139,8 @@ void do_chat(void) WC->chat_sock = (-1); } - /* WebCit Chat works by having transmit, receive, and refresh + /** + * WebCit Chat works by having transmit, receive, and refresh * frames. Load the frameset. (This isn't AJAX but the headers * output by begin_ajax_response() happen to be the ones we need.) */ @@ -148,7 +151,8 @@ void do_chat(void) } -/* +/** + * \brief display page popup * If there are instant messages waiting, and we notice that we haven't checked them in * a while, it probably means that we need to open the instant messenger window. */ @@ -156,7 +160,7 @@ void page_popup(void) { char buf[SIZ]; - /* First, do the check as part of our page load. */ + /** First, do the check as part of our page load. */ serv_puts("NOOP"); serv_getln(buf, sizeof buf); if (buf[3] == '*') { @@ -169,7 +173,7 @@ void page_popup(void) } } - /* Then schedule it to happen again a minute from now if the user is idle. */ + /** Then schedule it to happen again a minute from now if the user is idle. */ wprintf("\n", WC->wc_is_trash ); - /* If the user happens to select the "make this my start page" link, + /** + * If the user happens to select the "make this my start page" link, * we want it to remember the URL as a "/dotskip" one instead of * a "skip" or "gotonext" or something like that. */ snprintf(WC->this_page, sizeof(WC->this_page), "dotskip&room=%s", WC->wc_roomname); - /* Check for new mail. */ + /** Check for new mail. */ WC->new_mail = extract_int(&got[4], 9); WC->wc_view = extract_int(&got[4], 11); @@ -563,8 +583,9 @@ void embed_room_banner(char *got, int navbar_style) { -/* - * back end routine to take the session to a new room +/** + * \brief back end routine to take the session to a new room + * \param gname room to go to * */ int gotoroom(char *gname) @@ -573,11 +594,11 @@ int gotoroom(char *gname) static long ls = (-1L); int err = 0; - /* store ungoto information */ + /** store ungoto information */ strcpy(WC->ugname, WC->wc_roomname); WC->uglsn = ls; - /* move to the new room */ + /** move to the new room */ serv_printf("GOTO %s", gname); serv_getln(buf, sizeof buf); if (buf[0] != '2') { @@ -616,9 +637,12 @@ int gotoroom(char *gname) } -/* - * Locate the room on the march list which we most want to go to. Each room +/** + * \brief Locate the room on the march list which we most want to go to. + * Each room * is measured given a "weight" of preference based on various factors. + * \param desired_floor the room number on the citadel server + * \return the roomname */ char *pop_march(int desired_floor) { @@ -655,7 +679,8 @@ char *pop_march(int desired_floor) -/* Goto next room having unread messages. +/** + *\brief Goto next room having unread messages. * We want to skip over rooms that the user has already been to, and take the * user back to the lobby when done. The room we end up in is placed in * newroom - which is set to 0 (the lobby) initially. @@ -668,7 +693,8 @@ void gotonext(void) struct march *mptr, *mptr2; char next_room[128]; - /* First check to see if the march-mode list is already allocated. + /** + * First check to see if the march-mode list is already allocated. * If it is, pop the first room off the list and go there. */ @@ -691,9 +717,10 @@ void gotonext(void) mptr2->next = mptr; } } -/* add _BASEROOM_ to the end of the march list, so the user will end up - * in the system base room (usually the Lobby>) at the end of the loop - */ + /** + * add _BASEROOM_ to the end of the march list, so the user will end up + * in the system base room (usually the Lobby>) at the end of the loop + */ mptr = (struct march *) malloc(sizeof(struct march)); mptr->next = NULL; strcpy(mptr->march_name, "_BASEROOM_"); @@ -705,10 +732,10 @@ void gotonext(void) mptr2 = mptr2->next; mptr2->next = mptr; } -/* - * ...and remove the room we're currently in, so a oto doesn't make us - * walk around in circles - */ + /** + * ...and remove the room we're currently in, so a oto doesn't make us + * walk around in circles + */ remove_march(WC->wc_roomname); } if (WC->march != NULL) { @@ -722,6 +749,10 @@ void gotonext(void) } +/** + * \brief goto next room + * \param next_room next room to go to + */ void smart_goto(char *next_room) { gotoroom(next_room); readloop("readnew"); @@ -729,8 +760,8 @@ void smart_goto(char *next_room) { -/* - * mark all messages in current room as having been read +/** + * \brief mark all messages in current room as having been read */ void slrp_highest(void) { @@ -746,8 +777,8 @@ void slrp_highest(void) } -/* - * un-goto the previous room +/** + * \brief un-goto the previous room */ void ungoto(void) { @@ -776,11 +807,11 @@ void ungoto(void) -/* - * Set/clear/read the "self-service list subscribe" flag for a room +/** + * \brief Set/clear/read the "self-service list subscribe" flag for a room * - * Set 'newval' to 0 to clear, 1 to set, any other value to leave unchanged. - * Always returns the new value. + * \param newval set to 0 to clear, 1 to set, any other value to leave unchanged. + * \return return the new value. */ int self_service(int newval) { @@ -838,8 +869,8 @@ int self_service(int newval) { -/* - * display the form for editing a room +/** + * \brief display the form for editing a room */ void display_editroom(void) { @@ -883,7 +914,7 @@ void display_editroom(void) output_headers(1, 1, 1, 0, 0, 0); - /* print the tabbed dialog */ + /** print the tabbed dialog */ wprintf("
" "
" "" @@ -987,9 +1018,9 @@ void display_editroom(void) wprintf("\n"); wprintf("
 
\n"); - /* end tabbed dialog */ + /** end tabbed dialog */ - /* begin content of whatever tab is open now */ + /** begin content of whatever tab is open now */ wprintf("
" "\n" "
\n"); @@ -1088,7 +1119,7 @@ void display_editroom(void) wprintf("> "); wprintf(_("Read-only room")); - /* directory stuff */ + /** directory stuff */ wprintf("\n
  • \n"); - /* end of directory stuff */ + /** end of directory stuff */ wprintf("
  • "); wprintf(_("Permanent (does not auto-purge)")); - /* start of anon options */ + /** start of anon options */ wprintf("\n
  • "); wprintf(_("Anonymous messages")); @@ -1184,13 +1215,13 @@ void display_editroom(void) } - /* Sharing the room with other Citadel nodes... */ + /** Sharing the room with other Citadel nodes... */ if (!strcmp(tab, "sharing")) { shared_with = strdup(""); not_shared_with = strdup(""); - /* Learn the current configuration */ + /** Learn the current configuration */ serv_puts("CONF getsys|application/x-citadel-ignet-config"); serv_getln(buf, sizeof buf); if (buf[0]=='1') while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) { @@ -1230,7 +1261,7 @@ void display_editroom(void) } } - /* Display the stuff */ + /** Display the stuff */ wprintf("

    " "" "
    "); @@ -1339,7 +1370,7 @@ void display_editroom(void) } - /* Mailing list management */ + /** Mailing list management */ if (!strcmp(tab, "listserv")) { wprintf("
    " @@ -1431,7 +1462,7 @@ void display_editroom(void) } - /* Mailing list management */ + /** Mailing list management */ if (!strcmp(tab, "expire")) { serv_puts("GPEX room"); @@ -1517,20 +1548,20 @@ void display_editroom(void) } - /* Mailing list management */ + /** Mailing list management */ if (!strcmp(tab, "access")) { display_whok(); } - /* end content of whatever tab is open now */ + /** end content of whatever tab is open now */ wprintf("
    \n"); wDumpContent(1); } -/* - * Toggle self-service list subscription +/** + * \brief Toggle self-service list subscription */ void toggle_self_service(void) { int newval = 0; @@ -1542,8 +1573,8 @@ void toggle_self_service(void) { -/* - * save new parameters for a room +/** + * \brief save new parameters for a room */ void editroom(void) { @@ -1704,8 +1735,8 @@ void editroom(void) } -/* - * Display form for Invite, Kick, and show Who Knows a room +/** + * \brief Display form for Invite, Kick, and show Who Knows a room */ void do_invt_kick(void) { char buf[SIZ], room[SIZ], username[SIZ]; @@ -1754,8 +1785,8 @@ void do_invt_kick(void) { -/* - * Display form for Invite, Kick, and show Who Knows a room +/** + * \brief Display form for Invite, Kick, and show Who Knows a room */ void display_whok(void) { @@ -1815,8 +1846,8 @@ void display_whok(void) -/* - * display the form for entering a new room +/** + * \brief display the form for entering a new room */ void display_entroom(void) { @@ -1864,13 +1895,14 @@ void display_entroom(void) } wprintf("\n"); - /* Our clever little snippet of JavaScript automatically selects - * a public room if the view is set to Bulletin Board or wiki, and - * it selects a mailbox room otherwise. The user can override this, - * of course. We also disable the floor selector for mailboxes. - */ - wprintf("
  • "); - wprintf(_("Default view for room: ")); + /** + * Our clever little snippet of JavaScript automatically selects + * a public room if the view is set to Bulletin Board or wiki, and + * it selects a mailbox room otherwise. The user can override this, + * of course. We also disable the floor selector for mailboxes. + */ + wprintf("
  • "); + wprintf(_("Default view for room: ")); wprintf("