From 1cf1b48dc3663704026017af87c4b2b4d96f8b2e Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Wed, 3 Nov 2004 10:01:48 +0000 Subject: [PATCH] Version 2.5.5 SVN revision: 1125 --- NT/elog.vcproj | 2 +- NT/elogd.sln | 2 +- doc/ChangeLog | 9 ++ doc/index.html | 381 ++++++++++++++++++++++++--------------------- eloglang.brazilian | 4 +- eloglang.danish | 4 +- eloglang.dutch | 10 +- eloglang.french | 4 +- eloglang.german | 31 ++-- eloglang.italian | 4 +- eloglang.japanese | 4 +- eloglang.spanish | 10 +- src/elogd.c | 111 ++++++------- 13 files changed, 320 insertions(+), 256 deletions(-) diff --git a/NT/elog.vcproj b/NT/elog.vcproj index 15ff89a7..652717d8 100755 --- a/NT/elog.vcproj +++ b/NT/elog.vcproj @@ -97,7 +97,7 @@ Name="VCLinkerTool" AdditionalDependencies="wsock32.lib" OutputFile=".\Debug/elog.exe" - LinkIncremental="1" + LinkIncremental="2" SuppressStartupBanner="TRUE" GenerateDebugInformation="TRUE" ProgramDatabaseFile=".\Debug/elog.pdb" diff --git a/NT/elogd.sln b/NT/elogd.sln index 47bc4e07..1fd6741a 100755 --- a/NT/elogd.sln +++ b/NT/elogd.sln @@ -25,10 +25,10 @@ Global {73B4D346-E430-4CDF-89DC-C7E7356D373F}.Release.ActiveCfg = Release|Win32 {73B4D346-E430-4CDF-89DC-C7E7356D373F}.Release.Build.0 = Release|Win32 {A206887F-603B-4538-B6F7-A1361EF29E8F}.Debug.ActiveCfg = Debug|Win32 + {A206887F-603B-4538-B6F7-A1361EF29E8F}.Debug.Build.0 = Debug|Win32 {A206887F-603B-4538-B6F7-A1361EF29E8F}.Release.ActiveCfg = Release|Win32 {A206887F-603B-4538-B6F7-A1361EF29E8F}.Release.Build.0 = Release|Win32 {96EE8277-42EF-4086-814C-D94BB56BA930}.Debug.ActiveCfg = Debug|Win32 - {96EE8277-42EF-4086-814C-D94BB56BA930}.Debug.Build.0 = Debug|Win32 {96EE8277-42EF-4086-814C-D94BB56BA930}.Release.ActiveCfg = Release|Win32 {96EE8277-42EF-4086-814C-D94BB56BA930}.Release.Build.0 = Release|Win32 {ED99DCD0-7A48-4C02-BB77-088217D7A9D0}.Debug.ActiveCfg = Debug|Win32 diff --git a/doc/ChangeLog b/doc/ChangeLog index 751ed0d9..559041c0 100755 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,12 @@ +Version 2.5.5, released November 3rd, 2004 +========================================== + +- Display ASCII attachments inline, with possibility to hide them +- Implemented regular expressions in search +- Implemented RSS feeds +- Added synchronization from command line of elogd +- Fixed ~20 bugs + Version 2.5.4, released August 4th, 2004 ================================--====== diff --git a/doc/index.html b/doc/index.html index 5779b709..79ac15be 100755 --- a/doc/index.html +++ b/doc/index.html @@ -1,176 +1,209 @@ - - The ELOG Home Page - - - - - - - - - - -
  The ELOG Home Page  
-

-

-

-

-

Home of the Electronic Logbook package by Stefan Ritt

-
  Current version is : 2.5.4  
- -
-
  What is ELOG ?  
-

-ELOG is part of a family of applications known as weblogs. Their general purpose is : -

