Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 17 additions & 29 deletions isoqlog/Data.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,34 +173,33 @@ void freeSortDomainTab()

int addUserToSortTab(user *usr)
{
int *u;
user **u;

if (SortDomain.allusers == NULL) { /* first time */
SortDomain.allusers = (int *)malloc(NVINIT * sizeof(int *));
SortDomain.allusers = (user **)malloc(NVINIT * sizeof(user *));
if (SortDomain.allusers == NULL)
return -1;
SortDomain.max = NVINIT;
SortDomain.nval = 0;
} else
if (SortDomain.nval >= SortDomain.max) { /* growing....*/
u = (int *)realloc(SortDomain.allusers,
(NVGROW * SortDomain.max) * sizeof(int *));
u = (user **)realloc(SortDomain.allusers,
(NVGROW * SortDomain.max) * sizeof(user *));
if (u == NULL)
return -1;
SortDomain.max *= NVGROW;
SortDomain.allusers = u;
}
SortDomain.allusers[SortDomain.nval] = (int)usr;
SortDomain.allusers[SortDomain.nval] = usr;
return SortDomain.nval++;
}


void sortDomainUsersFrom(char *domain)
{
int tmpnval, i, j, max, tmp;
int tmpnval, i, j, max;
struct domain *domainptr;
struct user *sym;
struct user *tmp1, *tmp2;
struct user *sym, *tmp1, *tmp2, *tmp;

tmpnval = -1;
for (i = 0; i < DomainsTab.nval; i++)
Expand Down Expand Up @@ -233,10 +232,9 @@ void sortDomainUsersFrom(char *domain)

void sortDomainUsersTo(char *domain)
{
int tmpnval, i, j, max, tmp;
int tmpnval, i, j, max;
struct domain *domainptr;
struct user *sym;
struct user *tmp1, *tmp2;
struct user *sym, *tmp1, *tmp2, *tmp;

tmpnval = -1;
for (i = 0; i < DomainsTab.nval; i++)
Expand Down Expand Up @@ -268,10 +266,9 @@ void sortDomainUsersTo(char *domain)

void sortDomainUsersTotal(char *domain)
{
int tmpnval, i, j, max, tmp;
int tmpnval, i, j, max;
struct domain *domainptr;
struct user *sym;
struct user *tmp1, *tmp2;
struct user *sym, *tmp1, *tmp2, *tmp;

tmpnval = -1;
for (i = 0; i < DomainsTab.nval; i++)
Expand Down Expand Up @@ -307,10 +304,9 @@ void sortDomainUsersTotal(char *domain)

void sortDomainUsersByte(char *domain)
{
int tmpnval, i, j, max, tmp;
int tmpnval, i, j, max;
struct domain *domainptr;
struct user *sym;
struct user *tmp1, *tmp2;
struct user *sym, *tmp1, *tmp2, *tmp;

tmpnval = -1;
for (i = 0; i < DomainsTab.nval; i++)
Expand Down Expand Up @@ -345,9 +341,7 @@ void sortUsersFrom()
{
int i, j, max;
globuser *sym;
int tmp;
user *tmp1;
user *tmp2;
user *tmp1, *tmp2, *tmp;


for (i = 0; i < MAXUSERS; i++)
Expand All @@ -373,9 +367,7 @@ void sortUsersTo()
{
int i, j, max;
globuser *sym;
int tmp;
user *tmp1;
user *tmp2;
user *tmp1, *tmp2, *tmp;


for (i = 0; i < MAXUSERS; i++)
Expand All @@ -402,9 +394,7 @@ void sortUsersTotal()
{
int i, j, max;
globuser *sym;
int tmp;
user *tmp1;
user *tmp2;
user *tmp1,*tmp2, *tmp;


for (i = 0; i < MAXUSERS; i++)
Expand All @@ -430,9 +420,7 @@ void sortUsersByte()
{
int i, j, max;
globuser *sym;
int tmp;
user *tmp1;
user *tmp2;
user *tmp1, *tmp2, *tmp;


for (i = 0; i < MAXUSERS; i++)
Expand Down
2 changes: 1 addition & 1 deletion isoqlog/Data.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ struct UsersTab {
struct SortDomain {
int nval;
int max;
int *allusers;
user **allusers;
} SortDomain;

#endif
3 changes: 3 additions & 0 deletions isoqlog/Global.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

#define VERSION_STRING "EnderUNIX Isoqlog 2.2-BETA"

#define TO_STR2(x) #x
#define TO_STR(x) TO_STR2(x)
#define CONFFILE (TO_STR(SYSCONFDIR) "/isoqlog.conf")

enum {
BUFSIZE = 1024,
Expand Down
4 changes: 2 additions & 2 deletions isoqlog/Html.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ void addFooter(FILE *fp)
fprintf(fp, "<p><font face='Verdana, Arial, Helvetica, sans-serif' size='2' color='#666600'>"
"Generated by <a href='http://www.enderunix.org/isoqlog/' target='_blank'>%s</a>"
", <a href='http://www.enderunix.org'>EnderUNIX software development team @Istanbul/Turkey</a></font></p>\n"
"<p><a href='http://validator.w3.org/check/referer'>\n"
"<img border='0' src='http://www.w3.org/Icons/valid-html401' alt='Valid HTML 4.01!' height='31' width='88'></a>\n"
"<p><a href='https://validator.w3.org/check/referer'>\n"
"<img border='0' src='https://www.w3.org/Icons/valid-html401' alt='Valid HTML 4.01!' height='31' width='88'></a>\n"
"</p>\n", VERSION_STRING);
}

Expand Down
14 changes: 8 additions & 6 deletions isoqlog/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
AM_CPPFLAGS = -DSYSCONFDIR='$(sysconfdir)'

bin_PROGRAMS = isoqlog


Expand All @@ -9,14 +11,14 @@ SUBDIRS = lang htmltemp
EXTRA_DIST = Data.c Dir.c Html.c LangCfg.c loadconfig.c main.c Parser.c Store.c Data.h Dir.h Html.h Global.h LangCfg.h loadconfig.h Parser.h Store.h isoqlog.conf-dist isoqlog.conf.sample1 isoqlog.conf.sample2 isoqlog.conf.sample3 isoqlog.domains-dist

install-data-local:
$(mkinstalldirs) /usr/local/etc/
$(INSTALL_DATA) $(srcdir)/isoqlog.conf-dist /usr/local/etc/isoqlog.conf-dist
$(mkinstalldirs) /usr/local/etc/
$(INSTALL_DATA) $(srcdir)/isoqlog.domains-dist /usr/local/etc/isoqlog.domains-dist
$(mkinstalldirs) $(sysconfdir)/
$(INSTALL_DATA) $(srcdir)/isoqlog.conf-dist $(sysconfdir)/isoqlog.conf-dist
$(mkinstalldirs) $(sysconfdir)/
$(INSTALL_DATA) $(srcdir)/isoqlog.domains-dist $(sysconfdir)/isoqlog.domains-dist

uninstall-local:
-rm -f /usr/local/etc/isoqlog.conf-dist
-rm -f /usr/local/etc/isoqlog.domains-dist
-rm -f $(sysconfdir)/isoqlog.conf-dist
-rm -f $(sysconfdir)/isoqlog.domains-dist

# set the include path found by configure
INCLUDES= $(all_includes)
Expand Down
2 changes: 1 addition & 1 deletion isoqlog/htmltemp/daily.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<table border="0">
<tr>
<td width="50"><a href="../../../"><img border="0" src="../../../images/home.gif" width="24" height="23" alt="home.gif"></a></td>
<td width="50"><a href="../"><img border="0" src="../../../images/up.gif" width="24" height="23" alt="up.gif"></a></td>
<td width="50"><a href="./"><img border="0" src="../../../images/up.gif" width="24" height="23" alt="up.gif"></a></td>
</tr>
</table>
</center>
Expand Down
2 changes: 1 addition & 1 deletion isoqlog/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int main(int argc, char **argv)
general.from_byte = 0;

if (f == 0)
readconfig("/usr/local/etc/isoqlog.conf");
readconfig(CONFFILE);
else
readconfig(isoqlogconf);
loadLang(langfile);
Expand Down