[INTERPRETER]
* BUG: Fix symbol table search that could sometimes fail with non ASCII characters. [ARCHIVER] * NEW: Add '.public' directory to executables. * NEW: A new '-i' option not to display warnings when an information file include fails. git-svn-id: svn://localhost/gambas/trunk@5230 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
0bc1869019
commit
8701a2f020
@ -63,7 +63,7 @@ static struct option Long_options[] =
|
||||
static char **path_list;
|
||||
static int path_current;
|
||||
|
||||
static const char *allowed_hidden_files[] = { ".gambas", ".info", ".list", ".lang", ".action", ".connection", ".component", NULL };
|
||||
static const char *allowed_hidden_files[] = { ".gambas", ".info", ".list", ".lang", ".action", ".connection", ".component", ".public", NULL };
|
||||
//static const char *remove_ext_root[] = { "module", "class", "form", "gambas", NULL };
|
||||
static const char *remove_ext_lang[] = { "pot", "po", NULL };
|
||||
|
||||
|
@ -290,6 +290,7 @@ void ARCH_exit(void)
|
||||
|
||||
for (i = 0; i < TABLE_count(arch_table); i++)
|
||||
write_short(arch_table->sort[i]);
|
||||
|
||||
/* Close file */
|
||||
|
||||
fclose(arch_file);
|
||||
|
@ -76,6 +76,7 @@ static bool _format = FALSE;
|
||||
static bool _nopreload = FALSE;
|
||||
static bool _root_set = FALSE;
|
||||
static bool _analyze = FALSE;
|
||||
static bool _no_include_warning = FALSE;
|
||||
|
||||
static char **_components = NULL;
|
||||
|
||||
@ -497,7 +498,7 @@ __RETURN:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
static void preload(char **argv, char *lib)
|
||||
{
|
||||
#if DO_PRELOADING
|
||||
@ -511,6 +512,7 @@ static void preload(char **argv, char *lib)
|
||||
execvp(argv[0], argv);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool find_native_component(const char *name)
|
||||
{
|
||||
@ -540,6 +542,7 @@ static void analyze(const char *comp, bool include)
|
||||
|
||||
if (!native && !gambas)
|
||||
{
|
||||
if (!include || !_no_include_warning)
|
||||
warning("component %s not found", name);
|
||||
STR_free(name);
|
||||
return;
|
||||
@ -714,10 +717,15 @@ int main(int argc, char **argv)
|
||||
case 'v':
|
||||
_verbose = TRUE;
|
||||
break;
|
||||
|
||||
#if DO_PRELOADING
|
||||
case 'p':
|
||||
_nopreload = TRUE;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case 'i':
|
||||
_no_include_warning = TRUE;
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
strncpy(_root, optarg, PATH_MAX);
|
||||
@ -742,14 +750,20 @@ int main(int argc, char **argv)
|
||||
"Options:"
|
||||
#if HAVE_GETOPT_LONG
|
||||
"\n"
|
||||
#if DO_PRELOADING
|
||||
" -p disable preloading\n"
|
||||
#endif
|
||||
" -i ignore include warnings\n"
|
||||
" -r --root <directory> gives the gambas installation directory\n"
|
||||
" -V --version display version\n"
|
||||
" -L --license display license\n"
|
||||
" -h --help display this help\n"
|
||||
#else
|
||||
" (no long options on this system)\n"
|
||||
#if DO_PRELOADING
|
||||
" -p disable preloading\n"
|
||||
#endif
|
||||
" -i ignore include warnings\n"
|
||||
" -r <directory> gives the gambas installation directory\n"
|
||||
" -V display version\n"
|
||||
" -L display license\n"
|
||||
@ -770,6 +784,10 @@ int main(int argc, char **argv)
|
||||
fprintf(stderr, "LD_PRELOAD=%s\n", getenv("LD_PRELOAD"));
|
||||
|
||||
analyze(argv[optind], FALSE);
|
||||
/*if (strcmp(argv[optind], "gb.qt4") == 0)
|
||||
analyze("gb.gui", FALSE);
|
||||
else if (strcmp(argv[optind], "gb.qt4.opengl") == 0)
|
||||
analyze("gb.gui.opengl", FALSE);*/
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -779,10 +797,10 @@ int main(int argc, char **argv)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
preload(argv,
|
||||
/*preload(argv,
|
||||
"libqt-mt.so.3 "
|
||||
"libkdecore.so.4 "
|
||||
);
|
||||
);*/
|
||||
|
||||
if (_verbose)
|
||||
{
|
||||
@ -808,10 +826,10 @@ int main(int argc, char **argv)
|
||||
for (ind = optind; ind < argc; ind++)
|
||||
{
|
||||
name = argv[ind];
|
||||
if (strncmp(name, "gb.qt.kde", 9) == 0)
|
||||
/*if (strncmp(name, "gb.qt.kde", 9) == 0)
|
||||
preload(argv, "libqt-mt.so.3 libkdecore.so.4");
|
||||
else if (strcmp(name, "gb.qt") == 0 || strncmp(name, "gb.qt.", 6) == 0)
|
||||
preload(argv, "libqt-mt.so.3");
|
||||
preload(argv, "libqt-mt.so.3");*/
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ static bool search(void *symbol, ushort *sort, int n_symbol, size_t size, int fl
|
||||
int pos, deb, fin;
|
||||
SYMBOL *sym;
|
||||
int l;
|
||||
char result;
|
||||
int result; // must be an integer (or a short) because uchar - uchar may not fit in a char!
|
||||
const uchar *s1;
|
||||
const uchar *s2;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user