Fixed compiler warnings, updated download instructions

This commit is contained in:
ritt 2023-09-18 14:37:35 +02:00
parent 65d4f95011
commit 0cd2a615dd
2 changed files with 64 additions and 80 deletions

View File

@ -24,7 +24,7 @@
</div> </div>
<p> <p>
ELOG is distributed both as source code and as precompiled binaries for <p>ELOG is distributed both as source code and as precompiled binaries for
various platforms. In addition to major versions, minor releases are made various platforms. In addition to major versions, minor releases are made
containing bug fixes or some new and not yet completely debugged code. This containing bug fixes or some new and not yet completely debugged code. This
is usually the case if some user asks for some new features, which are then is usually the case if some user asks for some new features, which are then
@ -33,42 +33,47 @@ implemented and sent to the user for testing. The minor releases are named
A <a href="https://bitbucket.org/ritt/elog">web access</a> A <a href="https://bitbucket.org/ritt/elog">web access</a>
to the source code contains the complete development history of ELOG, plus to the source code contains the complete development history of ELOG, plus
the newest fixes and features which might yet be in a release. the newest fixes and features which might yet be in a release.
To check out the GIT repository, use:<P> To check out the GIT repository, use:</p>
<p>
<code> <code>
<b>git clone https://bitbucket.org/ritt/elog --recursive</b><br> <b>git clone https://bitbucket.org/ritt/elog --recursive</b><br>
</code><p> </code>
</p>
Building elogd and installing it from the GIT repository works in the same way as building <p>No tags are used, so it is recommended to always use the newest release from
it from the tarball. Issue in the elog directory a "make", followed by a "make install".<p> the "master" branch.</p>
News for each version can be seen in the
<a href="http://elog.psi.ch/elog/download/ChangeLog">changelog</a><p>
<div class=Section><i>ELOG source code</i></div><p>
The source code is available as a good old <a href="http://elog.psi.ch/elog/download/tar/">TAR<a>
file. Select <a href="http://elog.psi.ch/elog/download/tar/elog-latest.tar.gz">elog-latest.tar.gz</a>
unless you want to download a previous version. Untar the file with<p>
<p>Building elogd requires the CMake sysmte and is done in the traditional way:</p>
<p>
<code> <code>
tar -zxvf elog-latest.tar.gz <b>$ cd elog</b><br>
</code><p> <b>$ mkdir build</b><br>
<b>$ cd build</b><br>
<b>$ cmake ..</b><br>
<b>$ make</b><br>
</code>
</p>
and compile it with <code>"make"</code>. Then follow the instructions on how to install the server <p>This will put the executables <b><code>elogd</code></b> and <b><code>elog</code></b> into
on a Linux system. the build directory, from where they can be moved to a system directory like <b><code>/usr/local/sbin/elogd</code></b>
</p>
<div class=Section><i>Windows Binaries</i></div><p> <p>News for each version can be seen in the
<a href="http://elog.psi.ch/elog/download/ChangeLog">changelog</a>
</p>
<div class=Section><i>Windows Binaries</i></div>
<p>
The windows binaries are distributed with an automatic The windows binaries are distributed with an automatic
<a href="http://elog.psi.ch/elog/download/windows/elog-latest.exe">installer<a>. Execute <a href="http://elog.psi.ch/elog/download/windows/elog-latest.exe">installer<a>. Execute
the installer to install ELOG and to register the elogd server as a windows service. Previous the installer to install ELOG and to register the elogd server as a windows service. Previous
windows versions can be found <a href="http://elog.psi.ch/elog/download/windows/">here</a>.<p> windows versions can be found <a href="http://elog.psi.ch/elog/download/windows/">here</a>.
</p>
<p>
Note that the windows binaries are very much outdated and will be updated once the develop gets
access again to a Windows PC.
</p>
<div class=Section><i>Linux Binaries</i></div><p>
Linux binaries are distributed as a
<a href="http://elog.psi.ch/elog/download/RPMS/elog-latest.i386.rpm">RPM</a>. For previous
versions check <a href="http://elog.psi.ch/elog/download/RPMS/">here</a>. There are
also <a href="http://elog.psi.ch/elog/download/SRPMS">SRPMS</a>. Thanks to Roger Kalt
there is also a <a href="http://packages.debian.org/elog">Debian package</a>.<p>
</frameset> </frameset>
</HTML> </HTML>

View File

