added code to accept a number as a xli value.
renamed pair->name to pair->alias and related functions. enhanced xli reader to support string escaping
This commit is contained in:
@ -130,7 +130,7 @@ static void print_usage (QSE_FILE* out, int argc, qse_char_t* argv[])
|
||||
qse_fprintf (out, QSE_T(" --version show version\n"));
|
||||
qse_fprintf (out, QSE_T(" -i file specify an input file\n"));
|
||||
qse_fprintf (out, QSE_T(" -o file specify an output file\n"));
|
||||
qse_fprintf (out, QSE_T(" -n allow a key name\n"));
|
||||
qse_fprintf (out, QSE_T(" -a allow a key alias\n"));
|
||||
qse_fprintf (out, QSE_T(" -f keep file inclusion info\n"));
|
||||
qse_fprintf (out, QSE_T(" -t keep comment text\n"));
|
||||
qse_fprintf (out, QSE_T(" -m number specify the maximum amount of memory to use in bytes\n"));
|
||||
@ -159,9 +159,9 @@ static int handle_args (int argc, qse_char_t* argv[])
|
||||
static qse_opt_t opt =
|
||||
{
|
||||
#if defined(QSE_BUILD_DEBUG)
|
||||
QSE_T("hi:o:nftm:X:"),
|
||||
QSE_T("hi:o:aftm:X:"),
|
||||
#else
|
||||
QSE_T("hi:o:nftm:"),
|
||||
QSE_T("hi:o:aftm:"),
|
||||
#endif
|
||||
lng
|
||||
};
|
||||
@ -203,8 +203,8 @@ static int handle_args (int argc, qse_char_t* argv[])
|
||||
g_output_file = opt.arg;
|
||||
break;
|
||||
|
||||
case QSE_T('n'):
|
||||
g_trait |= QSE_XLI_KEYNAME;
|
||||
case QSE_T('a'):
|
||||
g_trait |= QSE_XLI_KEYALIAS;
|
||||
break;
|
||||
|
||||
case QSE_T('f'):
|
||||
@ -384,7 +384,7 @@ static int xli_main (int argc, qse_char_t* argv[])
|
||||
if (g_lookup_key)
|
||||
{
|
||||
qse_xli_pair_t* pair;
|
||||
pair = qse_xli_findpairbyname (xli, QSE_NULL, g_lookup_key);
|
||||
pair = qse_xli_findpairbyalias (xli, QSE_NULL, g_lookup_key);
|
||||
if (pair == QSE_NULL)
|
||||
{
|
||||
qse_fprintf (QSE_STDERR,
|
||||
|
Reference in New Issue
Block a user