Enlightenment CVS committal
Author : mej
Project : eterm
Module : libast
Dir : eterm/libast/src
Modified Files:
options.c
Log Message:
Tue Oct 26 13:58:45 2004 Michael Jennings (mej)
Pre-parsing is kinda unique, and most applications probably won't need
it. So now pre-parsing of options must be specifically requested.
----------------------------------------------------------------------
===================================================================
RCS file: /cvsroot/enlightenment/eterm/libast/src/options.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- options.c 26 Oct 2004 16:06:50 -0000 1.17
+++ options.c 26 Oct 2004 18:01:53 -0000 1.18
@@ -29,11 +29,11 @@
* option parser.
*
* @author Michael Jennings <[EMAIL PROTECTED]>
- * $Revision: 1.17 $
- * $Date: 2004/10/26 16:06:50 $
+ * $Revision: 1.18 $
+ * $Date: 2004/10/26 18:01:53 $
*/
-static const char __attribute__((unused)) cvs_ident[] = "$Id: options.c,v 1.17
2004/10/26 16:06:50 mej Exp $";
+static const char __attribute__((unused)) cvs_ident[] = "$Id: options.c,v 1.18
2004/10/26 18:01:53 mej Exp $";
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -61,8 +61,8 @@
/** Next loop. Proceed to the next parsing stage (letter or word). */
#define NEXT_LOOP() D_OPTIONS(("NEXT_LOOP()\n")); if (islong || val_ptr)
{NEXT_ARG();} else {NEXT_LETTER();} NOP
/** Option parse test. Returns true IFF the option should be parsed on this pass. */
-#define SHOULD_PARSE(j) ((SPIFOPT_FLAGS_IS_SET(SPIFOPT_SETTING_POSTPARSE) &&
!SPIFOPT_OPT_IS_PREPARSE(j)) \
- || (!SPIFOPT_FLAGS_IS_SET(SPIFOPT_SETTING_POSTPARSE) &&
SPIFOPT_OPT_IS_PREPARSE(j)))
+#define SHOULD_PARSE(j) ((SPIFOPT_FLAGS_IS_SET(SPIFOPT_SETTING_PREPARSE) &&
SPIFOPT_OPT_IS_PREPARSE(j)) \
+ || (!SPIFOPT_FLAGS_IS_SET(SPIFOPT_SETTING_PREPARSE) &&
!SPIFOPT_OPT_IS_PREPARSE(j)))
/[EMAIL PROTECTED]/
/**
@@ -560,7 +560,7 @@
NEXT_LETTER();
}
}
- if (SPIFOPT_FLAGS_IS_SET(SPIFOPT_SETTING_POSTPARSE)) {
+ if (!SPIFOPT_FLAGS_IS_SET(SPIFOPT_SETTING_PREPARSE)) {
argv[i] = NULL;
}
@@ -663,13 +663,15 @@
((spifopt_abstract_handler_t) SPIFOPT_OPT_VALUE(j))(val_ptr);
}
}
- if (SPIFOPT_FLAGS_IS_SET(SPIFOPT_SETTING_POSTPARSE)) {
+ if (!SPIFOPT_FLAGS_IS_SET(SPIFOPT_SETTING_PREPARSE)) {
argv[i] = NULL;
}
NEXT_LOOP();
}
- if (SPIFOPT_FLAGS_IS_SET(SPIFOPT_SETTING_POSTPARSE)) {
+ if (SPIFOPT_FLAGS_IS_SET(SPIFOPT_SETTING_PREPARSE)) {
+ SPIFOPT_FLAGS_CLEAR(SPIFOPT_SETTING_PREPARSE);
+ } else {
for (i = 1, j = 1; i < argc; i++) {
if (argv[i]) {
argv[j] = argv[i];
@@ -679,8 +681,6 @@
if (j > 1) {
argv[j] = NULL;
}
- } else {
- SPIFOPT_FLAGS_SET(SPIFOPT_SETTING_POSTPARSE);
}
}
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs