strings.h Aggiunta macro EMPTY_STRING corrispondente a una
TToken_string vuota, molto indispensabile in funzioni che devono ritornare TString& a volte introvabili come ad esempio i TConfig o i TAssoc_array strings.cpp Implementazione di EMPTY_STRING text.h Aggiornato #ifdef sull'inclusione di <stdio.h> text.cpp Cambiata indentazione parentesi utility.* Tolte righe vuote git-svn-id: svn://10.65.10.50/trunk@6045 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
330f90f7ea
commit
1df45b8904
@ -22,6 +22,12 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const TToken_string& empty_string()
|
||||||
|
{
|
||||||
|
static TToken_string _ts(1);
|
||||||
|
return _ts;
|
||||||
|
}
|
||||||
|
|
||||||
// Most descriptions will fit in fifty characters
|
// Most descriptions will fit in fifty characters
|
||||||
const int DEFAULT_SIZE = 50;
|
const int DEFAULT_SIZE = 50;
|
||||||
|
|
||||||
|
@ -598,6 +598,9 @@ public:
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const TToken_string& empty_string();
|
||||||
|
#define EMPTY_STRING empty_string()
|
||||||
|
|
||||||
#define FOR_EACH_ARRAY_ROW(__arr, __r, __riga) \
|
#define FOR_EACH_ARRAY_ROW(__arr, __r, __riga) \
|
||||||
TToken_string* __riga; \
|
TToken_string* __riga; \
|
||||||
for (int __r = __arr.first(); \
|
for (int __r = __arr.first(); \
|
||||||
|
@ -686,7 +686,7 @@ bool TTextfile::append (
|
|||||||
_lines++;
|
_lines++;
|
||||||
_dirty = TRUE;
|
_dirty = TRUE;
|
||||||
|
|
||||||
if ((_lines) < (_page_start + _page_size))
|
if (_lines < (_page_start + _page_size))
|
||||||
{
|
{
|
||||||
if (_interactive)
|
if (_interactive)
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef __TEXTFILE_H
|
#ifndef __TEXTFILE_H
|
||||||
#define __TEXTFILE_H
|
#define __TEXTFILE_H
|
||||||
|
|
||||||
#ifndef __STDIO_H
|
#ifndef _INC_STDIO
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -463,7 +463,6 @@ const char * decode(
|
|||||||
return __tmp_string;
|
return __tmp_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
os_type get_os_type()
|
os_type get_os_type()
|
||||||
{
|
{
|
||||||
#if XVT_OS == XVT_OS_WIN
|
#if XVT_OS == XVT_OS_WIN
|
||||||
|
@ -18,8 +18,9 @@ os_type get_os_type();
|
|||||||
|
|
||||||
bool make_dir(const char* file);
|
bool make_dir(const char* file);
|
||||||
int list_files(const char* mask, TString_array& result);
|
int list_files(const char* mask, TString_array& result);
|
||||||
const char * encode(const char* data);
|
|
||||||
const char * decode(const char* data);
|
const char* encode(const char* data);
|
||||||
|
const char* decode(const char* data);
|
||||||
|
|
||||||
// @doc EXTERNAL
|
// @doc EXTERNAL
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user