@ -2820,7 +2820,7 @@ int parse_config_file(char *file_name)
/* parse whole config file and store options in sorted list */ /* parse whole config file and store options in sorted list */
{ {
char *str, *buffer, *p, *pstr; char *str, *buffer, *p, *pstr;
int index, i, j, fh, length; int i, j, fh, length;
str = (char *)xmalloc(20000); str = (char *)xmalloc(20000);
@ -2841,7 +2841,6 @@ int parse_config_file(char *file_name)
/* search group */ /* search group */
p = buffer; p = buffer;
index = 0;
do { do {
if (*p == '#' || *p == ';') { if (*p == '#' || *p == ';') {
/* skip comment */ /* skip comment */
@ -2923,7 +2922,6 @@ int parse_config_file(char *file_name)
// param_compare); // param_compare);
n_lb_config++; n_lb_config++;
index++;
} }
/* search for next line beginning */ /* search for next line beginning */
@ -17553,7 +17551,7 @@ void display_line(LOGBOOK *lbs, int message_id, int number, const char *mode, in
file_name[MAX_PATH_LENGTH], *slist, *svalue, comment[256], param[80], subdir[256], attr[NAME_LENGTH]; file_name[MAX_PATH_LENGTH], *slist, *svalue, comment[256], param[80], subdir[256], attr[NAME_LENGTH];
const char *nowrap; const char *nowrap;
char display[NAME_LENGTH], attr_icon[80]; char display[NAME_LENGTH], attr_icon[80];
int i, j, n, i_line, index, colspan, n_attachments, line_len, thumb_status, max_line_len, n_lines, int i, j, n, i_line, index, colspan, line_len, thumb_status, max_line_len, n_lines,
max_n_lines; max_n_lines;
BOOL skip_comma; BOOL skip_comma;
FILE *f; FILE *f;
@ -18220,21 +18218,6 @@ void display_line(LOGBOOK *lbs, int message_id, int number, const char *mode, in
rsprintf("</td></tr>\n"); rsprintf("</td></tr>\n");
} }
/* count number of attachments */
n_attachments = 0;
if (show_attachments) {
for (index = 0; index < MAX_ATTACHMENTS; index++) {
if (attachment[index][0]) {
/* check if attachment is inlined */
sprintf(str, "[img]elog:/%d[/img]", index + 1);
if (strieq(encoding, "ELCode") && stristr(text, str))
continue;
n_attachments++;
}
}
}
for (index = 0; index < MAX_ATTACHMENTS; index++) { for (index = 0; index < MAX_ATTACHMENTS; index++) {
if (show_attachments && attachment[index][0]) { if (show_attachments && attachment[index][0]) {
@ -23778,7 +23761,7 @@ void submit_elog_mirror(LOGBOOK *lbs) {
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
void copy_to(LOGBOOK *lbs, int src_id, const char *dest_logbook, int move, int orig_id) { void copy_to(LOGBOOK *lbs, int src_id, const char *dest_logbook, int move, int orig_id) {
int size, i, j, n, n_done, n_done_reply, n_reply, index, status, fh, source_id, message_id, int size, i, j, n, n_reply, index, status, fh, source_id, message_id,
thumb_status, next_id = 0; thumb_status, next_id = 0;
char str[2048], str2[1024], file_name[MAX_PATH_LENGTH], thumb_name[MAX_PATH_LENGTH], char str[2048], str2[1024], file_name[MAX_PATH_LENGTH], thumb_name[MAX_PATH_LENGTH],
*attrib, date[80], *text, msg_str[32], in_reply_to[80], subdir[256], *attrib, date[80], *text, msg_str[32], in_reply_to[80], subdir[256],
@ -23804,7 +23787,7 @@ void copy_to(LOGBOOK *lbs, int src_id, const char *dest_logbook, int move, int o
else else
n = isparam("nsel") ? atoi(getparam("nsel")) : 0; n = isparam("nsel") ? atoi(getparam("nsel")) : 0;
n_done = n_done_reply = source_id = status = next_id = 0; source_id = status = next_id = 0;
for (index = 0; index < n; index++) { for (index = 0; index < n; index++) {
if (src_id) if (src_id)
source_id = src_id; source_id = src_id;
@ -24001,16 +23984,12 @@ void copy_to(LOGBOOK *lbs, int src_id, const char *dest_logbook, int move, int o
return; return;
} }
n_done++;
/* submit all replies */ /* submit all replies */
n_reply = strbreak(reply_to, (char (*)[1500]) list, MAX_N_ATTR, ",", FALSE); n_reply = strbreak(reply_to, (char (*)[1500]) list, MAX_N_ATTR, ",", FALSE);
for (i = 0; i < n_reply; i++) { for (i = 0; i < n_reply; i++) {
copy_to(lbs, atoi(list + i * NAME_LENGTH), dest_logbook, move, message_id); copy_to(lbs, atoi(list + i * NAME_LENGTH), dest_logbook, move, message_id);
} }
n_done_reply += n_reply;
/* delete original message for move */ /* delete original message for move */
next_id = source_id; next_id = source_id;
if (move && orig_id == 0) { if (move && orig_id == 0) {