ccommon.h Tolto prototipo della funzione prefname()
cfiles.h Aggiunto prototipo della funzione CGetPrawinName() cfiles.c Aggiunto supporto del file prawin.ini al posto dei files prefix.txt e pathpref.txt. Permane l'uso della variabile d'ambiente PREFPATH codeb.c Tolti tutti i warning csort.c Tolti tutti i warning mask.cpp Migliorata generazione del file di help netsock.cpp Aggiunto :: davanti alle funzioni di winsock.dll prefix.cpp Supporto prawin.ini prefix.h Eliminato metodo protetto put() progind.* Corretto prototipo funzione extern "C" proging_create git-svn-id: svn://10.65.10.50/trunk@5685 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
74a8b1e097
commit
909769349e
@ -191,7 +191,7 @@ typedef struct {
|
|||||||
char explic[82];
|
char explic[82];
|
||||||
} MenuItem;
|
} MenuItem;
|
||||||
typedef MenuItem MenuArray[MAXMENUITEM + 1];
|
typedef MenuItem MenuArray[MAXMENUITEM + 1];
|
||||||
typedef char PathSt[42];
|
typedef char PathSt[82];
|
||||||
|
|
||||||
extern Str80 cprefix;
|
extern Str80 cprefix;
|
||||||
extern TDitta cditta;
|
extern TDitta cditta;
|
||||||
|
160
include/cfiles.c
160
include/cfiles.c
@ -3,15 +3,29 @@
|
|||||||
#include "cfiles.h"
|
#include "cfiles.h"
|
||||||
#include "fldtypes.h"
|
#include "fldtypes.h"
|
||||||
|
|
||||||
|
#ifdef DOS
|
||||||
|
|
||||||
|
#include <io.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#define WINAPI _far _pascal
|
||||||
|
#define LPSTR char*
|
||||||
|
#define LPCSTR const LPSTR
|
||||||
|
int WINAPI GetPrivateProfileString(LPCSTR, LPCSTR, LPCSTR, LPSTR, int, LPCSTR);
|
||||||
|
int WINAPI WritePrivateProfileString(LPCSTR, LPCSTR, LPCSTR, LPCSTR);
|
||||||
|
UINT WINAPI GetDriveType(int);
|
||||||
|
|
||||||
|
#endif // DOS
|
||||||
|
|
||||||
int hashfun(const char *);
|
int hashfun(const char *);
|
||||||
void setdec(char *, int);
|
void setdec(char *, int);
|
||||||
char *prefname(void);
|
const char* prefname();
|
||||||
|
|
||||||
HIDDEN BOOLEAN pathpread = FALSE;
|
HIDDEN BOOLEAN pathpread = FALSE;
|
||||||
|
|
||||||
BOOLEAN dispferr = TRUE;
|
BOOLEAN dispferr = TRUE;
|
||||||
int dirfl[2] = {0, 0}, recfl[2] = {0, 0} ;
|
int dirfl[2] = {0, 0}, recfl[2] = {0, 0} ;
|
||||||
char __ptprf[80] = "";
|
PathSt __ptprf = "";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@(#) COpenDir FILES
|
@(#) COpenDir FILES
|
||||||
@ -373,20 +387,87 @@ void CPutRec(logicname,recd,dirflg)
|
|||||||
|
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
|
|
||||||
char *prefname()
|
HIDDEN const char* prefname()
|
||||||
|
{
|
||||||
|
static char* s = NULL;
|
||||||
|
|
||||||
|
if (s == NULL)
|
||||||
{
|
{
|
||||||
static PathSt s;
|
|
||||||
#ifdef DOS
|
#ifdef DOS
|
||||||
char *s1 = getenv("PREFPATH");
|
char *s1 = getenv("PREFPATH");
|
||||||
if (s1 == NULL) s1 = "prefix.txt";
|
if (s1 == NULL) s1 = "prefix.txt";
|
||||||
strcpy(s, s1);
|
s = strdup(s1);
|
||||||
#else
|
#else
|
||||||
|
s = malloc(32);
|
||||||
sprintf(s, "prefix.%-d", getuid());
|
sprintf(s, "prefix.%-d", getuid());
|
||||||
#endif
|
#endif
|
||||||
return(s) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef DOS
|
||||||
|
|
||||||
|
const char* CGetPrawinName(void)
|
||||||
|
{
|
||||||
|
static char* prawin = NULL;
|
||||||
|
if (prawin == NULL)
|
||||||
|
{
|
||||||
|
char drive[_MAX_DRIVE];
|
||||||
|
char path[_MAX_PATH];
|
||||||
|
char tmp[_MAX_PATH];
|
||||||
|
_splitpath(prefname(), drive, path, NULL, NULL);
|
||||||
|
_makepath(tmp, drive, path, "prawin", ".ini");
|
||||||
|
prawin = malloc(_MAX_PATH);
|
||||||
|
_searchenv(tmp, NULL, prawin);
|
||||||
|
}
|
||||||
|
return prawin;
|
||||||
|
}
|
||||||
|
|
||||||
|
HIDDEN BOOLEAN CGetPrawin()
|
||||||
|
{
|
||||||
|
const char* prawin = CGetPrawinName();
|
||||||
|
BOOLEAN good = _access(prawin, 0x00) == 0;
|
||||||
|
if (good)
|
||||||
|
{
|
||||||
|
word len = GetPrivateProfileString("Main", "Study", "", __ptprf, sizeof(__ptprf), prawin);
|
||||||
|
good = len > 0;
|
||||||
|
if (good)
|
||||||
|
{
|
||||||
|
char firm[8];
|
||||||
|
long ditta;
|
||||||
|
|
||||||
|
if (__ptprf[len-1] != '\\' && __ptprf[len-1] != '/')
|
||||||
|
{
|
||||||
|
__ptprf[len] = DIRSEP;
|
||||||
|
__ptprf[len+1] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
GetPrivateProfileString("Main", "Firm", "COM", firm, sizeof(firm), prawin);
|
||||||
|
ditta = atol(firm);
|
||||||
|
if (ditta > 0) sprintf(firm, "%05ldA", ditta);
|
||||||
|
_makepath(cprefix, NULL, __ptprf, firm, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return good;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOLEAN CPutPrawin(const char* pref)
|
||||||
|
{
|
||||||
|
const char* prawin = CGetPrawinName();
|
||||||
|
BOOLEAN good = WritePrivateProfileString("Main", "Firm", pref, prawin);
|
||||||
|
if (good)
|
||||||
|
{
|
||||||
|
int disk = toupper(*prawin) - 'A';
|
||||||
|
if (GetDriveType(disk) == 3) // Aggiorna lo studio solo sui dischi locali
|
||||||
|
WritePrivateProfileString("Main", "Study", __ptprf, prawin);
|
||||||
|
}
|
||||||
|
return good;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -407,8 +488,11 @@ char *prefname()
|
|||||||
@(FN)
|
@(FN)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *CGetPref()
|
const char* CGetPref()
|
||||||
|
{
|
||||||
|
#ifdef DOS
|
||||||
|
if (!CGetPrawin())
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
const char* p = prefname();
|
const char* p = prefname();
|
||||||
FILE *f = fopen(p, "r");
|
FILE *f = fopen(p, "r");
|
||||||
@ -421,17 +505,18 @@ char *CGetPref()
|
|||||||
{
|
{
|
||||||
if (fgets(cprefix, 42, f) != NULL)
|
if (fgets(cprefix, 42, f) != NULL)
|
||||||
{
|
{
|
||||||
const int len = LENGTH(cprefix)-1;
|
int len;
|
||||||
if (len >= 0 && cprefix[len] <= ' ') cprefix[len] = '\0';
|
for (len = LENGTH(cprefix)-1; len >= 0 && cprefix[len] <= ' '; len--)
|
||||||
|
cprefix[len] = '\0';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*cprefix = '\0';
|
*cprefix = '\0';
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pathpread)
|
if (!pathpread)
|
||||||
{
|
{
|
||||||
const char* p = "pathpref.ini";
|
FILE* f = fopen("pathpref.ini", "r");
|
||||||
FILE* f = fopen(p, "r");
|
|
||||||
pathpread = TRUE;
|
pathpread = TRUE;
|
||||||
if (f != NULL)
|
if (f != NULL)
|
||||||
{
|
{
|
||||||
@ -441,7 +526,6 @@ char *CGetPref()
|
|||||||
if (len >= 0 && __ptprf[len] <= ' ')
|
if (len >= 0 && __ptprf[len] <= ' ')
|
||||||
{
|
{
|
||||||
__ptprf[len] = '\0';
|
__ptprf[len] = '\0';
|
||||||
// if (len > 0) strcat(__ptprf, "/"); // Guy was here
|
|
||||||
if (len > 0 && __ptprf[len-1] != '\\' && __ptprf[len-1] != '/')
|
if (len > 0 && __ptprf[len-1] != '\\' && __ptprf[len-1] != '/')
|
||||||
{
|
{
|
||||||
#ifdef DOS
|
#ifdef DOS
|
||||||
@ -459,11 +543,14 @@ char *CGetPref()
|
|||||||
}
|
}
|
||||||
if (*__ptprf)
|
if (*__ptprf)
|
||||||
{
|
{
|
||||||
char ws[200];
|
char* copy_of_prefix = strdup(cprefix);
|
||||||
sprintf(ws, "%s%s", __ptprf, cprefix);
|
strcpy(cprefix, __ptprf);
|
||||||
strcpy(cprefix, ws);
|
strcat(cprefix, copy_of_prefix);
|
||||||
|
free(copy_of_prefix);
|
||||||
}
|
}
|
||||||
return(cprefix);
|
}
|
||||||
|
|
||||||
|
return cprefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -484,19 +571,22 @@ char *CGetPref()
|
|||||||
@(FN)
|
@(FN)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void CPutPref(pref)
|
|
||||||
char *pref; /* stringa contenente il nuovo prefisso */
|
|
||||||
|
|
||||||
|
void CPutPref(const char* pref) /* stringa contenente il nuovo prefisso */
|
||||||
|
{
|
||||||
|
#ifdef DOS
|
||||||
|
CPutPrawin(pref);
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
const int l = strlen(__ptprf);
|
const int l = strlen(__ptprf);
|
||||||
|
|
||||||
if (l && strncmp(pref, __ptprf, l) == 0) pref += l;
|
if (l && strncmp(pref, __ptprf, l) == 0) pref += l;
|
||||||
if ((f = fopen(prefname(), "w")) == NULL)
|
if ((f = fopen(prefname(), "w")) == NULL)
|
||||||
fatal_box("Put prefix. Error number : %d ", errno);
|
fatal_box("Put prefix. Error number : %d ", errno);
|
||||||
fprintf(f, "%s\n", pref);
|
fprintf(f, "%s\n", pref);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@($) CAddPref FILES
|
@($) CAddPref FILES
|
||||||
@ -520,7 +610,7 @@ char *CAddPref(name)
|
|||||||
char *name; /* nome file */
|
char *name; /* nome file */
|
||||||
|
|
||||||
{
|
{
|
||||||
static PathSt s;
|
static char* s = NULL;
|
||||||
|
|
||||||
if (*name == '$')
|
if (*name == '$')
|
||||||
{
|
{
|
||||||
@ -528,6 +618,7 @@ char *CAddPref(name)
|
|||||||
return(CInsPref(name, NORDIR)) ;
|
return(CInsPref(name, NORDIR)) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
if (*name == '%')
|
if (*name == '%')
|
||||||
{
|
{
|
||||||
name++;
|
name++;
|
||||||
@ -535,11 +626,14 @@ char *CAddPref(name)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (s == NULL)
|
||||||
|
s = malloc(_MAX_PATH);
|
||||||
if (strncmp(__ptprf, name, strlen(__ptprf)) != 0)
|
if (strncmp(__ptprf, name, strlen(__ptprf)) != 0)
|
||||||
sprintf(s, "%s%s", __ptprf, name);
|
sprintf(s, "%s%s", __ptprf, name);
|
||||||
else
|
else
|
||||||
strcpy(s, name);
|
strcpy(s, name);
|
||||||
return(s);
|
return s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -566,15 +660,21 @@ char *CInsPref(name,dirflg)
|
|||||||
int dirflg; /* flag per file comuni */
|
int dirflg; /* flag per file comuni */
|
||||||
|
|
||||||
{
|
{
|
||||||
static PathSt s;
|
static char* s = NULL;
|
||||||
|
if (s == NULL)
|
||||||
|
s = malloc(_MAX_PATH);
|
||||||
|
|
||||||
if (dirflg == NORDIR)
|
if (dirflg == NORDIR)
|
||||||
{
|
{
|
||||||
if (LENGTH(cprefix) == 0) sprintf(s,"%s", name);
|
if (*cprefix == '\0')
|
||||||
else sprintf(s,"%s%c%s",cprefix, DIRSEP, name);
|
strcpy(s, name);
|
||||||
|
else
|
||||||
|
// sprintf(s,"%s%c%s",cprefix, DIRSEP, name);
|
||||||
|
_makepath(s, NULL, cprefix, name, NULL);
|
||||||
}
|
}
|
||||||
else sprintf(s,"%scom%c%s", __ptprf, DIRSEP, name);
|
else
|
||||||
return(s);
|
sprintf(s,"%scom%c%s", __ptprf, DIRSEP, name);
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -602,9 +702,11 @@ char *CGetIdxName(s)
|
|||||||
char *s; /* stringa contenente il nome file */
|
char *s; /* stringa contenente il nome file */
|
||||||
|
|
||||||
{
|
{
|
||||||
static PathSt fdst;
|
static char* fdst = NULL;
|
||||||
char *s1, *s2;
|
char *s1, *s2;
|
||||||
|
|
||||||
|
if (fdst == NULL)
|
||||||
|
fdst = malloc(_MAX_PATH);
|
||||||
strcpy(fdst, s) ;
|
strcpy(fdst, s) ;
|
||||||
s1 = strrchr(fdst,DIRSEP) ;
|
s1 = strrchr(fdst,DIRSEP) ;
|
||||||
if (s1 == NULL) s1 = fdst;
|
if (s1 == NULL) s1 = fdst;
|
||||||
|
@ -121,14 +121,16 @@ extern "C" {
|
|||||||
/* @(:) 2.3.01.144 */
|
/* @(:) 2.3.01.144 */
|
||||||
void zerordes(RecDes *);
|
void zerordes(RecDes *);
|
||||||
word setrdes(RecDes *);
|
word setrdes(RecDes *);
|
||||||
char *CGetPref(void);
|
const char* CGetPref(void);
|
||||||
void CPutPref(char *);
|
void CPutPref(const char *);
|
||||||
char *CAddPref(char *);
|
char *CAddPref(char *);
|
||||||
/* @(!) 2.3.01.144 */
|
/* @(!) 2.3.01.144 */
|
||||||
char *CInsPref(char *, int);
|
char *CInsPref(char *, int);
|
||||||
/* @(:) 2.3.01.144 */
|
/* @(:) 2.3.01.144 */
|
||||||
char *CGetIdxName(char *);
|
char *CGetIdxName(char *);
|
||||||
|
|
||||||
|
const char* CGetPrawinName(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -57,8 +57,8 @@ static DATA4 *dbdata[CB4FILES];
|
|||||||
|
|
||||||
static char * find_slash_backslash(char * str)
|
static char * find_slash_backslash(char * str)
|
||||||
{
|
{
|
||||||
|
static char* xstr = NULL;
|
||||||
int l=strlen(str);
|
int l=strlen(str);
|
||||||
static char * xstr ;
|
|
||||||
xstr = str + l;
|
xstr = str + l;
|
||||||
|
|
||||||
while (xstr-- && l--)
|
while (xstr-- && l--)
|
||||||
@ -630,7 +630,7 @@ int DB_packfile(short vis, const char * filename, long eod)
|
|||||||
strcpy(s,"Compattamento dati file : ");
|
strcpy(s,"Compattamento dati file : ");
|
||||||
strcat(s,(char*)filename);
|
strcat(s,(char*)filename);
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
progind_create(10L,s,1,1,1);
|
progind_create(100L,s,0,0,60);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (eod < d4recCount(dbdata[handle]))
|
if (eod < d4recCount(dbdata[handle]))
|
||||||
@ -641,7 +641,6 @@ int DB_packfile(short vis, const char * filename, long eod)
|
|||||||
if (vis)
|
if (vis)
|
||||||
{
|
{
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
progind_set_status((long)10);
|
|
||||||
progind_destroy();
|
progind_destroy();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -671,14 +670,13 @@ int DB_packmemo(short vis, const char * filename)
|
|||||||
strcpy(s,"Compattamento memo file : ");
|
strcpy(s,"Compattamento memo file : ");
|
||||||
strcat(s,(char*)filename);
|
strcat(s,(char*)filename);
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
progind_create(10L,s,1,1,1);
|
progind_create(100L,s,0,0,60);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
rt=d4memoCompress(dbdata[handle]);
|
rt=d4memoCompress(dbdata[handle]);
|
||||||
if (vis)
|
if (vis)
|
||||||
{
|
{
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
progind_set_status((long)10);
|
|
||||||
progind_destroy();
|
progind_destroy();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -719,7 +717,7 @@ int DB_clean_file(int handle, char * filename, char * ff, RecDes * r, short vis)
|
|||||||
l = lt - 9;
|
l = lt - 9;
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
if (vis)
|
if (vis)
|
||||||
progind_create(items,"Ricerca record duplicati",1,1,1);
|
progind_create(items,"Ricerca record duplicati",0,1,60);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rt = tfile4bottom(t->tagFile);
|
rt = tfile4bottom(t->tagFile);
|
||||||
@ -775,7 +773,7 @@ int DB_packindex(short vis, const char * filename, RecDes *r, long *peod, bool a
|
|||||||
char *ff = find_slash_backslash((char *)filename);
|
char *ff = find_slash_backslash((char *)filename);
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
if (vis)
|
if (vis)
|
||||||
progind_create((long)r->NKeys,s,1,1,1);
|
progind_create((long)r->NKeys,s,0,1,60);
|
||||||
#endif
|
#endif
|
||||||
if ((ff == NULL) || *ff == '\0')
|
if ((ff == NULL) || *ff == '\0')
|
||||||
ff = (char *)filename;
|
ff = (char *)filename;
|
||||||
@ -802,7 +800,7 @@ int DB_packindex(short vis, const char * filename, RecDes *r, long *peod, bool a
|
|||||||
{
|
{
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
if (vis)
|
if (vis)
|
||||||
progind_create((long)r->NKeys,s,1,1,1);
|
progind_create((long)r->NKeys,s,0,1,60);
|
||||||
#endif
|
#endif
|
||||||
w = i4create(dbdata[handle],(char*)filename,tags);
|
w = i4create(dbdata[handle],(char*)filename,tags);
|
||||||
if (w == NULL) rt = code_base.errorCode;
|
if (w == NULL) rt = code_base.errorCode;
|
||||||
@ -1102,17 +1100,20 @@ long DB_index_next(int handle)
|
|||||||
|
|
||||||
char* DB_index_getkey(int handle)
|
char* DB_index_getkey(int handle)
|
||||||
{
|
{
|
||||||
|
static char* key = NULL;
|
||||||
TAG4 *t;
|
TAG4 *t;
|
||||||
static char key[MAXLEN];
|
|
||||||
int klen;
|
int klen;
|
||||||
|
|
||||||
if(dbdata[handle]==0) return(NULL);
|
if (key == NULL)
|
||||||
|
key = malloc(MAXLEN);
|
||||||
|
if(dbdata[handle]==0)
|
||||||
|
return(NULL);
|
||||||
if ((t=d4tagDefault(dbdata[handle]))==NULL) return(NULL);
|
if ((t=d4tagDefault(dbdata[handle]))==NULL) return(NULL);
|
||||||
klen=a4tagKeyLen(dbdata[handle]);
|
klen=a4tagKeyLen(dbdata[handle]);
|
||||||
if (klen > (MAXLEN-1)) klen=MAXLEN-1;
|
if (klen > (MAXLEN-1)) klen=MAXLEN-1;
|
||||||
memcpy(key,a4tagKey(dbdata[handle]),klen); /* tfile4key non restituisce una null terminated string */
|
memcpy(key,a4tagKey(dbdata[handle]),klen); /* tfile4key non restituisce una null terminated string */
|
||||||
key[klen]='\0';
|
key[klen]='\0';
|
||||||
return(key);
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------
|
||||||
@ -1236,8 +1237,8 @@ static X4FILTER xdb[CB4FILES];
|
|||||||
|
|
||||||
static char * find_slash_backslash(char * str)
|
static char * find_slash_backslash(char * str)
|
||||||
{
|
{
|
||||||
|
static char* xstr = NULL;
|
||||||
int l=strlen(str);
|
int l=strlen(str);
|
||||||
static char * xstr ;
|
|
||||||
xstr = str + l;
|
xstr = str + l;
|
||||||
|
|
||||||
while (xstr-- && l--)
|
while (xstr-- && l--)
|
||||||
@ -1901,9 +1902,9 @@ int DB_packfile(short vis, const char * filename, long eod)
|
|||||||
if (vis)
|
if (vis)
|
||||||
{
|
{
|
||||||
strcpy(s, "Compattamento dati file : ");
|
strcpy(s, "Compattamento dati file : ");
|
||||||
strcat(s,(char*)filename);
|
strcat(s, filename);
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
progind_create(10L,s,1,1,1);
|
progind_create(100L,s,0,0,60);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (eod < d4reccount(dbdata[handle]))
|
if (eod < d4reccount(dbdata[handle]))
|
||||||
@ -1914,7 +1915,6 @@ int DB_packfile(short vis, const char * filename, long eod)
|
|||||||
if (vis)
|
if (vis)
|
||||||
{
|
{
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
progind_set_status((long)10);
|
|
||||||
progind_destroy();
|
progind_destroy();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1944,14 +1944,13 @@ int DB_packmemo(short vis, const char * filename)
|
|||||||
strcpy(s,"Compattamento memo file : ");
|
strcpy(s,"Compattamento memo file : ");
|
||||||
strcat(s,(char*)filename);
|
strcat(s,(char*)filename);
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
progind_create(10L,s,1,1,1);
|
progind_create(100L,s,0,0,60);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
rt=d4memo_compress(dbdata[handle]);
|
rt=d4memo_compress(dbdata[handle]);
|
||||||
if (vis)
|
if (vis)
|
||||||
{
|
{
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
progind_set_status((long)10);
|
|
||||||
progind_destroy();
|
progind_destroy();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1992,7 +1991,7 @@ int DB_clean_file(int handle, char * filename, char * ff, RecDes * r, short vis)
|
|||||||
l = lt - 9;
|
l = lt - 9;
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
if (vis)
|
if (vis)
|
||||||
progind_create(items,"Ricerca record duplicati",1,1,1);
|
progind_create(items,"Ricerca record duplicati",0,1,60);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rt = t4bottom(t);
|
rt = t4bottom(t);
|
||||||
@ -2049,7 +2048,7 @@ int DB_packindex(short vis, const char * filename, RecDes *r, long *peod, bool a
|
|||||||
char *ff = find_slash_backslash((char *)filename);
|
char *ff = find_slash_backslash((char *)filename);
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
if (vis)
|
if (vis)
|
||||||
progind_create((long)r->NKeys,s,1,1,1);
|
progind_create((long)r->NKeys,s,0,1,60);
|
||||||
#endif
|
#endif
|
||||||
if ((ff == NULL) || *ff == '\0')
|
if ((ff == NULL) || *ff == '\0')
|
||||||
ff = (char *)filename;
|
ff = (char *)filename;
|
||||||
@ -2076,7 +2075,7 @@ int DB_packindex(short vis, const char * filename, RecDes *r, long *peod, bool a
|
|||||||
{
|
{
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
if (vis)
|
if (vis)
|
||||||
progind_create((long)r->NKeys,s,1,1,1);
|
progind_create((long)r->NKeys,s,0,1,60);
|
||||||
#endif
|
#endif
|
||||||
w = i4create(dbdata[handle],(char*)filename,tags);
|
w = i4create(dbdata[handle],(char*)filename,tags);
|
||||||
if (w == NULL) rt = code_base.error_code;
|
if (w == NULL) rt = code_base.error_code;
|
||||||
@ -2382,17 +2381,22 @@ long DB_index_next(int handle)
|
|||||||
|
|
||||||
char* DB_index_getkey(int handle)
|
char* DB_index_getkey(int handle)
|
||||||
{
|
{
|
||||||
|
static char* key = NULL;
|
||||||
TAG4 *t;
|
TAG4 *t;
|
||||||
static char key[MAXLEN];
|
|
||||||
int klen;
|
int klen;
|
||||||
|
|
||||||
if(dbdata[handle]==0) return(NULL);
|
if (key == NULL)
|
||||||
|
key = malloc(MAXLEN);
|
||||||
|
|
||||||
|
if(dbdata[handle]==0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if ((t=d4tag_default(dbdata[handle]))==NULL) return(NULL);
|
if ((t=d4tag_default(dbdata[handle]))==NULL) return(NULL);
|
||||||
klen=expr4key_len(t->expr);
|
klen=expr4key_len(t->expr);
|
||||||
if (klen > (MAXLEN-1)) klen=MAXLEN-1;
|
if (klen > (MAXLEN-1)) klen=MAXLEN-1;
|
||||||
memcpy(key,t4key(t),klen); /* t4key non restituisce una null terminated string */
|
memcpy(key,t4key(t),klen); /* t4key non restituisce una null terminated string */
|
||||||
key[klen]='\0';
|
key[klen]='\0';
|
||||||
return(key);
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------
|
||||||
|
@ -37,7 +37,8 @@ static FILE *fp1, *fp2;
|
|||||||
static char fdname [42];
|
static char fdname [42];
|
||||||
static char f2name [42];
|
static char f2name [42];
|
||||||
|
|
||||||
static int sortcomp(char **, char **);
|
//static int sortcomp(char **, char **);
|
||||||
|
static int sortcomp(const void*, const void*);
|
||||||
static char *appr_mem(unsigned *);
|
static char *appr_mem(unsigned *);
|
||||||
/* @(!) 2.3.00.112 */
|
/* @(!) 2.3.00.112 */
|
||||||
static FILE *wopen(char *);
|
static FILE *wopen(char *);
|
||||||
@ -142,7 +143,7 @@ void sort(s_rcd)
|
|||||||
|
|
||||||
static void prep_merge()
|
static void prep_merge()
|
||||||
{
|
{
|
||||||
int i;
|
unsigned i;
|
||||||
struct bp *rr;
|
struct bp *rr;
|
||||||
unsigned n_bfsz;
|
unsigned n_bfsz;
|
||||||
|
|
||||||
@ -260,12 +261,12 @@ void dummy()
|
|||||||
|
|
||||||
static void merge()
|
static void merge()
|
||||||
{
|
{
|
||||||
int i;
|
unsigned i;
|
||||||
int needy, needx; /* true = need a rcd from (x/y) */
|
int needy, needx; /* true = need a rcd from (x/y) */
|
||||||
/* @(!) 2.3.00.112 */
|
/* @(!) 2.3.00.112 */
|
||||||
unsigned xcnt, ycnt; /* # rcds left each sequence */
|
unsigned xcnt, ycnt; /* # rcds left each sequence */
|
||||||
/* @(:) 2.3.00.112 */
|
/* @(:) 2.3.00.112 */
|
||||||
int x, y; /* sequence counters */
|
unsigned x, y; /* sequence counters */
|
||||||
long adx, ady; /* sequence record disk addresses */
|
long adx, ady; /* sequence record disk addresses */
|
||||||
/* @(!) 2.3.00.112 */
|
/* @(!) 2.3.00.112 */
|
||||||
char *ysptr = init_sptr + sp->rc_len;
|
char *ysptr = init_sptr + sp->rc_len;
|
||||||
@ -614,11 +615,17 @@ static FILE *wopen(name)
|
|||||||
@(FN)
|
@(FN)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int sortcomp(a,b)
|
|
||||||
char **a; char **b; /* puntatori ai puntatori ai record da confrontare */
|
// static int sortcomp(a,b)
|
||||||
|
// char **a; char **b; /* puntatori ai puntatori ai record da confrontare */
|
||||||
|
|
||||||
|
static int sortcomp(const void* pa, const void* pb)
|
||||||
{
|
{
|
||||||
int i, k;
|
int i, k;
|
||||||
|
|
||||||
|
const char** a = (const char**)pa;
|
||||||
|
const char** b = (const char**)pb;
|
||||||
|
|
||||||
if (**a == 127 || **b == 127)
|
if (**a == 127 || **b == 127)
|
||||||
return (int) **a - (int) **b;
|
return (int) **a - (int) **b;
|
||||||
for (i = 0; i < NOFLDS; i++)
|
for (i = 0; i < NOFLDS; i++)
|
||||||
|
@ -94,10 +94,10 @@ extern "C" {
|
|||||||
void CPutRec(int, RecDes *, int);
|
void CPutRec(int, RecDes *, int);
|
||||||
void zerordes(RecDes *);
|
void zerordes(RecDes *);
|
||||||
word setrdes(RecDes *);
|
word setrdes(RecDes *);
|
||||||
char *prefname(void);
|
const char* CGetPrawinName(void);
|
||||||
char *CAddPref(char *);
|
char *CAddPref(char *);
|
||||||
char *CGetPref(void);
|
const char* CGetPref(void);
|
||||||
void CPutPref(char *);
|
void CPutPref(const char *);
|
||||||
char *CInsPref(char *, int);
|
char *CInsPref(char *, int);
|
||||||
char *CGetIdxName(char *);
|
char *CGetIdxName(char *);
|
||||||
int init_sort(struct s_prm *);
|
int init_sort(struct s_prm *);
|
||||||
|
@ -743,13 +743,13 @@ bool TMask::on_key(
|
|||||||
char mkKeyphrase[16];
|
char mkKeyphrase[16];
|
||||||
} mk;
|
} mk;
|
||||||
|
|
||||||
TFilename topic(source_file()); topic.ext("");
|
|
||||||
mk.mkSize = sizeof(MULTIGUY);
|
mk.mkSize = sizeof(MULTIGUY);
|
||||||
mk.mkKeylist = 'M';
|
mk.mkKeylist = 'M';
|
||||||
strcpy(mk.mkKeyphrase, topic);
|
_splitpath(source_file(), NULL, NULL, mk.mkKeyphrase, NULL);
|
||||||
|
|
||||||
TFilename hlp("prassi.hlp");
|
TFilename hlp("prassi.hlp");
|
||||||
const TString16 mod(topic.left(2));
|
TString16 mod(mk.mkKeyphrase);
|
||||||
|
mod.cut(2); mod.lower();
|
||||||
if (mod != "ba") hlp.insert(mod, 0);
|
if (mod != "ba") hlp.insert(mod, 0);
|
||||||
|
|
||||||
HWND hwnd = (HWND)xvt_vobj_get_attr(TASK_WIN, ATTR_NATIVE_WINDOW);
|
HWND hwnd = (HWND)xvt_vobj_get_attr(TASK_WIN, ATTR_NATIVE_WINDOW);
|
||||||
|
@ -253,7 +253,7 @@ void skstream::open( const char *addr, const service port, const role side )
|
|||||||
}
|
}
|
||||||
|
|
||||||
sa.sin_addr.S_un.S_addr = *(unsigned long *)( he->h_addr_list[ 0 ] ) ;
|
sa.sin_addr.S_un.S_addr = *(unsigned long *)( he->h_addr_list[ 0 ] ) ;
|
||||||
sa.sin_port = htons( port ) ;
|
sa.sin_port = ::htons( port ) ;
|
||||||
|
|
||||||
if( SOCKET_ERROR == ::connect( _socket, (sockaddr *)&sa, sizeof( sa ) ) )
|
if( SOCKET_ERROR == ::connect( _socket, (sockaddr *)&sa, sizeof( sa ) ) )
|
||||||
{
|
{
|
||||||
@ -334,8 +334,8 @@ unsigned short skstream::getport( void ) const
|
|||||||
int sasize = sizeof( sa ) ;
|
int sasize = sizeof( sa ) ;
|
||||||
if( SOCKET_ERROR ==::getpeername( getsocket(), (sockaddr *)&sa, &sasize ) )
|
if( SOCKET_ERROR ==::getpeername( getsocket(), (sockaddr *)&sa, &sasize ) )
|
||||||
// Cannot get peer port
|
// Cannot get peer port
|
||||||
return ntohs( IPPORT_RESERVED ) ;
|
return ::ntohs( IPPORT_RESERVED ) ;
|
||||||
return ntohs( sa.sin_port ) ;
|
return ::ntohs( sa.sin_port ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -5,10 +5,6 @@
|
|||||||
#define __PREFIX_CPP
|
#define __PREFIX_CPP
|
||||||
#include <prefix.h>
|
#include <prefix.h>
|
||||||
|
|
||||||
#ifndef FOXPRO
|
|
||||||
#include <applicat.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <extcdecl.h>
|
#include <extcdecl.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
#include <scanner.h>
|
#include <scanner.h>
|
||||||
@ -86,26 +82,26 @@ TPrefix::TPrefix() : _filelevel(0), _items(0)
|
|||||||
_rdir = rdir;
|
_rdir = rdir;
|
||||||
|
|
||||||
CGetPref();
|
CGetPref();
|
||||||
const TFilename dir(cprefix);
|
|
||||||
|
|
||||||
|
const TFilename dir(cprefix);
|
||||||
const long primaditta = atol(dir.name());
|
const long primaditta = atol(dir.name());
|
||||||
|
|
||||||
if (primaditta > 0 && !exist(primaditta))
|
if (primaditta > 0 && !exist(primaditta))
|
||||||
{
|
{
|
||||||
ofstream out_pr(prefname());
|
// ofstream out_pr(prefname());
|
||||||
out_pr << "com" << endl;
|
// out_pr << "com" << endl;
|
||||||
|
set("com", TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TPrefix::~TPrefix()
|
TPrefix::~TPrefix()
|
||||||
|
|
||||||
{
|
{
|
||||||
set();
|
set();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HIDDEN int closeall(bool changestudy, TBit_array& excl, TBit_array& toclose)
|
HIDDEN int closeall(bool changestudy, TBit_array& excl, TBit_array& toclose)
|
||||||
|
|
||||||
{
|
{
|
||||||
if (!openf) return 0;
|
if (!openf) return 0;
|
||||||
TDir d;
|
TDir d;
|
||||||
@ -247,16 +243,25 @@ void TPrefix::set(
|
|||||||
if (strcmp(name, "DEF") == 0)
|
if (strcmp(name, "DEF") == 0)
|
||||||
{
|
{
|
||||||
CGetPref();
|
CGetPref();
|
||||||
_prefix = cprefix;
|
// _prefix = cprefix;
|
||||||
const int l = strlen(__ptprf);
|
// const int l = strlen(__ptprf);
|
||||||
if (l > 0) _prefix.ltrim(l);
|
// if (l > 0) _prefix.ltrim(l);
|
||||||
|
_splitpath(cprefix, NULL, NULL, _prefix.get_buffer(), NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_prefix = name;
|
_prefix = name;
|
||||||
if (*__ptprf && *name) strcpy(cprefix, __ptprf);
|
/*
|
||||||
else strcpy(cprefix, "");
|
if (*__ptprf && *name)
|
||||||
|
strcpy(cprefix, __ptprf);
|
||||||
|
else
|
||||||
|
strcpy(cprefix, "");
|
||||||
strcat(cprefix, name);
|
strcat(cprefix, name);
|
||||||
|
*/
|
||||||
|
if (*name)
|
||||||
|
_makepath(cprefix, NULL, __ptprf, name, NULL);
|
||||||
|
else
|
||||||
|
strcpy(cprefix, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!test(_prefix))
|
if (!test(_prefix))
|
||||||
@ -311,29 +316,21 @@ bool TPrefix::test(const char* s) const
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TPrefix::put()
|
|
||||||
{
|
|
||||||
CPutPref((char*)(const char*)_prefix);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool TPrefix::test(long codditta) const
|
bool TPrefix::test(long codditta) const
|
||||||
{
|
{
|
||||||
TString16 s("com");
|
TString16 s("com");
|
||||||
if (codditta > 0L)
|
if (codditta > 0L)
|
||||||
s.format("%05lda", codditta);
|
s.format("%05ldA", codditta);
|
||||||
return test(s);
|
return test(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
long TPrefix::get_codditta() const
|
long TPrefix::get_codditta() const
|
||||||
{
|
{
|
||||||
const long codditta = atol((const char*)_prefix);
|
const long codditta = atol(_prefix);
|
||||||
return codditta;
|
return codditta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool TPrefix::set_codditta(long codditta, bool force)
|
bool TPrefix::set_codditta(long codditta, bool force)
|
||||||
{
|
{
|
||||||
if (force || test(codditta))
|
if (force || test(codditta))
|
||||||
@ -342,12 +339,44 @@ bool TPrefix::set_codditta(long codditta, bool force)
|
|||||||
if (codditta > 0L)
|
if (codditta > 0L)
|
||||||
s.format("%05lda", codditta);
|
s.format("%05lda", codditta);
|
||||||
set(s, force);
|
set(s, force);
|
||||||
put();
|
CPutPref(_prefix);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* TPrefix::get_studio() const
|
||||||
|
{
|
||||||
|
return __ptprf;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TPrefix::set_studio(const char* study, long ditta)
|
||||||
|
{
|
||||||
|
if (!fexist(study))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
const TString old_study(__ptprf);
|
||||||
|
const TString old_firm(_prefix);
|
||||||
|
|
||||||
|
strcpy(__ptprf, study);
|
||||||
|
const word len = strlen(__ptprf);
|
||||||
|
if (len > 0 && __ptprf[len-1] != '\\' && __ptprf[len-1] != '/')
|
||||||
|
{
|
||||||
|
__ptprf[len] = SLASH;
|
||||||
|
__ptprf[len+1] = '\0';
|
||||||
|
}
|
||||||
|
if (!test(ditta))
|
||||||
|
ditta = 0L;
|
||||||
|
|
||||||
|
bool ok = set_codditta(ditta, TRUE);
|
||||||
|
if (!ok)
|
||||||
|
{
|
||||||
|
strcpy(__ptprf, old_study);
|
||||||
|
set(old_firm, TRUE);
|
||||||
|
}
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
// @doc EXTERNAL
|
// @doc EXTERNAL
|
||||||
|
|
||||||
// @mfunc Ritorna la descrizione del file passato
|
// @mfunc Ritorna la descrizione del file passato
|
||||||
@ -362,7 +391,7 @@ const char* TPrefix::description(
|
|||||||
// <nl>Passando il nome di una tabella in <p cod> si ottiene la stessa cosa della
|
// <nl>Passando il nome di una tabella in <p cod> si ottiene la stessa cosa della
|
||||||
// funzione <mf TDir::Tab_des>, ma viene cercato la descrizione nel titolo della maschera.
|
// funzione <mf TDir::Tab_des>, ma viene cercato la descrizione nel titolo della maschera.
|
||||||
{
|
{
|
||||||
TString80 n(cod);
|
TFilename n(cod);
|
||||||
|
|
||||||
if (n[0] == '%')
|
if (n[0] == '%')
|
||||||
n.ltrim(1);
|
n.ltrim(1);
|
||||||
@ -402,18 +431,18 @@ const char* TPrefix::description(int cod) const
|
|||||||
const char* firm2dir(
|
const char* firm2dir(
|
||||||
long codditta) // @parm Codice ditta da convertire
|
long codditta) // @parm Codice ditta da convertire
|
||||||
{
|
{
|
||||||
TFixed_string dir(__tmp_string, 256);
|
TString16 firm;
|
||||||
switch (codditta)
|
switch (codditta)
|
||||||
{
|
{
|
||||||
case -2: // Dati generali campione
|
case -2: // Dati generali campione
|
||||||
case -1: // Dati di studio
|
case -1: // Dati di studio
|
||||||
dir = ""; break;
|
firm = ""; break;
|
||||||
case 0: // Dati comuni
|
case 0: // Dati comuni
|
||||||
dir = "com"; break;
|
firm = "com"; break;
|
||||||
default: // Dati ditta
|
default: // Dati ditta
|
||||||
dir.format("%05lda", codditta); break;
|
firm.format("%05lda", codditta); break;
|
||||||
}
|
}
|
||||||
dir.insert(__ptprf, 0);
|
_makepath(__tmp_string, NULL, __ptprf, firm, NULL);
|
||||||
return __tmp_string;
|
return __tmp_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +45,6 @@ protected:
|
|||||||
// @cmember Verifica l'effettiva esistenza della directory <p s> sotto
|
// @cmember Verifica l'effettiva esistenza della directory <p s> sotto
|
||||||
// la directory dati
|
// la directory dati
|
||||||
bool test(const char* s) const ;
|
bool test(const char* s) const ;
|
||||||
// @cmember Copia fisicamente la stringa <p _prefix> nel file "prefix.txt"
|
|
||||||
void put();
|
|
||||||
|
|
||||||
// @access Public Member
|
// @access Public Member
|
||||||
public:
|
public:
|
||||||
@ -60,6 +58,10 @@ public:
|
|||||||
long get_codditta() const ;
|
long get_codditta() const ;
|
||||||
// @cmember Setta il codice della ditta corrente
|
// @cmember Setta il codice della ditta corrente
|
||||||
bool set_codditta(long codditta, bool force = FALSE);
|
bool set_codditta(long codditta, bool force = FALSE);
|
||||||
|
// @cmember Ritorna lo studio corrente
|
||||||
|
const char* get_studio() const;
|
||||||
|
// @cmember Setta lo studio corrente
|
||||||
|
bool set_studio(const char* study, long firm = 0);
|
||||||
// @cmember Ritorna il contenuto della variabile <p _prefix>
|
// @cmember Ritorna il contenuto della variabile <p _prefix>
|
||||||
const char* name() const
|
const char* name() const
|
||||||
{ return _prefix;}
|
{ return _prefix;}
|
||||||
|
@ -218,7 +218,7 @@ TTimerind::~TTimerind()
|
|||||||
|
|
||||||
static TIndwin* __indwin__p = NULL;
|
static TIndwin* __indwin__p = NULL;
|
||||||
|
|
||||||
void progind_create(long m, char* t, bool b, bool c, int n)
|
void progind_create(long m, const char* t, bool b, bool c, int n)
|
||||||
{
|
{
|
||||||
CHECK(__indwin__p == NULL, "Cannot have more than one progress indicator");
|
CHECK(__indwin__p == NULL, "Cannot have more than one progress indicator");
|
||||||
__indwin__p = new TProgind(m,t,b,c,n);
|
__indwin__p = new TProgind(m,t,b,c,n);
|
||||||
@ -250,7 +250,7 @@ void progind_destroy()
|
|||||||
__indwin__p = NULL;
|
__indwin__p = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void timerind_create(long l, char* title, bool bar, bool cancel,
|
void timerind_create(long l, const char* title, bool bar, bool cancel,
|
||||||
int divisions, int interval)
|
int divisions, int interval)
|
||||||
{
|
{
|
||||||
CHECK(__indwin__p == NULL, "Cannot have more than one progress indicator");
|
CHECK(__indwin__p == NULL, "Cannot have more than one progress indicator");
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#ifdef __cplusplus
|
|
||||||
#ifndef __PROGIND_H
|
#ifndef __PROGIND_H
|
||||||
#define __PROGIND_H
|
#define __PROGIND_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
|
||||||
#ifndef __STRINGS_H
|
#ifndef __STRINGS_H
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
@ -143,20 +144,19 @@ public:
|
|||||||
virtual ~TTimerind();
|
virtual ~TTimerind();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
// Non commentate perche' destinate a sparire
|
// Non commentate perche' destinate a sparire
|
||||||
void progind_create(long, char*, bool, bool, int);
|
void progind_create(long, const char*, bool, bool, int);
|
||||||
void progind_set_status(long);
|
void progind_set_status(long);
|
||||||
void progind_cancel();
|
void progind_cancel();
|
||||||
bool progind_iscancelled();
|
bool progind_iscancelled();
|
||||||
bool progind_isfinished();
|
bool progind_isfinished();
|
||||||
void progind_destroy();
|
void progind_destroy();
|
||||||
void timerind_create(long, char*, bool, bool, int, int);
|
void timerind_create(long, const char*, bool, bool, int, int);
|
||||||
void timerind_cancel();
|
void timerind_cancel();
|
||||||
bool timerind_iscancelled();
|
bool timerind_iscancelled();
|
||||||
bool timerind_isfinished();
|
bool timerind_isfinished();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user