]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - log.c
Pre-parse variables Index and IndexTree
[thirdparty/sarg.git] / log.c
diff --git a/log.c b/log.c
index d9d64eff996d3372ee94a0ecd7deb97c47223f22..6c068c643aeefca5ee17132d8d84f588cacc36d1 100644 (file)
--- a/log.c
+++ b/log.c
@@ -170,7 +170,7 @@ int main(int argc,char *argv[])
    OverwriteReport=0;
    RemoveTempFiles=1;
    strcpy(ReplaceIndex,"index.html");
-   strcpy(Index,"yes");
+   Index=INDEX_YES;
    strcpy(RecordsWithoutUser,"ip");
    UseComma=0;
    strcpy(MailUtility,"mailx");
@@ -219,7 +219,7 @@ int main(int argc,char *argv[])
    Graphs=1;
    strcpy(Ulimit,"20000");
    strcpy(NtlmUserFormat,"domainname+username");
-   strcpy(IndexTree,"file");
+   IndexTree=INDEX_TREE_FILE;
    strcpy(RealtimeTypes,"GET,PUT,CONNECT");
    strcpy(RealtimeUnauthRec,"show");
    SquidguardIgnoreDate=0;
@@ -460,7 +460,7 @@ int main(int argc,char *argv[])
       exit(0);
    }
 
-   if(strcmp(IndexTree,"file") == 0)
+   if(IndexTree == INDEX_TREE_FILE)
       strcpy(ImageFile,"../images");
    else
       strcpy(ImageFile,"../../../images");
@@ -515,7 +515,7 @@ int main(int argc,char *argv[])
          indexonly++;
    }
    if(strcmp(ExcludeUsers,"indexonly") == 0) indexonly++;
-   if(strcmp(Index,"only") == 0) indexonly++;
+   if(Index == INDEX_ONLY) indexonly++;
 
    if(MaxElapsed[0] != '\0') max_elapsed=atol(MaxElapsed);
 
@@ -1192,7 +1192,7 @@ int main(int argc,char *argv[])
             if(strncmp(df,"e",1) == 0)
                sprintf(tbuf, "%02d%s%04d", t->tm_mday, mes, t->tm_year+1900);
             if(strncmp(df,"w",1) == 0) {
-               strcpy(IndexTree,"file");
+               IndexTree=INDEX_TREE_FILE;
                strftime(tbuf, sizeof(tbuf), "%Y.%U", t);
             }