Fixed win32/unix line end mixup

This commit is contained in:
Yevgen Muntyan 2010-12-21 03:35:42 -08:00
parent f3bba56b23
commit ad98d27640
5 changed files with 9 additions and 11 deletions

View File

@ -46,11 +46,6 @@ enums['MooLineEndType'] = [
[ 'MOO_LE_MIX', None, None, 'mix' ],
]
if win32:
enums['MooLineEndType'].append([ 'MOO_LE_DEFAULT', 'MOO_LE_WIN32' ])
else:
enums['MooLineEndType'].append([ 'MOO_LE_DEFAULT', 'MOO_LE_UNIX' ])
flags['MooFindFlags'] = [
[ 'MOO_FIND_REGEX', '1 << 0', None, 'regex' ],
[ 'MOO_FIND_CASELESS', '1 << 1', None, 'caseless' ],

View File

@ -1,4 +1,4 @@
#include "../../../moo/mooedit/mooedit-enums.h"
#include "mooedit-enums.h"
/**
* enum:MooActionCheckType
@ -138,7 +138,6 @@ moo_line_end_type_get_type (void)
{ MOO_LE_WIN32, (char*) "MOO_LE_WIN32", (char*) "win32" },
{ MOO_LE_MAC, (char*) "MOO_LE_MAC", (char*) "mac" },
{ MOO_LE_MIX, (char*) "MOO_LE_MIX", (char*) "mix" },
{ MOO_LE_DEFAULT, (char*) "MOO_LE_DEFAULT", (char*) "MOO_LE_DEFAULT" },
{ 0, NULL, NULL }
};
etype = g_enum_register_static ("MooLineEndType", values);

View File

@ -67,8 +67,7 @@ typedef enum {
MOO_LE_UNIX,
MOO_LE_WIN32,
MOO_LE_MAC,
MOO_LE_MIX,
MOO_LE_DEFAULT = MOO_LE_UNIX
MOO_LE_MIX
} MooLineEndType;
GType moo_line_end_type_get_type (void) G_GNUC_CONST;

View File

@ -83,6 +83,12 @@ void moo_edit_set_encoding (MooEdit *edit,
char *moo_edit_get_lang_id (MooEdit *edit);
#ifdef __WIN32__
#define MOO_LE_DEFAULT MOO_LE_WIN32
#else
#define MOO_LE_DEFAULT MOO_LE_UNIX
#endif
MooLineEndType moo_edit_get_line_end_type (MooEdit *edit);
void moo_edit_set_line_end_type (MooEdit *edit,
MooLineEndType le);

View File

@ -33,7 +33,6 @@ vrs = {}
for a in sys.argv[5:]:
key, val = a.split('=')
vrs[key] = eval(val)
print '%s=%s' % (key, vrs[key])
execfile(input_py, vrs)
def parse_name(Name):
@ -133,7 +132,7 @@ def print_flags_c(name, vals, out):
out = open(output_c_tmp, 'w')
print >> out, '#include "%s"' % (output_h,)
print >> out, '#include "%s"' % (os.path.basename(output_h),)
print >> out, ''
for name in vrs.get('enums', {}):