-

    -
  1. to make it easy for people to put information online in a chronological fashion, in the form of short, time-stamped text messages ("entries") with optional HTML markup for presentation, and optional file attachments (images, archives, etc.) -

    -

  2. to make it easy for other people to access this information through a Web interface, browse entries, search, download files, and optionally add, update, delete or comment on entries. -
-

-ELOG is a remarkable implementation of a weblog in at least two respects : -

-

-

- -


-
  Screen shots  
-

- - -
-elog.gif - -On the left upper panel is a typical logbook page displayed by Netscape Navigator. Each logbook page can contain attachments in a similar way to emails. This makes it possible to store images or text files and retrieve them easily. You could for example attach a sample configuration file which can later be copied to the local machine with the "Save As..." function of the Web browser. -

-Several logbooks can be served though a single ELOG server. Each -logbook can use different attributes for its entries. The logbook can then be searched using these attributes. The right pane on the left image shows a search for all -entries with attribute "Type" equal to "Configuration", and the lower pane -shows the search result. It is also possible to use full-text search in -attributes and the entry body. -

-While logbook entries are usually displayed one entry per page, they can -also be listed consecutively which makes it easy to produce a paper printout of a logbook. -

-Logbook pages can be edited or deleted. This feature can be turned off in -the configuration file so that a logbook entries cannot be changed -after being submitted. -

-An additional feature is the automatic generation of a notification email -messages based on a certain type or category of a logbook entry. -

-Also try out the online demo ! -

-

- -


-
  Use cases  
-

-The features of ELOG make it useful for several applications: -

- -


-
  License  
-

-ELOG is released under the -GNU Public License. -

- -


-
  Credits  
-

-The author would like to give credits to following people: - -

-

- -


-
  Links  
-

-If your are reading this documentation from your local ELOG server, check for updates on the ELOG Home Page. -

-See also the ELOG project pages on - -SourceForge -and - -Freshmeat -

- -


- - + + The ELOG Home Page + + + + + + + + +
  The ELOG Home Page  
+

+

+

+

+

Home of the Electronic Logbook package by + Stefan Ritt

+
Current version is : 2.5.5
+
+ +
  What is ELOG ?  
+

+ ELOG is part of a family of applications known as weblogs + . Their general purpose is : +

+

    +
  1. + to make it easy for people to put information online in a chronological + fashion, in the form of short, time-stamped text messages ("entries") with + optional HTML markup for presentation, and optional file attachments (images, + archives, etc.) +

    +
  2. + to make it easy for other people to access this information through a Web + interface, browse entries, search, download files, and optionally add, update, + delete or comment on entries.
  3. +
+

+ ELOG is a remarkable implementation of a weblog + in at least two respects : +

+

+

+


+
+
  Screen shots  
+

+ + + + + +
+ elog.gif + + On the left upper panel is a typical logbook page displayed by Netscape + Navigator. Each logbook page can contain attachments in a similar way to + emails. This makes it possible to store images or text files and retrieve them + easily. You could for example attach a sample configuration file which can + later be copied to the local machine with the "Save As..." function of + the Web browser. +

+ Several logbooks can be served though a single ELOG server. Each logbook + can use different attributes for its entries. The logbook can then be searched + using these attributes. The right pane on the left image shows a search for all + entries with attribute "Type" equal to "Configuration + ", and the lower pane shows the search result. It is also possible to use + full-text search in attributes and the entry body. +

+ While logbook entries are usually displayed one entry per page, they can also + be listed consecutively which makes it easy to produce a paper printout of a + logbook. +

+ Logbook pages can be edited or deleted. This feature can be turned off in the + configuration file so that a logbook entries cannot be changed after being + submitted. +

+ An additional feature is the automatic generation of a notification email + messages based on a certain type or category of a logbook entry. +

+ Also try out the online demo + !

+
+

+


+
+
  Use cases  
+

+ The features of ELOG make it useful for several applications: +

+

+


+ +
  License  
+

+ ELOG is released under the GNU + Public License + . +

+


+ +
  Credits  
+

+ The author would like to give credits to following people: +

+

+


+ +
  Links  
+

