From 4bc915d526f86fe6757315e99679e3a6cd17ae2b Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Mon, 12 Apr 2010 21:02:55 -0700 Subject: [PATCH] C-ENUM: -> ENUM: --- basis/alien/data/data-docs.factor | 2 +- basis/alien/syntax/syntax-docs.factor | 6 +-- basis/alien/syntax/syntax.factor | 2 +- basis/cairo/ffi/ffi.factor | 36 ++++++++-------- basis/cocoa/application/application.factor | 2 +- basis/compiler/constants/constants.factor | 4 +- basis/core-graphics/core-graphics.factor | 2 +- basis/pango/fonts/fonts.factor | 2 +- basis/unicode/breaks/breaks.factor | 4 +- basis/vm/vm.factor | 2 +- basis/windows/advapi32/advapi32.factor | 10 ++--- basis/windows/ddk/hid/hid.factor | 4 +- basis/windows/ddk/setupapi/setupapi.factor | 2 +- basis/windows/ddk/winusb/winusb.factor | 2 +- .../directx/d3d11shader/d3d11shader.factor | 2 +- .../directx/d3d9types/d3d9types.factor | 2 +- basis/windows/directx/d3dcsx/d3dcsx.factor | 2 +- .../directx/d3dx9shader/d3dx9shader.factor | 8 ++-- basis/windows/directx/dcommon/dcommon.factor | 2 +- basis/windows/directx/dwrite/dwrite.factor | 42 +++++++++---------- .../windows/directx/dxgitype/dxgitype.factor | 6 +-- basis/windows/directx/xapo/xapo.factor | 2 +- basis/windows/directx/xaudio2/xaudio2.factor | 2 +- basis/windows/kernel32/kernel32.factor | 2 +- basis/windows/usp10/usp10.factor | 2 +- basis/x11/constants/constants.factor | 2 +- extra/chipmunk/ffi/ffi.factor | 4 +- extra/cuda/ffi/ffi.factor | 34 +++++++-------- extra/freetype/freetype.factor | 4 +- extra/libusb/libusb.factor | 24 +++++------ extra/llvm/core/core.factor | 14 +++---- extra/macho/macho.factor | 6 +-- extra/tokyo/alien/tcadb/tcadb.factor | 2 +- extra/tokyo/alien/tcbdb/tcbdb.factor | 2 +- extra/tokyo/alien/tcrdb/tcrdb.factor | 2 +- extra/tokyo/alien/tctdb/tctdb.factor | 6 +-- extra/tokyo/alien/tcutil/tcutil.factor | 2 +- 37 files changed, 127 insertions(+), 127 deletions(-) diff --git a/basis/alien/data/data-docs.factor b/basis/alien/data/data-docs.factor index d36a4d5fd2..c5130001d9 100644 --- a/basis/alien/data/data-docs.factor +++ b/basis/alien/data/data-docs.factor @@ -105,7 +105,7 @@ $nl "Important guidelines for passing data in byte arrays:" { $subsections "byte-arrays-gc" } "C-style enumerated types are supported:" -{ $subsections POSTPONE: C-ENUM: } +{ $subsections POSTPONE: ENUM: } "C types can be aliased for convenience and consistency with native library documentation:" { $subsections POSTPONE: TYPEDEF: } "A utility for defining " { $link "destructors" } " for deallocating memory:" diff --git a/basis/alien/syntax/syntax-docs.factor b/basis/alien/syntax/syntax-docs.factor index b71d0bd533..b7c77dd154 100644 --- a/basis/alien/syntax/syntax-docs.factor +++ b/basis/alien/syntax/syntax-docs.factor @@ -69,14 +69,14 @@ HELP: TYPEDEF: { $description "Aliases the C type " { $snippet "old" } " under the name " { $snippet "new" } "." } { $notes "This word differs from " { $link typedef } " in that it runs at parse time, to ensure correct ordering of operations when loading source files. Words defined in source files are compiled before top-level forms are run, so if a source file defines C binding words and uses " { $link typedef } ", the type alias won't be available at compile time." } ; -HELP: C-ENUM: -{ $syntax "C-ENUM: type/f words... ;" } +HELP: ENUM: +{ $syntax "ENUM: type/f words... ;" } { $values { "type" "a name to typedef to int or f" } { "words" "a sequence of word names" } } { $description "Creates a sequence of word definitions in the current vocabulary. Each word pushes an integer according to the rules of C enums." } { $notes "This word emulates a C-style " { $snippet "enum" } " in Factor. While this feature can be used for any purpose, using integer constants is discouraged unless it is for interfacing with C libraries. Factor code should use " { $link "words.symbol" } " or " { $link "singletons" } " instead." } { $examples "Here is an example enumeration definition:" - { $code "C-ENUM: color_t red { green 3 } blue ;" } + { $code "ENUM: color_t red { green 3 } blue ;" } "It is equivalent to the following series of definitions:" { $code "CONSTANT: red 0" "CONSTANT: green 3" "CONSTANT: blue 4" } } ; diff --git a/basis/alien/syntax/syntax.factor b/basis/alien/syntax/syntax.factor index 41aed99446..b6cb4af8f6 100755 --- a/basis/alien/syntax/syntax.factor +++ b/basis/alien/syntax/syntax.factor @@ -28,7 +28,7 @@ SYNTAX: CALLBACK: SYNTAX: TYPEDEF: scan-c-type CREATE-C-TYPE dup save-location typedef ; -SYNTAX: C-ENUM: +SYNTAX: ENUM: scan dup "f" = [ drop ] [ (CREATE-C-TYPE) dup save-location int swap typedef ] if diff --git a/basis/cairo/ffi/ffi.factor b/basis/cairo/ffi/ffi.factor index fafc41af26..026fa621f8 100644 --- a/basis/cairo/ffi/ffi.factor +++ b/basis/cairo/ffi/ffi.factor @@ -46,7 +46,7 @@ TYPEDEF: void* cairo_destroy_func_t STRUCT: cairo_user_data_key_t { unused int } ; -C-ENUM: cairo_status_t +ENUM: cairo_status_t CAIRO_STATUS_SUCCESS CAIRO_STATUS_NO_MEMORY CAIRO_STATUS_INVALID_RESTORE @@ -126,7 +126,7 @@ FUNCTION: void cairo_pop_group_to_source ( cairo_t* cr ) ; ! Modify state -C-ENUM: cairo_operator_t +ENUM: cairo_operator_t CAIRO_OPERATOR_CLEAR CAIRO_OPERATOR_SOURCE @@ -163,7 +163,7 @@ cairo_set_source_surface ( cairo_t* cr, cairo_surface_t* surface, double x, doub FUNCTION: void cairo_set_tolerance ( cairo_t* cr, double tolerance ) ; -C-ENUM: cairo_antialias_t +ENUM: cairo_antialias_t CAIRO_ANTIALIAS_DEFAULT CAIRO_ANTIALIAS_NONE CAIRO_ANTIALIAS_GRAY @@ -172,7 +172,7 @@ C-ENUM: cairo_antialias_t FUNCTION: void cairo_set_antialias ( cairo_t* cr, cairo_antialias_t antialias ) ; -C-ENUM: cairo_fill_rule_t +ENUM: cairo_fill_rule_t CAIRO_FILL_RULE_WINDING CAIRO_FILL_RULE_EVEN_ODD ; @@ -182,7 +182,7 @@ cairo_set_fill_rule ( cairo_t* cr, cairo_fill_rule_t fill_rule ) ; FUNCTION: void cairo_set_line_width ( cairo_t* cr, double width ) ; -C-ENUM: cairo_line_cap_t +ENUM: cairo_line_cap_t CAIRO_LINE_CAP_BUTT CAIRO_LINE_CAP_ROUND CAIRO_LINE_CAP_SQUARE ; @@ -190,7 +190,7 @@ C-ENUM: cairo_line_cap_t FUNCTION: void cairo_set_line_cap ( cairo_t* cr, cairo_line_cap_t line_cap ) ; -C-ENUM: cairo_line_join_t +ENUM: cairo_line_join_t CAIRO_LINE_JOIN_MITER CAIRO_LINE_JOIN_ROUND CAIRO_LINE_JOIN_BEVEL ; @@ -375,30 +375,30 @@ STRUCT: cairo_font_extents_t { max_x_advance double } { max_y_advance double } ; -C-ENUM: cairo_font_slant_t +ENUM: cairo_font_slant_t CAIRO_FONT_SLANT_NORMAL CAIRO_FONT_SLANT_ITALIC CAIRO_FONT_SLANT_OBLIQUE ; -C-ENUM: cairo_font_weight_t +ENUM: cairo_font_weight_t CAIRO_FONT_WEIGHT_NORMAL CAIRO_FONT_WEIGHT_BOLD ; -C-ENUM: cairo_subpixel_order_t +ENUM: cairo_subpixel_order_t CAIRO_SUBPIXEL_ORDER_DEFAULT CAIRO_SUBPIXEL_ORDER_RGB CAIRO_SUBPIXEL_ORDER_BGR CAIRO_SUBPIXEL_ORDER_VRGB CAIRO_SUBPIXEL_ORDER_VBGR ; -C-ENUM: cairo_hint_style_t +ENUM: cairo_hint_style_t CAIRO_HINT_STYLE_DEFAULT CAIRO_HINT_STYLE_NONE CAIRO_HINT_STYLE_SLIGHT CAIRO_HINT_STYLE_MEDIUM CAIRO_HINT_STYLE_FULL ; -C-ENUM: cairo_hint_metrics_t +ENUM: cairo_hint_metrics_t CAIRO_HINT_METRICS_DEFAULT CAIRO_HINT_METRICS_OFF CAIRO_HINT_METRICS_ON ; @@ -518,7 +518,7 @@ cairo_font_face_get_reference_count ( cairo_font_face_t* font_face ) ; FUNCTION: cairo_status_t cairo_font_face_status ( cairo_font_face_t* font_face ) ; -C-ENUM: cairo_font_type_t +ENUM: cairo_font_type_t CAIRO_FONT_TYPE_TOY CAIRO_FONT_TYPE_FT CAIRO_FONT_TYPE_WIN32 @@ -630,7 +630,7 @@ cairo_get_target ( cairo_t* cr ) ; FUNCTION: cairo_surface_t* cairo_get_group_target ( cairo_t* cr ) ; -C-ENUM: cairo_path_data_type_t +ENUM: cairo_path_data_type_t CAIRO_PATH_MOVE_TO CAIRO_PATH_LINE_TO CAIRO_PATH_CURVE_TO @@ -696,7 +696,7 @@ cairo_surface_get_reference_count ( cairo_surface_t* surface ) ; FUNCTION: cairo_status_t cairo_surface_status ( cairo_surface_t* surface ) ; -C-ENUM: cairo_surface_type_t +ENUM: cairo_surface_type_t CAIRO_SURFACE_TYPE_IMAGE CAIRO_SURFACE_TYPE_PDF CAIRO_SURFACE_TYPE_PS @@ -759,7 +759,7 @@ cairo_surface_show_page ( cairo_surface_t* surface ) ; ! Image-surface functions -C-ENUM: cairo_format_t +ENUM: cairo_format_t CAIRO_FORMAT_ARGB32 CAIRO_FORMAT_RGB24 CAIRO_FORMAT_A8 @@ -831,7 +831,7 @@ cairo_pattern_get_user_data ( cairo_pattern_t* pattern, cairo_user_data_key_t* k FUNCTION: cairo_status_t cairo_pattern_set_user_data ( cairo_pattern_t* pattern, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy ) ; -C-ENUM: cairo_pattern_type_t +ENUM: cairo_pattern_type_t CAIRO_PATTERN_TYPE_SOLID CAIRO_PATTERN_TYPE_SURFACE CAIRO_PATTERN_TYPE_LINEAR @@ -852,7 +852,7 @@ cairo_pattern_set_matrix ( cairo_pattern_t* pattern, cairo_matrix_t* matrix ) ; FUNCTION: void cairo_pattern_get_matrix ( cairo_pattern_t* pattern, cairo_matrix_t* matrix ) ; -C-ENUM: cairo_extend_t +ENUM: cairo_extend_t CAIRO_EXTEND_NONE CAIRO_EXTEND_REPEAT CAIRO_EXTEND_REFLECT @@ -864,7 +864,7 @@ cairo_pattern_set_extend ( cairo_pattern_t* pattern, cairo_extend_t extend ) ; FUNCTION: cairo_extend_t cairo_pattern_get_extend ( cairo_pattern_t* pattern ) ; -C-ENUM: cairo_filter_t +ENUM: cairo_filter_t CAIRO_FILTER_FAST CAIRO_FILTER_GOOD CAIRO_FILTER_BEST diff --git a/basis/cocoa/application/application.factor b/basis/cocoa/application/application.factor index 6768e1471d..fc5d2baccc 100644 --- a/basis/cocoa/application/application.factor +++ b/basis/cocoa/application/application.factor @@ -8,7 +8,7 @@ IN: cocoa.application : ( str -- alien ) -> autorelease ; -C-ENUM: f +ENUM: f NSApplicationDelegateReplySuccess NSApplicationDelegateReplyCancel NSApplicationDelegateReplyFailure ; diff --git a/basis/compiler/constants/constants.factor b/basis/compiler/constants/constants.factor index 0e2fc3041b..7d8ef4791b 100644 --- a/basis/compiler/constants/constants.factor +++ b/basis/compiler/constants/constants.factor @@ -40,7 +40,7 @@ CONSTANT: deck-bits 18 : segment-end-offset ( -- n ) 2 bootstrap-cells ; inline ! Relocation classes -C-ENUM: f +ENUM: f rc-absolute-cell rc-absolute rc-relative @@ -55,7 +55,7 @@ C-ENUM: f rc-absolute-1 ; ! Relocation types -C-ENUM: f +ENUM: f rt-dlsym rt-entry-point rt-entry-point-pic diff --git a/basis/core-graphics/core-graphics.factor b/basis/core-graphics/core-graphics.factor index 92925f5d64..1e797a3329 100644 --- a/basis/core-graphics/core-graphics.factor +++ b/basis/core-graphics/core-graphics.factor @@ -6,7 +6,7 @@ images images.memory core-graphics.types core-foundation.utilities opengl.gl literals ; IN: core-graphics -C-ENUM: CGImageAlphaInfo +ENUM: CGImageAlphaInfo kCGImageAlphaNone kCGImageAlphaPremultipliedLast kCGImageAlphaPremultipliedFirst diff --git a/basis/pango/fonts/fonts.factor b/basis/pango/fonts/fonts.factor index 7ea4e0a0c2..979e40947c 100644 --- a/basis/pango/fonts/fonts.factor +++ b/basis/pango/fonts/fonts.factor @@ -8,7 +8,7 @@ IN: pango.fonts LIBRARY: pango -C-ENUM: PangoStyle +ENUM: PangoStyle PANGO_STYLE_NORMAL PANGO_STYLE_OBLIQUE PANGO_STYLE_ITALIC ; diff --git a/basis/unicode/breaks/breaks.factor b/basis/unicode/breaks/breaks.factor index 2ab8b27cc7..f330cdb85c 100644 --- a/basis/unicode/breaks/breaks.factor +++ b/basis/unicode/breaks/breaks.factor @@ -12,7 +12,7 @@ IN: unicode.breaks