Skip to content

Commit

Permalink
3.10.2.2
Browse files Browse the repository at this point in the history
default value for --sort-empty is 'a'
= records with empty field used for sorting are shown at begining of results
  • Loading branch information
jygaulier committed Feb 7, 2013
1 parent 1ad0c88 commit d5f2491
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 37 deletions.
Binary file removed WIN32/Release_win32/phraseanet_indexer_3.10.2.1.exe
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions WIN32/customprops.vsprops
Expand Up @@ -6,10 +6,10 @@
>
<UserMacro
Name="PHVERSION"
Value="3,10,2,1"
Value="3,10,2,2"
/>
<UserMacro
Name="PHDOTVERSION"
Value="3.10.2.1"
Value="3.10.2.2"
/>
</VisualStudioPropertySheet>
8 changes: 0 additions & 8 deletions WIN32/syslog_win32.cpp
Expand Up @@ -5,14 +5,6 @@
#ifndef NULL
#define NULL 0
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 0
#endif



namespace util
{
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
@@ -1,3 +1,7 @@
3.10.2.2
default value for --sort-empty is 'a'
= records with empty field used for sorting are shown at begining of results

3.10.2.1
option --force-default renamed "--sort-empty"

Expand Down
2 changes: 1 addition & 1 deletion src/_version.h
Expand Up @@ -20,7 +20,7 @@
//

#ifndef PHDOTVERSION
#define PHDOTVERSION 3.10.2.1
#define PHDOTVERSION 3.10.2.2
#endif
//
//=======================================================================
Expand Down
6 changes: 3 additions & 3 deletions src/callback_record.cpp
Expand Up @@ -247,7 +247,7 @@ void evt_end(CDOMDocument *xmlparser)
prop->next = indexer->firstProp;
indexer->firstProp = prop;

currentField->found = TRUE;
currentField->found = true;
}
}

Expand Down Expand Up @@ -615,8 +615,8 @@ void callbackRecord(CConnbas_dbox *connbas, unsigned int record_id, char *xml, u

// mark each field as not found before indexing
for(int i=0; i<indexer->nStructFields; i++)
indexer->tStructField[i].found = FALSE;
indexer->tStructField[i].found = false;

// load and parse in one shot
indexer->xmlparser->loadXML(xml, len);

Expand Down
8 changes: 4 additions & 4 deletions src/dom.cpp
Expand Up @@ -366,11 +366,11 @@ CDOMDocument::CDOMDocument()

bool CDOMDocument::loadXML(char *xml, unsigned long len)
{
bool ret = TRUE;
bool ret = true;
// void *buff;

if(!this->parser)
return(FALSE);
return(false);

this->depth = -1;
this->State = CDOMDocument::INTO_UNKNOWN;
Expand Down Expand Up @@ -401,7 +401,7 @@ bool CDOMDocument::loadXML(char *xml, unsigned long len)
this->freeupathoffset = 0;
}

if(XML_Parse(this->parser, xml, len, TRUE) != XML_STATUS_ERROR)
if(XML_Parse(this->parser, xml, len, true) != XML_STATUS_ERROR)
{
}
else
Expand All @@ -410,7 +410,7 @@ bool CDOMDocument::loadXML(char *xml, unsigned long len)
zSyslog._log(CSyslog::LOGL_ERR, CSyslog::LOGC_XMLERR, "Parse error at line %u:\n%s\n",
XML_GetCurrentLineNumber(this->parser),
XML_ErrorString(XML_GetErrorCode(this->parser)));
ret = FALSE;
ret = false;
}

return(ret);
Expand Down
6 changes: 0 additions & 6 deletions src/dom.h
Expand Up @@ -47,12 +47,6 @@ typedef unsigned long XML_Size;
#ifndef NULL
#define NULL 0
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 0
#endif

class CDOMNode // abstract class
{
Expand Down
2 changes: 1 addition & 1 deletion src/indexer.h
Expand Up @@ -458,7 +458,7 @@ class CProp
// this->pxpath = NULL;
this->pfield = NULL;
this->next = NULL;
this->business = TRUE;
this->business = true;
}

~CProp()
Expand Down
13 changes: 8 additions & 5 deletions src/main.cpp
Expand Up @@ -99,7 +99,7 @@ bool help_flag = false;
bool nolog_flag = false;
bool oldsbas_flag = false;
bool quit_flag = false;
char arg_forcedefault = '\0';
char arg_forcedefault = 'A';
int wait_loop; // check sbas every 10 sec (10...0)

#ifdef INSTALL_AS_NT_SERVICE
Expand Down Expand Up @@ -161,7 +161,10 @@ void ShowUsage(char *app, int oldsbas_flag)
_tprintf((char*) (_T("[-c | --clng]=<lng> : default language for new candidates terms (default 'fr') \n")));
_tprintf((char*) (_T("[ | --stem]=<lng>,<lng>,.. : stemm for those languages \n")));
_tprintf((char*) (_T("[-n | --nolog] : do not log, but out to console \n")));
_tprintf((char*) (_T("[ | --sort-empty]=<a|z> : force default value for unset typed-fields\n")));
_tprintf((char*) (_T("[ | --sort-empty]=<a|n|z> : default value for unset fields with type (default 'a') //=sort position\n")));
_tprintf((char*) (_T(" a : beginning (default) \n")));
_tprintf((char*) (_T(" n : none (=record not shown when sorting) \n")));
_tprintf((char*) (_T(" z : end \n")));
_tprintf((char*) (_T("[-d | --debug]=<mask> : debug mask (to console) \n")));
_tprintf((char*) (_T(" 1 : xml parsing \n")));
_tprintf((char*) (_T(" 2 : sql errors \n")));
Expand Down Expand Up @@ -454,7 +457,7 @@ bool parseOptions(int argc, TCHAR * argv[], bool infile = false)
break;
case OPT_FORCEDEFAULT:
if( (p = args.OptionArg()) )
arg_forcedefault = (*p == 'a' || *p == 'z') ? (*p-'a')+'A' : *p;
arg_forcedefault = (*p >= 'a' && *p <= 'z') ? (*p-'a')+'A' : *p;
break;
case OPT_OPTFILE:
printf("OPTIONFILE : '%s'\n", (p = args.OptionArg()) ? p : "NULL");
Expand Down Expand Up @@ -1023,7 +1026,7 @@ void WINAPI ServiceMain(DWORD argc, LPTSTR *argv)
{
clientSockets.add(AcceptSocket);
send(AcceptSocket, "hello, type 'Q <enter>' to quit cindexer\n ", 41, 0);
//if (CreateSocketInformation(AcceptSocket) == FALSE)
//if (CreateSocketInformation(AcceptSocket) == false)
// return;
}
else
Expand All @@ -1038,7 +1041,7 @@ void WINAPI ServiceMain(DWORD argc, LPTSTR *argv)
clientSockets.add(AcceptSocket);
send(AcceptSocket, "hello, type 'Q <enter>' to quit cindexer\n ", 41, 0);

//if (CreateSocketInformation(AcceptSocket) == FALSE)
//if (CreateSocketInformation(AcceptSocket) == false)
// return;
}
else
Expand Down
7 changes: 0 additions & 7 deletions xNIX/syslog_xnix.cpp
Expand Up @@ -6,13 +6,6 @@
#ifndef NULL
#define NULL 0
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 0
#endif


const char *CSyslog::libLevel[7] = {
"LOGL_PARSE"
Expand Down

0 comments on commit d5f2491

Please sign in to comment.