+ If your are reading this documentation from your local ELOG server, + check for updates on the ELOG Home Page + . +

+ See also the ELOG project pages on + SourceForge and + Freshmeat +

+


+ + diff --git a/eloglang.brazilian b/eloglang.brazilian index ec73ee7e..514797da 100755 --- a/eloglang.brazilian +++ b/eloglang.brazilian @@ -73,7 +73,6 @@ Start date = Data inicial End date = Data final Year = Ano Text = Texto -(case insensitive substring) = (substring insensível a maiúsculas/minúsculas) Search all logbooks = Buscar em todos os logbooks Last %d days = Últimos %d dias Last %d entries = Últimas %d mensagems @@ -341,3 +340,6 @@ Show all = This logbook requires authentication = Attachment file "%s" empty or not found = Please increase "Max content length" in config file = +Text fields may contain regular expressions = +Case sensitive = +List = diff --git a/eloglang.danish b/eloglang.danish index 4d8a069a..95716257 100755 --- a/eloglang.danish +++ b/eloglang.danish @@ -77,7 +77,6 @@ Start date = Start dato End date = Slut dato Year = År Text = Tekst -(case insensitive substring) = (case insensitive tekst streng) Search all logbooks = Søg i alle log bøger Last %d days = Sidste %d dage Last %d entries = Sidste %d indlæg @@ -341,3 +340,6 @@ Show all = This logbook requires authentication = Attachment file "%s" empty or not found = Please increase "Max content length" in config file = +Text fields may contain regular expressions = +Case sensitive = +List = diff --git a/eloglang.dutch b/eloglang.dutch index 47e8da00..93efa819 100755 --- a/eloglang.dutch +++ b/eloglang.dutch @@ -78,7 +78,6 @@ Start date = Startdatum End date = Einddatum Year = Jaar Text = Tekst -(case insensitive substring) = (ongevoelig voor HOOFD -en kleineletters) Search all logbooks = Alle Logboeken doorzoeken Last %d days = Laatste %d dagen Last %d entries = Laatste %d berichten @@ -255,7 +254,6 @@ Entry time = Geef de tijd op Start = Start End = Eind Remote entry received = Bericht van andere server ontvangen ->From = Van After = Na to = aan Before = Voor @@ -340,3 +338,11 @@ Show all = Alles laten zien This logbook requires authentication = Dit logboek vereist authenticatie Attachment file "%s" empty or not found = Bijlage bestand "%s" leeg of niet gevonden Please increase "Max content length" in config file = Verhoog astublieft de "Max content length" (maximale lengte van inhoud) in het configuratie bestand + +# +#---- please translate following items and then remove this comment ----# +# +Text fields may contain regular expressions = +Case sensitive = +From = +List = diff --git a/eloglang.french b/eloglang.french index 8aa3e49a..8e2bc620 100755 --- a/eloglang.french +++ b/eloglang.french @@ -76,7 +76,6 @@ Start date = Date de d End date = Date de fin Year = Année Text = Texte -(case insensitive substring) = (casse non prise en compte) Search all logbooks = Chercher dans tous les registres Last %d days = %d Derniers jours Last %d entries = %d Dernières entrées @@ -341,3 +340,6 @@ Show all = This logbook requires authentication = Attachment file "%s" empty or not found = Please increase "Max content length" in config file = +Text fields may contain regular expressions = +Case sensitive = +List = diff --git a/eloglang.german b/eloglang.german index 30e72f67..0c6b2e98 100755 --- a/eloglang.german +++ b/eloglang.german @@ -77,7 +77,6 @@ Start date = Anfangsdatum End date = Enddatum Year = Jahr Text = Text -(case insensitive substring) = (Teilzeichenkette Großschreibung ignorieren) Search all logbooks = Alle Logbücher durchsuchen Last %d days = Letzte %d Tage Last %d entries = Letzte %d Einträge @@ -325,19 +324,17 @@ You can "steal" the lock by editing this entry = Diese Sperre kann "gestohlen" w Several logbooks groups are defined on this host = Mehrere Logbuch-Gruppen sind auf diesem Computer eingerichtet Please select one to list the logbooks in that group = Bitte eine auswählen, um die Logbücher in dieser Gruppe anzuzeigen No logbook defined on this server = Auf diesem Computer ist kein Logbuch eingerichtet - - -# -#---- please translate following items and then remove this comment ----# -# -Goto ELOG home page = -Please enter "%s" = -Change config file = -Please check that it exists and elogd has write access and disk is not full = -Show = -Hide = -Hide all = -Show all = -This logbook requires authentication = -Attachment file "%s" empty or not found = -Please increase "Max content length" in config file = +Goto ELOG home page = Zur ELOG Home Page +Please enter "%s" = Bitte "%s" eingeben +Change config file = Konfigurationsdatei ändern +Please check that it exists and elogd has write access and disk is not full = Bitte überprüfen ob es existiert, ob elog Schreibzugriff hat und ob Festplatte nicht voll ist +Show = Anzeigen +Hide = Verstecken +Hide all = Alle verstecken +Show all = Alle anzeigen +This logbook requires authentication = Dieses Logbuch erfordert Authentifizierung +Attachment file "%s" empty or not found = Datei "%s" ist leer oder nicht vorhanden +Please increase "Max content length" in config file = Bitte "Max content length" in Konfigurationsdatei erhöhen +Text fields may contain regular expressions = Texteingabefelder können Reguläre Ausdrücke enthalten +Case sensitive = Großschrteibung beachten +List = Liste diff --git a/eloglang.italian b/eloglang.italian index 5436d14d..9d2df238 100755 --- a/eloglang.italian +++ b/eloglang.italian @@ -77,7 +77,6 @@ Start date = Data inizio End date = Data fine Year = Anno Text = Testo -(case insensitive substring) = (stringa non sensibile alle maiuscole) Search all logbooks = Cerca in tutti i registri Last %d days = Ultimi %d giorni Last %d entries = Ultimi %d elementi @@ -340,3 +339,6 @@ Show all = This logbook requires authentication = Attachment file "%s" empty or not found = Please increase "Max content length" in config file = +Text fields may contain regular expressions = +Case sensitive = +List = diff --git a/eloglang.japanese b/eloglang.japanese index f51fd2f8..b127b0f2 100755 --- a/eloglang.japanese +++ b/eloglang.japanese @@ -66,7 +66,6 @@ Day = Week = T Month = ŒŽ End date = I—¹“ú -(case insensitive substring) = (‘å•¶Žš¬•¶Žš‚ð‹æ•Ê‚µ‚È‚¢) Text = –{•¶ Search text also in attributes = ‘®«“à‚̃eƒLƒXƒg‚àŒŸõ Admin = ŠÇ— @@ -339,3 +338,6 @@ Show all = This logbook requires authentication = Attachment file "%s" empty or not found = Please increase "Max content length" in config file = +Text fields may contain regular expressions = +Case sensitive = +List = diff --git a/eloglang.spanish b/eloglang.spanish index 9591e24b..0c29ff8f 100755 --- a/eloglang.spanish +++ b/eloglang.spanish @@ -72,7 +72,6 @@ Start date = Fecha comienzo End date = Fecha termino Year = Anio Text = Texto -(case insensitive substring) = (subcadena no sensible a mayusculas) Search all logbooks = Buscar en todos los logbooks Last %d days = Ultimos %d dias Last %d entries = Ultimas %d Entradas @@ -279,7 +278,6 @@ Error sending local message = Error al enviar mensaje local Error receiving message = Error al recibir mensaje Edit entry = Editar entrada Delete entry = Borrar entrada ->From = Desde No 'Attributes' option present in %s = No se encuentra presente la opcion 'Attributes' en %s CSV ("," separated) = Control de Version (separado por ",") CSV (";" separated) = Control de Version (separado por ";") @@ -334,3 +332,11 @@ Show all = Mostrar todo This logbook requires authentication = Este libro de anotaciones requiere autenticación Attachment file "%s" empty or not found = Archivo adjunto "%s" está vacio o no se encontró Please increase "Max content length" in config file = Por favor aumente "Max content length" en el archivo de configuración + +# +#---- please translate following items and then remove this comment ----# +# +Text fields may contain regular expressions = +Case sensitive = +From = +List = diff --git a/src/elogd.c b/src/elogd.c index afbf5995..c3010acc 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.507 2004/11/03 10:01:48 midas + Version 2.5.5 + Revision 1.506 2004/11/01 12:26:33 midas Replaced 'Back' by 'List' on single entry display page @@ -72,7 +75,6 @@ Revision 1.485 2004/09/24 20:40:25 midas Added cvs_revision - Revision 1.483 2004/09/24 16:07:07 midas Display first/previous/next/last directly as link if first.gif is missing @@ -146,7 +148,7 @@ Added more debugging info Revision 1.459 2004/08/11 14:03:35 midas - Implemented possibility to server .html files through elog + Implemented possibility to serve .html files through elog Revision 1.458 2004/08/11 06:41:35 midas Release 2.5.4-2 @@ -630,7 +632,7 @@ \********************************************************************/ /* Version of ELOG */ -#define VERSION "2.5.4-6" +#define VERSION "2.5.5" char cvs_revision[] = "$Id$"; /* ELOG identification */ @@ -4520,7 +4522,7 @@ int el_submit(LOGBOOK * lbs, int message_id, BOOL bedit, strlcat(message, "\n", TEXT_SIZE + 100); n = write(fh, message, strlen(message)); - if (n != (int)strlen(message)) { + if (n != (int) strlen(message)) { if (tail_size > 0) xfree(buffer); close(fh); @@ -5158,10 +5160,8 @@ int is_ascii(char *file_name) int is_image(char *att) { - return (stristr(att, ".GIF") != NULL) || - (stristr(att, ".JPG") != NULL) || - (stristr(att, ".JPEG") != NULL) || - (stristr(att, ".PNG") != NULL) ; + return (stristr(att, ".GIF") != NULL) || + (stristr(att, ".JPG") != NULL) || (stristr(att, ".JPEG") != NULL) || (stristr(att, ".PNG") != NULL); } /*------------------------------------------------------------------*/ @@ -6724,7 +6724,7 @@ void send_file_direct(char *file_name) rsprintf("Content-Type: %s;charset=%s\r\n", filetype[i].type, charset); else rsprintf("Content-Type: %s\r\n", filetype[i].type); - } else if (is_ascii(file_name)) + } else if (is_ascii(file_name)) rsprintf("Content-Type: text/plain;charset=%s\r\n", charset); else rsprintf("Content-Type: application/octet-stream;charset=%s\r\n", charset); @@ -8657,7 +8657,8 @@ void show_find_form(LOGBOOK * lbs) rsprintf("\n"); rsprintf("%s:", loc("Filters")); - rsprintf("  (%s)
", loc("Text fields may contain regular expressions")); + rsprintf("  (%s)
", + loc("Text fields may contain regular expressions")); /* table for two-column items */ rsprintf("\n"); @@ -12345,7 +12346,7 @@ void synchronize_logbook(LOGBOOK * lbs, int mode, BOOL sync_all) mprint(lbs, mode, error_str); else mprint(lbs, mode, "Remote config received"); - + md5_cache[0].message_id = -1; } else mprint(lbs, mode, loc("Remote config should be received")); @@ -12418,7 +12419,7 @@ void synchronize_logbook(LOGBOOK * lbs, int mode, BOOL sync_all) /* submit local message */ if (!getcfg(lbs->name, "Mirror simulate", str, sizeof(str)) - || atoi(str) == 0) { + || atoi(str) == 0) { submit_message(lbs, list[index], message_id, error_str); /* not that submit_message() may have changed attr_list !!! */ @@ -12435,7 +12436,7 @@ void synchronize_logbook(LOGBOOK * lbs, int mode, BOOL sync_all) mprint(lbs, mode, str); } - + } else /* if message has been changed remotely, but not on this server, receive it */ if (!equal_md5(md5_cache[i_cache].md5_digest, md5_remote[i_remote].md5_digest) @@ -12536,7 +12537,7 @@ void synchronize_logbook(LOGBOOK * lbs, int mode, BOOL sync_all) /* submit local message */ if (!getcfg(lbs->name, "Mirror simulate", str, sizeof(str)) - || atoi(str) == 0) { + || atoi(str) == 0) { submit_message(lbs, list[index], message_id, error_str); /* not that submit_message() may have changed attr_list !!! */ @@ -12572,13 +12573,14 @@ void synchronize_logbook(LOGBOOK * lbs, int mode, BOOL sync_all) rsprintf("ID%d:\t%s\n", message_id, str); n_delete++; - } if (!isparam("confirm") && mode == SYNC_CLONE) { + } + if (!isparam("confirm") && mode == SYNC_CLONE) { sprintf(str, "ID%d:\t%s", message_id, loc("Entry should be deleted locally")); mprint(lbs, mode, str); } else { - + all_identical = FALSE; if (mode == SYNC_CLONE) { @@ -12597,7 +12599,7 @@ void synchronize_logbook(LOGBOOK * lbs, int mode, BOOL sync_all) write_logfile(lbs, "MIRROR delete local entry #%d", message_id); if (!getcfg(lbs->name, "Mirror simulate", str, sizeof(str)) - || atoi(str) == 0) { + || atoi(str) == 0) { el_delete_message(lbs, message_id, TRUE, NULL, TRUE, TRUE); sprintf(str, "ID%d:\t%s", message_id, loc("Entry deleted locally")); @@ -12628,15 +12630,15 @@ void synchronize_logbook(LOGBOOK * lbs, int mode, BOOL sync_all) remote_id = 0; if (!getcfg(lbs->name, "Mirror simulate", str, sizeof(str)) - || atoi(str) == 0) { + || atoi(str) == 0) { remote_id = submit_message(lbs, list[index], message_id, error_str); if (error_str[0]) sprintf(str, "%s: %s", loc("Error sending local entry"), error_str); else if (remote_id != message_id) sprintf(str, - "Error: Submitting entry #%d resulted in remote entry #%d\n", - message_id, remote_id); + "Error: Submitting entry #%d resulted in remote entry #%d\n", + message_id, remote_id); else sprintf(str, "ID%d:\t%s", message_id, loc("Local entry submitted")); mprint(lbs, mode, str); @@ -12669,7 +12671,7 @@ void synchronize_logbook(LOGBOOK * lbs, int mode, BOOL sync_all) /* rearrange local message not to conflict with remote message */ if (!getcfg(lbs->name, "Mirror simulate", str, sizeof(str)) - || atoi(str) == 0) { + || atoi(str) == 0) { el_move_message(lbs, message_id, max_id + 1); sprintf(str, "ID%d:\t", message_id); @@ -12780,7 +12782,7 @@ void synchronize_logbook(LOGBOOK * lbs, int mode, BOOL sync_all) combine_url(lbs, list[index], "", str, sizeof(str)); sprintf(rem_ref, "%s", str, - message_id, loc("Remote entry")); + message_id, loc("Remote entry")); sprintf(str, loc("%s should be deleted"), rem_ref); rsprintf("ID%d:\t%s\n", message_id, str); @@ -12800,7 +12802,7 @@ void synchronize_logbook(LOGBOOK * lbs, int mode, BOOL sync_all) combine_url(lbs, list[index], str, url, sizeof(url)); if (!getcfg(lbs->name, "Mirror simulate", str, sizeof(str)) - || atoi(str) == 0) { + || atoi(str) == 0) { retrieve_url(url, &buffer, NULL); if (strstr(buffer, "Location: ")) { @@ -14310,15 +14312,16 @@ void show_rss_feed(LOGBOOK * lbs) text = xmalloc(TEXT_SIZE); message_id = el_search_message(lbs, EL_LAST, 0, FALSE); - for (index = 0 ; index < n ; index++) { + for (index = 0; index < n; index++) { rsprintf("\n"); size = TEXT_SIZE; status = el_retrieve(lbs, message_id, date, attr_list, attrib, - lbs->n_attr, text, &size, NULL, NULL, NULL, NULL, NULL); + lbs->n_attr, text, &size, NULL, NULL, NULL, NULL, NULL); if (getcfg(lbs->name, "RSS Title", title, sizeof(title))) { - i = build_subst_list(lbs, (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue, attrib, TRUE); + i = build_subst_list(lbs, (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue, attrib, + TRUE); sprintf(str, "%d", message_id); add_subst_list((char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue, "message id", str, &i); add_subst_time(lbs, (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue, @@ -14330,7 +14333,7 @@ void show_rss_feed(LOGBOOK * lbs) title[0] = 0; for (i = 0; i < lbs->n_attr; i++) { strlcat(title, attrib[i], sizeof(title)); - if (i < lbs->n_attr-1) + if (i < lbs->n_attr - 1) strlcat(title, ", ", sizeof(title)); } @@ -14342,7 +14345,7 @@ void show_rss_feed(LOGBOOK * lbs) rsprintf(""); strcpy(str, url); - sprintf(str+strlen(str), "/%d", message_id); + sprintf(str + strlen(str), "/%d", message_id); xmlencode(str); rsprintf("\n"); @@ -14384,7 +14387,7 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf struct tm tms, *ptms; MSG_LIST *msg_list; LOGBOOK *lbs_cur; - regex_t re_buf[MAX_N_ATTR+1]; + regex_t re_buf[MAX_N_ATTR + 1]; regmatch_t pmatch[10]; /* redirect if enpty parameters */ @@ -14753,8 +14756,7 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf /* if value starts with '$', substitute it */ if (str[0] == '$') { j = build_subst_list(lbs, - (char (*)[NAME_LENGTH]) slist, - (char (*)[NAME_LENGTH]) svalue, attrib, TRUE); + (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue, attrib, TRUE); add_subst_time(lbs, (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue, "entry time", date, &j); @@ -14762,12 +14764,12 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf setparam(attr_list[i], str); } - flags = REG_EXTENDED; + flags = REG_EXTENDED; - if (!isparam("casesensitive")) - flags |= REG_ICASE; + if (!isparam("casesensitive")) + flags |= REG_ICASE; - regcomp(re_buf+i+1, str, flags); + regcomp(re_buf + i + 1, str, flags); } } @@ -14838,7 +14840,7 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf text1[j] = toupper(attrib[i][j]); text1[j] = 0; - status = regexec(re_buf+1+i, attrib[i], 10, pmatch, 0); + status = regexec(re_buf + 1 + i, attrib[i], 10, pmatch, 0); if (status == REG_NOMATCH) break; } @@ -14873,7 +14875,7 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf status = regexec(re_buf, text, 10, pmatch, 0); if (atoi(getparam("sall")) && status == REG_NOMATCH) { - + // search text in attributes for (i = 0; i < lbs->n_attr; i++) { status = regexec(re_buf, attrib[i], 10, pmatch, 0); @@ -15043,7 +15045,7 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf } else rsprintf("\r\n"); } - + } else if (xml) { /* no menus and tables */ @@ -15525,14 +15527,14 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf if (*getparam("subtext")) { /* - strcpy(str, getparam("subtext")); - for (i = 0; i < (int) strlen(str); i++) + strcpy(str, getparam("subtext")); + for (i = 0; i < (int) strlen(str); i++) str[i] = toupper(str[i]); - for (i = 0; i < (int) strlen(text); i++) + for (i = 0; i < (int) strlen(text); i++) text1[i] = toupper(text[i]); - text1[i] = 0; - */ + text1[i] = 0; + */ text1[0] = 0; pt = text; /* original text */ @@ -15561,7 +15563,7 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf pt1 += strlen(pt1); /* copy origial search text */ - size = pmatch[0].rm_eo-pmatch[0].rm_so; + size = pmatch[0].rm_eo - pmatch[0].rm_so; memcpy(pt1, pt, size); pt1 += size; pt += size; @@ -15640,8 +15642,8 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf } regfree(re_buf); - for (i = 0; i < lbs->n_attr; i++) - regfree(re_buf+1+i); + for (i = 0; i < lbs->n_attr; i++) + regfree(re_buf + 1 + i); xfree(slist); @@ -17026,7 +17028,7 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command) /* check if first.gif exists, just put link there if not */ strlcpy(file_name, resource_dir, sizeof(file_name)); - if (file_name[0] && file_name[strlen(file_name)- 1] != DIR_SEPARATOR) + if (file_name[0] && file_name[strlen(file_name) - 1] != DIR_SEPARATOR) strlcat(file_name, DIR_SEPARATOR_STR, sizeof(file_name)); strlcat(file_name, "themes", sizeof(file_name)); strlcat(file_name, DIR_SEPARATOR_STR, sizeof(file_name)); @@ -17035,7 +17037,7 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command) strlcat(file_name, DIR_SEPARATOR_STR, sizeof(file_name)); } strlcat(file_name, "first.gif", sizeof(file_name)); - if (stat(file_name, &st) >=0) { + if (stat(file_name, &st) >= 0) { rsprintf("\n", loc("First entry")); rsprintf("\n", loc("Previous entry")); @@ -17451,7 +17453,7 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command) strcpy(str, attachment[index]); str[13] = 0; strcpy(file_enc, attachment[index] + 14); - url_encode(file_enc, sizeof(file_enc)); /* for file names with special characters like "+" */ + url_encode(file_enc, sizeof(file_enc)); /* for file names with special characters like "+" */ sprintf(ref, "%s/%s", str, file_enc); /* overall table */ @@ -18115,8 +18117,9 @@ void show_logbook_node(LBLIST plb, LBLIST pparent, int level, int btop) if (getcfg(lb_list[index].name, "Read password", str, sizeof(str)) || (getcfg(lb_list[index].name, "Password file", str, sizeof(str)) && !getcfg(lb_list[index].name, "Guest menu commands", str, sizeof(str)))) - rsprintf("  \"%s\"", - loc("This logbook requires authentication"), loc("This logbook requires authentication")); + rsprintf("  \"%s\"", + loc("This logbook requires authentication"), + loc("This logbook requires authentication")); rsprintf("
\n"); str[0] = 0; getcfg(lb_list[index].name, "Comment", str, sizeof(str)); @@ -18820,7 +18823,7 @@ void interprete(char *lbook, char *path) strlcpy(css, str, sizeof(css)); else if (lbs == NULL && getcfg("global", "CSS", str, sizeof(str))) strlcpy(css, str, sizeof(css)); - + /* check if guest access */ if (!(getcfg(lbs->name, "Guest menu commands", str, sizeof(str)) && *getparam("unm") == 0 && !isparam("wpwd") @@ -19811,7 +19814,7 @@ void server_loop(void) /* about to entering the server loop, welcome user with a brief info */ eprintf("%s ", ELOGID); - strcpy(str, cvs_revision+15); + strcpy(str, cvs_revision + 15); if (strchr(str, ' ')) *strchr(str, ' ') = 0; eprintf("revision %s\n", str); @@ -21475,7 +21478,7 @@ int main(int argc, char *argv[]) setparam("confirm", "yes"); if (logbook[0]) { - for (i=0 ; lb_list[i].name[0] ; i++) + for (i = 0; lb_list[i].name[0]; i++) if (stricmp(lb_list[i].name, logbook)) break; if (!lb_list[i].name[0]) {