usr/0000755000000000000000000000000010645354143010372 5ustar rootrootusr/src/0000755000000000000000000000000010645355265011167 5ustar rootrootusr/src/sdlBasic/0000755000000000000000000000000010645355265012713 5ustar rootrootusr/src/sdlBasic/src/0000777000000000000000000000000010645354626013506 5ustar rootrootusr/src/sdlBasic/src/compile.sh0000777000076500007660000000027210463130277013723 0ustar cd sdlBasic ./compile.sh cd .. cd sdlBrt make os=linux cd .. cd sdlBrt/SDLengine make os=linux cd ../.. cd sdlBrt/BASengine make os=linux cd ../.. cd sdlBrt/unzip make os=linux cd ../.. usr/src/sdlBasic/src/clean.bat0000777000076500007660000000010610463130277013505 0ustar cd sdlbasic call clean.bat cd .. cd sdlBrt call clean.bat cd .. usr/src/sdlBasic/src/clean.sh0000777000076500007660000000032010463130277013347 0ustar cd sdlBasic ./clean.sh cd .. cd sdlBrt make os=linux clean cd .. cd sdlBrt/SDLengine make os=linux clean cd ../.. cd sdlBrt/BASengine make os=linux clean cd ../.. cd sdlBrt/unzip make os=linux clean cd ../.. usr/src/sdlBasic/src/sdlBrt/0000777000000000000000000000000010645354751014737 5ustar rootrootusr/src/sdlBasic/src/sdlBrt/array.h0000777000076500007660000000313710463130346014460 0ustar /* Name: array.h Purpose: array structures for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ struct ArrayCell { char *key; /* key */ Variant data; /* data stored in cell */ }; struct Array { int indexes; /* count of indexes */ int elements; /* total number of elements */ int lower[NINDEX]; /* lower range of index */ int upper[NINDEX]; /* upper range of index */ int offset[NINDEX]; /* offset per index */ int isDynamic; /* if true, it's a dynamic array */ union { Variant *item; /* variant static data array */ ArrayCell *cell; /* dynamic data array */ } data; }; Array *createStaticArray( Symbol *s ); Array *createDynamicArray( Symbol *s ); Symbol *createArraySymbol( char *name, int args ); Array *getArray( Symbol *s ); int getStaticIndex( Array *array, Symbol *s ); char *buildKey( Array *array, Symbol *s ); int findKey( Array *array, Symbol *s, char *key ); void getDynamicValue( Array *array, Symbol *s ); int getDynamicKey( Array *array, int index ); void resizeDynamicArray( Array *array ); void insertDynamicCell( Array *array, int pos ); void setDynamicValue( Array *array, Symbol *s ); void getArrayElement( Symbol *s ); void setArrayElement( Symbol *s ); void pushArray( Symbol *s ); void eraseArrayElement( Symbol *s ); void eraseArray( Symbol *s ); void freeArray( Array *array ); int getArrayIndexes( void ); int getArrayBound( int index, int upper ); usr/src/sdlBasic/src/sdlBrt/y_tab.c0000777000076500007660000050532210617632136014443 0ustar /* A Bison parser, made by GNU Bison 1.875. */ /* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* Written by Richard Stallman by simplifying the original so called ``semantic'' parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Using locations. */ #define YYLSP_NEEDED 0 /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { Integer = 258, Hex = 259, Float = 260, String = 261, FunctionName = 262, SubName = 263, ForwardSubName = 264, ForwardFunctionName = 265, BuiltinName = 266, ConstantName = 267, VariableName = 268, ArrayName = 269, TypeName = 270, ClassName = 271, MethodName = 272, Undefined = 273, And = 274, Append = 275, As = 276, Call = 277, Case = 278, Class = 279, Close = 280, Common = 281, Const = 282, Continue = 283, Declare = 284, Default = 285, Delete = 286, Dim = 287, Do = 288, Each = 289, Else = 290, ElseIf = 291, End = 292, EndX = 293, Erase = 294, Error = 295, Exit = 296, Explicit = 297, For = 298, Function = 299, Get = 300, GetRef = 301, GoTo = 302, If = 303, In = 304, IncludeFile = 305, ZipIncludeFile = 306, Input = 307, Inv = 308, Is = 309, Let = 310, Line = 311, Loop = 312, Mod = 313, New = 314, Next = 315, NoConsole = 316, Not = 317, Or = 318, Open = 319, Option = 320, Output = 321, Preserve = 322, Print = 323, QBasic = 324, ReDim = 325, Return = 326, Select = 327, Set = 328, Shared = 329, Shl = 330, Shr = 331, Static = 332, Step = 333, Sub = 334, Then = 335, To = 336, Until = 337, Wend = 338, While = 339, With = 340, Xor = 341, Ge = 342, Le = 343, Ne = 344, IncrSelf = 345, UMinus = 346, Gt = 347, Lt = 348, Eq = 349 }; #endif #define Integer 258 #define Hex 259 #define Float 260 #define String 261 #define FunctionName 262 #define SubName 263 #define ForwardSubName 264 #define ForwardFunctionName 265 #define BuiltinName 266 #define ConstantName 267 #define VariableName 268 #define ArrayName 269 #define TypeName 270 #define ClassName 271 #define MethodName 272 #define Undefined 273 #define And 274 #define Append 275 #define As 276 #define Call 277 #define Case 278 #define Class 279 #define Close 280 #define Common 281 #define Const 282 #define Continue 283 #define Declare 284 #define Default 285 #define Delete 286 #define Dim 287 #define Do 288 #define Each 289 #define Else 290 #define ElseIf 291 #define End 292 #define EndX 293 #define Erase 294 #define Error 295 #define Exit 296 #define Explicit 297 #define For 298 #define Function 299 #define Get 300 #define GetRef 301 #define GoTo 302 #define If 303 #define In 304 #define IncludeFile 305 #define ZipIncludeFile 306 #define Input 307 #define Inv 308 #define Is 309 #define Let 310 #define Line 311 #define Loop 312 #define Mod 313 #define New 314 #define Next 315 #define NoConsole 316 #define Not 317 #define Or 318 #define Open 319 #define Option 320 #define Output 321 #define Preserve 322 #define Print 323 #define QBasic 324 #define ReDim 325 #define Return 326 #define Select 327 #define Set 328 #define Shared 329 #define Shl 330 #define Shr 331 #define Static 332 #define Step 333 #define Sub 334 #define Then 335 #define To 336 #define Until 337 #define Wend 338 #define While 339 #define With 340 #define Xor 341 #define Ge 342 #define Le 343 #define Ne 344 #define IncrSelf 345 #define UMinus 346 #define Gt 347 #define Lt 348 #define Eq 349 /* Copy the first part of user declarations. */ #line 1 "sdlBrt_tab.y" /* comma: return a sequence of items to execute */ Node *comma( Node *node1, Node *node2 ) { return opNode( OpComma, node1, node2 ); } /* blockName: returns name of block */ char *blockName( int klass ) { switch(klass) { case -1: return eCopyString( "end-of-file" ); case For: return eCopyString( "End For/Next" ); case Function: return eCopyString( "End Function" ); case If: return eCopyString( "End If" ); case While: return eCopyString( "End While" ); case Do: return eCopyString( "Loop" ); case Select: return eCopyString( "End Select" ); case Sub: return eCopyString( "End Sub" ); default: return eCopyString("block"); } } /* checkBlockEnd: make sure the block ends correctly */ void checkBlockEnd(int got) { int wanted; //char *wantedName, *gotName; if (isEmptyStack(blockStack)) { switch (got) { case For: ePrintf( Syntax, "End For without For"); break; case Function: ePrintf( Syntax, "End Function without Function");break; case If: ePrintf( Syntax, "End If without If");break; case While: ePrintf( Syntax, "End While without While");break; case Do: ePrintf( Syntax, "Loop without Do");break; case Select: ePrintf( Syntax, "End Select without Select");break; case Sub: ePrintf( Syntax, "End Sub without Sub");break; } } wanted = peekStack(blockStack); if (got != wanted){ ePrintf( Syntax, "expected %s, not %s", blockName(wanted), blockName(got)); } } /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) #line 52 "sdlBrt_tab.y" typedef union YYSTYPE { int iValue; /* integer value */ Number fValue; /* float value */ char *strValue; /* string pointer */ Node *node; /* parse node */ Symbol *symbol; /* symbol */ } YYSTYPE; /* Line 191 of yacc.c. */ #line 321 "y.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif /* Copy the second part of user declarations. */ /* Line 214 of yacc.c. */ #line 333 "y.tab.c" #if ! defined (yyoverflow) || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # if YYSTACK_USE_ALLOCA # define YYSTACK_ALLOC alloca # else # ifndef YYSTACK_USE_ALLOCA # if defined (alloca) || defined (_ALLOCA_H) # define YYSTACK_ALLOC alloca # else # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else # if defined (__STDC__) || defined (__cplusplus) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif # define YYSTACK_ALLOC malloc # define YYSTACK_FREE free # endif #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ #if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ || (YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { short yyss; YYSTYPE yyvs; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ register YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (0) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if defined (__STDC__) || defined (__cplusplus) typedef signed char yysigned_char; #else typedef short yysigned_char; #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 3387 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 117 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 81 /* YYNRULES -- Number of rules. */ #define YYNRULES 318 /* YYNRULES -- Number of states. */ #define YYNSTATES 635 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 349 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const unsigned char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 112, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 97, 2, 111, 2, 103, 98, 2, 106, 107, 100, 95, 109, 96, 115, 101, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 113, 116, 2, 2, 2, 110, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 108, 102, 114, 104, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 99, 2, 105, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const unsigned short yyprhs[] = { 0, 0, 3, 6, 7, 10, 13, 16, 19, 22, 24, 27, 29, 31, 34, 35, 37, 43, 47, 52, 55, 58, 62, 63, 69, 70, 76, 77, 83, 84, 90, 93, 96, 99, 102, 103, 109, 112, 116, 119, 123, 124, 129, 132, 136, 137, 143, 144, 150, 154, 157, 162, 168, 171, 174, 177, 180, 183, 186, 187, 196, 197, 207, 213, 214, 223, 229, 234, 239, 243, 244, 250, 251, 257, 260, 261, 268, 269, 276, 279, 280, 288, 289, 297, 298, 299, 307, 308, 316, 317, 318, 326, 327, 335, 338, 341, 345, 351, 358, 364, 369, 377, 384, 388, 391, 394, 397, 401, 405, 412, 419, 424, 428, 433, 437, 440, 441, 449, 452, 453, 458, 459, 466, 467, 473, 478, 483, 484, 490, 492, 494, 496, 500, 503, 505, 507, 509, 516, 520, 521, 527, 532, 533, 538, 541, 546, 551, 556, 561, 566, 571, 574, 575, 579, 584, 587, 592, 597, 602, 607, 612, 617, 622, 627, 632, 637, 642, 647, 652, 657, 662, 667, 672, 677, 680, 683, 688, 693, 698, 704, 705, 711, 714, 715, 721, 724, 725, 731, 734, 736, 737, 742, 744, 746, 748, 751, 755, 757, 759, 761, 763, 765, 766, 771, 773, 776, 777, 782, 784, 787, 788, 793, 796, 797, 802, 804, 806, 809, 812, 817, 819, 821, 822, 825, 828, 829, 830, 836, 837, 843, 844, 850, 851, 855, 856, 860, 861, 865, 870, 871, 875, 877, 879, 888, 897, 904, 911, 917, 921, 923, 926, 929, 933, 937, 939, 940, 941, 944, 947, 952, 957, 959, 963, 967, 971, 975, 979, 983, 987, 989, 993, 995, 999, 1001, 1003, 1004, 1007, 1010, 1015, 1022, 1027, 1032, 1034, 1036, 1040, 1044, 1047, 1049, 1050, 1053, 1056, 1057, 1059, 1062, 1063, 1069, 1072, 1077, 1078, 1086, 1091, 1095, 1098, 1103, 1105, 1107, 1108, 1109, 1112, 1114, 1116, 1118, 1120, 1125, 1127, 1131, 1134, 1136, 1139 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const short yyrhs[] = { 118, 0, -1, 118, 120, -1, -1, 37, 48, -1, 37, 43, -1, 37, 44, -1, 37, 79, -1, 37, 84, -1, 57, -1, 37, 72, -1, 60, -1, 83, -1, 120, 119, -1, -1, 121, -1, 105, 156, 106, 107, 151, -1, 105, 156, 1, -1, 105, 156, 106, 1, -1, 156, 151, -1, 12, 94, -1, 7, 94, 156, -1, -1, 7, 106, 122, 165, 151, -1, -1, 8, 106, 123, 165, 151, -1, -1, 10, 106, 124, 165, 151, -1, -1, 9, 106, 125, 165, 151, -1, 7, 151, -1, 8, 151, -1, 10, 151, -1, 9, 151, -1, -1, 11, 106, 126, 165, 151, -1, 11, 151, -1, 25, 197, 151, -1, 25, 151, -1, 27, 195, 151, -1, -1, 26, 127, 181, 151, -1, 28, 151, -1, 31, 156, 151, -1, -1, 32, 26, 128, 181, 151, -1, -1, 32, 74, 129, 186, 151, -1, 32, 181, 151, -1, 38, 151, -1, 39, 14, 193, 151, -1, 39, 14, 108, 178, 151, -1, 41, 33, -1, 41, 43, -1, 41, 44, -1, 41, 79, -1, 41, 84, -1, 41, 1, -1, -1, 48, 130, 156, 80, 151, 119, 152, 151, -1, -1, 43, 34, 13, 49, 14, 193, 131, 151, 119, -1, 43, 34, 13, 49, 1, -1, -1, 43, 34, 18, 49, 14, 132, 151, 119, -1, 43, 34, 18, 49, 1, -1, 43, 34, 13, 1, -1, 43, 34, 18, 1, -1, 43, 34, 1, -1, -1, 43, 13, 133, 176, 151, -1, -1, 43, 18, 134, 176, 151, -1, 43, 1, -1, -1, 29, 44, 18, 135, 167, 151, -1, -1, 29, 79, 18, 136, 167, 151, -1, 29, 1, -1, -1, 44, 18, 137, 167, 151, 119, 151, -1, -1, 79, 18, 138, 167, 151, 119, 151, -1, -1, -1, 44, 7, 139, 188, 140, 119, 151, -1, -1, 44, 10, 141, 167, 151, 119, 151, -1, -1, -1, 79, 8, 142, 188, 143, 119, 151, -1, -1, 79, 9, 144, 167, 151, 119, 151, -1, 44, 1, -1, 79, 1, -1, 50, 6, 151, -1, 51, 6, 109, 6, 151, -1, 56, 52, 197, 109, 150, 151, -1, 52, 197, 109, 150, 151, -1, 56, 52, 197, 1, -1, 64, 156, 43, 194, 21, 197, 151, -1, 64, 156, 43, 194, 21, 1, -1, 64, 156, 1, -1, 65, 42, -1, 65, 61, -1, 65, 69, -1, 68, 177, 151, -1, 110, 177, 151, -1, 68, 111, 156, 109, 177, 151, -1, 56, 66, 197, 109, 177, 151, -1, 68, 111, 156, 1, -1, 71, 14, 112, -1, 71, 14, 193, 112, -1, 71, 156, 151, -1, 71, 151, -1, -1, 72, 23, 145, 156, 151, 153, 151, -1, 72, 1, -1, -1, 74, 146, 186, 151, -1, -1, 84, 147, 156, 151, 119, 151, -1, -1, 33, 148, 151, 119, 151, -1, 150, 94, 156, 151, -1, 150, 90, 156, 151, -1, -1, 18, 106, 149, 165, 151, -1, 151, -1, 18, -1, 13, -1, 14, 108, 178, -1, 14, 1, -1, 112, -1, 113, -1, 1, -1, 36, 156, 80, 151, 119, 152, -1, 35, 151, 119, -1, -1, 23, 154, 151, 119, 153, -1, 23, 35, 151, 119, -1, -1, 156, 81, 156, 155, -1, 156, 155, -1, 54, 94, 156, 155, -1, 54, 89, 156, 155, -1, 54, 92, 156, 155, -1, 54, 93, 156, 155, -1, 54, 88, 156, 155, -1, 54, 87, 156, 155, -1, 109, 154, -1, -1, 106, 156, 107, -1, 156, 104, 192, 156, -1, 96, 156, -1, 156, 100, 192, 156, -1, 156, 101, 192, 156, -1, 156, 102, 192, 156, -1, 156, 103, 192, 156, -1, 156, 75, 192, 156, -1, 156, 76, 192, 156, -1, 156, 58, 192, 156, -1, 156, 53, 192, 156, -1, 156, 95, 192, 156, -1, 156, 98, 192, 156, -1, 156, 96, 192, 156, -1, 156, 99, 192, 156, -1, 156, 94, 192, 156, -1, 156, 89, 192, 156, -1, 156, 93, 192, 156, -1, 156, 92, 192, 156, -1, 156, 88, 192, 156, -1, 156, 87, 192, 156, -1, 62, 156, -1, 97, 156, -1, 156, 19, 192, 156, -1, 156, 63, 192, 156, -1, 156, 86, 192, 156, -1, 156, 49, 192, 14, 193, -1, -1, 16, 17, 106, 157, 165, -1, 16, 17, -1, -1, 156, 17, 106, 158, 165, -1, 156, 17, -1, -1, 59, 16, 106, 159, 165, -1, 59, 16, -1, 59, -1, -1, 16, 106, 160, 165, -1, 16, -1, 18, -1, 13, -1, 14, 193, -1, 14, 108, 178, -1, 14, -1, 12, -1, 3, -1, 5, -1, 6, -1, -1, 11, 106, 161, 165, -1, 11, -1, 11, 1, -1, -1, 7, 106, 162, 165, -1, 7, -1, 7, 1, -1, -1, 10, 106, 163, 165, -1, 10, 1, -1, -1, 18, 106, 164, 165, -1, 1, -1, 107, -1, 166, 107, -1, 166, 1, -1, 156, 109, 192, 166, -1, 156, -1, 1, -1, -1, 106, 107, -1, 106, 168, -1, -1, -1, 18, 108, 114, 169, 175, -1, -1, 13, 108, 114, 170, 175, -1, -1, 14, 108, 114, 171, 175, -1, -1, 18, 172, 175, -1, -1, 13, 173, 175, -1, -1, 14, 174, 175, -1, 115, 115, 115, 107, -1, -1, 109, 192, 168, -1, 107, -1, 1, -1, 94, 156, 81, 156, 78, 156, 151, 119, -1, 94, 156, 81, 156, 78, 156, 151, 119, -1, 94, 156, 81, 156, 151, 119, -1, 94, 156, 81, 156, 151, 119, -1, 94, 156, 81, 156, 1, -1, 94, 156, 1, -1, 1, -1, 116, 177, -1, 109, 177, -1, 156, 109, 177, -1, 156, 116, 177, -1, 156, -1, -1, -1, 179, 180, -1, 156, 114, -1, 156, 109, 192, 180, -1, 182, 109, 192, 181, -1, 182, -1, 18, 108, 114, -1, 18, 108, 183, -1, 13, 108, 114, -1, 13, 108, 183, -1, 14, 108, 114, -1, 14, 108, 183, -1, 18, 94, 156, -1, 18, -1, 13, 94, 156, -1, 13, -1, 14, 94, 156, -1, 14, -1, 1, -1, -1, 184, 185, -1, 156, 114, -1, 156, 81, 156, 114, -1, 156, 81, 156, 109, 192, 185, -1, 156, 109, 192, 185, -1, 187, 109, 192, 186, -1, 187, -1, 13, -1, 14, 108, 114, -1, 14, 108, 1, -1, 14, 1, -1, 1, -1, -1, 106, 107, -1, 106, 189, -1, -1, 107, -1, 13, 107, -1, -1, 13, 109, 192, 190, 189, -1, 13, 1, -1, 14, 108, 114, 107, -1, -1, 14, 108, 114, 109, 192, 191, 189, -1, 14, 108, 114, 1, -1, 14, 108, 1, -1, 14, 1, -1, 115, 115, 115, 107, -1, 1, -1, 112, -1, -1, -1, 108, 114, -1, 52, -1, 66, -1, 20, -1, 1, -1, 196, 109, 192, 195, -1, 196, -1, 18, 94, 156, -1, 18, 1, -1, 1, -1, 111, 156, -1, 156, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short yyrline[] = { 0, 191, 191, 219, 225, 229, 233, 238, 243, 247, 252, 256, 260, 264, 275, 280, 290, 293, 296, 299, 314, 317, 325, 324, 333, 332, 341, 340, 349, 348, 357, 363, 370, 376, 384, 383, 391, 397, 400, 403, 407, 406, 416, 422, 427, 426, 438, 437, 447, 450, 453, 456, 460, 466, 472, 478, 484, 490, 496, 495, 505, 504, 512, 517, 516, 524, 527, 530, 533, 538, 537, 546, 545, 555, 560, 559, 574, 573, 587, 592, 591, 607, 606, 624, 637, 623, 650, 649, 675, 687, 674, 702, 701, 725, 728, 732, 737, 742, 747, 752, 755, 758, 761, 764, 768, 773, 778, 781, 784, 787, 790, 793, 796, 799, 805, 813, 812, 820, 824, 823, 834, 833, 841, 840, 851, 855, 888, 887, 900, 909, 913, 916, 920, 926, 927, 928, 943, 948, 952, 957, 960, 965, 970, 973, 976, 979, 982, 985, 988, 991, 997, 1001, 1007, 1012, 1015, 1022, 1025, 1028, 1031, 1034, 1037, 1044, 1047, 1054, 1057, 1060, 1063, 1070, 1073, 1076, 1079, 1082, 1085, 1091, 1094, 1101, 1108, 1115, 1118, 1126, 1125, 1134, 1139, 1138, 1145, 1152, 1151, 1158, 1161, 1165, 1164, 1173, 1176, 1180, 1183, 1186, 1191, 1194, 1197, 1200, 1203, 1207, 1206, 1214, 1218, 1222, 1221, 1229, 1233, 1237, 1236, 1244, 1248, 1247, 1260, 1265, 1268, 1271, 1276, 1280, 1284, 1302, 1303, 1304, 1305, 1310, 1309, 1315, 1314, 1319, 1318, 1323, 1322, 1328, 1327, 1332, 1331, 1335, 1340, 1344, 1345, 1346, 1351, 1356, 1361, 1364, 1367, 1370, 1373, 1378, 1381, 1384, 1387, 1390, 1394, 1398, 1398, 1406, 1410, 1417, 1426, 1431, 1436, 1442, 1446, 1451, 1455, 1460, 1464, 1469, 1472, 1476, 1479, 1483, 1489, 1489, 1496, 1500, 1504, 1508, 1515, 1516, 1520, 1533, 1545, 1548, 1551, 1556, 1557, 1558, 1559, 1564, 1566, 1574, 1573, 1580, 1584, 1591, 1590, 1597, 1601, 1604, 1607, 1612, 1619, 1620, 1624, 1626, 1630, 1633, 1636, 1639, 1644, 1652, 1657, 1661, 1664, 1669, 1671 }; #endif #if YYDEBUG || YYERROR_VERBOSE /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "Integer", "Hex", "Float", "String", "FunctionName", "SubName", "ForwardSubName", "ForwardFunctionName", "BuiltinName", "ConstantName", "VariableName", "ArrayName", "TypeName", "ClassName", "MethodName", "Undefined", "And", "Append", "As", "Call", "Case", "Class", "Close", "Common", "Const", "Continue", "Declare", "Default", "Delete", "Dim", "Do", "Each", "Else", "ElseIf", "End", "EndX", "Erase", "Error", "Exit", "Explicit", "For", "Function", "Get", "GetRef", "GoTo", "If", "In", "IncludeFile", "ZipIncludeFile", "Input", "Inv", "Is", "Let", "Line", "Loop", "Mod", "New", "Next", "NoConsole", "Not", "Or", "Open", "Option", "Output", "Preserve", "Print", "QBasic", "ReDim", "Return", "Select", "Set", "Shared", "Shl", "Shr", "Static", "Step", "Sub", "Then", "To", "Until", "Wend", "While", "With", "Xor", "Ge", "Le", "Ne", "IncrSelf", "UMinus", "Gt", "Lt", "Eq", "'+'", "'-'", "'!'", "'&'", "'|'", "'*'", "'/'", "'\\\\'", "'%'", "'^'", "'~'", "'('", "')'", "'['", "','", "'?'", "'#'", "'\\n'", "':'", "']'", "'.'", "';'", "$accept", "program", "block", "statement", "command", "@1", "@2", "@3", "@4", "@5", "@6", "@7", "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15", "@16", "@17", "@18", "@19", "@20", "@21", "@22", "@23", "@24", "@25", "@26", "@27", "@28", "lval", "sep", "elseIf", "cases", "caseTests", "caseTail", "expr", "@29", "@30", "@31", "@32", "@33", "@34", "@35", "@36", "argList", "argItems", "parmlist", "parmitem", "@37", "@38", "@39", "@40", "@41", "@42", "parmtail", "loopTail", "printList", "indexList", "@43", "indexListTail", "dimList", "dimItem", "dimIndexList", "@44", "dimIndexItems", "sharedList", "sharedItem", "declaredList", "declaredItem", "@45", "@46", "optSep", "optBrackets", "fileMode", "constList", "constItem", "fileHandle", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const unsigned short yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 43, 45, 33, 38, 124, 42, 47, 92, 37, 94, 126, 40, 41, 91, 44, 63, 35, 10, 58, 93, 46, 59 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { 0, 117, 118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 120, 121, 121, 121, 121, 121, 121, 122, 121, 123, 121, 124, 121, 125, 121, 121, 121, 121, 121, 126, 121, 121, 121, 121, 121, 127, 121, 121, 121, 128, 121, 129, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 130, 121, 131, 121, 121, 132, 121, 121, 121, 121, 121, 133, 121, 134, 121, 121, 135, 121, 136, 121, 121, 137, 121, 138, 121, 139, 140, 121, 141, 121, 142, 143, 121, 144, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 145, 121, 121, 146, 121, 147, 121, 148, 121, 121, 121, 149, 121, 121, 150, 150, 150, 150, 151, 151, 151, 152, 152, 152, 153, 153, 153, 154, 154, 154, 154, 154, 154, 154, 154, 155, 155, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 157, 156, 156, 158, 156, 156, 159, 156, 156, 156, 160, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 161, 156, 156, 156, 162, 156, 156, 156, 163, 156, 156, 164, 156, 156, 165, 165, 165, 166, 166, 166, 167, 167, 167, 167, 169, 168, 170, 168, 171, 168, 172, 168, 173, 168, 174, 168, 168, 168, 175, 175, 175, 176, 176, 176, 176, 176, 176, 176, 177, 177, 177, 177, 177, 177, 179, 178, 180, 180, 181, 181, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 184, 183, 185, 185, 185, 185, 186, 186, 187, 187, 187, 187, 187, 188, 188, 188, 188, 189, 189, 190, 189, 189, 189, 191, 189, 189, 189, 189, 189, 189, 192, 192, 193, 193, 194, 194, 194, 194, 195, 195, 196, 196, 196, 197, 197 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const unsigned char yyr2[] = { 0, 2, 2, 0, 2, 2, 2, 2, 2, 1, 2, 1, 1, 2, 0, 1, 5, 3, 4, 2, 2, 3, 0, 5, 0, 5, 0, 5, 0, 5, 2, 2, 2, 2, 0, 5, 2, 3, 2, 3, 0, 4, 2, 3, 0, 5, 0, 5, 3, 2, 4, 5, 2, 2, 2, 2, 2, 2, 0, 8, 0, 9, 5, 0, 8, 5, 4, 4, 3, 0, 5, 0, 5, 2, 0, 6, 0, 6, 2, 0, 7, 0, 7, 0, 0, 7, 0, 7, 0, 0, 7, 0, 7, 2, 2, 3, 5, 6, 5, 4, 7, 6, 3, 2, 2, 2, 3, 3, 6, 6, 4, 3, 4, 3, 2, 0, 7, 2, 0, 4, 0, 6, 0, 5, 4, 4, 0, 5, 1, 1, 1, 3, 2, 1, 1, 1, 6, 3, 0, 5, 4, 0, 4, 2, 4, 4, 4, 4, 4, 4, 2, 0, 3, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 4, 4, 5, 0, 5, 2, 0, 5, 2, 0, 5, 2, 1, 0, 4, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 0, 4, 1, 2, 0, 4, 1, 2, 0, 4, 2, 0, 4, 1, 1, 2, 2, 4, 1, 1, 0, 2, 2, 0, 0, 5, 0, 5, 0, 5, 0, 3, 0, 3, 0, 3, 4, 0, 3, 1, 1, 8, 8, 6, 6, 5, 3, 1, 2, 2, 3, 3, 1, 0, 0, 2, 2, 4, 4, 1, 3, 3, 3, 3, 3, 3, 3, 1, 3, 1, 3, 1, 1, 0, 2, 2, 4, 6, 4, 4, 1, 1, 3, 3, 2, 1, 0, 2, 2, 0, 1, 2, 0, 5, 2, 4, 0, 7, 4, 3, 2, 4, 1, 1, 0, 0, 2, 1, 1, 1, 1, 4, 1, 3, 2, 1, 2, 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const unsigned short yydefact[] = { 3, 0, 1, 135, 198, 199, 200, 0, 0, 0, 0, 0, 197, 193, 0, 191, 192, 0, 40, 0, 0, 0, 0, 0, 122, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 188, 0, 0, 0, 0, 0, 0, 118, 0, 120, 0, 0, 0, 0, 0, 133, 134, 2, 15, 0, 128, 0, 135, 0, 22, 30, 135, 24, 31, 28, 33, 135, 26, 32, 135, 34, 36, 20, 132, 255, 194, 181, 189, 126, 0, 0, 0, 197, 193, 196, 192, 0, 38, 318, 0, 0, 316, 0, 0, 313, 42, 78, 0, 0, 214, 0, 273, 270, 272, 268, 44, 46, 0, 260, 0, 49, 306, 57, 52, 53, 54, 55, 56, 73, 69, 71, 0, 93, 83, 86, 79, 0, 0, 0, 0, 0, 0, 187, 173, 0, 103, 104, 105, 0, 0, 0, 253, 0, 196, 114, 0, 117, 115, 0, 94, 88, 91, 81, 0, 154, 174, 0, 0, 0, 0, 0, 184, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 19, 21, 0, 0, 0, 0, 0, 0, 0, 0, 307, 195, 0, 179, 0, 0, 0, 208, 205, 211, 209, 204, 201, 255, 212, 317, 37, 0, 315, 0, 39, 305, 74, 76, 43, 0, 274, 0, 274, 0, 274, 0, 0, 48, 305, 0, 255, 0, 0, 0, 68, 0, 0, 287, 221, 221, 0, 95, 0, 0, 0, 0, 185, 102, 0, 250, 0, 249, 0, 0, 106, 111, 194, 113, 0, 286, 282, 0, 0, 281, 287, 221, 221, 0, 17, 0, 152, 107, 0, 0, 182, 304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 214, 215, 219, 0, 0, 206, 0, 0, 0, 210, 0, 202, 0, 256, 0, 190, 0, 213, 195, 41, 314, 0, 221, 221, 269, 263, 264, 0, 271, 265, 266, 267, 261, 262, 0, 0, 0, 0, 9, 11, 12, 0, 0, 0, 50, 248, 0, 0, 0, 66, 0, 67, 0, 0, 84, 238, 0, 0, 0, 0, 130, 0, 129, 0, 99, 0, 0, 0, 311, 310, 308, 309, 0, 110, 0, 251, 252, 112, 0, 285, 0, 119, 305, 89, 0, 0, 0, 18, 0, 125, 124, 0, 175, 306, 162, 161, 176, 159, 160, 177, 172, 171, 168, 170, 169, 167, 163, 165, 164, 166, 155, 156, 157, 158, 153, 305, 23, 217, 216, 25, 29, 27, 35, 305, 257, 180, 127, 312, 0, 0, 0, 275, 45, 47, 259, 5, 6, 4, 10, 7, 8, 123, 13, 51, 0, 70, 72, 62, 306, 65, 63, 303, 0, 0, 288, 0, 289, 0, 233, 235, 231, 222, 0, 223, 0, 0, 0, 96, 255, 98, 0, 0, 186, 0, 0, 141, 284, 283, 0, 0, 0, 0, 0, 16, 183, 0, 178, 0, 0, 75, 77, 0, 305, 276, 247, 0, 60, 0, 295, 292, 305, 301, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 131, 97, 109, 101, 0, 108, 0, 0, 280, 0, 0, 0, 121, 218, 258, 0, 0, 0, 0, 0, 293, 300, 0, 0, 85, 227, 241, 240, 305, 234, 229, 236, 225, 232, 0, 87, 80, 0, 0, 0, 100, 0, 0, 0, 151, 116, 90, 92, 82, 305, 277, 279, 135, 0, 0, 0, 64, 0, 299, 296, 305, 302, 0, 238, 0, 0, 237, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 0, 0, 244, 61, 291, 294, 297, 228, 239, 230, 226, 137, 0, 140, 151, 151, 151, 151, 151, 151, 141, 151, 150, 278, 0, 0, 0, 149, 148, 145, 146, 147, 144, 139, 142, 242, 298, 138, 136 }; /* YYDEFGOTO[NTERM-NUM]. */ static const short yydefgoto[] = { -1, 1, 341, 342, 53, 187, 189, 191, 190, 193, 90, 226, 227, 126, 533, 497, 233, 234, 322, 323, 240, 267, 238, 457, 239, 265, 479, 266, 259, 148, 153, 109, 200, 54, 55, 554, 522, 558, 595, 56, 314, 391, 367, 199, 194, 188, 192, 201, 303, 304, 356, 463, 580, 577, 579, 510, 506, 508, 544, 347, 142, 196, 197, 313, 107, 108, 326, 327, 431, 263, 264, 354, 456, 572, 621, 277, 75, 372, 93, 94, 89 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -535 static const short yypact[] = { -535, 1288, -535, 3065, -535, -535, -535, 674, 46, 49, 54, 791, -55, 22, 1695, 28, 148, 442, -535, 79, 30, 40, 2227, 215, -535, 30, 75, 171, 190, 191, -535, 38, 48, 1948, 165, 123, 2227, 2227, 202, 168, 1888, 84, -535, 304, -535, 2227, 2227, 2227, 2227, 642, -535, -535, -535, -535, 159, -535, 1821, 3125, 2227, -535, -535, -535, -535, -535, -535, -535, 3185, -535, -535, 3245, -535, -535, -535, -535, 27, -535, 71, -535, -535, 940, 77, 1057, -535, -535, 89, 93, 2227, -535, 3005, 30, 277, -535, 20, 30, 97, -535, -535, 203, 234, -535, 1821, -535, 124, 174, 221, -535, -535, 30, 176, 30, -535, 175, -535, -535, -535, -535, -535, -535, -535, -535, -535, 100, -535, -535, -535, -535, 2227, 30, 185, 195, 1948, 1948, 167, 217, 2273, -535, -535, -535, 642, 2227, 642, 2394, 30, 164, -535, 1821, -535, -535, 209, -535, -535, -535, -535, 2227, 3005, 217, 2109, 2825, 30, 2227, 2227, 219, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, -535, 3005, 2080, 2080, 2080, 2080, 2080, 2080, 2080, 2080, -535, 220, 2227, -535, 2080, 2080, 2080, -535, -535, -535, -535, -535, -535, 27, -535, 3005, -535, 30, -535, 2227, -535, 218, -535, -535, -535, 2227, 223, 2227, 225, 2227, 229, 277, 209, -535, 218, 1627, 27, 30, 21, 21, -535, 116, 194, 238, 239, 239, 2885, -535, 317, 293, 39, 222, -535, -535, 193, -535, 2013, -535, 642, 642, -535, -535, 235, -535, 2227, -535, -535, 16, 30, 226, 238, 239, 239, 1821, -535, 19, -535, -535, 1821, 1821, -535, -535, 2227, 332, 2227, 2227, 2227, 2227, 2227, 2227, 2227, 2227, 2227, 2227, 2227, 2227, 2227, 2227, 2227, 2227, 2227, 2227, 2227, 2227, 2227, -535, -535, 2703, 30, 50, -535, 30, 30, 30, -535, 30, -535, 2518, -535, 2080, -535, 30, -535, -535, -535, 3005, 79, 239, 239, 3005, -535, -535, 2227, 3005, -535, -535, 3005, -535, -535, 30, 30, 277, 254, -535, -535, -535, 30, 1174, 30, -535, -535, 2227, 30, 30, -535, 107, -535, 256, 29, -535, 81, 30, 30, 30, 30, -535, 45, -535, 30, -535, 293, 642, 2080, -535, -535, -535, -535, 327, -535, 642, -535, -535, -535, 1821, -535, 14, -535, 218, -535, 30, 30, 1627, -535, 30, -535, -535, 2080, 511, 245, 217, 217, 511, 36, 36, 511, 3283, 3283, 3283, 3283, 3283, 3283, 217, 217, 217, 217, 36, 36, 36, 36, 337, 218, -535, -535, -535, -535, -535, -535, -535, 218, -535, -535, -535, -535, 30, 30, 2455, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, 2334, -535, -535, -535, 245, -535, -535, -535, 18, 82, -535, 240, -535, 1627, 253, 258, 259, -535, 255, -535, 1627, 1627, 1401, -535, -535, -535, 30, 30, -535, 1964, 30, 345, -535, -535, 209, 1627, 1627, 1627, 30, -535, -535, 27, -535, 2246, 2227, -535, -535, 2227, 218, -535, -535, 2227, -535, 30, -535, -535, 218, -535, 15, 257, 30, 260, 47, 261, 47, 272, 47, 269, 30, 30, 211, -535, -535, -535, 3065, 30, -535, 2213, 30, -535, 30, 30, 30, -535, -535, -535, 2580, 2227, 1756, 30, 1174, -535, -535, 80, 262, -535, -535, -535, -535, 218, -535, -535, -535, -535, -535, 266, -535, -535, 30, 2227, 30, -535, 30, 270, 30, 2642, -535, -535, -535, -535, 218, -535, -535, -535, 2227, 1627, 1174, -535, 78, -535, -535, 218, -535, 47, 92, 47, 47, -535, 1627, 2945, -535, 1627, 2227, 2227, 2227, 2227, 2227, 2227, 1514, 2227, 1249, -535, 2227, 1821, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, 30, -535, 2764, 2764, 2764, 2764, 2764, 2764, 345, 2764, -535, -535, 1627, 78, 1401, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, 211, -535 }; /* YYPGOTO[NTERM-NUM]. */ static const short yypgoto[] = { -535, -535, -334, 386, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -232, -7, -239, -213, -190, -215, 343, -535, -535, -535, -535, -535, -535, -535, -535, -165, -82, -103, -172, -535, -535, -535, -535, -535, -535, -340, 173, -42, -199, -535, -80, -76, -535, -135, -535, -420, -216, -535, 144, -534, -535, -535, -107, -106, -535, 90, -535, -27 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -255 static const short yytable[] = { 60, 63, 65, 68, 71, 232, 129, 158, 442, 318, 87, 335, 363, 95, 212, 476, 536, 379, 110, 498, 387, 213, 345, 305, 306, 307, 308, 309, 310, 311, 451, 61, 343, 144, 315, 316, 317, 257, 601, 72, 364, 96, 452, 453, 127, 76, 73, 61, 541, 185, 61, 417, 482, 161, 128, 66, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 204, 451, 91, 573, 211, 501, 97, 146, 215, 632, 330, 111, 333, 452, 453, 219, 458, 459, 250, 92, 252, 460, 228, 235, 230, 245, 246, 458, 459, 147, 447, 321, 460, 566, -130, 236, 214, 346, -130, 349, 237, 98, 242, 448, 336, 504, 380, 499, 388, 500, 477, 537, 512, 513, 514, 470, 77, 255, 454, 357, 258, 132, 184, 195, 50, 51, 455, 524, 525, 526, 365, 425, 334, 272, 62, 468, 542, 64, 543, 418, 50, 51, 67, 50, 51, 384, 385, 350, 50, 51, 546, 99, 548, 4, 112, 5, 6, 79, 619, 198, 80, 81, 82, 83, 84, 205, 15, 600, 85, 574, 461, 575, 502, 118, 122, 455, 368, 351, 462, 208, 123, 209, 571, 124, 472, 119, 113, 319, 216, 462, 120, 125, 260, 375, 376, 369, 114, 115, 101, 130, 220, 428, 429, 217, 261, 262, 121, 344, 484, 35, 102, 103, 36, 131, 221, 104, 161, 598, 599, 603, -129, 605, 606, 105, -129, 352, 135, 370, 552, 553, 607, 159, 116, 609, 218, 160, 78, 117, 381, 449, 616, 371, 434, 386, 523, 136, 45, 46, 389, 390, 222, 515, 450, 137, 208, 247, 48, 478, 256, 138, 101, 139, -254, -254, 223, 231, 140, 229, 631, 486, 633, 106, 102, 103, 167, 168, 243, 104, 416, 435, 436, 419, 420, 421, 437, 422, 244, 149, 360, 361, 487, 426, -131, 362, 150, 151, -131, 224, 488, 180, 181, 182, 183, 184, 152, 359, 471, 275, 438, 432, 433, 225, 276, 366, 474, 439, 441, 382, 443, 325, 440, 329, 445, 446, 496, 332, 353, 355, 393, 377, 473, 464, 465, 466, 467, 485, 161, 503, 469, 586, 587, 588, 88, 505, 589, 590, 591, 100, 507, 509, 521, 576, 511, 475, 538, 581, 540, 545, 88, 480, 481, 133, 134, 483, 141, 145, 549, 531, 547, 52, 154, 155, 156, 157, 141, 535, 634, 623, 624, 625, 626, 627, 628, 186, 630, 629, 618, 528, 604, 348, 529, 383, 0, 427, 0, 0, 0, 0, 0, 0, 0, 0, 0, 489, 490, 0, 0, 0, 0, 0, 0, 210, 0, 0, 0, 0, 0, 0, 578, 0, 0, 0, 0, 0, 0, 3, 0, 4, 519, 5, 6, 79, 0, 0, 80, 81, 82, 83, 84, 596, 15, 0, 85, 0, 0, 516, 517, 0, 0, 520, 602, 241, 0, 0, 0, 88, 88, 527, 0, 0, 0, 0, 0, 141, 251, 141, 0, 0, 0, 0, 0, 0, 534, 0, 0, 0, 0, 0, 268, 539, 0, 0, 0, 35, 273, 274, 36, 550, 551, 0, 0, 0, 0, 0, 555, 0, 0, 560, 0, 561, 562, 563, 0, 0, 0, 0, 0, 569, 570, 0, 161, 0, 302, 302, 302, 302, 302, 302, 302, 302, 45, 46, 312, 0, 302, 302, 302, 582, 0, 584, 48, 585, 0, 592, 0, 86, 50, 51, 0, 320, 0, 0, 163, 0, 0, 324, 164, 328, 0, 331, 0, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 0, 0, 620, 0, 0, 0, 0, 0, 141, 141, 170, 171, 172, 622, 378, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 392, 0, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 99, 0, 4, 0, 5, 6, 79, 0, 0, 80, 81, 82, 83, 84, 302, 15, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 430, 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 444, 0, -207, 0, -207, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 36, 0, 0, 0, 0, 141, 302, 0, 0, 0, 0, 0, 0, 141, 0, 0, 0, 0, 0, -207, 0, 0, 0, -207, 0, 0, 0, 0, -207, 0, 302, 0, 0, -207, 45, 46, 0, 0, 0, 0, 0, 0, 0, 0, 48, -207, -207, 138, 0, 0, -254, -254, 0, 0, 140, 0, -207, -207, -207, -207, 0, 0, -207, -207, 58, -207, -207, 0, -207, -207, -207, -207, -207, -207, -207, 0, 59, 0, 0, 0, 0, 0, 50, 51, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -203, 0, -203, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 302, 312, 0, 0, 530, 0, 0, 0, 532, 0, -203, 0, 0, 0, -203, 0, 0, 0, 0, -203, 0, 0, 0, 0, -203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 559, 0, -203, -203, 0, 0, 0, 0, 0, 0, 430, 0, 0, -203, -203, -203, -203, 0, 0, -203, -203, -203, -203, -203, 0, -203, -203, -203, -203, -203, -203, -203, 583, 70, 0, 0, 0, 0, 0, 50, 51, 0, 0, 0, 0, 0, 0, 597, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 610, 611, 612, 613, 614, 615, 0, 617, 559, 0, 430, -207, 202, 0, -207, 0, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, 0, -207, -207, -207, -207, 0, 0, 0, -207, 0, -207, -207, -207, -207, -207, 0, -207, -207, -207, 0, -207, -207, -207, -207, -207, 0, -207, 0, -207, -207, 0, 0, 0, -207, -207, -207, -207, -207, -207, 0, 0, -207, -207, -207, -207, -207, 0, -207, -207, -207, -207, 0, 0, -207, 0, 0, -207, -207, 0, -207, -207, -207, 0, -207, -207, -207, -207, 0, -207, -207, 0, -207, -207, -207, -207, 0, 0, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, 203, -207, 0, -207, -207, 0, -207, -207, -207, 0, -207, -203, 206, 0, -203, 0, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, 0, -203, -203, -203, -203, 0, 0, 0, -203, 0, -203, -203, -203, -203, -203, 0, -203, -203, -203, 0, -203, -203, -203, -203, -203, 0, -203, 0, -203, -203, 0, 0, 0, -203, -203, -203, -203, -203, -203, 0, 0, -203, -203, -203, -203, -203, 0, -203, -203, -203, -203, 0, 0, -203, 0, 0, -203, -203, 0, -203, -203, -203, 0, -203, -203, -203, -203, 0, -203, -203, 0, -203, -203, -203, -203, 0, 0, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, 207, -203, 0, -203, -203, 0, -203, -203, -203, 0, -203, -14, 3, 0, 4, 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 15, 0, 16, 0, 0, 0, 0, -14, 0, 17, 18, 19, 20, 21, 0, 22, 23, 24, 0, -14, -14, 337, 25, 26, 0, 27, 0, 28, 29, 0, 0, 0, 30, 0, 31, 32, 33, 0, 0, 0, 34, 338, 0, 35, 339, 0, 36, 0, 37, 38, 0, 0, 39, 0, 0, 40, 41, 0, 42, 0, 99, 0, 4, 43, 5, 6, 79, 340, 44, 80, 81, 82, 83, 84, 0, 15, 0, 85, 0, 0, 45, 46, 0, 0, 0, 0, 0, 0, 0, 47, 48, 0, 0, 0, 49, 0, 50, 51, 2, 3, 0, 4, 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 557, 15, 0, 16, 0, 35, 0, 0, 36, 0, 17, 18, 19, 20, 21, 0, 22, 23, 24, 0, 0, 0, 0, 25, 26, 0, 27, 0, 28, 29, 0, 0, 0, 30, 0, 31, 32, 33, 0, 0, 0, 34, 45, 46, 35, 0, 0, 36, 0, 37, 38, 0, 48, 39, 0, 0, 40, 41, 0, 42, 0, 0, 0, 0, 43, 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 46, 0, 0, 0, 0, 0, 0, 0, 47, 48, 0, 0, 0, 49, 0, 50, 51, 3, 0, 4, 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 15, 0, 16, 0, 0, 0, 0, 0, 0, 17, 18, 19, 20, 21, 0, 22, 23, 24, 0, -14, -14, 337, 25, 26, 0, 27, 0, 28, 29, 0, 0, 0, 30, 0, 31, 32, 33, 0, 0, 0, 34, 338, 0, 35, 339, 0, 36, 0, 37, 38, 0, 0, 39, 0, 0, 40, 41, 0, 42, 0, 0, 0, 0, 43, 0, 0, 0, 340, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 46, 0, 0, 0, 0, 0, 0, 0, 47, 48, 0, 0, 0, 49, 0, 50, 51, 3, 0, 4, 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 15, 0, 16, 0, 0, 0, 0, -14, 0, 17, 18, 19, 20, 21, 0, 22, 23, 24, 0, 0, 0, 337, 25, 26, 0, 27, 0, 28, 29, 0, 0, 0, 30, 0, 31, 32, 33, 0, 0, 0, 34, 338, 0, 35, 339, 0, 36, 0, 37, 38, 0, 0, 39, 0, 0, 40, 41, 0, 42, 0, 0, 0, 0, 43, 0, 0, 0, 340, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 46, 0, 0, 0, 0, 0, 0, 0, 47, 48, 0, 0, 0, 49, 0, 50, 51, 3, 0, 4, 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 15, 0, 16, 0, 0, 0, 0, 0, 0, 17, 18, 19, 20, 21, 0, 22, 23, 24, 0, 0, 0, 337, 25, 26, 0, 27, 0, 28, 29, 0, 0, 0, 30, 0, 31, 32, 33, 0, 0, 0, 34, 338, 0, 35, 339, 0, 36, 0, 37, 38, 0, 0, 39, 73, 0, 40, 41, 0, 42, 0, 0, 0, 0, 43, 0, 0, 0, 340, 44, -196, 0, -196, 0, 0, 0, 0, 0, 0, 0, 0, 45, 46, 0, 0, 0, 0, 0, 0, 0, 47, 48, 0, 0, 0, 49, 0, 50, 51, 0, 0, 0, -196, 0, 0, 0, -196, 0, 0, 0, 0, -196, 0, 0, 0, 567, -196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -196, -196, 0, 161, 0, 162, 0, 0, 0, 0, 0, -196, -196, -196, -196, 0, 0, -196, -196, -196, -196, -196, 0, -196, -196, -196, -196, -196, -196, -196, 0, 0, 0, 74, 0, 163, 0, -196, -196, 164, 0, 0, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 61, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 0, 568, 0, 0, 0, 161, 0, 162, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 0, 0, 0, 50, 51, 163, 0, 0, 0, 164, 0, 0, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 0, 0, 3, 0, 4, 0, 5, 6, 79, 167, 168, 80, 81, 82, 83, 143, 0, 15, 0, 85, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 0, 0, 0, 50, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 99, 36, 4, 0, 5, 6, 79, 0, 0, 80, 81, 82, 83, 84, 0, 15, 518, 85, 4, 0, 5, 6, 79, 0, 0, 80, 81, 82, 83, 84, 0, 15, 0, 85, 0, 45, 46, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 50, 51, 0, 0, 0, 0, 0, 35, 0, 0, 36, 0, 0, 0, 373, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 36, 0, 0, 0, 161, 0, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 46, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 86, 45, 46, 163, 0, 0, 0, 164, 0, 0, 0, 48, 165, 0, 0, 0, 86, 166, 0, 0, 0, 0, 300, 0, 4, 0, 5, 6, 79, 167, 168, 80, 81, 82, 83, 84, 0, 15, 0, 85, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 269, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 374, 0, 0, 0, 161, 0, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 163, 0, 0, 0, 164, 0, 0, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 0, 45, 46, 0, 0, 0, 0, 0, 0, 167, 168, 48, 301, 0, 0, 0, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 99, 270, 4, 0, 5, 6, 79, 0, 0, 80, 81, 82, 83, 84, 99, 15, 4, 85, 5, 6, 79, 0, 0, 80, 81, 82, 83, 84, 0, 15, 0, 85, 0, 300, 556, 4, 0, 5, 6, 79, 0, 0, 80, 81, 82, 83, 84, 0, 15, 0, 85, 0, 0, 557, 0, 0, 0, 0, 35, 0, 248, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 36, 161, 0, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 36, 45, 46, 0, 0, 0, 0, 0, 249, 0, 0, 48, 0, 0, 163, 45, 46, 0, 164, 0, 0, 0, 0, 165, 0, 48, 0, 494, 166, 0, 0, 0, 0, 0, 45, 46, 0, 0, 0, 0, 167, 168, 0, 161, 48, 162, 0, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 0, 163, 0, 0, 0, 164, 0, 0, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 161, 0, 162, 0, 495, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 163, 0, 0, 0, 164, 0, 0, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 0, 161, 0, 162, 0, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 253, 163, 0, 0, 0, 164, 0, 254, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 0, 0, 0, 161, 491, 162, 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 492, 0, 0, 163, 0, 493, 0, 164, 0, 0, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 0, 0, 161, 0, 162, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 423, 0, 163, 0, 0, 424, 164, 0, 0, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 0, 0, 161, 0, 162, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 564, 0, 163, 0, 0, 565, 164, 0, 0, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 0, 161, 0, 162, 593, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 594, 163, 0, 0, 0, 164, 0, 0, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 0, 161, 0, 162, 0, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 415, 163, 0, 0, 0, 164, 0, 0, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 0, 161, 0, 162, 0, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 594, 163, 0, 0, 0, 164, 0, 0, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 161, 0, 162, 0, 0, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 271, 0, 163, 0, 0, 0, 164, 0, 0, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 161, 0, 162, 358, 0, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 163, 0, 0, 0, 164, 0, 0, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 161, 0, 162, 608, 0, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, 163, 0, 0, 0, 164, 0, 0, 0, 0, 165, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, -214, 0, -214, 0, 0, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, 175, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184, 0, 0, 0, 0, -214, 0, 0, 0, -214, 0, 0, 0, 0, -214, 0, 0, 0, 0, -214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -214, -214, -208, 0, -208, 0, 0, 0, 0, 0, 0, -214, -214, -214, -214, 0, 0, -214, -214, -214, -214, 0, 0, -214, -214, -214, -214, -214, -214, -214, 0, 0, 0, 0, -208, 0, 0, 0, -208, 0, 0, 0, 0, -208, 0, 0, 0, 0, -208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -208, -208, -211, 0, -211, 0, 0, 0, 0, 0, 0, -208, -208, -208, -208, 0, 0, -208, -208, -208, -208, 0, 0, -208, -208, -208, -208, -208, -208, -208, 0, 0, 0, 0, -211, 0, 0, 0, -211, 0, 0, 0, 0, -211, 0, 0, 0, 0, -211, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -211, -211, -204, 0, -204, 0, 0, 0, 0, 0, 0, -211, -211, -211, -211, 0, 0, -211, -211, -211, -211, 0, 0, -211, -211, -211, -211, -211, -211, -211, 0, 0, 0, 0, -204, 0, 0, 0, -204, 0, 161, 0, 0, -204, 0, 0, 0, 0, -204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -204, -204, 0, 0, 0, 0, 0, 0, 0, 0, 0, -204, -204, -204, -204, 0, 164, -204, -204, -204, -204, 165, 0, -204, -204, -204, -204, -204, -204, -204, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 177, 0, 178, 179, 180, 181, 182, 183, 184 }; static const short yycheck[] = { 7, 8, 9, 10, 11, 111, 33, 49, 342, 208, 17, 227, 244, 20, 90, 1, 1, 1, 25, 1, 1, 1, 1, 188, 189, 190, 191, 192, 193, 194, 1, 1, 231, 40, 199, 200, 201, 143, 572, 94, 1, 1, 13, 14, 6, 17, 1, 1, 1, 56, 1, 1, 386, 17, 6, 1, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 1, 1, 1, 1, 89, 1, 44, 1, 93, 621, 223, 14, 225, 13, 14, 100, 13, 14, 138, 18, 140, 18, 107, 1, 109, 130, 131, 13, 14, 23, 1, 216, 18, 531, 90, 13, 94, 94, 94, 1, 18, 79, 127, 14, 229, 457, 108, 107, 107, 109, 114, 114, 464, 465, 466, 365, 106, 142, 107, 240, 145, 16, 104, 114, 112, 113, 115, 479, 480, 481, 109, 314, 226, 158, 106, 108, 107, 106, 109, 107, 112, 113, 106, 112, 113, 266, 267, 49, 112, 113, 508, 1, 510, 3, 1, 5, 6, 7, 596, 106, 10, 11, 12, 13, 14, 106, 16, 107, 18, 107, 107, 109, 108, 1, 1, 115, 1, 1, 115, 108, 7, 106, 534, 10, 367, 13, 33, 212, 109, 115, 18, 18, 1, 253, 254, 20, 43, 44, 1, 52, 94, 322, 323, 18, 13, 14, 34, 232, 391, 59, 13, 14, 62, 66, 108, 18, 17, 569, 570, 577, 90, 579, 580, 26, 94, 49, 42, 52, 35, 36, 582, 90, 79, 585, 18, 94, 106, 84, 263, 1, 592, 66, 336, 268, 478, 61, 96, 97, 273, 274, 94, 468, 14, 69, 108, 106, 106, 382, 112, 109, 1, 111, 112, 113, 108, 108, 116, 109, 620, 393, 622, 74, 13, 14, 75, 76, 109, 18, 303, 43, 44, 306, 307, 308, 48, 310, 109, 1, 13, 14, 415, 316, 90, 18, 8, 9, 94, 94, 423, 100, 101, 102, 103, 104, 18, 6, 366, 106, 72, 334, 335, 108, 112, 109, 374, 79, 341, 109, 343, 114, 84, 114, 347, 348, 448, 114, 106, 106, 14, 112, 21, 356, 357, 358, 359, 108, 17, 115, 363, 87, 88, 89, 17, 108, 92, 93, 94, 22, 108, 108, 23, 107, 115, 378, 115, 107, 114, 114, 33, 384, 385, 36, 37, 388, 39, 40, 115, 492, 114, 1, 45, 46, 47, 48, 49, 500, 633, 610, 611, 612, 613, 614, 615, 58, 617, 616, 594, 487, 578, 234, 488, 265, -1, 321, -1, -1, -1, -1, -1, -1, -1, -1, -1, 428, 429, -1, -1, -1, -1, -1, -1, 86, -1, -1, -1, -1, -1, -1, 543, -1, -1, -1, -1, -1, -1, 1, -1, 3, 473, 5, 6, 7, -1, -1, 10, 11, 12, 13, 14, 564, 16, -1, 18, -1, -1, 470, 471, -1, -1, 474, 575, 126, -1, -1, -1, 130, 131, 482, -1, -1, -1, -1, -1, 138, 139, 140, -1, -1, -1, -1, -1, -1, 497, -1, -1, -1, -1, -1, 153, 504, -1, -1, -1, 59, 159, 160, 62, 512, 513, -1, -1, -1, -1, -1, 519, -1, -1, 522, -1, 524, 525, 526, -1, -1, -1, -1, -1, 532, 533, -1, 17, -1, 187, 188, 189, 190, 191, 192, 193, 194, 96, 97, 197, -1, 199, 200, 201, 552, -1, 554, 106, 556, -1, 558, -1, 111, 112, 113, -1, 214, -1, -1, 49, -1, -1, 220, 53, 222, -1, 224, -1, 58, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, -1, 597, -1, -1, -1, -1, -1, 253, 254, 87, 88, 89, 608, 259, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 277, -1, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 1, -1, 3, -1, 5, 6, 7, -1, -1, 10, 11, 12, 13, 14, 314, 16, -1, 18, -1, -1, -1, -1, -1, -1, -1, -1, -1, 327, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 346, -1, 17, -1, 19, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, 62, -1, -1, -1, -1, 366, 367, -1, -1, -1, -1, -1, -1, 374, -1, -1, -1, -1, -1, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, 391, -1, -1, 63, 96, 97, -1, -1, -1, -1, -1, -1, -1, -1, 106, 75, 76, 109, -1, -1, 112, 113, -1, -1, 116, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, 106, -1, -1, -1, -1, -1, 112, 113, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 17, -1, 19, -1, -1, -1, -1, -1, 473, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 487, 488, -1, -1, 491, -1, -1, -1, 495, -1, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, 521, -1, 75, 76, -1, -1, -1, -1, -1, -1, 531, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, 553, 106, -1, -1, -1, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, 568, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 586, 587, 588, 589, 590, 591, -1, 593, 594, -1, 596, 0, 1, -1, 3, -1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, 16, 17, 18, 19, -1, -1, -1, 23, -1, 25, 26, 27, 28, 29, -1, 31, 32, 33, -1, 35, 36, 37, 38, 39, -1, 41, -1, 43, 44, -1, -1, -1, 48, 49, 50, 51, 52, 53, -1, -1, 56, 57, 58, 59, 60, -1, 62, 63, 64, 65, -1, -1, 68, -1, -1, 71, 72, -1, 74, 75, 76, -1, 78, 79, 80, 81, -1, 83, 84, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, 112, 113, 114, -1, 116, 0, 1, -1, 3, -1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, 16, 17, 18, 19, -1, -1, -1, 23, -1, 25, 26, 27, 28, 29, -1, 31, 32, 33, -1, 35, 36, 37, 38, 39, -1, 41, -1, 43, 44, -1, -1, -1, 48, 49, 50, 51, 52, 53, -1, -1, 56, 57, 58, 59, 60, -1, 62, 63, 64, 65, -1, -1, 68, -1, -1, 71, 72, -1, 74, 75, 76, -1, 78, 79, 80, 81, -1, 83, 84, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, 112, 113, 114, -1, 116, 0, 1, -1, 3, -1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, 16, -1, 18, -1, -1, -1, -1, 23, -1, 25, 26, 27, 28, 29, -1, 31, 32, 33, -1, 35, 36, 37, 38, 39, -1, 41, -1, 43, 44, -1, -1, -1, 48, -1, 50, 51, 52, -1, -1, -1, 56, 57, -1, 59, 60, -1, 62, -1, 64, 65, -1, -1, 68, -1, -1, 71, 72, -1, 74, -1, 1, -1, 3, 79, 5, 6, 7, 83, 84, 10, 11, 12, 13, 14, -1, 16, -1, 18, -1, -1, 96, 97, -1, -1, -1, -1, -1, -1, -1, 105, 106, -1, -1, -1, 110, -1, 112, 113, 0, 1, -1, 3, -1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 54, 16, -1, 18, -1, 59, -1, -1, 62, -1, 25, 26, 27, 28, 29, -1, 31, 32, 33, -1, -1, -1, -1, 38, 39, -1, 41, -1, 43, 44, -1, -1, -1, 48, -1, 50, 51, 52, -1, -1, -1, 56, 96, 97, 59, -1, -1, 62, -1, 64, 65, -1, 106, 68, -1, -1, 71, 72, -1, 74, -1, -1, -1, -1, 79, -1, -1, -1, -1, 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 96, 97, -1, -1, -1, -1, -1, -1, -1, 105, 106, -1, -1, -1, 110, -1, 112, 113, 1, -1, 3, -1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, 16, -1, 18, -1, -1, -1, -1, -1, -1, 25, 26, 27, 28, 29, -1, 31, 32, 33, -1, 35, 36, 37, 38, 39, -1, 41, -1, 43, 44, -1, -1, -1, 48, -1, 50, 51, 52, -1, -1, -1, 56, 57, -1, 59, 60, -1, 62, -1, 64, 65, -1, -1, 68, -1, -1, 71, 72, -1, 74, -1, -1, -1, -1, 79, -1, -1, -1, 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 96, 97, -1, -1, -1, -1, -1, -1, -1, 105, 106, -1, -1, -1, 110, -1, 112, 113, 1, -1, 3, -1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, 16, -1, 18, -1, -1, -1, -1, 23, -1, 25, 26, 27, 28, 29, -1, 31, 32, 33, -1, -1, -1, 37, 38, 39, -1, 41, -1, 43, 44, -1, -1, -1, 48, -1, 50, 51, 52, -1, -1, -1, 56, 57, -1, 59, 60, -1, 62, -1, 64, 65, -1, -1, 68, -1, -1, 71, 72, -1, 74, -1, -1, -1, -1, 79, -1, -1, -1, 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 96, 97, -1, -1, -1, -1, -1, -1, -1, 105, 106, -1, -1, -1, 110, -1, 112, 113, 1, -1, 3, -1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, 16, -1, 18, -1, -1, -1, -1, -1, -1, 25, 26, 27, 28, 29, -1, 31, 32, 33, -1, -1, -1, 37, 38, 39, -1, 41, -1, 43, 44, -1, -1, -1, 48, -1, 50, 51, 52, -1, -1, -1, 56, 57, -1, 59, 60, -1, 62, -1, 64, 65, -1, -1, 68, 1, -1, 71, 72, -1, 74, -1, -1, -1, -1, 79, -1, -1, -1, 83, 84, 17, -1, 19, -1, -1, -1, -1, -1, -1, -1, -1, 96, 97, -1, -1, -1, -1, -1, -1, -1, 105, 106, -1, -1, -1, 110, -1, 112, 113, -1, -1, -1, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, 1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, 17, -1, 19, -1, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, 108, -1, 49, -1, 112, 113, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, 78, -1, -1, -1, 17, -1, 19, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, 112, 113, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, 1, -1, 3, -1, 5, 6, 7, 75, 76, 10, 11, 12, 13, 14, -1, 16, -1, 18, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, 1, 62, 3, -1, 5, 6, 7, -1, -1, 10, 11, 12, 13, 14, -1, 16, 1, 18, 3, -1, 5, 6, 7, -1, -1, 10, 11, 12, 13, 14, -1, 16, -1, 18, -1, 96, 97, -1, -1, -1, -1, -1, -1, -1, -1, 106, -1, -1, -1, -1, -1, 112, 113, -1, -1, -1, -1, -1, 59, -1, -1, 62, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, 62, -1, -1, -1, 17, -1, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 96, 97, -1, -1, -1, -1, -1, -1, -1, -1, 106, -1, -1, -1, -1, 111, 96, 97, 49, -1, -1, -1, 53, -1, -1, -1, 106, 58, -1, -1, -1, 111, 63, -1, -1, -1, -1, 1, -1, 3, -1, 5, 6, 7, 75, 76, 10, 11, 12, 13, 14, -1, 16, -1, 18, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, 1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 109, -1, -1, -1, 17, -1, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, 96, 97, -1, -1, -1, -1, -1, -1, 75, 76, 106, 107, -1, -1, -1, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, 1, 106, 3, -1, 5, 6, 7, -1, -1, 10, 11, 12, 13, 14, 1, 16, 3, 18, 5, 6, 7, -1, -1, 10, 11, 12, 13, 14, -1, 16, -1, 18, -1, 1, 35, 3, -1, 5, 6, 7, -1, -1, 10, 11, 12, 13, 14, -1, 16, -1, 18, -1, -1, 54, -1, -1, -1, -1, 59, -1, 1, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, 62, 17, -1, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, 62, 96, 97, -1, -1, -1, -1, -1, 43, -1, -1, 106, -1, -1, 49, 96, 97, -1, 53, -1, -1, -1, -1, 58, -1, 106, -1, 1, 63, -1, -1, -1, -1, -1, 96, 97, -1, -1, -1, -1, 75, 76, -1, 17, 106, 19, -1, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, 17, -1, 19, -1, 81, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, 17, -1, 19, -1, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 109, 49, -1, -1, -1, 53, -1, 116, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, -1, -1, 17, 81, 19, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 109, -1, -1, 49, -1, 114, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, -1, 17, -1, 19, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 109, -1, 49, -1, -1, 114, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, -1, 17, -1, 19, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 109, -1, 49, -1, -1, 114, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, 17, -1, 19, 81, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 109, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, 17, -1, 19, -1, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 109, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, 17, -1, 19, -1, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 109, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, 17, -1, 19, -1, -1, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, 107, -1, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, 17, -1, 19, 80, -1, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, 17, -1, 19, 80, -1, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, 17, -1, 19, -1, -1, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, 17, -1, 19, -1, -1, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, 17, -1, 19, -1, -1, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, 17, -1, 19, -1, -1, -1, -1, -1, -1, 86, 87, 88, 89, -1, -1, 92, 93, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, 49, -1, -1, -1, 53, -1, 17, -1, -1, 58, -1, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 87, 88, 89, -1, 53, 92, 93, 94, 95, 58, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 96, -1, 98, 99, 100, 101, 102, 103, 104 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const unsigned char yystos[] = { 0, 118, 0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 18, 25, 26, 27, 28, 29, 31, 32, 33, 38, 39, 41, 43, 44, 48, 50, 51, 52, 56, 59, 62, 64, 65, 68, 71, 72, 74, 79, 84, 96, 97, 105, 106, 110, 112, 113, 120, 121, 150, 151, 156, 1, 94, 106, 151, 1, 106, 151, 106, 151, 1, 106, 151, 1, 106, 151, 94, 1, 108, 193, 17, 106, 106, 7, 10, 11, 12, 13, 14, 18, 111, 151, 156, 197, 127, 1, 18, 195, 196, 151, 1, 44, 79, 1, 156, 1, 13, 14, 18, 26, 74, 181, 182, 148, 151, 14, 1, 33, 43, 44, 79, 84, 1, 13, 18, 34, 1, 7, 10, 18, 130, 6, 6, 197, 52, 66, 16, 156, 156, 42, 61, 69, 109, 111, 116, 156, 177, 14, 151, 156, 1, 23, 146, 1, 8, 9, 18, 147, 156, 156, 156, 156, 177, 90, 94, 17, 19, 49, 53, 58, 63, 75, 76, 86, 87, 88, 89, 92, 93, 94, 95, 96, 98, 99, 100, 101, 102, 103, 104, 151, 156, 122, 162, 123, 125, 124, 163, 126, 161, 114, 178, 179, 106, 160, 149, 164, 1, 106, 1, 106, 1, 106, 108, 106, 156, 151, 181, 1, 94, 151, 109, 18, 18, 151, 94, 108, 94, 108, 94, 108, 128, 129, 151, 109, 151, 108, 193, 133, 134, 1, 13, 18, 139, 141, 137, 156, 151, 109, 109, 197, 197, 106, 1, 43, 177, 156, 177, 109, 116, 151, 112, 193, 151, 145, 1, 13, 14, 186, 187, 142, 144, 138, 156, 1, 106, 107, 151, 156, 156, 106, 112, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 1, 107, 156, 165, 166, 165, 165, 165, 165, 165, 165, 165, 156, 180, 157, 165, 165, 165, 178, 151, 156, 192, 135, 136, 156, 114, 183, 184, 156, 114, 183, 156, 114, 183, 181, 186, 192, 37, 57, 60, 83, 119, 120, 178, 151, 1, 94, 176, 176, 1, 49, 1, 49, 106, 188, 106, 167, 167, 80, 6, 13, 14, 18, 150, 1, 109, 109, 159, 1, 20, 52, 66, 194, 1, 109, 177, 177, 112, 156, 1, 108, 151, 109, 188, 167, 167, 151, 1, 107, 151, 151, 158, 156, 14, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 109, 151, 1, 107, 151, 151, 151, 151, 109, 114, 165, 151, 195, 167, 167, 156, 185, 151, 151, 181, 43, 44, 48, 72, 79, 84, 151, 119, 151, 156, 151, 151, 1, 14, 1, 14, 1, 13, 14, 107, 115, 189, 140, 13, 14, 18, 107, 115, 168, 151, 151, 151, 151, 108, 151, 150, 177, 165, 21, 177, 151, 1, 114, 192, 143, 151, 151, 119, 151, 165, 108, 193, 192, 192, 151, 151, 81, 109, 114, 1, 81, 193, 132, 1, 107, 109, 1, 108, 115, 119, 108, 173, 108, 174, 108, 172, 115, 119, 119, 119, 178, 151, 151, 1, 197, 151, 23, 153, 186, 119, 119, 119, 151, 166, 180, 156, 192, 156, 131, 151, 192, 1, 114, 115, 151, 114, 1, 107, 109, 175, 114, 175, 114, 175, 115, 151, 151, 35, 36, 152, 151, 35, 54, 154, 156, 151, 151, 151, 151, 109, 114, 185, 1, 78, 151, 151, 119, 190, 1, 107, 109, 107, 170, 192, 171, 169, 107, 151, 156, 151, 151, 87, 88, 89, 92, 93, 94, 151, 81, 109, 155, 192, 156, 119, 119, 107, 189, 192, 175, 168, 175, 175, 119, 80, 119, 156, 156, 156, 156, 156, 156, 119, 156, 154, 185, 151, 191, 151, 155, 155, 155, 155, 155, 155, 153, 155, 119, 189, 119, 152 }; #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif #if ! defined (YYSIZE_T) && defined (size_t) # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) # if defined (__STDC__) || defined (__cplusplus) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif #endif #if ! defined (YYSIZE_T) # define YYSIZE_T unsigned int #endif #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ yyerror ("syntax error: cannot back up");\ YYERROR; \ } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Compute the default location (before the actions are run). */ #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ Current.first_line = Rhs[1].first_line; \ Current.first_column = Rhs[1].first_column; \ Current.last_line = Rhs[N].last_line; \ Current.last_column = Rhs[N].last_column; #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else # define YYLEX yylex () #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) # define YYDSYMPRINT(Args) \ do { \ if (yydebug) \ yysymprint Args; \ } while (0) # define YYDSYMPRINTF(Title, Token, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yysymprint (stderr, \ Token, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (cinluded). | `------------------------------------------------------------------*/ #if defined (__STDC__) || defined (__cplusplus) static void yy_stack_print (short *bottom, short *top) #else static void yy_stack_print (bottom, top) short *bottom; short *top; #endif { YYFPRINTF (stderr, "Stack now"); for (/* Nothing. */; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if defined (__STDC__) || defined (__cplusplus) static void yy_reduce_print (int yyrule) #else static void yy_reduce_print (yyrule) int yyrule; #endif { int yyi; unsigned int yylineno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", yyrule - 1, yylineno); /* Print the symbols being reduced, and their result. */ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (Rule); \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YYDSYMPRINT(Args) # define YYDSYMPRINTF(Title, Token, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #if YYMAXDEPTH == 0 # undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined (__GLIBC__) && defined (_STRING_H) # define yystrlen strlen # else /* Return the length of YYSTR. */ static YYSIZE_T # if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) # else yystrlen (yystr) const char *yystr; # endif { register const char *yys = yystr; while (*yys++ != '\0') continue; return yys - yystr - 1; } # endif # endif # ifndef yystpcpy # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * # if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) # else yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; # endif { register char *yyd = yydest; register const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif #endif /* !YYERROR_VERBOSE */ #if YYDEBUG /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if defined (__STDC__) || defined (__cplusplus) static void yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) #else static void yysymprint (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE *yyvaluep; #endif { /* Pacify ``unused variable'' warnings. */ (void) yyvaluep; if (yytype < YYNTOKENS) { YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); # ifdef YYPRINT YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # endif } else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); switch (yytype) { default: break; } YYFPRINTF (yyoutput, ")"); } #endif /* ! YYDEBUG */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ #if defined (__STDC__) || defined (__cplusplus) static void yydestruct (int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yytype, yyvaluep) int yytype; YYSTYPE *yyvaluep; #endif { /* Pacify ``unused variable'' warnings. */ (void) yyvaluep; switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) int yyparse (void *YYPARSE_PARAM); # else int yyparse (); # endif #else /* ! YYPARSE_PARAM */ #if defined (__STDC__) || defined (__cplusplus) int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) int yyparse (void *YYPARSE_PARAM) # else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; # endif #else /* ! YYPARSE_PARAM */ #if defined (__STDC__) || defined (__cplusplus) int yyparse (void) #else int yyparse () #endif #endif { register int yystate; register int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; /* Three stacks and their tools: `yyss': related to states, `yyvs': related to semantic values, `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; #define YYPOPSTACK (yyvsp--, yyssp--) YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; /* When reducing, the number of symbols on the RHS of the reduced rule. */ int yylen; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyoverflowlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyoverflowlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { short *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: #line 192 "sdlBrt_tab.y" { /* should be empty at this point */ if (!isEmptyStack(blockStack)) { checkBlockEnd(-1); } /* print error? */ if (errFlag) { ePrintf( Syntax, "syntax error"); } /* code? */ if (yyvsp[0].node != NULL) { /* defer or execute */ if (qBasicFlag) { if (deferredCode == NULL) { deferredCode = yyvsp[0].node; } else { deferredCode = comma( deferredCode, yyvsp[0].node ); } } else { eval( yyvsp[0].node ); freeNode( yyvsp[0].node ); } } } break; case 3: #line 219 "sdlBrt_tab.y" { eval( deferredCode ); freeNode( deferredCode ); } break; case 4: #line 226 "sdlBrt_tab.y" { checkBlockEnd(If); yyval.node = NULL; } break; case 5: #line 230 "sdlBrt_tab.y" { checkBlockEnd(For); yyval.node = NULL; } break; case 6: #line 234 "sdlBrt_tab.y" { clearStack( sharedStack ); checkBlockEnd(Function); yyval.node = NULL; } break; case 7: #line 239 "sdlBrt_tab.y" { clearStack( sharedStack ); checkBlockEnd(Sub); yyval.node = NULL; } break; case 8: #line 244 "sdlBrt_tab.y" { checkBlockEnd(While); yyval.node = NULL; } break; case 9: #line 248 "sdlBrt_tab.y" { checkBlockEnd(Do); yyval.node = NULL; } break; case 10: #line 253 "sdlBrt_tab.y" { checkBlockEnd(Select); yyval.node = NULL; } break; case 11: #line 257 "sdlBrt_tab.y" { checkBlockEnd(For); yyval.node = NULL; } break; case 12: #line 261 "sdlBrt_tab.y" { checkBlockEnd(While); yyval.node = NULL; } break; case 13: #line 265 "sdlBrt_tab.y" { if (errFlag) { ePrintf( Syntax, "syntax error"); } if (yyvsp[-1].node == NULL) { yyval.node = yyvsp[0].node; } else { yyval.node = comma( yyvsp[-1].node, yyvsp[0].node ); } } break; case 14: #line 275 "sdlBrt_tab.y" { yyval.node = NULL; } break; case 15: #line 281 "sdlBrt_tab.y" { if (yyval.node != NULL) { yyvsp[0].node->trace = parseLineId; } yyval.node = yyvsp[0].node; } break; case 16: #line 291 "sdlBrt_tab.y" { yyval.node = opNode( OpDestroy, yyvsp[-3].node, NULL ); } break; case 17: #line 294 "sdlBrt_tab.y" { expected("("); } break; case 18: #line 297 "sdlBrt_tab.y" { expected(")"); } break; case 19: #line 300 "sdlBrt_tab.y" { /* convert to call (drop result) */ switch (yyvsp[-1].node->op) { case OpMethod: yyvsp[-1].node->op = OpMethodCall; break; case OpClassMethod: yyvsp[-1].node->op = OpClassMethodCall; break; default: ePrintf( Syntax, "result of expression not assigned"); break; } yyval.node = yyvsp[-1].node; } break; case 20: #line 315 "sdlBrt_tab.y" { ePrintf( Syntax, "duplicate definition of %s", yyvsp[-1].symbol->name); } break; case 21: #line 318 "sdlBrt_tab.y" { if (yyvsp[-2].symbol != currentScope || !inStack(blockStack,Function)) { ePrintf( Syntax, "assignment outside Function"); } yyval.node = opNode( OpReturnSetValue, yyvsp[0].node, NULL ); } break; case 22: #line 325 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 23: #line 328 "sdlBrt_tab.y" { int args = popStack( argCountStack ); checkArgCount( yyvsp[-4].symbol, args ); yyval.node = symbolNode( OpFunctionCall, yyvsp[-4].symbol, yyvsp[-1].node, NULL ); } break; case 24: #line 333 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 25: #line 336 "sdlBrt_tab.y" { int args = popStack( argCountStack ); checkArgCount( yyvsp[-4].symbol, args ); yyval.node = symbolNode( OpFunctionCall, yyvsp[-4].symbol, yyvsp[-1].node, NULL ); } break; case 26: #line 341 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 27: #line 345 "sdlBrt_tab.y" { checkArgCount( yyvsp[-4].symbol, popStack( argCountStack ) ); yyval.node = symbolNode( OpFunctionCall, yyvsp[-4].symbol, yyvsp[-1].node, NULL ); } break; case 28: #line 349 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 29: #line 353 "sdlBrt_tab.y" { checkArgCount( yyvsp[-4].symbol, popStack( argCountStack ) ); yyval.node = symbolNode( OpFunctionCall, yyvsp[-4].symbol, yyvsp[-1].node, NULL ); } break; case 30: #line 358 "sdlBrt_tab.y" { if (yyvsp[-1].symbol->args != 0) { expected("'('"); } yyval.node = symbolNode( OpFunctionCall, yyvsp[-1].symbol, NULL, NULL ); } break; case 31: #line 364 "sdlBrt_tab.y" { if (yyvsp[-1].symbol->args != 0) { expected("'('"); } yyval.node = symbolNode( OpFunctionCall, yyvsp[-1].symbol, NULL, NULL ); } break; case 32: #line 371 "sdlBrt_tab.y" { if (yyvsp[-1].symbol->args != 0) { expected("'('"); } yyval.node = symbolNode( OpFunctionCall, yyvsp[-1].symbol, NULL, NULL ); } break; case 33: #line 377 "sdlBrt_tab.y" { if (yyvsp[-1].symbol->args != 0) { expected("'('"); } yyval.node = symbolNode( OpFunctionCall, yyvsp[-1].symbol, NULL, NULL ); } break; case 34: #line 384 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 35: #line 387 "sdlBrt_tab.y" { int args = popStack( argCountStack ); checkArgCount( yyvsp[-4].symbol, args ); yyval.node = symbolNode( OpBuiltinCall, yyvsp[-4].symbol, yyvsp[-1].node, NULL ); } break; case 36: #line 392 "sdlBrt_tab.y" { if (yyvsp[-1].symbol->args != 0) { expected("'('"); } yyval.node = symbolNode( OpBuiltinCall, yyvsp[-1].symbol, NULL, NULL ); } break; case 37: #line 398 "sdlBrt_tab.y" { yyval.node = opNode( OpClose, yyvsp[-1].node, NULL ); } break; case 38: #line 401 "sdlBrt_tab.y" { yyval.node = opNode( OpClose, NULL, NULL ); } break; case 39: #line 404 "sdlBrt_tab.y" { yyval.node = yyvsp[-1].node; } break; case 40: #line 407 "sdlBrt_tab.y" { if (currentScope != NULL) { ePrintf( Syntax, "Can't use Common in Sub or Function" ); } commonFlag = 1; } break; case 41: #line 413 "sdlBrt_tab.y" { yyval.node = yyvsp[-1].node; commonFlag = 0; } break; case 42: #line 417 "sdlBrt_tab.y" { if (!inStack(blockStack,For) && !inStack(blockStack,While)) { ePrintf( Syntax, "Continue outside For or While"); } yyval.node = opNode( OpContinue, NULL, NULL ); } break; case 43: #line 423 "sdlBrt_tab.y" { yyval.node = opNode( OpDelete, yyvsp[-1].node, NULL ); } break; case 44: #line 427 "sdlBrt_tab.y" { if (currentScope != NULL) { ePrintf( Syntax, "Can't use Common in Sub or Function" ); } commonFlag = 1; } break; case 45: #line 433 "sdlBrt_tab.y" { yyval.node = yyvsp[-1].node; commonFlag = 0; } break; case 46: #line 438 "sdlBrt_tab.y" { if (currentScope == NULL) { ePrintf( Syntax, "Shared illegal outside Sub or Function"); } pushStack(blockStack, (int)currentScope ); currentScope = NULL; } break; case 47: #line 444 "sdlBrt_tab.y" { currentScope = (Symbol *)popStack(blockStack); yyval.node = NULL; } break; case 48: #line 448 "sdlBrt_tab.y" { yyval.node = yyvsp[-1].node; } break; case 49: #line 451 "sdlBrt_tab.y" { yyval.node = opNode( OpEnd, NULL, NULL ); } break; case 50: #line 454 "sdlBrt_tab.y" { yyval.node = symbolNode( OpErase, yyvsp[-2].symbol, NULL, NULL ); } break; case 51: #line 457 "sdlBrt_tab.y" { checkArgCount( yyvsp[-3].symbol, popStack( argCountStack ) ); yyval.node = symbolNode( OpErase, yyvsp[-3].symbol, yyvsp[-1].node, NULL ); } break; case 52: #line 461 "sdlBrt_tab.y" { if (!inStack(blockStack,Do)) { ePrintf( Syntax, "Exit outside Do loop"); } yyval.node = opNode( OpExitDo, NULL, NULL ); } break; case 53: #line 467 "sdlBrt_tab.y" { if (!inStack(blockStack,For)) { ePrintf( Syntax, "Exit outside For loop"); } yyval.node = opNode( OpExitFor, NULL, NULL ); } break; case 54: #line 473 "sdlBrt_tab.y" { if (!inStack(blockStack,Function)) { ePrintf( Syntax, "Exit Function outside Function"); } yyval.node = opNode( OpExitRoutine, NULL, NULL ); } break; case 55: #line 479 "sdlBrt_tab.y" { if (!inStack(blockStack,Sub)) { ePrintf( Syntax, "Exit Sub outside Sub"); } yyval.node = opNode( OpExitRoutine, NULL, NULL ); } break; case 56: #line 485 "sdlBrt_tab.y" { if (!inStack(blockStack,While)) { ePrintf( Syntax, "Exit outside While loop"); } yyval.node = opNode( OpExitWhile, NULL, NULL ); } break; case 57: #line 491 "sdlBrt_tab.y" { expected("Do, For, Sub, Function or While"); } break; case 58: #line 496 "sdlBrt_tab.y" { pushStack(blockStack,If); } break; case 59: #line 499 "sdlBrt_tab.y" { popStack(blockStack); yyval.node = opNode( OpIf, opNode( OpIfTrue, yyvsp[-5].node, yyvsp[-2].node ), yyvsp[-1].node ); } break; case 60: #line 505 "sdlBrt_tab.y" { pushStack(blockStack,For); } break; case 61: #line 508 "sdlBrt_tab.y" { popStack(blockStack); yyval.node = symbolNode( OpForEach, yyvsp[-6].symbol, symbolNode( OpNoOp, yyvsp[-4].symbol, NULL, NULL ), yyvsp[0].node ); } break; case 62: #line 513 "sdlBrt_tab.y" { expected("an Array"); } break; case 63: #line 517 "sdlBrt_tab.y" { pushStack(blockStack,For); } break; case 64: #line 520 "sdlBrt_tab.y" { popStack(blockStack); yyval.node = symbolNode( OpForEach, returnVar(yyvsp[-5].strValue, SYM_VARIABLE, 0), symbolNode( OpNoOp, yyvsp[-3].symbol, NULL, NULL ), yyvsp[0].node ); } break; case 65: #line 525 "sdlBrt_tab.y" { expected("an Array"); } break; case 66: #line 528 "sdlBrt_tab.y" { expected("In"); } break; case 67: #line 531 "sdlBrt_tab.y" { expected("In"); } break; case 68: #line 534 "sdlBrt_tab.y" { expected("a variable"); } break; case 69: #line 538 "sdlBrt_tab.y" { pushStack(blockStack,For); } break; case 70: #line 541 "sdlBrt_tab.y" { popStack(blockStack); yyvsp[-1].node->value.symbol = yyvsp[-3].symbol; yyval.node = yyvsp[-1].node; } break; case 71: #line 546 "sdlBrt_tab.y" { pushStack(blockStack,For); returnVar(yyvsp[0].strValue, SYM_VARIABLE, 0); } break; case 72: #line 550 "sdlBrt_tab.y" { popStack(blockStack); yyvsp[-1].node->value.symbol = findSymbol(yyvsp[-3].strValue, currentScope); free( yyvsp[-3].strValue ); yyval.node = yyvsp[-1].node; } break; case 73: #line 556 "sdlBrt_tab.y" { expected("Each or a variable"); } break; case 74: #line 560 "sdlBrt_tab.y" { if (currentScope != NULL) { ePrintf( Syntax, "can't define function %s in %s", yyvsp[0].strValue, currentScope->name ); } currentScope = addSymbol( yyvsp[0].strValue, NULL, SYM_FUNCTION ); } break; case 75: #line 567 "sdlBrt_tab.y" { currentScope->code = NULL; currentScope->forward = 1; yyval.node = NULL; free( yyvsp[-3].strValue ); currentScope = NULL; } break; case 76: #line 574 "sdlBrt_tab.y" { if (currentScope != NULL) { ePrintf( Syntax, "can't define Sub %s in %s", yyvsp[0].strValue, currentScope->name ); } currentScope = addSymbol( yyvsp[0].strValue, NULL, SYM_SUB ); } break; case 77: #line 581 "sdlBrt_tab.y" { currentScope->code = NULL; currentScope->forward = 1; yyval.node = NULL; free( yyvsp[-3].strValue ); currentScope = NULL; } break; case 78: #line 588 "sdlBrt_tab.y" { expected("sub or function"); } break; case 79: #line 592 "sdlBrt_tab.y" { if (currentScope != NULL) { ePrintf( Syntax, "can't define Function %s in %s", yyvsp[0].strValue, currentScope->name ); } currentScope = addSymbol( yyvsp[0].strValue, NULL, SYM_FUNCTION ); pushStack( blockStack, Function ); } break; case 80: #line 600 "sdlBrt_tab.y" { popStack( blockStack ); currentScope->code = yyvsp[-1].node; yyval.node = NULL; free( yyvsp[-5].strValue ); currentScope = NULL; } break; case 81: #line 607 "sdlBrt_tab.y" { if (currentScope != NULL) { ePrintf( Syntax, "can't define Sub %s in %s", yyvsp[0].strValue, currentScope->name ); } currentScope = addSymbol( yyvsp[0].strValue, NULL, SYM_SUB ); pushStack( blockStack, Sub ); } break; case 82: #line 616 "sdlBrt_tab.y" { popStack( blockStack ); currentScope->code = yyvsp[-1].node; yyval.node = NULL; free( yyvsp[-5].strValue ); currentScope = NULL; } break; case 83: #line 624 "sdlBrt_tab.y" { if (currentScope != NULL) { ePrintf( Syntax, "can't define Function %s in %s", yyvsp[0].symbol->name, currentScope->name ); } if (!yyvsp[0].symbol->forward) { ePrintf( Syntax, "function %s has already been declared", yyvsp[0].symbol->name ); } currentScope = yyvsp[0].symbol; pushStack( argCountStack, 0 ); } break; case 84: #line 637 "sdlBrt_tab.y" { if (popStack( argCountStack ) != currentScope->args) { ePrintf( Syntax, "%s arg count does not match declaration - too few args", currentScope->name); } pushStack( blockStack, Function ); } break; case 85: #line 643 "sdlBrt_tab.y" { popStack( blockStack ); currentScope->code = yyvsp[-1].node; currentScope->forward = 0; yyval.node = NULL; currentScope = NULL; } break; case 86: #line 650 "sdlBrt_tab.y" { if (currentScope != NULL) { ePrintf( Syntax, "can't define Function %s in %s", yyvsp[0].symbol->name, currentScope->name ); } /* change to function */ yyvsp[0].symbol->symboltype = SYM_FUNCTION; currentScope = yyvsp[0].symbol; pushStack( blockStack, Function ); /* save var count and clear */ pushStack( argCountStack, currentScope->args); currentScope->args = 0; } break; case 87: #line 666 "sdlBrt_tab.y" { checkArgCount( yyvsp[-5].symbol, popStack( argCountStack ) ); popStack( blockStack ); currentScope->code = yyvsp[-1].node; currentScope->forward = 0; yyval.node = NULL; currentScope = NULL; } break; case 88: #line 675 "sdlBrt_tab.y" { if (currentScope != NULL) { ePrintf( Syntax, "can't define Sub %s in %s", yyvsp[0].symbol->name, currentScope->name ); } if (!yyvsp[0].symbol->forward) { ePrintf( Syntax, "sub %s has already been declared", yyvsp[0].symbol->name ); } currentScope = yyvsp[0].symbol; pushStack( argCountStack, 0 ); } break; case 89: #line 687 "sdlBrt_tab.y" { if (popStack( argCountStack ) != currentScope->args) { ePrintf( Syntax, "%s arg count does not match declaration - too few args", currentScope->name); } pushStack( blockStack, Sub ); } break; case 90: #line 694 "sdlBrt_tab.y" { popStack( blockStack ); currentScope->code = yyvsp[-1].node; currentScope->forward = 0; yyval.node = NULL; currentScope = NULL; } break; case 91: #line 702 "sdlBrt_tab.y" { if (currentScope != NULL) { ePrintf( Syntax, "can't define Sub %s in %s", yyvsp[0].symbol->name, currentScope->name ); } /* change to sub */ yyvsp[0].symbol->symboltype = SYM_SUB; currentScope = yyvsp[0].symbol; pushStack( blockStack, Sub ); /* save var count and clear */ pushStack( argCountStack, currentScope->args); currentScope->args = 0; } break; case 92: #line 718 "sdlBrt_tab.y" { checkArgCount( yyvsp[-5].symbol, popStack( argCountStack ) ); popStack( blockStack ); currentScope->code = yyvsp[-1].node; currentScope->forward = 0; yyval.node = NULL; currentScope = NULL; } break; case 93: #line 726 "sdlBrt_tab.y" { expected("Function name"); } break; case 94: #line 729 "sdlBrt_tab.y" { expected("Sub name"); } break; case 95: #line 733 "sdlBrt_tab.y" { pushIncludeFile( eCopyString(yyvsp[-1].strValue), 0 ); yyval.node = NULL; free( yyvsp[-1].strValue ); } break; case 96: #line 738 "sdlBrt_tab.y" { pushZipIncludeFile( eCopyString(yyvsp[-3].strValue), eCopyString(yyvsp[-1].strValue), 0 ); yyval.node = NULL; free( yyvsp[-3].strValue ); } break; case 97: #line 743 "sdlBrt_tab.y" { /* set into lval */ yyvsp[-1].node->right = intNode( OpInput, 1, yyvsp[-3].node, NULL ); yyval.node = yyvsp[-1].node; } break; case 98: #line 748 "sdlBrt_tab.y" { /* set into lval */ yyvsp[-1].node->right = intNode( OpInput, 1, yyvsp[-3].node, NULL ); yyval.node = yyvsp[-1].node; } break; case 99: #line 753 "sdlBrt_tab.y" { expected(", "); } break; case 100: #line 756 "sdlBrt_tab.y" { yyval.node = intNode( OpOpen, yyvsp[-3].iValue, yyvsp[-5].node, yyvsp[-1].node ); } break; case 101: #line 759 "sdlBrt_tab.y" { expected("#"); } break; case 102: #line 762 "sdlBrt_tab.y" { expected("For"); } break; case 103: #line 765 "sdlBrt_tab.y" { explicitFlag = 1; yyval.node = NULL; } break; case 104: #line 769 "sdlBrt_tab.y" { consoleFlag = 0; yyval.node = NULL; } break; case 105: #line 774 "sdlBrt_tab.y" { qBasicFlag = 1; yyval.node = NULL; } break; case 106: #line 779 "sdlBrt_tab.y" { yyval.node = opNode( OpPrint, NULL, yyvsp[-1].node ); } break; case 107: #line 782 "sdlBrt_tab.y" { yyval.node = opNode( OpPrint, NULL, yyvsp[-1].node ); } break; case 108: #line 785 "sdlBrt_tab.y" { yyval.node = opNode( OpPrint, yyvsp[-3].node, yyvsp[-1].node ); } break; case 109: #line 788 "sdlBrt_tab.y" { yyval.node = opNode( OpPrint, yyvsp[-3].node, yyvsp[-1].node ); } break; case 110: #line 791 "sdlBrt_tab.y" { expected(", "); } break; case 111: #line 794 "sdlBrt_tab.y" { ePrintf( Syntax, "array values cannot be returned" ); } break; case 112: #line 797 "sdlBrt_tab.y" { ePrintf( Syntax, "array values cannot be returned" ); } break; case 113: #line 800 "sdlBrt_tab.y" { if (!inStack(blockStack,Function)) { ePrintf( Syntax, "Return outside Function"); } yyval.node = opNode( OpReturnValue, yyvsp[-1].node, NULL ); } break; case 114: #line 806 "sdlBrt_tab.y" { if (!inStack(blockStack,Sub) && !inStack(blockStack,Function)) { ePrintf( Syntax, "Return outside Sub or Function"); } yyval.node = opNode( OpExitRoutine, NULL, NULL ); } break; case 115: #line 813 "sdlBrt_tab.y" { pushStack(blockStack,Select); } break; case 116: #line 816 "sdlBrt_tab.y" { popStack(blockStack); yyval.node = opNode( OpCaseSelect, yyvsp[-3].node, yyvsp[-1].node ); } break; case 117: #line 821 "sdlBrt_tab.y" { expected( "Case" ); } break; case 118: #line 824 "sdlBrt_tab.y" { if (currentScope == NULL) { ePrintf( Syntax, "Shared illegal outside Sub or Function"); } pushStack(blockStack, (int)currentScope ); currentScope = NULL; } break; case 119: #line 830 "sdlBrt_tab.y" { currentScope = (Symbol *)popStack(blockStack); yyval.node = NULL; } break; case 120: #line 834 "sdlBrt_tab.y" { pushStack(blockStack,While); } break; case 121: #line 837 "sdlBrt_tab.y" { popStack(blockStack); yyval.node = opNode( OpWhile, yyvsp[-3].node, yyvsp[-1].node ); } break; case 122: #line 841 "sdlBrt_tab.y" { pushStack(blockStack,Do); } break; case 123: #line 845 "sdlBrt_tab.y" { popStack(blockStack); yyval.node=opNode(OpDo,NULL, yyvsp[-1].node); } break; case 124: #line 852 "sdlBrt_tab.y" { yyvsp[-3].node->right = yyvsp[-1].node; yyval.node = yyvsp[-3].node; } break; case 125: #line 856 "sdlBrt_tab.y" { /* simple var or array? */ switch (yyvsp[-3].node->op) { case OpAssign: /* create a node to hold the operation */ yyvsp[-3].node->right = opNode( yyvsp[-2].iValue, symbolNode( OpVar, yyvsp[-3].node->value.symbol, NULL, NULL ), yyvsp[-1].node ); break; case OpArraySet: /* create a node to hold the operation */ yyvsp[-3].node->right = opNode( yyvsp[-2].iValue, symbolNode( OpArrayGet, yyvsp[-3].node->value.symbol, yyvsp[-3].node->left, NULL ), yyvsp[-1].node ); break; default: ePrintf( Syntax, "IncrSelf: can't apply operation to %s", yyvsp[-2].iValue, yyvsp[-3].node->value.symbol->name ); break; } /* value to assign */ yyval.node = yyvsp[-3].node; } break; case 126: #line 888 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 127: #line 891 "sdlBrt_tab.y" { Symbol *s = addSymbol( yyvsp[-4].strValue, NULL, SYM_FORWARD_SUB ); s->forward = 1; s->code = NULL; s->args = popStack( argCountStack ); free( yyvsp[-4].strValue ); yyval.node = symbolNode( OpFunctionCall, s, yyvsp[-1].node, NULL ); } break; case 128: #line 901 "sdlBrt_tab.y" { yyval.node = NULL; } break; case 129: #line 910 "sdlBrt_tab.y" { yyval.node = symbolNode( OpAssign, returnVar(yyvsp[0].strValue, SYM_VARIABLE, 0), NULL, NULL ); free( yyvsp[0].strValue ); } break; case 130: #line 914 "sdlBrt_tab.y" { yyval.node = symbolNode( OpAssign, yyvsp[0].symbol, NULL, NULL ); } break; case 131: #line 917 "sdlBrt_tab.y" { checkArgCount( yyvsp[-2].symbol, popStack( argCountStack ) ); yyval.node = symbolNode( OpArraySet, yyvsp[-2].symbol, yyvsp[0].node, NULL ); } break; case 132: #line 921 "sdlBrt_tab.y" { expected("'['"); } break; case 135: #line 929 "sdlBrt_tab.y" { if (strcmp(currtok, "end-of-file") == 0 ) { checkBlockEnd(-1); } expected("end-of-line" ); } break; case 136: #line 944 "sdlBrt_tab.y" { yyval.node = opNode( OpIf, opNode( OpIfTrue, yyvsp[-4].node, yyvsp[-1].node ), yyvsp[0].node ); } break; case 137: #line 949 "sdlBrt_tab.y" { yyval.node = yyvsp[0].node; } break; case 138: #line 952 "sdlBrt_tab.y" { yyval.node = NULL; } break; case 139: #line 958 "sdlBrt_tab.y" { yyval.node = comma( comma( yyvsp[-3].node, yyvsp[-1].node ), yyvsp[0].node ); } break; case 140: #line 961 "sdlBrt_tab.y" { yyval.node = comma( comma( opNode( OpCaseElse, NULL, NULL ), yyvsp[0].node ), NULL ); } break; case 141: #line 965 "sdlBrt_tab.y" { yyval.node = NULL; } break; case 142: #line 971 "sdlBrt_tab.y" { yyval.node = opNode( OpCaseRange, comma( yyvsp[-3].node, yyvsp[-1].node ), yyvsp[0].node ); } break; case 143: #line 974 "sdlBrt_tab.y" { yyval.node = intNode( OpCaseCmp, EQ, yyvsp[-1].node, yyvsp[0].node ); } break; case 144: #line 977 "sdlBrt_tab.y" { yyval.node = intNode( OpCaseCmp, EQ, yyvsp[-1].node, yyvsp[0].node ); } break; case 145: #line 980 "sdlBrt_tab.y" { yyval.node = intNode( OpCaseCmp, NE, yyvsp[-1].node, yyvsp[0].node ); } break; case 146: #line 983 "sdlBrt_tab.y" { yyval.node = intNode( OpCaseCmp, GT, yyvsp[-1].node, yyvsp[0].node ); } break; case 147: #line 986 "sdlBrt_tab.y" { yyval.node = intNode( OpCaseCmp, LT, yyvsp[-1].node, yyvsp[0].node ); } break; case 148: #line 989 "sdlBrt_tab.y" { yyval.node = intNode( OpCaseCmp, LE, yyvsp[-1].node, yyvsp[0].node ); } break; case 149: #line 992 "sdlBrt_tab.y" { yyval.node = intNode( OpCaseCmp, GE, yyvsp[-1].node, yyvsp[0].node ); } break; case 150: #line 998 "sdlBrt_tab.y" { yyval.node = yyvsp[0].node; } break; case 151: #line 1001 "sdlBrt_tab.y" { yyval.node = NULL; } break; case 152: #line 1008 "sdlBrt_tab.y" { yyval.node = yyvsp[-1].node; } break; case 153: #line 1013 "sdlBrt_tab.y" { yyval.node = opNode( OpPower, yyvsp[-3].node, yyvsp[0].node ); } break; case 154: #line 1016 "sdlBrt_tab.y" { yyval.node = opNode( OpNegate, yyvsp[0].node, NULL ); } break; case 155: #line 1023 "sdlBrt_tab.y" { yyval.node = opNode( OpMul, yyvsp[-3].node, yyvsp[0].node ); } break; case 156: #line 1026 "sdlBrt_tab.y" { yyval.node = opNode( OpDiv, yyvsp[-3].node, yyvsp[0].node ); } break; case 157: #line 1029 "sdlBrt_tab.y" { yyval.node = opNode( OpIDiv, yyvsp[-3].node, yyvsp[0].node ); } break; case 158: #line 1032 "sdlBrt_tab.y" { yyval.node = opNode( OpMod, yyvsp[-3].node, yyvsp[0].node ); } break; case 159: #line 1035 "sdlBrt_tab.y" { yyval.node = opNode( OpShl, yyvsp[-3].node, yyvsp[0].node ); } break; case 160: #line 1038 "sdlBrt_tab.y" { yyval.node = opNode( OpShr, yyvsp[-3].node, yyvsp[0].node ); } break; case 161: #line 1045 "sdlBrt_tab.y" { yyval.node = opNode( OpMod, yyvsp[-3].node, yyvsp[0].node ); } break; case 162: #line 1048 "sdlBrt_tab.y" { yyval.node = opNode( OpInv, yyvsp[-3].node, yyvsp[0].node ); } break; case 163: #line 1055 "sdlBrt_tab.y" { yyval.node = opNode( OpAdd, yyvsp[-3].node, yyvsp[0].node ); } break; case 164: #line 1058 "sdlBrt_tab.y" { yyval.node = opNode( OpConcat, yyvsp[-3].node, yyvsp[0].node ); } break; case 165: #line 1061 "sdlBrt_tab.y" { yyval.node = opNode( OpSub, yyvsp[-3].node, yyvsp[0].node ); } break; case 166: #line 1064 "sdlBrt_tab.y" { yyval.node = opNode( OpOrBits, yyvsp[-3].node, yyvsp[0].node ); } break; case 167: #line 1071 "sdlBrt_tab.y" { yyval.node = intNode( OpCmp, EQ, yyvsp[-3].node, yyvsp[0].node ); } break; case 168: #line 1074 "sdlBrt_tab.y" { yyval.node = intNode( OpCmp, NE, yyvsp[-3].node, yyvsp[0].node ); } break; case 169: #line 1077 "sdlBrt_tab.y" { yyval.node = intNode( OpCmp, LT, yyvsp[-3].node, yyvsp[0].node ); } break; case 170: #line 1080 "sdlBrt_tab.y" { yyval.node = intNode( OpCmp, GT, yyvsp[-3].node, yyvsp[0].node ); } break; case 171: #line 1083 "sdlBrt_tab.y" { yyval.node = intNode( OpCmp, LE, yyvsp[-3].node, yyvsp[0].node ); } break; case 172: #line 1086 "sdlBrt_tab.y" { yyval.node = intNode( OpCmp, GE, yyvsp[-3].node, yyvsp[0].node ); } break; case 173: #line 1092 "sdlBrt_tab.y" { yyval.node = opNode( OpNot, yyvsp[0].node, NULL ); } break; case 174: #line 1095 "sdlBrt_tab.y" { yyval.node = opNode( OpNot, yyvsp[0].node, NULL ); } break; case 175: #line 1102 "sdlBrt_tab.y" { yyval.node = opNode( OpAnd, yyvsp[-3].node, yyvsp[0].node ); } break; case 176: #line 1109 "sdlBrt_tab.y" { yyval.node = opNode( OpOr, yyvsp[-3].node, yyvsp[0].node ); } break; case 177: #line 1116 "sdlBrt_tab.y" { yyval.node = opNode( OpXor, yyvsp[-3].node, yyvsp[0].node ); } break; case 178: #line 1119 "sdlBrt_tab.y" { yyval.node = symbolNode( OpIn, yyvsp[-1].symbol, yyvsp[-4].node, NULL ); } break; case 179: #line 1126 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 180: #line 1129 "sdlBrt_tab.y" { popStack( argCountStack ); yyval.node = stringNode( OpClassMethod, yyvsp[-3].strValue, symbolNode( OpComma, yyvsp[-4].symbol, NULL, NULL ), yyvsp[0].node ); } break; case 181: #line 1135 "sdlBrt_tab.y" { yyval.node = stringNode( OpClassMethod, yyvsp[0].strValue, symbolNode( OpComma, yyvsp[-1].symbol, NULL, NULL ), NULL ); } break; case 182: #line 1139 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 183: #line 1142 "sdlBrt_tab.y" { popStack( argCountStack ); yyval.node = stringNode( OpMethod, yyvsp[-3].strValue, yyvsp[-4].node, yyvsp[0].node ); } break; case 184: #line 1146 "sdlBrt_tab.y" { yyval.node = stringNode( OpMethod, yyvsp[0].strValue, yyvsp[-1].node, NULL ); } break; case 185: #line 1152 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 186: #line 1155 "sdlBrt_tab.y" { popStack( argCountStack ); yyval.node = symbolNode( OpNew, yyvsp[-3].symbol, yyvsp[0].node, NULL ); } break; case 187: #line 1159 "sdlBrt_tab.y" { yyval.node = symbolNode( OpNew, yyvsp[0].symbol, NULL, NULL ); } break; case 188: #line 1162 "sdlBrt_tab.y" { expected("a Class"); } break; case 189: #line 1165 "sdlBrt_tab.y" { if (!classSafeOnStack( yyvsp[-1].symbol->klass )) { ePrintf( Syntax, "Can't create %s on stack", yyvsp[-1].symbol->name ); } pushStack( argCountStack, 0 ); } break; case 190: #line 1170 "sdlBrt_tab.y" { popStack( argCountStack ); yyval.node = symbolNode( OpNewTmp, yyvsp[-3].symbol, yyvsp[0].node, NULL ); } break; case 191: #line 1174 "sdlBrt_tab.y" { expected("("); } break; case 192: #line 1177 "sdlBrt_tab.y" { yyval.node = symbolNode( OpVar, returnVar(yyvsp[0].strValue, SYM_VARIABLE, 0), NULL, NULL ); free(yyvsp[0].strValue); } break; case 193: #line 1181 "sdlBrt_tab.y" { yyval.node = symbolNode( OpVar, yyvsp[0].symbol, NULL, NULL ); } break; case 194: #line 1184 "sdlBrt_tab.y" { yyval.node = symbolNode( OpArrayPtr, yyvsp[-1].symbol, NULL, NULL ); } break; case 195: #line 1187 "sdlBrt_tab.y" { int args = popStack( argCountStack ); checkArgCount( yyvsp[-2].symbol, args ); yyval.node = symbolNode( OpArrayGet, yyvsp[-2].symbol, yyvsp[0].node, NULL ); } break; case 196: #line 1192 "sdlBrt_tab.y" { expected("'['"); } break; case 197: #line 1195 "sdlBrt_tab.y" { yyval.node = symbolNode( OpConstGet, yyvsp[0].symbol, NULL, NULL ); } break; case 198: #line 1198 "sdlBrt_tab.y" { yyval.node = intNode( OpInt, yyvsp[0].iValue, NULL, NULL ); } break; case 199: #line 1201 "sdlBrt_tab.y" { yyval.node = floatNode( OpFloat, yyvsp[0].fValue, NULL, NULL ); } break; case 200: #line 1204 "sdlBrt_tab.y" { yyval.node = stringNode( OpString, yyvsp[0].strValue, NULL, NULL ); } break; case 201: #line 1207 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 202: #line 1210 "sdlBrt_tab.y" { int args = popStack( argCountStack ); checkArgCount( yyvsp[-3].symbol, args ); yyval.node = symbolNode( OpBuiltin, yyvsp[-3].symbol, yyvsp[0].node, NULL ); } break; case 203: #line 1215 "sdlBrt_tab.y" { checkArgCount( yyvsp[0].symbol, 0 ); yyval.node = symbolNode( OpBuiltin, yyvsp[0].symbol, NULL, NULL ); } break; case 204: #line 1219 "sdlBrt_tab.y" { expected("'('"); } break; case 205: #line 1222 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 206: #line 1225 "sdlBrt_tab.y" { int args = popStack( argCountStack ); checkArgCount( yyvsp[-3].symbol, args ); yyval.node = symbolNode( OpFunction, yyvsp[-3].symbol, yyvsp[0].node, NULL ); } break; case 207: #line 1230 "sdlBrt_tab.y" { checkArgCount( yyvsp[0].symbol, 0 ); yyval.node = symbolNode( OpFunction, yyvsp[0].symbol, NULL, NULL ); } break; case 208: #line 1234 "sdlBrt_tab.y" { expected("'('"); } break; case 209: #line 1237 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 210: #line 1240 "sdlBrt_tab.y" { int args = popStack( argCountStack ); checkArgCount( yyvsp[-3].symbol, args ); yyval.node = symbolNode( OpFunction, yyvsp[-3].symbol, yyvsp[0].node, NULL ); } break; case 211: #line 1245 "sdlBrt_tab.y" { expected("'('"); } break; case 212: #line 1248 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 213: #line 1251 "sdlBrt_tab.y" { Symbol *s = addSymbol( yyvsp[-3].strValue, NULL, SYM_FORWARD_FUNCTION ); s->forward = 1; s->code = NULL; s->args = popStack( argCountStack ); free( yyvsp[-3].strValue ); yyval.node = symbolNode( OpFunction, s, yyvsp[0].node, NULL ); } break; case 214: #line 1261 "sdlBrt_tab.y" { expected("an expression"); } break; case 215: #line 1266 "sdlBrt_tab.y" { yyval.node = NULL; } break; case 216: #line 1269 "sdlBrt_tab.y" { yyval.node = yyvsp[-1].node; } break; case 217: #line 1272 "sdlBrt_tab.y" { expected("')'"); } break; case 218: #line 1277 "sdlBrt_tab.y" { incrStack( argCountStack, 1 ); yyval.node = comma( yyvsp[-3].node, yyvsp[0].node ); } break; case 219: #line 1281 "sdlBrt_tab.y" { incrStack( argCountStack, 1 ); yyval.node = yyvsp[0].node; } break; case 220: #line 1285 "sdlBrt_tab.y" { expected("an expression"); } break; case 225: #line 1310 "sdlBrt_tab.y" { createParm( yyvsp[-2].strValue, SYM_ARRAY ); free( yyvsp[-2].strValue ); } break; case 227: #line 1315 "sdlBrt_tab.y" { createParm( yyvsp[-2].symbol->name, SYM_ARRAY ); } break; case 229: #line 1319 "sdlBrt_tab.y" { createParm( yyvsp[-2].symbol->name, SYM_ARRAY ); } break; case 231: #line 1323 "sdlBrt_tab.y" { createParm( yyvsp[0].strValue, SYM_VARIABLE ); free( yyvsp[0].strValue ); } break; case 233: #line 1328 "sdlBrt_tab.y" { createParm( yyvsp[0].symbol->name, SYM_VARIABLE ); } break; case 235: #line 1332 "sdlBrt_tab.y" { createParm( yyvsp[0].symbol->name, SYM_VARIABLE ); } break; case 237: #line 1336 "sdlBrt_tab.y" { currentScope->optargs = NOPTARGS; } break; case 238: #line 1340 "sdlBrt_tab.y" { expected("a parameter name"); } break; case 241: #line 1347 "sdlBrt_tab.y" { expected("')'"); } break; case 242: #line 1352 "sdlBrt_tab.y" { yyval.node = symbolNode( OpForStep, NULL, comma( yyvsp[-6].node, comma(yyvsp[-4].node, yyvsp[-2].node) ), yyvsp[0].node ); } break; case 243: #line 1357 "sdlBrt_tab.y" { yyval.node = symbolNode( OpForStep, NULL, comma( yyvsp[-6].node, comma(yyvsp[-4].node, yyvsp[-2].node) ), yyvsp[0].node ); } break; case 244: #line 1362 "sdlBrt_tab.y" { yyval.node = symbolNode( OpFor, NULL, comma( yyvsp[-4].node, yyvsp[-2].node ), yyvsp[0].node ); } break; case 245: #line 1365 "sdlBrt_tab.y" { yyval.node = symbolNode( OpFor, NULL, comma( yyvsp[-4].node, yyvsp[-2].node ), yyvsp[0].node ); } break; case 246: #line 1368 "sdlBrt_tab.y" { expected("Step"); } break; case 247: #line 1371 "sdlBrt_tab.y" { expected("To"); } break; case 248: #line 1374 "sdlBrt_tab.y" { expected("'='"); } break; case 249: #line 1379 "sdlBrt_tab.y" { yyval.node = yyvsp[0].node; } break; case 250: #line 1382 "sdlBrt_tab.y" { yyval.node = intNode( OpPrintValue, PRINT_TAB, NULL, yyvsp[0].node ); } break; case 251: #line 1385 "sdlBrt_tab.y" { yyval.node = intNode( OpPrintValue, PRINT_TAB, yyvsp[-2].node, yyvsp[0].node ); } break; case 252: #line 1388 "sdlBrt_tab.y" { yyval.node = intNode( OpPrintValue, PRINT, yyvsp[-2].node, yyvsp[0].node ); } break; case 253: #line 1391 "sdlBrt_tab.y" { yyval.node = intNode( OpPrintValue, PRINT_NEWLINE, yyvsp[0].node, NULL ); } break; case 254: #line 1394 "sdlBrt_tab.y" { yyval.node = NULL; } break; case 255: #line 1398 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 256: #line 1400 "sdlBrt_tab.y" { int args = peekStack( argCountStack ); yyval.node = comma( yyvsp[0].node, intNode( OpInt, args, NULL, NULL ) ); } break; case 257: #line 1407 "sdlBrt_tab.y" { incrStack( argCountStack, 1 ); yyval.node = comma( yyvsp[-1].node, NULL ); } break; case 258: #line 1411 "sdlBrt_tab.y" { incrStack( argCountStack, 1 ); yyval.node = comma( yyvsp[0].node, yyvsp[-3].node ); } break; case 259: #line 1418 "sdlBrt_tab.y" { if (yyvsp[-3].node==NULL) { yyval.node = yyvsp[0].node; } else if (yyvsp[0].node==NULL) { yyval.node = yyvsp[-3].node; } else { yyval.node = comma( yyvsp[-3].node, yyvsp[0].node ); } } break; case 260: #line 1427 "sdlBrt_tab.y" { yyval.node = yyvsp[0].node; } break; case 261: #line 1432 "sdlBrt_tab.y" { Symbol *s = createArraySymbol( yyvsp[-2].strValue, 0 ); yyval.node = symbolNode( OpInitArray, s, NULL, NULL ); free( yyvsp[-2].strValue ); } break; case 262: #line 1437 "sdlBrt_tab.y" { int args = popStack( argCountStack ); Symbol *s = createArraySymbol( yyvsp[-2].strValue, args ); yyval.node = symbolNode( OpInitArray, s, yyvsp[0].node, NULL ); free( yyvsp[-2].strValue ); } break; case 263: #line 1443 "sdlBrt_tab.y" { Symbol *s = createArraySymbol( yyvsp[-2].symbol->name, 0 ); yyval.node = symbolNode( OpInitArray, s, NULL, NULL ); } break; case 264: #line 1447 "sdlBrt_tab.y" { int args = popStack( argCountStack ); Symbol *s = createArraySymbol( yyvsp[-2].symbol->name, args ); yyval.node = symbolNode( OpInitArray, s, yyvsp[0].node, NULL ); } break; case 265: #line 1452 "sdlBrt_tab.y" { Symbol *s = createArraySymbol( yyvsp[-2].symbol->name, 0 ); yyval.node = symbolNode( OpInitArray, s, NULL, NULL ); } break; case 266: #line 1456 "sdlBrt_tab.y" { int args = popStack( argCountStack ); Symbol *s = createArraySymbol( yyvsp[-2].symbol->name, args ); yyval.node = symbolNode( OpInitArray, s, yyvsp[0].node, NULL ); } break; case 267: #line 1461 "sdlBrt_tab.y" { yyval.node = symbolNode( OpAssign, returnVar(yyvsp[-2].strValue, SYM_VARIABLE, 1), NULL, yyvsp[0].node ); free( yyvsp[-2].strValue ); } break; case 268: #line 1465 "sdlBrt_tab.y" { returnVar(yyvsp[0].strValue, SYM_VARIABLE, 1); free( yyvsp[0].strValue ); yyval.node = NULL; } break; case 269: #line 1470 "sdlBrt_tab.y" { yyval.node = symbolNode( OpAssign, returnVar(yyvsp[-2].symbol->name, SYM_VARIABLE, 1), NULL, yyvsp[0].node ); } break; case 270: #line 1473 "sdlBrt_tab.y" { returnVar(yyvsp[0].symbol->name, SYM_VARIABLE, 1); yyval.node = NULL; } break; case 271: #line 1477 "sdlBrt_tab.y" { yyval.node = symbolNode( OpAssign, returnVar(yyvsp[-2].symbol->name, SYM_VARIABLE, 1), NULL, yyvsp[0].node ); } break; case 272: #line 1480 "sdlBrt_tab.y" { returnVar(yyvsp[0].symbol->name, SYM_VARIABLE, 1); yyval.node = NULL; } break; case 273: #line 1484 "sdlBrt_tab.y" { expected("a name"); } break; case 274: #line 1489 "sdlBrt_tab.y" { pushStack( argCountStack, 0 ); } break; case 275: #line 1491 "sdlBrt_tab.y" { int args = peekStack( argCountStack ); yyval.node = comma( yyvsp[0].node, intNode( OpInt, args, NULL, NULL ) ); } break; case 276: #line 1497 "sdlBrt_tab.y" { incrStack( argCountStack, 1 ); yyval.node = comma( yyvsp[-1].node, intNode( OpInt, 0, NULL, NULL) ); } break; case 277: #line 1501 "sdlBrt_tab.y" { incrStack( argCountStack, 1 ); yyval.node = comma( yyvsp[-1].node, yyvsp[-3].node ); } break; case 278: #line 1505 "sdlBrt_tab.y" { incrStack( argCountStack, 1 ); yyval.node = comma( yyvsp[0].node, comma( yyvsp[-3].node, yyvsp[-5].node) ); } break; case 279: #line 1509 "sdlBrt_tab.y" { incrStack( argCountStack, 1 ); yyval.node = comma( yyvsp[0].node, comma( yyvsp[-3].node, intNode( OpInt, 0, NULL, NULL)) ); } break; case 282: #line 1521 "sdlBrt_tab.y" { if (yyvsp[0].symbol->scope != NULL) { ePrintf( Syntax, "Can't share local variable %s", yyvsp[0].symbol->name ); } else if (inStack(sharedStack,(int)yyvsp[0].symbol)) { ePrintf( Syntax, "Variable %s is already shared", yyvsp[0].symbol->name ); } else { pushStack( sharedStack, (int)yyvsp[0].symbol ); } } break; case 283: #line 1534 "sdlBrt_tab.y" { if (yyvsp[-2].symbol->scope != NULL) { ePrintf( Syntax, "Can't share local array %s", yyvsp[-2].symbol->name ); } else if (inStack(sharedStack,(int)yyvsp[-2].symbol)) { ePrintf( Syntax, "Array %s is already shared", yyvsp[-2].symbol->name ); } else { pushStack( sharedStack, (int)yyvsp[-2].symbol ); } } break; case 284: #line 1546 "sdlBrt_tab.y" { expected("']'"); } break; case 285: #line 1549 "sdlBrt_tab.y" { expected("'['"); } break; case 286: #line 1552 "sdlBrt_tab.y" { expected("a variable name"); } break; case 292: #line 1567 "sdlBrt_tab.y" { incrStack( argCountStack, 1 ); if (yyvsp[-1].symbol->stackPos != peekStack(argCountStack) ) { ePrintf( Syntax, "variable %s does not match declaration", yyvsp[-1].symbol->name); } } break; case 293: #line 1574 "sdlBrt_tab.y" { incrStack( argCountStack, 1 ); if (yyvsp[-2].symbol->stackPos != peekStack(argCountStack) ) { ePrintf( Syntax, "variable %s does not match declaration", yyvsp[-2].symbol->name); } } break; case 295: #line 1581 "sdlBrt_tab.y" { ePrintf( Syntax, "parm list does not match declaration" ); } break; case 296: #line 1585 "sdlBrt_tab.y" { incrStack( argCountStack, 1 ); if (yyvsp[-3].symbol->stackPos != peekStack(argCountStack) ) { ePrintf( Syntax, "array %s does not match declaration", yyvsp[-3].symbol->name); } } break; case 297: #line 1591 "sdlBrt_tab.y" { incrStack( argCountStack, 1 ); if (yyvsp[-4].symbol->stackPos != peekStack(argCountStack) ) { ePrintf( Syntax, "array %s does not match declaration", yyvsp[-4].symbol->name); } } break; case 299: #line 1598 "sdlBrt_tab.y" { ePrintf( Syntax, "parm list does not match declaration" ); } break; case 300: #line 1602 "sdlBrt_tab.y" { expected("']'"); } break; case 301: #line 1605 "sdlBrt_tab.y" { expected("'['"); } break; case 302: #line 1608 "sdlBrt_tab.y" { if (currentScope->optargs != NOPTARGS) { ePrintf( Syntax, "... does not match declaration" ); } } break; case 303: #line 1613 "sdlBrt_tab.y" { ePrintf( Syntax, "parm list does not match declaration" ); } break; case 308: #line 1631 "sdlBrt_tab.y" { yyval.iValue = FILE_MODE_INPUT; } break; case 309: #line 1634 "sdlBrt_tab.y" { yyval.iValue = FILE_MODE_OUTPUT; } break; case 310: #line 1637 "sdlBrt_tab.y" { yyval.iValue = FILE_MODE_APPEND; } break; case 311: #line 1640 "sdlBrt_tab.y" { expected("a file mode: Input, Output or Append"); } break; case 312: #line 1645 "sdlBrt_tab.y" { if (yyvsp[0].node == NULL) { yyval.node = yyvsp[-3].node; } else { yyval.node = comma( yyvsp[-3].node, yyvsp[0].node ); } } break; case 313: #line 1653 "sdlBrt_tab.y" { yyval.node = yyvsp[0].node; } break; case 314: #line 1658 "sdlBrt_tab.y" { yyval.node = symbolNode( OpConstSet, createConst( yyvsp[-2].strValue ), yyvsp[0].node, NULL ); free( yyvsp[-2].strValue ); } break; case 315: #line 1662 "sdlBrt_tab.y" { expected("'='"); } break; case 316: #line 1665 "sdlBrt_tab.y" { ePrintf( Syntax, "duplicate definition"); } break; case 317: #line 1670 "sdlBrt_tab.y" { yyval.node = yyvsp[0].node; } break; case 318: #line 1672 "sdlBrt_tab.y" { yyval.node = yyvsp[0].node; } break; } /* Line 991 of yacc.c. */ #line 4217 "y.tab.c" yyvsp -= yylen; yyssp -= yylen; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if YYERROR_VERBOSE yyn = yypact[yystate]; if (YYPACT_NINF < yyn && yyn < YYLAST) { YYSIZE_T yysize = 0; int yytype = YYTRANSLATE (yychar); char *yymsg; int yyx, yycount; yycount = 0; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) yysize += yystrlen (yytname[yyx]) + 15, yycount++; yysize += yystrlen ("syntax error, unexpected ") + 1; yysize += yystrlen (yytname[yytype]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); yyp = yystpcpy (yyp, yytname[yytype]); if (yycount < 5) { yycount = 0; for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); yyp = yystpcpy (yyp, yytname[yyx]); yycount++; } } yyerror (yymsg); YYSTACK_FREE (yymsg); } else yyerror ("syntax error; also virtual memory exhausted"); } else #endif /* YYERROR_VERBOSE */ yyerror ("syntax error"); } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ /* Return failure if at end of input. */ if (yychar == YYEOF) { /* Pop the error token. */ YYPOPSTACK; /* Pop the rest of the stack. */ while (yyss < yyssp) { YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); yydestruct (yystos[*yyssp], yyvsp); YYPOPSTACK; } YYABORT; } YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); yydestruct (yytoken, &yylval); yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab2; /*----------------------------------------------------. | yyerrlab1 -- error raised explicitly by an action. | `----------------------------------------------------*/ yyerrlab1: /* Suppress GCC warning that yyerrlab1 is unused when no action invokes YYERROR. */ #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) __attribute__ ((__unused__)) #endif goto yyerrlab2; /*---------------------------------------------------------------. | yyerrlab2 -- pop states until the error token can be shifted. | `---------------------------------------------------------------*/ yyerrlab2: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); yydestruct (yystos[yystate], yyvsp); yyvsp--; yystate = *--yyssp; YY_STACK_PRINT (yyss, yyssp); } if (yyn == YYFINAL) YYACCEPT; YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #ifndef yyoverflow /*----------------------------------------------. | yyoverflowlab -- parser overflow comes here. | `----------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ #endif yyreturn: #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif return yyresult; } usr/src/sdlBasic/src/sdlBrt/symbol.c0000777000076500007660000001012110463131223014624 0ustar /* Name: symbol.c Purpose: Data structures for wxBasic symbols Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ /* maskIfHidden: mask if symbol is hidden */ Symbol *maskIfHidden( Symbol *s ) { /* only applies to variables and arrays */ if (s->symboltype != SYM_VARIABLE && s->symboltype != SYM_ARRAY ) { return s; } /* visible if in current scope or common */ if (s->scope == currentScope || s->common ) { return s; } /* visible global? */ if (currentScope != NULL) { /* can see if no explict option set */ if (!explicitFlag) { return s; } /* visible if not shared */ if (inStack(sharedStack, (int)s )) { return s; } } return NULL; } /* findSymbol: find symbol in symbol list */ Symbol *findSymbol( char *name, Symbol *scope ) { Symbol *s; /* name isn't tested, because it can come from a static table */ eMemTest( "findSymbol: scope", scope ); for ( s = lastSymbol; s != NULL; s = s->prior ) { /* in scope or common? */ if (s->scope == scope || s->common ) { /* same name? */ if (strcmp( s->name, name ) == 0 ) { /* hidden? */ return maskIfHidden(s); } } } return NULL; } /* addChildSymbol: add sibling to symbol */ void addChildSymbol( Symbol *s, Symbol *child ) { eMemTest( "addChildSymbol: parent", s ); eMemTest( "addChildSymbol: child", child ); /* first child? */ if (s->child == NULL) { s->child = child; return; } /* walk to end of sibling chain */ for ( s = s->child; s->sibling != NULL; s = s->sibling ) { eMemTest( "addChildSymbol: sibling", s ); } s->sibling = child; } /* addSymbol: add symbol to symbol list */ Symbol *addSymbol( char *name, Symbol *scope, int symboltype ) { Symbol *s; /* name isn't tested, because it can come from a static table */ eMemTest( "addSymbol: scope", scope ); s = findSymbol( name, scope ); if (s != NULL) { ePrintf( Runtime, "addSymbol: %s %s is already defined as %s", symbolName[symboltype], name, symbolName[s->symboltype] ); } s = (Symbol *)eMalloc( sizeof( Symbol ) ); s->name = eCopyString( name ); s->symboltype = symboltype; s->klass = 0; s->scope = scope; s->common = commonFlag; s->stackPos = 0; s->args = 0; s->optargs = 0; s->locals = 0; s->prior = lastSymbol; s->child = NULL; s->sibling = NULL; s->forward = 0; s->code = NULL; s->builtin = NULL; lastSymbol = s; return s; } /* findChildSymbol: find symbol in symbol list with given index */ Symbol *findChildSymbol( Symbol *parent, int index ) { Symbol *child; eMemTest( "addChildSymbol: parent", parent ); /* get child */ index--; child = parent->child; eMemTest( "addChildSymbol: child", child ); if (index==0) { return child; } while (index > 0) { index--; /* get next sibling */ child = child->sibling; eMemTest( "addChildSymbol: sibling", child ); /* end of chain? */ if (child == NULL) { break; } } return child; } /* checkArgCount: aborts with error if arg count doesn't match */ void checkArgCount( Symbol *s, int args ) { int minArgs = s->args, maxArgs = minArgs + s->optargs; eMemTest( "checkArgCount: s", s ); if (s->optargs == 0) { if (args != s->args ) { ePrintf( Syntax, "%s %s expects %d args, not %d", symbolName[s->symboltype], s->name, s->args, args ); } } else if (args < minArgs ) { ePrintf( Syntax, "%s %s expects at least %d args, not %d", symbolName[s->symboltype], s->name, minArgs, args ); } else if (args > maxArgs ) { ePrintf( Syntax, "%s %s expects at most %d args, not %d", symbolName[s->symboltype], s->name, maxArgs, args ); } } usr/src/sdlBasic/src/sdlBrt/keyword.h0000777000076500007660000000044310463131040015013 0ustar /* Name: keyword.h Purpose: keywords for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ typedef struct Keyword Keyword; struct Keyword { char *name; int value; }; void initKeywords(void); usr/src/sdlBasic/src/sdlBrt/symbol.h0000777000076500007660000000460410463131223014642 0ustar /* Name: symbol.h Purpose: Data structures for wxBasic symbols Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ /* types of symbols */ enum { SYM_KEYWORD = 1, /* keyword */ SYM_VARIABLE, /* variable */ SYM_ARRAY, /* array */ SYM_CONSTANT, /* constant, variant */ SYM_BUILTIN, /* builtin function */ SYM_FUNCTION, /* user defined function */ SYM_SUB, /* user defined subroutine */ SYM_FORWARD_SUB, /* forward reference to sub */ SYM_FORWARD_FUNCTION, /* forward reference to function */ SYM_CLASS /* wrapped c++ class */ }; char *symbolName[] = { "undefined", "keyword", "variable", "array", "constant", "function", "function", "sub", "sub (forward referenced)", "function (forward referenced)", "class" }; struct Symbol { char *name; /* name */ int symboltype; /* type */ int klass; /* used to differentiate classes */ Symbol *scope; /* if NULL, module level */ int common; /* if true, global in scope */ int stackPos; /* position of variable on stack */ int args; /* required args */ int optargs; /* optional args */ int locals; /* total count of variables */ int indexes; /* count of indexes */ Symbol *prior; /* prior symbol */ Symbol *child; /* link to first child */ Symbol *sibling; /* link to next sibling */ Node *code; /* bytecodes */ int forward; /* forward reference, code undefined */ void (*builtin)(void); /* builtin function */ }; Symbol *lastSymbol = NULL; Symbol *maskIfHidden( Symbol *s ); Symbol *findSymbol( char *name, Symbol *scope ); void addChildSymbol( Symbol *s, Symbol *child ); Symbol *addSymbol( char *name, Symbol *scope, int symboltype ); Symbol *findChildSymbol( Symbol *parent, int index ); void checkArgCount( Symbol *s, int args ); usr/src/sdlBasic/src/sdlBrt/var.c0000777000076500007660000000736510463131223014127 0ustar /* Name: var.c Purpose: wxBasic simple variables Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ /* returnVar: return symbol for var, can optionally create it. */ Symbol *returnVar( char *name, int symType, int create ) { Symbol *s; /* look in scope */ s = findSymbol( name, currentScope ); /* global? */ if (s==NULL && currentScope != NULL && !create) { s = findSymbol( name, NULL ); } /* create request, but already exists? */ if (create && s != NULL) { ePrintf( Syntax, "%s already exists as %s", name, symbolName[s->symboltype]); } /* validate before passing back */ if (s != NULL) { if (s->symboltype != symType) { ePrintf( Syntax, "%s is a %s, not a %s", s->name, symbolName[s->symboltype], symbolName[symType] ); } else { return s; } } /* can't implicitly create it? */ if (!create && explicitFlag) { ePrintf( Syntax, "%s has not been declared\n", name ); } s = addSymbol( name, currentScope, symType ); if (currentScope==NULL) { /* create as global */ s->stackPos = addGlobalToStack(); stack[s->stackPos].datatype = DATA_UNDEFINED; } else { /* create as local */ currentScope->locals++; s->stackPos = currentScope->locals + currentScope->optargs; /* set as child */ addChildSymbol( currentScope, s ); } return s; } /* createConst: create constant */ Symbol *createConst( char *name ) { Symbol *s = NULL; s = addSymbol( name, currentScope, SYM_CONSTANT ); /* create as global */ s->stackPos = addGlobalToStack(); stack[s->stackPos].datatype = DATA_NUMBER; stack[s->stackPos].value.number = 0; return s; } /* createParm: create a parameter */ Symbol *createParm( char *name, int symType ) { Symbol *s; s = returnVar( name, symType, 1 ); if (symType == SYM_ARRAY) { s->args = 1; s->optargs = NINDEX; } currentScope->args++; currentScope->locals = currentScope->args; return s; } /* varStackPos: return position of var on stack */ int varStackPos( Symbol *s ) { /* function return values are at the start of locals */ if (s->symboltype == SYM_FUNCTION) { return localstart; } if (s->scope == NULL) { /* absolute position */ return s->stackPos; } else { /* relative position */ return localstart+(s->stackPos); } } /* setStack: store tos value at index */ void setStack( int index ) { Variant *source, *dest; /* should not happen */ if (index<0) { ePrintf( Runtime, "setStack: stack error" ); } source = getStackPointer( tos ); dest = getStackPointer( index ); /* free string currently stored? */ if (dest->datatype == DATA_STRING) { free( dest->value.string ); } if (source->datatype == DATA_STRING) { dest->datatype= DATA_STRING; dest->value.string = popString(); } else if (source->datatype == DATA_NUMBER) { dest->datatype= DATA_NUMBER; dest->value.number = popNumber(); } else if (source->datatype == DATA_OBJECT) { dest->datatype= DATA_OBJECT; dest->value.number = popNumber(); } else { ePrintf( Runtime, "setStack: can't fetch %s", datumName[dest->datatype] ); } } /* setVar: store tos in local variable */ void setVar( Symbol *s ) { setStack( varStackPos( s ) ); } /* setReturn: store tos in return */ void setReturn() { setStack( localstart-1 ); } /* getVar: push variable pointer or value onto stack */ void getVar( Symbol *s ) { copyStackItem( varStackPos( s ) ); } usr/src/sdlBasic/src/sdlBrt/RCsdlBrt.rc0000777000076500007660000000056710463130277015205 0ustar // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDI_ICON1 ICON DISCARDABLE "doc_default.ico" IDI_ICON2 ICON DISCARDABLE "sdlBasic.ico" IDI_ICON3 ICON DISCARDABLE "doc_sdlblib.ico" IDI_ICON4 ICON DISCARDABLE "doc_sdlbas.ico" usr/src/sdlBasic/src/sdlBrt/error.h0000777000076500007660000000233510463130770014473 0ustar /* Name: error.h Purpose: error support routines Author: David Cuny Partially derived from Brian Kernighan and Rob Pike The Practice of Programming */ typedef struct MemLink MemLink; struct MemLink { int start; /* start of allocated block */ int end; /* end of allocated block */ MemLink *next; /* in list */ }; extern MemLink *lastMemLink ;//=NULL enum { Init, /* initialization error */ Syntax, /* syntax error */ Runtime /* runtime error */ }; //static char *eprogname = NULL; /* program name for messages */ extern void eShutdown( int errorlevel ); extern void ePrintf( int errType, char *fmt, ... ); extern void eConsole( char *fmt, ... ); extern void eAddMemLinkDebug( void *p, int n ); extern void eRemoveMemLinkDebug( void *address ); extern MemLink *lookupMemLink( void *p ); extern void eMemTestDebug( char *message, void *address ); extern void freeMemLinksDebug( void ); extern char *eCopyString(char *s); extern void expected( char *expect ); extern void *eMalloc(size_t size); extern void *eRealloc( void *old, size_t size); extern void eFreeDebug( void *address ); extern void screendebug(); usr/src/sdlBasic/src/sdlBrt/builtin.c0000755000076500007660000037433610637402153015014 0ustar /* Name: builtin.c Purpose: builtin routines for wxBasic modify for sdlBasic Author: David Cuny modify __vroby__ Copyright: (c) 2001 David Cuny Licence: LGPL */ void notYet( char *name ) { error_description="not implemented yet "; error_type=1; ePrintf( Runtime, "%s is not implemented yet", name ); } //_______________________________________________________________________________________________________________________ /* basPrintStack: debugging wrapper of printStack */ void basPrintStack() { printStack(); pushNumber( 0 ); } //_______________________________________________________________________________________________________________________ /* basConcat: concatenate two strings */ void basConcat() { int len1, len2; char *string1, *string2, *buffer; string2 = popString(); string1 = popString(); len1 = strlen( string1 ), len2 = strlen( string2 ); buffer = (char *)eMalloc( len1 + len2 + 1 ); memcpy( buffer, string1, len1 ); memcpy( buffer+len1, string2, len2 ); buffer[len1+len2] = '\0'; pushString( buffer ); /* * ivanixcu: debug memleak */ eFree(string1); eFree(string2); } //_______________________________________________________________________________________________________________________ /* basConvBas: returns representation from base to base */ void basConvBase() { notYet("ConvBase"); pushNumber(0); } //_______________________________________________________________________________________________________________________ void basIndexes() { int indexes; /* array is on stack */ indexes = getArrayIndexes(); popNumber(); pushNumber(indexes); } //_______________________________________________________________________________________________________________________ //_________________________________________________________________________________________________________________________ // // Run time //_________________________________________________________________________________________________________________________ //_______________________________________________________________________________________________________________________ /* bas Arguments :return the arguments(n) or the number of arguments */ void basArgument() { int index; if (argCount==0){ //copyStackItem( localstart ); pushNumber(cmdArgc); } else{ index = (int)popNumber(); //copyStackItem( localstart+index ); pushStringCopy( cmdArgv[index]); } } //_______________________________________________________________________________________________________________________ /* basArgc: return number of args in caller */ void basArgc() { /* arg count is at localstart */ //copyStackItem( localstart ); pushNumber(cmdArgc); } //_______________________________________________________________________________________________________________________ /* basArgv: return arg onto stack */ void basArgv() { int index; index = (int)popNumber(); pushStringCopy( cmdArgv[index]); } //_______________________________________________________________________________________________________________________ /* basCommand: returns requested arg from command line */ void basCommand() { int argNum; /* was an arg passed? */ if (argCount == 0) { /* return count of args */ pushNumber( cmdArgc ); } else { /* get arg number */ argNum = popNumber(); if (argNum < 0 || argNum > cmdArgc) { /* out of range */ pushStringCopy( "" ); } else { /* return copy of arg */ pushStringCopy( cmdArgv[ argNum-1 ] ); } } } //_______________________________________________________________________________________________________________________ //setenv(varname,value): set a enviremont variable in currently os. if variable exist it will be overwrite void basSetEnv() { char * varname; char *value; #if defined(WIN32) char *cmd; #endif value=popString(); varname=popString(); #if defined(WIN32) cmd=(char *)malloc(512); strcpy(cmd,"set "); strcat(cmd,varname); strcat(cmd,"="); strcat(cmd,value); cmd[strlen(cmd)]='\0'; pushNumber(system(cmd)); #else pushNumber(setenv(varname,value,1)); #endif } //_______________________________________________________________________________________________________________________ //getenv(varname): return the value of enviremont variable in currently os void basGetEnv() { char *varname; varname=popString(); pushStringCopy( getenv(varname) ); eFree(varname); } //_______________________________________________________________________________________________________________________ /* basRun: run command on new thread */ void basRun() { notYet("Run"); pushNumber(0); } //_______________________________________________________________________________________________________________________ /* basShell: execute command, wait until finished */ void basShell() { char *string; string = popString(); system(string); eFree(string); pushNumber(0); } //_______________________________________________________________________________________________________________________ /* basStop:block the code and start debug */ void basStop() { debug=1; error_type=2; error_description="stop encountered"; screendebug(); pushNumber(0); } //_______________________________________________________________________________________________________________________ // // Array //_________________________________________________________________________________________________________________________ /* basLBound: returns lower bound of array */ void basLBound() { int index, range; index = popNumber(); /* leave array pointer on stack */ range = getArrayBound( index, 0 ); /* pop array pointer */ popNumber(); pushNumber(range); } //_______________________________________________________________________________________________________________________ /* basQuickSort: sort an array */ void basQuickSort() { notYet("QuickSort"); pushNumber(0); } //_______________________________________________________________________________________________________________________ /* basUBound: upperbound of array */ void basUBound() { int index, range; index = popNumber(); /* leave array pointer on stack */ range = getArrayBound( index, 1 ); /* pop array pointer */ popNumber(); pushNumber(range); } //_______________________________________________________________________________________________________________________ // //Strings //_________________________________________________________________________________________________________________________ /* basAsc: returns ascii value of first char in string */ void basAsc() { char *string; string = popString(); // pushNumber( (unsigned char)string[0] ); pushNumber( asc(string)); eFree( string ); } //_______________________________________________________________________________________________________________________ /* basChr: return string corresponding to ascii key value */ void basChr() { char *buffer = (char *)eMalloc(sizeof(char)*2); buffer[0] = (char)popNumber(); buffer[1] = '\0'; pushString( buffer ); } //_______________________________________________________________________________________________________________________ /* basFormat: returns formatted string with embedded args */ void basFormat() { notYet("Format"); pushNumber(0); } //_______________________________________________________________________________________________________________________ /* basInsert: insert source string to target at index */ void basInsert() { char *source, *target; //*,dest; int i; i = (int)popNumber(); target = popString(); source = popString(); //dest = (char *) eMalloc(strlen(source)+strlen(target)+1); //strcpy(dest,""); //strncpy(dest,source,i); //strcpy(&dest[i],target); //strcat(dest,source+i); //pushStringCopy(dest); pushString((char *)insert(source,target,i)); //eFree(dest); eFree(source); eFree(target); } //_______________________________________________________________________________________________________________________ /* basInstr: returns position in source that target was found */ void basInstr() { //int searchLen, findLen, i; int start; char *find, *search; find = popString(); search = popString(); if (argCount==3) { start = (int)popNumber()-1; if (start < 0) { start = 0; } } else { start = 0; } //searchLen = strlen( search ); //findLen = strlen( find ); /* searching for empty string? */ //if (searchLen == 0 || findLen == 0) { // pushNumber( 0 ); // return; //} //start = (int)floor( start ); //for ( i = start; i < searchLen; i++ ) { // if (strncmp( search+i, find, findLen ) == 0) { // pushNumber( i+1 ); // return; // } //} /* not found */ //pushNumber( 0 ); pushNumber(instr(start,find, search)); /* ivanixcu: fix memleak */ eFree(find); eFree(search); } //_______________________________________________________________________________________________________________________ /* basLCase: convert string to lower case */ void basLCase() { //int len, i; char *string; string = popString(); pushString(lcase(string)); //len = strlen( string ); //for ( i = 0; i len-1) { pushStringCopy( string ); eFree(string); return; } if (pos < 1) { eFree( string ); pushStringCopy( "" ); return; } newLen = (pos); left = (char *) eMalloc(newLen+1); for (pos=newLen;pos>0;pos--)left[pos]='\0'; //memcpy(left,string,newLen); strncpy(left,string,newLen); left[newLen] = '\0'; eFree( string ); pushStringCopy( left ); eFree(left); */ } //_______________________________________________________________________________________________________________________ /* basLen: return length of string */ void basLen() { char *string; string = popString(); pushNumber(len(string)); /* pushNumber( strlen( string ) ); eFree( string ); */ } //_______________________________________________________________________________________________________________________ /* basLTrim: returns string with left whitespace removed */ void basLTrim() { //char *trimmed; char *string; string = popString(); pushString(ltrim(string)); /* trimmed = string; while ( trimmed[0] != '\0' ) { if (!isspace(trimmed[0])) { break; } trimmed++; } pushStringCopy( trimmed ); eFree( string ); */ } //_______________________________________________________________________________________________________________________ /* basMid: returns string with chars 1..n from source */ void basMid() { //int j,len; //char *buffer; int i,n; char *string; n=0; /* get args */ if (argCount==3) n = (int)popNumber(); i = (int)popNumber(); string = popString(); if (argCount!=3) n=strlen(string)+1-i; pushString(mid(string, i, n)); /* early outs len = strlen( string ) - i; if ( i < 1 || len < 0 ) { pushStringCopy(""); eFree( string ); return; } buffer = (char *)eMalloc(len+2); for ( j = 0; j < n; j++ ) { if (string[i+j-1] == '\0' ) { break; } buffer[j] = string[i+j-1]; } buffer[j] = '\0'; pushStringCopy( buffer ); eFree( string ); */ } //_______________________________________________________________________________________________________________________ /* basReplace: replace string from source with replace starting at index */ void basReplace() { //int a; //char *dest; int i; char *src, *rep; rep = popString(); src = popString(); if (argCount == 3) i = (int)popNumber(); else i = 0; pushString(replace(src, rep, i)); /* dest=eCopyString(src); for(a=0;a=strlen(dest))break; dest[i+a]=rep[a]; } pushString(dest); eFree(rep); eFree(src); */ } //_______________________________________________________________________________________________________________________ /* basReplaceSubStr: replace substring in source with withstring */ void basReplaceSubStr() { //unsigned int i; //char *dest; int start; char *source, *replace, *with; with = popString(); replace = popString(); source = popString(); if (argCount==4) start=popNumber(); else start=0; pushString(replacesubstr(start, source, replace, with)); /* i=0; while (i= len) { pushStringCopy( string ); eFree( string ); return; } if (pos < 1) { eFree( string ); pushStringCopy( "" ); return; } newLen = pos+1; right = (char *)eMalloc((newLen+1)); memcpy(right,string+(len-pos),newLen); right[newLen]=0; pushStringCopy( right ); eFree( right ); eFree( string ); */ } //_______________________________________________________________________________________________________________________ /* basRInstr: reverse Instr function, search from end to start */ void basRInstr() { //int searchLen, findLen, i; int start; char *find, *search; find = popString(); search = popString(); /* optional starting position */ if (argCount==3) { start = (int)popNumber()-1; //if (start > searchLen ) { // start = searchLen-1; //} } else { start=-1; //start = searchLen-1; } pushNumber(rinstr( search, find, start)); /* findLen = strlen( find ); searchLen = strlen( search ); // searching for empty string? if (searchLen == 0 || findLen == 0) { pushNumber( 0 ); return; } // search for ( i = start; i >= 0; i-- ) { if (strncmp( search+i, find, findLen ) == 0) { pushNumber( i+1 ); return; } } // not found pushNumber( 0 ); */ } //_______________________________________________________________________________________________________________________ /* basRTrim: right trim string */ void basRTrim() { //int len, i; char *string; string = popString(); pushString(rtrim(string)); /* len = strlen(string); for ( i = len-1; i > -1; i-- ) { if (!isspace(string[i])) { string[i+1] = '\0'; pushString( string ); return; } } string[0] = '\0'; pushString( string ); */ } //_______________________________________________________________________________________________________________________ /* basSpace: return string with n spaces in it */ void basSpace() { //char *string; int n; n = (int)popNumber(); pushString(space(n)); /* if (n<0) { n = 0; } string = (char *)eMalloc((unsigned int)n+1); memset(string,' ',n); string[n] = '\0'; pushString(string); */ } //_______________________________________________________________________________________________________________________ /* basStr: return string representation of numeric expression */ void basStr() { char *string; string = popString(); pushStringCopy( string ); eFree(string); } //_______________________________________________________________________________________________________________________ /* basStrF: converts a floating point or number value to a string */ void basStrF() { char *string; string = popString(); pushStringCopy( string ); eFree(string); } //_______________________________________________________________________________________________________________________ /* basString: returns string m chars wide with n in it */ void basString() { //int l,i; //char *buffer; int n; char *_string; _string = popString(); n = (int)popNumber(); pushString(string( n, _string)); /* l=strlen(string)+1; buffer = (char *)eMalloc((l*n)+1); strcpy(buffer,""); for (i=0;i -1; i-- ) { if (!isspace(string[i])) { string[i+1] = '\0'; //pushString( string ); break; } } if (i==0) string[0] = '\0'; trimmed=string; while ( trimmed[0] != '\0' ) { if (!isspace(trimmed[0])) { break; } trimmed++; } pushStringCopy( trimmed ); eFree( string ); */ } //_______________________________________________________________________________________________________________________ /* basTypeOf: returns string with datatype */ void basTypeOf() { int datatype; Variant *v; v = getStackPointer( tos ); datatype = v->datatype; dropTos(); switch(datatype) { case DATA_NUMBER: pushStringCopy( "number" ); break; case DATA_STRING: pushStringCopy( "string" ); break; case DATA_OBJECT: pushStringCopy( "object" ); break; default: pushStringCopy( "unknown" ); break; } } //_______________________________________________________________________________________________________________________ /* basUCase: convert string to upper case */ void basUCase() { //int len, i; char *string; string = popString(); pushString(ucase(string)); /* len = strlen( string ); for ( i = 0; i0){ if ((i%2)==0) strcat(buffer,"0"); else strcat(buffer,"1"); i=i /2; } l=strlen(buffer); ret = (char *)eMalloc(l+1); for (i=0;i 0) { if ((n1 - n2) > 0.5) { n2++; } } else { if (-(n2 - n1) > 0.5) { n2++; } } pushNumber( n2 ); } //_______________________________________________________________________________________________________________________ /* basSgn: returns sign of numeric expression */ void basSgn() { Number n; n = popNumber(); if (n < 0) { pushNumber(-1); } else if (n > 0) { pushNumber(1); } else { pushNumber(0); } } //_______________________________________________________________________________________________________________________ /* basSin: returns sine of given angle in radians */ void basSin() { pushNumber( sin( popNumber() ) ); } //_______________________________________________________________________________________________________________________ /* basSqr: return square root - make sure it's non-negative */ void basSqr() { pushNumber( sqrt( popNumber() ) ); } //_______________________________________________________________________________________________________________________ /* basTan: return tanget of given angle in radians */ void basTan() { pushNumber( tan( popNumber() ) ); } //_______________________________________________________________________________________________________________________ /* basMin: return min number of the operands */ void basMin() { double a,b; a=popNumber(); b=popNumber(); if (ba)a=b; pushNumber(a); } //_______________________________________________________________________________________________________________________ /* basBitwiseAnd: return the logic and of the operands */ void basBitwiseAnd() { int a,b; a=popNumber(); b=popNumber(); pushNumber(a & b); } //_______________________________________________________________________________________________________________________ /* basBitwiseOr: return the logic or of the operands */ void basBitwiseOr() { int a,b; a=popNumber(); b=popNumber(); pushNumber(a | b); } //_______________________________________________________________________________________________________________________ /* basBitwiseXor: return the logic xor of the operands */ void basBitwiseXor() { int a,b; a=popNumber(); b=popNumber(); pushNumber(a ^ b); } //_______________________________________________________________________________________________________________________ // //Files //_________________________________________________________________________________________________________________________ /* basEof: returns nonzero if Eof */ void basEof() { pushNumber( (Number)fileEof( (int)popNumber() ) ); } //_______________________________________________________________________________________________________________________ /* basFileExists: returns true if the file exists */ void basFileExists() { char *fname; fname = popString(); pushNumber(FileExists(fname)); eFree(fname); } //_______________________________________________________________________________________________________________________ /* basFileCopy : copy a file */ void basFileCopy() { char *source; char *dest; int ret; dest=popString(); source=popString(); ret=filecopy(source,dest); if (ret==-1){ error_description="file copy error"; error_type=1; ePrintf( Runtime, "file Error \n"); } eFree( dest ); eFree( source ); pushNumber(ret); } //_______________________________________________________________________________________________________________________ /* basFileMove:move a file */ void basFileMove() { char *source; char *dest; int ret; dest=popString(); source=popString(); ret=filemove(source,dest); if (ret==-1){ error_description="file move error"; error_type=1; ePrintf( Runtime, "file Error \n"); } eFree( dest ); eFree( source ); pushNumber(ret); } //_______________________________________________________________________________________________________________________ /* basFileRename: move a file */ void basFileRename() { char *source; char *dest; int ret; dest=popString(); source=popString(); ret=filerename(source,dest); if (ret==-1){ error_description="file rename error"; error_type=1; ePrintf( Runtime, "file Error \n"); } eFree( dest ); eFree( source ); pushNumber(ret); } //_______________________________________________________________________________________________________________________ /* basFreeFile: return the handle of the next free file */ void basFreeFile() { pushNumber(fileFree()); } //_______________________________________________________________________________________________________________________ /* basKill: delete filename */ void basKill() { char *name = popString(); remove( name ); eFree(name); pushNumber(0); } //_______________________________________________________________________________________________________________________ /* basLoc: returns position in file */ void basLoc() { pushNumber( filePosition( popNumber() ) ); } //_______________________________________________________________________________________________________________________ /* basLof: returns length of file */ void basLof() { pushNumber( fileSize( popNumber() ) ); } //_______________________________________________________________________________________________________________________ /* basReadByte: return a byte from the file */ void basReadByte() { pushNumber( (Number)fileReadByte( (char)popNumber() ) ); } //_______________________________________________________________________________________________________________________ /* basSeek: seek file position/return current file position */ void basSeek() { int file, pos; /* which version? */ if (argCount==2) { /* seek to position */ pos = popNumber(); file = popNumber(); pushNumber( fileSeek( file, pos )); } else { /* return position in file */ file = popNumber(); pushNumber( filePosition( file ) ); } } //_______________________________________________________________________________________________________________________ /* basWriteByte: return a byte from the file */ void basWriteByte() { char c; int fileNum; c = popNumber(); fileNum = popNumber(); fileWriteByte( fileNum, c ); pushNumber( 0 ); } //_______________________________________________________________________________________________________________________ // //Dirs //_________________________________________________________________________________________________________________________ /* basChDir: change directory */ void basChDir() { char *name; name = popString(); pushNumber(chdir(name)); eFree(name); } //_______________________________________________________________________________________________________________________ /* basDir: returns current path */ void basDir() { pushStringCopy(dir()); } //_______________________________________________________________________________________________________________________ /* basDirExists: returns true if directory exists */ void basDirExists() { char *path; path=popString(); pushNumber(direxists(path)); eFree(path); } //_______________________________________________________________________________________________________________________ /* basDirFirst: returns first entry in path dir */ void basDirFirst() { char *path; path = popString(); pushStringCopy(dirfirst(path)); eFree(path); } //_______________________________________________________________________________________________________________________ /* basDirNext: returns next entry in path dir */ void basDirNext() { pushStringCopy(dirnext()); } //_______________________________________________________________________________________________________________________ /* basMkDir: create a new directory */ #if !defined(WIN32) & !defined(__amigaos4__) int mkdir(char *name); //used for forcing the warning int chmod(char *name,int p); //used for forcing the warning #endif void basMkDir() { char *name; name = popString(); #ifdef __amigaos4__ pushNumber(mkdir(name,0777)); #else mkdir(name); #ifndef WIN32 chmod(name,0777); #endif pushNumber(0); #endif } //_______________________________________________________________________________________________________________________ /* basRmDir: remove directory */ void basRmDir() { char *name; name = popString(); pushNumber(rmdir(name)); eFree(name); } //_______________________________________________________________________________________________________________________ //Data function support //_________________________________________________________________________________________________________________________ /* basData: load in array the data */ void basData() { int i; char *datavalue[255]; for( i=argCount-1;i>=0;i--){ datavalue[i]=popString(); } for( i=0;idataenter)datapointer=-1; if (datapointer<0){ error_description="read data error"; error_type=1; ePrintf( Runtime, "%d it's out of range\n", datapointer ); } pushNumber(datapointer); } else{ if (datapointer>=dataenter){ error_description="read data error"; error_type=1; ePrintf( Runtime, "%d it's out of range\n", datapointer ); } pushString(readdata()); } } //_______________________________________________________________________________________________________________________ //Date and time //_________________________________________________________________________________________________________________________ /* basDate: returns date in MM-DD-YYYY format */ void basDate() { time_t t; struct tm *tmp; char *buffer = (char *)eMalloc(11); /* get time */ t = time(NULL); tmp = localtime(&t); sprintf( buffer, "%02d-%02d-%04d", tmp->tm_mon+1, tmp->tm_mday, tmp->tm_year+1900 ); pushString( buffer ); } //_______________________________________________________________________________________________________________________ /* basTicks: returns current timer value */ void basTicks() { #ifdef UNIX //fixed using mandel demo pushNumber( clock()/826 ); #else pushNumber( clock() ); #endif } //_______________________________________________________________________________________________________________________ /* basTime: return time in HH:MM:SS format */ void basTime() { time_t t; struct tm *tmp; char *buffer = (char *)eMalloc(9); /* get time */ t = time(NULL); tmp = localtime(&t); sprintf( buffer, "%02d:%02d:%02d", tmp->tm_hour, tmp->tm_min, tmp->tm_sec ); pushString( buffer ); } //_______________________________________________________________________________________________________________________ //_______________________________________________________________________________________________________________________ //Memory Bank //_________________________________________________________________________________________________________________________ //reservebank(bank,size) : make a raw memory bank. there are 256 bank ( 0 - 255) void basReserveBank() { int bank; long size; int ret; size=popNumber(); bank=popNumber(); ret=reservebank(bank,size); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_________________________________________________________________________________________________________________________ //baseimage(bank,image) : link a memory bank with image bitmap void basBaseImage() { int bank; int image; int ret; image=popNumber(); bank=popNumber(); ret=baseimage(bank,image); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //baseimageCC(bank,image) : link a memory bank with image bitmap void basBaseImageCC() { int bank; int imageCC; int ret; imageCC=popNumber(); bank=popNumber(); ret=baseimageCC(bank,imageCC); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //basescreen(bank,image) : link a memory bank with image bitmap void basBaseScreen() { int bank; int screen; int ret; screen=popNumber(); bank=popNumber(); ret=basescreen(bank,screen); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //basesound(bank,sound) : link a memory bank with soundb bank void basBaseSound() { int bank; int sound; int ret; sound=popNumber(); bank=popNumber(); ret=basesound(bank,sound); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //freebase(bank) : disconnect a base from bank void basFreeBase() { int bank; int ret; bank=popNumber(); ret=freebase(bank); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //freebank(bank) : destroy a memory bank void basFreeBank() { int bank; int ret; bank=popNumber(); ret=freebank(bank); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //copybank(s,d) : copy the banco s in d void basCopyBank() { int s,d; int ret; d=popNumber(); s=popNumber(); ret=copybank(s,d); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //loadbank(filename,optional bank) : load a file in memory bank (if omitted the current ) void basLoadBank() { char *filename; int bank; int ret; if (argCount==2) bank = popNumber(); else bank=-1; filename=popString(); ret =loadbank(filename,bank); eFree(filename); if (ret==-1) ePrintf( Runtime, "%s not found Error\n", filename ); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //savebank(filename,optional bank) : save memory bank in a file void basSaveBank() { char *filename; int bank; int ret; if (argCount==2) bank = popNumber(); else bank=-1; filename=popString(); ret =savebank(filename,bank); eFree(filename); if (ret==-1) ePrintf( Runtime, "%s not found Error\n", filename ); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //setbank(optional bank) : set the current bank void basSetBank() { int bank; int ret; if (argCount==1) bank=popNumber(); else bank=-1; ret=setbank(bank); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //sizebank(optional bank) : return the bank memory size void basSizeBank() { int bank; int ret; if (argCount==1) bank=popNumber(); else bank=-1; ret=sizebank(bank); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //poke(optional bank,address,value) : write a byte value in memory bank at specific address void basPoke() { int bank; long address; unsigned char value; int ret; value=popNumber(); address=popNumber(); if (argCount==3) bank = popNumber(); else bank=-1; ret=poke(bank,address,value); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //doke(optional bank,address,value) : write a 16bit value in memory bank at specific address void basDoke() { int bank; long address; unsigned short value; int ret; value=popNumber(); address=popNumber(); if (argCount==3) bank = popNumber(); else bank=-1; ret=doke(bank,address,value); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //loke(optional bank,address,value) : write a 32bit value in memory bank at specific address void basLoke() { int bank; long address; unsigned int value; int ret; value=popNumber(); address=popNumber(); if (argCount==3) bank = popNumber(); else bank=-1; ret=loke(bank,address,value); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //peek(optional bank,address) : read a byte value in memory bank at specific address void basPeek() { int bank; long address; int ret; address=popNumber(); if (argCount==2) bank = popNumber(); else bank=-1; ret=peek(bank,address); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //deek(optional bank,address) : read a 16bit value in memory bank at specific address void basDeek() { int bank; long address; int ret; address=popNumber(); if (argCount==2) bank = popNumber(); else bank=-1; ret=deek(bank,address); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //leek(optional bank,address) : read a 32bit value in memory bank at specific address void basLeek() { int bank; long address; int ret; address=popNumber(); if (argCount==2) bank = popNumber(); else bank=-1; ret=leek(bank,address); if (ret==-1) ePrintf( Runtime, "membank Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //memcopy(sbank,s,dbank,d,size) : copy a part of bank memory s in d void basMemCopy() { int sbank,s,dbank,d,size; int ret; size=popNumber(); d=popNumber(); dbank=popNumber(); s=popNumber(); sbank=popNumber(); ret=memcopy(sbank,s,dbank,d,size); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ // //------- SDLengine-link ------------------------------------------------------------------------------------------ //_______________________________________________________________________________________________________________________ //_________________________________________________________________________________________________________________________ // //Screen //_________________________________________________________________________________________________________________________ //setdefaults(w,h,bpp,m): : open the display, perform initializations on cursor and fonts and sets default values on sprites, bobs and screens system. void basSetDefaults() { int width,height,bpp,mode; int ret; mode = popNumber(); bpp = popNumber(); height = popNumber(); width = popNumber(); ret=setdefaults( width,height,bpp,mode); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //setdisplay(w,h,bpp,m): open the screen/window in double buffer. 0=screen|1=window|2=resizable void basSetDisplay() { int width,height,bpp,mode; int ret; mode = popNumber(); bpp = popNumber(); height = popNumber(); width = popNumber(); ret=setdisplay( width,height,bpp,mode); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //setalphachannel(v): activate deactivate alpha channel trasparency void basSetAlphaChannel() { int ret; int v; v=popNumber(); ret=setalphachannel(v); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //setcaption: change the display window title void basSetCaption() { int ret; char *title; title=popString(); ret=setcaption(title); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); eFree(title); } //_______________________________________________________________________________________________________________________ //caption: return the current display window title void basCaption() { char *title; caption(&title); pushString(title); } //_______________________________________________________________________________________________________________________ //displaymode: give the display mode void basDisplayMode() { pushNumber( displaymode() ); } //_______________________________________________________________________________________________________________________ //displaywidth: give the display width void basDisplayWidth() { pushNumber( displaywidth() ); } //_______________________________________________________________________________________________________________________ //displayheight: give the display height void basDisplayHeight() { pushNumber( displayheight() ); } //_______________________________________________________________________________________________________________________ //displaybpp: give the display color depth void basDisplayBpp() { pushNumber( displaybpp() ); } //_______________________________________________________________________________________________________________________ //screen(n): attivated the logic screen n void basScreen() { int n; int ret; if (argCount!=0) n = popNumber(); else n=-1; if (n>7)ePrintf( Runtime, "SDLengine Error:you can use 0 to 7 screen !!! \n"); ret=screen(n); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //screenz(n,z) : set the zorder position of screen if z =-1 report actual z position void basScreenZ() { int n,z; int ret; if (argCount!=1) z = popNumber(); else z=-1; n = popNumber(); if (n>7)ePrintf( Runtime, "SDLengine Error:you can use 0 to 7 screen !!! \n"); ret=screenz(n,z); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //lastscreen: return the last screen open void basLastScreen() { int ret; ret=lastscreen(); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //directscreen: direct drawing on display like a screen(more fast but sprite and offset does not works) void basDirectScreen() { int ret; ret=directscreen(); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //screenopen(n,w,h,dx,dy,dw,dh,flag): open the logic screen n of dimension w,h in display coordinates dx,dy,dw,dh void basScreenOpen() { int n,w,h,dx,dy,dw,dh,flag; int ret; flag = popNumber(); dh = popNumber(); dw = popNumber(); dy = popNumber(); dx = popNumber(); h = popNumber(); w = popNumber(); n = popNumber(); if (n>7)ePrintf( Runtime, "SDLengine Error:you can use 0 to 7 screen !!! \n"); ret=screenopen(n,w,h,dx,dy,dw,dh,flag); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //screenclose(n): close the logic screen n void basScreenClose() { int n; int ret; n = popNumber(); ret=screenclose(n); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //screenclone(n,s,x,y,w,h,flag): create a new viewport in logic screen s void basScreenClone() { int ret; int n,s,x,y,w,h,flag; flag = popNumber(); h = popNumber(); w = popNumber(); y = popNumber(); x = popNumber(); s = popNumber(); n = popNumber(); if (n>7)ePrintf( Runtime, "SDLengine Error:you can use 0 to 7 screen !!! \n"); ret=screenclone(n,s,x,y,w,h,flag); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //screencopy(n,x,y,w,h,nd,xd,yd): copy a portion of screen n in a screen nd void basScreenCopy() { int n,x,y,w,h,nd,xd,yd; int ret; yd = popNumber(); xd = popNumber(); nd = popNumber(); h = popNumber(); w = popNumber(); y = popNumber(); x = popNumber(); n = popNumber(); if (n>7 || n<0)ePrintf( Runtime, "SDLengine Error: Error:you can use 0 to 7 screen !!! \n"); if (nd>7 || nd<0)ePrintf( Runtime, "SDLengine Error: Error:you can use 0 to 7 screen !!! \n"); ret=screencopy(n,x,y,w,h,nd,xd,yd); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //screenfade(n,t): fade the screen n in t time void basScreenFade() { int n,t; int ret; if (argCount==2) t = popNumber(); else t=-1; n = popNumber(); ret=screenfade(n,t); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //screenfadein(n,i,t): fade the screen n to image i in t time void basScreenFadein() { int n,i,t; int ret; if (argCount ==3){ t = popNumber(); i = popNumber(); }else{ t=-1; i=-1; } n = popNumber(); ret=screenfadein(n,i,t); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //screencrossfade(n,i,t): fade the screen n from current screen to image i in t time void basScreenCrossFade() { int n,i,t; int ret; if (argCount ==3){ t = popNumber(); i = popNumber(); }else{ t=-1; i=-1; } n = popNumber(); ret=screencrossfade(n,i,t); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //screenalpha(n,a): set alpha(trasparency) of screen n void basScreenAlpha() { int ret; int n,a; a = popNumber(); n = popNumber(); ret=screenalpha(n,a); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //screenlock(n): lock the screen n for direct graphics access void basScreenLock() { int ret; int n; n = popNumber(); ret=screenlock(n); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //screenunlock(n): unlock the screen n for direct graphics access void basScreenUnlock() { int ret; int n; n = popNumber(); ret=screenunlock(n); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //screenrect(x,y,w,h,flag): change the display output coordinates of the current screen void basScreenRect() { int x,y,w,h,flag; flag = popNumber(); h = popNumber(); w = popNumber(); y = popNumber(); x = popNumber(); pushNumber(screenrect(x,y,w,h,flag)); } //_______________________________________________________________________________________________________________________ //xscreenrect: give the x coordinate of current screen viewport void basXScreenRect() { pushNumber( xscreenrect() ); } //_______________________________________________________________________________________________________________________ //yscreenrect: give the y coordinate of current screen viewport void basYScreenRect() { pushNumber( yscreenrect() ); } //_______________________________________________________________________________________________________________________ //wscreenrect: give the w value of current screen viewport void basWScreenRect() { pushNumber( wscreenrect() ); } //_______________________________________________________________________________________________________________________ //hscreenrect: give the h value of current screen viewport void basHScreenRect() { pushNumber( hscreenrect() ); } //_______________________________________________________________________________________________________________________ //flagscreenrect: give the flag value of current screen viewport void basFlagScreenRect() { pushNumber( flagscreenrect() ); } //_______________________________________________________________________________________________________________________ //screenwidth: give the current screen width void basScreenWidth() { pushNumber( screenwidth() ); } //_______________________________________________________________________________________________________________________ //screenheight: give the current screen height void basScreenHeight() { pushNumber( screenheight() ); } //_______________________________________________________________________________________________________________________ //offset(x,y): set the logical current screen position void basOffset() { int xoff,yoff; yoff = popNumber(); xoff = popNumber(); offset(xoff,yoff); pushNumber( 0 ); } //_______________________________________________________________________________________________________________________ //xoffset: give the x coordinate offset in current screen void basXOffset() { pushNumber( xoffset() ); } //_______________________________________________________________________________________________________________________ //yoffset: give the y coordinate offset in current screen void basYOffset() { pushNumber( yoffset() ); } //_______________________________________________________________________________________________________________________ //cls: clear the current logic screen void basCls() { pushNumber( cls() ); } //_______________________________________________________________________________________________________________________ //screenswap: update display,bobsystem,spritesystem void basScreenSwap() { int ret; ret= screenswap(); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //autoback setautoback(m): enable / disable automatic screenswap m=0 disable m>0 wait m milliseconds and perform screenswap m<0 perform the invocate in code screenswap after m milliseconds void basAutoBack() { int m; if (argCount==1) m=popNumber(); else m=-1; pushNumber(autoback(m)); } //_______________________________________________________________________________________________________________________ //dualplayfield(m): set/unset automatic update of a screen upper sprite void basDualPlayfield() { int m; if (argCount==1) m=popNumber(); else m=-1; pushNumber(dualplayfield(m)); } //_______________________________________________________________________________________________________________________ //waitvbl: wait automatic screenswap void basWaitVbl() { int ret; ret= waitvbl(); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //fps(n): set/unset or give the current frame rate counter void basFps() { int n; if (argCount==1) n=popNumber(); else n=-1; pushNumber(fps(n)); } //_______________________________________________________________________________________________________________________ //_________________________________________________________________________________________________________________________ // //Graphics //_________________________________________________________________________________________________________________________ //rgb(r,g,b): give current color in Uint32 format void basRgb() { int r,g,b; b = popNumber(); g = popNumber(); r = popNumber(); pushNumber( rgb(r,g,b) ); } //_______________________________________________________________________________________________________________________ //enablepalette(optional state=0|1 disable|enable|check) : enable disable and check the palettemode in 8 bit display void basEnablePalette() { int s; int ret; if (argCount==1) s=popNumber(); else s=-1; ret=enablepalette(s); if (ret==-1) ePrintf( Runtime, "enablepalette Error\n"); pushNumber(ret ); } //_______________________________________________________________________________________________________________________ //color (c,optional v): set palette color c with value v se missing give the current color c void basColor() { int c,v; int ret; if (argCount==2) v=popNumber(); else v=-1; c=popNumber(); ret=color(c,v); if (ret==-1) ePrintf( Runtime, "%s color Error\n", c ); pushNumber(ret ); } //_______________________________________________________________________________________________________________________ //palette(optional 0-255 param): set all palettes color void basPalette() { int i,v; int ret; ret=-1; for (i=0;i=2) s=popNumber(); else s=0; n=popNumber(); ret=playcd(n,s,l); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //playtrackscd(n,trk1,fr1,ntrks,nfrs) : play the given cd track(s)0=all void basPlayTracksCD() { int n,trk1,fr1,ntrks,nfrs; int ret; switch(argCount){ case 5: nfrs=popNumber(); ntrks=popNumber(); fr1=popNumber(); trk1=popNumber(); n=popNumber(); break; case 4: ntrks=popNumber(); fr1=popNumber();nfrs=1; trk1=popNumber(); n=popNumber(); break; case 3: nfrs=0; ntrks=popNumber(); fr1=0; trk1=popNumber(); n=popNumber(); break; case 2: nfrs=0; fr1=0; trk1=popNumber();ntrks=1; n=popNumber(); default: nfrs=0; ntrks=0; fr1=0; trk1=0; n=popNumber(); break; } ret=playtrackscd(n,trk1,fr1,ntrks,nfrs); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //pausecd(n) : pauses a cdrom void basPauseCD() { int n; int ret; n=popNumber(); ret=pausecd(n); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //resumecd(n) : resumes a cdrom void basResumeCD() { int n; int ret; n=popNumber(); ret=resumecd(n); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //stopcd(n) : stops a cdrom void basStopCD() { int n; int ret; n=popNumber(); ret=stopcd(n); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //ejectcd(n) : ejects a cdrom void basEjectCD() { int n; int ret; n=popNumber(); ret=ejectcd(n); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //closecd(n) : closes a cd handle void basCloseCD() { int n; int ret; n=popNumber(); ret=closecd(n); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //tracktypecd(n,t) : return SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...) void basTrackTypeCD() { int n,t; int ret; t=popNumber(); n=popNumber(); ret=tracktypecd(n,t); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //tracklengthcd(n,t) : return the length of track t void basTrackLengthCD() { int n,t; int ret; t=popNumber(); n=popNumber(); ret=tracklengthcd(n,t); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //trackoffsetcd(n,t) : return the offset to the beginning of this track in frames void basTrackOffsetCD() { int n,t; int ret; t=popNumber(); n=popNumber(); ret=trackoffsetcd(n,t); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ // // Video mpeg //_________________________________________________________________________________________________________________________ //loadmpeg(fname,usesound) : load a mpeg video void basLoadMpeg() { char *fname; int usesound; int ret; usesound=popNumber(); fname=popString(); ret=loadmpeg(fname,usesound); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_________________________________________________________________________________________________________________________ //plaympeg(optional loop) : play a mpeg1 video void basPlayMpeg() { int loop; int ret; if (argCount==1) loop=popNumber(); else loop=0; ret=plaympeg(loop); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_________________________________________________________________________________________________________________________ //stopmpeg() : terminate the video play void basStopMpeg() { int ret; ret=stopmpeg(); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_________________________________________________________________________________________________________________________ //deletempeg() : unload mpeg video void basDeleteMpeg() { int ret; ret=deletempeg(); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_________________________________________________________________________________________________________________________ //pausempeg() : Pause/Resume playback of an SMPEG object void basPauseMpeg() { int ret; ret=pausempeg(); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_________________________________________________________________________________________________________________________ //rewindmpeg() : Rewind the play position of an SMPEG object to the beginning of the MPEG void basRewindMpeg() { int ret; ret=rewindmpeg(); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_________________________________________________________________________________________________________________________ //seekmpeg(p) : Seek 'bytes' bytes in the MPEG stream void basSeekMpeg() { int p; int ret; p=popNumber(); ret=seekmpeg(p); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_________________________________________________________________________________________________________________________ //skipmpeg(s) : Skip 'seconds' seconds in the MPEG stream void basSkipMpeg() { double p; int ret; p=popNumber(); ret=skipmpeg(p); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_________________________________________________________________________________________________________________________ //statusmpeg() : return 1 if plaympeg work or 0 in other case void basStatusMpeg() { int ret; ret=statusmpeg(); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ // // Keyboard //_________________________________________________________________________________________________________________________ //key(keycode): give 1 if is press the key keycode void basKey() { int ret; int keycode; keycode = popNumber(); ret=key(keycode); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber( ret ); } //_______________________________________________________________________________________________________________________ //inkey: give ascii code of key press void basInkey() { pushNumber(inkey()); } //_______________________________________________________________________________________________________________________ //waitkey(optional keycode): wait a key pression (0 =any key) void basWaitKey() { int keycode; if (argCount==1) keycode = popNumber(); else keycode=0; pushNumber(waitkey(keycode)); } //_______________________________________________________________________________________________________________________ // // Mouse //_________________________________________________________________________________________________________________________ //xmouse: give mouse x coordinate on display void basXMouse() { pushNumber( xmouse() ); } //_______________________________________________________________________________________________________________________ //ymouse: give mouse y coordinate on display void basYMouse() { pushNumber( ymouse() ); } //_______________________________________________________________________________________________________________________ //xmousescreen(n): give mouse x coordinate on screen void basXMouseScreen() { int n; n=popNumber(); pushNumber( xmousescreen(n) ); } //_______________________________________________________________________________________________________________________ //ymousescreen(n): give mouse y coordinate on screen void basYMouseScreen() { int n; n=popNumber(); pushNumber( ymousescreen(n) ); } //_______________________________________________________________________________________________________________________ //bmouse: give the buttonclick on the mouse void basBMouse() { pushNumber( bmouse() ); } //_______________________________________________________________________________________________________________________ //changemouse(optional n): change mouse from default(0) to emulate with sprite 0 - image 0 (1,2,3)without n return current pointer void basChangeMouse() { int n; int ret; if (argCount==1) n=popNumber(); else n=-1; ret=changemouse(n); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ // locatemouse: move cursor at xy coordinates void basLocateMouse() { int x,y; int ret; y=popNumber(); x=popNumber(); ret=locatemouse(x,y); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //mouseshow: show the mouse cursor void basMouseShow() { pushNumber( mouseshow() ); } //_______________________________________________________________________________________________________________________ //mousehide: hide the mouse cursor void basMouseHide() { pushNumber( mousehide() ); } //_______________________________________________________________________________________________________________________ //mousezone(x,y,w,h): give 1 if the mouse pointer is in rectangle(xy with size wh) void basMouseZone() { int x,y,w,h; h = popNumber(); w = popNumber(); y = popNumber(); x = popNumber(); pushNumber( mousezone(x,y,w,h) ); } //_______________________________________________________________________________________________________________________ // // Joystick //_________________________________________________________________________________________________________________________ //numjoysticks: Count available joysticks. void basNumJoySticks() { int ret; ret=numjoysticks(); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //namejoystick(i): Get joystick name void basNameJoyStick() { char *ret; int i; i=popNumber(); ret=namejoystick(i); if (ret==NULL) ePrintf( Runtime, "SDLengine Error \n"); pushString(ret); } //_______________________________________________________________________________________________________________________ //numaxesjoystick(i): Get the number of joystick axes void basNumAxesJoyStick(void) { int ret; int i; i=popNumber(); ret=numaxesjoystick(i); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //numballsjoystick(i): Get the number of joystick trackballs void basNumBallsJoyStick(void) { int ret; int i; i=popNumber(); ret=numballsjoystick(i); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //numhatsjoystick(i): Get the number of joystick hats void basNumHatsJoyStick(void) { int ret; int i; i=popNumber(); ret=numhatsjoystick(i); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //numbuttonsjoystick(i): Get the number of joysitck buttons void basNumButtonsJoyStick(void) { int ret; int i; i=popNumber(); ret=numbuttonsjoystick(i); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //getaxisjoystick(i,a): Get the current state of an axis void basGetAxisJoyStick(void) { int ret; int a,i; a=popNumber(); i=popNumber(); ret=getaxisjoystick(i,a); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //gethatjoystick(i,a): Get the current state of a joystick hat void basGetHatJoyStick(void) { int ret; int a,i; a=popNumber(); i=popNumber(); ret=gethatjoystick(i,a); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //getbuttonjoystick(i,a): Get the current state of a given button on a given joystick void basGetButtonJoyStick(void) { int ret; int a,i; a=popNumber(); i=popNumber(); ret=getbuttonjoystick(i,a); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //xgetballjoystick(i,a): Get relative trackball motion void basXGetBallJoyStick(void) { int ret; int a,i; a=popNumber(); i=popNumber(); ret=xgetballjoystick(i,a); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //ygetballjoystick(i,a): Get relative trackball motion void basYGetBallJoyStick(void) { int ret; int a,i; a=popNumber(); i=popNumber(); ret=ygetballjoystick(i,a); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //joy: give joystick boolean coordinate void basJoy() { int i,ret; i=popNumber(); ret=joy(i); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //bjoy : give joystick button pressed void basBJoy() { int i,ret; i=popNumber(); ret=bjoy(i); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //waitbjoy : wait joystick button pressed void basWaitBJoy() { int i,ret; if (argCount==1) i=popNumber(); else i=0; ret=waitbjoy(i); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ // // SDLtime //_________________________________________________________________________________________________________________________ //wait(t): wait t milliseconds void basWait() { int t; int ret; t= popNumber(); ret=waitTime(t); if (ret==-1) ePrintf( Runtime, "SDLengine Error \n"); pushNumber( ret); } //_______________________________________________________________________________________________________________________ //timer: give the current tick void basTimer() { pushNumber( chrono()); } //_______________________________________________________________________________________________________________________ // // SOCKET //_________________________________________________________________________________________________________________________ //isenabledsock() : return 1 if sdlnet was enabled void basIsEnabledSock() { int ret; ret=isenabledsock(); if (ret==-1) ePrintf( Runtime, "SDLengine socket Error \n"); pushNumber( ret); } //_______________________________________________________________________________________________________________________ //sock=getfreesock() : return the first free sock in sdlSocket array void basGetFreeSock() { int ret; ret=getfreesock(); if (ret==-1) ePrintf( Runtime, "SDLengine socket Error \n"); pushNumber( ret); } //_______________________________________________________________________________________________________________________ /*sock=OpenSock(port) : Server side socket sock is the stream. in sdlBasic there are 256 stream and \ sintax is very similar of file open close.*/ void basOpenSock() { int port; int ret; port= popNumber(); ret=opensock(port); if (ret==-1) ePrintf( Runtime, "SDLengine socket Error \n"); pushNumber( ret); } //_______________________________________________________________________________________________________________________ //clientsock=AcceptSock(serversock) : Accept the client connection void basAcceptSock() { int serversock; int ret; serversock= popNumber(); ret=acceptsock(serversock); if (ret==-1) ePrintf( Runtime, "SDLengine socket Error \n"); pushNumber( ret); } //_______________________________________________________________________________________________________________________ //IsServerReady(Sock) : True/False if server is sending data     void basIsServerReady() { int sock; int ret; sock= popNumber(); ret=isserverready(sock); if (ret==-1) ePrintf( Runtime, "SDLengine socket Error \n"); pushNumber( ret); } //_______________________________________________________________________________________________________________________ //sock=ConnectSock(ServerName,port) : client side socket connection void basConnectSock() { int port; char *servername; int ret; port= popNumber(); servername=popString(); ret=connectsock(servername,port); //if (ret==-1) ePrintf( Runtime, "SDLengine socket Error \n"); pushNumber( ret); } //_______________________________________________________________________________________________________________________ //*ConnectionReadySock(sock) : the server have accepted the connection /* void ConnectionReadySock() { int sock; int ret; sock= popNumber(); ret=connectionready(sock); if (ret==-1) ePrintf( Runtime, "SDLengine socket Error \n"); pushNumber( ret); } */ //_______________________________________________________________________________________________________________________ //IsClientReady(Sock) : True/False if client is sending data void basIsClientReady() { int sock; int ret; sock= popNumber(); ret=isclientready(sock); if (ret==-1) ePrintf( Runtime, "SDLengine socket Error \n"); pushNumber( ret); } //_______________________________________________________________________________________________________________________ //CloseSock(sock) : Close the socket connection. Works for client and server void basCloseSock() { int sock; int ret; sock= popNumber(); ret=closesock(sock); if (ret==-1) ePrintf( Runtime, "SDLengine socket Error \n"); pushNumber( ret); } //_______________________________________________________________________________________________________________________ //*PeekSock(Sock, NumBytes) : Peek information coming from socket, but do not clear. /* void basPeekSock(void) { int sock,numbytes; char *ret; numbytes= popNumber(); sock= popNumber(); ret=peeksock(sock,numbytes); if (ret==NULL) ePrintf( Runtime, "SDLengine socket Error \n"); pushString(ret); } */ //_______________________________________________________________________________________________________________________ //ReadSock(Sock, NumBytes) : Read NumBytes void basReadSock() { int sock,numbytes; numbytes= popNumber(); sock= popNumber(); pushString(readsock(sock,numbytes)); } //_______________________________________________________________________________________________________________________ //ReadByteSock(Sock) : Read a single byte       void basReadByteSock() { int sock; int ret; sock= popNumber(); ret=readbytesock(sock); if (ret==-1) ePrintf( Runtime, "SDLengine socket Error \n"); pushNumber( ret); } //_______________________________________________________________________________________________________________________ //ReadLineSock(Sock) : Read complete line void basReadLineSock() { int sock; sock= popNumber(); pushString(readlinesock(sock)); } //_______________________________________________________________________________________________________________________ //WriteSock(Sock, Message, NumBytes) : Sends NumBytes from Message void basWriteSock() { int sock,numbytes; char *message; int ret; numbytes= popNumber(); message=popString(); sock= popNumber(); ret=writesock(sock,message,numbytes); if (ret==-1) ePrintf( Runtime, "SDLengine socket Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //WriteByteSock(Sock, Byte) : Sends a single byte void basWriteByteSock() { int sock; char byte; int ret; byte=popNumber(); sock= popNumber(); ret=writebytesock(sock,byte); if (ret==-1) ePrintf( Runtime, "SDLengine socket Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //WriteLineSock(Sock, Message) : Send Message void basWriteLineSock() { int sock; char *message; int ret; message=popString(); sock= popNumber(); ret=writelinesock(sock,message); if (ret==-1) ePrintf( Runtime, "SDLengine socket Error \n"); pushNumber(ret); } //_______________________________________________________________________________________________________________________ //getremoteip(sock) : return the ip address of remote client connetted void basGetRemoteIp() { int sock; sock= popNumber(); pushString(getremoteip(sock)); } //_______________________________________________________________________________________________________________________ //getremoteport(sock) : return the port address of remote client connetted void basGetRemotePort() { int sock; int ret; sock= popNumber(); ret=getremoteport(sock); if (ret==-1) ePrintf( Runtime, "SDLengine socket Error \n"); pushNumber( ret); } //_______________________________________________________________________________________________________________________ //getlocalip() : return the local ip void basGetLocalIp() { pushString(getlocalip()); } //_______________________________________________________________________________________________________________________ /*--- end ---------------------------------------------------------------*/ /* addBuiltin: add a builtin to the dictionary */ void addBuiltin( char *name, void (*routine)(void), int args, int optargs ) { Symbol *s; s = findSymbol( name, NULL ); if (s==NULL) { s = addSymbol( name, NULL, SYM_BUILTIN ); s->builtin = routine; s->args = args; s->optargs = optargs; } else { ePrintf( Runtime, "builtin %s is already declared as a %s", s->name, symbolName[s->symboltype] ); } } /* initBuiltins: install all the builtins */ void initBuiltins() { int i; for (i = 0; builtin[i].name != NULL; i++) { addBuiltin( builtin[i].name, builtin[i].routine, builtin[i].args, builtin[i].optargs ); } } usr/src/sdlBasic/src/sdlBrt/class.c0000777000076500007660000002324010617631542014444 0ustar /* Name: class.c Purpose: wrappers to interface C++ classes to wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ /* hashVal: compute hash value for string */ unsigned int hashVal( char *str ) { unsigned int h; unsigned char *p; h = 0; for (p= (unsigned char *) str; *p != '\0'; p++ ) { h = HASH_MULTIPLIER * h + *p; } return h % HASH_NHASH; } /* findClass: return the index to the class; -1 on failure */ int findClass( char *name ) { int i, nameHash; WrappedClass *theClass; nameHash = hashVal( name ); for ( i = nextClass-1; i >= 0; i-- ) { theClass = classList[i]; if (strcmp( theClass->name, name ) == 0) { return i; } } return -1; } /* addClass: add a class, return the index */ int addClass( int superIndex, char *name ) { WrappedClass *theClass; Symbol *s; /* array size is static */ if (nextClass > NCLASSES){ ePrintf( Runtime, "addClass: reached class limit of %d", NCLASSES); } /* create class */ theClass = (WrappedClass *)eMalloc( sizeof( WrappedClass ) ); theClass->name = eCopyString( name ); theClass->super = superIndex; theClass->lastMethod = NULL; classList[nextClass] = theClass; /* add to symbol table */ s = addSymbol( name, NULL, SYM_CLASS ); s->klass = nextClass; return nextClass++; } /* addMethod: add a method to a class */ void addMethod( int classIndex, char *name, void (*routine)(void), int minArgs, int maxArgs ) { WrappedMethod *theMethod; theMethod = (WrappedMethod *)eMalloc( sizeof( WrappedMethod ) ); theMethod->name = eCopyString( name ); theMethod->hash = hashVal( name ); theMethod->routine = routine; theMethod->minArgs = minArgs; theMethod->maxArgs = maxArgs; theMethod->prior = classList[classIndex]->lastMethod; classList[classIndex]->lastMethod = theMethod; } /* findClassMethod: search class for method */ WrappedMethod *findClassMethod( int classIndex, char *name, int hash ) { WrappedMethod *theMethod; for ( theMethod = classList[classIndex]->lastMethod; theMethod != NULL; theMethod = theMethod->prior ) { if ( hash == theMethod->hash && strcmp( name, theMethod->name ) == 0 ) { return theMethod; } } return NULL; } /* findMethod: search inheritance tree for method, return NULL on failure */ WrappedMethod *findMethod( int classIndex, char *name ) { int hash; WrappedMethod *theMethod; /* name hash for speed */ hash = hashVal( name ); /* search for match */ for ( ; classIndex != 0; classIndex = classList[classIndex]->super ) { theMethod = findClassMethod( classIndex, name, hash ); if (theMethod != NULL) { return theMethod; } } return NULL; } /* getObject: get pointer */ int getObject( Number objectIndex ) { /* null is a special case */ if (objectIndex == 0) { return 0; } if (objectIndex < 0 || objectIndex >= nextObject || objectIndex != (int)objectIndex ) { ePrintf( Runtime, "getObject: %lf is not a valid handle", objectIndex ); } else if (objectList[(int)objectIndex] == NULL) { ePrintf( Runtime, "getObject: %d is null (possibly destroyed)", (int)objectIndex ); } return objectList[(int)objectIndex]->pointer; } /* popStringList: pop a delimited list off the stack, returns pointer */ char **popStringList() { int i, items, atChar, atWord; char buffer[128]; char *text, *word; char **list; text = popString(); /* count the number of items */ items = 1; for( i = 0; text[i] != '\0'; i++ ) { if (text[i] == '|') { items++; } } /* allocate space for the string list */ list = (char **)eMalloc( sizeof( char *) * (items + 1) ); /* build the words */ atChar = 0; atWord = 0; for ( i=0; ; i++ ) { /* seperator? */ if (text[i] == '|' || text[i] == '\0' ) { buffer[atChar] = '\0'; /* allocate buffer for word */ word = (char *)eMalloc( sizeof( char ) * (atChar + 1) ); strcpy( word, buffer ); /* add to list */ list[atWord++] = word; atChar = 0; } else { /* add char to buffer */ buffer[atChar++] = text[i]; } /* end of list? */ if (text[i] == '\0') { break; } } list[atWord] = NULL; return list; } /* free string in list */ void freeStringList( char **list ) { int i; for (i = 0; list[i] != NULL; i++ ) { eFree( list[i] ); } eFree( list ); } /* popPointer: pop object index off stack, and return pointer */ int popPointer( int matchClassIndex ) { /* at some point, it should verify the class */ int handle, objectIndex, classIndex, i; /* return the pointer; check range */ objectIndex = (int)popNumber(); if (objectIndex == 0 ){ /* void */ return 0; } handle = getObject( objectIndex ); /* correct class? */ classIndex = objectList[objectIndex]->classIndex; for( i = classIndex; i != 0; i = classList[i]->super ) { if (i == matchClassIndex) { break; } } if (i == 0) { ePrintf( Runtime, "popPointer: expected %s, not %s", classList[matchClassIndex]->name, classList[classIndex]->name ); } return handle; } /* resolveMethod: determine class of method and run it */ void resolveMethod( int objectIndex, char *name ) { int classIndex; /* get pointer, check range */ me = getObject( objectIndex ); /* null? */ if (objectIndex == 0) { ePrintf( Runtime, "can't resolve method null.%s", name ); } /* get the class */ classIndex = objectList[objectIndex]->classIndex; /* run it */ runMethod( classIndex, name ); } /* runMethod: find and execute a method */ void runMethod( int classIndex, char *name ) { WrappedMethod *method; /* find the method */ method = findMethod( classIndex, name ); if (method == NULL) { ePrintf( Runtime, "Can't find method %s.%s", classList[classIndex]->name, name ); } /* check args */ if (argCount < method->minArgs || argCount > method->maxArgs ) { if (method->minArgs == method->maxArgs) { ePrintf( Runtime, "Method %s.%s expected %d args, not %d args", classList[classIndex]->name, method->name, method->minArgs, argCount ); } else { ePrintf( Runtime, "Method %s.%s expected %d to %d args, not %d args", classList[classIndex]->name, method->name, method->minArgs, method->maxArgs, argCount ); } } /* execute, leave result on stack */ (*method->routine)(); } /* addObject: add an object of a given class */ Number addObject( int classIndex, int pointer ) { int i, objectIndex; WrappedObject *theObject; /* note objects start at 1, not 0 */ objectIndex = 0; /* search for an empty slot to reuse */ for ( i = 1; i < nextObject; i++ ) { if (objectList[i] == NULL) { objectIndex = i; break; } } /* no old slots free? */ if (objectIndex == 0) { if (nextObject == NOBJECTS) { ePrintf( Runtime, "addObject: reached object limit of %d", NOBJECTS); } objectIndex = nextObject++; } theObject = (WrappedObject *)eMalloc( sizeof( WrappedObject ) ); theObject->pointer = pointer; theObject->classIndex = classIndex; theObject->id = 0; objectList[objectIndex] = theObject; return (Number)objectIndex; } /* runDestructor: run destructor */ void runDestructor( int objectIndex, int typeOf ) { WrappedObject *object; WrappedMethod *method=NULL; /* get pointer, check range */ me = getObject( objectIndex ); object = objectList[objectIndex]; switch (typeOf) { case 0: /* don't run destructor */ method = NULL; break; case OpDelete: method = findMethod( object->classIndex, "del" ); if (method == NULL) { ePrintf( Runtime, "runDestructor: can't find %s.delete method", classList[object->classIndex]->name ); } break; case OpDestroy: method = findMethod( object->classIndex, "dtor" ); if (method == NULL) { ePrintf( Runtime, "runDestructor: can't find %s.destroy method", classList[object->classIndex]->name ); } break; default: ePrintf( Runtime, "runDestructor: bad opcode of %d\n", typeOf ); break; } /* execute */ if (method != NULL) { (*method->routine)(); } /* free */ eFree( object ); objectList[objectIndex] = NULL; } /* classSafeOnStack: returns true if safe to create on stack */ int classSafeOnStack( int classIndex ) { return 1; } /* pushCreateStack: add an object to the create stack */ void pushCreateStack( int i ) { createTos++; if (createTos >= NCREATE_STACK ) { ePrintf( Runtime, "pushCreateStack: limit of %d exceeded", NCREATE_STACK ); } createStack[createTos] = i; } /* clearCreateStack: pop (and destroy) objects on create stack */ void clearCreateStack() { /* destroy objects on stack */ while (createStack[createTos]) { runDestructor( createStack[createTos], OpDelete ); createTos--; } createTos--; } usr/src/sdlBasic/src/sdlBrt/clean.bat0000777000076500007660000000031610463130647014743 0ustar @echo off rem clean batch file cd SDLengine call clean.bat cd .. cd unzip call clean.bat cd .. cd BASengine call clean.bat cd .. del *.o del sdlBrt.exe del sdlBrt del ~sdlBrt usr/src/sdlBasic/src/sdlBrt/SDLengine.txt0000755000076500007660000004121310637401476015543 0ustar SDLengine functions list _______________________________________________________________________________________________ initialize : Start the engine and set the default parameter terminate : Stop the engine and reset parameter _________________________________________________________________________________________________________________________ Screen setdefaults(w,h,bpp,m) : open the display, perform initializations on cursor and fonts and sets default values on sprites, bobs and screens system. setdisplay(w,h,bpp,m) : open the screen/window in double buffer. 0=screen|1=window|2=resizable setcaption(title) : change the display window title caption() : return the display window title displaywidth : return the display width displayheight : return the display height displaybpp : return the display color depth screen(n) : set the logic screen n with n=-1 return the current screen screenz(n,z) : set the zorder position of screen if z =-1 report actual z position lastscreen : return the last screen open directscreen : direct drawing on display like a screen(more fast but sprite and offset does not works) screenopen(n,w,h,dx,dy,dw,dh,flag) : open the logic screen n of dimension w,h in display coordinates dx,dy,dw,dh screenclose(n) : close the logic screen n screenclone(n,s,x,y,w,h,flag) : create a new viewport in logic screen s screencopy(n,x,y,w,h,nd,xd,yd) : copy a portion of screen n in a screen nd screenfade(n,t) : fade the screen n in t time screenfadein(n,i,t) : fade the screen n to image i in t time screencrossfade(n,i,t) : fade the screen n from current screen to image i in t time screenalpha(n,a) : set alpha(trasparency) of screen n screenlock(n) : lock the screen n for direct graphics access screenunlock(n) : unlock the screen n for direct graphics access screenrect(x,y,w,h,flag) : change the display output coordinates of the current screen xscreenrect : return the x coordinate of current screen viewport yscreenrect : return the y coordinate of current screen viewport wscreenrect : return the w value of current screen viewport hscreenrect : return the h value of current screen viewport flagscreenrect : return the flag value of current screen viewport screenwidth : return the current screen width screenheight : return the current screen height offset(x,y) : set the logical current screen position xoffset : return the x coordinate offset in current screen yoffset : return the y coordinate offset in current screen cls : clear the current logic screen screenswap : update display,bobsystem,spritesystem autoback(m) : enable / disable automatic screenswap m=0 disable m>0 wait m milliseconds and perform screenswap m<0 perform the invocate in code screenswap after m milliseconds dualplayfield(m) : set/unset automatic update of a screen upper sprite -1 return state waitvbl : wait automatic screenswap fps(n) : set/unset or return (with -1) the current frame rate counter (0/1/-1) _________________________________________________________________________________________________________________________ Graphics rgb(r,g,b) : return current color in Uint32 format enablepalette(state) : enable disable and check the palettemode in 8 bit display color (c,optional v) : set palette color c with value v se missing return the current color c colorcycling(s,e,d=0|1) : move the palettecolor one color forward or back work only in 8bit display ink(c) : select the current color in Uint32 format point(x,y) : return the color of x,y point dot(x,y) : write x,y point with a current color dot_ex(x,y,c) : write x,y point with a c color line(x,y,x1,y1) : write a line box(x,y,x1,y1) : write a empty rettangle bar(x,y,x1,y1) : write a fill rettangle rectangle(x,y,w,h,mode) : write a rettangle w and h are the sizes mode=0 empty 1=filled circle(x,y,r) : write a circle fillcircle(x,y,r) : write a fill circle ellipse(x,y,rx,ry) : write a ellipse fillellipse(x,y,rx,ry) : write a fill ellipse paint(x,y) : fill a close area _________________________________________________________________________________________________________________________ File input output getfreeimage() : return a number of first image bank free loadimage(filename,optional n) : load a graphics file in a slot n if n=-1 use the first free and return as n loadzipimage(zipfile,filename,opt n) : load a graphics file stored in a zip archive in a slot n if n=-1 use the first free and return as n saveimage(filename,n) : save slot n in a graphics file(only bmp) getfreesound() : return a number of first sound bank free loadsound(filename,n) : load a wave file in a sound slot n if n=-1 use the first free and return as n loadzipsound(zipfile,filename,n) : load a wave zipped file in a sound slot n if n=-1 use the first free and return as n savesound(filename,n) : save a wave file from sound slot n loadmusic(filename) : load a music module (xm,mod,ogg and only for linux mp3) loadzipmusic(zipfile,filename) : load a zipped music module (xm,mod,ogg and only for linux mp3) _________________________________________________________________________________________________________________________ Image manipulation hotspot(n,x,y) : select the point of coordinates in a imageslot (n,0,0=up left(default) | n,1,1=center | n,2,2 =down right)n= image setcolorkey(c) : set the colorkey for bitmap transparency if set -1 (default ) will be used the left-up corner color. imageexists(n) : return 1 if the image buffer n exist 0 if empty imagewidth(n) : return the image n width or error if image n if empty imageheight(n) : return the image n height or error if image n if empty deleteimage(n) : erase the image n of the memory copyimage(s,d) : copy image s to image d setalpha(n,a) : set trasparency zoomimage(n,zoomx,zoomy) : zoom image rotateimage(n,angle) : rotate image rotozoomimage(n,angle,zoom) : rotate and zoom image mirrorimage(n,x,y) : vertical-orizontal mirror _________________________________________________________________________________________________________________________ Blitting blt(n,sx,sy,sw,sh,dx,dy) : copy a part of graphics slot in screen pastebob(x,y,n) : copy on screen image n at x,y performing clip pasteicon(x,y,n) : copy on screen image n at x,y without clipping grab(n,x,y,w,h) : grab a a selectarea and copy it in slot n _________________________________________________________________________________________________________________________ Sprite system In this implementation there are 512 sprites software that are indipendent from the screens spriteclip(x,y,w,h) : set the visibilty area of sprites sprite(n,x,y,fr) : set or move the sprite n at x,y with image fr deletesprite(n) : unset sprite n xsprite(n) : return the x of sprite n ysprite(n) : return the y of sprite n spritewidth(n) : return the width of sprite n spriteheight(n) : return the height of sprite n frsprite(n) : return the frame of sprite n livesprite(n) : return 1 if sprite n is "live" spritehit(n,x) : return 1 if sprite n have a collission with sprite x if x=-1 with any spritez(n,z) : set the zorder position of sprite if z =-1 report actual z position lastsprite : return the last sprite active autoupdatesprite(m) : set/ unset automatic sprites update at screenswap updatesprite : manual sprites updates at next screenswap _________________________________________________________________________________________________________________________ Bob system In this implementation there are 512 bobs software that are dipendent from the screens and performs background preserve setbob(n,scr) : set bob n at logic screen scr bob(n,x,y,fr) : set or move bob n at x,y with frame fr deletebob(n) : unset bob n xbob(n) : return x of bob n ybob(n) : return y of bob n bobwidth(n) : return width of bob n bobheight(n) : return height of bob n frbob(n) : return the frame of bob n livebob(n) : return 1 if bob n is "live" bobhit(n,x) : return 1 if bob n have a collision with bob x if x=-1 with any bobz(n,z) : set the zorder position of bob if z =-1 report actual z position lastbob : return the last bob active autoupdatebob(m) : set/ unset automatic bobs update at screenswap updatebob : manual bobs updates at next screenswap _________________________________________________________________________________________________________________________ Text draw text(x,y,s,text,option) : print the text testo on current screen with s size with option solid=0 Shaded=1 Blended=2 setfont(path) : select the font getfont() : get the font selected textrender(text,s,n,option) : make an image slot n with the text write with a current font and size s and option solid=0 Shaded=1 Blended=2 _________________________________________________________________________________________________________________________ Print screen pen(c) : set prints color (with -1 parameter return the current color) paper(c) : set caractere back color (with -1 parameter return the current color) fprints(text) : print a text monospace without cariage return prints(text) : print a text monospace locate(x,y) : move the cursor at x y atx : return x of cursor aty : return y of cursor curson : show the text cursor on screen at(atx,aty) cursoff : hide the text cursor inputs(prompt,defs) : return the string insert to keyboard(default is default text) zoneinputs(x,y,l,default) : return the string insert to keyboard in x,y coordinates with l lenght _________________________________________________________________________________________________________________________ Sounds and music isenabledsound() : return 1 if sdlsound was enabled soundexists(n) : return 1 if the sound buffer n exist 0 if empty deletesound(n) : delete from memory sound n copysound(s,d) : copy sound bank s in sound bank d musicexists() : return 1 if the music is load 0 if empty playsound(n,c,optional l) : play the sound n in channel c l loops playfreqsound(n,c,pitch,l) : play the sound n in channel c l loops at freq variation (negative number=low positive number =high) volumesound(c,optional v) : change the volume of channel c (-1 all) at value v (0-128) with v = -1 return the current volume stopsound(optional c) : stop the wave play in channel c (-1=all) pausesound(optional c) : paused channel c (-1=all) resumesound(optional c) : unpaused channel c (-1=all) vumetersound(optional c) : return the current state of sound channel (-1=all) positionsound(c,angle,dist) : position sound in 3d space soundchannels(n) : dinamically change the number of channells managed by sdlBasic playmusic(n) : play track xm,mod,ogg,mp3 n=number of ripetition(-1 always) positionmusic(p) : move the execution at p second stopmusic : terminate the music play pausemusic : set pause of the current music resumemusic : unset pause of musica rewindmusic : rewind at start the music fademusic(t) : music fade volumemusic(optional v) : change the volume of music (0-128) -1 return the current volume speedmusic(v) : change the speed of music _________________________________________________________________________________________________________________________ CD support numdrivescd() : returns the number of cd-rom drives on the system. namecd(drive) : returns a human-readable, system-dependent identifier for the cd-rom. getfreecd() : return first free channel Cd opencd(n,drive) : opens a cd-rom drive for access. indrivecd(n) : return 1 if cd is in driver trackscd(n) : return the number of tracks in cd curtrackcd(n) : return the current track in cd curframecd(n) : return the current frame in cd playcd(n,s,l) : play a cd playtrackscd(n,trk1,fr1,ntrks,nfrs) : play the given cd track(s)0=all pausecd(n) : pauses a cdrom resumecd(n) : resumes a cdrom stopcd(n) : stops a cdrom ejectcd(n) : ejects a cdrom closecd(n) : closes a cd handle tracktypecd(n,t) : return SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...) tracklengthcd(n,t) : return the length of track t trackoffsetcd(n,t) : return the offset to the beginning of this track in frames ________________________________________________________________________________________________________________________ Video mpeg loadmpeg(fname,usesound) : load a mpeg video plaympeg(loop) : play a mpeg1 video stopmpeg() : terminate the video play deletempeg() : unload mpeg video pausempeg() : Pause/Resume playback of an SMPEG object rewindmpeg() : Rewind the play position of an SMPEG object to the beginning of the MPEG seekmpeg(p) : Seek 'bytes' bytes in the MPEG stream skipmpeg(s) : Skip 'seconds' seconds in the MPEG stream statusmpeg() : return 1 if plaympeg work or 0 in other case ________________________________________________________________________________________________________________________ Keyboard key(keycode) : return 1 if is press the key keycode inkey : return ascii code of key press waitkey(keycode) : wait a key pression (-1 =any key) _________________________________________________________________________________________________________________________ Mouse xmouse : return mouse x coordinate on display ymouse : return mouse y coordinate on display xmousescreen(n) : return mouse x coordinate on screen ymousescreen(n) : return mouse y coordinate on screen bmouse : return the buttonclick on the mouse changemouse(n) : change mouse from default(0) to emulate with sprite 0 - image 0 (1,2,3) locatemouse(x,y) : move mouse at x y coordinates mouseshow : show the mouse cursor mousehide : hide the mouse cursor mousezone(x,y,w,h) : return 1 if the mouse pointer is in rectangle(xy with size wh) _________________________________________________________________________________________________________________________ Joystick numjoysticks : count available joysticks namejoystick(i) : get joystick name openjoystick(i) : opens a joystick for use. isopenjoystick(i) : determine if a joystick has been opened numaxesjoystick(i) : get the number of joystick axes numballsjoystick(i) : get the number of joystick trackballs numhatsjoystick(i) : get the number of joystick hats numbuttonsjoystick(i) : get the number of joysitck buttons getaxisjoystick(i,a) : get the current state of an axis gethatjoystick(i,a) : get the current state of a joystick hat getbuttonjoystick(i,a) : get the current state of a given button on a given joystick xgetballjoystick(i,a) : get relative x trackball motion ygetballjoystick(i,a) : get relative y trackball motion joy(i) : return joystick boolean coordinate bjoy(i) : return joystick buttons pressed in boolean expression emulate_bjoy : return emulate joystick buttons in keyboard keys waitbjoy : wait the pression of a joystick button (or emulate in keyboard) _________________________________________________________________________________________________________________________ Time waitTime(t) : wait t milliseconds timer : return the current tick _________________________________________________________________________________________________________________________ Socket isenabledsock() : return 1 if sdlnet was enabled sock=getfreesock() : return the first free sock in sdlSocket array sock=OpenSock(port) : Server side socket sock is the stream. in sdlBasic there are 256 stream and sintax is very similar of file open close. clientsock=AcceptSock(serversock) : Accept the client connection IsServerReady(Sock) : True/False if server is sending data     sock=ConnectSock(ServerName,port) : client side socket connection *ConnectionReadySock(sock) : the server have accepted the connection IsClientReady(Sock) : True/False if client is sending data CloseSock(sock) : Close the socket connection. Works for client and server *PeekSock(Sock, NumBytes) : Peek information coming from socket, but do not clear. ReadSock(Sock, NumBytes) : Read NumBytes ReadByteSock(Sock) : Read a single byte       ReadLineSock(Sock) : Read complete line WriteSock(Sock, Message, NumBytes) : Sends NumBytes from Message WriteByteSock(Sock, Byte) : Sends a single byte WriteLineSock(Sock, Message) : Send Message getremoteip(sock) : return the ip address of remote client connetted getremoteport(sock) : return the port address of remote client connetted getlocalip() : return the local ip _________________________________________________________________________________________________________________________ usr/src/sdlBasic/src/sdlBrt/stack.h0000777000076500007660000000135610463131223014443 0ustar /* Name: stack.h Purpose: Integer stacks for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ struct Stack { int tos; /* top of stack */ int size; /* size of stack */ int data[1]; /* stack data */ }; Stack *newStack( int size ); void pushStack( Stack *stack, int value ); void incrStack( Stack *stack, int value ); void decrStack( Stack *stack, int value ); void swapStack( Stack *stack ); void dupStack( Stack *stack ); int peekStack( Stack *stack ); int popStack( Stack *stack ); int isEmptyStack( Stack *stack ); int inStack( Stack *stack, int val ); void clearStack( Stack *stack ); void freeStack( Stack *stack ); usr/src/sdlBasic/src/sdlBrt/SDLengine/0000777000000000000000000000000010645354737016553 5ustar rootrootusr/src/sdlBasic/src/sdlBrt/SDLengine/print_screen.c0000755000076500007660000004073110636154344017643 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_______________________________________________________________________________________________________________________ // PRINT SCREEN //_________________________________________________________________________________________________________________________ //pen(c) : set prints color (with -1 parameter return the current color) //* int pen(int c) { int p2p[]={1,2,4,8,16,32,64,128,256,512}; Uint16 i; int x,y; SDL_Color oldc; unsigned char z[256*14]={ 0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,8,8,8,8,8,0,0,8,0,0, 0,0,0,20,20,20,0,0,0,0,0,0,0, 0,0,0,40,36,126,20,20,63,10,10,0,0, 0,0,0,8,60,10,10,28,40,40,30,8,8, 0,0,0,12,18,18,44,24,54,80,112,0,0, 0,0,0,28,4,4,12,74,82,34,92,0,0, 0,0,0,8,8,8,0,0,0,0,0,0,0, 0,0,0,8,8,4,4,4,4,4,4,8,8, 0,0,0,4,4,8,8,8,8,8,8,4,4, 0,0,0,8,42,28,62,8,0,0,0,0,0, 0,0,0,0,0,4,4,4,63,4,4,0,0, 0,0,0,0,0,0,0,0,0,8,8,4,0, 0,0,0,0,0,0,0,0,28,0,0,0,0, 0,0,0,0,0,0,0,0,0,8,8,0,0, 0,0,0,16,16,16,8,8,4,4,2,2,0, 0,0,0,28,50,34,42,34,34,50,28,0,0, 0,0,0,14,8,8,8,8,8,8,30,0,0, 0,0,0,30,32,32,48,16,8,4,62,0,0, 0,0,0,30,32,32,24,32,32,32,30,0,0, 0,0,0,24,24,20,18,18,62,16,16,0,0, 0,0,0,30,2,2,14,16,16,16,14,0,0, 0,0,0,60,6,2,30,34,34,34,28,0,0, 0,0,0,62,32,16,16,8,8,8,4,0,0, 0,0,0,28,34,34,28,34,34,34,28,0,0, 0,0,0,28,50,34,50,44,32,48,28,0,0, 0,0,0,0,0,8,8,0,0,8,8,0,0, 0,0,0,0,0,8,8,0,0,8,8,4,0, 0,0,0,0,0,32,28,3,14,48,0,0,0, 0,0,0,0,0,0,63,0,63,0,0,0,0, 0,0,0,0,0,1,14,48,28,3,0,0,0, 0,0,0,28,32,32,16,8,8,0,8,0,0, 0,0,0,0,56,68,114,74,74,74,114,4,56, 0,0,0,12,12,20,20,18,62,34,33,0,0, 0,0,0,30,34,34,30,34,34,34,30,0,0, 0,0,0,60,6,2,2,2,2,6,60,0,0, 0,0,0,14,18,34,34,34,34,18,30,0,0, 0,0,0,62,2,2,30,2,2,2,62,0,0, 0,0,0,30,2,2,30,2,2,2,2,0,0, 0,0,0,60,6,2,2,50,34,34,60,0,0, 0,0,0,34,34,34,62,34,34,34,34,0,0, 0,0,0,30,8,8,8,8,8,8,30,0,0, 0,0,0,28,16,16,16,16,16,17,15,0,0, 0,0,0,34,18,10,14,10,18,50,34,0,0, 0,0,0,2,2,2,2,2,2,2,62,0,0, 0,0,0,102,102,86,90,90,66,66,66,0,0, 0,0,0,34,38,38,42,42,42,50,50,0,0, 0,0,0,28,34,34,34,34,34,50,28,0,0, 0,0,0,30,34,34,34,30,2,2,2,0,0, 0,0,0,28,34,34,34,34,34,50,28,16,0, 0,0,0,30,34,34,34,30,18,34,98,0,0, 0,0,0,60,2,2,14,48,32,32,30,0,0, 0,0,0,63,8,8,8,8,8,8,8,0,0, 0,0,0,34,34,34,34,34,34,34,28,0,0, 0,0,0,35,34,18,18,20,20,12,12,0,0, 0,0,0,33,33,41,45,46,54,54,18,0,0, 0,0,0,34,18,20,8,12,20,18,35,0,0, 0,0,0,34,50,20,12,8,8,8,8,0,0, 0,0,0,62,48,16,8,8,4,6,62,0,0, 0,0,0,24,8,8,8,8,8,8,8,8,24, 0,0,0,2,2,4,4,8,8,16,16,16,0, 0,0,0,12,8,8,8,8,8,8,8,8,12, 0,0,0,12,20,34,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,255, 0,0,4,8,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,30,32,60,34,50,62,0,0, 0,0,0,2,2,30,34,34,34,34,30,0,0, 0,0,0,0,0,60,2,2,2,2,60,0,0, 0,0,0,32,32,60,34,34,34,34,60,0,0, 0,0,0,0,0,28,34,62,2,2,60,0,0, 0,0,0,56,8,62,8,8,8,8,8,0,0, 0,0,0,0,0,60,34,34,34,34,60,32,28, 0,0,0,2,2,30,34,34,34,34,34,0,0, 0,0,0,8,0,14,8,8,8,8,62,0,0, 0,0,0,8,0,14,8,8,8,8,8,8,6, 0,0,0,2,2,18,10,6,10,18,50,0,0, 0,0,0,7,4,4,4,4,4,4,28,0,0, 0,0,0,0,0,62,42,42,42,42,42,0,0, 0,0,0,0,0,30,34,34,34,34,34,0,0, 0,0,0,0,0,28,34,34,34,34,28,0,0, 0,0,0,0,0,30,34,34,34,34,30,2,2, 0,0,0,0,0,60,34,34,34,34,60,32,32, 0,0,0,0,0,60,4,4,4,4,4,0,0, 0,0,0,0,0,30,2,6,24,16,14,0,0, 0,0,0,8,8,62,8,8,8,8,56,0,0, 0,0,0,0,0,34,34,34,34,34,60,0,0, 0,0,0,0,0,34,18,18,20,12,12,0,0, 0,0,0,0,0,33,33,41,46,30,18,0,0, 0,0,0,0,0,50,20,12,12,20,34,0,0, 0,0,0,0,0,34,18,20,20,12,8,8,6, 0,0,0,0,0,30,16,8,4,2,30,0,0, 0,0,0,56,8,8,8,6,8,8,8,8,56, 0,0,0,8,8,8,8,8,8,8,8,8,8, 0,0,0,6,8,8,8,48,8,8,8,8,6, 0,0,0,0,0,0,6,24,0,0,0,0,0, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,126,66,66,66,66,66,66,66,66,126, 0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,8,0,0,8,8,8,8,8,0,0, 0,0,0,8,8,28,10,10,10,10,28,8,0, 0,0,0,56,4,4,4,30,4,4,62,0,0, 0,0,0,0,0,0,60,36,36,60,0,0,0, 0,0,0,34,34,20,54,62,8,8,8,0,0, 0,0,0,0,8,8,8,8,0,8,8,8,8, 0,0,0,14,2,4,10,18,20,8,16,14,0, 0,0,0,20,0,0,0,0,0,0,0,0,0, 0,0,0,0,56,124,134,134,186,68,56,0,0, 0,0,0,28,32,60,36,60,60,0,0,0,0, 0,0,0,0,0,0,36,26,18,36,0,0,0, 0,0,0,0,0,0,63,32,32,0,0,0,0, 0,0,0,0,0,0,0,0,28,0,0,0,0, 0,0,0,0,56,124,170,154,170,68,56,0,0, 0,0,0,28,0,0,0,0,0,0,0,0,0, 0,0,0,12,20,20,12,0,0,0,0,0,0, 0,0,0,0,0,4,4,63,4,0,63,0,0, 0,0,0,28,16,8,4,28,0,0,0,0,0, 0,0,0,28,16,8,16,12,0,0,0,0,0, 0,0,16,8,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,34,34,34,34,34,62,2,2, 0,0,0,60,46,46,46,40,40,40,40,40,0, 0,0,0,0,0,0,8,8,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,16,28, 0,0,0,12,8,8,8,28,0,0,0,0,0, 0,0,0,12,18,18,18,12,30,0,0,0,0, 0,0,0,0,0,0,10,52,20,10,0,0,0, 0,0,4,4,4,4,14,24,38,48,40,56,32, 0,0,4,4,4,4,14,28,24,32,16,8,56, 0,0,6,8,4,8,6,28,35,48,40,56,32, 0,0,0,8,0,8,8,4,2,2,30,0,0, 0,0,0,12,12,20,20,18,62,34,33,0,0, 0,8,0,12,12,20,20,18,62,34,33,0,0, 0,12,0,12,12,20,20,18,62,34,33,0,0, 0,40,20,24,24,28,36,36,62,66,66,0,0, 0,20,0,8,12,20,20,18,62,34,34,0,0, 0,12,20,8,12,20,20,22,62,34,35,0,0, 0,0,0,120,20,20,116,18,30,18,114,0,0, 0,0,0,60,6,2,2,2,2,6,60,16,28, 0,0,0,62,2,2,30,2,2,2,62,0,0, 0,8,0,62,2,2,30,2,2,2,62,0,0, 0,12,0,62,2,2,30,2,2,2,62,0,0, 0,20,0,62,2,2,30,2,2,2,62,0,0, 0,8,0,30,8,8,8,8,8,8,30,0,0, 0,8,0,30,8,8,8,8,8,8,30,0,0, 0,12,0,30,8,8,8,8,8,8,30,0,0, 0,20,0,30,8,8,8,8,8,8,30,0,0, 0,0,0,14,18,34,39,34,34,18,30,0,0, 0,16,28,38,38,46,42,42,58,50,50,0,0, 0,8,0,28,34,34,34,34,34,50,28,0,0, 0,8,0,28,34,34,34,34,34,50,28,0,0, 0,12,0,28,34,34,34,34,34,50,28,0,0, 40,20,0,28,34,34,34,34,34,50,28,0,0, 0,20,0,28,34,34,34,34,34,34,28,0,0, 0,0,0,0,0,2,22,12,20,50,0,0,0, 0,0,0,60,34,50,42,38,38,50,28,0,0, 0,8,0,34,34,34,34,34,34,34,28,0,0, 0,8,0,34,34,34,34,34,34,34,28,0,0, 0,28,0,34,34,34,34,34,34,34,28,0,0, 0,20,0,34,34,34,34,34,34,34,28,0,0, 0,8,0,34,50,20,12,8,8,8,8,0,0, 0,0,0,2,2,30,34,34,30,2,2,0,0, 0,0,0,14,18,10,10,10,50,34,30,0,0, 0,0,4,8,0,30,32,60,34,34,62,0,0, 0,0,16,8,0,30,32,60,34,50,62,0,0, 0,0,8,20,0,30,32,60,34,50,62,0,0, 0,0,0,28,0,30,32,60,34,50,46,0,0, 0,0,0,20,0,30,32,60,34,50,46,0,0, 0,12,20,20,8,30,32,60,34,50,46,0,0, 0,0,0,0,0,110,80,124,18,18,110,0,0, 0,0,0,0,0,60,2,2,2,2,60,16,28, 0,0,4,8,0,28,34,62,2,2,60,0,0, 0,0,16,8,0,28,34,62,2,2,60,0,0, 0,0,8,20,0,28,34,62,2,2,60,0,0, 0,0,0,20,0,28,34,62,2,2,60,0,0, 0,0,4,8,0,14,8,8,8,8,62,0,0, 0,0,16,8,0,14,8,8,8,8,62,0,0, 0,0,8,20,0,14,8,8,8,8,62,0,0, 0,0,0,20,0,14,8,8,8,8,62,0,0, 0,0,0,20,8,28,34,34,34,34,28,0,0, 0,0,0,30,0,30,34,34,34,34,34,0,0, 0,0,4,8,0,28,34,34,34,34,28,0,0, 0,0,16,8,0,28,34,34,34,34,28,0,0, 0,0,8,20,0,28,34,34,34,34,28,0,0, 0,0,0,28,0,28,34,34,34,34,28,0,0, 0,0,0,20,0,28,34,34,34,34,28,0,0, 0,0,0,0,0,4,0,63,0,4,0,0,0, 0,0,0,0,0,60,50,42,38,38,30,0,0, 0,0,6,8,0,34,34,34,34,34,60,0,0, 0,0,16,8,0,34,34,34,34,34,60,0,0, 0,0,8,20,0,34,34,34,34,34,60,0,0, 0,0,0,20,0,34,34,34,34,34,60,0,0, 0,0,16,8,0,34,18,20,20,12,8,8,6, 0,0,0,2,2,30,34,34,34,34,30,2,2, 0,0,0,0,0,0,0,0,0,0,0,0,0 }; if(c!=-1){ oldc=SDLcol; ink(c); pen_color=c; for (i=0; i<0xff;i++){ SDL_FreeSurface(SDLfont_mono[i]); SDLfont_mono[i]=SDL_CreateRGBSurface(SDL_HWSURFACE, 10, 13,displaybpp(),0,0,0,0); SDL_FillRect(SDLfont_mono[i],NULL,paper_color); Image_colorkey(SDLfont_mono[i]); if (SDL_MUSTLOCK(SDLfont_mono[i])) SDL_LockSurface(SDLfont_mono[i]); for(y=0;y<13;y++){ for(x=0; x<10;x++){ if (z[i*13+y] & (1*p2p[x])){ putpixel(SDLfont_mono[i],x,y,pen_color); } } } if (SDL_MUSTLOCK(SDLfont_mono[i])) SDL_UnlockSurface(SDLfont_mono[i]); } SDLcol=oldc; return 0; } else{ return pen_color; } } //*/ /* int pen(int c) { Uint16 i; SDL_Color oldc; if(c!=-1){ oldc=SDLcol; ink(c); pen_color=c; font_mono = TTF_OpenFont(fontPathMono,PRINT_SIZE-1); if (font_mono ==0) { error_description="SDLengine error - pen: Can't open monospace font. Please verify installation"; error_type=1; SDLerr(stderr,"SDLengine error - pen: Can't open monospace font. Please verify installation. %s\n",SDL_GetError()); return -1; } for (i=0; i<0xff;i++){ SDL_FreeSurface(SDLfont_mono[i]); //SDLfont_mono[i] = TTF_RenderGlyph_Solid(font_mono,i,SDLcol); //make a problem with vertical collocation of charackters SDLfont_mono[i] = TTF_RenderText_Blend(font_mono,(unsigned char *) &i,SDLcol);//solid does not work :-( } TTF_CloseFont(font_mono); SDLcol=oldc; return 0; } else{ return pen_color; } } //*/ //_______________________________________________________________________________________________________________________ //paper(c) : set caractere back color (with -1 parameter return the current color) int paper(int c) { if (c!=-1){ paper_color=c; return 0; } else { return paper_color; } } //_______________________________________________________________________________________________________________________ //fprints(text) : print a text monospace without cariage return int fprints(char *testo) { int flag_cursore; unsigned int i,i1; i=0; flag_cursore=cursore_state[c_screen]; if (flag_cursore!=0)cursoff(); for (i=0;i(screenwidth()/XPRINT_SIZE)) { if (stx[c_screen]+1>(screenwidth()/XPRINT_SIZE)){ sty[c_screen]++; stx[c_screen]=stx[c_screen]-(screenwidth()/XPRINT_SIZE); } } while (sty[c_screen]+1>(screenheight()/(PRINT_SIZE))){ screenswap(); screencopy(c_screen,0,PRINT_SIZE,screenwidth(),screenheight()-(PRINT_SIZE),c_screen,0,0); ink(paper_color); bar(0,screenheight()-(PRINT_SIZE),screenwidth(),screenheight()); sty[c_screen]=sty[c_screen]-1; screenswap(); } if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //atx : return x of cursor int atx() { return stx[c_screen]; } //_______________________________________________________________________________________________________________________ //aty : return y of cursor int aty() { return sty[c_screen]; } //_______________________________________________________________________________________________________________________ //curson : show the text cursor on screen at(atx,aty) int curson() { if (cursore_state[c_screen]==0){ cursore_state[c_screen]=1; cursore_anim[c_screen]=0; } screenswap(); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //cursoff : hide the text cursor int cursoff() { if (cursore_state[c_screen]==2){ cursore_state[c_screen]=3; cursore_anim[c_screen]=0; } screenswap(); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //inputs(prompt,defs) : return the string insert to keyboard(default is default text) int inputs(char *request,char *defs) { int oldautoback; oldautoback=autoback(-1); autoback(25); if (cursore_state[c_screen]>1) { while ((sty[c_screen]+1)>(screenheight()/(PRINT_SIZE))) { screenswap(); screencopy(c_screen,0,PRINT_SIZE,screenwidth(),screenheight()-(PRINT_SIZE),c_screen,0,0); ink(paper_color); //bar(0,screenheight()-(PRINT_SIZE),screenwidth(),screenheight()); sty[c_screen]=sty[c_screen]-1; //screenswap(); } fprints(request); _input(defs,stx[c_screen],sty[c_screen],255);//screenwidth()/XPRINT_SIZE put_char(13); } else { while ((sty[c_screen]+1)>(screenheight()/(PRINT_SIZE))) { screenswap(); screencopy(c_screen,0,PRINT_SIZE,screenwidth(),screenheight()-(PRINT_SIZE),c_screen,0,0); ink(paper_color); bar(0,screenheight()-(PRINT_SIZE),screenwidth(),screenheight()); sty[c_screen]=sty[c_screen]-1; //screenswap(); } fprints(request); curson(); _input(defs,stx[c_screen],sty[c_screen],255);//screenwidth()/XPRINT_SIZE put_char(13); cursoff(); } autoback(oldautoback); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //zoneinputs(x,y,l,default) : return the string insert to keyboard in x,y coordinates with l lenght int zoneinputs(int x,int y,int l,char defs[255]) { if (cursore_state[c_screen]==2) { _input(defs,x,y,l); put_char(13); } else { locate(x,y); curson(); _input(defs,x,y,l); put_char(13); cursoff(); } if (autotimer()!=0)return -1; return 0; } usr/src/sdlBasic/src/sdlBrt/SDLengine/cd_support.c0000777000076500007660000001654210463132110017322 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_________________________________________________________________________________________________________________________ //CD SUPPORT //_________________________________________________________________________________________________________________________ //numdrivescd : returns the number of cd-rom drives on the system. int numdrivescd() { return SDL_CDNumDrives(); } //_________________________________________________________________________________________________________________________ //namecd(drive) : returns a human-readable, system-dependent identifier for the cd-rom. int namecd(char name[255],int drive) { char *pname; pname =(char *)SDL_CDName(drive); strcpy(name,pname); if (name==NULL)return -1; return 0; } //_________________________________________________________________________________________________________________________ //getfreecd : return first free channel Cd int getfreecd() { int i; for(i=0; iNUM_CD)return -1; if(SDLcd[n]!=NULL)free(SDLcd[n]); SDLcd[n]=SDL_CDOpen(drive); if(SDLcd[n]!=NULL) return n; else return -1; } //_________________________________________________________________________________________________________________________ //indrivecd(n) : return 1 if cd is in driver int indrivecd(int n) { if(n<0 ||n>NUM_CD)return -1; if(CD_INDRIVE(SDL_CDStatus(SDLcd[n]))) return 1; else return 0; } //_________________________________________________________________________________________________________________________ //trackscd(cd) : returns the number of tracks in cd. int trackscd(int n) { if (n<0 ||n>NUM_CD)return -1; if (SDLcd[n]==NULL)return -1; return SDLcd[n]->numtracks; } //_________________________________________________________________________________________________________________________ //curtrackcd(n) : return the current track in cd int curtrackcd(int n) { if( n<0 ||n>NUM_CD)return -1; if (SDLcd[n]==NULL)return -1; SDL_CDStatus(SDLcd[n]); return SDLcd[n]->cur_track; } //_________________________________________________________________________________________________________________________ //curframecd(n) : return the current frame in cd int curframecd(int n) { if( n<0 ||n>NUM_CD)return -1; if (SDLcd[n]==NULL)return -1; SDL_CDStatus(SDLcd[n]); return SDLcd[n]->cur_frame; } //_________________________________________________________________________________________________________________________ //playcd(n,s,l) : play a cd int playcd(int n,int s,int l) { if( n<0 ||n>NUM_CD)return -1; if (SDLcd[n]==NULL)return -1; if (CD_INDRIVE(SDL_CDStatus(SDLcd[n]))) return SDL_CDPlay(SDLcd[n],s,l); return 0; } //_________________________________________________________________________________________________________________________ //playtrackscd(n,trk1,fr1,ntrks,nfrs) : play the given cd track(s)0=all int playtrackscd(int n,int trk1,int fr1,int ntrks,int nfrs) { if( n<0 ||n>NUM_CD)return -1; if (SDLcd[n]==NULL)return -1; if(CD_INDRIVE(SDL_CDStatus(SDLcd[n]))) return SDL_CDPlayTracks(SDLcd[n], trk1, fr1, ntrks, nfrs); return 0; } //_________________________________________________________________________________________________________________________ //pausecd(n) : pauses a cdrom int pausecd(int n) { if( n<0 ||n>NUM_CD)return -1; if (SDLcd[n]==NULL)return -1; if (!CD_INDRIVE(SDL_CDStatus(SDLcd[n])))return -1; return SDL_CDPause(SDLcd[n]); } //_________________________________________________________________________________________________________________________ //resumecd(n) : resumes a cdrom int resumecd(int n) { if( n<0 ||n>NUM_CD)return -1; if (SDLcd[n]==NULL)return -1; if (!CD_INDRIVE(SDL_CDStatus(SDLcd[n])))return -1; return SDL_CDResume(SDLcd[n]); } //_________________________________________________________________________________________________________________________ //stopcd(n) : stops a cdrom int stopcd(int n) { if( n<0 ||n>NUM_CD)return -1; if (SDLcd[n]==NULL)return -1; if (!CD_INDRIVE(SDL_CDStatus(SDLcd[n])))return -1; return SDL_CDStop(SDLcd[n]); } //_________________________________________________________________________________________________________________________ //ejectcd(n) : ejects a cdrom int ejectcd(int n) { if( n<0 ||n>NUM_CD)return -1; if (SDLcd[n]==NULL)return -1; return SDL_CDEject(SDLcd[n]); } //_________________________________________________________________________________________________________________________ //closecd(n) : closes a cd handle int closecd(int n) { if( n<0 ||n>NUM_CD)return -1; if (SDLcd[n]==NULL)return -1; SDL_CDClose(SDLcd[n]); return 0; } //_________________________________________________________________________________________________________________________ //tracktypecd(n,t) : return SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...) int tracktypecd(int n,int t) { if( n<0 ||n>NUM_CD)return -1; if(SDLcd[n]==NULL)return -1; if (!CD_INDRIVE(SDL_CDStatus(SDLcd[n])))return -1; if (t<0 || t > (SDLcd[n]->numtracks))return -1; return SDLcd[n]->track[t].type; } //_________________________________________________________________________________________________________________________ //tracklengthcd(n,t) : return the length of track t int tracklengthcd(int n,int t) { if( n<0 ||n>NUM_CD)return -1; if(SDLcd[n]==NULL)return -1; if (!CD_INDRIVE(SDL_CDStatus(SDLcd[n])))return -1; if (t<0 || t>(SDLcd[n]->numtracks))return -1; return SDLcd[n]->track[t].length; } //_________________________________________________________________________________________________________________________ //trackoffsetcd(n,t) : return the offset to the beginning of this track in frames int trackoffsetcd(int n,int t) { if( n<0 ||n>NUM_CD)return -1; if(SDLcd[n]==NULL)return -1; if (!CD_INDRIVE(SDL_CDStatus(SDLcd[n])))return -1; if (t<0 || t>(SDLcd[n]->numtracks))return -1; return SDLcd[n]->track[t].offset; } usr/src/sdlBasic/src/sdlBrt/SDLengine/clean.bat0000755000076500007660000000031010622663341016540 0ustar @echo off echo now clean SDLengine: please wait rem WARNING!!! verify the correct path of mingGw set MINGWPATH=c:\devel\c-cpp\mingw path %MINGWPATH%\bin;%PATH% mingw32-make os=win32 clean usr/src/sdlBasic/src/sdlBrt/SDLengine/SDLengine.c0000755000076500007660000002776010636154431016764 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include #include #include #include #include #include "SDL.h" #include "SDL_mixer.h" #include "SDL_image.h" #include "SDL_ttf.h" #include "SDL_net.h" #include "../unzip/unzip.h" #include "SDLengine.h" //error print #define SDLerr fprintf //_________________________________________________________________________________________________________________________ //DECLARATIONS //- SCREEN -------------------------------------------------------------------------------------------------------------- SDL_Surface *SDLdisplay; //int GL_display; int SDLautoback; float SDLautobacktime; int vbl; int display_mode; int SDLupdatesprite; int SDLupdatebob; int SDLdualplayfield; int SDLnoAlphaChannel; int SDLfps; int SDLfps_count; int SDLfps_flag; int SDLfps_time; int c_screen; SDL_Surface *SDLscreen[NUM_SCREENS]; int Palette[256]; int enablePalette; int colorcycling_s; int colorcycling_e; int colorcycling_d; int colorcycling_delay; int colorcycling_next; SDL_Rect SDLscreen_rect[NUM_SCREENS]; int SDLscreen_z[NUM_SCREENS]; int SDLscreen_flag[NUM_SCREENS]; int SDLscreen_live[NUM_SCREENS]; int SDLoffx[NUM_SCREENS]; int SDLoffy[NUM_SCREENS]; int SDLlastscreen; SDL_Color SDLcol; //FADE PARAM int fadeflag[NUM_SCREENS]; SDL_Surface* p_surf_black[NUM_SCREENS]; SDL_Surface* p_surf_screen_copy[NUM_SCREENS]; Uint32 ui_old_time[NUM_SCREENS], ui_curr_time[NUM_SCREENS], ui_time_ms[NUM_SCREENS] ; int fadedelay[NUM_SCREENS]; double f_alpha[NUM_SCREENS] ; Uint32 ui_flags[NUM_SCREENS]; SDL_Surface* p_surf_screen[NUM_SCREENS]; SDL_Surface* p_surf_img[NUM_SCREENS]; Uint32 ui_seconds[NUM_SCREENS]; int b_fade_out[NUM_SCREENS]; int crossfadeflag[NUM_SCREENS]; SDL_Surface* p_surf_img1[NUM_SCREENS]; SDL_Surface* p_surf_img2[NUM_SCREENS]; //------------------------------------------------------------------------------------------------------------------------ //- IMAGES -------------------------------------------------------------------------------------------------------------- int SDL_hsx[NUM_IMAGES]; int SDL_hsy[NUM_IMAGES]; SDL_Surface *SDLimage[NUM_IMAGES]; SDL_Surface *SDLimageCC[NUM_IMAGES]; Uint32 colorkey; //------------------------------------------------------------------------------------------------------------------------ //- SPRITES -------------------------------------------------------------------------------------------------------------- int SDLspritex[NUM_SPRITES]; int SDLspritey[NUM_SPRITES]; int SDLspritefr[NUM_SPRITES]; int SDLspritelive[NUM_SPRITES]; int SDLspritez[NUM_SPRITES]; SDL_Rect SDLspriteclip; int SDLlastsprite; //------------------------------------------------------------------------------------------------------------------------ //- BOBS ----------------------------------------------------------------------------------------------------------------- int SDLbobscreen[NUM_BOBS]; int SDLbobx[NUM_BOBS]; int SDLboby[NUM_BOBS]; int SDLbobxold[NUM_BOBS]; int SDLbobyold[NUM_BOBS]; int SDLbobfr[NUM_BOBS]; int SDLboblive[NUM_BOBS]; int SDLbobz[NUM_BOBS]; SDL_Surface *SDLbobback[NUM_BOBS]; int SDLlastbob; //------------------------------------------------------------------------------------------------------------------------ //- SOUND AND MUSIC ------------------------------------------------------------------------------------------------------ int enabledsound; Mix_Chunk *SDLsound[NUM_WAVES]; Mix_Music *SDLmusic; //------------------------------------------------------------------------------------------------------------------------ //- CD SUPPORT ----------------------------------------------------------------------------------------------------------- SDL_CD *SDLcd[NUM_CD]; //------------------------------------------------------------------------------------------------------------------------ //- VIDEO MPEG --------------------------------------------------------------------------------------------------------------------- SMPEG *mpeg; SMPEG_Info info; int mpeg_audio; //------------------------------------------------------------------------------------------------------------------------ //- TEXT AND PRINT ------------------------------------------------------------------------------------------------------- char *fontPath; TTF_Font *font; SDL_Surface *SDLtext; //TTF_Font *font_mono; //char *fontPathMono; SDL_Surface *SDLfont_mono[0xff]; int stx[NUM_SCREENS]; int sty[NUM_SCREENS]; int pen_color; int paper_color; int oldstx[NUM_SCREENS]; int oldsty[NUM_SCREENS]; SDL_Surface *SDLcursore[16]; int cursore_state[NUM_SCREENS]; SDL_Surface *SDLcursore_preserve[NUM_SCREENS]; int cursore_anim[NUM_SCREENS]; //------------------------------------------------------------------------------------------------------------------------ //- KEYBOARD -------------------------------------------------------------------------------------------------------------- int lastkey; //------------------------------------------------------------------------------------------------------------------------ //- MOUSE -------------------------------------------------------------------------------------------------------------- int mousepointer; int mousestate; //------------------------------------------------------------------------------------------------------------------------ //- JOYSTICK ------------------------------------------------------------------------------------------------------ SDL_Joystick *SDLjoy; //------------------------------------------------------------------------------------------------------------------------ //- SOCKS ---------------------------------------------------------------------------------------------------------------- int enabledsock; TCPsocket SDLsock[NUM_SOCKS]; //------------------------------------------------------------------------------------------------------------------------ /*----- Error system ---*/ char *error_description; int error_type; //========================================================================================================================================== // STARTING AND CLOSING SDLENGINE //========================================================================================================================================== //________________________________________________________________________________________________________________________________________ //initialize : Start the engine and set the default parameter int initialize(int audio,int socket,int defaults) { int i; /*reset error_description */ error_description=NULL; error_type=0; /* Initialize the SDL library */ if ( SDL_Init(SDL_INIT_EVERYTHING) < 0 ) { SDLerr(stderr, "Can't initialize SDL: %s\n",SDL_GetError()); exit(2); } atexit(SDL_Quit); if (audio!=0){ /* Open the audio device */ // parameters: 11025 | 22050 | 44100 - AUDIO_U8 | AUDIO_S16SYS - 1 | 2 - 512 | 8192 #ifdef OPENBSD if ( Mix_OpenAudio(44100, AUDIO_U8, 2, 8192) < 0 ) { #elif GP2X if ( Mix_OpenAudio(22050, AUDIO_U8, 2, 256) < 0 ) { #else if ( Mix_OpenAudio(44100, AUDIO_S16SYS, 2, 8192) < 0 ) { #endif SDLerr(stderr,"Warning: Can't set 44100 Hz 16-bit stereo audio\n- Reason: %s\n",SDL_GetError()); enabledsound=0; } else{ Mix_AllocateChannels(16); enabledsound=1; } } else{ enabledsound=0; } #if defined(WIN32) fontPath=(char *)malloc(256); strcpy(fontPath,getenv("WINDIR")); strcat(fontPath,"\\fonts\\DejaVuSans.ttf\0"); if (!fileExist(fontPath))fontPath=".\\DejaVuSans.ttf"; #else fontPath=(char *) malloc(256); strcpy(fontPath,font_prefix); strcat(fontPath,"/dejavu/DejaVuSans.ttf\0"); if (!fileExist(fontPath))fontPath="./DejaVuSans.ttf"; #endif /* if (!fileExist(fontPath)){ error_description="Fatal: DejaVuSans.ttf fonts not found "; error_type=1; SDLerr(stderr,"Fatal: DejaVuSans.ttf fonts not found \n "); return 1; } //*/ if ( TTF_Init() != 0 ) { SDLerr(stderr,"Warning: Can't initialize true type %s errror: %s\n",fontPath,SDL_GetError()); } else { /* enabled unicode*/ SDL_EnableUNICODE(1); /* enabled autorepeat keys */ SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY,SDL_DEFAULT_REPEAT_INTERVAL); } if (socket!=0){ /* net initializing */ if ( SDLNet_Init() != 0 ) { SDLerr(stderr,"Warning: Can't initialize net system: %s\n",SDL_GetError()); enabledsock=0; } else{ enabledsock=1; } } else{ enabledsock=0; } for (i=0;i0 wait m milliseconds and perform screenswap m<0 perform the invocate in code screenswap after m milliseconds dualplayfield(m) : set/unset automatic update of a screen upper sprite -1 return state waitvbl : wait automatic screenswap fps(n) : set/unset or return (with -1) the current frame rate counter (0/1/-1) _________________________________________________________________________________________________________________________ Graphics rgb(r,g,b) : return current color in Uint32 format enablepalette(state) : enable disable and check the palettemode in 8 bit display color (c,optional v) : set palette color c with value v se missing return the current color c colorcycling(s,e,d=0|1) : move the palettecolor one color forward or back work only in 8bit display ink(c) : select the current color in Uint32 format point(x,y) : return the color of x,y point dot(x,y) : write x,y point with a current color dot_ex(x,y,c) : write x,y point with a c color line(x,y,x1,y1) : write a line box(x,y,x1,y1) : write a empty rettangle bar(x,y,x1,y1) : write a fill rettangle rectangle(x,y,w,h,mode) : write a rettangle w and h are the sizes mode=0 empty 1=filled circle(x,y,r) : write a circle fillcircle(x,y,r) : write a fill circle ellipse(x,y,rx,ry) : write a ellipse fillellipse(x,y,rx,ry) : write a fill ellipse paint(x,y) : fill a close area triangle(xa,ya,xb,yb,xc,yc) : draw a filled triangle _________________________________________________________________________________________________________________________ File input output getfreeimage() : return a number of first image bank free loadimage(filename,optional n) : load a graphics file in a slot n if n=-1 use the first free and return as n loadzipimage(zipfile,filename,opt n) : load a graphics file stored in a zip archive in a slot n if n=-1 use the first free and return as n saveimage(filename,n) : save slot n in a graphics file(only bmp) getfreesound() : return a number of first sound bank free loadsound(filename,n) : load a wave file in a sound slot n if n=-1 use the first free and return as n loadzipsound(zipfile,filename,n) : load a wave zipped file in a sound slot n if n=-1 use the first free and return as n savesound(filename,n) : save a wave file from sound slot n loadmusic(filename) : load a music module (xm,mod,ogg and only for linux mp3) loadzipmusic(zipfile,filename) : load a zipped music module (xm,mod,ogg and only for linux mp3) _________________________________________________________________________________________________________________________ Image manipulation hotspot(n,x,y) : select the point of coordinates in a imageslot (n,0,0=up left(default) | n,1,1=center | n,2,2 =down right)n= image setcolorkey(c) : set the colorkey for bitmap transparency if set -1 (default ) will be used the left-up corner color. imageexists(n) : return 1 if the image buffer n exist 0 if empty imagewidth(n) : return the image n width or error if image n if empty imageheight(n) : return the image n height or error if image n if empty deleteimage(n) : erase the image n of the memory copyimage(s,d) : copy image s to image d setalpha(n,a) : set trasparency zoomimage(n,zoomx,zoomy) : zoom image rotateimage(n,angle) : rotate image rotozoomimage(n,angle,zoom) : rotate and zoom image mirrorimage(n,x,y) : vertical-orizontal mirror _________________________________________________________________________________________________________________________ Blitting blt(n,sx,sy,sw,sh,dx,dy) : copy a part of graphics slot in screen pastebob(x,y,n) : copy on screen image n at x,y performing clip pasteicon(x,y,n) : copy on screen image n at x,y without clipping grab(n,x,y,w,h) : grab a a selectarea and copy it in slot n _________________________________________________________________________________________________________________________ Sprite system In this implementation there are 512 sprites software that are indipendent from the screens spriteclip(x,y,w,h) : set the visibilty area of sprites sprite(n,x,y,fr) : set or move the sprite n at x,y with image fr deletesprite(n) : unset sprite n xsprite(n) : return the x of sprite n ysprite(n) : return the y of sprite n spritewidth(n) : return the width of sprite n spriteheight(n) : return the height of sprite n frsprite(n) : return the frame of sprite n livesprite(n) : return 1 if sprite n is "live" spritehit(n,x) : return 1 if sprite n have a collission with sprite x if x=-1 with any spritez(n,z) : set the zorder position of sprite if z =-1 report actual z position lastsprite : return the last sprite active autoupdatesprite(m) : set/ unset automatic sprites update at screenswap updatesprite : manual sprites updates at next screenswap _________________________________________________________________________________________________________________________ Bob system In this implementation there are 512 bobs software that are dipendent from the screens and performs background preserve setbob(n,scr) : set bob n at logic screen scr bob(n,x,y,fr) : set or move bob n at x,y with frame fr deletebob(n) : unset bob n xbob(n) : return x of bob n ybob(n) : return y of bob n bobwidth(n) : return width of bob n bobheight(n) : return height of bob n frbob(n) : return the frame of bob n livebob(n) : return 1 if bob n is "live" bobhit(n,x) : return 1 if bob n have a collision with bob x if x=-1 with any bobz(n,z) : set the zorder position of bob if z =-1 report actual z position lastbob : return the last bob active autoupdatebob(m) : set/ unset automatic bobs update at screenswap updatebob : manual bobs updates at next screenswap _________________________________________________________________________________________________________________________ Text draw text(x,y,s,text,option) : print the text testo on current screen with s size with option solid=0 Shaded=1 Blended=2 setfont(path) : select the font getfont() : get the font selected textrender(text,s,n,option) : make an image slot n with the text write with a current font and size s and option solid=0 Shaded=1 Blended=2 _________________________________________________________________________________________________________________________ Print screen pen(c) : set prints color (with -1 parameter return the current color) paper(c) : set caractere back color (with -1 parameter return the current color) fprints(text) : print a text monospace without cariage return prints(text) : print a text monospace locate(x,y) : move the cursor at x y atx : return x of cursor aty : return y of cursor curson : show the text cursor on screen at(atx,aty) cursoff : hide the text cursor inputs(prompt,defs) : return the string insert to keyboard(default is default text) zoneinputs(x,y,l,default) : return the string insert to keyboard in x,y coordinates with l lenght _________________________________________________________________________________________________________________________ Sounds and music isenabledsound() : return 1 if sdlsound was enabled soundexists(n) : return 1 if the sound buffer n exist 0 if empty deletesound(n) : delete from memory sound n copysound(s,d) : copy sound bank s in sound bank d musicexists() : return 1 if the music is load 0 if empty playsound(n,c,optional l) : play the sound n in channel c l loops playfreqsound(n,c,pitch,l) : play the sound n in channel c l loops at freq variation (negative number=low positive number =high) volumesound(c,optional v) : change the volume of channel c (-1 all) at value v (0-128) with v = -1 return the current volume stopsound(optional c) : stop the wave play in channel c (-1=all) pausesound(optional c) : paused channel c (-1=all) resumesound(optional c) : unpaused channel c (-1=all) vumetersound(optional c) : return the current state of sound channel (-1=all) positionsound(c,angle,dist) : position sound in 3d space soundchannels(n) : dinamically change the number of channells managed by sdlBasic playmusic(n) : play track xm,mod,ogg,mp3 n=number of ripetition(-1 always) positionmusic(p) : move the execution at p second stopmusic : terminate the music play pausemusic : set pause of the current music resumemusic : unset pause of musica rewindmusic : rewind at start the music fademusic(t) : music fade volumemusic(optional v) : change the volume of music (0-128) -1 return the current volume speedmusic(v) : change the speed of music _________________________________________________________________________________________________________________________ CD support numdrivescd() : returns the number of cd-rom drives on the system. namecd(drive) : returns a human-readable, system-dependent identifier for the cd-rom. getfreecd() : return first free channel Cd opencd(n,drive) : opens a cd-rom drive for access. indrivecd(n) : return 1 if cd is in driver trackscd(n) : return the number of tracks in cd curtrackcd(n) : return the current track in cd curframecd(n) : return the current frame in cd playcd(n,s,l) : play a cd playtrackscd(n,trk1,fr1,ntrks,nfrs) : play the given cd track(s)0=all pausecd(n) : pauses a cdrom resumecd(n) : resumes a cdrom stopcd(n) : stops a cdrom ejectcd(n) : ejects a cdrom closecd(n) : closes a cd handle tracktypecd(n,t) : return SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...) tracklengthcd(n,t) : return the length of track t trackoffsetcd(n,t) : return the offset to the beginning of this track in frames ________________________________________________________________________________________________________________________ Video mpeg loadmpeg(fname,usesound) : load a mpeg video plaympeg(loop) : play a mpeg1 video stopmpeg() : terminate the video play deletempeg() : unload mpeg video pausempeg() : Pause/Resume playback of an SMPEG object rewindmpeg() : Rewind the play position of an SMPEG object to the beginning of the MPEG seekmpeg(p) : Seek 'bytes' bytes in the MPEG stream skipmpeg(s) : Skip 'seconds' seconds in the MPEG stream statusmpeg() : return 1 if plaympeg work or 0 in other case ________________________________________________________________________________________________________________________ Keyboard key(keycode) : return 1 if is press the key keycode inkey : return ascii code of key press waitkey(keycode) : wait a key pression (-1 =any key) _________________________________________________________________________________________________________________________ Mouse xmouse : return mouse x coordinate on display ymouse : return mouse y coordinate on display xmousescreen(n) : return mouse x coordinate on screen ymousescreen(n) : return mouse y coordinate on screen bmouse : return the buttonclick on the mouse changemouse(n) : change mouse from default(0) to emulate with sprite 0 - image 0 (1,2,3) locatemouse(x,y) : move mouse at x y coordinates mouseshow : show the mouse cursor mousehide : hide the mouse cursor mousezone(x,y,w,h) : return 1 if the mouse pointer is in rectangle(xy with size wh) _________________________________________________________________________________________________________________________ Joystick numjoysticks : count available joysticks namejoystick(i) : get joystick name openjoystick(i) : opens a joystick for use. isopenjoystick(i) : determine if a joystick has been opened numaxesjoystick(i) : get the number of joystick axes numballsjoystick(i) : get the number of joystick trackballs numhatsjoystick(i) : get the number of joystick hats numbuttonsjoystick(i) : get the number of joysitck buttons getaxisjoystick(i,a) : get the current state of an axis gethatjoystick(i,a) : get the current state of a joystick hat getbuttonjoystick(i,a) : get the current state of a given button on a given joystick xgetballjoystick(i,a) : get relative x trackball motion ygetballjoystick(i,a) : get relative y trackball motion joy(i) : return joystick boolean coordinate bjoy(i) : return joystick buttons pressed in boolean expression emulate_bjoy : return emulate joystick buttons in keyboard keys waitbjoy : wait the pression of a joystick button (or emulate in keyboard) _________________________________________________________________________________________________________________________ Time waitTime(t) : wait t milliseconds timer : return the current tick _________________________________________________________________________________________________________________________ Socket isenabledsock() : return 1 if sdlnet was enabled sock=getfreesock() : return the first free sock in sdlSocket array sock=OpenSock(port) : Server side socket sock is the stream. in sdlBasic there are 256 stream and sintax is very similar of file open close. clientsock=AcceptSock(serversock) : Accept the client connection IsServerReady(Sock) : True/False if server is sending data     sock=ConnectSock(ServerName,port) : client side socket connection *ConnectionReadySock(sock) : the server have accepted the connection IsClientReady(Sock) : True/False if client is sending data CloseSock(sock) : Close the socket connection. Works for client and server *PeekSock(Sock, NumBytes) : Peek information coming from socket, but do not clear. ReadSock(Sock, NumBytes) : Read NumBytes ReadByteSock(Sock) : Read a single byte       ReadLineSock(Sock) : Read complete line WriteSock(Sock, Message, NumBytes) : Sends NumBytes from Message WriteByteSock(Sock, Byte) : Sends a single byte WriteLineSock(Sock, Message) : Send Message getremoteip(sock) : return the ip address of remote client connetted getremoteport(sock) : return the port address of remote client connetted getlocalip() : return the local ip _________________________________________________________________________________________________________________________ usr/src/sdlBasic/src/sdlBrt/SDLengine/SDLengine.h0000755000076500007660000010732010637370123016757 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ /* ---- Defines */ #include #include #include #include #include #include "SDL.h" #include "SDL_mixer.h" #include "SDL_image.h" #include "SDL_ttf.h" #include "SDL_net.h" #include "../unzip/unzip.h" #ifndef __APPLE__ #include "smpeg.h" #else #include "smpeg/smpeg.h" #endif #ifndef MIN #define MIN(x,y) (((x) < (y)) ? (x) : (y)) #define MAX(x,y) (((x) > (y)) ? (x) : (y)) #define MID(x,y,z) MAX((x), MIN((y), (z))) #endif #define PRINT_SIZE 12 #define XPRINT_SIZE (PRINT_SIZE*3/4) #define NUM_SCREENS 9 #define NUM_IMAGES 65536 #define NUM_SPRITES 1024 #define NUM_BOBS 1024 #define NUM_WAVES 1024 #define NUM_CD 8 #define NUM_SOCKS 1024 #ifndef M_PI #define M_PI 3.141592654 #endif #define SMOOTHING_OFF 0 #define SMOOTHING_ON 1 //error print #define SDLerr fprintf //_________________________________________________________________________________________________________________________ //DECLARATIONS //- SCREEN -------------------------------------------------------------------------------------------------------------- extern SDL_Surface *SDLdisplay; //extern int GL_display; extern int SDLautoback; extern float SDLautobacktime; extern int vbl; extern int display_mode; extern int SDLupdatesprite; extern int SDLupdatebob; extern int SDLdualplayfield; extern int SDLnoAlphaChannel; extern int SDLfps; extern int SDLfps_count; extern int SDLfps_flag; extern int SDLfps_time; extern int c_screen; extern SDL_Surface *SDLscreen[NUM_SCREENS]; extern int Palette[256]; extern int enablePalette; extern int colorcycling_s; extern int colorcycling_e; extern int colorcycling_d; extern int colorcycling_delay; extern int colorcycling_next; extern SDL_Rect SDLscreen_rect[NUM_SCREENS]; extern int SDLscreen_flag[NUM_SCREENS]; extern int SDLscreen_live[NUM_SCREENS]; extern int SDLscreen_z[NUM_SCREENS]; extern int SDLoffx[NUM_SCREENS]; extern int SDLoffy[NUM_SCREENS]; extern int SDLlastscreen; extern SDL_Color SDLcol; //FADE PARAM extern int fadeflag[NUM_SCREENS]; extern SDL_Surface* p_surf_black[NUM_SCREENS]; extern SDL_Surface* p_surf_screen_copy[NUM_SCREENS]; extern Uint32 ui_old_time[NUM_SCREENS], ui_curr_time[NUM_SCREENS], ui_time_ms[NUM_SCREENS] ; extern int fadedelay[NUM_SCREENS]; extern double f_alpha[NUM_SCREENS] ; extern Uint32 ui_flags[NUM_SCREENS]; extern SDL_Surface* p_surf_screen[NUM_SCREENS]; extern SDL_Surface* p_surf_img[NUM_SCREENS]; extern Uint32 ui_seconds[NUM_SCREENS]; extern int b_fade_out[NUM_SCREENS]; extern int crossfadeflag[NUM_SCREENS]; extern SDL_Surface* p_surf_img1[NUM_SCREENS]; extern SDL_Surface* p_surf_img2[NUM_SCREENS]; //------------------------------------------------------------------------------------------------------------------------ //- IMAGES -------------------------------------------------------------------------------------------------------------- extern int SDL_hsx[NUM_IMAGES]; extern int SDL_hsy[NUM_IMAGES]; extern SDL_Surface *SDLimage[NUM_IMAGES]; extern SDL_Surface *SDLimageCC[NUM_IMAGES]; extern Uint32 colorkey; //------------------------------------------------------------------------------------------------------------------------ //- SPRITES -------------------------------------------------------------------------------------------------------------- extern int SDLspritex[NUM_SPRITES]; extern int SDLspritey[NUM_SPRITES]; extern int SDLspritefr[NUM_SPRITES]; extern int SDLspritelive[NUM_SPRITES]; extern int SDLspritez[NUM_SPRITES]; extern SDL_Rect SDLspriteclip; extern int SDLlastsprite; //------------------------------------------------------------------------------------------------------------------------ //- BOBS ----------------------------------------------------------------------------------------------------------------- extern int SDLbobscreen[NUM_BOBS]; extern int SDLbobx[NUM_BOBS]; extern int SDLboby[NUM_BOBS]; extern int SDLbobxold[NUM_BOBS]; extern int SDLbobyold[NUM_BOBS]; extern int SDLbobfr[NUM_BOBS]; extern int SDLboblive[NUM_BOBS]; extern int SDLbobz[NUM_BOBS]; extern SDL_Surface *SDLbobback[NUM_BOBS]; extern int SDLlastbob; //------------------------------------------------------------------------------------------------------------------------ //- SOUND AND MUSIC ------------------------------------------------------------------------------------------------------ extern int enabledsound; extern Mix_Chunk *SDLsound[NUM_WAVES]; extern Mix_Music *SDLmusic; //------------------------------------------------------------------------------------------------------------------------ //- CD SUPPORT ----------------------------------------------------------------------------------------------------------- extern SDL_CD *SDLcd[NUM_CD]; //------------------------------------------------------------------------------------------------------------------------ //- VIDEO MPEG --------------------------------------------------------------------------------------------------------------------- extern SMPEG *mpeg; extern SMPEG_Info info; extern int mpeg_audio; //------------------------------------------------------------------------------------------------------------------------ //- TEXT AND PRINT ------------------------------------------------------------------------------------------------------- extern char *fontPath; extern TTF_Font *font; extern SDL_Surface *SDLtext; //extern TTF_Font *font_mono; //extern char *fontPathMono; extern SDL_Surface *SDLfont_mono[0xff]; extern int stx[NUM_SCREENS]; extern int sty[NUM_SCREENS]; extern int pen_color; extern int paper_color; extern int oldstx[NUM_SCREENS]; extern int oldsty[NUM_SCREENS]; extern SDL_Surface *SDLcursore[16]; extern int cursore_state[NUM_SCREENS]; extern SDL_Surface *SDLcursore_preserve[NUM_SCREENS]; extern int cursore_anim[NUM_SCREENS]; //------------------------------------------------------------------------------------------------------------------------ //- KEYBOARD -------------------------------------------------------------------------------------------------------------- extern int lastkey; //------------------------------------------------------------------------------------------------------------------------ //- MOUSE -------------------------------------------------------------------------------------------------------------- extern int mousepointer; extern int mousestate; //------------------------------------------------------------------------------------------------------------------------ //- JOYSTICK ------------------------------------------------------------------------------------------------------ extern SDL_Joystick *SDLjoy; //------------------------------------------------------------------------------------------------------------------------ //- SOCKS ---------------------------------------------------------------------------------------------------------------- extern int enabledsock; extern TCPsocket SDLsock[NUM_SOCKS]; //------------------------------------------------------------------------------------------------------------------------ /*----- Error system ---*/ extern char *error_description; extern int error_type; //_________________________________________________________________________________________________________________________ /* ---- Structures */ typedef struct tColorRGBA { Uint8 r; Uint8 g; Uint8 b; Uint8 a; } tColorRGBA; typedef struct tColorY { Uint8 y; } tColorY; //_________________________________________________________________________________________________________________________ #ifdef __cplusplus extern "C" { #endif //_________________________________________________________________________________________________________________________ //INTERNAL RUTINES int stopkey(); int getevent(); int autotimer(); //_________________________________________________________________________________________________________________________ // SDL_EXTENSION int fileExist( char *name ); SDL_Surface *Load_Image(char *datafile, int transparent); SDL_Surface *Load_zip_Image(char *zipfile,char *datafile, int transparent); int Save_Image(char *datafile, SDL_Surface *image); void Image_colorkey(SDL_Surface *image); Mix_Chunk* Change_Pitch(Mix_Chunk *Input_Sample, float Factor); int zoomSurfaceRGBA (SDL_Surface * src, SDL_Surface * dst, int smooth); int zoomSurfaceY (SDL_Surface * src, SDL_Surface * dst); void transformSurfaceRGBA (SDL_Surface * src, SDL_Surface * dst, int cx, int cy,int isin, int icos, int smooth); void transformSurfaceY (SDL_Surface * src, SDL_Surface * dst, int cx, int cy,int isin, int icos); SDL_Surface * rotozoomSurface (SDL_Surface * src, double angle, double zoom, int smooth); SDL_Surface *zoomSurface (SDL_Surface * src, double zoomx, double zoomy, int smooth); void fade (int s,SDL_Surface* in_p_surf_screen, SDL_Surface* in_p_surf_img, Uint32 in_ui_seconds, int in_b_fade_out); void fadehandler(int s); void crossfade (int s,SDL_Surface* in_p_surf_screen, SDL_Surface* in_p_surf_img1, SDL_Surface* in_p_surf_img2, Uint32 in_ui_seconds); void crossfadehandler(int s); int hit_pixelperfect(SDL_Surface *imga,int xa1,int ya1,int xa2,int ya2,SDL_Surface *imgb,int xb1,int yb1,int xb2,int yb2); Uint32(*getpixel)(SDL_Surface *surface, int x, int y); Uint32 getpixel8(SDL_Surface *surface, int x, int y); Uint32 getpixel16(SDL_Surface *surface, int x, int y); Uint32 getpixel24BE(SDL_Surface *surface, int x, int y); Uint32 getpixel24(SDL_Surface *surface, int x, int y); Uint32 getpixel32(SDL_Surface *surface, int x, int y); void (*putpixel)(SDL_Surface *surface, int x, int y, Uint32 col ); void putpixel8(SDL_Surface *surface, int x, int y, Uint32 col ); void putpixel16(SDL_Surface *surface, int x, int y, Uint32 col ); void putpixel24BE(SDL_Surface *surface, int x, int y, Uint32 col ); void putpixel24(SDL_Surface *surface, int x, int y, Uint32 col ); void putpixel32(SDL_Surface *surface, int x, int y, Uint32 col ); void putpixelDX(SDL_Surface *surface, int x, int y, Uint32 col ); void draw_line(SDL_Surface * surface,int x1, int y1, int x2, int y2,Uint32 color); void draw_box(SDL_Surface *surface,int x1,int y1,int x2,int y2,Uint32 color); void draw_circle(SDL_Surface *surface,int vx,int vy, int r,Uint32 color); void draw_fillcircle(SDL_Surface *surface,int vx,int vy, int r,Uint32 color); void draw_ellipse(SDL_Surface *surface,int vx,int vy,int Xradius,int Yradius,Uint32 color); void draw_fillellipse(SDL_Surface *surface,int vx,int vy,int Xradius,int Yradius,Uint32 color); Uint32 (*rrgb)(int col); Uint32 rrgb8(int col); Uint32 rrgb16(int col); Uint32 rrgb24(int col); Uint32 rrgb32(int col); int createfont(); int put_char(unsigned char n); int createcursor(); void _input(char *instring,int x, int y, int displen); //_________________________________________________________________________________________________________________________ //STARTING AND CLOSE //initialize : Start the engine and set the default parameter int initialize(int audio,int socket,int defaults); //terminate : Stop the engine and reset parameter int terminate(); //_________________________________________________________________________________________________________________________ //SCREEN //setdefaults(w,h,bpp,0=screen|1=window |2=resizable) : open the display, perform initializations on cursor and fonts and sets default values on sprites, bobs and screens system. int setdefaults(int w,int h,int bpp, int mode); //setdisplay(w,h,bpp,0=screen|1=window |2=resizable) : open the screen/window in double buffer. int setdisplay(int w,int h,int bpp, int mode); //setalphachannel(v) : activate deactivate alpha channel trasparency int setalphachannel(int v); //setcaption(title) : change the display window title int setcaption(char *title); //caption(title) : return the display window title int caption(char **title); //displaymode() : return the display mode int displaymode(); //displaywidth : return the display width int displaywidth(); //displayheight : return the display height int displayheight(); //displaybpp : return the display color depth int displaybpp(); //screen(n) : set the logic screen n with n=-1 return the current screen int screen (int n); //screenz(n,z) : set the zorder position of screen if z =-1 report actual z position int screenz(int n,int z); //lastscreen : return the last screen open int lastscreen(); // directscreen : direct drawing on display like a screen(more fast but sprite and offset does not works) int directscreen (); //screenopen(n,w,h,dx,dy,dw,dh,flag) : open the logic screen n of dimension w,h in display coordinates dx,dy,dw,dh int screenopen (int n,int w,int h,int dx,int dy,int dw,int dh,int flag); //screenclose(n) : close the logic screen n int screenclose (int n); //screenclone(n,s,x,y,w,h,flag) : create a new viewport in logic screen s int screenclone(int n,int s,int x,int y,int w,int h,int flag); //screencopy(n,x,y,w,h,nd,xd,yd) : copy a portion of screen n in a screen nd int screencopy(int n,int x,int y,int w,int h,int nd,int xd,int yd); //screenfade(n,t) : fade the screen n in t time int screenfade(int n,int t); //screenfadein(n,i,t) : fade the screen n to image i in t time int screenfadein(int n,int i,int t); //screencrossfade(n,i,t) : fade the screen n from current screen to image i in t time int screencrossfade(int n,int i,int t); //screenalpha(n,a) : set alpha(trasparency) of screen n int screenalpha(int n,int a); //screenlock(n) : lock the screen n for direct graphics access int screenlock(int n); //screenunlock(n) : unlock the screen n for direct graphics access int screenunlock(int n); //screenrect(x,y,w,h,flag) : change the display output coordinates of the current screen int screenrect (int x,int y,int w,int h,int flag); //xscreenrect : return the x coordinate of current screen viewport int xscreenrect(); //yscreenrect : return the y coordinate of current screen viewport int yscreenrect(); //wscreenrect : return the w value of current screen viewport int wscreenrect(); //hscreenrect : return the h value of current screen viewport int hscreenrect(); //flagscreenrect : return the flag value of current screen viewport int flagscreenrect(); //screenwidth : return the current screen width int screenwidth(); //screenheight : return the current screen height int screenheight(); //offset(x,y) : set the logical current screen position int offset(int x,int y); //xoffset : return the x coordinate offset in current screen int xoffset(); //yoffset : return the y coordinate offset in current screen int yoffset(); //cls : clear the current logic screen int cls(); //screenswap : update display,bobsystem,spritesystem int screenswap(); //autoback(m) : enable / disable automatic screenswap m=0 disable m>0 wait m milliseconds and perform screenswap m<0 perform the invocate in code screenswap after m milliseconds int autoback(int m); //dualplayfield(m) : set/unset automatic update of a screen upper sprite -1 return state int dualplayfield(int m); //waitvbl : wait automatic screenswap int waitvbl(); //fps(n) : set/unset or return (with -1) the current frame rate counter (0/1/-1) int fps(int n); //_________________________________________________________________________________________________________________________ //GRAPHICS //rgb(r,g,b) : return current color in Uint32 format int rgb(int colR,int colG,int colB); //enablepalette(state=0|1|-1 disable|enable|check) : enable disable and check the palettemode in 8 bit display int enablepalette(int state); //color (c,optional v) : set palette color c with value v se missing return the current color c int color(int c,int v); //colorcycling(s,e,d=0|1,delay) : move the palettecolor one color forward or back work only in 8bit display int colorcycling(int s,int e,int d,int delay); void colorcyclinghandler(); //ink(c) : select the current color in Uint32 format int ink(int c); //point(x,y) : return the color of x,y point int point(int x,int y); //dot(x,y) : write x,y point with a current color int dot(int x,int y); //dot_ex(x,y,c) : write x,y point with a c color int dot_ex(int x,int y,int c); //line(x,y,x1,y1) : write a line int line(int x,int y,int x1,int y1); //box(x,y,x1,y1) : write a empty rettangle int box(int x,int y,int x1,int y1); //bar(x,y,x1,y1) : write a fill rettangle int bar(int x,int y,int x1,int y1); //rectangle(x,y,w,h,mode) : write a rettangle w and h are the sizes mode=0 empty 1=filled int rectangle(int x,int y,int w,int h,int mode); //circle(x,y,r) : write a circle int circle(int x,int y,int r); //fillcircle(x,y,r) : write a fill circle int fillcircle(int x,int y,int r); //ellipse(x,y,rx,ry) : write a ellipse int ellipse(int x,int y,int rx,int ry); //fillellipse(x,y,rx,ry) : write a fill ellipse int fillellipse(int x,int y,int rx,int ry); //paint(x,y) : fill a close area int paint(int x,int y); //triangle(xa,ya,xb,yb,xc,yc) : draw a filled triangle int triangle(int xa,int ya,int xb,int yb,int xc,int yc); //_________________________________________________________________________________________________________________________ // FILE INPUT OUTPUT //getfreeimage : return a number of image bank free int getfreeimage(); //loadimage(filename,n) : load a graphics file in a slot n if n=-1 use the first free and return as n int loadimage(char *filename,int n); //loadzipimage(zipfile,filename,opt n) : load a graphics file stored in a zip archive in a slot n if n=-1 use the first free and return as n int loadzipimage(char *zipfile,char *filename,int n); //saveimage(filename,n) : save slot n in a graphics file(only bmp) int saveimage(char *filename,int n); //getfreesound() : return a number of first sound bank free int getfreesound(); //loadsound(filename,n) : load a wave file in a sound slot n if n=-1 use and return the first free int loadsound(char *filename,int n); //loadzipsound(zipfile,filename,n) : load a wave zipped file in a sound slot n if n=-1 use and return the first free int loadzipsound(char *zipfile,char *filename,int n); //savesound(filename,n) : save a wave file from sound slot n int savesound(char *filename, int n); //loadmusic(filename) : load a music module (xm,mod,ogg and only for linux mp3) int loadmusic(char *filename); //loadzipmusic(zipfile,filename) : load a zipped music module (xm,mod,ogg and only for linux mp3) int loadzipmusic(char *zipfile,char *filename); //_________________________________________________________________________________________________________________________ // IMAGE MANIPULATION //hotspot(n,x,y) : select the point of coordinates in a imageslot (n,0,0=up left(default) | n,1,1=center | n,2,2 =down right)n= image int hotspot(int n,int x,int y); //setcolorkey(c) : set the colorkey for bitmap transparency if set -1 (default ) will be used the left-up corner color. int setcolorkey(int c); //imageexists(n) : return 1 if the image buffer n exist 0 if empty int imageexists(int n); //imagewidth(n) : return the image n width or error if image n if empty int imagewidth(int n); //imageheight(n) : return the image n height or error if image n if empty int imageheight(int n); //deleteimage(n) : erase the image n of the memory int deleteimage(int n); //copyimage(s,d) : copy image s to image d int copyimage(int s,int d); //setalpha(n,a) : set trasparency int setalpha(int n,int a); //zoomimage(n,zoomx,zoomy) : zoom image int zoomimage(int n,double zoomx,double zoomy); //rotateimage(n,angle) : rotate image int rotateimage(int n,double angle); //rotozoomimage(n,angle,zoom) : rotate and zoom image int rotozoomimage(int n,double angle,double zoom); //mirrorimage(n,x,y) :vertical-orizontal mirror int mirrorimage(int n,int x,int y); //_________________________________________________________________________________________________________________________ // BLITTING //blt(n,sx,sy,sw,sh,dx,dy) : copy a part of graphics slot in screen int blt(int n,int sx,int sy,int sw,int sh,int dx,int dy); //pastebob(x,y,n) : copy on screen image n at x,y performing clip int pastebob(int x,int y,int n); //pasteicon(x,y,n) : copy on screen image n at x,y without clipping int pasteicon(int x,int y,int n); //grab(n,x,y,w,h) : grab a a selectarea and copy it in slot n int grab(int n,int x,int y,int w,int h); //_________________________________________________________________________________________________________________________ //SPRITE SYSTEM //spriteclip(x,y,w,h) : set the visibilty area of sprites int spriteclip(int x,int y,int w,int h); //sprite(n,x,y,fr) : set or move the sprite n at x,y with image fr int sprite(int n,int x,int y,int fr); //deletesprite(n) : unset sprite n int deletesprite(int n); //xsprite(n) : return the x of sprite n int xsprite(int n); //ysprite(n) : return the y of sprite n int ysprite(int n); //spritewidth(n) : return the width of sprite n int spritewidth(int n); //spriteheight(n) : return the height of sprite n int spriteheight(int n); //frsprite(n) : return the frame of sprite n int frsprite(int n); //livesprite(n) : return 1 if sprite n is "live" int livesprite(int n); //spritehit(n,x) : return 1 if sprite n have a collission with sprite x if x=-1 with any int spritehit(int n,int x); // spritez(n,z) : set the zorder position of sprite if z =-1 report actual z position int spritez(int n,int z); //lastsprite : return the last sprite active int lastsprite(); //autoupdatesprite(m) : set/ unset automatic sprites update at screenswap int autoupdatesprite(int m); //updatesprite : manual sprites updates at next screenswap int updatesprite(); //_________________________________________________________________________________________________________________________ //BOB SYSTEM //setbob(n,scr) : set bob n at logic screen scr int setbob(int n,int scr); //bob(n,x,y,fr) : set or move bob n at x,y with frame fr int bob(int n,int x,int y,int fr); //deletebob(n) : unset bob n int deletebob(int n); //xbob(n) : return x of bob n int xbob(int n); //ybob(n) : return y of bob n int ybob(int n); //bobwidth(n) : return width of bob n int bobwidth(int n); //bobheight(n) : return height of bob n int bobheight(int n); //frbob(n) : return the frame of bob n int frbob(int n); //livebob(n) : return 1 if bob n is "live" int livebob(int n); //bobhit(n,x) : return 1 if bob n have a collision with bob x if x=-1 with any int bobhit(int n,int x); // bobz(n,z) : set the zorder position of bob if z =-1 report actual z position int bobz(int n,int z); //lastbob : return the last bob active int lastbob(); //autoupdatebob(m) : set/ unset automatic bobs update at screenswap int autoupdatebob(int m); //updatebob : manual bobs updates at next screenswap int updatebob(); //_________________________________________________________________________________________________________________________ // TEXT DRAW //text(x,y,s,text,option) : print the text testo on current screen with s size int text (int x, int y, int s, char *testo,int option); //setfont(path) : select the font int setfont(char *path); //getfont() : get the font selected char *getfont(); //textrender(text,s,n) : make an image slot n with the text write with a current font and size s int textrender (char *testo,int s,int n,int option); //_________________________________________________________________________________________________________________________ // PRINT SCREEN //pen(c) : set prints color (with -1 parameter return the current color) int pen(int c); //paper(c) : set caractere back color (with -1 parameter return the current color) int paper(int c); //fprints(text) : print a text monospace without cariage return int fprints(char *testo); //prints(text) : print a text monospace int prints(char *testo); //locate(x,y) : move the cursor at x y int locate(int x,int y); //atx : return x of cursor int atx(); //aty : return y of cursor int aty(); //curson : show the text cursor on screen at(atx,aty) int curson(); //cursoff : hide the text cursor int cursoff(); //inputs(prompt,defs) : return the string insert to keyboard(default is default text) int inputs(char *request,char *defs); //zoneinputs(x,y,l,default) : return the string insert to keyboard in x,y coordinates with l lenght int zoneinputs(int x,int y,int l,char defs[255]); //_________________________________________________________________________________________________________________________ //SOUND //isenabledsound() : return 1 if sdlsound was enabled int isenabledsound(); //soundexists(n) : return 1 if the sound buffer n exist 0 if empty int soundexists(int n); //deletesound(n) : delete from memory sound n int deletesound(int n); //copysound(s,d) : copy sound bank s in sound bank d int copysound(int s, int d); //musicexists() : return 1 if the music is load 0 if empty int musicexists(); //playsound(n,c,l) : play the sound n in channel c l loops int playsound(int n,int c,int l); //playfreqsound(n,c,pitch,l) : play the sound n in channel c l loops at freq variation (negative number=low positive number =high) int playfreqsound(int n,int c,float pitch,int l); //volumesound(c,v) : change the volume of channel c (-1 = all) at value v (0-128) with v = -1 return the current volume int volumesound(int c,int v); //stopsound(c) : stop the wave play in channel c (-1 =all) int stopsound(int c); //pausesound(c) : paused channel c (-1 = all) int pausesound(int c); //resumesound(c) : unpaused channel c (-1 = all) int resumesound(int c); //vumetersound(c) : return the current state of sound channel (-1 =all) int vumetersound(int c); //positionsound(c,angle,dist) : position sound in 3d space int positionsound(int c,int angle,int dist); //soundchannels(n) : dinamically change the number of channells managed by sdlBasic int soundchannels(int n); //playmusic(n) : play track xm,mod,ogg,mp3 n=number of ripetition(-1 always) int playmusic ( int n); //positionmusic(p) : move the execution at p second int positionmusic(int p); //stopmusic : terminate the music play int stopmusic(); //pausemusic : set pause of the current music int pausemusic(); //resumemusic : unset pause of musica int resumemusic(); //rewindmusic : rewind at start the music int rewindmusic(); //fademusic(t) : music fade extern int fademusic_t, fademusic_delay; int fademusic(int t); void fademusichandler(); //volumemusic(v) : change the volume of music (0-128) -1 return the current volume int volumemusic(int v); //speedmusic(v) : change the speed of music int speedmusic(int v); //_________________________________________________________________________________________________________________________ //CD support //numdrivescd : returns the number of cd-rom drives on the system. int numdrivescd(); //namecd(drive) : returns a human-readable, system-dependent identifier for the cd-rom. int namecd(char *name,int drive); //getfreecd : return first free channel Cd int getfreecd(); //opencd(n,drive) : opens a cd-rom drive for access. int opencd(int n, int drive); //indrivecd(n) : return 1 if cd is in driver int indrivecd(int n); //trackscd(cd) : returns the number of tracks in cd. int trackscd(int n); //curtrackcd(n) : return the current track in cd int curtrackcd(int n); //curframecd(n) : return the current frame in cd int curframecd(int n); //playcd(n,s,l) : play a cd int playcd(int n,int s,int l); //playtrackscd(n,trk1,fr1,ntrks,nfrs) : play the given cd track(s)0=all int playtrackscd(int n,int trk1,int fr1,int ntrks,int nfrs); //pausecd(n) : pauses a cdrom int pausecd(int n); //resumecd(n) : resumes a cdrom int resumecd(int n); //stopcd(n) : stops a cdrom int stopcd(int n); //ejectcd(n) : ejects a cdrom int ejectcd(int n); //closecd(n) : closes a cd handle int closecd(int n); //tracktypecd(n,t) : return SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...) int tracktypecd(int n,int t); //tracklengthcd(n,t) : return the length of track t int tracklengthcd(int n,int t); //trackoffsetcd(n,t) : return the offset to the beginning of this track in frames int trackoffsetcd(int n,int t); //_________________________________________________________________________________________________________________________ // VIDEO MPEG //loadmpeg(fname,usesound) : load a mpeg video int loadmpeg(char *filename,int useaudio); //plaympeg(loop) : play a mpeg1 video int plaympeg(int loop); //stopmpeg() : terminate the video play int stopmpeg(); //deletempeg() : unload mpeg video int deletempeg(); //pausempeg() : Pause/Resume playback of an SMPEG object int pausempeg(); //rewindmpeg() : Rewind the play position of an SMPEG object to the beginning of the MPEG int rewindmpeg(); //seekmpeg(p) : Seek 'bytes' bytes in the MPEG stream int seekmpeg(int p); //skipmpeg(s) : Skip 'seconds' seconds in the MPEG stream int skipmpeg(int s); //statusmpeg() : return 1 if plaympeg work or 0 in other case int statusmpeg(); //_________________________________________________________________________________________________________________________ // KEYBOARD //key(keycode) : return 1 if is press the key keycode int key (int keycode); //inkey : return ascii code of key press int inkey(); //waitkey(keycode) : wait a key pression (-1 =any key) int waitkey(int keycode); //_________________________________________________________________________________________________________________________ //MOUSE //xmouse : return mouse x coordinate on display int xmouse(); //ymouse : return mouse y coordinate on display int ymouse(); //xmousescreen(n) : return mouse x coordinate on screen int xmousescreen(int n); //ymousescreen(n) : return mouse y coordinate on screen int ymousescreen(int n); //bmouse : return the buttonclick on the mouse int bmouse(); //changemouse(n) : change mouse from default(0) to emulate with sprite 0 - image 0 (1,2,3) int changemouse(int n); //locatemouse(x,y) : move mouse at x y coordinates int locatemouse(int x, int y); //mouseshow : show the mouse cursor int mouseshow(); //mousehide : hide the mouse cursor int mousehide(); //mousezone(x,y,w,h) : return 1 if the mouse pointer is in rectangle(xy with size wh) int mousezone(int x,int y,int w,int h); //_________________________________________________________________________________________________________________________ //JOYSTIK //numjoysticks : Count available joysticks int numjoysticks(); //namejoystick(i) : Get joystick name char *namejoystick(int index); //numaxesjoystick(i) : Get the number of joystick axes int numaxesjoystick(int index); //numballsjoystick(i) : Get the number of joystick trackballs int numballsjoystick(int index); //numhatsjoystick(i) : Get the number of joystick hats int numhatsjoystick(int index); //numbuttonsjoystick(i) : Get the number of joysitck buttons int numbuttonsjoystick(int index); //getaxisjoystick(i,a) : Get the current state of an axis int getaxisjoystick(int index,int axis); //gethatjoystick(i,a) : Get the current state of a joystick hat int gethatjoystick(int index,int hat); //getbuttonjoystick(i,a) : Get the current state of a given button on a given joystick int getbuttonjoystick(int index,int button); //xgetballjoystick(i,a) : Get relative x trackball motion int xgetballjoystick(int index,int ball); //ygetballjoystick(i,a) : Get relative y trackball motion int ygetballjoystick(int index,int ball); //joy : return joystick boolean coordinate int joy(int index); //bjoy(i) : return joystick buttons pressed in boolean expression int bjoy(int index); //emulate_bjoy : return emulate joystick buttons in keyboard keys int emulate_bjoy(int index); //waitbjoy : wait the pression of a joystick button (or emulate in keyboard) int waitbjoy(int jbutton); //_________________________________________________________________________________________________________________________ // TIME //waitTime(t) : wait t milliseconds int waitTime(int t); //timer : return the current tick int chrono(); //_________________________________________________________________________________________________________________________ //SOCKET //isenabledsock() : return 1 if sdlnet was enabled int isenabledsock(); // getfreesock : return the first free sock in sdlSocket array int getfreesock(); /* sock=OpenSock(port) : Server side socket sock is the stream. in sdlBasic \ there are 256 stream and sintax is very similar of \ file open close.*/ int opensock(int port); //clientsock=AcceptSock(serversock) : Accept the client connection int acceptsock(int sock); //IsServerReady(Sock) : True/False if server is sending data     int isserverready(int sock); //sock=ConnectSock(ServerName,port) : client side socket connection int connectsock(char *servername,int port); //ConnectionReadySock(sock) : the server have accepted the connection //not implemented //IsClientReady(Sock) : True/False if client is sending data int isclientready(int Sock); //CloseSock(sock) : Close the socket connection. Works for client and server int closesock(int sock); //PeekSock(Sock, NumBytes) : Peek information coming from socket, but do not clear. //not implemented //ReadSock(Sock, NumBytes) : Read NumBytes char * readsock(int sock,int numbytes); //ReadByteSock(Sock) : Read a single byte       //char readbytesock(int sock); int readbytesock(int sock); //ReadLineSock(Sock) : Read complete line char* readlinesock(int sock); //WriteSock(Sock, Message, NumBytes) : Sends NumBytes from Message int writesock(int sock,char *data,int len); //WriteByteSock(Sock, Byte) : Sends a single byte int writebytesock(int sock,char byte); //WriteLineSock(Sock, Message) : Send Message int writelinesock(int sock,char *message); //getremoteip(sock) : return the ip address of remote client connetted char* getremoteip(int sock); //getremoteport(sock) : return the ip address of remote client connetted int getremoteport(int sock); //getlocalip() : return the local ip char *getlocalip(); //_________________________________________________________________________________________________________________________ #ifdef __cplusplus } #endif usr/src/sdlBasic/src/sdlBrt/SDLengine/blitting.c0000777000076500007660000001350010463132110016743 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_________________________________________________________________________________________________________________________ // BLITTING //_________________________________________________________________________________________________________________________ //blt(n,sx,sy,sw,sh,dx,dy) : copy a part of graphics slot in screen int blt(int n,int sx,int sy,int sw,int sh,int dx,int dy) { SDL_Rect s; SDL_Rect d; s.x=sx; s.y=sy; s.w=sw; s.h=sh; d.x=dx; d.y=dy; d.w=sw; d.h=sh; if (n<0 || n>NUM_IMAGES)return -1; if (SDLimage[n]!=NULL){ SDL_BlitSurface( SDLimage[n], &s ,SDLscreen[c_screen], &d); } else { error_description="SDLengine error - blt: specified image slot is empty "; error_type=1; SDLerr(stderr, "SDLengine error - blt: image slot %d is empty", n); return-1; } if (autotimer()!=0)return -1; return 0; } //__________________________________________________________________________________________________________________________ //pastebob(x,y,n) : copy on screen image n at x,y performing clip int pastebob(int x,int y,int n) { SDL_Rect s; SDL_Rect d; if (n<0 || n>NUM_IMAGES){ error_description="SDLengine error - pasteBob: invalid image number "; error_type=1; SDLerr(stderr, "SDLengine error - pasteBob: %d is an invalid image number", n); return -1; } if (SDLimageCC[n]!=NULL){ s.x=0; s.y=0; s.w=SDLimageCC[n]->w; s.h=SDLimageCC[n]->h; d.x=x-SDL_hsx[n]; d.y=y-SDL_hsy[n]; d.w=SDLimageCC[n]->w; d.h=SDLimageCC[n]->h; SDL_BlitSurface(SDLimageCC[n], &s, SDLscreen[c_screen], &d ); } else { error_description="SDLengine error - pasteBob: specified image slot is empty "; error_type=1; SDLerr(stderr, "SDLengine error - pasteBob: image slot %d is empty", n); return -1; } if (autotimer()!=0)return -1; return 0; } //__________________________________________________________________________________________________________________________ //pasteicon(x,y,n) : copy on screen image n at x,y without clipping int pasteicon(int x,int y,int n) { SDL_Rect s; SDL_Rect d; if (n<0 || n>NUM_IMAGES){ error_description="SDLengine error - pasteIcon: invalid image number "; error_type=1; SDLerr(stderr, "SDLengine error - pasteIcon: %d is an invalid image number", n); return -1; } if (SDLimage[n]!=NULL){ s.x=0; s.y=0; s.w=SDLimage[n]->w; s.h=SDLimage[n]->h; d.x=x-SDL_hsx[n]; d.y=y-SDL_hsy[n]; d.w=SDLimage[n]->w; d.h=SDLimage[n]->h; SDL_BlitSurface(SDLimage[n], &s, SDLscreen[c_screen], &d ); } else { error_description="SDLengine error: specified image slot is empty "; error_type=1; SDLerr(stderr, "SDLengine errorpasteIcon: image slot %d is empty", n); return -1; } if (autotimer()!=0)return -1; return 0; } //__________________________________________________________________________________________________________________________ //grab(n,x,y,w,h) : grab a a selectarea and copy it in slot n int grab(int n,int x,int y,int w,int h) { SDL_Rect s; SDL_Rect d; int bpp; int oldck; s.x=x; s.y=y; s.w=w; s.h=h; d.x=0; d.y=0; d.w=w; d.h=h; if (n<0 || n>NUM_IMAGES)return -1; if (SDLimage[n]!=NULL){ SDL_FreeSurface(SDLimage[n]); SDLimage[n] = NULL; SDL_FreeSurface(SDLimageCC[n]); SDLimageCC[n] = NULL; } SDLimage[n] = SDL_CreateRGBSurface(SDL_HWSURFACE, w, h,32,0,0,0,0); if(SDLimage[n] == NULL) { error_description="SDLengine error - grab: CreateRGBSurface failed "; error_type=1; SDLerr(stderr, "SDLengine error - grab: CreateRGBSurface failed: %s\n", SDL_GetError()); return -1; } SDL_BlitSurface(SDLscreen[c_screen], &s, SDLimage[n], &d ); SDLimageCC[n]=SDL_DisplayFormat(SDLimage[n]); if(SDLimageCC[n] == NULL) { error_description="SDLengine error - grab: CreateRGBSurface failed "; error_type=1; SDLerr(stderr, "SDLengine error - grab: CreateRGBSurfaceCC failed: %s\n", SDL_GetError()); return -1; } bpp = SDLimageCC[n]->format->BytesPerPixel; oldck=colorkey; if (colorkey==-1){ if (SDL_MUSTLOCK(SDLimageCC[n])) SDL_LockSurface(SDLimageCC[n]); colorkey=*(Uint32 *)SDLimageCC[n]->pixels; if (SDL_MUSTLOCK(SDLimageCC[n])) SDL_UnlockSurface(SDLimageCC[n]); } switch(bpp) { case 1: SDL_SetColorKey(SDLimageCC[n], (SDL_SRCCOLORKEY),(Uint8)colorkey);//|SDL_RLEACCEL break; case 2: SDL_SetColorKey(SDLimageCC[n], (SDL_SRCCOLORKEY),(Uint16)colorkey);//|SDL_RLEACCEL break; case 3: SDL_SetColorKey(SDLimageCC[n], (SDL_SRCCOLORKEY),(Uint32)colorkey);//|SDL_RLEACCEL break; case 4: SDL_SetColorKey(SDLimageCC[n], (SDL_SRCCOLORKEY),(Uint32)colorkey);//|SDL_RLEACCEL break; } colorkey=oldck; SDL_hsx[n]=0; SDL_hsy[n]=0; return 0; } //__________________________________________________________________________________________________________________________ usr/src/sdlBasic/src/sdlBrt/SDLengine/joystick.c0000755000076500007660000002231210637376165017012 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_________________________________________________________________________________________________________________________ //JOYSTICK //_________________________________________________________________________________________________________________________ //numjoysticks : Count available joysticks. int numjoysticks() { return SDL_NumJoysticks(); } //_________________________________________________________________________________________________________________________ //namejoystick(index) : Get joystick name. char *namejoystick(int index) { return (char *)SDL_JoystickName(index); } //_________________________________________________________________________________________________________________________ //numaxesjoystick : Get the number of joystick axes int numaxesjoystick(int index) { int ret; SDLjoy=SDL_JoystickOpen(index); SDL_JoystickUpdate(); if (SDLjoy) ret= SDL_JoystickNumAxes(SDLjoy); else ret=-1; SDL_JoystickClose(SDLjoy); return ret; } //_________________________________________________________________________________________________________________________ //numballsjoystick(i) : Get the number of joystick trackballs int numballsjoystick(int index) { int ret; SDLjoy=SDL_JoystickOpen(index); SDL_JoystickUpdate(); if (SDLjoy) ret= SDL_JoystickNumBalls(SDLjoy); else ret=-1; SDL_JoystickClose(SDLjoy); return ret; } //_________________________________________________________________________________________________________________________ //numhatsjoystick(i) : Get the number of joystick hats int numhatsjoystick(int index) { int ret; SDLjoy=SDL_JoystickOpen(index); SDL_JoystickUpdate(); if (SDLjoy) ret= SDL_JoystickNumHats(SDLjoy); else ret=-1; SDL_JoystickClose(SDLjoy); return ret; } //_________________________________________________________________________________________________________________________ //numbuttonsjoystick(i) : Get the number of joysitck buttons int numbuttonsjoystick(int index) { int ret; SDLjoy=SDL_JoystickOpen(index); SDL_JoystickUpdate(); if (SDLjoy) ret= SDL_JoystickNumButtons(SDLjoy); else ret=-1; SDL_JoystickClose(SDLjoy); return ret; } //_________________________________________________________________________________________________________________________ //getaxisjoystick(i,a) : Get the current state of an axis int getaxisjoystick(int index,int axis) { int ret; SDLjoy=SDL_JoystickOpen(index); SDL_JoystickUpdate(); if (SDLjoy) ret= SDL_JoystickGetAxis(SDLjoy,axis); else ret=0; SDL_JoystickClose(SDLjoy); return ret; } //_________________________________________________________________________________________________________________________ //gethatjoystick(i,a) : Get the current state of a joystick hat int gethatjoystick(int index,int hat) { int ret; SDLjoy=SDL_JoystickOpen(index); SDL_JoystickUpdate(); if (SDLjoy) ret= SDL_JoystickGetHat(SDLjoy,hat); else ret=-1; SDL_JoystickClose(SDLjoy); return ret; } //_________________________________________________________________________________________________________________________ //getbuttonjoystick(i,a) : Get the current state of a given button on a given joystick int getbuttonjoystick(int index,int button) { int ret; SDLjoy=SDL_JoystickOpen(index); SDL_JoystickUpdate(); if (SDLjoy) ret= SDL_JoystickGetButton(SDLjoy,button); else ret=-1; SDL_JoystickClose(SDLjoy); return ret; } //_________________________________________________________________________________________________________________________ //xgetballjoystick(i,a) : Get relative x trackball motion int xgetballjoystick(int index,int ball) { int x,y; int ret; SDLjoy=SDL_JoystickOpen(index); SDL_JoystickUpdate(); if (SDLjoy) ret= SDL_JoystickGetBall(SDLjoy,ball,&x,&y); else ret=-1; SDL_JoystickClose(SDLjoy); if (ret!=-1) return x; else return ret; } //_________________________________________________________________________________________________________________________ //ygetballjoystick(i,a) : Get relative y trackball motion int ygetballjoystick(int index,int ball) { int x,y; int ret; SDLjoy=SDL_JoystickOpen(index); SDL_JoystickUpdate(); if (SDLjoy) ret= SDL_JoystickGetBall(SDLjoy,ball,&x,&y); else ret=-1; SDL_JoystickClose(SDLjoy); if (ret!=-1) return y; else return ret; } //_________________________________________________________________________________________________________________________ //joy : return joystick boolean coordinate int joy(int index) { int ret,tmp; if (index>=SDL_NumJoysticks())return -1; SDLjoy=SDL_JoystickOpen(index); SDL_JoystickUpdate(); ret=0; if (SDLjoy && SDL_JoystickNumAxes(SDLjoy)>=2 ){ tmp= SDL_JoystickGetAxis(SDLjoy,0); if (tmp<0) ret+=1; if (tmp>0) ret+=2; tmp= SDL_JoystickGetAxis(SDLjoy,1); if (tmp<0) ret+=4; if (tmp>0) ret+=8; } if (SDLjoy && SDL_JoystickNumHats(SDLjoy)>0 ){ ret+=SDL_JoystickGetHat(SDLjoy,0); } SDL_JoystickClose(SDLjoy); if (autotimer()!=0)return -1; return ret; } //_________________________________________________________________________________________________________________________ //bjoy : return joystick buttons pressed in boolean expression int bjoy(int index) { int ret,i,a; if (index>=SDL_NumJoysticks())return emulate_bjoy(index); ret=0; a=1; SDLjoy=SDL_JoystickOpen(index); SDL_JoystickUpdate(); for(i=0;i255)return -1; Palette[c]=v; if (enablePalette!=0){ c_color.b = v & 255; c_color.g =( v / 256) & 255 ; c_color.r =( v / (256*256)) & 255; /* Set palette */ SDL_SetPalette(SDLdisplay, SDL_LOGPAL|SDL_PHYSPAL, &c_color, c, 1); } return 0; } else{ return Palette[c]; } } //_________________________________________________________________________________________________________________________ //colorcycling(s,e,d=0|1,delay) : move the palettecolor one color forward or back work only in 8bit display int colorcycling(int s,int e,int d,int delay) { if (s==-1){ colorcycling_delay=0; return 0; } if (e>256)e=256; if (s<0)s=0; colorcycling_s=s; colorcycling_e=e; colorcycling_d=d; colorcycling_delay=delay; colorcycling_next=delay+SDL_GetTicks(); if (delay==0)colorcyclinghandler(); return delay; } void colorcyclinghandler() { int s,e,d; SDL_Color colors[256]; int i,c; s=colorcycling_s; e=colorcycling_e; d=colorcycling_d; if(d==0){ c=Palette[s]; for(i=s;i<=e;i++){ //color(i,Palette[i+1]); colors[i].b = Palette[i+1] & 255; colors[i].g =( Palette[i+1] / 256) & 255 ; colors[i].r =( Palette[i+1] / (256*256)) & 255; Palette[i]= Palette[i+1]; } //color(e,c); colors[e].b = c & 255; colors[e].g =( c / 256) & 255 ; colors[e].r =( c / (256*256)) & 255; Palette[e]=c; } else{ c=Palette[e]; for(i=e;i>=s;i--){ //color(i,Palette[i-1]); colors[i].b = Palette[i-1] & 255; colors[i].g =( Palette[i-1] / 256) & 255 ; colors[i].r =( Palette[i-1] / (256*256)) & 255; Palette[i]= Palette[i-1]; } //color(s,c); colors[s].b = c & 255; colors[s].g =( c / 256) & 255 ; colors[s].r =( c / (256*256)) & 255; Palette[s]=c; } /* Set palette */ SDL_SetPalette(SDLdisplay, SDL_LOGPAL|SDL_PHYSPAL, &colors[s], s, e-s); colorcycling_next=colorcycling_delay+chrono(); } //_________________________________________________________________________________________________________________________ //ink(c) : select the current color in Uint32 format int ink( int c) { if (c==-1){ return (Uint32)SDL_MapRGB(SDLdisplay->format,SDLcol.r,SDLcol.g,SDLcol.b); } else{ SDLcol.b = c & 255; SDLcol.g =( c / 256) & 255 ; SDLcol.r =( c / (256*256)) & 255; } return 0; } //_______________________________________________________________________________________________________________________ //point(x,y) : return the color of x,y point int point(int x,int y) { Uint32 r; if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_LockSurface(SDLscreen[c_screen]); r=getpixel(SDLscreen[c_screen],x,y); if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_UnlockSurface(SDLscreen[c_screen]); return rrgb(r); } //_______________________________________________________________________________________________________________________ //dot(x,y) : write x,y point with a current color int dot(int x,int y) { if (SDL_MUSTLOCK(SDLscreen[c_screen]) ) SDL_LockSurface(SDLscreen[c_screen]); putpixel( SDLscreen[c_screen], x, y,(Uint32)SDL_MapRGB(SDLdisplay->format,SDLcol.r,SDLcol.g,SDLcol.b)); if (SDL_MUSTLOCK(SDLscreen[c_screen]) ) SDL_UnlockSurface(SDLscreen[c_screen]); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //dot_ex(x,y,c) : write x,y point with a c color int dot_ex(int x,int y,int c) { ink(c); if (autotimer()!=0)return -1; return dot(x,y); } //_______________________________________________________________________________________________________________________ //line(x,y,x1,y1) : write a line int line(int x,int y,int x1,int y1) { if (SDL_MUSTLOCK(SDLscreen[c_screen]) ) SDL_LockSurface(SDLscreen[c_screen]); draw_line(SDLscreen[c_screen],x,y,x1,y1,(Uint32)SDL_MapRGB(SDLdisplay->format,SDLcol.r,SDLcol.g,SDLcol.b)); if (SDL_MUSTLOCK(SDLscreen[c_screen]) ) SDL_UnlockSurface(SDLscreen[c_screen]); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //box(x,y,x1,y1) : write a empty rettangle int box(int x,int y,int x1,int y1) { int tmp; if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_LockSurface(SDLscreen[c_screen]); if (x1format,SDLcol.r,SDLcol.g,SDLcol.b)); if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_UnlockSurface(SDLscreen[c_screen]); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //bar(x,y,x1,y1) : write a fill rettangle int bar(int x,int y,int x1,int y1) { SDL_Rect d; int tmp; if (x1format,SDLcol.r,SDLcol.g,SDLcol.b)); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //rectangle(x,y,w,h,mode) : write a rettangle w and h are the sizes mode=0 empty 1=filled int rectangle(int x,int y,int w,int h,int mode) { switch(mode){ case 1: return bar(x,y,x+w,y+h); break; default: return box(x,y,x+w,y+h); break; } } //_______________________________________________________________________________________________________________________ //circle(x,y,r) : write a circle int circle(int x,int y,int r) { if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_LockSurface(SDLscreen[c_screen]); draw_circle(SDLscreen[c_screen],x,y,r,(Uint32)SDL_MapRGB(SDLdisplay->format,SDLcol.r,SDLcol.g,SDLcol.b)); if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_UnlockSurface(SDLscreen[c_screen]); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //fillcircle(x,y,r) : write a fill circle int fillcircle(int x,int y,int r) { if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_LockSurface(SDLscreen[c_screen]); draw_fillcircle(SDLscreen[c_screen],x,y,r,(Uint32)SDL_MapRGB(SDLdisplay->format,SDLcol.r,SDLcol.g,SDLcol.b)); if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_UnlockSurface(SDLscreen[c_screen]); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //ellipse(x,y,rx,ry) : write a ellipse int ellipse(int x,int y,int rx,int ry) { if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_LockSurface(SDLscreen[c_screen]); draw_ellipse(SDLscreen[c_screen],x,y,rx,ry,(Uint32)SDL_MapRGB(SDLdisplay->format,SDLcol.r,SDLcol.g,SDLcol.b)); if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_UnlockSurface(SDLscreen[c_screen]); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //fillellipse(x,y,rx,ry) : write a fill ellipse int fillellipse(int x,int y,int rx,int ry) { if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_LockSurface(SDLscreen[c_screen]); draw_fillellipse(SDLscreen[c_screen],x,y,rx,ry,(Uint32)SDL_MapRGB(SDLdisplay->format,SDLcol.r,SDLcol.g,SDLcol.b)); if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_UnlockSurface(SDLscreen[c_screen]); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //paint(x,y) : fill a close area int paint(int x,int y) { char *paintmap; int xstart,ystart; int src_col,col; char pm; if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_LockSurface(SDLscreen[c_screen]); paintmap= malloc(screenwidth()*screenheight()); xstart=x; ystart=y; src_col=getpixel(SDLscreen[c_screen],x,y);//point(x,y); putpixel(SDLscreen[c_screen],x,y,(Uint32)SDL_MapRGB(SDLdisplay->format,SDLcol.r,SDLcol.g,SDLcol.b));//dot(x,y); col=getpixel(SDLscreen[c_screen],x,y);//point(x,y); pm=2; if (col==src_col)return -1; while(0==0) { //if (point(x,y)==src_col) { if (getpixel(SDLscreen[c_screen],x,y)== src_col) { putpixel(SDLscreen[c_screen],x,y,(Uint32)SDL_MapRGB(SDLdisplay->format,SDLcol.r,SDLcol.g,SDLcol.b));//dot(x,y); paintmap[y*screenwidth()+x]=pm; } //if (point(x+1,y)==src_col && (x+1) < screenwidth()) { if (getpixel(SDLscreen[c_screen],x+1,y)==src_col && (x+1) < screenwidth()) { x=x+1; pm=1; } //else if (point(x-1,y)==src_col && (x-1) > 0 ) { else if (getpixel(SDLscreen[c_screen],x-1,y)==src_col && (x-1) >= 0 ) { x=x-1; pm=2; } //else if (point(x,y+1)==src_col && (y+1) < screenheight()) { else if (getpixel(SDLscreen[c_screen],x,y+1)==src_col && (y+1) < screenheight()) { y=y+1; pm=3; } //else if (point(x,y-1)==src_col && (y-1) > 0) { else if (getpixel(SDLscreen[c_screen],x,y-1)==src_col && (y-1) >= 0) { y=y-1; pm=4; } else { if (x==xstart && y==ystart)break; if (paintmap[y*screenwidth()+x]==1) x=x-1; else if (paintmap[y*screenwidth()+x]==2) x=x+1; else if (paintmap[y*screenwidth()+x]==3) y=y-1; else if (paintmap[y*screenwidth()+x]==4) y=y+1; } } free(paintmap); if (SDL_MUSTLOCK(SDLscreen[c_screen]) ) SDL_UnlockSurface(SDLscreen[c_screen]); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //triangle(xa,ya,xb,yb,xc,yc) : draw a filled triangle int triangle(int x1,int y1,int x2,int y2,int x3,int y3) { int c,x,y; int dx,dy; double sl; //* dx = x2 - x1; // change in x dy = y2 - y1; // change in y sl = (double)dy / dx; if (abs(dx) >= abs(dy)) { // draw left/right - right/left c = (x1 <= x2) ? 1 : -1; for (x = x1; x != x2 + c; x += c) { y = y1 + (int)( (x - x1) * sl + 0.5 ); if (y>=0) line(x,y,x3,y3); } } else { // draw top/bottom - bottom/top c = (y1 <= y2) ? 1 : -1; for (y = y1; y != y2 + c; y += c) { x =(int) x1 + (int)( (y - y1) / sl + 0.5 ); line(x,y,x3,y3); } } dx = x3 - x2; // change in x dy = y3 - y2; // change in y sl = (double)dy / dx; if (abs(dx) >= abs(dy)) { // draw left/right - right/left c = (x2 <= x3) ? 1 : -1; for (x = x2; x != x3 + c; x += c) { y = y2 + (int)( (x - x2) * sl + 0.5 ); if (y>=0) line(x,y,x1,y1); } } else { // draw top/bottom - bottom/top c = (y2 <= y3) ? 1 : -1; for (y = y2; y != y3 + c; y += c) { x =(int) x2 + (int)( (y - y2) / sl + 0.5 ); line(x,y,x1,y1); } } dx = x1 - x3; // change in x dy = y1 - y3; // change in y sl = (double)dy / dx; if (abs(dx) >= abs(dy)) { // draw left/right - right/left c = (x3 <= x1) ? 1 : -1; for (x = x3; x != x1 + c; x += c) { y = y3 + (int)( (x - x3) * sl + 0.5 ); if (y>=0) line(x,y,x2,y2); } } else { // draw top/bottom - bottom/top c = (y3 <= y1) ? 1 : -1; for (y = y3; y != y1 + c; y += c) { x =(int) x3 + (int)( (y - y3) / sl + 0.5 ); line(x,y,x2,y2); } } //*/ if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ usr/src/sdlBasic/src/sdlBrt/SDLengine/common.c0000755000076500007660000001054210635200437016427 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic common.c This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //________________________________________________________________________________________________________________________________________ // COMMON INTERNAL RUTINES //________________________________________________________________________________________________________________________________________ //________________________________________________________________________________________________________________________________________ //stopkey :terminate program if press ctrl+c int stopkey() { Uint8 *keystate; getevent(); keystate = SDL_GetKeyState(NULL); if (keystate[306] && keystate[99]){ error_description="ctrl+c pressed by the user\n"; error_type=2; SDLerr(stderr,error_description); return -1; } //* #if defined(GP2X) SDLjoy=SDL_JoystickOpen(0); SDL_JoystickUpdate(); if (SDL_JoystickGetButton(SDLjoy, 16) && SDL_JoystickGetButton(SDLjoy, 17)){ error_description="vol+ vol- pressed by the user\n"; error_type=2; SDLerr(stderr,error_description); return -1; } SDL_JoystickClose(SDLjoy); #endif //*/ return 0; } //________________________________________________________________________________________________________________________________________ //getevent : eventhandling int getevent() { SDL_Event event; while ( SDL_PollEvent(&event) ) { switch(event.type){ case SDL_QUIT: terminate(); exit(2); return 0; break; case SDL_KEYDOWN: lastkey = event.key.keysym.unicode; if (lastkey==0){ switch(event.key.keysym.sym){ case 127: lastkey=127; break; case 256: lastkey=48; break; case 257: lastkey=49; break; case 258: lastkey=50; break; case 259: lastkey=51; break; case 260: lastkey=52; break; case 261: lastkey=53; break; case 262: lastkey=54; break; case 263: lastkey=55; break; case 264: lastkey=56; break; case 265: lastkey=57; break; case 266: lastkey=46; break; case 267: lastkey=47; break; case 271: lastkey=13; break; default: lastkey=0; break; } } break; case SDL_KEYUP : lastkey=0; break; } } SDL_PumpEvents(); return 0; } //________________________________________________________________________________________________________________________________________ // autotimer : collaborative automatic multitasking int autotimer() { int i; /* autofade handler */ for(i=0;ifadedelay[i]){ fadedelay[i]=SDL_GetTicks()+10; if (fadeflag[i]>0) fadehandler(i); if (crossfadeflag[i]>0) crossfadehandler(i); } } } /* musicfade handler */ if (fademusic_t>0) if (chrono()>fademusic_delay) fademusichandler(); /* colorcycling handler */ if (colorcycling_delay>0) if (colorcycling_next0) if (chrono()>SDLautobacktime){ if (screenswap()==-1) return -1; SDLautobacktime=chrono()+SDLautoback; } return 0; } //________________________________________________________________________________________________________________________________________ usr/src/sdlBasic/src/sdlBrt/SDLengine/SDL_extension.c0000755000076500007660000015741310623660021017662 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic SDL_exstension This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //________________________________________________________________________________________________________________________________________ // SDL_EXTENSION //________________________________________________________________________________________________________________________________________ // fileExist(filename) : see if a file exists int fileExist( char *name ) { FILE *handle; /* try to open the file */ handle = fopen( name, "rb" ); if (handle == NULL) return 0; fclose( handle ); return -1; } //________________________________________________________________________________________________________________________________________ // Load_Image(filename,trasparent) : load a image using sdl_image library SDL_Surface *Load_Image(char *datafile, int transparent) { int bpp; Uint32 oldck; SDL_Surface *image, *surface; if (SDLnoAlphaChannel==0){ image=SDL_DisplayFormatAlpha(IMG_Load(datafile)); } else{ //image =IMG_Load(datafile); image =SDL_DisplayFormat(IMG_Load(datafile)); } surface=NULL; if ( image == NULL ) { error_description="Can't load image \n"; error_type=1; SDLerr(stderr, "Can't load image %s: %s\n",datafile, IMG_GetError()); return(NULL); } if ( transparent ) { bpp = image->format->BytesPerPixel; oldck=colorkey; if (SDL_MUSTLOCK(image) ) SDL_LockSurface(image); switch(bpp) { case 1: if (colorkey==-1)colorkey=*(Uint8 *)image->pixels; SDL_SetColorKey(image, (SDL_SRCCOLORKEY|SDL_RLEACCEL),(Uint8) colorkey);//*(Uint8 *)image->pixels if (SDLnoAlphaChannel==0){ SDL_SetAlpha(image, SDL_SRCALPHA|SDL_RLEACCEL, 0); surface = SDL_DisplayFormatAlpha(image); } else{ surface = SDL_DisplayFormat(image); } break; case 2: if (colorkey==-1)colorkey=*(Uint16 *)image->pixels; SDL_SetColorKey(image, (SDL_SRCCOLORKEY|SDL_RLEACCEL),(Uint16)colorkey);//*(Uint16 *)image->pixels if (SDLnoAlphaChannel==0){ SDL_SetAlpha(image, SDL_SRCALPHA|SDL_RLEACCEL, 0); surface = SDL_DisplayFormatAlpha(image); } else{ surface = SDL_DisplayFormat(image); } break; case 3: if (colorkey==-1)colorkey=*(Uint32 *)image->pixels; SDL_SetColorKey(image, (SDL_SRCCOLORKEY|SDL_RLEACCEL),(Uint32)colorkey);//*(Uint32 *)image->pixels if (SDLnoAlphaChannel==0){ SDL_SetAlpha(image, SDL_SRCALPHA|SDL_RLEACCEL, 0); surface = SDL_DisplayFormatAlpha(image); } else{ surface = SDL_DisplayFormat(image); } break; case 4: if (colorkey==-1)colorkey=*(Uint32 *)image->pixels; SDL_SetColorKey(image, (SDL_SRCCOLORKEY|SDL_RLEACCEL),(Uint32)colorkey);//*(Uint32 *)image->pixels if (SDLnoAlphaChannel==0){ SDL_SetAlpha(image, SDL_SRCALPHA|SDL_RLEACCEL, 0); surface = SDL_DisplayFormatAlpha(image); } else{ surface = SDL_DisplayFormat(image); } break; } if (SDL_MUSTLOCK(image) ) SDL_UnlockSurface(image); colorkey=oldck; }else{ if (SDLnoAlphaChannel==0) surface = SDL_DisplayFormatAlpha(image); else surface = SDL_DisplayFormat(image); } SDL_FreeSurface(image); return(surface); } //________________________________________________________________________________________________________________________________________ // Load_zip_Image(zipfile,filename,trasparent) : load a image using sdl_image library SDL_Surface *Load_zip_Image(char *zipfile,char *datafile, int transparent) { unsigned char *mem; SDL_RWops *src; int size; int bpp; Uint32 oldck; SDL_Surface *image, *surface; if (load_zipped_file (zipfile, datafile, &mem, &size)==0){ src=SDL_RWFromMem(mem, size); image=SDL_DisplayFormat(IMG_Load_RW(src, 0)); if ( image == NULL ) { error_description="Can't load image \n"; error_type=1; SDLerr(stderr, "\n Load_zip_Image: Can't load image %s: %s \n",datafile, IMG_GetError()); return(NULL); } if ( transparent ) { bpp = image->format->BytesPerPixel; oldck=colorkey; if (SDL_MUSTLOCK(image) ) SDL_LockSurface(image); switch(bpp) { case 1: if (colorkey==-1)colorkey=*(Uint8 *)image->pixels; SDL_SetColorKey(image, (SDL_SRCCOLORKEY|SDL_RLEACCEL),(Uint8) colorkey);//*(Uint8 *)image->pixels break; case 2: if (colorkey==-1)colorkey=*(Uint16 *)image->pixels; SDL_SetColorKey(image, (SDL_SRCCOLORKEY|SDL_RLEACCEL),(Uint16)colorkey);//*(Uint16 *)image->pixels break; case 3: if (colorkey==-1)colorkey=*(Uint32 *)image->pixels; SDL_SetColorKey(image, (SDL_SRCCOLORKEY|SDL_RLEACCEL),(Uint32)colorkey);//*(Uint32 *)image->pixels break; case 4: if (colorkey==-1)colorkey=*(Uint32 *)image->pixels; SDL_SetColorKey(image, (SDL_SRCCOLORKEY|SDL_RLEACCEL),(Uint32)colorkey);//*(Uint32 *)image->pixels break; } if (SDL_MUSTLOCK(image) ) SDL_UnlockSurface(image); colorkey=oldck; } surface = SDL_DisplayFormat(image); SDL_FreeSurface(image); return(surface); } else return(NULL); } //________________________________________________________________________________________________________________________________________ //Save_Image(filename,image) : save the image using sdl rutines you can save only in bmp format int Save_Image(char *datafile, SDL_Surface *image) { if ( SDL_SaveBMP( image , datafile) ) { error_description="Can't save image \n"; error_type=1; SDLerr(stderr, "Can't save image %s: %s\n",datafile, IMG_GetError()); return -1; } return 0; } //________________________________________________________________________________________________________________________________________ // Image_colorkey(image) : set trasparency on image void Image_colorkey(SDL_Surface *image) { int bpp; Uint32 oldck; if (SDL_MUSTLOCK(image)) SDL_LockSurface(image); bpp = image->format->BytesPerPixel; oldck=colorkey; switch(bpp) { case 1: if (colorkey==-1)colorkey=*(Uint8 *)image->pixels; SDL_SetColorKey(image, (SDL_SRCCOLORKEY|SDL_RLEACCEL),(Uint8)colorkey); break; case 2: if (colorkey==-1)colorkey=*(Uint16 *)image->pixels; SDL_SetColorKey(image, (SDL_SRCCOLORKEY|SDL_RLEACCEL),(Uint16)colorkey); break; case 3: if (colorkey==-1)colorkey=*(Uint32 *)image->pixels; SDL_SetColorKey(image, (SDL_SRCCOLORKEY|SDL_RLEACCEL),(Uint32)colorkey); break; case 4: if (colorkey==-1)colorkey=*(Uint32 *)image->pixels; SDL_SetColorKey(image, (SDL_SRCCOLORKEY|SDL_RLEACCEL),(Uint32)colorkey); break; } if (SDL_MUSTLOCK(image)) SDL_UnlockSurface(image); colorkey=oldck; } //________________________________________________________________________________________________________________________________________ // this rutine was posted by Johannes Bauer in sdl-mailing list: tank'you Joe!! // Function expects a 16-bit Stereo Sample (4 Byte/Sample) and a scale // factor (>1 means longer sample, thus lower pitch, <1 means shorter // sample, thus higher pitch) Mix_Chunk* Change_Pitch(Mix_Chunk *Input_Sample, float Factor) { Mix_Chunk *Sample_Modified; Uint32 Number_Input_Samples; Uint32 Number_Output_Samples; float Real_Factor; Uint32 Begin, End; Sint16 Left, Right; Sint64 AverageL, AverageR; Sint16 OutLeft, OutRight; Uint32 i; Uint32 j; /* if (Input_Sample->allocated!=1) { throw CGenericException(std::string("CSound::Change_Pitch"),std::string("Input sample not allocated.")); } */ Number_Input_Samples=Input_Sample->alen/4; Number_Output_Samples= (Uint32) ((float)Number_Input_Samples*Factor); Real_Factor = (float) Number_Output_Samples/ (float) Number_Input_Samples; Sample_Modified=(Mix_Chunk*)malloc(sizeof(Mix_Chunk)); Sample_Modified->allocated=1;// Not yet, but will soon be Sample_Modified->alen=Number_Output_Samples*4; Sample_Modified->abuf=(Uint8*)malloc(Sample_Modified->alen*sizeof(Uint8)); Sample_Modified->volume=Input_Sample->volume; for (i=0;iabuf[(4*j)+1]<<8)|(Input_Sample->abuf[(4*j)+0]); Right=(Input_Sample->abuf[(4*j)+3]<<8)|(Input_Sample->abuf[(4*j)+2]); AverageL+=Left; AverageR+=Right; } OutLeft=(Sint16)((float)AverageL/(float)(End-Begin+1)); OutRight=(Sint16)((float)AverageR/(float)(End-Begin+1)); Sample_Modified->abuf[(4*i)+1]=(OutLeft>>8)&0xff; Sample_Modified->abuf[(4*i)+0]=(OutLeft)&0xff; Sample_Modified->abuf[(4*i)+3]=(OutRight>>8)&0xff; Sample_Modified->abuf[(4*i)+2]=(OutRight)&0xff; } return Sample_Modified; } //________________________________________________________________________________________________________________________________________ /* Rotozoom/Zoom function for SDL ======================================================================================== (C) LGPL, A. Schiffler, aschiffler@cogeco.com - see LICENSE for details. 32bit Zoomer with optional anti-aliasing by bilinear interpolation. Zoomes 32bit RGBA/ABGR 'src' surface to 'dst' surface. */ int zoomSurfaceRGBA (SDL_Surface * src, SDL_Surface * dst, int smooth) { int x, y, sx, sy, *sax, *say, *csax, *csay, csx, csy, ex, ey, t1, t2, sstep; tColorRGBA *c00, *c01, *c10, *c11; tColorRGBA *sp, *csp, *dp; int sgap, dgap, orderRGBA; /* Variable setup */ if (smooth) { /* For interpolation: assume source dimension is one pixel */ /* smaller to avoid overflow on right and bottom edge. */ sx = (int) (65536.0 * (float) (src->w - 1) / (float) dst->w); sy = (int) (65536.0 * (float) (src->h - 1) / (float) dst->h); } else { sx = (int) (65536.0 * (float) src->w / (float) dst->w); sy = (int) (65536.0 * (float) src->h / (float) dst->h); } /* Allocate memory for row increments */ if ((sax = (int *) malloc ((dst->w + 1) * sizeof (Uint32))) == NULL) { return (-1); } if ((say = (int *) malloc ((dst->h + 1) * sizeof (Uint32))) == NULL) { free (sax); return (-1); } /* Precalculate row increments */ csx = 0; csax = sax; for (x = 0; x <= dst->w; x++) { *csax = csx; csax++; csx &= 0xffff; csx += sx; } csy = 0; csay = say; for (y = 0; y <= dst->h; y++) { *csay = csy; csay++; csy &= 0xffff; csy += sy; } /* Pointer setup */ sp = csp = (tColorRGBA *) src->pixels; dp = (tColorRGBA *) dst->pixels; sgap = src->pitch - src->w * 4; dgap = dst->pitch - dst->w * 4; orderRGBA = (src->format->Rmask == 0x000000ff); /* Switch between interpolating and non-interpolating code */ if (smooth) { /* Interpolating Zoom */ /* Scan destination */ csay = say; for (y = 0; y < dst->h; y++) { /* Setup color source pointers */ c00 = csp; c01 = csp; c01++; c10 = (tColorRGBA *) ((Uint8 *) csp + src->pitch); c11 = c10; c11++; csax = sax; for (x = 0; x < dst->w; x++) { /* ABGR ordering */ /* Interpolate colors */ ex = (*csax & 0xffff); ey = (*csay & 0xffff); t1 = ((((c01->r - c00->r) * ex) >> 16) + c00->r) & 0xff; t2 = ((((c11->r - c10->r) * ex) >> 16) + c10->r) & 0xff; dp->r = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01->g - c00->g) * ex) >> 16) + c00->g) & 0xff; t2 = ((((c11->g - c10->g) * ex) >> 16) + c10->g) & 0xff; dp->g = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01->b - c00->b) * ex) >> 16) + c00->b) & 0xff; t2 = ((((c11->b - c10->b) * ex) >> 16) + c10->b) & 0xff; dp->b = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01->a - c00->a) * ex) >> 16) + c00->a) & 0xff; t2 = ((((c11->a - c10->a) * ex) >> 16) + c10->a) & 0xff; dp->a = (((t2 - t1) * ey) >> 16) + t1; /* Advance source pointers */ csax++; sstep = (*csax >> 16); c00 += sstep; c01 += sstep; c10 += sstep; c11 += sstep; /* Advance destination pointer */ dp++; } /* Advance source pointer */ csay++; csp = (tColorRGBA *) ((Uint8 *) csp + (*csay >> 16) * src->pitch); /* Advance destination pointers */ dp = (tColorRGBA *) ((Uint8 *) dp + dgap); } } else { /* Non-Interpolating Zoom */ csay = say; for (y = 0; y < dst->h; y++) { sp = csp; csax = sax; for (x = 0; x < dst->w; x++) { /* Draw */ *dp = *sp; /* Advance source pointers */ csax++; sp += (*csax >> 16); /* Advance destination pointer */ dp++; } /* Advance source pointer */ csay++; csp = (tColorRGBA *) ((Uint8 *) csp + (*csay >> 16) * src->pitch); /* Advance destination pointers */ dp = (tColorRGBA *) ((Uint8 *) dp + dgap); } } /* Remove temp arrays */ free (sax); free (say); return (0); } //________________________________________________________________________________________________________________________________________ /* 8bit Zoomer without smoothing. Zoomes 8bit palette/Y 'src' surface to 'dst' surface. */ int zoomSurfaceY (SDL_Surface * src, SDL_Surface * dst) { Uint32 x, y, sx, sy, *sax, *say, *csax, *csay, csx, csy; Uint8 *sp, *dp, *csp; int dgap; /* Variable setup */ sx = (Uint32) (65536.0 * (float) src->w / (float) dst->w); sy = (Uint32) (65536.0 * (float) src->h / (float) dst->h); /* Allocate memory for row increments */ if ((sax = (Uint32 *) malloc (dst->w * sizeof (Uint32))) == NULL) { return (-1); } if ((say = (Uint32 *) malloc (dst->h * sizeof (Uint32))) == NULL) { if (sax != NULL) { free (sax); } return (-1); } /* Precalculate row increments */ csx = 0; csax = sax; for (x = 0; x < dst->w; x++) { csx += sx; *csax = (csx >> 16); csx &= 0xffff; csax++; } csy = 0; csay = say; for (y = 0; y < dst->h; y++) { csy += sy; *csay = (csy >> 16); csy &= 0xffff; csay++; } csx = 0; csax = sax; for (x = 0; x < dst->w; x++) { csx += (*csax); csax++; } csy = 0; csay = say; for (y = 0; y < dst->h; y++) { csy += (*csay); csay++; } /* Pointer setup */ sp = csp = (Uint8 *) src->pixels; dp = (Uint8 *) dst->pixels; dgap = dst->pitch - dst->w; /* Draw */ csay = say; for (y = 0; y < dst->h; y++) { csax = sax; sp = csp; for (x = 0; x < dst->w; x++) { /* Draw */ *dp = *sp; /* Advance source pointers */ sp += (*csax); csax++; /* Advance destination pointer */ dp++; } /* Advance source pointer (for row) */ csp += ((*csay) * src->pitch); csay++; /* Advance destination pointers */ dp += dgap; } /* Remove temp arrays */ free (sax); free (say); return (0); } //________________________________________________________________________________________________________________________________________ /* 32bit Rotozoomer with optional anti-aliasing by bilinear interpolation. Rotates and zoomes 32bit RGBA/ABGR 'src' surface to 'dst' surface. */ void transformSurfaceRGBA (SDL_Surface * src, SDL_Surface * dst, int cx, int cy,int isin, int icos, int smooth) { int x, y, t1, t2, dx, dy, xd, yd, sdx, sdy, ax, ay, ex, ey, sw, sh; tColorRGBA c00={0,0,0}, c01={0,0,0}, c10={0,0,0}, c11={0,0,0}; tColorRGBA *pc, *sp; int gap, orderRGBA; /* Variable setup */ xd = ((src->w - dst->w) << 15); yd = ((src->h - dst->h) << 15); ax = (cx << 16) - (icos * cx); ay = (cy << 16) - (isin * cx); sw = src->w - 1; sh = src->h - 1; pc = dst->pixels; gap = dst->pitch - dst->w * 4; orderRGBA = (src->format->Rmask == 0x000000ff); /* Switch between interpolating and non-interpolating code */ if (smooth) { for (y = 0; y < dst->h; y++) { dy = cy - y; sdx = (ax + (isin * dy)) + xd; sdy = (ay - (icos * dy)) + yd; for (x = 0; x < dst->w; x++) { dx = (sdx >> 16); dy = (sdy >> 16); if ((dx >= -1) && (dy >= -1) && (dx < src->w) && (dy < src->h)) { if ((dx >= 0) && (dy >= 0) && (dx < sw) && (dy < sh)) { sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); sp += dx; c00 = *sp; sp += 1; c01 = *sp; sp = (tColorRGBA *) ((Uint8 *) sp + src->pitch); sp -= 1; c10 = *sp; sp += 1; c11 = *sp; } else if ((dx == sw) && (dy == sh)) { sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); sp += dx; c00 = *sp; c01 = *pc; c10 = *pc; c11 = *pc; } else if ((dx == -1) && (dy == -1)) { sp = (tColorRGBA *) (src->pixels); c00 = *pc; c01 = *pc; c10 = *pc; c11 = *sp; } else if ((dx == -1) && (dy == sh)) { sp = (tColorRGBA *) (src->pixels); sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); c00 = *pc; c01 = *sp; c10 = *pc; c11 = *pc; } else if ((dx == sw) && (dy == -1)) { sp = (tColorRGBA *) (src->pixels); sp += dx; c00 = *pc; c01 = *pc; c10 = *sp; c11 = *pc; } else if (dx == -1) { sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); c00 = *pc; c01 = *sp; c10 = *pc; sp = (tColorRGBA *) ((Uint8 *) sp + src->pitch); c11 = *sp; } else if (dy == -1) { sp = (tColorRGBA *) (src->pixels); sp += dx; c00 = *pc; c01 = *pc; c10 = *sp; sp += 1; c11 = *sp; } else if (dx == sw) { sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); sp += dx; c00 = *sp; c01 = *pc; sp = (tColorRGBA *) ((Uint8 *) sp + src->pitch); c10 = *sp; c11 = *pc; } else if (dy == sh) { sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); sp += dx; c00 = *sp; sp += 1; c01 = *sp; c10 = *pc; c11 = *pc; } /* Interpolate colors */ ex = (sdx & 0xffff); ey = (sdy & 0xffff); t1 = ((((c01.r - c00.r) * ex) >> 16) + c00.r) & 0xff; t2 = ((((c11.r - c10.r) * ex) >> 16) + c10.r) & 0xff; pc->r = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01.g - c00.g) * ex) >> 16) + c00.g) & 0xff; t2 = ((((c11.g - c10.g) * ex) >> 16) + c10.g) & 0xff; pc->g = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01.b - c00.b) * ex) >> 16) + c00.b) & 0xff; t2 = ((((c11.b - c10.b) * ex) >> 16) + c10.b) & 0xff; pc->b = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01.a - c00.a) * ex) >> 16) + c00.a) & 0xff; t2 = ((((c11.a - c10.a) * ex) >> 16) + c10.a) & 0xff; pc->a = (((t2 - t1) * ey) >> 16) + t1; } sdx += icos; sdy += isin; pc++; } pc = (tColorRGBA *) ((Uint8 *) pc + gap); } } else { for (y = 0; y < dst->h; y++) { dy = cy - y; sdx = (ax + (isin * dy)) + xd; sdy = (ay - (icos * dy)) + yd; for (x = 0; x < dst->w; x++) { dx = (short) (sdx >> 16); dy = (short) (sdy >> 16); if ((dx >= 0) && (dy >= 0) && (dx < src->w) && (dy < src->h)) { sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); sp += dx; *pc = *sp; } sdx += icos; sdy += isin; pc++; } pc = (tColorRGBA *) ((Uint8 *) pc + gap); } } } /* 8bit Rotozoomer without smoothing Rotates and zoomes 8bit palette/Y 'src' surface to 'dst' surface. */ void transformSurfaceY (SDL_Surface * src, SDL_Surface * dst, int cx, int cy,int isin, int icos) { int x, y, dx, dy, xd, yd, sdx, sdy, ax, ay, sw, sh; tColorY *pc, *sp; int gap; /* Variable setup */ xd = ((src->w - dst->w) << 15); yd = ((src->h - dst->h) << 15); ax = (cx << 16) - (icos * cx); ay = (cy << 16) - (isin * cx); sw = src->w - 1; sh = src->h - 1; pc = dst->pixels; gap = dst->pitch - dst->w; /* Clear surface to colorkey */ memset (pc, (unsigned char) (src->format->colorkey & 0xff), dst->pitch * dst->h); /* Iterate through destination surface */ for (y = 0; y < dst->h; y++) { dy = cy - y; sdx = (ax + (isin * dy)) + xd; sdy = (ay - (icos * dy)) + yd; for (x = 0; x < dst->w; x++) { dx = (short) (sdx >> 16); dy = (short) (sdy >> 16); if ((dx >= 0) && (dy >= 0) && (dx < src->w) && (dy < src->h)) { sp = (tColorY *) (src->pixels); sp += (src->pitch * dy + dx); *pc = *sp; } sdx += icos; sdy += isin; pc++; } pc += gap; } } //________________________________________________________________________________________________________________________________________ /* rotozoomSurface() Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees. 'zoom' a scaling factor. If 'smooth' is 1 then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. */ #define VALUE_LIMIT 0.001 SDL_Surface * rotozoomSurface (SDL_Surface * src, double angle, double zoom, int smooth) { SDL_Surface *rz_src; SDL_Surface *rz_dst; double zoominv; double radangle, sanglezoom, canglezoom, sanglezoominv, canglezoominv; int dstwidthhalf, dstwidth, dstheighthalf, dstheight; double x, y, cx, cy, sx, sy; int is32bit; int i, src_converted; /* Sanity check */ if (src == NULL) return (NULL); /* Determine if source surface is 32bit or 8bit */ is32bit = (src->format->BitsPerPixel == 32); if ((is32bit) || (src->format->BitsPerPixel == 8)) { /* Use source surface 'as is' */ rz_src = src; src_converted = 0; } else { /* New source surface is 32bit with a defined RGBA ordering */ rz_src = SDL_CreateRGBSurface (SDL_SWSURFACE, src->w, src->h, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000); //patch for colorkey setted if (colorkey!=-1) SDL_FillRect(rz_src,NULL,colorkey); else SDL_FillRect(rz_src,NULL,*(Uint32*)src->pixels); SDL_BlitSurface (src, NULL, rz_src, NULL); src_converted = 1; is32bit = 1; } /* Sanity check zoom factor */ if (zoom < VALUE_LIMIT) { zoom = VALUE_LIMIT; } zoominv = 65536.0 / zoom; /* Check if we have a rotozoom or just a zoom */ if (fabs (angle) > VALUE_LIMIT) { /* Angle!=0: full rotozoom */ /* ----------------------- */ /* Calculate target factors from sin/cos and zoom */ radangle = angle * (M_PI / 180.0); sanglezoom = sanglezoominv = sin (radangle); canglezoom = canglezoominv = cos (radangle); sanglezoom *= zoom; canglezoom *= zoom; sanglezoominv *= zoominv; canglezoominv *= zoominv; /* Determine destination width and height by rotating a centered source box */ x = rz_src->w / 2; y = rz_src->h / 2; cx = canglezoom * x; cy = canglezoom * y; sx = sanglezoom * x; sy = sanglezoom * y; dstwidthhalf = MAX ((int) ceil (MAX (MAX (MAX (fabs (cx + sy), fabs (cx - sy)), fabs (-cx + sy)), fabs (-cx - sy))), 1); dstheighthalf = MAX ((int) ceil (MAX (MAX (MAX (fabs (sx + cy), fabs (sx - cy)), fabs (-sx + cy)), fabs (-sx - cy))), 1); dstwidth = 2 * dstwidthhalf; dstheight = 2 * dstheighthalf; /* Alloc space to completely contain the rotated surface */ rz_dst = NULL; if (is32bit) { /* Target surface is 32bit with source RGBA/ABGR ordering */ rz_dst = SDL_CreateRGBSurface (SDL_SWSURFACE, dstwidth, dstheight, 32, rz_src->format->Rmask, rz_src->format->Gmask, rz_src->format->Bmask, rz_src->format->Amask); //patch for colorkey setted if (colorkey!=-1) SDL_FillRect(rz_dst,NULL,colorkey); else SDL_FillRect(rz_dst,NULL,*(Uint32*)src->pixels); } else { /* Target surface is 8bit */ rz_dst = SDL_CreateRGBSurface (SDL_SWSURFACE, dstwidth, dstheight, 8, 0, 0, 0, 0); //patch for colorkey setted if (colorkey!=-1) SDL_FillRect(rz_dst,NULL,colorkey); else SDL_FillRect(rz_dst,NULL,*(Uint8 *)src->pixels); } /* Lock source surface */ SDL_LockSurface (rz_src); /* Check which kind of surface we have */ if (is32bit) { /* Call the 32bit transformation routine to do the rotation (using alpha) */ transformSurfaceRGBA (rz_src, rz_dst, dstwidthhalf, dstheighthalf, (int) (sanglezoominv), (int) (canglezoominv), smooth); /* Turn on source-alpha support */ SDL_SetAlpha (rz_dst, SDL_SRCALPHA, 255); } else { /* Copy palette and colorkey info */ for (i = 0; i < rz_src->format->palette->ncolors; i++) { rz_dst->format->palette->colors[i] = rz_src->format->palette->colors[i]; } rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors; /* Call the 8bit transformation routine to do the rotation */ transformSurfaceY (rz_src, rz_dst, dstwidthhalf, dstheighthalf, (int) (sanglezoominv), (int) (canglezoominv)); SDL_SetColorKey (rz_dst, SDL_SRCCOLORKEY| SDL_RLEACCEL ,rz_src->format->colorkey); } /* Unlock source surface */ SDL_UnlockSurface (rz_src); } else { /* Angle=0: Just a zoom */ /* -------------------- */ /* Calculate target size and set rect */ dstwidth = (int) ((double) rz_src->w * zoom); dstheight = (int) ((double) rz_src->h * zoom); if (dstwidth < 1) { dstwidth = 1; } if (dstheight < 1) { dstheight = 1; } /* Alloc space to completely contain the zoomed surface */ rz_dst = NULL; if (is32bit) { /* Target surface is 32bit with source RGBA/ABGR ordering */ rz_dst = SDL_CreateRGBSurface (SDL_SWSURFACE, dstwidth, dstheight, 32, rz_src->format->Rmask, rz_src->format->Gmask, rz_src->format->Bmask, rz_src->format->Amask); //patch for colorkey setted if (colorkey!=-1) SDL_FillRect(rz_dst,NULL,colorkey); else SDL_FillRect(rz_dst,NULL,*(Uint32 *)src->pixels); } else { /* Target surface is 8bit */ rz_dst = SDL_CreateRGBSurface (SDL_SWSURFACE, dstwidth, dstheight, 8, 0, 0, 0, 0); //patch for colorkey setted if (colorkey!=-1) SDL_FillRect(rz_dst,NULL,colorkey); else SDL_FillRect(rz_dst,NULL,*(Uint8 *)src->pixels); } /* Lock source surface */ SDL_LockSurface (rz_src); /* Check which kind of surface we have */ if (is32bit) { /* Call the 32bit transformation routine to do the zooming (using alpha) */ zoomSurfaceRGBA (rz_src, rz_dst, smooth); /* Turn on source-alpha support */ SDL_SetAlpha (rz_dst, SDL_SRCALPHA, 255); } else { /* Copy palette and colorkey info */ for (i = 0; i < rz_src->format->palette->ncolors; i++) { rz_dst->format->palette->colors[i] = rz_src->format->palette->colors[i]; } rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors; /* Call the 8bit transformation routine to do the zooming */ zoomSurfaceY (rz_src, rz_dst); SDL_SetColorKey (rz_dst, SDL_SRCCOLORKEY| SDL_RLEACCEL, rz_src->format->colorkey); } /* Unlock source surface */ SDL_UnlockSurface (rz_src); } /* Cleanup temp surface */ if (src_converted) { SDL_FreeSurface (rz_src); rz_src=NULL; } /* Return destination surface */ return (rz_dst); } //________________________________________________________________________________________________________________________________________ /* zoomSurface() Zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is 1 then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. */ #define VALUE_LIMIT 0.001 SDL_Surface *zoomSurface (SDL_Surface * src, double zoomx, double zoomy, int smooth) { SDL_Surface *rz_src; SDL_Surface *rz_dst; int dstwidth, dstheight; int is32bit; int i, src_converted; /* Sanity check */ if (src == NULL) return (NULL); /* Determine if source surface is 32bit or 8bit */ is32bit = (src->format->BitsPerPixel == 32); if ((is32bit) || (src->format->BitsPerPixel == 8)) { /* Use source surface 'as is' */ rz_src = src; src_converted = 0; } else { /* New source surface is 32bit with a defined RGBA ordering */ rz_src = SDL_CreateRGBSurface (SDL_SWSURFACE, src->w, src->h, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000); SDL_BlitSurface (src, NULL, rz_src, NULL); src_converted = 1; is32bit = 1; } /* Sanity check zoom factors */ if (zoomx < VALUE_LIMIT) { zoomx = VALUE_LIMIT; } if (zoomy < VALUE_LIMIT) { zoomy = VALUE_LIMIT; } /* Calculate target size and set rect */ dstwidth = (int) ( rz_src->w * zoomx);//(double) dstheight = (int) ( rz_src->h * zoomy);//(double) if (dstwidth < 1) { dstwidth = 1; } if (dstheight < 1) { dstheight = 1; } /* Alloc space to completely contain the zoomed surface */ rz_dst = NULL; if (is32bit) { /* Target surface is 32bit with source RGBA/ABGR ordering */ rz_dst = SDL_CreateRGBSurface (SDL_SWSURFACE, dstwidth, dstheight, 32, rz_src->format->Rmask, rz_src->format->Gmask, rz_src->format->Bmask, rz_src->format->Amask); } else { /* Target surface is 8bit */ rz_dst = SDL_CreateRGBSurface (SDL_SWSURFACE, dstwidth, dstheight, 8, 0, 0, 0, 0); } /* Lock source surface */ SDL_LockSurface (rz_src); /* Check which kind of surface we have */ if (is32bit) { /* Call the 32bit transformation routine to do the zooming (using alpha) */ zoomSurfaceRGBA (rz_src, rz_dst, smooth); /* Turn on source-alpha support */ SDL_SetAlpha (rz_dst, SDL_SRCALPHA, 255); } else { /* Copy palette and colorkey info */ for (i = 0; i < rz_src->format->palette->ncolors; i++) { rz_dst->format->palette->colors[i] = rz_src->format->palette->colors[i]; } rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors; /* Call the 8bit transformation routine to do the zooming */ zoomSurfaceY (rz_src, rz_dst); SDL_SetColorKey (rz_dst, SDL_SRCCOLORKEY| SDL_RLEACCEL, rz_src->format->colorkey); } /* Unlock source surface */ SDL_UnlockSurface (rz_src); /* Cleanup temp surface */ if (src_converted) { SDL_FreeSurface (rz_src); rz_src=NULL; } /* Return destination surface */ return (rz_dst); } //________________________________________________________________________________________________________________________________________ /* This code was extracted from fade tutorial written by PatricK Kooman */ /* Fades the given surface in or out to the given screen within the given time If the image surface is the screen surface (pointer are equal), a copy is made first. We must do that because we are overwriting the Screen Surface. */ void fade (int s, SDL_Surface* in_p_surf_screen, SDL_Surface* in_p_surf_img, Uint32 in_ui_seconds, int in_b_fade_out) { /* copy the parameters in stared variables */ p_surf_screen[s]=in_p_surf_screen; p_surf_img[s]=in_p_surf_img; ui_seconds[s]=in_ui_seconds; b_fade_out[s]=in_b_fade_out; /* initialize vars */ p_surf_black[s] = NULL; p_surf_screen_copy[s] = NULL; ui_flags[s] = SDL_SRCALPHA|SDL_RLEACCEL; /* Create the black surface in the format of the given screen */ if ((p_surf_screen[s]->flags & SDL_HWSURFACE)) { ui_flags[s] |= SDL_HWSURFACE ; } else { ui_flags[s] |= SDL_SWSURFACE ; } if ((p_surf_black[s] = SDL_CreateRGBSurface (ui_flags[s], p_surf_screen[s]->w, p_surf_screen[s]->h, p_surf_screen[s]->format->BitsPerPixel, p_surf_screen[s]->format->Rmask, p_surf_screen[s]->format->Gmask, p_surf_screen[s]->format->Bmask, p_surf_screen[s]->format->Amask)) == NULL) { /* Replace this line with you own error handling / logging */ error_description="SDLengine error fade: could not create the black Surface"; error_type=1; fprintf (stderr, "fade: could not create the black Surface. (%s)\n", SDL_GetError ()) ; return ; } /* Fill the Surface with black */ SDL_FillRect (p_surf_black[s], NULL, SDL_MapRGB (p_surf_screen[s]->format, 0, 0, 0)) ; /* Should we make a copy of the Screen? */ if (p_surf_screen[s] == p_surf_img[s]) { if ((p_surf_screen_copy[s] = SDL_CreateRGBSurface (ui_flags[s], p_surf_screen[s]->w, p_surf_screen[s]->h, p_surf_screen[s]->format->BitsPerPixel, p_surf_screen[s]->format->Rmask, p_surf_screen[s]->format->Gmask, p_surf_screen[s]->format->Bmask, p_surf_screen[s]->format->Amask)) == NULL) { /* Replace this line with you own error handling / logging */ error_description="SDLengine error fade: could not create a copy of the Screen Surface"; error_type=1; fprintf (stderr, "fade: could not create a copy of the Screen Surface. (%s)\n", SDL_GetError ()) ; SDL_FreeSurface (p_surf_black[s]) ; return ; } /* Ok, copy surfaces and set surfact pointer */ SDL_BlitSurface (p_surf_screen[s], NULL, p_surf_screen_copy[s], NULL) ; p_surf_img[s] = p_surf_screen_copy[s] ; } /* Ok, we are now ready for the fade. These are the steps (looped): 1. Draw p_surf_img onto p_surf_screen, just an ordinary blit. 2. Decrease or increase (depends on fading in or out) the alpha value, based on the elapsed time since the previous loop-iteration. 3. Draw p_surf_black onto p_surf_screen in the current alpha value.*/ ui_old_time[s] = SDL_GetTicks () ; ui_curr_time[s] = ui_old_time[s] ; /* Convert the given time in seconds into miliseconds. */ ui_time_ms[s] = ui_seconds[s] * 1000 ; if (b_fade_out[s]) f_alpha[s] = 0.0 ; else f_alpha[s] = 255.0 ; fadeflag[s]=1; fadedelay[s]=SDL_GetTicks()+5; } void fadehandler(int s) { if (b_fade_out[s]){ /* Draw the image onto the screen */ SDL_BlitSurface (p_surf_img[s], NULL, p_surf_screen[s], NULL) ; /* Draw the black surface onto the screen */ SDL_SetAlpha (p_surf_black[s], SDL_SRCALPHA|SDL_RLEACCEL, (Uint8) f_alpha[s]) ; SDL_BlitSurface (p_surf_black[s], NULL, p_surf_screen[s], NULL) ; /* Update the timer variables */ ui_old_time[s] = ui_curr_time[s] ; ui_curr_time[s] = SDL_GetTicks(); /* Flip the screen Surface */ SDL_Flip (p_surf_screen[s]) ; /* Calculate the next alpha value */ f_alpha[s] += (255.0 * ((double) (ui_curr_time[s] - ui_old_time[s]) / ui_time_ms[s])) ; //printf("%f %d %d %d \n",f_alpha, ui_curr_time, ui_old_time, ui_time_ms); if (f_alpha[s] >= 255.0) fadeflag[s]=0; } else { /* Draw the image onto the screen */ SDL_BlitSurface (p_surf_img[s], NULL, p_surf_screen[s], NULL) ; /* Draw the black surface onto the screen */ SDL_SetAlpha (p_surf_black[s], SDL_SRCALPHA|SDL_RLEACCEL, (Uint8) f_alpha[s]) ; SDL_BlitSurface (p_surf_black[s], NULL, p_surf_screen[s], NULL) ; /* Update the timer variables */ ui_old_time[s] = ui_curr_time[s] ; ui_curr_time[s] = SDL_GetTicks() ; /* Flip the screen Surface */ SDL_Flip (p_surf_screen[s]) ; /* Calculate the next alpha value */ f_alpha[s] -= 255 * ((double) (ui_curr_time[s] - ui_old_time[s]) / ui_time_ms[s]) ; if (f_alpha[s] <= 0.0) fadeflag[s]=0; } if (fadeflag[s]==0){ /* Free the black Surface */ SDL_FreeSurface (p_surf_black[s]) ; /* Free the Screen copy, if used */ if (p_surf_screen_copy[s] != NULL) { SDL_FreeSurface (p_surf_screen_copy[s]) ; } } screenswap(); } //________________________________________________________________________________________________________________________________________ /* Cross-Fades the given surfaces onto the given screen within the given time If the image surface is the screen surface (pointer are equal), a copy is made first. We must do that because we are overwriting the Screen Surface. */ void crossfade (int s, SDL_Surface* in_p_surf_screen, SDL_Surface* in_p_surf_img1, SDL_Surface* in_p_surf_img2, Uint32 in_ui_seconds) { p_surf_screen[s]=in_p_surf_screen; p_surf_img1[s]=in_p_surf_img1; p_surf_img2[s]=in_p_surf_img2; ui_seconds[s]=in_ui_seconds; /* These are the steps to perform a cross-fade (looped): 1. Draw p_surf_img1 onto p_surf_screen, just an ordinary blit. 2. Increase the alpha value, based on the elapsed time since the previous loop-iteration. 3. Draw p_surf_img2 onto p_surf_screen in the current alpha value.*/ /* Convert the given time in seconds into miliseconds. */ ui_time_ms[s] = ui_seconds[s] * 1000 ; ui_old_time[s] = SDL_GetTicks () ; ui_curr_time[s] = ui_old_time[s] ; f_alpha[s] = 0.0 ; crossfadeflag[s]=1; fadedelay[s]=SDL_GetTicks()+5; } void crossfadehandler(int s) { /* Draw the image onto the screen */ SDL_BlitSurface (p_surf_img1[s], NULL, p_surf_screen[s], NULL) ; /* Draw the black surface onto the screen */ SDL_SetAlpha (p_surf_img2[s], SDL_SRCALPHA, (Uint8) f_alpha[s]) ; SDL_BlitSurface (p_surf_img2[s], NULL, p_surf_screen[s], NULL) ; /* Update the timer variables */ ui_old_time[s] = ui_curr_time[s]; ui_curr_time[s] = SDL_GetTicks(); /* Flip the screen Surface */ SDL_Flip (p_surf_screen[s]) ; /* Calculate the next alpha value */ f_alpha[s] += (255.0 * ((double) (ui_curr_time[s] - ui_old_time[s]) / ui_time_ms[s])) ; screenswap(); if (f_alpha[s] >=255.0) crossfadeflag[s]=0; } //________________________________________________________________________________________________________________________________________ // hit_pixelperfect(SDLbobfr[n],xa1,ya1,xa2,ya2,SDLbobfr[x],xb1,yb1,xb2,yb2) :rutine with graphic image precision collision int hit_pixelperfect(SDL_Surface *imga,int xa1,int ya1,int xa2,int ya2,SDL_Surface *imgb,int xb1,int yb1,int xb2,int yb2) { int xaa,yaa,xbb,ybb; int xw,yh; int x,y; int cc; xaa=0; xbb=0; if (xa1=0 && y>=0 && xw && yh){ p=(Uint8 *)surface->pixels + y * surface->pitch + x ; return *(Uint8 *)p; } else return 0; } Uint32 getpixel16(SDL_Surface *surface, int x, int y) { Uint8 *p; if (x>=0 && y>=0 && xw && yh){ p=(Uint8 *)surface->pixels + y * surface->pitch + x * 2; return *(Uint16 *)p; } else return 0; } Uint32 getpixel24BE(SDL_Surface *surface, int x, int y) { Uint8 *p; if (x>=0 && y>=0 && xw && yh){ p=(Uint8 *)surface->pixels + y * surface->pitch + x * 3; return p[0] << 16 | p[1] << 8 | p[2]; } else return 0; } Uint32 getpixel24(SDL_Surface *surface, int x, int y) { Uint8 *p; if (x>=0 && y>=0 && xw && yh){ p=(Uint8 *)surface->pixels + y * surface->pitch + x * 3; return p[0] | p[1] << 8 | p[2] << 16; } else return 0; } Uint32 getpixel32(SDL_Surface *surface, int x, int y) { Uint8 *p; if (x>=0 && y>=0 && xw && yh){ p=(Uint8 *)surface->pixels + y * surface->pitch + x * 4; return *(Uint32 *)p; } else return 0; } //________________________________________________________________________________________________________________________________________ /* * Set the pixel at (x, y) to the given value * NOTE: The surface must be locked before calling this! */ void putpixel8(SDL_Surface *surface, int x, int y, Uint32 col ) { Uint8 *p; if (x>=0 && y>=0 && xw && yh){ p=(Uint8 *)surface->pixels + (y * surface->pitch) + x ; *p= col; } } void putpixel16(SDL_Surface *surface, int x, int y, Uint32 col ) { Uint8 *p; if (x>=0 && y>=0 && xw && yh){ p=(Uint8 *)surface->pixels + (y * surface->pitch) + x * 2; *(Uint16 *)p=col; } } void putpixel24BE(SDL_Surface *surface, int x, int y, Uint32 col ) { Uint8 *p; if (x>=0 && y>=0 && xw && yh){ p=(Uint8 *) surface->pixels + (y * surface->pitch) + x * 3; p[0] = (col >> 16) & 0xff; p[1] = (col >> 8) & 0xff; p[2] = col & 0xff; } } void putpixel24(SDL_Surface *surface, int x, int y, Uint32 col ) { Uint8 *p; if (x>=0 && y>=0 && xw && yh){ p=(Uint8 *)surface->pixels + (y * surface->pitch) + x * 3; p[0] = col & 0xff; p[1] = (col >> 8) & 0xff; p[2] = (col >> 16) & 0xff; } } void putpixel32(SDL_Surface *surface, int x, int y, Uint32 col ) { Uint8 *p; if (x>=0 && y>=0 && xw && yh){ p=(Uint8 *)surface->pixels + (y * surface->pitch) + x * 4; *(Uint32 *)p=col; } } void putpixelDX(SDL_Surface *surface, int x, int y, Uint32 col ) { // rettangolo di un pixel di lato SDL_Rect d; d.x=x; d.y=y; d.w=1; d.h=1; SDL_FillRect (surface, &d, col); } //} //________________________________________________________________________________________________________________________________________ /* Draw a line to use with other function like rect) */ void draw_line(SDL_Surface * surface,int x1, int y1, int x2, int y2, Uint32 color) { // Draw a line WITHOUT REFRESH VIDEO (to use with other function like rect) static int c,x,y; double slope; int dx = x2 - x1; /* change in x */ int dy = y2 - y1; /* change in y */ slope = (double)dy / dx; if (abs(dx) >= abs(dy)) { /* draw left/right - right/left */ c = (x1 <= x2) ? 1 : -1; for (x = x1; x != x2 + c; x += c) { y = y1 + (int)( (x - x1) * slope + 0.5 ); putpixel(surface, x, y, color); } } else { /* draw top/bottom - bottom/top */ c = (y1 <= y2) ? 1 : -1; for (y = y1; y != y2 + c; y += c) { x = x1 + (int)( (y - y1) / slope + 0.5 ); putpixel(surface, x, y, color); } } } //________________________________________________________________________________________________________________________________________ /* draw empty rect */ void draw_box(SDL_Surface *surface,int x1,int y1,int x2,int y2,Uint32 color) { int i; for(i=x1;i<=x2;i++){putpixel(surface,i,y1,color);putpixel(surface,i,y2,color);} for(i=y1;i<=y2;i++){putpixel(surface,x1,i,color);putpixel(surface,x2,i,color);} } //________________________________________________________________________________________________________________________________________ /*draw empty circle */ void draw_circle(SDL_Surface *surface,int vx,int vy, int r,Uint32 color) { Sint16 x = 0; Sint16 y = r-1; /*radius zero == draw nothing*/ Sint16 d = 3 - 2*r; Sint16 diagonalInc = 10 - 4*r; Sint16 rightInc = 6; while (x <= y) { putpixel(surface,vx+x,vy+y,color); putpixel(surface,vx+x,vy-y,color); putpixel(surface,vx-x,vy+y,color); putpixel(surface,vx-x,vy-y,color); putpixel(surface,vx+y,vy+x,color); putpixel(surface,vx+y,vy-x,color); putpixel(surface,vx-y,vy+x,color); putpixel(surface,vx-y,vy-x,color); if (d >= 0) { d += diagonalInc; diagonalInc += 8; y -= 1; } else { d += rightInc; diagonalInc += 4; } rightInc += 4; x += 1; } } //________________________________________________________________________________________________________________________________________ /* draw fill circle */ void draw_fillcircle(SDL_Surface *surface,int vx,int vy, int r,Uint32 color) { Sint16 x = 0; Sint16 y = r-1; /*radius zero == draw nothing*/ Sint16 d = 3 - 2*r; Sint16 diagonalInc = 10 - 4*r; Sint16 rightInc = 6; while (x <= y) { draw_line(surface,vx+x,vy+y,vx-x,vy+y,color); draw_line(surface,vx+x,vy-y,vx-x,vy-y,color); draw_line(surface,vx+y,vy+x,vx-y,vy+x,color); draw_line(surface,vx+y,vy-x,vx-y,vy-x,color); if (d >= 0) { d += diagonalInc; diagonalInc += 8; y -= 1; } else { d += rightInc; diagonalInc += 4; } rightInc += 4; x += 1; } } //________________________________________________________________________________________________________________________________________ /* draw empty ellipse */ void draw_ellipse(SDL_Surface *surface,int vx,int vy,int Xradius,int Yradius,Uint32 color) { Sint32 x, y; Sint32 Xchange, Ychange; Sint32 EllipseError; Sint32 TwoASquare, TwoBSquare; Sint32 StoppingX, StoppingY; TwoASquare = 2*Xradius*Xradius; TwoBSquare = 2*Yradius*Yradius; /*1st set of points*/ x = Xradius-1; /*radius zero == draw nothing*/ y = 0; Xchange = Yradius*Yradius*(1-2*Xradius); Ychange = Xradius*Xradius; EllipseError = 0; StoppingX = TwoBSquare*Xradius; StoppingY = 0; /*Plot four ellipse points by iteration*/ while (StoppingX > StoppingY) { putpixel(surface,vx+x,vy+y,color); putpixel(surface,vx+x,vy-y,color); putpixel(surface,vx-x,vy+y,color); putpixel(surface,vx-x,vy-y,color); ++y; StoppingY += TwoASquare; EllipseError += Ychange; Ychange += TwoASquare; if (( 2*EllipseError + Xchange) > 0) { --x; StoppingX -= TwoBSquare; EllipseError += Xchange; Xchange += TwoBSquare; } }/*while*/ /*2nd set of points*/ x = 0; y = Yradius-1; /*radius zero == draw nothing*/ Xchange = Yradius*Yradius; Ychange = Xradius*Xradius*(1-2*Yradius); EllipseError = 0; StoppingX = 0; StoppingY = TwoASquare*Yradius; /*Plot four ellipse points by iteration*/ while (StoppingX < StoppingY) { putpixel(surface,vx+x,vy+y,color); putpixel(surface,vx+x,vy-y,color); putpixel(surface,vx-x,vy+y,color); putpixel(surface,vx-x,vy-y,color); ++x; StoppingX += TwoBSquare; EllipseError += Xchange; Xchange += TwoBSquare; if ((2*EllipseError + Ychange) > 0) { --y; StoppingY -= TwoASquare; EllipseError += Ychange; Ychange += TwoASquare; } } } //________________________________________________________________________________________________________________________________________ /* draw fill ellipse */ void draw_fillellipse(SDL_Surface *surface,int vx,int vy,int Xradius,int Yradius,Uint32 color) { Sint32 x, y; Sint32 Xchange, Ychange; Sint32 EllipseError; Sint32 TwoASquare, TwoBSquare; Sint32 StoppingX, StoppingY; TwoASquare = 2*Xradius*Xradius; TwoBSquare = 2*Yradius*Yradius; /*1st set of points*/ x = Xradius-1; /*radius zero == draw nothing*/ y = 0; Xchange = Yradius*Yradius*(1-2*Xradius); Ychange = Xradius*Xradius; EllipseError = 0; StoppingX = TwoBSquare*Xradius; StoppingY = 0; /*Plot four ellipse points by iteration*/ while (StoppingX > StoppingY) { draw_line(surface,vx+x,vy+y,vx-x,vy+y,color); draw_line(surface,vx+x,vy-y,vx-x,vy-y,color); ++y; StoppingY += TwoASquare; EllipseError += Ychange; Ychange += TwoASquare; if (( 2*EllipseError + Xchange) > 0) { --x; StoppingX -= TwoBSquare; EllipseError += Xchange; Xchange += TwoBSquare; } }/*while*/ /*2nd set of points*/ x = 0; y = Yradius-1; /*radius zero == draw nothing*/ Xchange = Yradius*Yradius; Ychange = Xradius*Xradius*(1-2*Yradius); EllipseError = 0; StoppingX = 0; StoppingY = TwoASquare*Yradius; /*Plot four ellipse points by iteration*/ while (StoppingX < StoppingY) { draw_line(surface,vx+x,vy+y,vx-x,vy+y,color); draw_line(surface,vx+x,vy-y,vx-x,vy-y,color); ++x; StoppingX += TwoBSquare; EllipseError += Xchange; Xchange += TwoBSquare; if ((2*EllipseError + Ychange) > 0) { --y; StoppingY -= TwoASquare; EllipseError += Ychange; Ychange += TwoASquare; } } } //________________________________________________________________________________________________________________________________________ // xrgb for internal use /* // this version was suggested from Paulo Silva still have problem of color in my machine Uint32 xrgb8(int colR,int colG,int colB) { return ((colR/43)*36) + ((colG/43)*6) + (colB/43); } //*/ //* Uint32 xrgb8(int colR,int colG,int colB) { if (enablePalette==2)return colB; else return (colB/64) + ((colG/64) * 8)+((colR/64)*8*8); } //*/ Uint32 xrgb16(int colR,int colG,int colB) { return (colB/8) + ((colG/8) * 64)+((colR/8)*64*32); } Uint32 xrgb24(int colR,int colG,int colB) { return colB + (colG * 256)+(colR*256*256); } Uint32 xrgb32(int colR,int colG,int colB) { return colB + (colG * 256)+(colR*256*256); } //________________________________________________________________________________________________________________________________________ // rrgb for internal use /* // this version was suggested from Paulo Silva still have problem of color in my machine Uint32 rrgb8(int col) { int colR,colG,colB; colB = (col & 6)*51; colG =((col / 6) & 6)*51 ; colR =((col / 36) & 6)*51; return colB + (colG * 256)+(colR*256*256); } //*/ //* Uint32 rrgb8(int col) { int colR,colG,colB; colB = (col & 3)*64; colG =((col / 8) & 3)*64 ; colR =((col / (8*8)) & 3)*64; if (enablePalette==2)return colB; else return colB + (colG * 256)+(colR*256*256); } //*/ Uint32 rrgb16(int col) { int colR,colG,colB; colB = (col & 31) *8; colG =((col/32) & 31) *8; colR =((col/(64*32)) & 31)*8; return colB + (colG * 256)+(colR*256*256); } Uint32 rrgb24(int col) { return col; } Uint32 rrgb32(int col) { return col; } //________________________________________________________________________________________________________________________________________ //createfont: make a monospace font and set at 0,0 the cursor coordinates for internal use int createfont() { int i; paper(0); pen(rgb(255,255,255)); for (i=0;ih; d.x=stx[c_screen]*XPRINT_SIZE; d.y=sty[c_screen]*(PRINT_SIZE+1); d.w=SDLfont_mono[n]->w; d.h=SDLfont_mono[n]->h; SDL_BlitSurface(SDLfont_mono[n], &s, SDLscreen[c_screen], &d ); } stx[c_screen]=stx[c_screen]+1; if (stx[c_screen]+1>(screenwidth()/XPRINT_SIZE)){ stx[c_screen]=0; sty[c_screen]=sty[c_screen]+1; } } if (sty[c_screen]+1>(screenheight()/(PRINT_SIZE+1))){ screenswap(); screencopy(c_screen,0,PRINT_SIZE,screenwidth(),screenheight()-(PRINT_SIZE+1),c_screen,0,0); ink(paper_color); bar(0,screenheight()-(PRINT_SIZE+1),screenwidth(),screenheight()); sty[c_screen]=sty[c_screen]-1; screenswap(); } SDLcol=oldc; return 0; } //________________________________________________________________________________________________________________________________________ /* make a cursor */ int createcursor() { int i; int old_pen; old_pen=pen(-1); for (i=0; i<16;i++) { pen(rgb(i*15,i*15,0)); SDL_FreeSurface(SDLcursore[i]); SDLcursore[i] =SDL_DisplayFormat( SDLfont_mono[95]); } pen(old_pen); return 0; } //________________________________________________________________________________________________________________________________________ /* this was my very old rutines for input used in 1995 on borland tc turbovision replacement project adapted on SDLengine */ void _input(char *instring,int x, int y,int displen) { #define k_delete 127 #define k_up 273 #define k_down 274 #define k_right 275 #define k_left 276 #define k_insert 277 #define k_home 278 #define k_end 279 #define k_pageup 280 #define k_pagedown 281 int i,n; int p,p1,pdisp; char provstring[255]; char dispstring[255]; int px; p=0; pdisp=0; strcpy(provstring,instring); p=strlen(provstring); provstring[p+1]=0; if ((p-pdisp)>displen)pdisp=p-displen; if ((p-pdisp)<0)pdisp=p; strncpy(dispstring, provstring+pdisp, displen); locate(x,y);fprints(dispstring); do{ while (inkey()!=0); n=0; while(n==0){ px=(p-pdisp);//*xdf; locate(x+px,y); n=inkey(); if (key(k_left)){ n=0; if(p>0){ p--; } while(key(k_left)); break; } //cleft if (key(k_right)){ n=0; if(p0){ for(i=p;i=p;p1--) provstring[p1+1]=provstring[p1]; provstring[p]=n; p++; } if ((p-pdisp)>displen)pdisp=p-displen; if ((p-pdisp)<0)pdisp=p; strncpy(dispstring,provstring+pdisp,displen); locate(x+strlen(dispstring),y); if(n==0)fprints(" "); if (n!=0 && stx[c_screen]==0 && sty[c_screen]+2>(screenheight()/(PRINT_SIZE)))y--; i=0; locate(x,y); fprints(dispstring); screenswap(); } while (n !=13); strcpy (instring,provstring); } //_______________________________________________________________________________________________________________________ usr/src/sdlBasic/src/sdlBrt/SDLengine/text_draw.c0000755000076500007660000001157110641267402017145 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_________________________________________________________________________________________________________________________ // TEXT DRAW //_________________________________________________________________________________________________________________________ //text(x,y,s,text) : print the text testo on current screen with s size int text ( int x, int y, int s, char *testo,int option) { SDL_Rect d; int w,h; SDL_Color bg; if (fileExist(fontPath)) font = TTF_OpenFont(fontPath,s); else font=NULL; if (font ==NULL) { error_description="SDLengine: Warning Can't open true type font "; error_type=1; SDLerr(stderr,"SDLengine: Warning Can't open true type font. %s\n",SDL_GetError()); return -1; } switch(option){ case 1: bg.b = paper_color & 255; bg.g =( paper_color / 256) & 255 ; bg.r =( paper_color / (256*256)) & 255; SDLtext = TTF_RenderUTF8_Shaded(font,testo,SDLcol,bg); break; case 2: SDLtext = TTF_RenderUTF8_Blended(font,testo,SDLcol); break; default: SDLtext = TTF_RenderUTF8_Blended(font,testo,SDLcol);//SOLID DOES NOT WORK NOW break; } TTF_SizeText(font, testo, &w, &h); d.x=x; d.y=y; d.w=w; d.h=h; SDL_BlitSurface(SDLtext, NULL, SDLscreen[c_screen], &d ); SDL_FreeSurface(SDLtext); TTF_CloseFont(font); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //setfont(path) : select the font int setfont(char *path) { if (fileExist(path)) { fontPath=path; } else { error_description="SDLengine error: file not found "; error_type=1; SDLerr(stderr,"SDLengine error: file not found. %s\n",SDL_GetError()); return -1; } return 0; } //_______________________________________________________________________________________________________________________ //getfont() : get the font selected char *getfont() { return fontPath; } //_______________________________________________________________________________________________________________________ //textrender(text,s,n) : make an image slot n with the text write with a current font and size s int textrender (char *testo,int s,int n, int option) { SDL_Color bg; int w,h; if (n==-1) n=getfreeimage(); if (n>NUM_IMAGES){ error_description="SDLengine error - textRender: image number exceed maximum image bank number "; error_type=1; SDLerr(stderr,"SDLengine error - textRender: image %d exceed maximum image bank number", n); return -1; } if (fileExist(fontPath)) font = TTF_OpenFont(fontPath,s); else font=NULL; if (font == NULL) { error_description="SDLengine error - textRender: Can't open true type font. Please verify installation"; error_type=1; SDLerr(stderr,"SDLengine error - textRender: Can't open true type font. Please verify installation %s\n",SDL_GetError()); return -1; } SDL_FreeSurface(SDLimage[n]); SDL_FreeSurface(SDLimageCC[n]); TTF_SizeText(font, testo, &w, &h); switch(option){ case 1: bg.b = paper_color & 255; bg.g =( paper_color / 256) & 255 ; bg.r =( paper_color / (256*256)) & 255; SDLimage[n] = TTF_RenderUTF8_Shaded(font,testo,SDLcol,bg); SDLimageCC[n] = TTF_RenderUTF8_Shaded(font,testo,SDLcol,bg); break; case 2: SDLimage[n] = TTF_RenderUTF8_Blended(font,testo,SDLcol); SDLimageCC[n] = TTF_RenderUTF8_Blended(font,testo,SDLcol); break; default: SDLimage[n] = TTF_RenderUTF8_Blended(font,testo,SDLcol);//SOLID DOES NOT WORK NOW SDLimageCC[n] = TTF_RenderUTF8_Blended(font,testo,SDLcol); break; } if (SDLimage[n] ==NULL || SDLimageCC[n] ==NULL){ error_description="SDLengine error - render failed"; error_type=1; SDLerr(stderr,"SDLengine error - RenderFailed: %s\n",SDL_GetError()); return -1; } TTF_CloseFont(font); if (autotimer()!=0)return -1; return n; } usr/src/sdlBasic/src/sdlBrt/SDLengine/bob_system.c0000777000076500007660000002177010463132110017305 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_________________________________________________________________________________________________________________________ //BOB SYSTEM //_________________________________________________________________________________________________________________________ //setbob(n,scr) : set bob n at logic screen scr int setbob(int n,int scr) { if (n>NUM_BOBS || n<0){ error_description="SDLengine error - setBob: invalid bob number "; error_type=1; SDLerr(stderr, "SDLengine error - setBob: invalid bob number"); return -1; } SDLbobscreen[n]=scr; if (autotimer()!=0)return -1; return 0; } //_________________________________________________________________________________________________________________________ //bob(n,x,y,fr) : set or move bob n at x,y with frame fr int bob(int n,int x,int y,int fr) { if (n>NUM_BOBS || n<0){ error_description="SDLengine error - bob: invalid bob number "; error_type=1; SDLerr(stderr, "SDLengine error - bob: invalid bob number"); return -1; } if (SDLimageCC[fr]!=NULL){ SDLboblive[n]=1; SDLbobx[n]=x-SDL_hsx[fr]; SDLboby[n]=y-SDL_hsy[fr]; SDLbobfr[n]=fr; } else { error_description="SDLengine error - bob: given image slot is empty "; error_type=1; SDLerr(stderr, "SDLengine error - bob: image slot %d is empty", fr); return -1; } if (SDLbobscreen[n]==-1)SDLbobscreen[n]=c_screen; if (SDLlastbob<=n)SDLlastbob=n+1; if (autotimer()!=0)return -1; return 0; } //__________________________________________________________________________________________________________________________ //deletebob(n) : unset bob n int deletebob(int n) { if (n>NUM_BOBS || n<0){ error_description="SDLengine error - deleteBob: invalid bob number "; error_type=1; SDLerr(stderr, "SDLengine error - deleteBob: %d is an invalid bob number", n); return -1; } SDLboblive[n]=0; //morto!! SDLbobx[n]=0; SDLboby[n]=0; SDLbobfr[n]=-1; if (SDLlastbob==n+1) while (SDLboblive[SDLlastbob-1]==0){ bobz(SDLlastbob-1,SDLlastbob-1); SDLlastbob--; } if (autotimer()!=0)return -1; return SDLboblive[n]; } //__________________________________________________________________________________________________________________________ //xbob(n) : return x of bob n int xbob(int n) { if (n>NUM_BOBS || n<0){ error_description="SDLengine error - bobX: invalid bob number "; error_type=1; SDLerr(stderr, "SDLengine error - bobX: %d is an invalid bob number", n); return -1; } if (autotimer()!=0)return -1; return SDLbobx[n]-SDL_hsx[SDLbobfr[n]]; } //_________________________________________________________________________________________________________________________ //ybob(n) : return y of bob n int ybob(int n) { if (n>NUM_BOBS || n<0){ error_description="SDLengine error - bobY: invalid bob number "; error_type=1; SDLerr(stderr, "SDLengine error - bobY: %d is an invalid bob number", n); return -1; } if (autotimer()!=0)return -1; return SDLboby[n]-SDL_hsy[SDLbobfr[n]]; } //_________________________________________________________________________________________________________________________ //bobwidth(n) : return width of bob n int bobwidth(int n) { if (n>NUM_BOBS || n<0){ error_description="SDLengine error - bobWidth: invalid bob number "; error_type=1; SDLerr(stderr, "SDLengine error - bobWidth: %d is an invalid bob number", n); return -1; } if (autotimer()!=0)return -1; if (SDLbobfr[n]!=-1) return SDLimageCC[SDLbobfr[n]]->w; return 0; } //_________________________________________________________________________________________________________________________ //bobheight(n) : return height of bob n int bobheight(int n) { if (n>NUM_BOBS || n<0){ error_description="SDLengine error - bobHeight: invalid bob number "; error_type=1; SDLerr(stderr, "SDLengine error - bobHeight: %d is an invalid bob number", n); return -1; } if (autotimer()!=0)return -1; if (SDLbobfr[n]!=-1) return SDLimageCC[SDLbobfr[n]]->h; return 0; } //_________________________________________________________________________________________________________________________ //frbob(n) : return the frame of bob n int frbob(int n) { if (n>NUM_BOBS || n<0){ error_description="SDLengine error - bobImage: invalid bob number "; error_type=1; SDLerr(stderr, "SDLengine error - bobImage: %d is an invalid bob number", n); return -1; } if (autotimer()!=0)return -1; return SDLbobfr[n]; } //_________________________________________________________________________________________________________________________ //livebob(n) : return 1 if bob n is "live" int livebob(int n) { if (n>NUM_BOBS || n<0){ error_description="SDLengine error - bobExist: invalid bob number "; error_type=1; SDLerr(stderr, "SDLengine error - bobExist: %d is an invalid bob number", n); return -1; } if (autotimer()!=0)return -1; return SDLboblive[n]; } //_________________________________________________________________________________________________________________________ //bobhit(n,x) : return 1 if bob n have a collision with bob x if x=-1 with any int bobhit(int n,int x) { int xa1,ya1,xa2,ya2; int xb1,yb1,xb2,yb2; int i,ret; if (n>NUM_BOBS || n<0){ error_description="SDLengine error - bobHit: invalid bob number "; error_type=1; SDLerr(stderr, "SDLengine error - bobHit: %d is an invalid bob number", n); return -1; } xa1=SDLbobx[n]; ya1=SDLboby[n]; xa2=xa1+bobwidth(n); ya2=ya1+bobheight(n); if (x!=-1){ if (x>NUM_BOBS || x<0){ error_description="SDLengine error - bobHit: invalid bob numberd as target "; error_type=1; SDLerr(stderr, "SDLengine error - bobHit: collision target bob %d is an invalid bob number", x); return -1; } if (SDLboblive[x]==1){ xb1=SDLbobx[x]; yb1=SDLboby[x]; xb2=xb1+bobwidth(x); yb2=yb1+bobheight(x); if (xb2SDLlastbob-1)z=SDLlastbob-1; oldz=-1; for(i=0;ioldz){ for(i=oldz;i<=z-1;i++) SDLbobz[i]=SDLbobz[i+1]; SDLbobz[z]=n; } else{ for(i=oldz;i>=z;i--) SDLbobz[i]=SDLbobz[i-1]; SDLbobz[z]=n; } } return 0; } //_________________________________________________________________________________________________________________________ //lastbob : return the last bob active int lastbob() { if (SDLlastbob!=0)return SDLlastbob-1; return SDLlastbob; } //_________________________________________________________________________________________________________________________ //autoupdatebob(m) : set/ unset automatic bobs update at screenswap int autoupdatebob(int m) { SDLupdatebob=m; if (autotimer()!=0)return -1; return SDLupdatebob; } //_________________________________________________________________________________________________________________________ //updatebob : manual bobs updates at next screenswap int updatebob() { SDLupdatebob=2; if (autotimer()!=0)return -1; return SDLupdatebob; } usr/src/sdlBasic/src/sdlBrt/SDLengine/compile.bat0000777000076500007660000000030410463132370017111 0ustar @echo off echo now compiling SDLengine: please wait rem WARNING!!! verify the correct path of mingGw set MINGWPATH=c:\devel\c-cpp\mingw path %MINGWPATH%\bin;%PATH% mingw32-make os=win32 usr/src/sdlBasic/src/sdlBrt/SDLengine/screen.c0000755000076500007660000010410110623656267016426 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_________________________________________________________________________________________________________________________ //SCREEN //_________________________________________________________________________________________________________________________ //setdefaults(w,h,bpp,0=screen|1=window |2=resizable) : open the display, perform initializations on cursor and fonts and sets default values on sprites, bobs and screens system. int setdefaults(int w,int h, int bpp, int mode) { setdisplay(w,h,bpp,mode); autoback(25); /* create and initialize print font */ createfont(); /* create and initialize print cursor */ createcursor(); autoupdatesprite(1); autoupdatebob(1); dualplayfield(0); mouseshow(); return 0; } //setdisplay(w,h,bpp,0=screen|1=window |2=resizable) : open the screen/window in double buffer. int setdisplay(int w,int h, int bpp, int mode) { #if defined(GP2X) #define SAFERES() setdisplay(320,240,0,1) #else #define SAFERES() setdisplay(640,480,0,1) #endif //GL_display=0; display_mode=mode; SDLnoAlphaChannel=0;//alpha enabled switch (mode){ case 0: /* Open the display device full screen */ SDLdisplay = SDL_SetVideoMode(w, h, bpp, SDL_HWSURFACE|SDL_FULLSCREEN|SDL_DOUBLEBUF|SDL_ANYFORMAT|SDL_HWPALETTE|SDL_SRCALPHA );//|SDL_ASYNCBLIT if ( SDLdisplay == NULL ) { display_mode=1; SAFERES(); autoback(25); error_description="SDLengine error - setDisplay: Can't set requested video mode "; error_type=1; SDLerr(stderr, "SDLengine error - setDisplay: Can't set video mode: %d ",mode); return -1; } #if defined(UNIX) || defined(__MORPHOS__) || defined(__amigaos4__) SDLnoAlphaChannel=0; #else SDLnoAlphaChannel=1; #endif break; case 1: /* Open the display device window */ SDLdisplay = SDL_SetVideoMode(w, h, bpp, SDL_HWSURFACE|SDL_DOUBLEBUF|SDL_ANYFORMAT|SDL_HWPALETTE|SDL_SRCALPHA);//|SDL_ASYNCBLIT SDL_WM_SetCaption("sdlBasic",NULL ); if ( SDLdisplay == NULL ) { display_mode=1; SAFERES(); autoback(25); error_description="SDLengine error - setDisplay: Can't set requested video mode "; error_type=1; SDLerr(stderr, "SDLengine error - setDisplay: Can't set video mode: %d ", mode); return -1; } break; case 2: /* Open the display device window */ SDLdisplay = SDL_SetVideoMode(w, h, bpp, SDL_HWSURFACE|SDL_RESIZABLE|SDL_DOUBLEBUF|SDL_ANYFORMAT|SDL_HWPALETTE|SDL_SRCALPHA);//|SDL_ASYNCBLIT SDL_WM_SetCaption("sdlBasic",NULL ); if ( SDLdisplay == NULL ) { display_mode=1; SAFERES(); autoback(25); error_description="SDLengine error - setDisplay: Can't set requested video mode "; error_type=1; SDLerr(stderr, "SDLengine error - setDisplay: Can't set video mode: %d ", mode); return -1; } break; case 3: /* Open the display device full screen software mode*/ SDLdisplay = SDL_SetVideoMode(w, h, bpp, SDL_FULLSCREEN|SDL_SRCALPHA);//|SDL_ASYNCBLIT if ( SDLdisplay == NULL ) { display_mode=1; SAFERES(); autoback(25); error_description="SDLengine error - setDisplay: Can't set requested video mode "; error_type=1; SDLerr(stderr, "SDLengine error - setDisplay: Can't set video mode: %d ",mode); return -1; } break; default: display_mode=1; error_description="SDLengine error - setDisplay: invalid video mode "; error_type=1; SDLerr(stderr, "SDLengine error - setDisplay: %d is not a valid video mode ",mode); return -1; break; } SDL_FillRect(SDLdisplay,NULL,0); switch (SDLdisplay->format->BytesPerPixel){ case 1: getpixel=getpixel8; putpixel=putpixel8; rrgb=rrgb8; enablePalette=0; break; case 2: getpixel=getpixel16; putpixel=putpixel16; rrgb=rrgb16; enablePalette=0; break; case 3: if(SDL_BYTEORDER == SDL_BIG_ENDIAN){ getpixel=getpixel24BE; putpixel=putpixel24BE; rrgb=rrgb24; } else{ getpixel=getpixel24; putpixel=putpixel24; rrgb=rrgb24; } enablePalette=0; break; case 4: getpixel=getpixel32; putpixel=putpixel32; rrgb=rrgb32; enablePalette=0; break; default: error_description="SDLengine error - setDisplay: specified video bpp is not valid "; error_type=1; SDLerr(stderr, "SDLengine error - setDisplay: %d is not a valid video bpp ",bpp); return -1; break; } SDLautobacktime=chrono()+400; screenopen(0,SDLdisplay->w,SDLdisplay->h,0,0,SDLdisplay->w,SDLdisplay->h,0); spriteclip(0,0,SDLdisplay->w,SDLdisplay->h); /* set the pointer */ if ( mode==0) changemouse(1); else changemouse(0); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //setalphachannel(v) : activate deactivate alpha channel trasparency int setalphachannel(int v) { SDLnoAlphaChannel=1-v; return SDLnoAlphaChannel; } //_______________________________________________________________________________________________________________________ //setcaption(title) : change the display window title int setcaption(char *title) { SDL_WM_SetCaption(title, title); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //caption() : return the display window title int caption(char **title) { char **icon; icon=NULL; SDL_WM_GetCaption(title,icon); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //displaymode() : return the display mode int displaymode() { return display_mode; } //_______________________________________________________________________________________________________________________ //displaywidth() : return the display width int displaywidth() { return SDLdisplay->w; } //_______________________________________________________________________________________________________________________ //displayheight() : return the display height int displayheight() { return SDLdisplay->h; } //_______________________________________________________________________________________________________________________ //display.bpp : return the display color depth int displaybpp() { return (SDLdisplay->format->BytesPerPixel * 8); } //_______________________________________________________________________________________________________________________ //screen n : set the logic screen n with n=-1 return the current screen int screen (int n) { if (n==-1)return c_screen; if (SDLscreen_live[n]!=0){ c_screen=n; } else{ error_description="SDLengine error - screen: screen does not exist "; error_type=1; SDLerr(stderr, "SDLengine error - screen: Screen %d does not exist ", n); return -1; } if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //screenz(n,z) : set the zorder position of screen if z =-1 report actual z position int screenz(int n,int z) { int i,oldz; if (z>SDLlastscreen-1)z=SDLlastscreen-1; oldz=-1; for(i=0;ioldz){ for(i=oldz;i<=z-1;i++) SDLscreen_z[i]=SDLscreen_z[i+1]; SDLscreen_z[z]=n; } else{ for(i=oldz;i>=z;i--) SDLscreen_z[i]=SDLscreen_z[i-1]; SDLscreen_z[z]=n; } } return 0; } //_______________________________________________________________________________________________________________________ //lastscreen : return the last screen open int lastscreen() { if (SDLlastscreen!=0)return SDLlastscreen-1; return SDLlastscreen; } //_______________________________________________________________________________________________________________________ // directscreen : direct drawing on display like a screen(more fast but sprite and offset does not works) int directscreen () { if (SDLscreen_live[0]==1){ SDL_FreeSurface(SDLscreen[0]); } SDLscreen[0]=SDLdisplay; SDLscreen_live[0]=-1; return 0; } //_______________________________________________________________________________________________________________________ //screenopen n,w,h,dx,dy,dw,dh,flag : open the logic screen n of dimension w,h in display coordinates dx,dy,dw,dh int screenopen (int n,int w,int h,int dx,int dy,int dw,int dh,int flag) { SDL_Surface *temp; int bpp; if (n<0 ||n>8){ error_description="SDLengine error - screenOpen: Invalid screen number. Valid screens range from 0 to 8 "; error_type=1; SDLerr(stderr, "SDLengine error - screenOpen: %d is an invalid screen number. Valid screens range from 0 to 8: ",n); return -1; } if (SDLscreen_live[n]!=0){ SDL_FreeSurface(SDLscreen[n]); SDLscreen_live[n]=0; } if (SDLscreen_live[n]==0){ temp = SDL_CreateRGBSurface(SDL_HWSURFACE, w, h,displaybpp(),0,0,0,0); if(temp == NULL) { error_description="SDLengine error - screenOpen: Internal error. CreateRGBSurface failed "; error_type=1; SDLerr(stderr, "SDLengine error - screenOpen: Internal error. CreateRGBSurface failed: %s ", SDL_GetError()); return -1; } if ( flag >1 ) { paper(0); SDL_FillRect(temp,NULL,0); if (SDL_MUSTLOCK(temp)) SDL_LockSurface(temp); bpp = temp->format->BytesPerPixel; switch(bpp) { case 1: SDL_SetColorKey(temp, (SDL_SRCCOLORKEY),*(Uint8 *)temp->pixels);//|SDL_RLEACCEL break; case 2: SDL_SetColorKey(temp, (SDL_SRCCOLORKEY),*(Uint16 *)temp->pixels);//|SDL_RLEACCEL break; case 3: SDL_SetColorKey(temp, (SDL_SRCCOLORKEY),*(Uint32 *)temp->pixels);//|SDL_RLEACCEL break; case 4: SDL_SetColorKey(temp, (SDL_SRCCOLORKEY),*(Uint32 *)temp->pixels);//|SDL_RLEACCEL break; } if (SDL_MUSTLOCK(temp)) SDL_UnlockSurface(temp); } SDLscreen[n]=SDL_DisplayFormat(temp); SDL_FreeSurface(temp); //SDLscreen[n]=temp; SDLoffx[n]=0; SDLoffy[n]=0; if (dw>w)dw=w; if (dh>h)dh=h; SDLscreen_rect[n].x=dx; SDLscreen_rect[n].y=dy; SDLscreen_rect[n].w=dw; SDLscreen_rect[n].h=dh; if (SDLoffx[c_screen]<0) SDLoffx[c_screen]=0; if (SDLoffx[c_screen]+SDLscreen_rect[c_screen].w >SDLscreen[c_screen]->w) SDLoffx[c_screen]=SDLscreen[c_screen]->w - SDLscreen_rect[c_screen].w; if (SDLoffy[c_screen]<0) SDLoffy[c_screen]=0; if (SDLoffy[c_screen]+SDLscreen_rect[c_screen].h >SDLscreen[c_screen]->h) SDLoffy[c_screen]=SDLscreen[c_screen]->h - SDLscreen_rect[c_screen].h; SDLscreen_flag[n]=flag; SDLscreen_live[n]=1; //printf("screenopen n=%d dx=%d dy=%d dw=%d dh=%d\n",n,dx,dy,dw,dh); SDL_FillRect(SDLscreen[n],NULL,0); screen(n); if (SDLlastscreen<=n)SDLlastscreen=n+1; if (SDLlastscreen>8)SDLlastscreen=8; if (autotimer()!=0)return -1; return 0; } else{ error_description="SDLengine error: specified screen is yet opened "; error_type=1; SDLerr(stderr, "SDLengine error: Screen %d is yet opened ", n); return -1; } } //_______________________________________________________________________________________________________________________ //screenclose n : close the logic screen n int screenclose (int n) { int i; if(c_screen==n){ cursoff(); for(i=7;i>=0;i--){ if(SDLscreen_live[i]!=0 &&n!=i){ c_screen=i; break; } } } if (c_screen!=n){ if (SDLscreen[n]!=NULL){ SDL_FreeSurface(SDLscreen[n]); SDLscreen_live[n]=0; return 0; } else{ error_description="SDLengine error - screenClose: screen not yet opened "; error_type=1; SDLerr(stderr, "SDLengine error - screenClose: screen %d not yet opened ", n); return -1; } } else { error_description="SDLengine error - screenClose: can't close screen, surface in use "; error_type=1; SDLerr(stderr, "SDLengine error - screenClose: can't close screen %d, surface in use ", n); return -1; } i=SDLlastscreen; while(SDLscreen_live[i]==0){ i--; screenz(i,i); } SDLlastscreen=i+1; if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //screenclone n,s,x,y,w,h,flag : create a new viewport in logic screen s int screenclone(int n,int s,int x,int y,int w,int h,int flag) { if (SDLscreen[s]!=NULL){ SDLscreen[n]= SDLscreen[s]; SDLoffx[n]=0; SDLoffy[n]=0; SDLscreen_rect[n].x=x; SDLscreen_rect[n].y=y; SDLscreen_rect[n].w=w; SDLscreen_rect[n].h=h; SDLscreen_flag[n]=flag; SDLscreen_live[n]=1; screen(n); if(SDLlastscreen<=n)SDLlastscreen=n+1; return 0; }else{ error_description="SDLengine error - screenClone: screen not yet opened "; error_type=1; SDLerr(stderr, "SDLengine error - screenClone: screen %d not yet opened ", s); return -1; } } //_______________________________________________________________________________________________________________________ //screencopy(n,x,y,w,h,nd,xd,yd) : copy a portion of screen n in a screen nd int screencopy(int n,int x,int y,int w,int h,int nd,int xd,int yd) { SDL_Rect s; SDL_Rect d; s.x=x; s.y=y; s.w=w; s.h=h; d.x=xd; d.y=yd; d.w=w; d.h=h; if (SDLscreen[n]!=NULL && SDLscreen[nd]!=NULL){ SDL_BlitSurface( SDLscreen[n], &s ,SDLscreen[nd], &d); } else { if (SDLscreen[n]==NULL){ error_description="SDLengine error - screenCopy: source screen does not exist "; error_type=1; SDLerr(stderr, "SDLengine error - screenCopy: source screen %d does not exist ", n); return -1; }else{ error_description="SDLengine error - screenCopy: destination screen does not exist "; error_type=1; SDLerr(stderr, "SDLengine error - screenCopy: destination screen %d does not exist ", nd); return -1; } } if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //screenfade(n,t) : fade the screen n in t time int screenfade(int n,int t) { if (autotimer()!=0)return -1; if(t==-1)return fadeflag[n]; if (SDLscreen[n]!=NULL){ fade(n,SDLscreen[n],SDLscreen[n],t,1); return 0; } else{ error_description="SDLengine error - screenFadeOut: specified screen does not exist "; error_type=1; SDLerr(stderr, "SDLengine error - screenFadeOut: Screen %d does not exist", n); return -1; } } //_______________________________________________________________________________________________________________________ //screenfadein(n,i,t) : fade the screen n to image i in t time int screenfadein(int n,int i,int t) { if (autotimer()!=0)return -1; if(t==-1)return fadeflag[n]; if(imageexists(i)==0){ error_description="SDLengine error - screenFadeIn: specified image slot is empty "; error_type=1; SDLerr(stderr, "SDLengine error - screenFadeIn: image slot %d is empty", i); return -1; } if (SDLscreen[n]!=NULL){ fade(n,SDLscreen[n],SDLimage[i],t,0); return 0; } else{ error_description="SDLengine error - screenFadeIn: specified screen does not exist "; error_type=1; SDLerr(stderr, "SDLengine error - screenFadeIn: screen %d does not exist", n); return -1; } } //_______________________________________________________________________________________________________________________ //screencrossfade(n,i,t) : fade the screen n from current screen to image i in t time int screencrossfade(int n,int i,int t) { SDL_Surface *tmp; if (autotimer()!=0)return -1; if(t==-1)return crossfadeflag[n]; if(imageexists(i)==0){ error_description="SDLengine error - screenCrossFade: specified image slot is empty "; error_type=1; SDLerr(stderr, "SDLengine error - screenCrossFade: image slot %d is empty", i); return -1; } if(t==0 || t<-1){ error_description="SDLengine error - screenCrossFade: invalid fade duration value"; error_type=1; SDLerr(stderr, "SDLengine error - screenCrossFade: %d is not a valid fade duration value", t); return -1; } if (SDLscreen[n]!=NULL){ tmp=SDL_DisplayFormat(SDLscreen[n]); crossfade(n,SDLscreen[n],tmp,SDLimage[i],t); return 0; } else{ error_description="SDLengine error - screenCrossFade: specified screen does not exist "; error_type=1; SDLerr(stderr, "SDLengine error - screenCrossFade: screen %d does not exist", n); return -1; } } //_______________________________________________________________________________________________________________________ //screenalpha(n,a) : set alpha(trasparency) of screen n int screenalpha(int n,int a) { if ( SDLscreen[n] != NULL ) { SDL_SetAlpha (SDLscreen[n], SDL_SRCALPHA, a); if (autotimer()!=0)return -1; return 0; } else { error_description="SDLengine error - screenAlpha: specified screen does not exist "; error_type=1; SDLerr(stderr,"SDLengine error - screenAlpha: screen %d does not exist ", n); return -1; } } //_______________________________________________________________________________________________________________________ //screenlock(n) : lock the screen n for direct graphics access int screenlock(int n) { if (SDL_MUSTLOCK(SDLscreen[n])) SDL_LockSurface(SDLscreen[n]); return 0; } //_______________________________________________________________________________________________________________________ //screenunlock(n) : unlock the screen n for direct graphics access int screenunlock(int n) { if (SDL_MUSTLOCK(SDLscreen[n])) SDL_UnlockSurface(SDLscreen[n]); return 0; } //_______________________________________________________________________________________________________________________ //screenrect(x,y,w,h,flag) : change the display output coordinates of the current screen int screenrect (int x,int y,int w,int h,int flag) { SDLscreen_rect[c_screen].x=x; SDLscreen_rect[c_screen].y=y; SDLscreen_rect[c_screen].w=w; SDLscreen_rect[c_screen].h=h; SDLscreen_flag[c_screen]=flag; if (SDLoffx[c_screen]<0) SDLoffx[c_screen]=0; if (SDLoffx[c_screen]+SDLscreen_rect[c_screen].w >SDLscreen[c_screen]->w) SDLoffx[c_screen]=SDLscreen[c_screen]->w - SDLscreen_rect[c_screen].w; if (SDLoffy[c_screen]<0) SDLoffy[c_screen]=0; if (SDLoffy[c_screen]+SDLscreen_rect[c_screen].h >SDLscreen[c_screen]->h) SDLoffy[c_screen]=SDLscreen[c_screen]->h - SDLscreen_rect[c_screen].h; if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //xscreenrect : return the x coordinate of current screen viewport int xscreenrect() { return SDLscreen_rect[c_screen].x; } //_______________________________________________________________________________________________________________________ //yscreenrect : return the y coordinate of current screen viewport int yscreenrect() { return SDLscreen_rect[c_screen].y; } //_______________________________________________________________________________________________________________________ //wscreenrect : return the w value of current screen viewport int wscreenrect() { return SDLscreen_rect[c_screen].w; } //_______________________________________________________________________________________________________________________ //hscreenrect : return the h value of current screen viewport int hscreenrect() { return SDLscreen_rect[c_screen].h; } //_______________________________________________________________________________________________________________________ //flagscreenrect : return the flag value of current screen viewport int flagscreenrect() { return SDLscreen_flag[c_screen]; } //_______________________________________________________________________________________________________________________ //screenwidth : return the current screen width int screenwidth() { return SDLscreen[c_screen]->w; } //_______________________________________________________________________________________________________________________ //screenheight : return the current screen height int screenheight() { return SDLscreen[c_screen]->h; } //_______________________________________________________________________________________________________________________ //offset(x,y) : set the logical current screen position int offset(int x,int y) { SDLoffx[c_screen]=x; SDLoffy[c_screen]=y; if (SDLoffx[c_screen]<0) SDLoffx[c_screen]=0; if (SDLoffx[c_screen]+SDLscreen_rect[c_screen].w >SDLscreen[c_screen]->w) SDLoffx[c_screen]=SDLscreen[c_screen]->w - SDLscreen_rect[c_screen].w; if (SDLoffy[c_screen]<0) SDLoffy[c_screen]=0; if (SDLoffy[c_screen]+SDLscreen_rect[c_screen].h >SDLscreen[c_screen]->h) SDLoffy[c_screen]=SDLscreen[c_screen]->h - SDLscreen_rect[c_screen].h; if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //xoffset : return the x coordinate offset in current screen int xoffset() { return SDLoffx[c_screen]; } //_______________________________________________________________________________________________________________________ //yoffset : return the y coordinate offset in current screen int yoffset() { return SDLoffy[c_screen]; } //_______________________________________________________________________________________________________________________ //cls : clear the current logic screen int cls() { int r,g,b; b = paper_color & 255; g =( paper_color / 256) & 255 ; r =( paper_color / (256*256)) & 255; stx[c_screen]=0; sty[c_screen]=0; SDL_FillRect(SDLscreen[c_screen],NULL,(Uint32)SDL_MapRGB(SDLdisplay->format,r,g,b)); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //screenswap : update display,bobsystem,spritesystem int screenswap() { SDL_Rect d; SDL_Rect s; int i,iz; getevent(); if (stopkey()==-1)return -1; /* the negative mode of screenswap (autoback(-15))*/ if (SDLautoback<0){ while (chrono()0 && mousestate!=0) sprite(0,xmouse(),ymouse(),0); /* update the textprint cursor system */ /* states of textprint cursor system: 0:disable 1:on enable 2:enable 3:on desable (will be change) */ for(i=0;i0) { if (cursore_state[i]==1){ SDLcursore_preserve[i] = SDL_CreateRGBSurface(SDL_HWSURFACE|SDL_HWACCEL, XPRINT_SIZE,PRINT_SIZE*2,32,0,0,0,0); if(SDLcursore_preserve[i] == NULL) { error_description="SDLengine error: CreateRGBSurface failed "; error_type=1; SDLerr(stderr, "SDLengine error: CreateRGBSurface failed: %s\n", SDL_GetError()); return -1; } cursore_state[i]=2; } if (cursore_state[i]>2){ SDL_FreeSurface(SDLcursore_preserve[i]); cursore_state[i]=0; } if(cursore_state[i]==2) { oldstx[i]=stx[i]; oldsty[i]=sty[i]; //print the textprint cursor and update the frame animation d.x=oldstx[i]*XPRINT_SIZE; d.y=oldsty[i]*(PRINT_SIZE+1); d.w=XPRINT_SIZE; d.h=PRINT_SIZE*2; s.x=0; s.y=0; s.w= XPRINT_SIZE; s.h= PRINT_SIZE*2; //preserve cursor background in cursor 0 anim SDL_BlitSurface( SDLscreen[i], &d, SDLcursore_preserve[i], NULL); SDL_BlitSurface(SDLcursore[cursore_anim[i]], NULL, SDLscreen[i], &d ); cursore_anim[i]++; if (cursore_anim[i]>14)cursore_anim[i]=0; } } } /***************************/ /* update the bob system */ if (SDLupdatebob!=0){ //take the background for (iz=0;izw; d.h=SDLimageCC[SDLbobfr[i]]->h; s.x=0; s.y=0; s.w= d.w; s.h= d.h; SDLbobback[i] = SDL_CreateRGBSurface(SDL_HWSURFACE|SDL_HWACCEL, s.w, s.h,32,0,0,0,0); if(SDLbobback[i] == NULL) { error_description="SDLengine error: CreateRGBSurface failed "; error_type=1; SDLerr(stderr, "SDLengine error: CreateRGBSurface failed: %s\n", SDL_GetError()); return -1; } //SDLbobback[i]=SDL_DisplayFormat(SDLbobback[i]); } if (SDLimageCC[SDLbobfr[i]]->w !=SDLbobback[i]->w || SDLimageCC[SDLbobfr[i]]->h !=SDLbobback[i]->h){ SDL_FreeSurface(SDLbobback[i]); d.x=SDLbobxold[i]; d.y=SDLbobyold[i]; d.w=SDLimageCC[SDLbobfr[i]]->w; d.h=SDLimageCC[SDLbobfr[i]]->h; s.x=0; s.y=0; s.w= d.w; s.h= d.h; SDLbobback[i] = SDL_CreateRGBSurface(SDL_HWSURFACE|SDL_HWACCEL, s.w, s.h,32,0,0,0,0); if(SDLbobback[i] == NULL) { error_description="SDLengine error: CreateRGBSurface failed "; error_type=1; SDLerr(stderr, "SDLengine error: CreateRGBSurface failed: %s\n", SDL_GetError()); return -1; } //SDLbobback[i]=SDL_DisplayFormat(SDLbobback[i]); } SDLbobxold[i]=SDLbobx[i]; SDLbobyold[i]=SDLboby[i]; d.x=SDLbobxold[i]; d.y=SDLbobyold[i]; d.w=SDLimageCC[SDLbobfr[i]]->w; d.h=SDLimageCC[SDLbobfr[i]]->h; s.x=0; s.y=0; s.w= d.w; s.h= d.h; d.x=SDLbobxold[i]; d.y=SDLbobyold[i]; SDL_BlitSurface(SDLscreen[SDLbobscreen[i]], &d, SDLbobback[i], &s ); }//end if }//end for //paste the bob for (iz=0;izw; d.h=SDLimageCC[SDLbobfr[i]]->h; s.x=0; s.y=0; s.w= d.w; s.h= d.h; if (SDLimageCC[SDLbobfr[i]]!=NULL){ SDL_BlitSurface(SDLimageCC[SDLbobfr[i]], &s, SDLscreen[SDLbobscreen[i]], &d ); } else { error_description="SDLengine error: bob image does not exist "; error_type=1; SDLerr(stderr, "SDLengine error: bob image does not exist"); return -1; }//end if }//end if }//end for }//end if /***********************/ /* update the display system under sprites*/ for (iz=0;izw,(SDLspriteclip.w+SDLspriteclip.x-d.x)); d.h=MIN(SDLimageCC[SDLspritefr[i]]->h,(SDLspriteclip.h+SDLspriteclip.y- d.y)); if (d.x 0) { if (cursore_state[8]==1){ SDLcursore_preserve[8] = SDL_CreateRGBSurface(SDL_HWSURFACE|SDL_HWACCEL, XPRINT_SIZE,PRINT_SIZE*2,32,0,0,0,0); if(SDLcursore_preserve[8] == NULL) { error_description="SDLengine error: CreateRGBSurface failed "; error_type=1; SDLerr(stderr, "SDLengine error: CreateRGBSurface failed: %s\n", SDL_GetError()); return -1; } cursore_state[8]=2; } if (cursore_state[8]>2){ SDL_FreeSurface(SDLcursore_preserve[8]); cursore_state[8]=0; } if(cursore_state[8]==2) { oldstx[8]=stx[8]; oldsty[8]=sty[8]; //print the textprint cursor and update the frame animation d.x=oldstx[8]* XPRINT_SIZE; d.y=oldsty[8]* PRINT_SIZE; d.w=XPRINT_SIZE; d.h=PRINT_SIZE*2; s.x=0; s.y=0; s.w= XPRINT_SIZE; s.h= PRINT_SIZE*2; //preserve cursor background in cursor 0 anim SDL_BlitSurface( SDLscreen[8], &d, SDLcursore_preserve[8], &s); SDL_BlitSurface(SDLcursore[cursore_anim[8]], &s, SDLscreen[8], &d ); cursore_anim[8]++; if (cursore_anim[8]>14)cursore_anim[8]=0; } } s.x=SDLoffx[8]; s.y=SDLoffy[8]; s.w=SDLscreen_rect[8].w; s.h=SDLscreen_rect[8].h; SDL_BlitSurface(SDLscreen[8],&s,SDLdisplay,&SDLscreen_rect[8]); } /* fps system */ if(SDLfps_flag!=0){ if (SDLfps_time < SDL_GetTicks()){ SDLfps=SDLfps_count; SDLfps_count=0; SDLfps_time=SDL_GetTicks()+1000; } else SDLfps_count++; } /* update sprite 0 alias the mouse pointer */ if (SDLspritelive[0]==1){ d.x=SDLspritex[0]; d.y=SDLspritey[0]; d.w=MIN(SDLimageCC[SDLspritefr[0]]->w,(SDLspriteclip.w+SDLspriteclip.x-d.x)); d.h=MIN(SDLimageCC[SDLspritefr[0]]->h,(SDLspriteclip.h+SDLspriteclip.y- d.y)); if (d.x w; d.h=SDLbobback[i]->h; s.x=0; s.y=0; s.w= d.w; s.h= d.h; SDL_BlitSurface(SDLbobback[i], &s, SDLscreen[SDLbobscreen[i]], &d ); } } else{ if (SDLbobback[i]!=NULL){ d.x=SDLbobxold[i]; d.y=SDLbobyold[i]; d.w=SDLbobback[i]->w; d.h=SDLbobback[i]->h; s.x=0; s.y=0; s.w= d.w; s.h= d.h; SDL_BlitSurface(SDLbobback[i], &s, SDLscreen[SDLbobscreen[i]], &d ); SDL_FreeSurface(SDLbobback[i]); SDLbobback[i]=NULL; SDLbobscreen[i]=-1; } } }//end for }//endif vbl=0; } for(i=0;i<=SDLlastscreen;i++){ if(cursore_state[i]==2) { //print the textprint cursor 0 d.x=(oldstx[i]*XPRINT_SIZE); d.y=oldsty[i]*(PRINT_SIZE+1); d.w=XPRINT_SIZE; d.h=PRINT_SIZE; s.x=0; s.y=0; s.w= XPRINT_SIZE; s.h= PRINT_SIZE*2; SDL_BlitSurface(SDLcursore_preserve[i], &s, SDLscreen[i], &d ); //SDL_FillRect( SDLcursore_preserve[i],NULL,colorkey); //SDL_BlitSurface(SDLcursore[0], &s, SDLscreen[i], &d ); } } /* cursore debug screen */ if(cursore_state[8]==2) { //print the textprint cursor 0 d.x=oldstx[8]*XPRINT_SIZE; d.y=oldsty[8]*(PRINT_SIZE+1); d.w=XPRINT_SIZE; d.h=PRINT_SIZE*2; s.x=0; s.y=0; s.w= XPRINT_SIZE; s.h= PRINT_SIZE*2; SDL_BlitSurface(SDLcursore_preserve[8], &s, SDLscreen[8], &d ); //SDL_FillRect( SDLcursore_preserve[i],NULL,0); //SDL_BlitSurface(SDLcursore[0], &s, SDLscreen[i], &d ); } return 0; } //_______________________________________________________________________________________________________________________ //autoback(m) : enable / disable automatic screenswap m=0 disable m>0 wait m milliseconds and perform screenswap m<0 perform the invocate in code screenswap after m milliseconds int autoback( int m) { if (m!=-1){ SDLautoback=m; if (m>0) SDLautobacktime=chrono()+m; } return SDLautoback; } //_______________________________________________________________________________________________________________________ //dualplayfield(m) : set/unset automatic update of a screen upper sprite -1 return state int dualplayfield(int m) { if (m!=-1){ SDLdualplayfield=m; if (autotimer()!=0)return -1; return 0; } else return SDLdualplayfield; } //_______________________________________________________________________________________________________________________ //waitvbl : wait automatic screenswap int waitvbl() { if (autoback(-1)>0){ vbl=1; while(vbl!=0)if (autotimer()!=0)return -1; } return 0; } //_______________________________________________________________________________________________________________________ //fps(n) : set/unset or return (with -1) the current frame rate counter (0/1/-1) int fps(int n) { if (n==-1) return SDLfps; else{ SDLfps_flag=n; SDLfps_count=0; SDLfps=0; SDLfps_time=SDL_GetTicks()+1000; } return 0; } usr/src/sdlBasic/src/sdlBrt/SDLengine/keyboard.c0000777000076500007660000000457510463132214016750 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_________________________________________________________________________________________________________________________ // KEYBOARD //_________________________________________________________________________________________________________________________ //key(keycode) : return 1 if is press the key keycode int key (int keycode) { Uint8 *keystate; if (keycode<1 ||keycode>512){ error_description="SDLengine error - key: invalid keycode value "; error_type=1; SDLerr(stderr, "SDLengine error- key: %d is an invalid keycode value", keycode); return -1; } if (autotimer()!=0)return -1; getevent(); keystate = SDL_GetKeyState(NULL); if (keystate[keycode])return 1; return 0; } //_______________________________________________________________________________________________________________________ //inkey : return ascii code of key press int inkey() { if (autotimer()!=0)return -1; getevent(); return lastkey; } //_______________________________________________________________________________________________________________________ //waitkey(keycode) : wait a key pression (-1 =any key) int waitkey(int keycode) { if (keycode==0) while(inkey()==0){ if (autotimer()!=0)return -1; } else while(inkey()!=keycode){ if (autotimer()!=0)return -1; } return 0; } usr/src/sdlBasic/src/sdlBrt/SDLengine/mouse.c0000777000076500007660000001732410463132214016274 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_______________________________________________________________________________________________________________________ // MOUSE //_________________________________________________________________________________________________________________________ //xmouse : return mouse x coordinate on display int xmouse() { int x,y; SDL_GetMouseState(&x, &y); if (autotimer()!=0)return -1; return x; } //_______________________________________________________________________________________________________________________ //ymouse : return mouse y coordinate on display int ymouse() { int x,y; SDL_GetMouseState(&x, &y); if (autotimer()!=0)return -1; return y; } //_______________________________________________________________________________________________________________________ //xmousescreen(n) : return mouse x coordinate on screen int xmousescreen(int n) { int x,y; SDL_GetMouseState(&x, &y); if (autotimer()!=0)return -1; return x+SDLoffx[n]-SDLscreen_rect[n].x; } //_______________________________________________________________________________________________________________________ //ymousescreen(n) : return mouse y coordinate on screen int ymousescreen(int n) { int x,y; SDL_GetMouseState(&x, &y); if (autotimer()!=0)return -1; return y+SDLoffy[n]-SDLscreen_rect[n].y; } //_______________________________________________________________________________________________________________________ //bmouse : return the buttonclick on the mouse int bmouse() { if (autotimer()!=0)return -1; if(SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(1))return 1; if(SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(2))return 2; if(SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(3))return 3; if(SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(4))return 4; if(SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(5))return 5; return 0; } //_______________________________________________________________________________________________________________________ //changemouse(n) : change mouse from default(0) to emulate with sprite 0 - image 0 (1,2,3) int changemouse(int n) { SDL_Surface *temp; SDL_Color tmpcol; int tempback,tempcc; if (n==-1)return mousepointer; tempback=autoback(-1); tempcc=colorkey; colorkey=0; autoback(0); switch(n){ case 1: SDL_ShowCursor(SDL_DISABLE ); if(mousestate==1){ if (SDLimageCC[0]!=NULL)SDL_FreeSurface(SDLimageCC[0]); SDLimageCC[0]=SDL_DisplayFormat(SDL_CreateRGBSurface(SDL_HWSURFACE, 32, 32,32,0,0,0,0)); /* big hack: how to change an image in screen!!! */ temp=SDLscreen[c_screen]; SDLscreen[c_screen]=SDLimageCC[0]; tmpcol=SDLcol; SDL_FillRect(SDLscreen[c_screen],NULL,0); ink(0xEEAA00); line(0,0,7,0);line(0,0,0,6);line(8,1,8,2);line(1,7,2,7); line(3,6,9,12);line(7,3,13,9);line(13,10,11,12); dot(10,12); ink(0xCC6600); line(1,1,11,11);paint(4,1); ink(0xEECC88); paint(1,4); SDL_hsx[0]=1;SDL_hsy[0]=1; /*resume hack */ SDLscreen[c_screen]=temp; if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_LockSurface(SDLscreen[c_screen]); Image_colorkey(SDLimageCC[0]); if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_UnlockSurface(SDLscreen[c_screen]); SDLcol=tmpcol; } mousepointer=1; break; case 2: SDL_ShowCursor(SDL_DISABLE ); if(mousestate==1){ if (SDLimageCC[0]!=NULL)SDL_FreeSurface(SDLimageCC[0]); SDLimageCC[0]=SDL_DisplayFormat(SDL_CreateRGBSurface(SDL_HWSURFACE, 32, 32,32,0,0,0,0)); /* big hack: how to change an image in screen!!! */ temp=SDLscreen[c_screen]; SDLscreen[c_screen]=SDLimageCC[0]; tmpcol=SDLcol; SDL_FillRect(SDLscreen[c_screen],NULL,0); ink(0xEECC88); line(7,0,7,3);line(7,11,7,14);line(0,7,3,7);line(11,7,14,7); ink(0xCC6600); dot(7,1);dot(7,3);dot(7,11);dot(7,13);dot(1,7);dot(3,7);dot(11,7);dot(13,7); ink(0xEEAA00); dot(6,6);dot(6,8);dot(8,6);dot(8,8); SDL_hsx[0]=7;SDL_hsy[0]=7; /*resume hack */ SDLscreen[c_screen]=temp; if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_LockSurface(SDLscreen[c_screen]); Image_colorkey(SDLimageCC[0]); if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_UnlockSurface(SDLscreen[c_screen]); SDLcol=tmpcol; } mousepointer=2; break; case 3: SDL_ShowCursor(SDL_DISABLE ); if(mousestate==1){ if (SDLimageCC[0]!=NULL)SDL_FreeSurface(SDLimageCC[0]); SDLimageCC[0]=SDL_DisplayFormat(SDL_CreateRGBSurface(SDL_HWSURFACE, 32, 32,32,0,0,0,0)); /* big hack: how to change an image in screen!!! */ temp=SDLscreen[c_screen]; SDLscreen[c_screen]=SDLimageCC[0]; tmpcol=SDLcol; SDL_FillRect(SDLscreen[c_screen],NULL,0); ink(0xCC6600); bar(0,2,1,14);bar(13,2,14,14);bar(1,1,4,7);bar(10,1,13,7); bar(3,0,11,6); ink(0xEEAA00); bar(3,2,11,4);bar(4,1,10,5);bar(5,0,9,6);line(5,11,7,6); ink(0xEECC88); bar(4,2,10,4);bar(5,1,9,5);bar(3,12,5,13);line(0,15,14,15); ink(0xCC6600); line(7,1,7,3);line(8,3,9,4); SDL_hsx[0]=7;SDL_hsy[0]=7; /*resume hack */ SDLscreen[c_screen]=temp; if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_LockSurface(SDLscreen[c_screen]); Image_colorkey(SDLimageCC[0]); if (SDL_MUSTLOCK(SDLscreen[c_screen])) SDL_UnlockSurface(SDLscreen[c_screen]); SDLcol=tmpcol; } mousepointer=3; break; default: if(mousestate==1){ locatemouse(xmouse(),ymouse()); deletesprite(0); mouseshow(); } else{ mousehide(); deletesprite(0); } mousepointer=0; break; } colorkey=tempcc; autoback(tempback); if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //locatemouse(x,y) : move mouse at x y coordinates int locatemouse(int x, int y) { SDL_WarpMouse(x,y); return 0; } //_______________________________________________________________________________________________________________________ //mouseshow : show the mouse cursor int mouseshow() { SDL_ShowCursor(SDL_ENABLE); mousestate=1; if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //mousehide : hide the mouse cursor int mousehide() { SDL_ShowCursor(SDL_DISABLE ); mousestate=0; if (autotimer()!=0)return -1; return 0; } //_______________________________________________________________________________________________________________________ //mousezone(x,y,w,h) : return 1 if the mouse pointer is in rectangle(xy with size wh) int mousezone(int x,int y,int w,int h) { if (autotimer()!=0)return -1; if ( xmousescreen(c_screen)>x) if (xmousescreen(c_screen)<(x+w)) if(ymousescreen(c_screen)>y) if(ymousescreen(c_screen)SDL_GetTicks()){ getevent(); if (stopkey()==-1)return -1; if (autotimer()!=0)return -1; } return 0; } //_________________________________________________________________________________________________________________________ //timer : return the current tick int chrono() { Uint32 ticks; ticks=SDL_GetTicks(); return ticks; } //_________________________________________________________________________________________________________________________ usr/src/sdlBasic/src/sdlBrt/SDLengine/smpeg.h0000777000076500007660000001651710463132323016270 0ustar /* SMPEG - SDL MPEG Player Library Copyright (C) 1999 Loki Entertainment Software This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* This is the C interface to the SMPEG library */ #ifndef _SMPEG_H_ #define _SMPEG_H_ #include "SDL.h" #include "SDL_mutex.h" #include "SDL_audio.h" #include "MPEGfilter.h" #ifdef __cplusplus extern "C" { #endif #define SMPEG_MAJOR_VERSION 0 #define SMPEG_MINOR_VERSION 4 #define SMPEG_PATCHLEVEL 3 typedef struct { Uint8 major; Uint8 minor; Uint8 patch; } SMPEG_version; /* This macro can be used to fill a version structure with the compile-time * version of the SDL library. */ #define SMPEG_VERSION(X) \ { \ (X)->major = SMPEG_MAJOR_VERSION; \ (X)->minor = SMPEG_MINOR_VERSION; \ (X)->patch = SMPEG_PATCHLEVEL; \ } /* This is the actual SMPEG object */ typedef struct _SMPEG SMPEG; /* Used to get information about the SMPEG object */ typedef struct _SMPEG_Info { int has_audio; int has_video; int width; int height; int current_frame; double current_fps; char audio_string[80]; int audio_current_frame; Uint32 current_offset; Uint32 total_size; double current_time; double total_time; } SMPEG_Info; /* Possible MPEG status codes */ typedef enum { SMPEG_ERROR = -1, SMPEG_STOPPED, SMPEG_PLAYING } SMPEGstatus; /* Matches the declaration of SDL_UpdateRect() */ typedef void(*SMPEG_DisplayCallback)(SDL_Surface* dst, int x, int y, unsigned int w, unsigned int h); /* Create a new SMPEG object from an MPEG file. On return, if 'info' is not NULL, it will be filled with information about the MPEG object. This function returns a new SMPEG object. Use SMPEG_error() to find out whether or not there was a problem building the MPEG stream. The sdl_audio parameter indicates if SMPEG should initialize the SDL audio subsystem. If not, you will have to use the SMPEG_playaudio() function below to extract the decoded data. */ extern DECLSPEC SMPEG* SMPEG_new(const char *file, SMPEG_Info* info, int sdl_audio); /* The same as above for a file descriptor */ extern DECLSPEC SMPEG* SMPEG_new_descr(int file, SMPEG_Info* info, int sdl_audio); /* The same as above but for a raw chunk of data. SMPEG makes a copy of the data, so the application is free to delete after a successful call to this function. */ extern DECLSPEC SMPEG* SMPEG_new_data(void *data, int size, SMPEG_Info* info, int sdl_audio); /* The same for a generic SDL_RWops structure. */ extern DECLSPEC SMPEG* SMPEG_new_rwops(SDL_RWops *src, SMPEG_Info* info, int sdl_audio); /* Get current information about an SMPEG object */ extern DECLSPEC void SMPEG_getinfo( SMPEG* mpeg, SMPEG_Info* info ); /* Enable or disable audio playback in MPEG stream */ extern DECLSPEC void SMPEG_enableaudio( SMPEG* mpeg, int enable ); /* Enable or disable video playback in MPEG stream */ extern DECLSPEC void SMPEG_enablevideo( SMPEG* mpeg, int enable ); /* Delete an SMPEG object */ extern DECLSPEC void SMPEG_delete( SMPEG* mpeg ); /* Get the current status of an SMPEG object */ extern DECLSPEC SMPEGstatus SMPEG_status( SMPEG* mpeg ); /* Set the audio volume of an MPEG stream, in the range 0-100 */ extern DECLSPEC void SMPEG_setvolume( SMPEG* mpeg, int volume ); /* Set the destination surface for MPEG video playback 'surfLock' is a mutex used to synchronize access to 'dst', and can be NULL. 'callback' is a function called when an area of 'dst' needs to be updated. If 'callback' is NULL, the default function (SDL_UpdateRect) will be used. */ extern DECLSPEC void SMPEG_setdisplay(SMPEG* mpeg, SDL_Surface* dst, SDL_mutex* surfLock, SMPEG_DisplayCallback callback); /* Set or clear looping play on an SMPEG object */ extern DECLSPEC void SMPEG_loop( SMPEG* mpeg, int repeat ); /* Scale pixel display on an SMPEG object */ extern DECLSPEC void SMPEG_scaleXY( SMPEG* mpeg, int width, int height ); extern DECLSPEC void SMPEG_scale( SMPEG* mpeg, int scale ); /* */ #define SMPEG_double(mpeg, on) \ SMPEG_scale(mpeg, (on) ? 2 : 1) /* Move the video display area within the destination surface */ extern DECLSPEC void SMPEG_move( SMPEG* mpeg, int x, int y ); /* Set the region of the video to be shown */ extern DECLSPEC void SMPEG_setdisplayregion(SMPEG* mpeg, int x, int y, int w, int h); /* Play an SMPEG object */ extern DECLSPEC void SMPEG_play( SMPEG* mpeg ); /* Pause/Resume playback of an SMPEG object */ extern DECLSPEC void SMPEG_pause( SMPEG* mpeg ); /* Stop playback of an SMPEG object */ extern DECLSPEC void SMPEG_stop( SMPEG* mpeg ); /* Rewind the play position of an SMPEG object to the beginning of the MPEG */ extern DECLSPEC void SMPEG_rewind( SMPEG* mpeg ); /* Seek 'bytes' bytes in the MPEG stream */ extern DECLSPEC void SMPEG_seek( SMPEG* mpeg, int bytes); /* Skip 'seconds' seconds in the MPEG stream */ extern DECLSPEC void SMPEG_skip( SMPEG* mpeg, float seconds ); /* Render a particular frame in the MPEG video API CHANGE: This function no longer takes a target surface and position. Use SMPEG_setdisplay() and SMPEG_move() to set this information. */ extern DECLSPEC void SMPEG_renderFrame( SMPEG* mpeg, int framenum ); /* Render the last frame of an MPEG video */ extern DECLSPEC void SMPEG_renderFinal( SMPEG* mpeg, SDL_Surface* dst, int x, int y ); /* Set video filter */ extern DECLSPEC SMPEG_Filter * SMPEG_filter( SMPEG* mpeg, SMPEG_Filter * filter ); /* Return NULL if there is no error in the MPEG stream, or an error message if there was a fatal error in the MPEG stream for the SMPEG object. */ extern DECLSPEC char *SMPEG_error( SMPEG* mpeg ); /* Exported callback function for audio playback. The function takes a buffer and the amount of data to fill, and returns the amount of data in bytes that was actually written. This will be the amount requested unless the MPEG audio has finished. */ extern DECLSPEC int SMPEG_playAudio( SMPEG *mpeg, Uint8 *stream, int len ); /* Wrapper for SMPEG_playAudio() that can be passed to SDL and SDL_mixer */ extern DECLSPEC void SMPEG_playAudioSDL( void *mpeg, Uint8 *stream, int len ); /* Get the best SDL audio spec for the audio stream */ extern DECLSPEC int SMPEG_wantedSpec( SMPEG *mpeg, SDL_AudioSpec *wanted ); /* Inform SMPEG of the actual SDL audio spec used for sound playback */ extern DECLSPEC void SMPEG_actualSpec( SMPEG *mpeg, SDL_AudioSpec *spec ); #ifdef __cplusplus } #endif #endif /* _SMPEG_H_ */ usr/src/sdlBasic/src/sdlBrt/SDLengine/sprite_system.c0000777000076500007660000002251310463132370020055 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_________________________________________________________________________________________________________________________ // SPRITE SYSTEM //_________________________________________________________________________________________________________________________ //spriteclip(x,y,w,h) : set the visibilty area of sprites int spriteclip(int x,int y,int w,int h) { SDLspriteclip.x=x; SDLspriteclip.y=y; SDLspriteclip.w=w; SDLspriteclip.h=h; return 0; } //__________________________________________________________________________________________________________________________ //sprite(n,x,y,fr) : set or move the sprite n at x,y with image fr int sprite(int n,int x,int y,int fr) { if (n>NUM_SPRITES || n<0 ){ error_description="SDLengine error - sprite: invalid sprite number "; error_type=1; SDLerr(stderr, "SDLengine error - sprite: %d is an invalid sprite number", n); return -1; } if (SDLimageCC[fr]!=NULL) { SDLspritelive[n]=1; SDLspritex[n]=x-SDL_hsx[fr]; SDLspritey[n]=y-SDL_hsy[fr]; SDLspritefr[n]=fr; } else { error_description="SDLengine error - sprite: specified image slot is empty "; error_type=1; SDLerr(stderr, "SDLengine error - sprite: image slot %d is empty", n); return -1; } if (SDLlastsprite<=n)SDLlastsprite=n+1; if (autotimer()!=0)return -1; return 0; } //__________________________________________________________________________________________________________________________ //deletesprite(n) : unset sprite n int deletesprite(int n) { if (n>NUM_SPRITES || n<0 ){ error_description="SDLengine error - deleteSprite: invalid sprite number "; error_type=1; SDLerr(stderr, "SDLengine error - deleteSprite: %d is an invalid sprite number", n); return -1; } SDLspritelive[n]=0; //morto!! SDLspritex[n]=0; SDLspritey[n]=0; SDLspritefr[n]=-1; if (SDLlastsprite==n+1) while (SDLspritelive[SDLlastsprite-1]==0){ spritez(SDLlastsprite-1,SDLlastsprite-1); SDLlastsprite--; } if (autotimer()!=0)return -1; return SDLspritelive[n]; } //__________________________________________________________________________________________________________________________ //xsprite(n) : return the x of sprite n int xsprite(int n) { if (n>NUM_SPRITES || n<0 ){ error_description="SDLengine error - spriteX: invalid sprite number "; error_type=1; SDLerr(stderr, "SDLengine error - spriteX: %d is an invalid sprite number ", n); return -1; } if (autotimer()!=0)return -1; return SDLspritex[n]+SDL_hsx[SDLspritefr[n]]; } //_________________________________________________________________________________________________________________________ //ysprite(n) : return the y of sprite n int ysprite(int n) { if (n>NUM_SPRITES || n<0 ){ error_description="SDLengine error - spriteY: invalid sprite number "; error_type=1; SDLerr(stderr, "SDLengine error - spriteY: %d is an invalid sprite number ", n); return -1; } if (autotimer()!=0)return -1; return SDLspritey[n]+SDL_hsy[SDLspritefr[n]]; } //_________________________________________________________________________________________________________________________ //spritewidth(n) : return the width of sprite n int spritewidth(int n) { if (n>NUM_SPRITES || n<0 ){ error_description="SDLengine error - spriteWidth: invalid sprite number "; error_type=1; SDLerr(stderr, "SDLengine error - spriteWidth: %d is an invalid sprite number ", n); return -1; } if (autotimer()!=0)return -1; if (SDLspritefr[n]!=-1) return SDLimageCC[SDLspritefr[n]]->w; return 0; } //_________________________________________________________________________________________________________________________ //spriteheight(n) : return the height of sprite n int spriteheight(int n) { if (n>NUM_SPRITES || n<0 ){ error_description="SDLengine error - spriteHeight: invalid sprite number "; error_type=1; SDLerr(stderr, "SDLengine error - spriteHeight: %d is an invalid sprite number ", n); return -1; } if (autotimer()!=0)return -1; if (SDLspritefr[n]!=-1) return SDLimageCC[SDLspritefr[n]]->h; return 0; } //_________________________________________________________________________________________________________________________ //frsprite(n) : return the frame of sprite n int frsprite(int n) { if (n>NUM_SPRITES || n<0 ){ error_description="SDLengine error - spriteImage: invalid sprite number "; error_type=1; SDLerr(stderr, "SDLengine error - spriteImage: %d is an invalid sprite number ", n); return -1; } if (autotimer()!=0)return -1; return SDLspritefr[n]; } //_________________________________________________________________________________________________________________________ //livesprite(n) : return 1 if sprite n is "live" int livesprite(int n) { if (n>NUM_SPRITES || n<0 ){ error_description="SDLengine error - spriteExist: invalid sprite number "; error_type=1; SDLerr(stderr, "SDLengine error - spriteExist: %d is an invalid sprite number ", n); return -1; } if (autotimer()!=0)return -1; return SDLspritelive[n]; } //_________________________________________________________________________________________________________________________ //spritehit(n,x) : return 1 if sprite n have a collission with sprite x if x=-1 with any int spritehit(int n,int x) { int xa1,ya1,xa2,ya2; int xb1,yb1,xb2,yb2; int i,ret; if (n>NUM_SPRITES || n<0 ){ error_description="SDLengine error - spriteHit: invalid sprite number "; error_type=1; SDLerr(stderr, "SDLengine error - spriteHit: %d is an invalid sprite number ", n); return -1; } xa1=SDLspritex[n]; ya1=SDLspritey[n]; xa2=xa1+spritewidth(n); ya2=ya1+spriteheight(n); if (x!=-1){ if (x>NUM_SPRITES || x<0 ){ error_description="SDLengine error - spriteHit: invalid sprite number for collision target"; error_type=1; SDLerr(stderr, "SDLengine error - spriteHit: collision target sprite %d is an invalid sprite number ", x); return -1; } if (SDLspritelive[x]==1){ xb1=SDLspritex[x]; yb1=SDLspritey[x]; xb2=xb1+spritewidth(x); yb2=yb1+spriteheight(x); if (xb2SDLlastsprite-1)z=SDLlastsprite-1; oldz=-1; for(i=0;ioldz){ for(i=oldz;i<=z-1;i++) SDLspritez[i]=SDLspritez[i+1]; SDLspritez[z]=n; } else{ for(i=oldz;i>=z;i--) SDLspritez[i]=SDLspritez[i-1]; SDLspritez[z]=n; } } return 0; } //_________________________________________________________________________________________________________________________ //lastsprite : return the last sprite active int lastsprite() { if (SDLlastsprite!=0)return SDLlastsprite-1; return SDLlastsprite; } //_________________________________________________________________________________________________________________________ //autoupdatesprite(m) : set/ unset automatic sprites update at screenswap int autoupdatesprite(int m) { if (autotimer()!=0)return -1; SDLupdatesprite = m; return SDLupdatesprite; } //_________________________________________________________________________________________________________________________ //updatesprite : manual sprites updates at next screenswap int updatesprite() { SDLupdatesprite = 2; if (autotimer()!=0)return -1; return SDLupdatesprite; } usr/src/sdlBasic/src/sdlBrt/SDLengine/video_mpeg.c0000777000076500007660000001122310463132370017255 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_________________________________________________________________________________________________________________________ // VIDEO MPEG //_________________________________________________________________________________________________________________________ void updatempeg(SDL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h) { if ( screen->flags & SDL_DOUBLEBUF ) { SDL_Flip(screen); } } //_________________________________________________________________________________________________________________________ //loadmpeg(fname,usesound) : load a mpeg video int loadmpeg(char *filename,int useaudio) { int use_video; SMPEG_Filter *filter; use_video = 1; mpeg_audio=useaudio; if (mpeg_audio==1 ) Mix_CloseAudio(); mpeg = SMPEG_new(filename, &info, mpeg_audio); if ( SMPEG_error(mpeg) ) { fprintf(stderr, "%s: %s\n", filename, SMPEG_error(mpeg)); SMPEG_delete(mpeg); exit(2); } SMPEG_enableaudio(mpeg, mpeg_audio); SMPEG_enablevideo(mpeg, use_video); SMPEG_setvolume(mpeg, volumemusic(-1)); //* filter = SMPEGfilter_bilinear(); filter = SMPEG_filter( mpeg, filter ); filter->destroy(filter); //*/ return 0; } //_________________________________________________________________________________________________________________________ //plaympeg(filename,usesound,optional loop) : play a mpeg1 video: Warning work only in windows int plaympeg(int loop) { SMPEG_setdisplay(mpeg, SDLscreen[c_screen], NULL, updatempeg); SMPEG_scaleXY(mpeg, SDLscreen[c_screen]->w, SDLscreen[c_screen]->h); if ( loop) { SMPEG_loop(mpeg, 1); } SMPEG_play(mpeg); return 0; } //_________________________________________________________________________________________________________________________ //stopmpeg() : terminate the video play int stopmpeg() { SMPEG_stop(mpeg); return 0; } //_________________________________________________________________________________________________________________________ //deletempeg() : unload mpeg video int deletempeg() { SMPEG_delete(mpeg); if (mpeg_audio==1){ if ( Mix_OpenAudio(44100, AUDIO_S16SYS, 2, 8192) < 0 ) { enabledsound=0; } else{ Mix_AllocateChannels(16); enabledsound=1; } } return 0; } //_________________________________________________________________________________________________________________________ //pausempeg() : Pause/Resume playback of an SMPEG object int pausempeg() { SMPEG_pause(mpeg); return 0; } //_________________________________________________________________________________________________________________________ //rewindmpeg() : Rewind the play position of an SMPEG object to the beginning of the MPEG int rewindmpeg() { SMPEG_rewind( mpeg ); SMPEG_play(mpeg); return 0; } //_________________________________________________________________________________________________________________________ //seekmpeg(p) : Seek 'bytes' bytes in the MPEG stream int seekmpeg(int p) { SMPEG_seek( mpeg, p); return 0; } //_________________________________________________________________________________________________________________________ //skipmpeg(s) : Skip 'seconds' seconds in the MPEG stream int skipmpeg(int s) { SMPEG_skip( mpeg, (float) s ); return 0; } //_________________________________________________________________________________________________________________________ //statusmpeg() : return 1 if plaympeg work or 0 in other case int statusmpeg() { SMPEGstatus status; status=SMPEG_status( mpeg ); if (status ==1)return 1; return 0; } usr/src/sdlBasic/src/sdlBrt/SDLengine/makefile0000755000076500007660000001611310644775517016513 0ustar ##################################################################################### # libSDLengine Makefile v0.07 for all (beta 2) # ##################################################################################### # # syntax make OS=[font_prefix=] # # platforms supported = [linux|osx|freebsd|openbsd|netbsd|morphos|amigaos4] # ###################################################################################### #os is case insensitive ifndef $(OS) OS=$(os) endif SDLENGINE_SRC= SDLengine.c common.c SDL_extension.c screen.c graphics.c file_io.c image_manipulation.c \ blitting.c sprite_system.c bob_system.c text_draw.c print_screen.c sound.c cd_support.c video_mpeg.c \ keyboard.c joystick.c mouse.c time.c socket.c SRC = $(SDLENGINE_SRC) SDLENGINE_OBJ= SDLengine.o common.o SDL_extension.o screen.o graphics.o file_io.o image_manipulation.o \ blitting.o sprite_system.o bob_system.o text_draw.o print_screen.o sound.o cd_support.o video_mpeg.o \ keyboard.o joystick.o mouse.o time.o socket.o OBJECT= $(SDLENGINE_OBJ) #----------------------------------------------------------------------------------------------------------------------------------------# # WIN32 # ifeq ($(OS), win32) TARGET= SDLengine.a mingw=c:/devel/c-cpp/MinGW ifndef prefix prefix=c:/programmi/sdlBasic endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=del CFLAG= -Wall -mwindows -g -O2 -I $(mingw)/include LIBS= -lmingw32 -lSDLmain -lSDL -lSDL_image -lSDL_mixer -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # LINUX # ifeq ($(OS), linux) TARGET= SDLengine.a ifndef prefix prefix=/opt/sdlBasic endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O2 -I/usr/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DLINUX LIBS=-Wl,-rpath, -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lvorbisfile -lvorbis -logg -lsmpeg -lasound -lSDL -lpng -ltiff -lz -ljpeg -lpthread -lm -lfreetype -ldl #LIBS=-Wl,-rpath, -lSDL -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lvorbisfile -lvorbis -logg -lsmpeg -lpthread -lm -lfreetype -lSDL -lpng -ljpeg -ltiff -lz -lartsdsp -lasound -lartsdsp -ldl #LIBS=-lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # GP2X # ifeq ($(OS), gp2x) TARGET= SDLengine.a ifndef prefix prefix=/mnt/sd/sdlBasic endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= /usr/local/open2x/bin/open2x-gcc CPP=/usr/local/open2x/bin/open2x-g++ RANLIB=/usr/local/open2x/bin/open2x-ranlib RM=rm -f CFLAG= -static -Wall -g -O2 -I/usr/local/open2x/open2x/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DGP2X LIBS=-L/usr/local/open2x/open2x/lib -Wl,-rpath, -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg -lSDL -lpng -ltiff -lz -ljpeg -lpthread -lm -lfreetype -ldl COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # MAC OSX # ifeq ($(OS), osx) TARGET= SDLengine.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -g -O2 -I/usr/local/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -Wno-long-double LIBS= -lobjc -framework Appkit -framework Carbon -framework IOKit `sdl-config --libs` -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg -lfreetype -ljpeg -lpng -lz COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # FREEBSD # ifeq ($(OS), freebsd) TARGET= SDLengine.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O2 -I/usr/local/include/SDL11 -D_REENTRAT -DPLAY_MOD -DUNIX -DFBSD LIBS=-lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg -L/usr/local/lib \ -lpthread COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # OPENBSD # ifeq ($(OS), openbsd) TARGET= SDLengine.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O2 -I/usr/local/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DOPENBSD LIBS=-L/usr/local/lib -L/usr/X11R6/lib -lX11 -lXext -lpthread -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # NETBSD # ifeq ($(OS), netbsd) TARGET= SDLengine.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O2 -L/usr/pkg/lib -I/usr/pkg/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DNETBSD LIBS=-lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # MORPHOS # ifeq ($(OS), morphos) TARGET= SDLengine.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc -noixemul CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O3 -fomit-frame-pointer -mmultiple -mstring -I/usr/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -D__MORPHOS__ LIBS= -lSDL -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # AMIGAOS4 # ifeq ($(OS), amigaos4) TARGET= SDLengine.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf # on amiga can be: ppc-amigaos-strip --remove-section=.comment $(TARGET) CC= ppc-amigaos-gcc CPP= ppc-amigaos-g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -ggdb -O3 -fomit-frame-pointer -mmultiple -mstring -D__USE_INLINE__ -D__USE_NETINET_IN_H -I/usr/local/amiga/ppc-amigaos/local/clib2/include/SDL/ -D_REENTRAT -DPLAY_MOD -DUNIX LIBS= -lsmpeg -lSDL_mixer -lSDL_image -lSDL_ttf -lfreetype -lSDL_net -lSDL -lpng -lz -ljpeg -lvorbisfile -lvorbis -logg -lauto -lm -lnet -lunix COMPILE=$(CPP) $(CFLAG) $(LIBS) endif #----------------------------------------------------------------------------------------------------------------------------------------# all: $(TARGET) $(TARGET): $(OBJECT) $(RM) $@ ar cq $@ $(OBJECT) $(RANLIB) $(TARGET) $(OBJECT): %.o: %.c $(CC) $(CFLAG) -Dfont_prefix=\"$(font_prefix)\" -c $< -o $@ clean: $(RM) *.o $(RM) $(TARGET) usr/src/sdlBasic/src/sdlBrt/SDLengine/image_manipulation.c0000777000076500007660000002664410463132214021013 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_________________________________________________________________________________________________________________________ // IMAGE MANIPULATION //_________________________________________________________________________________________________________________________ //hotspot(n,x,y) : select the point of coordinates in a imageslot (n,0,0=up left(default) | n,1,1=center | n,2,2 =down right)n= image int hotspot(int n,int x,int y) { if (SDLimage[n]!=NULL){ switch(x) { case 0: SDL_hsx[n]=0; break; case 1: SDL_hsx[n]=SDLimage[n]->w / 2; break; case 2: SDL_hsx[n]=SDLimage[n]->w; break; default: SDL_hsx[n]=x; break; } switch(y) { case 0: SDL_hsy[n]=0; break; case 1: SDL_hsy[n]=SDLimage[n]->h / 2; break; case 2: SDL_hsy[n]=SDLimage[n]->h; break; default: SDL_hsy[n]=y; break; } return 0; } else{ error_description="SDLengine error - hotSpot: specified image slot is empty "; error_type=1; SDLerr(stderr,"SDLengine error - hotSpot: image slot %d is empty ", n); return -1; } } //_________________________________________________________________________________________________________________________ //setcolorkey(c) : set the colorkey for bitmap transparency if set -1 (default ) will be used the left-up corner color. int setcolorkey(int c) { if (c==-1){ colorkey=-1; } else{ colorkey=(Uint32)SDL_MapRGB(SDLdisplay->format,(c & 255),((c/256)&255),(c/(256*256))&255); } return 0; } //_________________________________________________________________________________________________________________________ //imageexists(n) : return 1 if the image buffer n exist 0 if empty int imageexists( int n ) { if (n<0 || n>NUM_IMAGES)return -1; if ( SDLimage[n] == NULL ) { return(0); } return 1; } //_________________________________________________________________________________________________________________________ //imagewidth(n) : return the image n width or error if image n if empty int imagewidth(int n) { if (n<0 || n>NUM_IMAGES)return -1; if ( SDLimage[n] != NULL ) { return SDLimage[n]->w; } else { error_description="SDLengine error - imageWidth: specified image slot is empty "; error_type=1; SDLerr(stderr,"SDLengine error - imageWidth: image slot %d is empty ", n); return -1; } } //_________________________________________________________________________________________________________________________ //imageheight(n) : return the image n height or error if image n if empty int imageheight(int n) { if (n<0 || n>NUM_IMAGES)return -1; if ( SDLimage[n] != NULL ) { return SDLimage[n]->h; } else { error_description="SDLengine error - imageHeight: specified image slot is empty "; error_type=1; SDLerr(stderr,"SDLengine error - imageHeight: image slot %d is empty", n); return -1; } } //________________________________________________________________________________________________________________________________________ //deleteimage(n) : erase the image n of the memory int deleteimage(int n) { if (n<0 || n>NUM_IMAGES)return -1; if ( SDLimage[n] != NULL ) { SDL_FreeSurface(SDLimage[n]); SDL_FreeSurface(SDLimageCC[n]); SDLimage[n]=NULL; SDLimageCC[n]=NULL; return 0; } else { error_description="SDLengine error - deleteImage: specified image slot is yet empty "; error_type=1; SDLerr(stderr,"SDLengine error - deleteImage: image slot %d is yet empty", n); return -1; } } //________________________________________________________________________________________________________________________________________ //copyimage(s,d) : copy image s to image d int copyimage(int s,int d) { if (s<0 || s>NUM_IMAGES)return -1; if (d<0 || d>NUM_IMAGES)return -1; if ( SDLimage[s] != NULL ) { if ( SDLimage[d] != NULL ) { SDL_FreeSurface(SDLimage[d]); SDL_FreeSurface(SDLimageCC[d]); } SDLimage[d]=SDL_DisplayFormat(SDLimage[s]); if (SDLimage[d]==NULL)return -1; SDLimageCC[d]=SDL_DisplayFormat(SDLimageCC[s]); if (SDLimageCC[d]==NULL)return -1; //Image_colorkey(SDLimageCC[d]); return 0; } else { error_description="SDLengine error - copyImage: source image slot is empty "; error_type=1; SDLerr(stderr,"SDLengine error - copyImage: source image slot %d is empty ", s); return -1; } } //________________________________________________________________________________________________________________________________________ //setalpha(n,a) : set trasparency int setalpha(int n,int a) { if (n<0 || n>NUM_IMAGES)return -1; if ( SDLimage[n] != NULL ) { SDL_SetAlpha (SDLimage[n], SDL_SRCALPHA, a) ; SDL_SetAlpha (SDLimageCC[n], SDL_SRCALPHA, a) ; return 0; } else { error_description="SDLengine error - imageAlpha: specified image slot is empty "; error_type=1; SDLerr(stderr,"SDLengine error - imageAlpha: image slot %d is empty ", n); return -1; } } //_________________________________________________________________________________________________________________________ //zoomimage(n,zoomx,zoomy) : zoom image int zoomimage(int n,double zoomx,double zoomy) { SDL_Surface *tmp; if (n<0 || n>NUM_IMAGES)return -1; if ( SDLimage[n] != NULL ) { while(vbl==-1)waitTime(1); vbl=-1; tmp=zoomSurface(SDLimage[n], zoomx, zoomy, 0); if(tmp==NULL){ error_description="SDLengine error - zoomImage: image not found "; error_type=1; SDLerr(stderr,"SDLengine error - zoomImage: image not found %s\n",SDL_GetError()); return -1; } SDL_FreeSurface(SDLimage[n]); SDLimage[n]=tmp; tmp=zoomSurface(SDLimageCC[n], zoomx, zoomy, 0); if(tmp==NULL){ error_description="SDLengine error - zoomImage: image not found "; error_type=1; SDLerr(stderr,"SDLengine error - zoomImage: image not found %s\n",SDL_GetError()); return -1; } SDL_FreeSurface(SDLimageCC[n]); Image_colorkey(tmp); SDLimageCC[n]=tmp; vbl=0; } else { error_description="SDLengine error - zoomImage: specified image slot is empty "; error_type=1; SDLerr(stderr,"SDLengine error - zoomImage: image slot %d is empty", n); return -1; } return 0; } //_________________________________________________________________________________________________________________________ //rotateimage(n,angle) : rotate image int rotateimage(int n,double angle) { SDL_Surface *tmp; if (n<0 || n>NUM_IMAGES)return -1; if ( SDLimage[n] != NULL ) { while(vbl==-1)waitTime(1); vbl=-1; tmp=rotozoomSurface (SDLimage[n], angle, 1, 1); if(tmp==NULL){ error_description="SDLengine error - rotateImage: image not found "; error_type=1; SDLerr(stderr,"SDLengine error - rotateImage: image not found %s\n",SDL_GetError()); return -1; } SDL_FreeSurface(SDLimage[n]); SDLimage[n]=tmp; tmp=rotozoomSurface (SDLimageCC[n], angle, 1, 1); if(tmp==NULL){ error_description="SDLengine error - rotateImage: image not found "; error_type=1; SDLerr(stderr,"SDLengine error - rotateImage: image not found %s\n",SDL_GetError()); return -1; } SDL_FreeSurface(SDLimageCC[n]); Image_colorkey(tmp); SDLimageCC[n]=tmp; vbl=0; } else { error_description="SDLengine error - rotateImage: specified image slot is empty "; error_type=1; SDLerr(stderr,"SDLengine error - rotateImage: image slot %d is empty", n); return -1; } return 0; } //_________________________________________________________________________________________________________________________ //rotozoomimage(n,angle,zoom) : rotate and zoom image int rotozoomimage(int n,double angle,double zoom) { SDL_Surface *tmp; if (n<0 || n>NUM_IMAGES)return -1; if ( SDLimage[n] != NULL ) { while(vbl==-1)waitTime(1); vbl=-1; tmp=rotozoomSurface (SDLimage[n], angle, zoom, 1); if(tmp==NULL){ error_description="SDLengine error - rotoZoomImage: image not found "; error_type=1; SDLerr(stderr,"SDLengine error - rotoZoomImage: image not found %s\n",SDL_GetError()); return -1; } SDL_FreeSurface(SDLimage[n]); SDLimage[n]=tmp; tmp=rotozoomSurface(SDLimageCC[n], angle, zoom, 1); if(tmp==NULL){ error_description="SDLengine error - rotoZoomImage: image not found "; error_type=1; SDLerr(stderr,"SDLengine error - rotoZoomImage: image not found %s\n",SDL_GetError()); return -1; } SDL_FreeSurface(SDLimageCC[n]); Image_colorkey(tmp); SDLimageCC[n]=tmp; vbl=0; } else { error_description="SDLengine error - rotoZoomImage: specified image slot is empty "; error_type=1; SDLerr(stderr,"SDLengine error - rotoZoomImage: image slot %d is empty", n); return -1; } return 0; } //_________________________________________________________________________________________________________________________ //mirrorimage(n,x,y) :vertical-orizontal mirror int mirrorimage(int n,int x,int y) { int px,py,dx,dy,w,h; SDL_Surface *tmp; SDL_Surface *tmpCC; if (n<0 || n>NUM_IMAGES)return -1; if ( SDLimage[n] != NULL ) { while(vbl==-1)waitTime(1); vbl=-1; w=SDLimage[n]->w-1; h=SDLimage[n]->h-1; tmp=SDL_DisplayFormatAlpha(SDL_CreateRGBSurface(SDL_HWSURFACE|SDL_HWACCEL,SDLimage[n]->w,SDLimage[n]->h,32,0,0,0,0)); tmpCC=SDL_DisplayFormatAlpha(SDL_CreateRGBSurface(SDL_HWSURFACE|SDL_HWACCEL,SDLimage[n]->w,SDLimage[n]->h,32,0,0,0,0)); if(tmp==NULL || tmpCC==NULL){ error_description="SDLengine error - mirrorImage: image not created "; error_type=1; SDLerr(stderr,"SDLengine error - mirrorImage: image not created %s\n",SDL_GetError()); return -1; } if (SDL_MUSTLOCK(SDLimage[n])){ SDL_LockSurface(SDLimage[n]); SDL_LockSurface(SDLimageCC[n]); SDL_LockSurface(tmp); SDL_LockSurface(tmpCC); } for (py=0; py<=h; py++){ for (px=0; px<=w; px++){ if (x==0) dx=px; else dx=w-px; if (y==0) dy=py; else dy=h-py; putpixel(tmp,px,py,getpixel(SDLimage[n],dx,dy)); putpixel(tmpCC,px,py,getpixel(SDLimage[n],dx,dy)); } } if (SDL_MUSTLOCK(SDLimage[n])){ SDL_UnlockSurface(SDLimage[n]); SDL_UnlockSurface(SDLimageCC[n]); SDL_UnlockSurface(tmp); SDL_UnlockSurface(tmpCC); } SDL_FreeSurface(SDLimage[n]); SDLimage[n]=tmp; SDL_FreeSurface(SDLimageCC[n]); SDLimageCC[n]=tmpCC; Image_colorkey(SDLimageCC[n]); vbl=0; } else { error_description="SDLengine error - mirrorImage: specified image slot is empty "; error_type=1; SDLerr(stderr,"SDLengine error - mirrorImage: image slot %d is empty", n); return -1; } return 0; } usr/src/sdlBasic/src/sdlBrt/SDLengine/socket.c0000777000076500007660000002530210463132323016430 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_________________________________________________________________________________________________________________________ // SOCKET //_________________________________________________________________________________________________________________________ //isenabledsock() : return 1 if sdlnet was enabled int isenabledsock() { return enabledsock; } //_________________________________________________________________________________________________________________________ // getfreesock : return the first free sock in sdlSocket array int getfreesock() { int i; for (i=1;ihost); sprintf(ret,"%d.%d.%d.%d\n", ipaddr>>24, (ipaddr>>16)&0xff, (ipaddr>>8)&0xff, ipaddr&0xff); return ret; } //_________________________________________________________________________________________________________________________ //getremoteport(sock) : return the ip address of remote client connetted int getremoteport(sock) { Uint16 port; IPaddress *remoteip; // get the clients IP and port number remoteip=SDLNet_TCP_GetPeerAddress(SDLsock[sock]); if(!remoteip) { error_description="SDLengine error - getRemotePort: SDLNet_TCP_GetPeerAddress "; error_type=1; SDLerr(stderr,"SDLengine error - getRemotePort: SDLNet_TCP_GetPeerAddress: %s\n",SDLNet_GetError()); return -1; } // print out the clients IP and port number port=SDL_SwapBE32(remoteip->port); return port; } //_________________________________________________________________________________________________________________________ //getlocalip() : return the local ip #ifndef WIN32 // has no gethostname that we can use here... int gethostname(char *name,int number); #endif char *getlocalip() { #ifndef WIN32 // has no gethostname that we can use here... IPaddress ip; Uint32 ipaddr; //Uint16 port; char *localhostname; char *ret; ret=(char *)malloc(24); localhostname=(char *)malloc(256); if((gethostname(localhostname, 256)>=0)) { if(SDLNet_ResolveHost(&ip,localhostname,0)==-1) { error_description="SDLengine error getLocalIp: Can't resolve host "; error_type=1; SDLerr(stderr,"SDLengine error getLocalIp: Can't resolve host \"%s\"\n%s\n", localhostname, SDLNet_GetError()); return NULL; } else { // use the IP as a Uint8[4] ipaddr= ip.host; // print out the clients IP sprintf(ret,"%d.%d.%d.%d\n", ipaddr>>24, (ipaddr>>16)&0xff, (ipaddr>>8)&0xff, ipaddr&0xff); } } return ret; #else return "localhost"; #endif } //_________________________________________________________________________________________________________________________ usr/src/sdlBasic/src/sdlBrt/SDLengine/sound.c0000777000076500007660000002716210463132370016300 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_________________________________________________________________________________________________________________________ //SOUND //_________________________________________________________________________________________________________________________ //isenabledsound() : return 1 if sdlsound was enabled int isenabledsound() { return enabledsound; } //________________________________________________________________________________________________________________________________________ //soundexists(n) : return 1 if the sound buffer n exist 0 if empty int soundexists( int n ) { if (n>NUM_WAVES || n<0){ error_description="SDLengine error - soundExists: invalid sound slot number "; error_type=1; SDLerr(stderr, "SDLengine error - soundExists: %d is an invalid sound slot number", n); return -1; } if ( SDLsound[n] == NULL ) { return(0); } return 1; } //________________________________________________________________________________________________________________________________________ //deletesound(n) : delete from memory sound n int deletesound(int n) { if (n>NUM_WAVES || n<0){ error_description="SDLengine error - deleteSound: invalid sound slot number "; error_type=1; SDLerr(stderr, "SDLengine error - deleteSound: %d is an invalid sound slot number", n); return -1; } if ( SDLsound[n] != NULL ) { Mix_FreeChunk(SDLsound[n]); SDLsound[n]=NULL; return 0; } else { error_description="SDLengine error - deleteSound: sound slot is yet empty "; error_type=1; SDLerr(stderr,"SDLengine error - deleteSound: sound slot %d is yet empty", n); return -1; } } //________________________________________________________________________________________________________________________________________ //copysound(s,d) : copy sound bank s in sound bank d int copysound(int s, int d) { if (s>NUM_WAVES || s<0){ error_description="SDLengine error - copySound: invalid source sound slot number"; error_type=1; SDLerr(stderr, "SDLengine error - copySound: source slot %d is an invalid sound slot number", s); return -1; } if (d>NUM_WAVES || d<0){ error_description="SDLengine error - copySound: invalid target sound slot number"; error_type=1; SDLerr(stderr, "SDLengine error - copySound: destination slot %d is an invalid sound slot number", d); return -1; } if ( SDLsound[s] != NULL ) { Mix_FreeChunk(SDLsound[d]); SDLsound[d]= Mix_QuickLoad_RAW(SDLsound[s]->abuf,SDLsound[s]->alen); return 0; } else { error_description="SDLengine error - copySound: source sound slot is empty "; error_type=1; SDLerr(stderr,"SDLengine error - copySound: source sound slot %d is empty", s); return -1; } } //________________________________________________________________________________________________________________________________________ //musicexists() : return 1 if the music is load 0 if empty int musicexists() { if ( SDLmusic == NULL ) { return(0); } return 1; } //__________________________________________________________________________________________________________________________ //playsound(n,c,l) : play the sound n in channel c l loops int playsound (int n,int c,int l) { if (n>NUM_WAVES || n<0){ error_description="SDLengine error - playSound: invalid sound slot number "; error_type=1; SDLerr(stderr, "SDLengine error - playSound: %d is an invalid sound slot number", n); return -1; } if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enabled"); return 0; } if (SDLsound[n]!=NULL){ Mix_PlayChannel(c,SDLsound[n], l); return 0; } else { error_description="SDLengine error - playSound: sound slot is empty "; error_type=1; SDLerr(stderr, "SDLengine error - playSound: sound slot %d is empty", n); return -1; } } //_________________________________________________________________________________________________________________________ //playfreqsound(n,c,pitch,l) : play the sound n in channel c l loops at freq variation (negative number=low positive number =high) int playfreqsound ( int n, int c, float pitch, int l) { if (n>NUM_WAVES || n<0){ error_description="SDLengine error - playFreqSound: invalid sound slot number "; error_type=1; SDLerr(stderr, "SDLengine error - playFreqSound: %d is an invalid sound slot number", n); return -1; } if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled\n"); return 0; } if (SDLsound[n]!=NULL){ Mix_PlayChannel(c,Change_Pitch(SDLsound[n],pow(2 , 0-(pitch/12))), l); return 0; } else { error_description="SDLengine error - playFreqSound: sound slot is empty "; error_type=1; SDLerr(stderr, "SDLengine error - playFreqSound: sound slot %d is empty", n); return -1; } } //_______________________________________________________________________________________________________________________ //volumesound(c,v) : change the volume of channel c (-1 all) at value v (0-128) with v = -1 return the current volume int volumesound(int c,int v) { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } return Mix_Volume(c,v); } //_______________________________________________________________________________________________________________________ //stopsound(c) : stop the wave play in channel c (-1 =all) int stopsound(c) { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } return Mix_HaltChannel(c); } //_______________________________________________________________________________________________________________________ //pausesound(c) : paused channel c (-1 =all) int pausesound(int c) { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } Mix_Pause(c); return 0; } //_______________________________________________________________________________________________________________________ //resumesound(c) : unpaused channel c (-1 =all) int resumesound(int c) { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } Mix_Resume(c); return 0; } //_______________________________________________________________________________________________________________________ //vumetersound(c) : return the current state of sound channel (-1 =all) int vumetersound(int c) { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } return Mix_Playing(c); } //_______________________________________________________________________________________________________________________ //positionsound(c,angle,dist) : position sound in 3d space int positionsound(int c,int angle,int dist) { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } return Mix_SetPosition(c, (Sint16)angle, (Uint8) dist); } //_______________________________________________________________________________________________________________________ //soundchannels(n) : dinamically change the number of channells managed by sdlBasic int soundchannels(int n) { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } return Mix_AllocateChannels(n); } //_______________________________________________________________________________________________________________________ //playmusic(n) : play track xm,mod,ogg,mp3 n=number of ripetition(-1 always) int playmusic ( int n) { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } if (SDLmusic!=NULL){ Mix_PlayMusic(SDLmusic, n); return 0; } else { error_description="SDLengine error - playMusic: music not loaded "; error_type=1; SDLerr(stderr, "SDLengine error - playMusic: music not loaded"); return -1; } } //______________________________________________________________________________________________________________________ //positionmusic(p) : move the execution at p second int positionmusic(int p) { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } return Mix_SetMusicPosition((double) p); } //______________________________________________________________________________________________________________________ //stopmusic : terminate the music play int stopmusic() { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } Mix_HaltMusic(); return 0; } //_______________________________________________________________________________________________________________________ //pausemusic : set pause of the current music int pausemusic() { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } Mix_PauseMusic(); return 0; } //_______________________________________________________________________________________________________________________ //resumemusic : unset pause of musica int resumemusic() { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } Mix_ResumeMusic(); return 0; } //_______________________________________________________________________________________________________________________ //rewindmusic : rewind at start the music int rewindmusic() { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } Mix_RewindMusic(); return 0; } //_______________________________________________________________________________________________________________________ //fademusic(t) : music fade int fademusic_t,fademusic_delay; int fademusic(int t) { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } if (t!=-1){ fademusic_t=(t*1000)/Mix_VolumeMusic(-1); fademusic_delay=chrono()+fademusic_t; } return Mix_VolumeMusic(-1); } void fademusichandler() { int t; t=fademusic_t; Mix_VolumeMusic(Mix_VolumeMusic(-1)-1); fademusic_delay=chrono()+t; if (Mix_VolumeMusic(-1)<=0){ Mix_HaltMusic(); fademusic_t=0; } } //_______________________________________________________________________________________________________________________ //volumemusic(v) : change the volume of music (0-128) -1 return the current volume int volumemusic(int v) { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } return Mix_VolumeMusic(v); } //_______________________________________________________________________________________________________________________ //speedmusic(v) : change the speed of music int speedmusic(int v) { if (enabledsound==0){ SDLerr(stderr, "Warning: sounds are not enbled"); return 0; } return Mix_SetSynchroValue(v); } usr/src/sdlBasic/src/sdlBrt/SDLengine/file_io.c0000777000076500007660000002274510463132153016557 0ustar /* _________________________________________________________________________________________________________________________ SDLengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ #include "SDLengine.h" //_________________________________________________________________________________________________________________________ // FILE INPUT OUTPUT //_________________________________________________________________________________________________________________________ //getfreeimage : return a number of image bank free int getfreeimage() { int i; for(i=1;iNUM_IMAGES){ error_description="SDLengine error - loadImage: given slot exceed maximum slots number"; error_type=1; SDLerr(stderr,"SDLengine error - loadImage: slot %d exceed maximum image slots number ",n); return -1; } if (fileExist(filename)){ if ( SDLimage[n] != NULL ) { SDL_FreeSurface(SDLimage[n]); SDL_FreeSurface(SDLimageCC[n]); } SDLimage[n]= Load_Image(filename, 0); SDLimageCC[n]=Load_Image(filename, 1); SDL_hsx[n]=0; SDL_hsy[n]=0; } else{ error_description="SDLengine error - loadImage: file not found"; error_type=1; SDLerr(stderr,"SDLengine error - loadImage: file '%s' not found ",filename); //exit(2); return -1; } return n; } //_______________________________________________________________________________________________________________________ //loadzipimage(zipfile,filename,opt n) : load a graphics file stored in a zip archive in a slot n if n=-1 use the first free and return as n int loadzipimage(char *zipfile,char *filename,int n) { if(n==-1)n=getfreeimage(); if(n<0)return -1; if(n>NUM_IMAGES){ error_description="SDLengine error - loadZipImage: specified slot exceed image slots maximum number"; error_type=1; SDLerr(stderr,"SDLengine error - loadZipImage: slot %d exceed image slots maximum number ",n); return -1; } if (fileExist(zipfile)){ if ( SDLimage[n] != NULL ) { SDL_FreeSurface(SDLimage[n]); SDL_FreeSurface(SDLimageCC[n]); } SDLimage[n]= Load_zip_Image(zipfile,filename, 0); SDLimageCC[n]=Load_zip_Image(zipfile,filename, 1); if (SDLimage[n]==NULL){ error_description="SDLengine error - loadZipImage: image not found inside specified zip file "; error_type=1; SDLerr(stderr,"SDLengine error - loadZipImage: '%s' not found in zip file '%s' \n", filename, zipfile); return -1; } SDL_hsx[n]=0; SDL_hsy[n]=0; } else{ error_description="SDLengine error - loadZipImage: zip file not found "; error_type=1; SDLerr(stderr,"SDLengine error - loadZipImage: zip file '%s' not found ",zipfile); return -1; } return n; } //_______________________________________________________________________________________________________________________ //saveimage(filename,n) : save slot n in a graphics file(only bmp) int saveimage(char *filename,int n) { Save_Image(filename,SDLimage[n]); return 0; } //_______________________________________________________________________________________________________________________ //getfreesound : return a number of first sound bank free int getfreesound() { int i; for(i=1;iNUM_WAVES){ error_description="SDLengine error - loadSound: given slot exceed maximum slots number "; error_type=1; SDLerr(stderr,"SDLengine error - loadSound: slot %d exceed maximum sound slots number ",n); return -1; } if (fileExist(filename)){ Mix_FreeChunk(SDLsound[n]); SDLsound[n]=Mix_LoadWAV(filename); } else{ error_description="SDLengine error - loadSound: file not found "; error_type=1; SDLerr(stderr,"SDLengine error - loadSound: file '%s' not found ",filename); return -1; } return n; } //________________________________________________________________________________________________________________________________________ //loadzipsound(zipfile,filename,n) : load a wave file in a sound slot n if n=-1 use and return the first free int loadzipsound(char *zipfile,char *filename,int n) { unsigned char *mem; SDL_RWops *src; int size; if(n==-1)n=getfreesound(); if(n<0)return -1; if (n>NUM_WAVES){ error_description="SDLengine error - loadZipSound: specified slot exceed maximum slots number "; error_type=1; SDLerr(stderr,"SDLengine error - loadZipSound: slot %d exceed maximum sound slots number ",n); return -1; } if (fileExist(zipfile)){ if (load_zipped_file (zipfile, filename, &mem, &size)==0){ src=SDL_RWFromMem(mem, size); Mix_FreeChunk(SDLsound[n]); SDLsound[n]=Mix_LoadWAV_RW(src,1); } else{ error_description="SDLengine error - loadZipSound: sound not found in specified zip file"; error_type=1; SDLerr(stderr,"SDLengine error - loadZipSound: sound '%s' not found in file '%s' \n",filename, zipfile); return -1; } } else{ error_description="SDLengine error - loadZipSound: zip file not found "; error_type=1; SDLerr(stderr,"SDLengine error - loadZipSound: '%s' not found ", zipfile); return -1; } return n; } //________________________________________________________________________________________________________________________________________ //savesound(filename,n) : save a wave file from sound slot n int savesound(char *filename, int n) { FILE *fwave; char lws,hws; int i; int alen; if ( SDLsound[n] != NULL ) { unsigned char headsound[]={82,73,70,70,86,23,0,0,87,65,86,69,102,109,116,32,16,0,0,0,1,0,1,0,17,43,0,0,17,43,0,0,1,0,8,0,100,97,116,97}; alen=SDLsound[n]->alen/14; lws=alen & 255; hws=alen / 256; fwave=fopen(filename,"wb"); for(i=0;i<40;i++){ fputc(headsound[i],fwave); } fputc(lws,fwave); fputc(hws,fwave); fputc(0,fwave); fputc(0,fwave); fputc(0,fwave); fputc(0,fwave); fputc(0,fwave); for(i=0;ialen;i+=14) fputc(SDLsound[n]->abuf[i+1],fwave); fclose(fwave); return 0; } else { error_description="SDLengine error - saveSound: specified sound slot is empty "; error_type=1; SDLerr(stderr,"SDLengine error - saveSound: sound slot %d is empty ", n); return -1; } } //_______________________________________________________________________________________________________________________ //loadmusic(filename) : load a music module (xm,mod,ogg and only for linux mp3) int loadmusic(char *filename) { if (fileExist(filename)){ Mix_FreeMusic(SDLmusic); SDLmusic = Mix_LoadMUS(filename); } else{ error_description="SDLengine error - loadMusic: file not found "; error_type=1; SDLerr(stderr,"SDLengine error - loadMusic: file '%s' not found ", filename); return -1; } return 0; } //________________________________________________________________________________________________________________________________________ //loadzipmusic(zipfile,filename) : load a zipped music module (xm,mod,ogg and only for linux mp3) int loadzipmusic(char *zipfile,char *filename) { char *tmpfile; if (fileExist(zipfile)){ #ifndef WIN32 char *tmpdir="/tmp"; #else char *tmpdir=getenv("tmp"); #endif if (file_unzip(zipfile,filename,tmpdir)==0){ tmpfile=(char *) malloc(strlen(tmpdir)+strlen(filename)+2); strcpy(tmpfile,tmpdir); strcat(tmpfile,"/"); strcat(tmpfile,filename); tmpfile[strlen(tmpfile)]='\0'; loadmusic(tmpfile); remove(tmpfile); } else{ error_description="SDLengine error - loadZipMusic: music not found in specified zip file "; error_type=1; SDLerr(stderr,"SDLengine error - loadZipMusic: music '%s' not found in file '%s' \n", filename, zipfile); return -1; } } else{ error_description="SDLengine error - loadZipMusic: zip file not found "; error_type=1; SDLerr(stderr,"SDLengine error - loadZipMusic: zip file'%s' not found ", zipfile); return -1; } return 0; } //________________________________________________________________________________________________________________________________________ usr/src/sdlBasic/src/sdlBrt/trace.h0000777000076500007660000000137410463131223014434 0ustar /* Name: trace.h Purpose: Code tracing for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ typedef struct SourceCode SourceCode; struct SourceCode { int id; /* unique identifier */ int fileNum; /* file the source line came from */ int lineNum; /* line number from the file */ char *text; /* line of code */ SourceCode *prior; /* link to prior line of code */ }; int sourceLineCounter = 0; /* value of next SourceCode->id */ SourceCode *lastSourceLink = NULL; /* linked list of source code */ int eAddSourceCode( int theFileNum, int theLineNum, char *text ); SourceCode *eFindSource( int id ); usr/src/sdlBasic/src/sdlBrt/stack.c0000777000076500007660000000470110463131223014433 0ustar /* Name: stack.c Purpose: Integer stacks for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ /* create a new stack */ Stack *newStack( int size ) { Stack *stack; /* allocate stack */ stack = (Stack *)eMalloc( sizeof( Stack ) + (sizeof(int) * (size)) ); stack->tos = -1; stack->size = size; return stack; } /* push an item on the stack */ void pushStack( Stack *stack, int value ) { if (stack->tos == stack->size) { ePrintf( Runtime, "pushStack: stack overflow"); } stack->tos++; stack->data[stack->tos] = value; } /* incrStack: increment the value on the stack */ void incrStack( Stack *stack, int value ) { stack->data[stack->tos] += value; } /* decrStack: decrement the value on the stack */ void decrStack( Stack *stack, int value ) { stack->data[stack->tos] -= value; } /* swapStack: swap top two stack items */ void swapStack( Stack *stack ) { int tmp; if (stack->tos < 1) { ePrintf( Runtime, "swapStack: stack underflow"); } tmp = stack->data[stack->tos]; stack->data[stack->tos] = stack->data[stack->tos-1]; stack->data[stack->tos-1] = tmp; } /* duplicate top stack item */ void dupStack( Stack *stack ) { if (stack->tos < 0) { ePrintf( Runtime, "dupStack: underflow" ); } else if (stack->tos == stack->size) { ePrintf( Runtime, "dupStack: overflow" ); } stack->tos++; stack->data[stack->tos] = stack->data[stack->tos-1]; } /* return copy of top stack item */ int peekStack( Stack *stack ) { if (stack->tos < 0) { ePrintf( Runtime, "peekStack: underflow" ); } return stack->data[stack->tos]; } /* pop an item off the stack */ int popStack( Stack *stack ) { if (stack->tos < 0) { ePrintf( Runtime, "popStack: underflow" ); } stack->tos--; return stack->data[stack->tos+1]; } /* return nonzero if stack is not empty */ int isEmptyStack( Stack *stack ) { return (stack->tos == -1); } /* inStack: return true if item is in the stack */ int inStack( Stack *stack, int val ) { int i; for ( i = stack->tos; i > -1; i-- ) { if (stack->data[i] == val) { return 1; } } return 0; } /* pop all elements off the stack */ void clearStack( Stack *stack ) { stack->tos = -1; } /* destroy a stack */ void freeStack( Stack *stack ) { free( stack ); } usr/src/sdlBasic/src/sdlBrt/trace.c0000777000076500007660000000160710463131223014426 0ustar /* Name: trace.c Purpose: Code tracing for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ /* add a line of source code to the linked list */ int eAddSourceCode( int theFileNum, int theLineNum, char *text ) { SourceCode *link; /* fill in the link */ link = (SourceCode *)eMalloc( sizeof( SourceCode ) ); link->id = sourceLineCounter; link->fileNum = theFileNum; link->lineNum = theLineNum; link->text = eCopyString( text ); link->prior = lastSourceLink; lastSourceLink = link; return sourceLineCounter++; } /* search source for line of text */ SourceCode *eFindSource( int id ) { SourceCode *code; code = lastSourceLink; while (code != NULL) { if (code->id == id) { return code; } code = code->prior; } return NULL; } usr/src/sdlBasic/src/sdlBrt/sdlBrt_tab.y0000777000076500007660000011713710617646200015453 0ustar %{ /* comma: return a sequence of items to execute */ Node *comma( Node *node1, Node *node2 ) { return opNode( OpComma, node1, node2 ); } /* blockName: returns name of block */ char *blockName( int klass ) { switch(klass) { case -1: return eCopyString( "end-of-file" ); case For: return eCopyString( "End For/Next" ); case Function: return eCopyString( "End Function" ); case If: return eCopyString( "End If" ); case While: return eCopyString( "End While" ); case Do: return eCopyString( "Loop" ); case Select: return eCopyString( "End Select" ); case Sub: return eCopyString( "End Sub" ); default: return eCopyString("block"); } } /* checkBlockEnd: make sure the block ends correctly */ void checkBlockEnd(int got) { int wanted; //char *wantedName, *gotName; if (isEmptyStack(blockStack)) { switch (got) { case For: ePrintf( Syntax, "End For without For");break; case Function: ePrintf( Syntax, "End Function without Function");break; case If: ePrintf( Syntax, "End If without If");break; case While: ePrintf( Syntax, "End While without While");break; case Do: ePrintf( Syntax, "Loop without Do");break; case Select: ePrintf( Syntax, "End Select without Select");break; case Sub: ePrintf( Syntax, "End Sub without Sub");break; } } wanted = peekStack(blockStack); if (got != wanted){ ePrintf( Syntax, "expected %s, not %s", blockName(wanted), blockName(got)); } } %} /* %no_lines */ %union { int iValue; /* integer value */ Number fValue; /* float value */ char *strValue; /* string pointer */ Node *node; /* parse node */ Symbol *symbol; /* symbol */ } %token Integer %token Hex %token Float %token String %token FunctionName %token SubName %token ForwardSubName %token ForwardFunctionName %token BuiltinName %token ConstantName %token VariableName %token ArrayName %token TypeName %token ClassName %token MethodName %token Undefined %type block %type command %type statement %type elseIf %type expr %type argList %type argItems %type printList %type subList %type indexList %type cases %type caseTests %type caseTail %type loopTail %type dimList %type dimItem %type dimIndexList %type dimIndexItems %type indexListTail %type lval %type fileMode %type constList %type constItem %type fileHandle %token And %token Append %token As %token Call %token Case %token Class %token Close %token Common %token Const %token Continue %token Declare %token Default %token Delete %token Dim %token Do %token Each %token Else %token ElseIf %token End %token EndX %token Erase %token Error %token Exit %token Explicit %token For %token Function %token Get %token GetRef %token GoTo %token If %token In %token IncludeFile %token ZipIncludeFile %token Input %token Inv %token Is %token Let %token Line %token Loop %token Mod %token New %token Next %token NoConsole %token Not %token Or %token Open %token Option %token Output %token Preserve %token Print %token QBasic %token ReDim %token Return %token Select %token Set %token Shared %token Shl %token Shr %token Static %token Step %token Sub %token Then %token To %token Until %token Wend %token While %token With %token Xor /* two character tokens */ %token Ge %token Le %token Ne %token IncrSelf /* +=, -=, *=, /=, &= */ %nonassoc UMinus /* precedence, weakest to strongest */ %left And Or Xor %left In %left Eq Ne Lt Gt Le Ge %left '+' '-' '!' Not '&' '|' Mod Inv %left '*' '/' '\\' '%' Shl Shr %left '^' %% program: program statement { /* should be empty at this point */ if (!isEmptyStack(blockStack)) { checkBlockEnd(-1); } /* print error? */ if (errFlag) { ePrintf( Syntax, "syntax error"); } /* code? */ if ($2 != NULL) { /* defer or execute */ if (qBasicFlag) { if (deferredCode == NULL) { deferredCode = $2; } else { deferredCode = comma( deferredCode, $2 ); } } else { eval( $2 ); freeNode( $2 ); } } } | /* nothing */ { eval( deferredCode ); freeNode( deferredCode ); } ; block: End If { checkBlockEnd(If); $$ = NULL; } | End For { checkBlockEnd(For); $$ = NULL; } | End Function { clearStack( sharedStack ); checkBlockEnd(Function); $$ = NULL; } | End Sub { clearStack( sharedStack ); checkBlockEnd(Sub); $$ = NULL; } | End While { checkBlockEnd(While); $$ = NULL; } | Loop { checkBlockEnd(Do); $$ = NULL; } | End Select { checkBlockEnd(Select); $$ = NULL; } | Next { checkBlockEnd(For); $$ = NULL; } | Wend { checkBlockEnd(While); $$ = NULL; } | statement block { if (errFlag) { ePrintf( Syntax, "syntax error"); } if ($1 == NULL) { $$ = $2; } else { $$ = comma( $1, $2 ); } } | /* nothing */ { $$ = NULL; } ; statement: command { if ($$ != NULL) { $1->trace = parseLineId; } $$ = $1; } ; command: '~' expr '(' ')' sep { $$ = opNode( OpDestroy, $2, NULL ); } | '~' expr error { expected("("); } | '~' expr '(' error { expected(")"); } | expr sep { /* convert to call (drop result) */ switch ($1->op) { case OpMethod: $1->op = OpMethodCall; break; case OpClassMethod: $1->op = OpClassMethodCall; break; default: ePrintf( Syntax, "result of expression not assigned"); break; } $$ = $1; } | ConstantName Eq { ePrintf( Syntax, "duplicate definition of %s", $1->name); } | FunctionName Eq expr { if ($1 != currentScope || !inStack(blockStack,Function)) { ePrintf( Syntax, "assignment outside Function"); } $$ = opNode( OpReturnSetValue, $3, NULL ); } | FunctionName '(' { pushStack( argCountStack, 0 ); } argList sep { int args = popStack( argCountStack ); checkArgCount( $1, args ); $$ = symbolNode( OpFunctionCall, $1, $4, NULL ); } | SubName '(' { pushStack( argCountStack, 0 ); } argList sep { int args = popStack( argCountStack ); checkArgCount( $1, args ); $$ = symbolNode( OpFunctionCall, $1, $4, NULL ); } | ForwardFunctionName '(' { pushStack( argCountStack, 0 ); } argList sep { checkArgCount( $1, popStack( argCountStack ) ); $$ = symbolNode( OpFunctionCall, $1, $4, NULL ); } | ForwardSubName '(' { pushStack( argCountStack, 0 ); } argList sep { checkArgCount( $1, popStack( argCountStack ) ); $$ = symbolNode( OpFunctionCall, $1, $4, NULL ); } | FunctionName sep { if ($1->args != 0) { expected("'('"); } $$ = symbolNode( OpFunctionCall, $1, NULL, NULL ); } | SubName sep { if ($1->args != 0) { expected("'('"); } $$ = symbolNode( OpFunctionCall, $1, NULL, NULL ); } | ForwardFunctionName sep { if ($1->args != 0) { expected("'('"); } $$ = symbolNode( OpFunctionCall, $1, NULL, NULL ); } | ForwardSubName sep { if ($1->args != 0) { expected("'('"); } $$ = symbolNode( OpFunctionCall, $1, NULL, NULL ); } | BuiltinName '(' { pushStack( argCountStack, 0 ); } argList sep { int args = popStack( argCountStack ); checkArgCount( $1, args ); $$ = symbolNode( OpBuiltinCall, $1, $4, NULL ); } | BuiltinName sep { if ($1->args != 0) { expected("'('"); } $$ = symbolNode( OpBuiltinCall, $1, NULL, NULL ); } | Close fileHandle sep { $$ = opNode( OpClose, $2, NULL ); } | Close sep { $$ = opNode( OpClose, NULL, NULL ); } | Const constList sep { $$ = $2; } | Common { if (currentScope != NULL) { ePrintf( Syntax, "Can't use Common in Sub or Function" ); } commonFlag = 1; } dimList sep { $$ = $3; commonFlag = 0; } | Continue sep { if (!inStack(blockStack,For) && !inStack(blockStack,While)) { ePrintf( Syntax, "Continue outside For or While"); } $$ = opNode( OpContinue, NULL, NULL ); } | Delete expr sep { $$ = opNode( OpDelete, $2, NULL ); } /* same as Dim Common */ | Dim Common { if (currentScope != NULL) { ePrintf( Syntax, "Can't use Common in Sub or Function" ); } commonFlag = 1; } dimList sep { $$ = $4; commonFlag = 0; } /* same as Shared */ | Dim Shared { if (currentScope == NULL) { ePrintf( Syntax, "Shared illegal outside Sub or Function"); } pushStack(blockStack, (int)currentScope ); currentScope = NULL; } sharedList sep { currentScope = (Symbol *)popStack(blockStack); $$ = NULL; } | Dim dimList sep { $$ = $2; } | EndX sep { $$ = opNode( OpEnd, NULL, NULL ); } | Erase ArrayName optBrackets sep { $$ = symbolNode( OpErase, $2, NULL, NULL ); } | Erase ArrayName '[' indexList sep { checkArgCount( $2, popStack( argCountStack ) ); $$ = symbolNode( OpErase, $2, $4, NULL ); } | Exit Do { if (!inStack(blockStack,Do)) { ePrintf( Syntax, "Exit outside Do loop"); } $$ = opNode( OpExitDo, NULL, NULL ); } | Exit For { if (!inStack(blockStack,For)) { ePrintf( Syntax, "Exit outside For loop"); } $$ = opNode( OpExitFor, NULL, NULL ); } | Exit Function { if (!inStack(blockStack,Function)) { ePrintf( Syntax, "Exit Function outside Function"); } $$ = opNode( OpExitRoutine, NULL, NULL ); } | Exit Sub { if (!inStack(blockStack,Sub)) { ePrintf( Syntax, "Exit Sub outside Sub"); } $$ = opNode( OpExitRoutine, NULL, NULL ); } | Exit While { if (!inStack(blockStack,While)) { ePrintf( Syntax, "Exit outside While loop"); } $$ = opNode( OpExitWhile, NULL, NULL ); } | Exit error { expected("Do, For, Sub, Function or While"); } /* If Then ... ElseIf ... Else ... End If */ | If { pushStack(blockStack,If); } expr Then sep block elseIf sep { popStack(blockStack); $$ = opNode( OpIf, opNode( OpIfTrue, $3, $6 ), $7 ); } /* For Each In */ | For Each VariableName In ArrayName optBrackets { pushStack(blockStack,For); } sep block { popStack(blockStack); $$ = symbolNode( OpForEach, $3, symbolNode( OpNoOp, $5, NULL, NULL ), $9 ); } | For Each VariableName In error { expected("an Array"); } | For Each Undefined In ArrayName { pushStack(blockStack,For); } sep block { popStack(blockStack); $$ = symbolNode( OpForEach, returnVar($3, SYM_VARIABLE, 0), symbolNode( OpNoOp, $5, NULL, NULL ), $8 ); } | For Each Undefined In error { expected("an Array"); } | For Each VariableName error { expected("In"); } | For Each Undefined error { expected("In"); } | For Each error { expected("a variable"); } /* For = To [step ] ... next */ | For VariableName { pushStack(blockStack,For); } loopTail sep { popStack(blockStack); $4->value.symbol = $2; $$ = $4; } | For Undefined { pushStack(blockStack,For); returnVar($2, SYM_VARIABLE, 0); } loopTail sep { popStack(blockStack); $4->value.symbol = findSymbol($2, currentScope); free( $2 ); $$ = $4; } | For error { expected("Each or a variable"); } | Declare Function Undefined { if (currentScope != NULL) { ePrintf( Syntax, "can't define function %s in %s", $3, currentScope->name ); } currentScope = addSymbol( $3, NULL, SYM_FUNCTION ); } parmlist sep { currentScope->code = NULL; currentScope->forward = 1; $$ = NULL; free( $3 ); currentScope = NULL; } | Declare Sub Undefined { if (currentScope != NULL) { ePrintf( Syntax, "can't define Sub %s in %s", $3, currentScope->name ); } currentScope = addSymbol( $3, NULL, SYM_SUB ); } parmlist sep { currentScope->code = NULL; currentScope->forward = 1; $$ = NULL; free( $3 ); currentScope = NULL; } | Declare error { expected("sub or function"); } | Function Undefined { if (currentScope != NULL) { ePrintf( Syntax, "can't define Function %s in %s", $2, currentScope->name ); } currentScope = addSymbol( $2, NULL, SYM_FUNCTION ); pushStack( blockStack, Function ); } parmlist sep block sep { popStack( blockStack ); currentScope->code = $6; $$ = NULL; free( $2 ); currentScope = NULL; } | Sub Undefined { if (currentScope != NULL) { ePrintf( Syntax, "can't define Sub %s in %s", $2, currentScope->name ); } currentScope = addSymbol( $2, NULL, SYM_SUB ); pushStack( blockStack, Sub ); } parmlist sep block sep { popStack( blockStack ); currentScope->code = $6; $$ = NULL; free( $2 ); currentScope = NULL; } | Function FunctionName { if (currentScope != NULL) { ePrintf( Syntax, "can't define Function %s in %s", $2->name, currentScope->name ); } if (!$2->forward) { ePrintf( Syntax, "function %s has already been declared", $2->name ); } currentScope = $2; pushStack( argCountStack, 0 ); } declaredList { if (popStack( argCountStack ) != currentScope->args) { ePrintf( Syntax, "%s arg count does not match declaration - too few args", currentScope->name); } pushStack( blockStack, Function ); } block sep { popStack( blockStack ); currentScope->code = $6; currentScope->forward = 0; $$ = NULL; currentScope = NULL; } | Function ForwardFunctionName { if (currentScope != NULL) { ePrintf( Syntax, "can't define Function %s in %s", $2->name, currentScope->name ); } /* change to function */ $2->symboltype = SYM_FUNCTION; currentScope = $2; pushStack( blockStack, Function ); /* save var count and clear */ pushStack( argCountStack, currentScope->args); currentScope->args = 0; } parmlist sep block sep { checkArgCount( $2, popStack( argCountStack ) ); popStack( blockStack ); currentScope->code = $6; currentScope->forward = 0; $$ = NULL; currentScope = NULL; } | Sub SubName { if (currentScope != NULL) { ePrintf( Syntax, "can't define Sub %s in %s", $2->name, currentScope->name ); } if (!$2->forward) { ePrintf( Syntax, "sub %s has already been declared", $2->name ); } currentScope = $2; pushStack( argCountStack, 0 ); } declaredList { if (popStack( argCountStack ) != currentScope->args) { ePrintf( Syntax, "%s arg count does not match declaration - too few args", currentScope->name); } pushStack( blockStack, Sub ); } block sep { popStack( blockStack ); currentScope->code = $6; currentScope->forward = 0; $$ = NULL; currentScope = NULL; } | Sub ForwardSubName { if (currentScope != NULL) { ePrintf( Syntax, "can't define Sub %s in %s", $2->name, currentScope->name ); } /* change to sub */ $2->symboltype = SYM_SUB; currentScope = $2; pushStack( blockStack, Sub ); /* save var count and clear */ pushStack( argCountStack, currentScope->args); currentScope->args = 0; } parmlist sep block sep { checkArgCount( $2, popStack( argCountStack ) ); popStack( blockStack ); currentScope->code = $6; currentScope->forward = 0; $$ = NULL; currentScope = NULL; } | Function error { expected("Function name"); } | Sub error { expected("Sub name"); } | IncludeFile String sep { pushIncludeFile( eCopyString($2), 0 ); $$ = NULL; free( $2 ); } | ZipIncludeFile String ',' String sep { pushZipIncludeFile( eCopyString($2), eCopyString($4), 0 ); $$ = NULL; free( $2 ); } | Line Input fileHandle ',' lval sep { /* set into lval */ $5->right = intNode( OpInput, 1, $3, NULL ); $$ = $5; } | Input fileHandle ',' lval sep { /* set into lval */ $4->right = intNode( OpInput, 1, $2, NULL ); $$ = $4; } | Line Input fileHandle error { expected(", "); } | Open expr For fileMode As fileHandle sep { $$ = intNode( OpOpen, $4, $2, $6 ); } | Open expr For fileMode As error { expected("#"); } | Open expr error { expected("For"); } | Option Explicit { explicitFlag = 1; $$ = NULL; } | Option NoConsole { consoleFlag = 0; $$ = NULL; } | Option QBasic { qBasicFlag = 1; $$ = NULL; } | Print printList sep { $$ = opNode( OpPrint, NULL, $2 ); } | '?' printList sep { $$ = opNode( OpPrint, NULL, $2 ); } | Print '#' expr ',' printList sep { $$ = opNode( OpPrint, $3, $5 ); } | Line Output fileHandle ',' printList sep { $$ = opNode( OpPrint, $3, $5 ); } | Print '#' expr error { expected(", "); } | Return ArrayName '\n' { ePrintf( Syntax, "array values cannot be returned" ); } | Return ArrayName optBrackets '\n' { ePrintf( Syntax, "array values cannot be returned" ); } | Return expr sep { if (!inStack(blockStack,Function)) { ePrintf( Syntax, "Return outside Function"); } $$ = opNode( OpReturnValue, $2, NULL ); } | Return sep { if (!inStack(blockStack,Sub) && !inStack(blockStack,Function)) { ePrintf( Syntax, "Return outside Sub or Function"); } $$ = opNode( OpExitRoutine, NULL, NULL ); } | Select Case { pushStack(blockStack,Select); } expr sep cases sep { popStack(blockStack); $$ = opNode( OpCaseSelect, $4, $6 ); } | Select error { expected( "Case" ); } | Shared { if (currentScope == NULL) { ePrintf( Syntax, "Shared illegal outside Sub or Function"); } pushStack(blockStack, (int)currentScope ); currentScope = NULL; } sharedList sep { currentScope = (Symbol *)popStack(blockStack); $$ = NULL; } | While { pushStack(blockStack,While); } expr sep block sep { popStack(blockStack); $$ = opNode( OpWhile, $3, $5 ); } | Do { pushStack(blockStack,Do); } sep block sep { popStack(blockStack); $$=opNode(OpDo,NULL, $4); } | lval Eq expr sep { $1->right = $3; $$ = $1; } | lval IncrSelf expr sep { /* simple var or array? */ switch ($1->op) { case OpAssign: /* create a node to hold the operation */ $1->right = opNode( $2, symbolNode( OpVar, $1->value.symbol, NULL, NULL ), $3 ); break; case OpArraySet: /* create a node to hold the operation */ $1->right = opNode( $2, symbolNode( OpArrayGet, $1->value.symbol, $1->left, NULL ), $3 ); break; default: ePrintf( Syntax, "IncrSelf: can't apply operation to %s", $2, $1->value.symbol->name ); break; } /* value to assign */ $$ = $1; } /* obvious errors */ /* old version | Undefined '(' { ePrintf( Syntax, "%s() is not defined", $1 ); } */ | Undefined '(' { pushStack( argCountStack, 0 ); } argList sep { Symbol *s = addSymbol( $1, NULL, SYM_FORWARD_SUB ); s->forward = 1; s->code = NULL; s->args = popStack( argCountStack ); free( $1 ); $$ = symbolNode( OpFunctionCall, s, $4, NULL ); } | sep { $$ = NULL; } ; /* Note: the value to be assigned to the LVAL is */ /* placed in the right node, not the left */ lval: Undefined { $$ = symbolNode( OpAssign, returnVar($1, SYM_VARIABLE, 0), NULL, NULL ); free( $1 ); } | VariableName { $$ = symbolNode( OpAssign, $1, NULL, NULL ); } | ArrayName '[' indexList { checkArgCount( $1, popStack( argCountStack ) ); $$ = symbolNode( OpArraySet, $1, $3, NULL ); } | ArrayName error { expected("'['"); } ; sep: '\n' | ':' | error { if (strcmp(currtok, "end-of-file") == 0 ) { checkBlockEnd(-1); } expected("end-of-line" ); } ; eq: Eq | error { expected("'='"); } ; elseIf: ElseIf expr Then sep block elseIf { $$ = opNode( OpIf, opNode( OpIfTrue, $2, $5 ), $6 ); } | Else sep block { $$ = $3; } | /* none */ { $$ = NULL; } ; cases: Case caseTests sep block cases { $$ = comma( comma( $2, $4 ), $5 ); } | Case Else sep block { $$ = comma( comma( opNode( OpCaseElse, NULL, NULL ), $4 ), NULL ); } | /* nothing */ { $$ = NULL; } ; caseTests: expr To expr caseTail { $$ = opNode( OpCaseRange, comma( $1, $3 ), $4 ); } | expr caseTail { $$ = intNode( OpCaseCmp, EQ, $1, $2 ); } | Is Eq expr caseTail { $$ = intNode( OpCaseCmp, EQ, $3, $4 ); } | Is Ne expr caseTail { $$ = intNode( OpCaseCmp, NE, $3, $4 ); } | Is Gt expr caseTail { $$ = intNode( OpCaseCmp, GT, $3, $4 ); } | Is Lt expr caseTail { $$ = intNode( OpCaseCmp, LT, $3, $4 ); } | Is Le expr caseTail { $$ = intNode( OpCaseCmp, LE, $3, $4 ); } | Is Ge expr caseTail { $$ = intNode( OpCaseCmp, GE, $3, $4 ); } ; caseTail: ',' caseTests { $$ = $2; } | /* nothing */ { $$ = NULL; } ; expr: '(' expr ')' { $$ = $2; } /* precedence 1 */ | expr '^' optSep expr { $$ = opNode( OpPower, $1, $4 ); } | '-' expr %prec UMinus { $$ = opNode( OpNegate, $2, NULL ); } /* precedence 2 */ | expr '*' optSep expr { $$ = opNode( OpMul, $1, $4 ); } | expr '/' optSep expr { $$ = opNode( OpDiv, $1, $4 ); } | expr '\\' optSep expr { $$ = opNode( OpIDiv, $1, $4 ); } | expr '%' optSep expr { $$ = opNode( OpMod, $1, $4 ); } | expr Shl optSep expr { $$ = opNode( OpShl, $1, $4 ); } | expr Shr optSep expr { $$ = opNode( OpShr, $1, $4 ); } /* precedence 3 */ | expr Mod optSep expr { $$ = opNode( OpMod, $1, $4 ); } | expr Inv optSep expr { $$ = opNode( OpInv, $1, $4 ); } /* precedence 4 */ | expr '+' optSep expr { $$ = opNode( OpAdd, $1, $4 ); } | expr '&' optSep expr { $$ = opNode( OpConcat, $1, $4 ); } | expr '-' optSep expr { $$ = opNode( OpSub, $1, $4 ); } | expr '|' optSep expr { $$ = opNode( OpOrBits, $1, $4 ); } /* precedence 5 */ | expr Eq optSep expr { $$ = intNode( OpCmp, EQ, $1, $4 ); } | expr Ne optSep expr { $$ = intNode( OpCmp, NE, $1, $4 ); } | expr Lt optSep expr { $$ = intNode( OpCmp, LT, $1, $4 ); } | expr Gt optSep expr { $$ = intNode( OpCmp, GT, $1, $4 ); } | expr Le optSep expr { $$ = intNode( OpCmp, LE, $1, $4 ); } | expr Ge optSep expr { $$ = intNode( OpCmp, GE, $1, $4 ); } /* precedence 6 */ | Not expr { $$ = opNode( OpNot, $2, NULL ); } | '!' expr { $$ = opNode( OpNot, $2, NULL ); } /* precedence 7 */ | expr And optSep expr { $$ = opNode( OpAnd, $1, $4 ); } /* precedence 8 */ | expr Or optSep expr { $$ = opNode( OpOr, $1, $4 ); } /* precedence 9 */ | expr Xor optSep expr { $$ = opNode( OpXor, $1, $4 ); } | expr In optSep ArrayName optBrackets { $$ = symbolNode( OpIn, $4, $1, NULL ); } /* precedence 10 */ | ClassName MethodName '(' { pushStack( argCountStack, 0 ); } argList { popStack( argCountStack ); $$ = stringNode( OpClassMethod, $2, symbolNode( OpComma, $1, NULL, NULL ), $5 ); } | ClassName MethodName { $$ = stringNode( OpClassMethod, $2, symbolNode( OpComma, $1, NULL, NULL ), NULL ); } | expr MethodName '(' { pushStack( argCountStack, 0 ); } argList { popStack( argCountStack ); $$ = stringNode( OpMethod, $2, $1, $5 ); } | expr MethodName { $$ = stringNode( OpMethod, $2, $1, NULL ); } /* lowest precedence */ | New ClassName '(' { pushStack( argCountStack, 0 ); } argList { popStack( argCountStack ); $$ = symbolNode( OpNew, $2, $5, NULL ); } | New ClassName { $$ = symbolNode( OpNew, $2, NULL, NULL ); } | New { expected("a Class"); } | ClassName '(' { if (!classSafeOnStack( $1->klass )) { ePrintf( Syntax, "Can't create %s on stack", $1->name ); } pushStack( argCountStack, 0 ); } argList { popStack( argCountStack ); $$ = symbolNode( OpNewTmp, $1, $4, NULL ); } | ClassName { expected("("); } | Undefined { $$ = symbolNode( OpVar, returnVar($1, SYM_VARIABLE, 0), NULL, NULL ); free($1); } | VariableName { $$ = symbolNode( OpVar, $1, NULL, NULL ); } | ArrayName optBrackets { $$ = symbolNode( OpArrayPtr, $1, NULL, NULL ); } | ArrayName '[' indexList { int args = popStack( argCountStack ); checkArgCount( $1, args ); $$ = symbolNode( OpArrayGet, $1, $3, NULL ); } | ArrayName { expected("'['"); } | ConstantName { $$ = symbolNode( OpConstGet, $1, NULL, NULL ); } | Integer { $$ = intNode( OpInt, $1, NULL, NULL ); } | Float { $$ = floatNode( OpFloat, $1, NULL, NULL ); } | String { $$ = stringNode( OpString, $1, NULL, NULL ); } | BuiltinName '(' { pushStack( argCountStack, 0 ); } argList { int args = popStack( argCountStack ); checkArgCount( $1, args ); $$ = symbolNode( OpBuiltin, $1, $4, NULL ); } | BuiltinName { checkArgCount( $1, 0 ); $$ = symbolNode( OpBuiltin, $1, NULL, NULL ); } | BuiltinName error { expected("'('"); } | FunctionName '(' { pushStack( argCountStack, 0 ); } argList { int args = popStack( argCountStack ); checkArgCount( $1, args ); $$ = symbolNode( OpFunction, $1, $4, NULL ); } | FunctionName { checkArgCount( $1, 0 ); $$ = symbolNode( OpFunction, $1, NULL, NULL ); } | FunctionName error { expected("'('"); } | ForwardFunctionName '(' { pushStack( argCountStack, 0 ); } argList { int args = popStack( argCountStack ); checkArgCount( $1, args ); $$ = symbolNode( OpFunction, $1, $4, NULL ); } | ForwardFunctionName error { expected("'('"); } | Undefined '(' { pushStack( argCountStack, 0 ); } argList { Symbol *s = addSymbol( $1, NULL, SYM_FORWARD_FUNCTION ); s->forward = 1; s->code = NULL; s->args = popStack( argCountStack ); free( $1 ); $$ = symbolNode( OpFunction, s, $4, NULL ); } | error { expected("an expression"); } ; argList: ')' { $$ = NULL; } | argItems ')' { $$ = $1; } | argItems error { expected("')'"); } ; argItems: expr ',' optSep argItems { incrStack( argCountStack, 1 ); $$ = comma( $1, $4 ); } | expr { incrStack( argCountStack, 1 ); $$ = $1; } | error { expected("an expression"); } ; subList: expr ',' optSep subList { incrStack( argCountStack, 1 ); $$ = comma( $1, $4 ); } | expr { incrStack( argCountStack, 1 ); $$ = $1; } | /* nothing */ { $$ = NULL } ; parmlist: | '(' ')' | '(' parmitem | /* nothing */ ; parmitem: Undefined '[' ']' { createParm( $1, SYM_ARRAY ); free( $1 ); } parmtail | VariableName '[' ']' { createParm( $1->name, SYM_ARRAY ); } parmtail | ArrayName '[' ']' { createParm( $1->name, SYM_ARRAY ); } parmtail | Undefined { createParm( $1, SYM_VARIABLE ); free( $1 ); } parmtail | VariableName { createParm( $1->name, SYM_VARIABLE ); } parmtail | ArrayName { createParm( $1->name, SYM_VARIABLE ); } parmtail | '.' '.' '.' ')' { currentScope->optargs = NOPTARGS; } | /* nothing */ { expected("a parameter name"); } ; parmtail: ',' optSep parmitem | ')' | error { expected("')'"); } ; loopTail: Eq expr To expr Step expr sep block { $$ = symbolNode( OpForStep, NULL, comma( $2, comma($4, $6) ), $8 ); } | Eq expr To expr Step expr sep block { $$ = symbolNode( OpForStep, NULL, comma( $2, comma($4, $6) ), $8 ); } | Eq expr To expr sep block { $$ = symbolNode( OpFor, NULL, comma( $2, $4 ), $6 ); } | Eq expr To expr sep block { $$ = symbolNode( OpFor, NULL, comma( $2, $4 ), $6 ); } | Eq expr To expr error { expected("Step"); } | Eq expr error { expected("To"); } | error { expected("'='"); } ; printList: ';' printList { $$ = $2; } | ',' printList { $$ = intNode( OpPrintValue, PRINT_TAB, NULL, $2 ); } | expr ',' printList { $$ = intNode( OpPrintValue, PRINT_TAB, $1, $3 ); } | expr ';' printList { $$ = intNode( OpPrintValue, PRINT, $1, $3 ); } | expr { $$ = intNode( OpPrintValue, PRINT_NEWLINE, $1, NULL ); } | /* nothing */ { $$ = NULL; } ; indexList: { pushStack( argCountStack, 0 ); } indexListTail { int args = peekStack( argCountStack ); $$ = comma( $2, intNode( OpInt, args, NULL, NULL ) ); } ; /* place items on stack in fifo order */ indexListTail: expr ']' { incrStack( argCountStack, 1 ); $$ = comma( $1, NULL ); } | expr ',' optSep indexListTail { incrStack( argCountStack, 1 ); $$ = comma( $4, $1 ); } ; dimList: dimItem ',' optSep dimList { if ($1==NULL) { $$ = $4; } else if ($4==NULL) { $$ = $1; } else { $$ = comma( $1, $4 ); } } | dimItem { $$ = $1; } ; dimItem: Undefined '[' ']' { Symbol *s = createArraySymbol( $1, 0 ); $$ = symbolNode( OpInitArray, s, NULL, NULL ); free( $1 ); } | Undefined '[' dimIndexList { int args = popStack( argCountStack ); Symbol *s = createArraySymbol( $1, args ); $$ = symbolNode( OpInitArray, s, $3, NULL ); free( $1 ); } | VariableName '[' ']' { Symbol *s = createArraySymbol( $1->name, 0 ); $$ = symbolNode( OpInitArray, s, NULL, NULL ); } | VariableName '[' dimIndexList { int args = popStack( argCountStack ); Symbol *s = createArraySymbol( $1->name, args ); $$ = symbolNode( OpInitArray, s, $3, NULL ); } | ArrayName '[' ']' { Symbol *s = createArraySymbol( $1->name, 0 ); $$ = symbolNode( OpInitArray, s, NULL, NULL ); } | ArrayName '[' dimIndexList { int args = popStack( argCountStack ); Symbol *s = createArraySymbol( $1->name, args ); $$ = symbolNode( OpInitArray, s, $3, NULL ); } | Undefined Eq expr { $$ = symbolNode( OpAssign, returnVar($1, SYM_VARIABLE, 1), NULL, $3 ); free( $1 ); } | Undefined { returnVar($1, SYM_VARIABLE, 1); free( $1 ); $$ = NULL; } | VariableName Eq expr { $$ = symbolNode( OpAssign, returnVar($1->name, SYM_VARIABLE, 1), NULL, $3 ); } | VariableName { returnVar($1->name, SYM_VARIABLE, 1); $$ = NULL; } | ArrayName Eq expr { $$ = symbolNode( OpAssign, returnVar($1->name, SYM_VARIABLE, 1), NULL, $3 ); } | ArrayName { returnVar($1->name, SYM_VARIABLE, 1); $$ = NULL; } | error { expected("a name"); } ; /* expr To expr | expr */ dimIndexList: { pushStack( argCountStack, 0 ); } dimIndexItems { int args = peekStack( argCountStack ); $$ = comma( $2, intNode( OpInt, args, NULL, NULL ) ); } ; dimIndexItems: expr ']' { incrStack( argCountStack, 1 ); $$ = comma( $1, intNode( OpInt, 0, NULL, NULL) ); } | expr To expr ']' { incrStack( argCountStack, 1 ); $$ = comma( $3, $1 ); } | expr To expr ',' optSep dimIndexItems { incrStack( argCountStack, 1 ); $$ = comma( $6, comma( $3, $1) ); } | expr ',' optSep dimIndexItems { incrStack( argCountStack, 1 ); $$ = comma( $4, comma( $1, intNode( OpInt, 0, NULL, NULL)) ); } ; sharedList: sharedItem ',' optSep sharedList | sharedItem ; sharedItem: VariableName { if ($1->scope != NULL) { ePrintf( Syntax, "Can't share local variable %s", $1->name ); } else if (inStack(sharedStack,(int)$1)) { ePrintf( Syntax, "Variable %s is already shared", $1->name ); } else { pushStack( sharedStack, (int)$1 ); } } | ArrayName '[' ']' { if ($1->scope != NULL) { ePrintf( Syntax, "Can't share local array %s", $1->name ); } else if (inStack(sharedStack,(int)$1)) { ePrintf( Syntax, "Array %s is already shared", $1->name ); } else { pushStack( sharedStack, (int)$1 ); } } | ArrayName '[' error { expected("']'"); } | ArrayName error { expected("'['"); } | error { expected("a variable name"); } ; declaredList: | '(' ')' | '(' declaredItem | /* nothing */ ; declaredItem: ')' | VariableName ')' { incrStack( argCountStack, 1 ); if ($1->stackPos != peekStack(argCountStack) ) { ePrintf( Syntax, "variable %s does not match declaration", $1->name); } } | VariableName ',' optSep { incrStack( argCountStack, 1 ); if ($1->stackPos != peekStack(argCountStack) ) { ePrintf( Syntax, "variable %s does not match declaration", $1->name); } } declaredItem | VariableName error { ePrintf( Syntax, "parm list does not match declaration" ); } | ArrayName '[' ']' ')' { incrStack( argCountStack, 1 ); if ($1->stackPos != peekStack(argCountStack) ) { ePrintf( Syntax, "array %s does not match declaration", $1->name); } } | ArrayName '[' ']' ',' optSep { incrStack( argCountStack, 1 ); if ($1->stackPos != peekStack(argCountStack) ) { ePrintf( Syntax, "array %s does not match declaration", $1->name); } } declaredItem | ArrayName '[' ']' error { ePrintf( Syntax, "parm list does not match declaration" ); } | ArrayName '[' error { expected("']'"); } | ArrayName error { expected("'['"); } | '.' '.' '.' ')' { if (currentScope->optargs != NOPTARGS) { ePrintf( Syntax, "... does not match declaration" ); } } | error { ePrintf( Syntax, "parm list does not match declaration" ); } ; optSep: '\n' | /* nothing */ ; optBrackets : /* nothing */ | '[' ']' ; fileMode: Input { $$ = FILE_MODE_INPUT; } | Output { $$ = FILE_MODE_OUTPUT; } | Append { $$ = FILE_MODE_APPEND; } | error { expected("a file mode: Input, Output or Append"); } ; constList: constItem ',' optSep constList { if ($4 == NULL) { $$ = $1; } else { $$ = comma( $1, $4 ); } } | constItem { $$ = $1; } ; constItem: Undefined Eq expr { $$ = symbolNode( OpConstSet, createConst( $1 ), $3, NULL ); free( $1 ); } | Undefined error { expected("'='"); } | error { ePrintf( Syntax, "duplicate definition"); } ; fileHandle : '#' expr { $$ = $2; } | expr { $$ = $1; } ; usr/src/sdlBasic/src/sdlBrt/node.h0000777000076500007660000000142110463131106014254 0ustar /* node.h parse tree data structure for wxScript (c) 2001 David Cuny dcuny@lanset.com */ struct Node { int op; /* operation */ union { int iValue; /* integer data */ Number fValue; /* float data */ char *string; /* string */ Symbol *symbol; /* symbol */ } value; int trace; Node *left; Node *right; Node *next; }; Node *opNode( int op, Node *left, Node *right ); Node *intNode( int op, int value, Node *left, Node *right ); Node *floatNode( int op, Number value, Node *left, Node *right ); Node *stringNode( int op, char *string, Node *left, Node *right ); Node *symbolNode( int op, Symbol *symbol, Node *left, Node *right ); void freeNode( Node *node ); usr/src/sdlBasic/src/sdlBrt/resource.h0000777000076500007660000000115010463131106015155 0ustar //{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by Script1.rc // #define IDI_ICON1 101 #define IDI_ICON2 102 #define IDI_ICON3 104 #define IDI_ICON4 105 #define IDI_ICON5 106 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 107 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif usr/src/sdlBasic/src/sdlBrt/builtin.h0000755000076500007660000010303710637400251015002 0ustar /* Name: builtin.h Purpose: builtin routines for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ void notYet( char *name); void basPrintStack(void); void basConcat(void); void basConvBase(void); void basIndexes(void); //_________________________________________________________________________________________________________________________ // Run time void basArgument(void); void basArgc(void); void basArgv(void); void basCommand(void); void basSetEnv(void); void basGetEnv(void); void basRun(void); void basShell(void); void basStop(void); //_________________________________________________________________________________________________________________________ // Array void basLBound(void); void basQuickSort(void); void basUBound(void); //_________________________________________________________________________________________________________________________ //Strings void basAsc(void); void basChr(void); void basFormat(void); void basInsert(void); void basInstr(void); void basLCase(void); void basLeft(void); void basLen(void); void basLTrim(void); void basMid(void); void basReplace(void); void basReplaceSubStr(void); void basReverse(void); void basRight(void); void basRInstr(void); void basRTrim(void); void basSpace(void); void basStr(void); void basStrF(void); void basString(void); void basTrim(void); void basTally(void); void basTypeOf(void); void basUCase(void); void basVal(void); //_________________________________________________________________________________________________________________________ //Maths void basAbs(void); void basACos(void); void basASin(void); void basATan(void); void basBin(void); void basCos(void); void basExp(void); void basFix(void); void basFrac(void); void basHex(void); void basInt(void); void basLog(void); void basRandomize(void); void basRnd(void); void basRound(void); void basSgn(void); void basSin(void); void basSqr(void); void basTan(void); void basMin(void); void basMax(void); void basBitwiseAnd(void); void basBitwiseOr(void); void basBitwiseXor(void); //_________________________________________________________________________________________________________________________ //Files void basEof(void); void basFileExists(void); void basFileCopy(void); void basFileMove(void); void basFileRename(void); void basFreeFile(void); void basKill(void); void basLoc(void); void basLof(void); void basReadByte(void); void basSeek(void); void basWriteByte(void); //_________________________________________________________________________________________________________________________ //Dirs void basChDir(void); void basDir(void); void basDirExists(void); void basDirFirst(void); void basDirNext(void); void basMkDir(void); void basRmDir(void); //_________________________________________________________________________________________________________________________ //Data function support void basData(void); void basRead(void); //_________________________________________________________________________________________________________________________ //Date and time void basDate(void); void basTicks(void); void basTime(void); //_________________________________________________________________________________________________________________________ //Memory Bank void basReserveBank(void); void basBaseImage(void); void basBaseImageCC(void); void basBaseScreen(void); void basBaseSound(void); void basFreeBase(void); void basFreeBank(void); void basCopyBank(void); void basLoadBank(void); void basSaveBank(void); void basSetBank(void); void basSizeBank(void); void basPoke(void); void basDoke(void); void basLoke(void); void basPeek(void); void basDeek(void); void basLeek(void); void basMemCopy(void); //_________________________________________________________________________________________________________________________ // //---- SDLengine -------------------------------------------------------------------------------------------------- //_________________________________________________________________________________________________________________________ // Screen void basSetDefaults(void); void basSetDisplay(void); void basSetAlphaChannel(void); void basSetCaption(void); void basCaption(void); void basDisplayMode(void); void basDisplayWidth(void); void basDisplayHeight(void); void basDisplayBpp(void); void basScreen(void); void basScreenZ(void); void basLastScreen(void); void basDirectScreen(void); void basScreenOpen(void); void basScreenClose(void); void basScreenClone(void); void basScreenCopy(void); void basScreenFade(void); void basScreenFadein(void); void basScreenCrossFade(void); void basScreenAlpha(void); void basScreenLock(void); void basScreenUnlock(void); void basScreenRect(void); void basXScreenRect(void); void basYScreenRect(void); void basWScreenRect(void); void basHScreenRect(void); void basFlagScreenRect(void); void basScreenWidth(void); void basScreenHeight(void); void basOffset(void); void basXOffset(void); void basYOffset(void); void basCls(void); void basScreenSwap(void); void basAutoBack(void); void basDualPlayfield(void); void basWaitVbl(void); void basFps(void); //_________________________________________________________________________________________________________________________ // Graphics void basRgb(void); void basEnablePalette(void); void basColor(void); void basPalette(void); void basColorCycling(void); void basInk(void); void basPoint(void); void basDot(void); void basPlot(void); void basLine(void); void basBox(void); void basBar(void); void basRectangle(void); void basCircle(void); void basFillCircle(void); void basEllipse(void); void basFillEllipse(void); void basPaint(void); void basTriangle(void); void basPolyLine(void); void basPolyGon(void); //_________________________________________________________________________________________________________________________ // File graphics input output void basLoadImage(void); void basLoadZipImage(void); void basSaveImage(void); void basLoadSound(void); void basLoadZipSound(void); void basSaveSound(void); void basLoadMusic(void); void basLoadZipMusic(void); //_________________________________________________________________________________________________________________________ // Image manipulation void basHotSpot(void); void basSetColorKey(void); void basImageExists(void); void basImageWidth(void); void basImageHeight(void); void basDeleteImage(void); void basCopyImage(void); void basSetAlpha(void); void basZoomImage(void); void basRotateImage(void); void basRotozoomImage(void); void basMirrorImage(void); //_________________________________________________________________________________________________________________________ // Blitting void basBlt(void); void basPasteBob(void); void basPasteIcon(void); void basGrab(void); //_________________________________________________________________________________________________________________________ // Sprite system void basSpriteClip(void); void basSprite(void); void basDeleteSprite(void); void basXSprite(void); void basYSprite(void); void basSpriteWidth(void); void basSpriteHeight(void); void basFrSprite(void); void basLiveSprite(void); void basSpriteHit(void); void basSpriteZ(void); void basLastSprite(void); void basAutoUpdateSprite(void); void basUpdateSprite(void); //_________________________________________________________________________________________________________________________ // Bob system void basSetBob(void); void basBob(void); void basDeleteBob(void); void basXBob(void); void basYBob(void); void basBobWidth(void); void basBobHeight(void); void basFrBob(void); void basLiveBob(void); void basBobHit(void); void basBobZ(void); void basLastBob(void); void basAutoUpdateBob(void); void basUpdateBob(void); //_________________________________________________________________________________________________________________________ //Text draw void basText(void); void basSetFont(void); void basGetFont(void); void basTextRender(void); //_________________________________________________________________________________________________________________________ // Print screen void basPen(void); void basPaper(void); void basfPrints(void); void basPrints(void); void basLocate(void); void basAtx(void); void basAty(void); void basCursOn(void); void basCursOff(void); void basInputs(void); void basZoneInputs(void); //_________________________________________________________________________________________________________________________ // Sounds and music void basIsEnabledSound(void); void basSoundExists(void); void basDeleteSound(void); void basCopySound(void); void basMusicExists(void); void basPlaySound(void); void basPlayFreqSound(void); void basVolumeSound(void); void basStopSound(void); void basPauseSound(void); void basResumeSound(void); void basVuMeterSound(void); void basPositionSound(void); void basSoundChannels(void); void basPlayMusic(void); void basPositionMusic(void); void basStopMusic(void); void basPauseMusic(void); void basResumeMusic(void); void basRewindMusic(void); void basFadeMusic(void); void basVolumeMusic(void); void basSpeedMusic(void); //_________________________________________________________________________________________________________________________ // CD support void basNumDrivesCD(void); void basNameCD(void); void basOpenCD(void); void basInDriveCD(void); void basTracksCD(void); void basCurTrackCD(void); void basCurFrameCD(void); void basPlayCD(void); void basPlayTracksCD(void); void basPauseCD(void); void basResumeCD(void); void basStopCD(void); void basEjectCD(void); void basCloseCD(void); void basTrackTypeCD(void); void basTrackLengthCD(void); void basTrackOffsetCD(void); //________________________________________________________________________________________________________________________ // Video mpeg void basLoadMpeg(void); void basPlayMpeg(void); void basStopMpeg(void); void basDeleteMpeg(void); void basPauseMpeg(void); void basRewindMpeg(void); void basSeekMpeg(void); void basSkipMpeg(void); void basStatusMpeg(void); //_________________________________________________________________________________________________________________________ // Keyboard void basKey(void); void basInkey(void); void basWaitKey(void); //_________________________________________________________________________________________________________________________ // Mouse void basXMouse(void); void basYMouse(void); void basXMouseScreen(void); void basYMouseScreen(void); void basBMouse(void); void basChangeMouse(void); void basLocateMouse(void); void basMouseShow(void); void basMouseHide(void); void basMouseZone(void); //_________________________________________________________________________________________________________________________ // Joystick void basNumJoySticks(void); void basNameJoyStick(void); void basNumAxesJoyStick(void); void basNumBallsJoyStick(void); void basNumHatsJoyStick(void); void basNumButtonsJoyStick(void); void basGetAxisJoyStick(void); void basGetHatJoyStick(void); void basGetButtonJoyStick(void); void basXGetBallJoyStick(void); void basYGetBallJoyStick(void); void basJoy(void); void basBJoy(void); void basWaitBJoy(void); //_________________________________________________________________________________________________________________________ // SDLtime void basWait(void); void basTimer(void); //_________________________________________________________________________________________________________________________ // Socket void basIsEnabledSock(void); void basGetFreeSock(void); void basOpenSock(void); void basAcceptSock(void); void basIsServerReady(void); void basConnectSock(void); //void ConnectionReadySock(void); void basIsClientReady(void); void basCloseSock(void); //void basPeekSock(void); void basReadSock(void); void basReadByteSock(void); void basReadLineSock(void); void basWriteSock(void); void basWriteByteSock(void); void basWriteLineSock(void); void basGetRemoteIp(void); void basGetRemotePort(void); void basGetLocalIp(void); //_________________________________________________________________________________________________________________ void addBuiltin( char *name, void (*routine)(void), int args, int optargs ); void initBuiltins(void); static struct { /* builtin routines */ char *name; void (*routine)(void); int args; int optargs; } builtin[] = { {"argument", basArgument, 0, 1}, {"argument$", basArgument, 0, 1}, {"printstack", basPrintStack, 0, 0}, {"convbase", basConvBase, 2, 0}, {"convbase$", basConvBase, 2, 0}, // Run time {"argc", basArgc, 0, 0}, {"argv", basArgv, 1, 0}, {"command", basCommand, 0, 1}, {"command$", basCommand, 0, 1}, {"setenv", basSetEnv, 2, 0}, {"getenv", basGetEnv, 1, 0}, {"run", basRun, 1, 0}, {"shell", basShell, 1, 0}, {"stop", basStop, 0, 0}, // Array {"indexes", basIndexes, 1, 0}, {"lbound", basLBound, 2, 0}, {"quicksort", basQuickSort, 3, 0}, {"ubound", basUBound, 2, 0}, // Strings {"chr", basChr, 1, 0}, {"chr$", basChr, 1, 0}, {"format", basFormat, 1, 20}, {"format$", basFormat, 1, 20}, {"insert", basInsert, 3, 0}, {"insert$", basInsert, 3, 0}, {"instr", basInstr, 2, 1}, {"lcase", basLCase, 1, 0}, {"lcase$", basLCase, 1, 0}, {"left", basLeft, 2, 0}, {"left$", basLeft, 2, 0}, {"len", basLen, 1, 0}, {"length", basLen, 1, 0}, {"ltrim", basLTrim, 1, 0}, {"ltrim$", basLTrim, 1, 0}, {"mid", basMid, 2, 1}, {"mid$", basMid, 2, 1}, {"replace", basReplace, 2, 1}, {"replace$", basReplace, 2, 1}, {"replacesubstr", basReplaceSubStr, 3, 1}, {"replacesubstr$", basReplaceSubStr, 3, 1}, {"reverse", basReverse, 1, 0}, {"reverse$", basReverse, 1, 0}, {"right", basRight, 2, 0}, {"right$", basRight, 2, 0}, {"rinstr", basRInstr, 2, 1}, {"rtrim", basRTrim, 1, 0}, {"rtrim$", basRTrim, 1, 0}, {"space", basSpace, 1, 0}, {"space$", basSpace, 1, 0}, {"str", basStr, 1, 0}, {"str$", basStr, 1, 0}, {"strf", basStrF, 1, 0}, {"strf$", basStrF, 1, 0}, {"string", basString, 2, 0}, {"string$", basString, 2, 0}, {"trim", basTrim, 1, 0}, {"trim$", basTrim, 1, 0}, {"tally", basTally, 2, 1}, {"ucase", basUCase, 1, 0}, {"ucase$", basUCase, 1, 0}, {"typeof$", basTypeOf, 1, 0}, {"typeof", basTypeOf, 1, 0}, // Maths {"abs", basAbs, 1, 0}, {"acos", basACos, 1, 0}, {"asc", basAsc, 1, 0}, {"asin", basASin, 1, 0}, {"atan", basATan, 1, 0}, {"bin", basBin, 1, 0}, {"bin$", basBin, 1, 0}, {"cos", basCos, 1, 0}, {"exp", basExp, 1, 0}, {"fix", basFix, 1, 0}, {"floor", basFix, 1, 0}, {"frac", basFrac, 1, 0}, {"hex", basHex, 1, 0}, {"hex$", basHex, 1, 0}, {"int", basInt, 1, 0}, {"log", basLog, 1, 0}, {"randomize", basRandomize, 0, 1}, {"rnd", basRnd, 0, 1}, {"round", basRound, 1, 0}, {"sgn", basSgn, 1, 0}, {"sin", basSin, 1, 0}, {"sqr", basSqr, 1, 0}, {"tan", basTan, 1, 0}, {"val", basVal, 1, 0}, {"min", basMin, 2, 0}, {"max", basMax, 2, 0}, {"bitwiseand", basBitwiseAnd, 2, 0}, {"bitwiseor", basBitwiseOr, 2, 0}, {"bitwisexor", basBitwiseXor, 2, 0}, {"andbit", basBitwiseAnd, 2, 0}, {"orbit", basBitwiseOr, 2, 0}, {"xorbit", basBitwiseXor, 2, 0}, // Files {"eof", basEof, 1, 0}, {"fileexists", basFileExists, 1, 0}, {"filecopy", basFileCopy , 2, 0}, {"filemove", basFileMove , 2, 0}, {"filerename", basFileRename, 2, 0}, {"freefile", basFreeFile, 0, 0}, {"kill", basKill, 1, 0}, {"filedelete", basKill, 1, 0}, {"loc", basLoc, 1, 0}, {"lof", basLof, 1, 0}, {"readbyte", basReadByte, 1, 0}, {"rename", basFileRename, 2, 0}, {"seek", basSeek, 1, 1}, {"writebyte", basWriteByte, 2, 0}, // Dirs {"chdir", basChDir, 1, 0}, {"dir", basDir, 0, 0}, {"dir$", basDir, 0, 0}, {"dirfirst", basDirFirst, 1, 0}, {"dirnext", basDirNext, 0, 0}, {"direxists", basDirExists, 1, 0}, {"mkdir", basMkDir, 1, 0}, {"rmdir", basRmDir, 1, 0}, // Data function support {"data", basData, 0, 255}, {"read", basRead, 0, 1}, // Date and time {"date", basDate, 0, 0}, {"date$", basDate, 0, 0}, {"ticks", basTicks, 0, 0}, {"time", basTime, 0, 0}, {"time$", basTime, 0, 0}, // Memory Bank {"reservebank", basReserveBank, 2, 0}, {"baseimage", basBaseImage, 2, 0}, {"baseimagecc", basBaseImageCC, 2, 0}, {"basescreen", basBaseScreen, 2, 0}, {"basesound", basBaseSound, 2, 0}, {"freebase", basFreeBase, 1, 0}, {"freebank", basFreeBank, 1, 0}, {"copybank", basCopyBank, 2, 0}, {"loadbank", basLoadBank, 1, 1}, {"savebank", basSaveBank, 1, 1}, {"setbank", basSetBank, 0, 1}, {"currentbank", basSetBank, 0, 1}, {"sizebank", basSizeBank, 0, 1}, {"banksize", basSizeBank, 0, 1}, {"poke", basPoke, 2, 1}, {"doke", basDoke, 2, 1}, {"loke", basLoke, 2, 1}, {"peek", basPeek, 1, 1}, {"deek", basDeek, 1, 1}, {"leek", basLeek, 1, 1}, {"memcopy", basMemCopy, 5, 0}, /***************** SDLengine *********************/ // Screen {"setdefaults", basSetDefaults, 4, 0}, {"setdisplay", basSetDisplay, 4, 0}, {"setalphachannel", basSetAlphaChannel, 1, 0}, {"setcaption", basSetCaption, 1, 0}, {"caption", basCaption, 0, 0}, {"displaymode", basDisplayMode, 0, 0}, {"displaywidth", basDisplayWidth, 0, 0}, {"displayheight", basDisplayHeight, 0, 0}, {"displaybpp", basDisplayBpp, 0, 0}, {"screen", basScreen, 0, 1}, {"screenz", basScreenZ, 1, 1}, {"lastscreen", basLastScreen, 0, 0}, {"directscreen", basDirectScreen, 0, 0}, {"screenopen", basScreenOpen, 8, 0}, {"screenclose", basScreenClose, 1, 0}, {"screenclone", basScreenClone, 7, 0}, {"screencopy", basScreenCopy, 8, 0}, {"screenfade", basScreenFade, 1, 1}, {"screenfadeout", basScreenFade, 1, 1}, {"screenfadein", basScreenFadein, 1, 2}, {"screencrossfade", basScreenCrossFade, 1, 2}, {"screenalpha", basScreenAlpha, 2, 0}, {"screenlock", basScreenLock, 1, 0}, {"screenunlock", basScreenUnlock, 1, 0}, {"screenrect", basScreenRect, 5, 0}, {"screenviewport", basScreenRect, 5, 0}, {"xscreenrect", basXScreenRect, 0, 0}, {"screenviewportx", basXScreenRect, 0, 0}, {"yscreenrect", basYScreenRect, 0, 0}, {"screenviewporty", basYScreenRect, 0, 0}, {"wscreenrect", basWScreenRect, 0, 0}, {"screenviewportw", basWScreenRect, 0, 0}, {"hscreenrect", basHScreenRect, 0, 0}, {"screenviewporth", basHScreenRect, 0, 0}, {"flagscreenrect", basFlagScreenRect, 0, 0}, {"screenviewportflag",basFlagScreenRect, 0, 0}, {"screenwidth", basScreenWidth, 0, 0}, {"screenheight", basScreenHeight, 0, 0}, {"offset", basOffset, 2, 0}, {"screenoffset", basOffset, 2, 0}, {"xoffset", basXOffset, 0, 0}, {"screenoffsetx", basXOffset, 0, 0}, {"yoffset", basYOffset, 0, 0}, {"screenoffsety", basYOffset, 0, 0}, {"cls", basCls, 0, 0}, {"screenswap", basScreenSwap, 0, 0}, {"setautoback", basAutoBack, 0, 1}, {"autoback", basAutoBack, 0, 1}, {"dualplayfield", basDualPlayfield, 0, 1}, {"waitvbl", basWaitVbl, 0, 0}, {"fps", basFps, 0, 1}, // Graphics {"rgb", basRgb, 3, 0}, {"enablepalette", basEnablePalette, 0, 1}, {"color", basColor, 1, 1}, {"palette", basPalette, 0, 255}, {"colorcycling", basColorCycling, 0, 4}, {"ink", basInk, 0, 1}, {"point", basPoint, 2, 0}, {"getpixel", basPoint, 2, 0}, {"dot", basDot, 2, 0}, {"setpixel", basDot, 2, 0}, {"putpixel", basDot, 2, 0}, {"plot", basPlot, 3, 0}, {"line", basLine, 4, 0}, {"box", basBox, 4, 0}, {"bar", basBar, 4, 0}, {"rectangle", basRectangle, 4, 1}, {"circle", basCircle, 3, 0}, {"fillcircle", basFillCircle, 3, 0}, {"ellipse", basEllipse, 4, 0}, {"fillellipse", basFillEllipse, 4, 0}, {"paint", basPaint, 2, 0}, {"triangle", basTriangle, 6, 0}, {"polyline", basPolyLine, 6, 254}, {"polygon", basPolyGon, 6, 254}, // File graphics input output {"loadimage", basLoadImage, 1, 1}, {"loadzipimage", basLoadZipImage, 2, 1}, {"saveimage", basSaveImage, 2, 0}, {"loadsound", basLoadSound, 1, 1}, {"loadzipsound", basLoadZipSound, 2, 1}, {"savesound", basSaveSound, 2, 0}, {"loadmusic", basLoadMusic, 1, 0}, {"loadzipmusic", basLoadZipMusic, 2, 0}, // Image manipulation {"hotspot", basHotSpot, 3, 0}, {"setcolorkey", basSetColorKey, 1, 0}, {"colorkey", basSetColorKey, 1, 0}, {"imageexists", basImageExists, 1, 0}, {"imagewidth", basImageWidth, 1, 0}, {"imageheight", basImageHeight, 1, 0}, {"deleteimage", basDeleteImage, 1, 0}, {"copyimage", basCopyImage, 2, 0}, {"setalpha", basSetAlpha, 2, 0}, {"imagealpha", basSetAlpha, 2, 0}, {"zoomimage", basZoomImage, 3, 0}, {"rotateimage", basRotateImage, 2, 0}, {"rotozoomimage", basRotozoomImage, 3, 0}, {"mirrorimage", basMirrorImage, 3, 0}, // Blitting {"blt", basBlt, 7, 0}, {"pastebob", basPasteBob, 3, 0}, {"pasteicon", basPasteIcon, 3, 0}, {"grab", basGrab, 5, 0}, // Sprite system {"spriteclip", basSpriteClip, 4, 0}, {"sprite", basSprite, 4, 0}, {"deletesprite", basDeleteSprite, 1, 0}, {"xsprite", basXSprite, 1, 0}, {"spritex", basXSprite, 1, 0}, {"ysprite", basYSprite, 1, 0}, {"spritey", basYSprite, 1, 0}, {"spritewidth", basSpriteWidth, 1, 0}, {"spriteheight", basSpriteHeight, 1, 0}, {"frsprite", basFrSprite, 1, 0}, {"spriteimage", basFrSprite, 1, 0}, {"livesprite", basLiveSprite, 1, 0}, {"spriteexist", basLiveSprite, 1, 0}, {"spritehit", basSpriteHit, 1, 1}, {"spritez", basSpriteZ, 1, 1}, {"lastsprite", basLastSprite, 0, 0}, {"autoupdatesprite",basAutoUpdateSprite,1, 0}, {"updatesprite", basUpdateSprite, 0, 0}, // Bob system {"setbob", basSetBob, 2, 0}, {"bob", basBob , 4, 0}, {"deletebob", basDeleteBob, 1, 0}, {"xbob", basXBob, 1, 0}, {"bobx", basXBob, 1, 0}, {"ybob", basYBob, 1, 0}, {"boby", basYBob, 1, 0}, {"bobwidth", basBobWidth, 1, 0}, {"bobheight", basBobHeight, 1, 0}, {"frbob", basFrBob, 1, 0}, {"bobimage", basFrBob, 1, 0}, {"livebob", basLiveBob, 1, 0}, {"bobexist", basLiveBob, 1, 0}, {"bobhit", basBobHit, 1, 1}, {"bobz", basBobZ, 1, 1}, {"lastbob", basLastBob, 0, 0}, {"autoupdatebob", basAutoUpdateBob, 1, 0}, {"updatebob", basUpdateBob, 0, 0}, // Text draw {"text", basText, 4, 1}, {"setfont", basSetFont, 1, 0}, {"getfont", basGetFont, 0, 0}, {"textrender", basTextRender, 2, 2}, // Print screen {"pen", basPen, 0, 1}, {"paper", basPaper, 0, 1}, {"fprints", basfPrints, 1, 0}, {"prints", basPrints, 1, 0}, {"locate", basLocate, 2, 0}, {"atx", basAtx, 0, 0}, {"aty", basAty, 0, 0}, {"curson", basCursOn, 0, 0}, {"cursoff", basCursOff, 0, 0}, {"inputs", basInputs, 2, 0}, {"zoneinputs", basZoneInputs, 4, 0}, // Sounds and music {"isenabledsound", basIsEnabledSound, 0, 0}, {"soundenabled", basIsEnabledSound, 0, 0}, {"soundexists", basSoundExists, 1, 0}, {"deletesound", basDeleteSound, 1, 0}, {"copysound", basCopySound, 2, 0}, {"musicexists", basMusicExists, 0, 0}, {"playsound", basPlaySound, 2, 1}, {"playfreqsound", basPlayFreqSound, 3, 1}, {"volumesound", basVolumeSound, 1, 1}, {"soundvolume", basVolumeSound, 1, 1}, {"stopsound", basStopSound, 0, 1}, {"pausesound", basPauseSound, 0, 1}, {"resumesound", basResumeSound, 0, 1}, {"vumetersound", basVuMeterSound, 0, 1}, {"sound3d", basPositionSound, 3, 0}, {"positionsound", basPositionSound, 3, 0}, {"soundchannels", basSoundChannels, 1, 0}, {"playmusic", basPlayMusic, 1, 0}, {"positionmusic", basPositionMusic, 1, 0}, {"stopmusic", basStopMusic, 0, 0}, {"pausemusic", basPauseMusic, 0, 0}, {"resumemusic", basResumeMusic, 0, 0}, {"rewindmusic", basRewindMusic, 0, 0}, {"fademusic", basFadeMusic, 0, 1}, {"volumemusic", basVolumeMusic, 0, 1}, {"musicvolume", basVolumeMusic, 0, 1}, {"speedmusic", basSpeedMusic, 1, 0}, {"musicspeed", basSpeedMusic, 1, 0}, // CD support {"numdrivescd", basNumDrivesCD, 0, 0}, {"countcddrives", basNumDrivesCD, 0, 0}, {"namecd", basNameCD, 1, 0}, {"cdname", basNameCD, 1, 0}, {"opencd", basOpenCD, 1, 1}, {"indrivecd", basInDriveCD, 1, 0}, {"cdinserted", basInDriveCD, 1, 0}, {"trackscd", basTracksCD, 1, 0}, {"countcdtracks", basTracksCD, 1, 0}, {"curtrackcd", basCurTrackCD, 1, 0}, {"cdcurtrack", basCurTrackCD, 1, 0}, {"curframecd", basCurFrameCD, 1, 0}, {"cdcurframe", basCurFrameCD, 1, 0}, {"playcd", basPlayCD, 1, 2}, {"playtrackscd", basPlayTracksCD, 1, 4}, {"playcdtracks", basPlayTracksCD, 1, 4}, {"pausecd", basPauseCD, 1, 0}, {"resumecd", basResumeCD, 1, 0}, {"stopcd", basStopCD, 1, 0}, {"ejectcd", basEjectCD, 1, 0}, {"closecd", basCloseCD, 1, 0}, {"tracktypecd", basTrackTypeCD, 2, 0}, {"cdtracktype", basTrackTypeCD, 2, 0}, {"tracklengthcd", basTrackLengthCD, 2, 0}, {"cdtracklength", basTrackLengthCD, 2, 0}, {"trackoffsetcd", basTrackOffsetCD, 2, 0}, {"cdtrackoffset", basTrackOffsetCD, 2, 0}, // Video mpeg {"loadmpeg", basLoadMpeg, 2, 0}, {"plaympeg", basPlayMpeg, 0, 1}, {"stopmpeg", basStopMpeg, 0, 0}, {"deletempeg", basDeleteMpeg, 0, 0}, {"pausempeg", basPauseMpeg, 0, 0}, {"rewindmpeg", basRewindMpeg, 0, 0}, {"seekmpeg", basSeekMpeg, 1, 0}, {"skipmpeg", basSkipMpeg, 1, 0}, {"statusmpeg", basStatusMpeg, 0, 0}, // Keyboard {"key", basKey, 1, 0}, {"inkey", basInkey, 0, 0}, {"waitkey", basWaitKey, 0, 1}, // Mouse {"xmouse", basXMouse, 0, 0}, {"ymouse", basYMouse, 0, 0}, {"mousex", basXMouse, 0, 0}, {"mousey", basYMouse, 0, 0}, {"xmousescreen", basXMouseScreen, 1, 0}, {"ymousescreen", basYMouseScreen, 1, 0}, {"mousescreenx", basXMouseScreen, 1, 0}, {"mousescreeny", basYMouseScreen, 1, 0}, {"bmouse", basBMouse, 0, 0}, {"mousebutton", basBMouse, 0, 0}, {"changemouse", basChangeMouse, 0, 1}, {"mousepointer", basChangeMouse, 0, 1}, {"locatemouse", basLocateMouse, 2, 0}, {"placemouse", basLocateMouse, 2, 0}, {"mouseshow", basMouseShow, 0, 0}, {"showmouse", basMouseShow, 0, 0}, {"mousehide", basMouseHide, 0, 0}, {"hidemouse", basMouseHide, 0, 0}, {"mousezone", basMouseZone, 4, 0}, // Joystick {"numjoysticks", basNumJoySticks, 0, 0}, {"namejoystick", basNameJoyStick, 1, 0}, {"numaxesjoystick", basNumAxesJoyStick, 1, 0}, {"numballsjoystick",basNumBallsJoyStick,1, 0}, {"numhatsjoystick", basNumHatsJoyStick, 1, 0}, {"numbuttonsjoystick",basNumButtonsJoyStick,1, 0}, {"getaxisjoystick", basGetAxisJoyStick, 2, 0}, {"gethatjoystick", basGetHatJoyStick, 2, 0}, {"getbuttonjoystick", basGetButtonJoyStick, 2, 0}, {"xgetballjoystick", basXGetBallJoyStick, 2, 0}, {"ygetballjoystick", basYGetBallJoyStick, 2, 0}, {"joy", basJoy, 1, 0}, {"bjoy", basBJoy, 1, 0}, {"joybuttons", basBJoy, 1, 0}, {"fire", basBJoy, 1, 0}, {"waitbjoy", basWaitBJoy, 0, 1}, // SDLtime {"wait", basWait, 1, 0}, {"timer", basTimer, 0, 0}, // Socket {"isenabledsock", basIsEnabledSock, 0, 0}, {"getfreesock", basGetFreeSock, 0, 0}, {"opensock", basOpenSock, 1, 0}, {"acceptsock", basAcceptSock, 1, 0}, {"isserverready", basIsServerReady, 1, 0}, {"connectsock", basConnectSock, 2, 0}, //{"connectionreadysock",basConnectionReadySock,1, 0}, {"isclientready", basIsClientReady, 1, 0}, {"closesock", basCloseSock, 1, 0}, //{"peeksock", basPeekSock, 2, 0}, {"readsock", basReadSock, 2, 0}, {"readbytesock", basReadByteSock, 1, 0}, {"readlinesock", basReadLineSock, 1, 0}, {"writesock", basWriteSock, 3, 0}, {"writebytesock", basWriteByteSock, 2, 0}, {"writelinesock", basWriteLineSock, 2, 0}, {"getremoteip", basGetRemoteIp, 1, 0}, {"getremoteport", basGetRemotePort, 1, 0}, {"getlocalip", basGetLocalIp, 0, 0}, {NULL, NULL, 0, 0} }; usr/src/sdlBasic/src/sdlBrt/doc_sdlbas.ico0000777000076500007660000000706610463130770015770 0ustar h& ¨Ž( @ªwˆD"U»Ýî3f™Ìÿ333f3™3Ì3ÿ3333f3™3Ì3ÿ333333f33™33Ì33ÿ33f3fff™fÌfÿf3f33ff3f™3fÌ3fÿ3f™3™f™™™Ì™ÿ™3™33™f3™™3™Ì3™ÿ3™Ì3ÌfÌ™ÌÌÌÿÌ3Ì33Ìf3Ì™3ÌÌ3Ìÿ3Ìÿ3ÿfÿ™ÿÌÿÿÿ3ÿ33ÿf3ÿ™3ÿÌ3ÿÿ3ÿf3fff™fÌfÿf™3™f™™™Ì™ÿ™f33f3ff3™f3Ìf3ÿf3™33™3f™3™™3Ì™3ÿ™3ff3fffff™ffÌffÿff™f3™ff™f™™fÌ™fÿ™ff™3f™ff™™f™Ìf™ÿf™™™3™™f™™™™™Ì™™ÿ™™fÌ3fÌffÌ™fÌÌfÌÿfÌ™Ì3™Ìf™Ì™™ÌÌ™Ìÿ™Ìfÿ3fÿffÿ™fÿÌfÿÿfÿ™ÿ3™ÿf™ÿ™™ÿÌ™ÿÿ™ÿÌ3ÌfÌ™ÌÌÌÿÌÿ3ÿfÿ™ÿÌÿÿÿÌ33Ì3fÌ3™Ì3ÌÌ3ÿÌ3ÿ33ÿ3fÿ3™ÿ3Ìÿ3ÿÿ3Ìf3ÌffÌf™ÌfÌÌfÿÌfÿf3ÿffÿf™ÿfÌÿfÿÿfÌ™3Ì™fÌ™™Ì™ÌÌ™ÿÌ™ÿ™3ÿ™fÿ™™ÿ™ªÿ™ÿÿ™ÌÌ3ÌÌfÌÌ™ÌÌÌÌÌÿÌÌÿÌ3ÿÌfÿÌ™ÿÌÌÿÌÿÿÌÌÿ3ÌÿfÌÿ™ÌÿÌÌÿÿÌÿÿÿ3ÿÿfÿÿ™ÿÿÌÿÿÿÿÿ"""DDDUUUwwwˆˆˆªªª»»»ÝÝÝîîî"DUwˆª»ÝîÝîªwˆD"U» áèèèèèÑèèèèè áááárrÑÑÑááè áááárrÑÑÑÑÑè ááárrrÑÑÑÑÑè ááárrr_ÑÑÑÑè ááár_r__ÑÑ_è áááár_____áè áááá_____ááè áááááááááááè ááááè ÑÑÑÑÑÑÑ áèááá ÑÑÑÑÑÑÑ áè áè á ááááááááá €ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿÿÿÿÿÿÿÿÿ€ÿÿ€ÿÿ( @€ªwˆD"U»Ýî3f™Ìÿ333f3™3Ì3ÿ3333f3™3Ì3ÿ333333f33™33Ì33ÿ33f3fff™fÌfÿf3f33ff3f™3fÌ3fÿ3f™3™f™™™Ì™ÿ™3™33™f3™™3™Ì3™ÿ3™Ì3ÌfÌ™ÌÌÌÿÌ3Ì33Ìf3Ì™3ÌÌ3Ìÿ3Ìÿ3ÿfÿ™ÿÌÿÿÿ3ÿ33ÿf3ÿ™3ÿÌ3ÿÿ3ÿf3fff™fÌfÿf™3™f™™™Ì™ÿ™f33f3ff3™f3Ìf3ÿf3™33™3f™3™™3Ì™3ÿ™3ff3fffff™ffÌffÿff™f3™ff™f™™fÌ™fÿ™ff™3f™ff™™f™Ìf™ÿf™™™3™™f™™™™™Ì™™ÿ™™fÌ3fÌffÌ™fÌÌfÌÿfÌ™Ì3™Ìf™Ì™™ÌÌ™Ìÿ™Ìfÿ3fÿffÿ™fÿÌfÿÿfÿ™ÿ3™ÿf™ÿ™™ÿÌ™ÿÿ™ÿÌ3ÌfÌ™ÌÌÌÿÌÿ3ÿfÿ™ÿÌÿÿÿÌ33Ì3fÌ3™Ì3ÌÌ3ÿÌ3ÿ33ÿ3fÿ3™ÿ3Ìÿ3ÿÿ3Ìf3ÌffÌf™ÌfÌÌfÿÌfÿf3ÿffÿf™ÿfÌÿfÿÿfÌ™3Ì™fÌ™™Ì™ÌÌ™ÿÌ™ÿ™3ÿ™fÿ™™ÿ™ªÿ™ÿÿ™ÌÌ3ÌÌfÌÌ™ÌÌÌÌÌÿÌÌÿÌ3ÿÌfÿÌ™ÿÌÌÿÌÿÿÌÌÿ3ÌÿfÌÿ™ÌÿÌÌÿÿÌÿÿÿ3ÿÿfÿÿ™ÿÿÌÿÿÿÿÿ"""DDDUUUwwwˆˆˆªªª»»»ÝÝÝîîî"DUwˆª»ÝîÝîªwˆD"U» áèèèèèèèèèèèèèèèèèèèèèèè áááááááááááááÑáááááááááè ááááááááááárrÑÑÑáááááááè ááááááááárrrrÑrÑÑÑáááááè ááááááááárrrrÑrÑÑÑÑÑáááè áááááááárrrrrÑrÑÑÑÑÑÑÑáè ááááááárrrrrrÑrÑÑÑÑÑÑÑÑè ááááááárrrrrrÑrÑÑÑÑÑÑÑÑè ááááááárrrrrrrrÑÑÑÑÑÑÑÑè ááááááárrrrr__rÑÑÑÑÑÑÑÑè ááááááárrr_____ÑÑÑÑÑÑ_Ñè ááááááár___rr___ÑÑÑÑÑ_áè ááááááá__rrrr_____ÑÑÑááè áááááááárrr_________Ñááè áááááááár___________áááè ááááááááá_____á___áááááè ááááááááááá__áá_áááááááè áááááááááááááááááááááááè áááááááááááááááááááááááè ááááááááè ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ ááááááááè ÑÑÑ ÑÑ ÑÑ Ñ ÑÑÑÑ ááááááááè ÑÑÑ ÑÑ Ñ ÑÑÑÑ ÑÑÑ ááááááááè ÑÑÑ ÑÑ ÑÑ ÑÑ ÑÑÑÑ ááèáááááá ÑÑÑ ÑÑ Ñ ÑÑ Ñ ÑÑÑÑÑÑ ááè ÑÑÑ ÑÑÑ ÑÑÑ ÑÑÑÑ ááè ëèèè ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ ááè ëêè ááè ëè áááááááááááááááááè ë áááááááááááááááááá üüüüüüüüüüüüüüüüüüüüüüü?usr/src/sdlBasic/src/sdlBrt/BASengine/0000777000000000000000000000000010645354731016530 5ustar rootrootusr/src/sdlBasic/src/sdlBrt/BASengine/dir.c0000777000076500007660000001135710463131556015715 0ustar /* Name: dir.c Purpose: dir support for wxBasic/sdlBasic Author: Viola Roberto __vroby__ Copyright: (c) 2003 Viola Roberto <__vroby__@libero.it> Licence: LGPL */ #include #include #include #define LVLDIR 8 #if defined(UNIX) || defined(__MORPHOS__) || defined(__amigaos4__) #include #include DIR *hDir[LVLDIR]; struct dirent *s_file[LVLDIR]; #else #include #include struct _finddata_t c_file[LVLDIR]; struct _finddata_t c_dir; long n_file[LVLDIR]; #endif char dir_path[255]; char ext[LVLDIR][1024]; char prefix[LVLDIR][1024]; int lvldir; //______________________________________________________________________________________________________________________ /* mkdir: make new directory */ /* int mkdir(char *namedir) { char cmd[256]; #ifdef unix strcpy(cmd,"mkdir "); strcat(cmd,namedir); //printf(cmd); #else strcpy(cmd,"md "); strcat(cmd,namedir); //printf(cmd); #endif system(cmd); return 0; } */ //______________________________________________________________________________________________________________________ //* char *dir() { int i; getcwd(dir_path,254); for(i=0; i 1 ) strncpy(prefix[lvldir],&path[i+1],(strlen(path)-i-strlen(ext[lvldir])-2)); else strcpy(prefix[lvldir],""); path[i]='\0'; hDir[lvldir] = opendir(path); if (hDir[lvldir] == NULL )return ""; s_file[lvldir]=readdir(hDir[lvldir]); while( s_file[lvldir]!=NULL){ if (memcmp( &s_file[lvldir]->d_name, prefix[lvldir], strlen(prefix[lvldir]) )==0) if (memcmp( &s_file[lvldir]->d_name[strlen(s_file[lvldir]->d_name)-strlen(ext[lvldir])], ext[lvldir], strlen(ext[lvldir]) )==0){ break; } s_file[lvldir]=readdir(hDir[lvldir]); } if (s_file[lvldir]==NULL){ closedir(hDir[lvldir]); lvldir--; return ""; } return s_file[lvldir]->d_name; #else char * dirpath; lvldir++; dirpath=(char *) malloc(strlen(path)+4); strcpy(dirpath,path); strcat(dirpath,"*"); dirpath[strlen(path)+2]='\0'; n_file[lvldir]=_findfirst( dirpath, &c_file[lvldir] ); if (n_file[lvldir]==-1L){ _findclose(n_file[lvldir]); lvldir--; free(dirpath); return ""; } free(dirpath); return c_file[lvldir].name; #endif } /*______________________________________________________________________________________________________________________*/ /* dir: listed in directory path the next entry or none if it's at the end list */ char *dirnext() { #if defined(UNIX) || defined(AMIGA) s_file[lvldir]=readdir(hDir[lvldir]); while( s_file[lvldir]!=NULL){ if (memcmp( &s_file[lvldir]->d_name, prefix[lvldir], strlen(prefix[lvldir]) )==0) if (memcmp( &s_file[lvldir]->d_name[strlen(s_file[lvldir]->d_name)-strlen(ext[lvldir])], ext[lvldir], strlen(ext[lvldir]) )==0){ break; } s_file[lvldir]=readdir(hDir[lvldir]); } if (s_file[lvldir]==NULL){ closedir(hDir[lvldir]); lvldir--; return ""; } return s_file[lvldir]->d_name; #else if (_findnext(n_file[lvldir], &c_file[lvldir] )!=0){ if (n_file[lvldir]!=0){ _findclose(n_file[lvldir]); lvldir--; return ""; } } return c_file[lvldir].name; #endif } /*______________________________________________________________________________________________________________________*/ /* direxist: check if exist dir path */ int direxists(char *path) { #if defined(UNIX) || defined(AMIGA) DIR *hDirEx; hDirEx = opendir(path); if (hDirEx == NULL ){ closedir(hDirEx); return 0; } else{ closedir(hDirEx); return 1; } #else FILE *handle; long n_fileEx; n_fileEx=_findfirst( path, &c_dir); if (n_fileEx==-1L){ _findclose(n_fileEx); return 0; } else{ _findclose(n_fileEx); handle = fopen( path, "rb" ); if (handle == NULL) return 1; fclose( handle ); return 0; } #endif } /*______________________________________________________________________________________________________________________*/ /* isdir: return 1 if path is a directory*/ int isdir(char *path) { return direxists(path); } /*______________________________________________________________________________________________________________________*/ usr/src/sdlBasic/src/sdlBrt/BASengine/BASengine.h0000777000076500007660000001461210463131673016734 0ustar /* _________________________________________________________________________________________________________________________ BASengine core of sdlBasic This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA __vroby__ __vroby__@libero.it _________________________________________________________________________________________________________________________ */ //- datafunction --------------------------------------------------------------------------------- extern char *dataarray[10000]; extern int dataenter,datapointer; void init_data(); void loaddata(char *datavalue); char *readdata(); //-------------------------------------------------------------------------------------------------- //- dir -------------------------------------------------------------------------------------------- #define LVLDIR 8 #if defined(UNIX) || defined(__MORPHOS__) || defined(__amigaos4__) #include #include extern DIR *hDir[LVLDIR]; extern struct dirent *s_file[LVLDIR]; #else #include #include extern struct _finddata_t c_file[LVLDIR]; extern struct _finddata_t c_dir; extern long n_file[LVLDIR]; #endif extern char dir_path[255]; extern char ext[LVLDIR][1024]; extern char prefix[LVLDIR][1024]; extern int lvldir; extern char *dir(); extern char *dirfirst(char *path); extern char *dirnext(); extern int direxists(char *path); extern int isdir(char *path); //-------------------------------------------------------------------------------------------------- //- file ------------------------------------------------------------------------------------------- #define FILE_MODE_INPUT 0 #define FILE_MODE_OUTPUT 1 #define FILE_MODE_APPEND 2 #define FILE_MAX_HANDLE 16 #define FILE_BUFFER_MAX 1024 /* handles are 1 relative */ extern FILE *fileHandles[FILE_MAX_HANDLE+1]; extern int fileMode[FILE_MAX_HANDLE+1]; extern void fileCheckHandle( int handle, int mustBeOpen ); extern int fileFree(void); extern void fileOpen( char *name, int mode, int handle ); extern void fileClose( int handle ); extern void fileCloseAll(void); extern char *fileLineInput( int handle ); extern void filePrintString( int handle, char *text ); extern int fileEof( int handle ); extern int fileReadByte( int handle ); extern void fileWriteByte( int handle, char c ); extern long fileSeek( int handle, long pos ); extern long fileSize( int handle ); extern long filePosition( int handle ); extern int FileExists( char *name ); extern int filecopy(char *source,char *dest); extern int filemove(char *source,char *dest); extern int filerename(char *source,char *dest); //-------------------------------------------------------------------------------------------------- //- strings ---------------------------------------------------------------------------------------- #ifdef __cplusplus extern "C" { #endif //STRINGS RUTINES int asc(char *string); char *chr(int v); void format(); char *insert(char *source, char *target,int position); int instr(int start,char *find, char *search); char *lcase(char *string); char *left(char *string,int pos); int len(char *string); char *ltrim(char *string); char *mid(char *string,int i,int n); char *replace(char *src,char *rep, int i); char *replacesubstr(int start,char *source,char *replace, char *with); char *reverse(char *string); char *right(char *string,int pos); int rinstr(char *search,char *find,int start); char *rtrim(char *string); char *space(int n); char *str(int v); char *string(int n, char *string); int tally(char *src,char *sub,int start); char *trim( char *string); char *ucase(char *string); int val(char *string); #ifdef __cplusplus } #endif //-------------------------------------------------------------------------------------------------- //-- membank --------------------------------------------------------------------------------------- #define NUM_MEMBANKS 255 extern char *membank[NUM_MEMBANKS]; extern int banksize[NUM_MEMBANKS]; extern int curbank; /*----- Error system ---*/ extern char *error_description; extern int error_type; //--Internal --------------------------------------------------- extern void init_membank(); //--Base --------------------------------------------------- extern int reservebank(int bank,int size); extern int baseimage(int bank,int n); extern int baseimageCC(int bank,int n); extern int basescreen(int bank,int n); extern int basesound(int bank,int n); extern int freebase(int bank); extern int freebank(int bank); extern int copybank(int s,int d); extern int loadbank(char *filename,int bank); extern int savebank(char *filename,int bank); extern int setbank(int bank); extern int sizebank(int bank); //--poke --------------------------------------------------- extern int poke(int bank,int address,unsigned char byte); extern int doke(int bank,int address,unsigned short byte); extern int loke(int bank,int address,unsigned int byte); //--peek --------------------------------------------------- extern int peek(int bank,int address); extern int deek(int bank,int address); extern int leek(int bank,int address); //--fastcopy --------------------------------------------------- extern int memcopy(int sbank,int s ,int dbank,int d,int size); //-------------------------------------------------------------------------------------------------- //- math ------------------------------------------------------- #ifdef __cplusplus extern "C" { #endif char *bin(int i); char *hex(int i); void randomize(int seed); double rnd(int upper); double round(double n1); int sgn(double n); double Min( double a, double b ); double Max( double a, double b ); int bitwiseand(int a, int b); int bitwiseor(int a, int b); int bitwisexor(int a, int b); #ifdef __cplusplus } #endif //-------------------------------------------------------------------------------------------------- usr/src/sdlBasic/src/sdlBrt/BASengine/clean.bat0000777000076500007660000000005610463131623016532 0ustar @echo off rem clean batch file del *.o usr/src/sdlBasic/src/sdlBrt/BASengine/file.c0000777000076500007660000002467010463131623016053 0ustar /* Name: file.c Purpose: file support for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ #define FILE_MODE_INPUT 0 #define FILE_MODE_OUTPUT 1 #define FILE_MODE_APPEND 2 #define FILE_MAX_HANDLE 16 #define FILE_BUFFER_MAX 1024 #include #include #include //#include "file.h" //#include "dir.h" #include "BASengine.h" #include "../error.h" /* handles are 1 relative */ FILE *fileHandles[FILE_MAX_HANDLE+1]; int fileMode[FILE_MAX_HANDLE+1]; /*______________________________________________________________________________________________________________________*/ /* fileCheckHandle: ensure handle is valid */ void fileCheckHandle( int handle, int mustBeOpen ) { if (handle < 1 || handle > FILE_MAX_HANDLE) { ePrintf( Runtime, "bad file number #%d", handle); } if (mustBeOpen && fileHandles[handle-1] == NULL) { ePrintf( Runtime, "file #%d is not open", handle ); } } /*______________________________________________________________________________________________________________________*/ /* fileFree: return index of next free file */ int fileFree() { int i; for( i = 1; i <= FILE_MAX_HANDLE; i++ ) { if (fileHandles[i-1] == NULL) { return i; } } return 0; } /*______________________________________________________________________________________________________________________*/ /* fileOpen: close an open file */ void fileOpen( char *name, int mode, int handle ) { fileCheckHandle( handle, 0 ); if (fileHandles[handle-1] != NULL) { ePrintf( Runtime, "file #%d is already open", handle ); } fileMode[handle-1] = mode; switch (mode) { case FILE_MODE_INPUT: fileHandles[handle-1] = fopen( name, "rb" ); break; case FILE_MODE_OUTPUT: fileHandles[handle-1] = fopen( name, "wb" ); break; case FILE_MODE_APPEND: fileHandles[handle-1] = fopen( name, "ab" ); break; default: /* should not happen */ ePrintf( Runtime, "fileOpen: unknown file mode" ); } if ((int)(fileHandles[handle-1] ) == EOF) { ePrintf( Runtime, "fileOpen: Error opening file #%d", handle ); } } /*______________________________________________________________________________________________________________________*/ /* fileClose: close an open file */ void fileClose( int handle ) { fileCheckHandle( handle, 0 ); if (fileHandles[handle-1] != NULL) { if (fclose( fileHandles[handle-1] ) == EOF) { ePrintf( Runtime, "fileClose: Error closing file #%d", handle ); } fileHandles[handle-1] = NULL; } } /*______________________________________________________________________________________________________________________*/ /* fileCloseAll: close all open files */ void fileCloseAll() { int i; for( i = 1; i <= FILE_MAX_HANDLE; i++ ) { fileClose( i ); } } /*______________________________________________________________________________________________________________________*/ /* fileLineInput: return a string from the file */ char *fileLineInput( int handle ) { int len; char buffer[FILE_BUFFER_MAX]; fileCheckHandle( handle, 1 ); if (fileMode[handle-1] != FILE_MODE_INPUT) { ePrintf( Runtime, "File #d is not open for Input", handle ); } buffer[0] = '\0'; fgets( buffer, FILE_BUFFER_MAX-1, fileHandles[handle-1] ); /* remove eol */ len = strlen( buffer ); if (len) { if (buffer[len-1] == '\n' ) { buffer[len-1] = '\0'; } } return eCopyString( buffer ); } /*______________________________________________________________________________________________________________________*/ void filePrintString( int handle, char *text ) { fileCheckHandle( handle, 1 ); switch ( fileMode[handle-1] ) { case FILE_MODE_INPUT: ePrintf( Runtime, "Bad file mode: file #%d is Input, not Output or Append", handle ); break; case FILE_MODE_OUTPUT: case FILE_MODE_APPEND: if (fputs(text, fileHandles[handle-1]) == EOF) { ePrintf( Runtime, "filePrintString: error writing to file #d", handle ); } break; default: /* should not happen */ ePrintf( Runtime, "filePrintString: unknown file mode" ); } } /*______________________________________________________________________________________________________________________*/ /* return true if end of file */ int fileEof( int handle ) { char byte; FILE *fp; fileCheckHandle( handle, 1 ); fp = fileHandles[handle-1]; /* feof isn't very good in DOS */ if (fread( &byte, 1, 1, fp ) == 0) { return 1; } /* move back one byte */ fseek( fp, -1, 1 ); return 0; } /*______________________________________________________________________________________________________________________*/ /* return a byte from the file */ int fileReadByte( int handle ) { FILE *fp; fileCheckHandle( handle, 1 ); fp = fileHandles[handle-1]; if (fileMode[handle-1] != FILE_MODE_INPUT) { ePrintf( Runtime, "Bad file mode" ); } return fgetc( fp ); } /*______________________________________________________________________________________________________________________*/ /* write a byte to the file */ void fileWriteByte( int handle, char c ) { FILE *fp; fileCheckHandle( handle, 1 ); fp = fileHandles[handle-1]; if (fileMode[handle-1] == FILE_MODE_INPUT) { ePrintf( Runtime, "Bad file mode" ); } fputc( c, fp ); } /*______________________________________________________________________________________________________________________*/ /* seek to a file position */ long fileSeek( int handle, long pos ) { FILE *fp; fileCheckHandle( handle, 1 ); fp = fileHandles[handle-1]; if (fileMode[handle-1] != FILE_MODE_INPUT) { ePrintf( Runtime, "Bad file mode" ); } return fseek( fp, pos-1, 0 ); } /*______________________________________________________________________________________________________________________*/ /* return size of file in bytes */ long fileSize( int handle ) { long currentPos, endPos; FILE *fp; fileCheckHandle( handle, 1 ); fp = fileHandles[handle-1]; if (fileMode[handle-1] != FILE_MODE_INPUT) { ePrintf( Runtime, "Bad file mode" ); } /* save current position */ currentPos = ftell( fp ); /* seek to end */ fseek( fp, 0, 2 ); endPos = ftell( fp ); /* restore prior position */ fseek( fp, currentPos, 0 ); return endPos; } /*______________________________________________________________________________________________________________________*/ /* return current file position */ long filePosition( int handle ) { long pos; FILE *fp; fileCheckHandle( handle, 1 ); fp = fileHandles[handle-1]; pos = ftell( fp ); if (pos != -1) { /* offset starts at 1, not zero */ pos++; } return pos; } /*______________________________________________________________________________________________________________________*/ /* see if a file exists */ int FileExists( char *name ) { FILE *handle; /* try to open the file */ handle = fopen( name, "rb" ); if (handle == NULL) return 0; fclose( handle ); #if defined(UNIX) || defined(AMIGA) if(direxists(name))return 0; #endif return 1; } /*______________________________________________________________________________________________________________________*/ int filecopy(char *source,char *dest) { char cmd[256]; #if defined(WIN32) int i; #endif #if defined(UNIX) && !defined(AMIGA) strcpy(cmd,"cp -r "); strcat(cmd,"\""); strcat(cmd,source); strcat(cmd,"\""); strcat(cmd," "); strcat(cmd,"\""); strcat(cmd,dest); strcat(cmd,"\""); #elif defined(AMIGA) strcpy(cmd,"copy all "); strcat(cmd,"\""); strcat(cmd,source); strcat(cmd,"\""); strcat(cmd," "); strcat(cmd,"\""); strcat(cmd,dest); strcat(cmd,"\""); #else #if defined(WIN32) for(i=0;i Licence: LGPL */ #include #include #include #include "../SDLengine/SDLengine.h" //#include "membank.h" #include "BASengine.h" char *membank[NUM_MEMBANKS]; int banksize[NUM_MEMBANKS]; int curbank; //--Internal --------------------------------------------------- void init_membank() { int i; for(i=0;ipixels; banksize[bank]=SDLimage[n]->w * SDLimage[n]->h * SDLimage[n]->format->BytesPerPixel; curbank=bank; if (SDL_MUSTLOCK(SDLimage[n])) SDL_UnlockSurface(SDLimage[n]); return 0; } else{ error_description="membank Error:image not found "; error_type=1; return -1; } } //______________________________________________________________________________________________ // special access at imagebank buffer colorkeyclipped int baseimageCC(int bank,int n) { if (SDLimageCC[n]!=NULL){ SDL_FreeSurface(SDLimageCC[n]); SDLimageCC[n]=SDL_DisplayFormat(SDL_CreateRGBSurface(SDL_HWSURFACE|SDL_HWACCEL,SDLimage[n]->w,SDLimage[n]->h,32,0,0,0,0)); SDL_BlitSurface( SDLimage[n], NULL ,SDLimageCC[n], NULL); Image_colorkey(SDLimageCC[n]); membank[bank]=(char*)SDLimageCC[n]->pixels; banksize[bank]=SDLimageCC[n]->w * SDLimageCC[n]->h * SDLimageCC[n]->format->BytesPerPixel; curbank=bank; return 0; } else { error_description="membank Error:image not found "; error_type=1; return -1; } } //______________________________________________________________________________________________ // special access at imagebank buffer colorkeyclipped int basescreen(int bank,int n) { if (SDLscreen[n]!=NULL){ if (SDL_MUSTLOCK(SDLscreen[n])) SDL_LockSurface(SDLscreen[n]); membank[bank]=(char*)SDLscreen[n]->pixels; banksize[bank]=SDLscreen[n]->w * SDLscreen[n]->h * SDLscreen[n]->format->BytesPerPixel; curbank=bank; if (SDL_MUSTLOCK(SDLscreen[n])) SDL_UnlockSurface(SDLscreen[n]); return 0; } else{ error_description="membank Error:screen not opened "; error_type=1; return -1; } } //______________________________________________________________________________________________ // special access at soundbank buffer int basesound(int bank,int n) { if (SDLsound[n]!=NULL){ membank[bank]=(char *)SDLsound[n]->abuf; banksize[bank]=SDLsound[n]->alen; curbank=bank; return 0; } else{ error_description="membank Error:sound not found "; error_type=1; return -1; } } //______________________________________________________________________________________________ int freebase(int bank) { membank[bank]=NULL; banksize[bank]=0; if (curbank==bank)curbank=0; return 0; } //______________________________________________________________________________________________ int freebank(int bank) { free(membank[bank]); banksize[bank]=0; if (curbank==bank)curbank=0; return 0; } //______________________________________________________________________________________________ int copybank(int s,int d) { if (membank[s]==NULL){ error_description="membank Error:source bank not found "; error_type=1; return -1; } if (banksize[d]!=0) free(membank[d]); membank[d]=(char *) malloc(banksize[s]); banksize[d]=banksize[s]; memcpy(membank[d],membank[s],banksize[s]); if (membank[d]==NULL){ error_description="membank Error:could not copy bank or memory bank not allocated "; error_type=1; return -1; } else return 0; } //______________________________________________________________________________________________ int loadbank(char *filename,int bank) { int err; int len; int adv; unsigned int len1; FILE *handle; len1=0xfffe; adv=0; if (bank==-1)bank=curbank; handle=fopen(filename,"rb"); if (handle==NULL){ error_description="membank Error:cold not open the file for loading "; error_type=1; return -1; } fseek(handle,0,SEEK_END); len=ftell(handle); fseek(handle,0,SEEK_SET); if (banksize[bank]!=0) free(membank[bank]); membank[bank]=(char *) malloc(len); banksize[bank]=len; while (len1banksize[bank]-1){ error_description="membank Error:poke address out of bank "; error_type=1; return -1; } membank[bank][address]=byte & 255; return 0; } //______________________________________________________________________________________________ int doke(int bank,int address,unsigned short byte) { if (bank==-1)bank=curbank; if (address <0){ error_description="membank Error:doke must be used with positive address "; error_type=1; return -1; } if (address+1 >banksize[bank]-1){ error_description="membank Error:doke address out of bank "; error_type=1; return -1; } membank[bank][address]=byte & 255; membank[bank][address+1]=byte / 256; return 0; } //______________________________________________________________________________________________ int loke(int bank,int address,unsigned int byte) { if (bank==-1)bank=curbank; if (address <0){ error_description="membank Error:loke must be used with positive address "; error_type=1; return -1; } if (address+3 >banksize[bank]-1){ error_description="membank Error:loke address out of bank "; error_type=1; return -1; } membank[bank][address]=byte & 255; membank[bank][address+1]=(byte / 256)&255; membank[bank][address+2]=(byte/256/256) & 255; membank[bank][address+3]=(byte/256/256/256) & 255; return 0; } //--peek --------------------------------------------------- //______________________________________________________________________________________________ int peek(int bank,int address) { if (bank==-1)bank=curbank; if (address <0){ error_description="membank Error:peek must be used with positive address "; error_type=1; return -1; } if (address >banksize[bank]-1){ error_description="membank Error:peek address out of bank "; error_type=1; return -1; } return (unsigned char)membank[bank][address]; } //______________________________________________________________________________________________ int deek(int bank,int address) { unsigned char lo,hi; if (bank==-1)bank=curbank; if (address <0){ error_description="membank Error:deek must be used with positive address "; error_type=1; return -1; } if (address+1 >banksize[bank]-1){ error_description="membank Error:deek address out of bank "; error_type=1; return -1; } lo=(unsigned char)membank[bank][address]; hi=(unsigned char)membank[bank][address+1]; return lo+(hi*256); } //______________________________________________________________________________________________ int leek(int bank,int address) { unsigned char lo,hi,lohi,hihi; if (bank==-1)bank=curbank; if (address <0){ error_description="membank Error:leek must be used with positive address "; error_type=1; return -1; } if (address+3 >banksize[bank]-1){ error_description="membank Error:leek address out of bank "; error_type=1; return -1; } lo=(unsigned char)membank[bank][address]; hi=(unsigned char)membank[bank][address+1]; lohi=(unsigned char)membank[bank][address+2]; hihi=(unsigned char)membank[bank][address+3]; return lo+(hi*256)+(lohi*256*256)+(hihi*256*256*256); } //______________________________________________________________________________________________ //--fastcopy --------------------------------------------------- int memcopy(int sbank,int s ,int dbank,int d,int size) { if (banksize[sbank]-1 #include #include #include #include #include "BASengine.h" /* bin: returns binary representation of number */ char *bin(int i) { int l; char *buffer ,*ret; buffer = (char *)malloc(1024); strcpy(buffer,""); if (i==0)strcat(buffer,"0"); while(i>0){ if ((i%2)==0) strcat(buffer,"0"); else strcat(buffer,"1"); i=i /2; } l=strlen(buffer); ret = (char *)malloc(l+1); for (i=0;i0) { result = (result % (upper-1))+1; } return( (float)result ); } //_______________________________________________________________________________________________________________________ /* round: round to nearest integer */ double round(double n1) { double n2; n2 = floor(n1); if (n2 == 0) { /* leave it alone */ } else if (n2 > 0) { if ((n1 - n2) > 0.5) { n2++; } } else { if (-(n2 - n1) > 0.5) { n2++; } } return( n2 ); } //_______________________________________________________________________________________________________________________ /* sgn: returns sign of numeric expression */ int sgn(double n) { if (n < 0) { return(-1); } else if (n > 0) { return(1); } else { return(0); } } //_______________________________________________________________________________________________________________________ /* min: return min number of the operands */ double Min(double a, double b) { if (b>a) return a; else return b; } //_______________________________________________________________________________________________________________________ /* max: return max number of the operands */ double Max(double a, double b) { if (b Licence: LGPL */ //_______________________________________________________________________________________________________________________ //header #include #include #include #include #include //#include "strings.h" #include "BASengine.h" //_______________________________________________________________________________________________________________________ /* asc: returns ascii value of first char in string */ int asc(char *string) { return(unsigned char)string[0]; } //_______________________________________________________________________________________________________________________ /* chr: return string corresponding to ascii key value */ char *chr(int v) { char *buffer = (char *)malloc(sizeof(char)*2); buffer[0] = (char)v; buffer[1] = '\0'; return buffer; } //_______________________________________________________________________________________________________________________ /* format: returns formatted string with embedded args */ void format() { } //_______________________________________________________________________________________________________________________ /* insert: insert source string to target at index */ char *insert(char *source, char *target,int position) { char *dest; dest = (char *) malloc(strlen(source)+strlen(target)+1); //strcpy(dest,""); strncpy(dest,source,position); strcpy(&dest[position],target); strcat(dest,source+position); return dest; } //_______________________________________________________________________________________________________________________ /* instr: returns position in source that target was found */ int instr(int start,char *find, char *search) { int searchLen, findLen, i; if (start < 0) { start = 0; } searchLen = strlen( search ); findLen = strlen( find ); /* searching for empty string? */ if (searchLen == 0 || findLen == 0) { return 0; } start = (int)floor( start ); for ( i = start; i < searchLen; i++ ) { if (strncmp( search+i, find, findLen ) == 0) { return( i+1 ); } } /* not found */ return 0 ; } //_______________________________________________________________________________________________________________________ /* lcase: convert string to lower case */ char *lcase(char *string) { int len, i; len = strlen( string ); for ( i = 0; i len-1) { return string; } if (pos < 1) { return ""; } newLen = (pos); left = (char *) malloc(newLen+1); for (pos=newLen;pos>0;pos--)left[pos]='\0'; strncpy(left,string,newLen); left[newLen] = '\0'; return left; } //_______________________________________________________________________________________________________________________ /* basLen: return length of string */ int len(char *string) { return (strlen( string ) ); } //_______________________________________________________________________________________________________________________ /* ltrim: returns string with left whitespace removed */ char *ltrim(char *string) { char *trimmed; trimmed = string; while ( trimmed[0] != '\0' ) { if (!isspace(trimmed[0])) { break; } trimmed++; } // debug al limite: da testare return( trimmed ); } //_______________________________________________________________________________________________________________________ /* mid: returns string with chars 1..n from source */ char *mid(char *string,int i,int n) { int j,len; char *buffer; if (n<=0) n=strlen(string)+1-i; /* early outs */ len = strlen( string ) - i; if ( i < 1 || len < 0 ) { return ""; } buffer = (char *)malloc(len+2); for ( j = 0; j < n; j++ ) { if (string[i+j-1] == '\0' ) { break; } buffer[j] = string[i+j-1]; } buffer[j] = '\0'; return buffer; } //_______________________________________________________________________________________________________________________ /* replace: replace string from source with replace starting at index */ char *replace(char *src,char *rep, int i) { int a; char *dest; if (i<0)i = 0; dest=(char *) malloc(strlen(src)+1); strcpy(dest,src); for(a=0;a=strlen(dest))break; dest[i+a]=rep[a]; } return(dest); } //_______________________________________________________________________________________________________________________ /* replacesubstr: replace substring in source with withstring */ char *replacesubstr(int start, char *source, char *replace, char *with) { unsigned int i; char *dest; if (start<0) start=0; i=start; while (i= len) { return( string ); } if (pos < 1) { return( "" ); } newlen = pos+1; right = (char *)malloc((newlen+1)); memcpy(right,string+(len-pos),newlen); right[newlen]=0; return( right ); } //_______________________________________________________________________________________________________________________ /* rinstr: reverse Instr function, search from end to start */ int rinstr(char *search,char *find,int start) { int searchLen, findLen, i; findLen = strlen( find ); searchLen = strlen( search ); if (start<=0) start = searchLen-1; /* searching for empty string? */ if (searchLen == 0 || findLen == 0) { return( 0 ); } /* search */ for ( i = start; i >= 0; i-- ) { if (strncmp( search+i, find, findLen ) == 0) { return( i+1 ); } } /* not found */ return( 0 ); } //_______________________________________________________________________________________________________________________ /* rtrim: right trim string */ char *rtrim(char *string) { int len, i; len = strlen(string); for ( i = len-1; i > -1; i-- ) { if (!isspace(string[i])) { string[i+1] = '\0'; return( string ); } } string[0] = '\0'; return(string ); } //_______________________________________________________________________________________________________________________ /* space: return string with n spaces in it */ char *space(int n) { char *string; if (n<0) { n = 0; } string = (char *)malloc((unsigned int)n+1); memset(string,' ',n); string[n] = '\0'; return(string); } //_______________________________________________________________________________________________________________________ /* str: return string representation of numeric expression */ char *str(int v) { char *string; string = (char *)malloc(32); sprintf(string,"%d",v); return(string); } //_______________________________________________________________________________________________________________________ /* string: returns string m chars wide with n in it */ char *string(int n, char *string) { int l,i; char *buffer; l=strlen(string)+1; buffer = (char *)malloc((l*n)+1); strcpy(buffer,""); for (i=0;i -1; i-- ) { if (!isspace(string[i])) { string[i+1] = '\0'; break; } } if (i==0) string[0] = '\0'; trimmed=string; while ( trimmed[0] != '\0' ) { if (!isspace(trimmed[0])) { break; } trimmed++; } return( trimmed ); } //_______________________________________________________________________________________________________________________ /* ucase: convert string to upper case */ char *ucase(char *string) { int len, i; len = strlen( string ); for ( i = 0; i[font_prefix=] # # platforms supported = [linux|osx|freebsd|openbsd|netbsd|morphos|amigaos4] # ###################################################################################### #os is case insensitive ifndef $(OS) OS=$(os) endif BASENGINE_SRC= datafunction.c membank.c dir.c file.c strings.c math.c SRC = $(BASENGINE_SRC) BASENGINE_OBJ= datafunction.o membank.o dir.o file.o strings.o math.o OBJECT= $(BASENGINE_OBJ) #----------------------------------------------------------------------------------------------------------------------------------------# # WIN32 # ifeq ($(OS), win32) TARGET= BASengine.a mingw=c:/devel/c-cpp/MinGW ifndef prefix prefix=c:/programmi/sdlBasic endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=del CFLAG= -Wall -mwindows -g -O2 -I $(mingw)/include LIBS= -lmingw32 -lSDLmain -lSDL -lSDL_image -lSDL_mixer -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # LINUX # ifeq ($(OS), linux) TARGET= BASengine.a ifndef prefix prefix=/opt/sdlBasic endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O2 -I/usr/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DLINUX LIBS=-Wl,-rpath, -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lvorbisfile -lvorbis -logg -lsmpeg -lasound -lSDL -lpng -ltiff -lz -ljpeg -lpthread -lm -lfreetype -ldl #LIBS=-Wl,-rpath, -lSDL -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lvorbisfile -lvorbis -logg -lsmpeg -lpthread -lm -lfreetype -lSDL -lpng -ljpeg -ltiff -lz -lartsdsp -lasound -lartsdsp -ldl #LIBS=-lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # GP2X # ifeq ($(OS), gp2x) TARGET= BASengine.a ifndef prefix prefix=/mnt/sd/sdlBasic endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= /usr/local/open2x/bin/open2x-gcc CPP=/usr/local/open2x/bin/open2x-g++ RANLIB=/usr/local/open2x/bin/open2x-ranlib RM=rm -f CFLAG= -static -Wall -g -O2 -I/usr/local/open2x/open2x/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DGP2X LIBS=-L/usr/local/open2x/open2x/lib -Wl,-rpath, -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg -lSDL -lpng -ltiff -lz -ljpeg -lpthread -lm -lfreetype -ldl COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # MAC OSX # ifeq ($(OS), osx) TARGET= BASengine.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -g -O2 -I/usr/local/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -Wno-long-double LIBS= -lobjc -framework Appkit -framework Carbon -framework IOKit `sdl-config --libs` -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg -lfreetype -ljpeg -lpng -lz COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # FREEBSD # ifeq ($(OS), freebsd) TARGET= BASengine.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O2 -I/usr/local/include/SDL11 -D_REENTRAT -DPLAY_MOD -DUNIX -DFBSD LIBS=-lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg -L/usr/local/lib \ -lpthread COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # OPENBSD # ifeq ($(OS), openbsd) TARGET= BASengine.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O2 -I/usr/local/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DOPENBSD LIBS=-L/usr/local/lib -L/usr/X11R6/lib -lX11 -lXext -lpthread -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # NETBSD # ifeq ($(OS), netbsd) TARGET= BASengine.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O2 -L/usr/pkg/lib -I/usr/pkg/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DNETBSD LIBS=-lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # MORPHOS # ifeq ($(OS), morphos) TARGET= BASengine.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc -noixemul CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O3 -fomit-frame-pointer -mmultiple -mstring -I/usr/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -D__MORPHOS__ LIBS= -lSDL -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # AMIGAOS4 # ifeq ($(OS), amigaos4) TARGET= BASengine.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf # on amiga can be: ppc-amigaos-strip --remove-section=.comment $(TARGET) CC= ppc-amigaos-gcc CPP= ppc-amigaos-g++ RANLIB= ranlib CFLAG= -Wall -ggdb -O3 -fomit-frame-pointer -mmultiple -mstring -D__USE_INLINE__ -D__USE_NETINET_IN_H -I/usr/local/amiga/ppc-amigaos/local/clib2/include/SDL/ -D_REENTRAT -DPLAY_MOD -DUNIX LIBS= -lsmpeg -lSDL_mixer -lSDL_image -lSDL_ttf -lfreetype -lSDL_net -lSDL -lpng -lz -ljpeg -lvorbisfile -lvorbis -logg -lauto -lm -lnet -lunix COMPILE=$(CPP) $(CFLAG) $(LIBS) endif #----------------------------------------------------------------------------------------------------------------------------------------# all: $(TARGET) $(TARGET): $(OBJECT) $(RM) $@ ar cq $@ $(OBJECT) $(RANLIB) $(TARGET) $(OBJECT): %.o: %.c $(CC) $(CFLAG) -c $< -o $@ clean: $(RM) *.o $(RM) $(TARGET) usr/src/sdlBasic/src/sdlBrt/BASengine/datafunction.c0000777000076500007660000000136210463131556017611 0ustar /* Name: datafunction.c Purpose: data function for sdlBasic Author: __vroby__ Copyright: (c) 2004 Viola Roberto <__vroby__@libero.it> Licence: LGPL */ #include #include #include //#include "datafunction.h" #include "BASengine.h" char *dataarray[10000]; int dataenter,datapointer; void init_data() { dataenter=0; datapointer=0; } void loaddata(char *datavalue) { if (dataarray[dataenter]!=NULL)free(dataarray[dataenter]); dataarray[dataenter]=(char *)malloc(strlen(datavalue)); strcpy(dataarray[dataenter],datavalue); dataenter++; } char *readdata() { if (dataarray[datapointer]!=NULL) return dataarray[datapointer++]; else return NULL; } usr/src/sdlBasic/src/sdlBrt/eval.h0000777000076500007660000000564010463131040014262 0ustar /* Name: eval.h Purpose: evaluates nodes generated by parser for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ /* control loop flags */ int exitDoFlag = 0; int exitForFlag = 0; int exitRoutineFlag = 0; int exitWhileFlag = 0; int continueFlag = 0; /* comparisons */ enum { EQ = 1, NE, GT, LT, GE, LE }; /* print flags */ enum { PRINT, PRINT_TAB, PRINT_NEWLINE }; /* opcodes */ enum { OpAdd = 1, OpAnd, OpArgList, OpArrayGet, OpArrayPtr, OpArraySet, OpAssign, OpBuiltin, OpBuiltinCall, OpCase, OpCaseCmp, OpCaseElse, OpCaseRange, OpCaseSelect, OpClassMethod, OpClassMethodCall, OpClose, OpCmp, OpComma, OpConcat, OpConstGet, OpConstSet, OpContinue, OpDelete, OpDestroy, OpDiv, OpDo, OpEnd, OpErase, OpExitDo, OpExitFor, OpExitRoutine, OpExitWhile, OpFloat, OpFor, OpForEach, OpForStep, OpFunction, OpFunctionCall, OpIDiv, OpIf, OpIfTrue, OpIn, OpInitArray, OpInput, OpInt, OpInv, OpLineInput, OpMethod, OpMethodCall, OpMod, OpMul, OpNegate, OpNew, OpNewTmp, OpNoOp, OpNot, OpOpen, OpOr, OpOrBits, OpPower, OpPrint, OpPrintValue, OpReturnValue, OpReturnSetValue, OpShl, OpShr, OpString, OpSub, OpUndefined, OpVar, OpWhile, OpXor }; /* opcodes */ char *opcodeName[] = { "Undefined", "OpAdd", "OpAnd", "OpArgList", "OpArrayGet", "OpArrayPtr", "OpArraySet", "OpAssign", "OpBuiltin", "OpBuiltinCall", "OpCase", "OpCaseCmp", "OpCaseElse", "OpCaseRange", "OpCaseSelect", "OpClassMethod", "OpClassMethodCall", "OpClose", "OpCmp", "OpComma", "OpConcat", "OpConstGet", "OpConstSet", "OpContinue", "OpDelete", "OpDestroy", "OpDiv", "OpDo", "OpEnd", "OpErase", "OpExitDo", "OpExitFor", "OpExitRoutine", "OpExitWhile", "OpFloat", "OpFor", "OpForEach", "OpForStep", "OpFunction", "OpFunctionCall", "OpIDiv", "OpIf", "OpIfTrue", "OpIn", "OpInitArray", "OpInput", "OpInt", "OpInv", "OpLineInput", "OpMethod", "OpMethodCall", "OpMod", "OpMul", "OpNegate", "OpNew", "OpNewTmp", "OpNoOp", "OpNot", "OpOpen", "OpOr", "OpOrBits", "OpPower", "OpPrint", "OpPrintValue", "OpReturnValue", "OpReturnSetValue", "OpShl", "OpShr", "OpString", "OpSub", "OpUndefined", "OpVar", "OpWhile", "OpXor" }; void stringCompare( int op, int popFlag ); void numberCompare( int op, int popFlag ); void stringRangeCompare(void); void numberRangeCompare(void); void eval( Node *node ); usr/src/sdlBasic/src/sdlBrt/sdlBasic_Runtime_License.txt0000777000076500007660000006126710463131556020637 0ustar GNU LIBRARY GENERAL PUBLIC LICENSE ================================== Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! usr/src/sdlBasic/src/sdlBrt/compile.bat0000755000076500007660000000064410622663364015315 0ustar @echo off cd SDLengine call compile.bat cd .. cd unzip call compile.bat cd .. cd BASengine call compile.bat cd .. echo now compiling sdlBasic: please wait rem WARNING!!! verify the correct path of mingGw set MINGWPATH=c:\devel\c-cpp\mingw path %MINGWPATH%\bin;%PATH% mingw32-make os=win32 rem backup sdlBrt.exe rem copy ..\..\bin\sdlBrt.exe C:\devel\basic\sdlBasic\bin\win32\mingw usr/src/sdlBasic/src/sdlBrt/data.h0000777000076500007660000000326410463130722014252 0ustar /* Name: data.h Purpose: builtin types in wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ union Value { Number number; /* number */ char *string; /* pointer to string */ Array *array; /* address of array */ Variant *ref; /* pointer to variant */ }; struct Variant { int datatype; /* number, string or array */ Value value; /* actual data value */ }; /* data types */ enum { DATA_UNDEFINED = 0, /* undefined, error */ DATA_REF, /* pointer to variant */ DATA_NUMBER, /* number */ DATA_STRING, /* pointer to string */ DATA_ARRAY, /* pointer to array */ DATA_OBJECT /* index to wrapped object */ }; char *datumName[] = { "Undefined", "Reference", "Number", "String", "Array", "Object" }; /* the stack */ #define NSTACK (int) 4096 /* maximum stack size */ Variant stack[NSTACK]; /* stack, also holds locals */ int tos = 0; /* top of stack */ int globals = 0; /* count of global variables */ int localstart = 0; /* position of first local in stack */ int stackMax = NSTACK-2; /* maximum stack height */ void formatNumber( char *buffer, Number n ); int addGlobalToStack(void); void pushNumber( Number value ); Variant *getStackPointer( int index ); void dropTos(void); Number popNumber(void); void pushStringCopy( char *string ); void pushString( char *string ); char *popString(void); void copyStackItem( int index ); int getStackType( int index ); void printTos(void); void printStack(void); usr/src/sdlBasic/src/sdlBrt/class.h0000777000076500007660000000475210463130647014457 0ustar /* Name: class.h Purpose: wrappers to interface C++ classes to wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ typedef struct WrappedMethod WrappedMethod; struct WrappedMethod { char *name; /* name of method */ int hash; /* hashed method name value */ int minArgs; /* minimum number of args */ int maxArgs; /* maximum number of args */ void (*routine)(void); /* wrapped method */ WrappedMethod *prior; /* prior method in chain */ }; typedef struct WrappedClass WrappedClass; struct WrappedClass { char *name; /* class name */ int super; /* superclass index */ WrappedMethod *lastMethod; /* pointer to last method */ }; typedef struct WrappedObject WrappedObject; struct WrappedObject { int pointer; /* pointer */ int classIndex; /* index to classList */ int id; /* wxWindows identifier */ }; #define NCLASSES 256 #define NOBJECTS 1024 #define NCREATE_STACK 256 WrappedClass *classList[NCLASSES]; /* builtin classes */ WrappedObject *objectList[NOBJECTS]; /* objects */ int createStack[NCREATE_STACK]; /* objects created 'on stack' */ int nextClass = 1; /* index of next class */ int nextObject = 1; /* index of next object */ int createTos = 0; /* top of createdStack */ int wxObjectIndex = 0; /* value of _wxObject */ #define HASH_MULTIPLIER 31 #define HASH_NHASH 1024 unsigned int hashVal( char *str ); int findClass( char *name ); int addClass( int superIndex, char *name ); void addMethod( int classIndex, char *name, void (*routine)(void), int minArgs, int maxArgs ); WrappedMethod *findClassMethod( int classIndex, char *name, int hash ); WrappedMethod *findMethod( int classIndex, char *name ); int getObject( Number objectIndex ); char **popStringList(void); void freeStringList( char **list ); int popPointer( int matchIndex ); void resolveMethod( int objectIndex, char *name ); void runMethod( int classIndex, char *name ); Number addObject( int classIndex, int pointer ); void runDestructor( int objectIndex, int typeOf ); int classSafeOnStack( int classIndex ); void pushCreateStack( int i ); void clearCreateStack(); usr/src/sdlBasic/src/sdlBrt/keyword.c0000777000076500007660000000547110463131040015014 0ustar /* Name: keyword.c Purpose: keywords for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ /* not in .h file because of load order */ Keyword keyword[] = { { "and", And }, { "append", Append }, { "as", As }, { "call", Call }, { "case", Case }, { "close", Close }, { "const", Const }, { "continue", Continue }, { "common", Common }, { "declare", Declare }, { "delete", Delete }, { "dim", Dim }, { "do", Do }, { "each", Each }, { "else", Else }, { "elseif", ElseIf }, { "elsif", ElseIf }, { "end", End }, { "erase", Erase }, { "error", Error }, { "exit", Exit }, { "explicit", Explicit }, { "for", For }, { "function", Function }, { "if", If }, { "in", In }, { "include", IncludeFile }, { "input", Input }, { "inv", Inv }, { "is", Is, }, { "let", Let }, { "file", Line }, { "loop", Loop }, { "mod", Mod }, { "new", New }, { "next", Next }, { "noconsole", NoConsole }, { "not", Not }, { "open", Open }, { "option", Option }, { "or", Or }, { "output", Output }, { "print", Print }, { "qbasic", QBasic }, { "redim", ReDim }, { "return", Return }, { "select", Select }, { "shared", Shared }, { "shl", Shl }, { "shr", Shr }, { "static", Static }, { "step", Step }, { "sub", Sub }, { "then", Then }, { "to", To }, { "until", Until }, { "wend", Wend }, { "while", While }, { "xor", Xor }, { "zipinclude", ZipIncludeFile }, { 0, 0 } }; /* initKeywords: add keywords to the symbol table */ void initKeywords() { int i; Symbol *s; for (i = 0; keyword[i].name != NULL; i++) { s = findSymbol( keyword[i].name, NULL ); if (s==NULL) { s = addSymbol( keyword[i].name, NULL, SYM_KEYWORD ); s->klass = keyword[i].value; } else { ePrintf( Init, "initKeywords: keyword %s is already declared as a %s", symbolName[s->symboltype] ); } } } usr/src/sdlBasic/src/sdlBrt/SdlBasic.ico0000777000076500007660000001635610463130277015363 0ustar h6 ¨ž00¨F( @ªwˆD"U»Ýî3f™Ìÿ333f3™3Ì3ÿ3333f3™3Ì3ÿ333333f33™33Ì33ÿ33f3fff™fÌfÿf3f33ff3f™3fÌ3fÿ3f™3™f™™™Ì™ÿ™3™33™f3™™3™Ì3™ÿ3™Ì3ÌfÌ™ÌÌÌÿÌ3Ì33Ìf3Ì™3ÌÌ3Ìÿ3Ìÿ3ÿfÿ™ÿÌÿÿÿ3ÿ33ÿf3ÿ™3ÿÌ3ÿÿ3ÿf3fff™fÌfÿf™3™f™™™Ì™ÿ™f33f3ff3™f3Ìf3ÿf3™33™3f™3™™3Ì™3ÿ™3ff3fffff™ffÌffÿff™f3™ff™f™™fÌ™fÿ™ff™3f™ff™™f™Ìf™ÿf™™™3™™f™™™™™Ì™™ÿ™™fÌ3fÌffÌ™fÌÌfÌÿfÌ™Ì3™Ìf™Ì™™ÌÌ™Ìÿ™Ìfÿ3fÿffÿ™fÿÌfÿÿfÿ™ÿ3™ÿf™ÿ™™ÿÌ™ÿÿ™ÿÌ3ÌfÌ™ÌÌÌÿÌÿ3ÿfÿ™ÿÌÿÿÿÌ33Ì3fÌ3™Ì3ÌÌ3ÿÌ3ÿ33ÿ3fÿ3™ÿ3Ìÿ3ÿÿ3Ìf3ÌffÌf™ÌfÌÌfÿÌfÿf3ÿffÿf™ÿfÌÿfÿÿfÌ™3Ì™fÌ™™Ì™ÌÌ™ÿÌ™ÿ™3ÿ™fÿ™™ÿ™ªÿ™ÿÿ™ÌÌ3ÌÌfÌÌ™ÌÌÌÌÌÿÌÌÿÌ3ÿÌfÿÌ™ÿÌÌÿÌÿÿÌÌÿ3ÌÿfÌÿ™ÌÿÌÌÿÿÌÿÿÿ3ÿÿfÿÿ™ÿÿÌÿÿÿÿÿ"""DDDUUUwwwˆˆˆªªª»»»ÝÝÝîîî"DUwˆª»ÝîÝîªwˆD"U» Ñ rrÑÑÑ rrrrÑrÑÑÑ rrrrÑrÑÑÑÑÑ rrrrrÑrÑÑÑÑÑÑÑ rrrrrrÑrÑÑÑÑÑÑÑÑrrrrrrÑrÑÑÑÑÑÑÑÑrrrrrrrrÑÑÑÑÑÑÑÑrrrrr__rÑÑÑÑÑÑÑÑrrr_____ÑÑÑÑÑÑ_Ñr___rr___ÑÑÑÑÑ_ __rrrr_____ÑÑÑ rrr_________Ñ r___________ _____ ___ __ _ ýÿÿÿðÿÿÀÿÿÀÿÿ€ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ€ÿÿ€ÿÿÁÿÿóÿÿ( @€ªwˆD"U»Ýî3f™Ìÿ333f3™3Ì3ÿ3333f3™3Ì3ÿ333333f33™33Ì33ÿ33f3fff™fÌfÿf3f33ff3f™3fÌ3fÿ3f™3™f™™™Ì™ÿ™3™33™f3™™3™Ì3™ÿ3™Ì3ÌfÌ™ÌÌÌÿÌ3Ì33Ìf3Ì™3ÌÌ3Ìÿ3Ìÿ3ÿfÿ™ÿÌÿÿÿ3ÿ33ÿf3ÿ™3ÿÌ3ÿÿ3ÿf3fff™fÌfÿf™3™f™™™Ì™ÿ™f33f3ff3™f3Ìf3ÿf3™33™3f™3™™3Ì™3ÿ™3ff3fffff™ffÌffÿff™f3™ff™f™™fÌ™fÿ™ff™3f™ff™™f™Ìf™ÿf™™™3™™f™™™™™Ì™™ÿ™™fÌ3fÌffÌ™fÌÌfÌÿfÌ™Ì3™Ìf™Ì™™ÌÌ™Ìÿ™Ìfÿ3fÿffÿ™fÿÌfÿÿfÿ™ÿ3™ÿf™ÿ™™ÿÌ™ÿÿ™ÿÌ3ÌfÌ™ÌÌÌÿÌÿ3ÿfÿ™ÿÌÿÿÿÌ33Ì3fÌ3™Ì3ÌÌ3ÿÌ3ÿ33ÿ3fÿ3™ÿ3Ìÿ3ÿÿ3Ìf3ÌffÌf™ÌfÌÌfÿÌfÿf3ÿffÿf™ÿfÌÿfÿÿfÌ™3Ì™fÌ™™Ì™ÌÌ™ÿÌ™ÿ™3ÿ™fÿ™™ÿ™ªÿ™ÿÿ™ÌÌ3ÌÌfÌÌ™ÌÌÌÌÌÿÌÌÿÌ3ÿÌfÿÌ™ÿÌÌÿÌÿÿÌÌÿ3ÌÿfÌÿ™ÌÿÌÌÿÿÌÿÿÿ3ÿÿfÿÿ™ÿÿÌÿÿÿÿÿ"""DDDUUUwwwˆˆˆªªª»»»ÝÝÝîîî"DUwˆª»ÝîÝîªwˆD"U» ÑÑ rrÑÑÑÑ rrrrÑÑÑÑÑÑ rrrrrrÑÑrrrÑÑÑ rrrrrrrrÑÑrrrÑÑÑÑÑ rrrrrrrrrrÑÑrrrÑÑÑÑÑÑÑ rrrrrrrrÑÑrrrÑÑÑÑÑÑÑÑÑ rrrrrrrrÑÑrrrÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrÑÑrrrÑÑÑÑÑÑÑÑÑÑÑÑÑ r rrrrrrrrrrÑÑrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrÑÑrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrÑÑrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrÑÑrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrr_rrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrr_____r_ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrr_________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrr___________ÑÑÑÑÑÑÑÑÑÑÑ__ÑÑrrrr______rr_____ÑÑÑÑÑÑÑÑÑÑÑ____rr______rrrr______ÑÑÑÑÑÑÑÑÑÑ__ ______rrrrrr________ÑÑÑÑÑÑÑÑ ___rrrrrrrr__________ÑÑÑÑÑÑ rrrrrrrr______________ÑÑÑÑ rrrrrr__________________ÑÑ rrrr______________________ rr______________________ ______________________ ________ __ _____ ______ ___ ____ _ __ ÿóÿÿÿÀÿÿÿ?ÿüÿðÿÀÿð?ðÀ@€ÀÀÀÀ?Àÿð ƒÿüÿÿ¿ÿÿÏÿÿ(0`€ ªwˆD"U»Ýî3f™Ìÿ333f3™3Ì3ÿ3333f3™3Ì3ÿ333333f33™33Ì33ÿ33f3fff™fÌfÿf3f33ff3f™3fÌ3fÿ3f™3™f™™™Ì™ÿ™3™33™f3™™3™Ì3™ÿ3™Ì3ÌfÌ™ÌÌÌÿÌ3Ì33Ìf3Ì™3ÌÌ3Ìÿ3Ìÿ3ÿfÿ™ÿÌÿÿÿ3ÿ33ÿf3ÿ™3ÿÌ3ÿÿ3ÿf3fff™fÌfÿf™3™f™™™Ì™ÿ™f33f3ff3™f3Ìf3ÿf3™33™3f™3™™3Ì™3ÿ™3ff3fffff™ffÌffÿff™f3™ff™f™™fÌ™fÿ™ff™3f™ff™™f™Ìf™ÿf™™™3™™f™™™™™Ì™™ÿ™™fÌ3fÌffÌ™fÌÌfÌÿfÌ™Ì3™Ìf™Ì™™ÌÌ™Ìÿ™Ìfÿ3fÿffÿ™fÿÌfÿÿfÿ™ÿ3™ÿf™ÿ™™ÿÌ™ÿÿ™ÿÌ3ÌfÌ™ÌÌÌÿÌÿ3ÿfÿ™ÿÌÿÿÿÌ33Ì3fÌ3™Ì3ÌÌ3ÿÌ3ÿ33ÿ3fÿ3™ÿ3Ìÿ3ÿÿ3Ìf3ÌffÌf™ÌfÌÌfÿÌfÿf3ÿffÿf™ÿfÌÿfÿÿfÌ™3Ì™fÌ™™Ì™ÌÌ™ÿÌ™ÿ™3ÿ™fÿ™™ÿ™ªÿ™ÿÿ™ÌÌ3ÌÌfÌÌ™ÌÌÌÌÌÿÌÌÿÌ3ÿÌfÿÌ™ÿÌÌÿÌÿÿÌÌÿ3ÌÿfÌÿ™ÌÿÌÌÿÿÌÿÿÿ3ÿÿfÿÿ™ÿÿÌÿÿÿÿÿ"""DDDUUUwwwˆˆˆªªª»»»ÝÝÝîîî"DUwˆª»ÝîÝîªwˆD"U» ÑÑ rrÑÑÑÑ rrrrÑÑÑÑÑÑ rrrrrrÑÑÑÑÑÑÑÑÑÑ rrrrrrrrÑÑÑÑÑÑrrÑÑÑÑ rrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑ rrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑ rrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrr rrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrrrrÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrrrrrrrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrrrrrrrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrrrrrrrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrr__rrrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrr______rr__ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrr____________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrr______________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrr________________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ__ÑÑÑÑrrrrrrrr__________________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ____ÑÑrrrrrr__________rr________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ______rrrr__________rrrr________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ____ rr__________rrrrrr__________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑ__ __________rrrrrrrr____________ÑÑÑÑÑÑÑÑÑÑÑÑ ______rrrrrrrrrr______________ÑÑÑÑÑÑÑÑÑÑ __rrrrrrrrrrrr________________ÑÑÑÑÑÑÑÑ rrrrrrrrrrrr____________________ÑÑÑÑÑÑ rrrrrrrrrr________________________ÑÑÑÑ rrrrrrrr____________________________ÑÑ rrrrrr________________________________ rrrr________________________________ rr________________________________ ____________________ __________ ____________ __ ________ __________ ______ ________ ____ ______ __ ____ __ ÿÿÏÿÿÿÿÿÿÿÿÿÿÿÿÿüÿÿÿÿÿÿðÿÿÿÿÿÀÿÿÿÿÿÿÿÿÿü?ÿÿÿðÿÿÿÀÿÿÿðÿÿÿü?ÿÿÿÿÿüÿÿðÿÿðÿÿðÿÿ0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?ÿÿÀ?ÿÿð?ÿÿð?ÿÿð?ÿÿð?ÿÿð?ÿÿðÿÿÿðÿÿÿðÀÿÿÿü3À?ÿÿÿÿ?ÀÿÿÿÿÿÀ?Ãÿÿÿÿÿð?Ïÿÿÿÿÿü?ÿÿÿÿÿÿÿ?ÿÿÿÿÿusr/src/sdlBasic/src/sdlBrt/shared.c0000777000076500007660000000475410463131223014604 0ustar /* Name: shared.h Purpose: Forward declarations for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ #define NUMBER_FLOAT_FORMAT "%Lf" #define NUMBER_INT_FORMAT "%.0Lf" #define ALLOWABLE_ERROR DBL_EPSILON #define NINDEX 4 /* number of indexes allowed */ #define NOPTARGS 8 /* max number of optional args */ #define INCLUDE_MAX 32 /* maximum number of include files */ #define INCLUDE_MAXDEPTH 16 /* maximum nesting of include files */ #define MAX_CONSOLE_LINES 256 /* maximum number of lines shown in console */ #define EXTRA_CONSOLE_LINES 64 /* amount to remove at a time */ int cmdArgc; /* argc from command line */ char *cmdArgv[32]; /* argv from command line */ FILE *inFile; /* handle to file being parsed */ char *cwd = NULL; /* current working directory */ char currtok[256]; /* current token */ int errFlag = 0; /* set by yyerror */ int consoleFlag = 1; /* if false, supress console */ int explicitFlag = 0; /* Option Explicit */ int commonFlag = 0; /* common declaration */ int qBasicFlag = 0; /* Option QBasic */ int fileNum = 0; /* current file number */ int lineNum = 0; /* current line number of current file */ int parseLineId = 0; /* id of line being parsed */ int runLineId = 0; /* id of line being run */ int includeCount = 0; /* number of source files read */ char *includeList[INCLUDE_MAX]; /* names of files included */ int visibleWindow = 0; /* true if any window is visible */ int argCount = 0; /* count of args being passed on stack */ Symbol *currentScope; /* routine being defined */ Symbol *oldScope[255]; /* old currentScope */ int oldScopeP; /* pointer of last oldscope */ Symbol *currentTypeDef; /* type being defined */ Symbol *currentType; /* type being referenced */ int me; /* pointer to object for current method */ int wxAppIndex = 0; /* handle to wxApp */ int debug; /* step mode */ Stack *argCountStack; /* arg count in parser */ Stack *blockStack; /* block type */ Stack *lineStack; /* line number */ Stack *sharedStack; /* shared symbols */ Node *deferredCode = NULL; /* deferred code */ usr/src/sdlBasic/src/sdlBrt/sdlBrt.h0000755000076500007660000000522410645253570014576 0ustar /* Name: sdlBasic.h Purpose: Core (wxBasic) version for sdlBasic Author: David Cuny - __vroby__ based on sdlBasic.c Copyright: (c) 2001 David Cuny Licence: LGPL */ #define PROGNAME "sdlBasic runtime" #define RELEASE "20070714" #define DATEOF "14-Lug-2007" #define COPYRIGHT "(c) 2001 David Cuny and sdlBasic team" #define LICENSE "Lesser GNU Public License" #define SDLBASIC 1 #ifdef AMIGA #define Node ExecNode #include #undef Node #endif #include #include #include #include #include #include #include #include #include #include #ifdef __amigaos4__ #include #endif /* This piece of code allows sdlBasic to compile on FreeBSD 5.3 without include problem */ /* Contributed by Tails92 */ #if !defined(FBSD) && !defined(__amigaos4__) && !defined(__APPLE__) #include #else #include #endif #if defined(WIN32) #include #endif extern int yylex(); extern void yyerror( char* ); #include "unzip/unzip.h" /* Unzip Rutines */ #include "SDLengine/SDLengine.h" /* SDL rutines */ #include "BASengine/BASengine.h" /* BASic rutines */ //#include "GLengine/GLengine.h" /* GL rutines unimplemented yet */ #include "shared.h" /* shared routines */ #include "trace.h" /* tracing code */ #include "error.h" /* error messages and 'safe' routines */ #include "stack.h" /* integer stack */ #include "data.h" /* data types */ #include "symbol.h" /* symbol table */ #include "var.h" /* variables */ #include "array.h" /* array structures */ #include "node.h" /* parse tree data structure */ //#include "BASengine/file.h" /* file support */ //#include "BASengine/dir.h" /* dir support */ //#include "BASengine/datafunction.h" /* data support */ //#include "BASengine/membank.h" /* membank support */ #include "builtin.h" /* builtin routines */ #include "const.h" /* builtin constants */ #include "eval.h" /* parse tree evaluator */ #include "keyword.h" /* keywords (defined in grammar file) */ #include "lexer.h" /* lexer */ #include "class.h" /* class wrappers */ usr/src/sdlBasic/src/sdlBrt/doc_sdlblib.ico0000777000076500007660000000706610463130770016133 0ustar h& ¨Ž( @ªwˆD"U»Ýî3f™Ìÿ333f3™3Ì3ÿ3333f3™3Ì3ÿ333333f33™33Ì33ÿ33f3fff™fÌfÿf3f33ff3f™3fÌ3fÿ3f™3™f™™™Ì™ÿ™3™33™f3™™3™Ì3™ÿ3™Ì3ÌfÌ™ÌÌÌÿÌ3Ì33Ìf3Ì™3ÌÌ3Ìÿ3Ìÿ3ÿfÿ™ÿÌÿÿÿ3ÿ33ÿf3ÿ™3ÿÌ3ÿÿ3ÿf3fff™fÌfÿf™3™f™™™Ì™ÿ™f33f3ff3™f3Ìf3ÿf3™33™3f™3™™3Ì™3ÿ™3ff3fffff™ffÌffÿff™f3™ff™f™™fÌ™fÿ™ff™3f™ff™™f™Ìf™ÿf™™™3™™f™™™™™Ì™™ÿ™™fÌ3fÌffÌ™fÌÌfÌÿfÌ™Ì3™Ìf™Ì™™ÌÌ™Ìÿ™Ìfÿ3fÿffÿ™fÿÌfÿÿfÿ™ÿ3™ÿf™ÿ™™ÿÌ™ÿÿ™ÿÌ3ÌfÌ™ÌÌÌÿÌÿ3ÿfÿ™ÿÌÿÿÿÌ33Ì3fÌ3™Ì3ÌÌ3ÿÌ3ÿ33ÿ3fÿ3™ÿ3Ìÿ3ÿÿ3Ìf3ÌffÌf™ÌfÌÌfÿÌfÿf3ÿffÿf™ÿfÌÿfÿÿfÌ™3Ì™fÌ™™Ì™ÌÌ™ÿÌ™ÿ™3ÿ™fÿ™™ÿ™ªÿ™ÿÿ™ÌÌ3ÌÌfÌÌ™ÌÌÌÌÌÿÌÌÿÌ3ÿÌfÿÌ™ÿÌÌÿÌÿÿÌÌÿ3ÌÿfÌÿ™ÌÿÌÌÿÿÌÿÿÿ3ÿÿfÿÿ™ÿÿÌÿÿÿÿÿ"""DDDUUUwwwˆˆˆªªª»»»ÝÝÝîîî"DUwˆª»ÝîÝîªwˆD"U» áèèèèèÑèèèèè áááárrÑÑÑááè áááárrÑÑÑÑÑè ááárrrÑÑÑÑÑè ááárrr_ÑÑÑÑè ááár_r__ÑÑ_è áááár_____áè áááá_____ááè áááááááááááè ááááè èèèèèèè áèááá èèèèèèè áè áè á ááááááááá €ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿÿÿÿÿÿÿÿÿ€ÿÿ€ÿÿ( @€ªwˆD"U»Ýî3f™Ìÿ333f3™3Ì3ÿ3333f3™3Ì3ÿ333333f33™33Ì33ÿ33f3fff™fÌfÿf3f33ff3f™3fÌ3fÿ3f™3™f™™™Ì™ÿ™3™33™f3™™3™Ì3™ÿ3™Ì3ÌfÌ™ÌÌÌÿÌ3Ì33Ìf3Ì™3ÌÌ3Ìÿ3Ìÿ3ÿfÿ™ÿÌÿÿÿ3ÿ33ÿf3ÿ™3ÿÌ3ÿÿ3ÿf3fff™fÌfÿf™3™f™™™Ì™ÿ™f33f3ff3™f3Ìf3ÿf3™33™3f™3™™3Ì™3ÿ™3ff3fffff™ffÌffÿff™f3™ff™f™™fÌ™fÿ™ff™3f™ff™™f™Ìf™ÿf™™™3™™f™™™™™Ì™™ÿ™™fÌ3fÌffÌ™fÌÌfÌÿfÌ™Ì3™Ìf™Ì™™ÌÌ™Ìÿ™Ìfÿ3fÿffÿ™fÿÌfÿÿfÿ™ÿ3™ÿf™ÿ™™ÿÌ™ÿÿ™ÿÌ3ÌfÌ™ÌÌÌÿÌÿ3ÿfÿ™ÿÌÿÿÿÌ33Ì3fÌ3™Ì3ÌÌ3ÿÌ3ÿ33ÿ3fÿ3™ÿ3Ìÿ3ÿÿ3Ìf3ÌffÌf™ÌfÌÌfÿÌfÿf3ÿffÿf™ÿfÌÿfÿÿfÌ™3Ì™fÌ™™Ì™ÌÌ™ÿÌ™ÿ™3ÿ™fÿ™™ÿ™ªÿ™ÿÿ™ÌÌ3ÌÌfÌÌ™ÌÌÌÌÌÿÌÌÿÌ3ÿÌfÿÌ™ÿÌÌÿÌÿÿÌÌÿ3ÌÿfÌÿ™ÌÿÌÌÿÿÌÿÿÿ3ÿÿfÿÿ™ÿÿÌÿÿÿÿÿ"""DDDUUUwwwˆˆˆªªª»»»ÝÝÝîîî"DUwˆª»ÝîÝîªwˆD"U» áèèèèèèèèèèèèèèèèèèèèèèè áááááááááááááÑáááááááááè ááááááááááárrÑÑÑáááááááè ááááááááárrrrÑrÑÑÑáááááè ááááááááárrrrÑrÑÑÑÑÑáááè áááááááárrrrrÑrÑÑÑÑÑÑÑáè ááááááárrrrrrÑrÑÑÑÑÑÑÑÑè ááááááárrrrrrÑrÑÑÑÑÑÑÑÑè ááááááárrrrrrrrÑÑÑÑÑÑÑÑè ááááááárrrrr__rÑÑÑÑÑÑÑÑè ááááááárrr_____ÑÑÑÑÑÑ_Ñè ááááááár___rr___ÑÑÑÑÑ_áè ááááááá__rrrr_____ÑÑÑááè áááááááárrr_________Ñááè áááááááár___________áááè ááááááááá_____á___áááááè ááááááááááá__áá_áááááááè áááááááááááááááááááááááè áááááááááááááááááááááááè ááááááááè ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ ááááááááè ÎÎÎÎÎ Î Î ÎÎÎÎÎÎ ááááááááè ÎÎÎÎÎ ÎÎÎ Î ÎÎ ÎÎÎÎÎ ááááááááè ÎÎÎÎÎ ÎÎÎ Î ÎÎÎÎÎÎ ááèáááááá ÎÎÎÎÎ ÎÎÎ Î ÎÎ ÎÎÎÎÎ ááè ÎÎÎÎÎ ÎÎÎ Î ÎÎÎÎÎÎ ááè ëèèè ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ ááè ëêè ááè ëè áááááááááááááááááè ë áááááááááááááááááá üüüüüüüüüüüüüüüüüüüüüüü?usr/src/sdlBasic/src/sdlBrt/array.c0000755000076500007660000005247410626362305014462 0ustar /* Name: array.c Purpose: array structures for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ /* createStaticArray: create an array; indexes are on stack */ Array *createStaticArray( Symbol *s ) { int indexes, i, arraySize, stackPos; int indexSize[NINDEX], lower[NINDEX], upper[NINDEX]; Array *array; /* stack holds: index count (on top) lower range of index 1 upper range of index 1 lower range of index 2 upper range of index 2 ... lower range of index n upper range of index n */ /* paranoia */ eMemTest( "createStaticArray: symbol", s ); /* get the index */ indexes = (int)popNumber(); if (indexes > NINDEX) { ePrintf( Runtime, "array %s has %d dimensions, maximum is %d", s->name, indexes, NINDEX ); } /* get the ranges */ arraySize = 1; for (i=0; i < indexes; i++) { lower[i] = (int)popNumber(); upper[i] = (int)popNumber(); if (lower[i] > upper[i]) { ePrintf( Runtime, "index %d of array %s: lower index (%d) greater than upper(%d) index", i+1, lower[i], upper[i] ); } indexSize[i] = (upper[i]-lower[i])+1; arraySize *= indexSize[i]; } /* allocate space for structure */ array = (Array *)eMalloc(sizeof(Array)); array->isDynamic = 0; array->data.item = (Variant *)eMalloc(arraySize * sizeof(Variant)) ; /* initialize array */ for (i=0; i < arraySize; i++){ array->data.item[i].datatype = DATA_NUMBER; array->data.item[i].value.number = 0; } /* store values in structure */ array->indexes = indexes; array->elements = arraySize; for (i=0; ilower[i] = lower[i]; array->upper[i] = upper[i]; arraySize = arraySize/indexSize[i]; array->offset[i] = arraySize; } /* store pointer in variable */ stackPos = varStackPos( s ); stack[stackPos].datatype = DATA_ARRAY; stack[stackPos].value.array = array; return array; } /* createDynamicArray: create a dynamic array */ Array *createDynamicArray( Symbol *s ) { int i, arraySize, stackPos; Array *array; /* paranoia */ eMemTest( "createDynamicArray: symbol", s ); /* allocate space for structure */ array = (Array *)eMalloc(sizeof(Array)); array->isDynamic = 1; /* get the ranges */ arraySize = 32; array->lower[0] = 0; /* count of used cells */ array->upper[0] = 32; /* count of free cells */ array->data.cell = (ArrayCell *)eMalloc(arraySize * sizeof(ArrayCell)) ; /* initialize array */ for (i=0; i < arraySize; i++){ array->data.cell[i].key = NULL; array->data.cell[i].data.datatype = DATA_UNDEFINED; } /* store pointer in variable */ stackPos = varStackPos( s ); stack[stackPos].datatype = DATA_ARRAY; stack[stackPos].value.array = array; return array; } /* createArraySymbol: create an array symbol */ Symbol *createArraySymbol( char *name, int args ) { Symbol *s = NULL; /* already exists in scope? */ s = findSymbol( name, currentScope ); if (s != NULL) { if (s->symboltype != SYM_ARRAY) { ePrintf( Syntax, "%s is already defined as %s", s->name, datumName[s->symboltype] ); } else { return s; } } s = addSymbol( name, currentScope, SYM_ARRAY ); /* how many args? */ if (args == 0) { /* dynamic */ s->args = 1; s->optargs = NINDEX; } else { s->args = args; } if (currentScope==NULL) { /* create as global */ s->stackPos = addGlobalToStack(); stack[s->stackPos].datatype = DATA_ARRAY; stack[s->stackPos].value.array = NULL; } else { /* create as local */ currentScope->locals++; s->stackPos = currentScope->locals; } return s; } /* getArray: return pointer to array */ Array *getArray( Symbol *s ) { int stackPos; /* position of pointer on stack */ stackPos = varStackPos( s ); /* verify the type */ if (stack[stackPos].datatype != DATA_ARRAY) { ePrintf( Runtime, "getArray: %s is %s, not an Array", s->name, datumName[stack[stackPos].datatype] ); } return stack[stackPos].value.array; } /* getStaticIndex: get the address of the data element */ int getStaticIndex( Array *array, Symbol *s ) { int offset; int indexes; int i; int index; int base; /* paranoia */ eMemTest( "getStaticIndex: symbol", s ); /* paranoia */ eMemTest( "getStaticIndex: array", array ); indexes = (int)popNumber(); if (indexes != array->indexes) { ePrintf( Runtime, "getStaticIndex: array %s expects %d indexes, not %d", s->name, array->indexes, indexes ); } offset = 0; for ( i=0; i array->upper[i]) { ePrintf( Runtime, "getStaticIndex: index %d of array %s above upper bounds (%d>%d)", i+1, s->name, index, array->upper[i] ); } else if (index < array->lower[i]) { ePrintf( Runtime, "getStaticIndex: index %d of array %s under lower bounds (%d<%d)", i+1, s->name, index, array->lower[i] ); } base = index-(array->lower[i]); offset += base * array->offset[i]; } return offset; } /* buildKey: build key from stack data */ char *buildKey( Array *array, Symbol *s ) { int args, i, keylen; char *index, *buffer; /* FIX: should eventually just realloc when size is exceeded */ /* create a buffer */ buffer = (char *)eMalloc( 256 ); buffer[0] = '\0'; /* check arg count */ args = (int)popNumber(); /* there must be at least one index */ if (args == 0) { ePrintf( Runtime, "Array %s[]x expects at least 1 index, not 0" ); } /* build the key backwards, for speed */ keylen = 0; for ( i = 1; i <= args; i++ ) { /* get index */ index = popString(); /* make sure it fits in the buffer */ keylen += strlen( index ); if (keylen >= 256) { ePrintf( Runtime, "Array key exceeds 256 characters" ); } /* append to key */ strcat( buffer, index ); /* ivanixcu: debug need free allocated memory of index! printf("ivanixdebug: freeing (index) (%d)\n", *index ); */ if (*index != '\0' ){ eFree( index ); } if (i < args) { /* add delimiter */ keylen += 1; if (keylen >= 256) { ePrintf( Runtime, "Array key exceeds 256 characters" ); } /* replace with ASCII 34 eventually */ strcat( buffer, "," ); } } /* resize the buffer */ return (char *)eRealloc( buffer, keylen+1 ); } /* findKey: return the index of cell with key, or -1 */ int findKey( Array *array, Symbol *s, char *key ) { int hi, lo, mid, c; ArrayCell *cell; /* binary search */ lo = 0; hi = array->lower[0]-1; while (lo <= hi) { mid = floor( (lo + hi) / 2 ); cell = array->data.cell+mid; c = strcmp( key, cell->key ); if (c < 0) { hi = mid - 1; } else if (c > 0) { lo = mid + 1; } else { return mid; } } return -1; } /* getDynamicValue: push value of cell onto stack */ void getDynamicValue( Array *array, Symbol *s ) { int index; char *key; ArrayCell *cell; /* create the key */ key = buildKey( array, s ); /* look for key */ index = findKey( array, s, key ); eFree( key ); if (index == -1) { /* no item */ pushStringCopy( "" ); } else { /* address of the cell */ cell = array->data.cell + index; tos++; stack[tos].datatype = cell->data.datatype; /* copy data to stack */ switch (cell->data.datatype) { case DATA_NUMBER: stack[tos].value.number = cell->data.value.number; break; case DATA_STRING: stack[tos].value.string = eCopyString( cell->data.value.string ); break; default: ePrintf( Runtime, "getDynamicElement: Array %s[%s] is corrupt", s->name, cell->key ); break; } } } /* getDynamicKey: push key of cell onto stack */ int getDynamicKey( Array *array, int index ) { ArrayCell *cell; if (index < 0 || index >= array->lower[0]) { /* failure */ return 0; } else { /* address of the cell */ cell = array->data.cell + index; /* copy string to stack */ tos++; stack[tos].datatype = DATA_STRING; stack[tos].value.string = eCopyString( cell->key ); /* success */ return 1; } } /* resizeDynamicArray: resize array, if needed */ void resizeDynamicArray( Array *array ) { int i, oldSize, newSize; oldSize = array->upper[0]; /* out of room? */ if (array->lower[0] >= oldSize-1) { /* double space */ newSize = oldSize * 2; array->data.cell = (ArrayCell *)eRealloc( (void *)(array->data.cell), newSize * sizeof(ArrayCell) ); /* initialize new area */ for ( i = oldSize; i < newSize; i++ ) { array->data.cell[i].key = NULL; array->data.cell[i].data.datatype = DATA_UNDEFINED; } /* set size */ array->upper[0] = newSize; } } /* insertDynamicCell: insert a new cell at location */ void insertDynamicCell( Array *array, int index ) { int usedCells, bytes; ArrayCell *cell; /* if needed */ resizeDynamicArray( array ); usedCells = array->lower[0]; bytes = sizeof( ArrayCell ) * ((usedCells+1) - index); /* cell to start move from */ cell = array->data.cell + index; /* move memory, overlapping */ memmove( (void *)(cell+1), (void *)cell, bytes ); /* kill prior value */ cell->key = NULL; cell->data.datatype = DATA_UNDEFINED; /* increment cell count */ array->lower[0] += 1; } /* setDynamicValue: set cell at index to value on stack */ void setDynamicValue( Array *array, Symbol *s ) { int index, hi, lo, isNew, c; char *key; Variant *stackData; ArrayCell *cell; /* make sure there is a value to set */ if (tos == 0) { ePrintf( Runtime, "setDynamicValue: stack underflow" ); } /* create the key */ key = buildKey( array, s ); /* assume it will be a new key */ isNew = 1; /* binary search */ lo = 0; hi = array->lower[0]-1; index = 0; while (lo <= hi) { index = floor((lo + hi) / 2); cell = array->data.cell+index; c = strcmp( key, cell->key ); if (c < 0) { hi = index - 1; } else if (c > 0) { lo = index + 1; } else { /* found prior key */ isNew = 0; break; } } /* no prior key? */ if (isNew) { /* create empty cell */ index = lo; insertDynamicCell( array, index ); } /* address of cell */ cell = array->data.cell + index; /* need to set key? */ if (isNew) { /* use key (already unique copy) */ cell->key = key; } else { /* don't need key */ eFree( key ); /* clean up old value */ if (cell->data.datatype == DATA_STRING) { eFree( cell->data.value.string ); } } /* resolve datatype */ stackData = getStackPointer( tos ); cell->data.datatype = stackData->datatype; if (stackData->datatype == DATA_STRING) { /* ref? */ if (stack[tos].datatype == DATA_REF) { /* need to make a unique copy */ cell->data.value.string = eCopyString( stackData->value.string ); } else { /* use directly */ cell->data.value.string = stackData->value.string; } } else if (stackData->datatype == DATA_NUMBER) { cell->data.value.number = stackData->value.number; } else { /* oops */ ePrintf( Runtime, "Can't assign %s to a Dynamic Array", datumName[stackData->datatype] ); } tos--; } /* getArrayElement: puts pointer to array element on stack */ void getArrayElement( Symbol *s ) { int index; Array *array; Variant *v; eMemTest( "getArrayElement: symbol", s ); array = getArray( s ); /* dynamic or static? */ if (array->isDynamic) { getDynamicValue( array, s ); } else { /* static array */ index = getStaticIndex( array, s ); v = array->data.item+index; eMemTest( "getArrayElement: array element", v ); tos++; stack[tos].datatype = DATA_REF; stack[tos].value.ref = v; } } /* setArrayElement: set an item in the array */ void setArrayElement( Symbol *s ) { int offset, type; Array *array; Variant *element; eMemTest( "setArrayElement: symbol", s ); array = getArray( s ); eMemTest( "setArrayElement: array", array ); if (array->isDynamic) { setDynamicValue( array, s ); } else { /* this should be implemented as a seperate routine */ offset = getStaticIndex( array, s ); element = array->data.item+offset; eMemTest( "setArrayElement: array element", element ); /* need to free string? */ if (element->datatype == DATA_STRING) { eFree( element->value.string ); } /* get the tos */ type = getStackType( tos ); switch (type) { case DATA_NUMBER: element->datatype = DATA_NUMBER; element->value.number = popNumber(); break; case DATA_STRING: element->datatype = DATA_STRING; element->value.string = popString(); break; default: ePrintf( Runtime, "setArrayElement: can't store %s %s into Array", datumName[type], s->name ); break; } } } /* pushArray: push an array onto the stack */ void pushArray( Symbol *s ) { int stackPos, type; if (tos == stackMax) { ePrintf( Runtime, "pushArray: stack overflow" ); } tos++; stackPos = varStackPos( s ); type = getStackType( stackPos ); if (type != DATA_ARRAY) { ePrintf( Runtime, "pushArray: %s %s is not an Array", datumName[type], s->name ); } stack[tos].datatype = DATA_ARRAY; stack[tos].value.array = stack[stackPos].value.array; } /* inArray: Returns true if key is in array */ int inArray( Symbol *s ) { int index; char *key; Array *array; /* get the array */ array = getArray( s ); eMemTest( "inArray: array", array ); if (!array->isDynamic) { ePrintf( Runtime, "%s is a static array", s->name ); } /* get key */ key = popString(); index = findKey( array, s, key ); eFree( key ); /* found key? */ if (index == -1) { return 0; } else { return 1; } } /* eraseArrayElement: erase a single item from an array */ void eraseArrayElement( Symbol *s ) { int index, usedCells, bytes; char *key; Array *array; ArrayCell *cell; Variant *element; /* get the array */ array = getArray( s ); eMemTest( "eraseArrayElement: array", array ); /* dynamic or static array? */ if (array->isDynamic) { /* get key */ key = buildKey( array, s ); index = findKey( array, s, key ); eFree( key ); /* found the key? */ if (index != -1) { /* cell to delete */ cell = array->data.cell+index; /* remove any string data */ eFree( cell->key ); if (cell->data.datatype == DATA_STRING) { eFree( cell->data.value.string ); } /* calculate chunk of memory to move */ usedCells = array->lower[0]; bytes = sizeof( ArrayCell ) * ((usedCells) - index); /* move memory, overlapping */ memmove( (void *)(cell), (void *)(cell+1), bytes ); /* last cell is now redundant */ cell = array->data.cell+usedCells; /* zap prior value */ cell->key = NULL; cell->data.datatype = DATA_UNDEFINED; /* decrease count */ (array->lower[0])--; } } else { /* get index */ index = getStaticIndex( array, s ); element = array->data.item+index; eMemTest( "eraseArrayElement: array element", element ); /* need to free string? */ if (element->datatype == DATA_STRING) { eMemTest( "eraseArrayElement: array element string", element->value.string ); eFree( element->value.string ); } /* set to zero */ element->datatype = DATA_NUMBER; element->value.number = 0; } } /* eraseArray: erase an entire array */ void eraseArray( Symbol *s ) { int i; char *string; Array *array; Variant *item; ArrayCell *cell; /* get the array */ array = getArray( s ); eMemTest( "eraseArray: array", array ); /* dynamic or static array? */ if (array->isDynamic) { /* free the strings */ for ( i = 0; i < array->upper[0]; i++ ) { cell = array->data.cell + i; eMemTest( "eraseArray: cell[]", cell ); /* free the key */ eFree( cell->key ); cell->key = NULL; /* free the data */ if (cell->data.datatype == DATA_STRING) { string = cell->data.value.string; if (string != NULL) { eFree( string ); } } cell->data.datatype = DATA_UNDEFINED; } /* reset count */ array->lower[0] = 0; /* perhaps this should free allocated memory, too */ } else { /* examine each element */ for ( i = 0; i < array->elements; i++ ) { item = array->data.item+i; eMemTest( "freeArray: item[]", item ); /* free the strings */ if (item->datatype == DATA_STRING) { string = item->value.string; if (string != NULL) { eFree( string ); } } /* set element value to zero */ item->datatype = DATA_NUMBER; item->value.number = 0; } } } /* freeArray: free an array, if local to routine */ void freeArray( Array *array ) { int i; char *string; Variant *item; ArrayCell *cell; eMemTest( "freeArray: array", array ); /* dynamic or static array? */ if (array->isDynamic) { /* free the strings */ for ( i = 0; i < array->upper[0]; i++ ) { cell = array->data.cell + i; eMemTest( "freeArray: cell[]", cell ); /* free the key */ eFree( cell->key ); if (cell->data.datatype == DATA_STRING) { string = cell->data.value.string; if (string != NULL) { eFree( string ); } } } /* ivanixcu: debug mem leak should free cell struct allocated in createDynamicArray() */ eFree( array->data.cell); } else { /* free the strings */ for ( i = 0; i < array->elements; i++ ) { item = array->data.item+i; eMemTest( "freeArray: item[]", item ); if (item->datatype == DATA_STRING) { string = item->value.string; if (string != NULL) { eFree( string ); } } } } eFree( array ); } /* getArrayIndexes: return number of indexes */ int getArrayIndexes() { int datatype; Array *array; datatype = stack[tos].datatype; if (datatype != DATA_ARRAY) { ePrintf( Runtime, "First argument must be an array, not %s", datumName[datatype] ); } array = stack[tos].value.array; if (array->isDynamic) { return 1; } else { return array->indexes; } } /* getArrayBound: return upper bound of index */ int getArrayBound( int index, int upper ) { int datatype; Array *array; datatype = stack[tos].datatype; if (datatype != DATA_ARRAY) { ePrintf( Runtime, "First argument must be an array, not %s", datumName[datatype] ); } array = stack[tos].value.array; /* dynamic array? */ if (array->isDynamic) { if (index < 1 || index > 1) { ePrintf( Runtime, "Subscript out of range" ); } if (upper) { /* used count stored in lower bound */ return array->lower[index-1]; } else { return 1; } } if (index < 1 || index > array->indexes) { ePrintf( Runtime, "Subscript out of range" ); } if (upper) { return array->upper[index-1]; } else { return array->lower[index-1]; } } usr/src/sdlBasic/src/sdlBrt/const.h0000777000076500007660000000053710463130722014467 0ustar /* Name: const.h Purpose: Builtin constants for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ void addConst( char *name, int value ); void addStrConst( char *name, char *value ); void addConstPtr( char *name, int classIndex, int pointer ); void initConsts( void ); usr/src/sdlBasic/src/sdlBrt/doc_default.ico0000777000076500007660000000706610463130770016144 0ustar h& ¨Ž( @ªwˆD"U»Ýî3f™Ìÿ333f3™3Ì3ÿ3333f3™3Ì3ÿ333333f33™33Ì33ÿ33f3fff™fÌfÿf3f33ff3f™3fÌ3fÿ3f™3™f™™™Ì™ÿ™3™33™f3™™3™Ì3™ÿ3™Ì3ÌfÌ™ÌÌÌÿÌ3Ì33Ìf3Ì™3ÌÌ3Ìÿ3Ìÿ3ÿfÿ™ÿÌÿÿÿ3ÿ33ÿf3ÿ™3ÿÌ3ÿÿ3ÿf3fff™fÌfÿf™3™f™™™Ì™ÿ™f33f3ff3™f3Ìf3ÿf3™33™3f™3™™3Ì™3ÿ™3ff3fffff™ffÌffÿff™f3™ff™f™™fÌ™fÿ™ff™3f™ff™™f™Ìf™ÿf™™™3™™f™™™™™Ì™™ÿ™™fÌ3fÌffÌ™fÌÌfÌÿfÌ™Ì3™Ìf™Ì™™ÌÌ™Ìÿ™Ìfÿ3fÿffÿ™fÿÌfÿÿfÿ™ÿ3™ÿf™ÿ™™ÿÌ™ÿÿ™ÿÌ3ÌfÌ™ÌÌÌÿÌÿ3ÿfÿ™ÿÌÿÿÿÌ33Ì3fÌ3™Ì3ÌÌ3ÿÌ3ÿ33ÿ3fÿ3™ÿ3Ìÿ3ÿÿ3Ìf3ÌffÌf™ÌfÌÌfÿÌfÿf3ÿffÿf™ÿfÌÿfÿÿfÌ™3Ì™fÌ™™Ì™ÌÌ™ÿÌ™ÿ™3ÿ™fÿ™™ÿ™ªÿ™ÿÿ™ÌÌ3ÌÌfÌÌ™ÌÌÌÌÌÿÌÌÿÌ3ÿÌfÿÌ™ÿÌÌÿÌÿÿÌÌÿ3ÌÿfÌÿ™ÌÿÌÌÿÿÌÿÿÿ3ÿÿfÿÿ™ÿÿÌÿÿÿÿÿ"""DDDUUUwwwˆˆˆªªª»»»ÝÝÝîîî"DUwˆª»ÝîÝîªwˆD"U» áèèèèèèèèèèè ááááááÑááááè áááárrÑÑÑááè áááárrÑÑÑÑÑè ááárrrÑÑÑÑÑè ááárrr_ÑÑÑÑè ááár_r__ÑÑ_è áááár_____áè áááá_____ááè áááááááááááè ááááááááèááá ááááááááè ááááááááè á ááááááááá €ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ€ÿÿ( @€ªwˆD"U»Ýî3f™Ìÿ333f3™3Ì3ÿ3333f3™3Ì3ÿ333333f33™33Ì33ÿ33f3fff™fÌfÿf3f33ff3f™3fÌ3fÿ3f™3™f™™™Ì™ÿ™3™33™f3™™3™Ì3™ÿ3™Ì3ÌfÌ™ÌÌÌÿÌ3Ì33Ìf3Ì™3ÌÌ3Ìÿ3Ìÿ3ÿfÿ™ÿÌÿÿÿ3ÿ33ÿf3ÿ™3ÿÌ3ÿÿ3ÿf3fff™fÌfÿf™3™f™™™Ì™ÿ™f33f3ff3™f3Ìf3ÿf3™33™3f™3™™3Ì™3ÿ™3ff3fffff™ffÌffÿff™f3™ff™f™™fÌ™fÿ™ff™3f™ff™™f™Ìf™ÿf™™™3™™f™™™™™Ì™™ÿ™™fÌ3fÌffÌ™fÌÌfÌÿfÌ™Ì3™Ìf™Ì™™ÌÌ™Ìÿ™Ìfÿ3fÿffÿ™fÿÌfÿÿfÿ™ÿ3™ÿf™ÿ™™ÿÌ™ÿÿ™ÿÌ3ÌfÌ™ÌÌÌÿÌÿ3ÿfÿ™ÿÌÿÿÿÌ33Ì3fÌ3™Ì3ÌÌ3ÿÌ3ÿ33ÿ3fÿ3™ÿ3Ìÿ3ÿÿ3Ìf3ÌffÌf™ÌfÌÌfÿÌfÿf3ÿffÿf™ÿfÌÿfÿÿfÌ™3Ì™fÌ™™Ì™ÌÌ™ÿÌ™ÿ™3ÿ™fÿ™™ÿ™ªÿ™ÿÿ™ÌÌ3ÌÌfÌÌ™ÌÌÌÌÌÿÌÌÿÌ3ÿÌfÿÌ™ÿÌÌÿÌÿÿÌÌÿ3ÌÿfÌÿ™ÌÿÌÌÿÿÌÿÿÿ3ÿÿfÿÿ™ÿÿÌÿÿÿÿÿ"""DDDUUUwwwˆˆˆªªª»»»ÝÝÝîîî"DUwˆª»ÝîÝîªwˆD"U» áèèèèèèèèèèèèèèèèèèèèèèè áááááááááááááÑáááááááááè ááááááááááárrÑÑÑáááááááè ááááááááárrrrÑrÑÑÑáááááè ááááááááárrrrÑrÑÑÑÑÑáááè áááááááárrrrrÑrÑÑÑÑÑÑÑáè ááááááárrrrrrÑrÑÑÑÑÑÑÑÑè ááááááárrrrrrÑrÑÑÑÑÑÑÑÑè ááááááárrrrrrrrÑÑÑÑÑÑÑÑè ááááááárrrrr__rÑÑÑÑÑÑÑÑè ááááááárrr_____ÑÑÑÑÑÑ_Ñè ááááááár___rr___ÑÑÑÑÑ_áè ááááááá__rrrr_____ÑÑÑááè áááááááárrr_________Ñááè áááááááár___________áááè ááááááááá_____á___áááááè ááááááááááá__áá_áááááááè áááááááááááááááááááááááè áááááááááááááááááááááááè áááááááááááááááááááááááè áááááááááááááááááááááááè áááááááááááááááááááááááè áááááááááááááááááááááááè áááááááááááááááááèáááááá áááááááááááááááááè áááááááááááááááááè ëèèè áááááááááááááááááè ëêè áááááááááááááááááè ëè áááááááááááááááááè ë áááááááááááááááááá ààààààààààààààààààààààààààààà?ààÿàÿusr/src/sdlBasic/src/sdlBrt/var.h0000777000076500007660000000077310463131223014130 0ustar /* Name: var.h Purpose: wxBasic simple variables Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ Symbol *returnVar( char *name, int symType, int create ); Symbol *createConst( char *name ); Symbol *createParm( char *name, int symType ); int varStackPos( Symbol *s ); void setStack( int index ); void setVar( Symbol *s ); void setReturn(); Number fetchNumber( int index ); char *fetchString( int index ); void getVar( Symbol *s ); usr/src/sdlBasic/src/sdlBrt/bison_build.sh0000777000076500007660000000005410463130346016011 0ustar bison -y sdlBrt_tab.y mv ./y.tab.c ./y_tab.cusr/src/sdlBasic/src/sdlBrt/const.c0000755000076500007660000005371610626330773014476 0ustar /* Name: const.c Purpose: Builtin constants for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ /* addConst: add numeric constant */ void addConst( char *name, int value ) { int pos; Symbol *s; s = createConst( name ); pos = s->stackPos; stack[pos].datatype = DATA_NUMBER; stack[pos].value.number = value; } /* addStrConst: add string constant */ void addStrConst( char *name, char *value ) { int pos; Symbol *s; s = createConst( name ); pos = s->stackPos; stack[pos].datatype = DATA_STRING; stack[pos].value.string = eCopyString(value); } /* addPtrConst: wrap a constant pointer */ void addConstPtr( char *name, int classIndex, int pointer ) { int handle; /* wrap the pointer */ handle = (int)addObject( classIndex, pointer ); /* create as a normal constant */ addConst( name, handle ); } /* initConsts: initialize the builtin constants */ void initConsts() { /* common */ addStrConst( "dcbasic_version", RELEASE ); addStrConst( "dcbasic_date", DATEOF ); addConst( "true", !0 ); addConst( "false", 0 ); addConst( "null", 0 ); #ifdef FBSD addConst( "isfbsd", !0 ); addStrConst( "os", "fbsd" ); #else addConst( "isfbsd", 0 ); #endif #ifdef LINUX addConst( "islinux", !0 ); addStrConst( "os", "linux" ); #else addConst( "islinux", 0 ); #endif #ifdef GP2X addConst( "isgp2x", !0 ); addStrConst( "os", "gp2x" ); #else addConst( "isgp2x", 0 ); #endif #ifdef WIN32 addConst( "iswin32", !0 ); addStrConst( "os", "win32" ); #else addConst( "iswin32", 0 ); #endif #ifdef __APPLE__ addConst( "isosx", !0 ); addStrConst( "os", "osx" ); #else addConst( "isosx", 0 ); #endif #ifdef __MORPHOS__ addConst( "ismos", !0); addStrConst( "os", "morphos" ); #else addConst( "ismos", 0 ); #endif #ifdef OS4 addConst( "isos4", !0); addStrConst( "os", "os4" ); #else addConst( "isos4", 0 ); #endif #ifdef NETBSD addConst( "isnetbsd", !0); addStrConst( "os", "netbsd" ); #else addConst( "isnetbsd", 0); #endif #ifdef OPENBSD addConst( "isopenbsd", !0); addStrConst( "os", "openbsd" ); #else addConst( "isopenbsd", 0); #endif addConst("num_screens",NUM_SCREENS); addConst("num_images",NUM_IMAGES); addConst("num_sprites",NUM_SPRITES); addConst("num_bobs",NUM_BOBS); addConst("num_waves",NUM_WAVES); addConst("num_socks",NUM_SOCKS); addConst("num_membank",NUM_MEMBANKS); addConst("dual_playfields",1); addConst("screen_colorkey",2); addConst( "k_backspace", 8 ); addConst( "k_tab", 9 ); addConst( "k_clear",12); addConst( "k_return",13); addConst( "k_pause",19); addConst( "k_escape",27); addConst( "k_esc",27); addConst( "k_space",32); addConst( "k_exclaim",33); addConst( "k_quotedbl",34); addConst( "k_hash",35); addConst( "k_dollar",36); addConst( "k_ampersand",38); addConst( "k_quote",39); addConst( "k_leftparen",40); addConst( "k_rightparent",41); addConst( "k_asterisk",42); addConst( "k_plus", 43); addConst( "k_comma", 44); addConst( "k_minus", 45); addConst( "k_period", 46); addConst( "k_slash", 47); addConst( "k_colon", 58); addConst( "k_semicolon", 59); addConst( "k_less", 60); addConst( "k_equals", 61); addConst( "k_greater", 62); addConst( "k_question", 63); addConst( "k_at", 64); addConst( "k_leftbracket", 91); addConst( "k_backslash", 92); addConst( "k_rightbracket", 93); addConst( "k_caret", 94); addConst( "k_underscore", 95); addConst( "k_backquote", 96); addConst( "k_delete", 127); addConst( "k_1", 49); addConst( "k_2", 50); addConst( "k_3", 51); addConst( "k_4", 52); addConst( "k_5", 53); addConst( "k_6", 54); addConst( "k_7", 55); addConst( "k_8", 56); addConst( "k_9", 57); addConst( "k_0", 48); addConst( "k_kp0",256); addConst( "k_kp1",257); addConst( "k_kp2",258); addConst( "k_kp3",259); addConst( "k_kp4",260); addConst( "k_kp5",261); addConst( "k_kp6",262); addConst( "k_kp7",263); addConst( "k_kp8",264); addConst( "k_kp9",265); addConst( "k_kp_period",266); addConst( "k_kp_divide",267); addConst( "k_kp_multiply",268); addConst( "k_kp_minus",269); addConst( "k_kp_plus",270); addConst( "k_kp_enter",271); addConst( "k_kp_equals",272); addConst( "k_up", 273); addConst( "k_down", 274); addConst( "k_right", 275); addConst( "k_left", 276); addConst( "k_insert", 277); addConst( "k_home", 278); addConst( "k_end", 279); addConst( "k_pageup", 280); addConst( "k_pagedown", 281); addConst( "k_f1",282); addConst( "k_f2",283); addConst( "k_f3",284); addConst( "k_f4",285); addConst( "k_f5",286); addConst( "k_f6",287); addConst( "k_f7",288); addConst( "k_f8",289); addConst( "k_f9",290); addConst( "k_f10",291); addConst( "k_f11",292); addConst( "k_f12",293); addConst( "k_f13",294); addConst( "k_f14",295); addConst( "k_f15",296); addConst( "k_numlock",300); addConst( "k_capslock",301); addConst( "k_scrollock",302); addConst( "k_rshift",303); addConst( "k_lshift",304); addConst( "k_rctrl",305); addConst( "k_lctrl",306); addConst( "k_ralt",307); addConst( "k_lalt",308); addConst( "k_rmeta",309); addConst( "k_lmeta",310); addConst( "k_lsuper",311); /* Left "Windows" key */ addConst( "k_rsuper",312); /* Right "Windows" key */ addConst( "k_mode",313); /* "Alt Gr" key */ addConst( "k_compose",314); /* Multi-key compose key */ addConst( "k_help",315); addConst( "k_print",316); addConst( "k_sysreq",317); addConst( "k_break",318); addConst( "k_menu",319); addConst( "k_power",320); /* Power Macintosh power key */ addConst( "k_euro",321); /* Some european keyboards */ addConst( "k_undo",322); /* Atari keyboard has Undo */ /************ OPENGL parameter *******************************************************************/ /* beginmode */ addConst("gl_points",0); addConst("gl_lines",1); addConst("gl_line_loop",2); addConst("gl_line_strip",3); addConst("gl_triangles",4); addConst("gl_triangle_strip",5); addConst("gl_triangle_fan",6); addConst("gl_quads",7); addConst("gl_quad_strip",8); addConst("gl_polygon",9); /* getpname */ addConst("gl_current_color", 0x0b00); addConst("gl_current_index", 0x0b01); addConst("gl_current_normal", 0x0b02); addConst("gl_current_texture_coords", 0x0b03); addConst("gl_current_raster_color", 0x0b04); addConst("gl_current_raster_index", 0x0b05); addConst("gl_current_raster_texture_coords", 0x0b06); addConst("gl_current_raster_position", 0x0b07); addConst("gl_current_raster_position_valid", 0x0b08); addConst("gl_current_raster_distance", 0x0b09); addConst("gl_point_smooth", 0x0b10); addConst("gl_point_size", 0x0b11); addConst("gl_smooth_point_size_range", 0x0b12); addConst("gl_smooth_point_size_granularity", 0x0b13); addConst("gl_point_size_range", 0x0000); addConst("gl_point_size_granularity", 0x0000); addConst("gl_line_smooth", 0x0b20); addConst("gl_line_width", 0x0b21); addConst("gl_smooth_line_width_range", 0x0b22); addConst("gl_smooth_line_width_granularity", 0x0b23); addConst("gl_line_width_range", 0x0000); addConst("gl_line_width_granularity", 0x0000); addConst("gl_line_stipple", 0x0b24); addConst("gl_line_stipple_pattern", 0x0b25); addConst("gl_line_stipple_repeat", 0x0b26); addConst("gl_list_mode", 0x0b30); addConst("gl_max_list_nesting", 0x0b31); addConst("gl_list_base", 0x0b32); addConst("gl_list_index", 0x0b33); addConst("gl_polygon_mode", 0x0b40); addConst("gl_polygon_smooth", 0x0b41); addConst("gl_polygon_stipple", 0x0b42); addConst("gl_cull_face", 0x0b44); addConst("gl_cull_face_mode", 0x0b45); addConst("gl_front_face", 0x0b46); addConst("gl_lighting", 0x0b50); addConst("gl_light_model_local_viewer", 0x0b51); addConst("gl_light_model_two_side", 0x0b52); addConst("gl_light_model_ambient", 0x0b53); addConst("gl_shade_model", 0x0b54); addConst("gl_color_material_face", 0x0b55); addConst("gl_color_material_parameter", 0x0b56); addConst("gl_color_material", 0x0b57); addConst("gl_fog", 0x0b60); addConst("gl_fog_index", 0x0b61); addConst("gl_fog_density", 0x0b62); addConst("gl_fog_start", 0x0b63); addConst("gl_fog_end", 0x0b64); addConst("gl_fog_mode", 0x0b65); addConst("gl_fog_color", 0x0b66); addConst("gl_depth_range", 0x0b70); addConst("gl_depth_test", 0x0b71); addConst("gl_depth_writemask", 0x0b72); addConst("gl_depth_clear_value", 0x0b73); addConst("gl_depth_func", 0x0b74); addConst("gl_accum_clear_value", 0x0b80); addConst("gl_stencil_test", 0x0b90); addConst("gl_stencil_clear_value", 0x0b91); addConst("gl_stencil_func", 0x0b92); addConst("gl_stencil_value_mask", 0x0b93); addConst("gl_stencil_fail", 0x0b94); addConst("gl_stencil_pass_depth_fail", 0x0b95); addConst("gl_stencil_pass_depth_pass", 0x0b96); addConst("gl_stencil_ref", 0x0b97); addConst("gl_stencil_writemask", 0x0b98); addConst("gl_matrix_mode", 0x0ba0); addConst("gl_normalize", 0x0ba1); addConst("gl_viewport", 0x0ba2); addConst("gl_modelview_stack_depth", 0x0ba3); addConst("gl_projection_stack_depth", 0x0ba4); addConst("gl_texture_stack_depth", 0x0ba5); addConst("gl_modelview_matrix", 0x0ba6); addConst("gl_projection_matrix", 0x0ba7); addConst("gl_texture_matrix", 0x0ba8); addConst("gl_attrib_stack_depth", 0x0bb0); addConst("gl_client_attrib_stack_depth", 0x0bb1); addConst("gl_alpha_test", 0x0bc0); addConst("gl_alpha_test_func", 0x0bc1); addConst("gl_alpha_test_ref", 0x0bc2); addConst("gl_dither", 0x0bd0); addConst("gl_blend_dst", 0x0be0); addConst("gl_blend_src", 0x0be1); addConst("gl_blend", 0x0be2); addConst("gl_logic_op_mode", 0x0bf0); addConst("gl_index_logic_op", 0x0bf1); addConst("gl_logic_op", 0x0bf1); addConst("gl_color_logic_op", 0x0bf2); addConst("gl_aux_buffers", 0x0c00); addConst("gl_draw_buffer", 0x0c01); addConst("gl_read_buffer", 0x0c02); addConst("gl_scissor_box", 0x0c10); addConst("gl_scissor_test", 0x0c11); addConst("gl_index_clear_value", 0x0c20); addConst("gl_index_writemask", 0x0c21); addConst("gl_color_clear_value", 0x0c22); addConst("gl_color_writemask", 0x0c23); addConst("gl_index_mode", 0x0c30); addConst("gl_rgba_mode", 0x0c31); addConst("gl_doublebuffer", 0x0c32); addConst("gl_stereo", 0x0c33); addConst("gl_render_mode", 0x0c40); addConst("gl_perspective_correction_hint", 0x0c50); addConst("gl_point_smooth_hint", 0x0c51); addConst("gl_line_smooth_hint", 0x0c52); addConst("gl_polygon_smooth_hint", 0x0c53); addConst("gl_fog_hint", 0x0c54); addConst("gl_texture_gen_s", 0x0c60); addConst("gl_texture_gen_t", 0x0c61); addConst("gl_texture_gen_r", 0x0c62); addConst("gl_texture_gen_q", 0x0c63); addConst("gl_pixel_map_i_to_i_size", 0x0cb0); addConst("gl_pixel_map_s_to_s_size", 0x0cb1); addConst("gl_pixel_map_i_to_r_size", 0x0cb2); addConst("gl_pixel_map_i_to_g_size", 0x0cb3); addConst("gl_pixel_map_i_to_b_size", 0x0cb4); addConst("gl_pixel_map_i_to_a_size", 0x0cb5); addConst("gl_pixel_map_r_to_r_size", 0x0cb6); addConst("gl_pixel_map_g_to_g_size", 0x0cb7); addConst("gl_pixel_map_b_to_b_size", 0x0cb8); addConst("gl_pixel_map_a_to_a_size", 0x0cb9); addConst("gl_unpack_swap_bytes", 0x0cf0); addConst("gl_unpack_lsb_first", 0x0cf1); addConst("gl_unpack_row_length", 0x0cf2); addConst("gl_unpack_skip_rows", 0x0cf3); addConst("gl_unpack_skip_pixels", 0x0cf4); addConst("gl_unpack_alignment", 0x0cf5); addConst("gl_pack_swap_bytes", 0x0d00); addConst("gl_pack_lsb_first", 0x0d01); addConst("gl_pack_row_length", 0x0d02); addConst("gl_pack_skip_rows", 0x0d03); addConst("gl_pack_skip_pixels", 0x0d04); addConst("gl_pack_alignment", 0x0d05); addConst("gl_map_color", 0x0d10); addConst("gl_map_stencil", 0x0d11); addConst("gl_index_shift", 0x0d12); addConst("gl_index_offset", 0x0d13); addConst("gl_red_scale", 0x0d14); addConst("gl_red_bias", 0x0d15); addConst("gl_zoom_x", 0x0d16); addConst("gl_zoom_y", 0x0d17); addConst("gl_green_scale", 0x0d18); addConst("gl_green_bias", 0x0d19); addConst("gl_blue_scale", 0x0d1a); addConst("gl_blue_bias", 0x0d1b); addConst("gl_alpha_scale", 0x0d1c); addConst("gl_alpha_bias", 0x0d1d); addConst("gl_depth_scale", 0x0d1e); addConst("gl_depth_bias", 0x0d1f); addConst("gl_max_eval_order", 0x0d30); addConst("gl_max_lights", 0x0d31); addConst("gl_max_clip_planes", 0x0d32); addConst("gl_max_texture_size", 0x0d33); addConst("gl_max_pixel_map_table", 0x0d34); addConst("gl_max_attrib_stack_depth", 0x0d35); addConst("gl_max_modelview_stack_depth", 0x0d36); addConst("gl_max_name_stack_depth", 0x0d37); addConst("gl_max_projection_stack_depth", 0x0d38); addConst("gl_max_texture_stack_depth", 0x0d39); addConst("gl_max_viewport_dims", 0x0d3a); addConst("gl_max_client_attrib_stack_depth", 0x0d3b); addConst("gl_subpixel_bits", 0x0d50); addConst("gl_index_bits", 0x0d51); addConst("gl_red_bits", 0x0d52); addConst("gl_green_bits", 0x0d53); addConst("gl_blue_bits", 0x0d54); addConst("gl_alpha_bits", 0x0d55); addConst("gl_depth_bits", 0x0d56); addConst("gl_stencil_bits", 0x0d57); addConst("gl_accum_red_bits", 0x0d58); addConst("gl_accum_green_bits", 0x0d59); addConst("gl_accum_blue_bits", 0x0d5a); addConst("gl_accum_alpha_bits", 0x0d5b); addConst("gl_name_stack_depth", 0x0d70); addConst("gl_auto_normal", 0x0d80); addConst("gl_map1_color_4", 0x0d90); addConst("gl_map1_index", 0x0d91); addConst("gl_map1_normal", 0x0d92); addConst("gl_map1_texture_coord_1", 0x0d93); addConst("gl_map1_texture_coord_2", 0x0d94); addConst("gl_map1_texture_coord_3", 0x0d95); addConst("gl_map1_texture_coord_4", 0x0d96); addConst("gl_map1_vertex_3", 0x0d97); addConst("gl_map1_vertex_4", 0x0d98); addConst("gl_map2_color_4", 0x0db0); addConst("gl_map2_index", 0x0db1); addConst("gl_map2_normal", 0x0db2); addConst("gl_map2_texture_coord_1", 0x0db3); addConst("gl_map2_texture_coord_2", 0x0db4); addConst("gl_map2_texture_coord_3", 0x0db5); addConst("gl_map2_texture_coord_4", 0x0db6); addConst("gl_map2_vertex_3", 0x0db7); addConst("gl_map2_vertex_4", 0x0db8); addConst("gl_map1_grid_domain", 0x0dd0); addConst("gl_map1_grid_segments", 0x0dd1); addConst("gl_map2_grid_domain", 0x0dd2); addConst("gl_map2_grid_segments", 0x0dd3); addConst("gl_texture_1d", 0x0de0); addConst("gl_texture_2d", 0x0de1); addConst("gl_feedback_buffer_pointer", 0x0df0); addConst("gl_feedback_buffer_size", 0x0df1); addConst("gl_feedback_buffer_type", 0x0df2); addConst("gl_selection_buffer_pointer", 0x0df3); addConst("gl_selection_buffer_size", 0x0df4); addConst("gl_polygon_offset_units", 0x2a00); addConst("gl_polygon_offset_point", 0x2a01); addConst("gl_polygon_offset_line", 0x2a02); addConst("gl_polygon_offset_fill", 0x8037); addConst("gl_polygon_offset_factor", 0x8038); addConst("gl_texture_binding_1d", 0x8068); addConst("gl_texture_binding_2d", 0x8069); addConst("gl_texture_binding_3d", 0x806a); addConst("gl_vertex_array", 0x8074); addConst("gl_normal_array", 0x8075); addConst("gl_color_array", 0x8076); addConst("gl_index_array", 0x8077); addConst("gl_texture_coord_array", 0x8078); addConst("gl_edge_flag_array", 0x8079); addConst("gl_vertex_array_size", 0x807a); addConst("gl_vertex_array_type", 0x807b); addConst("gl_vertex_array_stride", 0x807c); addConst("gl_normal_array_type", 0x807e); addConst("gl_normal_array_stride", 0x807f); addConst("gl_color_array_size", 0x8081); addConst("gl_color_array_type", 0x8082); addConst("gl_color_array_stride", 0x8083); addConst("gl_index_array_type", 0x8085); addConst("gl_index_array_stride", 0x8086); addConst("gl_texture_coord_array_size", 0x8088); addConst("gl_texture_coord_array_type", 0x8089); addConst("gl_texture_coord_array_stride", 0x808a); addConst("gl_edge_flag_array_stride", 0x808c); addConst("gl_texture_width", 0x1000); addConst("gl_texture_height", 0x1001); addConst("gl_texture_internal_format", 0x1003); addConst("gl_texture_components", 0x1003); addConst("gl_texture_border_color", 0x1004); addConst("gl_texture_border", 0x1005); addConst("gl_texture_red_size", 0x805c); addConst("gl_texture_green_size", 0x805d); addConst("gl_texture_blue_size", 0x805e); addConst("gl_texture_alpha_size", 0x805f); addConst("gl_texture_luminance_size", 0x8060); addConst("gl_texture_intensity_size", 0x8061); addConst("gl_texture_priority", 0x8066); addConst("gl_texture_resident", 0x8067); /* * gp2x joystick buttons */ addConst("gp2x_north", 0x00001); addConst("gp2x_northwest", 0x00002); addConst("gp2x_west", 0x00004); addConst("gp2x_southwest", 0x00008); addConst("gp2x_south", 0x00010); addConst("gp2x_southeast", 0x00020); addConst("gp2x_east", 0x00040); addConst("gp2x_northeast", 0x00080); addConst("gp2x_center", 0x40000); addConst("gp2x_voldown", 0x20000); addConst("gp2x_volup", 0x10000); addConst("gp2x_a", 0x01000); addConst("gp2x_b", 0x02000); addConst("gp2x_x", 0x04000); addConst("gp2x_y", 0x08000); addConst("gp2x_start", 0x00100); addConst("gp2x_select", 0x00200); addConst("gp2x_topleft", 0x00400); addConst("gp2x_topright", 0x00800); } usr/src/sdlBasic/src/sdlBrt/data.c0000777000076500007660000001526710463130722014253 0ustar /* Name: data.c Purpose: builtin types in wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ /* formatNumber: format number in buffer, remove trailing zeros */ void formatNumber( char *buffer, Number n ) { int i; /* no floating point? */ if (floor(n) == n) { sprintf( buffer, NUMBER_INT_FORMAT, n ); } else { /* format with floating point */ sprintf( buffer, NUMBER_FLOAT_FORMAT,n ); /* search for non-zero */ for( i = strlen(buffer)-1; i > 0; i-- ) { if (buffer[i] != '0') { break; } else if (buffer[i-1] != '.') { buffer[i] = '\0'; } } } } /* addGlobalToStack: return index for global on stack */ int addGlobalToStack() { globals++; stackMax--; if (tos == stackMax) { ePrintf( Runtime, "addGlobalToStack: out of stack space"); } return stackMax+1; } /* pushNumber: push a number onto the stack */ void pushNumber( Number value ) { if (tos == stackMax) { ePrintf( Runtime, "pushNumber: stack overflow" ); } tos++; stack[tos].datatype = DATA_NUMBER; stack[tos].value.number = value; } /* getStackPointer: return pointer from stack */ Variant *getStackPointer( int index ) { /* indirected? */ if (stack[index].datatype == DATA_REF) { return stack[index].value.ref; } else { return &stack[index]; } } /* dropTos: remove top of stack and discard */ void dropTos() { /* need to free? */ if (stack[tos].datatype == DATA_STRING) { free( stack[tos].value.string ); } stack[tos--].datatype = DATA_UNDEFINED; } /* popNumber: pop a number off the stack */ Number popNumber() { Number result; Variant *v; if (tos==0) { ePrintf( Runtime, "popNumber: stack underflow" ); } v = getStackPointer( tos ); switch (v->datatype) { case DATA_NUMBER: case DATA_OBJECT: tos--; return v->value.number; case DATA_STRING: result = (Number)atof(v->value.string); /* need to free? */ if (stack[tos].datatype == DATA_STRING) { free( stack[tos].value.string ); stack[tos].datatype = DATA_UNDEFINED; } tos--; return result; default: /* silently fail... */ tos--; return 0; } } /* pushStringCopy: push a copy of a string onto the stack */ void pushStringCopy( char *string ) { if (tos == stackMax) { ePrintf( Runtime, "pushStringCopy: stack overflow" ); } tos++; stack[tos].datatype = DATA_STRING; if (string==NULL) { stack[tos].value.string = eCopyString(""); } else { stack[tos].value.string = eCopyString( string ); } } /* pushString: push a String onto the stack */ void pushString( char *string ) { if (tos==stackMax) { ePrintf( Runtime, "PushString: stack overflow" ); } tos++; stack[tos].datatype = DATA_STRING; if (string==NULL) { stack[tos].value.string = eCopyString(""); } else { stack[tos].value.string = eCopyString(string); } } /* popString: pop a string off the stack */ char *popString() { char *string; Variant *v; char buffer[32]; if (tos==0) { ePrintf( Runtime, "PopString: stack underflow" ); } v = getStackPointer( tos ); if (stack[tos].datatype == DATA_STRING) { /* string on stack */ string = v->value.string; v->datatype = DATA_UNDEFINED; } else if (v->datatype == DATA_STRING) { /* copy from ref */ string = eCopyString( v->value.string ); } else if (v->datatype == DATA_NUMBER) { formatNumber( buffer, v->value.number ); string = eCopyString( buffer ); } else { /* create an empty string */ string = eCopyString(""); } tos--; return string; } /* copyStackItem: copy stack item to top of stack */ void copyStackItem( int index ) { if (tos == stackMax) { ePrintf( Runtime, "copyStackItem: stack overflow" ); } tos++; switch (stack[index].datatype) { case DATA_UNDEFINED: stack[tos].datatype = DATA_UNDEFINED; break; case DATA_REF: stack[tos].datatype = DATA_REF; stack[tos].value.ref = stack[index].value.ref; break; case DATA_NUMBER: case DATA_STRING: case DATA_OBJECT: stack[tos].datatype = DATA_REF; stack[tos].value.ref = getStackPointer( index ); break; case DATA_ARRAY: stack[tos].datatype = stack[index].datatype; stack[tos].value.array = stack[index].value.array; break; default: ePrintf( Runtime, "copyStackItem: unknown data type: %s", datumName[ stack[index].datatype ] ); } } /* getStackType: return datatype of item on stack */ int getStackType( int index ) { Variant *v; v = getStackPointer( index ); return v->datatype; } /* printTos: print top of stack item, core of print routine */ void printTos() { char *string; char buffer[32]; int typeOf; typeOf = getStackType( tos ); switch (typeOf) { case DATA_NUMBER: formatNumber( buffer, popNumber() ); eConsole( "%s", buffer ); break; case DATA_STRING: string = popString(); eConsole( "%s", string ); free( string ); break; case DATA_OBJECT: eConsole( "%d", (int)popNumber() ); default: ePrintf( Runtime, "printTos: can't print %s", datumName[typeOf] ); } } /* printStack: display stack for debugging */ void printStack() { int i; char flag; Variant *v; for ( i = 0; i <= tos; i++ ) { v = getStackPointer( i ); if (stack[i].datatype == DATA_REF) { flag = '*'; } else { flag = ' '; } switch (v->datatype) { case DATA_UNDEFINED: eConsole( "(%d)->undefined ", i ); break; case DATA_NUMBER: eConsole( "(%d)->%c%Lf ", i, flag, v->value.number ); break; case DATA_STRING: eConsole( "(%d)->%c%s ", i, flag, v->value.string ); break; case DATA_ARRAY: eConsole( "(%d)->array ", i ); break; case DATA_REF: eConsole( "(%d)->REF ", i ); case DATA_OBJECT: eConsole( "(%d)->OBJ:%Lf ", i, v->value.number ); break; default: eConsole( "(%d)->%s ", i, datumName[stack[i].datatype] ); break; } if (i==localstart){ eConsole("[LOCALS]"); } } eConsole( "[TOS]\n" ); } usr/src/sdlBasic/src/sdlBrt/makefile0000755000076500007660000002236110645255506014675 0ustar ##################################################################################### # sdlBasic Makefile v1.07 for all (beta 2) # ##################################################################################### # # syntax make OS= [exec_prefix=] [font_prefix=] # [stripped=][compress=] [command] # # platforms supported = [linux|osx|freebsd|openbsd|netbsd|morphos|amigaos4] # main commands = [install|remove|clean|distclean] # ###################################################################################### #------------------------------------------------------------------------------------# # OPTION # # stripped: activate/deactivate stripped's executable [yes-NO] # compress: executable crunch [NO-gzexe-UPX] #------------------------------------------------------------------------------------# #-----------------------------------------------------------------------------------------------------------------------------# BAS_SRC=sdlBrt.c BAS_INC_SRC=array.c const.c eval.c node.c stack.c var.c builtin.c data.c keyword.c \ symbol.c y_tab.c class.c error.c lexer.c shared.c trace.c SRC = $(UNZIP_SRC) $(BASENGINE_SRC) $(BAS_SRC) #-----------------------------------------------------------------------------------------------------------------------------# UNZIP_OBJ=unzip/unzip.a SDLENGINE_OBJ=SDLengine/SDLengine.a BASENGINE_OBJ=BASengine/BASengine.a BAS_OBJ= sdlBrt.o OBJECT= $(BAS_OBJ) $(UNZIP_OBJ) $(BASENGINE_OBJ) $(SDLENGINE_OBJ) #-----------------------------------------------------------------------------------------------------------------------------# #os is case insensitive ifndef $(OS) OS=$(os) endif #----------------------------------------------------------------------------------------------------------------------------------------# # WIN32 # ifeq ($(OS), win32) TARGET= ../../bin/sdlBrt.exe xTARGET= ../../bin/~sdlBrt.exe RC=RCsdlBrt.o mingw=c:/devel/c-cpp/MinGW ifndef prefix prefix=c:/programmi/sdlBasic endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf stripped=yes compress=no CC= gcc CPP=g++ INSTALL=copy RM=del STRIP=strip CFLAG= -Wall -mwindows -g -O2 -I $(mingw)/include LIBS= -lmingw32 -lSDLmain -lSDL -lSDL_image -lSDL_mixer -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # LINUX # ifeq ($(OS), linux) TARGET= ../../bin/sdlBrt xTARGET= ../../bin/~sdlBrt ifndef prefix prefix=/opt/sdlBasic endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf stripped=yes compress=no CC= gcc CPP=g++ INSTALL=/usr/bin/install RM=rm STRIP=strip CFLAG= -Wall -g -O2 -I/usr/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DLINUX COMPILE=$(CPP) $(CFLAG) LIBS=-Wl,-rpath, -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lvorbisfile -lvorbis -logg -lsmpeg -lasound -lSDL -lpng -ltiff -lz -ljpeg -lpthread -lm -lfreetype -ldl #LIBS=-Wl,-rpath, -lSDL -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg -lpthread -lm -lfreetype -lSDL -lpng -ljpeg -ltiff -lz -ldirectfb -ldirect -lesd -lasound -lopenal -lartsc -ldl #LIBS= -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # GP2X # ifeq ($(OS), gp2x) TARGET= ../../bin/sdlBrt xTARGET= ../../bin/~sdlBrt ifndef prefix prefix=/mnt/sd/sdlBasic endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf stripped=yes compress=no CC= /usr/local/open2x/bin/open2x-gcc CPP=/usr/local/open2x/bin/open2x-g++ INSTALL=/usr/bin/install RM=rm STRIP=/usr/local/open2x/bin/open2x-strip CFLAG= -static -Wall -g -O2 -I/usr/local/open2x/open2x/include -I/usr/local/open2x/open2x/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DGP2X LIBS=-L/usr/local/open2x/open2x/lib -Wl,-rpath, -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg -lSDL -lpng -ltiff -lz -ljpeg -lpthread -lm -lfreetype -ldl COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # MAC OSX # ifeq ($(OS), osx) TARGET= ../../bin/sdlBrt xTARGET= ../../bin/~sdlBrt ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf stripped=yes compress=no CC= gcc CPP=g++ INSTALL=/usr/bin/install RM=rm STRIP=strip CFLAG= -g -O2 -I/usr/local/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -Wno-long-double LIBS= -lobjc -framework Appkit -framework Carbon -framework IOKit `sdl-config --libs` -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg -lfreetype -ljpeg -lpng -lz COMPILE=$(CC) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # FREEBSD # ifeq ($(OS), freebsd) TARGET= ../../bin/sdlBrt xTARGET= ../../bin/~sdlBrt ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf stripped=yes compress=UPX CC= gcc CPP=g++ INSTALL=/usr/bin/install RM=rm STRIP=strip CFLAG= -Wall -g -O2 -I/usr/local/include/SDL11 -D_REENTRAT -DPLAY_MOD -DUNIX -DFBSD LIBS=-lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg -L/usr/local/lib \ -lpthread COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # OPENBSD # ifeq ($(OS), openbsd) TARGET= ../../bin/sdlBrt xTARGET= ../../bin/~sdlBrt ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf stripped=yes compress=no CC= gcc CPP=g++ INSTALL=/usr/bin/install RM=rm STRIP=strip CFLAG= -Wall -g -O2 -I/usr/local/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DOPENBSD LIBS=-L/usr/local/lib -L/usr/X11R6/lib -lX11 -lXext -lpthread -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # NETBSD # ifeq ($(OS), netbsd) TARGET= ../../bin/sdlBrt xTARGET= ../../bin/~sdlBrt ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf stripped=yes compress=no CC= gcc CPP=g++ INSTALL=/usr/bin/install RM=rm STRIP=strip CFLAG= -Wall -g -O2 -L/usr/pkg/lib -I/usr/pkg/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DNETBSD LIBS=-lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # MORPHOS # ifeq ($(OS), morphos) TARGET= ../../bin/sdlBrt xTARGET= ../../bin/~sdlBrt ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf stripped=yes compress=no CC= gcc -noixemul CPP=g++ INSTALL=/usr/bin/install RM=rm STRIP=strip CFLAG= -Wall -g -O3 -fomit-frame-pointer -mmultiple -mstring -I/usr/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -D__MORPHOS__ LIBS= -lSDL -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # AMIGAOS4 # ifeq ($(OS), amigaos4) TARGET= ../../bin/sdlBrt xTARGET= ../../bin/~sdlBrt ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf stripped=no compress=no # on amiga can be: ppc-amigaos-strip --remove-section=.comment $(TARGET) CC= ppc-amigaos-gcc CPP= ppc-amigaos-g++ INSTALL=/usr/bin/install RM=rm STRIP=strip CFLAG= -Wall -ggdb -O3 -fomit-frame-pointer -mmultiple -mstring -D__USE_INLINE__ -D__USE_NETINET_IN_H -I/usr/local/amiga/ppc-amigaos/local/clib2/include/SDL/ -D_REENTRAT -DPLAY_MOD -DUNIX LIBS= -lsmpeg -lSDL_mixer -lSDL_image -lSDL_ttf -lfreetype -lSDL_net -lSDL -lpng -lz -ljpeg -lvorbisfile -lvorbis -logg -lauto -lm -lnet -lunix COMPILE=$(CPP) $(CFLAG) $(LIBS) endif #----------------------------------------------------------------------------------------------------------------------------------------# all: $(TARGET) $(TARGET): $(OBJECT) $(RC) $(COMPILE) -o $(TARGET) $^ $(LIBS) ifeq ($(stripped), yes) $(STRIP) $(TARGET) endif $(BAS_OBJ): %.o: %.c $(BAS_INC_SRC) $(CC) $(CFLAG) -Dfont_prefix=\"$(font_prefix)\" -c $< -o $@ RCsdlBrt.o: RCsdlBrt.rc windres RCsdlBrt.rc RCsdlBrt.o install: install-bin install-fonts install-bin: all ifeq ($(compress), gzexe) gzexe $(TARGET) endif ifeq ($(compress), UPX) upx -9 $(TARGET) endif $(INSTALL) -c -m 755 -d ${exec_prefix} $(INSTALL) -c $(TARGET) ${exec_prefix} install-fonts: $(INSTALL) -c -m 755 -d ${font_prefix}/dejavu $(INSTALL) fonts/DejaVuSans.ttf ${font_prefix}/dejavu/DejaVuSans.ttf $(INSTALL) fonts/DejaVuSansMono-Roman.ttf ${font_prefix}/dejavu/DejaVuSansMono-Roman.ttf remove: remove-bin remove-fonts remove-bin: $(RM) ${exec_prefix}/$(TARGET) remove-fonts: $(RM) ${font_prefix}/dejavu/DejaVuSans.ttf $(RM) ${font_prefix}/dejavu/DejaVuSansMono-Roman.ttf clean: $(RM) *.o $(RM) $(TARGET) $(RM) $(xTARGET) dist-clean: clean remove usr/src/sdlBasic/src/sdlBrt/lexer.h0000777000076500007660000000120310463131106014444 0ustar /* Name: lexer.h Purpose: Convert source wxBasic code into tokens Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ int pushIncludeFile( char *s, long offset ); int pushZipIncludeFile(char *zipfile, char *s, long offset ); void popIncludeFile(); void fixEol(); char getChar(); void ungetChar(); int nextTokenIsSep(); int lexDigits(); int lexHexDigits(); int lexBackquotedChar(); void lexString(); int isNonBreakingChar( char c ); void lexIdentifier( int c ); int identifyWord(); int follows( int letter, int ifTrue, int ifFalse ); int yylex(); void yyerror( char *s ); usr/src/sdlBasic/src/sdlBrt/install.bat0000777000076500007660000000017310463131040015314 0ustar @echo off rem direct install sdlBasic copy ..\..\bin\sdlBrt.exe %ProgramFiles%\sdlBasic\bin echo installation complete usr/src/sdlBasic/src/sdlBrt/error.c0000755000076500007660000003005010635200371014451 0ustar /* Name: error.c Purpose: error support routines Author: David Cuny and modify for sdlBasic __vroby__ Partially derived from Brian Kernighan and Rob Pike The Practice of Programming Copyright: (c) 2001 David Cuny Licence: LGPL */ /* which version to use? */ #ifdef __DEBUG_MEMORY__ #define eAddMemLink(a,n) eAddMemLinkDebug(a,n) #define eRemoveMemLink(a) eRemoveMemLinkDebug(a) #define eMemTest(s,a) eMemTestDebug(s,a) #define eFree(a) eFreeDebug(a) #else #define eAddMemLink(a,n) #define eRemoveMemLink(a) #define eMemTest(s,a) #define eFree(a) free(a) #endif MemLink *lastMemLink = NULL; /* eShutdown: close the application gracefully */ void eShutdown( int errorlevel ) { /* close any open files here... */ exit(errorlevel); } /* ePrintf: print an error message and exit */ void ePrintf( int errType, char *fmt, ... ) { char buffer[512], message[512]; va_list args; FILE *errFile; SourceCode *source = NULL; #ifndef __WXWIN__ fflush(stdout); fprintf(stderr, "\n" ); #endif if (error_type==0) error_description=(char *)eMalloc(512); switch (errType) { case Init: sprintf( message, "Initialization error\n" ); break; case Syntax: source = eFindSource( parseLineId ); if (source == NULL) { sprintf( message, "Syntax error, source code lookup corrupted\n" ); } else { sprintf( message, "File \"%s\" , line %d\nSyntax error: ", includeList[source->fileNum], source->lineNum ); } break; case Runtime: source = eFindSource( runLineId ); if (source == NULL) { sprintf( message, "Syntax error, source code lookup corrupted\n" ); } else { sprintf( message, "File \"%s\" , line %d\nRuntime error: ", includeList[source->fileNum], source->lineNum ); } break; default: sprintf( message, "Unknown error type\n" ); } va_start(args, fmt); vsprintf( buffer, fmt, args ); va_end(args); strcat( message, buffer ); if (error_type==0) strcpy(error_description,buffer); if (fmt[0] != '\0' && fmt[strlen(fmt)-1] == ':') { sprintf( message, "\n%s", strerror(errno)); strcat( buffer, message ); } strcat( buffer, "\n"); /* show the line */ if (errType != Init) { if (source == NULL) { strcat( message, "\n<>" ); } else { sprintf( buffer, "\n%s", source->text); strcat( message, buffer ); } } fprintf( stderr, message ); //printf( message ); /* open the error file */ if (error_type!=2) errFile = fopen( "sdlBasic.err", "w" ); else errFile =NULL; if (errFile != NULL) { fprintf( errFile, message ); fclose( errFile ); } debug=1; if (error_type!=2 && errType!=2 ) error_type=errType; if (errType!=Init) { screendebug(); } //eShutdown(2); /* conventional for failed execution */ } /* eConsole: cross-platform version of printf */ void eConsole( char *fmt, ... ) { char *buffer; va_list args; buffer= (char *)malloc(512); va_start(args, fmt); vsprintf( buffer, fmt, args ); va_end(args); fprintf( stdout, buffer ); free(buffer); } /* eAddMemLinkDebug: add memory chunk to tracking list */ void eAddMemLinkDebug( void *p, int n ) { MemLink *link; /* malloc the link */ link = (MemLink *)malloc(sizeof(MemLink)); if (link == NULL) { ePrintf( Runtime, "eMalloc: malloc of MemLink failed:" ); } /* set values */ link->start = (int)p; link->end = link->start+(n-1); link->next = lastMemLink; lastMemLink = link; } /* eRemoveMemLink: remove memory chunk from tracking list */ void eRemoveMemLinkDebug( void *address ) { MemLink *link; MemLink *prev; if (address == NULL) { return; } prev = NULL; for ( link = lastMemLink; link != NULL; link = link->next ) { if (link->start == (int)address) { if (prev == NULL) { lastMemLink = link->next; } else { prev->next = link->next; } return; } prev = link; } ePrintf( Runtime, "eRemoveMemLink: memory address %p not in list", address ); } /* lookup: sequential search through MemLink list */ MemLink *lookupMemLink( void *p ) { MemLink *link = lastMemLink; for ( ; link != NULL; link = link->next ) { if ((int)p >= link->start && (int)p <= link->end) { return link; } } return NULL; /* no match */ } /* eMemTest: ensure that the memory was allocated */ void eMemTestDebug( char *message, void *address ) { if (address != NULL) { if (lookupMemLink(address) == NULL) { ePrintf( Runtime, "eMemTest: %s: address %p not allocated", message, address ); } } } /* freeAll: free all the elements in list */ void freeMemLinksDebug() { MemLink *link = lastMemLink; MemLink *next; for ( ; link != NULL; link = next) { next = link->next; free( (void*)(link->start) ); /* the chunk */ free( link ); /* the link */ } } /* eCopyString: copy a string, report if error */ char *eCopyString(char *s) { char *t; t = (char *)eMalloc(strlen(s)+1); strcpy(t, s); return t; } /* expected: print error and die */ void expected( char *expect ) { ePrintf( Syntax, "Parse error: expected %s, but got %s", expect, currtok ); } /* eMalloc: malloc and report if error */ void *eMalloc(size_t size) { void *p; /* malloc the chunk */ p = (void *)malloc(size); if (p == NULL) { ePrintf( Runtime, "eMalloc: malloc of %u bytes failed:", size ); } eAddMemLink( p, size ); return p; } /* eRealloc: realloc and report if error */ void *eRealloc( void *theOld, size_t size) { void *theNew; /* realloc the chunk */ theNew = (void *)realloc(theOld,size); if (theNew == (void *)NULL) { ePrintf( Runtime, "eRealloc: realloc of %u bytes failed:", size ); } #ifdef __DEBUG_MEMORY__ if (theNew != theOld) { eRemoveMemLink(theOld); eAddMemLink(theNew,size); } #endif return theNew; } /* eFreeDebug: free chunk of memory */ void eFreeDebug( void *address ) { if (address != NULL) { eRemoveMemLink( address ); free( address ); } } /* sdlBasic special screen for step tracing and inspect code */ void screendebug() { char *curline; char *inputvar; char *binputvar; char *retvar; char *indexvar; int i,a,ba,oldpaper,oldpen,oldscreen,oldautoback; SourceCode *source=NULL; Symbol *s; Array *arr; while(stopkey()!=0); oldautoback=autoback(-1); oldscreen=screen(-1); oldpaper=paper(-1); oldpen=pen(-1); paper(0); pen(0xffffff); autoback(0); screenopen(8,displaywidth(),100,0,displayheight()-110,displaywidth(),100,0); cls(); if (error_type !=2){ prints(""); paper(0xff0000); pen(0xffffff); prints(error_description); } paper(0); pen(0xffffff); prints(""); for(i=(0-2);i<1; i++){ if (error_type==Runtime) source = eFindSource( runLineId + i ); else source = eFindSource( parseLineId + i ); if (source == NULL) { prints(" "); } else{ if (i==0) pen(0xff0000); else pen(0xffffff); curline=(char *)eMalloc(1024); sprintf(curline,"%s ",source->text); curline[strlen(source->text)-1]=0; prints(curline); free(curline); pen(0xffffff); } } locate(0,0); paper(0xffffff); pen(0); #if defined(GP2X) prints("start Run|select Step|vol +- Exit"); #else prints("F5 Run|F6 Step|F4 Watch|Ctrl+c Exit"); #endif paper(0); pen(0xffffff); screenswap(); screenalpha(8,192); autoback(25); //F5 / START #if defined(GP2X) while(bjoy(0) != 0x00100){ #else while(key(286)==0 ){ #endif if (stopkey()==-1){ terminate(); exit(2); } //F6 #if defined(GP2X) if(bjoy(0) == 0x00200)break; #else if (key(287))break; #endif //F4 if (key(285)){ char stackstring[10][1024]; inputvar=(char *)eMalloc(1024); binputvar=(char *)eMalloc(1024); retvar=(char *)eMalloc(1024); indexvar=(char *)eMalloc(1024); screenalpha(8,255); cls(); locate(0,0); paper(0xffffff); pen(0); prints("F5 Run|F6 Step|F4 Watch|Ctrl+c Exit"); paper(0); pen(0xffffff); screenswap(); strcpy(inputvar,""); inputs(">",inputvar); i=0; while(isymboltype==SYM_ARRAY){ arr=NULL; arr=getArray(s); if (arr->isDynamic!=0){ fprints("dinamic array:"); i=0; if (binputvar[0]=='['){ a=0; do{ a++; ba=a; while(a0 ) { strcpy(indexvar,""); if ( binputvar[a-1]=='\"'){ strncpy(indexvar,&binputvar[ba],a-ba-1); indexvar[a-ba-1]='\0'; } else{ strncpy(indexvar,&binputvar[ba],a-ba); indexvar[a-ba]='\0'; } printf("indexvar:%s - a:%d - ba:%d - i:%d -len:%d \n",indexvar,a,ba,i,strlen(binputvar)); strcpy(stackstring[i],indexvar); } i++; }while(a",indexvar); if (strlen(indexvar)!=0) strcpy(stackstring[i],indexvar); i++; }while(strlen(indexvar)!=0); } for(a=i ;a>=0;a--) pushString(stackstring[a]); i--; if (i>0){ pushNumber(i); getArrayElement(s); retvar=popString(); } else{ retvar="invalid"; } prints(""); } else{ fprints("static array:"); sprintf(retvar,"indexes %d, ",arr->indexes); fprints(retvar); sprintf(retvar,"elements %d ",arr->elements); prints(retvar); if (binputvar[0]=='['){ a=0; for (i=0;iindexes;i++){ a++; ba=a; while(aindexes;i++){ strcpy(indexvar,""); inputs(":select element of array >",indexvar); strcpy(stackstring[i],indexvar); //pushNumber(atof(indexvar)); } } for(a=i ;a>=0;a--) pushNumber(atof(stackstring[a])); pushNumber(arr->indexes); getArrayElement(s); retvar=popString(); prints(""); } } else{ getVar(s); retvar=popString(); } } else{ retvar=(char *)eMalloc(32); strcpy(retvar,"not found \0"); } if (currentScope!=NULL){ if (s!=NULL){ fprints(symbolName[s->symboltype]); fprints(" "); } fprints(currentScope->name); fprints("."); } fprints(inputvar); fprints(":"); prints(retvar); locate(0,0); paper(0xffffff); pen(0); prints("F5 Run|F6 Step|F4 Watch|Ctrl+c Exit"); paper(0); pen(0xffffff); eFree(inputvar); eFree(retvar); eFree(indexvar); } screenalpha(8,192); screenswap(); } //F5 #if defined(GP2X) if(bjoy(0) == 0x00100)debug=0; // step mode disabled #else if (key(286))debug=0; // step mode disabled #endif //wait release of key to continue; while(key(286)!=0 || key(287)!=0 ); screenclose(8); paper(oldpaper); pen(oldpen); screen(oldscreen); screenswap(); autoback(oldautoback); } usr/src/sdlBasic/src/sdlBrt/changelog0000777000076500007660000000321210463130647015041 0ustar replacesubstr new sintax: replacesubstr(optional start,string$,search$,replace$) complete string migration (missing only the critical rutines that used the interprete variable). changed compile style now sdlEngine unzip and basengine are external library added displaymode function added polyline polygon triangle functions added programs binding with basic code embedding into executable fixed inputs problems fixed debug screen problems added --nodefaults parameter on starting fixed programs binding (autoexec) fixed do...loop commands fixed fileRename(), fileCopy() command on Linux side added parameters --help --copyright --license added html documentation you can call from IDE and shipped within sources and the installation fixed bug on printS() command with pen set to 0x000000 fixed bug on mkDir() command on Linux side added scripts for overall compilation, installation and cleaning renamed runtime executable in sdlBrt; now sdlBasic is the IDE large rework in source organization added initial sourcecode of sdlBasicSciTE new feature in mingw batch compiler make improvements of makefile for possible compilation with win32 added dual_playfield and screen_colorkey constant added lastbob added lastsprite added lastscreen improve makefile and modify initialize rutine for customizable installation added screenz command moved the mouse cursor (sprite 0) over all screens, now autoupdatesprite has no effect on sprite 0. added bobz command added Sdlbobz and screenswap bob zorder stuff added spritez command added Sdlspritez and screenswap sprite zorder stuff added getFont command added makefile unified started changelog usr/src/sdlBasic/src/sdlBrt/lexer.c0000777000076500007660000003742410463131106014455 0ustar /* Name: lexer.c Purpose: Convert source wxBasic code into tokens Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ #include #include #include #define INBUFFER_MAX 1024 /* maximum size of line of code */ char lineBuffer[INBUFFER_MAX]; /* line from source code */ char word[INBUFFER_MAX]; /* token parsed from source */ int wordPos = 0; int lineBufferPos = -1; /* position in line buffer */ int eofFlag = 0; /* end of file flag */ typedef struct IncludeData IncludeData; struct IncludeData { FILE *handle; /* file handle */ int fileNum; /* index to name in includeList */ int lineNum; /* line number last read */ }; IncludeData includeStack[INCLUDE_MAXDEPTH]; int includeTos = -1; /* pushIncludeFile: set file to be parsed */ int pushIncludeFile( char *s, long offset ) { char fileName[256]; /* save line number */ if (includeTos > -1) { includeStack[includeTos].lineNum = lineNum; } includeTos++; if (includeTos == INCLUDE_MAXDEPTH) { ePrintf( Runtime, "Can't include %s, include stack depth of %d exceeded", s, INCLUDE_MAXDEPTH ); } /* save name */ if (includeCount > INCLUDE_MAX) { ePrintf( Runtime, "Can't include %s, maximum number of include files is %d", s, INCLUDE_MAX ); } includeList[includeCount] = eCopyString(s); fileNum = includeCount; includeCount++; /* open new */ inFile = fopen( s, "rt" ); lineNum = 0; if (inFile != NULL) { strcpy( fileName, s ); } else { /* try full file name */ #if !defined(AMIGA) if (cwd != NULL && strlen(cwd)) { strcpy( fileName, cwd ); strcat( fileName, s ); #else { strcpy(fileName, s); #endif inFile = fopen( fileName, "rt" ); if ((inFile == NULL) || isdir(fileName)) { ePrintf( Init, "Unable to open file %s\n", fileName ); return 0; } } } /* offset into the file? */ if (offset != 0) { /* seek to position in file */ fseek( inFile, offset, 0 ); } /* save handle */ includeStack[includeTos].handle = inFile; return 1; } /* pushZipIncludeFile: set file to be parsed */ int pushZipIncludeFile( char *zipfile, char *s, long offset ) { char *tmpfile; #ifndef WIN32 char *tmpdir="/tmp"; #else char *tmpdir=getenv("tmp"); #endif if (file_unzip(zipfile,s,tmpdir)==0){ tmpfile=(char *) malloc(strlen(tmpdir)+strlen(s)+2); strcpy(tmpfile,tmpdir); strcat(tmpfile,"/"); strcat(tmpfile,s); tmpfile[strlen(tmpfile)]='\0'; if (pushIncludeFile( tmpfile, offset )) { remove(tmpfile); return 1; } else { remove(tmpfile); return 0; } } else { return 0; } } /* popIncludeFile: pop to prior file on stack */ void popIncludeFile() { /* close file */ fclose( inFile ); eofFlag = 0; /* pop stack */ includeTos--; if (includeTos > -1 ) { /* restore prior settings */ fileNum = includeStack[includeTos].fileNum; lineNum = includeStack[includeTos].lineNum; inFile = includeStack[includeTos].handle; } wordPos = 0; lineBufferPos = -1; } /* fix the eol char to work under DOS and Linux */ void fixEol() { int len; len = strlen( lineBuffer ); if (len > 1) { /* need to adjust for linux or mac eol? */ if ((lineBuffer[len-2] == '\r' && lineBuffer[len-1] == '\n') || (lineBuffer[len-2] == '\n' && lineBuffer[len-1] == '\r' )) { lineBuffer[len-2] = '\n'; lineBuffer[len-1] = '\0'; /* missing eol? */ } else if (lineBuffer[len-1] != '\r' && lineBuffer[len-1] != '\n') { lineBuffer[len] = '\n'; lineBuffer[len+1] = '\0'; } } } /* getChar: read a char from the input file */ char getChar() { /* end of file? */ if (eofFlag) { return EOF; } /* end of buffer? */ if (lineBufferPos == -1 || lineBuffer[lineBufferPos+1] == '\0') { lineBufferPos = -1; if (fgets( lineBuffer, INBUFFER_MAX-2, inFile ) == 0) { popIncludeFile(); if (includeTos == -1) { eofFlag = 1; return EOF; } else { /* sort of hacky, but it works */ return getChar(); } } fixEol(); /* save */ lineNum++; parseLineId = eAddSourceCode( fileNum, lineNum, lineBuffer ); /* shell comment? */ if (lineNum == 1 && lineBuffer[0] == '#' ) { /* skip this line */ lineBufferPos = -1; return getChar(); } } lineBufferPos++; return lineBuffer[lineBufferPos]; } /* ungetChar: move buffer back one char */ void ungetChar() { lineBufferPos--; } /* nextTokenIsSep: true if next token is '\n' or ':' */ int nextTokenIsSep() { int i = lineBufferPos+1; while (1) { switch (lineBuffer[i++]) { case '\n': case ':': return 1; case ' ': case '\t': break; default: return 0; } } } int lexDigits() { /* read digits into the word buffer */ /* returns last non-digit char read */ char c; /* read digits */ while (1){ /* get the next char */ c = getChar(); /* exit if not a digit */ if (!isdigit(c)) { break; } /* add to buffer */ word[wordPos++] = c; } /* return last (non-digit) char read */ return c; } int lexHexDigits() { /* read digits into the word buffer */ /* returns last non-digit char read */ char c; /* read digits */ while (1){ /* get the next char */ c = getChar(); /* exit if not a digit */ if (isdigit(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f')) { /* add to buffer */ word[wordPos++] = c; } else { break; } } /* return last (non-digit) char read */ return c; } /* read special char */ int lexBackquotedChar() { char c; c = getChar(); switch (c) { case 'n': return '\n'; case 'r': return '\r'; case 't': return '\t'; case '\'': return '\''; case '\"': return '\"'; case '\\': return '\\'; default: /* fatal */ ePrintf( Syntax, "Unknown escape code: \\%c", c ); break; } /* can't get here */ return ' '; } /* read string into buffer */ void lexString() { // char c; int c; /* clear buffer */ wordPos = 0; while (1) { /* read a char */ c = getChar(); if (c=='\n' || c == EOF) { /* fatal */ ePrintf( Syntax, "End of line reached before closing quote" ); } /* if end of string, leave loop */ if (c=='\"') { break; } /* special character */ if (c == '\\') { c = lexBackquotedChar(); } /* add to string */ word[wordPos++] = c; } /* pad end */ word[wordPos] = '\0'; } /* isNonBreakingChar: true for char that breaks a token */ int isNonBreakingChar( char c ) { if (isalnum(c)) { return 1; } switch (c) { case '$': case '_': return 1; default: return 0; } } /* lexIdentifier: parse remainder of token as identifier */ void lexIdentifier( int c ) { int i; while ( isNonBreakingChar(c) ){ word[wordPos++] = c; c = getChar(); } /* replace last char */ ungetChar(); /* terminate string */ word[wordPos] = '\0'; /* save token */ strcpy( currtok, word ); /* lower case */ for ( i = 0; word[i] != '\0'; i++ ) { word[i] = tolower( word[i] ); } } /* identifyWord: identify type, and set data value */ int identifyWord() { Symbol *s; /* in symbol table? */ s = NULL; if (currentScope != NULL) { s = findSymbol( word, currentScope ); } if (s==NULL) { s = findSymbol( word, NULL ); } if (s==NULL) { /* copy to private buffer */ yylval.strValue = eCopyString( word ); return Undefined; } switch( s->symboltype ) { case SYM_KEYWORD: if (s->klass == End && nextTokenIsSep()) { /* end statement */ return EndX; } else { /* datatype holds symbol value */ return s->klass; } case SYM_BUILTIN: yylval.symbol = s; return BuiltinName; case SYM_CONSTANT: yylval.symbol = s; return ConstantName; case SYM_VARIABLE: yylval.symbol = s; return VariableName; case SYM_ARRAY: yylval.symbol = s; return ArrayName; case SYM_FUNCTION: yylval.symbol = s; return FunctionName; case SYM_SUB: yylval.symbol = s; return SubName; case SYM_FORWARD_SUB: yylval.symbol = s; return ForwardSubName; case SYM_FORWARD_FUNCTION: yylval.symbol = s; return ForwardFunctionName; case SYM_CLASS: yylval.symbol = s; return ClassName; default: ePrintf( Syntax, "Bad data type: %s", word ); } /* can't get here */ return 0; } int follows( int letter, int ifTrue, int ifFalse ) { char nextchar; nextchar = getChar(); if (nextchar == letter ) { /* add to current token */ currtok[1] = letter; currtok[2] = '\0'; return ifTrue; } else { ungetChar(); return ifFalse; } } int yylex() { int c, nextchar; /* reset position of built word */ wordPos = 0; word[wordPos] = 0; /* skip whitespace */ while (1) { c = getChar(); if (c != ' ' && c != '\t' ) { break; } } /* save as token */ currtok[0] = c; currtok[1] = '\0'; /* what are we parsing? */ switch (c) { case '\'': /* basic-style comment */ strcpy( currtok, "end-of-line"); lineBufferPos = -1; return '\n'; case '/': c = getChar(); switch (c) { case '=': yylval.iValue = OpDiv; return IncrSelf; case '/': /* c++ style comment */ strcpy( currtok, "end-of-line"); lineBufferPos = -1; return '\n'; default: ungetChar(); return '/'; } case '-': c = getChar(); switch (c) { case '=': yylval.iValue = OpSub; return IncrSelf; case '-': /* diector style comment */ strcpy( currtok, "end-of-line"); lineBufferPos = -1; return '\n'; default: ungetChar(); return '-'; } case '\n': strcpy( currtok, "end-of-line"); lineBufferPos = -1; return c; /* end of file */ case EOF: strcpy( currtok, "end-of-file" ); return 0; /* integer */ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': /* add to buffer */ word[wordPos++] = c; /* hex number? */ if (c=='0') { c = getChar(); if (c == 'x' || c == 'X') { word[wordPos++] = c; c = lexHexDigits(); /* replace last non-digit */ ungetChar(); /* terminate string */ word[wordPos] = 0; /* convert to a hex number */ sscanf( word, "%x", &yylval.iValue ); return Integer; } else { ungetChar(); } } /* read remaining digits */ c = lexDigits(); /* floating point? */ if (c=='.') { /* add chars to buffer */ word[wordPos++] = c; /* get remaining digits */ c = lexDigits(); } /* replace last non-digit */ ungetChar(); /* terminate string */ word[wordPos] = '\0'; /* save as current token */ strcpy( currtok, word ); /* convert string to number */ sscanf( word, NUMBER_FLOAT_FORMAT, &(yylval.fValue) ); return Float; /* float or method name */ case '.': /* add to buffer */ word[wordPos++] = c; /* read next char */ c = getChar(); /* floating point number? */ if (isdigit(c)) { /* add to string */ word[wordPos++] = c; /* read remaining digits */ lexDigits(); /* replace last char read */ ungetChar(); /* terminate string */ word[wordPos] = 0; /* save as current token */ strcpy( currtok, word ); /* convert string to number */ sscanf( word, NUMBER_FLOAT_FORMAT,&(yylval.fValue) ); return Float; } else { /* method name? */ if (isalnum(c)) { /* clear buffer */ wordPos = 0; /* read method */ lexIdentifier( c ); /* copy to private buffer */ yylval.strValue = eCopyString( word ); return MethodName; } else { /* breaks word */ ungetChar(); return '.'; } } /* string */ case '\"': /* parse the string */ lexString(); /* copy to private buffer */ yylval.strValue = eCopyString( word ); /* save as current token */ strcpy( currtok, word ); return String; case '!': return follows('=', Ne, '!'); case '<': nextchar = getChar(); switch (nextchar) { case '>': strcpy( currtok, "<>" ); return Ne; case '=': strcpy( currtok, "<=" ); return Le; case '<': strcpy( currtok, "<<" ); return Shl; default: ungetChar(); return Lt; } case '>': nextchar = getChar(); switch (nextchar) { case '=': strcpy( currtok, ">=" ); return Ge; case '>': strcpy( currtok, ">>" ); return Shr; default: ungetChar(); return Gt; } /* division is handled elsewhere */ /* subtraction is handled elsewhere */ case '+': case '*': case '\\': case '%': case '&': switch (c){ case '+': yylval.iValue = OpAdd; break; case '*': yylval.iValue = OpMul; break; /* /= is handled elsewhere, with // */ case '\\': yylval.iValue = OpIDiv; break; case '%': yylval.iValue = OpMod; break; case '&': yylval.iValue = OpConcat; break; default: ePrintf( Syntax, "Lexer failed parsing %c", c ); break; } return follows('=', IncrSelf, c ); case '=': return Eq; default: /* alpha? */ if (isNonBreakingChar(c)) { /* identifier */ lexIdentifier(c); return identifyWord(); } else { /* seperator */ return c; } } } void yyerror( char *s ) { errFlag = 1; s = NULL; } usr/src/sdlBasic/src/sdlBrt/node.c0000777000076500007660000000242110463131106014250 0ustar /* Name: node.c Purpose: Parse tree data structure for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ Node *opNode( int op, Node *left, Node *right ) { Node *node; node = (Node *) eMalloc( sizeof( Node ) ); node->op = op; node->left = left; node->right = right; node->next = NULL; node->trace = -1; return node; } Node *intNode( int op, int value, Node *left, Node *right ) { Node *node; node = opNode( op, left, right ); node->value.iValue = value; return node; } Node *floatNode( int op, Number value, Node *left, Node *right ) { Node *node; node = opNode( op, left, right ); node->value.fValue = value; return node; } Node *stringNode( int op, char *string, Node *left, Node *right ) { Node *node; node = opNode( op, left, right ); node->value.string = string; return node; } Node *symbolNode( int op, Symbol *symbol, Node *left, Node *right ) { Node *node; node = opNode( op, left, right ); node->value.symbol = symbol; return node; } void freeNode( Node *node ) { if (node != NULL) { freeNode( node->left ); freeNode( node->right ); } free( node ); } usr/src/sdlBasic/src/sdlBrt/shared.h0000777000076500007660000000665110463131223014607 0ustar /* Name: shared.h Purpose: Forward declarations for wxBasic Author: David Cuny Copyright: (c) 2001 David Cuny Licence: LGPL */ #if !defined(WIN32) && !defined(__APPLE__) typedef long double Number; /* internal value numbers are stored as */ #else typedef double Number; /* internal value numbers are stored as */ #endif #define NUMBER_FLOAT_FORMAT "%Lf" #define NUMBER_INT_FORMAT "%.0Lf" #define ALLOWABLE_ERROR DBL_EPSILON typedef struct Stack Stack; /* integer stack, for misc. tasks */ typedef union Value Value; /* union of types data stack can hold */ typedef struct Variant Variant; /* type + value */ typedef struct ArrayCell ArrayCell; /* cell of associative array */ typedef struct Array Array; /* array */ typedef struct Symbol Symbol; /* token descriptor */ typedef struct Node Node; /* parse tree node */ typedef struct Type Type; /* core datatypes */ #define NINDEX 4 /* number of indexes allowed */ #define NOPTARGS 8 /* max number of optional args */ #define INCLUDE_MAX 32 /* maximum number of include files */ #define INCLUDE_MAXDEPTH 16 /* maximum nesting of include files */ #define MAX_CONSOLE_LINES 256 /* maximum number of lines shown in console */ #define EXTRA_CONSOLE_LINES 64 /* amount to remove at a time */ extern int cmdArgc; /* argc from command line */ extern char *cmdArgv[32]; /* argv from command line */ extern FILE *inFile; /* handle to file being parsed */ extern char *cwd; /* current working directory */ extern char currtok[256]; /* current token */ extern int errFlag; /* set by yyerror */ extern int consoleFlag; /* if false, supress console */ extern int explicitFlag; /* Option Explicit */ extern int commonFlag; /* common declaration */ extern int qBasicFlag; /* Option QBasic */ extern int fileNum; /* current file number */ extern int lineNum; /* current line number of current file */ extern int parseLineId; /* id of line being parsed */ extern int runLineId; /* id of line being run */ extern int includeCount; /* number of source files read */ extern char *includeList[INCLUDE_MAX]; /* names of files included */ extern int visibleWindow; /* true if any window is visible */ extern int argCount; /* count of args being passed on stack */ extern Symbol *currentScope; /* routine being defined */ extern Symbol *oldScope[255]; /* old currentScope */ extern int oldScopeP; /* pointer of last oldscope */ extern Symbol *currentTypeDef; /* type being defined */ extern Symbol *currentType; /* type being referenced */ extern int me; /* pointer to object for current method */ extern int wxAppIndex; /* handle to wxApp */ extern int debug; /* step mode */ extern Stack *argCountStack; /* arg count in parser */ extern Stack *blockStack; /* block type */ extern Stack *lineStack; /* line number */ extern Stack *sharedStack; /* shared symbols */ extern Node *deferredCode; /* deferred code */ usr/src/sdlBasic/src/sdlBrt/bison_build.bat0000777000076500007660000000015410463130346016146 0ustar @echo off @path %PATH%;c:\programmi\gnuwin32\bin bison -y sdlBrt_tab.y del y_tab.c ren y.tab.c y_tab.c usr/src/sdlBasic/src/sdlBrt/fonts/0000777000000000000000000000000010645354742016070 5ustar rootrootusr/src/sdlBasic/src/sdlBrt/fonts/DejaVuSansMono-Roman.ttf0000777000076500007660000012554010463132575020760 0ustar GDEF+/*¤LbGSUBüsù>¥°.OS/2ŒÚÿ˜VcmapgR*ßl²cvt é— È0featÀ®¦à?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a†‡‰‹“˜ž£¢¤¦¥§©«ª¬­¯®°±³µ´¶¸·¼»½¾rdeix¡pkvjˆšsgwl|¨ºcnm}b‚…—¹Áy„ŒƒŠ‘Ž•–”œ›qz¶, °%Id°@QX ÈY!-,°%Id°@QX ÈY!-,  °P° y ¸ÿÿPXY°°%°%#á °P° y ¸ÿÿPXY°°%á-,KPX ¸EDY!-,°%E`D-,KSX°%°%EDY!!-,ED-¹€²”]A–€þþþþšþ ²ëGA% } % 2 – þþ%þ%þ@Yþþþý}üþûþú2ù»ø}÷öŒ÷þ÷ÀöõYöŒö€õô&õYõ@ô&óò/óúò/ñþðþï2îí–ìëGìþì¸ÿÑ@ÿëGêédê–édèþçæçþæåþäkãþâ»áàáúàß–ÞþÝþÜÛÜþÛÚ–ÙØÙþØ Ø×}Ö:Õ Õ:ÔþÓÒ ÓþÒ ÑþÐþÏŠÏÎÍþÌ–Ë‹%ËþÊþÉ}ÈþÇþÆþÅš ÄþÃþÂþÁþÀ À¿ ¾½»¾þ½¼]½»½€¼»%¼]¼@»%ºþ¹–¸A·þ¶A¶úµš ´þ³d²d±°¯þ®þ@ý­þ¬þ«ªþ©¨©2¨§¦§(¦¥¤-¥}¤-£þ¢þ¡þ Ÿ dŸžŸž œþ›š ›þš ™˜.™þ˜.—A—––•»–þ•”]•»•€”%”]”@“þ’þ‘%‘»%‹%AŽ Ž Œ‹%Œd‹Š‹%Љþˆþ‡þ†…†þ…„þƒþ‚B‚Sþ€x~}þ~}}|þ{zþwþvþut uu¸@Út tÀss@rþqþpþonSo–nm(nSm(lþk2jþi2húg»fþeþdþcbcþbbaþ`þ_þ^Z ^]d\È[Z [Z YþXWþVþUU2TþSþRþQ}PþONþM-MþL»K(JIJ7ICIHEHþGCGdFEF»EDCD7CBCC¸@@ BABB¸@ A@AA¸À@ @? @@¸€@ ? ? ?¸@@d>þ=-=ú<þ;(:þ9B9d818K7þ6-6þ5K404K303þ2B2þ1-10/-/. .»-,--¸€@ ,,,¸@@–+*%+þ* *%):)þ(þ'þ&%B%E$#þ""þ! -!} -KBþþþþþþBF-B-Bþ-B¸@  ¸À@   ¸€@    ¸@´  ¸@7 þ  þ þ-þ:ú-:-¸d…++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++¸Ë¸Ëª‘¸f¸‡¸ÃË˸¸Ë‰ºË¦ü˃ò Ç7ƒ¾X!Ëœçu¼ÓÉÛuç9ºËÓ!߸‰¾‰Ã¾{¾Xm¤®{¸o{¸RÍÑ͇‡“¤oÍ˸ƒ‘Ý´‹ô˜éZ´ºÅ!þÕöª=f‹ÅššƒÕs þáÕ+¤´œbœÕ˜‡ÕÕð¤¸#Ӹ˦¼1NÓ {T\qÛ…#wé`jÏÕ#fy```{{w`ªébø{!Åœ{´RNNÑfœœfœfœÍúƒ‘þHF?{L˜¢'oo5jo{ªª-–{öª3=œf‹öÍoD7fî…´}sÕ%%%%KmËJÍz‘½é6b•ªÄ‡² i§õP~çAbŒ²Ó÷jô \ ° õ / \ ƒ Ô ÿ * _ Æ â B Ï  \ Â@a¨ânð3mŽªËí*Ÿç+sÇeÑ Š¶P‡Ã UœK‚ÈmâWšÿ}½½äF„©:{y³Ï噯ê y á!!`!!¥!Ù" "S""Ÿ"¯"¿#9#E#Q#]#i#u$$j$u$$$™$¥$±$½$É$Õ%#%/%;%G%S%_%k%¤&&&2&>&J&V&b&¢''')'4'?'J'U'ý(((()(4(?(J(U(`(ê(õ)) ))!),)Y)Ú)å)ð)û***Z*e*q*}*‰*”* *«*·*Ã+ +,+8+D+O+[+f+r+™+¥+±+½+É+Õ+á,,a,m,x,„,,Û-f-r-~-Š-•-¡-¬-·-Â-Î-Ù-å-ñ-ý....+.6.B.N.Y.e.p.|.‡//2/`/–/¾00A0Ì11a1§1³1¾1Ê1Õ1á1ì1ø222,2I2f2„2±2ß33;3|3œ3È4p4‘4´5<5–5ó606S6Š6 6º6Ò77e7º838u8¤8Ò8ü9K999Ø::±:ô;4;{;–;Í;÷< hþ–h¤¼¶ƒ/ÄÔì1ÔìÔì0!%!!hüsüåþ–øòr)ÏÕ @‡†ˆ Ô<ì2991/äüì03#3#Ë¡ËËÕýqþ›eý¸þRªÕ@‰ˆÔìÜì1ô<ì20###®Ñ®ÕýÕ+ýÕ+;J@0Œ Œ    ÔÌ91/<Ô<<ü<<Ô<<Ä2ì220333!3!###!5!!5!#3¬hõi iôþçTúþßh iöiŸhþþ)Tþö/hõTö¾þaŸþašþ²™þbžþbž™NšŸýÇþ²¾þÓZ /d@9($)%/%‹$Ž(‹Ž!$, ( 0Ô<ì2ü<ìüäî1/Æ2ÄîöîîÆöî99990>54&'#.'5.546753.'´n|pÞhumÔdfÉbdËcÈÊÓ¿dO¢TU¡PÎØé¼DþNtd]gÑp^VdûÀ-.)´>Bʶ–»ëë­+/þQššÎ !°˜ *9V@/7(" ’"’7“(’.‘“’+  % 4  + :ÄÔìüìîþî99991/îîöîþîî9999032654&#"4632#"&'%32654&#"4632#"&¸iNMklLNi‡¸†@s..2º‡ˆ¶þH#)üiOMllMMk‡¸‡@u--1º†‡¸?NjkMMljO‡¹0./t?…º·`¢`åOikMMkjN‡¹0--uA†¹¸9ÿãÅð*7³@b  -,.+2345617B7 1 +"1—"!%—–™ (! 7+!(!(! .8ÜìÄüÄÆîî99999991/ÆäöîÖÎî9990KSXí9í9íí9Y" >54/3#'#"5467.54632.#"3267>7# '&¤JKªÕNSºjØþ抋20Ç­AƒF;}Eap:6\[È›*\,#‹ýÑ1–h F'¡óXåmFD ̉êdHŠG–®·'%[M;ÏI£\—Ç ª¾Õ·ˆÔì1ôÄ0#¾®ÕýÕ+ªþòu @œ›  Ôì2ì991üì0#&547u…ƒƒ… —””—äþ;æåþ:æîÃàßÄì\þò' @œ›  Ôüì2991üì03#654\ —””— …ƒƒìþ<ßáþ<ìèÆã䯦J+ðN@,   –    Ô<ì2Ü<ì2991ôÔ<ì2Äì2990 %#'-73%+þšf9þ°sþ°9fþš9PsPßÂÃbËþ‡yËbÃÂcËyþ‡ËXqy“ '@¡  ¡   Ô<ìü<ì1Ô<ìü<ì0!!#!5!¼½þC¨þD¼“þDªþD¼ª¼“þáò/@ £¢ÔìÔÌ1üì03#öüÅšc/Ïþdßmƒ¶ ÔÄ1Ôì0!!d ý÷ƒ¤éå1¶¢Ôì1/ì03#éüü1þÏfÿB7Õ@ ˆÔìÔì1ôÄ03#y¾üî¿Õùm…ÿãLð # @¥ — —–™$!"!$üììÔìî1äôìîÔî0@Ö////////// / / ?????????? ? ? OOOO O ____ _ ŸŸŸŸŸŸŸŸŸŸ Ÿ Ÿ ¯¯¯¯¯¯¯¯¯¯ ¯ ¯ ¿¿¿¿¿¿¿¿¿¿ ¿ ¿ F////////// / / __________ _ _ ¿¿¿¿¿¿¿¿¿¿ ¿ ¿ $]]4632#"&"32'2#"ãM68PO98K…‹‹Ž‹‹Žïõõïïôôî7PP78NLœþÐþÉþÊþÐ0670 þxþþ‚þxˆ~ˆöFÕ &@——ˆ— ## ÔìÄüì1/ì2ôìÔì0%!5%3!!:þ®PÊ6üȪuL¸JúÕª˜#ðQ@)%%B§ —–—  "$üÄüìÀÀ91/ì2ôìôÌ0KSXí9í2Y"%!!567>54&#"5>32u®üu»5dF“€[ÈpgÇaÛ Yd8ÕªªªÅ.>z—O}ŽBCÌ12é½`ÀtAæ‰ÿã7ð(G@)— ‹ ¦ —‹ ¦—#–™©)&" )üÄÄüìÔì91ìäôìôìîöîî90#"&'532654&+532654&#"5>32“œþëõgÖgfÆb¦²²˜šš‹œ‘†Y¾hy½IÚ‰'Ç•Îë&$É54–‚™¦zms{((º Ûµ{¤foÕ B@   B —ˆ   $üüÔ<ì291/äÔ<ì290KSXÉÉY" !33##!5ßþ)×!êÇÇÉý‡üëÍü3¤þœd¿ÿã-Õ=@"—‹Ž— —ˆ ™ª "üÄüÄìî1ääôìîöîþÄ90!!>32#"&'532654&#"ÏôýÄ+W,èþã÷wÅN\ºa§µ»§QšFÕªþ‘þîêìþð Í21°¢ ²%%…ÿãLð$=@#— — «‹Ž—–™%"& "%üììüäì1äôìôìåîî90.#">32# !2"32654&ß?ŽMÀÆ0ªnØíôÝþüò#J”þÝ””†ˆˆ´º%'þßþçdkþ÷óòþöu‘zýlº¤¤º±­®°‹7Õ5@%%B—ˆ"üìÄ991/ôì0KSXííY"!#!‹¬ýêÓý5ÕVú+ƒÿãNð #/C@% —'—-—–™'©0 $*$ "!0üÄìüÄìîî991ìäôìîî990"32654&%.54632#"$54632654&#"h‡“•…ˆ“•þÊ‘òÐÑò‘–ŸþþääþÿŸM€yz€{y€Å—ŠŠ™—Œ‰˜T!´²ÑѲ´!!ÈŸÊäãÉ Ébx~~xz€ÿãFð $;@"—« ‹ Ž—"—–"™%"  &%üäìüìì1äôìîöîõî902654&#"532#"543 !"&T““†ˆ‡á?ŽMÀÅ/ªnØíóÞòþÝþëI”–º¤¤º±­®°ý‰º%'!dk ôñ þŠþoþ‡þséå'@ ¢¬¢Ô<ì21/ìôì03#3#éüüüü'þÑþ9þÏ“þáò' %@¢£¢¬  ÔüÔüÔÌ1äüìî03#3#öüÅšc üü/ÏþÇþÑXyw!@®­('üì291ôì90 5yü®Rûß!ÁþÀþ÷¢¦¢X`y¢@   Ô<Ä21ÔìÔì0!!!!X!ûß!ûß ¬BªXyw!@®­('ü<ì91ôì9055X!ûßRÁ¶þ^¦þ^·=ôð"{@B  %%B‹ —–†!    ) #ÔìÄÔÔìî99991/îöþôîÍ9990KSXí9í9Y"#546?>54&#"5>323#¬¾=TZ>/ƒmN²b^¿hºÝC^XE&ÅËË‘šb‰RY;X1YnED¼98À¡Lƒ\VBT=/þòþþÁšs 4p@1(+$ 4¯ ¯ '$¯+¯1+5' ( + . !+ -.5ÜìüÄþ<Äî991ÄÔüÄþÄÕÄîî999990@ €€€€€€]4&#"326#5#"&5463254&#"!267# !2€kkkk€Œ%ƒR¡ÓÓ¡P†$°‘öþÝJ6l90?{:þ›þ]x<Ñú!››‚››þèo?Dò¼¼òF=?œ¾þþ¹þ·þz‡ÒŒ†Îþöà%¬Õ ˜@A%%%% % % %  % B—°ˆ   / Üì91/<äüì90KSXííííííííY"²]@    †‰]]!3#!#hÕªþ±õÉÑnýõlÑ#ý®ú+…þ{¦qÕ =@#— —ˆ— ± 21 0!üì2üìÔì9991/ììôìî9032654&#32654&#%!2)qï°–ž¨ïë’ƒ”þJºåøƒƒ“§þöþùþFÉýÝ{’‰fþ>p}qd¦Æµ‰žÏ ËÏ‹ÿã1ð.@³²— ³ ²— –™2 10üì2ì1äôìôìîöî0%# !2.#"32671M¢[þáþÃ?[¢MJªVÅÄÄÅX©I5))–pn™))Ï=@þÐþÍþÎþÐ@=‰RÕ(@— ˆ— 2 10üìüì99991/ìôì0% 6&!# )´ÿÊÉÿ`dVDþ¼þªþѦûHKûûw/þ”þ€þ‚þ•ÕÅNÕ )@——ˆ—±  13 üì2üÄÄ1/ììôìî0!!!!!!ÅvýTŽýr¿üwÕªþFªýãªéXÕ $@——ˆ±14 üì2üÄ1/ìôìî0!!!!#éoý\eý›ËÕªþHªý7fÿãPð<@!—— ³ ²— –™ 625üìüÄüÄ1äôìôìþÔî990%# !2.#"3267#5!PQËvþäþÄ@^¬PQª_ÅÅ¿ÆCe)Ùš{KM—on™56ÏMIþÏþÎþÉþÕ!‘¦‰HÕ &@—±ˆ 1 0 üì2üì21/<ä2üì03!3#!#‰Ë)ËËý×ËÕýœdú+Çý9ÉÕ %@ —ˆ—77 Ôì2üì21/ì2ôì20!!!!5!!É=þÇ9üÃ9þÇÕªûªªmÿã¼Õ,@ ²—— ˆ™  5üÔüÄ1äôìîöÎ990753265!5!#"&m[ÂhqþƒGÓ÷`¾=ìQQ•ËDªüþæê,‰ÉÕ —@!% %B´  0 üì2À91/<ì290KSXííY"²]@L&&6FUWX dzy{ ',+&:IGG[WXXWkzx]]33 ##‰Ëwíý»VôþšËÕýh˜ýžüì¤ý¸×sÕ@ —ˆ14üìì1/äì03!!×ËÑüdÕúÕªVyÕ …@,  B ´   / 0 üìüì91/<ì2Ä90KSXÉÉÉÉY"² ]@$  &)&) 6968  ]]! !###V»þö™þõºÕýøú+'üíúÙ‹FÕ m@B´10 üìüì991/<ì2990KSXÉÉY"²]@&)&8Wdjuz &)FIWgh]]!3!#‹øÃÿþÃÕû3Íú+Íû3uÿã\ð #@ ——–™2 625üìüì1äôìî0#"32#"32‰‡š™‡‡™š‡Ó÷ýýö÷üý÷éIþæþ·þ¸þæIþzþ€~ˆ‡€þ€ÅuÕ+@—— ˆ 2 8 3üì2üì91/ôìÔì032654&#%!2+#ꌜþL´úþÿûêÊ/ýÏ”……“¦ãÛÝâý¨uþò\ð=@ —— –™ 2 625üìüì99991Ääôìî9990"#"32#"32ú÷÷üý÷‰‹È—‡š™‡‡™š‡€†‡€þ€þyþÚþ™H¾d÷Iþæþ·þ¸þæÑÕj@8  %%B— — ˆ    21  0üì2üÄì99991/<ôìÔì9990KSXíí9Y"#.+#!232654&#øNnRËÙ²M{cÁË ö¡ýÐÝ‘Ž—Áo¦þhy¡]ý‰ÕÞÒ”»Yý‰‹ÿãJð'„@=  %  %B ³§—³§—%–™( &919"0(üìÄüìä99991äôìôìîöî90KSXí9í9Y"²]@ ]].#"#"&'532654&/.54$32ô\¹^¦m•jÒÀþøüiÔksÍh™ªu‘lм ßV¾¢Í;<…qch#1ÒµÕà--×ID‰{pv /¾ Èñ'/¢Õ@—ˆ::Ôìüì1/ôì20!!#!/sþ-Ëþ+ÕªúÕ+“ÿã=Õ,@ —™ˆ10üìüì1ä2ôì999033267>=3#"&'.“Ë  yVWx! Ê9FBªjiªCE:=˜ü m];<<;\l^˜ühåÁ?;::;>Å9˜ÕL@)%%%%B´/0üì91/ì290KSXííííY"%3#3h_ÑþKõþKѪ+ú+ÕÑÕ á@D    %%% % B ´   /Ì91/<ü<Ä90KSXííííÉÉÉÉY"² ]@^ //+ ??8 ZZ  &*%*(+ % & 5:5:;: 4 6 TTZXWV[[RW X ] gh yvy v #]]333# #ŪӬÅß¿ËÊ¿ÕûD"üܾú+wü‰¾Õ Æ@K % % % %%%% % B ´  ;/; 0 üäüä91/<ì290KSXííííííííY"²7]@8  '()& X xyw !%+% 5UYX es]]3 3 # #VÙHNÙþAßÙþ’þuÚôÕýÍ3ýBüéƒý}%¬ÕY@.%%%%B´<< Ôìüì9991/ì290KSXííííY"3 3#%×lkÙþ!ËÕým“üÉýbžœ‘Õ E@%%B—ˆ—/0 üÄüÄ991/ìôì0KSXííY"²]²]!!!5!²Éüô"ü ÷ýÕšûoªš‘Ïþòw@¶·¶µ=ÔüÄ21üìôì0!#3!ϨððþXùüfÿB7Õ@ ˆÔìÔì1ôÄ0 #%¾üíÕùm“Zþò@¶·¶µ=ÔÄ2ì1üìôì0!53#5þXððøÞH¨‰Õ@ ˆÔÌ91ôÌ290 # #ÁȲþ‘þ’²ÈÕýÓ‹þu-þþmµ¸/Ì1Ôì0!5üþmPPîöf1@ º¹<Ôì1ôì0K° TK°T[X½ÿÀ@878Y #Ýšþ»fþˆx…ÿã#{ )n@*  ¶Œ!‹ ¿Œ$¾™   D >*ôìÄüì22991/Ääôüôìîî99990@00 0!0"       ¢    ]#"326757#5#"&546;5.#"5>32¾=¡£zl˜®¹¹;³€«Ìûó÷†“^À[f»X‹Å=& 3qpepÓº)Lý¦d_Á¢»Â†y64¸''RR2“ÁÿãX 0@ Œ Œ™¾›G Fôì22üì1/ìäôìî9904&#"326>32#"&'#3–ˆ…†ŠŠ†…ˆýã,›fÊèéËd™.¸¸/ÖÚÛÕÔÜÚxRXþÉþïþëþÅWSÃÿã%{/@ ‹ À‹ÀŒŒ ¾™ FôÄ2ì1äôìþôîõî0%# !2.#"3267%JRþüþÛ%QšNI“]­º»¬`˜A9++88*,ÁA:àÐÏá;>{ÿã0@ŒŒ™¾›G Hôìüì221/ìäôìî9903#5#"3232654&#"Z¸¸.™dËéêÊešþˆ……‹‹……ˆÑCùìSW;7Wþ ÖÚÜÔÕÛÚ{ÿãX{E@& ‹ ¶Œ ÁŒ¾ ™ IHôìüìÄ991äôìäîîôî990!3267# 32.#"Xüã¿®XÀmiÃ[þûþÚ ðÖ÷¸‘ˆ…¬^Z·È89·++9 @þÞÅ¢©°œÃ'4@ ¶Œ›    Ô<Äü<Ä2991/ä2üìî2990#"!!#!5!5463'ÑcMþ¸þÕ+©³™Qgcü/ÑN¸®{þH{ )H@' ' ‹ ŒŒŒ$¾Ã(Â*' G!H*ôÄìüì221ääÄôìîîÕî999904&#"326#"&'5326=#"3253Z‡‡Žˆ‡¸îçL¦Sb C•ˆ,˜mÄêêÄl–/¸9Ï××ÏÏÙÚþÝüþü¶.,¢°}^\::VZ‘Ã,@ Œ¾ › J  Fôì2üì1/<ìôì990#4&#"#3>32¹jq‹¸¸1¨s«©¶ýJ¶—Ž·«ý‡ý¤`cá²D .@¶ Ä ›Â¶L LK Ô<äìü<ì1/ì2äüìî0!!!5!!3#×münmþḸ`ü/BCéºþV 8@ Œ¶Ä›Âà  Ô<ì2ÄÄ991ääüìîî990!5!+53263#XþÃõ³¥þêZZ¸¸åûŒÃÓœ}¥éì² Å@:  B›  DE ôìì291/<ìä90KSXííííííY"²]@R546Ffuv ('(;;797JIYYkiiiyxyy]]33 ##ì¾ãàþGþáþb‰¾ü{ÑþZýFBþ?   &@  ¶ Ŷ L ÔìüÌ991/ìüì990;#"&5!5![Y×饵þÙß–|~œÔÂùmo{"Ì@'  Œ ¾ÂMNMNME#ôü<üìüì91/<<äô<ì299990@G000000 0 0 ?????????€€€€€€€ € € #]K° TK°T[K°T[X½#@##ÿÀ878YK°TX½#ÿÀ##@878Y>32#4&#"#4&#"#3>32¤"iJ‡o¨5FP;¨9JI9§§!c?LeîHEÑþßýwís{åýðp{åý``32¹jq‹¸¸1¨s«©¶ýJ¶—Ž·«ý‡`¨`cá‰ÿãH{ #@ŒŒ ¾™ D>ôìüì1äôìî0"32654&'2#"hŒŒé÷öêéöößÚÖÕÛÛÕÖÚœþÒþâþáþÓ-.¾þVT{3@ŒŒ¾™Ã GFôì22üì1äääôìî990%#3>32#"&4&#"326w¹¹.™dËçèÊf™ð‡…†ŠŠ†…‡ýÉ SWþÆþêþïþÉWõÖÚÛÕÔÜÚ‰þRw 3@ Œ Œ¾™Ã G>ôìüì221äääôìî99032654&#"#"3253#L‡……‰‰……‡-™eÉéèÊd™.¹¹+ÖÚÛÕÕÛÚýŠSY7:WSùöjƒ{O@ —¾  ÔÄì21/äôìÔÌ990@%  0030@@C@PPPP].#"#3>32ƒ;zI¬¶¹¹.¿ƒDv6y.*ØÌýÓ`Ûw"$Õÿã{'u@@    B ‹À‹ÀŒŒ%¾™( OI"E(ôÄìüìä99991äôìþõîõî990KSXí9í9Y".#"#"&'532654/.54632ÍO S}{\·J‰ìÒS¶jg¼Tz†õEŸ’ÚÊZ¦9´..QSKJ#œ}¦»##¾55cY€1“¡¯!ƒž1@¶Â¶  Ô<Äü<Ä2991/ìô<Äì2990!!;#"&5!5!f¢þ^^uÏáϪþÕ+žþÂý |b“¦Ë`>Ãÿã^,@ Œ™   JFôìüì21/ä2ôì990332653#5#"&økp‚й¹1©q¬¨¨¶ýJ—Ž·«yû¢¨adádm`e@)BÂIEôì91/ä290KSXííííY"²']@%]]3 3#d¿EF¿þrí`üT¬û Ñ` @E      B    /Ì91/<ô<Ä90KSXííííÉÉÉÉY"² ]@Œ      &&)&))#, 96993< EI F J VX W Y fifij e vzx| r -   ++>>< H Y jih {yz|  ]]333# #¶Ã ¢Ã¶þú°³²°`üwBý¾‰û fýšL…` ©@H      B  IE ôÄüÄ91/<ä290KSXííííííííY"² ]@ fivy  :4 ZV ]] # # 3 ^þo¸Õþ¸þ¹Õ¸þoÌ)'`ýèý¸Áþ?Hþk•hþV` @E       B  ŒÃ IEôìÄ91ä2ôì9990KSXííííí9íY"²8]@v  &&8IIY ]]+532673 3Z.Gc".Š\”mQ\GþOÃLGÃhu¿þø:NNš^ÄNü”lËb X@B¶Â¶IE ôÄì2991/ìôì0KSXííY"²8]@68EJWXejuz ]!!!5!ã-ý}ƒü»ƒý•b¨üÜ–ª%Ýþ²ô$f@5 %   ! ¶ ¶Æ Ƕµ% $  = %Ô<Äü<Ä299999991üìäôìî99999990#"&=4&+5326=46;#"3ô@ù©kŒ>>j©ù@FŒU[noZUŒ¾”Ýï—tr–ðÝ“WŽøŽŽœøVþ¾·µÔì1üÌ0#¾¬øÝþ²ô$j@7%   ¶¶#ÆÇ¶µ%#= %Ô<Ä2ü<Ä99999991üìäôìî99999990326=467.=4&+532;#"+ÝDVZon[VD>ù¨k@@k¨ù>¾XøœŽŽøX“Ýð–rt—ïÝ”Xìy &@    'üÄ1Ôü<Ôì2990#"'&'.#"5>32326yKOZq Mg3OIN’S5dJ t]F‰ ®;73 !;?®<6 7=ÏÕ @†ˆ Ô<ì2991/ôüÌ0533ËË¡×þþû)eþ›ýqÕþÇ%˜!N@*‹ ‹Ë ˾ ™ " E"ôìÔ<Ô<<ì221Ää2ô<Äìþôîõî990.'>7#&5473%C‚??ƒBI‚9gáþüÞg9‚þÞ„  5¬(,üš-(¬"þâ9ûú=þá"ü+` 츸ë‹Xð>@  ¶ ‹§—– — Ô<ÄÄü<ÄÔÄ1/ì2ôìôìÔ<î2990.#"!!!!53#5354632D>C†sþü3ìÇÇÛßA‰¶¸,,³ÀÙþ/ªªÑîþúÍÃLB /@ (-  * -'! ÿ¸@'ÿ) -0)$ !'$* xyx( $0ÔÄ2ìüÄ2ì9999999991ÔÄ2ìüÄ2ì99999999904&#"3267'#"&''7.5467'7>32d|[Z}}Z[|¦Z¦¨^¦.[20`0¤\¦¨^¦.[3.^ƒZ{{Z\}~t¦]¦1]02[-¦^§£Z¦3].2]-¦_¨%¬Õ@D% % %%B ç çˆ< e e<Ô<ìì2ü<ì2ì99991/ä2Ô<ì2Ô<ì290KSXííííY"3 33!!!#!5!5'!53%×lkÙþ¶üþÅV‘þoËþqZþËóÕým“ýÏo—#oýô o#—oþ¢¾˜!¼·Ô<ì21ÔìÔì0##¾¬¬¬˜ý öüý öÇÿ= ð2>j@<#$93 $*ÎÏÎÏ0–?#54&¨S9akÍÔ‚[]=:Ì­I›WW”9fqÝÖ€][<;ȧH™þ>=÷><¶¤''PGZswšeZŒ54m@ލ¤''TLf{x™f[1,pE‚ŸýÕ-Z/L‡…-Z/Lˆ?F‘\@ÞÝaaÔüÔì1ô<ì20K° TK° T[K°T[X½@ÿÀ878YK° TK°T[X½ÿÀ@878Y3#%3#?ËˈÊÊÊÊÊ}ÑN1ID@' Ú ÚÜ&Ô>ÚÚÙÔ>Ó2ÑJ\ ^,8 8YD/æþÅþå2î1ôìüôìÔìþýîÖî0.#"3267#"&54632'"3267>54&'.'2#"&'.5467>`:o:u‡Œ‚8g24r=´Ïг=rÄjµKKMMKLµijµLLKLKKµkÚZZ\[[[Ú~}Ú[[[\ZZÚ/l•€„ŽhȬ­Ê¡JKK¸jh·KLLLLLµij¸KKJgZZ[Ü~}Ú[[[[[[Ú}~Ü[ZZÕÁð %)d@6  (ó&í&ñí  ïîíð#–*& (' j kji*üìÄüì22ÀÀ9991ôäüôìÄîíÖîî99990"326=7#5#"&546;54&#"5>32!!¬|WHiƒ1ƒR–»¬¶wu3}CD‡?¸¬ýkœýdPDN@Ms=þ@pABˆtŒZ\#!¬ý {w# /@  ü¬  v vÔü<Ôì2991ô<ì2990 5 5LþÓ-þ+›þÓ-þ+#¿þôþô¿¢R¢¿þôþô¿¢RXsy^@  'üÔì1ÔÄì0!#!X!¨ü‡^þ?dßmƒ¶ ÔÄ1Ôì0!!d ý÷ƒ¤}ÑN4L…@I  ] ] B  ×× ÖAÔ)Õ5Ô)ÓÑM  \\ [G#X;#Y//æþåþõÄîî299991ôìüäþí2îÖî9990KSXíí9Y"2#'.+##32654&2#"&'.5467>"3267>54&'.X“XP:&rk1=-7‚èffZJJDÚZZ\[[[Ú~}Ú[[[\ZZÚ~jµKKMMKLµijµLLKLKKµLbeG]C;º®P*þضTè6?>5VZZ[Ü~}Ú[[[[[[Ú}~Ü[ZZgJKK¸jh·KLLLLLµij¸KKJ=b“ö¶¶ÔÌ1Ôì0!!=Výªö”+u¦ð @Ì ÍÌ–STS Ôìüì1ôìüì02#"&546"32654&hAu,-/º†‡´¸…OomOPqpð1.-rB„·´‡†ºoPPlnNOpXy“.@ ã  ã    Ô<ì2ü<ì21/ìÔ<ìü<ì07!!!!#!5!X!ûßd½þC¨þD¼ªª“þ·ªþ´LªIBœ}ða@WWBA     @–ÔÄÔÄì9991ôìäÔìî990KSXí9íY"!!57>54&#"5>32ãšýÅçeQdR1q?Ay;ެJwrnâaz3=L$$}…k9wuFœð(\A          @#–) & )ÔÄÄÔìÔì991ôìäôìîÆöîî90#"&'532654&+532654&#"5>32Û^c¾±:r;Eq-evnmBJ]b`W,p;Eu2‘¨X`lP|†yQDJLl?<8?yvcG]Ûîºf1@ º¹<Ôì1ôì0K°TK° T[X½ÿÀ@878Y3#ôÆþ»šfþˆÃþTž` L@* Œ‹™Ã Â!   JF!ôìüìÄ9991ä2äô<ìüÄ9903326533267#"&'#"&'øxo¹ ! &D">K .…Y\,þT ýHŽ—ª¦ü ;8 ”OOPNLPýÕjÿ;Õ #@ˆWW1 ÜüüÔì91Ä2ôÄÌ0!###.54$FÀ¿×ìÕùfùáNݸ¾èé/å`¹µÔì1Ôì03#éüü`þÏ‹þu)'³  º@ |ÔìÔÌÄ1/öþÅ90!#"&'532654&'¼85xv-W,"K/:=,,>i0Y[ ƒ0.W=Xœ“ß 9A      @ – aW}a Ôììüì1ôìäÔìî2035733!jÍßåŠÌý× c)t'ý+nôÕÝð 3@óñíðí –  jkjiüìüì991ôìôìüì0"32654&'2#"&546!!hfssfeusgªËÊ«ªÊË«¤ý\{œ‹‹šˆ‹œu༻ßß»¼àü`{Á\# /@  ü¬ vv Ô<üÔ<ì991ô<ì2990 5 %5 ‡Õþ+-þÓþ:Õþ+-þÓ#þ^Rþ^¿  ¿þ^Rþ^¿  ÿÿþòZ{'{þþœ&67¸üVÿÿþòZ{'{þþœ&6tÉüVÿÿþòZŒ'uÿœ&67¸üVÁÿåÝÕ!%‚@G  %%B!‹ "†$ —™$ˆ&# # )"#&ÔüÄÔìÖî99991äôìþÍôî9990KSXí9í9Y"33267#"&546?>54565#53%¾=TZ>/ƒmN²b^¿hºÝC^XC&ÄÊÊDšb‰RY;X1YnED¼98À¡Lƒ\V@T?þÿÿ%¬k&$3uÿÿ%¬k&$1uÿÿ%¬m&$4uÿÿ%¬^&$2uÿÿ%¬N&$0u%¬m !Á@W % %%% %!%! %!! % !B  — È É  !  PPK/K!"Üäüäî2î299999991/<ææÖîî9990KSXííííííííY"²€]@… ŠŠ… € €€]]4&#"326!.54632#!#Y?@WX??Y˜Õªþ”:A rr¡@;¬ÑnýõlÑZ?YWA?XXüýP!yIr¡¡rIv$ú‰…þ{œÕg@7 % %%%B— ——ˆ—°±   c /Ô<î2ÖÄÄ91/<îîîôî2îî0KSXííííY"!!!!!!#!‰þ®3þÍeýáþ e¸šxÊ5ÕªþFªýãªþÕªüüÿÿ‹þu1ð&&zdÿÿÅNk&(3uÿÿÅNk&(1uÿÿÅNm&(4uÿÿÅNN&(0uÿÿÉk&,3uÿÿÉk&,1uÿÿÉm&,4uÿÿÉN&,0uNÕ ;@!¶ —ˆ —  21 0 0ü<ì2ìüìÄ91/Æ2îöîî20 )#53 6&!#!!´VDþ»þ«þÑ}}/ÿÊÉÿ`þøÕþ”þ€þ‚þ•Å•{úÑûHKûþ+•ýáÿÿ‹F^&12ÿîuÿÿuÿã\k&23uÿÿuÿã\k&21uÿÿuÿã\m&24uÿÿuÿã\^&22uÿÿuÿã\N&20u–®;T .@     Ô<Ì91Ô<Ì290 7   –^þ¢t^_tþ¢\tþ£þ¤%\^uþ¢^uþ¢þ¤w^þ¢ÿº° +k@:+)&  *&——&–™, #* #)+262#5,üìüìÀ999999991/äôìîÀÀ9999990324&' .#"#"&''7&5327sƒTš‡ ýÝøsVƒ»)+÷ýy´=g² %÷üs­9‹d/NZInˆ-ýËÏQUþÜþ†PeæQþþ£þzþ€QQËFüIž‡€RPÉJÿÿ“ÿã=k&83uÿÿ“ÿã=k&81uÿÿ“ÿã=m&84uÿÿ“ÿã=N&80uÿÿ%¬k&<1uÉÕ4µ—— ¸@ ˆ 28  3üì22üì99991/ôüìÔì032654&#33 !##“êžžþLÊþøøþüþÊ!ý󄃃ƒ´þòÒÚÛÑþ‘¼ÿã}/V@1-'!  *‹Œ*Œ›™.  !' $'$-DF0ôìüÌÆîÔîî99991/äþîþÕî9904632#"&'532654&/.5467.#"#¼ÒØÌÒ›¨7C:—oàÄE‡BL…;l€AxC\[¢œyqyr»qÕÎÝØ|d1M*%]¤tš²¤aQG_J'8…O€«#krƒ‹û“ÿÿ…ÿã#f&DCÿÿ…ÿã#f&Dvÿÿ…ÿã#f&Dûÿÿ…ÿã#7&Dÿÿ…ÿã#&Djÿÿ…ÿã#&Dÿ)ÿã°{ C@I=70 6 %C ‹Œ"7‹6¿. ¶Á3Œ@:¾("™D%=/.M/u MCM6+sDôÄìüìÄüÄì29991ä2ô<ì2ô<ì2ôîþ<ôî999990@ 05060708]5#"32654&#"!3267#"&'#"&546;54&#"5>32>321©xYS\JíMWWLëþepO27„Gn• '…aœ£È¿uc^8„>M„<[|%!„Y®‘ºHZqYa…4—…ˆ+#"¡33¬)+RNPP¬¤«³Xx€+'¨#!?@=BíþÎÿÿÃþu%{&Fzhÿÿ{ÿãXf&HCÿÿ{ÿãXf&Hvÿÿ{ÿãXf&Hûÿÿ{ÿãX&Hjÿÿ²Df&ÒCÿÿ²Df&Òvÿÿ²Df&Òûÿÿ²D&Òj‰ÿãH)‹@O BŒ $Œ™ ›*'! !'D! >*ôìüì9999991ìÌôìî99990KSXííí9íY"#"32.''7'3%.#"32654&ÍŶûåäûûà"#!H&þéí¶Û!!®#R-’™”ˆ‰”:/Ôþ„ÈþôþØ(  (-Y,\bPÈ‘^bþ ÒÇÄÔÔÄnËÿÿÃ7&Qÿÿ‰ÿãHf&RCÿÿ‰ÿãHf&Rvÿÿ‰ÿãHf&Rûÿÿ‰ÿãH7&Rÿÿ‰ÿãH&RjX–yo '@þþ  w Ô<Äü<Ä1ÔÄüÔìî03#3#!!îõõõõþj!ûß‹õÙö¢ª/ÿ –¼ +s@>+,&  )&  *&Œ& Œ¾&™,+,* # )#D>,ôìüìÀ999999991äôìîÀÀ99999990 32654&'.#".5327#"&''mþ1$eA H#cC‹•‹')öédž<“]¤*,öêg9 \ ýÑ//ÛÕ4o¯0.ÖÊ0tG GÃq.78°MÃBÁzþáþÓ;<ºLÿÿÃÿãf&XCÿÿÃÿãf&XvÿÿÃÿãf&XûÿÿÃÿã&XjÿÿhþVf&\v¾þVT3@ŒŒ™¾ÃÅ GFôì22üì1ìääôìî990%#3>32#"&4&#"326w¹¹.™dËçèÊf™ð‡…†ŠŠ†…‡ýÉÉý²SWþÆþêþïþÉWõÖÚÛÕÔÜÚÿÿhþV&\jÿÿ%þuàÕ'Ç$ÿÿ…þur{'YDÿÿ‹ÿã1k&&1ZuÿÿÃÿã%f&FvZÿÿ‹ÿã1m&&5ZuÿÿÃÿã%f&FüZÿÿ‰Rg&'5ÿ²oÿÿ{ÿã '/:ÿ¯G{ÿãÑ$H@ "ç ¸ @"ŒŒ™¾›   GH%ôìü<Äü<Ä1/ìäôìîý<î2990!5!533##5#"3232654&#"ZþÏ1¸¿¿¸.™dËéêÊešþˆ……‹‹……ˆÑ5y••yúúSW;7Wþ ÖÚÜÔÕÛÚÿÿÅþuNÕ'1(ÿÿ{þuX{'öHÿÿÅNg&(5$oÿÿ{ÿãXa&Hü#ûÿÿfÿãPm&*8uÿÿ{þHH&JýÿÿÉP&,9u²D` "@¶Â¶LLK Ôäìüì1/ì2ôì0!!!5!!×münmþá`ü/BÿÿÈsl'1þív/ÿÿ  l'1ÿ¡vOÿÿ×sÕ'/®ÿm/ÿÿ †'/ ÿ¹Oÿÿ×sÕ'y`…/ÿÿ ¼'y×OÿösÕ 7@ —ˆ  1 4ü<ìì2.9991/äì903%!!'7×Ë;NþwÑüd‘PáÕý˜Ûoþîýãª;jnžL >@!  ¶Å¶  Ô<Ìü<Ì2999991/ìüì9990;#"&5'!5!%[Y×饵þÕP{þÙß;Pþu–|~œÔÂ$Ño/ý¾Ûnþíÿÿ‹Fk'1!u1ÿÿÃm&vQÿÿ‹Fm&15*uÿÿÃf&QüôHÁÕ;@—  —ˆ— ±  -ÜìüÄÄÔì299991/ìì2ôì2î0%! )!!!";Áý£þÙõô(RþšHþ¸þþ±‹‹±=ªªMœ¡KªþFªýãæþ¤þ¦åÿãº{ 8i@92/ & 8 ‹ ¶ Œ#ÁŒ5/¾)#™92& MuMCM,s9ôìüìÄüì29991ä2ô<ì2äî2îôî9999904654&#"265&#"!3267#"&'#"32>32PVWMþ¦fRPhgPP¬þcpPƒ/;}Jb“04€T½ªª½Y€/%‚W¯‘ & ‘‡‰ž+ýê¨ï#®§þóþó§‡T£53¬+)CBDA88>A>AíþÎÿÿÑk'1ÿµu5ÿÿj‰m'vÎUÿÿÑg&55ÿÄoÿÿjƒf&UüZÿÿ‹ÿãJk'1u6ÿÿÕÿãm&vVÿÿ‹þuJð&6zÿÿÕþu{&Vzÿÿ‹ÿãJm&65uÿÿÕÿãf&Vüÿÿ/¢m&75uÿÿƒ~&W/ÿÿ“ÿã=U&8ÿ OÿÿÃÿãÙ&XÿÓÿÿÑâ'û|:ÿÿÑm&ûZÿÿ%¬â'û|<ÿÿhþVm&û \ÿÿ%¬N&<0uÿÿœ‘k'1u=ÿÿËm&vV]ÿÿœ‘P'þ(@=ÿÿË&þ]ÿÿœ‘m&=5uÿÿËf&]üþV°#ˆ@N   B   ¶ú¶ú¶!›$  /Ì91Ä2Äüìôìîöîî299990KSXíí9í9íY".#"!!#"&'53267#5!>32°$R,fs-/þ¸d+Ǻ9f.1d0`yuü1Æ”1cð¤|‚þÉý…þöæ¤!–—¯J±É)î¨f7@ º¹ Ôì91ôì290K° TK°T[X½ÿÀ@878Y3#'#“ö‹µ´‹fþˆõõ)î¨f7@ º¹ Ôì91ô<ì90K° TK°T[X½ÿÀ@878Y373ö‹´µ‹öîxõõþˆ/)¢H 8¹ @ ¹PPÔìÜì1ô<Ôì0K° TX½ÿÀ@878Y332673#"&/w `WU`w ž‘žHLJJLDÏ6@ ÞÝaÔì1ôì0K° TK° T[K°T[X½@ÿÀ878Y3#ÍÍÌVá{ W²È ¸@ È P{PÔìôì1Ôìôì0K° TK° T[X½ÿÀ@878YK° TX½@ÿÀ878Y#"&546324&#"326{ŸtsŸŸstŸ{X@@WW@@Xôs  ssŸŸs?XW@AWX¤þu"³  ¸@  |ÔìÄÔÌ1/ÔüÄ90!33267#"&546w-+76 >&Dzs5=X..… W]0i²7»@!  ÌÌ PPÔìÔì99991Ô<üÔ<ì99990K° TK° T[X½ÿÀ@878YK°TX½@ÿÀ878Y@?       ]'.#"#>3232673#"&d9!&$|f['@%9! '$}f['@Z7JQ†”!7JQ†”XîfZ@º¹ÔÜÔÌ991ô<ì20K° TK°T[X½ÿÀ@878YK° TX½@ÿÀ878Y3#3#ªà‰ ³ø‡fþˆxþˆJ‡´>@#ø÷ùqqro prol ôìäôìäää991/<î2öî0353&5323!5654#"Jõ{n ðò!o{øþ1x†´šš³†x¬† ¼7oþ’þȼþß…¬¬LIÞæ þ÷æÞþ·L¬PÿÙžL?@!  êêèì hggfôìÔìäÄ91/äôì22î99990!#3267#"&5!##P117,#J%q\þT´L”ý@H?… ƒ°¬üH¸ÿÿÑâ'CÿÀ|:ÿÿÑm&CÀZÿÿÑâ'v@|:ÿÿÑm&v@ZÿÿÑ4'j$:ÿÿÑ¿&j¯Zÿÿ%¬â'CÿÀ|<ÿÿhþVm&CÌ\ìÑy¶¶ý/Æ1üì0!!Ñû/yìÑyµ¶/Ä1Ôì0!!Ñû/yÏÇ-@ £µÔüÔÌ1üì0#53ËüÄšbÇÏ~þ‚ÏÇ-@ £µÔìÔÌ1üì03#1üÅ™bÎþ“þáò/²£¸¶ÔìÔÌ1üì03#öüÅšc/ÏþÓÇþ %@£ µ  ÔÌÔìÔüÔÌ1ü<ì20#53#53œüÄšbþ5þÇ™bÇÏ~þ‚ÏÏ~þ‚ÓÇü '@ £µ  ÔìÔìÔÌÔÎ1ü<ì203#%3#üÅ™bþ5üÄšbÎþÎÎþÓþáü/ *´ £¸@  ÔìÔìÔÌÔÎ1ü<ì203#%3#üÅ™bþ5üÄšb/ÏþÏÏþ¢ÿ;/Õ '@Ë ˆÊ RQ R Ô<ìü<ì1äôÔ<ì203!!#!5!±nþ’±þ’nÕþ\™û£]™¢ÿ;/Õ<@ËË Ê ˆR Q R Ô<<ì2ü<<ì21äôÄ2Ô<î2î20%!#!5!!5!3!!!/þ’±þ’nþ’n±nþ’nßþ\¤š™¤þ\™ýá?Ñ‘! · Ð V Ôì1Ôä04632#"&?¬}|­®}|«ú|«¬{|­«P1 #@¢   ÔüÔìÔì1/<<ì2203#3#3#Püü3üüþfüü1þÏ1þÏ1þÏј'3?Kt@%1= ÈÈ1¸µ%È+‘C¸@&7ÈIF:4(:PFz4P@ PzP"P.zP@(/ÄìÄôìîöîîöî99991/<î2î2öîþîî299990'32654&#"4632#"&32654&#"4632#"&32654&#"4632#"&H%'üH_EDbcCE_y¥xx¦§wy¤LaEEacCEay¦yx¦¦xy¦ aEF`bDEay¦yx§§xy¦7aŸ`ýJGacECcaEy¥¦xy¨¦ÓEaaECcaEx§§xy¨§ý"GaaGCcaEx¦¦xy¨§Z/#@ ü¬vÔì291ôì90 5/þÓ-þ+#¿þôþô¿¢R¤y#@ ü¬vÔ<ì91ôì90 5 ¤Õþ+-þÓ#þ^Rþ^¿  %ÿã%ð3p@< ç1&ç³ ²—(#³² —–#™43('1)-&- 2'-4ÔÄÄ2ìÄ2Ä99999999991äôìôìÆ2îöîî2Õ<î2032.#"!!!!3267#"#73&'&54767#7Ó0ßT“JBŸN’®á1þFi1þÓ®“OCH”Uâþí,®1u¦1´!(*Ï=DÐÌl-.&nËÑC>Ï*( n -/ l“fÕh@6    B  × ˆ  ` `_`_/üþìÕîÖî91ô<<ì2Ô<<Ä90KSXÉÉÉÉY"###5!3###¶¢r¢´‰}¬rœ7¦qÕ^þä^ÿý¾âþÓ-þB¾ÿç-):@'! '!¸ @ * $$*ÔÌÜÌ9991äÌÜÌÎÎ990>54&#"#"&54632#"&54324&#"32JIH7$$0e´ÖþßÕ˜ËÝ¢e‚ WOmVPmmW£Kƒt,>bþÊþùþ±þFØ£Æ[àt}þþÏt{ÿúÙO@*iiiiBùûÔÌ91/äì90KSXííííY"#3 !ÑýþáúqÃûé˜þL9î¹@ €€ÔìÔì1Ä2Ôì0!#!˜¡›ý•þL¢ø^øâþL=î 7´  ¿ @  Ô<Ä91äôìî990!!5 5!!LñüR%ýÛšý# þÕ‰\—P_ŒüÝX-y×¶ ÔÄ1Ôì0!!X!ûßתfÿB7Õ@ ˆÔìÔì1ôÄ03#y¾üî¿Õùmé/å`¹µÔì1Ôì03#éüü`þÏ;ÿÙ   /@     ÔÄ991ÔÄÀÀ90'%3##d)#ÛÓ”/þöÝ}bý%¿ƒù¼9)ú¨ð /7@$ á'!â á-ß0 $dd*0ÔìÔì99991ü<ì2ü<ì299032654&#".#"326>32#"&'#"&54632¶9[=G[TFBiË8\=G[SDCj~/“[w¬£~S€NA„U}¦„^ˆsˆd†lk€ut†c…jmvÿuÛ §Ôdƒ|kÖ¥­ÎsþL%1¹ ² ½@ & ‚&Ôìüì1üìÜäÞä026732#"&'.#" #"&54632‰j ¾ÊPd@7*9  k½ÄOeD=!0 þú°l9¼TA6?&#Hý•Ánþ!þbSA8?TX1yÃ7K@&' 10+5    *  5' .810*8Ô<Ä2991Ô<ìÔì2Ü<üÔ<ì99990#"'&'.#"5>32326#"'&'.#"5>323326yKOZq Mg3OIN’S5dK t]F‰JKOZq Sc1NJO’R`‚ t]DŠï;73 ";@®<7  6<þа;83 $77 7=X%yÝ<@       Ô<Ä291Ô<Ä2ü<Äþ<Ä990!3!!!'7#5!7!X‡ö}¤Ëþ²¸ýyø}¤ÉJ¸ýþ¢;fÕªì¬þÅhÓ¬ìVw? (@åä ( ' ü<ì2291/ìôì905!5wûß!üß!ûß¶¶L¨K¸çþ ªªXy? (@åä  (' ü<<ì291/ìôì90-5!!X#üÝ!ûß!ûß¶êç¸þµ¨þ´Vªuþ#\u"@ÔÌ91ÔÌ990 hþþôþ þ üÏüÇ9%ûÛûÓ-#7N@* ¶ ŒÄ››      JEEô<äì2ü<Äî2991/<æìþîîî299903#'#"!#!##535463¸¸w´cM“¸þ%¸ÉÉ©³éë™Qgeû¢Ñü/ÑN¸®#7B@# ¶Œ›   JE Eô<äìü<Äî991/<æþîî29990#!"!!##5354637¸þÕcM%þÛ¸ÉÉ©³ùì{Qgeü/ÑN¸®Ûîæf3# Æqšfþˆ?‘ÙQ@ ÞaaÔüÔì1Ô<ì20K°TX½@ÿÀ878YK°TK° T[X½ÿÀ@878Y3#%3#?ËˈÊÊÙËËËÛîZökµÔÄ1ÔÄ0K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@&  //// //]]3# ºåšöþø²éÑ@ Ì Ì ÔÄÔÄ99991Ô<üÔ<ì990K°TK°T[X½@ÿÀ878Y@t        !      ]]'.#"#4632326=3#"&d9 #(}gU$=19#(}fT"<9! 2-ev 3)dwyîööiµÔÄ1ÔÄ0K° TX½ÿÀ@878YK°TX½@ÿÀ878YK°TX½@ÿÀ878Y@ //]#1Åšãöþø7îšø]@ ÔÄ91Ô<Ä90K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@ //, ]3#'# ½ÓŒ¦¥Œøþö²²7îšøi@ ÔÄ91ÔÄ290K°TX½@ÿÀ878YK° TX½ÿÀ@878Y@ //*//]373 ÓŒ¥¦ŒÓî ²²þöøZj@ ÔÄ991ÔÜÔÌ0'3$øll œß 5³ ¸ ²º @  W ÔÔ<Äì291ôôÔ<ì29033##5!5 !w¢ttŠþ}ƒþîßýæoººy“þc/¢ø ²¸@ PPÔìÔì1ÔüÄ20332673#"&/w dRSaw Ÿžø6978w{zÏÛ·ÞaÔì1Ôì03#ÍÍÛÍ=âÚ J }  Â2õ(C`‚ 0B þmÜl‰±ä)m0ä3 t ÿ   ¾ÚaÈ( — ÈórÛ: ¡! …òZ«.—r ´ÒD«„ Ú  J  }     2õ (C `‚  0B þCopyright (c) 2003 by Bitstream, Inc. All Rights Reserved. DejaVu changes by Stepan Roh are in public domain Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. DejaVu changes by Stepan Roh are in public domain DejaVu Sans MonoDejaVu Sans MonoRomanRomanDejaVu Sans MonoDejaVu Sans MonoDejaVu Sans MonoDejaVu Sans MonoRelease 1.10 (DejaVu 1.4)Release 1.10 (DejaVu 1.4)DejaVuSansMono-RomanDejaVuSansMono-RomanBitstream Vera is a trademark of Bitstream, Inc.Bitstream Vera is a trademark of Bitstream, Inc.Bitstream Inc.Bitstream Inc.http://www.bitstream.comhttp://www.bitstream.comCopyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the wCopyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the wLigaturesLigaturesLigaturenLegatureLigaturenFractionsFractionsBreukenAll Typographic FeaturesFonctions typographiquesAlle typografischen MšglichkeitenFunzioni TipograficheAlle typografische kenmerkenCommon LigaturesLigatures UsuellesNormale LigaturenLegature pi ComuniGemeenschappelijke LigaturenDiagonal FractionsFractions en DiagonaleDiagonaler BruchFrazioni DiagonaliDiagonale breukenAll Type FeaturesToutes fonctions typographiquesAlle AuszeichnungsartenTutte le FunzioniAlle typekenmerkenÿ+:  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a¬£„…½–膎‹©¤ŠÚƒ“òó—ˆÃÞñžªõôö¢­ÉÇ®bcdËeÈÊÏÌÍÎéfÓÐѯgð‘ÖÔÕhëí‰jikmln oqprsutvwêxzy{}|¸¡~€ìîºýþÿ  øùú×   âã°±ûüäå !"»#$%&æç¦ØáÛÜÝàÙߟ›'()*+,-.²³¶·Ä´µÅ‚‡«Æ¾¿/Œ˜¨š™ï¼Ã¥’œ§”•¹ÀÁ0123456789: sfthyphenAogonekaogonekDcarondcaronEogonekeogonekEcaronecaronLacutelacuteLcaronlcaronLdotldotNacutenacuteNcaronncaronRacuteracuteRcaronrcaronSacutesacuteTcarontcaronUringuring Wcircumflex wcircumflex Ycircumflex ycircumflexZacutezacute Zdotaccent zdotaccentWgravewgraveWacutewacute Wdieresis wdieresisYgraveygraveEuro dlLtcaronc6459c6460c6461c6468c6470c6472c6477c6478c6475c6476 Z7ijjkpqqruvvwyzz{}~€‚‡ˆˆ‰‘’’“˜™š›Ÿ ¡¢§¨¨©±²²³¸¹º»¿ÀÀÁÁÂÃÄÉÊÌÍÑÒÒÓØÙÜÝÞßàáäåæçîïòóóô÷øùúüý())*,-./9 2XDFLTlatnÿÿÿÿfracligaliga Tl8$.×y0Øy/7O .O-LIJ 4 "#~#~€#€0 4À8<ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿ ÿÿÿýÿÿÿÿÿÿÿÿt `ä H\ 0/677:II<LL>OO@yyBÿÿÿÿ  €€€€     ?ÿÿ‡¿ÿÿÒ?ÿÿÒ¿ÿÿÌ?ÿÿ¸¿ÿÿ¼?ÿÿ·¿ÿÿ¾?ÿÿ¿ÿÿº×-.ؘ6^v‚ˆÿÿÿÿ€€ ?ÿÿï?ÿÿð¿ÿÿñÀ Lì:‚¦ $&##.ÿÿÿÿ     €€€€     €€   ?ÿÿë?ÿþÞ¿ÿÿî?ÿÿì?ÿþá¿ÿÿñ?ÿÿñ?ÿÿõ¿ÿÿô?ÿÿò?ÿÿø¿ÿÿ÷?ÿÿõ?ÿþê¿ÿÿø?ÿÿø?ÿÿþ¿ÿÿû~~€€usr/src/sdlBasic/src/sdlBrt/fonts/DejaVuSans.ttf0000777000076500007660000023216010463132534017045 0ustar 0GDEF.G-ù ¤bGPOSà{²8 ¶GSUBþÛùK.OS/2Œûã¸Vcmapl‹2[x²cvt ÿÓ9 üfeatÀ®/ð?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a†‡‰‹“˜ž£¢¤¦¥§©«ª¬­¯®°±³µ´¶¸·¼»½¾rdeix¡pkvjˆšsgwl|¨ºcnm}b‚…—¹Áy„ŒƒŠ‘Ž•–”œ›qz¶, °%Id°@QX ÈY!-,°%Id°@QX ÈY!-,  °P° y ¸ÿÿPXY°°%°%#á °P° y ¸ÿÿPXY°°%á-,KPX °ýEDY!-,°%E`D-,KSX°%°%EDY!!-,ED-¸€@ÿûþúù%ø2÷–öõþôþó%òñ–ð%ïŠAïþî–í–ìúëúêþé:èBçþæ2åäSå–äŠAäSãâ/ãúâ/áþàþß2ÞÝ–ÜþÛÚ}Ù»ØþÖŠAÖ}ÕÔGÕ}ÔGÓÒÓþÒÑþÐþÏþÎþÍ–ÌËÌþËÊ2ÉþÆ…ÆÅÄþÃþÂþÁþÀþ¿þ¾þ½þ¼þ»þº¹†%¹þ¸·»¸þ·¶]·»·€¶µ%¶]@ÿ¶@µ%´þ³–²þ±þ°þ¯þ®d­¬«%¬d«ª«%ª©ŠA©ú¨þ§þ¦þ¥¤þ£¢£2¢¡d ŠA –Ÿþž žþ œ›œd›š›š™ ˜þ—– —þ– •ŠA•–”“”(“’ú‘»‘þ]»€Ž%]@Ž%þŒ‹.Œþ‹.І%ŠA‰ˆ ‰ˆ ‡†%‡d†…†%…„þƒ‚ƒþ‚þ€þþ@ÿ~}}~þ}}|d{T{%zþyþxw v uþtúsúrúqúpþoþnþl!kþjBjSiþh}gBfþeþdþcþbþa:`ú^ ]þ[þZþYX YúX WW2VþUTUBTSSRQJQþP OþNMNþMLþKJKþJIJI IH GþF–E–DþC-CúB»AK@þ?þ>=>=<=<; <@ÿ; :þ9þ878ú76765 65 43 21 2þ1 0/ 0 / .- .- ,2+*%+d*)*%)('%(A'%&% &% $þ#þ"!! dú d BþúBBþdþþþþBþ-B}dþ  þ   þ  þ-þdþ@-þ-þ¸d…++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++5¸ËËÁªœ¦¸fqË ²…u¸Ãˉ-˦ðÓª‡ËªJ3ËÙôT´œ99N´R¸çÍ7sÍ`s3¢V¦V9Åɸßsºé3¼Dßͪåªˤ{¸o{RÇÍššoËÍžÓðºƒÕ˜HžÕÁËöƒT3fÓǤ͚sÕ þ+¤´œbœ-ÕÕÕð{T¤¸#Ӹ˦Ãì“ Ó\qÛ…#¨H99`Õš#fy```{œw`ªé`b{Å{´RÍf¼fwÍ;…‰{ÍJ/œœ}oo5jo{®²-–{öƒT7öœáföÍD)fîs""""X“ÿ¶Oƒ²ö!n˜´ÊÞE‚~áL·üeÏî  R s ®  ß X ° û : i “ æ  = z /¬E…ëuñ)pཊëP‹±á@Ö"m¹#{ßC€øw³S¢ÙˆÅž»ˆxé \ s ô!6!6!~!ã">"Ê#[#~$"$~%%}%â%þ&&º&ß''Q' 'þ(%(~(¬(Á(ñ))a)È)Ø)è)ø*t*€*Œ*˜*¤*°+P+»+Ç+Ó+ß+ë+÷,,,,',Œ,˜,¤,°,¼,È,Ô-8-Ô-à-ì-ø...S.æ.ñ.ü////(0000)050A0M0Y0e0q1I1U1`1k1v11Œ1º2t22Š2•2 2«2ú3333)353A3M3Y3d3–3ô44 44$404<4H4e4q4}4‰4•4¡4­4ê525>5I5U5`5¯6C6O6Z6f6q6}6ˆ6”6Ÿ6«6¶6Â6Î6Ú6å6ñ6ý7 77 7,777C7N7Z7e7ä88?8„8§8ý9-9Œ9Â::¹:Å:Ñ;;;P;;ª;¶;Ï<<>T>`>{>™>·>Ï? ??F?v?‰?ª@@@5@`@x@”@Á@òAAPA’AÌBB~BÝBîC CCC‰CÊCãCîDD'DCD[DD¢DÖEEE6EEŸE¶EæEþFFXF™FÓGG?G|GˆG”GÍGØHHIH[HgH†HÇHûI*I5IAILIcIoI{I‡I“IŸI«I·IÂI×IëJJ%JAJoJJËJ÷K9KYKƒLHL€LºM”MÙNJN|NžNéNÿO#O8OgP-P}PöQ;Q‚QÈQòRhRÎRÜSASŽSöTIT–TìUrUÁUÖfþ–f¤@ ûû/ÄÔì1ÔìÔì0!%!!füsüåþ–øòr)5Õ @@ƒ ü<ì2991/äüÌ0K° TX½ @ ÿÀ878Y¶ P ]%3#3#5ËËË¢þþÕýqþ›eŪéÕM@„üüÜì1ô<ì20K°TK°T[X½@ÿÀ878Y@0 @ P ` p   ¿ ]#!#oª$ªÕýÕ+ýÕ+ž¾`@1 ‡  ‡   üÌ91/<Ô<<ü<<Ô<<Ä2ì220@   ]!! !3!!!!#!#!5!!5!þÝT%Dh$i g8þ¡R>þ›h gþÛg¡hþÅ`Tþ¾if…þ²‡þaŸþašþ²™þbžþbž™NšŸªþÓm!(/Õ@U" '&( /)/))/B" ) *!††#Љ*Љ- ) " & 0ü<ìô<ü<ôäì1/äìÄÔäì2Äîî99990KSXíí9í9íY"K° TX½0@00ÿÀ878YK° TK°T[K°T[X½0ÿÀ00@878Y#.'5.546753.'>54&´diÒjfÑoÝÉÚÌd]®SS¯\ãÖãÖdtzqá{þÓ---´@AÈ$¬–£¼ëè¯*.þU#´œ©Ãš jXV`ÕþOnZXhqÿã)ð #'3•@6$%&%&'$'B’ ’.’$’ &Œ($‘4'!%   ! + 1 4üÄìôìîöî991ä2ô<äìîöîî0KSXííY"K° TK° T[K° T[K°T[K°T[K° T[X½4@44ÿÀ878Y"32654&'2#"&546"32654&%3#2#"&546ÑWccWUccUžº» º»ü—VcbWWcd1 üZ ž¼»ŸŸ¹º‘”„‚••‚ƒ•Ü»»ÛÛ»¼Ûa•‚„””„–ùó Û»½ÚÛ¼ºÜÿãþð 0Í@–  † †  † †††  !         B  (('•+•'”$‘Œ .  .'.'!!1üìÄÔÔìÆî99999991/ÆäöæîîÆ9990KSXíí9í9í9í9í9íí9í9ííí9Y"²2]@² " ) **&:4D ^YZ UZZY0g{›š™—• “••"™-  ' (   2'') #**(/2; 49?2J LKFO2VZ Y UY\_2j i`2uy z““—•œœŸš › š 2 2°29]]3267 >73#'#"5467.54632.#"ò[UÔ _¦Iþ{ü;Bº h]ühäƒñþΆ†02Þ¸S¥UWžDiƒ;#Q¡X’Â?@ýøYËr„þþ~þã“YW×€ác?}<¢Å$$¶/1oX3gŪoÕB@ „üì1ôì0K°TK°T[X½@ÿÀ878Y@ @P`p ]#oªÕýÕ+°þò{ O@˜—  Üä2ì991üì0K°TX½@ÿÀ878YK°TX½ÿÀ@878Y#&547{†‚ƒ… –•”—æþ>ççþ;åëÆàßÄì¤þòo @˜— Ü<ôì991üì03#654¤ –••– …ƒƒìþ<ßàþ:ëåÅççÂ=JÃðN@,  ™ ™ ‘    Ô<ä2Ü<ä2991ôÔ<ì2Äì2990 %#'-73%Ãþ™g:þ°rþ°:gþ™:PrPßÂÃbËþ‡yËbÃÂcËyþ‡ËÙÛ #@ œ  Üü<ü<ì1/Ô<ü<Ä0!!#!5!®-ýÓ¨ýÓ-ýÓªýÓ-ª-žÿÃþ@ žƒüìÔÌ1üì073#ðÓ¤Rþ¬þÀ@d߃¶œÜÌ1Ôì0!!dý僤ۮþ·ƒüì1/ì073#ÛÓÓþþÿB²Õ-@BŸ/Ä991ôì0KSXííY"3#ªýøªÕùm‡ÿãð #@   ‘Œ üìôì1äôìî0"32'2#"‹œœû þ÷ûûþ÷ PþÍþÌþÍþÍ3343 þsþ†þ‡þsyzáZÕ K@B     ÔìÄüì1/ì2ôìÔì0KSXY"K°TX½ ÿÀ @878Y´]7!5%3!!þJþ™eÊJü¤ªsH¸HúÕª–Jð¥@'B¡”  ‘   üÄÔìÀÀ91/ì2ôìôì0KSXíí9Y"K°TK°T[K°T[X½@ÿÀ878Y@2UVVzzv‡tvust‚†‚‚‚¨¨]]%!!567>54&#"5>32‰ÁüLs3aM§†_ÓxzÔXèE[þôªªªw‘:m—Iw–BCÌ12èÂ\¥pþëœÿãsð({@. † †     “  “#‘Œ£)&  )üÄÄÔìôì991ìäôäìæîîîî90K°TK°T[X½)@))ÿÀ878Y@ daa d!]!"&'532654&+532654&#"5>32?‘£þÐþè^ÇjTÈm¾Ç¹¥®¶•ž£˜S¾rsÉYæ Ž%ÄÝò%%Ã12–„•¦wps{$&´ Ѳ|«d¤Õ Œ@   B     ÜÔ<Äì291/äÔ<ì290KSXÉÉY"K° TK° T[X½@ÿÀ878Y@* *HYiwŠ+&+6NO O Vfuz… ]] !33##!5þþ5þÕÕÉý^%üãÍü3¨þ `ÞÿãdÕu@#†  ‰   Œ¤  üÄÔìÄî1ääôìæîþÄî90K°TK°T[X½@ÿÀ878YK°TX½ÿÀ@878Y!!>32!"&'532654&#"Ýý ,X,ú$þÔþï^ÃhZÀk­ÊÊ­Q¡TÕªþ’þîêñþõ Ë10¶œœ¶$&ÿã–ð $X@$ †   ¥  ‰"‘Œ% " !%üììôìä1äôäüäîîî90@ËËÍÍÍËˤ²]]"32654&.#">32# !2¤ˆŸŸˆˆŸŸ L›LÈÓ;²káþðâþýþîPL›;º¢¡»»¡¢ºy¸$&þòþïW]þïëæþêyb¥¨hÕc@B üÌÄ991/ôì0KSXííY"K°TX½@ÿÀ878Y@X9Hg°°]]!#!¨ÀýâÓþý3ÕVú+‹ÿã‹ð #/C@%  ' - ‘Œ'£0 $*$ !0üÄìôÄìîî991ìäôìîî990"32654&%.54$32#"$54632654&#"‹¥¥¦¥þ¥‚‘ÿÞßþ‘’£þ÷÷÷þ÷¤H‘ƒ‚““‚ƒ‘Åš‡‡š›†‡šV ²€³Ðг€² "ÆÙèèÙÆat‚‚tt‚‚ÿã‡ð$X@#†  ¥ ‰ ‘Œ%!"" %üìäôìì1äôìæþõîî90@ÄÂÀÀÀÂμé]]7532#"543 !"&2654&#"áLœKÈÓ:²làþûâþ±þåLœ>ˆŸŸˆˆŸŸ¸$& V\ëæþsþ†þŸþ[—º¢¡»»¡¢ºðÃ#@ƒ¦ƒü<ì21/ìôì073#3#ðÓÓÓÓþþ#þžÿÃ# %@ƒžƒ¦  ü<ì2ÔÌ1äüìî03#3#ðÓÓÓ¤R#þýÙ¬þÀ@Ù^Û¦M@*œœœœB¨§$#üì291ôì90KSXííííY" 5Ûûøúþðþ‘þ“¶ѦÑÙ`Û¢@ œœ#ü<Ä21ÔìÔì0!!!!Ùúþúþ¢¨ðªÙ^Û¦O@+œœœœB¨§$#ü<ì91ôì90KSXííííY"55Ùúþð¶þ/¦þ/¶m“°ð$p@+$  †ˆ•‘ƒ   &%ÜÄüìÔìî99991/îöþôîÍ9990K° TX½%@%%ÿÀ878Y¶y z z ]%3##546?>54&#"5>32‡ËËÅ¿8ZZ93ƒlO³a^Ág¸ßHZX/'þþ‘še‚VY5^1YnFC¼98ŸL‰VV/5<4‡þœq¢ L•@2  ©©L43¬0©7¬$©7CM34( (+(I+*(I,=MÜìüìþýþ<Æî991ÔÄüìþíÔÆÅî2Äî990K° TK° T[K°T[K°T[K°T[X½MÿÀMM@878Y@ NN/N?N]32654&#"#"&5463253>54&'&$#"3267#"$'&5476$32úŽ|{zy!<›g¬×Ø«gœ;’¥?@hþÕ°{â`±smiùhZ}þÙ˜¹þ¸€€†ˆ~R½Ôk{KOþÂþè£¤ŽŒ¥¤þHMIùÈÈúKLƒý ß±k¼Pƒ‹A@fþµÁŸþêjhmWQoagƒ}}I½¶J}‡® bæ{þùþÐhÕ º@A       B•    ÔÄ91/<äÔì90KSXííííííííY"² ]@:XvpŒ VXP ghxv|rwx‡ˆ€ ˜™–]] !3#!#¼þî%þ{å9Òˆý_ˆÕý®ú+þÉìÕ C@#• •• ­ . !üì2üìÔì9991/ììôìî90²"]!2654&#!2654&#%!2#!“D££þ¼+”‘‘”þ çú€|•¥þðûýèÉý݇‹Œ…fþ>orqp¦À±‰¢ ˘ÈÚsÿã'ð6@ ¡® •¡®•‘Œ 0üì2ì1äôìôìîöî0´].# !267# !2'fç‚ÿþð‚çfjí„þ­þz†S†íbÕ_^þÇþØþÙþÇ^_ÓHHŸghŸGɰÕ.@• •  2 üìôì99991/ìôì0²`]3 !%! )“ô5þáþËþBŸ²–þhþPþa/ûw.,¦þ—þ€þ~þ–É‹Õ .@•••­   üì2ÔÄÄ1/ììôìî0² ]!!!!!!ɰýÇý9øü>ÕªþFªýãªÉ#Õ )@••­ üì2ÔÄ1/ìôìî0² ]!!!!#ÉZýpPý°ÊÕªþHªý7sÿã‹ð9@ ••¡®•‘Œ43 üìüäüÄ1äôìôìþÔî990%!5!# !2.# !26Ãþ¶uþæ þ¢þu‹^’opü‹þîþík¨Õ‘¦ýSU™mn™HF×_`þÎþÑþÒþÎ%É;Õ ,@•­ 8  üì2üì21/<ä2üì0²P ]3!3#!#ÉÊÞÊÊý"ÊÕýœdú+Çý9É“Õ9·¯üì1/ì0K°TX½ÿÀ@878Y@ 0@P`Ÿ]3#ÉÊÊÕú+ÿ–þf“Õ M@ •° 9 üìä991äüì990K°TX½ ÿÀ @878Y@ 0 @ P ` Ÿ ]3+53265ÉÊÍãM?†nÕú“þòôª–ÂÉjÕ ï@(B¯  üì2ÔÄ91/<ì290KSXííííY"²]@’ ((764GFCUgvwƒˆ”›ç    (+*66650 A@E@@@ b`hgwp ‹‹Ž š¶µÅÅ×Öèéèê÷øù,]q]q3! !#ÉÊžýþöý3ÊÕý‰wýHüãÏý1ÉjÕ%@ •:üìì1/äì0@ 0P€€]3!!ÉÊ×ü_ÕúÕªÉÕ ¿@4  B ¯   >  üìüì91/<Äì290KSXííííY"²p]@V   && & 45 i|{y €‚‚  #,'( 4<VY ej vy •›]]! !###É-}-ÅþËþÄÕüøú+üúáÉ3Õ y@B¯6 üìüì991/<ì2990KSXííY"² ]@068HGif€ FIWXeiy…Š•šŸ ]]!3!#É–ÄþðýjÄÕûáú+áûsÿãÙð #@•• ‘Œ 3üìüì1äôìî0"32' ! 'ÜþýÜÜþÿÜ:xþˆþÆþÅþ‡yLþ¸þåþæþ¸HH¤þ[þžþŸþ[¤bb¥ÉÕ:@••   ? üì2üì91/ôìÔì0@ ?_¯]32654&#%!2+#“þššþ8ÈûþÿûþÊ/ýÏ’‡†’¦ãÛÝâý¨sþøÙð R@*  B ••‘Œ    3üìüì9991Ääôìî990KSXíí9Y""32#'# ! 'ÜþýÜÜþÿ? ôÝ!#þÅþ‡y;:xÑLþ¸þåþæþ¸HHúÏþÝï¥ab¥þ[þžþüþŽÉTÕ±@5  B• •   ?  üì2üÄì99991/<ôìÔì9990KSXíí9Y"²@]@Bz%%%&'&&& 66FFhuuwˆˆ˜˜]]#.+#! 32654&#A{>ÍÙ¿J‹xÜÊÈüƒý‰þ’••’¼~þh–bý‰ÕÖØºOýƒ…‡ÿã¢ð'~@<    B ¡”••”%‘Œ( "-"(ÜÄìüìä99991äôäìîöîÆ90KSXí9í9Y"²)]¶)/)O)].#"!"&'532654&/.54$32HsÌ_¥³w¦zâ×þÝþçjï€{ìr­¼‡š{âÊõiÚ¤Å76€vce+Ù¶Ùà0/ÐEFˆ~n|-À«Æä&ÿúéÕJ@•@@Ôäüä1/ôì20K° TX½@ÿÀ878Y@  @ p Ÿ ]!!#!ïýîËýîÕªúÕ+²ÿã)ÕK@ •Œ  8Aüìüì1ä2ôì99990K°TX½@ÿÀ878Y¶Ÿ]332653! ²Ë®Ã®ËþßþæþåþßÕüuðÓÓð‹ü\þÜþÖ*$hÕ·@'B¯ÔÄ91/ì290KSXííííY"²P]@b*GGZ}ƒ *&&))% 833<<7HEEIIGYVfiizvvyyu€˜—)]]!3 3JýÆÓÙÚÒýÇÕûéú+D¦Õ {@I      B ¯    ÔÌ91/<ì2290KSXííííííííY"²]@ò  ($ >>4 0 LMB @ Yjkg ` {|€ –•     !   # $ %  <:5306 9 ? 0FFJ@E@BBB@@ D M @@XVY Pfgab```d d d wv{xwtyywpx  †‡ˆ‰… Š —Ÿ¯[]]3 3 3# #DÌ:9ã:9Íþ‰þþÅþÂþÕûîûîú+úð=;Õ ]@F      B ¯   ÔÄÜÄ91/<ì290KSXííííííííY"K° TK° T[K°T[X½ ÿÀ @878Y@¸ '' 486 KX[fkww †€‡‹… ”—–     &()&(' ) 54<;:;4 4 8 ? H O X _ eejjhiil l xyyx}  x €€ƒˆ…„ƒ ”——•“ Ÿ ¯ @]]3 3 # #ÙsuÙþ Ùþ\þYÚÕýÕ+ý3üø{ý…ÿüçÕ”@(B¯@@ Ôäüä91/ì290KSXííííY"² ]@<5000F@@@QQQe„“ &)78@ ghxp Ÿ ]]3 3#Ùž›ÙýðËÕýšfüòý9Ç\Õ ›@B••B ÜÄÔä991/ìôì0KSXííY"K° TK° T[X½ @ ÿÀ878Y@@ )&8HGH    / 59? GJO UYfio wx Ÿ ]]!!!5!s•üPÇû=°ügÕšûoªš‘°þòXS@©²©±CÜüÌ21üìôì0K° TX½ÿÀ@878YK°TK°T[X½@ÿÀ878Y!#3!°¨ððþXùüÿB²Õ-@BŸ/Ä991ôì0KSXííY"#ªªýøÕùm“Çþòo<@©²©±Cü<Üì1üìôì0K°TK°T[X½ÿÀ@878Y!53#5oþXïïøÞÙ¨ÛÕ@ ÜÌ91ôÌ290 # #¼ÉþHþHÉÕýÓ‹þu-ÿìþþ¬µ©ÄÄ1Ôì0!5ûØþ¬ªð‰f1@ ´³DÜì1ôì0K° TK°T[X½ÿÀ@878Y #o™þºfþŠv{ÿã-{ %¼@'  ©¹ †º¹#¸Œ   E&üìÌÔì22991/ÄäôüôìÆîî9990@n0000 0!0"?'@@@@ @!@"PPPP P!P"P'p'…‡‡‡ ‡!…"' 'ð'000 0!@@@ @!PPP P!``` `!ppp p!€€€ €!]]"326=7#5#"&5463!54&#"5>32¾ß¬o™¹¸¸?¼ˆ¬Ëýû§—`¶Te¾Zóð3f{bsÙ´)LýªfaÁ¢½À‹..ª''üºÿ㤠8@¹  ¹Œ¸—G Füì22ôì1/ìäôÄìÆî0¶`€ ]4&#"326>32#"&'#3å§’’§§’’§ýŽ:±{ÌÿÿÌ{±:¹¹/ËççËËççRdaþ¼þøþøþ¼ad¨qÿãç{?@†ˆ† ˆ ¹¹¸Œ HEüä2ì1äôìþôîõî0@ € ].#"3267#"!2çNP³ÆÆ³PNM¥]ýþÖ-U¢5¬++ãÍÍã++ª$$>:#qÿãZ8@¹¹Œ¸—G Eüìôì221/ìäôÄìÄî0¶`€ ]3#5#"3232654&#"¢¸¸:±|ËÿÿË|±ýǧ’’¨¨’’§¶^ùì¨daDDaþËççËËççqÿã{p@$ †ˆ©¹ »¹¸ ŒKEüìôìÄ91äôìäîîôî90@)?p Ðð?????,// , ooooo ]q]!3267# 32.#"ü² Í·jÇbcÐkþôþÇ)ü⸥ˆš¹^Z¾Ç44®*,8 CþÝÄ—´®ž/øp@ ©‡—¼    Lü<Äü<ÄÄ991/ä2üìî2990K° TX½ÿÀ@878YK°TX½@ÿÀ878Y¶@P ]#"!!##535463ø°cM/þѹ°°®½™Phcü/ÑN»«qþVZ{ (J@#  †¹¹&#¸'¼ ¹½& G E)üÄìôì221/ÄäìäôÄìþÕî990¶`*€* *]4&#"326!"&'5326=#"3253¢¥•”¥¥”•¥¸þþúa¬QQžRµ´9²|ÎüüÎ|²9¸=ÈÜÜÈÇÜÜëþâþé³,*½¿[cb::bcªºd4@ ‡¸ — N  Füì2ôì1/<ìôÄì90²`]#4&#"#3>32d¸||•¬¹¹B³uÁƤý\žŸž¾¤ý‡ýžedïÁy+@¾±¼Fü<ì21/äüì0@  @ P ` p ]3#3#Á¸¸¸¸`û éÿÛþVy D@ ¾ ‡½¼ ±O  Fü<ì2ä991ìäôìî990@ @P`p]3+532653#Á¸£µF1iL¸¸`ûŒÖÀœa™(麜 ¼@)B¼— F üì2ÔÄ91/<ìä90KSXííííY"² ]@_ ')+Vfgsw‚‰Ž“–—£    ('(++@ h` ‰…‰š—ª§¶ÅÖ÷ð÷ð]q]33 ##º¹%ëý®kðýǹüiãýôý¬#ýÝÁy"·—Füì1/ì0@ @P`pð]3#Á¸¸ùìº{"Z@&  ‡ ¸¼PPF#üì2üüüì91/<<äô<Äì290@0$P$p$$ $ $¿$ß$ÿ$ ]>32#4&#"#4&#"#3>32)EÀ‚¯¾¹ru¦¹rw¦¹¹?°yz«‰|võâý\ž¡œ¾¤ý‡ž¢›¿£ý‡`®gb|ºd{6@ ‡¸ ¼ N  Füì2ôì1/<äôÄì90´`Ï]#4&#"#3>32d¸||•¬¹¹B³uÁƤý\žŸž¾¤ý‡`®edïqÿãu{ J@¹¹ ¸Œ QEüìôì1äôìî0@#?{{   {  { ð]"32654&'2#"s”¬«•“¬¬“ðþîðñþïßçÉÉçèÈÇéœþÈþìþíþÇ98ºþV¤{>@¹¹¸Œ½¼ GFüì22ôì1äääôÄìÄî0@ `€ à]%#3>32#"&4&#"326s¹¹:±{ÌÿÿÌ{±8§’’§§’’§¨ý® ªdaþ¼þøþøþ¼aëËççËËççqþVZ{ >@¹  ¹¸Œ½¼ GEüìôì221äääôÄìÆî0@ `€ à]32654&#"#"3253#/§’’¨¨’’§s:±|ËÿÿË|±:¸¸/ËççËËççý®daDDadªùöºJ{0@  ‡¸ ¼ FüÄì21/äôìÄÔÌ90´PŸ].#"#3>32JI,œ§¹¹:º….´˾ý²`®fcoÿãÇ{'ç@<  S  SB †‰†‰¹¹%¸Œ( R"E(üÄìÔìä99991äôìþõîõî90KSXí9í9Y"²']@m   . , , , ; ; ; ; $( ( *//*(() )!$'† † † †      '/)?)_))€)) )ð)]]q.#"#"&'532654&/.54632‹N¨Z‰‰b”?Ä¥÷ØZÃlfÆa‚Œe«@«˜àÎf´?®((TT@I!*™‰œ¶##¾55YQKP%$•‚ž¬7òž8@©¼‡  Fü<Äü<Ä2991/ìô<Äì2990²¯]!!;#"&5#53w{þ…Ks½½Õ¢‡‡žþÂý ‰NšŸÒ`>®ÿãX`6@ ‡Œ ¼  NFüìôì21/ä2ôÄì90´`Ï]332653#5#"&®¸||•­¸¸C±uÁȺ¦ýaŸŸ¾¤{û ¬fcð=`@'B¿ÔÄ91/ì290KSXííííY"K° TX½ÿÀ@878YK°TK°T[X½@ÿÀ878Y@ŽHj{†€‘¤  &&)) 55::0FFIIFH@VVYYPffiigh`ut{{uz……‰‰‰†––—š˜˜—¨§°Àßÿ>]]3 3#=Ã^^Ãþ\ú`üT¬û V5` @IU U U U   B ¿    ÔÌ91/<ì2290KSXííííííííY"K° TK°T[K°T[K°T[K° T[X½ ÿÀ @878YK° TK° T[K°T[X½ @ ÿÀ878Y@ÿ" 5 IIF @ [[U P nnf yy‡™˜” ¼¼ÎÇÏ         %%#'!%""%' $ ! # 9669 0FHF@B@@@D D D @@VVVPQRRPS T U cdejejjjn a g ouuy}x}zzxy  { v } ‡ˆ——”“œ›˜˜™@/– Ÿ¦¦¤¤««©©«¤ ¯µ±½»¸ ¿ÄÃÌÊy]]333# #V¸æåÙæå¸þÛÙñòÙ`ü–jü–jû –üj;y` Z@F      B ¿  ÔÄÔÄ91/<ì290KSXííííííííY"K° TK°T[K°T[K°T[X½ ÿÀ @878YK°TX½ @ ÿÀ878Y@˜   & =1 UWX f vzvt ‚ ™Ÿ—’ ¦©¯¥£       )&% * :9746 9 0 IFE J @ YVYYWVYVV Y P o x ›”«¤° Ï ß ÿ /]] # # 3 dþkªÙþºþºÙ³þrÙ))`ýßýÁ¸þHJþq=þV`¢@C        B  ‡½ ¼  ÔÄÄ91ä2ôì9990KSXíííííí2Y"K° TK°T[X½ÿÀ@878YK°TX½@ÿÀ878Y@ð     # 5 I O N Z Z j ‡ € “        '$$  )( % $ $ ' ** 755008 6 6 8 990A@@@@@@@@B E G II@TQQUPPVUVW W U U YYPffh ii`{xx‰Š … … ‰ ‰‰™ • • šš¤ ¤ ««°Ïßÿe]]+5326?3 3“N”|“lLT3!þ;Ã^^ÃhÈzšH†TNü”lXÛ` ´@B©¼© ÜÄ2Ä991/ìôì0KSXííY"K° TK° T[X½ @ ÿÀ878YK°TX½ ÿÀ @878Y@B&GI  + 690 @@E@@CWY_ ``f``b € ¯ ]]!!!5!qjýL´ü}´ýe`¨üÛ“¨%þ²$‚@4 %   ! © ©À ©±% $  C %Ô<Äü<Ä299999991üìÄôìî99999990K° TX½%ÿÀ%%@878Y²&]#"&=4&+5326=46;#"3>ù©lŽ==k©ù>DV[noZV¾”Ýï—ts•ðÝ“XøŽŽœøXþ®·±Ôì1üÌ0#®ªøþ²$ž@6%   ©©#À©±%#C %Ô<Ä2ü<Ä99999991üìÄôìî99999990K° TX½%@%%ÿÀ878YK°TX½%ÿÀ%%@878Y²&]326=467.=4&+532;#"+FŒUZooZUŒF?ù§lŽ>>Žl§ù?¾VøœŽŽøŽW“Ýð•st—ïÝ”ÙÓÛ1#@ œœ ÔÄ1ÔüÔìÀ990#"'&'&'&#"5>32326Ûi³an’ ›^X¬bi³an“ ›^V©1²OD;>MS²OE<>L5Õ b@ƒ ü<ì2991/ôüÌ0K° TX½ @ ÿÀ878YK°TK°T[K°T[X½ ÿÀ @878Y¶ P ]#53#3ËËË¢×þú+eþ›¬þÇ#˜!Q@+  †ˆ †ˆ ¹ ¹¸Œ"  "ÜìÔ<Ô<<ì221äô<ÄìÄþôîõî9990%.'>7#&73¦“¤¤JˆDF‰HA‰Mfñþ÷ ñfI‰ƒX⸹⡬)*ü *'ª#þä 32þá!bð`@!† ©  ”‘   Ü<ÌÌü<ÄÔÄ1/ì2ôäìÔ<î2î990K° TX½ÿÀ@878Y´66].#"!!!!53#535632NLˆ=”t‡þy-üìÇÇÖè=—´¶))›Ô×þ/ªªÑîó^R¼²#/ƒ@I -'! - -¹ëì'¹ë!0 *$0* $ $(st*(s0Üäìôäì9999999991ÔäìôäìÀ9999999907'#"&''7.5467'7>324&#"326{ÏrÎ%$&(ÑrÏ;t=:x=ÏqÏ%%&&ÏsÏ7t@?s9ÏqÏ(&%%ÏsÎ>v:@t8ÎsÏ'%$þ|pššprœRÃÕÆ@F  B Ó Ó   fe f eÔ<ì2ìüì2ì99991/ä2Ô<ì2Ô<ì290KSXííííY"K° TX½ÿÀ@878Y@(†¦ µ' ' ')((79‡ ˆ¦ ¥ª©]]!#!5!5'!5!3 3!!!þcÉþ` Tþ´þþ{y¿þÂþµTŸÇþ9Ç{3›{JýD¼ý¶{›3þ¢®˜@ õõÜ<ì21ÔìÔì0##®ªªª˜ý öý ö\ÿ=¢ð >‘@54&.#"#"&'532654/.5467.54632{?>‹ú?>ÌS8alÎÓƒ\]>9Ì­IšXW”:fqÝÖ€][;;ȦI™¨.Z.L…‡-[.Kˆ“¤''PGZswšeZŒ54m@ލ¤''TLf{x™f[1,pE‚Ÿ×F)’@ÎÍddÜüÔì1ü<ì20K° TK° T[X½@ÿÀ878YK° TK° T[K°T[K°T[X½ÿÀ@878YK°TK°T[X½@ÿÀ878Y@````pppp]3#%3#^ËËþyËËÊÊÊåÍ/IC@&=Ë>:ÌAÊ$1Ë04ÌGÊÉÈ$É 7aD=0^* D^ JÜÌüìþí2î1/îöþýîÖîýîÖî02#"$'&5476$"3267>54&'..#"3267#"&54632˜mmllmmþù˜˜þùmmllmm˜ƒâ^^``^^⃄ã^]]^\^ã§B‚B•§«›@zBC‰FØûûØIˆÍnmmþúš˜þûmmnnmm˜šmmng^^^å‚ã^^__^]⃅ã]^^õ! ¯Ÿ®"ôÐÑòsÕ;ð)_@3(%ãÝá%Ý ßÞÝ à‘* "(kl"k *ÜìÌüì22ÀÀ9991ôäüôìÄîíÖîî99990!!#5#"&546;54&#"5>32"326=‹°ýP®•,]€˜¿¼¶uu>ˆDI‘E·³þì¡~bRh‚P{¸þ@p?D‡q‡Š[[""°ðCO@Mrž%# †@Ièèèè è è è  è B  ç¦ o o nüü<Ôì2991ô<ì2990KSXííííííííY" 5 5%þÓ-þ+#þÓ-þ+#¿þôþô¿¢R¢¿þôþô¿¢RÙÛ^@ œÜÔì1ÔÄì0!#!Ù¨û¦^ýÁ•d߃¶œÜÌ1Ôì0!!dý僤åÍ/8L`@6EBC?2ÉH0É9JCÊ 9ÊÉÈ É$HE301B54&'.'2#"$'&5476$#32654&'2#'.+#ƒâ^^``^^⃄ã^]]^\^ㄘmmllmmþù˜˜þùmmllmm}{{nWXf°®i`C.‰¬;I6B›f^^^å‚ã^^__^]⃅ã]^^gnmmþúš˜þûmmnnmm˜šmmnþbþì>KL?gwyVpMIßÑ`3þœDÕb+ö/·ïîÔÌ1üì0K° TK°T[X½ÿÀ@878Y!!ÕVýªö”Ãu=ð  @ÃÄà ‘ Z[ZÜìüì1ôìüì0"32654&'2#"&546PnnPPnoO@v+..¹†‡´¸ooPOmmOOp1.-rB„·´‡†ºÙÛ .@МР œ   Ô<ì2ü<ì21/ìÔ<ìü<ì0!!#!5!!!®-ýÓ¨ýÓ-ýÓúþþ}ªþ}ƒªƒû¦ª^œ´ðJ@$}}BÝÝ÷ Ý‘~ÜÄÔÄì91ôÄìüìî90KSXí2íY"!!56754&#"5>32 ¨ýª"?XhU4zHM…9‘®þµ8rn81^BQ##{„l‹þä0bÍð(H@' Ý Ý Ý Ý ø÷Ý ø#‘)~&~ )ÜÄÄÔìÔì9991ôäìüäìÔìîî90#"&'532654&+532654&#"5>32 \e¾±9}F4wCmxolV^^ad_(fQI€7©Z`mR|†yOFJLl?<:=svcE`sîRf1@ ´³DÔì1ôì0K° TK°T[X½ÿÀ@878Y3#‹Çþº™fþˆ®þVå` M@% ‡Œ ¼½!   NF!üì2ôìÄ91ää2ô<ìÜÄ990¶"`"Ï"]3326533267#"&'#"&'®¸Š‡”•¸#% )I#ER2‘bf*þV ýH‘”¨¨ü¢<9 ”NPOONNýמÿ;9Õ %@Á]] ÔÔüÜì91Ä2ôì90!###.54$yÀ¾Ž×ëÕùfùáNݸ¾èÛH®F·ƒÔì1Ôì03#ÛÓÓFþ#þuÁ@  ó' ÜÔìÔÌ1/ÔüÄ90!#"&'532654&'T76xv.W+"J/;<+->i0Y[ ƒ0.W=‰œÅß ,@Ý ÝÝ ÷‘ |]|| Üôäüä1ôììÔìî2035733!œÌßæ‰Íý× c)t'ý+n`Õdð.@ãáÝ àÝ‘ klk Üìüì991ôìôìüì0!!2#"&546"32654&‹°ýPX³Îγ³Ðгi~hi}|P{Ý¿¿Ûܾ¿Ýs¡ˆ…  …‰ ÁH# †@I è è è è èèèèB  ç¦ o opü<üÔ<ì991ô<ì2990KSXííííííííY"5 %5 ÁÕþ+-þÓ²Õþ+-þÓ#þ^Rþ^¿  ¿þ^Rþ^¿  ÿÿ‰ÿãð&{'„5—‹ýdÿÿ‰ÿã?ð&{'„5t‹ýdÿÿbÿãð&u'„5—‹ýdÿã¬Õ $†@/ †ˆ !ƒ# •Œ#%" " "!& %ÜìÔüìÔì99991äôìþÍôî9990K°TK°T[K°T[X½%ÿÀ%%@878Y@ ttttv]33267#"&546?>7>5#53ô¾7ZZ:3ƒmN´`^Àg¸àIYX0&ÄÊÊDœe‚WX5^1YnFC¼98ŸL‰VV/5<6þÿÿhk&$”¼uÿÿhk&$’¼uÿÿhm&$•¼uÿÿh^&$“¼uÿÿhN&$‘¼uhm !Ë@T   !!  ! !!!B  Á • Ž  !  VV!"ÔÄÔì2Ôî299999991/<æÖîÔî9990KSXííííííííY"² #]@  s › P#f iu {yyv v!€# ]]4&#"326!.54632#!#TY?@WX??Y˜þð!þX=>Ÿsr¡?<Òˆý_ˆÕZ?YWA?XXþóýN)sIs ¡rFv)ú‹þHÕ‡@9  B• ••••­    ÔÔ<ì2ÔÄÄ91/<ììÄôììîî0KSXííííY"²€]@gww† …– ¿ ]!!!!!!#!5ýÇý9øü=ýð Íq‹þ¶ËÕªþFªýãªþÕžüðÿÿsþu'ð&&z-ÿÿÉ‹k&(”žuÿÿÉ‹k&(’žuÿÿÉ‹m&(•žuÿÿÉ‹N&(‘žuÿÿ;ºk&,”ÿ/uÿÿ¢k&,’ÿ/uÿÿÿþ`m&,•ÿ/uÿÿXN&,‘ÿ/u ºÕ g@  © ••  2  yô<ì2ÄôìÄ91/Æ2îöîî20@( °Ÿ Ÿ Ÿ Ÿ ŸŸŸŸ¿ ¿ ¿ ¿ ¿¿¿¿]]! )#53!!3 !Ó ±–þiþPþ`ÉÉËPþ°ó5þáþËÕþ—þ€þ~þ–¼ãþýê.,ÿÿÉ3^&1“þuÿÿsÿãÙk&2”'uÿÿsÿãÙk&2’'uÿÿsÿãÙm&2•'uÿÿsÿãÙ^&2“'uÿÿsÿãÙN&2‘'u?œÅ …@M œ  œœœœœ œ œ B   Ô<Ì291Ô<Ì290KSXííííííííY"  ' 7 œþ7Éwþ5þ5vÈþ8vËËLþ5þ7yËþ5yÉËyþ5Ëfÿºå +ž@< +,  )&  *&•& •‘&Œ,+,* # )#3,üìüìÀ999999991äôìîÀÀ99999990@*WZWU!je!{vu! FYVjddj(|svz( ]] 324&'.#"&5!27!"&''¶ý3>¡_Ü'y=¡_Üþý''†NOy;‚ÝW¢fªNPþˆþÆ€Ý[¢gXü²@CHp¸¸@Cþ¸þåp¼Džf b¥MK¿YÆgþöžþŸþ[KK¿Xÿÿ²ÿã)k&8”îuÿÿ²ÿã)k&8’îuÿÿ²ÿã)m&8•îuÿÿ²ÿã)N&8‘îuÿÿÿüçk&<’suÉÕ =@• •ö  ? üì22üì91/ôüìÔì0@ ?_]332+#32654&#ÉÊþûþÿûþÊÊþš™ŽÕþøáÜÜâþ®'ýÑ’††‘ºÿã¬/š@0-'!  *†¹*¹—Œ.  !' $'$-F0üÄüÌÆîÔîî99991/äþîþÕî990@@'(Š Š     ! "&  : :!MM I!I"jj ¥¥¦ ]]4632#"&'532654&/.5467.#"#ºïÚÐÛ—¨:A9¦`áÓ@ˆIPŒAtx;e\`W§—ƒq‚ˆ»qÈÛèàs`/Q*%jŽd¬·¤_[?T>7;‡[¬gp‹ƒû“ÿÿ{ÿã-f&DCRÿÿ{ÿã-f&DvRÿÿ{ÿã-f&DüRÿÿ{ÿã-7&DRÿÿ{ÿã-&DjRÿÿ{ÿã-&DR{ÿão{3>@C'-%= 4©%†ˆ©:¹.†-º*¹»1 ¸Œ%?47&%7& =&-7"E?üìÌÔü<ÔìÄ999991Ää2ô<Ääü<ôìÄî2îôîî9990@0+0,0-0.0/00@+@,@-@.@/@0P+P,P-P.P/P0…+…0€@@ @°@À@Ð@à@à@ð@??? ??0,0-0.0/@,@-@.@/P,P-P.P/ooo oo`,`-`.`/p,p-p.p/€,€-€.€/]q].#">32!3267#"&'#"&5463!54&#"5>32"326=¶¥‰™¹DJÔ„âü² Ì·hÈddÐj§øMIؽÒýû§—`¶Te¾ZŽÕï߬o™¹”—´®ž0Z^þÝúZ¿È55®*,ywxx»¨½À‹..ª''`þf{bsÙ´)ÿÿqþuç{&Fzÿÿqÿãf&HC‹ÿÿqÿãf&Hv‹ÿÿqÿãf&Hü‹ÿÿqÿã&Hj‹ÿÿÿǦf&ÓCÿÿÿof&ÓvÿÿÿÿÞ\f&ÓüÿÿÿÿôF&Ójÿqÿãu('@^%{&%#${##{#({'(#&'('%$%(('"#" ! B('&%"! ##¹ ¹Œ#±)&' ! (%#" QE)üìôì99999991ìÄôìî9990KSXÉÉÉÉííííY"²?*]@v%+("/#/$)%-&-'*(6%F%X X!` `!f"u u!u"%#%$&&&''(6$6%F$E%Z Z!b b!z{     {zzv v!x" *ð*']].#"32654&#"432''%'3%F2X)§¹®’‘®6 ~rþäæçþåÝ4*ŸþÁ!µäM!þÙ“ØÃ¼ÞÞ¼z¼&þà­ÿþÉ7ÿú7´kc\Ì‘oabÿÿºd7&Q˜ÿÿqÿãuf&RCsÿÿqÿãuf&Rvsÿÿqÿãuf&Rüsÿÿqÿãu7&Rsÿÿqÿãu&RjsÙ–Ûo )@êêœ r ÜÔ<ü<Ä1ÔÄüÄîî03#3#!!ßööööýúúþoöþõAªHÿ¢œ¼ +ä@<+,&  )&  *&¹& ¹¸&Œ,+,* # #Q)E,üì2ôì2À9999991äôìîÀÀ99999990@p(?-YVUV jf!{    { z{ {!"#$%{&›•%¨ -ð-&YVUZ(ifej(ztvz(‰•š$¢­$]] 32654&'.#".5327#"&''‰þ)gA“¬\*g>—©}66ñ]ŸC‹_’56þîð`¡?‹`!ý°*(èÈOuš))ëÓHn.—MÅw834¨O³MÆxþíþÇ43¨Nÿÿ®ÿãXf&XC{ÿÿ®ÿãXf&Xv{ÿÿ®ÿãXf&Xü{ÿÿ®ÿãX&Xj{ÿÿ=þVf&\v^ºþV¤>@¹¹Œ¸½— GFüì22ôì1ìääôÄìÆî0@ `€ à]%#3>32#"&4&#"326s¹¹:±{ÌÿÿÌ{±8§’’§§’’§¨ý®¾ý¢daþ¼þøþøþ¼aëËççËËççÿÿ=þV&\j^ÿÿþu¥Õ'ä$ÿÿ{þu€{'¿Dÿÿsÿã'k&&’-uÿÿqÿãçf&Fv‰ÿÿsÿã'm&&–-uÿÿqÿãçf&Fý‰ÿÿɰ&'–ì‰ÿÿqÿãÛ&G ºÕ ! )#53!!3 !Ó ±–þiþPþ`ÉÉËPþ°ó5þáþËÕþ—þ€þ~þ–¼ãþýê.,qÿãô$J@$Ó ù"¹¹ Œ¸—   GE%üìô<Äü<Ä1/ìäôÄìÄîý<î20¶`&€& &]!5!533##5#"3232654&#"¢þºF¸šš¸:±|ËÿÿË|±ýǧ’’¨¨’’§¶N}““}úü¨daDDaþËççËËççÿÿÉþuÕ'Ì(ÿÿqþu{'xHÿÿÉ‹g&(–¦oÿÿqÿãa&Hý”ÿûÿÿsÿã‹m&*˜uÿÿqþVZH&Jþ‹ÿÿÉ•P&,™ÿ/uÁy` ·¿Füì1/ì0@ @P`p]3#Á¸¸`û ÿÿÉjl'’ÿnv/ÿÿÁJl'’ÿZvOÿÿÉjÕ'ý‹ÿÃ/ÿÿÁ'ý%OÿÿÉjÕ'y1w/ÿÿÁ„'yÖsOÿòuÕ ?@ •  : yô<ìÄü<Ä991/äì90´0P]3%!!'7ÓË9Pþw×ü^”MáÕý˜Ûoþîýãª;jnžH ^@ — z z Ô<äü<ä991/ì90K°TX½ @ ÿÀ878Y@ @ P ` sz p à ð ]37#'7Ǹ}Lɸ{JÅý¦ZjüãšXjÿÿÉ3l'’Åv1ÿÿºdm&vBQÿÿÉ3_&1–×gÿÿºdf&Qýs Õ;@•••­   üìÔÄÄÔì299991/ìì2ôì2î0!!!!! !# !3úýÇý9øû×þOþA¿±gþ¿þÀ@AÕªþFªýãª|pm|ªþáþàþßþßqÿãÃ{'3„@1†ˆ ©. ¹(¹»"%¸Œ4"1 K1 Q+E4üìôüôìÄ9991ä2ô<Ääì2Äî2îôî90@%?5_5p5Ÿ5Ï5Ð5ð5????? ooooo ]q].#"!3267#"&'#"32>32%"32654& ¤‰™¹Hü² Ì·jÈbdÐj òQGÑŒñþïñŒÓBNèâú°”¬«•“¬¬”˜³®ž5Z¾Ç44®*,nmnm98olkpþ݇çÉÉçèÈÇéÿÿÉTl'’•v5ÿÿº•m&vBUÿÿÉT_&5–}gÿÿºZf&Uýÿÿ‡ÿã¢l'’•v6ÿÿoÿãÇm&vBVÿÿ‡þu¢ð&6z‹ÿÿoþuÇ{&Vzÿÿ‡ÿã¢m&6–‹uÿÿoÿãÇf&Výÿÿÿúé_&7–}gÿÿ7þ‚&Wý#pÿÿ²ÿã)K&8ðEÿÿ®ÿãXÊ&X|ÄÿÿD¦â'üõ|:ÿÿV5m'üEZÿÿÿüçâ'üq|<ÿÿ=þVm&ü^\ÿÿÿüçN&<‘suÿÿ\l'’•v=ÿÿXÛm&vB]ÿÿ\<'ÿ¨,=ÿÿXÛ&ÿ]ÿÿ\m&=–¾uÿÿXÛf&]ýþV#Š@@   B   ©Šæ©Šæ©!—$  $ÔÌ91Ä2Äüìôìîöîî299990KSXí2í9Y"K° TX½$ÿÀ$$@878Y.#"!!#"&'53267#5!>32&P,`r<þÃ:¼º:d/4a/am"‰ø?$Æ—5dð¤z„þÉý…þãÓ¦!!‰¦­J·ÃÁî?f7@ ´³uÜì91ôì290K° TK°T[X½ÿÀ@878Y3#'#¶”õ‹´´‹fþˆõõÁî?f7@ ´³uÜì91ô<ì90K° TK°T[X½ÿÀ@878Y373¶õ‹´´‹õîxõõþˆÇ)9H W@ ð³VVÜìÔì1ô<Ôì0K° TX½ÿÀ@878YK°TK°T[K°T[X½@ÿÀ878Y332673#"&Çv aWV` v ž‘‘žHKKJLšDf,@ ÎÍdÔì1üì0K° TX½ÿÀ@878Y3#šÌÌÌîá _@Áò ÁñV xVÔìôì1ôìôì0K° TK° T[X½ÿÀ@878YK° TK° T[K° T[X½ÿÀ@878Y4&#"3267#"&54632˜X@AWWA@XzŸssŸŸssŸô?XW@AWX@s  ssŸŸLþuÁ @  óô 'ÔìÄÔÌ1/üüÄ90!33267#"&546¸w-+76 >&Dzs5=X..… W]0i¶J7c@$  Ãà íVwVvôìüì99991ü<üÔ<ì99990K° TK° T[X½ÿÀ@878Y'.#"#>3232673#"&ü9! &$}f[&@%9! &$}f[&@Z7IR‡“!7IR‡“ðî®fB@´³ÔÜÔÌ991ô<ì20K° TK°T[X½ÿÀ@878Y3#3#ü²ø‡ªß‰fþˆxþˆNÏç@@" å‘å  mm  ÔììÔììÀÀ9991/<ì2ôì0%!5654#"!5!&5! Ïý¨±ÆþøØØþ÷Dzý¨?ž‘1/Ž¡²²²aLÊð"þÝïÊþ´a²²‹*¸>ŠþwþËÂþØÿáÿðª/#Ë@1 ÚÙ"ØÕ $ #" #h#$ÔÔÔì9999991/<äôì22î9990K° TX½$ÿÀ$$@878Y@V             ##(]]#3267#"&5467!##"#>3!‡¶i/7.%7vy"PþºÂµÃ)6<  ¥y‘þJ\:1fd.¡xüo‘@E¦}ÿÿÉ‹k&”îuÿÿÉ‹N&‘åuÿœþh;Õ'4'&'&#!#!5!!!232+532765o@'“-'þnÈþÕëþb “{J!dfjäN@„8:w£L3ýL+ªªþ?0'vùþíþò{yªJP¾ÿÿÉ#k&’®usÿã'ð763 5&! ! 75! &'!5L îl’ÿÁÓþøþ¦Â½ÂÂUÕÇþøþ®|7 ¼PVq3°ÕŽÔÎþ›þ—ÎÏÓ½t¡ª‡ÿã¢ð12&'&#"#"%5327654'&'&/&'&5476“Ê븕()îK;>¤z2[,þÏr™ÎþõyywpóR$ƒ%4&{ðbZ¸†ðLÅZ~3Ee049¶VuþÄ["_ÐE##€8N—A0h_¡êoQÉ“Õ3#ÉÊÊÕú+ÿÿXN& ‘ÿ/uÿ–þf“Õ 3+532765ÉÊfjàM?†68Õú“þò{yªJMÁÿîÿòžÕ032767656'&'&/&#!!#532765! !VBER!=I;þõý_þOM?†685ÿ’!e^€þòÇýß- F|H9$7ý9+üÉýþªIOÀáýžFP³()ÇlfÉÿþÕ*32767674'&/ !%!#3!3;B|DOT>C96Be\ƒþöþüý"ÊÊÞÊÇýß+D~xI6ªEP³()Åm fÇý9Õýœdÿœ;Õ!5!!!232#4'&'&#!#ÇþÕëþb “{J!dÌ@'“-'þnÈ+ªªþ?0'v÷þy¡L3ýLÿÿÉjk& ’îuÿÿÉ3k&”åuÿÿ{=i&)þá!Éÿ;Õ 33!3!#5ÉÊÞÊþ%¼ÕúÕ+ú+ððhÕ !3#!#¼þî%þ{å9Òˆý_ˆÕý®ú+þÉìÕ 6'&'&#!!2767#!!!!2FY þ¼D}[cÚaxÏ03ýè¤ý&+½s':¸VOcýÝDKmƒoŒÕ¦þ>E4DdÉìÕ (4'&#!! 764'&#!! 76#!! Ò1=þ¼D"4é þÕ+ ÝF\AKýè xIü¼O/¸à( ýÝÒ¸Êþ>¾ýfþüe! Õ’X‡þî-(’VÉ#Õ#!“ÊZ+úÕÕªÿË% #33#5!#²þ`þeÑüãüºûy»œhû˜/úÑþjðð–É‹Õ !!!!!!ɰýÇý9øü>ÕªþFªýãªqáÕ)!3323&'6767#+##"'#36;DÊV*xÊþX  [ËþÍ-PÊP-þÍË[  þXÊx*VÇýW”ýºdýœFýlý©œÿãsð1#"'53 7654'&+5327654'&#"567232P«2µO0áØ»Ô¬Ý2B˜Rt®¶å;°=NœÍ â•ù‡rmÅ\ 'ŠSoþïtJJÃcº0;¯E%¦†+6­0B´<xeÉ3Õ !#!33þðýjÄ–ÄÕûáú+áûÿÿÉ3i&þá!ÉjÕ 3! !#ÉÊžýþöý3ÊÕý‰wýHüãÏý1ÿîÿòVÕ!#!!#53276!5Éý_þOM?†68ôáú++üÉýþªIOÉÕ ! !###É-}-ÅþËþÄÕüøú+üúáÉ;Õ 3!3#!#ÉÊÞÊÊý"ÊÕýœdú+Çý9sÿãÙð!%276'&#" '&&576! 'ò€kƒÙô€k„Úþ̺³¼¾:;»¼¼»‡À¢¤¤Á¡þÿþ壤¤Æ¾A !aÓÓÓÓþŸþ ÓÓÉ;Õ#!#;Êý"ÊÕú++úÕÕÉÕ 4'&+32767+#! ¸AYþþÃD Õþ€:BþÊȹ: ¹Aýφ=Vþ}4ý¨Õþ®2sÿã'ð &'&# 3 7! '&76LÓ»ñþ¬|@Ü{¹ÇÕþúþ©ÂÀÀÁðŽÕ± þóŠÊþƒ’Q½ÓÑÎghÎÑÿúéÕ!!#!ïýîËýîÕªúÕ+{=Õ 3 3#5327¬ýÏß´Pßýd ´2;'L‰ýD¼ú‰B§QsÿßÛ (3"376%53 ##5 '&'&'&'&#276F¶‚'c³34ý-½ÀVÆ6½­­þÖ'(Æþú¶3(¼—Œ€¼ôŠ€Lb%¤þåþå£{ beÏÒëë¼·þÊ.0þµÏÏÓÓ$,Ö_¦kû;²¤=;Õ 3 3 # #ÙsuÙþ Ùþ\þYÚÕýÕ+ý3üø{ý…Éÿ/Õ 33!33#5ÉÊÞÊô¼ÕúÕ+úÕþfðÇ;Ù!3#!"'&#"'&'&53áÊÊþá_ “{L!bÌ>'2foú+°0)wö;þË P0É9Õ %!3!3!3f ÊùÊ ʪ+ú+ÕúÕÝÉÿ-Õ!3##!#!#q¼ôÊý÷Êý÷Êðš+úÕÝû#+ú+sÕ +32%&+!!! 6ª‹A[þþ¿F"Õþ€:BþýîGɹ: ¾·B1‚?Xƒ4X¦úÑR2ÉÕ +32%&+#! 63#¸AYþþÃD Õþ€:BþÊȹ: ¬Ë˾¹A1†=Vƒ4Xú+R2Qú+ÉÕ +32%&+#! 6¸AYþþÃD Õþ€:BþÊȹ: ¾¹A1†=Vƒ4Xú+R2sÿã'ð'&# 56! ! '5! 67!5M ôiŽþ÷ÆÓZ½Â*½þÐþúÕÆ R|7 ýCP[o0½ÕŽÔÎþ›þ—Î)¦Ó½t¡ªÉÿã¨ð&%276'&#"76! ! '&##3öò€kƒÙó€l„þ)¤¾:;»¼¼»þÅþ̺¯±ÊʇÀ¢¤¤À¡þþþ壤½#¶ÓÓÔþ þ¡ÔÓÆº7ýfÕýo‘Õ"3676;3! 476;#"'&XÆ?@?<ÍÙ¿HGHwÛËþ7þ ÕÕ&,þþþ$'ø] JLzþh“41ý‰Õþg Þ$ýîÉ{ÿã-{ +%276=#" #5#"'&5%63!54'&'"56#¯\G·àUVn7rµ*¸síÃeO¡*-—EbƤÆ}‡hž)35y‡4þþa,1ýª» x\Z ¯>\ªNÿÿ‘E&/&'&3676763 '"'&454767&'&567676%23!!"ÏqGddXnaM^sXyý×dS$z[þèd†âŒŽH>c .~ `þ¬£DA ALòp3Yq·„iZ{ þ¥iˆþRu*œÞx0BIxR4i )0Eºâ` /=#!!2'&'&+36767676&'+32767654ÉZ<$`, 4:-:0=þf¢q`F<22;7|®J9 =k&¦¶T-"Nm#Z^CA `>RK M> 1¬Kô"þÆ5þ¤7FQºž`!#!žýÕ¹ä¨üX`Vÿ5åV% !3#5!#3!ºþäþãòr®üÍ®sC#­ïýþˆÁÁx©qÿã{2!327# '&76"!4'&–üƒjü²ÚG[ÊÉÉÕþöž•’É\3 fP{­ãZþßKh®Vœ ž¢œNn¨\Hyÿþú`'!723&'6767##'#"'#36;Þ·=#>¹þš %ºþý&8·7' þüº% þš¹>#=þ@ðþLÌþ4´þýÀÿžÿìÃw,#"'5327654'&'#5327654'&#"5632¦e5E„E3×mšœ«‡ºÛ=…BM•Ú‹.C®·”ÜmO\|L)bH]ØP)5 H[*?‹1 zx 5–-cHq` ##353·ýǸ¸9¹^^ý\û b¨üöÿÿqH&þX>š{f 33 ##š¸%ëý®kðýǸfþãýôý¬#ýÝÿúÿîX`!3!+32765š¸ü‰'%j1HåJ)ªüV`ý#œ-1›¢Z™ºç^ %##3 3#œžþu¹ÇËÕÆ¸¨yüß^ýëû¢!ºd` !#3!3#¬ýǹ¹9¸¸´¬û ýì`qÿãu{4/&#"32762#"'&76²jKm³T9oQ€´S8þÁò‡‰‰ˆñò‡‰‰†/át?¢m¡ésT£m윛ýÖ›œœ›*›œºd`3!3¬¸üV¹¨üX`û ¨ºþV¤{ "'#3632'27654'&#"Ùöp¹¹tòÕ~xøºP/mO}¶P3pNÅý® ªÅ©¡þþþû¥¢š±j—êtT«kœðrPqÿãç{2&#"327# '&76¤¦¡šà_:œY„ž“¼þ󔆗•{F¬V¬hœþ÷j=VªH­žºÅ`!#!5!Åþ×¹þ× ¨üX¨¸FþV‰`+53276?3 3œMKI|“mJ**5 þ:Ä^]ÄhÆ?=š$!‰TNü”lqÿÝT%0+#5#"'&76;533 4/&+3276%;#"Ý¥'|ºZ¸Vò‡‰‰†óV¸Z‡dÂjMmZZ³T9üoQ€VV³T9/þÊ› [ÓÓœ›*›œÙÙÈ–îßv@ü ¢m¡ésT`¢m;y` # # 3 dþkªÙþºþºÙ³þrÙ))`ýßýÁ¸þHJþqºÿF3` %#!3##s¹ŴϺ¸¨û ºr¨üXºd^537676=3#"'&'&º¹EBpW]bººII2C7–t” qíç„YU 4 AÞÂû¢+''^wÕº` %!#!#!# þi¹Zºþi¹¸¨û `üXsºÿFã`33#5!3!3!ZºÏ´ú‹¹—¹—`üXþŽº`üXsüÄ`%#!5!32&'&+32767654Õi9N4 3=j¦¶U-"Nž"KgvmL B!Á¢þTÙ5þ¤6GRº`(3##!332&'+32767654f¹¹þŒh9N1 4:-:0=þf¹®‰==k&¦¶T-"N`û ž"KexmJA `þTÙ5þ¤7FQºà`$#!332&'+32767654òh9N1 4:-:0=þf¹®‰==k&¦¶T-"Nž"KexmJA `þTÙ5þ¤7FQqÿãç{"632!!#"'3 76'&´¦¡šæ\" þ4Ô žUxž“½ ”‡—”{F¬V´AWô^3VªH¬žºÿãZ{%4/&#"3276%67632 '&'##3˜jMm³S9oQ³T9üÂr†ó󆉉‡þ‡xå¹¹/ßv@¢m¡êsS¢mûÔ‚œœ›ýÖ›œœ‰áþ`þ)qß`&;#"&'&74567676763!##"'#²=j¦¶U-"N?,N2 4:Lˆ™¸® 0êÎ…5\6GRâ8gvoJ A"û ¬þQÿÿqÿãf&;Cáÿÿqÿã&;jÿîýÏd%+532765# ##5353!!676Ýy`QâkV—&3øþ¿¹Ì̹lþ”U‡C! þRýÃr`›2B†à=þžýáœjjœþJ†.ÿÿºžf&9v qÿãç{2&#"!!327# '&76¤¦¡šæ\" Ìþ, žUxž“¼þ󔆗•{F¬V´AWô^3VªH­žoÿãÇ{+2&# #"'52327654'&/&'&5476%Ô’š¶þî1.—?ÅPT¬u®®Ûï À935¨@ÂH9È`{<®P¨?%##+INнX=F¾c\",L'*#)YGrØM%Áy3#3#Á¸¸¸¸`û éÿÿÿôF&ÓjÿÿÛþVy 3+5327653#Á¸zPŽF1h(%¸¸`ûŒÿ[;œ13–(éÿî;` )6/&+3276%+532765!32#š4/8NNaCÿÿFþV‰H&þXIºÿd` %#!35!#s¹y¹xº¸¨û ðð`üXÿÿD¦à'C¸z:ÿÿV5k'C ZÿÿD¦â'v5|:ÿÿV5m'v†ZÿÿD¦4'jõ$:ÿÿV5¿'jEÿ¯Zÿÿÿüçà'C5z<ÿÿ=þVk&C!\éy¶©é/Æ1üì0!!üyéyµ©/Ì1Ôì0!!øy®éÓÕ@ žÜüÔÌ1ôì0#53Ó¤Ré­?þÁ²þ×Õ@ žqÜìÔÌ1ôì03#Ó¤RÕ˜þÁ?®ÿÓþ@ žƒÔìÔÌ1üì0%3#Ó¤Rþ¬þÀ@®émÕ '@ž   ÜüÌÔÌþÔÎ1ô<ì20#53#53Ó¤RšÓ¤Ré­?þÁ­­?þÁ®émÕ '@ ž  ÜìÔÌÜîÔÎ1ô<ì203#%3#Ó¤RšÓ¤RÕ¬þÀ@¬¬þÀ@®ÿmþ '@ žƒ   ÜìÔÌÜîÔÎ1ü<ì20%3#%3#šÓ¤RþfÓ¤Rþ¬þÀ@¬¬þÀ@9ÿ;ÇÕ '@¹  YW Y Ô<ìü<ì1äôÔ<ì203!!#!5!¨°oþ‘°þ‘oÕþ\™û£]™9ÿ;ÇÕ>@ ¹¹  ÂY W Y Ô<<ì2ü<<ì21äôÄ2Ä2î2î20%!#!5!!5!3!!!Çþ‘°þ‘oþ‘o°oþ‘oßþ\¤š™¤þ\™ýá3Ñ…! · Ç \ Ôì1Ôì04632#"&3­~|«¬}}¬ú|««|}¬¬ìþ #@ƒ   ÔüÔìÔì1/<<ì220%3#%3#%3#–ÔÔ©ÕÕú­ÕÕþþþþþþqÿã Lð #'3?K®@D$%&%&'$'B@’ .’(’F’4 :&Œ$‘L%IC'1+C =  1 =I 7+ ! LüäìÔÄìäîîöîî991ä2ô<<ä2ì2îöîî20KSXííY"K°TK° T[K° T[K° T[K° T[K°T[X½L@LLÿÀ878Y"32654&'2#"&5462#"&546!3#"32654&2#"&546"32654&ôWddWUccUžº» º»ùtž¼»ŸŸ¹º% üZ VcbWWcd²žº» º»ŸWccWUcc‘”„‚••‚ƒ•Ü»»ÛÛ»¼ÛàÛ»½ÚÛ¼ºÜùóŽ•‚„””„–ýŸÜ»»ÛÛ»¼Û”„‚••‚ƒ•žs#G@%èèèèBç¦onüì291ôì90KSXííííY" 5sþÓ-þ+#¿þôþô¿¢RÁ–#I@&èèèèBç¦opü<ì91ôì90KSXííííY"5 ÁÕþ+-þÓ#þ^Rþ^¿  ÿãð1@: Ó"+Ó ¡®•¡®•/‘Œ) 2+"!)#&  , & &*!/<ÔÄ2üÄÄ99999999991Ä2äôìôìîöîî2Ý<î20K° TK° T[K° T[K°T[K°T[K°T[X½2ÿÀ22@878Y@z  1Ti lnooooiko o!o"o#n$l%i'i-ŸŸŸ Ÿ Ÿ Ÿ Ÿ ŸŸŸŸŸŸ–Ÿ Ÿ!Ÿ"Ÿ#Ÿ$Ÿ%Ÿ&Ÿ'Ÿ(Ÿ)Ÿ*Ÿ+Ÿ,-2   USjg ]].#"!!!!3267#"#734&5465#7332[©fÊ A7ýæ¾8þŠ Êf©[Y¹`íþË(Ó7‹Â7œ(6ìb¹bÕiZÈ»{.# .{»ÊZiÓHH"{/ #/{"G'“FÕ >@!  É  b b cbcÔäüäÔìÔì91ô<<ì2Ô<<Ä903#######5J®¤ªqÃ7ËrqËrÉÕÿý¾äþÑ/þB^þä^hÿçÁ-)b@'! '!Õ* $$*ÔÌÜÌ9991äÌÜÌÎÎ990K° TK° T[K°T[K°T[K°T[X½*@**ÿÀ878Y>54&#"#"&54632#"&54324&#"32ôIH7$$0e´ÖþßÕ˜ËÝ¢e‚ WOmVPmmW£Kƒt,>bþÊþùþ±þFØ£Æ[àt}þþÏt{ÿú`Á8@ÔÌ91/ÄÌ90@cmpxyvn]] !3!¬þ^DýïàCúšîûÄú?œþwqÁ@×Ö¯ggÔìÔì1üìì20!#!#œÕðý ïÁø¶}ùƒþw;Á ]@    ÔÄ91ÄÔÌÎ990@0QVPZ spvupz €€ Z pp{ t €€ ]]!! !!5 7êüA ýJïúÞÕýIÁÁý3ýÀ•!ãÙ-Û×¶œÔÄ1Ôì0!!Ùúþתþ‰ÿãÍð+@BŒ‘ÔÌ1ää0KSXííY"3#- ü\ ðùóÛH®F·ƒÔì1Ôì03#ÛÓÓFþ=ÿ×} *@    ÔÌ91ÔÌÄ903##'%\½sý®BþÁ}}`ùºs-Pbý;ÝÝÏî /ÿ@- !$'!!0 $*0ÔÄÔÄ99991ÔÄÔÄÀ9990@¾     $$$   $$ $ ***///***55500055 5 :::???:::EEE@@@EE E JJJOOOJJJV´° °!°"°&°'°(´)]]32654&#".#"326#"&54632>32#"&“1†Te€vYR…Ä1…UfvYR†F^ˆº§†_™HDža†¼§†^•/XZ‡ie†‡7XX„je†ˆ‡ߦ¯Ø~ŠŠƒá§¯Öw/þú%&@ Û Ûܱ& iji&Üìüì1üìÜäÞä026732#"&'.#" #"&546327j ¾ÊPd@7*8  k½ÄOeD=!0 þú°l9¼TA6?&#Hý•Ánþ!þbSA8?SÙÛô;?@.9*-" *œ19œ"œ œ<-<Ô<Ä21ÔìÔìÜüÔìÀ9999990#"'&'&'&#"5>32326#"'&'&'&#"5>32326Ûi³an’ ›^X¬bi³an“ ›^V©gi³an’ ›^X¬bi³an“ ›^V©o³NE;=LT³NE;=KÚ²OE;=LS²NE;=KÙ'ÛÝ>@" Ïœ Ï œ  Ü<Ä291Ô<Ì2ü<ìþ<ì990!!!!!'7!5!7!Ù}®/þHÃ{üúþþ}®þÕ¶Ãý‡¢;fÕ¨ðªþÇfÓªðÙÛ¨ T@.œœœœBѧœ $# ü<ì2291/ìôì90KSXííííY" 5 !!Ûü@Àúþúþúþøþëþî²pªoüªÙÛ¨ V@/œœœœBѧœ$ # ü<<ì291/ìôì90KSXííííY"55 !5ÙúþÁAúþø°þ‘ªþ²ýǪªþ#îu"@ÔÌ91ÔÌ990 úþþôþ þ üÏüÇ9%ûÛûÓ-/J›@( ©‡¾±— ¼ Lü<Ä2Äü<Äî2991/<æ2îþîîî2990K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@0P€€€ Ðï]]#!##53546;#"3#J¹þ¹°°­³¹°cMù¹¹`û Ñü/ÑN·¯™Phc²é/J„@! © ‡— ¼   Lü<ÄÄü<Äî991/<æ2þîî2990K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@0P€ € € Ðï]!#!"!!##53546J¹þ·cM/þѹ°°®ùì{Phcü/ÑN»«ÍšÛ3#Çu™þˆ×)Ù¥@ ÎddÔüÜì1Ô<ì20K°TK°T[X½@ÿÀ878YK°TK° T[K°T[X½ÿÀ@878YK°TK°T[X½@ÿÀ878YK°TX½ÿÀ@878Y@````pppp]3#%3#^ËËþyËËÙËËËsîðö@BúÄÀ1ôÌ0KSXÉÉY"K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@ %%6FVjg //]]3#7¹ä™öþø¶Jéu@!  ÃÃúVV ÔìÔì99991ô<ìÔì2990K° TX½ÿÀ@878YK°TX½@ÿÀ878Y´ ]'.#"#4632326=3#"&ü9 $(}gV$=09" (}gT";9! 2-ev 3)dw î‹ö‰@BúÄÀ1ôÌ0KSXÉÉY"K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@*$$5CUUŸŸ¯¯//]]#ÇÄ™æöþøÏî1øw@ úÔÄ91ô<Ä90K° TX½ÿÀ@878YK°TX½@ÿÀ878YK°TX½ÿÀ@878Y@ //- ]3#'#¢¼Ó‹¦¦‹øþö²²Ïî1ø†@ úÔÄ91ôÄ290K° TK° T[K° T[K° T[X½ÿÀ@878YK°TX½@ÿÀ878YK°TX½ÿÀ@878Y@ "  ]373¢Ó‹¦¦‹Óî ²²þö?œôß Ô@ Ý ÷‘ ] ÜÔ<Äì291ôüÔ<ì290K°TK°T[K°T[K°T[K° T[K° T[X½@ÿÀ878YK°TK°T[X½ÿÀ@878Y@T /9IFYi‹«»       "5GK S[ e„¥µ]] !33##5!5ÝþË5¦‡‡þbfþ]ýämººyÇ9ø j@à úVVÔìÔì1ôüÄ20K° TX½ÿÀ@878YK°TX½@ÿÀ878YK°TK°T[X½ÿÀ@878Y332673#"&Çv cSRav  Ÿø6978w{zšfÛ¶úÔÌ1ôÌ03#šÌÌÛÍ-ž˜ $ÿÓ%ÿ·*K-r294K7ÿD9ÿˆ:ÿ­;ÿš<ÿ R&YÿÉ\ÿÜ‚ÿÓƒÿÓ„ÿÓ…ÿÓ†ÿÓ”9•9–9—9˜9Ÿÿ ´&µ&¶&·&¸&¿ÿÜÁÿÜÐKìÿDôÿ $ÿÓ$ÿÜ$ÿÜ$$9$&ÿÜ$*ÿÜ$2ÿÜ$4ÿÜ$7ÿa$9ÿ}$:ÿ$<ÿa$FÿÜ$GÿÜ$HÿÜ$Iÿ·$RÿÜ$TÿÜ$WÿÜ$Yÿˆ$Zÿ­$\ÿu$mÿ·$‚9$ƒ9$„9$…9$†9$‰ÿÜ$”ÿÜ$•ÿÜ$–ÿÜ$—ÿÜ$˜ÿÜ$Ÿÿa$©ÿÜ$ªÿÜ$«ÿÜ$¬ÿÜ$­ÿÜ$´ÿÜ$µÿÜ$¶ÿÜ$·ÿÜ$¸ÿÜ$¿ÿu$Áÿu$ÄÿÜ$ÅÿÜ$ÆÿÜ$ÇÿÜ$ÉÿÜ$ÏÿÜ$ÐÿÜ$ìÿa$íÿÜ$ôÿa$sþø$tÿ$u/%&ÿÜ%*ÿÜ%2ÿÜ%6ÿÜ%9ÿÁ%:ÿ·%<ÿ%mÿÁ%}ÿÜ%‰ÿÜ%”ÿÜ%•ÿÜ%–ÿÜ%—ÿÜ%˜ÿÜ%Ÿÿ%ÄÿÜ%ÆÿÜ%ÐÿÜ%èÿÜ%êÿÜ%ôÿ%sÿ%tÿ%uÿ­&<ÿÜ&mÿÜ&}ÿÜ&ŸÿÜ&ôÿÜ&t&'$ÿÜ'9ÿÜ'<ÿ'mÿÜ'}ÿÜ'‚ÿÜ'ƒÿÜ'„ÿÜ'…ÿÜ'†ÿÜ'Ÿÿ'ôÿ'sÿÓ'tÿÉ'uÿD)þ·)ÿa)$ÿD)6ÿÜ)7ÿÜ)DÿD)Hÿ)Lÿk)Rÿ·)Uÿk)Xÿ)\ÿD)‚ÿD)ƒÿD)„ÿD)…ÿD)†ÿD)¢ÿD)£ÿD)¤ÿD)¥ÿD)¦ÿD)§ÿD)ªÿ)«ÿ)¬ÿ)­ÿ)´ÿ·)µÿ·)¶ÿ·)·ÿ·)¸ÿ·)»ÿ)¼ÿ)½ÿ)¾ÿ)¿ÿD)ÁÿD)Ïÿ)ãÿk)åÿk)èÿÜ)êÿÜ)ìÿÜ)ïÿ)sÿÓ)uþˆ*7ÿ·*<ÿš*mÿÜ*}ÿÜ*Ÿÿš*ìÿ·*ôÿš*sÿÓ*tÿÓ*uÿÉ+ÿÜ+sÿ·+tÿÁ+uÿ·-ÿ·-$ÿÜ-mÿÜ-}ÿÜ-‚ÿÜ-ƒÿÜ-„ÿÜ-…ÿÜ-†ÿÜ-sÿ·-tÿÁ-uÿ.ÿ).$ÿÜ.&ÿ.2ÿ.7ÿa.8ÿÉ.:ÿ·.<ÿ·.DÿÜ.Hÿš.Rÿš.Xÿš.\ÿk.mÿ}.‚ÿÜ.ƒÿÜ.„ÿÜ.…ÿÜ.†ÿÜ.‰ÿ.”ÿ.•ÿ.–ÿ.—ÿ.˜ÿ.›ÿÉ.œÿÉ.ÿÉ.žÿÉ.Ÿÿ·.¢ÿÜ.£ÿÜ.¤ÿÜ.¥ÿÜ.¦ÿÜ.§ÿÜ.ªÿš.«ÿš.¬ÿš.­ÿš.´ÿš.µÿš.¶ÿš.·ÿš.¸ÿš.»ÿš.¼ÿš.½ÿš.¾ÿš.¿ÿk.Áÿk.Äÿ.Æÿ.Ïÿš.ìÿa.îÿÉ.ïÿš.ôÿ·.sÿÁ.tÿÁ/ÿÜ/$//2ÿ·/7þæ/8ÿš/9ÿ/:ÿD/<þð/HÿÜ/RÿÜ/XÿÜ/\ÿD/‚//ƒ//„//…//†//”ÿ·/•ÿ·/–ÿ·/—ÿ·/˜ÿ·/›ÿš/œÿš/ÿš/žÿš/Ÿþð/ªÿÜ/«ÿÜ/¬ÿÜ/­ÿÜ/´ÿÜ/µÿÜ/¶ÿÜ/·ÿÜ/¸ÿÜ/»ÿÜ/¼ÿÜ/½ÿÜ/¾ÿÜ/¿ÿD/ÁÿD/ÏÿÜ/ìþæ/îÿš/ïÿÜ/ôþð/sþa/týæ292ÿ­2ÿÜ2$ÿÜ29ÿÜ2;ÿ}2<ÿ2mÿÜ2‚ÿÜ2ƒÿÜ2„ÿÜ2…ÿÜ2†ÿÜ2Ÿÿ2ôÿ2sÿÓ2tÿÜ2uÿD3ÿÓ3þÁ3$ÿ}3<ÿÓ3Dÿ¤3Hÿ·3LÿÓ3QÿÜ3Rÿ·3UÿÜ3VÿÜ3XÿÜ3mÿÜ3‚ÿ}3ƒÿ}3„ÿ}3…ÿ}3†ÿ}3ŸÿÓ3¢ÿ¤3£ÿ¤3¤ÿ¤3¥ÿ¤3¦ÿ¤3§ÿ¤3ªÿ·3«ÿ·3¬ÿ·3­ÿ·3³ÿÜ3´ÿ·3µÿ·3¶ÿ·3·ÿ·3¸ÿ·3»ÿÜ3¼ÿÜ3½ÿÜ3¾ÿÜ3Ïÿ·3ßÿÜ3ãÿÜ3åÿÜ3éÿÜ3ëÿÜ3ïÿÜ3ôÿÓ3s&3t&3uþ·494sÿÓ4tÿÜ4uÿ}5ÿ­5ÿ·5ÿÁ5$ÿ­5&ÿš57ÿk59ÿ5:ÿ­5<ÿ}5DÿÓ5Hÿ¤5Rÿ¤5Xÿ¤5\ÿ5mÿ5}ÿÜ5‚ÿ­5ƒÿ­5„ÿ­5…ÿ­5†ÿ­5‰ÿš5Ÿÿ}5¢ÿÓ5£ÿÓ5¤ÿÓ5¥ÿÓ5¦ÿÓ5§ÿÓ5ªÿ¤5«ÿ¤5¬ÿ¤5­ÿ¤5´ÿ¤5µÿ¤5¶ÿ¤5·ÿ¤5¸ÿ¤5»ÿ¤5¼ÿ¤5½ÿ¤5¾ÿ¤5¿ÿ5Áÿ5Äÿš5Æÿš5Ïÿ¤5ìÿk5ïÿ¤5ôÿ}5sÿk5tÿ}5uÿÜ6$&6‚&6ƒ&6„&6…&6†&7ÿD7ÿ 7ÿ7$ÿa7&ÿˆ77ÿÜ7Dþ­7Fþ¤7Hþ¤7LÿÁ7Rþ¤7UþÓ7Vþ­7XþÉ7Zþ­7\þÁ7mÿD7}ÿ7‚ÿa7ƒÿa7„ÿa7…ÿa7†ÿa7‰ÿˆ7¢þ­7£þ­7¤þ­7¥þ­7¦þ­7§þ­7©þ¤7ªþ¤7«þ¤7¬þ¤7­þ¤7´þ¤7µþ¤7¶þ¤7·þ¤7¸þ¤7»þÉ7¼þÉ7½þÉ7¾þÉ7¿þÁ7ÁþÁ7Äÿˆ7Åþ¤7Æÿˆ7Çþ¤7Ïþ¤7ãþÓ7åþÓ7éþ­7ëþ­7ìÿÜ7ïþÉ7tÿÓ7uþø8=ÿÜ8ùÿÜ9ÿˆ9þø9ÿY9$ÿ}92ÿÜ9Dÿa9Hÿa9LÿÓ9Rÿa9Xÿu9\ÿÉ9mÿN9}ÿ9‚ÿ}9ƒÿ}9„ÿ}9…ÿ}9†ÿ}9”ÿÜ9•ÿÜ9–ÿÜ9—ÿÜ9˜ÿÜ9¢ÿa9£ÿa9¤ÿa9¥ÿa9¦ÿa9§ÿa9ªÿa9«ÿa9¬ÿa9­ÿa9´ÿa9µÿa9¶ÿa9·ÿa9¸ÿa9»ÿu9¼ÿu9½ÿu9¾ÿu9¿ÿÉ9ÁÿÉ9Ïÿa9ïÿu9uþæ:ÿ­:ÿ:ÿˆ:$ÿ:Dÿ}:Hÿˆ:LÿÓ:Rÿˆ:Uÿ¤:Xÿ·:\ÿÜ:mÿ:}ÿÜ:‚ÿ:ƒÿ:„ÿ:…ÿ:†ÿ:¢ÿ}:£ÿ}:¤ÿ}:¥ÿ}:¦ÿ}:§ÿ}:ªÿˆ:«ÿˆ:¬ÿˆ:­ÿˆ:´ÿˆ:µÿˆ:¶ÿˆ:·ÿˆ:¸ÿˆ:»ÿ·:¼ÿ·:½ÿ·:¾ÿ·:¿ÿÜ:ÁÿÜ:Ïÿˆ:ãÿ¤:åÿ¤:ïÿ·:sÿÜ:uþø;ÿš;&ÿk;2ÿ};7ÿÜ;Hÿ¤;mÿ;‰ÿk;”ÿ};•ÿ};–ÿ};—ÿ};˜ÿ};ªÿ¤;«ÿ¤;¬ÿ¤;­ÿ¤;Äÿk;Æÿk;Ïÿ¤;ìÿÜ;sÿa;tÿ­;uÿÓ<ÿ <þa<þð<$ÿa<&ÿ<2ÿ<Dþæ<Hþð<Lÿ·<Rþð<Xÿ<mÿ<}ÿk<‚ÿa<ƒÿa<„ÿa<…ÿa<†ÿa<‰ÿ<”ÿ<•ÿ<–ÿ<—ÿ<˜ÿ<¢þæ<£þæ<¤þæ<¥þæ<¦þæ<§þæ<ªþð<«þð<¬þð<­þð<´þð<µþð<¶þð<·þð<¸þð<»ÿ<¼ÿ<½ÿ<¾ÿ<Äÿ<Æÿ<Ïþð<ïÿ<sÿ<tÿÜ<uþø=ÿÜ=sÿÜ=tÿÜ=uÿÜH[ÿÜIÿIÿkIÿ·IWÿÜIZÿÜI\ÿÜImÿ·I}ÿÜI¿ÿÜIÁÿÜIíÿÜIsAIuÿNDÿÜNHÿ·NRÿ·NXÿÁN\ÿ·N¢ÿÜN£ÿÜN¤ÿÜN¥ÿÜN¦ÿÜN§ÿÜNªÿ·N«ÿ·N¬ÿ·N­ÿ·N´ÿ·Nµÿ·N¶ÿ·N·ÿ·N¸ÿ·N»ÿÁN¼ÿÁN½ÿÁN¾ÿÁN¿ÿ·NÁÿ·NÏÿ·NïÿÁQsÿkQtÿQuÿ¤R&RÿÜR[ÿÁRsÿkRtÿ·Ruÿ}Uÿ}UÿDUÿÜUFÿÓUGÿÜUHÿÓUJÿÜUKÿÜUPÿÜUQÿÜURÿÓUTÿÜUUÿÜU[ÿÉUmÿ·U©ÿÓUªÿÓU«ÿÓU¬ÿÓU­ÿÓU³ÿÜU´ÿÓUµÿÓU¶ÿÓU·ÿÓU¸ÿÓUÅÿÓUÇÿÓUÉHUÏÿÓUÑÿÜUßÿÜUãÿÜUåÿÜUtVUuþÉYÿÉYÿaYÿYmÿÜY}ÿÜYtÿÜYuþðZÿDZÿZmÿÜZ}ÿÜZuÿ)[FÿÜ[HÿÁ[RÿÁ[©ÿÜ[ªÿÁ[«ÿÁ[¬ÿÁ[­ÿÁ[´ÿÁ[µÿÁ[¶ÿÁ[·ÿÁ[¸ÿÁ[ÅÿÜ[ÇÿÜ[ÏÿÁ\ÿÜ\þÜ\ÿk\mÿÜ\}ÿÜ\uþÓm%ÿÜm&ÿÜm'ÿÜm*ÿÜm-ÿÜm7ÿm9ÿm:ÿÜm<ÿkmYÿÜmZÿÜm\ÿÜmˆ—m‰ÿÜmŸÿkm¿ÿÜmÁÿÜmÄÿÜmÆÿÜmÈÿÜmÐÿÜmìÿmôÿk}$ÿ·}%ÿ·}&ÿÜ}'ÿÜ}-ÿÜ}2ÿÜ}7ÿD}9ÿN}:ÿ};ÿ}<ÿ}YÿÜ}ZÿÜ}\ÿÜ}‚ÿ·}ƒÿ·}„ÿ·}…ÿ·}†ÿ·}‰ÿÜ}”ÿÜ}•ÿÜ}–ÿÜ}—ÿÜ}˜ÿÜ}Ÿÿ}¿ÿÜ}ÁÿÜ}ÄÿÜ}ÆÿÜ}ÈÿÜ}ìÿD}ôÿ‚ÿÓ‚ÿÜ‚ÿÜ‚$9‚&ÿÜ‚*ÿÜ‚2ÿÜ‚4ÿÜ‚7ÿa‚9ÿ}‚:ÿ‚<ÿa‚FÿÜ‚GÿÜ‚HÿÜ‚Iÿ·‚RÿÜ‚TÿÜ‚WÿÜ‚Yÿˆ‚Zÿ­‚\ÿu‚mÿ·‚‚9‚ƒ9‚„9‚…9‚†9‚‰ÿÜ‚”ÿÜ‚•ÿÜ‚–ÿÜ‚—ÿÜ‚˜ÿÜ‚Ÿÿa‚©ÿÜ‚ªÿÜ‚«ÿÜ‚¬ÿÜ‚­ÿÜ‚´ÿÜ‚µÿÜ‚¶ÿÜ‚·ÿÜ‚¸ÿÜ‚¿ÿu‚Áÿu‚ÄÿÜ‚ÅÿÜ‚ÆÿÜ‚ÇÿÜ‚ÉÿÜ‚ÏÿÜ‚ÐÿÜ‚ìÿa‚íÿÜ‚ôÿa‚sþø‚tÿ‚u/ƒÿÓƒÿ܃ÿ܃$9ƒ&ÿ܃*ÿ܃2ÿ܃4ÿ܃7ÿaƒ9ÿ}ƒ:ÿƒ<ÿaƒFÿ܃Gÿ܃Hÿ܃Iÿ·ƒRÿ܃Tÿ܃Wÿ܃YÿˆƒZÿ­ƒ\ÿuƒmÿ·ƒ‚9ƒƒ9ƒ„9ƒ…9ƒ†9ƒ‰ÿ܃”ÿ܃•ÿ܃–ÿ܃—ÿ܃˜ÿ܃Ÿÿaƒ©ÿ܃ªÿ܃«ÿ܃¬ÿ܃­ÿ܃´ÿ܃µÿ܃¶ÿ܃·ÿ܃¸ÿ܃¿ÿuƒÁÿuƒÄÿ܃Åÿ܃Æÿ܃Çÿ܃Éÿ܃Ïÿ܃Ðÿ܃ìÿaƒíÿ܃ôÿaƒsþøƒtÿƒu/„ÿÓ„ÿÜ„ÿÜ„$9„&ÿÜ„*ÿÜ„2ÿÜ„4ÿÜ„7ÿa„9ÿ}„:ÿ„<ÿa„FÿÜ„GÿÜ„HÿÜ„Iÿ·„RÿÜ„TÿÜ„WÿÜ„Yÿˆ„Zÿ­„\ÿu„mÿ·„‚9„ƒ9„„9„…9„†9„‰ÿÜ„”ÿÜ„•ÿÜ„–ÿÜ„—ÿÜ„˜ÿÜ„Ÿÿa„©ÿÜ„ªÿÜ„«ÿÜ„¬ÿÜ„­ÿÜ„´ÿÜ„µÿÜ„¶ÿÜ„·ÿÜ„¸ÿÜ„¿ÿu„Áÿu„ÄÿÜ„ÅÿÜ„ÆÿÜ„ÇÿÜ„ÉÿÜ„ÏÿÜ„ÐÿÜ„ìÿa„íÿÜ„ôÿa„sþø„tÿ„u/…ÿÓ…ÿÜ…ÿÜ…$9…&ÿÜ…*ÿÜ…2ÿÜ…4ÿÜ…7ÿa…9ÿ}…:ÿ…<ÿa…FÿÜ…GÿÜ…HÿÜ…Iÿ·…RÿÜ…TÿÜ…WÿÜ…Yÿˆ…Zÿ­…\ÿu…mÿ·…‚9…ƒ9…„9……9…†9…‰ÿÜ…”ÿÜ…•ÿÜ…–ÿÜ…—ÿÜ…˜ÿÜ…Ÿÿa…©ÿÜ…ªÿÜ…«ÿÜ…¬ÿÜ…­ÿÜ…´ÿÜ…µÿÜ…¶ÿÜ…·ÿÜ…¸ÿÜ…¿ÿu…Áÿu…ÄÿÜ…ÅÿÜ…ÆÿÜ…ÇÿÜ…ÉÿÜ…ÏÿÜ…ÐÿÜ…ìÿa…íÿÜ…ôÿa…sþø…tÿ…u/†ÿÓ†ÿ܆ÿ܆$9†&ÿ܆*ÿ܆2ÿ܆4ÿ܆7ÿa†9ÿ}†:ÿ†<ÿa†Fÿ܆Gÿ܆Hÿ܆Iÿ·†Rÿ܆Tÿ܆Wÿ܆Yÿˆ†Zÿ­†\ÿu†mÿ·†‚9†ƒ9†„9†…9††9†‰ÿ܆”ÿ܆•ÿ܆–ÿ܆—ÿ܆˜ÿ܆Ÿÿa†©ÿ܆ªÿ܆«ÿ܆¬ÿ܆­ÿ܆´ÿ܆µÿ܆¶ÿ܆·ÿ܆¸ÿ܆¿ÿu†Áÿu†Äÿ܆Åÿ܆Æÿ܆Çÿ܆Éÿ܆Ïÿ܆Ðÿ܆ìÿa†íÿ܆ôÿa†sþø†tÿ†u/ˆsÿ­ˆtÿ¤ˆuÿ‰<ÿ܉mÿ܉}ÿ܉Ÿÿ܉ôÿ܉t&”9”ÿ­”ÿÜ”$ÿÜ”9ÿÜ”;ÿ}”<ÿ”mÿÜ”‚ÿÜ”ƒÿÜ”„ÿÜ”…ÿÜ”†ÿÜ”Ÿÿ”ôÿ”sÿÓ”tÿÜ”uÿD•9•ÿ­•ÿÜ•$ÿÜ•9ÿÜ•;ÿ}•<ÿ•mÿÜ•‚ÿÜ•ƒÿÜ•„ÿÜ•…ÿÜ•†ÿÜ•Ÿÿ•ôÿ•sÿÓ•tÿÜ•uÿD–9–ÿ­–ÿÜ–$ÿÜ–9ÿÜ–;ÿ}–<ÿ–mÿÜ–‚ÿÜ–ƒÿÜ–„ÿÜ–…ÿÜ–†ÿÜ–Ÿÿ–ôÿ–sÿÓ–tÿÜ–uÿD—9—ÿ­—ÿÜ—$ÿÜ—9ÿÜ—;ÿ}—<ÿ—mÿÜ—‚ÿÜ—ƒÿÜ—„ÿÜ—…ÿÜ—†ÿÜ—Ÿÿ—ôÿ—sÿÓ—tÿÜ—uÿD˜9˜ÿ­˜ÿܘ$ÿܘ9ÿܘ;ÿ}˜<ÿ˜mÿܘ‚ÿܘƒÿܘ„ÿܘ…ÿܘ†ÿܘŸÿ˜ôÿ˜sÿÓ˜tÿܘuÿD›=ÿÜ›ùÿÜœ=ÿÜœùÿÜ=ÿÜùÿÜž=ÿÜžùÿÜŸÿ ŸþaŸþðŸ$ÿaŸ&ÿŸ2ÿŸDþæŸHþðŸLÿ·ŸRþðŸXÿŸmÿŸ}ÿkŸ‚ÿaŸƒÿaŸ„ÿaŸ…ÿaŸ†ÿaŸ‰ÿŸ”ÿŸ•ÿŸ–ÿŸ—ÿŸ˜ÿŸ¢þ柣þ柤þ查þ柦þ柧þ柪þðŸ«þðŸ¬þðŸ­þðŸ´þðŸµþðŸ¶þðŸ·þðŸ¸þðŸ»ÿŸ¼ÿŸ½ÿŸ¾ÿŸÄÿŸÆÿŸÏþðŸïÿŸsÿŸtÿÜŸuþø ÿk ÿ· sÿÜ uÿD¡&¡sÿ¡tÿ¡uÿ­ª[ÿÜ«[ÿܬ[ÿÜ­[ÿܲsÿ¤²tÿ²uÿ·³sÿk³tÿ³uÿ¤´&´ÿÜ´[ÿÁ´sÿk´tÿ·´uÿ}µ&µÿܵ[ÿÁµsÿkµtÿ·µuÿ}¶&¶ÿܶ[ÿÁ¶sÿk¶tÿ·¶uÿ}·&·ÿÜ·[ÿÁ·sÿk·tÿ··uÿ}¸&¸ÿܸ[ÿÁ¸sÿk¸tÿ·¸uÿ}¿ÿÜ¿þÜ¿ÿk¿mÿÜ¿}ÿÜ¿uþÓÁÿÜÁþÜÁÿkÁmÿÜÁ}ÿÜÁuþÓÄ<ÿÜÄmÿÜÄ}ÿÜÄŸÿÜÄôÿÜÄt&Æ<ÿÜÆmÿÜÆ}ÿÜÆŸÿÜÆôÿÜÆt&È$ÿÜÈ9ÿÜÈ<ÿÈmÿÜÈ}ÿÜÈ‚ÿÜȃÿÜÈ„ÿÜÈ…ÿÜȆÿÜÈŸÿÈôÿÈsÿÓÈtÿÉÈuÿDÏ[ÿÜÐ7ÿ·Ð<ÿšÐmÿÜÐ}ÿÜПÿšÐìÿ·ÐôÿšÐsÿÓÐtÿÓÐuÿÉÔÿÜÔ$/Ô2ÿ·Ô7þæÔ8ÿšÔ9ÿÔ:ÿDÔ<þðÔHÿÜÔRÿÜÔXÿÜÔ\ÿDÔ‚/Ôƒ/Ô„/Ô…/Ô†/Ô”ÿ·Ô•ÿ·Ô–ÿ·Ô—ÿ·Ô˜ÿ·Ô›ÿšÔœÿšÔÿšÔžÿšÔŸþðÔªÿÜÔ«ÿÜÔ¬ÿÜÔ­ÿÜÔ´ÿÜÔµÿÜÔ¶ÿÜÔ·ÿÜÔ¸ÿÜÔ»ÿÜÔ¼ÿÜÔ½ÿÜÔ¾ÿÜÔ¿ÿDÔÁÿDÔÏÿÜÔìþæÔîÿšÔïÿÜÔôþðÔsþaÔtýæÖÿÜÖ$/Ö2ÿ·Ö7þæÖ8ÿšÖ9ÿÖ:ÿDÖ<þðÖHÿÜÖRÿÜÖXÿÜÖ\ÿDÖ‚/Öƒ/Ö„/Ö…/Ö†/Ö”ÿ·Ö•ÿ·Ö–ÿ·Ö—ÿ·Ö˜ÿ·Ö›ÿšÖœÿšÖÿšÖžÿšÖŸþðÖªÿÜÖ«ÿÜÖ¬ÿÜÖ­ÿÜÖ´ÿÜÖµÿÜÖ¶ÿÜÖ·ÿÜÖ¸ÿÜÖ»ÿÜÖ¼ÿÜÖ½ÿÜÖ¾ÿÜÖ¿ÿDÖÁÿDÖÏÿÜÖìþæÖîÿšÖïÿÜÖôþðÖsþaÖtýæÙOÿ?ßsÿkßtÿßuÿ¤âÿ­âÿ·âÿÁâ$ÿ­â&ÿšâ7ÿkâ9ÿâ:ÿ­â<ÿ}âDÿÓâHÿ¤âRÿ¤âXÿ¤â\ÿâmÿâ}ÿÜâ‚ÿ­âƒÿ­â„ÿ­â…ÿ­â†ÿ­â‰ÿšâŸÿ}â¢ÿÓâ£ÿÓâ¤ÿÓâ¥ÿÓâ¦ÿÓâ§ÿÓâªÿ¤â«ÿ¤â¬ÿ¤â­ÿ¤â´ÿ¤âµÿ¤â¶ÿ¤â·ÿ¤â¸ÿ¤â»ÿ¤â¼ÿ¤â½ÿ¤â¾ÿ¤â¿ÿâÁÿâÄÿšâÆÿšâÏÿ¤âìÿkâïÿ¤âôÿ}âsÿkâtÿ}âuÿÜãÿ}ãÿDãÿÜãFÿÓãGÿÜãHÿÓãJÿÜãKÿÜãPÿÜãQÿÜãRÿÓãTÿÜãUÿÜã[ÿÉãmÿ·ã©ÿÓãªÿÓã«ÿÓã¬ÿÓã­ÿÓã³ÿÜã´ÿÓãµÿÓã¶ÿÓã·ÿÓã¸ÿÓãÅÿÓãÇÿÓãÉHãÏÿÓãÑÿÜãßÿÜããÿÜãåÿÜãtVãuþÉäÿ­äÿ·äÿÁä$ÿ­ä&ÿšä7ÿkä9ÿä:ÿ­ä<ÿ}äDÿÓäHÿ¤äRÿ¤äXÿ¤ä\ÿämÿä}ÿÜä‚ÿ­äƒÿ­ä„ÿ­ä…ÿ­ä†ÿ­ä‰ÿšäŸÿ}ä¢ÿÓä£ÿÓä¤ÿÓä¥ÿÓä¦ÿÓä§ÿÓäªÿ¤ä«ÿ¤ä¬ÿ¤ä­ÿ¤ä´ÿ¤äµÿ¤ä¶ÿ¤ä·ÿ¤ä¸ÿ¤ä»ÿ¤ä¼ÿ¤ä½ÿ¤ä¾ÿ¤ä¿ÿäÁÿäÄÿšäÆÿšäÏÿ¤äìÿkäïÿ¤äôÿ}äsÿkätÿ}äuÿÜåÿ}åÿDåÿÜåFÿÓåGÿÜåHÿÓåJÿÜåKÿÜåPÿÜåQÿÜåRÿÓåTÿÜåUÿÜå[ÿÉåmÿ·å©ÿÓåªÿÓå«ÿÓå¬ÿÓå­ÿÓå³ÿÜå´ÿÓåµÿÓå¶ÿÓå·ÿÓå¸ÿÓåÅÿÓåÇÿÓåÉÿÜåÏÿÓåÑÿÜåßÿÜåãÿÜååÿÜåtVåuþÉè$&è‚&èƒ&è„&è…&è†&ê$&ê‚&êƒ&ê„&ê…&ê†&ìÿDìÿ ìÿì$ÿaì&ÿˆì7ÿÜìDþ­ìFþ¤ìHþ¤ìLÿÁìRþ¤ìUþÓìVþ­ìXþÉìZþ­ì\þÁìmÿDì}ÿì‚ÿaìƒÿaì„ÿaì…ÿaì†ÿaì‰ÿˆì¢þ­ì£þ­ì¤þ­ì¥þ­ì¦þ­ì§þ­ì©þ¤ìªþ¤ì«þ¤ì¬þ¤ì­þ¤ì´þ¤ìµþ¤ì¶þ¤ì·þ¤ì¸þ¤ì»þÉì¼þÉì½þÉì¾þÉì¿þÁìÁþÁìÄÿˆìÅþ¤ìÆÿˆìÇþ¤ìÏþ¤ìãþÓìåþÓìéþ­ìëþ­ììÿÜìïþÉìtÿÓìuþøî=ÿÜîùÿÜôÿ ôþaôþðô$ÿaô&ÿô2ÿôDþæôHþðôLÿ·ôRþðôXÿômÿô}ÿkô‚ÿaôƒÿaô„ÿaô…ÿaô†ÿaô‰ÿô”ÿô•ÿô–ÿô—ÿô˜ÿô¢þæô£þæô¤þæô¥þæô¦þæô§þæôªþðô«þðô¬þðô­þðô´þðôµþðô¶þðô·þðô¸þðô»ÿô¼ÿô½ÿô¾ÿôÄÿôÆÿôÏþðôïÿôsÿôtÿÜôuþøùÿÜùsÿÜùtÿÜùuÿÜs$þøs%ÿÁs&ÿ·s'ÿÁs)ÿÁs*ÿ·s+ÿÁs-ÿÁs.ÿÁs/ÿÁs2ÿ·s3ÿÁs4ÿ·s5ÿÁs;ÿˆs=ÿÜsIÿ·sQÿsRÿksUÿsYÿ·sZÿ·s\ÿ·s‚þøsƒþøs„þøs…þøs†þøsˆþ}s‰ÿ·s”ÿ·s•ÿ·s–ÿ·s—ÿ·s˜ÿ·s ÿÁs¡ÿÁs²ÿ·s³ÿs´ÿksµÿks¶ÿks·ÿks¸ÿks¿ÿ·sÁÿ·sÄÿ·sÆÿ·sÈÿÁsÐÿ·sÔÿÁsÖÿÁsßÿsâÿÁsãÿsäÿÁsåÿsùÿÜu$&u%ÿ·u&ÿu'ÿ·u)ÿ·u*ÿ·u+ÿ·u-/u.ÿ·u/ÿ·u2ÿu3ÿ·u4ÿu5ÿ·u7þæu9þˆu:ÿu;ÿ·u<þˆuIÿÜuQÿ·uRÿ·uUÿ·uYÿuZÿ<u\ÿu‚&uƒ&u„&u…&u†&uˆ&u‰ÿu”ÿu•ÿu–ÿu—ÿu˜ÿuŸþˆu ÿ·u¡ÿ·u²ÿ·u³ÿ·u´ÿ·uµÿ·u¶ÿ·u·ÿ·u¸ÿ·u¿ÿuÁÿuÄÿuÆÿuÈÿ·uÐÿ·uÔÿ·uÖÿ·ußÿ·uâÿ·uãÿ·uäÿ·uåÿ·uìþæuôþˆ=âÚJn}¡BÅ+`Lß 0 þWmÜ bx • ¹!  A0®ý > ÿ W W ˆ¤+’ò a ’½<¥ k!ÖO¼$uøaÍ< ~œuàN Ú J n } ¡ BÅ + `L ß 0  þWCopyright (c) 2003 by Bitstream, Inc. All Rights Reserved. DejaVu changes by Stepan Roh are in public domain Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. DejaVu changes by Stepan Roh are in public domain DejaVu SansDejaVu SansBookBookDejaVu SansDejaVu SansDejaVu SansDejaVu SansVersion Release 1.10 (DejaVu 1.4)Version Release 1.10 (DejaVu 1.4)DejaVuSansDejaVuSansBitstream Vera is a trademark of Bitstream, Inc.Bitstream Vera is a trademark of Bitstream, Inc.Bitstream Inc.Bitstream Inc.http://www.bitstream.comhttp://www.bitstream.comCopyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the wCopyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the wLigaturesLigaturesLigaturenLegatureLigaturenFractionsFractionsBreukenAll Typographic FeaturesFonctions typographiquesAlle typografischen MšglichkeitenFunzioni TipograficheAlle typografische kenmerkenCommon LigaturesLigatures UsuellesNormale LigaturenLegature pi ComuniGemeenschappelijke LigaturenDiagonal FractionsFractions en DiagonaleDiagonaler BruchFrazioni DiagonaliDiagonale breukenAll Type FeaturesToutes fonctions typographiquesAlle AuszeichnungsartenTutte le FunzioniAlle typekenmerkenÿ+š  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a¬£„…½–膎‹©¤ŠÚƒ“òó—ˆÃÞñžªõôö¢­ÉÇ®bcdËeÈÊÏÌÍÎéfÓÐѯgð‘ÖÔÕhëí‰jikmln oqprsutvwêxzy{}|¸¡~€ìîºýþÿ   øùú×  âã°±ûüäå !"#»$%&'æç¦ØáÛÜÝàÙߟ›()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ²³¶·Ä´µÅ‚‡«Æ¾¿Œ˜¨š™ï¼Ã¥’œ§”•¹ÀÁ‘’“”•–—˜™š sfthyphenAogonekaogonekDcarondcaronDcroatEogonekeogonekEcaronecaronLacutelacuteLcaronlcaronLdotldotNacutenacuteNcaronncaronRacuteracuteRcaronrcaronSacutesacuteTcarontcaronUringuring Wcircumflex wcircumflex Ycircumflex ycircumflexZacutezacute Zdotaccent zdotaccentuni0400 afii10023 afii10051 afii10052 afii10053 afii10054 afii10055 afii10056 afii10057 afii10058 afii10059 afii10060 afii10061uni040D afii10062 afii10145 afii10017 afii10018 afii10019 afii10020 afii10021 afii10022 afii10024 afii10025 afii10026 afii10027 afii10028 afii10029 afii10030 afii10031 afii10032 afii10033 afii10034 afii10035 afii10036 afii10037 afii10038 afii10039 afii10040 afii10041 afii10042 afii10043 afii10044 afii10045 afii10046 afii10047 afii10048 afii10049 afii10065 afii10066 afii10067 afii10068 afii10069 afii10070 afii10072 afii10073 afii10074 afii10075 afii10076 afii10077 afii10078 afii10079 afii10080 afii10081 afii10082 afii10083 afii10084 afii10085 afii10086 afii10087 afii10088 afii10089 afii10090 afii10091 afii10092 afii10093 afii10094 afii10095 afii10096 afii10097uni0450 afii10071 afii10099 afii10100 afii10101 afii10102 afii10103 afii10104 afii10105 afii10106 afii10107 afii10108 afii10109uni045D afii10110 afii10193WgravewgraveWacutewacute Wdieresis wdieresisYgraveygraveEuro dlLtcaronc6459c6460c6461c6462c6463c6466c6467c6468c6469 Z7ijjkpqqruvvwyzz{}~€‚‡ˆˆ‰‘’’“˜™š›Ÿ ¡¢§¨¨©±²²³¸¹º»¿ÀÀÁÁÂÃÄÉÊÍÎÒÓÓÔÙÚÝÞßàáâåæçèïðóôôõøùúûýþxyyz}~~‰ŠŠ‹Ž™ 2XDFLTlatnÿÿÿÿfracligaliga 8l  y~072 (Øy OŽLÙy/IOJ 4 "„~„~€„€ ,latnÿÿkernÊXºH: ºø¶àò$Ü&ðØòàê ¨ ^ ¼ † ˜ ž Ô F T n  4 v îtfXJ<.<V ê4~ÈÒÜæðºÌÞäêðö,F`z”®Èâü:@j0öü àrHÚôüÐâÌ#$ÿÓ%ÿ·*K-r294K7ÿD9ÿˆ:ÿ­;ÿš<ÿ R&YÿÉ\ÿÜ‚ÿÓƒÿÓ„ÿÓ…ÿÓ†ÿÓ”9•9–9—9˜9Ÿÿ ´&µ&¶&·&¸&¿ÿÜÁÿÜÐKìÿDôÿ <ÿÓÿÜÿÜ$9&ÿÜ*ÿÜ2ÿÜ4ÿÜ7ÿa9ÿ}:ÿ<ÿaFÿÜGÿÜHÿÜIÿ·RÿÜTÿÜWÿÜYÿˆZÿ­\ÿumÿ·‚9ƒ9„9…9†9‰ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿa©ÿܪÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ¿ÿuÁÿuÄÿÜÅÿÜÆÿÜÇÿÜÉÿÜÏÿÜÐÿÜìÿaíÿÜôÿasþøtÿu/&ÿÜ*ÿÜ2ÿÜ6ÿÜ9ÿÁ:ÿ·<ÿmÿÁ}ÿ܉ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿÄÿÜÆÿÜÐÿÜèÿÜêÿÜôÿsÿtÿuÿ­<ÿÜmÿÜ}ÿÜŸÿÜôÿÜt&$ÿÜ9ÿÜ<ÿmÿÜ}ÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÉuÿD/þ·ÿa$ÿD6ÿÜ7ÿÜDÿDHÿLÿkRÿ·UÿkXÿ\ÿD‚ÿDƒÿD„ÿD…ÿD†ÿD¢ÿD£ÿD¤ÿD¥ÿD¦ÿD§ÿDªÿ«ÿ¬ÿ­ÿ´ÿ·µÿ·¶ÿ··ÿ·¸ÿ·»ÿ¼ÿ½ÿ¾ÿ¿ÿDÁÿDÏÿãÿkåÿkèÿÜêÿÜìÿÜïÿsÿÓuþˆ 7ÿ·<ÿšmÿÜ}ÿÜŸÿšìÿ·ôÿšsÿÓtÿÓuÿÉÿÜsÿ·tÿÁuÿ· ÿ·$ÿÜmÿÜ}ÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜsÿ·tÿÁuÿ<ÿ)$ÿÜ&ÿ2ÿ7ÿa8ÿÉ:ÿ·<ÿ·DÿÜHÿšRÿšXÿš\ÿkmÿ}‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿ܉ÿ”ÿ•ÿ–ÿ—ÿ˜ÿ›ÿÉœÿÉÿÉžÿÉŸÿ·¢ÿÜ£ÿܤÿÜ¥ÿܦÿܧÿܪÿš«ÿš¬ÿš­ÿš´ÿšµÿš¶ÿš·ÿš¸ÿš»ÿš¼ÿš½ÿš¾ÿš¿ÿkÁÿkÄÿÆÿÏÿšìÿaîÿÉïÿšôÿ·sÿÁtÿÁ1ÿÜ$/2ÿ·7þæ8ÿš9ÿ:ÿD<þðHÿÜRÿÜXÿÜ\ÿD‚/ƒ/„/…/†/”ÿ·•ÿ·–ÿ·—ÿ·˜ÿ·›ÿšœÿšÿšžÿšŸþðªÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ»ÿܼÿܽÿܾÿÜ¿ÿDÁÿDÏÿÜìþæîÿšïÿÜôþðsþatýæ9ÿ­ÿÜ$ÿÜ9ÿÜ;ÿ}<ÿmÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÜuÿD2ÿÓþÁ$ÿ}<ÿÓDÿ¤Hÿ·LÿÓQÿÜRÿ·UÿÜVÿÜXÿÜmÿÜ‚ÿ}ƒÿ}„ÿ}…ÿ}†ÿ}ŸÿÓ¢ÿ¤£ÿ¤¤ÿ¤¥ÿ¤¦ÿ¤§ÿ¤ªÿ·«ÿ·¬ÿ·­ÿ·³ÿÜ´ÿ·µÿ·¶ÿ··ÿ·¸ÿ·»ÿܼÿܽÿܾÿÜÏÿ·ßÿÜãÿÜåÿÜéÿÜëÿÜïÿÜôÿÓs&t&uþ·9sÿÓtÿÜuÿ}5ÿ­ÿ·ÿÁ$ÿ­&ÿš7ÿk9ÿ:ÿ­<ÿ}DÿÓHÿ¤Rÿ¤Xÿ¤\ÿmÿ}ÿÜ‚ÿ­ƒÿ­„ÿ­…ÿ­†ÿ­‰ÿšŸÿ}¢ÿÓ£ÿÓ¤ÿÓ¥ÿÓ¦ÿÓ§ÿÓªÿ¤«ÿ¤¬ÿ¤­ÿ¤´ÿ¤µÿ¤¶ÿ¤·ÿ¤¸ÿ¤»ÿ¤¼ÿ¤½ÿ¤¾ÿ¤¿ÿÁÿÄÿšÆÿšÏÿ¤ìÿkïÿ¤ôÿ}sÿktÿ}uÿÜ$&‚&ƒ&„&…&†&;ÿDÿ ÿ$ÿa&ÿˆ7ÿÜDþ­Fþ¤Hþ¤LÿÁRþ¤UþÓVþ­XþÉZþ­\þÁmÿD}ÿ‚ÿaƒÿa„ÿa…ÿa†ÿa‰ÿˆ¢þ­£þ­¤þ­¥þ­¦þ­§þ­©þ¤ªþ¤«þ¤¬þ¤­þ¤´þ¤µþ¤¶þ¤·þ¤¸þ¤»þɼþɽþɾþÉ¿þÁÁþÁÄÿˆÅþ¤ÆÿˆÇþ¤Ïþ¤ãþÓåþÓéþ­ëþ­ìÿÜïþÉtÿÓuþø=ÿÜùÿÜ/ÿˆþøÿY$ÿ}2ÿÜDÿaHÿaLÿÓRÿaXÿu\ÿÉmÿN}ÿ‚ÿ}ƒÿ}„ÿ}…ÿ}†ÿ}”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜ¢ÿa£ÿa¤ÿa¥ÿa¦ÿa§ÿaªÿa«ÿa¬ÿa­ÿa´ÿaµÿa¶ÿa·ÿa¸ÿa»ÿu¼ÿu½ÿu¾ÿu¿ÿÉÁÿÉÏÿaïÿuuþæ-ÿ­ÿÿˆ$ÿDÿ}HÿˆLÿÓRÿˆUÿ¤Xÿ·\ÿÜmÿ}ÿÜ‚ÿƒÿ„ÿ…ÿ†ÿ¢ÿ}£ÿ}¤ÿ}¥ÿ}¦ÿ}§ÿ}ªÿˆ«ÿˆ¬ÿˆ­ÿˆ´ÿˆµÿˆ¶ÿˆ·ÿˆ¸ÿˆ»ÿ·¼ÿ·½ÿ·¾ÿ·¿ÿÜÁÿÜÏÿˆãÿ¤åÿ¤ïÿ·sÿÜuþøÿš&ÿk2ÿ}7ÿÜHÿ¤mÿ‰ÿk”ÿ}•ÿ}–ÿ}—ÿ}˜ÿ}ªÿ¤«ÿ¤¬ÿ¤­ÿ¤ÄÿkÆÿkÏÿ¤ìÿÜsÿatÿ­uÿÓ2ÿ þaþð$ÿa&ÿ2ÿDþæHþðLÿ·RþðXÿmÿ}ÿk‚ÿaƒÿa„ÿa…ÿa†ÿa‰ÿ”ÿ•ÿ–ÿ—ÿ˜ÿ¢þæ£þæ¤þæ¥þæ¦þæ§þæªþð«þð¬þð­þð´þðµþð¶þð·þð¸þð»ÿ¼ÿ½ÿ¾ÿÄÿÆÿÏþðïÿsÿtÿÜuþøÿÜsÿÜtÿÜuÿÜ[ÿÜ ÿÿkÿ·WÿÜZÿÜ\ÿÜmÿ·}ÿÜ¿ÿÜÁÿÜíÿÜsAuÿDÿÜHÿ·Rÿ·XÿÁ\ÿ·¢ÿÜ£ÿܤÿÜ¥ÿܦÿܧÿܪÿ·«ÿ·¬ÿ·­ÿ·´ÿ·µÿ·¶ÿ··ÿ·¸ÿ·»ÿÁ¼ÿÁ½ÿÁ¾ÿÁ¿ÿ·Áÿ·Ïÿ·ïÿÁsÿktÿuÿ¤&ÿÜ[ÿÁsÿktÿ·uÿ}$ÿ}ÿDÿÜFÿÓGÿÜHÿÓJÿÜKÿÜPÿÜQÿÜRÿÓTÿÜUÿÜ[ÿÉmÿ·©ÿÓªÿÓ«ÿÓ¬ÿÓ­ÿÓ³ÿÜ´ÿÓµÿÓ¶ÿÓ·ÿÓ¸ÿÓÅÿÓÇÿÓÉHÏÿÓÑÿÜßÿÜãÿÜåÿÜtVuþÉÿÉÿaÿmÿÜ}ÿÜtÿÜuþðÿDÿmÿÜ}ÿÜuÿ)FÿÜHÿÁRÿÁ©ÿܪÿÁ«ÿÁ¬ÿÁ­ÿÁ´ÿÁµÿÁ¶ÿÁ·ÿÁ¸ÿÁÅÿÜÇÿÜÏÿÁÿÜþÜÿkmÿÜ}ÿÜuþÓ%ÿÜ&ÿÜ'ÿÜ*ÿÜ-ÿÜ7ÿ9ÿ:ÿÜ<ÿkYÿÜZÿÜ\ÿ܈—‰ÿÜŸÿk¿ÿÜÁÿÜÄÿÜÆÿÜÈÿÜÐÿÜìÿôÿk!$ÿ·%ÿ·&ÿÜ'ÿÜ-ÿÜ2ÿÜ7ÿD9ÿN:ÿ;ÿ<ÿYÿÜZÿÜ\ÿÜ‚ÿ·ƒÿ·„ÿ·…ÿ·†ÿ·‰ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿ¿ÿÜÁÿÜÄÿÜÆÿÜÈÿÜìÿDôÿ<ÿÓÿÜÿÜ$9&ÿÜ*ÿÜ2ÿÜ4ÿÜ7ÿa9ÿ}:ÿ<ÿaFÿÜGÿÜHÿÜIÿ·RÿÜTÿÜWÿÜYÿˆZÿ­\ÿumÿ·‚9ƒ9„9…9†9‰ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿa©ÿܪÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ¿ÿuÁÿuÄÿÜÅÿÜÆÿÜÇÿÜÉÿÜÏÿÜÐÿÜìÿaíÿÜôÿasþøtÿu/<ÿÓÿÜÿÜ$9&ÿÜ*ÿÜ2ÿÜ4ÿÜ7ÿa9ÿ}:ÿ<ÿaFÿÜGÿÜHÿÜIÿ·RÿÜTÿÜWÿÜYÿˆZÿ­\ÿumÿ·‚9ƒ9„9…9†9‰ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿa©ÿܪÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ¿ÿuÁÿuÄÿÜÅÿÜÆÿÜÇÿÜÉÿÜÏÿÜÐÿÜìÿaíÿÜôÿasþøtÿu/<ÿÓÿÜÿÜ$9&ÿÜ*ÿÜ2ÿÜ4ÿÜ7ÿa9ÿ}:ÿ<ÿaFÿÜGÿÜHÿÜIÿ·RÿÜTÿÜWÿÜYÿˆZÿ­\ÿumÿ·‚9ƒ9„9…9†9‰ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿa©ÿܪÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ¿ÿuÁÿuÄÿÜÅÿÜÆÿÜÇÿÜÉÿÜÏÿÜÐÿÜìÿaíÿÜôÿasþøtÿu/<ÿÓÿÜÿÜ$9&ÿÜ*ÿÜ2ÿÜ4ÿÜ7ÿa9ÿ}:ÿ<ÿaFÿÜGÿÜHÿÜIÿ·RÿÜTÿÜWÿÜYÿˆZÿ­\ÿumÿ·‚9ƒ9„9…9†9‰ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿa©ÿܪÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ¿ÿuÁÿuÄÿÜÅÿÜÆÿÜÇÿÜÉÿÜÏÿÜÐÿÜìÿaíÿÜôÿasþøtÿu/<ÿÓÿÜÿÜ$9&ÿÜ*ÿÜ2ÿÜ4ÿÜ7ÿa9ÿ}:ÿ<ÿaFÿÜGÿÜHÿÜIÿ·RÿÜTÿÜWÿÜYÿˆZÿ­\ÿumÿ·‚9ƒ9„9…9†9‰ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿa©ÿܪÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ¿ÿuÁÿuÄÿÜÅÿÜÆÿÜÇÿÜÉÿÜÏÿÜÐÿÜìÿaíÿÜôÿasþøtÿu/sÿ­tÿ¤uÿ<ÿÜmÿÜ}ÿÜŸÿÜôÿÜt&9ÿ­ÿÜ$ÿÜ9ÿÜ;ÿ}<ÿmÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÜuÿD9ÿ­ÿÜ$ÿÜ9ÿÜ;ÿ}<ÿmÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÜuÿD9ÿ­ÿÜ$ÿÜ9ÿÜ;ÿ}<ÿmÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÜuÿD9ÿ­ÿÜ$ÿÜ9ÿÜ;ÿ}<ÿmÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÜuÿD9ÿ­ÿÜ$ÿÜ9ÿÜ;ÿ}<ÿmÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÜuÿD=ÿÜùÿÜ=ÿÜùÿÜ=ÿÜùÿÜ=ÿÜùÿÜ2ÿ þaþð$ÿa&ÿ2ÿDþæHþðLÿ·RþðXÿmÿ}ÿk‚ÿaƒÿa„ÿa…ÿa†ÿa‰ÿ”ÿ•ÿ–ÿ—ÿ˜ÿ¢þæ£þæ¤þæ¥þæ¦þæ§þæªþð«þð¬þð­þð´þðµþð¶þð·þð¸þð»ÿ¼ÿ½ÿ¾ÿÄÿÆÿÏþðïÿsÿtÿÜuþøÿkÿ·sÿÜuÿD&sÿtÿuÿ­[ÿÜ[ÿÜ[ÿÜ[ÿÜsÿ¤tÿuÿ·sÿktÿuÿ¤&ÿÜ[ÿÁsÿktÿ·uÿ}&ÿÜ[ÿÁsÿktÿ·uÿ}&ÿÜ[ÿÁsÿktÿ·uÿ}&ÿÜ[ÿÁsÿktÿ·uÿ}&ÿÜ[ÿÁsÿktÿ·uÿ}ÿÜþÜÿkmÿÜ}ÿÜuþÓÿÜþÜÿkmÿÜ}ÿÜuþÓ<ÿÜmÿÜ}ÿÜŸÿÜôÿÜt&<ÿÜmÿÜ}ÿÜŸÿÜôÿÜt&$ÿÜ9ÿÜ<ÿmÿÜ}ÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÉuÿD[ÿÜ 7ÿ·<ÿšmÿÜ}ÿÜŸÿšìÿ·ôÿšsÿÓtÿÓuÿÉ1ÿÜ$/2ÿ·7þæ8ÿš9ÿ:ÿD<þðHÿÜRÿÜXÿÜ\ÿD‚/ƒ/„/…/†/”ÿ·•ÿ·–ÿ·—ÿ·˜ÿ·›ÿšœÿšÿšžÿšŸþðªÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ»ÿܼÿܽÿܾÿÜ¿ÿDÁÿDÏÿÜìþæîÿšïÿÜôþðsþatýæ1ÿÜ$/2ÿ·7þæ8ÿš9ÿ:ÿD<þðHÿÜRÿÜXÿÜ\ÿD‚/ƒ/„/…/†/”ÿ·•ÿ·–ÿ·—ÿ·˜ÿ·›ÿšœÿšÿšžÿšŸþðªÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ»ÿܼÿܽÿܾÿÜ¿ÿDÁÿDÏÿÜìþæîÿšïÿÜôþðsþatýæOÿ?sÿktÿuÿ¤5ÿ­ÿ·ÿÁ$ÿ­&ÿš7ÿk9ÿ:ÿ­<ÿ}DÿÓHÿ¤Rÿ¤Xÿ¤\ÿmÿ}ÿÜ‚ÿ­ƒÿ­„ÿ­…ÿ­†ÿ­‰ÿšŸÿ}¢ÿÓ£ÿÓ¤ÿÓ¥ÿÓ¦ÿÓ§ÿÓªÿ¤«ÿ¤¬ÿ¤­ÿ¤´ÿ¤µÿ¤¶ÿ¤·ÿ¤¸ÿ¤»ÿ¤¼ÿ¤½ÿ¤¾ÿ¤¿ÿÁÿÄÿšÆÿšÏÿ¤ìÿkïÿ¤ôÿ}sÿktÿ}uÿÜ$ÿ}ÿDÿÜFÿÓGÿÜHÿÓJÿÜKÿÜPÿÜQÿÜRÿÓTÿÜUÿÜ[ÿÉmÿ·©ÿÓªÿÓ«ÿÓ¬ÿÓ­ÿÓ³ÿÜ´ÿÓµÿÓ¶ÿÓ·ÿÓ¸ÿÓÅÿÓÇÿÓÉHÏÿÓÑÿÜßÿÜãÿÜåÿÜtVuþÉ5ÿ­ÿ·ÿÁ$ÿ­&ÿš7ÿk9ÿ:ÿ­<ÿ}DÿÓHÿ¤Rÿ¤Xÿ¤\ÿmÿ}ÿÜ‚ÿ­ƒÿ­„ÿ­…ÿ­†ÿ­‰ÿšŸÿ}¢ÿÓ£ÿÓ¤ÿÓ¥ÿÓ¦ÿÓ§ÿÓªÿ¤«ÿ¤¬ÿ¤­ÿ¤´ÿ¤µÿ¤¶ÿ¤·ÿ¤¸ÿ¤»ÿ¤¼ÿ¤½ÿ¤¾ÿ¤¿ÿÁÿÄÿšÆÿšÏÿ¤ìÿkïÿ¤ôÿ}sÿktÿ}uÿÜ$ÿ}ÿDÿÜFÿÓGÿÜHÿÓJÿÜKÿÜPÿÜQÿÜRÿÓTÿÜUÿÜ[ÿÉmÿ·©ÿÓªÿÓ«ÿÓ¬ÿÓ­ÿÓ³ÿÜ´ÿÓµÿÓ¶ÿÓ·ÿÓ¸ÿÓÅÿÓÇÿÓÉÿÜÏÿÓÑÿÜßÿÜãÿÜåÿÜtVuþÉ$&‚&ƒ&„&…&†&$&‚&ƒ&„&…&†&;ÿDÿ ÿ$ÿa&ÿˆ7ÿÜDþ­Fþ¤Hþ¤LÿÁRþ¤UþÓVþ­XþÉZþ­\þÁmÿD}ÿ‚ÿaƒÿa„ÿa…ÿa†ÿa‰ÿˆ¢þ­£þ­¤þ­¥þ­¦þ­§þ­©þ¤ªþ¤«þ¤¬þ¤­þ¤´þ¤µþ¤¶þ¤·þ¤¸þ¤»þɼþɽþɾþÉ¿þÁÁþÁÄÿˆÅþ¤ÆÿˆÇþ¤Ïþ¤ãþÓåþÓéþ­ëþ­ìÿÜïþÉtÿÓuþø=ÿÜùÿÜ2ÿ þaþð$ÿa&ÿ2ÿDþæHþðLÿ·RþðXÿmÿ}ÿk‚ÿaƒÿa„ÿa…ÿa†ÿa‰ÿ”ÿ•ÿ–ÿ—ÿ˜ÿ¢þæ£þæ¤þæ¥þæ¦þæ§þæªþð«þð¬þð­þð´þðµþð¶þð·þð¸þð»ÿ¼ÿ½ÿ¾ÿÄÿÆÿÏþðïÿsÿtÿÜuþøÿÜsÿÜtÿÜuÿÜ:$þø%ÿÁ&ÿ·'ÿÁ)ÿÁ*ÿ·+ÿÁ-ÿÁ.ÿÁ/ÿÁ2ÿ·3ÿÁ4ÿ·5ÿÁ;ÿˆ=ÿÜIÿ·QÿRÿkUÿYÿ·Zÿ·\ÿ·‚þøƒþø„þø…þø†þøˆþ}‰ÿ·”ÿ·•ÿ·–ÿ·—ÿ·˜ÿ· ÿÁ¡ÿÁ²ÿ·³ÿ´ÿkµÿk¶ÿk·ÿk¸ÿk¿ÿ·Áÿ·Äÿ·Æÿ·ÈÿÁÐÿ·ÔÿÁÖÿÁßÿâÿÁãÿäÿÁåÿùÿÜ?$&%ÿ·&ÿ'ÿ·)ÿ·*ÿ·+ÿ·-/.ÿ·/ÿ·2ÿ3ÿ·4ÿ5ÿ·7þæ9þˆ:ÿ;ÿ·<þˆIÿÜQÿ·Rÿ·Uÿ·YÿZÿ<\ÿ‚&ƒ&„&…&†&ˆ&‰ÿ”ÿ•ÿ–ÿ—ÿ˜ÿŸþˆ ÿ·¡ÿ·²ÿ·³ÿ·´ÿ·µÿ·¶ÿ··ÿ·¸ÿ·¿ÿÁÿÄÿÆÿÈÿ·Ðÿ·Ôÿ·Öÿ·ßÿ·âÿ·ãÿ·äÿ·åÿ·ìþæôþˆX$%&')*+-./23456789:;<=HINQRUYZ[\m}‚ƒ„…†ˆ‰”•–—˜›œžŸ ¡ª«¬­²³´µ¶·¸¿ÁÄÆÈÏÐÔÖÙßâãäåèêìîôùsu0 4À8<ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿ ÿÿÿýÿÿÿÿÿÿÿÿt `ä H\ 0/677:II<LL>OO@yyBÿÿÿÿ  €€€€     ?ÿÿ‡¿ÿÿÒ?ÿÿÒ¿ÿÿÌ?ÿÿ¸¿ÿÿ¼?ÿÿ·¿ÿÿ¾?ÿÿ¿ÿÿºØ~ŽÙ˜6^v‚ˆÿÿÿÿ€€ ?ÿÿï?ÿÿð¿ÿÿñyÀ Lì:‚¦ $&„„.ÿÿÿÿ     €€€€     €€   ?ÿÿë?ÿþ}¿ÿÿî?ÿÿì?ÿþ€¿ÿÿñ?ÿÿñ?ÿÿõ¿ÿÿô?ÿÿò?ÿÿø¿ÿÿ÷?ÿÿõ?ÿþ‰¿ÿÿø?ÿÿø?ÿÿþ¿ÿÿû~~€€usr/src/sdlBasic/src/sdlBrt/unzip/0000777000000000000000000000000010645354745016107 5ustar rootrootusr/src/sdlBasic/src/sdlBrt/unzip/clean.bat0000777000076500007660000000005410463132675016112 0ustar @echo off rem clean batch file del *.o usr/src/sdlBasic/src/sdlBrt/unzip/inflate.c0000777000076500007660000011723110463132632016125 0ustar /* inflate.c -- put in the public domain by Mark Adler version c15c, 28 March 1997 */ /* Modified for MAME project by John Butler 23-JAN-98 */ /* You can do whatever you like with this source file, though I would prefer that if you modify it and redistribute it that you include comments to that effect with your name and the date. Thank you. History: vers date who what ---- --------- -------------- ------------------------------------ a ~~ Feb 92 M. Adler used full (large, one-step) lookup table b1 21 Mar 92 M. Adler first version with partial lookup tables b2 21 Mar 92 M. Adler fixed bug in fixed-code blocks b3 22 Mar 92 M. Adler sped up match copies, cleaned up some b4 25 Mar 92 M. Adler added prototypes; removed window[] (now is the responsibility of unzip.h--also changed name to slide[]), so needs diffs for unzip.c and unzip.h (this allows compiling in the small model on MSDOS); fixed cast of q in huft_build(); b5 26 Mar 92 M. Adler got rid of unintended macro recursion. b6 27 Mar 92 M. Adler got rid of nextbyte() routine. fixed bug in inflate_fixed(). c1 30 Mar 92 M. Adler removed lbits, dbits environment variables. changed BMAX to 16 for explode. Removed OUTB usage, and replaced it with flush()-- this was a 20% speed improvement! Added an explode.c (to replace unimplod.c) that uses the huft routines here. Removed register union. c2 4 Apr 92 M. Adler fixed bug for file sizes a multiple of 32k. c3 10 Apr 92 M. Adler reduced memory of code tables made by huft_build significantly (factor of two to three). c4 15 Apr 92 M. Adler added NOMEMCPY do kill use of memcpy(). worked around a Turbo C optimization bug. c5 21 Apr 92 M. Adler added the WSIZE #define to allow reducing the 32K window size for specialized applications. c6 31 May 92 M. Adler added some typecasts to eliminate warnings c7 27 Jun 92 G. Roelofs added some more typecasts (444: MSC bug). c8 5 Oct 92 J-l. Gailly added ifdef'd code to deal with PKZIP bug. c9 9 Oct 92 M. Adler removed a memory error message (~line 416). c10 17 Oct 92 G. Roelofs changed ULONG/UWORD/byte to ulg/ush/uch, removed old inflate, renamed inflate_entry to inflate, added Mark's fix to a comment. c10.5 14 Dec 92 M. Adler fix up error messages for incomplete trees. c11 2 Jan 93 M. Adler fixed bug in detection of incomplete tables, and removed assumption that EOB is the longest code (bad assumption). c12 3 Jan 93 M. Adler make tables for fixed blocks only once. c13 5 Jan 93 M. Adler allow all zero length codes (pkzip 2.04c outputs one zero length code for an empty distance tree). c14 12 Mar 93 M. Adler made inflate.c standalone with the introduction of inflate.h. c14b 16 Jul 93 G. Roelofs added (unsigned) typecast to w at 470. c14c 19 Jul 93 J. Bush changed v[N_MAX], l[288], ll[28x+3x] arrays to static for Amiga. c14d 13 Aug 93 J-l. Gailly de-complicatified Mark's c[*p++]++ thing. c14e 8 Oct 93 G. Roelofs changed memset() to memzero(). c14f 22 Oct 93 G. Roelofs renamed quietflg to qflag; made Trace() conditional; added inflate_free(). c14g 28 Oct 93 G. Roelofs changed l/(lx+1) macro to pointer (Cray bug) c14h 7 Dec 93 C. Ghisler huft_build() optimizations. c14i 9 Jan 94 A. Verheijen set fixed_t{d,l} to NULL after freeing; G. Roelofs check NEXTBYTE macro for EOF. c14j 23 Jan 94 G. Roelofs removed Ghisler "optimizations"; ifdef'd EOF check. c14k 27 Feb 94 G. Roelofs added some typecasts to avoid warnings. c14l 9 Apr 94 G. Roelofs fixed split comments on preprocessor lines to avoid bug in Encore compiler. c14m 7 Jul 94 P. Kienitz modified to allow assembler version of inflate_codes() (define ASM_INFLATECODES) c14n 22 Jul 94 G. Roelofs changed fprintf to macro for DLL versions c14o 23 Aug 94 C. Spieler added a newline to a debug statement; G. Roelofs added another typecast to avoid MSC warning c14p 4 Oct 94 G. Roelofs added (voidp *) cast to free() argument c14q 30 Oct 94 G. Roelofs changed fprintf macro to MESSAGE() c14r 1 Nov 94 G. Roelofs fixed possible redefinition of CHECK_EOF c14s 7 May 95 S. Maxwell OS/2 DLL globals stuff incorporated; P. Kienitz "fixed" ASM_INFLATECODES macro/prototype c14t 18 Aug 95 G. Roelofs added UZinflate() to use zlib functions; changed voidp to zvoid; moved huft_build() and huft_free() to end of file c14u 1 Oct 95 G. Roelofs moved G into definition of MESSAGE macro c14v 8 Nov 95 P. Kienitz changed ASM_INFLATECODES to use a regular call with __G__ instead of a macro c15 3 Aug 96 M. Adler fixed bomb-bug on random input data (Adobe) c15b 24 Aug 96 M. Adler more fixes for random input data c15c 28 Mar 97 G. Roelofs changed USE_ZLIB fatal exit code from PK_MEM2 to PK_MEM3 c16 20 Apr 97 J. Altman added memzero(v[]) in huft_build() */ /* Inflate deflated (PKZIP's method 8 compressed) data. The compression method searches for as much of the current string of bytes (up to a length of 258) in the previous 32K bytes. If it doesn't find any matches (of at least length 3), it codes the next byte. Otherwise, it codes the length of the matched string and its distance backwards from the current position. There is a single Huffman code that codes both single bytes (called "literals") and match lengths. A second Huffman code codes the distance information, which follows a length code. Each length or distance code actually represents a base value and a number of "extra" (sometimes zero) bits to get to add to the base value. At the end of each deflated block is a special end-of-block (EOB) literal/ length code. The decoding process is basically: get a literal/length code; if EOB then done; if a literal, emit the decoded byte; if a length then get the distance and emit the referred-to bytes from the sliding window of previously emitted data. There are (currently) three kinds of inflate blocks: stored, fixed, and dynamic. The compressor outputs a chunk of data at a time and decides which method to use on a chunk-by-chunk basis. A chunk might typically be 32K to 64K, uncompressed. If the chunk is uncompressible, then the "stored" method is used. In this case, the bytes are simply stored as is, eight bits per byte, with none of the above coding. The bytes are preceded by a count, since there is no longer an EOB code. If the data are compressible, then either the fixed or dynamic methods are used. In the dynamic method, the compressed data are preceded by an encoding of the literal/length and distance Huffman codes that are to be used to decode this block. The representation is itself Huffman coded, and so is preceded by a description of that code. These code descriptions take up a little space, and so for small blocks, there is a predefined set of codes, called the fixed codes. The fixed method is used if the block ends up smaller that way (usually for quite small chunks); otherwise the dynamic method is used. In the latter case, the codes are customized to the probabilities in the current block and so can code it much better than the pre-determined fixed codes can. The Huffman codes themselves are decoded using a multi-level table lookup, in order to maximize the speed of decoding plus the speed of building the decoding tables. See the comments below that precede the lbits and dbits tuning parameters. GRR: return values(?) 0 OK 1 incomplete table 2 bad input 3 not enough memory */ /* Notes beyond the 1.93a appnote.txt: 1. Distance pointers never point before the beginning of the output stream. 2. Distance pointers can point back across blocks, up to 32k away. 3. There is an implied maximum of 7 bits for the bit length table and 15 bits for the actual data. 4. If only one code exists, then it is encoded using one bit. (Zero would be more efficient, but perhaps a little confusing.) If two codes exist, they are coded using one bit each (0 and 1). 5. There is no way of sending zero distance codes--a dummy must be sent if there are none. (History: a pre 2.0 version of PKZIP would store blocks with no distance codes, but this was discovered to be too harsh a criterion.) Valid only for 1.93a. 2.04c does allow zero distance codes, which is sent as one code of zero bits in length. 6. There are up to 286 literal/length codes. Code 256 represents the end-of-block. Note however that the static length tree defines 288 codes just to fill out the Huffman codes. Codes 286 and 287 cannot be used though, since there is no length base or extra bits defined for them. Similarily, there are up to 30 distance codes. However, static trees define 32 codes (all 5 bits) to fill out the Huffman codes, but the last two had better not show up in the data. 7. Unzip can check dynamic Huffman blocks for complete code sets. The exception is that a single code would not be complete (see #4). 8. The five bits following the block type is really the number of literal codes sent minus 257. 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits (1+6+6). Therefore, to output three times the length, you output three codes (1+1+1), whereas to output four times the same length, you only need two codes (1+3). Hmm. 10. In the tree reconstruction algorithm, Code = Code + Increment only if BitLength(i) is not zero. (Pretty obvious.) 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19) 12. Note: length code 284 can represent 227-258, but length code 285 really is 258. The last length deserves its own, short code since it gets used a lot in very redundant files. The length 258 is special since 258 - 3 (the min match length) is 255. 13. The literal/length and distance code bit lengths are read as a single stream of lengths. It is possible (and advantageous) for a repeat code (16, 17, or 18) to go across the boundary between the two sets of lengths. */ #include #include #include typedef unsigned char uch; typedef unsigned short ush; typedef unsigned long ulg; /* Huffman code lookup table entry--this entry is four bytes for machines that have 16-bit pointers (e.g. PC's in the small or medium model). Valid extra bits are 0..13. e == 15 is EOB (end of block), e == 16 means that v is a literal, 16 < e < 32 means that v is a pointer to the next table, which codes e - 16 bits, and lastly e == 99 indicates an unused code. If a code with e == 99 is looked up, this implies an error in the data. */ struct huft { uch e; /* number of extra bits or operation */ uch b; /* number of bits in this code or subcode */ union { ush n; /* literal, length base, or distance base */ struct huft *t; /* pointer to next level of table */ } v; }; struct tGlobals { unsigned wp; /* current position in slide */ ulg bb; /* bit buffer */ unsigned bk; /* bits in bit buffer */ struct huft *fixed_tl; /* Globals for literal tables (built once) */ struct huft *fixed_td; /* Globals for literal tables (built once) */ int fixed_bl, fixed_bd; /* Globals for literal tables (built once) */ unsigned hufts; /* track memory usage */ }; static struct tGlobals G; extern unsigned char *slide; /* 32K sliding window -- malloced in unzip.c */ extern unsigned char *g_nextbyte; /* pointer to next byte of input -- unzip.c */ extern FILE *errorlog; /* MAME's errorlog */ #define redirSlide slide /* support function in unzip.c */ extern void inflate_FLUSH (unsigned char *buffer, unsigned int n); #define PKZIP_BUG_WORKAROUND /* PKZIP 1.93a problem--live with it */ /* inflate.h must supply the uch slide[WSIZE] array, the zvoid typedef (void if (void *) is accepted, else char) and the NEXTBYTE, FLUSH() and memzero macros. If the window size is not 32K, it should also define WSIZE. If INFMOD is defined, it can include compiled functions to support the NEXTBYTE and/or FLUSH() macros. There are defaults for NEXTBYTE and FLUSH() below for use as examples of what those functions need to do. Normally, you would also want FLUSH() to compute a crc on the data. inflate.h also needs to provide these typedefs: typedef unsigned char uch; typedef unsigned short ush; typedef unsigned long ulg; This module uses the external functions malloc() and free() (and probably memset() or bzero() in the memzero() macro). Their prototypes are normally found in and . */ /* default is 32K */ /* 32K for zip's deflate method */ #define WSIZE 0x8000 /* window size--must be a power of two, and at least */ #define wsize WSIZE /* wsize is a constant */ /* default is to simply get a byte from stdin */ /* we'll read directly from buffer -- JB */ #define NEXTBYTE (*g_nextbyte++) /* only used twice, for fixed strings--NOT general-purpose */ #define MESSAGE(str,len,flag) { printf((char *)(str));} /* default is to simply write the buffer to stdout */ /* we'll write directly to a buffer -- JB */ #define FLUSH(n) inflate_FLUSH(redirSlide,n) /* Warning: the fwrite above might not work on 16-bit compilers, since 0x8000 might be interpreted as -32,768 by the library function. */ #define memzero(dest,len) memset(dest,0,len) #define Trace(x) /*---------------------------------------------------------------------------*/ /* Function prototypes */ int zip_inflate_codes (struct huft *tl, struct huft *td, int bl, int bd); static int inflate_stored (void); static int inflate_fixed (void); static int inflate_dynamic (void); static int inflate_block (int *e); int huft_build(unsigned *b, unsigned n, unsigned s, ush *d, ush *e, struct huft **t, int *m); int huft_free(struct huft *t); /* The inflate algorithm uses a sliding 32K byte window on the uncompressed stream to find repeated byte strings. This is implemented here as a circular buffer. The index is updated simply by incrementing and then and'ing with 0x7fff (32K-1). */ /* It is left to other modules to supply the 32K area. It is assumed to be usable as if it were declared "uch slide[32768];" or as just "uch *slide;" and then malloc'ed in the latter case. The definition must be in unzip.h, included above. */ /* Tables for deflate from PKZIP's appnote.txt. */ static unsigned border[] = { /* Order of the bit length code lengths */ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; static ush cplens[] = { /* Copy lengths for literal codes 257..285 */ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; /* note: see note #13 above about the 258 in this list. */ static ush cplext[] = { /* Extra bits for literal codes 257..285 */ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99}; /* 99==invalid */ static ush cpdist[] = { /* Copy offsets for distance codes 0..29 */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577}; static ush cpdext[] = { /* Extra bits for distance codes */ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; /* And'ing with mask_bits[n] masks the lower n bits */ const ush mask_bits[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff }; /* Macros for inflate() bit peeking and grabbing. The usage is: NEEDBITS(j) x = b & mask_bits[j]; DUMPBITS(j) where NEEDBITS makes sure that b has at least j bits in it, and DUMPBITS removes the bits from b. The macros use the variable k for the number of bits in b. Normally, b and k are register variables for speed and are initialized at the begining of a routine that uses these macros from a global bit buffer and count. In order to not ask for more bits than there are in the compressed stream, the Huffman tables are constructed to only ask for just enough bits to make up the end-of-block code (value 256). Then no bytes need to be "returned" to the buffer at the end of the last block. See the huft_build() routine. */ #define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE)<>=(n);k-=(n);} /* Huffman code decoding is performed using a multi-level table lookup. The fastest way to decode is to simply build a lookup table whose size is determined by the longest code. However, the time it takes to build this table can also be a factor if the data being decoded are not very long. The most common codes are necessarily the shortest codes, so those codes dominate the decoding time, and hence the speed. The idea is you can have a shorter table that decodes the shorter, more probable codes, and then point to subsidiary tables for the longer codes. The time it costs to decode the longer codes is then traded against the time it takes to make longer tables. This results of this trade are in the variables lbits and dbits below. lbits is the number of bits the first level table for literal/ length codes can decode in one step, and dbits is the same thing for the distance codes. Subsequent tables are also less than or equal to those sizes. These values may be adjusted either when all of the codes are shorter than that, in which case the longest code length in bits is used, or when the shortest code is *longer* than the requested table size, in which case the length of the shortest code in bits is used. There are two different values for the two tables, since they code a different number of possibilities each. The literal/length table codes 286 possible values, or in a flat code, a little over eight bits. The distance table codes 30 possible values, or a little less than five bits, flat. The optimum values for speed end up being about one bit more than those, so lbits is 8+1 and dbits is 5+1. The optimum values may differ though from machine to machine, and possibly even between compilers. Your mileage may vary. */ static int lbits = 9; /* bits in base literal/length lookup table */ static int dbits = 6; /* bits in base distance lookup table */ int zip_inflate_codes (struct huft *tl, struct huft *td, int bl, int bd) /* inflate (decompress) the codes in a deflated (compressed) block. Return an error code or zero if it all goes ok. */ /* struct huft *tl, *td;*/ /* literal/length and distance decoder tables */ /* int bl, bd; */ /* number of bits decoded by tl[] and td[] */ { register unsigned e; /* table entry flag/number of extra bits */ unsigned n, d; /* length and index for copy */ unsigned w; /* current window position */ struct huft *t; /* pointer to table entry */ unsigned ml, md; /* masks for bl and bd bits */ register ulg b; /* bit buffer */ register unsigned k; /* number of bits in bit buffer */ /* make local copies of globals */ b = G.bb; /* initialize bit buffer */ k = G.bk; w = G.wp; /* initialize window position */ /* inflate the coded data */ ml = mask_bits[bl]; /* precompute masks for speed */ md = mask_bits[bd]; while (1) /* do until end of block */ { NEEDBITS((unsigned)bl) if ((e = (t = tl + ((unsigned)b & ml))->e) > 16) do { if (e == 99) return 1; DUMPBITS(t->b) e -= 16; NEEDBITS(e) } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16); DUMPBITS(t->b) if (e == 16) /* then it's a literal */ { redirSlide[w++] = (uch)t->v.n; if (w == wsize) { FLUSH(w); w = 0; } } else /* it's an EOB or a length */ { /* exit if end of block */ if (e == 15) break; /* get length of block to copy */ NEEDBITS(e) n = t->v.n + ((unsigned)b & mask_bits[e]); DUMPBITS(e); /* decode distance of block to copy */ NEEDBITS((unsigned)bd) if ((e = (t = td + ((unsigned)b & md))->e) > 16) do { if (e == 99) return 1; DUMPBITS(t->b) e -= 16; NEEDBITS(e) } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16); DUMPBITS(t->b) NEEDBITS(e) d = w - t->v.n - ((unsigned)b & mask_bits[e]); DUMPBITS(e) /* do the copy */ do { n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); #ifndef NOMEMCPY if (w - d >= e) /* (this test assumes unsigned comparison) */ { memcpy(redirSlide + w, redirSlide + d, e); w += e; d += e; } else /* do it slowly to avoid memcpy() overlap */ #endif /* !NOMEMCPY */ do { redirSlide[w++] = redirSlide[d++]; } while (--e); if (w == wsize) { FLUSH(w); w = 0; } } while (n); } } /* restore the globals from the locals */ G.wp = w; /* restore global window pointer */ G.bb = b; /* restore global bit buffer */ G.bk = k; /* done */ return 0; } static int inflate_stored(void) /* "decompress" an inflated type 0 (stored) block. */ { unsigned n; /* number of bytes in block */ unsigned w; /* current window position */ register ulg b; /* bit buffer */ register unsigned k; /* number of bits in bit buffer */ /* make local copies of globals */ Trace((stderr, "\nstored block")); b = G.bb; /* initialize bit buffer */ k = G.bk; w = G.wp; /* initialize window position */ /* go to byte boundary */ n = k & 7; DUMPBITS(n); /* get the length and its complement */ NEEDBITS(16) n = ((unsigned)b & 0xffff); DUMPBITS(16) NEEDBITS(16) if (n != (unsigned)((~b) & 0xffff)) return 1; /* error in compressed data */ DUMPBITS(16) /* read and output the compressed data */ while (n--) { NEEDBITS(8) redirSlide[w++] = (uch)b; if (w == wsize) { FLUSH(w); w = 0; } DUMPBITS(8) } /* restore the globals from the locals */ G.wp = w; /* restore global window pointer */ G.bb = b; /* restore global bit buffer */ G.bk = k; return 0; } static int inflate_fixed (void) /* decompress an inflated type 1 (fixed Huffman codes) block. We should either replace this with a custom decoder, or at least precompute the Huffman tables. */ { /* if first time, set up tables for fixed blocks */ Trace((stderr, "\nliteral block")); if (G.fixed_tl == (struct huft *)NULL) { int i; /* temporary variable */ unsigned l[288]; /* length list for huft_build */ /* literal table */ for (i = 0; i < 144; i++) l[i] = 8; for (; i < 256; i++) l[i] = 9; for (; i < 280; i++) l[i] = 7; for (; i < 288; i++) /* make a complete, but wrong code set */ l[i] = 8; G.fixed_bl = 7; if ((i = huft_build(l, 288, 257, cplens, cplext, &G.fixed_tl, &G.fixed_bl)) != 0) { G.fixed_tl = (struct huft *)NULL; return i; } /* distance table */ for (i = 0; i < 30; i++) /* make an incomplete code set */ l[i] = 5; G.fixed_bd = 5; if ((i = huft_build(l, 30, 0, cpdist, cpdext, &G.fixed_td, &G.fixed_bd)) > 1) { huft_free(G.fixed_tl); G.fixed_tl = (struct huft *)NULL; return i; } } /* decompress until an end-of-block code */ return zip_inflate_codes(G.fixed_tl, G.fixed_td, G.fixed_bl, G.fixed_bd) != 0; } static int inflate_dynamic(void) /* decompress an inflated type 2 (dynamic Huffman codes) block. */ { int i; /* temporary variables */ unsigned j; unsigned l; /* last length */ unsigned m; /* mask for bit lengths table */ unsigned n; /* number of lengths to get */ struct huft *tl; /* literal/length code table */ struct huft *td; /* distance code table */ int bl; /* lookup bits for tl */ int bd; /* lookup bits for td */ unsigned nb; /* number of bit length codes */ unsigned nl; /* number of literal/length codes */ unsigned nd; /* number of distance codes */ #ifdef PKZIP_BUG_WORKAROUND unsigned ll[288+32]; /* literal/length and distance code lengths */ #else unsigned ll[286+30]; /* literal/length and distance code lengths */ #endif register ulg b; /* bit buffer */ register unsigned k; /* number of bits in bit buffer */ /* make local bit buffer */ Trace((stderr, "\ndynamic block")); b = G.bb; k = G.bk; /* read in table lengths */ NEEDBITS(5) nl = 257 + ((unsigned)b & 0x1f); /* number of literal/length codes */ DUMPBITS(5) NEEDBITS(5) nd = 1 + ((unsigned)b & 0x1f); /* number of distance codes */ DUMPBITS(5) NEEDBITS(4) nb = 4 + ((unsigned)b & 0xf); /* number of bit length codes */ DUMPBITS(4) #ifdef PKZIP_BUG_WORKAROUND if (nl > 288 || nd > 32) #else if (nl > 286 || nd > 30) #endif return 1; /* bad lengths */ /* read in bit-length-code lengths */ for (j = 0; j < nb; j++) { NEEDBITS(3) ll[border[j]] = (unsigned)b & 7; DUMPBITS(3) } for (; j < 19; j++) ll[border[j]] = 0; /* build decoding table for trees--single level, 7 bit lookup */ bl = 7; i = huft_build(ll, 19, 19, NULL, NULL, &tl, &bl); if (bl == 0) /* no bit lengths */ i = 1; if (i) { if (i == 1) huft_free(tl); return i; /* incomplete code set */ } /* read in literal and distance code lengths */ n = nl + nd; m = mask_bits[bl]; i = l = 0; while ((unsigned)i < n) { NEEDBITS((unsigned)bl) j = (td = tl + ((unsigned)b & m))->b; DUMPBITS(j) j = td->v.n; if (j < 16) /* length of code in bits (0..15) */ ll[i++] = l = j; /* save last length in l */ else if (j == 16) /* repeat last length 3 to 6 times */ { NEEDBITS(2) j = 3 + ((unsigned)b & 3); DUMPBITS(2) if ((unsigned)i + j > n) return 1; while (j--) ll[i++] = l; } else if (j == 17) /* 3 to 10 zero length codes */ { NEEDBITS(3) j = 3 + ((unsigned)b & 7); DUMPBITS(3) if ((unsigned)i + j > n) return 1; while (j--) ll[i++] = 0; l = 0; } else /* j == 18: 11 to 138 zero length codes */ { NEEDBITS(7) j = 11 + ((unsigned)b & 0x7f); DUMPBITS(7) if ((unsigned)i + j > n) return 1; while (j--) ll[i++] = 0; l = 0; } } /* free decoding table for trees */ huft_free(tl); /* restore the global bit buffer */ G.bb = b; G.bk = k; /* build the decoding tables for literal/length and distance codes */ bl = lbits; i = huft_build(ll, nl, 257, cplens, cplext, &tl, &bl); if (bl == 0) /* no literals or lengths */ i = 1; if (i) { if (i == 1) { MESSAGE((uch *)"(incomplete l-tree) ", 21L, 1); huft_free(tl); } return i; /* incomplete code set */ } bd = dbits; i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &td, &bd); if (bd == 0 && nl > 257) /* lengths but no distances */ { MESSAGE((uch *)"(incomplete d-tree) ", 21L, 1); huft_free(tl); return 1; } if (i == 1) { #ifdef PKZIP_BUG_WORKAROUND i = 0; #else MESSAGE((uch *)"(incomplete d-tree) ", 21L, 1); huft_free(td); #endif } if (i) { huft_free(tl); return i; } /* decompress until an end-of-block code */ if (zip_inflate_codes(tl, td, bl, bd)) return 1; /* free the decoding tables, return */ huft_free(tl); huft_free(td); return 0; } static int inflate_block(int *e) /* decompress an inflated block */ /* int *e; */ /* last block flag */ { unsigned t; /* block type */ register ulg b; /* bit buffer */ register unsigned k; /* number of bits in bit buffer */ /* make local bit buffer */ b = G.bb; k = G.bk; /* read in last block bit */ NEEDBITS(1) *e = (int)b & 1; DUMPBITS(1) /* read in block type */ NEEDBITS(2) t = (unsigned)b & 3; DUMPBITS(2) /* restore the global bit buffer */ G.bb = b; G.bk = k; /* inflate that block type */ if (t == 2) return inflate_dynamic(); if (t == 0) return inflate_stored(); if (t == 1) return inflate_fixed(); /* bad block type */ return 2; } int zip_inflate(void) /* decompress an inflated entry */ { int e; /* last block flag */ int r; /* result code */ unsigned h; /* maximum struct huft's malloc'ed */ /* initialize window, bit buffer */ G.wp = 0; G.bk = 0; G.bb = 0; /* decompress until the last block */ h = 0; do { G.hufts = 0; if ((r = inflate_block(&e)) != 0) return r; if (G.hufts > h) h = G.hufts; } while (!e); /* flush out redirSlide */ FLUSH(G.wp); /* return success */ Trace((stderr, "\n%u bytes in Huffman tables (%d/entry)\n", h * sizeof(struct huft), sizeof(struct huft))); return 0; } int inflate_free(void) { if (G.fixed_tl != (struct huft *)NULL) { huft_free(G.fixed_td); huft_free(G.fixed_tl); G.fixed_td = G.fixed_tl = (struct huft *)NULL; } return 0; } /* * GRR: moved huft_build() and huft_free() down here; used by explode() * and fUnZip regardless of whether USE_ZLIB defined or not */ /* If BMAX needs to be larger than 16, then h and x[] should be ulg. */ #define BMAX 16 /* maximum bit length of any code (16 for explode) */ #define N_MAX 288 /* maximum number of codes in any set */ int huft_build(unsigned *b, unsigned n, unsigned s, ush *d, ush *e, struct huft **t, int *m) /* Given a list of code lengths and a maximum table size, make a set of tables to decode that set of codes. Return zero on success, one if the given code set is incomplete (the tables are still built in this case), two if the input is invalid (all zero length codes or an oversubscribed set of lengths), and three if not enough memory. The code with value 256 is special, and the tables are constructed so that no bits beyond that code are fetched when that code is decoded. */ /* unsigned *b; */ /* code lengths in bits (all assumed <= BMAX) */ /* unsigned n; */ /* number of codes (assumed <= N_MAX) */ /* unsigned s; */ /* number of simple-valued codes (0..s-1) */ /* ush *d; */ /* list of base values for non-simple codes */ /* ush *e; */ /* list of extra bits for non-simple codes */ /* struct huft **t; */ /* result: starting table */ /* int *m; */ /* maximum lookup bits, returns actual */ { unsigned a; /* counter for codes of length k */ unsigned c[BMAX+1]; /* bit length count table */ unsigned el; /* length of EOB code (value 256) */ unsigned f; /* i repeats in table every f entries */ int g; /* maximum code length */ int h; /* table level */ register unsigned i; /* counter, current code */ register unsigned j; /* counter */ register int k; /* number of bits in current code */ int lx[BMAX+1]; /* memory for l[-1..BMAX-1] */ int *l = lx+1; /* stack of bits per table */ register unsigned *p; /* pointer into c[], b[], or v[] */ register struct huft *q; /* points to current table */ struct huft r; /* table entry for structure assignment */ struct huft *u[BMAX]; /* table stack */ unsigned v[N_MAX]; /* values in order of bit length */ register int w; /* bits before this table == (l * h) */ unsigned x[BMAX+1]; /* bit offsets, then code stack */ unsigned *xp; /* pointer into x */ int y; /* number of dummy codes added */ unsigned z; /* number of entries in current table */ /* Generate counts for each bit length */ el = n > 256 ? b[256] : BMAX; /* set length of EOB code, if any */ memzero((char *)c, sizeof(c)); p = b; i = n; do { c[*p]++; p++; /* assume all entries <= BMAX */ } while (--i); if (c[0] == n) /* null input--all zero length codes */ { *t = (struct huft *)NULL; *m = 0; return 0; } /* Find minimum and maximum length, bound *m by those */ for (j = 1; j <= BMAX; j++) if (c[j]) break; k = j; /* minimum code length */ if ((unsigned)*m < j) *m = j; for (i = BMAX; i; i--) if (c[i]) break; g = i; /* maximum code length */ if ((unsigned)*m > i) *m = i; /* Adjust last length count to fill out codes, if needed */ for (y = 1 << j; j < i; j++, y <<= 1) if ((y -= c[j]) < 0) return 2; /* bad input: more codes than bits */ if ((y -= c[i]) < 0) return 2; c[i] += y; /* Generate starting offsets into the value table for each length */ x[1] = j = 0; p = c + 1; xp = x + 2; while (--i) { /* note that i == g from above */ *xp++ = (j += *p++); } /* Make a table of values in order of bit lengths */ memzero((char *)v, sizeof(v)); p = b; i = 0; do { if ((j = *p++) != 0) v[x[j]++] = i; } while (++i < n); n = x[g]; /* set n to length of v */ /* Generate the Huffman codes and for each, make the table entries */ x[0] = i = 0; /* first Huffman code is zero */ p = v; /* grab values in bit order */ h = -1; /* no tables yet--level -1 */ w = l[-1] = 0; /* no bits decoded yet */ u[0] = (struct huft *)NULL; /* just to keep compilers happy */ q = (struct huft *)NULL; /* ditto */ z = 0; /* ditto */ /* go through the bit lengths (k already is bits in shortest code) */ for (; k <= g; k++) { a = c[k]; while (a--) { /* here i is the Huffman code of length k bits for value *p */ /* make tables up to required level */ while (k > w + l[h]) { w += l[h++]; /* add bits already decoded */ /* compute minimum size table less than or equal to *m bits */ z = (z = g - w) > (unsigned)*m ? *m : z; /* upper limit */ if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ { /* too few codes for k-w bit table */ f -= a + 1; /* deduct codes from patterns left */ xp = c + k; while (++j < z) /* try smaller tables up to z bits */ { if ((f <<= 1) <= *++xp) break; /* enough codes to use up j bits */ f -= *xp; /* else deduct codes from patterns */ } } if ((unsigned)w + j > el && (unsigned)w < el) j = el - w; /* make EOB code end at table */ z = 1 << j; /* table entries for j-bit table */ l[h] = j; /* set table size in stack */ /* allocate and link in new table */ if ((q = (struct huft *)malloc((z + 1)*sizeof(struct huft))) == (struct huft *)NULL) { if (h) huft_free(u[0]); return 3; /* not enough memory */ } G.hufts += z + 1; /* track memory usage */ *t = q + 1; /* link to list for huft_free() */ *(t = &(q->v.t)) = (struct huft *)NULL; u[h] = ++q; /* table starts after link */ /* connect to last table, if there is one */ if (h) { x[h] = i; /* save pattern for backing up */ r.b = (uch)l[h-1]; /* bits to dump before this table */ r.e = (uch)(16 + j); /* bits in this table */ r.v.t = q; /* pointer to this table */ j = (i & ((1 << w) - 1)) >> (w - l[h-1]); u[h-1][j] = r; /* connect to last table */ } } /* set up table entry in r */ r.b = (uch)(k - w); if (p >= v + n) r.e = 99; /* out of values--invalid code */ else if (*p < s) { r.e = (uch)(*p < 256 ? 16 : 15); /* 256 is end-of-block code */ r.v.n = (ush)*p++; /* simple code is just the value */ } else { r.e = (uch)e[*p - s]; /* non-simple--look up in lists */ r.v.n = d[*p++ - s]; } /* fill code-like entries with r */ f = 1 << (k - w); for (j = i >> w; j < z; j += f) q[j] = r; /* backwards increment the k-bit code i */ for (j = 1 << (k - 1); i & j; j >>= 1) i ^= j; i ^= j; /* backup over finished tables */ while ((i & ((1 << w) - 1)) != x[h]) w -= l[--h]; /* don't need to update q */ } } /* return actual size of base table */ *m = l[0]; /* Return true (1) if we were given an incomplete table */ return y != 0 && g != 1; } int huft_free(struct huft *t) /* Free the malloc'ed tables built by huft_build(), which makes a linked list of the tables it made, with the links in a dummy first entry of each table. */ /* struct huft *t; */ /* table to free */ { register struct huft *p, *q; /* Go through linked list, freeing from the malloced (t[-1]) address. */ p = t; while (p != (struct huft *)NULL) { q = (--p)->v.t; free((void *)p); p = q; } return 0; } usr/src/sdlBasic/src/sdlBrt/unzip/compile.bat0000777000076500007660000000030010463132675016452 0ustar @echo off echo now compiling unzip: please wait rem WARNING!!! verify the correct path of mingGw set MINGWPATH=c:\devel\c-cpp\mingw path %MINGWPATH%\bin;%PATH% mingw32-make os=win32 usr/src/sdlBasic/src/sdlBrt/unzip/unzip.h0000777000076500007660000000071410463132675015661 0ustar /********************************************************************* unzip.h Support for retrieving files from zipfiles. *********************************************************************/ /* public functions */ extern int load_zipped_file (char *zipfile, char *filename, unsigned char **buf, int *length); extern int file_unzip(char *zipfile,char *filename,char *tmpdir); /*********************************************************************/ usr/src/sdlBasic/src/sdlBrt/unzip/makefile0000755000076500007660000001510510644775534016047 0ustar ##################################################################################### # libSDLengine Makefile v0.07 for all (beta 2) # ##################################################################################### # # syntax make OS=[font_prefix=] # # platforms supported = [linux|osx|freebsd|openbsd|netbsd|morphos|amigaos4] # ###################################################################################### #os is case insensitive ifndef $(OS) OS=$(os) endif UNZIP_SRC= inflate.c unzip.c SRC = $(UNZIP_SRC) UNZIP_OBJ= inflate.o unzip.o OBJECT= $(UNZIP_OBJ) #----------------------------------------------------------------------------------------------------------------------------------------# # WIN32 # ifeq ($(OS), win32) TARGET= unzip.a mingw=c:/devel/c-cpp/MinGW ifndef prefix prefix=c:/programmi/sdlBasic endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=del CFLAG= -Wall -mwindows -g -O2 -I $(mingw)/include LIBS= -lmingw32 -lSDLmain -lSDL -lSDL_image -lSDL_mixer -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # LINUX # ifeq ($(OS), linux) TARGET= unzip.a ifndef prefix prefix=/opt/sdlBasic endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O2 -I/usr/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DLINUX LIBS=-Wl,-rpath, -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lvorbisfile -lvorbis -logg -lsmpeg -lasound -lSDL -lpng -ltiff -lz -ljpeg -lpthread -lm -lfreetype -ldl #LIBS=-Wl,-rpath, -lSDL -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lvorbisfile -lvorbis -logg -lsmpeg -lpthread -lm -lfreetype -lSDL -lpng -ljpeg -ltiff -lz -lartsdsp -lasound -lartsdsp -ldl #LIBS=-lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # GP2X # ifeq ($(OS), gp2x) TARGET= unzip.a ifndef prefix prefix=/mnt/sd/sdlBasic endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= /usr/local/open2x/bin/open2x-gcc CPP=/usr/local/open2x/bin/open2x-g++ RANLIB=/usr/local/open2x/bin/open2x-ranlib RM=rm -f CFLAG=-static -Wall -g -O2 -I/usr/local/open2x/open2x/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DLINUX LIBS=-L/usr/local/open2x/open2x/lib -Wl,-rpath, -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg -lSDL -lpng -ltiff -lz -ljpeg -lpthread -lm -lfreetype -ldl COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # MAC OSX # ifeq ($(OS), osx) TARGET= unzip.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -g -O2 -I/usr/local/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -Wno-long-double LIBS= -lobjc -framework Appkit -framework Carbon -framework IOKit `sdl-config --libs` -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg -lfreetype -ljpeg -lpng -lz COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # FREEBSD # ifeq ($(OS), freebsd) TARGET= unzip.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O2 -I/usr/local/include/SDL11 -D_REENTRAT -DPLAY_MOD -DUNIX -DFBSD LIBS=-lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg -L/usr/local/lib \ -lpthread COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # OPENBSD # ifeq ($(OS), openbsd) TARGET= unzip.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O2 -I/usr/local/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DOPENBSD LIBS=-L/usr/local/lib -L/usr/X11R6/lib -lX11 -lXext -lpthread -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # NETBSD # ifeq ($(OS), netbsd) TARGET= unzip.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O2 -L/usr/pkg/lib -I/usr/pkg/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -DNETBSD LIBS=-lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # MORPHOS # ifeq ($(OS), morphos) TARGET= unzip.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf CC= gcc -noixemul CPP=g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -g -O3 -fomit-frame-pointer -mmultiple -mstring -I/usr/include/SDL -D_REENTRAT -DPLAY_MOD -DUNIX -D__MORPHOS__ LIBS= -lSDL -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net -lsmpeg COMPILE=$(CPP) $(CFLAG) endif #----------------------------------------------------------------------------------------------------------------------------------------# # AMIGAOS4 # ifeq ($(OS), amigaos4) TARGET= unzip.a ifndef prefix prefix=/usr/local endif exec_prefix=$(prefix)/bin font_prefix=$(prefix)/share/fonts/ttf # on amiga can be: ppc-amigaos-strip --remove-section=.comment $(TARGET) CC= ppc-amigaos-gcc CPP= ppc-amigaos-g++ RANLIB= ranlib RM=rm -f CFLAG= -Wall -ggdb -O3 -fomit-frame-pointer -mmultiple -mstring -D__USE_INLINE__ -D__USE_NETINET_IN_H -I/usr/local/amiga/ppc-amigaos/local/clib2/include/SDL/ -D_REENTRAT -DPLAY_MOD -DUNIX LIBS= -lsmpeg -lSDL_mixer -lSDL_image -lSDL_ttf -lfreetype -lSDL_net -lSDL -lpng -lz -ljpeg -lvorbisfile -lvorbis -logg -lauto -lm -lnet -lunix COMPILE=$(CPP) $(CFLAG) $(LIBS) endif #----------------------------------------------------------------------------------------------------------------------------------------# all: $(TARGET) $(TARGET): $(OBJECT) $(RM) $@ ar cq $@ $(OBJECT) $(RANLIB) $(TARGET) $(OBJECT): %.o: %.c $(CC) $(CFLAG) -c $< -o $@ clean: $(RM) *.o $(RM) $(TARGET) usr/src/sdlBasic/src/sdlBrt/unzip/unzip.c0000755000076500007660000004154610626331370015652 0ustar /********************************************************************* unzip.c Support for retrieving files from zipfiles. *********************************************************************/ #include #include #include #include /* types used by the CPU emulations */ typedef unsigned char byte; typedef unsigned short word; typedef unsigned int dword; #define BUFSIZE 0x1000 #define ERRORMSG printf typedef struct { dword end_of_cent_dir_sig; word number_of_this_disk; word number_of_disk_start_cent_dir; word total_entries_cent_dir_this_disk; word total_entries_cent_dir; dword size_of_cent_dir; dword offset_to_start_of_cent_dir; word zipfile_comment_length; char zipfile_comment[1]; } t_end_of_cent_dir; /* offsets in end of central directory structure */ #define ZIPESIG 0x00 #define ZIPEDSK 0x04 #define ZIPECEN 0x06 #define ZIPENUM 0x08 #define ZIPECENN 0x0a #define ZIPECSZ 0x0c #define ZIPEOFST 0x10 #define ZIPECOML 0x14 #define ZIPECOM 0x16 typedef struct { dword local_file_header_sig; word version_needed_to_extract; word general_purpose_bit_flag; word compression_method; word last_mod_file_time; word last_mod_file_date; dword crc32; dword compressed_size; dword uncompressed_size; word filename_length; word extra_field_length; char *filename; } t_local_file_hdr; /* offsets in local file header structure */ #define ZIPLOCSIG 0x00 #define ZIPVER 0x04 #define ZIPGENFLG 0x06 #define ZIPMTHD 0x08 #define ZIPTIME 0x0a #define ZIPDATE 0x0c #define ZIPCRC 0x0e #define ZIPSIZE 0x12 #define ZIPUNCMP 0x16 #define ZIPFNLN 0x1a #define ZIPXTRALN 0x1c #define ZIPNAME 0x1e typedef struct { dword cent_file_header_sig; byte version_made_by; byte host_os; byte version_needed_to_extract; byte os_needed_to_extract; word general_purpose_bit_flag; word compression_method; word last_mod_file_time; word last_mod_file_date; dword crc32; dword compressed_size; dword uncompressed_size; word filename_length; word extra_field_length; word file_comment_length; word disk_number_start; word internal_file_attrib; dword external_file_attrib; dword offset_lcl_hdr_frm_frst_disk; char *filename; } t_central_dir_ent; /* offsets in central directory entry structure */ #define ZIPCENSIG 0x0 #define ZIPCVER 0x4 #define ZIPCOS 0x5 #define ZIPCVXT 0x6 #define ZIPCEXOS 0x7 #define ZIPCFLG 0x8 #define ZIPCMTHD 0xa #define ZIPCTIM 0xc #define ZIPCDAT 0xe #define ZIPCCRC 0x10 #define ZIPCSIZ 0x14 #define ZIPCUNC 0x18 #define ZIPCFNL 0x1c #define ZIPCXTL 0x1e #define ZIPCCML 0x20 #define ZIPDSK 0x22 #define ZIPINT 0x24 #define ZIPEXT 0x26 #define ZIPOFST 0x2a #define ZIPCFN 0x2e /* public functions */ int /* error */ load_zipped_file (const char *zipfile, const char *filename, unsigned char **buf, int *length); /* private functions */ static int read_local_file_header (FILE *fp, const t_central_dir_ent *cd, t_local_file_hdr *lfh); static int find_matching_cd_entry (FILE *fp, char *match, t_end_of_cent_dir *ecd, t_central_dir_ent *cd); static int compare_filename (char *filename, char *match); static void read_central_dir_entry (char *buf, t_central_dir_ent *cd); static int read_end_of_cent_dir (FILE *fp, t_end_of_cent_dir *ecd); static int find_ecd_sig (char *buffer, int buflen, int *offset); static int get_file_length (FILE *fp, int *length); static word read_word (char *buf); static dword read_dword (char *buf); static int create_input_buffer (FILE *fp, const t_central_dir_ent *cd, const t_local_file_hdr *lfh, unsigned char **inbuf); static int gZipLen; /* length of zipfile */ static char input_buffer[BUFSIZE]; /* small input buffer */ /*---------------------------------- inflate.c support ----------------------------------*/ extern int zip_inflate (void); unsigned char *slide; /* 32K sliding window for inflate.c */ unsigned char *g_nextbyte; /* pointer to next byte of input */ static unsigned char *g_outbuf; /* pointer to next byte in output buffer */ void inflate_FLUSH (unsigned char *buffer, unsigned int n) { memcpy (g_outbuf, buffer, n); g_outbuf += n; } /*---------------------------------- end of inflate.c support ----------------------------------*/ /* Pass the path to the zipfile and the name of the file within the zipfile. buf will be set to point to the uncompressed image of that zipped file. length will be set to the length of the uncompressed data. */ int /* error */ load_zipped_file (const char *zipfile, const char *filename, unsigned char **buf, int *length) { FILE *fp = NULL; t_end_of_cent_dir ecd; t_central_dir_ent cd; t_local_file_hdr lfh; unsigned char *inbuf = 0, *outbuf = 0; char filenameUpper[32], *p; int err; /* open zipfile for binary read */ if ((fp = fopen (zipfile,"rb")) != NULL) { /* determine length of zip file */ err = get_file_length (fp, &gZipLen); if (err!=0) { ERRORMSG ("Error in zipfile: get_file_length() failed\n"); goto bail; } /* read end-of-central-directory */ err = read_end_of_cent_dir (fp, &ecd); if (err!=0) { ERRORMSG ("Error reading 'end of central directory'\n"); goto bail; } /* verify that we can work with this zipfile (no disk spanning allowed) */ if ((ecd.number_of_this_disk != ecd.number_of_disk_start_cent_dir) || (ecd.total_entries_cent_dir_this_disk != ecd.total_entries_cent_dir) || (ecd.total_entries_cent_dir < 1)) { err = -1; ERRORMSG ("Unsupported zipfile: zipfile cannot span disks\n"); goto bail; } /* find matching file in central directory (force upper case) */ for (p=filenameUpper; (*p++ = toupper(*filename++)) != '\0';){}; err = find_matching_cd_entry (fp, filenameUpper, &ecd, &cd); if (err!=0) { ERRORMSG("Could not find %s in zipfile %s\n", filenameUpper, zipfile); goto bail; } /* read in local file header */ err = read_local_file_header (fp, &cd, &lfh); if (err!=0) { ERRORMSG ("Error reading 'local file header'\n"); goto bail; } /* extract file based on compression method */ if (lfh.compression_method == 0x0000) { /* file is not compressed, simply stored -- copy directly to output buffer */ err = create_input_buffer (fp, &cd, &lfh, &outbuf); if (err!=0) ERRORMSG ("Couldn't extract uncompressed file\n"); } else if (lfh.compression_method == 0x0008) { /* file is compressed using "Deflate" method */ /* create input and output buffers */ err = create_input_buffer (fp, &cd, &lfh, &inbuf); if (err==0) { g_nextbyte = inbuf; outbuf = malloc (lfh.uncompressed_size); if (outbuf!=0) g_outbuf = outbuf; else { ERRORMSG ("Couldn't allocate %d bytes for output buffer\n", lfh.uncompressed_size); err = -1; } } else { ERRORMSG ("Could not create input buffer\n"); } /* create sliding window for inflate() */ if (err==0) { slide = malloc (0x8000); if (slide==0) { ERRORMSG ("Could not create 32K sliding window\n"); err = -1; } } /* inflate the compressed file (now in memory) */ if (err==0) { err = zip_inflate (); if (err!=0) { ERRORMSG ("Error inflating compressed file: %d", err); } } } /* return pointer to uncompressed data */ if (err==0) { *buf = outbuf; *length = lfh.uncompressed_size; outbuf = 0; /* prevent data from being freed() */ } } else { ERRORMSG ("Could not open zipfile %s\n", zipfile); err = -1; } bail: if (fp) fclose (fp); if (inbuf) free (inbuf); if (outbuf) free (outbuf); if (slide) { free (slide); slide = 0; } return err; } /* malloc() and fill input buffer with compressed file data (all of it) */ static int create_input_buffer (FILE *fp, const t_central_dir_ent *cd, const t_local_file_hdr *lfh, unsigned char **inbuf) { int count, offset, read; int err; /* create a buffer the same size as the compressed file */ count = lfh->compressed_size; *inbuf = malloc (count); if (*inbuf==0) { ERRORMSG ("Couldn't allocate %d bytes for input buffer\n", count); return -1; } /* calculate offset to data and fseek() there */ offset = cd->offset_lcl_hdr_frm_frst_disk + ZIPNAME + lfh->filename_length + lfh->extra_field_length; err = fseek (fp, offset, SEEK_SET); /* fill input buffer with compressed file data */ if (err==0) { read = fread (*inbuf, 1, count, fp); if (read!=count) { ERRORMSG ("Error in zipfile: couldn't read %d bytes of compressed data\n", count); err = -1; } } else ERRORMSG ("Error reading zipfile: fseek to compressed data failed\n"); /* clean up if errors */ if (err!=0 && *inbuf!=0) { free (*inbuf); *inbuf = 0; } return err; } static int read_local_file_header (FILE *fp, const t_central_dir_ent *cd, t_local_file_hdr *lfh) { int count, read; int err; /* we'll read entire local file header (up to BUFSIZE) or to end of file */ if (BUFSIZE > (gZipLen - cd->offset_lcl_hdr_frm_frst_disk)) count = gZipLen - cd->offset_lcl_hdr_frm_frst_disk; else count = BUFSIZE; err = fseek (fp, cd->offset_lcl_hdr_frm_frst_disk, SEEK_SET); if (err==0) { read = fread (input_buffer, sizeof (unsigned char), count, fp); if (read!=count) { err = -1; ERRORMSG ("Error in zipfile: couldn't read %d bytes from local file header", count); } } else ERRORMSG ("Error in zipfile: couldn't fseek to local file header\n"); if (err==0) { lfh->local_file_header_sig = read_dword (input_buffer+ZIPLOCSIG); lfh->version_needed_to_extract = read_word (input_buffer+ZIPVER); lfh->general_purpose_bit_flag = read_word (input_buffer+ZIPGENFLG); lfh->compression_method = read_word (input_buffer+ZIPMTHD); lfh->last_mod_file_time = read_word (input_buffer+ZIPTIME); lfh->last_mod_file_date = read_word (input_buffer+ZIPDATE); lfh->crc32 = read_dword (input_buffer+ZIPCRC); lfh->compressed_size = read_dword (input_buffer+ZIPSIZE); lfh->uncompressed_size = read_dword (input_buffer+ZIPUNCMP); lfh->filename_length = read_word (input_buffer+ZIPFNLN); lfh->extra_field_length = read_word (input_buffer+ZIPXTRALN); lfh->filename = input_buffer+ZIPNAME; } return err; } /* Known issue: central dir must be < BUFSIZE bytes */ static int find_matching_cd_entry (FILE *fp, char *match, t_end_of_cent_dir *ecd, t_central_dir_ent *cd) { int i, j, found = 0, err; int count, read; char *p; /* we'll read the entire central directory or BUFSIZE bytes, whichever is smaller */ if (ecd->size_of_cent_dir > BUFSIZE) count = BUFSIZE; else count = ecd->size_of_cent_dir; /* read from start of central directory */ err = fseek (fp, ecd->offset_to_start_of_cent_dir, SEEK_SET); if (err==0) { read = fread (input_buffer, 1, count, fp); if (read!=count) { ERRORMSG ("Error in zipfile: couldn't read %d bytes from central directory\n", count); err = -1; } } else ERRORMSG ("Error in zipfile: couldn't fseek to start of central directory\n"); if (err==0) { /* loop through entries in central directory for suitable match */ for (i=0, p=input_buffer; found==0 && itotal_entries_cent_dir; i++) { char filename[256]; read_central_dir_entry (p, cd); /* copy filename and force to upper case */ for (j=0; jfilename_length && j<254; j++) filename[j] = toupper (cd->filename[j]); filename[j] = '\0'; /* compare filename */ if (!compare_filename (filename, match)) { found = 1; /* check for suitability */ if (cd->compression_method != 0x0000 && cd->compression_method != 0x0008 ) { found = 0; ERRORMSG ("Error in zipfile: compression method for file %s unsupported.\n", match); ERRORMSG ("Method: $%04x must be $0000 (Stored) or $0008 (Deflated)\n", cd->compression_method); } if (cd->version_needed_to_extract > 0x14) { found = 0; ERRORMSG ("Error in zipfile: version for file %s too new.\n", match); ERRORMSG ("Version: $%02x must be $14 or less\n", cd->version_needed_to_extract); } if (cd->os_needed_to_extract != 0x00) { found = 0; ERRORMSG ("Error in zipfile: OS for file %s not supported.\n", match); ERRORMSG ("OS: $%02x must be $00\n",cd->os_needed_to_extract); } if (cd->disk_number_start != ecd->number_of_this_disk) { found = 0; ERRORMSG ("Error in zipfile: zipfile cannot span disks\n"); } } /* skip to next entry in central dir */ p += ZIPCFN + cd->filename_length + cd->extra_field_length + cd->file_comment_length; } } if (!found) err = -1; return err; } /* check match against filename -- check within subdirectory paths */ static int compare_filename (char *filename, char *match) { char *lasttoken, *token; char temp[256]; /* check for exact match first */ if (strlen (filename) == strlen (match)) return strcmp (filename, match); /* check that this file entry is not a directory */ if (filename[strlen (filename) - 1] == '/') return 1; /* now check to see if file is stored with path */ strcpy (temp, filename); /* spin to last word between forward slashes */ for (lasttoken=token=strtok (temp, "/"); token!=NULL; token=strtok (NULL, "/")) lasttoken = token; if (lasttoken==NULL) return 1; else return strcmp (lasttoken, match); } static void read_central_dir_entry (char *buf, t_central_dir_ent *cd) { cd->cent_file_header_sig = read_dword (buf+ZIPCENSIG); cd->version_made_by = *(buf+ZIPCVER); cd->host_os = *(buf+ZIPCOS); cd->version_needed_to_extract = *(buf+ZIPCVXT); cd->os_needed_to_extract = *(buf+ZIPCEXOS); cd->general_purpose_bit_flag = read_word (buf+ZIPCFLG); cd->compression_method = read_word (buf+ZIPCMTHD); cd->last_mod_file_time = read_word (buf+ZIPCTIM); cd->last_mod_file_date = read_word (buf+ZIPCDAT); cd->crc32 = read_dword (buf+ZIPCCRC); cd->compressed_size = read_dword (buf+ZIPCSIZ); cd->uncompressed_size = read_dword (buf+ZIPCUNC); cd->filename_length = read_word (buf+ZIPCFNL); cd->extra_field_length = read_word (buf+ZIPCXTL); cd->file_comment_length = read_word (buf+ZIPCCML); cd->disk_number_start = read_word (buf+ZIPDSK); cd->internal_file_attrib = read_word (buf+ZIPINT); cd->external_file_attrib = read_dword (buf+ZIPEXT); cd->offset_lcl_hdr_frm_frst_disk = read_dword (buf+ZIPOFST); cd->filename = (buf+ZIPCFN); } static int read_end_of_cent_dir (FILE *fp, t_end_of_cent_dir *ecd) { int count, read; int sigoffset; int err; sigoffset=0; /* determine how many bytes to read */ if (gZipLen > BUFSIZE) count = BUFSIZE; else count = gZipLen; /* seek to end of file - count */ err = fseek (fp, -count, SEEK_END); if (err!=0){ ERRORMSG ("Error in zipfile: fseek failed\n"); return err; } /* read entire file or BUFSIZE bytes into buffer */ read = fread (input_buffer, 1, count, fp); if (read == count){ /* locate end-of-central-dir sig */ err = find_ecd_sig (input_buffer, count, &sigoffset); if (err==0){ char *p = input_buffer+sigoffset; /* read end-of-central-dir */ ecd->end_of_cent_dir_sig = read_dword (p+ZIPESIG); ecd->number_of_this_disk = read_word (p+ZIPEDSK); ecd->number_of_disk_start_cent_dir = read_word (p+ZIPECEN); ecd->total_entries_cent_dir_this_disk = read_word (p+ZIPENUM); ecd->total_entries_cent_dir = read_word (p+ZIPECENN); ecd->size_of_cent_dir = read_dword (p+ZIPECSZ); ecd->offset_to_start_of_cent_dir = read_dword (p+ZIPEOFST); ecd->zipfile_comment_length = read_word (p+ZIPECOML); } else{ ERRORMSG ("Error in zipfile: couldn't find 'end of central dir' signature\n"); } } else{ ERRORMSG ("Error in zipfile: couldn't read %d bytes from end of file\n", count); err = -1; } return err; } /* locate end-of-central-dir sig in buffer and return offset */ /* Known issue: ECD sig must be within the last 4K (BUFSIZE) of the zipfile */ static int find_ecd_sig (char *buffer, int buflen, int *offset) { static char ecdsig[] = { 'P', 'K', 0x05, 0x06 }; int i, found = 0; for (i=buflen-22; i>=0; i--) { if (!strncmp (buffer+i, ecdsig, 4)) { found = 1; *offset = i; break; } } return (!found); } static int get_file_length (FILE *fp, int *length) { int err; /* determine length of file */ err = fseek (fp, 0L, SEEK_END); if (err==0) { *length = ftell (fp); if (*length == -1L) err = -1; } return err; } /* use these to avoid structure padding and byte-ordering problems */ static word read_word (char *buf) { return (*(word *)buf); } /* use these to avoid structure padding and byte-ordering problems */ static dword read_dword (char *buf) { return (*(dword *)buf); } int file_unzip(char *zipfile,char *filename,char *tmpdir) { FILE *fp; unsigned char *mem; char *tmpfile; int size; int i; tmpfile=(char *) malloc(strlen(filename)+strlen(tmpdir)+2); strcpy(tmpfile,tmpdir); strcat(tmpfile,"/"); strcat(tmpfile,filename); tmpfile[strlen(tmpfile)]='\0'; if (load_zipped_file (zipfile, filename, &mem, &size)==0){ fp=fopen(tmpfile,"wb"); for(i=0;i Licence: LGPL */ /* stringCompare: compare two strings on the stack */ void stringCompare( int op, int popFlag ) { char *string1, *string2; string2 = popString(); if (popFlag) { string1 = popString(); } else { string1 = stack[tos].value.string; } eMemTest( "stringCompare: string1", string1 ); eMemTest( "stringCompare: string2", string2 ); switch( op ) { case EQ: pushNumber( strcmp(string1,string2) == 0 ); break; case NE: pushNumber( strcmp(string1,string2) != 0 ); break; case GT: pushNumber( strcmp(string1,string2) == 1 ); break; case LT: pushNumber( strcmp(string1,string2) == -1 ); break; case GE: pushNumber( strcmp(string1,string2) > -1 ); break; case LE: pushNumber( strcmp(string1,string2) < 1 ); break; default: ePrintf( Runtime, "OpCmp: bad operator" ); } eFree( string2 ); if (popFlag) { eFree( string1 ); } } /* numberCompare: compare two numbers on the stack */ void numberCompare( int op, int popFlag ) { Number n1, n2; n2 = popNumber(); if (popFlag) { n1 = popNumber(); } else { n1 = stack[tos].value.number; } switch (op) { case EQ: pushNumber( abs(n1 - n2) <= ALLOWABLE_ERROR ); break; case NE: pushNumber( n1 != n2 ); break; case GT: pushNumber( n1 > n2 ); break; case LT: pushNumber( n1 < n2 ); break; case GE: pushNumber( n1 >= n2 ); break; case LE: pushNumber( n1 <= n2 ); break; default: ePrintf( Runtime, "numberCompare: bad operator" ); } } /* stringRangeCompare: range test for case */ void stringRangeCompare() { char *stringHigh, *stringLow, *string; stringHigh = popString(); stringLow = popString(); string = stack[tos].value.string; pushNumber( strcmp(string, stringLow) > -1 && strcmp(string, stringHigh) < 1 ); eFree( stringLow ); eFree( stringHigh ); } /* numberRangeCompare: range test for case */ void numberRangeCompare() { Number high, low, n; high = popNumber(); low = popNumber(); n = stack[tos].value.number; pushNumber( n >= low && n <= high ); } /* callFunction: call a user defined function */ void callFunction( Node *node ) { int priorLocalStart, priorTos, numArgs, localCount, i; Symbol *s; /* return value */ pushNumber( 0 ); /* argc */ pushNumber( 0 ); /* start of local variables */ priorLocalStart = localstart; priorTos = tos; /* mark start of created objects */ pushCreateStack( 0 ); /* evaluate parameters */ eval( node->left ); /* number of args */ numArgs = (tos-priorTos); stack[priorTos].value.number = (Number)numArgs; /* get routine */ s = node->value.symbol; if (s->forward) { ePrintf( Runtime, "%s has not been defined yet", s->name ); } /* currentScope in runtime */ oldScope[++oldScopeP]=currentScope; if (oldScopeP>255)ePrintf( Runtime, "stack oldScope overflow"); currentScope=s; /* allocate locals */ localCount = s->optargs + s->locals; for ( i = 0; i < (localCount - numArgs); i++ ) { pushNumber( 0 ); } /* set start of locals */ localstart = priorTos; /* run code */ eval( s->code ); /* exit routine flag set? */ if (exitRoutineFlag != 0) { exitRoutineFlag = 0; } /* resume oldScope */ currentScope=oldScope[oldScopeP--]; if (oldScopeP<0)ePrintf( Runtime, "stack oldScope underflow"); /* destroy created objects */ clearCreateStack(); /* clear locals off stack */ for ( i = localCount; i > 0; i-- ) { /* need to free record? */ if ( i > numArgs && stack[tos].datatype == DATA_ARRAY) { freeArray( stack[tos].value.array ); } popNumber(); } /* drop argc */ dropTos(); /* check stack */ if (priorTos > tos+1) { ePrintf( Runtime, "callFunction: %s(): stack underflow", s->name ); } else if (priorTos < tos+1) { ePrintf( Runtime, "callFunction: %s(): garbage on stack", s->name ); } /* drop result? */ if (node->op == OpFunctionCall) { dropTos(); } /* restore marker */ localstart = priorLocalStart; } void eval( Node *node ) { int i, j; Number n1, n2, n3, n4; char *string1; Symbol *s; Node *n; Array *a; /* debugging */ #ifdef __DEBUG_TRACE__ SourceCode *sc; #endif /* init vars */ n1=0; n2=0; n3=0; n4=0; if (node == NULL) { return; } /* test node */ eMemTest( "eval: node is corrupt", node ); eMemTest( "eval: node->left is corrupt", node->left ); eMemTest( "eval: node->right is corrupt", node->right ); /* tracing */ if (node->trace != -1) { runLineId = node->trace; #ifdef __DEBUG_TRACE__ sc = eFindSource( runLineId ); eConsole("%d: %s\n", sc->lineNum, sc->text ); #endif /* sdlBasic_debugging */ if (debug==1){ screendebug(); //////////////////////////////////// } } /* debugging */ #ifdef __DEBUG_TRACE__ eConsole( "Op:%s\n", opcodeName[node->op] ); #endif switch( node->op ) { //case NULL: // break; case OpAdd: eval( node->left ); eval( node->right ); /* add or concat? */ if (getStackType( tos ) == DATA_STRING) { basConcat(); } else { n2 = popNumber(); n1 = popNumber(); pushNumber( n1 + n2 ); } break; case OpAnd: /* short circuit */ eval( node->left ); if (!popNumber()) { pushNumber( (Number)0 ); } else { eval( node->right ); if (popNumber()) { pushNumber( (Number)1 ); } else { pushNumber( (Number)0 ); } } break; case OpArgList: eval( node->left ); eval( node->right ); break; case OpArrayGet: eval( node->left ); /* indices and index */ getArrayElement( node->value.symbol ); break; case OpArrayPtr: pushArray( node->value.symbol ); break; case OpArraySet: eval( node->right ); /* value to store */ eval( node->left ); /* indices and index */ setArrayElement( node->value.symbol ); break; case OpAssign: /* value to be assigned. note the *right* node is used */ eval( node->right ); /* variable to assign to */ setVar( node->value.symbol ); break; case OpBuiltin: case OpBuiltinCall: /* for argcount */ n1 = tos; /* mark start of created objects */ pushCreateStack( 0 ); /* the args */ eval( node->left ); /* builtin symbol */ s = node->value.symbol; if (s == NULL) { ePrintf( Runtime, "builtin pointer is null"); } /* set args */ argCount = (int)(tos - n1); /* call the c function */ (*s->builtin)(); /* destroy created objects */ clearCreateStack(); /* drop result? */ if (node->op == OpBuiltinCall) { dropTos(); } break; case OpCaseSelect: /* top level of a case statement */ /* value to compare */ eval( node->left ); /* resolve into real data */ switch (getStackType( tos )) { case DATA_NUMBER: pushNumber( popNumber() ); break; case DATA_STRING: pushString( popString() ); break; default: ePrintf( Runtime, "OpCaseSelect: can't resolve type %s", datumName[getStackType( tos )] ); } /* get first test */ if (node == NULL) { /* no tests */ break; } else { node = node->right; } /* walk the chain of cases */ while (1) { /* get a test/action pair */ n = node->left; /* perform the tests */ eval( n->left ); /* true? */ if (popNumber()) { /* perform action and leave loop */ eval( n->right ); break; } /* move to next test */ node = node->right; if (node == NULL) { break; } } /* drop the test value from the stack */ dropTos(); break; case OpCaseCmp: case OpCaseRange: case OpCaseElse: /* perform chain of tests until true or end */ while (1) { switch (node->op) { case OpCaseCmp: /* value to compare */ eval(node->left); /* what type of test? */ switch (getStackType( tos-1 )) { case DATA_NUMBER: numberCompare( node->value.iValue, 0 ); break; case DATA_STRING: stringCompare( node->value.iValue, 0 ); break; default: ePrintf( Runtime, "OpCaseCmp: bad data type" ); } break; case OpCaseRange: /* values to compare */ n = node->left; eval( n->left ); eval( n->right ); /* what type of comparison? */ switch (getStackType( tos-2 )) { case DATA_NUMBER: numberRangeCompare(); break; case DATA_STRING: stringRangeCompare(); break; default: ePrintf( Runtime, "OpCaseRange: bad data type" ); break; } break; case OpCaseElse: /* put true on stack */ pushNumber( 1 ); break; default: ePrintf( Runtime, "opcode %s found in Case test chain", opcodeName[node->op] ); } /* was result true? */ if (stack[tos].value.number) { /* leave true flag on stack and exit */ break; } /* move to next test */ node = node->right; if (node == NULL) { /* exit with false flag */ break; } /* drop test result flag */ dropTos(); } break; case OpClassMethod: case OpClassMethodCall: /* the args */ n1 = tos; /* mark start of created objects */ pushCreateStack( 0 ); /* the args */ eval( node->right ); argCount = (int)(tos - n1); me = 0; runMethod( node->left->value.symbol->klass, node->value.string ); /* destroy created objects */ clearCreateStack(); /* drop result? */ if (node->op == OpClassMethodCall) { dropTos(); } break; case OpClose: if (node->left == NULL) { fileCloseAll(); } else { eval( node->left ); i = (int)popNumber(); fileClose( i ); } break; case OpCmp: eval( node->left ); eval( node->right ); switch(getStackType(tos)) { case DATA_NUMBER: numberCompare( node->value.iValue, 1 ); break; case DATA_STRING: stringCompare( node->value.iValue, 1 ); break; default: ePrintf( Runtime, "opCmp: can't handle datatype" ); } break; case OpComma: /* optimized for linked lists */ while (1) { /* exit flag set? */ if (exitForFlag != 0 || exitRoutineFlag != 0 || exitDoFlag != 0 || exitWhileFlag != 0 || continueFlag ) { break; } if (node->left != NULL ) { eval( node->left ); } /* end of list? */ if (node->right == NULL ) { break; /* linked list? */ } else if (node->right->op == OpComma) { node = node->right; /* not a list */ } else { eval( node->right ); break; } } break; case OpConcat: eval( node->left ); eval( node->right ); basConcat(); break; case OpConstGet: s = node->value.symbol; i = s->stackPos; /* this better not be indirected! */ switch (stack[i].datatype) { case DATA_STRING: pushString( stack[i].value.string ); break; case DATA_NUMBER: pushNumber( stack[i].value.number ); break; default: ePrintf( Runtime, "Can't fetch Const type %s", datumName[stack[i].datatype] ); break; } break; case OpConstSet: s = node->value.symbol; eval( node->left ); switch (stack[tos].datatype) { case DATA_STRING: stack[s->stackPos].datatype = DATA_STRING; stack[s->stackPos].value.string = stack[tos].value.string; stack[tos].datatype = DATA_NUMBER; tos--; break; case DATA_NUMBER: stack[s->stackPos].datatype = DATA_NUMBER; stack[s->stackPos].value.number = stack[tos].value.number; tos--; break; default: ePrintf( Runtime, "Can't set Const to %s", datumName[stack[tos].datatype] ); break; } break; case OpDelete: eval( node->left ); runDestructor( (int)popNumber(), OpDelete ); break; case OpDestroy: eval( node->left ); runDestructor( (int)popNumber(), OpDestroy ); break; case OpContinue: continueFlag = 1; break; case OpDiv: eval( node->left ); eval( node->right ); n2 = popNumber(); n1 = popNumber(); if (n2 == 0.0) { ePrintf( Runtime, "Division by zero" ); } pushNumber( n1 / n2 ); break; case OpDo: while (1) { /* test */ eval( node->left ); /*if (!popNumber()){ break; }*/ /* code */ eval( node->right ); //printf("exitDoFlag:%d\n",exitDoFlag); if (exitDoFlag != 0) { exitDoFlag = 0; break; } else if (continueFlag) { continueFlag = 0; } } break; case OpEnd: eShutdown(0); break; case OpErase: if (node->left == NULL) { /* erase entire array */ eraseArray( node->value.symbol ); } else { /* evaluate the indexes */ eval( node->left ); /* erase single element from array */ eraseArrayElement( node->value.symbol ); } break; case OpExitDo: exitDoFlag = 1; break; case OpExitFor: exitForFlag = 1; break; case OpExitRoutine: currentScope=oldScope[oldScopeP--]; exitRoutineFlag = 1; break; case OpExitWhile: exitWhileFlag = 1; break; case OpFloat: pushNumber( node->value.fValue ); break; case OpFor: s = node->value.symbol; eval( node->left ); n2 = popNumber(); n1 = popNumber(); /* initial value */ pushNumber( n3 ); setVar( s ); for( n3=n1; n3 <= n2; n3++ ) { /* set loop variable */ pushNumber( n3 ); setVar( s ); /* run code */ eval( node->right ); /* special exit condition? */ if (exitForFlag) { exitForFlag = 0; break; } else if (continueFlag) { continueFlag = 0; } /* get loop value (in case it changed) */ getVar( s ); n3 = popNumber(); } break; case OpForEach: /* variable to assign */ s = node->value.symbol; /* array to read from */ a = getArray( node->left->value.symbol ); /* iterate through keys */ i = 0; /* put key on stack, or exit */ while (getDynamicKey( a, i )) { /* assign to variable */ setVar( s ); /* run block */ eval( node->right ); /* next */ i += 1; } break; case OpForStep: s = node->value.symbol; eval( node->left ); n3 = popNumber(); /* step */ n2 = popNumber(); /* end */ n1 = popNumber(); /* start */ /* which direction? */ if (n3 > 0) { n2 += ALLOWABLE_ERROR; for( n4=n1; n2 >= n4; n4 += n3 ) { /* set loop variable */ pushNumber( n4 ); setVar( s ); /* run code */ eval( node->right ); /* special exit condition? */ if (exitForFlag) { exitForFlag = 0; break; } else if (continueFlag) { continueFlag = 0; } /* get loop value (in case it changed) */ getVar( s ); n4 = popNumber(); } } else { n2 -= ALLOWABLE_ERROR; for( n4=n1; n2 <= n4; n4 += n3 ) { /* set loop variable */ pushNumber( n4 ); setVar( s ); /* run code */ eval( node->right ); /* special exit condition? */ if (exitForFlag) { exitForFlag = 0; break; } else if (continueFlag) { continueFlag = 0; } /* get loop value (in case it changed) */ getVar( s ); n4 = popNumber(); } } break; case OpFunction: case OpFunctionCall: callFunction( node ); break; case OpInitArray: if (node->left == NULL) { createDynamicArray( node->value.symbol ); } else { eval( node->left ); createStaticArray( node->value.symbol ); } break; case OpInput: if (node->value.iValue == 1) { eval( node->left ); i = (int)popNumber(); string1 = fileLineInput( i ); pushString( string1 ); } else { /* command line */ ePrintf( Runtime, "Input statement is not currently supported" ); } break; case OpInt: pushNumber( node->value.iValue ); break; case OpMethod: case OpMethodCall: /* the index */ eval( node->left ); n1 = popNumber(); /* method name */ string1 = node->value.string; /* mark start of created objects */ pushCreateStack( 0 ); /* args */ n2 = tos; eval( node->right ); argCount = (int)(tos - n2); /* resolve and run method */ resolveMethod( (int)n1, string1 ); /* drop result? */ if (node->op == OpMethodCall) { dropTos(); } /* destroy created objects */ clearCreateStack(); break; case OpMod: eval( node->left ); eval( node->right ); n2 = popNumber(); n1 = popNumber(); pushNumber( (long)n1 % (long)n2 ); break; case OpMul: eval( node->left ); eval( node->right ); n2 = popNumber(); n1 = popNumber(); pushNumber( n1 * n2 ); break; case OpOpen: /* file name */ eval( node->left ); string1 = popString(); /* mode */ i = node->value.iValue; /* file number */ eval( node->right ); n1 = popNumber(); fileOpen( string1, i, (int)n1 ); free( string1 ); break; case OpOr: /* short circuit */ eval( node->left ); if (popNumber()) { pushNumber( (Number)1 ); } else { eval( node->right ); if (popNumber()) { pushNumber( (Number)1 ); } else { pushNumber( (Number)0 ); } } break; case OpOrBits: eval( node->left ); eval( node->right); i = popNumber(); j = popNumber(); pushNumber( i | j ); break; case OpIDiv: eval( node->left ); eval( node->right ); n2 = popNumber(); n1 = popNumber(); /* check for division by zero */ if (n2 == 0.0) { ePrintf( Runtime, "Division by zero" ); } pushNumber( floor(n1 / n2) ); break; case OpIf: n = node->left; /* test */ eval( n->left ); n1 = popNumber(); if (n1 != 0) { /* true portion */ eval( n->right ); } else { /* false portion */ eval( node->right ); } break; case OpIfTrue: ePrintf( Runtime, "OpIfTrue: internal error" ); break; case OpIn: /* evaluate key */ eval( node->left ); /* look for it in array */ pushNumber( inArray( node->value.symbol ) ); break; case OpInv: ePrintf( Runtime, "Inv is not implemented yet" ); break; case OpNegate: eval( node->left ); n1 = popNumber(); pushNumber( -n1 ); break; case OpNew: case OpNewTmp: /* mark start of created objects */ pushCreateStack( 0 ); /* the args */ n1 = tos; eval( node->left ); argCount = (int)(tos - n1); runMethod( node->value.symbol->klass, "new" ); /* destroy created objects *before* adding new object to stack */ clearCreateStack(); /* add new object to create stack? */ if (node->op == OpNewTmp) { /* track on stack */ copyStackItem( tos ); pushCreateStack( (int)popNumber() ); } break; case OpNoOp: break; case OpNot: eval( node->left ); n1 = popNumber(); pushNumber( !n1 ); break; case OpPower: eval( node->left ); eval( node->right ); n2 = popNumber(); n1 = popNumber(); pushNumber( pow( n1, n2 ) ); break; case OpPrint: if (node->left == NULL) { i = 0; } else { eval( node->left ); i = (int)popNumber(); } node = node->right; /* empty print statement */ if (node == NULL) { if (i==0) { eConsole("\n"); } else { filePrintString( i, "\n" ); } } /* process nodes */ while(node != NULL) { /* data value */ if (node->left != NULL) { eval( node->left ); string1 = popString(); if (i==0) { eConsole("%s", string1 ); } else { filePrintString( i, string1 ); } eFree( string1 ); } /* field delimiter */ switch (node->value.iValue) { case PRINT_TAB: if (i==0) { eConsole("\t"); } else { filePrintString( i, "\t" ); } break; case PRINT_NEWLINE: if (i==0) { eConsole("\n"); } else { filePrintString( i, "\n" ); } break; default: /* no action */ break; } /* link */ node = node->right; } break; case OpReturnValue: eval( node->left ); setReturn(); exitRoutineFlag = 1; break; case OpReturnSetValue: eval( node->left ); setReturn(); break; case OpShl: eval( node->left ); eval( node->right ); n2 = popNumber(); n1 = popNumber(); pushNumber( (long)n1 << (long)n2 ); break; case OpShr: eval( node->left ); eval( node->right ); n2 = popNumber(); n1 = popNumber(); pushNumber( (long)n1 >> (long)n2 ); break; case OpString: pushStringCopy( node->value.string ); break; case OpSub: eval( node->left ); eval( node->right ); n2 = popNumber(); n1 = popNumber(); pushNumber( n1 - n2 ); break; case OpUndefined: ePrintf( Runtime, "Opcode is undefined" ); break; case OpVar: /* check type */ getVar( node->value.symbol ); if (getStackType(tos) == DATA_UNDEFINED) { ePrintf( Runtime, "the value of %s is undefined", node->value.symbol->name ); } break; case OpWhile: while (1) { /* test */ eval( node->left ); if (!popNumber()){ break; } /* code */ eval( node->right ); if (exitWhileFlag != 0) { exitWhileFlag = 0; break; } else if (continueFlag) { continueFlag = 0; } } break; case OpXor: eval( node->left ); eval( node->right ); n2 = popNumber(); n1 = popNumber(); pushNumber( (long)n1 ^ (long)n2 ); break; default: ePrintf( Runtime, "Unknown Opcode: %d", node->op ); } } usr/src/sdlBasic/src/sdlBrt/sdlBrt.c0000755000076500007660000002365210641360114014563 0ustar /* Name: sdlBrt.c Purpose: Core (wxBasic) version for sdlBasic Author: David Cuny modify __vroby__ <__vroby__@libero.it> Copyright: (c) 2001 David Cuny Licence: LGPL */ /* #define __DEBUG_MEMORY__ #define __DEBUG_TRACE__ */ #include "sdlBrt.h" #include "shared.c" /* shared routines */ #include "trace.c" /* tracing code */ #include "error.c" /* error messages and 'safe' routines */ #include "stack.c" /* integer stack */ #include "data.c" /* data types */ #include "symbol.c" /* symbol table */ #include "var.c" /* variables */ #include "array.c" /* array structures */ #include "node.c" /* parse tree data structure */ #include "builtin.c" /* builtin routines */ #include "const.c" /* builtin constants */ #include "eval.c" /* parse tree evaluator */ #include "y_tab.c" /* bison parser */ #include "keyword.c" /* keywords (defined in grammar file) */ #include "lexer.c" /* lexer */ #include "class.c" /* class wrappers */ //____________________________________________________________________________________________________________________ /* get command line args, return offset if main file is tagged */ long findBind( char *title) { FILE *file; char tag[32]; long tagOffset; /* get the name of the *this* file */ file = fopen( title, "r" ); if (file == NULL) { ePrintf( Init, "Can't open file %s", title); } /* look to see if it ends with a bind tag */ fseek( file, -18, 2 ); fgets( tag, 18, file ); fclose( file ); /* examine the tag */ if (strcspn(tag,"bind") != 0) { /* parse the number */ sscanf( tag+2, "%ld", &tagOffset ); //tagOffset=0; printf("tagoffset:%ld\n",tagOffset); if (tagOffset == 0) { ePrintf( Init, "Tag in %s is corrupt %d", title); exit(2); } /* return the offset */ return tagOffset; } else { /* no offset */ return 0; } } //____________________________________________________________________________________________________________________ int interpret( int cmdArgc, char **cmdArgv ) { int i,r; long offset; /* initialize */ argCountStack = newStack(32); /* count of parameters */ blockStack = newStack(32); /* control block stack */ lineStack = newStack(32); /* current line number */ sharedStack = newStack(128); /* list of shared variables */ currentScope = NULL; /* routine being defined */ oldScopeP=0; /* intial oldScope=0 */ oldScope[oldScopeP]=currentScope; /*oldScope0 =NULL */ currentType = NULL; /* no type being defined */ initKeywords(); /* builtin keywords */ initBuiltins(); /* builtin functions */ initConsts(); /* builtin constants */ // if name of executable <> sdlBrt =autoboot r=strlen(cmdArgv[0]); #ifdef UNIX if (strncasecmp(cmdArgv[0]+(r-6),"sdlbrt",6)!=0 ){ #else if (strnicmp(cmdArgv[0]+(r-10),"sdlbrt.exe",10)!=0 && strnicmp(cmdArgv[0]+(r-6),"sdlbrt",6)!=0 ){ #endif /* load the bindfile */ offset=findBind( cmdArgv[0]); if (offset!=0){ if (!pushIncludeFile( cmdArgv[0], offset )){ ePrintf( Init, "File not found\n"); return -1; } } else{ #ifdef UNIX cmdArgv[cmdArgc]=(char *)malloc(strlen(cmdArgv[0])+16); strcpy(cmdArgv[cmdArgc],cmdArgv[0]); strcat(cmdArgv[cmdArgc],".sdlbas\0"); #else cmdArgv[cmdArgc]=(char *)malloc(strlen(cmdArgv[0])+16); strncpy(cmdArgv[cmdArgc],cmdArgv[0],strlen(cmdArgv[0])-4 ); strcat(cmdArgv[cmdArgc],".sdlbas\0"); #endif if (!pushIncludeFile( cmdArgv[cmdArgc], 0 )){ ePrintf( Init, "File not found\n"); return -1; } } /* shift args over by 1 */ cmdArgc++; for ( i = cmdArgc; i > 0; i-- ) { cmdArgv[i] = cmdArgv[i-1]; } /* first arg is "sdlbrt" */ strcpy(cmdArgv[0] ,"sdlBrt" ); } else{ if(cmdArgc>1){ if (!fileExist(cmdArgv[1]) ){ ePrintf( Init,"%s: file not found ....\n",cmdArgv[1]); exit(2); } } /* load the file */ if (!pushIncludeFile( cmdArgv[1], 0 )) { ePrintf( Init, "File not found\n"); return -1; } } /* parse the file */ yyparse(); /* deferred? */ if (deferredCode != NULL) { eval( deferredCode ); freeNode( deferredCode ); } return 0; } //____________________________________________________________________________________________________________________ int main(int argc, char **argv) { int r,r1; char *curdir; int audio,socket,debug,defaults; /* default settings */ audio=1; socket=1; defaults=1; debug=0; remove("sdlBasic.err"); /* the command line param */ r1=0; for (r=0;r // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include "Platform.h" #if PLAT_GTK #include #include #endif #if PLAT_WIN #define _WIN32_WINNT 0x0400 #ifdef _MSC_VER // windows.h, et al, use a lot of nameless struct/unions - can't fix it, so allow it #pragma warning(disable: 4201) #endif #include #ifdef _MSC_VER // okay, that's done, don't allow it in our code #pragma warning(default: 4201) #endif #include // For chdir #ifdef _MSC_VER #include #endif #ifdef __BORLANDC__ #include #endif #ifdef __DMC__ #include #endif #endif #include "SciTE.h" #include "PropSet.h" #include "Accessor.h" #include "WindowAccessor.h" #include "KeyWords.h" #include "Scintilla.h" #include "SciLexer.h" #include "Extender.h" #include "SciTEBase.h" const char recentFileName[] = "sdlBasic.recent"; const char defaultSessionFileName[] = "sdlBasic.ses"; Job::Job() { Clear(); } void Job::Clear() { command = ""; directory = ""; jobType = jobCLI; input = ""; flags = 0; } bool FilePath::SameNameAs(const char *other) const { #ifdef WIN32 return EqualCaseInsensitive(fileName.c_str(), other); #else return fileName == other; #endif } bool FilePath::SameNameAs(const FilePath &other) const { return SameNameAs(other.fileName.c_str()); } bool FilePath::IsUntitled() const { return IsUntitledFileName(fileName.c_str()); } const char *FilePath::FullPath() const { return fileName.c_str(); } BufferList::BufferList() : current(0), buffers(0), size(0), length(0) {} BufferList::~BufferList() { delete []buffers; } void BufferList::Allocate(int maxSize) { length = 1; current = 0; size = maxSize; buffers = new Buffer[size]; } int BufferList::Add() { if (length < size) { length++; } buffers[length - 1].Init(); return length - 1; } int BufferList::GetDocumentByName(const char *filename) { if (!filename || !filename[0]) { return -1; } for (int i = 0;i < length;i++) { if (buffers[i].SameNameAs(filename)) { return i; } } return -1; } void BufferList::RemoveCurrent() { // Delete and move up to fill gap but ensure doc pointer is saved. int currentDoc = buffers[current].doc; for (int i = current;i < length - 1;i++) { buffers[i] = buffers[i + 1]; } buffers[length - 1].doc = currentDoc; if (length > 1) { length--; buffers[length].Init(); if (current >= length) { SetCurrent(length - 1); } if (current < 0) { SetCurrent(0); } } else { buffers[current].Init(); } } int BufferList::Current() { return current; } void BufferList::SetCurrent(int index) { current = index; } sptr_t SciTEBase::GetDocumentAt(int index) { if (index < 0 || index >= buffers.size) { //Platform::DebugPrintf("SciTEBase::GetDocumentAt: Index out of range.\n"); return 0; } if (buffers.buffers[index].doc == 0) { // Create a new document buffer buffers.buffers[index].doc = SendEditor(SCI_CREATEDOCUMENT, 0, 0); } return buffers.buffers[index].doc; } void SciTEBase::SetDocumentAt(int index) { int currentbuf = buffers.Current(); if ( index < 0 || index >= buffers.length || index == currentbuf || currentbuf < 0 || currentbuf >= buffers.length) { return; } UpdateBuffersCurrent(); buffers.SetCurrent(index); if (extender) { if (buffers.size > 1) extender->ActivateBuffer(index); else extender->InitBuffer(0); } Buffer bufferNext = buffers.buffers[buffers.Current()]; isDirty = bufferNext.isDirty; useMonoFont = bufferNext.useMonoFont; unicodeMode = bufferNext.unicodeMode; fileModTime = bufferNext.fileModTime; overrideExtension = bufferNext.overrideExtension; SetFileName(bufferNext.FullPath()); SendEditor(SCI_SETDOCPOINTER, 0, GetDocumentAt(buffers.Current())); SetWindowName(); ReadProperties(); if (unicodeMode != uni8Bit) { // Override the code page if Unicode codePage = SC_CP_UTF8; SendEditor(SCI_SETCODEPAGE, codePage); } isReadOnly = SendEditor(SCI_GETREADONLY); // check to see whether there is saved fold state, restore bufferNext.foldState.BeginIteration(); // Platform::DebugPrintf("Restoring fold state... (%d states)", count); int line = 0; bool folded = false; while (bufferNext.foldState.GetState(&line, &folded)) { bool expanded = SendEditor(SCI_GETFOLDEXPANDED, line); // set line to state folded if (folded && !expanded) { SendEditor(SCI_TOGGLEFOLD, line); } if (!folded && expanded) { SendEditor(SCI_TOGGLEFOLD, line); } } #if PLAT_WIN // Tab Bar ::SendMessage(reinterpret_cast(wTabBar.GetID()), TCM_SETCURSEL, (WPARAM)index, (LPARAM)0); #endif #if PLAT_GTK if (wTabBar.GetID()) gtk_notebook_set_page(GTK_NOTEBOOK(wTabBar.GetID()), index); #endif if (lineNumbers && lineNumbersExpand) SetLineNumberWidth(); DisplayAround(bufferNext); CheckMenus(); UpdateStatusBar(true); if (extender) { extender->OnSwitchFile(fullPath); } } void SciTEBase::UpdateBuffersCurrent() { int currentbuf = buffers.Current(); if ((buffers.length > 0) && (currentbuf >= 0)) { buffers.buffers[currentbuf].Set(fullPath); buffers.buffers[currentbuf].selection = GetSelection(); buffers.buffers[currentbuf].scrollPosition = GetCurrentScrollPosition(); buffers.buffers[currentbuf].isDirty = isDirty; buffers.buffers[currentbuf].useMonoFont = useMonoFont; buffers.buffers[currentbuf].fileModTime = fileModTime; buffers.buffers[currentbuf].overrideExtension = overrideExtension; buffers.buffers[currentbuf].unicodeMode = unicodeMode; // retrieve fold state and store in buffer state info int maxLine = SendEditor(SCI_GETLINECOUNT); int foldPoints = 0; for (int line = 0; line < maxLine; line++) { int level = SendEditor(SCI_GETFOLDLEVEL, line); if (level & SC_FOLDLEVELHEADERFLAG) { foldPoints ++; } } FoldState* f = &buffers.buffers[currentbuf].foldState; f->Clear(); if (foldPoints > 0) { // Platform::DebugPrintf("Retrieving %d fold points and storing them...", foldPoints); f->Alloc(foldPoints); for (int line = 0; line < maxLine; line++) { int level = SendEditor(SCI_GETFOLDLEVEL, line); if (level & SC_FOLDLEVELHEADERFLAG) { bool expanded = SendEditor(SCI_GETFOLDEXPANDED, line); f->PushState(line, expanded); } } } } } bool SciTEBase::IsBufferAvailable() { return buffers.size > 1 && buffers.length < buffers.size; } bool SciTEBase::CanMakeRoom(bool maySaveIfDirty) { if (IsBufferAvailable()) { return true; } else if (maySaveIfDirty) { // All available buffers are taken, try and close the current one if (SaveIfUnsure(true) != IDCANCEL) { // The file isn't dirty, or the user agreed to close the current one return true; } } else { return true; // Told not to save so must be OK. } return false; } bool IsUntitledFileName(const char *name) { const char *dirEnd = strrchr(name, pathSepChar); return !dirEnd || !dirEnd[1]; } void SciTEBase::ClearDocument() { SendEditor(SCI_CLEARALL); SendEditor(SCI_EMPTYUNDOBUFFER); SendEditor(SCI_SETSAVEPOINT); } void SciTEBase::InitialiseBuffers() { if (buffers.size == 0) { int buffersWanted = props.GetInt("buffers"); if (buffersWanted > bufferMax) { buffersWanted = bufferMax; } if (buffersWanted < 1) { buffersWanted = 1; } buffers.Allocate(buffersWanted); // First document is the default from creation of control buffers.buffers[0].doc = SendEditor(SCI_GETDOCPOINTER, 0, 0); SendEditor(SCI_ADDREFDOCUMENT, 0, buffers.buffers[0].doc); // We own this reference if (buffersWanted == 1) { // No buffers, delete the Buffers main menu entry DestroyMenuItem(menuBuffers, 0); #if PLAT_WIN // Make previous change visible. ::DrawMenuBar(reinterpret_cast(wSciTE.GetID())); #endif // Destroy command "View Tab Bar" in the menu "View" DestroyMenuItem(menuView, IDM_VIEWTABBAR); } } } static void EnsureEndsWithPathSeparator(char *path) { size_t pathLen = strlen(path); if ((pathLen > 0) && path[pathLen - 1] != pathSepChar) { strcat(path, pathSepString); } } static void RecentFilePath(char *path, const char *name) { char *where = getenv("SciTE_HOME"); if (!where) where = getenv("HOME"); #if PLAT_WIN where="../share/sdlBasic"; #endif if (!where) { #if PLAT_WIN ::GetModuleFileName(0, path, MAX_PATH); char *lastSlash = strrchr(path, pathSepChar); if (lastSlash) *(lastSlash + 1) = '\0'; #else *path = '\0'; #endif } else { strcpy(path, where); EnsureEndsWithPathSeparator(path); } strcat(path, configFileVisibilityString); strcat(path, name); } void SciTEBase::LoadRecentMenu() { char recentPathName[MAX_PATH + 1]; RecentFilePath(recentPathName, recentFileName); FILE *recentFile = fopen(recentPathName, fileRead); if (!recentFile) { DeleteFileStackMenu(); return; } char line[MAX_PATH + 1]; CharacterRange cr; cr.cpMin = cr.cpMax = 0; for (int i = 0; i < fileStackMax; i++) { if (!fgets (line, sizeof (line), recentFile)) break; line[strlen (line) - 1] = '\0'; AddFileToStack(line, cr, 0); } fclose(recentFile); } void SciTEBase::SaveRecentStack() { char recentPathName[MAX_PATH + 1]; RecentFilePath(recentPathName, recentFileName); FILE *recentFile = fopen(recentPathName, fileWrite); if (!recentFile) return; int i; // save recent files list for (i = fileStackMax - 1; i >= 0; i--) { if (recentFileStack[i].IsSet()) fprintf(recentFile, "%s\n", recentFileStack[i].FullPath()); } // save buffers list for (i = buffers.length - 1; i >= 0; i--) { if (buffers.buffers[i].IsSet()) fprintf(recentFile, "%s\n", buffers.buffers[i].FullPath()); } fclose(recentFile); } void SciTEBase::LoadSession(const char *sessionName) { char sessionPathName[MAX_PATH + 1]; if (sessionName[0] == '\0') { RecentFilePath(sessionPathName, defaultSessionFileName); } else { strcpy(sessionPathName, sessionName); } FILE *sessionFile = fopen(sessionPathName, fileRead); if (!sessionFile) return; // comment next line if you don't want to close all buffers before loading session CloseAllBuffers(true); int curr = -1, pos = 0; char *file, line[MAX_PATH + 128]; for (int i = 0; i < bufferMax; i++) { if (!fgets (line, sizeof (line), sessionFile)) break; line[strlen (line) - 1] = '\0'; if (sscanf(line, "", &pos) != 1) break; file = strchr(line, '>') + 2; //Platform::DebugPrintf("pos=%i file=:%s:", pos, file); if (pos < 0) { curr = i; pos = -pos; } AddFileToBuffer(file, pos - 1); } fclose(sessionFile); if (!IsAbsolutePath(sessionPathName)) AbsolutePath(sessionPathName, sessionPathName, MAX_PATH); // add/update SessionPath environment variable props.Set("SessionPath", sessionPathName); if (curr != -1) SetDocumentAt(curr); } void SciTEBase::SaveSession(const char *sessionName) { char sessionPathName[MAX_PATH + 1]; if (sessionName[0] == '\0') { RecentFilePath(sessionPathName, defaultSessionFileName); } else { strcpy(sessionPathName, sessionName); } FILE *sessionFile = fopen(sessionPathName, fileWrite); if (!sessionFile) return; int curr = buffers.Current(); for (int i = 0; i < buffers.length; i++) { if (buffers.buffers[i].IsSet() && !buffers.buffers[i].IsUntitled()) { int pos; SetDocumentAt(i); pos = SendEditor(SCI_GETCURRENTPOS) + 1; if (i == curr) pos = -pos; fprintf(sessionFile, " %s\n", pos, buffers.buffers[i].FullPath()); } } fclose(sessionFile); if (!IsAbsolutePath(sessionPathName)) AbsolutePath(sessionPathName, sessionPathName, MAX_PATH); // add/update SessionPath environment variable props.Set("SessionPath", sessionPathName); SetDocumentAt(curr); } void SciTEBase::SetIndentSettings() { // Get default values int useTabs = props.GetInt("use.tabs", 1); int tabSize = props.GetInt("tabsize"); int indentSize = props.GetInt("indent.size"); // Either set the settings related to the extension or the default ones SString fileNameForExtension = ExtensionFileName(); SString useTabsChars = props.GetNewExpand("use.tabs.", fileNameForExtension.c_str()); if (useTabsChars.length() != 0) { SendEditor(SCI_SETUSETABS, useTabsChars.value()); } else { SendEditor(SCI_SETUSETABS, useTabs); } SString tabSizeForExt = props.GetNewExpand("tab.size.", fileNameForExtension.c_str()); if (tabSizeForExt.length() != 0) { SendEditor(SCI_SETTABWIDTH, tabSizeForExt.value()); } else if (tabSize != 0) { SendEditor(SCI_SETTABWIDTH, tabSize); } SString indentSizeForExt = props.GetNewExpand("indent.size.", fileNameForExtension.c_str()); if (indentSizeForExt.length() != 0) { SendEditor(SCI_SETINDENT, indentSizeForExt.value()); } else { SendEditor(SCI_SETINDENT, indentSize); } } void SciTEBase::SetEol() { SString eol_mode = props.Get("eol.mode"); if (eol_mode == "LF") { SendEditor(SCI_SETEOLMODE, SC_EOL_LF); } else if (eol_mode == "CR") { SendEditor(SCI_SETEOLMODE, SC_EOL_CR); } else if (eol_mode == "CRLF") { SendEditor(SCI_SETEOLMODE, SC_EOL_CRLF); } } void SciTEBase::New() { InitialiseBuffers(); UpdateBuffersCurrent(); if ((buffers.size == 1) && (!buffers.buffers[0].IsUntitled())) { AddFileToStack(buffers.buffers[0].FullPath(), buffers.buffers[0].selection, buffers.buffers[0].scrollPosition); } // If the current buffer is the initial untitled, clean buffer then overwrite it, // otherwise add a new buffer. if ((buffers.length > 1) || (buffers.Current() != 0) || (buffers.buffers[0].isDirty) || (!buffers.buffers[0].IsUntitled())) { if (buffers.size == buffers.length) { Close(false, false, true); } buffers.SetCurrent(buffers.Add()); } sptr_t doc = GetDocumentAt(buffers.Current()); SendEditor(SCI_SETDOCPOINTER, 0, doc); fullPath[0] = '\0'; fileName[0] = '\0'; fileExt[0] = '\0'; dirName[0] = '\0'; SetFileName(fileName); isDirty = false; isBuilding = false; isBuilt = false; isReadOnly = false; // No sense to create an empty, read-only buffer... ClearDocument(); DeleteFileStackMenu(); SetFileStackMenu(); if (extender) extender->InitBuffer(buffers.Current()); } void SciTEBase::Close(bool updateUI, bool loadingSession, bool makingRoomForNew) { bool closingLast = false; if (buffers.size == 1) { // With no buffer list, Close means close from MRU closingLast = !(recentFileStack[0].IsSet()); buffers.buffers[0].Init(); buffers.buffers[0].useMonoFont = useMonoFont; fullPath[0] = '\0'; ClearDocument(); //avoid double are-you-sure if (!makingRoomForNew) StackMenu(0); // calls New, or Open, which calls InitBuffer } else if (buffers.size > 1) { if (buffers.Current() >= 0 && buffers.Current() < buffers.length) { UpdateBuffersCurrent(); Buffer buff = buffers.buffers[buffers.Current()]; AddFileToStack(buff.FullPath(), buff.selection, buff.scrollPosition); } closingLast = (buffers.length == 1); if (closingLast) { buffers.buffers[0].Init(); buffers.buffers[0].useMonoFont = useMonoFont; if (extender) extender->InitBuffer(0); } else { extender->RemoveBuffer(buffers.Current()); buffers.RemoveCurrent(); if (extender && !makingRoomForNew) extender->ActivateBuffer(buffers.Current()); } Buffer bufferNext = buffers.buffers[buffers.Current()]; isDirty = bufferNext.isDirty; useMonoFont = bufferNext.useMonoFont; unicodeMode = bufferNext.unicodeMode; fileModTime = bufferNext.fileModTime; overrideExtension = bufferNext.overrideExtension; if (updateUI) SetFileName(bufferNext.FullPath()); SendEditor(SCI_SETDOCPOINTER, 0, GetDocumentAt(buffers.Current())); if (closingLast) { ClearDocument(); } if (updateUI) { SetWindowName(); ReadProperties(); if (unicodeMode != uni8Bit) { // Override the code page if Unicode codePage = SC_CP_UTF8; SendEditor(SCI_SETCODEPAGE, codePage); } isReadOnly = SendEditor(SCI_GETREADONLY); // check to see whether there is saved fold state, restore bufferNext.foldState.BeginIteration(); int line = 0; bool folded = false; while (bufferNext.foldState.GetState(&line, &folded)) { bool expanded = SendEditor(SCI_GETFOLDEXPANDED, line); // set line to state folded if (folded && !expanded) { SendEditor(SCI_TOGGLEFOLD, line); } if (!folded && expanded) { SendEditor(SCI_TOGGLEFOLD, line); } } DisplayAround(bufferNext); } } if (updateUI) { BuffersMenu(); UpdateStatusBar(true); } if (closingLast && props.GetInt("quit.on.close.last") && !loadingSession) { QuitProgram(); } } void SciTEBase::CloseAllBuffers(bool loadingSession) { if (SaveAllBuffers(false) != IDCANCEL) { while (buffers.length > 1) Close(false, loadingSession); Close(true, loadingSession); } } int SciTEBase::SaveAllBuffers(bool forceQuestion, bool alwaysYes) { int choice = IDYES; UpdateBuffersCurrent(); // Ensure isDirty copied int currentBuffer = buffers.Current(); for (int i = 0; (i < buffers.length) && (choice != IDCANCEL); i++) { if (buffers.buffers[i].isDirty) { SetDocumentAt(i); if (alwaysYes) { if (!Save()) { choice = IDCANCEL; } } else { choice = SaveIfUnsure(forceQuestion); } } } SetDocumentAt(currentBuffer); return choice; } void SciTEBase::SaveTitledBuffers() { UpdateBuffersCurrent(); // Ensure isDirty copied int currentBuffer = buffers.Current(); for (int i = 0; i < buffers.length; i++) { if (buffers.buffers[i].isDirty && !buffers.buffers[i].IsUntitled()) { SetDocumentAt(i); Save(); } } SetDocumentAt(currentBuffer); } void SciTEBase::Next() { int next = buffers.Current(); if (++next >= buffers.length) next = 0; SetDocumentAt(next); CheckReload(); } void SciTEBase::Prev() { int prev = buffers.Current(); if (--prev < 0) prev = buffers.length - 1; SetDocumentAt(prev); CheckReload(); } void SciTEBase::BuffersMenu() { UpdateBuffersCurrent(); DestroyMenuItem(menuBuffers, IDM_BUFFERSEP); #if PLAT_WIN ::SendMessage(reinterpret_cast(wTabBar.GetID()), TCM_DELETEALLITEMS, (WPARAM)0, (LPARAM)0); #endif #if PLAT_GTK if (wTabBar.GetID()) { GtkWidget *tab; while ((tab = gtk_notebook_get_nth_page(GTK_NOTEBOOK(wTabBar.GetID()), 0))) gtk_notebook_remove_page(GTK_NOTEBOOK(wTabBar.GetID()), 0); } #endif int pos; for (pos = 0; pos < bufferMax; pos++) { DestroyMenuItem(menuBuffers, IDM_BUFFER + pos); } if (buffers.size > 1) { int menuStart = 5; SetMenuItem(menuBuffers, menuStart, IDM_BUFFERSEP, ""); for (pos = 0; pos < buffers.length; pos++) { int itemID = bufferCmdID + pos; char entry[MAX_PATH*2 + 20]; entry[0] = '\0'; char titleTab[MAX_PATH*2 + 20]; titleTab[0] = '\0'; #if PLAT_WIN if (pos < 10) { sprintf(entry, "&%d ", (pos + 1) % 10 ); // hotkey 1..0 sprintf(titleTab, "&%d ", (pos + 1) % 10); // add hotkey to the tabbar } #endif if (buffers.buffers[pos].IsUntitled()) { SString untitled = LocaliseString("Untitled"); strcat(entry, untitled.c_str()); strcat(titleTab, untitled.c_str()); } else { SString path = buffers.buffers[pos].FullPath(); #if PLAT_WIN // Handle '&' characters in path, since they are interpreted in // menues and tab names. int amp = 0; while ((amp = path.search("&", amp)) >= 0) { path.insert(amp, "&"); amp += 2; } #endif strcat(entry, path.c_str()); char *cpDirEnd = strrchr(entry, pathSepChar); if (cpDirEnd) { strcat(titleTab, cpDirEnd + 1); } else { strcat(titleTab, entry); } } // For short file names: //char *cpDirEnd = strrchr(buffers.buffers[pos]->fileName, pathSepChar); //strcat(entry, cpDirEnd + 1); if (buffers.buffers[pos].isDirty) { strcat(entry, " *"); strcat(titleTab, " *"); } SetMenuItem(menuBuffers, menuStart + pos + 1, itemID, entry); #if PLAT_WIN // Windows specific ! TCITEM tie; tie.mask = TCIF_TEXT | TCIF_IMAGE; tie.iImage = -1; tie.pszText = titleTab; ::SendMessage(reinterpret_cast(wTabBar.GetID()), TCM_INSERTITEM, (WPARAM)pos, (LPARAM)&tie); //::SendMessage(wTabBar.GetID(), TCM_SETCURSEL, (WPARAM)pos, (LPARAM)0); #endif #if PLAT_GTK if (wTabBar.GetID()) { GtkWidget *tablabel, *tabcontent; tablabel = gtk_label_new(titleTab); if (buffers.buffers[pos].IsUntitled()) tabcontent = gtk_label_new(LocaliseString("Untitled").c_str()); else tabcontent = gtk_label_new(buffers.buffers[pos].FullPath()); gtk_widget_show(tablabel); gtk_widget_show(tabcontent); gtk_notebook_append_page(GTK_NOTEBOOK(wTabBar.GetID()), tabcontent, tablabel); } #endif } } CheckMenus(); #if PLAT_WIN if (tabVisible) SizeSubWindows(); #endif #if PLAT_GTK ShowTabBar(); #endif } void SciTEBase::DeleteFileStackMenu() { for (int stackPos = 0; stackPos < fileStackMax; stackPos++) { DestroyMenuItem(menuFile, fileStackCmdID + stackPos); } DestroyMenuItem(menuFile, IDM_MRU_SEP); } void SciTEBase::SetFileStackMenu() { if (recentFileStack[0].IsSet()) { SetMenuItem(menuFile, MRU_START, IDM_MRU_SEP, ""); for (int stackPos = 0; stackPos < fileStackMax; stackPos++) { //Platform::DebugPrintf("Setfile %d %s\n", stackPos, recentFileStack[stackPos].fileName.c_str()); int itemID = fileStackCmdID + stackPos; if (recentFileStack[stackPos].IsSet()) { char entry[MAX_PATH + 20]; entry[0] = '\0'; #if PLAT_WIN sprintf(entry, "&%d ", (stackPos + 1) % 10); #endif strcat(entry, recentFileStack[stackPos].FullPath()); SetMenuItem(menuFile, MRU_START + stackPos + 1, itemID, entry); } } } } void SciTEBase::DropFileStackTop() { DeleteFileStackMenu(); for (int stackPos = 0; stackPos < fileStackMax - 1; stackPos++) recentFileStack[stackPos] = recentFileStack[stackPos + 1]; recentFileStack[fileStackMax - 1].Init(); SetFileStackMenu(); } void SciTEBase::AddFileToBuffer(const char *file, int pos) { FILE *fp = fopen(file, fileRead); // file existence test if (fp) { // for missing files Open() gives an empty buffer - do not want this fclose(fp); Open(file, ofForceLoad); SendEditor(SCI_GOTOPOS, pos); } } void SciTEBase::AddFileToStack(const char *file, CharacterRange selection, int scrollPos) { if (!file) return; DeleteFileStackMenu(); // Only stack non-empty names if ((file[0]) && (file[strlen(file) - 1] != pathSepChar)) { int stackPos; int eqPos = fileStackMax - 1; for (stackPos = 0; stackPos < fileStackMax; stackPos++) if (recentFileStack[stackPos].SameNameAs(file)) eqPos = stackPos; for (stackPos = eqPos; stackPos > 0; stackPos--) recentFileStack[stackPos] = recentFileStack[stackPos - 1]; recentFileStack[0].Set(file); recentFileStack[0].selection = selection; recentFileStack[0].scrollPosition = scrollPos; } SetFileStackMenu(); } void SciTEBase::RemoveFileFromStack(const char *file) { if (!file || !file[0]) return; DeleteFileStackMenu(); int stackPos; for (stackPos = 0; stackPos < fileStackMax; stackPos++) { if (recentFileStack[stackPos].SameNameAs(file)) { for (int movePos = stackPos; movePos < fileStackMax - 1; movePos++) recentFileStack[movePos] = recentFileStack[movePos + 1]; recentFileStack[fileStackMax - 1].Init(); break; } } SetFileStackMenu(); } RecentFile SciTEBase::GetFilePosition() { RecentFile rf; rf.selection = GetSelection(); rf.scrollPosition = GetCurrentScrollPosition(); return rf; } void SciTEBase::DisplayAround(const RecentFile &rf) { if ((rf.selection.cpMin != INVALID_POSITION) && (rf.selection.cpMax != INVALID_POSITION)) { // This can produce better file state restoring bool foldOnOpen = props.GetInt("fold.on.open"); //~ if (foldOnOpen) //~ FoldAll(); int lineStart = SendEditor(SCI_LINEFROMPOSITION, rf.selection.cpMin); SendEditor(SCI_ENSUREVISIBLEENFORCEPOLICY, lineStart); int lineEnd = SendEditor(SCI_LINEFROMPOSITION, rf.selection.cpMax); SendEditor(SCI_ENSUREVISIBLEENFORCEPOLICY, lineEnd); SetSelection(rf.selection.cpMax, rf.selection.cpMin); // Folding can mess up next scrolling, so will be better without scrolling if (!foldOnOpen) { int curTop = SendEditor(SCI_GETFIRSTVISIBLELINE); int lineTop = SendEditor(SCI_VISIBLEFROMDOCLINE, rf.scrollPosition); SendEditor(SCI_LINESCROLL, 0, lineTop - curTop); } } } // Next and Prev file comments. // Decided that "Prev" file should mean the file you had opened last // This means "Next" file means the file you opened longest ago. void SciTEBase::StackMenuNext() { DeleteFileStackMenu(); for (int stackPos = fileStackMax - 1; stackPos >= 0;stackPos--) { if (recentFileStack[stackPos].IsSet()) { SetFileStackMenu(); StackMenu(stackPos); return; } } SetFileStackMenu(); } void SciTEBase::StackMenuPrev() { if (recentFileStack[0].IsSet()) { // May need to restore last entry if removed by StackMenu RecentFile rfLast = recentFileStack[fileStackMax - 1]; StackMenu(0); // Swap current with top of stack for (int checkPos = 0; checkPos < fileStackMax; checkPos++) { if (rfLast.SameNameAs(recentFileStack[checkPos])) { rfLast.Init(); } } // And rotate the MRU RecentFile rfCurrent = recentFileStack[0]; // Move them up for (int stackPos = 0; stackPos < fileStackMax - 1; stackPos++) { recentFileStack[stackPos] = recentFileStack[stackPos + 1]; } recentFileStack[fileStackMax - 1].Init(); // Copy current file into first empty for (int emptyPos = 0; emptyPos < fileStackMax; emptyPos++) { if (!recentFileStack[emptyPos].IsSet()) { if (rfLast.IsSet()) { recentFileStack[emptyPos] = rfLast; rfLast.Init(); } else { recentFileStack[emptyPos] = rfCurrent; break; } } } DeleteFileStackMenu(); SetFileStackMenu(); } } void SciTEBase::StackMenu(int pos) { //Platform::DebugPrintf("Stack menu %d\n", pos); if (CanMakeRoom(true)) { if (pos >= 0) { if ((pos == 0) && (!recentFileStack[pos].IsSet())) { // Empty New(); SetWindowName(); ReadProperties(); SetIndentSettings(); } else if (recentFileStack[pos].IsSet()) { RecentFile rf = recentFileStack[pos]; //Platform::DebugPrintf("Opening pos %d %s\n",recentFileStack[pos].lineNumber,recentFileStack[pos].fileName); overrideExtension = ""; // Already asked user so don't allow Open to ask again. Open(rf.FullPath(), ofNoSaveIfDirty); DisplayAround(rf); } } } } void SciTEBase::RemoveToolsMenu() { for (int pos = 0; pos < toolMax; pos++) { DestroyMenuItem(menuTools, IDM_TOOLS + pos); } } void SciTEBase::SetMenuItemLocalised(int menuNumber, int position, int itemID, const char *text, const char *mnemonic) { SString localised = LocaliseString(text); SetMenuItem(menuNumber, position, itemID, localised.c_str(), mnemonic); } void SciTEBase::SetToolsMenu() { //command.name.0.*.py=Edit in PythonWin //command.0.*.py="c:\program files\python\pythonwin\pythonwin" /edit c:\coloreditor.py RemoveToolsMenu(); int menuPos = TOOLS_START; for (int item = 0; item < toolMax; item++) { int itemID = IDM_TOOLS + item; SString prefix = "command.name."; prefix += SString(item); prefix += "."; SString commandName = props.GetNewExpand(prefix.c_str(), fileName); if (commandName.length()) { SString sMenuItem = commandName; prefix = "command.shortcut."; prefix += SString(item); prefix += "."; SString sMnemonic = props.GetNewExpand(prefix.c_str(), fileName); if (item < 10 && sMnemonic.length() == 0) { sMnemonic += "Ctrl+"; sMnemonic += SString(item); } SetMenuItem(menuTools, menuPos, itemID, sMenuItem.c_str(), sMnemonic[0] ? sMnemonic.c_str() : NULL); menuPos++; } } DestroyMenuItem(menuTools, IDM_MACRO_SEP); DestroyMenuItem(menuTools, IDM_MACROLIST); DestroyMenuItem(menuTools, IDM_MACROPLAY); DestroyMenuItem(menuTools, IDM_MACRORECORD); DestroyMenuItem(menuTools, IDM_MACROSTOPRECORD); menuPos++; if (macrosEnabled) { SetMenuItem(menuTools, menuPos++, IDM_MACRO_SEP, ""); SetMenuItemLocalised(menuTools, menuPos++, IDM_MACROLIST, "&List Macros...", "Shift+F9"); SetMenuItemLocalised(menuTools, menuPos++, IDM_MACROPLAY, "Run Current &Macro", "F9"); SetMenuItemLocalised(menuTools, menuPos++, IDM_MACRORECORD, "&Record Macro", "Ctrl+F9"); SetMenuItemLocalised(menuTools, menuPos++, IDM_MACROSTOPRECORD, "S&top Recording Macro", "Ctrl+Shift+F9"); } } JobSubsystem SciTEBase::SubsystemType(char c) { if (c == '1') return jobGUI; else if (c == '2') return jobShell; else if (c == '3') return jobExtension; else if (c == '4') return jobHelp; else if (c == '5') return jobOtherHelp; return jobCLI; } JobSubsystem SciTEBase::SubsystemType(const char *cmd, int item) { SString subsysprefix = cmd; if (item >= 0) { subsysprefix += SString(item); subsysprefix += "."; } SString subsystem = props.GetNewExpand(subsysprefix.c_str(), fileName); return SubsystemType(subsystem[0]); } void SciTEBase::ToolsMenu(int item) { SelectionIntoProperties(); SString itemSuffix = item; itemSuffix += '.'; SString propName = "command."; propName += itemSuffix; SString command = props.GetWild(propName.c_str(), fileName); if (command.length()) { int saveBefore = 0; JobSubsystem jobType = jobCLI; bool filter = false; bool quiet = false; int repSel = 0; bool groupUndo = false; propName = "command.mode."; propName += itemSuffix; SString modeVal = props.GetNewExpand(propName.c_str(), fileName); modeVal.remove(" "); if (modeVal.length()) { char *modeTags = modeVal.detach(); // copy/paste from style selectors. char *opt = modeTags; while (opt) { // Find attribute separator char *cpComma = strchr(opt, ','); if (cpComma) { // If found, we terminate the current attribute (opt) string *cpComma = '\0'; } // Find attribute name/value separator char *colon = strchr(opt, ':'); if (colon) { // If found, we terminate the current attribute name and point on the value *colon++ = '\0'; } if (0 == strcmp(opt, "subsystem") && colon) { if (colon[0] == '0' || 0==strcmp(colon, "console")) jobType = jobCLI; else if (colon[0] == '1' || 0==strcmp(colon, "windows")) jobType = jobGUI; else if (colon[0] == '2' || 0==strcmp(colon, "shellexec")) jobType = jobShell; else if (colon[0] == '3' || 0==strcmp(colon, "lua") || strcmp(colon, "director")) jobType = jobExtension; else if (colon[0] == '4' || 0==strcmp(colon, "winhelp")) jobType = jobHelp; else if (colon[0] == '5' || 0==strcmp(colon, "htmlhelp")) jobType = jobOtherHelp; } if (0 == strcmp(opt, "quiet")) { if (!colon || colon[0] == '1' || 0==strcmp(colon, "yes")) quiet = true; else if (colon[0] == '0' || 0==strcmp(colon, "no")) quiet = false; } if (0 == strcmp(opt, "savebefore")) { if (!colon || colon[0] == '1' || 0==strcmp(colon, "yes")) saveBefore = 1; else if (colon[0] == '0' || 0==strcmp(colon, "no")) saveBefore = 2; else if (0==strcmp(colon, "prompt")) saveBefore = 0; } if (0 == strcmp(opt, "filter")) { if (!colon || colon[0] == '1' || 0==strcmp(colon, "yes")) filter = true; else if (colon[1] == '0' || 0==strcmp(colon, "no")) filter = false; } if (0 == strcmp(opt, "replaceselection")) { if (!colon || colon[0] == '1' || 0==strcmp(colon, "yes")) repSel = 1; else if (colon[0] == '0' || 0==strcmp(colon, "no")) repSel = 0; else if (0==strcmp(colon, "auto")) repSel = 2; } if (0 == strcmp(opt, "groupundo")) { if (!colon || colon[0] == '1' || 0==strcmp(colon, "yes")) groupUndo = true; else if (colon[0] == '0' || 0==strcmp(colon, "no")) groupUndo = false; } opt = cpComma ? cpComma + 1 : 0; } delete []modeTags; } // The mode flags also have classic properties with similar effect. // If the classic property is specified, it overrides the mode. // To see if the property is absent (as opposed to merely evaluating // to nothing after variable expansion), use GetWild for the // existence check. However, for the value check, use getNewExpand. propName = "command.save.before."; propName += itemSuffix; if (props.GetWild(propName.c_str(), fileName).length()) saveBefore = props.GetNewExpand(propName.c_str(), fileName).value(); if (saveBefore == 2 || (saveBefore == 1 && Save()) || SaveIfUnsure() != IDCANCEL) { int flags = 0; propName = "command.is.filter."; propName += itemSuffix; if (props.GetWild(propName.c_str(), fileName).length()) filter = (props.GetNewExpand(propName.c_str(), fileName)[0]=='1'); if (filter) fileModTime -= 1; propName = "command.subsystem."; propName += itemSuffix; if (props.GetWild(propName.c_str(), fileName).length()) { SString subsystemVal = props.GetNewExpand(propName.c_str(), fileName); jobType = SubsystemType(subsystemVal[0]); } propName = "command.input."; propName += itemSuffix; SString input; if (props.GetWild(propName.c_str(), fileName).length()) { input = props.GetNewExpand(propName.c_str(), fileName); flags |= jobHasInput; } propName = "command.quiet."; propName += itemSuffix; if (props.GetWild(propName.c_str(), fileName).length()) quiet = (props.GetNewExpand(propName.c_str(), fileName).value()==1); if (quiet) flags |= jobQuiet; propName = "command.replace.selection."; propName += itemSuffix; if (props.GetWild(propName.c_str(), fileName).length()) repSel = props.GetNewExpand(propName.c_str(), fileName).value(); if (repSel == 1) flags |= jobRepSelYes; else if (repSel == 2) flags |= jobRepSelAuto; if (groupUndo) flags |= jobGroupUndo; AddCommand(command, "", jobType, input, flags); if (commandCurrent > 0) Execute(); } } } inline bool isdigitchar(int ch) { return (ch >= '0') && (ch <= '9'); } int DecodeMessage(char *cdoc, char *sourcePath, int format, int &column) { sourcePath[0] = '\0'; column= -1; // default to not detected switch (format) { case SCE_ERR_PYTHON: { // Python char *startPath = strchr(cdoc, '\"') + 1; char *endPath = strchr(startPath, '\"'); int length = endPath - startPath; if (length > 0) { strncpy(sourcePath, startPath, length); sourcePath[length] = 0; } endPath++; while (*endPath && !isdigitchar(*endPath)) { endPath++; } int sourceNumber = atoi(endPath) - 1; return sourceNumber; } case SCE_ERR_GCC: { // GCC - look for number after colon to be line number // This will be preceded by file name. // Lua debug traceback messages also piggyback this style, but begin with a tab. if (cdoc[0] == '\t') ++cdoc; for (int i = 0; cdoc[i]; i++) { if (cdoc[i] == ':' && isdigitchar(cdoc[i + 1])) { int sourceNumber = atoi(cdoc + i + 1) - 1; if (i > 0) { strncpy(sourcePath, cdoc, i); sourcePath[i] = 0; } return sourceNumber; } } break; } case SCE_ERR_MS: { // Visual * char *endPath = strchr(cdoc, '('); int length = endPath - cdoc; if ((length > 0) && (length < MAX_PATH)) { strncpy(sourcePath, cdoc, length); sourcePath[length] = 0; } endPath++; return atoi(endPath) - 1; } case SCE_ERR_BORLAND: { // Borland char *space = strchr(cdoc, ' '); if (space) { while (isspacechar(*space)) { space++; } while (*space && !isspacechar(*space)) { space++; } while (isspacechar(*space)) { space++; } char *space2 = NULL; if (strlen(space) > 2) { space2 = strchr(space + 2, ':'); } if (space2) { while (!isspacechar(*space2)) { space2--; } while (isspacechar(*(space2 - 1))) { space2--; } int length = space2 - space; if (length > 0) { strncpy(sourcePath, space, length); sourcePath[length] = '\0'; return atoi(space2) - 1; } } } break; } case SCE_ERR_PERL: { // perl char *at = strstr(cdoc, " at "); char *line = strstr(cdoc, " line "); int length = line - (at + 4); if (at && line && length > 0) { strncpy(sourcePath, at + 4, length); sourcePath[length] = 0; line += 6; return atoi(line) - 1; } break; } case SCE_ERR_NET: { // .NET traceback char *in = strstr(cdoc, " in "); char *line = strstr(cdoc, ":line "); if (in && line && (line > in)) { in += 4; strncpy(sourcePath, in, line - in); sourcePath[line - in] = 0; line += 6; return atoi(line) - 1; } } case SCE_ERR_LUA: { // Lua error look like: last token read: `result' at line 40 in file `Test.lua' char *idLine = "at line "; char *idFile = "file "; size_t lenLine = strlen(idLine); size_t lenFile = strlen(idFile); char *line = strstr(cdoc, idLine); char *file = strstr(cdoc, idFile); if (line && file) { char *quote = strstr(file, "'"); size_t length = quote - (file + lenFile + 1); if (quote && length > 0) { strncpy(sourcePath, file + lenFile + 1, length); sourcePath[length] = '\0'; } line += lenLine; return atoi(line) - 1; } break; } case SCE_ERR_CTAG: { for (int i = 0; cdoc[i]; i++) { if ((isdigitchar(cdoc[i + 1]) || (cdoc[i + 1] == '/' && cdoc[i + 2] == '^')) && cdoc[i] == '\t') { int j = i - 1; while (j > 0 && ! strchr("\t\n\r \"$%'*,;<>?[]^`{|}", cdoc[j])) { j--; } if (strchr("\t\n\r \"$%'*,;<>?[]^`{|}", cdoc[j])) { j++; } strncpy(sourcePath, &cdoc[j], i - j); sourcePath[i - j] = 0; // Because usually the address is a searchPattern, lineNumber has to be evaluated later return 0; } } } case SCE_ERR_PHP: { // PHP error look like: Fatal error: Call to undefined function: foo() in example.php on line 11 char *idLine = " on line "; char *idFile = " in "; size_t lenLine = strlen(idLine); size_t lenFile = strlen(idFile); char *line = strstr(cdoc, idLine); char *file = strstr(cdoc, idFile); if (line && file && (line > file)) { file += lenFile; size_t length = line - file; strncpy(sourcePath, file, length); sourcePath[length] = '\0'; line += lenLine; return atoi(line) - 1; } break; } case SCE_ERR_ELF: { // Essential Lahey Fortran error look like: Line 11, file c:\fortran90\codigo\demo.f90 char *line = strchr(cdoc, ' '); if (line) { while (isspacechar(*line)) { line++; } char *file = strchr(line, ' '); if (file) { while (isspacechar(*file)) { file++; } while (*file && !isspacechar(*file)) { file++; } size_t length = strlen(file); strncpy(sourcePath, file, length); sourcePath[length] = '\0'; return atoi(line) - 1; } } break; } case SCE_ERR_IFC: { /* Intel Fortran Compiler error/warnings look like: * Error 71 at (17:teste.f90) : The program unit has no name * Warning 4 at (9:modteste.f90) : Tab characters are an extension to standard Fortran 95 * * Depending on the option, the error/warning messages can also appear on the form: * modteste.f90(9): Warning 4 : Tab characters are an extension to standard Fortran 95 * * These are trapped by the MS handler, and are identified OK, so no problem... */ char *line = strchr(cdoc, '('); char *file = strchr(line, ':'); if (line && file) { file++; char *endfile = strchr(file, ')'); size_t length = endfile - file; strncpy(sourcePath, file, length); sourcePath[length] = '\0'; line++; return atoi(line) - 1; } break; } case SCE_ERR_ABSF: { // Absoft Pro Fortran 90/95 v8.x, v9.x errors look like: cf90-113 f90fe: ERROR SHF3D, File = shf.f90, Line = 1101, Column = 19 char *idFile = " File = "; char *idLine = ", Line = "; char *idColumn = ", Column = "; size_t lenFile = strlen(idFile); size_t lenLine = strlen(idLine); char *file = strstr(cdoc, idFile); char *line = strstr(cdoc, idLine); char *column = strstr(cdoc, idColumn); if (line && file && (line > file)) { file += lenFile; size_t length = line - file; strncpy(sourcePath, file, length); sourcePath[length] = '\0'; line += lenLine; length = column - line; strncpy(line, line, length); return atoi(line) - 1; } break; } case SCE_ERR_IFORT: { /* Intel Fortran Compiler v8.x error/warnings look like: * fortcom: Error: shf.f90, line 5602: This name does not have ... */ char *idFile = ": Error: "; char *idLine = ", line "; size_t lenFile = strlen(idFile); size_t lenLine = strlen(idLine); char *file = strstr(cdoc, idFile); char *line = strstr(cdoc, idLine); char *lineend = strrchr(cdoc, ':'); if (line && file && (line > file)) { file += lenFile; size_t length = line - file; strncpy(sourcePath, file, length); sourcePath[length] = '\0'; line += lenLine; if ((lineend > line)) { length = lineend - line; strncpy(line, line, length); return atoi(line) - 1; } } break; } case SCE_ERR_TIDY: { /* HTML Tidy error/warnings look like: * line 8 column 1 - Error: unexpected in * line 41 column 1 - Warning: lacks "summary" attribute */ char *line = strchr(cdoc, ' '); if (line) { char *col = strchr(line+1, ' '); if (col) { *col = '\0'; int lnr = atoi(line) - 1; col = strchr(col+1, ' '); if (col) { char *endcol = strchr(col+1, ' '); if (endcol) { *endcol = '\0'; column = atoi(col)-1; return lnr; } } } } break; } case SCE_ERR_JAVA_STACK: { /* Java runtime stack trace \tat (:) */ char *startPath = strchr(cdoc, '(') + 1; char *endPath = strchr(startPath, ':'); int length = endPath - startPath; if (length > 0) { strncpy(sourcePath, startPath, length); sourcePath[length] = 0; int sourceNumber = atoi(endPath+1) - 1; return sourceNumber; } } } // switch return - 1; } void SciTEBase::GoMessage(int dir) { CharacterRange crange; crange.cpMin = SendOutput(SCI_GETSELECTIONSTART); crange.cpMax = SendOutput(SCI_GETSELECTIONEND); int selStart = crange.cpMin; int curLine = SendOutput(SCI_LINEFROMPOSITION, selStart); int maxLine = SendOutput(SCI_GETLINECOUNT); int lookLine = curLine + dir; if (lookLine < 0) lookLine = maxLine - 1; else if (lookLine >= maxLine) lookLine = 0; WindowAccessor acc(wOutput.GetID(), props); while ((dir == 0) || (lookLine != curLine)) { int startPosLine = SendOutput(SCI_POSITIONFROMLINE, lookLine, 0); int lineLength = SendOutput(SCI_LINELENGTH, lookLine, 0); //Platform::DebugPrintf("GOMessage %d %d %d of %d linestart = %d\n", selStart, curLine, lookLine, maxLine, startPosLine); char style = acc.StyleAt(startPosLine); if (style != SCE_ERR_DEFAULT && style != SCE_ERR_CMD && (style < SCE_ERR_DIFF_CHANGED || style > SCE_ERR_DIFF_MESSAGE)) { //Platform::DebugPrintf("Marker to %d\n", lookLine); SendOutput(SCI_MARKERDELETEALL, static_cast(-1)); SendOutput(SCI_MARKERDEFINE, 0, SC_MARK_SMALLRECT); SendOutput(SCI_MARKERSETFORE, 0, ColourOfProperty(props, "error.marker.fore", ColourDesired(0x7f, 0, 0))); SendOutput(SCI_MARKERSETBACK, 0, ColourOfProperty(props, "error.marker.back", ColourDesired(0xff, 0xff, 0))); SendOutput(SCI_MARKERADD, lookLine, 0); SendOutput(SCI_SETSEL, startPosLine, startPosLine); char *cdoc = new char[lineLength + 1]; if (!cdoc) return; GetRange(wOutput, startPosLine, startPosLine + lineLength, cdoc); SString message(cdoc); char sourcePath[MAX_PATH]; int column; int sourceLine = DecodeMessage(cdoc, sourcePath, style, column); //Platform::DebugPrintf("<%s> %d %d\n",sourcePath, sourceLine, lookLine); if (sourceLine >= 0) { if (0 != strcmp(sourcePath, fileName)) { char messagePath[MAX_PATH]; bool bExists = false; if (Exists(dirNameAtExecute.c_str(), sourcePath, messagePath)) { bExists = true; } else if (Exists(dirNameForExecute.c_str(), sourcePath, messagePath)) { bExists = true; } else if (Exists(dirName, sourcePath, messagePath)) { bExists = true; } else if (Exists(NULL, sourcePath, messagePath)) { bExists = true; } if (bExists) { if (!Open(messagePath)) { delete []cdoc; return; } CheckReload(); } } // If ctag then get line number after search tag or use ctag line number if (style == SCE_ERR_CTAG) { char cTag[200]; //without following focus GetCTag wouldn't work correct WindowSetFocus(wOutput); GetCTag(cTag, 200); if (cTag[0] != '\0') { if (atol(cTag) > 0) { //if tag is linenumber, get line sourceLine = atol(cTag) - 1; } else { findWhat = cTag; FindNext(false); //get linenumber for marker from found position sourceLine = SendEditor(SCI_LINEFROMPOSITION, SendEditor(SCI_GETCURRENTPOS)); } } } SendEditor(SCI_MARKERDELETEALL, 0); SendEditor(SCI_MARKERDEFINE, 0, SC_MARK_CIRCLE); SendEditor(SCI_MARKERSETFORE, 0, ColourOfProperty(props, "error.marker.fore", ColourDesired(0x7f, 0, 0))); SendEditor(SCI_MARKERSETBACK, 0, ColourOfProperty(props, "error.marker.back", ColourDesired(0xff, 0xff, 0))); SendEditor(SCI_MARKERADD, sourceLine, 0); int startSourceLine = SendEditor(SCI_POSITIONFROMLINE, sourceLine, 0); int endSourceline= SendEditor(SCI_POSITIONFROMLINE, sourceLine+1, 0); if (column >= 0) { // Get the position in line according to current tab setting startSourceLine = SendEditor(SCI_FINDCOLUMN, sourceLine, column); } EnsureRangeVisible(startSourceLine, startSourceLine); if (props.GetInt("error.select.line")==1) { //select whole source source line from column with error SetSelection(endSourceline, startSourceLine); } else { //simply move cursor to line, don't do any selection SetSelection(startSourceLine, startSourceLine); } message.substitute('\t', ' '); message.remove("\n"); props.Set("CurrentMessage", message.c_str()); UpdateStatusBar(false); WindowSetFocus(wEditor); } delete []cdoc; return; } lookLine += dir; if (lookLine < 0) lookLine = maxLine - 1; else if (lookLine >= maxLine) lookLine = 0; if (dir == 0) return; } } usr/src/sdlBasic/src/sdlBasic/src/SciTEIco.png0000777000076500007660000002355310463134202016361 0ustar ‰PNG  IHDR@@% æ‰'2IDATx^¬UyPSWÏBv’b 1 ‹B€ÆÔ D2QAK`mQqAÑ:ƒàBU>>˸K…Z;#HƒKAÔ"¥ T–EY4ÆHÉ{/ïõÍtFc†?¾ïwgÞ¼{ι÷þΜߙƒ D0(ÐÏ¿˜øýÄ>auÚÂÀ0L·ŽšÄ²¨±Q#‰:…-‡{IÚ[ý 4†éô¼å¢((Ê4Ü ØÞ DÌÇÀbœE×g¼XìG8Ä%¿ÉÙÃ0 BâIçH|#âØ‚éaÑ)Sx¢)<_žÈ_ߣ#‘<‘ŒÁpø~x, –ÅÐ<SCã( >‚!0AtñÔ„Í™ÕÇ;œ«Óº\Ã;p²¿|™oØ¢@E,ƒåíÍbˆíé9f6Óh h¦PHY·®V>ÇüfЋ7•J¥Q©Lˆƒ•DŠ»P¦ò ÇY Bèó,&Î¥ÇÅm0ì°À4ygjN£3Üû;šâÔ«›jÎL c2)º&íâåjÓÈ«¡ÞÎE‰+ß v>¸›¸.Kßý„HrˆÄ–·0hú)pÐ>ú†ç) _Áϱ #“ÁÉsw];?qûÀó‡ªøDÃ@ç‹'M¹…§*Ï–2X¼m»²oWž¥ÑØB>Ï{oÒ7VkóOžÇÁHEñþäÍYLϺËENú:9à‹%µ•å6«%eã&£¡ÿ§œµ¡ò™‡Ë†z–]mUo=Îööik8gèÕùÉ—r„A(s‚mv2Áðÿ!! MWDƮ֞üïŽÜÃOumZ'¤†‡øVW^p#Òü¤>,"l1ö@ ­¹¾9z¾ÂÛg2öïËXÉñæþPz…Bó8q`¦(wCÎñ5ÙÅïF†nW»2~™—ù´¹âÏK{ÈTÙÉAÑ™ åC#NÂp‘òùöì‹÷H’Ò25E{"•‹"̺yõV$Æuõ©\w:7sènÓCUsSÛÛºžö.8ÈåO#YÇòáñnÇË/ù†wµ7ÿ¸ë’cû!MLâCoÇé\å£zM”ú»”œZ‰tfçïÅ=¯+wð[,´ÿSPEIT,ž°çhé©#Ù(é½yy5µ¯ÛÈd’BñjXo~óÜdìëëÓ£ñ+’—éî_è»7OÄó*Õ\æú¿ìmÙ¹^ý¸µ¥Hs9uk>•æyçjIaÖrΑ]T½@½ËЧé¹oÑÿ¡Ònш‚Uª tÔ“ÈFÐiàBä“%`·‰üÃÇÆÁµßþ§¥®êíȰjijX€ðVM5…!à‹¾d1Ix–@¤/\²é¥‡c¢"7ºÿUræ†"Øk÷Î4²‘Èô’£ڲŠU×¥ïÎ1¾îh/?–~í×ï•ËÓ³N܇ØÛóoý¶­²`‰;K¼ï^dÒ!2CbµZ?hÉ)×  …C[6&)„ \a€zUR•VC pfËev;¬1ÙÆÐ!{‰¾RiĬe-­M5ž¯«k”ˆ½ó©Lév'ÿæë7âcçþ|N®\/•E–ïݱ&…ç#:q¥!)mŸ4`Þë—ÏʤW•쟡LÙp°~†*ÒƒOjºï–˜Ã1içfÄçÃxw‹Õ»Ðî>­ê®íÏŒ‘í±ÍŒ± Æ,¶²Z­I²„,‰Ê*)KE*)Ú‰-¤M*¤¥zìE¢dßƘý|GÞïý®ëûÞë;×q]®ûl÷ò»—ó?ó©Ph¼šN‰Ö×Õ踻÷[ÇÂ"—½8bii<91#!*,à-1™‹óó Ï¢ÿšÿ†Bµuvõí¯óã<÷ôÙŒŠÊO®Îë|ÜL¾·–q9ì®öºÄ0úô¸gðÀ˜s\÷GGuÛ§'YÇÖwÖ=³óÝ›Ú"­¬7>ÐØ^^œj̘¶z&.…]X˜_Qûÿ+À¿#&›íyªô^ª0FÈÕÍéÝ«¬ùô*)L·ÁÈHŒ¬Â6ÃÃc“p>YSCD\n©WIi]Åëzq1Ì•«ÙDMSsÛÃÒXõãÇÏT½m²±1É.(ÖÖÛ £¿«ºîÖÕì+ GÅ$%b¯>uM'(é¨kšâ¤•¾W•wÔä;„o ºC2ñB‹þ¬Ïk( Ŭ–—••]ÎÖÿ·i’©ÿêšË]M¤NÒ2ßè’–÷‹Srvä`lf«½v³&Í|~7<|s."kÊÞÿúv¯”Mva e‰²Ì$ùß+QÔÿʶÒ85€Do÷Ý×XSŠD‹YnrD$‹9ÁYšáó#Q(qiâݯù|„§ûzÿÝBBY9%²¶uþí¢{ù¯PHÁÉ”ƒÞûãWK*kPtÍF'ÑïL 8¸¹ÊU¡mB¡å°êHžÐÄ·áöךæ> æ{Yhq€¢ÏÓY,Öÿ!@“ô7Úb³]ÛçïâbD¼$ƒ!hln˜§Ó™ÌycƒFH!zøœi¼SÄø×ïe?ƒ#‘æð—¬BZÊᬬû{,4þd–¾‘íâÂHã‡GɱûŽ…F³ÙÜ}‡C.Ý{ejï=ö»µ$ÛãÅ­£—£­Ÿ^?.%KØs/4½Å/ª@RRºÿÛë/•iÅ)æ=õЕ“ì#«•hŽ‹ÌEÆã?Cˆ¤IqôÖ3µ·u¨h›ÀHòX…7ÕŸ¦¦9òò rr8˰ŽÞY@FF–¦–™ýÎuªUHHøÓŠž6Ù8øB`@x¨©ÓÚ¾öC"—¢c/B`üÕÍçìÙÌÏŸÇG@yû’³O,NAEN^¦gcír|_؄ߓŸñΖï˜ruªÜ ž+%hPÍ·î¿~“cís‡WÔ ‘ÿ„`Ô'émùùÙÐܬ»­‰Ï])šÂ¤èjqu½íŠ*β§pæW7cÛØ/ŸÁVZVöó×$n³Õ›@ +§ºÍy÷ˆØê»ÐBˆ3I‘ûCâL·»yŸ] Ï>¸µÏÙªìÑ Q1‘àG/q=Xa³ãŒˆ°ì¾o¹ÉŽ÷NÙÿþÖ@2tð8Qk±3ƒf¸ÃÉ+eøU,r²ùáI¼žº¶%€ÿ`­µÎÜ‘—Çß,®=—YÕ¿ÉÖ­±åÀÂ>*úÌ=9¬¢»»ÿо=¼÷ÊÉãÔIÚf[‚Ï_.†$ÖÔ4GEÿí·÷´’ BÕÿXßéxYݯ­k¾ìÓ2òÐT½  ›«ú@qxÐ ¢à ê²r8`WT&9ù¦Ï_ˆ)q…üóO8~!×ÍֻᔠWTc*Mê~¥£þøÉk×÷w¶¢04}3úì´¨8~`tih`ŽX8äœî"Zy|Š )!ûüW‹Ëù%ÊÉÈ¥Ÿ‹Ê½U‰7nÚâ4:ÐÊdLó¼U"bY9%=}“H!ÄúªÑ‰ç$¥p8¥µë6…¹†ä 3r“c>l„oµÃ+ á…*ÅŠ²vÛû ¯#eDÕßnþú”59Ô?ºˆ×ñY…3A¢VÁSæg†‹¬•ú?PVQ;vé…‘åv%òÆæß ‰ucˆÝì›ËòBÆ-ø¿mKÄÉç7nÿ¹ÿðkö.QP%P£{öOÎ,ËŽJÂá•m·Ú9GmßNÕ2ÎP5ÍÃ\ðþÛLrúGwÿL2 Z "UtðŒËªd] .¿—^€}1¯7ÛúQô¬àÎÐðŠêëœN_ž|Å+(/»,uýf—„à˜¹¹%H_Zâ$¥=õ ¹®³f#•‘‘Ó •u÷3Áw:¨ëa¹úÆA¾áYßÁãlPÌëÔœßG/µ¥•rÏ•‚“…Ìn‰ Ф†ŠÓ5´ßâtÐóè‡kó‘yÀ/ù»–‰Û²BÕH+Ð\wï…â>ú“W€ËpíC ¹…/qx%Šy˜ï±ò?<ñÝ<ÖÐs†0Õ¤¬iú:‰÷~~!º&®w‹ªUÉ–p‡Ýþ{8ÄXdûúƒÑFKëÀà¨÷ÀìÐ#éŸú˜Ícàmïäå7Á‡î…{Wgï©F6‡3×Zx¾Ös¦$>á׆·d싹y?áZoJvŸ£_–¢ª¶µ_VøÍ¥#…Ànw²ŠªÚ¿Øð0ô›Ç- ÈìãôÊ_•Éë7—ƒƒgß™mô&ëXaqŠP¹=5ê:—CÅÑ÷‡iZºËN á,ºJ\JVA"Q2œšœW×Ð0ظ¢³˜µ8óöÝÇå(¹Y~ÉÁQ=¾vž<º+33%%DB=©ü¥!!ašy¨ÉÆ—âSÒn³9yYÑ™'µtµJùÙY|)¼™gM-½³¥È\$Ò5<ÁÖûŒ”Œ²¡©ëŽ]ç\üozùÄ~ýXØô(±³ö‹Á˜žA©¬×ØSø×Í€…é¾OE?=H–SZ¦¨©kžLM[k±­²Ÿ§¨J!êØ_¾UÄÀë`>T¹Q;àD‡ `;|òa@\)^YjËr“çô,{ÅkcâÎ{„ÜŽN©U"êAÄ«©…¥]p€&ïu²S`aü…ö­»2ÔIkp ªÛv¼Yµp·ÜúÒËùYÅSn~i6*jº+ÁM$›»*;”Ç9|ºvÆÔ®s7hoà í­oyK¢2|¼Ë‘S FžJŠÖ èf‡3çGe°ÊZë>¯ì;yú}I€Z…ŠIŽIϯU&` rBêߤÎÍŒøÜ± kxhf^À „EPŒURâÊz½}0þƒ„Ыþ’!¨ªé°†k#Ÿ%…gÐh„’Îsï ¶Áy$ƒ ßÛß¿/KhâÃõ:úëâ’/(¨ê´,s;oèy†¦[æ üm#AUÏ=q˜H±ôö ÚÞýË®y%ïížÐ +Mæò—éƒÃ“ëˆ$#£5NAEròŠ bhô¥~6è^mSàÒýÅÆMG·È°Ó­·žüÞî“JѶ°ó™YœZ2Ÿ[ÞãtZƒ²öšñ°Úâ•|$îÄ3püˆ}ÌÝ¡ùèÅgÑÞýבY2šÞ»’®m`ýèÅÚ”§}ÖÎ{P¨»¯[J¤à¸4&~1E+Ù ¡ Œ9ëèÿwxr <ÀxÝ€þ¡Y·Ëži“x­åˆäyiÿ•¡w_F&`˜š¦­ç8 [}Ï{*Ú´=Fï× šx­ ¿ }A Åc(!Ü2¤N5Û±ûTôùçiÅÅàJHªgª@Úp§Kñrú@âS¯ƒ·=CÓðUÿHjé·Mm „¢’JÎóz¢†®‘¥ÓøïþËXÂë[^Õ4€¨œxÞ6èp*iíþŠfú{¹òì˜Üì-«LÙž5oºÙºþ›¶á_ÐÍå_Æ×möò>üÄ-(›ª· bz¼Û®¨§uŒ+åCyÍ §d~‘—šlwFÄœÉ/xÝuàHÊãšÉý OR6;šÛîÚ}úùµÖÅŠið Fù ¨é›ý®H‚’: ¼È/{‹U@[9ŸP·Þ·¬¥ÿâ}cÀá5fá·ú¿võ,×<ý<‚Š&T’yPmCTnÁ >2²B m }¾ÑûÔ"DöôU=óLÐ6ê§AÂ÷0‘Cî)Z&1I÷ãSžZnrU"jùÇܨçÞlÙ-àFÃÒý÷ã[Ý‚ ¡:VR24 <¢ÀÀ|õ[oú™ogAõ(íiχÜB.jP —]G€ V‹Ët66nr§Ï½zö+ŽÐYk¬¨m"ÎmKM½`-Cjj’DeÈ ~¦÷EÚÙ㣣c"r¿GlÚm)¬nχ¼Éñýß{#Üì>7uaD¢b»ë}#Ⱥ–^qý]¹Ww¶Õ¡QH s„$4.#ÁVVE)"ú؈ÓI¦›Ö‹¬“Áj­w3Ûèè{FSߣwJ¢åS§17Å¡/"¤ñŠV.‡üßÚø]TÒ´Ä #­l|˜Œ™È39ÑÞÆ’a_Ô~üçÝ»ÚÖoæÃ£ÌÒ×5úÚêoëšÒoT¬–V¯y%£l»ç-/÷—¨¸ý"ãT¨¨¤ª…K懧{™ó#k,¼Îg§å T|€øýkô\ÚWÅ9ð󨾱µ©Õ¬”àAaÞÈHïްȾþ’Ò¢,>b–‰`³Y¬‘ÙꊷZ†Ž?þ^%.93;%.*"@)ÉEu…¾E©¹‘iF 0,¹À¬¸¾-)­ÔÝÙÈYäCîè3î?òôÛÝðíqGû‡sÿe¯6M}£¥1C˜z!5ò$Œjß÷ü~Ÿ|ûæ% ш@ǾN¿ ¾õÏïu ³ƒ²°Z5‰ðs÷ßµ{çžý~""B8¢‚oD° ôÖ,.7eÙß:Zá6²²¸Ö¦ºzƒr$ÕE̪E Eøb XŠAÎÅèž¶J>Ÿ ü?Š¡„`ÃHº«e´Ôt  L,·ë;¹áéÂdƒÇË–Nᫎ5 r>€Ìp¹BpàïŒ7ù”5ñÕ•<°ÜåW:¢Ò•‰4˜µð†O5ôûݲ;ìbú¹h6½7,"aÛŽ]1G¾4¼RÝZ>ÛŸ‘~ÖÌÜh d·—“KÐŧù禛Îi ï ñYµ ÍäðÒÏd4·~§¬ÝQQ‚B¡ÃO¿/½wˆÍž?š|[…Fd³lb°¯_l¡Äµ6×ÔV @S (,NæC›`C3ÓŸ#.j–F‚¹ÙqÐ;Ô÷•Íù1ò­rfzü_4Èeˈ‹‰¡Ð°aV ö}áòÑšj*h Òûô©Eß݇„…EàDÖâÔ‰£áÃc9YBbRVÏ e‘±­*/%ú¨èɱˆ¨©IÀšG…‹:~¹·ý÷ä*sz»>IˆËõ~i}v+ì7‹>“$òñÛêZz_>/š˜#ӌυÇܸy¿j ‡üÙT>ú%§·í-}zjjjŽÃše“°ä$]KŸðÔ¿d•Ý"4õìÄÄÿBþÁäI¡jãUMÆGº5tM s 2_¸zÜå}//¹•a;ÑxœCï:˜Ñ¶M_NHÕÜÏ;¹‘1Ó£¿«­£ÄšÏ¡¾Ú¯Ÿ—”….ÛðñݳG™Vva÷®íÙµ'¡äáÕÙ™¡¸S×þR´˜çJñxŸ?;3¶ÝJ¤¢â=Ñ]õ¶axðÇ"ƒþ¨‰‚&’ÁQÔôœ±ª&)>Ÿ-ÙE‚ÅÉá5"®$?IZVab¨]BBW ýü‡¢kÝÞ\¿#Pi¦RZ’Óýý³»G$‘ !$, ]¨¿¥ú~AÁâ_ +´Ë#P³j™.` ‹Êµ·&Åù  /Îóh4“¨ë ô>Ÿí±ûD[Ë›‰ñ>Ÿ#?»{N†[Ô¿JÇ,2sП¿gÿž)­jïéne³—d±ªêCS‹-Zúveа²óSnmQÈçÊsã¿ê—3KLúâ"gµ4elNÊlDz¤„d ÿ ^!æ€]óúŽó‘ö{)7ûD܉\/kâD¯Á‰zÿ¦ö—9¹Ã5ØÖÚs‰17Œ™A!xðu LV÷þhÍ¿}ÁË/ZTXƒktmV`„„Ÿ*¶¹ñúA~жöZGkó¼[q²ŠºJ$ øl%!M\·5+ÖÕ%j« ¦Y#c| ‚ßßߣ¡e99ÍD!A]í ësë=6‹)MX_Èám%$×a«¿›{äîÏ/„ÒôwLópS7ÄäP ‚Û7¹ž¸+@›[¸×¼¾FÖÞ,MÐWËšlåò—o*ý?[¿4–˜˜m¼qõ”­½›««ë™¤Ø±±÷ž8UK”¨ÒÐÄ’æÃÉ<öÌD﯎2ˆw ‰DIþ…WT¥Â‹•}RB½µ$2Éd.u}«G¢Ð"br<Ö$½ +ÔÊø’= "®PZ|ÅØ|^A Õ•EÍMÕêDÇmÁ³ óB™ryœ7¯2—Ø,6A\Äow,ÉAIPá‘(a1˜‰ª+ϲ8³Sƒlæœ<–èê÷¥í«‘É]­°¿E¶PPXbGGGAîÙ+g\>”¦L¶ðØ <.[\JQË,ÐÈ6NMÇIT;?7Öùåm{ýÓÌÓηÌ'Æ~ŽŽ °9ÌÍÛÁç§ûb%QiÚ+Ï\>RÏÔãce¶µ½¿² åέ<.gµ˜ddT>NžðâyÖ xPÿa Ê9¸ÕW¶a³¿€Cïîiþ9No©‹k=ÚÞg:zŸk¨¼x unz†ËGð'¿úZF´£ƒ£¬ŒHvvޏ˜¸ MÏ|z ¿Ù\©z®µáç¯&ˆd`™cbzäëÔpsaü¿½üb9==)#O µ‰­†ÓVÐYy¸áñxê4›±¡Î‰ÑžÀ°Ì¡¾†²90ÿ©ë:žÆq«['[š«¦;Ò7»ûÖѬ© bkÝ&ÌmÍÕONnrI©~ceÚ\WHý¯J­5¶më ‹)’z˶d)‘eǯú!ÛrãÄMâÆMÒ%È«]_ÛÒ ¡ûÕµû5l†ýé~fH~ [W`]Ú®À€­ Úd«ÓæÑ$s^Ž›Äñ#±e[–%Y/ëAŠ"wHÉv #veˆ¼0qï÷{ÎwŽx¯·¿g‚š1œ”J "òôäu½œzíõ7!ô/_¹tmx4› ‚à€CLƒW8½‡«' ÝZÝ®*K'˜l¨]乬XÌ™Í6Œ°Òé A*­ JS n׋?¹zá}§oà{¯üà«ÿùáØu½žØÿãóƒ~‡Ž¬¾¤Ï´Z«zŽþáêÇß}nà}ß9Qâò’Ä~5ô'™ª[Zxàö¶Œßý|ðà[™Ä,ÏüÝÏã„ø’Œ‹Üã‰oP™ŽD¢{ö¿Ôèsdzçf¦§yŽy4q‹Î¥-Ž:»« 6JTyСšñáŠkeQ(Ä'>!Ö!jS¨ÆéZ!€à8–\ um=81zVÄÜÏïÜ‹Ìæó©åxÈÓâEe,Ðí4{ÛF/l1)ÏÁ±«§ðê{u“,ÐuÞgJÅeƒ½nvòZwÿë‰hÐéòé1ýì̸(äV]Gu»~§oË–Tdbtô^26]di7=ãï?zì½æ®N§k|äËØìÕ|ršcâœV[•(IÊ Jšš’ø¼æûHå»][å‰ýÉÍ Û$‘ Gbmí½=ç¾ø ù÷¼m3{¼¼¯¹ÕséÜß?<ùógœ^˜¾—˜úËÀk¿w[,6,£”X•–‘ðd1“Õœ¸è¨í1hYâe™€b™29ÀË¥RIàÙÜrDàéHè>_,aêxÍ·¥14~ᔉ±;*Fmlí‡&Y­§(J+%*øxAý'9°,ÛÕ÷òBðn2ÚèokÛ64ôi:µ8xì£Ôü×Gÿ°«£aüÎW§ßû…¯ï—™ttqô¤ð×¾†.‹0…¨‡·8ÜDݽ{%LA$§Ü¾æ’P„¢GPR§ÃI³SÑÜÝ]×&°IÈ$3‡ üÔc˜Ùlõv»kLW®\J¥be¤õ=ñXÀQà³zþ@§³V½Âgå`Žãáùñž¾#Ëñiq ìÒöí‡â‰ðø­3¾ÀOG.~(£XGßžý‡ÿëod…òöþ,:õÙìóhUÀæðˆlŠc26‹ÃHÒîMFg”eÅl«‹.ΦšŽÎ®†–N’r²lže¡ê‰är9[•*”dŽc" <¼C‡b¦s`^:—0àˆ ¢µÕ“hÚ ¬´Õ¥€­âbQx¶ÿÕ`ð!nrךÅ-=7oœ-ÍÛÝTÇ>÷ÂŽsLþ_ûホ_Ö4½d©nÕ q!??Ñ5[„B€´8ÇF‡ì®VžçŠl¾¦v3e´g–ããwϵtîûÎÑépçÈ•3YšCQÜ–D;&•$A§“µ›—"óð2¯Ä†qýŠ‹¬´ë ¬ñÐ$Yf9)Ðw0´dò ß&o{Ǯɉ““Ãð/ ¥½Ûö½EQæL–¾?r55wÕ‰ UÎVDo0b¼ÍjA@Ömîö©û—z¶ºüÅïš:÷z›_¸qáôrröð«ïtì8þÉ©7iš¡Ì.S¯¯%edYÅÆK ¼].$î`¨„¢¨fq ´Ö”2ŽÎî²Õ+œÖoÙCÎ ô‰ÆBÉTÌaÄzû’P>¸$Š<Ìhrôî:QUU‹âŽx"ŽÈQ“‘x8ö•Òî¦Ýñ…‘ZO›a%>[*©ºÎ‹R×À‰ó½ãÞäÝûý÷¯}ö۔ÑÖîï‹-†bј´©ÙïÚÜ~ôI,¢(>… ‚Á`@5«W<Ñi]DÑ)H‡¿G§lÀ¾ò,p` lwß+©t:²øÈ¨g;;wâ¸ñÁØ•\6®h­®eCC·^áélX ë%Ì#eþÿÖ¿ýØèµv~wqú¶‘2 ܲ6%ÌiÛ×Õ·Xj—Ïþ¦ ¶»=¾¡/ÿ£Áö.NÕ¤£\‘Œ$IÀ èJ¤j–‡;U)U¬ݰ’(²l¡®±Ÿ¤¬¡hGY§¯u7.†³²™$‰Hpv»›]®:¨­&K9¼Vg÷ðÐÉÿ>ÓÜ}(¼Nš½&«3»MR6QR+-d%:Ÿ„©º»·.†gÆ—Ýf/°Å’ÄbBÔjL#Ž¢ ï p¡žrúu¾TäŠÂR×àÍ—ðM¤žklh$¨jÂæ5˜¼ÙtÄj1`¨˜KFrÉi½ã8šG¢Î¸úú·?ÿää‹MÏìà ‘ðÂl»'ÊÏri1Yœ,Ç"À[ýÓ—J“rùEbU·Aõ±•"Ú#!Ð ”uèŸêNäq†©oÙD<™€˜ƒ]:„Orl>~ÄЙò0«ÃárTyP=.—D†É1ô2(¦¿wÏÌÔHÉ´¶õÂOÛt*èíeÓôÔmœ0Éjž3è¤È3a )£6Úš«(ZC4kš‰ ØzôÊÿ8%‹ã›Í¾º…`&‡Ý*—¿þ”4ºv‹¯¾³ÈÑ‚BÈš©Òüã[Á™{$eªv6€ãA˜B9'I˜Á`”%KuS|) CK¨Mä |‘Ö£ŠÅbI$æ ™-½QÓh²N†äUI¼ª/Ér…ƒöÒÞÙýô=«Òd5KpPG™í›dO/MÂðU5ÞZO«PÌg³qPú¾½ï‚–ü3“ Õ¸€‹ÀÓi…eÁ0$(op²†ËϳLR. 0‚Á@€V–ç*Ã-Ç+|—=gm´âZepÙpLvƒ[m ‹Îó¼¬&n \…-ЈÞhw6( pKOçSP;ÜþL|*…"(GCûàã{gAÇ=)òyI(fpw½^¯¬x²ÆîÊ,**¤h*”d-‘=Åö¯CC‘$QÔ6õ=™Þ¤C 6·`2×T¹;$>È@àÁLjN«G%mõA]à–_3¹6±ÖYéÁ]e–õd¹ÐëmÿÃWV?å_E²šzQáð*Š*—€º¨f6¨±Çê¸OÜWT~=]tE!*`ÈŠ(ýù¾4`ÌË·IEND®B`‚usr/src/sdlBasic/src/sdlBasic/src/PrintHi.png0000777000076500007660000000500310463133550016327 0ustar ‰PNG  IHDRŒç:£‘UNPLTEÿÿÿ€ÿÿÿÿ)))333BBBMMMUUUfffãããwww  ¤†††™™™²²²×××ßßßÀÀÀ€€€Á pIDATx^ìÑA0 ð H;þDweá‡EA)…& ƒÞe,‚xf|öË®Gn†¢ðr%›|Ìî†üÿ?Úa”®3m¥ÒH;‰+ù‰8‰/§ãedá1¾ž.CYUXX4^£ö,>·N† Ï”E„Yâ%:ûÿ…uñ¹©p2T0É*+e&’Æ´K6ì?Ó¶â6ÿh¾1—å75û /cd)¸t#að?Ø[8U‚=ß^F}¯ÏFFV ˜¦”sb¦ÿ#Ãè2¶`2ª‡Çhd0åyÌ´2¡Ê°;å>ö)˜Kn-Z¹Éè2áNie@>0(BSN”Ó÷!°)|'{µ2'Ã$XɨtÛÙhe@©`P|NàY“—á''ÃÙ í­vædô“Ñ”¹(€ 2*—dôžº£W‚0?u„V„·“±" …¡0èBe×ùt2lüp¿ïæ@0Q€²@+ÈlÔ̈0ŒíÇ‹"@±qg  6>'~ >Öy'ƒ|ö.†Ô†A½:I“ùTFÇûì0òÉø]›rïyþ•øܯp‹,¼ø_e7®›†J fïÖTêq?+Œ^’ÂP’Âvö蘠)ûuñN°ð~3Ú-ê2èøÃÎภQuÅ'èlïÑÊò½3Â] 6Dü©µö@J¤yzÆ!áËÿ 7ÆWHž®ß`ŒeAh†„ÿ )äò©f<aH—Òa¤50üõó™ŽcJ÷΀ðLIJ[`n ¯%_‹¼ÛbšÛ}¡í"ArnFÿf2©=béÓ[pÊ0 ÆG.N© r/ƹ0’MeF3 8dnþÀ½ªyÎ@i R#”`”_ìG²o6¥¦ô§0pƒê2K= ‘ia´›Q#Í ýad¦úU0¤ †oûd3<‹NOS"À’r”+öùòáUÀCÀH€aÞlò§)‹&vF× Ui©T¿vz3Z£†„aH˜Ø .rÕvæàª-ÍÐÛaà=•fl12‘0hÆö+Æ6Ô Â‹HÚQ,’ö‡¡ª‹ß¦À4 ÑKa$kÃH,fÜ #Žº¼/ tÃm#§{ƒæftõ‡A3pŸB¹Óae@³Æô:4ãg04 €A3ŽÏ9¸[!ëƒf€…ƒq¸Rc—Czšxš:ƒqÑœ‘ƒŸÀ7°ðfà‰Iõ•hÿ§©44¶qkS®Ún{dÁà÷SÁpÂï3®„!1LÁë``€†à7}(o A¿oý:βSÒEÎELÞ Íñ0ò&)üR°# šñÆ!{ ìFÅo‚f ¶H~#Æ%0hF¼¬5cüÎ9C®3ø4ã#”Ÿ¦Â·œŸ3¦]¡„A3haÐ šÁ\h÷YÍàF.ãÍàF.ãÍàvãÍàF.4ƒfp#—ñfp#—ñfp#—ñfp#®ÚrÕ–0hÍXy#šQ‚@3ƒfŒØÈ…fÌ¿‘ ͘Í šA3ƒfÐ .‡pmŠfÍ „A3ô¼µßÓ˜š—1CS´ÁÐ> ´Ð¥ ™ÿL c¡9ãõGíF|9Ó”š^E•ð¹Ñþäéí8ÃL-t¥Ž…ÌP5÷Ecêzцš³À¶̰]€±Œ†©™º^SD=;·ÂXiÎ0;#A¦¾7ü †ÀÂtæ=]8­e†:3lk½¡ÃZà»V5ÃÃP_Ûó9£tn€±ðœáo8©ë5³º/>@nÚ1®½M¡ ã-aF{h¸4”kSÓÐP®MÝ\µýËn¹ 0 Ã0taŸû_td-Ó–Gk6+sÅMd0äU¤QSKÆ„qüd(BÙ×]…+®r©n2ôPD .üƦ$)ví*ÉÐR~C¹­*Éx=9~¤ Ik =×j²Ùõ.ѸŃÃm– $0ø‘®§Ëúfv½;0D¶êÜ[0¼ƒ ÓËPwz¤Í4X´%“Ñ4ù0üRíÎPXcatVcÞÀàÞÞW:mkþM5ÊbFSd00HžQ:¹”øì%ŒogHÆ@£XÌdü¥îìQjÃ0 @ºÃÔÞÿ¢#FÔÂ&#ò ÛWqãþ÷¼Ïoúl6}20ÃBòÿÌfŒ»Å­§ãf¦ðÕÎÀŒ^2L›§˜q†É˜!f–ö¨fü&Œá“%3XMƒÁ=ã Œ´ü VS5A;„Þf30˜QÞ~Ç »ñ¼`-*°f<†áãn˜â$Ÿ¸ÒKxÍÇ#_<)j¿c†„r/ùp‹:žîUMû3üZÃh19K¡²ýŽ^¢ØzÊd£²ýŽÃ&fÈFuû3Ä0n˜auíwÌK?Si5òò©ž”´ß1ãd`00£:03€*ËPÙ˜¡-î\÷3âŸòÁP}3>õG½.7¥W¹å>†¼Ì ÌPÍ0ü S^ø4–ÁÀŒmáeÏ0dC0£†×¶'÷`´Ø3ÄãGfÈqÜ3tï=ƒÕT‹†ÌWSò𨂴Cv™ ÌÀ ÌÀ ``f30˜ÀÀ Ìf`00303€ñÍ~¬@ ƒ@´_Ñ×ýÿÝÜ‚1mwA4Oæ #¡ÕÀ8­\\±5ÎoO‰6êË-j`N¾7ãç'Ú¨/·¨…quùžx3v~{J´Q_v±?a„›ñómÔ×O0HMw0Ø#<€ÔdÀì‘ x€ÉÉ€ Ø%p Ò“ì“ X/J†¾õÉÐßÔ:ÉXýÎС |^ºÀ•Œ‘ë£ÍŒóÛS¢ú²‹ 0Þmf2?ÑF}ae`œÅ’:Œ£ZR‡Q/i9‚ñmމÚ‚³Qk8ð=! üÕ.Aíó´ŸIEND®B`‚usr/src/sdlBasic/src/sdlBasic/src/SciTEBase.h0000777000076500007660000006626710463134072016202 0ustar // SciTE - Scintilla based Text Editor /** @file SciTEBase.h ** Definition of platform independent base class of editor. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. extern const char appName[]; extern const char pathSepString[]; extern const char pathSepChar; extern const char configFileVisibilityString[]; extern const char propUserFileName[]; extern const char propGlobalFileName[]; extern const char propAbbrevFileName[]; extern const char fileRead[]; extern const char fileWrite[]; extern const char menuAccessIndicator[]; #ifdef unix #include #ifdef PATH_MAX #define MAX_PATH PATH_MAX #else #define MAX_PATH 260 #endif #endif #ifdef __vms const char *VMSToUnixStyle(const char *fileName); #endif #ifdef WIN32 #ifdef _MSC_VER // Shut up level 4 warning: // warning C4710: function 'void whatever(...)' not inlined // warning C4800: forcing value to bool 'true' or 'false' (performance warning) #pragma warning(disable: 4710 4800) #endif #ifdef __DMC__ #include #endif #endif /** * The order of menus on Windows - the Buffers menu may not be present * and there is a Help menu at the end. */ enum { menuFile = 0, menuEdit = 1, menuSearch = 2, menuView = 3, menuTools = 5, menuOptions = 6, menuLanguage = 9, menuBuffers = 7, menuHelp = 8}; /** * This is a fixed length list of strings suitable for display in combo boxes * as a memory of user entries. */ template < int sz > class EntryMemory { SString entries[sz]; public: void Insert(const SString &s) { for (int i = 0; i < sz; i++) { if (entries[i] == s) { for (int j = i; j > 0; j--) { entries[j] = entries[j - 1]; } entries[0] = s; return; } } for (int k = sz - 1; k > 0; k--) { entries[k] = entries[k - 1]; } entries[0] = s; } void AppendIfNotPresent(const SString &s) { for (int i = 0; i < sz; i++) { if (entries[i] == s) { return; } if (0 == entries[i].length()) { entries[i] = s; return; } } } void AppendList(const SString &s, char sep='|') { int start = 0; int end = 0; while (s[end] != '\0') { while ((s[end] != sep) && (s[end] != '\0')) ++end; AppendIfNotPresent(SString(s.c_str(), start, end)); start = end + 1; end = start; } } int Length() const { int len = 0; for (int i = 0; i < sz; i++) if (entries[i].length()) len++; return len; } SString At(int n) const { return entries[n]; } }; class PropSetFile : public PropSet { bool lowerKeys; public: PropSetFile(bool lowerKeys_=false); ~PropSetFile(); bool ReadLine(const char *data, bool ifIsTrue, const char *directoryForImports, SString imports[] = 0, int sizeImports = 0); void ReadFromMemory(const char *data, int len, const char *directoryForImports, SString imports[] = 0, int sizeImports = 0); bool Read(const char *filename, const char *directoryForImports, SString imports[] = 0, int sizeImports = 0); void SetInteger(const char *key, sptr_t i); }; class FilePath { SString fileName; public: FilePath() : fileName("") { } void Set(const char *fileName_) { fileName = fileName_; } void Init() { fileName = ""; } bool SameNameAs(const char *other) const; bool SameNameAs(const FilePath &other) const; bool IsSet() const { return fileName.length() > 0; } bool IsUntitled() const; const char *FullPath() const; }; class RecentFile : public FilePath { public: CharacterRange selection; int scrollPosition; RecentFile() { selection.cpMin = INVALID_POSITION; selection.cpMax = INVALID_POSITION; scrollPosition = 0; } void Init() { FilePath::Init(); selection.cpMin = INVALID_POSITION; selection.cpMax = INVALID_POSITION; scrollPosition = 0; } }; // Related to Utf8_16::encodingType but with additional values at end enum UniMode { uni8Bit=0, uni16BE=1, uni16LE=2, uniUTF8=3, uniCookie=4 }; // State of folding in a given document, remembers line/state pairs, // restore aborts when these pairs mismatch class FoldState { private: int *lines; bool *folded; int size; int fill; int readout; void CopyFrom(const FoldState& b) { Alloc(b.size); memcpy(lines, b.lines, size*sizeof(int)); memcpy(folded, b.folded, size*sizeof(bool)); fill = b.fill; readout = 0; } public: FoldState() { lines = 0; folded = 0; size = 0; fill = 0; readout = -1; } FoldState &operator=(const FoldState &b) { if (this != &b) { CopyFrom(b); } return *this; } FoldState(const FoldState &b) { lines = 0; folded = 0; readout = -1; size = 0; fill = 0; CopyFrom(b); } void Alloc(int s) { //assert(s>0); //assert(size==0); delete []lines; lines = new int[s]; delete []folded; folded = new bool[s]; size = s; fill = 0; //assert(lines && folded && size>0); } void Clear() { delete []lines; lines = 0; delete []folded; folded = 0; size = 0; fill = 0; readout = -1; } virtual ~FoldState() { Clear(); } void PushState(int line, bool folded_) { //assert(fill0); if (readout >= fill) { readout = -1; return false; } else { if (pline && pfold) { *pline = lines[readout]; *pfold = folded[readout]; } readout++; return true; } } }; class Buffer : public RecentFile { public: sptr_t doc; bool isDirty; bool useMonoFont; UniMode unicodeMode; time_t fileModTime; SString overrideExtension; FoldState foldState; Buffer() : RecentFile(), doc(0), isDirty(false), useMonoFont(false), unicodeMode(uni8Bit), fileModTime(0), foldState() { } void Init() { RecentFile::Init(); isDirty = false; useMonoFont = false; unicodeMode = uni8Bit; fileModTime = 0; overrideExtension = ""; foldState.Clear(); } }; class BufferList { protected: int current; public: Buffer *buffers; int size; int length; BufferList(); ~BufferList(); void Allocate(int maxSize); int Add(); int GetDocumentByName(const char *filename); void RemoveCurrent(); int Current(); void SetCurrent(int index); }; enum JobSubsystem { jobCLI = 0, jobGUI = 1, jobShell = 2, jobExtension = 3, jobHelp = 4, jobOtherHelp = 5}; enum JobFlags { jobForceQueue=1, jobHasInput=2, jobQuiet=4, // 8 reserved for jobVeryQuiet jobRepSelMask=48, jobRepSelYes=16, jobRepSelAuto=32, jobGroupUndo=64}; class Job { public: SString command; SString directory; SString input; JobSubsystem jobType; int flags; Job(); void Clear(); }; // class to hold user defined keyboard short cuts class ShortcutItem { public: SString menuKey; // the keyboard short cut SString menuCommand; // the menu command to be passed to "SciTEBase::MenuCommand" }; class LanguageMenuItem { public: SString menuItem; SString menuKey; SString extension; }; /// Find the character following a name which is made up of character from /// the set [a-zA-Z.] char AfterName(const char *s); typedef EntryMemory < 10 > ComboMemory; enum { heightTools = 44, heightTab = 28, heightStatus = 20, statusPosWidth = 256 }; /// Warning IDs. enum { warnFindWrapped = 1, warnNotFound, warnNoOtherBookmark, warnWrongFile, warnExecuteOK, warnExecuteKO }; /// Codes representing the effect a line has on indentation. enum IndentationStatus { isNone, // no effect on indentation isBlockStart, // indentation block begin such as "{" or VB "function" isBlockEnd, // indentation end indicator such as "}" or VB "end" isKeyWordStart // Keywords that cause indentation }; int IntFromHexDigit(int ch); int IntFromHexByte(const char *hexByte); class StyleDefinition { public: SString font; int size; SString fore; SString back; bool bold; bool italics; bool eolfilled; bool underlined; int caseForce; bool visible; bool changeable; enum flags { sdNone = 0, sdFont = 0x1, sdSize = 0x2, sdFore = 0x4, sdBack = 0x8, sdBold = 0x10, sdItalics = 0x20, sdEOLFilled = 0x40, sdUnderlined = 0x80, sdCaseForce = 0x100, sdVisible = 0x200, sdChangeable = 0x400} specified; StyleDefinition(const char *definition); bool ParseStyleDefinition(const char *definition); long ForeAsLong() const; long BackAsLong() const; }; struct StyleAndWords { int styleNumber; SString words; bool IsEmpty() { return words.length() == 0; } bool IsSingleChar() { return words.length() == 1; } }; #define SciTE_MARKER_BOOKMARK 1 class SciTEBase : public ExtensionAPI { protected: SString windowName; char fullPath[MAX_PATH]; char fileName[MAX_PATH]; char fileExt[MAX_PATH]; char dirName[MAX_PATH]; SString dirNameAtExecute; SString dirNameForExecute; bool useMonoFont; time_t fileModTime; time_t fileModLastAsk; enum { fileStackMax = 10 }; RecentFile recentFileStack[fileStackMax]; enum { fileStackCmdID = IDM_MRUFILE, bufferCmdID = IDM_BUFFER }; enum { importMax = 50 }; SString importFiles[importMax]; enum { importCmdID = IDM_IMPORT }; SString findWhat; SString replaceWhat; Window wFindReplace; Window wFindIncrement; bool replacing; bool havefound; bool matchCase; bool wholeWord; bool reverseFind; bool regExp; bool wrapFind; bool unSlash; bool findInStyle; int findStyle; ComboMemory memFinds; ComboMemory memReplaces; ComboMemory memFiles; ComboMemory memDirectory; enum { maxParam = 4 }; Window wParameters; SString parameterisedCommand; char abbrevInsert[200]; enum { languageCmdID = IDM_LANGUAGE }; LanguageMenuItem *languageMenu; int languageItems; // an array of short cut items that are defined by the user in the properties file. ShortcutItem *shortCutItemList; // array int shortCutItems; // length of array int codePage; int characterSet; UniMode unicodeMode; SString language; int lexLanguage; SString overrideExtension; ///< User has chosen to use a particular language WordList apis; SString apisFileNames; SString functionDefinition; bool indentOpening; bool indentClosing; bool indentMaintain; int statementLookback; StyleAndWords statementIndent; StyleAndWords statementEnd; StyleAndWords blockStart; StyleAndWords blockEnd; enum { noPPC, ppcStart, ppcMiddle, ppcEnd, ppcDummy }; ///< Indicate the kind of preprocessor condition line char preprocessorSymbol; ///< Preprocessor symbol (in C: #) WordList preprocCondStart; ///< List of preprocessor conditional start keywords (in C: if ifdef ifndef) WordList preprocCondMiddle; ///< List of preprocessor conditional middle keywords (in C: else elif) WordList preprocCondEnd; ///< List of preprocessor conditional end keywords (in C: endif) Window wSciTE; ///< Contains wToolBar, wTabBar, wContent, and wStatusBar Window wContent; ///< Contains wEditor and wOutput Window wEditor; Window wOutput; Window wIncrement; //#if PLAT_GTK Window wDivider; // Not used on Windows //#endif Window wToolBar; Window wStatusBar; Window wTabBar; Menu popup; SciFnDirect fnEditor; long ptrEditor; SciFnDirect fnOutput; long ptrOutput; bool tbVisible; bool tabVisible; bool tabHideOne; // Hide tab bar if one buffer is opened only bool tabMultiLine; bool sbVisible; ///< @c true if status bar is visible. SString sbValue; ///< Status bar text. int sbNum; ///< Number of the currenly displayed status bar information. int visHeightTools; int visHeightTab; int visHeightStatus; int visHeightEditor; int heightBar; // Prevent automatic load dialog appearing at the same time as // other dialogs as this can leads to reentry errors. int dialogsOnScreen; bool topMost; bool wrap; bool wrapOutput; int wrapStyle; bool isReadOnly; bool openFilesHere; bool fullScreen; enum { toolMax = 50 }; Extension *extender; bool needReadProperties; int heightOutput; int heightOutputStartDrag; Point ptStartDrag; bool capturedMouse; int previousHeightOutput; bool firstPropertiesRead; bool localisationRead; bool splitVertical; ///< @c true if the split bar between editor and output is vertical. bool bufferedDraw; bool twoPhaseDraw; bool bracesCheck; bool bracesSloppy; int bracesStyle; int braceCount; bool indentationWSVisible; bool autoCompleteIgnoreCase; bool callTipIgnoreCase; bool autoCCausedByOnlyOne; SString calltipWordCharacters; SString calltipParametersStart; SString calltipParametersEnd; SString calltipParametersSeparators; SString calltipEndDefinition; SString autoCompleteStartCharacters; SString autoCompleteFillUpCharacters; SString wordCharacters; SString whitespaceCharacters; int startCalltipWord; int currentCallTip; int maxCallTips; SString currentCallTipWord; int lastPosCallTip; bool margin; int marginWidth; enum { marginWidthDefault = 20}; bool foldMargin; int foldMarginWidth; enum { foldMarginWidthDefault = 14}; bool lineNumbers; int lineNumbersWidth; enum { lineNumbersWidthDefault = 4 }; bool lineNumbersExpand; bool usePalette; bool clearBeforeExecute; bool allowMenuActions; bool isDirty; bool isBuilding; bool isBuilt; bool executing; bool scrollOutput; bool returnOutputToCommand; enum { commandMax = 2 }; int commandCurrent; Job jobQueue[commandMax]; bool jobUsesOutputPane; long cancelFlag; bool timeCommands; bool macrosEnabled; SString currentMacro; bool recording; PropSetFile propsEmbed; PropSetFile propsBase; PropSetFile propsUser; PropSetFile propsLocal; PropSetFile props; PropSetFile propsAbbrev; PropSetFile propsUI; PropSetFile propsStatus; // Not attached to a file but need SetInteger method. enum { bufferMax = 100 }; BufferList buffers; // Handle buffers sptr_t GetDocumentAt(int index); int AddBuffer(); void UpdateBuffersCurrent(); bool IsBufferAvailable(); bool CanMakeRoom(bool maySaveIfDirty=true); void SetDocumentAt(int index); void BuffersMenu(); void Next(); void Prev(); void ReadGlobalPropFile(); void GetDocumentDirectory(char *docDir, int len); void ReadAbbrevPropFile(); void ReadLocalPropFile(); sptr_t SendEditor(unsigned int msg, uptr_t wParam = 0, sptr_t lParam = 0); sptr_t SendEditorString(unsigned int msg, uptr_t wParam, const char *s); sptr_t SendOutput(unsigned int msg, uptr_t wParam = 0, sptr_t lParam = 0); sptr_t SendOutputString(unsigned int msg, uptr_t wParam, const char *s); sptr_t SendFocused(unsigned int msg, uptr_t wParam = 0, sptr_t lParam = 0); sptr_t SendPane(int destination, unsigned int msg, uptr_t wParam = 0, sptr_t lParam = 0); sptr_t SendWindow(Window &w, unsigned int msg, uptr_t wParam=0, sptr_t lParam=0); void SendChildren(unsigned int msg, uptr_t wParam = 0, sptr_t lParam = 0); sptr_t SendOutputEx(unsigned int msg, uptr_t wParam = 0, sptr_t lParam = 0, bool direct = true); SString GetTranslationToAbout(const char * const propname, bool retainIfNotFound=true); int LengthDocument(); int GetCaretInLine(); void GetLine(char *text, int sizeText, int line=-1); SString GetLine(int line=-1); void GetRange(Window &win, int start, int end, char *text); int IsLinePreprocessorCondition(char *line); bool FindMatchingPreprocessorCondition(int &curLine, int direction, int condEnd1, int condEnd2); bool FindMatchingPreprocCondPosition(bool isForward, int &mppcAtCaret, int &mppcMatch); bool FindMatchingBracePosition(bool editor, int &braceAtCaret, int &braceOpposite, bool sloppy); void BraceMatch(bool editor); virtual void WarnUser(int warnID) = 0; void SetWindowName(); void SetFileName(const char *openName, bool fixCase = true); void ClearDocument(); void InitialiseBuffers(); void LoadRecentMenu(); void SaveRecentStack(); void LoadSession(const char *sessionName); void SaveSession(const char *sessionName); void SetIndentSettings(); void SetEol(); void New(); void Close(bool updateUI = true, bool loadingSession = false, bool makingRoomForNew = false); bool IsAbsolutePath(const char *path); bool Exists(const char *dir, const char *path, char *testPath); void DiscoverEOLSetting(); void DiscoverIndentSetting(); void OpenFile(int fileSize, bool suppressMessage); virtual void OpenUriList(const char *) {}; virtual void AbsolutePath(char *fullPath, const char *basePath, int size) = 0; virtual void FixFilePath(); virtual bool OpenDialog(const char *filter=NULL) = 0; virtual bool SaveAsDialog() = 0; virtual void LoadSessionDialog() { }; virtual void SaveSessionDialog() { }; void CountLineEnds(int &linesCR, int &linesLF, int &linesCRLF); enum OpenFlags { ofNone=0, // Default ofNoSaveIfDirty=1, // Suppress check for unsaved changes ofForceLoad=2, // Reload file even if already in a buffer ofPreserveUndo=4, // Do not delete undo history ofQuiet=8 // Avoid "Could not open file" message }; virtual bool PreOpenCheck(const char *file); bool Open(const char *file, OpenFlags of=ofNone); bool OpenSelected(); void Revert(); int SaveIfUnsure(bool forceQuestion = false); int SaveIfUnsureAll(bool forceQuestion = false); int SaveIfUnsureForBuilt(); bool Save(); virtual bool SaveAs(const char *file = 0); virtual void SaveACopy() = 0; void SaveToHTML(const char *saveName); void StripTrailingSpaces(); void EnsureFinalNewLine(); bool SaveBuffer(const char *saveName); virtual void SaveAsHTML() = 0; void SaveToRTF(const char *saveName, int start = 0, int end = -1); virtual void SaveAsRTF() = 0; void SaveToPDF(const char *saveName); virtual void SaveAsPDF() = 0; void SaveToTEX(const char *saveName); virtual void SaveAsTEX() = 0; void SaveToXML(const char *saveName); virtual void SaveAsXML() = 0; virtual void GetDefaultDirectory(char *directory, size_t size) = 0; virtual bool GetSciteDefaultHome(char *path, unsigned int lenPath) = 0; virtual bool GetSciteUserHome(char *path, unsigned int lenPath) = 0; bool GetDefaultPropertiesFileName(char *pathDefaultProps, char *pathDefaultDir, unsigned int lenPath); bool GetUserPropertiesFileName(char *pathUserProps, char *pathUserDir, unsigned int lenPath); bool GetAbbrevPropertiesFileName(char *pathAbbrevProps, char *pathDefaultDir, unsigned int lenPath); void OpenProperties(int propsFile); int GetMenuCommandAsInt(SString commandName); virtual void Print(bool) {}; virtual void PrintSetup() {}; CharacterRange GetSelection(); void SetSelection(int anchor, int currentPos); // void SelectionExtend(char *sel, int len, char *notselchar); void GetCTag(char *sel, int len); virtual SString GetRangeInUIEncoding(Window &win, int selStart, int selEnd); SString RangeExtendAndGrab(Window &wCurrent, int &selStart, int &selEnd, bool (*ischarforsel)(char ch), bool stripEol = true); SString SelectionExtend(bool (*ischarforsel)(char ch), bool stripEol = true); void FindWordAtCaret(int &start, int &end); bool SelectWordAtCaret(); SString SelectionWord(bool stripEol = true); SString SelectionFilename(); void SelectionIntoProperties(); void SelectionIntoFind(bool stripEol = true); virtual SString EncodeString(const SString &s); virtual void Find() = 0; virtual int WindowMessageBox(Window &w, const SString &m, int style)=0; void FindMessageBox(const SString &msg); int FindInTarget(const char *findWhat, int lenFind, int startPosition, int endPosition); int FindNext(bool reverseDirection, bool showWarnings = true); virtual void FindIncrement() = 0; int IncrementSearchMode(); virtual void FindInFiles() = 0; virtual void Replace() = 0; void ReplaceOnce(); int DoReplaceAll(bool inSelection); // returns number of replacements or negative value if error int ReplaceAll(bool inSelection); int ReplaceInBuffers(); virtual void DestroyFindReplace() = 0; virtual void GoLineDialog() = 0; virtual bool AbbrevDialog() = 0; virtual void TabSizeDialog() = 0; virtual void ParamGrab() = 0; virtual bool ParametersDialog(bool modal) = 0; bool HandleXml(char ch); SString FindOpenXmlTag(const char sel[], int nSize); void GoMatchingBrace(bool select); void GoMatchingPreprocCond(int direction, bool select); virtual void FindReplace(bool replace) = 0; void OutputAppendString(const char *s, int len = -1, bool startLine = false); void OutputAppendStringSynchronised(const char *s, int len = -1, bool startLine = false); void MakeOutputVisible(); void ClearJobQueue(); virtual void Execute(); virtual void StopExecute() = 0; void GoMessage(int dir); virtual bool StartCallTip(); virtual void FillFunctionDefinition(int pos = -1); void ContinueCallTip(); virtual void EliminateDuplicateWords(char *words); virtual bool StartAutoComplete(); virtual bool StartAutoCompleteWord(bool onlyOneWord); virtual bool StartExpandAbbreviation(); virtual bool StartInsertAbbreviation(); virtual bool StartBlockComment(); virtual bool StartBoxComment(); virtual bool StartStreamComment(); unsigned int GetLinePartsInStyle(int line, int style1, int style2, SString sv[], int len); void SetLineIndentation(int line, int indent); int GetLineIndentation(int line); int GetLineIndentPosition(int line); bool RangeIsAllWhitespace(int start, int end); IndentationStatus GetIndentState(int line); int IndentOfBlock(int line); void MaintainIndentation(char ch); void AutomaticIndentation(char ch); void CharAdded(char ch); void SetTextProperties(PropSetFile &ps); virtual void SetFileProperties(PropSet &ps) = 0; virtual void UpdateStatusBar(bool bUpdateSlowData); int GetLineLength(int line); int GetCurrentLineNumber(); int GetCurrentScrollPosition(); virtual void AddCommand(const SString &cmd, const SString &dir, JobSubsystem jobType, const SString &input = "", int flags = 0); virtual void AboutDialog() = 0; virtual void QuitProgram() = 0; void CloseAllBuffers(bool loadingSession = false); int SaveAllBuffers(bool forceQuestion, bool alwaysYes=false); void SaveTitledBuffers(); virtual void CopyAsRTF() {}; void SetLineNumberWidth(); void MenuCommand(int cmdID, int source=0); void FoldChanged(int line, int levelNow, int levelPrev); void FoldChanged(int position); void Expand(int &line, bool doExpand, bool force = false, int visLevels = 0, int level = -1); void FoldAll(); void ToggleFoldRecursive(int line, int level); void EnsureAllChildrenVisible(int line, int level); void EnsureRangeVisible(int posStart, int posEnd, bool enforcePolicy=true); void GotoLineEnsureVisible(int line); bool MarginClick(int position, int modifiers); void NewLineInOutput(); virtual void SetStatusBarText(const char *s) = 0; virtual void Notify(SCNotification *notification); virtual void ShowToolBar() = 0; virtual void ShowTabBar() = 0; virtual void ShowStatusBar() = 0; int MarkAll(); void BookmarkAdd(int lineno = -1); void BookmarkDelete(int lineno = -1); bool BookmarkPresent(int lineno = -1); void BookmarkToggle(int lineno = -1); void BookmarkNext(bool forwardScan = true, bool select = false); void ToggleOutputVisible(); virtual void SizeContentWindows() = 0; virtual void SizeSubWindows() = 0; virtual void SetMenuItem(int menuNumber, int position, int itemID, const char *text, const char *mnemonic = 0) = 0; virtual void DestroyMenuItem(int menuNumber, int itemID) = 0; virtual void CheckAMenuItem(int wIDCheckItem, bool val) = 0; virtual void EnableAMenuItem(int wIDCheckItem, bool val) = 0; virtual void CheckMenusClipboard(); virtual void CheckMenus(); virtual void AddToPopUp(const char *label, int cmd=0, bool enabled=true)=0; void ContextMenu(Window wSource, Point pt, Window wCmd); void DeleteFileStackMenu(); void SetFileStackMenu(); void DropFileStackTop(); void AddFileToBuffer(const char *file, int pos); void AddFileToStack(const char *file, CharacterRange selection, int scrollPos); void RemoveFileFromStack(const char *file); RecentFile GetFilePosition(); void DisplayAround(const RecentFile &rf); void StackMenu(int pos); void StackMenuNext(); void StackMenuPrev(); void RemoveToolsMenu(); void SetMenuItemLocalised(int menuNumber, int position, int itemID, const char *text, const char *mnemonic); void SetToolsMenu(); JobSubsystem SubsystemType(char c); JobSubsystem SubsystemType(const char *cmd, int item = -1); void ToolsMenu(int item); void AssignKey(int key, int mods, int cmd); void ViewWhitespace(bool view); void SetAboutMessage(WindowID wsci, const char *appTitle); void SetImportMenu(); void ImportMenu(int pos); void SetLanguageMenu(); void SetPropertiesInitial(); SString LocaliseString(const char *s, bool retainIfNotFound=true); SString LocaliseMessage(const char *s, const char *param0=0, const char *param1=0, const char *param2=0); virtual void ReadLocalisation(); virtual void ReadPropertiesInitial(); void ReadFontProperties(); void SetOverrideLanguage(int cmdID); StyleAndWords GetStyleAndWords(const char *base); SString ExtensionFileName(); const char *GetNextPropItem(const char *pStart, char *pPropItem, int maxLen); void ForwardPropertyToEditor(const char *key); void DefineMarker(int marker, int markerType, ColourDesired fore, ColourDesired back); void ReadAPI(const SString &fileNameForExtension); SString FindLanguageProperty(const char *pattern, const char *defaultValue=""); virtual void ReadProperties(); void SetOneStyle(Window &win, int style, const StyleDefinition &sd); void SetStyleFor(Window &win, const char *language); void ReloadProperties(); void CheckReload(); void Activate(bool activeApp); PRectangle GetClientRectangle(); void Redraw(); int NormaliseSplit(int splitPos); void MoveSplit(Point ptNewDrag); void UIAvailable(); void PerformOne(char *action); void StartRecordMacro(); void StopRecordMacro(); void StartPlayMacro(); bool RecordMacroCommand(SCNotification *notification); void ExecuteMacroCommand(const char * command); void AskMacroList(); bool StartMacroList(const char *words); void ContinueMacroList(const char *stxt); void LoadMRUAndSession(bool allowLoadSession); bool ProcessCommandLine(SString &args, int phase); void EnumProperties(const char *action); void SendOneProperty(const char *kind, const char *key, const char *val); void PropertyFromDirector(const char *arg); void PropertyToDirector(const char *arg); // ExtensionAPI sptr_t Send(Pane p, unsigned int msg, uptr_t wParam = 0, sptr_t lParam = 0); char *Range(Pane p, int start, int end); void Remove(Pane p, int start, int end); void Insert(Pane p, int pos, const char *s); void Trace(const char *s); char *Property(const char *key); void SetProperty(const char *key, const char *val); void UnsetProperty(const char *key); uptr_t GetInstance(); void ShutDown(); void Perform(const char *actions); public: SciTEBase(Extension *ext = 0); virtual ~SciTEBase(); void ProcessExecute(); WindowID GetID() { return wSciTE.GetID(); } private: // un-implemented copy-constructor and assignment operator SciTEBase(const SciTEBase&); void operator=(const SciTEBase&); }; /// Base size of file I/O operations. const int blockSize = 131072; #if PLAT_GTK || PLAT_FOX // MessageBox #define MB_OK (0L) #define MB_YESNO (0x4L) #define MB_YESNOCANCEL (0x3L) #define MB_ICONWARNING (0x30L) #define MB_ICONQUESTION (0x20L) #define IDOK (1) #define IDCANCEL (2) #define IDYES (6) #define IDNO (7) #endif int ControlIDOfCommand(unsigned long); bool BuildPath(char *path, const char *dir, const char *fileName, unsigned int lenPath); time_t GetModTime(const char *fullPath); bool IsUntitledFileName(const char *name); void LowerCaseString(char *s); void ChopTerminalSlash(char *path); long ColourOfProperty(PropSet &props, const char *key, ColourDesired colourDefault); char *Slash(const char *s); unsigned int UnSlash(char *s); void WindowSetFocus(Window &w); usr/src/sdlBasic/src/sdlBasic/src/SciTEProps.cxx0000777000076500007660000015010210463134411016761 0ustar // SciTE - Scintilla based Text Editor /** @file SciTEProps.cxx ** Properties management. **/ // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include "Platform.h" #if PLAT_FOX #include const char menuAccessIndicator[] = "&"; #endif #if PLAT_GTK #include #include const char menuAccessIndicator[] = "_"; #endif #if PLAT_WIN #define _WIN32_WINNT 0x0400 #ifdef _MSC_VER // windows.h, et al, use a lot of nameless struct/unions - can't fix it, so allow it #pragma warning(disable: 4201) #endif #include #ifdef _MSC_VER // okay, that's done, don't allow it in our code #pragma warning(default: 4201) #endif #include // For getcwd #ifdef _MSC_VER #include #endif #ifdef __BORLANDC__ #include #endif #ifdef __DMC__ #include #endif const char menuAccessIndicator[] = "&"; #endif #include "SciTE.h" #include "PropSet.h" #include "Accessor.h" #include "Scintilla.h" #include "SciLexer.h" #include "Extender.h" #include "SciTEBase.h" PropSetFile::PropSetFile(bool lowerKeys_) : lowerKeys(lowerKeys_) {} PropSetFile::~PropSetFile() {} /** * Get a line of input. If end of line escaped with '\\' then continue reading. */ static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) { bool continuation = true; s[0] = '\0'; while ((len > 1) && lenData > 0) { char ch = *fpc; fpc++; lenData--; if ((ch == '\r') || (ch == '\n')) { if (!continuation) { if ((lenData > 0) && (ch == '\r') && ((*fpc) == '\n')) { // munch the second half of a crlf fpc++; lenData--; } *s = '\0'; return true; } } else if ((ch == '\\') && (lenData > 0) && ((*fpc == '\r') || (*fpc == '\n'))) { continuation = true; } else { continuation = false; *s++ = ch; *s = '\0'; len--; } } return false; } static bool IsSpaceOrTab(char ch) { return (ch == ' ') || (ch == '\t'); } static bool IsCommentLine(const char *line) { while (IsSpaceOrTab(*line)) ++line; return (*line == '#'); } bool PropSetFile::ReadLine(const char *lineBuffer, bool ifIsTrue, const char *directoryForImports, SString imports[], int sizeImports) { //UnSlash(lineBuffer); if (!IsSpaceOrTab(lineBuffer[0])) // If clause ends with first non-indented line ifIsTrue = true; if (isprefix(lineBuffer, "if ")) { const char *expr = lineBuffer + strlen("if") + 1; ifIsTrue = GetInt(expr); } else if (isprefix(lineBuffer, "import ") && directoryForImports) { char importPath[1024]; strcpy(importPath, directoryForImports); strcat(importPath, lineBuffer + strlen("import") + 1); strcat(importPath, ".properties"); if (Read(importPath, directoryForImports, imports, sizeImports)) { if (imports) { for (int i = 0; i < sizeImports; i++) { if (!imports[i].length()) { imports[i] = importPath; break; } } } } } else if (ifIsTrue && !IsCommentLine(lineBuffer)) { Set(lineBuffer); } return ifIsTrue; } void PropSetFile::ReadFromMemory(const char *data, int len, const char *directoryForImports, SString imports[], int sizeImports) { const char *pd = data; char lineBuffer[60000]; bool ifIsTrue = true; while (len > 0) { GetFullLine(pd, len, lineBuffer, sizeof(lineBuffer)); if (lowerKeys) { for (int i=0; lineBuffer[i] && (lineBuffer[i] != '='); i++) { if ((lineBuffer[i] >= 'A') && (lineBuffer[i] <= 'Z')) { lineBuffer[i] = static_cast(lineBuffer[i] - 'A' + 'a'); } } } ifIsTrue = ReadLine(lineBuffer, ifIsTrue, directoryForImports, imports, sizeImports); } } bool PropSetFile::Read(const char *filename, const char *directoryForImports, SString imports[], int sizeImports) { FILE *rcfile = fopen(filename, fileRead); if (rcfile) { char propsData[60000]; int lenFile = static_cast(fread(propsData, 1, sizeof(propsData), rcfile)); fclose(rcfile); ReadFromMemory(propsData, lenFile, directoryForImports, imports, sizeImports); return true; } return false; } void PropSetFile::SetInteger(const char *key, sptr_t i) { char tmp[32]; sprintf(tmp, "%d", static_cast(i)); Set(key, tmp); } void SciTEBase::SetImportMenu() { for (int i = 0; i < importMax; i++) { DestroyMenuItem(menuOptions, importCmdID + i); } if (importFiles[0][0]) { for (int stackPos = 0; stackPos < importMax; stackPos++) { int itemID = importCmdID + stackPos; if (importFiles[stackPos][0]) { SString entry = LocaliseString("Open"); entry += " "; const char *cpDirEnd = strrchr(importFiles[stackPos].c_str(), pathSepChar); if (cpDirEnd) { entry += cpDirEnd + 1; } else { entry += importFiles[stackPos]; } SetMenuItem(menuOptions, IMPORT_START + stackPos, itemID, entry.c_str()); } } } } void SciTEBase::ImportMenu(int pos) { //Platform::DebugPrintf("Stack menu %d\n", pos); if (pos >= 0) { if (importFiles[pos][0] != '\0') { Open(importFiles[pos].c_str()); } } } void SciTEBase::SetLanguageMenu() { for (int i = 0; i < 100; i++) { DestroyMenuItem(menuLanguage, languageCmdID + i); } for (int item = 0; item < languageItems; item++) { int itemID = languageCmdID + item; SString entry = LocaliseString(languageMenu[item].menuItem.c_str()); if (languageMenu[item].menuKey.length()) { #if PLAT_GTK entry += " "; #else entry += "\t"; #endif entry += languageMenu[item].menuKey; } if (entry[0] != '#') { SetMenuItem(menuLanguage, item, itemID, entry.c_str()); } } } const char propFileName[] = "SciTE.properties"; void SciTEBase::ReadGlobalPropFile() { #ifdef unix extern char **environ; char **e=environ; #else char **e=_environ; #endif for (; *e; e++) { char key[1024]; char *k=*e; char *v=strchr(k,'='); if (v && (static_cast(v-k) < sizeof(key))) { memcpy(key, k, v-k); key[v-k] = '\0'; propsEmbed.Set(key, v+1); } } for (int stackPos = 0; stackPos < importMax; stackPos++) { importFiles[stackPos] = ""; } char propfile[MAX_PATH + 20]; char propdir[MAX_PATH + 20]; propsBase.Clear(); if (GetDefaultPropertiesFileName(propfile, propdir, sizeof(propfile))) { strcat(propdir,pathSepString );//"../share/sdlBasic/" propsBase.Read(propfile, propdir, importFiles, importMax); } propsUser.Clear(); if (GetUserPropertiesFileName(propfile, propdir, sizeof(propfile))) { strcat(propdir, pathSepString); propsUser.Read(propfile, propdir, importFiles, importMax); } if (!localisationRead) { ReadLocalisation(); } } void SciTEBase::ReadAbbrevPropFile() { char propfile[MAX_PATH + 20]; char propdir[MAX_PATH + 20]; propsAbbrev.Clear(); if (GetAbbrevPropertiesFileName(propfile, propdir, sizeof(propfile))) { strcat(propdir, pathSepString); propsAbbrev.Read(propfile, propdir, importFiles, importMax); } } void ChopTerminalSlash(char *path) { size_t endOfPath = strlen(path) - 1; if (path[endOfPath] == pathSepChar) { path[endOfPath] = '\0'; } } void SciTEBase::GetDocumentDirectory(char *docDir, int len) { if (dirName[0]) { strncpy(docDir, dirName, len); docDir[len - 1] = '\0'; } else { getcwd(docDir, len); docDir[len - 1] = '\0'; // In Windows, getcwd returns a trailing backslash // when the CWD is at the root of a disk, so remove it ChopTerminalSlash(docDir); } } void SciTEBase::ReadLocalPropFile() { char propdir[MAX_PATH + 20]; GetDocumentDirectory(propdir, sizeof(propdir)); char propfile[MAX_PATH + 20]; strcpy(propfile, propdir); #ifndef __vms strcat(propdir, pathSepString); strcat(propfile, pathSepString); #endif strcat(propfile, propFileName); propsLocal.Clear(); propsLocal.Read(propfile, propdir); //Platform::DebugPrintf("Reading local properties from %s\n", propfile); // TODO: Grab these from Platform and update when environment says to props.Set("Chrome", "#C0C0C0"); props.Set("ChromeHighlight", "#FFFFFF"); } int IntFromHexDigit(int ch) { if ((ch >= '0') && (ch <= '9')) { return ch - '0'; } else if (ch >= 'A' && ch <= 'F') { return ch - 'A' + 10; } else if (ch >= 'a' && ch <= 'f') { return ch - 'a' + 10; } else { return 0; } } int IntFromHexByte(const char *hexByte) { return IntFromHexDigit(hexByte[0]) * 16 + IntFromHexDigit(hexByte[1]); } static long ColourFromString(const SString &s) { if (s.length()) { int r = IntFromHexByte(s.c_str() + 1); int g = IntFromHexByte(s.c_str() + 3); int b = IntFromHexByte(s.c_str() + 5); return ColourDesired(r, g, b).AsLong(); } else { return ColourDesired().AsLong(); } } long ColourOfProperty(PropSet &props, const char *key, ColourDesired colourDefault) { SString colour = props.Get(key); if (colour.length()) { return ColourFromString(colour); } return colourDefault.AsLong(); } /** * Put the next property item from the given property string * into the buffer pointed by @a pPropItem. * @return NULL if the end of the list is met, else, it points to the next item. */ const char *SciTEBase::GetNextPropItem( const char *pStart, /**< the property string to parse for the first call, * pointer returned by the previous call for the following. */ char *pPropItem, ///< pointer on a buffer receiving the requested prop item int maxLen) ///< size of the above buffer { int size = maxLen - 1; *pPropItem = '\0'; if (pStart == NULL) { return NULL; } const char *pNext = strchr(pStart, ','); if (pNext) { // Separator is found if (size > pNext - pStart) { // Found string fits in buffer size = pNext - pStart; } pNext++; } strncpy(pPropItem, pStart, size); pPropItem[size] = '\0'; return pNext; } StyleDefinition::StyleDefinition(const char *definition) : size(0), fore("#000000"), back("#FFFFFF"), bold(false), italics(false), eolfilled(false), underlined(false), caseForce(SC_CASE_MIXED), visible(true), changeable(true), specified(sdNone) { ParseStyleDefinition(definition); } bool StyleDefinition::ParseStyleDefinition(const char *definition) { if (definition == 0 || *definition == '\0') { return false; } char *val = StringDup(definition); //Platform::DebugPrintf("Style %d is [%s]\n", style, val); char *opt = val; while (opt) { // Find attribute separator char *cpComma = strchr(opt, ','); if (cpComma) { // If found, we terminate the current attribute (opt) string *cpComma = '\0'; } // Find attribute name/value separator char *colon = strchr(opt, ':'); if (colon) { // If found, we terminate the current attribute name and point on the value *colon++ = '\0'; } if (0 == strcmp(opt, "italics")) { specified = static_cast(specified | sdItalics); italics = true; } if (0 == strcmp(opt, "notitalics")) { specified = static_cast(specified | sdItalics); italics = false; } if (0 == strcmp(opt, "bold")) { specified = static_cast(specified | sdBold); bold = true; } if (0 == strcmp(opt, "notbold")) { specified = static_cast(specified | sdBold); bold = false; } if (0 == strcmp(opt, "font")) { specified = static_cast(specified | sdFont); font = colon; font.substitute('|', ','); } if (0 == strcmp(opt, "fore")) { specified = static_cast(specified | sdFore); fore = colon; } if (0 == strcmp(opt, "back")) { specified = static_cast(specified | sdBack); back = colon; } if (0 == strcmp(opt, "size")) { specified = static_cast(specified | sdSize); size = atoi(colon); } if (0 == strcmp(opt, "eolfilled")) { specified = static_cast(specified | sdEOLFilled); eolfilled = true; } if (0 == strcmp(opt, "noteolfilled")) { specified = static_cast(specified | sdEOLFilled); eolfilled = false; } if (0 == strcmp(opt, "underlined")) { specified = static_cast(specified | sdUnderlined); underlined = true; } if (0 == strcmp(opt, "notunderlined")) { specified = static_cast(specified | sdUnderlined); underlined = false; } if (0 == strcmp(opt, "case")) { specified = static_cast(specified | sdCaseForce); caseForce = SC_CASE_MIXED; if (colon) { if (*colon == 'u') caseForce = SC_CASE_UPPER; else if (*colon == 'l') caseForce = SC_CASE_LOWER; } } if (0 == strcmp(opt, "visible")) { specified = static_cast(specified | sdVisible); visible = true; } if (0 == strcmp(opt, "notvisible")) { specified = static_cast(specified | sdVisible); visible = false; } if (0 == strcmp(opt, "changeable")) { specified = static_cast(specified | sdChangeable); changeable = true; } if (0 == strcmp(opt, "notchangeable")) { specified = static_cast(specified | sdChangeable); changeable = false; } if (cpComma) opt = cpComma + 1; else opt = 0; } delete []val; return true; } long StyleDefinition::ForeAsLong() const { return ColourFromString(fore); } long StyleDefinition::BackAsLong() const { return ColourFromString(back); } void SciTEBase::SetOneStyle(Window &win, int style, const StyleDefinition &sd) { if (sd.specified & StyleDefinition::sdItalics) Platform::SendScintilla(win.GetID(), SCI_STYLESETITALIC, style, sd.italics ? 1 : 0); if (sd.specified & StyleDefinition::sdBold) Platform::SendScintilla(win.GetID(), SCI_STYLESETBOLD, style, sd.bold ? 1 : 0); if (sd.specified & StyleDefinition::sdFont) Platform::SendScintillaPointer(win.GetID(), SCI_STYLESETFONT, style, const_cast(sd.font.c_str())); if (sd.specified & StyleDefinition::sdFore) Platform::SendScintilla(win.GetID(), SCI_STYLESETFORE, style, sd.ForeAsLong()); if (sd.specified & StyleDefinition::sdBack) Platform::SendScintilla(win.GetID(), SCI_STYLESETBACK, style, sd.BackAsLong()); if (sd.specified & StyleDefinition::sdSize) Platform::SendScintilla(win.GetID(), SCI_STYLESETSIZE, style, sd.size); if (sd.specified & StyleDefinition::sdEOLFilled) Platform::SendScintilla(win.GetID(), SCI_STYLESETEOLFILLED, style, sd.eolfilled ? 1 : 0); if (sd.specified & StyleDefinition::sdUnderlined) Platform::SendScintilla(win.GetID(), SCI_STYLESETUNDERLINE, style, sd.underlined ? 1 : 0); if (sd.specified & StyleDefinition::sdCaseForce) Platform::SendScintilla(win.GetID(), SCI_STYLESETCASE, style, sd.caseForce); if (sd.specified & StyleDefinition::sdVisible) Platform::SendScintilla(win.GetID(), SCI_STYLESETVISIBLE, style, sd.visible ? 1 : 0); if (sd.specified & StyleDefinition::sdChangeable) Platform::SendScintilla(win.GetID(), SCI_STYLESETCHANGEABLE, style, sd.changeable ? 1 : 0); Platform::SendScintilla(win.GetID(), SCI_STYLESETCHARACTERSET, style, characterSet); } void SciTEBase::SetStyleFor(Window &win, const char *lang) { for (int style = 0; style <= STYLE_MAX; style++) { if (style != STYLE_DEFAULT) { char key[200]; sprintf(key, "style.%s.%0d", lang, style); SString sval = props.GetExpanded(key); SetOneStyle(win, style, sval.c_str()); } } } void LowerCaseString(char *s) { while (*s) { if ((*s >= 'A') && (*s <= 'Z')) { *s = static_cast(*s - 'A' + 'a'); } s++; } } SString SciTEBase::ExtensionFileName() { if (overrideExtension.length()) return overrideExtension; else if (fileName[0]) { // Force extension to lower case char fileNameWithLowerCaseExtension[MAX_PATH]; strcpy(fileNameWithLowerCaseExtension, fileName); char *extension = strrchr(fileNameWithLowerCaseExtension, '.'); if (extension) { LowerCaseString(extension); } return SString(fileNameWithLowerCaseExtension); } else return props.Get("default.file.ext"); } void SciTEBase::ForwardPropertyToEditor(const char *key) { SString value = props.Get(key); SendEditorString(SCI_SETPROPERTY, reinterpret_cast(key), value.c_str()); } void SciTEBase::DefineMarker(int marker, int markerType, ColourDesired fore, ColourDesired back) { SendEditor(SCI_MARKERDEFINE, marker, markerType); SendEditor(SCI_MARKERSETFORE, marker, fore.AsLong()); SendEditor(SCI_MARKERSETBACK, marker, back.AsLong()); } static int FileLength(const char *path) { int len = 0; FILE *fp = fopen(path, fileRead); if (fp) { fseek(fp, 0, SEEK_END); len = ftell(fp); fclose(fp); } return len; } void SciTEBase::ReadAPI(const SString &fileNameForExtension) { SString apisFileNames = props.GetNewExpand("api.", fileNameForExtension.c_str()); size_t nameLength = apisFileNames.length(); if (nameLength) { apisFileNames.substitute(';', '\0'); const char *apiFileName = apisFileNames.c_str(); const char *nameEnd = apiFileName + nameLength; int tlen = 0; // total api length // Calculate total length while (apiFileName < nameEnd) { tlen += FileLength(apiFileName); apiFileName += strlen(apiFileName) + 1; } // Load files if (tlen > 0) { char *buffer = apis.Allocate(tlen); if (buffer) { apiFileName = apisFileNames.c_str(); tlen = 0; while (apiFileName < nameEnd) { FILE *fp = fopen(apiFileName, fileRead); if (fp) { fseek(fp, 0, SEEK_END); int len = ftell(fp); fseek(fp, 0, SEEK_SET); fread(buffer + tlen, 1, len, fp); tlen += len; fclose(fp); } apiFileName += strlen(apiFileName) + 1; } apis.SetFromAllocated(); } } } } SString SciTEBase::FindLanguageProperty(const char *pattern, const char *defaultValue) { SString key = pattern; key.substitute("*", language.c_str()); SString ret = props.GetExpanded(key.c_str()); if (ret == "") ret = props.GetExpanded(pattern); if (ret == "") ret = defaultValue; return ret; } /** * A list of all the properties that should be forwarded to Scintilla lexers. */ static const char *propertiesToForward[] = { "fold", "fold.comment", "fold.compact", "fold.at.else", "fold.html", "fold.html.preprocessor", "fold.perl.package", "fold.perl.pod", "fold.preprocessor", "fold.quotes.python", "fold.verilog.flags", "styling.within.preprocessor", "tab.timmy.whinge.level", "asp.default.language", "html.tags.case.sensitive", "ps.level", "ps.tokenize", "sql.backslash.escapes", "lexer.tex.interface.default", "lexer.tex.comment.process", "lexer.tex.auto.if", "lexer.tex.use.keywords", "lexer.metapost.interface.default", "lexer.metapost.comment.process", "nsis.uservars", "nsis.ignorecase", 0, }; void SciTEBase::ReadProperties() { if (extender) extender->Clear(); SString fileNameForExtension = ExtensionFileName(); SString modulePath = props.GetNewExpand("lexerpath.", fileNameForExtension.c_str()); if (modulePath.length()) SendEditorString(SCI_LOADLEXERLIBRARY, 0, modulePath.c_str()); language = props.GetNewExpand("lexer.", fileNameForExtension.c_str()); if (language.length()) SendEditorString(SCI_SETLEXERLANGUAGE, 0, language.c_str()); else SendEditorString(SCI_SETLEXER, 0, SCLEX_CONTAINER); lexLanguage = SendEditor(SCI_GETLEXER); if ((lexLanguage == SCLEX_HTML) || (lexLanguage == SCLEX_XML) || (lexLanguage == SCLEX_ASP) || (lexLanguage == SCLEX_PHP)) SendEditor(SCI_SETSTYLEBITS, 7); else SendEditor(SCI_SETSTYLEBITS, 5); SendOutput(SCI_SETLEXER, SCLEX_ERRORLIST); SString kw0 = props.GetNewExpand("keywords.", fileNameForExtension.c_str()); SendEditorString(SCI_SETKEYWORDS, 0, kw0.c_str()); for (int wl = 1; wl <= KEYWORDSET_MAX; wl++) { SString kwk(wl+1); kwk += '.'; kwk.insert(0, "keywords"); SString kw = props.GetNewExpand(kwk.c_str(), fileNameForExtension.c_str()); SendEditorString(SCI_SETKEYWORDS, wl, kw.c_str()); } char homepath[MAX_PATH + 20]; if (GetSciteDefaultHome(homepath, sizeof(homepath))) { props.Set("SciteDefaultHome", homepath); } if (GetSciteUserHome(homepath, sizeof(homepath))) { props.Set("SciteUserHome", homepath); } for (size_t i=0; propertiesToForward[i]; i++) { ForwardPropertyToEditor(propertiesToForward[i]); } if (apisFileNames != props.GetNewExpand("api.", fileNameForExtension.c_str())) { apis.Clear(); ReadAPI(fileNameForExtension); apisFileNames = props.GetNewExpand("api.", fileNameForExtension.c_str()); } if (!props.GetInt("eol.auto")) { SetEol(); } codePage = props.GetInt("code.page"); if (unicodeMode != uni8Bit) { // Override properties file to ensure Unicode displayed. codePage = SC_CP_UTF8; } SendEditor(SCI_SETCODEPAGE, codePage); SendOutput(SCI_SETCODEPAGE, codePage); characterSet = props.GetInt("character.set", SC_CHARSET_DEFAULT); #ifdef unix SString localeCType = props.Get("LC_CTYPE"); if (localeCType.length()) setlocale(LC_CTYPE, localeCType.c_str()); else setlocale(LC_CTYPE, "C"); #endif wrapStyle = props.GetInt("wrap.style", SC_WRAP_WORD); SendEditor(SCI_SETCARETFORE, ColourOfProperty(props, "caret.fore", ColourDesired(0, 0, 0))); SendEditor(SCI_SETMOUSEDWELLTIME, props.GetInt("dwell.period", SC_TIME_FOREVER), 0); SendEditor(SCI_SETCARETWIDTH, props.GetInt("caret.width", 1)); SendOutput(SCI_SETCARETWIDTH, props.GetInt("caret.width", 1)); SString caretLineBack = props.Get("caret.line.back"); if (caretLineBack.length()) { SendEditor(SCI_SETCARETLINEVISIBLE, 1); SendEditor(SCI_SETCARETLINEBACK, ColourFromString(caretLineBack)); } else { SendEditor(SCI_SETCARETLINEVISIBLE, 0); } SString controlCharSymbol = props.Get("control.char.symbol"); if (controlCharSymbol.length()) { SendEditor(SCI_SETCONTROLCHARSYMBOL, static_cast(controlCharSymbol[0])); } else { SendEditor(SCI_SETCONTROLCHARSYMBOL, 0); } SendEditor(SCI_CALLTIPSETBACK, ColourOfProperty(props, "calltip.back", ColourDesired(0xff, 0xff, 0xff))); SString caretPeriod = props.Get("caret.period"); if (caretPeriod.length()) { SendEditor(SCI_SETCARETPERIOD, caretPeriod.value()); SendOutput(SCI_SETCARETPERIOD, caretPeriod.value()); } int caretSlop = props.GetInt("caret.policy.xslop", 1) ? CARET_SLOP : 0; int caretZone = props.GetInt("caret.policy.width", 50); int caretStrict = props.GetInt("caret.policy.xstrict") ? CARET_STRICT : 0; int caretEven = props.GetInt("caret.policy.xeven", 1) ? CARET_EVEN : 0; int caretJumps = props.GetInt("caret.policy.xjumps") ? CARET_JUMPS : 0; SendEditor(SCI_SETXCARETPOLICY, caretStrict | caretSlop | caretEven | caretJumps, caretZone); caretSlop = props.GetInt("caret.policy.yslop", 1) ? CARET_SLOP : 0; caretZone = props.GetInt("caret.policy.lines"); caretStrict = props.GetInt("caret.policy.ystrict") ? CARET_STRICT : 0; caretEven = props.GetInt("caret.policy.yeven", 1) ? CARET_EVEN : 0; caretJumps = props.GetInt("caret.policy.yjumps") ? CARET_JUMPS : 0; SendEditor(SCI_SETYCARETPOLICY, caretStrict | caretSlop | caretEven | caretJumps, caretZone); int visibleStrict = props.GetInt("visible.policy.strict") ? VISIBLE_STRICT : 0; int visibleSlop = props.GetInt("visible.policy.slop", 1) ? VISIBLE_SLOP : 0; int visibleLines = props.GetInt("visible.policy.lines"); SendEditor(SCI_SETVISIBLEPOLICY, visibleStrict | visibleSlop, visibleLines); SendEditor(SCI_SETEDGECOLUMN, props.GetInt("edge.column", 0)); SendEditor(SCI_SETEDGEMODE, props.GetInt("edge.mode", EDGE_NONE)); SendEditor(SCI_SETEDGECOLOUR, ColourOfProperty(props, "edge.colour", ColourDesired(0xff, 0xda, 0xda))); SString selFore = props.Get("selection.fore"); if (selFore.length()) { SendChildren(SCI_SETSELFORE, 1, ColourFromString(selFore)); } else { SendChildren(SCI_SETSELFORE, 0, 0); } SString selBack = props.Get("selection.back"); if (selBack.length()) { SendChildren(SCI_SETSELBACK, 1, ColourFromString(selBack)); } else { if (selFore.length()) SendChildren(SCI_SETSELBACK, 0, 0); else // Have to show selection somehow SendChildren(SCI_SETSELBACK, 1, ColourDesired(0xC0, 0xC0, 0xC0).AsLong()); } SString foldColour = props.Get("fold.margin.colour"); if (foldColour.length()) { SendChildren(SCI_SETFOLDMARGINCOLOUR, 1, ColourFromString(foldColour)); } else { SendChildren(SCI_SETFOLDMARGINCOLOUR, 0, 0); } SString foldHiliteColour = props.Get("fold.margin.highlight.colour"); if (foldHiliteColour.length()) { SendChildren(SCI_SETFOLDMARGINHICOLOUR, 1, ColourFromString(foldHiliteColour)); } else { SendChildren(SCI_SETFOLDMARGINHICOLOUR, 0, 0); } SString whitespaceFore = props.Get("whitespace.fore"); if (whitespaceFore.length()) { SendChildren(SCI_SETWHITESPACEFORE, 1, ColourFromString(whitespaceFore)); } else { SendChildren(SCI_SETWHITESPACEFORE, 0, 0); } SString whitespaceBack = props.Get("whitespace.back"); if (whitespaceBack.length()) { SendChildren(SCI_SETWHITESPACEBACK, 1, ColourFromString(whitespaceBack)); } else { SendChildren(SCI_SETWHITESPACEBACK, 0, 0); } char bracesStyleKey[200]; sprintf(bracesStyleKey, "braces.%s.style", language.c_str()); bracesStyle = props.GetInt(bracesStyleKey, 0); char key[200]; SString sval; sval = FindLanguageProperty("calltip.*.ignorecase"); callTipIgnoreCase = sval == "1"; calltipWordCharacters = FindLanguageProperty("calltip.*.word.characters", "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); calltipParametersStart = FindLanguageProperty("calltip.*.parameters.start", "("); calltipParametersEnd = FindLanguageProperty("calltip.*.parameters.end", ")"); calltipParametersSeparators = FindLanguageProperty("calltip.*.parameters.separators", ",;"); calltipEndDefinition = FindLanguageProperty("calltip.*.end.definition"); sprintf(key, "autocomplete.%s.start.characters", language.c_str()); autoCompleteStartCharacters = props.GetExpanded(key); if (autoCompleteStartCharacters == "") autoCompleteStartCharacters = props.GetExpanded("autocomplete.*.start.characters"); // "" is a quite reasonable value for this setting sprintf(key, "autocomplete.%s.fillups", language.c_str()); autoCompleteFillUpCharacters = props.GetExpanded(key); if (autoCompleteFillUpCharacters == "") autoCompleteFillUpCharacters = props.GetExpanded("autocomplete.*.fillups"); SendEditorString(SCI_AUTOCSETFILLUPS, 0, autoCompleteFillUpCharacters.c_str()); sprintf(key, "autocomplete.%s.ignorecase", "*"); sval = props.GetNewExpand(key); autoCompleteIgnoreCase = sval == "1"; sprintf(key, "autocomplete.%s.ignorecase", language.c_str()); sval = props.GetNewExpand(key); if (sval != "") autoCompleteIgnoreCase = sval == "1"; SendEditor(SCI_AUTOCSETIGNORECASE, autoCompleteIgnoreCase ? 1 : 0); int autoCChooseSingle = props.GetInt("autocomplete.choose.single"); SendEditor(SCI_AUTOCSETCHOOSESINGLE, autoCChooseSingle), SendEditor(SCI_AUTOCSETCANCELATSTART, 0); SendEditor(SCI_AUTOCSETDROPRESTOFWORD, 0); if (firstPropertiesRead) { ReadPropertiesInitial(); } ReadFontProperties(); SendEditor(SCI_SETUSEPALETTE, props.GetInt("use.palette")); SendEditor(SCI_SETPRINTMAGNIFICATION, props.GetInt("print.magnification")); SendEditor(SCI_SETPRINTCOLOURMODE, props.GetInt("print.colour.mode")); clearBeforeExecute = props.GetInt("clear.before.execute"); timeCommands = props.GetInt("time.commands"); int blankMarginLeft = props.GetInt("blank.margin.left", 1); int blankMarginRight = props.GetInt("blank.margin.right", 1); SendEditor(SCI_SETMARGINLEFT, 0, blankMarginLeft); SendEditor(SCI_SETMARGINRIGHT, 0, blankMarginRight); SendOutput(SCI_SETMARGINLEFT, 0, blankMarginLeft); SendOutput(SCI_SETMARGINRIGHT, 0, blankMarginRight); SendEditor(SCI_SETMARGINWIDTHN, 1, margin ? marginWidth : 0); SString lineMarginProp = props.Get("line.margin.width"); lineNumbersWidth = lineMarginProp.value(); if (lineNumbersWidth == 0) lineNumbersWidth = lineNumbersWidthDefault; lineNumbersExpand = lineMarginProp.contains('+'); SetLineNumberWidth(); bufferedDraw = props.GetInt("buffered.draw", 1); SendEditor(SCI_SETBUFFEREDDRAW, bufferedDraw); twoPhaseDraw = props.GetInt("two.phase.draw", 1); SendEditor(SCI_SETTWOPHASEDRAW, twoPhaseDraw); SendEditor(SCI_SETLAYOUTCACHE, props.GetInt("cache.layout")); SendOutput(SCI_SETLAYOUTCACHE, props.GetInt("output.cache.layout")); bracesCheck = props.GetInt("braces.check"); bracesSloppy = props.GetInt("braces.sloppy"); SendEditor(SCI_SETCHARSDEFAULT); wordCharacters = props.GetNewExpand("word.characters.", fileNameForExtension.c_str()); if (wordCharacters.length()) { SendEditorString(SCI_SETWORDCHARS, 0, wordCharacters.c_str()); } else { wordCharacters = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; } whitespaceCharacters = props.GetNewExpand("whitespace.characters.", fileNameForExtension.c_str()); if (whitespaceCharacters.length()) { SendEditorString(SCI_SETWHITESPACECHARS, 0, whitespaceCharacters.c_str()); } SendEditor(SCI_SETTABINDENTS, props.GetInt("tab.indents", 1)); SendEditor(SCI_SETBACKSPACEUNINDENTS, props.GetInt("backspace.unindents", 1)); indentOpening = props.GetInt("indent.opening"); indentClosing = props.GetInt("indent.closing"); indentMaintain = props.GetNewExpand("indent.maintain.", fileNameForExtension.c_str()).value(); SString lookback = props.GetNewExpand("statement.lookback.", fileNameForExtension.c_str()); statementLookback = lookback.value(); statementIndent = GetStyleAndWords("statement.indent."); statementEnd = GetStyleAndWords("statement.end."); blockStart = GetStyleAndWords("block.start."); blockEnd = GetStyleAndWords("block.end."); SString list; list = props.GetNewExpand("preprocessor.symbol.", fileNameForExtension.c_str()); preprocessorSymbol = list[0]; list = props.GetNewExpand("preprocessor.start.", fileNameForExtension.c_str()); preprocCondStart.Clear(); preprocCondStart.Set(list.c_str()); list = props.GetNewExpand("preprocessor.middle.", fileNameForExtension.c_str()); preprocCondMiddle.Clear(); preprocCondMiddle.Set(list.c_str()); list = props.GetNewExpand("preprocessor.end.", fileNameForExtension.c_str()); preprocCondEnd.Clear(); preprocCondEnd.Set(list.c_str()); memFiles.AppendList(props.GetNewExpand("find.files")); SendEditor(SCI_SETWRAPVISUALFLAGS, props.GetInt("wrap.visual.flags")); SendEditor(SCI_SETWRAPVISUALFLAGSLOCATION, props.GetInt("wrap.visual.flags.location")); SendEditor(SCI_SETWRAPSTARTINDENT, props.GetInt("wrap.visual.startindent")); if (props.GetInt("wrap.aware.home.end.keys",0)) { if (props.GetInt("vc.home.key", 1)) { AssignKey(SCK_HOME, 0, SCI_VCHOMEWRAP); AssignKey(SCK_HOME, SCMOD_SHIFT, SCI_VCHOMEWRAPEXTEND); AssignKey(SCK_HOME, SCMOD_SHIFT | SCMOD_ALT, SCI_VCHOMERECTEXTEND); } else { AssignKey(SCK_HOME, 0, SCI_HOMEWRAP); AssignKey(SCK_HOME, SCMOD_SHIFT, SCI_HOMEWRAPEXTEND); AssignKey(SCK_HOME, SCMOD_SHIFT | SCMOD_ALT, SCI_HOMERECTEXTEND); } AssignKey(SCK_END, 0, SCI_LINEENDWRAP); AssignKey(SCK_END, SCMOD_SHIFT, SCI_LINEENDWRAPEXTEND); } else { if (props.GetInt("vc.home.key", 1)) { AssignKey(SCK_HOME, 0, SCI_VCHOME); AssignKey(SCK_HOME, SCMOD_SHIFT, SCI_VCHOMEEXTEND); AssignKey(SCK_HOME, SCMOD_SHIFT | SCMOD_ALT, SCI_VCHOMERECTEXTEND); } else { AssignKey(SCK_HOME, 0, SCI_HOME); AssignKey(SCK_HOME, SCMOD_SHIFT, SCI_HOMEEXTEND); AssignKey(SCK_HOME, SCMOD_SHIFT | SCMOD_ALT, SCI_HOMERECTEXTEND); } AssignKey(SCK_END, 0, SCI_LINEEND); AssignKey(SCK_END, SCMOD_SHIFT, SCI_LINEENDEXTEND); } AssignKey('L', SCMOD_SHIFT | SCMOD_CTRL, SCI_LINEDELETE); scrollOutput = props.GetInt("output.scroll", 1); tabHideOne = props.GetInt("tabbar.hide.one"); SetToolsMenu(); SendEditor(SCI_SETFOLDFLAGS, props.GetInt("fold.flags")); // To put the folder markers in the line number region //SendEditor(SCI_SETMARGINMASKN, 0, SC_MASK_FOLDERS); SendEditor(SCI_SETMODEVENTMASK, SC_MOD_CHANGEFOLD); if (0==props.GetInt("undo.redo.lazy")) { // Trap for insert/delete notifications (also fired by undo // and redo) so that the buttons can be enabled if needed. SendEditor(SCI_SETMODEVENTMASK, SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT | SC_LASTSTEPINUNDOREDO | SendEditor(SCI_GETMODEVENTMASK, 0)); //SC_LASTSTEPINUNDOREDO is probably not needed in the mask; it //doesn't seem to fire as an event of its own; just modifies the //insert and delete events. } // Create a margin column for the folding symbols SendEditor(SCI_SETMARGINTYPEN, 2, SC_MARGIN_SYMBOL); SendEditor(SCI_SETMARGINWIDTHN, 2, foldMargin ? foldMarginWidth : 0); SendEditor(SCI_SETMARGINMASKN, 2, SC_MASK_FOLDERS); SendEditor(SCI_SETMARGINSENSITIVEN, 2, 1); switch (props.GetInt("fold.symbols")) { case 0: // Arrow pointing right for contracted folders, arrow pointing down for expanded DefineMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_ARROWDOWN, ColourDesired(0, 0, 0), ColourDesired(0, 0, 0)); DefineMarker(SC_MARKNUM_FOLDER, SC_MARK_ARROW, ColourDesired(0, 0, 0), ColourDesired(0, 0, 0)); DefineMarker(SC_MARKNUM_FOLDERSUB, SC_MARK_EMPTY, ColourDesired(0, 0, 0), ColourDesired(0, 0, 0)); DefineMarker(SC_MARKNUM_FOLDERTAIL, SC_MARK_EMPTY, ColourDesired(0, 0, 0), ColourDesired(0, 0, 0)); DefineMarker(SC_MARKNUM_FOLDEREND, SC_MARK_EMPTY, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0, 0, 0)); DefineMarker(SC_MARKNUM_FOLDEROPENMID, SC_MARK_EMPTY, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0, 0, 0)); DefineMarker(SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_EMPTY, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0, 0, 0)); break; case 1: // Plus for contracted folders, minus for expanded DefineMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_MINUS, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0, 0, 0)); DefineMarker(SC_MARKNUM_FOLDER, SC_MARK_PLUS, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0, 0, 0)); DefineMarker(SC_MARKNUM_FOLDERSUB, SC_MARK_EMPTY, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0, 0, 0)); DefineMarker(SC_MARKNUM_FOLDERTAIL, SC_MARK_EMPTY, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0, 0, 0)); DefineMarker(SC_MARKNUM_FOLDEREND, SC_MARK_EMPTY, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0, 0, 0)); DefineMarker(SC_MARKNUM_FOLDEROPENMID, SC_MARK_EMPTY, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0, 0, 0)); DefineMarker(SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_EMPTY, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0, 0, 0)); break; case 2: // Like a flattened tree control using circular headers and curved joins DefineMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_CIRCLEMINUS, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0x40, 0x40, 0x40)); DefineMarker(SC_MARKNUM_FOLDER, SC_MARK_CIRCLEPLUS, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0x40, 0x40, 0x40)); DefineMarker(SC_MARKNUM_FOLDERSUB, SC_MARK_VLINE, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0x40, 0x40, 0x40)); DefineMarker(SC_MARKNUM_FOLDERTAIL, SC_MARK_LCORNERCURVE, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0x40, 0x40, 0x40)); DefineMarker(SC_MARKNUM_FOLDEREND, SC_MARK_CIRCLEPLUSCONNECTED, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0x40, 0x40, 0x40)); DefineMarker(SC_MARKNUM_FOLDEROPENMID, SC_MARK_CIRCLEMINUSCONNECTED, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0x40, 0x40, 0x40)); DefineMarker(SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_TCORNERCURVE, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0x40, 0x40, 0x40)); break; case 3: // Like a flattened tree control using square headers DefineMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_BOXMINUS, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0x80, 0x80, 0x80)); DefineMarker(SC_MARKNUM_FOLDER, SC_MARK_BOXPLUS, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0x80, 0x80, 0x80)); DefineMarker(SC_MARKNUM_FOLDERSUB, SC_MARK_VLINE, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0x80, 0x80, 0x80)); DefineMarker(SC_MARKNUM_FOLDERTAIL, SC_MARK_LCORNER, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0x80, 0x80, 0x80)); DefineMarker(SC_MARKNUM_FOLDEREND, SC_MARK_BOXPLUSCONNECTED, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0x80, 0x80, 0x80)); DefineMarker(SC_MARKNUM_FOLDEROPENMID, SC_MARK_BOXMINUSCONNECTED, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0x80, 0x80, 0x80)); DefineMarker(SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_TCORNER, ColourDesired(0xff, 0xff, 0xff), ColourDesired(0x80, 0x80, 0x80)); break; } SendEditor(SCI_MARKERSETFORE, SciTE_MARKER_BOOKMARK, ColourOfProperty(props, "bookmark.fore", ColourDesired(0, 0, 0x7f))); SendEditor(SCI_MARKERSETBACK, SciTE_MARKER_BOOKMARK, ColourOfProperty(props, "bookmark.back", ColourDesired(0x80, 0xff, 0xff))); SString bookMarkXPM = props.Get("bookmark.pixmap"); if (bookMarkXPM.length()) { SendEditorString(SCI_MARKERDEFINEPIXMAP, SciTE_MARKER_BOOKMARK, bookMarkXPM.c_str()); } else { SendEditor(SCI_MARKERDEFINE, SciTE_MARKER_BOOKMARK, SC_MARK_CIRCLE); } SendEditor(SCI_SETSCROLLWIDTH, props.GetInt("horizontal.scroll.width", 2000)); SendOutput(SCI_SETSCROLLWIDTH, props.GetInt("output.horizontal.scroll.width", 2000)); // Do these last as they force a style refresh SendEditor(SCI_SETHSCROLLBAR, props.GetInt("horizontal.scrollbar", 1)); SendOutput(SCI_SETHSCROLLBAR, props.GetInt("output.horizontal.scrollbar", 1)); SendEditor(SCI_SETENDATLASTLINE, props.GetInt("end.at.last.line", 1)); SendEditor(SCI_SETCARETSTICKY, props.GetInt("caret.sticky", 0)); if (extender) { char defaultDir[MAX_PATH]; GetDefaultDirectory(defaultDir, sizeof(defaultDir)); char scriptPath[MAX_PATH]; // Check for an extension script SString extensionFile = props.GetNewExpand("extension.", fileNameForExtension.c_str()); if (extensionFile.length()) { // find file in local directory char docDir[MAX_PATH]; GetDocumentDirectory(docDir, sizeof(docDir)); if (Exists(docDir, extensionFile.c_str(), scriptPath)) { // Found file in document directory extender->Load(scriptPath); } else if (Exists(defaultDir, extensionFile.c_str(), scriptPath)) { // Found file in global directory extender->Load(scriptPath); } else if (Exists("", extensionFile.c_str(), scriptPath)) { // Found as completely specified file name extender->Load(scriptPath); } } } firstPropertiesRead = false; needReadProperties = false; } void SciTEBase::ReadFontProperties() { char key[200]; SString sval; // Set styles // For each window set the global default style, then the language default style, then the other global styles, then the other language styles SendEditor(SCI_STYLERESETDEFAULT, 0, 0); SendOutput(SCI_STYLERESETDEFAULT, 0, 0); sprintf(key, "style.%s.%0d", "*", STYLE_DEFAULT); sval = props.GetNewExpand(key); SetOneStyle(wEditor, STYLE_DEFAULT, sval.c_str()); SetOneStyle(wOutput, STYLE_DEFAULT, sval.c_str()); sprintf(key, "style.%s.%0d", language.c_str(), STYLE_DEFAULT); sval = props.GetNewExpand(key); SetOneStyle(wEditor, STYLE_DEFAULT, sval.c_str()); SendEditor(SCI_STYLECLEARALL, 0, 0); SetStyleFor(wEditor, "*"); SetStyleFor(wEditor, language.c_str()); SendOutput(SCI_STYLECLEARALL, 0, 0); sprintf(key, "style.%s.%0d", "errorlist", STYLE_DEFAULT); sval = props.GetNewExpand(key); SetOneStyle(wOutput, STYLE_DEFAULT, sval.c_str()); SendOutput(SCI_STYLECLEARALL, 0, 0); SetStyleFor(wOutput, "*"); SetStyleFor(wOutput, "errorlist"); if (useMonoFont) { sval = props.GetExpanded("font.monospace"); StyleDefinition sd(sval.c_str()); for (int style = 0; style <= STYLE_MAX; style++) { if (style != STYLE_LINENUMBER) { if (sd.specified & StyleDefinition::sdFont) { SendEditorString(SCI_STYLESETFONT, style, sd.font.c_str()); } if (sd.specified & StyleDefinition::sdSize) { SendEditor(SCI_STYLESETSIZE, style, sd.size); } } } } } // Properties that are interactively modifiable are only read from the properties file once. void SciTEBase::SetPropertiesInitial() { splitVertical = props.GetInt("split.vertical"); openFilesHere = props.GetInt("check.if.already.open"); wrap = props.GetInt("wrap"); wrapOutput = props.GetInt("output.wrap"); indentationWSVisible = props.GetInt("view.indentation.whitespace", 1); sbVisible = props.GetInt("statusbar.visible"); tbVisible = props.GetInt("toolbar.visible"); tabVisible = props.GetInt("tabbar.visible"); tabMultiLine = props.GetInt("tabbar.multiline"); lineNumbers = props.GetInt("line.margin.visible"); marginWidth = 0; SString margwidth = props.Get("margin.width"); if (margwidth.length()) marginWidth = margwidth.value(); margin = marginWidth; if (marginWidth == 0) marginWidth = marginWidthDefault; foldMarginWidth = props.GetInt("fold.margin.width", foldMarginWidthDefault); foldMargin = foldMarginWidth; if (foldMarginWidth == 0) foldMarginWidth = foldMarginWidthDefault; matchCase = props.GetInt("find.replace.matchcase"); regExp = props.GetInt("find.replace.regexp"); unSlash = props.GetInt("find.replace.escapes"); wrapFind = props.GetInt("find.replace.wrap", 1); } SString SciTEBase::LocaliseString(const char *s, bool retainIfNotFound) { SString translation = s; int ellipseIndicator = translation.remove("..."); int accessKeyPresent = translation.remove(menuAccessIndicator); translation.lowercase(); translation.substitute("\n", "\\n"); translation = propsUI.Get(translation.c_str()); if (translation.length()) { if (ellipseIndicator) translation += "..."; if (0 == accessKeyPresent) { #if PLAT_WIN // Following codes are required because accelerator is not always // part of alphabetical word in several language. In these cases, // accelerator is written like "(&O)". int posOpenParenAnd = translation.search("(&"); if (posOpenParenAnd > 0 && translation.search(")", posOpenParenAnd) == posOpenParenAnd+3) { translation.remove(posOpenParenAnd, 4); } else { translation.remove("&"); } #else translation.remove("&"); #endif } translation.substitute("&", menuAccessIndicator); translation.substitute("\\n", "\n"); } else { translation = props.Get("translation.missing"); } if ((translation.length() > 0) || !retainIfNotFound) { return translation; } return s; } SString SciTEBase::LocaliseMessage(const char *s, const char *param0, const char *param1, const char *param2) { SString translation = LocaliseString(s); if (param0) translation.substitute("^0", param0); if (param1) translation.substitute("^1", param1); if (param2) translation.substitute("^2", param2); return translation; } void SciTEBase::ReadLocalisation() { char propfile[MAX_PATH + 20]; char propdir[MAX_PATH + 20]; propsUI.Clear(); const char *title = "locale.properties"; SString localeProps = props.GetExpanded(title); if (localeProps.length()) { title = localeProps.c_str(); } if (GetSciteDefaultHome(propdir, sizeof propdir) && BuildPath(propfile, propdir, title, sizeof propfile)) { strcat(propdir, pathSepString); propsUI.Read(propfile, propdir, importFiles, importMax); } localisationRead = true; } void SciTEBase::ReadPropertiesInitial() { SetPropertiesInitial(); int sizeHorizontal = props.GetInt("output.horizontal.size", 0); int sizeVertical = props.GetInt("output.vertical.size", 0); if ((!splitVertical && (sizeVertical > 0) && (heightOutput < sizeVertical)) || (splitVertical && (sizeHorizontal > 0) && (heightOutput < sizeHorizontal))) { heightOutput = NormaliseSplit(splitVertical ? sizeHorizontal : sizeVertical); SizeSubWindows(); Redraw(); } ViewWhitespace(props.GetInt("view.whitespace")); SendEditor(SCI_SETINDENTATIONGUIDES, props.GetInt("view.indentation.guides")); SendEditor(SCI_SETVIEWEOL, props.GetInt("view.eol")); SendEditor(SCI_SETZOOM, props.GetInt("magnification")); SendOutput(SCI_SETZOOM, props.GetInt("output.magnification")); SendEditor(SCI_SETWRAPMODE, wrap ? wrapStyle : SC_WRAP_NONE); SendOutput(SCI_SETWRAPMODE, wrapOutput ? wrapStyle : SC_WRAP_NONE); useMonoFont = false; SString menuLanguageProp = props.GetNewExpand("menu.language"); languageItems = 0; for (unsigned int i = 0; i < menuLanguageProp.length(); i++) { if (menuLanguageProp[i] == '|') languageItems++; } languageItems /= 3; languageMenu = new LanguageMenuItem[languageItems]; menuLanguageProp.substitute('|', '\0'); const char *sMenuLanguage = menuLanguageProp.c_str(); for (int item = 0; item < languageItems; item++) { languageMenu[item].menuItem = sMenuLanguage; sMenuLanguage += strlen(sMenuLanguage) + 1; languageMenu[item].extension = sMenuLanguage; sMenuLanguage += strlen(sMenuLanguage) + 1; languageMenu[item].menuKey = sMenuLanguage; sMenuLanguage += strlen(sMenuLanguage) + 1; } SetLanguageMenu(); // load the user defined short cut props SString shortCutProp = props.GetNewExpand("user.shortcuts"); if (shortCutProp.length()) { shortCutItems = 0; for (unsigned int i = 0; i < shortCutProp.length(); i++) { if (shortCutProp[i] == '|') shortCutItems++; } shortCutItems /= 2; shortCutItemList = new ShortcutItem[shortCutItems]; shortCutProp.substitute('|', '\0'); const char *sShortCutProp = shortCutProp.c_str(); for (int item = 0; item < shortCutItems; item++) { shortCutItemList[item].menuKey = sShortCutProp; sShortCutProp += strlen(sShortCutProp) + 1; shortCutItemList[item].menuCommand = sShortCutProp; sShortCutProp += strlen(sShortCutProp) + 1; } } // end load the user defined short cut props #if PLAT_WIN if (tabMultiLine) { // Windows specific! long wl = ::GetWindowLong(reinterpret_cast(wTabBar.GetID()), GWL_STYLE); ::SetWindowLong(reinterpret_cast(wTabBar.GetID()), GWL_STYLE, wl | TCS_MULTILINE); } #endif char homepath[MAX_PATH + 20]; if (GetSciteDefaultHome(homepath, sizeof(homepath))) { props.Set("sdlBasicDefaultHome", homepath); } if (GetSciteUserHome(homepath, sizeof(homepath))) { props.Set("sdlBasicUserHome", homepath); } } bool SciTEBase::GetDefaultPropertiesFileName(char *pathDefaultProps, char *pathDefaultDir, unsigned int lenPath) { if (!GetSciteDefaultHome(pathDefaultDir, lenPath)) { return false; } return BuildPath(pathDefaultProps, pathDefaultDir, propGlobalFileName, lenPath); } bool SciTEBase::GetAbbrevPropertiesFileName(char *pathAbbrevProps, char *pathDefaultDir, unsigned int lenPath) { if (!GetSciteUserHome(pathDefaultDir, lenPath)) { return false; } return BuildPath(pathAbbrevProps, pathDefaultDir, propAbbrevFileName, lenPath); } bool SciTEBase::GetUserPropertiesFileName(char *pathUserProps, char *pathUserDir, unsigned int lenPath) { if (!GetSciteUserHome(pathUserDir, lenPath)) { return false; } return BuildPath(pathUserProps, pathUserDir, propUserFileName, lenPath); } void SciTEBase::OpenProperties(int propsFile) { char propfile[MAX_PATH + 20]; char propdir[MAX_PATH + 20]; if (propsFile == IDM_OPENLOCALPROPERTIES) { GetDocumentDirectory(propfile, sizeof(propfile)); #ifdef __vms strcpy(propfile, VMSToUnixStyle(propfile)); #endif strcat(propfile, pathSepString); strcat(propfile, propFileName); Open(propfile, ofQuiet); } else if (propsFile == IDM_OPENUSERPROPERTIES) { if (GetUserPropertiesFileName(propfile, propdir, sizeof(propfile))) { Open(propfile, ofQuiet); } } else if (propsFile == IDM_OPENABBREVPROPERTIES) { if (GetAbbrevPropertiesFileName(propfile, propdir, sizeof(propfile))) { Open(propfile, ofQuiet); } } else if (propsFile == IDM_OPENGLOBALPROPERTIES) { if (GetDefaultPropertiesFileName(propfile, propdir, sizeof(propfile))) { Open(propfile, ofQuiet); } } else if (propsFile == IDM_OPENLUAEXTERNALFILE) { SString extlua = props.GetExpanded("ext.lua.startup.script"); if (extlua.length()) { Open(extlua.c_str(), ofQuiet); } } } // return the int value of the command name passed in. int SciTEBase::GetMenuCommandAsInt(SString commandName) { struct { const char *name; int id; } idmTable[] = { //++Autogenerated -- run ../scintilla/src/LexGen.py to regenerate //**\(\t\t{"\*",\t\*},\n\) {"IDM_MRUFILE", IDM_MRUFILE}, {"IDM_TOOLS", IDM_TOOLS}, {"IDM_BUFFER", IDM_BUFFER}, {"IDM_IMPORT", IDM_IMPORT}, {"IDM_LANGUAGE", IDM_LANGUAGE}, {"IDM_NEW", IDM_NEW}, {"IDM_OPEN", IDM_OPEN}, {"IDM_OPENSELECTED", IDM_OPENSELECTED}, {"IDM_REVERT", IDM_REVERT}, {"IDM_CLOSE", IDM_CLOSE}, {"IDM_SAVE", IDM_SAVE}, {"IDM_SAVEAS", IDM_SAVEAS}, {"IDM_SAVEASHTML", IDM_SAVEASHTML}, {"IDM_SAVEASRTF", IDM_SAVEASRTF}, {"IDM_SAVEASPDF", IDM_SAVEASPDF}, {"IDM_FILER", IDM_FILER}, {"IDM_SAVEASTEX", IDM_SAVEASTEX}, {"IDM_SAVEACOPY", IDM_SAVEACOPY}, {"IDM_SAVEASXML", IDM_SAVEASXML}, {"IDM_MRU_SEP", IDM_MRU_SEP}, {"IDM_PRINTSETUP", IDM_PRINTSETUP}, {"IDM_PRINT", IDM_PRINT}, {"IDM_LOADSESSION", IDM_LOADSESSION}, {"IDM_SAVESESSION", IDM_SAVESESSION}, {"IDM_QUIT", IDM_QUIT}, {"IDM_ENCODING_DEFAULT", IDM_ENCODING_DEFAULT}, {"IDM_ENCODING_UCS2BE", IDM_ENCODING_UCS2BE}, {"IDM_ENCODING_UCS2LE", IDM_ENCODING_UCS2LE}, {"IDM_ENCODING_UTF8", IDM_ENCODING_UTF8}, {"IDM_ENCODING_UCOOKIE", IDM_ENCODING_UCOOKIE}, {"IDM_UNDO", IDM_UNDO}, {"IDM_REDO", IDM_REDO}, {"IDM_CUT", IDM_CUT}, {"IDM_COPY", IDM_COPY}, {"IDM_PASTE", IDM_PASTE}, {"IDM_CLEAR", IDM_CLEAR}, {"IDM_SELECTALL", IDM_SELECTALL}, {"IDM_PASTEANDDOWN", IDM_PASTEANDDOWN}, {"IDM_FIND", IDM_FIND}, {"IDM_FINDNEXT", IDM_FINDNEXT}, {"IDM_FINDNEXTBACK", IDM_FINDNEXTBACK}, {"IDM_FINDNEXTSEL", IDM_FINDNEXTSEL}, {"IDM_FINDNEXTBACKSEL", IDM_FINDNEXTBACKSEL}, {"IDM_FINDINFILES", IDM_FINDINFILES}, {"IDM_REPLACE", IDM_REPLACE}, {"IDM_GOTO", IDM_GOTO}, {"IDM_BOOKMARK_NEXT", IDM_BOOKMARK_NEXT}, {"IDM_BOOKMARK_TOGGLE", IDM_BOOKMARK_TOGGLE}, {"IDM_BOOKMARK_PREV", IDM_BOOKMARK_PREV}, {"IDM_BOOKMARK_CLEARALL", IDM_BOOKMARK_CLEARALL}, {"IDM_BOOKMARK_NEXT_SELECT", IDM_BOOKMARK_NEXT_SELECT}, {"IDM_BOOKMARK_PREV_SELECT", IDM_BOOKMARK_PREV_SELECT}, {"IDM_MATCHBRACE", IDM_MATCHBRACE}, {"IDM_SELECTTOBRACE", IDM_SELECTTOBRACE}, {"IDM_SHOWCALLTIP", IDM_SHOWCALLTIP}, {"IDM_COMPLETE", IDM_COMPLETE}, {"IDM_COMPLETEWORD", IDM_COMPLETEWORD}, {"IDM_EXPAND", IDM_EXPAND}, {"IDM_TOGGLE_FOLDALL", IDM_TOGGLE_FOLDALL}, {"IDM_TOGGLE_FOLDRECURSIVE", IDM_TOGGLE_FOLDRECURSIVE}, {"IDM_EXPAND_ENSURECHILDRENVISIBLE", IDM_EXPAND_ENSURECHILDRENVISIBLE}, {"IDM_UPRCASE", IDM_UPRCASE}, {"IDM_LWRCASE", IDM_LWRCASE}, {"IDM_ABBREV", IDM_ABBREV}, {"IDM_BLOCK_COMMENT", IDM_BLOCK_COMMENT}, {"IDM_STREAM_COMMENT", IDM_STREAM_COMMENT}, {"IDM_COPYASRTF", IDM_COPYASRTF}, {"IDM_BOX_COMMENT", IDM_BOX_COMMENT}, {"IDM_INS_ABBREV", IDM_INS_ABBREV}, {"IDM_JOIN", IDM_JOIN}, {"IDM_SPLIT", IDM_SPLIT}, {"IDM_INCSEARCH", IDM_INCSEARCH}, {"IDM_ENTERSELECTION", IDM_ENTERSELECTION}, {"IDM_PREVMATCHPPC", IDM_PREVMATCHPPC}, {"IDM_SELECTTOPREVMATCHPPC", IDM_SELECTTOPREVMATCHPPC}, {"IDM_NEXTMATCHPPC", IDM_NEXTMATCHPPC}, {"IDM_SELECTTONEXTMATCHPPC", IDM_SELECTTONEXTMATCHPPC}, {"IDM_COMPILE", IDM_COMPILE}, {"IDM_BUILD", IDM_BUILD}, {"IDM_GO", IDM_GO}, {"IDM_STOPEXECUTE", IDM_STOPEXECUTE}, {"IDM_FINISHEDEXECUTE", IDM_FINISHEDEXECUTE}, {"IDM_NEXTMSG", IDM_NEXTMSG}, {"IDM_PREVMSG", IDM_PREVMSG}, {"IDM_MACRO_SEP", IDM_MACRO_SEP}, {"IDM_MACRORECORD", IDM_MACRORECORD}, {"IDM_MACROSTOPRECORD", IDM_MACROSTOPRECORD}, {"IDM_MACROPLAY", IDM_MACROPLAY}, {"IDM_MACROLIST", IDM_MACROLIST}, {"IDM_ACTIVATE", IDM_ACTIVATE}, {"IDM_SRCWIN", IDM_SRCWIN}, {"IDM_RUNWIN", IDM_RUNWIN}, {"IDM_TOOLWIN", IDM_TOOLWIN}, {"IDM_STATUSWIN", IDM_STATUSWIN}, {"IDM_TABWIN", IDM_TABWIN}, {"IDM_SPLITVERTICAL", IDM_SPLITVERTICAL}, {"IDM_VIEWSPACE", IDM_VIEWSPACE}, {"IDM_VIEWEOL", IDM_VIEWEOL}, {"IDM_VIEWGUIDES", IDM_VIEWGUIDES}, {"IDM_SELMARGIN", IDM_SELMARGIN}, {"IDM_FOLDMARGIN", IDM_FOLDMARGIN}, {"IDM_LINENUMBERMARGIN", IDM_LINENUMBERMARGIN}, {"IDM_VIEWTOOLBAR", IDM_VIEWTOOLBAR}, {"IDM_TOGGLEOUTPUT", IDM_TOGGLEOUTPUT}, {"IDM_VIEWTABBAR", IDM_VIEWTABBAR}, {"IDM_VIEWSTATUSBAR", IDM_VIEWSTATUSBAR}, {"IDM_TOGGLEPARAMETERS", IDM_TOGGLEPARAMETERS}, {"IDM_OPENFILESHERE", IDM_OPENFILESHERE}, {"IDM_WRAP", IDM_WRAP}, {"IDM_WRAPOUTPUT", IDM_WRAPOUTPUT}, {"IDM_READONLY", IDM_READONLY}, {"IDM_CLEAROUTPUT", IDM_CLEAROUTPUT}, {"IDM_SWITCHPANE", IDM_SWITCHPANE}, {"IDM_EOL_CRLF", IDM_EOL_CRLF}, {"IDM_EOL_CR", IDM_EOL_CR}, {"IDM_EOL_LF", IDM_EOL_LF}, {"IDM_EOL_CONVERT", IDM_EOL_CONVERT}, {"IDM_TABSIZE", IDM_TABSIZE}, {"IDM_MONOFONT", IDM_MONOFONT}, {"IDM_OPENLOCALPROPERTIES", IDM_OPENLOCALPROPERTIES}, {"IDM_OPENUSERPROPERTIES", IDM_OPENUSERPROPERTIES}, {"IDM_OPENGLOBALPROPERTIES", IDM_OPENGLOBALPROPERTIES}, {"IDM_OPENABBREVPROPERTIES", IDM_OPENABBREVPROPERTIES}, {"IDM_OPENLUAEXTERNALFILE", IDM_OPENLUAEXTERNALFILE}, {"IDM_PREVFILE", IDM_PREVFILE}, {"IDM_NEXTFILE", IDM_NEXTFILE}, {"IDM_CLOSEALL", IDM_CLOSEALL}, {"IDM_SAVEALL", IDM_SAVEALL}, {"IDM_BUFFERSEP", IDM_BUFFERSEP}, {"IDM_HELP", IDM_HELP}, {"IDM_ABOUT", IDM_ABOUT}, {"IDM_HELP_SCITE", IDM_HELP_SCITE}, {"IDM_ONTOP", IDM_ONTOP}, {"IDM_FULLSCREEN", IDM_FULLSCREEN}, //--Autogenerated -- end of automatically generated section {0, 0}, }; for (int i=0; idmTable[i].id; i++) { if (commandName == idmTable[i].name) { return idmTable[i].id; } } // Otherwise we might have entered a number as command to access a "SCI_" command return commandName.value(); } usr/src/sdlBasic/src/sdlBasic/src/SciTEKeys.h0000777000076500007660000000071510463134202016220 0ustar // SciTE - Scintilla based Text Editor /** @file SciTEKeys.h ** SciTE keyboard shortcut facilities. **/ // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SCITEKEYS_H #define SCITEKEYS_H class SciTEKeys { public: static long ParseKeyCode(const char *mnemonic); static bool MatchKeyCode(long parsedKeyCode, int key, int modifiers); }; #endif usr/src/sdlBasic/src/sdlBasic/src/Utf8_16.h0000777000076500007660000000627210463134411015557 0ustar // Utf8_16.h // Copyright (C) 2002 Scott Kirkwood // // Permission to use, copy, modify, distribute and sell this code // and its documentation for any purpose is hereby granted without fee, // provided that the above copyright notice appear in all copies or // any derived copies. Scott Kirkwood makes no representations // about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. // // Notes: Used the UTF information I found at: // http://www.cl.cam.ac.uk/~mgk25/unicode.html //////////////////////////////////////////////////////////////////////////////// #include #include #ifdef _MSC_VER #pragma warning(disable: 4514) // nreferenced inline function has been removed #endif class Utf8_16 { public: typedef unsigned short utf16; // 16 bits typedef unsigned char utf8; // 8 bits typedef unsigned char ubyte; enum encodingType { eUnknown, eUtf16BigEndian, eUtf16LittleEndian, // Default on Windows eUtf8, eLast }; static const utf8 k_Boms[eLast][3]; }; // Reads UTF-16 and outputs UTF-8 class Utf16_Iter : public Utf8_16 { public: Utf16_Iter(); void reset(); void set(const ubyte* pBuf, size_t nLen, encodingType eEncoding); utf8 get() const { return m_nCur; } void operator++(); operator bool() { return m_pRead <= m_pEnd; } protected: void toStart(); // Put to start state, swap bytes if necessary enum eState { eStart, e2Bytes2, e3Bytes2, e3Bytes3 }; protected: encodingType m_eEncoding; eState m_eState; utf8 m_nCur; utf16 m_nCur16; const ubyte* m_pBuf; const ubyte* m_pRead; const ubyte* m_pEnd; }; // Reads UTF-8 and outputs UTF-16 class Utf8_Iter : public Utf8_16 { public: Utf8_Iter(); void reset(); void set(const ubyte* pBuf, size_t nLen, encodingType eEncoding); utf16 get() const { #ifdef _DEBUG assert(m_eState == eStart); #endif return m_nCur; } bool canGet() const { return m_eState == eStart; } void operator++(); operator bool() { return m_pRead <= m_pEnd; } protected: void swap(); void toStart(); // Put to start state, swap bytes if necessary enum eState { eStart, e2Bytes_Byte2, e3Bytes_Byte2, e3Bytes_Byte3 }; protected: encodingType m_eEncoding; eState m_eState; utf16 m_nCur; const ubyte* m_pBuf; const ubyte* m_pRead; const ubyte* m_pEnd; }; // Reads UTF16 and outputs UTF8 class Utf8_16_Read : public Utf8_16 { public: Utf8_16_Read(); ~Utf8_16_Read(); size_t convert(char* buf, size_t len); char* getNewBuf() { return reinterpret_cast(m_pNewBuf); } encodingType getEncoding() const { return m_eEncoding; } protected: int determineEncoding(); private: encodingType m_eEncoding; ubyte* m_pBuf; ubyte* m_pNewBuf; size_t m_nBufSize; bool m_bFirstRead; size_t m_nLen; Utf16_Iter m_Iter16; }; // Read in a UTF-8 buffer and write out to UTF-16 or UTF-8 class Utf8_16_Write : public Utf8_16 { public: Utf8_16_Write(); ~Utf8_16_Write(); void setEncoding(encodingType eType); FILE * fopen(const char *_name, const char *_type); size_t fwrite(const void* p, size_t _size); void fclose(); protected: encodingType m_eEncoding; FILE* m_pFile; utf16* m_pBuf; size_t m_nBufSize; bool m_bFirstWrite; }; usr/src/sdlBasic/src/sdlBasic/src/Utf8_16.cxx0000777000076500007660000001634310463134411016132 0ustar // Utf8_16.cxx // Copyright (C) 2002 Scott Kirkwood // // Permission to use, copy, modify, distribute and sell this code // and its documentation for any purpose is hereby granted without fee, // provided that the above copyright notice appear in all copies or // any derived copies. Scott Kirkwood makes no representations // about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. //////////////////////////////////////////////////////////////////////////////// #include "Utf8_16.h" #include const Utf8_16::utf8 Utf8_16::k_Boms[][3] = { {0x00, 0x00, 0x00}, // Unknown {0xFE, 0xFF, 0x00}, // Big endian {0xFF, 0xFE, 0x00}, // Little endian {0xEF, 0xBB, 0xBF}, // UTF8 }; // ================================================================== Utf8_16_Read::Utf8_16_Read() { m_eEncoding = eUnknown; m_nBufSize = 0; m_pNewBuf = NULL; m_bFirstRead = true; } Utf8_16_Read::~Utf8_16_Read() { if ((m_eEncoding != eUnknown) && (m_eEncoding != eUtf8)) { delete [] m_pNewBuf; m_pNewBuf = NULL; } } size_t Utf8_16_Read::convert(char* buf, size_t len) { m_pBuf = reinterpret_cast(buf); m_nLen = len; int nSkip = 0; if (m_bFirstRead) { nSkip = determineEncoding(); m_bFirstRead = false; } if (m_eEncoding == eUnknown) { // Do nothing, pass through m_nBufSize = 0; m_pNewBuf = m_pBuf; return len; } if (m_eEncoding == eUtf8) { // Pass through after BOM m_nBufSize = 0; m_pNewBuf = m_pBuf + nSkip; return len - nSkip; } // Else... size_t newSize = len + len / 2 + 1; if (m_nBufSize != newSize) { delete [] m_pNewBuf; m_pNewBuf = NULL; m_pNewBuf = new ubyte[newSize]; m_nBufSize = newSize; } ubyte* pCur = m_pNewBuf; m_Iter16.set(m_pBuf + nSkip, len - nSkip, m_eEncoding); for (; m_Iter16; ++m_Iter16) { *pCur++ = m_Iter16.get(); } // Return number of bytes writen out return pCur - m_pNewBuf; } int Utf8_16_Read::determineEncoding() { m_eEncoding = eUnknown; int nRet = 0; if (m_nLen > 1) { if (m_pBuf[0] == k_Boms[eUtf16BigEndian][0] && m_pBuf[1] == k_Boms[eUtf16BigEndian][1]) { m_eEncoding = eUtf16BigEndian; nRet = 2; } else if (m_pBuf[0] == k_Boms[eUtf16LittleEndian][0] && m_pBuf[1] == k_Boms[eUtf16LittleEndian][1]) { m_eEncoding = eUtf16LittleEndian; nRet = 2; } else if (m_nLen > 2 && m_pBuf[0] == k_Boms[eUtf8][0] && m_pBuf[1] == k_Boms[eUtf8][1] && m_pBuf[2] == k_Boms[eUtf8][2]) { m_eEncoding = eUtf8; nRet = 3; } } return nRet; } // ================================================================== Utf8_16_Write::Utf8_16_Write() { m_eEncoding = eUnknown; m_pFile = NULL; m_pBuf = NULL; m_bFirstWrite = true; m_nBufSize = 0; } Utf8_16_Write::~Utf8_16_Write() { if (m_pFile) { fclose(); } } FILE * Utf8_16_Write::fopen(const char *_name, const char *_type) { m_pFile = ::fopen(_name, _type); m_bFirstWrite = true; return m_pFile; } size_t Utf8_16_Write::fwrite(const void* p, size_t _size) { if (!m_pFile) { return 0; // fail } if (m_eEncoding == eUnknown) { // Normal write return ::fwrite(p, _size, 1, m_pFile); } if (m_eEncoding == eUtf8) { if (m_bFirstWrite) ::fwrite(k_Boms[m_eEncoding], 3, 1, m_pFile); m_bFirstWrite = false; return ::fwrite(p, _size, 1, m_pFile); } if (_size > m_nBufSize) { m_nBufSize = _size; delete [] m_pBuf; m_pBuf = NULL; m_pBuf = new utf16[_size + 1]; } if (m_bFirstWrite) { if (m_eEncoding == eUtf16BigEndian || m_eEncoding == eUtf16LittleEndian) { // Write the BOM ::fwrite(k_Boms[m_eEncoding], 2, 1, m_pFile); } m_bFirstWrite = false; } Utf8_Iter iter8; iter8.set(static_cast(p), _size, m_eEncoding); utf16* pCur = m_pBuf; for (; iter8; ++iter8) { if (iter8.canGet()) { *pCur++ = iter8.get(); } } size_t ret = ::fwrite(m_pBuf, (const char*)pCur - (const char*)m_pBuf, 1, m_pFile); return ret; } void Utf8_16_Write::fclose() { delete [] m_pBuf; m_pBuf = NULL; ::fclose(m_pFile); m_pFile = NULL; } void Utf8_16_Write::setEncoding(Utf8_16::encodingType eType) { m_eEncoding = eType; } //================================================================= Utf8_Iter::Utf8_Iter() { reset(); } void Utf8_Iter::reset() { m_pBuf = NULL; m_pRead = NULL; m_pEnd = NULL; m_eState = eStart; m_nCur = 0; m_eEncoding = eUnknown; } void Utf8_Iter::set (const ubyte* pBuf, size_t nLen, encodingType eEncoding) { m_pBuf = pBuf; m_pRead = pBuf; m_pEnd = pBuf + nLen; m_eEncoding = eEncoding; operator++(); // Note: m_eState, m_nCur not reset } // Go to the next byte. void Utf8_Iter::operator++() { switch (m_eState) { case eStart: if ((0xE0 & *m_pRead) == 0xE0) { m_nCur = static_cast((~0xE0 & *m_pRead) << 12); m_eState = e3Bytes_Byte2; } else if ((0xC0 & *m_pRead) == 0xC0) { m_nCur = static_cast((~0xC0 & *m_pRead) << 6); m_eState = e2Bytes_Byte2; } else { m_nCur = *m_pRead; toStart(); } break; case e2Bytes_Byte2: m_nCur |= static_cast(0x3F & *m_pRead); toStart(); break; case e3Bytes_Byte2: m_nCur |= static_cast((0x3F & *m_pRead) << 6); m_eState = e3Bytes_Byte3; break; case e3Bytes_Byte3: m_nCur |= static_cast(0x3F & *m_pRead); toStart(); break; } ++m_pRead; } void Utf8_Iter::toStart() { m_eState = eStart; if (m_eEncoding == eUtf16BigEndian) { swap(); } } void Utf8_Iter::swap() { utf8* p = reinterpret_cast(&m_nCur); utf8 swapbyte = *p; *p = *(p + 1); *(p + 1) = swapbyte; } //================================================== Utf16_Iter::Utf16_Iter() { reset(); } void Utf16_Iter::reset() { m_pBuf = NULL; m_pRead = NULL; m_pEnd = NULL; m_eState = eStart; m_nCur = 0; m_nCur16 = 0; m_eEncoding = eUnknown; } void Utf16_Iter::set (const ubyte* pBuf, size_t nLen, encodingType eEncoding) { m_pBuf = pBuf; m_pRead = pBuf; m_pEnd = pBuf + nLen; m_eEncoding = eEncoding; operator++(); // Note: m_eState, m_nCur, m_nCur16 not reinitalized. } // Goes to the next byte. // Not the next symbol which you might expect. // This way we can continue from a partial buffer that doesn't align void Utf16_Iter::operator++() { switch (m_eState) { case eStart: if (m_eEncoding == eUtf16LittleEndian) { m_nCur16 = *m_pRead++; m_nCur16 |= static_cast(*m_pRead << 8); } else { m_nCur16 = static_cast(*m_pRead++ << 8); m_nCur16 |= *m_pRead; } ++m_pRead; if (m_nCur16 < 0x80) { m_nCur = static_cast(m_nCur16 & 0xFF); m_eState = eStart; } else if (m_nCur16 < 0x800) { m_nCur = static_cast(0xC0 | m_nCur16 >> 6); m_eState = e2Bytes2; } else { m_nCur = static_cast(0xE0 | m_nCur16 >> 12); m_eState = e3Bytes2; } break; case e2Bytes2: m_nCur = static_cast(0x80 | m_nCur16 & 0x3F); m_eState = eStart; break; case e3Bytes2: m_nCur = static_cast(0x80 | ((m_nCur16 >> 6) & 0x3F)); m_eState = e3Bytes3; break; case e3Bytes3: m_nCur = static_cast(0x80 | m_nCur16 & 0x3F); m_eState = eStart; break; } } usr/src/sdlBasic/src/sdlBasic/src/Extender.h0000777000076500007660000000445010616625553016211 0ustar // SciTE - Scintilla based Text Editor /** @file Extender.h ** SciTE extension interface. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef EXTENDER_H #define EXTENDER_H #include "Scintilla.h" class Accessor; class ExtensionAPI { public: enum Pane { paneEditor=1, paneOutput=2, paneFindOutput=3 }; //virtual ~ExtensionAPI(); virtual sptr_t Send(Pane p, unsigned int msg, uptr_t wParam=0, sptr_t lParam=0)=0; virtual char *Range(Pane p, int start, int end)=0; virtual void Remove(Pane p, int start, int end)=0; virtual void Insert(Pane p, int pos, const char *s)=0; virtual void Trace(const char *s)=0; virtual char *Property(const char *key)=0; virtual void SetProperty(const char *key, const char *val)=0; virtual void UnsetProperty(const char *key)=0; virtual uptr_t GetInstance()=0; virtual void ShutDown()=0; virtual void Perform(const char *actions)=0; }; /** * Methods in extensions return true if they have completely handled and event and * false if default processing is to continue. */ class Extension { public: virtual ~Extension() {} virtual bool Initialise(ExtensionAPI *host_)=0; virtual bool Finalise()=0; virtual bool Clear()=0; virtual bool Load(const char *filename)=0; virtual bool InitBuffer(int) { return false; } virtual bool ActivateBuffer(int) { return false; } virtual bool RemoveBuffer(int) { return false; } virtual bool OnOpen(const char *) { return false; } virtual bool OnSwitchFile(const char *) { return false; } virtual bool OnBeforeSave(const char *) { return false; } virtual bool OnSave(const char *) { return false; } virtual bool OnChar(char) { return false; } virtual bool OnExecute(const char *) { return false; } virtual bool OnSavePointReached() { return false; } virtual bool OnSavePointLeft() { return false; } virtual bool OnStyle(unsigned int, int, int, Accessor *) { return false; } virtual bool OnDoubleClick() { return false; } virtual bool OnUpdateUI() { return false; } virtual bool OnMarginClick() { return false; } virtual bool OnMacro(const char *, const char *) { return false; } virtual bool OnUserListSelection(int, const char *) { return false; } virtual bool SendProperty(const char *) { return false; } }; #endif usr/src/sdlBasic/src/sdlBasic/src/MultiplexExtension.h0000777000076500007660000000575210463133550020310 0ustar // SciTE - Scintilla based Text Editor /** @file MultiplexExtension.h ** Extension that manages / dispatches messages to multiple extensions. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef MULTIPLEXEXTENSION_H #define MULTIPLEXEXTENSION_H #include "Extender.h" // MultiplexExtension manages multiple Extension objects, similar to // what is proposed in the SciTE Extension documentation. Each // message is sent to each contained extension object in turn until // one indicates that the message has been handled and does not need // to be processed further. Certain messages (Initialise, Finalise // Clear, and SendProperty) are sent to all contained extensions // regardless of return code. // // The Director extension incorrectly returns true for all messages, // meaning that other extensions will never see the message if // DirectorExtension comes before them in the list. This has been // fixed at source. // // Extensions are added to the multiplexer by calling RegisterExtension. // The extensions are prioritized with the first one added having the // highest priority. If more flexibility is needed in order to support // dynamic discovery of extensions and assignment of priority, that will // be added later. If the ability to remove extensions becomes important, // that can be added as well (later). // // The multiplexer does not manage the lifetime of the extension objects // that are registered with it. If that functionality later turns out // to be needed, it will be added at that time. (Broken record? Do the // simplest thing...) However, the option to "not" manage the lifecycle // is a valid one, since it often makes sense to implement extensions as // singletons. class MultiplexExtension: public Extension { public: MultiplexExtension(); virtual ~MultiplexExtension(); bool RegisterExtension(Extension &ext_); virtual bool Initialise(ExtensionAPI *host_); virtual bool Finalise(); virtual bool Clear(); virtual bool Load(const char *filename); virtual bool InitBuffer(int); virtual bool ActivateBuffer(int); virtual bool RemoveBuffer(int); virtual bool OnOpen(const char *); virtual bool OnSwitchFile(const char *); virtual bool OnBeforeSave(const char *); virtual bool OnSave(const char *); virtual bool OnChar(char); virtual bool OnExecute(const char *); virtual bool OnSavePointReached(); virtual bool OnSavePointLeft(); virtual bool OnStyle(unsigned int, int, int, Accessor *); virtual bool OnDoubleClick(); virtual bool OnUpdateUI(); virtual bool OnMarginClick(); virtual bool OnMacro(const char *, const char *); virtual bool OnUserListSelection(int, const char *); virtual bool SendProperty(const char *); private: Extension **extensions; int extensionCount; ExtensionAPI *host; // Copying is unsupported. MultiplexExtension(const MultiplexExtension & copy); MultiplexExtension & operator=(const MultiplexExtension & copy); }; #endif usr/src/sdlBasic/src/sdlBasic/src/SciTE.h0000777000076500007660000001363010463133550015371 0ustar // SciTE - Scintilla based Text Editor /** @file SciTE.h ** Define command IDs used within SciTE. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SCITE_H #define SCITE_H // Menu IDs. // These are located 100 apart. No one will want more than 100 in each menu ;) #define IDM_MRUFILE 1000 #define IDM_TOOLS 1100 #define IDM_BUFFER 1200 #define IDM_IMPORT 1300 #define IDM_LANGUAGE 1400 // File #define IDM_NEW 101 #define IDM_OPEN 102 #define IDM_OPENSELECTED 103 #define IDM_REVERT 104 #define IDM_CLOSE 105 #define IDM_SAVE 106 #define IDM_SAVEAS 110 #define IDM_SAVEASHTML 111 #define IDM_SAVEASRTF 112 #define IDM_SAVEASPDF 113 #define IDM_FILER 114 #define IDM_SAVEASTEX 115 #define IDM_SAVEACOPY 116 #define IDM_SAVEASXML 117 #define IDM_MRU_SEP 120 #define IDM_PRINTSETUP 130 #define IDM_PRINT 131 #define IDM_LOADSESSION 132 #define IDM_SAVESESSION 133 #define IDM_QUIT 140 #define IDM_ENCODING_DEFAULT 150 #define IDM_ENCODING_UCS2BE 151 #define IDM_ENCODING_UCS2LE 152 #define IDM_ENCODING_UTF8 153 #define IDM_ENCODING_UCOOKIE 154 #define MRU_START 16 #define IMPORT_START 19 #define TOOLS_START 3 // Edit #define IDM_UNDO 201 #define IDM_REDO 202 #define IDM_CUT 203 #define IDM_COPY 204 #define IDM_PASTE 205 #define IDM_CLEAR 206 #define IDM_SELECTALL 207 #define IDM_PASTEANDDOWN 208 #define IDM_FIND 210 #define IDM_FINDNEXT 211 #define IDM_FINDNEXTBACK 212 #define IDM_FINDNEXTSEL 213 #define IDM_FINDNEXTBACKSEL 214 #define IDM_FINDINFILES 215 #define IDM_REPLACE 216 #define IDM_GOTO 220 #define IDM_BOOKMARK_NEXT 221 #define IDM_BOOKMARK_TOGGLE 222 #define IDM_BOOKMARK_PREV 223 #define IDM_BOOKMARK_CLEARALL 224 #define IDM_BOOKMARK_NEXT_SELECT 225 #define IDM_BOOKMARK_PREV_SELECT 226 #define IDM_MATCHBRACE 230 #define IDM_SELECTTOBRACE 231 #define IDM_SHOWCALLTIP 232 #define IDM_COMPLETE 233 #define IDM_COMPLETEWORD 234 #define IDM_EXPAND 235 #define IDM_TOGGLE_FOLDALL 236 #define IDM_TOGGLE_FOLDRECURSIVE 237 #define IDM_EXPAND_ENSURECHILDRENVISIBLE 238 #define IDM_UPRCASE 240 #define IDM_LWRCASE 241 #define IDM_ABBREV 242 #define IDM_BLOCK_COMMENT 243 #define IDM_STREAM_COMMENT 244 #define IDM_COPYASRTF 245 #define IDM_BOX_COMMENT 246 #define IDM_INS_ABBREV 247 #define IDM_JOIN 248 #define IDM_SPLIT 249 #define IDM_INCSEARCH 252 #define IDC_INCFINDTEXT 253 #define IDC_INCFINDBTNOK 254 #define IDD_FIND2 255 #define IDM_ENTERSELECTION 256 #define IDC_EDIT1 1000 #define IDC_STATIC -1 #define IDM_PREVMATCHPPC 260 #define IDM_SELECTTOPREVMATCHPPC 261 #define IDM_NEXTMATCHPPC 262 #define IDM_SELECTTONEXTMATCHPPC 263 // Tools #define IDM_COMPILE 301 #define IDM_BUILD 302 #define IDM_GO 303 #define IDM_STOPEXECUTE 304 #define IDM_FINISHEDEXECUTE 305 #define IDM_NEXTMSG 306 #define IDM_PREVMSG 307 #define IDM_MACRO_SEP 310 #define IDM_MACRORECORD 311 #define IDM_MACROSTOPRECORD 312 #define IDM_MACROPLAY 313 #define IDM_MACROLIST 314 #define IDM_ACTIVATE 320 #define IDM_SRCWIN 350 #define IDM_RUNWIN 351 #define IDM_TOOLWIN 352 #define IDM_STATUSWIN 353 #define IDM_TABWIN 354 // Options #define IDM_SPLITVERTICAL 401 #define IDM_VIEWSPACE 402 #define IDM_VIEWEOL 403 #define IDM_VIEWGUIDES 404 #define IDM_SELMARGIN 405 #define IDM_FOLDMARGIN 406 #define IDM_LINENUMBERMARGIN 407 #define IDM_VIEWTOOLBAR 408 #define IDM_TOGGLEOUTPUT 409 #define IDM_VIEWTABBAR 410 #define IDM_VIEWSTATUSBAR 411 #define IDM_TOGGLEPARAMETERS 412 #define IDM_OPENFILESHERE 413 #define IDM_WRAP 414 #define IDM_WRAPOUTPUT 415 #define IDM_READONLY 416 #define IDM_CLEAROUTPUT 420 #define IDM_SWITCHPANE 421 #define IDM_EOL_CRLF 430 #define IDM_EOL_CR 431 #define IDM_EOL_LF 432 #define IDM_EOL_CONVERT 433 #define IDM_TABSIZE 440 #define IDM_MONOFONT 450 #define IDM_OPENLOCALPROPERTIES 460 #define IDM_OPENUSERPROPERTIES 461 #define IDM_OPENGLOBALPROPERTIES 462 #define IDM_OPENABBREVPROPERTIES 463 #define IDM_OPENLUAEXTERNALFILE 464 //#define IDM_SELECTIONMARGIN 490 //#define IDM_BUFFEREDDRAW 491 //#define IDM_USEPALETTE 492 // Buffers #define IDM_PREVFILE 501 #define IDM_NEXTFILE 502 #define IDM_CLOSEALL 503 #define IDM_SAVEALL 504 #define IDM_BUFFERSEP 505 // Help #define IDM_HELP 901 #define IDM_ABOUT 902 #define IDM_HELP_SCITE 903 // Windows specific windowing options #define IDM_ONTOP 960 #define IDM_FULLSCREEN 961 // Dialog control IDs #define IDGOLINE 220 #define IDABOUTSCINTILLA 221 #define IDFINDWHAT 222 #define IDFILES 223 #define IDDIRECTORY 224 #define IDCURRLINE 225 #define IDLASTLINE 226 #define IDEXTEND 227 #define IDTABSIZE 228 #define IDINDENTSIZE 229 #define IDUSETABS 230 #define IDREPLACEWITH 231 #define IDWHOLEWORD 232 #define IDMATCHCASE 233 #define IDDIRECTIONUP 234 #define IDDIRECTIONDOWN 235 #define IDREPLACE 236 #define IDREPLACEALL 237 #define IDREPLACEINSEL 238 #define IDREGEXP 239 #define IDWRAP 240 #define IDUNSLASH 241 #define IDCMD 242 // id for the browse button in the grep dialog #define IDBROWSE 243 #define IDABBREV 244 #define IDREPLACEINBUF 244 #define IDMARKALL 245 #define IDGOLINECHAR 246 #define IDCURRLINECHAR 247 #define IDREPLDONE 248 #define IDDOTDOT 249 #define IDFINDINSTYLE 250 #define IDFINDSTYLE 251 #define IDPARAMSTART 300 // Dialog IDs #define IDD_FIND 400 #define IDD_REPLACE 401 #define IDD_BUFFERS 402 #define IDD_FIND_ADV 403 #define IDD_REPLACE_ADV 404 // Resource IDs #define IDR_FILENEW 100 #define IDR_FILEOPEN 101 #define IDR_FILESAVE 102 #define IDR_CLOSEFILE 103 #define IDR_UNDO 104 #define IDR_REDO 105 #define IDR_FIND 106 #define IDR_FINDNEXT 107 #define IDR_REPLACE 108 #define IDR_BOOKMARK_TOGGLE 109 #define IDR_BOOKMARK_PREV 110 #define IDR_BOOKMARK_NEXT 111 #define IDR_GO 112 #define IDR_STOPEXECUTE 113 #endif usr/src/sdlBasic/src/sdlBasic/src/IFaceTable.cxx0000777000076500007660000015461210463133550016722 0ustar // SciTE - Scintilla based Text Editor /** @file IFaceTable.cxx ** SciTE iface function and constant descriptors. **/ // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include "IFaceTable.h" #include #include int IFaceTable::FindConstant(const char *name) { int lo = 0; int hi = IFaceTable::constantCount - 1; do { int idx = (lo+hi)/2; int cmp = strcmp(name, constants[idx].name); if (cmp > 0) { lo = idx + 1; } else if (cmp < 0) { hi = idx - 1; } else { return idx; } } while (lo <= hi); return -1; } int IFaceTable::FindFunction(const char *name) { int lo = 0; int hi = IFaceTable::functionCount - 1; do { int idx = (lo+hi)/2; int cmp = strcmp(name, functions[idx].name); if (cmp > 0) { lo = idx + 1; } else if (cmp < 0) { hi = idx - 1; } else { return idx; } } while (lo <= hi); return -1; } int IFaceTable::FindFunctionByConstantName(const char *name) { if (strncmp(name, "SCI_", 4)==0) { // This looks like a constant for an iface function. This requires // a sequential search. Take special care since the function names // are mixed case, whereas the constants are all-caps. for (int idx = 0; idx < functionCount; ++idx) { const char *nm = name+4; const char *fn = IFaceTable::functions[idx].name; while (*nm && *fn && (*nm == toupper(*fn))) { ++nm; ++fn; } if (!*nm && !*fn) { return idx; } } } return -1; } int IFaceTable::FindProperty(const char *name) { int lo = 0; int hi = IFaceTable::propertyCount - 1; do { int idx = (lo+hi)/2; int cmp = strcmp(name, properties[idx].name); if (cmp > 0) { lo = idx + 1; } else if (cmp < 0) { hi = idx - 1; } else { return idx; } } while (lo <= hi); return -1; } int IFaceTable::GetConstantName(int value, char *nameOut, unsigned nameBufferLen) { if (nameOut && nameBufferLen > 0) { *nameOut = '\0'; } // Look in both the constants table and the functions table. Start with functions. for (int funcIdx = 0; funcIdx < functionCount; ++funcIdx) { if (functions[funcIdx].value == value) { size_t len = strlen(functions[funcIdx].name) + 4; if (nameOut && (nameBufferLen > len)) { strcpy(nameOut, "SCI_"); strcat(nameOut, functions[funcIdx].name); // fix case for (char *nm = nameOut + 4; *nm; ++nm) { if (*nm >= 'a' && *nm <= 'z') { *nm = static_cast(*nm - 'a' + 'A'); } } return len; } else { return -1 - len; } } } for (int constIdx = 0; constIdx < constantCount; ++constIdx) { if (constants[constIdx].value == value) { size_t len = strlen(constants[constIdx].name); if (nameOut && (nameBufferLen > len)) { strcpy(nameOut, constants[constIdx].name); return len; } else { return -1 - len; } } } return 0; } //++Autogenerated -- start of section automatically generated from Scintilla.iface static IFaceConstant ifaceConstants[] = { {"CARET_EVEN",0x08}, {"CARET_JUMPS",0x10}, {"CARET_SLOP",0x01}, {"CARET_STRICT",0x04}, {"EDGE_BACKGROUND",2}, {"EDGE_LINE",1}, {"EDGE_NONE",0}, {"INDIC0_MASK",0x20}, {"INDIC1_MASK",0x40}, {"INDIC2_MASK",0x80}, {"INDICS_MASK",0xE0}, {"INDIC_BOX",6}, {"INDIC_DIAGONAL",3}, {"INDIC_HIDDEN",5}, {"INDIC_MAX",7}, {"INDIC_PLAIN",0}, {"INDIC_SQUIGGLE",1}, {"INDIC_STRIKE",4}, {"INDIC_TT",2}, {"INVALID_POSITION",-1}, {"KEYWORDSET_MAX",8}, {"MARKER_MAX",31}, {"SCEN_CHANGE",768}, {"SCEN_KILLFOCUS",256}, {"SCEN_SETFOCUS",512}, {"SCE_ADA_CHARACTER",5}, {"SCE_ADA_CHARACTEREOL",6}, {"SCE_ADA_COMMENTLINE",10}, {"SCE_ADA_DEFAULT",0}, {"SCE_ADA_DELIMITER",4}, {"SCE_ADA_IDENTIFIER",2}, {"SCE_ADA_ILLEGAL",11}, {"SCE_ADA_LABEL",9}, {"SCE_ADA_NUMBER",3}, {"SCE_ADA_STRING",7}, {"SCE_ADA_STRINGEOL",8}, {"SCE_ADA_WORD",1}, {"SCE_APDL_ARGUMENT",11}, {"SCE_APDL_COMMAND",8}, {"SCE_APDL_COMMENT",1}, {"SCE_APDL_COMMENTBLOCK",2}, {"SCE_APDL_DEFAULT",0}, {"SCE_APDL_FUNCTION",12}, {"SCE_APDL_NUMBER",3}, {"SCE_APDL_OPERATOR",5}, {"SCE_APDL_PROCESSOR",7}, {"SCE_APDL_SLASHCOMMAND",9}, {"SCE_APDL_STARCOMMAND",10}, {"SCE_APDL_STRING",4}, {"SCE_APDL_WORD",6}, {"SCE_ASM_CHARACTER",12}, {"SCE_ASM_COMMENT",1}, {"SCE_ASM_COMMENTBLOCK",11}, {"SCE_ASM_CPUINSTRUCTION",6}, {"SCE_ASM_DEFAULT",0}, {"SCE_ASM_DIRECTIVE",9}, {"SCE_ASM_DIRECTIVEOPERAND",10}, {"SCE_ASM_EXTINSTRUCTION",14}, {"SCE_ASM_IDENTIFIER",5}, {"SCE_ASM_MATHINSTRUCTION",7}, {"SCE_ASM_NUMBER",2}, {"SCE_ASM_OPERATOR",4}, {"SCE_ASM_REGISTER",8}, {"SCE_ASM_STRING",3}, {"SCE_ASM_STRINGEOL",13}, {"SCE_ASN1_ATTRIBUTE",7}, {"SCE_ASN1_COMMENT",1}, {"SCE_ASN1_DEFAULT",0}, {"SCE_ASN1_DESCRIPTOR",8}, {"SCE_ASN1_IDENTIFIER",2}, {"SCE_ASN1_KEYWORD",6}, {"SCE_ASN1_OID",4}, {"SCE_ASN1_OPERATOR",10}, {"SCE_ASN1_SCALAR",5}, {"SCE_ASN1_STRING",3}, {"SCE_ASN1_TYPE",9}, {"SCE_AU3_COMMENT",1}, {"SCE_AU3_COMMENTBLOCK",2}, {"SCE_AU3_DEFAULT",0}, {"SCE_AU3_FUNCTION",4}, {"SCE_AU3_KEYWORD",5}, {"SCE_AU3_MACRO",6}, {"SCE_AU3_NUMBER",3}, {"SCE_AU3_OPERATOR",8}, {"SCE_AU3_PREPROCESSOR",11}, {"SCE_AU3_SENT",10}, {"SCE_AU3_SPECIAL",12}, {"SCE_AU3_STRING",7}, {"SCE_AU3_VARIABLE",9}, {"SCE_AVE_COMMENT",1}, {"SCE_AVE_DEFAULT",0}, {"SCE_AVE_ENUM",7}, {"SCE_AVE_IDENTIFIER",9}, {"SCE_AVE_NUMBER",2}, {"SCE_AVE_OPERATOR",10}, {"SCE_AVE_STRING",6}, {"SCE_AVE_STRINGEOL",8}, {"SCE_AVE_WORD",3}, {"SCE_AVE_WORD1",11}, {"SCE_AVE_WORD2",12}, {"SCE_AVE_WORD3",13}, {"SCE_AVE_WORD4",14}, {"SCE_AVE_WORD5",15}, {"SCE_AVE_WORD6",16}, {"SCE_BAAN_COMMENT",1}, {"SCE_BAAN_COMMENTDOC",2}, {"SCE_BAAN_DEFAULT",0}, {"SCE_BAAN_IDENTIFIER",8}, {"SCE_BAAN_NUMBER",3}, {"SCE_BAAN_OPERATOR",7}, {"SCE_BAAN_PREPROCESSOR",6}, {"SCE_BAAN_STRING",5}, {"SCE_BAAN_STRINGEOL",9}, {"SCE_BAAN_WORD",4}, {"SCE_BAAN_WORD2",10}, {"SCE_BAT_COMMAND",5}, {"SCE_BAT_COMMENT",1}, {"SCE_BAT_DEFAULT",0}, {"SCE_BAT_HIDE",4}, {"SCE_BAT_IDENTIFIER",6}, {"SCE_BAT_LABEL",3}, {"SCE_BAT_OPERATOR",7}, {"SCE_BAT_WORD",2}, {"SCE_B_ASM",14}, {"SCE_B_COMMENT",1}, {"SCE_B_CONSTANT",13}, {"SCE_B_DATE",8}, {"SCE_B_DEFAULT",0}, {"SCE_B_IDENTIFIER",7}, {"SCE_B_KEYWORD",3}, {"SCE_B_KEYWORD2",10}, {"SCE_B_KEYWORD3",11}, {"SCE_B_KEYWORD4",12}, {"SCE_B_NUMBER",2}, {"SCE_B_OPERATOR",6}, {"SCE_B_PREPROCESSOR",5}, {"SCE_B_STRING",4}, {"SCE_B_STRINGEOL",9}, {"SCE_CLW_ATTRIBUTE",12}, {"SCE_CLW_BUILTIN_PROCEDURES_FUNCTION",10}, {"SCE_CLW_COMMENT",2}, {"SCE_CLW_COMPILER_DIRECTIVE",9}, {"SCE_CLW_DEFAULT",0}, {"SCE_CLW_ERROR",14}, {"SCE_CLW_INTEGER_CONSTANT",5}, {"SCE_CLW_KEYWORD",8}, {"SCE_CLW_LABEL",1}, {"SCE_CLW_PICTURE_STRING",7}, {"SCE_CLW_REAL_CONSTANT",6}, {"SCE_CLW_STANDARD_EQUATE",13}, {"SCE_CLW_STRING",3}, {"SCE_CLW_STRUCTURE_DATA_TYPE",11}, {"SCE_CLW_USER_IDENTIFIER",4}, {"SCE_CONF_COMMENT",1}, {"SCE_CONF_DEFAULT",0}, {"SCE_CONF_DIRECTIVE",9}, {"SCE_CONF_EXTENSION",4}, {"SCE_CONF_IDENTIFIER",3}, {"SCE_CONF_IP",8}, {"SCE_CONF_NUMBER",2}, {"SCE_CONF_OPERATOR",7}, {"SCE_CONF_PARAMETER",5}, {"SCE_CONF_STRING",6}, {"SCE_CSS_CLASS",2}, {"SCE_CSS_COMMENT",9}, {"SCE_CSS_DEFAULT",0}, {"SCE_CSS_DIRECTIVE",12}, {"SCE_CSS_DOUBLESTRING",13}, {"SCE_CSS_ID",10}, {"SCE_CSS_IDENTIFIER",6}, {"SCE_CSS_IMPORTANT",11}, {"SCE_CSS_OPERATOR",5}, {"SCE_CSS_PSEUDOCLASS",3}, {"SCE_CSS_SINGLESTRING",14}, {"SCE_CSS_TAG",1}, {"SCE_CSS_UNKNOWN_IDENTIFIER",7}, {"SCE_CSS_UNKNOWN_PSEUDOCLASS",4}, {"SCE_CSS_VALUE",8}, {"SCE_C_CHARACTER",7}, {"SCE_C_COMMENT",1}, {"SCE_C_COMMENTDOC",3}, {"SCE_C_COMMENTDOCKEYWORD",17}, {"SCE_C_COMMENTDOCKEYWORDERROR",18}, {"SCE_C_COMMENTLINE",2}, {"SCE_C_COMMENTLINEDOC",15}, {"SCE_C_DEFAULT",0}, {"SCE_C_GLOBALCLASS",19}, {"SCE_C_IDENTIFIER",11}, {"SCE_C_NUMBER",4}, {"SCE_C_OPERATOR",10}, {"SCE_C_PREPROCESSOR",9}, {"SCE_C_REGEX",14}, {"SCE_C_STRING",6}, {"SCE_C_STRINGEOL",12}, {"SCE_C_UUID",8}, {"SCE_C_VERBATIM",13}, {"SCE_C_WORD",5}, {"SCE_C_WORD2",16}, {"SCE_DIFF_ADDED",6}, {"SCE_DIFF_COMMAND",2}, {"SCE_DIFF_COMMENT",1}, {"SCE_DIFF_DEFAULT",0}, {"SCE_DIFF_DELETED",5}, {"SCE_DIFF_HEADER",3}, {"SCE_DIFF_POSITION",4}, {"SCE_EIFFEL_CHARACTER",5}, {"SCE_EIFFEL_COMMENTLINE",1}, {"SCE_EIFFEL_DEFAULT",0}, {"SCE_EIFFEL_IDENTIFIER",7}, {"SCE_EIFFEL_NUMBER",2}, {"SCE_EIFFEL_OPERATOR",6}, {"SCE_EIFFEL_STRING",4}, {"SCE_EIFFEL_STRINGEOL",8}, {"SCE_EIFFEL_WORD",3}, {"SCE_ERLANG_ATOM",7}, {"SCE_ERLANG_CHARACTER",9}, {"SCE_ERLANG_COMMENT",1}, {"SCE_ERLANG_DEFAULT",0}, {"SCE_ERLANG_FUNCTION_NAME",8}, {"SCE_ERLANG_KEYWORD",4}, {"SCE_ERLANG_MACRO",10}, {"SCE_ERLANG_NODE_NAME",13}, {"SCE_ERLANG_NUMBER",3}, {"SCE_ERLANG_OPERATOR",6}, {"SCE_ERLANG_RECORD",11}, {"SCE_ERLANG_SEPARATOR",12}, {"SCE_ERLANG_STRING",5}, {"SCE_ERLANG_UNKNOWN",31}, {"SCE_ERLANG_VARIABLE",2}, {"SCE_ERR_ABSF",18}, {"SCE_ERR_BORLAND",5}, {"SCE_ERR_CMD",4}, {"SCE_ERR_CTAG",9}, {"SCE_ERR_DEFAULT",0}, {"SCE_ERR_DIFF_ADDITION",11}, {"SCE_ERR_DIFF_CHANGED",10}, {"SCE_ERR_DIFF_DELETION",12}, {"SCE_ERR_DIFF_MESSAGE",13}, {"SCE_ERR_ELF",15}, {"SCE_ERR_GCC",2}, {"SCE_ERR_IFC",16}, {"SCE_ERR_IFORT",17}, {"SCE_ERR_JAVA_STACK",20}, {"SCE_ERR_LUA",8}, {"SCE_ERR_MS",3}, {"SCE_ERR_NET",7}, {"SCE_ERR_PERL",6}, {"SCE_ERR_PHP",14}, {"SCE_ERR_PYTHON",1}, {"SCE_ERR_TIDY",19}, {"SCE_ESCRIPT_BRACE",9}, {"SCE_ESCRIPT_COMMENT",1}, {"SCE_ESCRIPT_COMMENTDOC",3}, {"SCE_ESCRIPT_COMMENTLINE",2}, {"SCE_ESCRIPT_DEFAULT",0}, {"SCE_ESCRIPT_IDENTIFIER",8}, {"SCE_ESCRIPT_NUMBER",4}, {"SCE_ESCRIPT_OPERATOR",7}, {"SCE_ESCRIPT_STRING",6}, {"SCE_ESCRIPT_WORD",5}, {"SCE_ESCRIPT_WORD2",10}, {"SCE_ESCRIPT_WORD3",11}, {"SCE_FORTH_COMMENT",1}, {"SCE_FORTH_COMMENT_ML",2}, {"SCE_FORTH_CONTROL",4}, {"SCE_FORTH_DEFAULT",0}, {"SCE_FORTH_DEFWORD",6}, {"SCE_FORTH_IDENTIFIER",3}, {"SCE_FORTH_KEYWORD",5}, {"SCE_FORTH_LOCALE",11}, {"SCE_FORTH_NUMBER",9}, {"SCE_FORTH_PREWORD1",7}, {"SCE_FORTH_PREWORD2",8}, {"SCE_FORTH_STRING",10}, {"SCE_F_COMMENT",1}, {"SCE_F_CONTINUATION",14}, {"SCE_F_DEFAULT",0}, {"SCE_F_IDENTIFIER",7}, {"SCE_F_LABEL",13}, {"SCE_F_NUMBER",2}, {"SCE_F_OPERATOR",6}, {"SCE_F_OPERATOR2",12}, {"SCE_F_PREPROCESSOR",11}, {"SCE_F_STRING1",3}, {"SCE_F_STRING2",4}, {"SCE_F_STRINGEOL",5}, {"SCE_F_WORD",8}, {"SCE_F_WORD2",9}, {"SCE_F_WORD3",10}, {"SCE_GC_ATTRIBUTE",5}, {"SCE_GC_COMMAND",7}, {"SCE_GC_COMMENTBLOCK",2}, {"SCE_GC_COMMENTLINE",1}, {"SCE_GC_CONTROL",6}, {"SCE_GC_DEFAULT",0}, {"SCE_GC_EVENT",4}, {"SCE_GC_GLOBAL",3}, {"SCE_GC_OPERATOR",9}, {"SCE_GC_STRING",8}, {"SCE_HBA_COMMENTLINE",82}, {"SCE_HBA_DEFAULT",81}, {"SCE_HBA_IDENTIFIER",86}, {"SCE_HBA_NUMBER",83}, {"SCE_HBA_START",80}, {"SCE_HBA_STRING",85}, {"SCE_HBA_STRINGEOL",87}, {"SCE_HBA_WORD",84}, {"SCE_HB_COMMENTLINE",72}, {"SCE_HB_DEFAULT",71}, {"SCE_HB_IDENTIFIER",76}, {"SCE_HB_NUMBER",73}, {"SCE_HB_START",70}, {"SCE_HB_STRING",75}, {"SCE_HB_STRINGEOL",77}, {"SCE_HB_WORD",74}, {"SCE_HJA_COMMENT",57}, {"SCE_HJA_COMMENTDOC",59}, {"SCE_HJA_COMMENTLINE",58}, {"SCE_HJA_DEFAULT",56}, {"SCE_HJA_DOUBLESTRING",63}, {"SCE_HJA_KEYWORD",62}, {"SCE_HJA_NUMBER",60}, {"SCE_HJA_REGEX",67}, {"SCE_HJA_SINGLESTRING",64}, {"SCE_HJA_START",55}, {"SCE_HJA_STRINGEOL",66}, {"SCE_HJA_SYMBOLS",65}, {"SCE_HJA_WORD",61}, {"SCE_HJ_COMMENT",42}, {"SCE_HJ_COMMENTDOC",44}, {"SCE_HJ_COMMENTLINE",43}, {"SCE_HJ_DEFAULT",41}, {"SCE_HJ_DOUBLESTRING",48}, {"SCE_HJ_KEYWORD",47}, {"SCE_HJ_NUMBER",45}, {"SCE_HJ_REGEX",52}, {"SCE_HJ_SINGLESTRING",49}, {"SCE_HJ_START",40}, {"SCE_HJ_STRINGEOL",51}, {"SCE_HJ_SYMBOLS",50}, {"SCE_HJ_WORD",46}, {"SCE_HPA_CHARACTER",110}, {"SCE_HPA_CLASSNAME",114}, {"SCE_HPA_COMMENTLINE",107}, {"SCE_HPA_DEFAULT",106}, {"SCE_HPA_DEFNAME",115}, {"SCE_HPA_IDENTIFIER",117}, {"SCE_HPA_NUMBER",108}, {"SCE_HPA_OPERATOR",116}, {"SCE_HPA_START",105}, {"SCE_HPA_STRING",109}, {"SCE_HPA_TRIPLE",112}, {"SCE_HPA_TRIPLEDOUBLE",113}, {"SCE_HPA_WORD",111}, {"SCE_HPHP_COMMENT",124}, {"SCE_HPHP_COMMENTLINE",125}, {"SCE_HPHP_COMPLEX_VARIABLE",104}, {"SCE_HPHP_DEFAULT",118}, {"SCE_HPHP_HSTRING",119}, {"SCE_HPHP_HSTRING_VARIABLE",126}, {"SCE_HPHP_NUMBER",122}, {"SCE_HPHP_OPERATOR",127}, {"SCE_HPHP_SIMPLESTRING",120}, {"SCE_HPHP_VARIABLE",123}, {"SCE_HPHP_WORD",121}, {"SCE_HP_CHARACTER",95}, {"SCE_HP_CLASSNAME",99}, {"SCE_HP_COMMENTLINE",92}, {"SCE_HP_DEFAULT",91}, {"SCE_HP_DEFNAME",100}, {"SCE_HP_IDENTIFIER",102}, {"SCE_HP_NUMBER",93}, {"SCE_HP_OPERATOR",101}, {"SCE_HP_START",90}, {"SCE_HP_STRING",94}, {"SCE_HP_TRIPLE",97}, {"SCE_HP_TRIPLEDOUBLE",98}, {"SCE_HP_WORD",96}, {"SCE_H_ASP",15}, {"SCE_H_ASPAT",16}, {"SCE_H_ATTRIBUTE",3}, {"SCE_H_ATTRIBUTEUNKNOWN",4}, {"SCE_H_CDATA",17}, {"SCE_H_COMMENT",9}, {"SCE_H_DEFAULT",0}, {"SCE_H_DOUBLESTRING",6}, {"SCE_H_ENTITY",10}, {"SCE_H_NUMBER",5}, {"SCE_H_OTHER",8}, {"SCE_H_QUESTION",18}, {"SCE_H_SCRIPT",14}, {"SCE_H_SGML_1ST_PARAM",23}, {"SCE_H_SGML_1ST_PARAM_COMMENT",30}, {"SCE_H_SGML_BLOCK_DEFAULT",31}, {"SCE_H_SGML_COMMAND",22}, {"SCE_H_SGML_COMMENT",29}, {"SCE_H_SGML_DEFAULT",21}, {"SCE_H_SGML_DOUBLESTRING",24}, {"SCE_H_SGML_ENTITY",28}, {"SCE_H_SGML_ERROR",26}, {"SCE_H_SGML_SIMPLESTRING",25}, {"SCE_H_SGML_SPECIAL",27}, {"SCE_H_SINGLESTRING",7}, {"SCE_H_TAG",1}, {"SCE_H_TAGEND",11}, {"SCE_H_TAGUNKNOWN",2}, {"SCE_H_VALUE",19}, {"SCE_H_XCCOMMENT",20}, {"SCE_H_XMLEND",13}, {"SCE_H_XMLSTART",12}, {"SCE_KIX_COMMENT",1}, {"SCE_KIX_DEFAULT",0}, {"SCE_KIX_FUNCTIONS",8}, {"SCE_KIX_IDENTIFIER",31}, {"SCE_KIX_KEYWORD",7}, {"SCE_KIX_MACRO",6}, {"SCE_KIX_NUMBER",4}, {"SCE_KIX_OPERATOR",9}, {"SCE_KIX_STRING1",2}, {"SCE_KIX_STRING2",3}, {"SCE_KIX_VAR",5}, {"SCE_LISP_COMMENT",1}, {"SCE_LISP_DEFAULT",0}, {"SCE_LISP_IDENTIFIER",9}, {"SCE_LISP_KEYWORD",3}, {"SCE_LISP_NUMBER",2}, {"SCE_LISP_OPERATOR",10}, {"SCE_LISP_STRING",6}, {"SCE_LISP_STRINGEOL",8}, {"SCE_LOT_ABORT",6}, {"SCE_LOT_BREAK",2}, {"SCE_LOT_DEFAULT",0}, {"SCE_LOT_FAIL",5}, {"SCE_LOT_HEADER",1}, {"SCE_LOT_PASS",4}, {"SCE_LOT_SET",3}, {"SCE_LOUT_COMMENT",1}, {"SCE_LOUT_DEFAULT",0}, {"SCE_LOUT_IDENTIFIER",9}, {"SCE_LOUT_NUMBER",2}, {"SCE_LOUT_OPERATOR",8}, {"SCE_LOUT_STRING",7}, {"SCE_LOUT_STRINGEOL",10}, {"SCE_LOUT_WORD",3}, {"SCE_LOUT_WORD2",4}, {"SCE_LOUT_WORD3",5}, {"SCE_LOUT_WORD4",6}, {"SCE_LUA_CHARACTER",7}, {"SCE_LUA_COMMENT",1}, {"SCE_LUA_COMMENTDOC",3}, {"SCE_LUA_COMMENTLINE",2}, {"SCE_LUA_DEFAULT",0}, {"SCE_LUA_IDENTIFIER",11}, {"SCE_LUA_LITERALSTRING",8}, {"SCE_LUA_NUMBER",4}, {"SCE_LUA_OPERATOR",10}, {"SCE_LUA_PREPROCESSOR",9}, {"SCE_LUA_STRING",6}, {"SCE_LUA_STRINGEOL",12}, {"SCE_LUA_WORD",5}, {"SCE_LUA_WORD2",13}, {"SCE_LUA_WORD3",14}, {"SCE_LUA_WORD4",15}, {"SCE_LUA_WORD5",16}, {"SCE_LUA_WORD6",17}, {"SCE_LUA_WORD7",18}, {"SCE_LUA_WORD8",19}, {"SCE_L_COMMAND",1}, {"SCE_L_COMMENT",4}, {"SCE_L_DEFAULT",0}, {"SCE_L_MATH",3}, {"SCE_L_TAG",2}, {"SCE_MAKE_COMMENT",1}, {"SCE_MAKE_DEFAULT",0}, {"SCE_MAKE_IDENTIFIER",3}, {"SCE_MAKE_IDEOL",9}, {"SCE_MAKE_OPERATOR",4}, {"SCE_MAKE_PREPROCESSOR",2}, {"SCE_MAKE_TARGET",5}, {"SCE_MATLAB_COMMAND",2}, {"SCE_MATLAB_COMMENT",1}, {"SCE_MATLAB_DEFAULT",0}, {"SCE_MATLAB_DOUBLEQUOTESTRING",8}, {"SCE_MATLAB_IDENTIFIER",7}, {"SCE_MATLAB_KEYWORD",4}, {"SCE_MATLAB_NUMBER",3}, {"SCE_MATLAB_OPERATOR",6}, {"SCE_MATLAB_STRING",5}, {"SCE_METAPOST_COMMAND",4}, {"SCE_METAPOST_DEFAULT",0}, {"SCE_METAPOST_EXTRA",6}, {"SCE_METAPOST_GROUP",2}, {"SCE_METAPOST_SPECIAL",1}, {"SCE_METAPOST_SYMBOL",3}, {"SCE_METAPOST_TEXT",5}, {"SCE_MMIXAL_CHAR",11}, {"SCE_MMIXAL_COMMENT",1}, {"SCE_MMIXAL_HEX",14}, {"SCE_MMIXAL_INCLUDE",17}, {"SCE_MMIXAL_LABEL",2}, {"SCE_MMIXAL_LEADWS",0}, {"SCE_MMIXAL_NUMBER",9}, {"SCE_MMIXAL_OPCODE",3}, {"SCE_MMIXAL_OPCODE_POST",7}, {"SCE_MMIXAL_OPCODE_PRE",4}, {"SCE_MMIXAL_OPCODE_UNKNOWN",6}, {"SCE_MMIXAL_OPCODE_VALID",5}, {"SCE_MMIXAL_OPERANDS",8}, {"SCE_MMIXAL_OPERATOR",15}, {"SCE_MMIXAL_REF",10}, {"SCE_MMIXAL_REGISTER",13}, {"SCE_MMIXAL_STRING",12}, {"SCE_MMIXAL_SYMBOL",16}, {"SCE_MSSQL_COLUMN_NAME",8}, {"SCE_MSSQL_COLUMN_NAME_2",16}, {"SCE_MSSQL_COMMENT",1}, {"SCE_MSSQL_DATATYPE",10}, {"SCE_MSSQL_DEFAULT",0}, {"SCE_MSSQL_DEFAULT_PREF_DATATYPE",15}, {"SCE_MSSQL_FUNCTION",13}, {"SCE_MSSQL_GLOBAL_VARIABLE",12}, {"SCE_MSSQL_IDENTIFIER",6}, {"SCE_MSSQL_LINE_COMMENT",2}, {"SCE_MSSQL_NUMBER",3}, {"SCE_MSSQL_OPERATOR",5}, {"SCE_MSSQL_STATEMENT",9}, {"SCE_MSSQL_STORED_PROCEDURE",14}, {"SCE_MSSQL_STRING",4}, {"SCE_MSSQL_SYSTABLE",11}, {"SCE_MSSQL_VARIABLE",7}, {"SCE_NNCRONTAB_ASTERISK",6}, {"SCE_NNCRONTAB_COMMENT",1}, {"SCE_NNCRONTAB_DEFAULT",0}, {"SCE_NNCRONTAB_ENVIRONMENT",9}, {"SCE_NNCRONTAB_IDENTIFIER",10}, {"SCE_NNCRONTAB_KEYWORD",4}, {"SCE_NNCRONTAB_MODIFIER",5}, {"SCE_NNCRONTAB_NUMBER",7}, {"SCE_NNCRONTAB_SECTION",3}, {"SCE_NNCRONTAB_STRING",8}, {"SCE_NNCRONTAB_TASK",2}, {"SCE_NSIS_COMMENT",1}, {"SCE_NSIS_DEFAULT",0}, {"SCE_NSIS_FUNCTION",5}, {"SCE_NSIS_IFDEFINEDEF",11}, {"SCE_NSIS_LABEL",7}, {"SCE_NSIS_MACRODEF",12}, {"SCE_NSIS_NUMBER",14}, {"SCE_NSIS_SECTIONDEF",9}, {"SCE_NSIS_STRINGDQ",2}, {"SCE_NSIS_STRINGLQ",3}, {"SCE_NSIS_STRINGRQ",4}, {"SCE_NSIS_STRINGVAR",13}, {"SCE_NSIS_SUBSECTIONDEF",10}, {"SCE_NSIS_USERDEFINED",8}, {"SCE_NSIS_VARIABLE",6}, {"SCE_PL_ARRAY",13}, {"SCE_PL_BACKTICKS",20}, {"SCE_PL_CHARACTER",7}, {"SCE_PL_COMMENTLINE",2}, {"SCE_PL_DATASECTION",21}, {"SCE_PL_DEFAULT",0}, {"SCE_PL_ERROR",1}, {"SCE_PL_HASH",14}, {"SCE_PL_HERE_DELIM",22}, {"SCE_PL_HERE_Q",23}, {"SCE_PL_HERE_QQ",24}, {"SCE_PL_HERE_QX",25}, {"SCE_PL_IDENTIFIER",11}, {"SCE_PL_LONGQUOTE",19}, {"SCE_PL_NUMBER",4}, {"SCE_PL_OPERATOR",10}, {"SCE_PL_POD",3}, {"SCE_PL_PREPROCESSOR",9}, {"SCE_PL_PUNCTUATION",8}, {"SCE_PL_REGEX",17}, {"SCE_PL_REGSUBST",18}, {"SCE_PL_SCALAR",12}, {"SCE_PL_STRING",6}, {"SCE_PL_STRING_Q",26}, {"SCE_PL_STRING_QQ",27}, {"SCE_PL_STRING_QR",29}, {"SCE_PL_STRING_QW",30}, {"SCE_PL_STRING_QX",28}, {"SCE_PL_SYMBOLTABLE",15}, {"SCE_PL_WORD",5}, {"SCE_POV_BADDIRECTIVE",9}, {"SCE_POV_COMMENT",1}, {"SCE_POV_COMMENTLINE",2}, {"SCE_POV_DEFAULT",0}, {"SCE_POV_DIRECTIVE",8}, {"SCE_POV_IDENTIFIER",5}, {"SCE_POV_NUMBER",3}, {"SCE_POV_OPERATOR",4}, {"SCE_POV_STRING",6}, {"SCE_POV_STRINGEOL",7}, {"SCE_POV_WORD2",10}, {"SCE_POV_WORD3",11}, {"SCE_POV_WORD4",12}, {"SCE_POV_WORD5",13}, {"SCE_POV_WORD6",14}, {"SCE_POV_WORD7",15}, {"SCE_POV_WORD8",16}, {"SCE_PROPS_ASSIGNMENT",3}, {"SCE_PROPS_COMMENT",1}, {"SCE_PROPS_DEFAULT",0}, {"SCE_PROPS_DEFVAL",4}, {"SCE_PROPS_SECTION",2}, {"SCE_PS_BADSTRINGCHAR",15}, {"SCE_PS_BASE85STRING",14}, {"SCE_PS_COMMENT",1}, {"SCE_PS_DEFAULT",0}, {"SCE_PS_DSC_COMMENT",2}, {"SCE_PS_DSC_VALUE",3}, {"SCE_PS_HEXSTRING",13}, {"SCE_PS_IMMEVAL",8}, {"SCE_PS_KEYWORD",6}, {"SCE_PS_LITERAL",7}, {"SCE_PS_NAME",5}, {"SCE_PS_NUMBER",4}, {"SCE_PS_PAREN_ARRAY",9}, {"SCE_PS_PAREN_DICT",10}, {"SCE_PS_PAREN_PROC",11}, {"SCE_PS_TEXT",12}, {"SCE_P_CHARACTER",4}, {"SCE_P_CLASSNAME",8}, {"SCE_P_COMMENTBLOCK",12}, {"SCE_P_COMMENTLINE",1}, {"SCE_P_DEFAULT",0}, {"SCE_P_DEFNAME",9}, {"SCE_P_IDENTIFIER",11}, {"SCE_P_NUMBER",2}, {"SCE_P_OPERATOR",10}, {"SCE_P_STRING",3}, {"SCE_P_STRINGEOL",13}, {"SCE_P_TRIPLE",6}, {"SCE_P_TRIPLEDOUBLE",7}, {"SCE_P_WORD",5}, {"SCE_SCRIPTOL_CHARACTER",8}, {"SCE_SCRIPTOL_CLASSNAME",14}, {"SCE_SCRIPTOL_COMMENTBLOCK",5}, {"SCE_SCRIPTOL_COMMENTLINE",2}, {"SCE_SCRIPTOL_CSTYLE",4}, {"SCE_SCRIPTOL_DEFAULT",0}, {"SCE_SCRIPTOL_IDENTIFIER",12}, {"SCE_SCRIPTOL_KEYWORD",10}, {"SCE_SCRIPTOL_NUMBER",6}, {"SCE_SCRIPTOL_OPERATOR",11}, {"SCE_SCRIPTOL_PERSISTENT",3}, {"SCE_SCRIPTOL_PREPROCESSOR",15}, {"SCE_SCRIPTOL_STRING",7}, {"SCE_SCRIPTOL_STRINGEOL",9}, {"SCE_SCRIPTOL_TRIPLE",13}, {"SCE_SCRIPTOL_WHITE",1}, {"SCE_SH_BACKTICKS",11}, {"SCE_SH_CHARACTER",6}, {"SCE_SH_COMMENTLINE",2}, {"SCE_SH_DEFAULT",0}, {"SCE_SH_ERROR",1}, {"SCE_SH_HERE_DELIM",12}, {"SCE_SH_HERE_Q",13}, {"SCE_SH_IDENTIFIER",8}, {"SCE_SH_NUMBER",3}, {"SCE_SH_OPERATOR",7}, {"SCE_SH_PARAM",10}, {"SCE_SH_SCALAR",9}, {"SCE_SH_STRING",5}, {"SCE_SH_WORD",4}, {"SCE_SN_CODE",1}, {"SCE_SN_COMMENTLINE",2}, {"SCE_SN_COMMENTLINEBANG",3}, {"SCE_SN_DEFAULT",0}, {"SCE_SN_IDENTIFIER",11}, {"SCE_SN_NUMBER",4}, {"SCE_SN_OPERATOR",10}, {"SCE_SN_PREPROCESSOR",9}, {"SCE_SN_REGEXTAG",13}, {"SCE_SN_SIGNAL",14}, {"SCE_SN_STRING",6}, {"SCE_SN_STRINGEOL",12}, {"SCE_SN_USER",19}, {"SCE_SN_WORD",5}, {"SCE_SN_WORD2",7}, {"SCE_SN_WORD3",8}, {"SCE_TEX_COMMAND",4}, {"SCE_TEX_DEFAULT",0}, {"SCE_TEX_GROUP",2}, {"SCE_TEX_SPECIAL",1}, {"SCE_TEX_SYMBOL",3}, {"SCE_TEX_TEXT",5}, {"SCE_V_COMMENT",1}, {"SCE_V_COMMENTLINE",2}, {"SCE_V_COMMENTLINEBANG",3}, {"SCE_V_DEFAULT",0}, {"SCE_V_IDENTIFIER",11}, {"SCE_V_NUMBER",4}, {"SCE_V_OPERATOR",10}, {"SCE_V_PREPROCESSOR",9}, {"SCE_V_STRING",6}, {"SCE_V_STRINGEOL",12}, {"SCE_V_USER",19}, {"SCE_V_WORD",5}, {"SCE_V_WORD2",7}, {"SCE_V_WORD3",8}, {"SCE_YAML_COMMENT",1}, {"SCE_YAML_DEFAULT",0}, {"SCE_YAML_DOCUMENT",6}, {"SCE_YAML_ERROR",8}, {"SCE_YAML_IDENTIFIER",2}, {"SCE_YAML_KEYWORD",3}, {"SCE_YAML_NUMBER",4}, {"SCE_YAML_REFERENCE",5}, {"SCE_YAML_TEXT",7}, {"SCFIND_MATCHCASE",4}, {"SCFIND_POSIX",0x00400000}, {"SCFIND_REGEXP",0x00200000}, {"SCFIND_WHOLEWORD",2}, {"SCFIND_WORDSTART",0x00100000}, {"SCI_AUTOCGETAUTOHIDE",2119}, {"SCI_AUTOCGETCANCELATSTART",2111}, {"SCI_AUTOCGETCHOOSESINGLE",2114}, {"SCI_AUTOCGETDROPRESTOFWORD",2271}, {"SCI_AUTOCGETIGNORECASE",2116}, {"SCI_AUTOCGETSEPARATOR",2107}, {"SCI_AUTOCGETTYPESEPARATOR",2285}, {"SCI_AUTOCSETAUTOHIDE",2118}, {"SCI_AUTOCSETCANCELATSTART",2110}, {"SCI_AUTOCSETCHOOSESINGLE",2113}, {"SCI_AUTOCSETDROPRESTOFWORD",2270}, {"SCI_AUTOCSETFILLUPS",2112}, {"SCI_AUTOCSETIGNORECASE",2115}, {"SCI_AUTOCSETSEPARATOR",2106}, {"SCI_AUTOCSETTYPESEPARATOR",2286}, {"SCI_CALLTIPSETBACK",2205}, {"SCI_CALLTIPSETFORE",2206}, {"SCI_CALLTIPSETFOREHLT",2207}, {"SCI_GETANCHOR",2009}, {"SCI_GETBACKSPACEUNINDENTS",2263}, {"SCI_GETBUFFEREDDRAW",2034}, {"SCI_GETCARETFORE",2138}, {"SCI_GETCARETLINEBACK",2097}, {"SCI_GETCARETLINEVISIBLE",2095}, {"SCI_GETCARETPERIOD",2075}, {"SCI_GETCARETWIDTH",2189}, {"SCI_GETCHARAT",2007}, {"SCI_GETCODEPAGE",2137}, {"SCI_GETCOLUMN",2129}, {"SCI_GETCONTROLCHARSYMBOL",2389}, {"SCI_GETCURRENTPOS",2008}, {"SCI_GETCURSOR",2387}, {"SCI_GETDIRECTFUNCTION",2184}, {"SCI_GETDIRECTPOINTER",2185}, {"SCI_GETDOCPOINTER",2357}, {"SCI_GETEDGECOLOUR",2364}, {"SCI_GETEDGECOLUMN",2360}, {"SCI_GETEDGEMODE",2362}, {"SCI_GETENDSTYLED",2028}, {"SCI_GETEOLMODE",2030}, {"SCI_GETFIRSTVISIBLELINE",2152}, {"SCI_GETFOCUS",2381}, {"SCI_GETFOLDEXPANDED",2230}, {"SCI_GETFOLDLEVEL",2223}, {"SCI_GETFOLDPARENT",2225}, {"SCI_GETHIGHLIGHTGUIDE",2135}, {"SCI_GETHSCROLLBAR",2131}, {"SCI_GETINDENT",2123}, {"SCI_GETINDENTATIONGUIDES",2133}, {"SCI_GETLAYOUTCACHE",2273}, {"SCI_GETLENGTH",2006}, {"SCI_GETLEXER",4002}, {"SCI_GETLINECOUNT",2154}, {"SCI_GETLINEENDPOSITION",2136}, {"SCI_GETLINEINDENTATION",2127}, {"SCI_GETLINEINDENTPOSITION",2128}, {"SCI_GETLINESTATE",2093}, {"SCI_GETLINEVISIBLE",2228}, {"SCI_GETMARGINLEFT",2156}, {"SCI_GETMARGINMASKN",2245}, {"SCI_GETMARGINRIGHT",2158}, {"SCI_GETMARGINSENSITIVEN",2247}, {"SCI_GETMARGINTYPEN",2241}, {"SCI_GETMARGINWIDTHN",2243}, {"SCI_GETMAXLINESTATE",2094}, {"SCI_GETMODEVENTMASK",2378}, {"SCI_GETMODIFY",2159}, {"SCI_GETMOUSEDOWNCAPTURES",2385}, {"SCI_GETMOUSEDWELLTIME",2265}, {"SCI_GETOVERTYPE",2187}, {"SCI_GETPRINTCOLOURMODE",2149}, {"SCI_GETPRINTMAGNIFICATION",2147}, {"SCI_GETPRINTWRAPMODE",2407}, {"SCI_GETREADONLY",2140}, {"SCI_GETSCROLLWIDTH",2275}, {"SCI_GETSEARCHFLAGS",2199}, {"SCI_GETSELECTIONEND",2145}, {"SCI_GETSELECTIONMODE",2423}, {"SCI_GETSELECTIONSTART",2143}, {"SCI_GETSTATUS",2383}, {"SCI_GETSTYLEAT",2010}, {"SCI_GETSTYLEBITS",2091}, {"SCI_GETTABINDENTS",2261}, {"SCI_GETTABWIDTH",2121}, {"SCI_GETTARGETEND",2193}, {"SCI_GETTARGETSTART",2191}, {"SCI_GETTEXTLENGTH",2183}, {"SCI_GETTWOPHASEDRAW",2283}, {"SCI_GETUNDOCOLLECTION",2019}, {"SCI_GETUSEPALETTE",2139}, {"SCI_GETUSETABS",2125}, {"SCI_GETVIEWEOL",2355}, {"SCI_GETVIEWWS",2020}, {"SCI_GETVSCROLLBAR",2281}, {"SCI_GETWRAPMODE",2269}, {"SCI_GETWRAPSTARTINDENT",2465}, {"SCI_GETWRAPVISUALFLAGS",2461}, {"SCI_GETWRAPVISUALFLAGSLOCATION",2463}, {"SCI_GETXOFFSET",2398}, {"SCI_GETZOOM",2374}, {"SCI_INDICGETFORE",2083}, {"SCI_INDICGETSTYLE",2081}, {"SCI_INDICSETFORE",2082}, {"SCI_INDICSETSTYLE",2080}, {"SCI_LEXER_START",4000}, {"SCI_LINESONSCREEN",2370}, {"SCI_OPTIONAL_START",3000}, {"SCI_SELECTIONISRECTANGLE",2372}, {"SCI_SETANCHOR",2026}, {"SCI_SETBACKSPACEUNINDENTS",2262}, {"SCI_SETBUFFEREDDRAW",2035}, {"SCI_SETCARETFORE",2069}, {"SCI_SETCARETLINEBACK",2098}, {"SCI_SETCARETLINEVISIBLE",2096}, {"SCI_SETCARETPERIOD",2076}, {"SCI_SETCARETWIDTH",2188}, {"SCI_SETCODEPAGE",2037}, {"SCI_SETCONTROLCHARSYMBOL",2388}, {"SCI_SETCURRENTPOS",2141}, {"SCI_SETCURSOR",2386}, {"SCI_SETDOCPOINTER",2358}, {"SCI_SETEDGECOLOUR",2365}, {"SCI_SETEDGECOLUMN",2361}, {"SCI_SETEDGEMODE",2363}, {"SCI_SETEOLMODE",2031}, {"SCI_SETFOCUS",2380}, {"SCI_SETFOLDEXPANDED",2229}, {"SCI_SETFOLDLEVEL",2222}, {"SCI_SETHIGHLIGHTGUIDE",2134}, {"SCI_SETHOTSPOTACTIVEBACK",2411}, {"SCI_SETHOTSPOTACTIVEFORE",2410}, {"SCI_SETHOTSPOTACTIVEUNDERLINE",2412}, {"SCI_SETHOTSPOTSINGLELINE",2421}, {"SCI_SETHSCROLLBAR",2130}, {"SCI_SETINDENT",2122}, {"SCI_SETINDENTATIONGUIDES",2132}, {"SCI_SETKEYWORDS",4005}, {"SCI_SETLAYOUTCACHE",2272}, {"SCI_SETLEXER",4001}, {"SCI_SETLEXERLANGUAGE",4006}, {"SCI_SETLINEINDENTATION",2126}, {"SCI_SETLINESTATE",2092}, {"SCI_SETMARGINLEFT",2155}, {"SCI_SETMARGINMASKN",2244}, {"SCI_SETMARGINRIGHT",2157}, {"SCI_SETMARGINSENSITIVEN",2246}, {"SCI_SETMARGINTYPEN",2240}, {"SCI_SETMARGINWIDTHN",2242}, {"SCI_SETMODEVENTMASK",2359}, {"SCI_SETMOUSEDOWNCAPTURES",2384}, {"SCI_SETMOUSEDWELLTIME",2264}, {"SCI_SETOVERTYPE",2186}, {"SCI_SETPRINTCOLOURMODE",2148}, {"SCI_SETPRINTMAGNIFICATION",2146}, {"SCI_SETPRINTWRAPMODE",2406}, {"SCI_SETPROPERTY",4004}, {"SCI_SETREADONLY",2171}, {"SCI_SETSCROLLWIDTH",2274}, {"SCI_SETSEARCHFLAGS",2198}, {"SCI_SETSELECTIONEND",2144}, {"SCI_SETSELECTIONMODE",2422}, {"SCI_SETSELECTIONSTART",2142}, {"SCI_SETSTATUS",2382}, {"SCI_SETSTYLEBITS",2090}, {"SCI_SETTABINDENTS",2260}, {"SCI_SETTABWIDTH",2036}, {"SCI_SETTARGETEND",2192}, {"SCI_SETTARGETSTART",2190}, {"SCI_SETTWOPHASEDRAW",2284}, {"SCI_SETUNDOCOLLECTION",2012}, {"SCI_SETUSEPALETTE",2039}, {"SCI_SETUSETABS",2124}, {"SCI_SETVIEWEOL",2356}, {"SCI_SETVIEWWS",2021}, {"SCI_SETVSCROLLBAR",2280}, {"SCI_SETWHITESPACECHARS",2443}, {"SCI_SETWORDCHARS",2077}, {"SCI_SETWRAPMODE",2268}, {"SCI_SETWRAPSTARTINDENT",2464}, {"SCI_SETWRAPVISUALFLAGS",2460}, {"SCI_SETWRAPVISUALFLAGSLOCATION",2462}, {"SCI_SETXOFFSET",2397}, {"SCI_SETZOOM",2373}, {"SCI_START",2000}, {"SCI_STYLESETBACK",2052}, {"SCI_STYLESETBOLD",2053}, {"SCI_STYLESETCASE",2060}, {"SCI_STYLESETCHANGEABLE",2099}, {"SCI_STYLESETCHARACTERSET",2066}, {"SCI_STYLESETEOLFILLED",2057}, {"SCI_STYLESETFONT",2056}, {"SCI_STYLESETFORE",2051}, {"SCI_STYLESETHOTSPOT",2409}, {"SCI_STYLESETITALIC",2054}, {"SCI_STYLESETSIZE",2055}, {"SCI_STYLESETUNDERLINE",2059}, {"SCI_STYLESETVISIBLE",2074}, {"SCK_ADD",310}, {"SCK_BACK",8}, {"SCK_DELETE",308}, {"SCK_DIVIDE",312}, {"SCK_DOWN",300}, {"SCK_END",305}, {"SCK_ESCAPE",7}, {"SCK_HOME",304}, {"SCK_INSERT",309}, {"SCK_LEFT",302}, {"SCK_NEXT",307}, {"SCK_PRIOR",306}, {"SCK_RETURN",13}, {"SCK_RIGHT",303}, {"SCK_SUBTRACT",311}, {"SCK_TAB",9}, {"SCK_UP",301}, {"SCLEX_ADA",20}, {"SCLEX_APDL",61}, {"SCLEX_ASM",34}, {"SCLEX_ASN1",63}, {"SCLEX_ASP",29}, {"SCLEX_AU3",60}, {"SCLEX_AUTOMATIC",1000}, {"SCLEX_AVE",19}, {"SCLEX_BAAN",31}, {"SCLEX_BASH",62}, {"SCLEX_BATCH",12}, {"SCLEX_BULLANT",27}, {"SCLEX_CLW",45}, {"SCLEX_CLWNOCASE",46}, {"SCLEX_CONF",17}, {"SCLEX_CONTAINER",0}, {"SCLEX_CPP",3}, {"SCLEX_CPPNOCASE",35}, {"SCLEX_CSS",38}, {"SCLEX_DIFF",16}, {"SCLEX_EIFFEL",23}, {"SCLEX_EIFFELKW",24}, {"SCLEX_ERLANG",53}, {"SCLEX_ERRORLIST",10}, {"SCLEX_ESCRIPT",41}, {"SCLEX_F77",37}, {"SCLEX_FORTH",52}, {"SCLEX_FORTRAN",36}, {"SCLEX_GUI4CLI",58}, {"SCLEX_HTML",4}, {"SCLEX_KIX",57}, {"SCLEX_LATEX",14}, {"SCLEX_LISP",21}, {"SCLEX_LOT",47}, {"SCLEX_LOUT",40}, {"SCLEX_LUA",15}, {"SCLEX_MAKEFILE",11}, {"SCLEX_MATLAB",32}, {"SCLEX_METAPOST",50}, {"SCLEX_MMIXAL",44}, {"SCLEX_MSSQL",55}, {"SCLEX_NNCRONTAB",26}, {"SCLEX_NSIS",43}, {"SCLEX_NULL",1}, {"SCLEX_OCTAVE",54}, {"SCLEX_PASCAL",18}, {"SCLEX_PERL",6}, {"SCLEX_PHP",30}, {"SCLEX_POV",39}, {"SCLEX_POWERBASIC",51}, {"SCLEX_PROPERTIES",9}, {"SCLEX_PS",42}, {"SCLEX_PYTHON",2}, {"SCLEX_RUBY",22}, {"SCLEX_SCRIPTOL",33}, {"SCLEX_SPECMAN",59}, {"SCLEX_SQL",7}, {"SCLEX_TCL",25}, {"SCLEX_TEX",49}, {"SCLEX_VB",8}, {"SCLEX_VBSCRIPT",28}, {"SCLEX_VERILOG",56}, {"SCLEX_XCODE",13}, {"SCLEX_XML",5}, {"SCLEX_YAML",48}, {"SCMOD_ALT",4}, {"SCMOD_CTRL",2}, {"SCMOD_SHIFT",1}, {"SCWS_INVISIBLE",0}, {"SCWS_VISIBLEAFTERINDENT",2}, {"SCWS_VISIBLEALWAYS",1}, {"SC_CACHE_CARET",1}, {"SC_CACHE_DOCUMENT",3}, {"SC_CACHE_NONE",0}, {"SC_CACHE_PAGE",2}, {"SC_CASE_LOWER",2}, {"SC_CASE_MIXED",0}, {"SC_CASE_UPPER",1}, {"SC_CHARSET_ANSI",0}, {"SC_CHARSET_ARABIC",178}, {"SC_CHARSET_BALTIC",186}, {"SC_CHARSET_CHINESEBIG5",136}, {"SC_CHARSET_DEFAULT",1}, {"SC_CHARSET_EASTEUROPE",238}, {"SC_CHARSET_GB2312",134}, {"SC_CHARSET_GREEK",161}, {"SC_CHARSET_HANGUL",129}, {"SC_CHARSET_HEBREW",177}, {"SC_CHARSET_JOHAB",130}, {"SC_CHARSET_MAC",77}, {"SC_CHARSET_OEM",255}, {"SC_CHARSET_RUSSIAN",204}, {"SC_CHARSET_SHIFTJIS",128}, {"SC_CHARSET_SYMBOL",2}, {"SC_CHARSET_THAI",222}, {"SC_CHARSET_TURKISH",162}, {"SC_CHARSET_VIETNAMESE",163}, {"SC_CP_DBCS",1}, {"SC_CP_UTF8",65001}, {"SC_CURSORNORMAL",-1}, {"SC_CURSORWAIT",4}, {"SC_EOL_CR",1}, {"SC_EOL_CRLF",0}, {"SC_EOL_LF",2}, {"SC_FOLDFLAG_BOX",0x0001}, {"SC_FOLDFLAG_LEVELNUMBERS",0x0040}, {"SC_FOLDFLAG_LINEAFTER_CONTRACTED",0x0010}, {"SC_FOLDFLAG_LINEAFTER_EXPANDED",0x0008}, {"SC_FOLDFLAG_LINEBEFORE_CONTRACTED",0x0004}, {"SC_FOLDFLAG_LINEBEFORE_EXPANDED",0x0002}, {"SC_FOLDLEVELBASE",0x400}, {"SC_FOLDLEVELBOXFOOTERFLAG",0x8000}, {"SC_FOLDLEVELBOXHEADERFLAG",0x4000}, {"SC_FOLDLEVELCONTRACTED",0x10000}, {"SC_FOLDLEVELHEADERFLAG",0x2000}, {"SC_FOLDLEVELNUMBERMASK",0x0FFF}, {"SC_FOLDLEVELUNINDENT",0x20000}, {"SC_FOLDLEVELWHITEFLAG",0x1000}, {"SC_LASTSTEPINUNDOREDO",0x100}, {"SC_MARGIN_NUMBER",1}, {"SC_MARGIN_SYMBOL",0}, {"SC_MARKNUM_FOLDER",30}, {"SC_MARKNUM_FOLDEREND",25}, {"SC_MARKNUM_FOLDERMIDTAIL",27}, {"SC_MARKNUM_FOLDEROPEN",31}, {"SC_MARKNUM_FOLDEROPENMID",26}, {"SC_MARKNUM_FOLDERSUB",29}, {"SC_MARKNUM_FOLDERTAIL",28}, {"SC_MARK_ARROW",2}, {"SC_MARK_ARROWDOWN",6}, {"SC_MARK_ARROWS",24}, {"SC_MARK_BACKGROUND",22}, {"SC_MARK_BOXMINUS",14}, {"SC_MARK_BOXMINUSCONNECTED",15}, {"SC_MARK_BOXPLUS",12}, {"SC_MARK_BOXPLUSCONNECTED",13}, {"SC_MARK_CHARACTER",10000}, {"SC_MARK_CIRCLE",0}, {"SC_MARK_CIRCLEMINUS",20}, {"SC_MARK_CIRCLEMINUSCONNECTED",21}, {"SC_MARK_CIRCLEPLUS",18}, {"SC_MARK_CIRCLEPLUSCONNECTED",19}, {"SC_MARK_DOTDOTDOT",23}, {"SC_MARK_EMPTY",5}, {"SC_MARK_LCORNER",10}, {"SC_MARK_LCORNERCURVE",16}, {"SC_MARK_MINUS",7}, {"SC_MARK_PIXMAP",25}, {"SC_MARK_PLUS",8}, {"SC_MARK_ROUNDRECT",1}, {"SC_MARK_SHORTARROW",4}, {"SC_MARK_SMALLRECT",3}, {"SC_MARK_TCORNER",11}, {"SC_MARK_TCORNERCURVE",17}, {"SC_MARK_VLINE",9}, {"SC_MASK_FOLDERS",0xFE000000}, {"SC_MODEVENTMASKALL",0xF77}, {"SC_MOD_BEFOREDELETE",0x800}, {"SC_MOD_BEFOREINSERT",0x400}, {"SC_MOD_CHANGEFOLD",0x8}, {"SC_MOD_CHANGEMARKER",0x200}, {"SC_MOD_CHANGESTYLE",0x4}, {"SC_MOD_DELETETEXT",0x2}, {"SC_MOD_INSERTTEXT",0x1}, {"SC_PERFORMED_REDO",0x40}, {"SC_PERFORMED_UNDO",0x20}, {"SC_PERFORMED_USER",0x10}, {"SC_PRINT_BLACKONWHITE",2}, {"SC_PRINT_COLOURONWHITE",3}, {"SC_PRINT_COLOURONWHITEDEFAULTBG",4}, {"SC_PRINT_INVERTLIGHT",1}, {"SC_PRINT_NORMAL",0}, {"SC_SEL_LINES",2}, {"SC_SEL_RECTANGLE",1}, {"SC_SEL_STREAM",0}, {"SC_TIME_FOREVER",10000000}, {"SC_WRAPVISUALFLAGLOC_DEFAULT",0x0000}, {"SC_WRAPVISUALFLAGLOC_END_BY_TEXT",0x0001}, {"SC_WRAPVISUALFLAGLOC_START_BY_TEXT",0x0002}, {"SC_WRAPVISUALFLAG_END",0x0001}, {"SC_WRAPVISUALFLAG_NONE",0x0000}, {"SC_WRAPVISUALFLAG_START",0x0002}, {"SC_WRAP_NONE",0}, {"SC_WRAP_WORD",1}, {"SC_WRAP_CHAR",2}, {"STYLE_BRACEBAD",35}, {"STYLE_BRACELIGHT",34}, {"STYLE_CONTROLCHAR",36}, {"STYLE_DEFAULT",32}, {"STYLE_INDENTGUIDE",37}, {"STYLE_LASTPREDEFINED",39}, {"STYLE_LINENUMBER",33}, {"STYLE_MAX",127}, {"VISIBLE_SLOP",0x01}, {"VISIBLE_STRICT",0x04} }; static IFaceFunction ifaceFunctions[] = { {"AddRefDocument", 2376, iface_void, {iface_void, iface_int}}, {"AddStyledText", 2002, iface_void, {iface_length, iface_cells}}, {"AddText", 2001, iface_void, {iface_length, iface_string}}, {"Allocate", 2446, iface_void, {iface_int, iface_void}}, {"AppendText", 2282, iface_void, {iface_length, iface_string}}, {"AssignCmdKey", 2070, iface_void, {iface_keymod, iface_int}}, {"AutoCActive", 2102, iface_bool, {iface_void, iface_void}}, {"AutoCCancel", 2101, iface_void, {iface_void, iface_void}}, {"AutoCComplete", 2104, iface_void, {iface_void, iface_void}}, {"AutoCGetCurrent", 2445, iface_int, {iface_void, iface_void}}, {"AutoCPosStart", 2103, iface_position, {iface_void, iface_void}}, {"AutoCSelect", 2108, iface_void, {iface_void, iface_string}}, {"AutoCShow", 2100, iface_void, {iface_int, iface_string}}, {"AutoCStops", 2105, iface_void, {iface_void, iface_string}}, {"BackTab", 2328, iface_void, {iface_void, iface_void}}, {"BeginUndoAction", 2078, iface_void, {iface_void, iface_void}}, {"BraceBadLight", 2352, iface_void, {iface_position, iface_void}}, {"BraceHighlight", 2351, iface_void, {iface_position, iface_position}}, {"BraceMatch", 2353, iface_position, {iface_position, iface_void}}, {"CallTipActive", 2202, iface_bool, {iface_void, iface_void}}, {"CallTipCancel", 2201, iface_void, {iface_void, iface_void}}, {"CallTipPosStart", 2203, iface_position, {iface_void, iface_void}}, {"CallTipSetHlt", 2204, iface_void, {iface_int, iface_int}}, {"CallTipShow", 2200, iface_void, {iface_position, iface_string}}, {"CanPaste", 2173, iface_bool, {iface_void, iface_void}}, {"CanRedo", 2016, iface_bool, {iface_void, iface_void}}, {"CanUndo", 2174, iface_bool, {iface_void, iface_void}}, {"Cancel", 2325, iface_void, {iface_void, iface_void}}, {"CharLeft", 2304, iface_void, {iface_void, iface_void}}, {"CharLeftExtend", 2305, iface_void, {iface_void, iface_void}}, {"CharLeftRectExtend", 2428, iface_void, {iface_void, iface_void}}, {"CharRight", 2306, iface_void, {iface_void, iface_void}}, {"CharRightExtend", 2307, iface_void, {iface_void, iface_void}}, {"CharRightRectExtend", 2429, iface_void, {iface_void, iface_void}}, {"ChooseCaretX", 2399, iface_void, {iface_void, iface_void}}, {"Clear", 2180, iface_void, {iface_void, iface_void}}, {"ClearAll", 2004, iface_void, {iface_void, iface_void}}, {"ClearAllCmdKeys", 2072, iface_void, {iface_void, iface_void}}, {"ClearCmdKey", 2071, iface_void, {iface_keymod, iface_void}}, {"ClearDocumentStyle", 2005, iface_void, {iface_void, iface_void}}, {"ClearRegisteredImages", 2408, iface_void, {iface_void, iface_void}}, {"Colourise", 4003, iface_void, {iface_position, iface_position}}, {"ConvertEOLs", 2029, iface_void, {iface_int, iface_void}}, {"Copy", 2178, iface_void, {iface_void, iface_void}}, {"CopyRange", 2419, iface_void, {iface_position, iface_position}}, {"CopyText", 2420, iface_void, {iface_length, iface_string}}, {"CreateDocument", 2375, iface_int, {iface_void, iface_void}}, {"Cut", 2177, iface_void, {iface_void, iface_void}}, {"DelLineLeft", 2395, iface_void, {iface_void, iface_void}}, {"DelLineRight", 2396, iface_void, {iface_void, iface_void}}, {"DelWordLeft", 2335, iface_void, {iface_void, iface_void}}, {"DelWordRight", 2336, iface_void, {iface_void, iface_void}}, {"DeleteBack", 2326, iface_void, {iface_void, iface_void}}, {"DeleteBackNotLine", 2344, iface_void, {iface_void, iface_void}}, {"DocLineFromVisible", 2221, iface_int, {iface_int, iface_void}}, {"DocumentEnd", 2318, iface_void, {iface_void, iface_void}}, {"DocumentEndExtend", 2319, iface_void, {iface_void, iface_void}}, {"DocumentStart", 2316, iface_void, {iface_void, iface_void}}, {"DocumentStartExtend", 2317, iface_void, {iface_void, iface_void}}, {"EditToggleOvertype", 2324, iface_void, {iface_void, iface_void}}, {"EmptyUndoBuffer", 2175, iface_void, {iface_void, iface_void}}, {"EncodedFromUTF8", 2449, iface_int, {iface_string, iface_stringresult}}, {"EndUndoAction", 2079, iface_void, {iface_void, iface_void}}, {"EnsureVisible", 2232, iface_void, {iface_int, iface_void}}, {"EnsureVisibleEnforcePolicy", 2234, iface_void, {iface_int, iface_void}}, {"FindColumn", 2456, iface_int, {iface_int, iface_int}}, {"FindText", 2150, iface_position, {iface_int, iface_findtext}}, {"FormFeed", 2330, iface_void, {iface_void, iface_void}}, {"FormatRange", 2151, iface_position, {iface_bool, iface_formatrange}}, {"GetCurLine", 2027, iface_int, {iface_length, iface_stringresult}}, {"GetEndAtLastLine", 2278, iface_int, {iface_void, iface_void}}, {"GetLastChild", 2224, iface_int, {iface_int, iface_int}}, {"GetLine", 2153, iface_int, {iface_int, iface_stringresult}}, {"GetLineSelEndPosition", 2425, iface_position, {iface_int, iface_void}}, {"GetLineSelStartPosition", 2424, iface_position, {iface_int, iface_void}}, {"GetSelText", 2161, iface_int, {iface_void, iface_stringresult}}, {"GetStyledText", 2015, iface_int, {iface_void, iface_textrange}}, {"GetText", 2182, iface_int, {iface_length, iface_stringresult}}, {"GetTextRange", 2162, iface_int, {iface_void, iface_textrange}}, {"GotoLine", 2024, iface_void, {iface_int, iface_void}}, {"GotoPos", 2025, iface_void, {iface_position, iface_void}}, {"GrabFocus", 2400, iface_void, {iface_void, iface_void}}, {"HideLines", 2227, iface_void, {iface_int, iface_int}}, {"HideSelection", 2163, iface_void, {iface_bool, iface_void}}, {"Home", 2312, iface_void, {iface_void, iface_void}}, {"HomeDisplay", 2345, iface_void, {iface_void, iface_void}}, {"HomeDisplayExtend", 2346, iface_void, {iface_void, iface_void}}, {"HomeExtend", 2313, iface_void, {iface_void, iface_void}}, {"HomeRectExtend", 2430, iface_void, {iface_void, iface_void}}, {"HomeWrap", 2349, iface_void, {iface_void, iface_void}}, {"HomeWrapExtend", 2450, iface_void, {iface_void, iface_void}}, {"InsertText", 2003, iface_void, {iface_position, iface_string}}, {"LineCopy", 2455, iface_void, {iface_void, iface_void}}, {"LineCut", 2337, iface_void, {iface_void, iface_void}}, {"LineDelete", 2338, iface_void, {iface_void, iface_void}}, {"LineDown", 2300, iface_void, {iface_void, iface_void}}, {"LineDownExtend", 2301, iface_void, {iface_void, iface_void}}, {"LineDownRectExtend", 2426, iface_void, {iface_void, iface_void}}, {"LineDuplicate", 2404, iface_void, {iface_void, iface_void}}, {"LineEnd", 2314, iface_void, {iface_void, iface_void}}, {"LineEndDisplay", 2347, iface_void, {iface_void, iface_void}}, {"LineEndDisplayExtend", 2348, iface_void, {iface_void, iface_void}}, {"LineEndExtend", 2315, iface_void, {iface_void, iface_void}}, {"LineEndRectExtend", 2432, iface_void, {iface_void, iface_void}}, {"LineEndWrap", 2451, iface_void, {iface_void, iface_void}}, {"LineEndWrapExtend", 2452, iface_void, {iface_void, iface_void}}, {"LineFromPosition", 2166, iface_int, {iface_position, iface_void}}, {"LineLength", 2350, iface_int, {iface_int, iface_void}}, {"LineScroll", 2168, iface_void, {iface_int, iface_int}}, {"LineScrollDown", 2342, iface_void, {iface_void, iface_void}}, {"LineScrollUp", 2343, iface_void, {iface_void, iface_void}}, {"LineTranspose", 2339, iface_void, {iface_void, iface_void}}, {"LineUp", 2302, iface_void, {iface_void, iface_void}}, {"LineUpExtend", 2303, iface_void, {iface_void, iface_void}}, {"LineUpRectExtend", 2427, iface_void, {iface_void, iface_void}}, {"LinesJoin", 2288, iface_void, {iface_void, iface_void}}, {"LinesSplit", 2289, iface_void, {iface_int, iface_void}}, {"LoadLexerLibrary", 4007, iface_void, {iface_void, iface_string}}, {"LowerCase", 2340, iface_void, {iface_void, iface_void}}, {"MarkerAdd", 2043, iface_int, {iface_int, iface_int}}, {"MarkerDefine", 2040, iface_void, {iface_int, iface_int}}, {"MarkerDefinePixmap", 2049, iface_void, {iface_int, iface_string}}, {"MarkerDelete", 2044, iface_void, {iface_int, iface_int}}, {"MarkerDeleteAll", 2045, iface_void, {iface_int, iface_void}}, {"MarkerDeleteHandle", 2018, iface_void, {iface_int, iface_void}}, {"MarkerGet", 2046, iface_int, {iface_int, iface_void}}, {"MarkerLineFromHandle", 2017, iface_int, {iface_int, iface_void}}, {"MarkerNext", 2047, iface_int, {iface_int, iface_int}}, {"MarkerPrevious", 2048, iface_int, {iface_int, iface_int}}, {"MarkerSetBack", 2042, iface_void, {iface_int, iface_colour}}, {"MarkerSetFore", 2041, iface_void, {iface_int, iface_colour}}, {"MoveCaretInsideView", 2401, iface_void, {iface_void, iface_void}}, {"NewLine", 2329, iface_void, {iface_void, iface_void}}, {"Null", 2172, iface_void, {iface_void, iface_void}}, {"PageDown", 2322, iface_void, {iface_void, iface_void}}, {"PageDownExtend", 2323, iface_void, {iface_void, iface_void}}, {"PageDownRectExtend", 2434, iface_void, {iface_void, iface_void}}, {"PageUp", 2320, iface_void, {iface_void, iface_void}}, {"PageUpExtend", 2321, iface_void, {iface_void, iface_void}}, {"PageUpRectExtend", 2433, iface_void, {iface_void, iface_void}}, {"ParaDown", 2413, iface_void, {iface_void, iface_void}}, {"ParaDownExtend", 2414, iface_void, {iface_void, iface_void}}, {"ParaUp", 2415, iface_void, {iface_void, iface_void}}, {"ParaUpExtend", 2416, iface_void, {iface_void, iface_void}}, {"Paste", 2179, iface_void, {iface_void, iface_void}}, {"PointXFromPosition", 2164, iface_int, {iface_void, iface_position}}, {"PointYFromPosition", 2165, iface_int, {iface_void, iface_position}}, {"PositionAfter", 2418, iface_position, {iface_position, iface_void}}, {"PositionBefore", 2417, iface_position, {iface_position, iface_void}}, {"PositionFromLine", 2167, iface_position, {iface_int, iface_void}}, {"PositionFromPoint", 2022, iface_position, {iface_int, iface_int}}, {"PositionFromPointClose", 2023, iface_position, {iface_int, iface_int}}, {"Redo", 2011, iface_void, {iface_void, iface_void}}, {"RegisterImage", 2405, iface_void, {iface_int, iface_string}}, {"ReleaseDocument", 2377, iface_void, {iface_void, iface_int}}, {"ReplaceSel", 2170, iface_void, {iface_void, iface_string}}, {"ReplaceTarget", 2194, iface_int, {iface_length, iface_string}}, {"ReplaceTargetRE", 2195, iface_int, {iface_length, iface_string}}, {"ScrollCaret", 2169, iface_void, {iface_void, iface_void}}, {"SearchAnchor", 2366, iface_void, {iface_void, iface_void}}, {"SearchInTarget", 2197, iface_int, {iface_length, iface_string}}, {"SearchNext", 2367, iface_int, {iface_int, iface_string}}, {"SearchPrev", 2368, iface_int, {iface_int, iface_string}}, {"SelectAll", 2013, iface_void, {iface_void, iface_void}}, {"SetCharsDefault", 2444, iface_void, {iface_void, iface_void}}, {"SetEndAtLastLine", 2277, iface_void, {iface_bool, iface_void}}, {"SetFoldFlags", 2233, iface_void, {iface_int, iface_void}}, {"SetFoldMarginColour", 2290, iface_void, {iface_bool, iface_colour}}, {"SetFoldMarginHiColour", 2291, iface_void, {iface_bool, iface_colour}}, {"SetLengthForEncode", 2448, iface_void, {iface_int, iface_void}}, {"SetSavePoint", 2014, iface_void, {iface_void, iface_void}}, {"SetSel", 2160, iface_void, {iface_position, iface_position}}, {"SetSelBack", 2068, iface_void, {iface_bool, iface_colour}}, {"SetSelFore", 2067, iface_void, {iface_bool, iface_colour}}, {"SetStyling", 2033, iface_void, {iface_length, iface_int}}, {"SetStylingEx", 2073, iface_void, {iface_length, iface_string}}, {"SetText", 2181, iface_void, {iface_void, iface_string}}, {"SetVisiblePolicy", 2394, iface_void, {iface_int, iface_int}}, {"SetWhitespaceBack", 2085, iface_void, {iface_bool, iface_colour}}, {"SetWhitespaceFore", 2084, iface_void, {iface_bool, iface_colour}}, {"SetXCaretPolicy", 2402, iface_void, {iface_int, iface_int}}, {"SetYCaretPolicy", 2403, iface_void, {iface_int, iface_int}}, {"ShowLines", 2226, iface_void, {iface_int, iface_int}}, {"StartRecord", 3001, iface_void, {iface_void, iface_void}}, {"StartStyling", 2032, iface_void, {iface_position, iface_int}}, {"StopRecord", 3002, iface_void, {iface_void, iface_void}}, {"StutteredPageDown", 2437, iface_void, {iface_void, iface_void}}, {"StutteredPageDownExtend", 2438, iface_void, {iface_void, iface_void}}, {"StutteredPageUp", 2435, iface_void, {iface_void, iface_void}}, {"StutteredPageUpExtend", 2436, iface_void, {iface_void, iface_void}}, {"StyleClearAll", 2050, iface_void, {iface_void, iface_void}}, {"StyleResetDefault", 2058, iface_void, {iface_void, iface_void}}, {"Tab", 2327, iface_void, {iface_void, iface_void}}, {"TargetAsUTF8", 2447, iface_int, {iface_void, iface_stringresult}}, {"TargetFromSelection", 2287, iface_void, {iface_void, iface_void}}, {"TextHeight", 2279, iface_int, {iface_int, iface_void}}, {"TextWidth", 2276, iface_int, {iface_int, iface_string}}, {"ToggleFold", 2231, iface_void, {iface_int, iface_void}}, {"Undo", 2176, iface_void, {iface_void, iface_void}}, {"UpperCase", 2341, iface_void, {iface_void, iface_void}}, {"UsePopUp", 2371, iface_void, {iface_bool, iface_void}}, {"UserListShow", 2117, iface_void, {iface_int, iface_string}}, {"VCHome", 2331, iface_void, {iface_void, iface_void}}, {"VCHomeExtend", 2332, iface_void, {iface_void, iface_void}}, {"VCHomeRectExtend", 2431, iface_void, {iface_void, iface_void}}, {"VCHomeWrap", 2453, iface_void, {iface_void, iface_void}}, {"VCHomeWrapExtend", 2454, iface_void, {iface_void, iface_void}}, {"VisibleFromDocLine", 2220, iface_int, {iface_int, iface_void}}, {"WordEndPosition", 2267, iface_int, {iface_position, iface_bool}}, {"WordLeft", 2308, iface_void, {iface_void, iface_void}}, {"WordLeftEnd", 2439, iface_void, {iface_void, iface_void}}, {"WordLeftEndExtend", 2440, iface_void, {iface_void, iface_void}}, {"WordLeftExtend", 2309, iface_void, {iface_void, iface_void}}, {"WordPartLeft", 2390, iface_void, {iface_void, iface_void}}, {"WordPartLeftExtend", 2391, iface_void, {iface_void, iface_void}}, {"WordPartRight", 2392, iface_void, {iface_void, iface_void}}, {"WordPartRightExtend", 2393, iface_void, {iface_void, iface_void}}, {"WordRight", 2310, iface_void, {iface_void, iface_void}}, {"WordRightEnd", 2441, iface_void, {iface_void, iface_void}}, {"WordRightEndExtend", 2442, iface_void, {iface_void, iface_void}}, {"WordRightExtend", 2311, iface_void, {iface_void, iface_void}}, {"WordStartPosition", 2266, iface_int, {iface_position, iface_bool}}, {"ZoomIn", 2333, iface_void, {iface_void, iface_void}}, {"ZoomOut", 2334, iface_void, {iface_void, iface_void}} }; static IFaceProperty ifaceProperties[] = { {"Anchor", 2009, 2026, iface_position, iface_void}, {"AutoCAutoHide", 2119, 2118, iface_bool, iface_void}, {"AutoCCancelAtStart", 2111, 2110, iface_bool, iface_void}, {"AutoCChooseSingle", 2114, 2113, iface_bool, iface_void}, {"AutoCDropRestOfWord", 2271, 2270, iface_bool, iface_void}, {"AutoCFillUps", 0, 2112, iface_string, iface_void}, {"AutoCIgnoreCase", 2116, 2115, iface_bool, iface_void}, {"AutoCSeparator", 2107, 2106, iface_int, iface_void}, {"AutoCTypeSeparator", 2285, 2286, iface_int, iface_void}, {"BackSpaceUnIndents", 2263, 2262, iface_bool, iface_void}, {"BufferedDraw", 2034, 2035, iface_bool, iface_void}, {"CallTipBack", 0, 2205, iface_colour, iface_void}, {"CallTipFore", 0, 2206, iface_colour, iface_void}, {"CallTipForeHlt", 0, 2207, iface_colour, iface_void}, {"CaretFore", 2138, 2069, iface_colour, iface_void}, {"CaretLineBack", 2097, 2098, iface_colour, iface_void}, {"CaretLineVisible", 2095, 2096, iface_bool, iface_void}, {"CaretPeriod", 2075, 2076, iface_int, iface_void}, {"CaretWidth", 2189, 2188, iface_int, iface_void}, {"CharAt", 2007, 0, iface_int, iface_position}, {"CodePage", 2137, 2037, iface_int, iface_void}, {"Column", 2129, 0, iface_int, iface_position}, {"ControlCharSymbol", 2389, 2388, iface_int, iface_void}, {"CurrentPos", 2008, 2141, iface_position, iface_void}, {"Cursor", 2387, 2386, iface_int, iface_void}, {"DirectFunction", 2184, 0, iface_int, iface_void}, {"DirectPointer", 2185, 0, iface_int, iface_void}, {"DocPointer", 2357, 2358, iface_int, iface_void}, {"EOLMode", 2030, 2031, iface_int, iface_void}, {"EdgeColour", 2364, 2365, iface_colour, iface_void}, {"EdgeColumn", 2360, 2361, iface_int, iface_void}, {"EdgeMode", 2362, 2363, iface_int, iface_void}, {"EndStyled", 2028, 0, iface_position, iface_void}, {"FirstVisibleLine", 2152, 0, iface_int, iface_void}, {"Focus", 2381, 2380, iface_bool, iface_void}, {"FoldExpanded", 2230, 2229, iface_bool, iface_int}, {"FoldLevel", 2223, 2222, iface_int, iface_int}, {"FoldParent", 2225, 0, iface_int, iface_int}, {"HScrollBar", 2131, 2130, iface_bool, iface_void}, {"HighlightGuide", 2135, 2134, iface_int, iface_void}, {"HotspotActiveBack", 0, 2411, iface_colour, iface_bool}, {"HotspotActiveFore", 0, 2410, iface_colour, iface_bool}, {"HotspotActiveUnderline", 0, 2412, iface_bool, iface_void}, {"HotspotSingleLine", 0, 2421, iface_bool, iface_void}, {"Indent", 2123, 2122, iface_int, iface_void}, {"IndentationGuides", 2133, 2132, iface_bool, iface_void}, {"IndicFore", 2083, 2082, iface_colour, iface_int}, {"IndicStyle", 2081, 2080, iface_int, iface_int}, {"KeyWords", 0, 4005, iface_string, iface_int}, {"LayoutCache", 2273, 2272, iface_int, iface_void}, {"Length", 2006, 0, iface_int, iface_void}, {"Lexer", 4002, 4001, iface_int, iface_void}, {"LexerLanguage", 0, 4006, iface_string, iface_void}, {"LineCount", 2154, 0, iface_int, iface_void}, {"LineEndPosition", 2136, 0, iface_int, iface_int}, {"LineIndentPosition", 2128, 0, iface_position, iface_int}, {"LineIndentation", 2127, 2126, iface_int, iface_int}, {"LineState", 2093, 2092, iface_int, iface_int}, {"LineVisible", 2228, 0, iface_bool, iface_int}, {"LinesOnScreen", 2370, 0, iface_int, iface_void}, {"MarginLeft", 2156, 2155, iface_int, iface_void}, {"MarginMaskN", 2245, 2244, iface_int, iface_int}, {"MarginRight", 2158, 2157, iface_int, iface_void}, {"MarginSensitiveN", 2247, 2246, iface_bool, iface_int}, {"MarginTypeN", 2241, 2240, iface_int, iface_int}, {"MarginWidthN", 2243, 2242, iface_int, iface_int}, {"MaxLineState", 2094, 0, iface_int, iface_void}, {"ModEventMask", 2378, 2359, iface_int, iface_void}, {"Modify", 2159, 0, iface_bool, iface_void}, {"MouseDownCaptures", 2385, 2384, iface_bool, iface_void}, {"MouseDwellTime", 2265, 2264, iface_int, iface_void}, {"Overtype", 2187, 2186, iface_bool, iface_void}, {"PrintColourMode", 2149, 2148, iface_int, iface_void}, {"PrintMagnification", 2147, 2146, iface_int, iface_void}, {"PrintWrapMode", 2407, 2406, iface_int, iface_void}, {"Property", 0, 4004, iface_string, iface_string}, {"ReadOnly", 2140, 2171, iface_bool, iface_void}, {"ScrollWidth", 2275, 2274, iface_int, iface_void}, {"SearchFlags", 2199, 2198, iface_int, iface_void}, {"SelectionEnd", 2145, 2144, iface_position, iface_void}, {"SelectionIsRectangle", 2372, 0, iface_bool, iface_void}, {"SelectionMode", 2423, 2422, iface_int, iface_void}, {"SelectionStart", 2143, 2142, iface_position, iface_void}, {"Status", 2383, 2382, iface_int, iface_void}, {"StyleAt", 2010, 0, iface_int, iface_position}, {"StyleBack", 0, 2052, iface_colour, iface_int}, {"StyleBits", 2091, 2090, iface_int, iface_void}, {"StyleBold", 0, 2053, iface_bool, iface_int}, {"StyleCase", 0, 2060, iface_int, iface_int}, {"StyleChangeable", 0, 2099, iface_bool, iface_int}, {"StyleCharacterSet", 0, 2066, iface_int, iface_int}, {"StyleEOLFilled", 0, 2057, iface_bool, iface_int}, {"StyleFont", 0, 2056, iface_string, iface_int}, {"StyleFore", 0, 2051, iface_colour, iface_int}, {"StyleHotSpot", 0, 2409, iface_bool, iface_int}, {"StyleItalic", 0, 2054, iface_bool, iface_int}, {"StyleSize", 0, 2055, iface_int, iface_int}, {"StyleUnderline", 0, 2059, iface_bool, iface_int}, {"StyleVisible", 0, 2074, iface_bool, iface_int}, {"TabIndents", 2261, 2260, iface_bool, iface_void}, {"TabWidth", 2121, 2036, iface_int, iface_void}, {"TargetEnd", 2193, 2192, iface_position, iface_void}, {"TargetStart", 2191, 2190, iface_position, iface_void}, {"TextLength", 2183, 0, iface_int, iface_void}, {"TwoPhaseDraw", 2283, 2284, iface_bool, iface_void}, {"UndoCollection", 2019, 2012, iface_bool, iface_void}, {"UsePalette", 2139, 2039, iface_bool, iface_void}, {"UseTabs", 2125, 2124, iface_bool, iface_void}, {"VScrollBar", 2281, 2280, iface_bool, iface_void}, {"ViewEOL", 2355, 2356, iface_bool, iface_void}, {"ViewWS", 2020, 2021, iface_int, iface_void}, {"WhitespaceChars", 0, 2443, iface_string, iface_void}, {"WordChars", 0, 2077, iface_string, iface_void}, {"WrapMode", 2269, 2268, iface_int, iface_void}, {"WrapStartIndent", 2465, 2464, iface_int, iface_void}, {"WrapVisualFlags", 2461, 2460, iface_int, iface_void}, {"WrapVisualFlagsLocation", 2463, 2462, iface_int, iface_void}, {"XOffset", 2398, 2397, iface_int, iface_void}, {"Zoom", 2374, 2373, iface_int, iface_void} }; enum { ifaceFunctionCount = 224, ifaceConstantCount = 1126, ifacePropertyCount = 119 }; //--Autogenerated const IFaceFunction * const IFaceTable::functions = ifaceFunctions; const int IFaceTable::functionCount = ifaceFunctionCount; const IFaceConstant * const IFaceTable::constants = ifaceConstants; const int IFaceTable::constantCount = ifaceConstantCount; const IFaceProperty * const IFaceTable::properties = ifaceProperties; const int IFaceTable::propertyCount = ifacePropertyCount; usr/src/sdlBasic/src/sdlBasic/src/SciTEBase.cxx0000777000076500007660000044521510463134031016542 0ustar // SciTE - Scintilla based Text Editor /** @file SciTEBase.cxx ** Platform independent base class of editor. **/ // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include #include "Platform.h" #if PLAT_FOX #include #endif #if PLAT_GTK #include #include #endif #if PLAT_WIN #define _WIN32_WINNT 0x0400 #ifdef _MSC_VER // windows.h, et al, use a lot of nameless struct/unions - can't fix it, so allow it #pragma warning(disable: 4201) #endif #include #ifdef _MSC_VER // okay, that's done, don't allow it in our code #pragma warning(default: 4201) #endif #include #ifdef _MSC_VER #include #endif #ifdef __BORLANDC__ #include #endif #ifdef __DMC__ #include #endif #endif #include "SciTE.h" #include "PropSet.h" #include "Accessor.h" #include "WindowAccessor.h" #include "KeyWords.h" #include "Scintilla.h" #include "ScintillaWidget.h" #include "SciLexer.h" #include "Extender.h" #include "SciTEBase.h" // Contributor names are in UTF-8 const char *contributors[] = { "Atsuo Ishimoto", "Mark Hammond", "Francois Le Coguiec", "Dale Nagata", "Ralf Reinhardt", "Philippe Lhoste", "Andrew McKinlay", "Stephan R. A. Deibel", "Hans Eckardt", "Vassili Bourdo", "Maksim Lin", "Robin Dunn", "John Ehresman", "Steffen Goeldner", "Deepak S.", "DevelopMentor http://www.develop.com", "Yann Gaillard", "Aubin Paul", "Jason Diamond", "Ahmad Baitalmal", "Paul Winwood", "Maxim Baranov", "Icons by Zoiba", " based on Nuvola icons by David Vignoni", " http://www.icon-king.com ", " sdlBasic logo by Paulo Silva", " http://www15.brinkster.com/nitrofurano" "Ragnar H\xc3\xb8jland", "Christian Obrecht", "Andreas Neukoetter", "Adam Gates", "Steve Lhomme", "Ferdinand Prantl", "Jan Dries", "Markus Gritsch", "Tahir Karaca", "Ahmad Zawawi", "Laurent le Tynevez", "Walter Braeu", "Ashley Cambrell", "Garrett Serack", "Holger Schmidt", "ActiveState http://www.activestate.com", "James Larcombe", "Alexey Yutkin", "Jan Hercek", "Richard Pecl", "Edward K. Ream", "Valery Kondakoff", "Sm\xc3\xa1ri McCarthy", "Clemens Wyss", "Simon Steele", "Serge A. Baranov", "Xavier Nodet", "Willy Devaux", "David Clain", "Brendon Yenson", "Vamsi Potluru http://www.baanboard.com", "Praveen Ambekar", "Alan Knowles", "Kengo Jinno", "Valentin Valchev", "Marcos E. Wurzius", "Martin Alderson", "Robert Gustavsson", "Jos\xc3\xa9 Fonseca", "Holger Kiemes", "Francis Irving", "Scott Kirkwood", "Brian Quinlan", "Ubi", "Michael R. Duerig", "Deepak T", "Don Paul Beletsky", "Gerhard Kalab", "Olivier Dagenais", "Josh Wingstrom", "Bruce Dodson", "Sergey Koshcheyev", "Chuan-jian Shen", "Shane Caraveo", "Alexander Scripnik", "Ryan Christianson", "Martin Steffensen", "Jakub Vr\xc3\xa1na", "The Black Horus", "Bernd Kreuss", "Thomas Lauer", "Mike Lansdaal", "Yukihiro Nakai", "Jochen Tucht", "Greg Smith", "Steve Schoettler", "Mauritius Thinnes", "Darren Schroeder", "Pedro Guerreiro", "Steven te Brinke", "Dan Petitt", "Biswapesh Chattopadhyay", "Kein-Hong Man", "Patrizio Bekerle", "Nigel Hathaway", "Hrishikesh Desai", "Sergey Puljajev", "Mathias Rauen", "Angelo Mandato http://www.spaceblue.com", "Denis Sureau", "Kaspar Schiess", "Christoph H\xc3\xb6sler", "Jo\xc3\xa3o Paulo F Farias", "Ron Schofield", "Stefan Wosnik", "Marius Gheorghe", "Naba Kumar", "Sean O'Dell", "Stefanos Togoulidis", "Hans Hagen", "Jim Cape", "Roland Walter", "Brian Mosher", "Nicholas Nemtsev", "Roy Wood", "Peter-Henry Mander", "Robert Boucher", "Christoph Dalitz", "April White", "S. Umar", "Trent Mick", "Filip Yaghob", "Avi Yegudin", "Vivi Orunitia", "Manfred Becker", "Dimitris Keletsekis", "Yuiga", "Davide Scola", "Jason Boggs", "Reinhold Niesner", "Jos van der Zande", "Pescuma", "Pavol Bosik", "Johannes Schmid", "Blair McGlashan", "Mikael Hultgren", "Florian Balmer", "Hadar Raz", "Herr Pfarrer", "Ben Key", "Gene Barry", "Niki Spahiev", "Carsten Sperber", "Phil Reid", "Iago Rubio", "R\xc3\xa9gis Vaquette", "Massimo Cor\xc3\xa0", "Elias Pschernig", "Chris Jones", "Josiah Reynolds", "Robert Roessler http://www.rftp.com", "Steve Donovan", "Jan Martin Pettersen", "Sergey Philippov", "Borujoa", "Michael Owens", "Franck Marcia", "Massimo Maria Ghisalberti", "Frank Wunderlich", "Josepmaria Roca", "Tobias Engvall", "Suzumizaki Kimitaka", "Michael Cartmell", "Pascal Hurni", "Andre", "Randy Butler", "Georg Ritter", "Zoiba", "Vroby", }; // AddStyledText only called from About so static size buffer is OK void AddStyledText(WindowID hwnd, const char *s, int attr) { char buf[1000]; size_t len = strlen(s); for (size_t i = 0; i < len; i++) { buf[i*2] = s[i]; buf[i*2 + 1] = static_cast(attr); } Platform::SendScintillaPointer(hwnd, SCI_ADDSTYLEDTEXT, static_cast(len*2), const_cast(buf)); } void SetAboutStyle(WindowID wsci, int style, ColourDesired fore) { Platform::SendScintilla(wsci, SCI_STYLESETFORE, style, fore.AsLong()); } static void HackColour(int &n) { n += (rand() % 100) - 50; if (n > 0xE7) n = 0x60; if (n < 0) n = 0x80; } SciTEBase::SciTEBase(Extension *ext) : apis(true), extender(ext), propsUI(true) { codePage = 0; characterSet = 0; unicodeMode = uni8Bit; // Set to 'unknown' language = "java"; lexLanguage = SCLEX_CPP; functionDefinition = 0; indentOpening = true; indentClosing = true; statementLookback = 10; fnEditor = 0; ptrEditor = 0; fnOutput = 0; ptrOutput = 0; tbVisible = false; sbVisible = false; tabVisible = false; tabHideOne = false; tabMultiLine = false; sbNum = 1; visHeightTools = 0; visHeightStatus = 0; visHeightEditor = 1; heightBar = 7; dialogsOnScreen = 0; topMost = false; wrap = false; wrapOutput = false; wrapStyle = SC_WRAP_WORD; isReadOnly = false; openFilesHere = false; fullScreen = false; heightOutput = 0; previousHeightOutput = 0; allowMenuActions = true; isDirty = false; isBuilding = false; isBuilt = false; executing = false; scrollOutput = true; returnOutputToCommand = true; commandCurrent = 0; jobUsesOutputPane = false; cancelFlag = 0L; ptStartDrag.x = 0; ptStartDrag.y = 0; capturedMouse = false; firstPropertiesRead = true; localisationRead = false; splitVertical = false; bufferedDraw = true; twoPhaseDraw = true; bracesCheck = true; bracesSloppy = false; bracesStyle = 0; braceCount = 0; indentationWSVisible = true; autoCompleteIgnoreCase = false; callTipIgnoreCase = false; autoCCausedByOnlyOne = false; startCalltipWord = 0; currentCallTip = 0; maxCallTips = 1; currentCallTipWord = ""; lastPosCallTip = 0; margin = false; marginWidth = marginWidthDefault; foldMargin = true; foldMarginWidth = foldMarginWidthDefault; lineNumbers = false; lineNumbersWidth = lineNumbersWidthDefault; lineNumbersExpand = false; usePalette = false; clearBeforeExecute = false; replacing = false; havefound = false; matchCase = false; wholeWord = false; reverseFind = false; regExp = false; wrapFind = true; unSlash = false; findInStyle = false; findStyle = 0; languageMenu = 0; languageItems = 0; shortCutItemList = 0; shortCutItems = 0; fullPath[0] = '\0'; fileName[0] = '\0'; fileExt[0] = '\0'; dirName[0] = '\0'; useMonoFont = false; fileModTime = 0; fileModLastAsk = 0; macrosEnabled = false; recording = false; propsBase.superPS = &propsEmbed; propsUser.superPS = &propsBase; propsLocal.superPS = &propsUser; props.superPS = &propsLocal; propsStatus.superPS = &props; needReadProperties = false; } SciTEBase::~SciTEBase() { if (extender) extender->Finalise(); delete []languageMenu; delete []shortCutItemList; popup.Destroy(); } sptr_t SciTEBase::SendEditor(unsigned int msg, uptr_t wParam, sptr_t lParam) { return fnEditor(ptrEditor, msg, wParam, lParam); } sptr_t SciTEBase::SendEditorString(unsigned int msg, uptr_t wParam, const char *s) { return SendEditor(msg, wParam, reinterpret_cast(s)); } sptr_t SciTEBase::SendOutput(unsigned int msg, uptr_t wParam, sptr_t lParam) { return fnOutput(ptrOutput, msg, wParam, lParam); } sptr_t SciTEBase::SendOutputString(unsigned int msg, uptr_t wParam, const char *s) { return SendOutput(msg, wParam, reinterpret_cast(s)); } sptr_t SciTEBase::SendFocused(unsigned int msg, uptr_t wParam, sptr_t lParam) { if (wOutput.HasFocus()) return SendOutput(msg, wParam, lParam); else return SendEditor(msg, wParam, lParam); } sptr_t SciTEBase::SendPane(int destination, unsigned int msg, uptr_t wParam, sptr_t lParam) { if (destination == IDM_SRCWIN) return SendEditor(msg, wParam, lParam); else if (destination == IDM_RUNWIN) return SendOutput(msg, wParam, lParam); else return SendFocused(msg, wParam, lParam); } sptr_t SciTEBase::SendWindow(Window &w, unsigned int msg, uptr_t wParam, sptr_t lParam) { if (w.GetID() == wOutput.GetID()) return SendOutput(msg, wParam, lParam); else return SendEditor(msg, wParam, lParam); } void SciTEBase::SendChildren(unsigned int msg, uptr_t wParam, sptr_t lParam) { SendEditor(msg, wParam, lParam); SendOutput(msg, wParam, lParam); } sptr_t SciTEBase::SendOutputEx(unsigned int msg, uptr_t wParam /*= 0*/, sptr_t lParam /*= 0*/, bool direct /*= true*/) { if (direct) return SendOutput(msg, wParam, lParam); return Platform::SendScintilla(wOutput.GetID(), msg, wParam, lParam); } #if PLAT_WIN static unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen) { unsigned int len = 0; for (unsigned int i = 0; i < tlen && uptr[i]; i++) { unsigned int uch = uptr[i]; if (uch < 0x80) len++; else if (uch < 0x800) len += 2; else len +=3; } return len; } static void UTF8FromUCS2(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len) { int k = 0; for (unsigned int i = 0; i < tlen && uptr[i]; i++) { unsigned int uch = uptr[i]; if (uch < 0x80) { putf[k++] = static_cast(uch); } else if (uch < 0x800) { putf[k++] = static_cast(0xC0 | (uch >> 6)); putf[k++] = static_cast(0x80 | (uch & 0x3f)); } else { putf[k++] = static_cast(0xE0 | (uch >> 12)); putf[k++] = static_cast(0x80 | ((uch >> 6) & 0x3f)); putf[k++] = static_cast(0x80 | (uch & 0x3f)); } } putf[len] = '\0'; } #endif SString SciTEBase::GetTranslationToAbout(const char * const propname, bool retainIfNotFound){ #if PLAT_WIN // By code below, all translators can write their name in their own // language in locale.properties on Windows. SString result = LocaliseString(propname, retainIfNotFound); if (!result.length()) return result; int translationCodePage = props.GetInt("code.page", CP_ACP); int bufwSize = ::MultiByteToWideChar(translationCodePage, MB_PRECOMPOSED, result.c_str(), -1, NULL, 0); if (!bufwSize) return result; wchar_t *bufw = new wchar_t[bufwSize+1]; bufwSize = ::MultiByteToWideChar(translationCodePage, MB_PRECOMPOSED, result.c_str(), -1, bufw, bufwSize); if(!bufwSize) { delete []bufw; return result; } int bufcSize = UTF8Length(bufw, bufwSize); if (!bufcSize) return result; char *bufc = new char[bufcSize+1]; UTF8FromUCS2(bufw, bufwSize, bufc, bufcSize); delete []bufw; result = bufcSize ? bufc : ""; delete []bufc; return result; #else // On GTK+, LocaliseString always converts to UTF-8. return LocaliseString(propname, retainIfNotFound); #endif } void SciTEBase::SetAboutMessage(WindowID wsci, const char *appTitle) { if (wsci) { Platform::SendScintilla(wsci, SCI_SETSTYLEBITS, 7, 0); Platform::SendScintilla(wsci, SCI_STYLERESETDEFAULT, 0, 0); int fontSize = 15; #if PLAT_GTK #if GTK_MAJOR_VERSION == 1 // On GTK+ 1.x, try a font set that may allow unicode display Platform::SendScintilla(wsci, SCI_STYLESETFONT, STYLE_DEFAULT, reinterpret_cast("misc-fixed-iso10646-1,*")); #else Platform::SendScintilla(wsci, SCI_STYLESETFONT, STYLE_DEFAULT, reinterpret_cast("!Serif")); #endif fontSize = 14; #endif Platform::SendScintilla(wsci, SCI_SETCODEPAGE, SC_CP_UTF8, 0); Platform::SendScintilla(wsci, SCI_STYLESETSIZE, STYLE_DEFAULT, fontSize); Platform::SendScintilla(wsci, SCI_STYLESETBACK, STYLE_DEFAULT, ColourDesired(0xff, 0xff, 0xff).AsLong()); Platform::SendScintilla(wsci, SCI_STYLECLEARALL, 0, 0); SetAboutStyle(wsci, 0, ColourDesired(0, 0xaa, 0)); Platform::SendScintilla(wsci, SCI_STYLESETSIZE, 0, fontSize); //Platform::SendScintilla(wsci, SCI_STYLESETBACK, 0, ColourDesired(0, 0xff, 0xff).AsLong()); AddStyledText(wsci, appTitle, 0); //AddStyledText(wsci, "\n", 0); SetAboutStyle(wsci, 1, ColourDesired(0, 0, 0)); int trsSty = 5; // define the stylenumber to assign font for translators. SString translator = GetTranslationToAbout("TranslationCredit", false); SetAboutStyle(wsci, trsSty, ColourDesired(0, 0, 0)); #if PLAT_WIN // On Windows Me (maybe 9x also), we must assign another font to display translation. if (translator.length()) { SString fontBase = props.GetExpanded("font.translators"); StyleDefinition sd(fontBase.c_str()); if (sd.specified & StyleDefinition::sdFont) { Platform::SendScintilla(wsci, SCI_STYLESETFONT, trsSty, reinterpret_cast(sd.font.c_str())); } if (sd.specified & StyleDefinition::sdSize) { Platform::SendScintilla(wsci, SCI_STYLESETSIZE, trsSty, sd.size); } } #endif AddStyledText(wsci, GetTranslationToAbout("Version").c_str(), trsSty); AddStyledText(wsci, " 20051016\n", 1); AddStyledText(wsci, " " __DATE__ " " __TIME__ "\n\n", 1); AddStyledText(wsci, "based upon SciTE ", 3); AddStyledText(wsci, GetTranslationToAbout("Version").c_str(), trsSty); AddStyledText(wsci, " 1.64\n", 1); SetAboutStyle(wsci, 2, ColourDesired(0, 0, 0)); AddStyledText(wsci, " ", 1); Platform::SendScintilla(wsci, SCI_STYLESETITALIC, 2, 1); AddStyledText(wsci, GetTranslationToAbout("by").c_str(), trsSty); AddStyledText(wsci, " Neil Hodgson.\n", 2); SetAboutStyle(wsci, 3, ColourDesired(0, 0, 0)); AddStyledText(wsci, "December 1998-June 2005.\n", 3); SetAboutStyle(wsci, 4, ColourDesired(0, 0x7f, 0x7f)); AddStyledText(wsci, "http://www.scintilla.org\n", 4); if (translator.length()) { AddStyledText(wsci, translator.c_str(), trsSty); AddStyledText(wsci, "\n", 5); } AddStyledText(wsci, GetTranslationToAbout("\nContributors:").c_str(), trsSty); srand(static_cast(time(0))); for (unsigned int co = 0;co < (sizeof(contributors) / sizeof(contributors[0]));co++) { int colourIndex = 50 + (co % 78); AddStyledText(wsci, "\n ", colourIndex); AddStyledText(wsci, contributors[co], colourIndex); } int r = rand() % 256; int g = rand() % 256; int b = rand() % 256; for (unsigned int sty = 0;sty < 78; sty++) { HackColour(r); HackColour(g); HackColour(b); SetAboutStyle(wsci, sty + 50, ColourDesired(r, g, b)); } Platform::SendScintilla(wsci, SCI_SETREADONLY, 1, 0); } } void SciTEBase::ViewWhitespace(bool view) { if (view && indentationWSVisible) SendEditor(SCI_SETVIEWWS, SCWS_VISIBLEALWAYS); else if (view) SendEditor(SCI_SETVIEWWS, SCWS_VISIBLEAFTERINDENT); else SendEditor(SCI_SETVIEWWS, SCWS_INVISIBLE); } StyleAndWords SciTEBase::GetStyleAndWords(const char *base) { StyleAndWords sw; SString fileNameForExtension = ExtensionFileName(); SString sAndW = props.GetNewExpand(base, fileNameForExtension.c_str()); sw.styleNumber = sAndW.value(); const char *space = strchr(sAndW.c_str(), ' '); if (space) sw.words = space + 1; return sw; } void SciTEBase::AssignKey(int key, int mods, int cmd) { SendEditor(SCI_ASSIGNCMDKEY, Platform::LongFromTwoShorts(static_cast(key), static_cast(mods)), cmd); } /** * Override the language of the current file with the one indicated by @a cmdID. * Mostly used to set a language on a file of unknown extension. */ void SciTEBase::SetOverrideLanguage(int cmdID) { RecentFile rf = GetFilePosition(); EnsureRangeVisible(0, SendEditor(SCI_GETLENGTH), false); // Zero all the style bytes SendEditor(SCI_CLEARDOCUMENTSTYLE); overrideExtension = "x."; overrideExtension += languageMenu[cmdID].extension; ReadProperties(); SetIndentSettings(); SendEditor(SCI_COLOURISE, 0, -1); Redraw(); DisplayAround(rf); } int SciTEBase::LengthDocument() { return SendEditor(SCI_GETLENGTH); } int SciTEBase::GetCaretInLine() { int caret = SendEditor(SCI_GETCURRENTPOS); int line = SendEditor(SCI_LINEFROMPOSITION, caret); int lineStart = SendEditor(SCI_POSITIONFROMLINE, line); return caret - lineStart; } void SciTEBase::GetLine(char *text, int sizeText, int line) { if (line < 0) line = GetCurrentLineNumber(); int lineStart = SendEditor(SCI_POSITIONFROMLINE, line); int lineEnd = SendEditor(SCI_GETLINEENDPOSITION, line); int lineMax = lineStart + sizeText - 1; if (lineEnd > lineMax) lineEnd = lineMax; GetRange(wEditor, lineStart, lineEnd, text); text[lineEnd - lineStart] = '\0'; } SString SciTEBase::GetLine(int line) { int len; // Get needed buffer size if (line < 0) { len = Platform::SendScintilla(wEditor.GetID(), SCI_GETCURLINE, 0, 0); } else { len = Platform::SendScintilla(wEditor.GetID(), SCI_GETLINE, line, 0); } // Allocate buffer SBuffer text(len); // And get the line if (line < 0) { Platform::SendScintillaPointer(wEditor.GetID(), SCI_GETCURLINE, len, text.ptr()); } else { Platform::SendScintillaPointer(wEditor.GetID(), SCI_GETLINE, line, text.ptr()); } return SString(text); } void SciTEBase::GetRange(Window &win, int start, int end, char *text) { TextRange tr; tr.chrg.cpMin = start; tr.chrg.cpMax = end; tr.lpstrText = text; Platform::SendScintillaPointer(win.GetID(), SCI_GETTEXTRANGE, 0, &tr); } #ifdef OLD_CODE void SciTEBase::Colourise(int start, int end, bool editor) { // Colourisation is now performed by the SciLexer DLL Window &win = editor ? wEditor : wOutput; int lengthDoc = Platform::SendScintilla(win.GetID(), SCI_GETLENGTH, 0, 0); if (end == -1) end = lengthDoc; int len = end - start; StylingContext styler(win.GetID(), props); int styleStart = 0; if (start > 0) styleStart = styler.StyleAt(start - 1); styler.SetCodePage(codePage); if (editor) { LexerModule::Colourise(start, len, styleStart, lexLanguage, keyWordLists, styler); } else { LexerModule::Colourise(start, len, 0, SCLEX_ERRORLIST, 0, styler); } styler.Flush(); } #endif /** * Check if the given line is a preprocessor condition line. * @return The kind of preprocessor condition (enum values). */ int SciTEBase::IsLinePreprocessorCondition(char *line) { char *currChar = line; char word[32]; int i = 0; if (!currChar) { return false; } while (isspacechar(*currChar) && *currChar) { currChar++; } if (preprocessorSymbol && (*currChar == preprocessorSymbol)) { currChar++; while (isspacechar(*currChar) && *currChar) { currChar++; } while (!isspacechar(*currChar) && *currChar) { word[i++] = *currChar++; } word[i] = '\0'; if (preprocCondStart.InList(word)) { return ppcStart; } if (preprocCondMiddle.InList(word)) { return ppcMiddle; } if (preprocCondEnd.InList(word)) { return ppcEnd; } } return noPPC; } /** * Search a matching preprocessor condition line. * @return @c true if the end condition are meet. * Also set curLine to the line where one of these conditions is mmet. */ bool SciTEBase::FindMatchingPreprocessorCondition( int &curLine, ///< Number of the line where to start the search int direction, ///< Direction of search: 1 = forward, -1 = backward int condEnd1, ///< First status of line for which the search is OK int condEnd2) { ///< Second one bool isInside = false; char line[800]; // No need for full line int status, level = 0; int maxLines = SendEditor(SCI_GETLINECOUNT)-1; while (curLine < maxLines && curLine > 0 && !isInside) { curLine += direction; // Increment or decrement GetLine(line, sizeof(line), curLine); status = IsLinePreprocessorCondition(line); if ((direction == 1 && status == ppcStart) || (direction == -1 && status == ppcEnd)) { level++; } else if (level > 0 && ((direction == 1 && status == ppcEnd) || (direction == -1 && status == ppcStart))) { level--; } else if (level == 0 && (status == condEnd1 || status == condEnd2)) { isInside = true; } } return isInside; } /** * Find if there is a preprocessor condition after or before the caret position, * @return @c true if inside a preprocessor condition. */ #ifdef __BORLANDC__ // Borland warns that isInside is assigned a value that is never used in this method. // This is OK so turn off the warning just for this method. #pragma warn -aus #endif bool SciTEBase::FindMatchingPreprocCondPosition( bool isForward, ///< @c true if search forward int &mppcAtCaret, ///< Matching preproc. cond.: current position of caret int &mppcMatch) { ///< Matching preproc. cond.: matching position bool isInside = false; int curLine; char line[800]; // Probably no need to get more characters, even if the line is longer, unless very strange layout... int status; // Get current line curLine = SendEditor(SCI_LINEFROMPOSITION, mppcAtCaret); GetLine(line, sizeof(line), curLine); status = IsLinePreprocessorCondition(line); switch (status) { case ppcStart: if (isForward) { isInside = FindMatchingPreprocessorCondition(curLine, 1, ppcMiddle, ppcEnd); } else { mppcMatch = mppcAtCaret; return true; } break; case ppcMiddle: if (isForward) { isInside = FindMatchingPreprocessorCondition(curLine, 1, ppcMiddle, ppcEnd); } else { isInside = FindMatchingPreprocessorCondition(curLine, -1, ppcStart, ppcMiddle); } break; case ppcEnd: if (isForward) { mppcMatch = mppcAtCaret; return true; } else { isInside = FindMatchingPreprocessorCondition(curLine, -1, ppcStart, ppcMiddle); } break; default: // Should be noPPC if (isForward) { isInside = FindMatchingPreprocessorCondition(curLine, 1, ppcMiddle, ppcEnd); } else { isInside = FindMatchingPreprocessorCondition(curLine, -1, ppcStart, ppcMiddle); } break; } if (isInside) { mppcMatch = SendEditor(SCI_POSITIONFROMLINE, curLine); } return isInside; } #ifdef __BORLANDC__ #pragma warn .aus #endif static bool IsBrace(char ch) { return ch == '[' || ch == ']' || ch == '(' || ch == ')' || ch == '{' || ch == '}'; } /** * Find if there is a brace next to the caret, checking before caret first, then * after caret. If brace found also find its matching brace. * @return @c true if inside a bracket pair. */ bool SciTEBase::FindMatchingBracePosition(bool editor, int &braceAtCaret, int &braceOpposite, bool sloppy) { bool isInside = false; Window &win = editor ? wEditor : wOutput; int bracesStyleCheck = editor ? bracesStyle : 0; int caretPos = Platform::SendScintilla(win.GetID(), SCI_GETCURRENTPOS, 0, 0); braceAtCaret = -1; braceOpposite = -1; char charBefore = '\0'; char styleBefore = '\0'; int lengthDoc = Platform::SendScintilla(win.GetID(), SCI_GETLENGTH, 0, 0); WindowAccessor acc(win.GetID(), props); if ((lengthDoc > 0) && (caretPos > 0)) { // Check to ensure not matching brace that is part of a multibyte character if (Platform::SendScintilla(win.GetID(), SCI_POSITIONBEFORE, caretPos) == (caretPos - 1)) { charBefore = acc[caretPos - 1]; styleBefore = static_cast(acc.StyleAt(caretPos - 1) & 31); } } // Priority goes to character before caret if (charBefore && IsBrace(charBefore) && ((styleBefore == bracesStyleCheck) || (!bracesStyle))) { braceAtCaret = caretPos - 1; } bool colonMode = false; if ((lexLanguage == SCLEX_PYTHON) && (':' == charBefore) && (SCE_P_OPERATOR == styleBefore)) { braceAtCaret = caretPos - 1; colonMode = true; } bool isAfter = true; if (lengthDoc > 0 && sloppy && (braceAtCaret < 0) && (caretPos < lengthDoc)) { // No brace found so check other side // Check to ensure not matching brace that is part of a multibyte character if (Platform::SendScintilla(win.GetID(), SCI_POSITIONAFTER, caretPos) == (caretPos + 1)) { char charAfter = acc[caretPos]; char styleAfter = static_cast(acc.StyleAt(caretPos) & 31); if (charAfter && IsBrace(charAfter) && (styleAfter == bracesStyleCheck)) { braceAtCaret = caretPos; isAfter = false; } if ((lexLanguage == SCLEX_PYTHON) && (':' == charAfter) && (SCE_P_OPERATOR == styleAfter)) { braceAtCaret = caretPos; colonMode = true; } } } if (braceAtCaret >= 0) { if (colonMode) { int lineStart = Platform::SendScintilla(win.GetID(), SCI_LINEFROMPOSITION, braceAtCaret); int lineMaxSubord = Platform::SendScintilla(win.GetID(), SCI_GETLASTCHILD, lineStart, -1); braceOpposite = Platform::SendScintilla(win.GetID(), SCI_GETLINEENDPOSITION, lineMaxSubord); } else { braceOpposite = Platform::SendScintilla(win.GetID(), SCI_BRACEMATCH, braceAtCaret, 0); } if (braceOpposite > braceAtCaret) { isInside = isAfter; } else { isInside = !isAfter; } } return isInside; } void SciTEBase::BraceMatch(bool editor) { if (!bracesCheck) return; int braceAtCaret = -1; int braceOpposite = -1; FindMatchingBracePosition(editor, braceAtCaret, braceOpposite, bracesSloppy); Window &win = editor ? wEditor : wOutput; if ((braceAtCaret != -1) && (braceOpposite == -1)) { Platform::SendScintilla(win.GetID(), SCI_BRACEBADLIGHT, braceAtCaret, 0); SendEditor(SCI_SETHIGHLIGHTGUIDE, 0); } else { char chBrace = static_cast(Platform::SendScintilla( win.GetID(), SCI_GETCHARAT, braceAtCaret, 0)); Platform::SendScintilla(win.GetID(), SCI_BRACEHIGHLIGHT, braceAtCaret, braceOpposite); int columnAtCaret = Platform::SendScintilla(win.GetID(), SCI_GETCOLUMN, braceAtCaret, 0); int columnOpposite = Platform::SendScintilla(win.GetID(), SCI_GETCOLUMN, braceOpposite, 0); if (chBrace == ':') { int lineStart = Platform::SendScintilla(win.GetID(), SCI_LINEFROMPOSITION, braceAtCaret); int indentPos = Platform::SendScintilla(win.GetID(), SCI_GETLINEINDENTPOSITION, lineStart, 0); int indentPosNext = Platform::SendScintilla(win.GetID(), SCI_GETLINEINDENTPOSITION, lineStart + 1, 0); columnAtCaret = Platform::SendScintilla(win.GetID(), SCI_GETCOLUMN, indentPos, 0); int columnAtCaretNext = Platform::SendScintilla(win.GetID(), SCI_GETCOLUMN, indentPosNext, 0); int indentSize = Platform::SendScintilla(win.GetID(), SCI_GETINDENT); if (columnAtCaretNext - indentSize > 1) columnAtCaret = columnAtCaretNext - indentSize; //Platform::DebugPrintf(": %d %d %d\n", lineStart, indentPos, columnAtCaret); if (columnOpposite == 0) // If the final line of the structure is empty columnOpposite = columnAtCaret; } if (props.GetInt("highlight.indentation.guides")) Platform::SendScintilla(win.GetID(), SCI_SETHIGHLIGHTGUIDE, Platform::Minimum(columnAtCaret, columnOpposite), 0); } } void SciTEBase::SetWindowName() { if (fileName[0] == '\0') { windowName = LocaliseString("Untitled"); windowName.insert(0, "("); windowName += ")"; } else if (props.GetInt("title.full.path") == 2) { windowName = fileName; windowName += " in "; windowName += dirName; } else if (props.GetInt("title.full.path") == 1) { windowName = fullPath; } else { windowName = fileName; } if (isDirty) windowName += " * "; else windowName += " - "; windowName += appName; if (buffers.length > 1 && props.GetInt("title.show.buffers")) { windowName += " ["; windowName += SString(buffers.Current() + 1); windowName += " of "; windowName += SString(buffers.length); windowName += "]"; } wSciTE.SetTitle(windowName.c_str()); } CharacterRange SciTEBase::GetSelection() { CharacterRange crange; crange.cpMin = SendEditor(SCI_GETSELECTIONSTART); crange.cpMax = SendEditor(SCI_GETSELECTIONEND); return crange; } void SciTEBase::SetSelection(int anchor, int currentPos) { SendEditor(SCI_SETSEL, anchor, currentPos); } void SciTEBase::GetCTag(char *sel, int len) { int lengthDoc, selStart, selEnd; int mustStop = 0; char c; Window wCurrent; if (wEditor.HasFocus()) { wCurrent = wEditor; } else { wCurrent = wOutput; } lengthDoc = SendFocused(SCI_GETLENGTH); selStart = selEnd = SendFocused(SCI_GETSELECTIONEND); WindowAccessor acc(wCurrent.GetID(), props); while (!mustStop) { if (selStart < lengthDoc - 1) { selStart++; c = acc[selStart]; if (c == '\r' || c == '\n') { mustStop = -1; } else if (c == '\t' && ((acc[selStart + 1] == '/' && acc[selStart + 2] == '^') || isdigit(acc[selStart + 1]))) { mustStop = 1; } } else { mustStop = -1; } } if (mustStop == 1 && (acc[selStart + 1] == '/' && acc[selStart + 2] == '^')) { // Found selEnd = selStart += 3; mustStop = 0; while (!mustStop) { if (selEnd < lengthDoc - 1) { selEnd++; c = acc[selEnd]; if (c == '\r' || c == '\n') { mustStop = -1; } else if (c == '$' && acc[selEnd + 1] == '/') { mustStop = 1; // Found! } } else { mustStop = -1; } } } else if (mustStop == 1 && isdigit(acc[selStart + 1])) { // a Tag can be referenced by line Number also selEnd = selStart += 1; while (isdigit(acc[selEnd]) && (selEnd < lengthDoc)) { selEnd++; } } sel[0] = '\0'; if ((selStart < selEnd) && ((selEnd - selStart + 1) < len)) { GetRange(wCurrent, selStart, selEnd, sel); } } // Should also use word.characters.*, if exists, in the opposite way (in set instead of not in set) static bool iswordcharforsel(char ch) { return !strchr("\t\n\r !\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~", ch); } // Accept slighly more characters than for a word // Doesn't accept all valid characters, as they are rarely used in source filenames... // Accept path separators '/' and '\', extension separator '.', and ':', MS drive unit // separator, and also used for separating the line number for grep. Same for '(' and ')' for cl. static bool isfilenamecharforsel(char ch) { return !strchr("\t\n\r \"$%'*,;<>?[]^`{|}", ch); } SString SciTEBase::GetRangeInUIEncoding(Window &win, int selStart, int selEnd) { SBuffer sel(selEnd - selStart); GetRange(win, selStart, selEnd, sel.ptr()); return SString(sel); } SString SciTEBase::RangeExtendAndGrab( Window &wCurrent, int &selStart, int &selEnd, bool (*ischarforsel)(char ch), ///< Function returning @c true if the given char. is part of the selection. bool stripEol /*=true*/) { if (selStart == selEnd && ischarforsel) { // Empty range and have a function to extend it int lengthDoc = SendWindow(wCurrent, SCI_GETLENGTH); WindowAccessor acc(wCurrent.GetID(), props); // Try and find a word at the caret // On the left... while ((selStart > 0) && (ischarforsel(acc[selStart - 1]))) { selStart--; } // and on the right while ((selEnd < lengthDoc) && (ischarforsel(acc[selEnd]))) { selEnd++; } } SString selected; if (selStart != selEnd) { selected = GetRangeInUIEncoding(wCurrent, selStart, selEnd); } if (stripEol) { // Change whole line selected but normally end of line characters not wanted. // Remove possible terminating \r, \n, or \r\n. size_t sellen = selected.length(); if (sellen >= 2 && (selected[sellen - 2] == '\r' && selected[sellen - 1] == '\n')) { selected.remove(sellen - 2, 0); } else if (sellen >= 1 && (selected[sellen - 1] == '\r' || selected[sellen - 1] == '\n')) { selected.remove(sellen - 1, 0); } } return selected; } /** * If there is selected text, either in the editor or the output pane, * put the selection in the @a sel buffer, up to @a len characters. * Otherwise, try and select characters around the caret, as long as they are OK * for the @a ischarforsel function. * Remove the last two character controls from the result, as they are likely * to be CR and/or LF. */ SString SciTEBase::SelectionExtend( bool (*ischarforsel)(char ch), ///< Function returning @c true if the given char. is part of the selection. bool stripEol /*=true*/) { Window wCurrent; if (wOutput.HasFocus()) { wCurrent = wOutput; } else { wCurrent = wEditor; } int selStart = SendFocused(SCI_GETSELECTIONSTART); int selEnd = SendFocused(SCI_GETSELECTIONEND); return RangeExtendAndGrab(wCurrent, selStart, selEnd, ischarforsel, stripEol); } void SciTEBase::FindWordAtCaret(int &start, int &end) { Window wCurrent; if (wOutput.HasFocus()) { wCurrent = wOutput; } else { wCurrent = wEditor; } start = SendFocused(SCI_GETSELECTIONSTART); end = SendFocused(SCI_GETSELECTIONEND); // Call just to update start & end RangeExtendAndGrab(wCurrent, start, end, iswordcharforsel, false); } bool SciTEBase::SelectWordAtCaret() { int selStart = 0; int selEnd = 0; FindWordAtCaret(selStart, selEnd); SetSelection(selStart, selEnd); return selStart != selEnd; } SString SciTEBase::SelectionWord(bool stripEol /*=true*/) { return SelectionExtend(iswordcharforsel, stripEol); } SString SciTEBase::SelectionFilename() { return SelectionExtend(isfilenamecharforsel); } void SciTEBase::SelectionIntoProperties() { SString currentSelection = SelectionExtend(0, false); props.Set("CurrentSelection", currentSelection.c_str()); SString word = SelectionWord(); props.Set("CurrentWord", word.c_str()); int selStart = SendFocused(SCI_GETSELECTIONSTART); int selEnd = SendFocused(SCI_GETSELECTIONEND); props.SetInteger("SelectionStartLine", SendFocused(SCI_LINEFROMPOSITION, selStart) + 1); props.SetInteger("SelectionStartColumn", SendFocused(SCI_GETCOLUMN, selStart) + 1); props.SetInteger("SelectionEndLine", SendFocused(SCI_LINEFROMPOSITION, selEnd) + 1); props.SetInteger("SelectionEndColumn", SendFocused(SCI_GETCOLUMN, selEnd) + 1); } void SciTEBase::SelectionIntoFind(bool stripEol /*=true*/) { SString sel = SelectionWord(stripEol); if (sel.length() && !sel.contains('\r') && !sel.contains('\n')) { // The selection does not include a new line, so is likely to be // the expression to search... findWhat = sel; if (unSlash) { char *slashedFind = Slash(findWhat.c_str()); if (slashedFind) { findWhat = slashedFind; delete []slashedFind; } } } // else findWhat remains the same as last time. } SString SciTEBase::EncodeString(const SString &s) { return SString(s); } void SciTEBase::FindMessageBox(const SString &msg) { #if PLAT_GTK || PLAT_FOX WindowMessageBox(wSciTE, msg, MB_OK | MB_ICONWARNING); #endif #if PLAT_WIN WindowMessageBox(wFindReplace, msg, MB_OK | MB_ICONWARNING); #endif } /** * Convert a string into C string literal form using \a, \b, \f, \n, \r, \t, \v, and \ooo. * The return value is a newly allocated character array containing the result. * 4 bytes are allocated for each byte of the input because that is the maximum * expansion needed when all of the input needs to be output using the octal form. * The return value should be deleted with delete[]. */ char *Slash(const char *s) { char *oRet = new char[strlen(s) * 4 + 1]; if (oRet) { char *o = oRet; while (*s) { if (*s == '\a') { *o++ = '\\'; *o++ = 'a'; } else if (*s == '\b') { *o++ = '\\'; *o++ = 'b'; } else if (*s == '\f') { *o++ = '\\'; *o++ = 'f'; } else if (*s == '\n') { *o++ = '\\'; *o++ = 'n'; } else if (*s == '\r') { *o++ = '\\'; *o++ = 'r'; } else if (*s == '\t') { *o++ = '\\'; *o++ = 't'; } else if (*s == '\v') { *o++ = '\\'; *o++ = 'v'; } else if (*s == '\\') { *o++ = '\\'; *o++ = '\\'; } else if (isascii(*s) && (*s < ' ')) { *o++ = '\\'; *o++ = static_cast((*s >> 6) + '0'); *o++ = static_cast((*s >> 3) + '0'); *o++ = static_cast((*s & 0x7) + '0'); } else { *o++ = *s; } s++; } *o = '\0'; } return oRet; } /** * Is the character an octal digit? */ static bool IsOctalDigit(char ch) { return ch >= '0' && ch <= '7'; } /** * If the character is an hexa digit, get its value. */ static int GetHexaDigit(char ch) { if (ch >= '0' && ch <= '9') { return ch - '0'; } if (ch >= 'A' && ch <= 'F') { return ch - 'A' + 10; } if (ch >= 'a' && ch <= 'f') { return ch - 'a' + 10; } return -1; } /** * Convert C style \a, \b, \f, \n, \r, \t, \v, \ooo and \xhh into their indicated characters. */ unsigned int UnSlash(char *s) { char *sStart = s; char *o = s; while (*s) { if (*s == '\\') { s++; if (*s == 'a') { *o = '\a'; } else if (*s == 'b') { *o = '\b'; } else if (*s == 'f') { *o = '\f'; } else if (*s == 'n') { *o = '\n'; } else if (*s == 'r') { *o = '\r'; } else if (*s == 't') { *o = '\t'; } else if (*s == 'v') { *o = '\v'; } else if (IsOctalDigit(*s)) { int val = *s - '0'; if (IsOctalDigit(*(s + 1))) { s++; val *= 8; val += *s - '0'; if (IsOctalDigit(*(s + 1))) { s++; val *= 8; val += *s - '0'; } } *o = static_cast(val); } else if (*s == 'x') { s++; int val = 0; int ghd = GetHexaDigit(*s); if (ghd >= 0) { s++; val = ghd; ghd = GetHexaDigit(*s); if (ghd >= 0) { s++; val *= 16; val += ghd; } } *o = static_cast(val); } else { *o = *s; } } else { *o = *s; } o++; if (*s) { s++; } } *o = '\0'; return o - sStart; } /** * Convert C style \0oo into their indicated characters. * This is used to get control characters into the regular expresion engine. */ unsigned int UnSlashLowOctal(char *s) { char *sStart = s; char *o = s; while (*s) { if ((s[0] == '\\') && (s[1] == '0') && IsOctalDigit(s[2]) && IsOctalDigit(s[3])) { *o = static_cast(8 * (s[2] - '0') + (s[3] - '0')); s += 3; } else { *o = *s; } o++; if (*s) s++; } *o = '\0'; return o - sStart; } static int UnSlashAsNeeded(SString &s, bool escapes, bool regularExpression) { if (escapes) { char *sUnslashed = StringDup(s.c_str(), s.length()); size_t len; if (regularExpression) { // For regular expressions, the only escape sequences allowed start with \0 // Other sequences, like \t, are handled by the RE engine. len = UnSlashLowOctal(sUnslashed); } else { // C style escapes allowed len = UnSlash(sUnslashed); } s = sUnslashed; delete []sUnslashed; return static_cast(len); } else { return s.length(); } } int SciTEBase::MarkAll() { int posCurrent = SendEditor(SCI_GETCURRENTPOS); int marked = 0; int posFirstFound = FindNext(false, false); if (posFirstFound != -1) { int posFound = posFirstFound; do { marked++; int line = SendEditor(SCI_LINEFROMPOSITION, posFound); BookmarkAdd(line); posFound = FindNext(false, false); } while ((posFound != -1) && (posFound != posFirstFound)); } SendEditor(SCI_SETCURRENTPOS, posCurrent); return marked; } int SciTEBase::IncrementSearchMode() { FindIncrement(); return 0; } int SciTEBase::FindInTarget(const char *findWhat, int lenFind, int startPosition, int endPosition) { SendEditor(SCI_SETTARGETSTART, startPosition); SendEditor(SCI_SETTARGETEND, endPosition); int posFind = SendEditorString(SCI_SEARCHINTARGET, lenFind, findWhat); while (findInStyle && posFind != -1 && findStyle != SendEditor(SCI_GETSTYLEAT, posFind)) { if (startPosition < endPosition) { SendEditor(SCI_SETTARGETSTART, posFind+1); SendEditor(SCI_SETTARGETEND, endPosition); } else { SendEditor(SCI_SETTARGETSTART, startPosition); SendEditor(SCI_SETTARGETEND, posFind+1); } posFind = SendEditorString(SCI_SEARCHINTARGET, lenFind, findWhat); } return posFind; } int SciTEBase::FindNext(bool reverseDirection, bool showWarnings) { if (findWhat.length() == 0) { Find(); return -1; } SString findTarget = EncodeString(findWhat); int lenFind = UnSlashAsNeeded(findTarget, unSlash, regExp); if (lenFind == 0) return -1; CharacterRange cr = GetSelection(); int startPosition = cr.cpMax; int endPosition = LengthDocument(); if (reverseDirection) { startPosition = cr.cpMin; endPosition = 0; } int flags = (wholeWord ? SCFIND_WHOLEWORD : 0) | (matchCase ? SCFIND_MATCHCASE : 0) | (regExp ? SCFIND_REGEXP : 0) | (props.GetInt("find.replace.regexp.posix") ? SCFIND_POSIX : 0); SendEditor(SCI_SETSEARCHFLAGS, flags); int posFind = FindInTarget(findTarget.c_str(), lenFind, startPosition, endPosition); if (posFind == -1 && wrapFind) { // Failed to find in indicated direction // so search from the beginning (forward) or from the end (reverse) // unless wrapFind is false if (reverseDirection) { startPosition = LengthDocument(); endPosition = 0; } else { startPosition = 0; endPosition = LengthDocument(); } posFind = FindInTarget(findTarget.c_str(), lenFind, startPosition, endPosition); WarnUser(warnFindWrapped); } if (posFind == -1) { havefound = false; if (showWarnings) { WarnUser(warnNotFound); SString msg = LocaliseMessage("Can not find the string '^0'.", findWhat.c_str()); if (wFindReplace.Created()) { FindMessageBox(msg); } else { WindowMessageBox(wSciTE, msg, MB_OK | MB_ICONWARNING); } } } else { havefound = true; int start = SendEditor(SCI_GETTARGETSTART); int end = SendEditor(SCI_GETTARGETEND); EnsureRangeVisible(start, end); SetSelection(start, end); if (!replacing) { DestroyFindReplace(); } } return posFind; } void SciTEBase::ReplaceOnce() { if (havefound) { SString replaceTarget = EncodeString(replaceWhat); int replaceLen = UnSlashAsNeeded(replaceTarget, unSlash, regExp); CharacterRange cr = GetSelection(); SendEditor(SCI_SETTARGETSTART, cr.cpMin); SendEditor(SCI_SETTARGETEND, cr.cpMax); int lenReplaced = replaceLen; if (regExp) lenReplaced = SendEditorString(SCI_REPLACETARGETRE, replaceLen, replaceTarget.c_str()); else // Allow \0 in replacement SendEditorString(SCI_REPLACETARGET, replaceLen, replaceTarget.c_str()); SetSelection(cr.cpMin + lenReplaced, cr.cpMin); havefound = false; } FindNext(reverseFind); } int SciTEBase::DoReplaceAll(bool inSelection) { SString findTarget = EncodeString(findWhat); int findLen = UnSlashAsNeeded(findTarget, unSlash, regExp); if (findLen == 0) { return -1; } CharacterRange cr = GetSelection(); int startPosition = cr.cpMin; int endPosition = cr.cpMax; int selType = SC_SEL_STREAM; if (inSelection) { if (startPosition == endPosition) { return -2; } selType = SendEditor(SCI_GETSELECTIONMODE); if (selType == SC_SEL_LINES) { // Take care to replace in whole lines int startLine = SendEditor(SCI_LINEFROMPOSITION, startPosition); startPosition = SendEditor(SCI_POSITIONFROMLINE, startLine); int endLine = SendEditor(SCI_LINEFROMPOSITION, endPosition); endPosition = SendEditor(SCI_POSITIONFROMLINE, endLine+1); } } else { endPosition = LengthDocument(); if (wrapFind) { // Whole document startPosition = 0; } // If not wrapFind, replace all only from caret to end of document } SString replaceTarget = EncodeString(replaceWhat); int replaceLen = UnSlashAsNeeded(replaceTarget, unSlash, regExp); int flags = (wholeWord ? SCFIND_WHOLEWORD : 0) | (matchCase ? SCFIND_MATCHCASE : 0) | (regExp ? SCFIND_REGEXP : 0) | (props.GetInt("find.replace.regexp.posix") ? SCFIND_POSIX : 0); SendEditor(SCI_SETSEARCHFLAGS, flags); int posFind = FindInTarget(findTarget.c_str(), findLen, startPosition, endPosition); if ((findLen == 1) && regExp && (findTarget[0] == '^')) { // Special case for replace all start of line so it hits the first line posFind = startPosition; SendEditor(SCI_SETTARGETSTART, startPosition); SendEditor(SCI_SETTARGETEND, startPosition); } if ((posFind != -1) && (posFind <= endPosition)) { int lastMatch = posFind; int replacements = 0; SendEditor(SCI_BEGINUNDOACTION); // Replacement loop while (posFind != -1) { int lenTarget = SendEditor(SCI_GETTARGETEND) - SendEditor(SCI_GETTARGETSTART); if (inSelection && selType == SC_SEL_RECTANGLE) { // We must check that the found target is entirely inside the rectangular selection: // it must fit in one line, and inside the selection bounds of this line. int line = SendEditor(SCI_LINEFROMPOSITION, posFind); int startPos = SendEditor(SCI_GETLINESELSTARTPOSITION, line); int endPos = SendEditor(SCI_GETLINESELENDPOSITION, line); if (startPos == INVALID_POSITION || // No selection on this line (?) posFind < startPos || posFind + lenTarget > endPos) { // Found target is totally or partly outside the rectangular selection lastMatch = posFind + 1; if (lastMatch >= endPosition) { // Run off the end of the document/selection with an empty match posFind = -1; } else { posFind = FindInTarget(findTarget.c_str(), findLen, lastMatch, endPosition); } continue; // No replacement } } int movepastEOL = 0; if (lenTarget <= 0) { char chNext = static_cast(SendEditor(SCI_GETCHARAT, SendEditor(SCI_GETTARGETEND))); if (chNext == '\r' || chNext == '\n') { movepastEOL = 1; } } int lenReplaced = replaceLen; if (regExp) { lenReplaced = SendEditorString(SCI_REPLACETARGETRE, replaceLen, replaceTarget.c_str()); } else { SendEditorString(SCI_REPLACETARGET, replaceLen, replaceTarget.c_str()); } // Modify for change caused by replacement endPosition += lenReplaced - lenTarget; // For the special cases of start of line and end of line // something better could be done but there are too many special cases lastMatch = posFind + lenReplaced + movepastEOL; if (lenTarget == 0) { lastMatch = SendEditor(SCI_POSITIONAFTER, lastMatch); } if (lastMatch >= endPosition) { // Run off the end of the document/selection with an empty match posFind = -1; } else { posFind = FindInTarget(findTarget.c_str(), findLen, lastMatch, endPosition); } replacements++; } if (inSelection) { SetSelection(startPosition, endPosition); } else { SetSelection(lastMatch, lastMatch); } SendEditor(SCI_ENDUNDOACTION); return replacements; } return 0; //Platform::DebugPrintf("ReplaceAll <%s> -> <%s>\n", findWhat, replaceWhat); } int SciTEBase::ReplaceAll(bool inSelection) { int replacements = DoReplaceAll(inSelection); props.SetInteger("Replacements", (replacements > 0 ? replacements : 0)); UpdateStatusBar(false); if (replacements == -1) { SString msg = LocaliseMessage( inSelection ? "Find string must not be empty for 'Replace in Selection' command." : "Find string must not be empty for 'Replace All' command."); FindMessageBox(msg); } else if (replacements == -2) { SString msg = LocaliseMessage( "Selection must not be empty for 'Replace in Selection' command."); FindMessageBox(msg); } else if (replacements == 0) { SString msg = LocaliseMessage( "No replacements because string '^0' was not present.", findWhat.c_str()); FindMessageBox(msg); } return replacements; } int SciTEBase::ReplaceInBuffers() { int currentBuffer = buffers.Current(); int replacements = 0; for (int i = 0; i < buffers.length; i++) { SetDocumentAt(i); replacements += DoReplaceAll(false); if (i == 0 && replacements < 0) { SString msg = LocaliseMessage( "Find string must not be empty for 'Replace in Buffers' command."); FindMessageBox(msg); break; } } SetDocumentAt(currentBuffer); props.SetInteger("Replacements", replacements); UpdateStatusBar(false); if (replacements == 0) { SString msg = LocaliseMessage( "No replacements because string '^0' was not present.", findWhat.c_str()); FindMessageBox(msg); } return replacements; } void SciTEBase::OutputAppendString(const char *s, int len, bool startLine) { if (len == -1) len = static_cast(strlen(s)); int docLength = SendOutput(SCI_GETTEXTLENGTH); if (startLine && docLength > 0) { char lastChar = static_cast(SendOutput(SCI_GETCHARAT, docLength - 1)); if (lastChar != '\n' && lastChar != '\r') { SendOutput(SCI_APPENDTEXT, 1, reinterpret_cast("\n")); } } SendOutput(SCI_APPENDTEXT, len, reinterpret_cast(s)); if (scrollOutput) { int line = SendOutput(SCI_GETLINECOUNT, 0, 0); int lineStart = SendOutput(SCI_POSITIONFROMLINE, line); SendOutput(SCI_GOTOPOS, lineStart); } } void SciTEBase::OutputAppendStringSynchronised(const char *s, int len, bool startLine) { if (len == -1) len = static_cast(strlen(s)); int docLength = SendOutputEx(SCI_GETTEXTLENGTH, 0, 0, false); if (startLine && docLength > 0) { char lastChar = static_cast(SendOutputEx(SCI_GETCHARAT, docLength - 1, 0, false)); if (lastChar != '\n' && lastChar != '\r') { SendOutputEx(SCI_APPENDTEXT, 1, reinterpret_cast("\n"), false); } } SendOutputEx(SCI_APPENDTEXT, len, reinterpret_cast(s), false); if (scrollOutput) { int line = SendOutputEx(SCI_GETLINECOUNT, 0, 0, false); int lineStart = SendOutputEx(SCI_POSITIONFROMLINE, line, 0, false); SendOutputEx(SCI_GOTOPOS, lineStart, 0, false); } } void SciTEBase::MakeOutputVisible() { if (heightOutput < 20) { if (splitVertical) heightOutput = NormaliseSplit(300); else heightOutput = NormaliseSplit(100); SizeSubWindows(); Redraw(); } } void SciTEBase::ClearJobQueue() { for (int ic = 0; ic < commandMax; ic++) { jobQueue[ic].Clear(); } commandCurrent = 0; } void SciTEBase::Execute() { props.Set("CurrentMessage", ""); dirNameForExecute = ""; bool displayParameterDialog = false; int ic; parameterisedCommand = ""; for (ic = 0; ic < commandMax; ic++) { if (jobQueue[ic].command[0] == '*') { displayParameterDialog = true; jobQueue[ic].command.remove(0, 1); parameterisedCommand = jobQueue[ic].command; } if (!(jobQueue[ic].directory == "")) { dirNameForExecute = jobQueue[ic].directory; } } if (displayParameterDialog) { if (!ParametersDialog(true)) { ClearJobQueue(); return; } } else { ParamGrab(); } for (ic = 0; ic < commandMax; ic++) { jobQueue[ic].command = props.Expand(jobQueue[ic].command.c_str()); } if (clearBeforeExecute) { SendOutputEx(SCI_CLEARALL, 0, 0, false); } SendOutput(SCI_MARKERDELETEALL, static_cast(-1)); SendEditor(SCI_MARKERDELETEALL, 0); // Ensure the output pane is visible if (jobUsesOutputPane) { MakeOutputVisible(); } cancelFlag = 0L; executing = true; CheckMenus(); chdir(dirName); dirNameAtExecute = dirName; } void SciTEBase::ToggleOutputVisible() { if (heightOutput > 0) { heightOutput = NormaliseSplit(0); WindowSetFocus(wEditor); } else { if (previousHeightOutput < 20) { if (splitVertical) heightOutput = NormaliseSplit(300); else heightOutput = NormaliseSplit(100); previousHeightOutput = heightOutput; } else { heightOutput = NormaliseSplit(previousHeightOutput); } } SizeSubWindows(); Redraw(); } void SciTEBase::BookmarkAdd(int lineno) { if (lineno == -1) lineno = GetCurrentLineNumber(); if (!BookmarkPresent(lineno)) SendEditor(SCI_MARKERADD, lineno, SciTE_MARKER_BOOKMARK); } void SciTEBase::BookmarkDelete(int lineno) { if (lineno == -1) lineno = GetCurrentLineNumber(); if (BookmarkPresent(lineno)) SendEditor(SCI_MARKERDELETE, lineno, SciTE_MARKER_BOOKMARK); } bool SciTEBase::BookmarkPresent(int lineno) { if (lineno == -1) lineno = GetCurrentLineNumber(); int state = SendEditor(SCI_MARKERGET, lineno); return state & (1 << SciTE_MARKER_BOOKMARK); } void SciTEBase::BookmarkToggle(int lineno) { if (lineno == -1) lineno = GetCurrentLineNumber(); if (BookmarkPresent(lineno)) { BookmarkDelete(lineno); } else { BookmarkAdd(lineno); } } void SciTEBase::BookmarkNext(bool forwardScan, bool select) { int lineno = GetCurrentLineNumber(); int sci_marker = SCI_MARKERNEXT; int lineStart = lineno + 1; //Scan starting from next line int lineRetry = 0; //If not found, try from the beginning int anchor = SendEditor(SCI_GETANCHOR); if (!forwardScan) { lineStart = lineno - 1; //Scan starting from previous line lineRetry = SendEditor(SCI_GETLINECOUNT, 0, 0L); //If not found, try from the end sci_marker = SCI_MARKERPREVIOUS; } int nextLine = SendEditor(sci_marker, lineStart, 1 << SciTE_MARKER_BOOKMARK); if (nextLine < 0) nextLine = SendEditor(sci_marker, lineRetry, 1 << SciTE_MARKER_BOOKMARK); if (nextLine < 0 || nextLine == lineno) // No bookmark (of the given type) or only one, and already on it WarnUser(warnNoOtherBookmark); else { GotoLineEnsureVisible(nextLine); if (select) { SendEditor(SCI_SETANCHOR, anchor); } } } PRectangle SciTEBase::GetClientRectangle() { return wContent.GetClientPosition(); } void SciTEBase::Redraw() { wSciTE.InvalidateAll(); wEditor.InvalidateAll(); wOutput.InvalidateAll(); } void SciTEBase::FillFunctionDefinition(int pos /*= -1*/) { if (pos > 0) { lastPosCallTip = pos; } if (apis) { char *words = apis.GetNearestWords(currentCallTipWord.c_str(), currentCallTipWord.length(), callTipIgnoreCase, calltipParametersStart[0], true); if (!words) return; // Counts how many call tips const char *spacePos = strchr(words, ' '); maxCallTips = 1; while (spacePos) { maxCallTips++; spacePos = strchr(spacePos + 1, ' '); } delete []words; // Should get current api definition const char *word = apis.GetNearestWord(currentCallTipWord.c_str(), currentCallTipWord.length(), callTipIgnoreCase, calltipWordCharacters, currentCallTip); if (word) { functionDefinition = word; if (maxCallTips > 1) { functionDefinition.insert(0, "\001"); } if (calltipEndDefinition != "") { int posEndDef = functionDefinition.search(calltipEndDefinition.c_str()); if (maxCallTips > 1) { if ((posEndDef > 1) && ((posEndDef + calltipEndDefinition.length()) < functionDefinition.length())) { functionDefinition.insert(posEndDef + calltipEndDefinition.length(), "\n\002"); } else { functionDefinition.append("\n\002"); } } else { if ((posEndDef > 1) && ((posEndDef + calltipEndDefinition.length()) < functionDefinition.length())) { functionDefinition.insert(posEndDef + calltipEndDefinition.length(), "\n"); } } } SendEditorString(SCI_CALLTIPSHOW, lastPosCallTip - currentCallTipWord.length(), functionDefinition.c_str()); ContinueCallTip(); } } } bool SciTEBase::StartCallTip() { currentCallTip = 0; currentCallTipWord = ""; SString line = GetLine(); int current = GetCaretInLine(); int pos = SendEditor(SCI_GETCURRENTPOS); int braces; do { braces = 0; while (current > 0 && (braces || !calltipParametersStart.contains(line[current - 1]))) { if (calltipParametersStart.contains(line[current - 1])) braces--; else if (calltipParametersEnd.contains(line[current - 1])) braces++; current--; pos--; } if (current > 0) { current--; pos--; } else break; while (current > 0 && isspacechar(line[current - 1])) { current--; pos--; } } while (current > 0 && !calltipWordCharacters.contains(line[current - 1])); if (current <= 0) return true; startCalltipWord = current - 1; while (startCalltipWord > 0 && calltipWordCharacters.contains(line[startCalltipWord - 1])) { startCalltipWord--; } line.change(current, '\0'); currentCallTipWord = line.c_str() + startCalltipWord; functionDefinition = ""; //Platform::DebugPrintf("word is [%s] %d %d %d\n", currentCallTipWord.c_str(), currentCallTipWord.length(), pos, pos - rootlen); FillFunctionDefinition(pos); return true; } void SciTEBase::ContinueCallTip() { SString line = GetLine(); int current = GetCaretInLine(); int braces = 0; int commas = 0; for (int i = startCalltipWord; i < current; i++) { if (calltipParametersStart.contains(line[i])) braces++; else if (calltipParametersEnd.contains(line[i]) && braces > 0) braces--; else if (braces == 1 && calltipParametersSeparators.contains(line[i])) commas++; } int startHighlight = 0; while (functionDefinition[startHighlight] && !calltipParametersStart.contains(functionDefinition[startHighlight])) startHighlight++; if (calltipParametersStart.contains(functionDefinition[startHighlight])) startHighlight++; while (functionDefinition[startHighlight] && commas > 0) { if (calltipParametersSeparators.contains(functionDefinition[startHighlight])) commas--; // If it reached the end of the argument list it means that the user typed in more // arguments than the ones listed in the calltip if (calltipParametersEnd.contains(functionDefinition[startHighlight])) commas = 0; else startHighlight++; } if (calltipParametersSeparators.contains(functionDefinition[startHighlight])) startHighlight++; int endHighlight = startHighlight; while (functionDefinition[endHighlight] && !calltipParametersSeparators.contains(functionDefinition[endHighlight]) && !calltipParametersEnd.contains(functionDefinition[endHighlight])) endHighlight++; SendEditor(SCI_CALLTIPSETHLT, startHighlight, endHighlight); } void SciTEBase::EliminateDuplicateWords(char *words) { char *firstWord = words; char *firstSpace = strchr(firstWord, ' '); char *secondWord; char *secondSpace; int firstLen, secondLen; while (firstSpace) { firstLen = firstSpace - firstWord; secondWord = firstWord + firstLen + 1; secondSpace = strchr(secondWord, ' '); if (secondSpace) secondLen = secondSpace - secondWord; else secondLen = strlen(secondWord); if (firstLen == secondLen && !strncmp(firstWord, secondWord, firstLen)) { strcpy(firstWord, secondWord); firstSpace = strchr(firstWord, ' '); } else { firstWord = secondWord; firstSpace = secondSpace; } } } bool SciTEBase::StartAutoComplete() { SString line = GetLine(); int current = GetCaretInLine(); int startword = current; while ((startword > 0) && (calltipWordCharacters.contains(line[startword - 1]) || autoCompleteStartCharacters.contains(line[startword - 1]))) { startword--; } SString root = line.substr(startword, current - startword); if (apis) { char *words = apis.GetNearestWords(root.c_str(), root.length(), autoCompleteIgnoreCase, calltipParametersStart[0]); if (words) { EliminateDuplicateWords(words); SendEditorString(SCI_AUTOCSHOW, root.length(), words); delete []words; } } return true; } bool SciTEBase::StartAutoCompleteWord(bool onlyOneWord) { SString line = GetLine(); int current = GetCaretInLine(); //~ if (current >= line.size()) //~ return false; int startword = current; // Autocompletion of pure numbers is mostly an annoyance bool allNumber = true; while (startword > 0 && wordCharacters.contains(line[startword - 1])) { startword--; if (line[startword] < '0' || line[startword] > '9') { allNumber = false; } } if (startword == current || allNumber) return true; SString root = line.substr(startword, current - startword); int doclen = LengthDocument(); TextToFind ft = {{0, 0}, 0, {0, 0}}; ft.lpstrText = const_cast(root.c_str()); ft.chrg.cpMin = 0; ft.chrgText.cpMin = 0; ft.chrgText.cpMax = 0; int flags = SCFIND_WORDSTART | (autoCompleteIgnoreCase ? 0 : SCFIND_MATCHCASE); int posCurrentWord = SendEditor(SCI_GETCURRENTPOS) - root.length(); unsigned int minWordLength = 0; unsigned int nwords = 0; // wordsNear contains a list of words separated by single spaces and with a space // at the start and end. This makes it easy to search for words. SString wordsNear; wordsNear.setsizegrowth(1000); wordsNear += " "; for (;;) { // search all the document ft.chrg.cpMax = doclen; int posFind = SendEditorString(SCI_FINDTEXT, flags, reinterpret_cast(&ft)); if (posFind == -1 || posFind >= doclen) break; if (posFind == posCurrentWord) { ft.chrg.cpMin = posFind + root.length(); continue; } // Grab the word and put spaces around it const unsigned int wordMaxSize = 800; char wordstart[wordMaxSize]; wordstart[0] = ' '; GetRange(wEditor, posFind, Platform::Minimum(posFind + wordMaxSize - 3, doclen), wordstart + 1); char *wordend = wordstart + 1 + root.length(); while (iswordcharforsel(*wordend)) wordend++; *wordend++ = ' '; *wordend = '\0'; unsigned int wordlen = wordend - wordstart - 2; if (wordlen > root.length()) { if (!wordsNear.contains(wordstart)) { // add a new entry wordsNear += wordstart + 1; if (minWordLength < wordlen) minWordLength = wordlen; nwords++; if (onlyOneWord && nwords > 1) { return true; } } } ft.chrg.cpMin = posFind + wordlen; } size_t length = wordsNear.length(); if ((length > 2) && (!onlyOneWord || (minWordLength > root.length()))) { WordList wl; wl.Set(wordsNear.c_str()); char *words = wl.GetNearestWords("", 0, autoCompleteIgnoreCase); SendEditorString(SCI_AUTOCSHOW, root.length(), words); delete []words; } else { SendEditor(SCI_AUTOCCANCEL); } return true; } bool SciTEBase::StartInsertAbbreviation() { if (!AbbrevDialog()) { return true; } SString data = propsAbbrev.Get(abbrevInsert); size_t dataLength = data.length(); if (dataLength == 0) { return true; // returning if expanded abbreviation is empty } char *expbuf = new char[dataLength + 1]; strcpy(expbuf, data.c_str()); UnSlash(expbuf); size_t expbuflen = strlen(expbuf); int caret_pos = SendEditor(SCI_GETSELECTIONSTART); int sel_start = caret_pos; int sel_length = SendEditor(SCI_GETSELECTIONEND) - sel_start; bool at_start = true; bool double_pipe = false; size_t last_pipe = expbuflen; int currentLineNumber = SendEditor(SCI_LINEFROMPOSITION, caret_pos); int indent = 0; int indentSize = SendEditor(SCI_GETINDENT); int indentChars = (SendEditor(SCI_GETUSETABS) && SendEditor(SCI_GETTABWIDTH) ? SendEditor(SCI_GETTABWIDTH) : 1); int indentExtra = 0; bool isIndent = true; int eolMode = SendEditor(SCI_GETEOLMODE); if (props.GetInt("indent.automatic")) { indent = GetLineIndentation(currentLineNumber); } size_t i; // find last |, can't be strrchr(exbuf, '|') because of || for (i = expbuflen; i--; ) { if (expbuf[i] == '|' && (i == 0 || expbuf[i-1] != '|')) { last_pipe = i; break; } } SendEditor(SCI_BEGINUNDOACTION); // add the abbreviation one character at a time for (i = 0; i < expbuflen; i++) { char c = expbuf[i]; SString abbrevText(""); if (isIndent && c == '\t') { if (props.GetInt("indent.automatic")) { indentExtra++; SetLineIndentation(currentLineNumber, indent + indentSize * indentExtra); caret_pos += indentSize / indentChars; } } else { switch (c) { case '|': // user may want to insert '|' instead of caret if (i < (dataLength - 1) && expbuf[i + 1] == '|') { // put '|' into the line abbrevText += c; i++; } else if (i != last_pipe) { double_pipe = true; } else { // indent on multiple lines int j = currentLineNumber + 1; // first line indented as others currentLineNumber = SendEditor(SCI_LINEFROMPOSITION, caret_pos + sel_length); for (; j <= currentLineNumber; j++) { SetLineIndentation(j, GetLineIndentation(j) + indentSize * indentExtra); caret_pos += indentExtra * indentSize / indentChars; } at_start = false; caret_pos += sel_length; } break; case '\r': // backward compatibility break; case '\n': if (eolMode == SC_EOL_CRLF || eolMode == SC_EOL_CR) { abbrevText += '\r'; } if (eolMode == SC_EOL_CRLF || eolMode == SC_EOL_LF) { abbrevText += '\n'; } break; default: abbrevText += c; break; } if (caret_pos > SendEditor(SCI_GETLENGTH)) { caret_pos = SendEditor(SCI_GETLENGTH); } SendEditorString(SCI_INSERTTEXT, caret_pos, abbrevText.c_str()); if (!double_pipe && at_start) { sel_start += static_cast(abbrevText.length()); } caret_pos += static_cast(abbrevText.length()); if (c == '\n') { isIndent = true; indentExtra = 0; currentLineNumber++; SetLineIndentation(currentLineNumber, indent); caret_pos += indent / indentChars; if (!double_pipe && at_start) { sel_start += indent / indentChars; } } else { isIndent = false; } } } // set the caret to the desired position if (double_pipe) { sel_length = 0; } else if (!at_start && sel_length == 0) { sel_start += static_cast(expbuflen); } SendEditor(SCI_SETSEL, sel_start, sel_start + sel_length); SendEditor(SCI_ENDUNDOACTION); delete []expbuf; return true; } bool SciTEBase::StartExpandAbbreviation() { int currentPos = GetCaretInLine(); int position = SendEditor(SCI_GETCURRENTPOS); // from the beginning char *linebuf = new char[currentPos + 2]; GetLine(linebuf, currentPos + 2); // Just get text to the left of the caret linebuf[currentPos] = '\0'; int abbrevPos = (currentPos > 32 ? currentPos - 32 : 0); const char *abbrev = linebuf + abbrevPos; SString data; size_t dataLength = 0; int abbrevLength = currentPos - abbrevPos; // Try each potential abbreviation from the first letter on a line // and expanding to the right. // We arbitrarily limits the length of an abbreviation (seems a reasonable value..), // and of course stop on the caret. while (abbrevLength > 0) { data = propsAbbrev.Get(abbrev); dataLength = data.length(); if (dataLength > 0) { break; /* Found */ } abbrev++; // One more letter to the right abbrevLength--; } if (dataLength == 0) { WarnUser(warnNotFound); // No need for a special warning return true; // returning if expanded abbreviation is empty } char *expbuf = new char[dataLength + 1]; strcpy(expbuf, data.c_str()); UnSlash(expbuf); size_t expbuflen = strlen(expbuf); int caret_pos = -1; // caret position int currentLineNumber = GetCurrentLineNumber(); int indent = 0; int indentExtra = 0; bool isIndent = true; int eolMode = SendEditor(SCI_GETEOLMODE); if (props.GetInt("indent.automatic")) { indent = GetLineIndentation(currentLineNumber); } SendEditor(SCI_BEGINUNDOACTION); SendEditor(SCI_SETSEL, position - abbrevLength, position); // add the abbreviation one character at a time for (size_t i = 0; i < expbuflen; i++) { char c = expbuf[i]; SString abbrevText(""); if (isIndent && c == '\t') { indentExtra++; SetLineIndentation(currentLineNumber, indent + SendEditor(SCI_GETINDENT) * indentExtra); } else { switch (c) { case '|': // user may want to insert '|' instead of caret if (i < (dataLength - 1) && expbuf[i + 1] == '|') { // put '|' into the line abbrevText += c; i++; } else if (caret_pos == -1) { if (i == 0) { // when caret is set at the first place in abbreviation caret_pos = SendEditor(SCI_GETCURRENTPOS) - abbrevLength; } else { caret_pos = SendEditor(SCI_GETCURRENTPOS); } } break; case '\n': if (eolMode == SC_EOL_CRLF || eolMode == SC_EOL_CR) { abbrevText += '\r'; } if (eolMode == SC_EOL_CRLF || eolMode == SC_EOL_LF) { abbrevText += '\n'; } break; default: abbrevText += c; break; } SendEditorString(SCI_REPLACESEL, 0, abbrevText.c_str()); if (c == '\n') { isIndent = true; indentExtra = 0; currentLineNumber++; SetLineIndentation(currentLineNumber, indent); } else { isIndent = false; } } } // set the caret to the desired position if (caret_pos != -1) { SendEditor(SCI_GOTOPOS, caret_pos); } SendEditor(SCI_ENDUNDOACTION); delete []expbuf; delete []linebuf; return true; } bool SciTEBase::StartBlockComment() { SString fileNameForExtension = ExtensionFileName(); SString language = props.GetNewExpand("lexer.", fileNameForExtension.c_str()); SString base("comment.block."); SString comment_at_line_start("comment.block.at.line.start."); base += language; comment_at_line_start += language; SString comment = props.Get(base.c_str()); if (comment == "") { // user friendly error message box SString error = LocaliseMessage( "Block comment variable '^0' is not defined in SciTE *.properties!", base.c_str()); WindowMessageBox(wSciTE, error, MB_OK | MB_ICONWARNING); return true; } comment += " "; SString long_comment = comment; char linebuf[1000]; size_t comment_length = comment.length(); size_t selectionStart = SendEditor(SCI_GETSELECTIONSTART); size_t selectionEnd = SendEditor(SCI_GETSELECTIONEND); size_t caretPosition = SendEditor(SCI_GETCURRENTPOS); // checking if caret is located in _beginning_ of selected block bool move_caret = caretPosition < selectionEnd; int selStartLine = SendEditor(SCI_LINEFROMPOSITION, selectionStart); int selEndLine = SendEditor(SCI_LINEFROMPOSITION, selectionEnd); int lines = selEndLine - selStartLine; size_t firstSelLineStart = SendEditor(SCI_POSITIONFROMLINE, selStartLine); // "caret return" is part of the last selected line if ((lines > 0) && (selectionEnd == static_cast(SendEditor(SCI_POSITIONFROMLINE, selEndLine)))) selEndLine--; SendEditor(SCI_BEGINUNDOACTION); for (int i = selStartLine; i <= selEndLine; i++) { int lineStart = SendEditor(SCI_POSITIONFROMLINE, i); int lineIndent = lineStart; int lineEnd = SendEditor(SCI_GETLINEENDPOSITION, i); if ((lineEnd - lineIndent) >= static_cast(sizeof(linebuf))) // Avoid buffer size problems continue; if (props.GetInt(comment_at_line_start.c_str())) { GetRange(wEditor, lineIndent, lineEnd, linebuf); } else { lineIndent = GetLineIndentPosition(i); GetRange(wEditor, lineIndent, lineEnd, linebuf); } // empty lines are not commented if (strlen(linebuf) < 1) continue; if (memcmp(linebuf, comment.c_str(), comment_length - 1) == 0) { if (memcmp(linebuf, long_comment.c_str(), comment_length) == 0) { // removing comment with space after it SendEditor(SCI_SETSEL, lineIndent, lineIndent + comment_length); SendEditorString(SCI_REPLACESEL, 0, ""); if (i == selStartLine) // is this the first selected line? selectionStart -= comment_length; selectionEnd -= comment_length; // every iteration continue; } else { // removing comment _without_ space SendEditor(SCI_SETSEL, lineIndent, lineIndent + comment_length - 1); SendEditorString(SCI_REPLACESEL, 0, ""); if (i == selStartLine) // is this the first selected line? selectionStart -= (comment_length - 1); selectionEnd -= (comment_length - 1); // every iteration continue; } } if (i == selStartLine) // is this the first selected line? selectionStart += comment_length; selectionEnd += comment_length; // every iteration SendEditorString(SCI_INSERTTEXT, lineIndent, long_comment.c_str()); } // after uncommenting selection may promote itself to the lines // before the first initially selected line; // another problem - if only comment symbol was selected; if (selectionStart < firstSelLineStart) { if (selectionStart >= selectionEnd - (comment_length - 1)) selectionEnd = firstSelLineStart; selectionStart = firstSelLineStart; } if (move_caret) { // moving caret to the beginning of selected block SendEditor(SCI_GOTOPOS, selectionEnd); SendEditor(SCI_SETCURRENTPOS, selectionStart); } else { SendEditor(SCI_SETSEL, selectionStart, selectionEnd); } SendEditor(SCI_ENDUNDOACTION); return true; } bool SciTEBase::StartBoxComment() { // Get start/middle/end comment strings from options file(s) SString fileNameForExtension = ExtensionFileName(); SString language = props.GetNewExpand("lexer.", fileNameForExtension.c_str()); SString start_base("comment.box.start."); SString middle_base("comment.box.middle."); SString end_base("comment.box.end."); SString white_space(" "); start_base += language; middle_base += language; end_base += language; SString start_comment = props.Get(start_base.c_str()); SString middle_comment = props.Get(middle_base.c_str()); SString end_comment = props.Get(end_base.c_str()); if (start_comment == "" || middle_comment == "" || end_comment == "") { SString error = LocaliseMessage( "Box comment variables '^0', '^1' and '^2' are not defined in SciTE *.properties!", start_base.c_str(), middle_base.c_str(), end_base.c_str()); WindowMessageBox(wSciTE, error, MB_OK | MB_ICONWARNING); return true; } // Note selection and cursor location so that we can reselect text and reposition cursor after we insert comment strings size_t selectionStart = SendEditor(SCI_GETSELECTIONSTART); size_t selectionEnd = SendEditor(SCI_GETSELECTIONEND); size_t caretPosition = SendEditor(SCI_GETCURRENTPOS); bool move_caret = caretPosition < selectionEnd; size_t selStartLine = SendEditor(SCI_LINEFROMPOSITION, selectionStart); size_t selEndLine = SendEditor(SCI_LINEFROMPOSITION, selectionEnd); size_t lines = selEndLine - selStartLine + 1; // If selection ends at start of last selected line, fake it so that selection goes to end of second-last selected line if (lines > 1 && selectionEnd == static_cast(SendEditor(SCI_POSITIONFROMLINE, selEndLine))) { selEndLine--; lines--; selectionEnd = SendEditor(SCI_GETLINEENDPOSITION, selEndLine); } // Pad comment strings with appropriate whitespace, then figure out their lengths (end_comment is a bit special-- see below) start_comment += white_space; middle_comment += white_space; size_t start_comment_length = start_comment.length(); size_t middle_comment_length = middle_comment.length(); size_t end_comment_length = end_comment.length(); size_t whitespace_length = white_space.length(); // Calculate the length of the longest comment string to be inserted, and allocate a null-terminated char buffer of equal size size_t maxCommentLength = start_comment_length; if (middle_comment_length > maxCommentLength) maxCommentLength = middle_comment_length; if (end_comment_length + whitespace_length > maxCommentLength) maxCommentLength = end_comment_length + whitespace_length; char *tempString = new char[maxCommentLength + 1]; SendEditor(SCI_BEGINUNDOACTION); // Insert start_comment if needed int lineStart = SendEditor(SCI_POSITIONFROMLINE, selStartLine); GetRange(wEditor, lineStart, lineStart + start_comment_length, tempString); tempString[start_comment_length] = '\0'; if (start_comment != tempString) { SendEditorString(SCI_INSERTTEXT, lineStart, start_comment.c_str()); selectionStart += start_comment_length; selectionEnd += start_comment_length; } if (lines <= 1) { // Only a single line was selected, so just append whitespace + end-comment at end of line if needed int lineEnd = SendEditor(SCI_GETLINEENDPOSITION, selEndLine); GetRange(wEditor, lineEnd - end_comment_length, lineEnd, tempString); tempString[end_comment_length] = '\0'; if (end_comment != tempString) { end_comment.insert(0, white_space.c_str()); SendEditorString(SCI_INSERTTEXT, lineEnd, end_comment.c_str()); } } else { // More than one line selected, so insert middle_comments where needed for (size_t i = selStartLine + 1; i < selEndLine; i++) { lineStart = SendEditor(SCI_POSITIONFROMLINE, i); GetRange(wEditor, lineStart, lineStart + middle_comment_length, tempString); tempString[middle_comment_length] = '\0'; if (middle_comment != tempString) { SendEditorString(SCI_INSERTTEXT, lineStart, middle_comment.c_str()); selectionEnd += middle_comment_length; } } // If last selected line is not middle-comment or end-comment, we need to insert // a middle-comment at the start of last selected line and possibly still insert // and end-comment tag after the last line (extra logic is necessary to // deal with the case that user selected the end-comment tag) lineStart = SendEditor(SCI_POSITIONFROMLINE, selEndLine); GetRange(wEditor, lineStart, lineStart + end_comment_length, tempString); tempString[end_comment_length] = '\0'; if (end_comment != tempString) { GetRange(wEditor, lineStart, lineStart + middle_comment_length, tempString); tempString[middle_comment_length] = '\0'; if (middle_comment != tempString) { SendEditorString(SCI_INSERTTEXT, lineStart, middle_comment.c_str()); selectionEnd += middle_comment_length; } // And since we didn't find the end-comment string yet, we need to check the *next* line // to see if it's necessary to insert an end-comment string and a linefeed there.... lineStart = SendEditor(SCI_POSITIONFROMLINE, selEndLine + 1); GetRange(wEditor, lineStart, lineStart + (int) end_comment_length, tempString); tempString[end_comment_length] = '\0'; if (end_comment != tempString) { end_comment.append("\n"); SendEditorString(SCI_INSERTTEXT, lineStart, end_comment.c_str()); } } } if (move_caret) { // moving caret to the beginning of selected block SendEditor(SCI_GOTOPOS, selectionEnd); SendEditor(SCI_SETCURRENTPOS, selectionStart); } else { SendEditor(SCI_SETSEL, selectionStart, selectionEnd); } SendEditor(SCI_ENDUNDOACTION); delete[] tempString; return true; } bool SciTEBase::StartStreamComment() { SString fileNameForExtension = ExtensionFileName(); SString language = props.GetNewExpand("lexer.", fileNameForExtension.c_str()); SString start_base("comment.stream.start."); SString end_base("comment.stream.end."); SString white_space(" "); start_base += language; end_base += language; SString start_comment = props.Get(start_base.c_str()); SString end_comment = props.Get(end_base.c_str()); if (start_comment == "" || end_comment == "") { SString error = LocaliseMessage( "Stream comment variables '^0' and '^1' are not defined in SciTE *.properties!", start_base.c_str(), end_base.c_str()); WindowMessageBox(wSciTE, error, MB_OK | MB_ICONWARNING); return true; } start_comment += white_space; white_space += end_comment; end_comment = white_space; size_t start_comment_length = start_comment.length(); size_t selectionStart = SendEditor(SCI_GETSELECTIONSTART); size_t selectionEnd = SendEditor(SCI_GETSELECTIONEND); size_t caretPosition = SendEditor(SCI_GETCURRENTPOS); // checking if caret is located in _beginning_ of selected block bool move_caret = caretPosition < selectionEnd; // if there is no selection? if (selectionEnd - selectionStart <= 0) { int selLine = SendEditor(SCI_LINEFROMPOSITION, selectionStart); int lineIndent = GetLineIndentPosition(selLine); int lineEnd = SendEditor(SCI_GETLINEENDPOSITION, selLine); if (RangeIsAllWhitespace(lineIndent, lineEnd)) return true; // we are not dealing with empty lines char linebuf[1000]; GetLine(linebuf, sizeof(linebuf)); int current = GetCaretInLine(); // checking if we are not inside a word if (!wordCharacters.contains(linebuf[current])) return true; // caret is located _between_ words int startword = current; int endword = current; int start_counter = 0; int end_counter = 0; while (startword > 0 && wordCharacters.contains(linebuf[startword - 1])) { start_counter++; startword--; } // checking _beginning_ of the word if (startword == current) return true; // caret is located _before_ a word while (linebuf[endword + 1] != '\0' && wordCharacters.contains(linebuf[endword + 1])) { end_counter++; endword++; } selectionStart -= start_counter; selectionEnd += (end_counter + 1); } SendEditor(SCI_BEGINUNDOACTION); SendEditorString(SCI_INSERTTEXT, selectionStart, start_comment.c_str()); selectionEnd += start_comment_length; selectionStart += start_comment_length; SendEditorString(SCI_INSERTTEXT, selectionEnd, end_comment.c_str()); if (move_caret) { // moving caret to the beginning of selected block SendEditor(SCI_GOTOPOS, selectionEnd); SendEditor(SCI_SETCURRENTPOS, selectionStart); } else { SendEditor(SCI_SETSEL, selectionStart, selectionEnd); } SendEditor(SCI_ENDUNDOACTION); return true; } /** * Return the length of the given line, not counting the EOL. */ int SciTEBase::GetLineLength(int line) { return SendEditor(SCI_GETLINEENDPOSITION, line) - SendEditor(SCI_POSITIONFROMLINE, line); } int SciTEBase::GetCurrentLineNumber() { return SendEditor(SCI_LINEFROMPOSITION, SendEditor(SCI_GETCURRENTPOS)); } int SciTEBase::GetCurrentScrollPosition() { int lineDisplayTop = SendEditor(SCI_GETFIRSTVISIBLELINE); return SendEditor(SCI_DOCLINEFROMVISIBLE, lineDisplayTop); } /** * Set up properties for ReadOnly, EOLMode, BufferLength, NbOfLines, SelLength, SelHeight. */ void SciTEBase::SetTextProperties( PropSetFile &ps) { ///< Property set to update. const int TEMP_LEN = 100; char temp[TEMP_LEN]; SString ro = LocaliseString("READ"); ps.Set("ReadOnly", isReadOnly ? ro.c_str() : ""); int eolMode = SendEditor(SCI_GETEOLMODE); ps.Set("EOLMode", eolMode == SC_EOL_CRLF ? "CR+LF" : (eolMode == SC_EOL_LF ? "LF" : "CR")); sprintf(temp, "%d", LengthDocument()); ps.Set("BufferLength", temp); ps.SetInteger("NbOfLines", SendEditor(SCI_GETLINECOUNT)); CharacterRange crange = GetSelection(); sprintf(temp, "%ld", crange.cpMax - crange.cpMin); ps.Set("SelLength", temp); int selFirstLine = SendEditor(SCI_LINEFROMPOSITION, crange.cpMin); int selLastLine = SendEditor(SCI_LINEFROMPOSITION, crange.cpMax); int caretPos = SendEditor(SCI_GETCURRENTPOS); int selAnchor = SendEditor(SCI_GETANCHOR); if (0 == (crange.cpMax - crange.cpMin)) { sprintf(temp, "%d", 0); } else if (selLastLine == selFirstLine) { sprintf(temp, "%d", 1); } else if ((SendEditor(SCI_GETCOLUMN, caretPos) == 0 && (selAnchor <= caretPos)) || ((SendEditor( SCI_GETCOLUMN, selAnchor) == 0) && (selAnchor > caretPos ))) { sprintf(temp, "%d", selLastLine - selFirstLine); } else { sprintf(temp, "%d", selLastLine - selFirstLine + 1); } ps.Set("SelHeight", temp); } void SciTEBase::UpdateStatusBar(bool bUpdateSlowData) { if (sbVisible) { if (bUpdateSlowData) { SetFileProperties(propsStatus); } SetTextProperties(propsStatus); int caretPos = SendEditor(SCI_GETCURRENTPOS); propsStatus.SetInteger("LineNumber", SendEditor(SCI_LINEFROMPOSITION, caretPos) + 1); propsStatus.SetInteger("ColumnNumber", SendEditor(SCI_GETCOLUMN, caretPos) + 1); propsStatus.Set("OverType", SendEditor(SCI_GETOVERTYPE) ? "OVR" : "INS"); char sbKey[32]; sprintf(sbKey, "statusbar.text.%d", sbNum); SString msg = propsStatus.GetExpanded(sbKey); if (msg.size() && sbValue != msg) { // To avoid flickering, update only if needed SetStatusBarText(msg.c_str()); sbValue = msg; } } else { sbValue = ""; } } void SciTEBase::SetLineIndentation(int line, int indent) { if (indent < 0) return; CharacterRange crange = GetSelection(); int posBefore = GetLineIndentPosition(line); SendEditor(SCI_SETLINEINDENTATION, line, indent); int posAfter = GetLineIndentPosition(line); int posDifference = posAfter - posBefore; if (posAfter > posBefore) { // Move selection on if (crange.cpMin >= posBefore) { crange.cpMin += posDifference; } if (crange.cpMax >= posBefore) { crange.cpMax += posDifference; } } else if (posAfter < posBefore) { // Move selection back if (crange.cpMin >= posAfter) { if (crange.cpMin >= posBefore) crange.cpMin += posDifference; else crange.cpMin = posAfter; } if (crange.cpMax >= posAfter) { if (crange.cpMax >= posBefore) crange.cpMax += posDifference; else crange.cpMax = posAfter; } } SetSelection(crange.cpMin, crange.cpMax); } int SciTEBase::GetLineIndentation(int line) { return SendEditor(SCI_GETLINEINDENTATION, line); } int SciTEBase::GetLineIndentPosition(int line) { return SendEditor(SCI_GETLINEINDENTPOSITION, line); } bool SciTEBase::RangeIsAllWhitespace(int start, int end) { WindowAccessor acc(wEditor.GetID(), props); for (int i = start;i < end;i++) { if ((acc[i] != ' ') && (acc[i] != '\t')) return false; } return true; } unsigned int SciTEBase::GetLinePartsInStyle(int line, int style1, int style2, SString sv[], int len) { for (int i = 0; i < len; i++) sv[i] = ""; WindowAccessor acc(wEditor.GetID(), props); SString s; int part = 0; int thisLineStart = SendEditor(SCI_POSITIONFROMLINE, line); int nextLineStart = SendEditor(SCI_POSITIONFROMLINE, line + 1); for (int pos = thisLineStart; pos < nextLineStart; pos++) { if ((acc.StyleAt(pos) == style1) || (acc.StyleAt(pos) == style2)) { char c[2]; c[0] = acc[pos]; c[1] = '\0'; s += c; } else if (s.length() > 0) { if (part < len) { sv[part++] = s; } s = ""; } } if ((s.length() > 0) && (part < len)) { sv[part++] = s; } return part; } static bool includes(const StyleAndWords &symbols, const SString value) { if (symbols.words.length() == 0) { return false; } else if (IsAlphabetic(symbols.words[0])) { // Set of symbols separated by spaces size_t lenVal = value.length(); const char *symbol = symbols.words.c_str(); while (symbol) { const char *symbolEnd = strchr(symbol, ' '); size_t lenSymbol = strlen(symbol); if (symbolEnd) lenSymbol = symbolEnd - symbol; if (lenSymbol == lenVal) { if (strncmp(symbol, value.c_str(), lenSymbol) == 0) { return true; } } symbol = symbolEnd; if (symbol) symbol++; } } else { // Set of individual characters. Only one character allowed for now char ch = symbols.words[0]; return strchr(value.c_str(), ch) != 0; } return false; } #define ELEMENTS(a) (sizeof(a) / sizeof(a[0])) IndentationStatus SciTEBase::GetIndentState(int line) { // C like language indentation defined by braces and keywords IndentationStatus indentState = isNone; SString controlWords[20]; unsigned int parts = GetLinePartsInStyle(line, statementIndent.styleNumber, -1, controlWords, ELEMENTS(controlWords)); for (unsigned int i = 0; i < parts; i++) { if (includes(statementIndent, controlWords[i])) indentState = isKeyWordStart; } // Braces override keywords SString controlStrings[20]; parts = GetLinePartsInStyle(line, blockEnd.styleNumber, -1, controlStrings, ELEMENTS(controlStrings)); for (unsigned int j = 0; j < parts; j++) { if (includes(blockEnd, controlStrings[j])) indentState = isBlockEnd; if (includes(blockStart, controlStrings[j])) indentState = isBlockStart; } return indentState; } int SciTEBase::IndentOfBlock(int line) { if (line < 0) return 0; int indentSize = SendEditor(SCI_GETINDENT); int indentBlock = GetLineIndentation(line); int backLine = line; IndentationStatus indentState = isNone; if (statementIndent.IsEmpty() && blockStart.IsEmpty() && blockEnd.IsEmpty()) indentState = isBlockStart; // Don't bother searching backwards int lineLimit = line - statementLookback; if (lineLimit < 0) lineLimit = 0; while ((backLine >= lineLimit) && (indentState == 0)) { indentState = GetIndentState(backLine); if (indentState != 0) { indentBlock = GetLineIndentation(backLine); if (indentState == isBlockStart) { if (!indentOpening) indentBlock += indentSize; } if (indentState == isBlockEnd) { if (indentClosing) indentBlock -= indentSize; if (indentBlock < 0) indentBlock = 0; } if ((indentState == isKeyWordStart) && (backLine == line)) indentBlock += indentSize; } backLine--; } return indentBlock; } void SciTEBase::MaintainIndentation(char ch) { int eolMode = SendEditor(SCI_GETEOLMODE); int curLine = GetCurrentLineNumber(); int lastLine = curLine - 1; int indentAmount = 0; if (((eolMode == SC_EOL_CRLF || eolMode == SC_EOL_LF) && ch == '\n') || (eolMode == SC_EOL_CR && ch == '\r')) { if (props.GetInt("indent.automatic")) { while (lastLine >= 0 && GetLineLength(lastLine) == 0) lastLine--; } if (lastLine >= 0) { indentAmount = GetLineIndentation(lastLine); } if (indentAmount > 0) { SetLineIndentation(curLine, indentAmount); } } } void SciTEBase::AutomaticIndentation(char ch) { CharacterRange crange = GetSelection(); int selStart = crange.cpMin; int curLine = GetCurrentLineNumber(); int thisLineStart = SendEditor(SCI_POSITIONFROMLINE, curLine); int indentSize = SendEditor(SCI_GETINDENT); int indentBlock = IndentOfBlock(curLine - 1); if (blockEnd.IsSingleChar() && ch == blockEnd.words[0]) { // Dedent maybe if (!indentClosing) { if (RangeIsAllWhitespace(thisLineStart, selStart - 1)) { SetLineIndentation(curLine, indentBlock - indentSize); } } } else if (!blockEnd.IsSingleChar() && (ch == ' ')) { // Dedent maybe if (!indentClosing && (GetIndentState(curLine) == isBlockEnd)) {} } else if (blockStart.IsSingleChar() && (ch == blockStart.words[0])) { // Dedent maybe if first on line and previous line was starting keyword if (!indentOpening && (GetIndentState(curLine - 1) == isKeyWordStart)) { if (RangeIsAllWhitespace(thisLineStart, selStart - 1)) { SetLineIndentation(curLine, indentBlock - indentSize); } } } else if ((ch == '\r' || ch == '\n') && (selStart == thisLineStart)) { if (!indentClosing && !blockEnd.IsSingleChar()) { // Dedent previous line maybe SString controlWords[1]; if (GetLinePartsInStyle(curLine - 1, blockEnd.styleNumber, -1, controlWords, ELEMENTS(controlWords))) { if (includes(blockEnd, controlWords[0])) { // Check if first keyword on line is an ender SetLineIndentation(curLine - 1, IndentOfBlock(curLine - 2) - indentSize); // Recalculate as may have changed previous line indentBlock = IndentOfBlock(curLine - 1); } } } SetLineIndentation(curLine, indentBlock); } } /** * Upon a character being added, SciTE may decide to perform some action * such as displaying a completion list or auto-indentation. */ void SciTEBase::CharAdded(char ch) { if (recording) return; CharacterRange crange = GetSelection(); int selStart = crange.cpMin; int selEnd = crange.cpMax; if ((selEnd == selStart) && (selStart > 0)) { int style = SendEditor(SCI_GETSTYLEAT, selStart - 1, 0); //Platform::DebugPrintf("Char added %d style = %d %d\n", ch, style, braceCount); if (style != 1) { if (SendEditor(SCI_CALLTIPACTIVE)) { if (calltipParametersEnd.contains(ch)) { braceCount--; if (braceCount < 1) SendEditor(SCI_CALLTIPCANCEL); else StartCallTip(); } else if (calltipParametersStart.contains(ch)) { braceCount++; StartCallTip(); } else { ContinueCallTip(); } } else if (SendEditor(SCI_AUTOCACTIVE)) { if (calltipParametersStart.contains(ch)) { braceCount++; StartCallTip(); } else if (calltipParametersEnd.contains(ch)) { braceCount--; } else if (!wordCharacters.contains(ch)) { SendEditor(SCI_AUTOCCANCEL); if (autoCompleteStartCharacters.contains(ch)) { StartAutoComplete(); } } else if (autoCCausedByOnlyOne) { StartAutoCompleteWord(true); } } else if (HandleXml(ch)) { // Handled in the routine } else { if (calltipParametersStart.contains(ch)) { braceCount = 1; StartCallTip(); } else { autoCCausedByOnlyOne = false; if (indentMaintain) MaintainIndentation(ch); else if (props.GetInt("indent.automatic")) AutomaticIndentation(ch); if (autoCompleteStartCharacters.contains(ch)) { StartAutoComplete(); } else if (props.GetInt("autocompleteword.automatic") && wordCharacters.contains(ch)) { StartAutoCompleteWord(true); autoCCausedByOnlyOne = SendEditor(SCI_AUTOCACTIVE); } } } } } } /** * This routine will auto complete XML or HTML tags that are still open by closing them * @parm ch The characer we are dealing with, currently only works with the '>' character * @return True if handled, false otherwise */ bool SciTEBase::HandleXml(char ch) { // We're looking for this char // Quit quickly if not found if (ch != '>') { return false; } // This may make sense only in certain languages if (lexLanguage != SCLEX_HTML && lexLanguage != SCLEX_XML && lexLanguage != SCLEX_ASP && lexLanguage != SCLEX_PHP) { return false; } // If the user has turned us off, quit now. // Default is off SString value = props.GetExpanded("xml.auto.close.tags"); if ((value.length() == 0) || (value == "0")) { return false; } // Grab the last 512 characters or so int nCaret = SendEditor(SCI_GETCURRENTPOS); char sel[512]; int nMin = nCaret - (sizeof(sel) - 1); if (nMin < 0) { nMin = 0; } if (nCaret - nMin < 3) { return false; // Smallest tag is 3 characters ex.

} GetRange(wEditor, nMin, nCaret, sel); sel[sizeof(sel) - 1] = '\0'; if (sel[nCaret - nMin - 2] == '/') { // User typed something like "
" return false; } SString strFound = FindOpenXmlTag(sel, nCaret - nMin); if (strFound.length() > 0) { SendEditor(SCI_BEGINUNDOACTION); SString toInsert = ""; SendEditorString(SCI_REPLACESEL, 0, toInsert.c_str()); SetSelection(nCaret, nCaret); SendEditor(SCI_ENDUNDOACTION); return true; } return false; } /** Search backward through nSize bytes looking for a '<', then return the tag if any * @return The tag name */ SString SciTEBase::FindOpenXmlTag(const char sel[], int nSize) { SString strRet = ""; if (nSize < 3) { // Smallest tag is "

" which is 3 characters return strRet; } const char* pBegin = &sel[0]; const char* pCur = &sel[nSize - 1]; pCur--; // Skip past the > while (pCur > pBegin) { if (*pCur == '<') { break; } else if (*pCur == '>') { break; } --pCur; } if (*pCur == '<') { pCur++; while (strchr(":_-.", *pCur) || isalnum(*pCur)) { strRet += *pCur; pCur++; } } // Return the tag name or "" return strRet; } void SciTEBase::GoMatchingBrace(bool select) { int braceAtCaret = -1; int braceOpposite = -1; bool isInside = FindMatchingBracePosition(true, braceAtCaret, braceOpposite, true); // Convert the character positions into caret positions based on whether // the caret position was inside or outside the braces. if (isInside) { if (braceOpposite > braceAtCaret) { braceAtCaret++; } else { braceOpposite++; } } else { // Outside if (braceOpposite > braceAtCaret) { braceOpposite++; } else { braceAtCaret++; } } if (braceOpposite >= 0) { EnsureRangeVisible(braceOpposite, braceOpposite); if (select) { SetSelection(braceAtCaret, braceOpposite); } else { SetSelection(braceOpposite, braceOpposite); } } } // Text ConditionalUp Ctrl+J Finds the previous matching preprocessor condition // Text ConditionalDown Ctrl+K Finds the next matching preprocessor condition void SciTEBase::GoMatchingPreprocCond(int direction, bool select) { int mppcAtCaret = SendEditor(SCI_GETCURRENTPOS); int mppcMatch = -1; int forward = (direction == IDM_NEXTMATCHPPC); bool isInside = FindMatchingPreprocCondPosition(forward, mppcAtCaret, mppcMatch); if (isInside && mppcMatch >= 0) { EnsureRangeVisible(mppcMatch, mppcMatch); if (select) { // Selection changes the rules a bit... int selStart = SendEditor(SCI_GETSELECTIONSTART); int selEnd = SendEditor(SCI_GETSELECTIONEND); // pivot isn't the caret position but the opposite (if there is a selection) int pivot = (mppcAtCaret == selStart ? selEnd : selStart); if (forward) { // Caret goes one line beyond the target, to allow selecting the whole line int lineNb = SendEditor(SCI_LINEFROMPOSITION, mppcMatch); mppcMatch = SendEditor(SCI_POSITIONFROMLINE, lineNb + 1); } SetSelection(pivot, mppcMatch); } else { SetSelection(mppcMatch, mppcMatch); } } else { WarnUser(warnNotFound); } } void SciTEBase::AddCommand(const SString &cmd, const SString &dir, JobSubsystem jobType, const SString &input, int flags) { if (commandCurrent >= commandMax) return; if (commandCurrent == 0) jobUsesOutputPane = false; if (cmd.length()) { jobQueue[commandCurrent].command = cmd; jobQueue[commandCurrent].directory = dir; jobQueue[commandCurrent].jobType = jobType; jobQueue[commandCurrent].input = input; jobQueue[commandCurrent].flags = flags; commandCurrent++; if (jobType == jobCLI) jobUsesOutputPane = true; // For jobExtension, the Trace() method shows output pane on demand. } } int ControlIDOfCommand(unsigned long wParam) { return wParam & 0xffff; } void WindowSetFocus(Window &w) { Platform::SendScintilla(w.GetID(), SCI_GRABFOCUS, 0, 0); } void SciTEBase::SetLineNumberWidth() { if (lineNumbers) { int lineNumWidth = lineNumbersWidth; if (lineNumbersExpand) { // The margin size will be expanded if the current buffer's maximum // line number would overflow the margin. int lineCount = SendEditor(SCI_GETLINECOUNT); lineNumWidth = 1; while (lineCount >= 10) { lineCount /= 10; ++lineNumWidth; } if (lineNumWidth < lineNumbersWidth) { lineNumWidth = lineNumbersWidth; } } // The 4 here allows for spacing: 1 pixel on left and 3 on right. int pixelWidth = 4 + lineNumWidth * SendEditorString(SCI_TEXTWIDTH, STYLE_LINENUMBER, "9"); SendEditor(SCI_SETMARGINWIDTHN, 0, pixelWidth); } else { SendEditor(SCI_SETMARGINWIDTHN, 0, 0); } } void SciTEBase::MenuCommand(int cmdID, int source) { switch (cmdID) { case IDM_NEW: // For the New command, the "are you sure" question is always asked as this gives // an opportunity to abandon the edits made to a file when are.you.sure is turned off. if (CanMakeRoom()) { New(); ReadProperties(); SetIndentSettings(); if (props.GetInt("eol.auto")) SetEol(); UpdateStatusBar(true); WindowSetFocus(wEditor); } break; case IDM_OPEN: // No need to see if can make room as that will occur // when doing the opening. Must be done there as user // may decide to open multiple files so do not know yet // how much room needed. OpenDialog(); WindowSetFocus(wEditor); break; case IDM_OPENSELECTED: if (OpenSelected()) WindowSetFocus(wEditor); break; case IDM_CLOSE: if (SaveIfUnsure() != IDCANCEL) { Close(); WindowSetFocus(wEditor); } break; case IDM_CLOSEALL: CloseAllBuffers(); break; case IDM_SAVE: Save(); WindowSetFocus(wEditor); break; case IDM_SAVEALL: SaveAllBuffers(false, true); break; case IDM_SAVEAS: SaveAs(); WindowSetFocus(wEditor); break; case IDM_SAVEACOPY: SaveACopy(); WindowSetFocus(wEditor); break; case IDM_SAVEASHTML: SaveAsHTML(); WindowSetFocus(wEditor); break; case IDM_SAVEASRTF: SaveAsRTF(); WindowSetFocus(wEditor); break; case IDM_SAVEASPDF: SaveAsPDF(); WindowSetFocus(wEditor); break; case IDM_SAVEASTEX: SaveAsTEX(); WindowSetFocus(wEditor); break; case IDM_SAVEASXML: SaveAsXML(); WindowSetFocus(wEditor); break; case IDM_REVERT: Revert(); WindowSetFocus(wEditor); break; case IDM_PRINT: Print(true); break; case IDM_PRINTSETUP: PrintSetup(); break; case IDM_LOADSESSION: LoadSessionDialog(); WindowSetFocus(wEditor); break; case IDM_SAVESESSION: SaveSessionDialog(); WindowSetFocus(wEditor); break; case IDM_ABOUT: AboutDialog(); break; case IDM_QUIT: QuitProgram(); break; case IDM_ENCODING_DEFAULT: case IDM_ENCODING_UCS2BE: case IDM_ENCODING_UCS2LE: case IDM_ENCODING_UTF8: case IDM_ENCODING_UCOOKIE: unicodeMode = static_cast(cmdID - IDM_ENCODING_DEFAULT); if (unicodeMode != uni8Bit) { // Override the code page if Unicode codePage = SC_CP_UTF8; } else { codePage = props.GetInt("code.page"); } SendEditor(SCI_SETCODEPAGE, codePage); break; case IDM_NEXTFILE: if (buffers.size > 1) { Next(); // Use Next to tabs move left-to-right WindowSetFocus(wEditor); } else { // Not using buffers - switch to next file on MRU StackMenuNext(); } break; case IDM_PREVFILE: if (buffers.size > 1) { Prev(); // Use Prev to tabs move right-to-left WindowSetFocus(wEditor); } else { // Not using buffers - switch to previous file on MRU StackMenuPrev(); } break; case IDM_UNDO: SendPane(source, SCI_UNDO); CheckMenus(); break; case IDM_REDO: SendPane(source, SCI_REDO); CheckMenus(); break; case IDM_CUT: if (SendPane(source, SCI_GETSELECTIONSTART) != SendPane(source, SCI_GETSELECTIONEND)) { SendPane(source, SCI_CUT); } break; case IDM_COPY: if (SendPane(source, SCI_GETSELECTIONSTART) != SendPane(source, SCI_GETSELECTIONEND)) { //fprintf(stderr, "Copy from %d\n", source); SendPane(source, SCI_COPY); } // does not trigger SCN_UPDATEUI, so do CheckMenusClipboard() here CheckMenusClipboard(); break; case IDM_PASTE: SendPane(source, SCI_PASTE); break; case IDM_PASTEANDDOWN: { int pos = SendFocused(SCI_GETCURRENTPOS); SendFocused(SCI_PASTE); SendFocused(SCI_SETCURRENTPOS, pos); SendFocused(SCI_CHARLEFT); SendFocused(SCI_LINEDOWN); } break; case IDM_CLEAR: SendPane(source, SCI_CLEAR); break; case IDM_SELECTALL: SendPane(source, SCI_SELECTALL); break; case IDM_COPYASRTF: CopyAsRTF(); break; case IDM_FIND: Find(); break; case IDM_INCSEARCH: IncrementSearchMode(); break; case IDM_FINDNEXT: FindNext(reverseFind); break; case IDM_FINDNEXTBACK: FindNext(!reverseFind); break; case IDM_FINDNEXTSEL: SelectionIntoFind(); FindNext(reverseFind); break; case IDM_ENTERSELECTION: SelectionIntoFind(); break; case IDM_FINDNEXTBACKSEL: SelectionIntoFind(); FindNext(!reverseFind); break; case IDM_FINDINFILES: FindInFiles(); break; case IDM_REPLACE: Replace(); break; case IDM_GOTO: GoLineDialog(); break; case IDM_MATCHBRACE: GoMatchingBrace(false); break; case IDM_SELECTTOBRACE: GoMatchingBrace(true); break; case IDM_PREVMATCHPPC: GoMatchingPreprocCond(IDM_PREVMATCHPPC, false); break; case IDM_SELECTTOPREVMATCHPPC: GoMatchingPreprocCond(IDM_PREVMATCHPPC, true); break; case IDM_NEXTMATCHPPC: GoMatchingPreprocCond(IDM_NEXTMATCHPPC, false); break; case IDM_SELECTTONEXTMATCHPPC: GoMatchingPreprocCond(IDM_NEXTMATCHPPC, true); break; case IDM_SHOWCALLTIP: StartCallTip(); break; case IDM_COMPLETE: autoCCausedByOnlyOne = false; StartAutoComplete(); break; case IDM_COMPLETEWORD: autoCCausedByOnlyOne = false; StartAutoCompleteWord(false); break; case IDM_ABBREV: SendEditor(SCI_CANCEL); StartExpandAbbreviation(); break; case IDM_INS_ABBREV: SendEditor(SCI_CANCEL); StartInsertAbbreviation(); break; case IDM_BLOCK_COMMENT: StartBlockComment(); break; case IDM_BOX_COMMENT: StartBoxComment(); break; case IDM_STREAM_COMMENT: StartStreamComment(); break; case IDM_TOGGLE_FOLDALL: FoldAll(); break; case IDM_UPRCASE: SendFocused(SCI_UPPERCASE); break; case IDM_LWRCASE: SendFocused(SCI_LOWERCASE); break; case IDM_JOIN: SendFocused(SCI_TARGETFROMSELECTION); SendFocused(SCI_LINESJOIN); break; case IDM_SPLIT: SendFocused(SCI_TARGETFROMSELECTION); SendFocused(SCI_LINESSPLIT); break; case IDM_EXPAND: SendEditor(SCI_TOGGLEFOLD, GetCurrentLineNumber()); break; case IDM_TOGGLE_FOLDRECURSIVE: { int line = GetCurrentLineNumber(); int level = SendEditor(SCI_GETFOLDLEVEL, line); ToggleFoldRecursive(line, level); } break; case IDM_EXPAND_ENSURECHILDRENVISIBLE: { int line = GetCurrentLineNumber(); int level = SendEditor(SCI_GETFOLDLEVEL, line); EnsureAllChildrenVisible(line, level); } break; case IDM_SPLITVERTICAL: splitVertical = !splitVertical; heightOutput = NormaliseSplit(heightOutput); SizeSubWindows(); CheckMenus(); Redraw(); break; case IDM_LINENUMBERMARGIN: lineNumbers = !lineNumbers; SetLineNumberWidth(); CheckMenus(); break; case IDM_SELMARGIN: margin = !margin; SendEditor(SCI_SETMARGINWIDTHN, 1, margin ? marginWidth : 0); CheckMenus(); break; case IDM_FOLDMARGIN: foldMargin = !foldMargin; SendEditor(SCI_SETMARGINWIDTHN, 2, foldMargin ? foldMarginWidth : 0); CheckMenus(); break; case IDM_VIEWEOL: SendEditor(SCI_SETVIEWEOL, !SendEditor(SCI_GETVIEWEOL)); CheckMenus(); break; case IDM_VIEWTOOLBAR: tbVisible = !tbVisible; ShowToolBar(); CheckMenus(); break; case IDM_TOGGLEOUTPUT: ToggleOutputVisible(); CheckMenus(); break; case IDM_TOGGLEPARAMETERS: ParametersDialog(false); CheckMenus(); break; case IDM_WRAP: wrap = !wrap; SendEditor(SCI_SETWRAPMODE, wrap ? wrapStyle : SC_WRAP_NONE); CheckMenus(); break; case IDM_WRAPOUTPUT: wrapOutput = !wrapOutput; SendOutput(SCI_SETWRAPMODE, wrapOutput ? wrapStyle : SC_WRAP_NONE); CheckMenus(); break; case IDM_READONLY: isReadOnly = !isReadOnly; SendEditor(SCI_SETREADONLY, isReadOnly); UpdateStatusBar(true); CheckMenus(); break; case IDM_VIEWTABBAR: tabVisible = !tabVisible; ShowTabBar(); CheckMenus(); break; case IDM_VIEWSTATUSBAR: sbVisible = !sbVisible; ShowStatusBar(); UpdateStatusBar(true); CheckMenus(); break; case IDM_CLEAROUTPUT: SendOutputEx(SCI_CLEARALL, 0, 0, false); break; case IDM_SWITCHPANE: if (wEditor.HasFocus()) WindowSetFocus(wOutput); else WindowSetFocus(wEditor); break; case IDM_EOL_CRLF: SendEditor(SCI_SETEOLMODE, SC_EOL_CRLF); CheckMenus(); UpdateStatusBar(false); break; case IDM_EOL_CR: SendEditor(SCI_SETEOLMODE, SC_EOL_CR); CheckMenus(); UpdateStatusBar(false); break; case IDM_EOL_LF: SendEditor(SCI_SETEOLMODE, SC_EOL_LF); CheckMenus(); UpdateStatusBar(false); break; case IDM_EOL_CONVERT: SendEditor(SCI_CONVERTEOLS, SendEditor(SCI_GETEOLMODE)); break; case IDM_VIEWSPACE: ViewWhitespace(!SendEditor(SCI_GETVIEWWS)); CheckMenus(); Redraw(); break; case IDM_VIEWGUIDES: { int viewIG = SendEditor(SCI_GETINDENTATIONGUIDES, 0, 0); SendEditor(SCI_SETINDENTATIONGUIDES, !viewIG); CheckMenus(); Redraw(); } break; case IDM_COMPILE: { if (SaveIfUnsureForBuilt() != IDCANCEL) { SelectionIntoProperties(); AddCommand(props.GetWild("command.compile.", fileName), "", SubsystemType("command.compile.subsystem.")); if (commandCurrent > 0) Execute(); } } break; case IDM_BUILD: { if (SaveIfUnsureForBuilt() != IDCANCEL) { SelectionIntoProperties(); AddCommand( props.GetWild("command.build.", fileName), props.GetNewExpand("command.build.directory.", fileName), SubsystemType("command.build.subsystem.")); if (commandCurrent > 0) { isBuilding = true; Execute(); } } } break; case IDM_GO: { if (SaveIfUnsureForBuilt() != IDCANCEL) { SelectionIntoProperties(); long flags = 0; if (!isBuilt) { SString buildcmd = props.GetNewExpand("command.go.needs.", fileName); AddCommand(buildcmd, "", SubsystemType("command.go.needs.subsystem.")); if (buildcmd.length() > 0) { isBuilding = true; flags |= jobForceQueue; } } AddCommand(props.GetWild("command.go.", fileName), "", SubsystemType("command.go.subsystem."), "", flags); if (commandCurrent > 0) Execute(); } } break; case IDM_STOPEXECUTE: StopExecute(); break; case IDM_NEXTMSG: GoMessage(1); break; case IDM_PREVMSG: GoMessage(-1); break; case IDM_OPENLOCALPROPERTIES: OpenProperties(IDM_OPENLOCALPROPERTIES); WindowSetFocus(wEditor); break; case IDM_OPENUSERPROPERTIES: OpenProperties(IDM_OPENUSERPROPERTIES); WindowSetFocus(wEditor); break; case IDM_OPENGLOBALPROPERTIES: OpenProperties(IDM_OPENGLOBALPROPERTIES); WindowSetFocus(wEditor); break; case IDM_OPENABBREVPROPERTIES: OpenProperties(IDM_OPENABBREVPROPERTIES); WindowSetFocus(wEditor); break; case IDM_OPENLUAEXTERNALFILE: OpenProperties(IDM_OPENLUAEXTERNALFILE); WindowSetFocus(wEditor); break; case IDM_SRCWIN: break; case IDM_BOOKMARK_TOGGLE: BookmarkToggle(); break; case IDM_BOOKMARK_NEXT: BookmarkNext(true); break; case IDM_BOOKMARK_PREV: BookmarkNext(false); break; case IDM_BOOKMARK_NEXT_SELECT: BookmarkNext(true, true); break; case IDM_BOOKMARK_PREV_SELECT: BookmarkNext(false, true); break; case IDM_BOOKMARK_CLEARALL: SendEditor(SCI_MARKERDELETEALL, SciTE_MARKER_BOOKMARK); break; case IDM_TABSIZE: TabSizeDialog(); break; case IDM_MONOFONT: useMonoFont = !useMonoFont; ReadFontProperties(); Redraw(); break; case IDM_MACROLIST: AskMacroList(); break; case IDM_MACROPLAY: StartPlayMacro(); break; case IDM_MACRORECORD: StartRecordMacro(); break; case IDM_MACROSTOPRECORD: StopRecordMacro(); break; case IDM_HELP: { SelectionIntoProperties(); AddCommand(props.GetWild("command.help.", fileName), "", SubsystemType("command.help.subsystem.")); if (commandCurrent > 0) { isBuilding = true; Execute(); } } break; case IDM_HELP_SCITE: { SelectionIntoProperties(); AddCommand(props.Get("command.scite.help"), "", SubsystemType(props.Get("command.scite.help.subsystem")[0])); if (commandCurrent > 0) { isBuilding = true; Execute(); } } break; default: if ((cmdID >= bufferCmdID) && (cmdID < bufferCmdID + buffers.size)) { SetDocumentAt(cmdID - bufferCmdID); CheckReload(); } else if ((cmdID >= fileStackCmdID) && (cmdID < fileStackCmdID + fileStackMax)) { StackMenu(cmdID - fileStackCmdID); } else if (cmdID >= importCmdID && (cmdID < importCmdID + importMax)) { ImportMenu(cmdID - importCmdID); } else if (cmdID >= IDM_TOOLS && cmdID < IDM_TOOLS + toolMax) { ToolsMenu(cmdID - IDM_TOOLS); } else if (cmdID >= IDM_LANGUAGE && cmdID < IDM_LANGUAGE + 100) { SetOverrideLanguage(cmdID - IDM_LANGUAGE); } break; } } void SciTEBase::FoldChanged(int line, int levelNow, int levelPrev) { //Platform::DebugPrintf("Fold %d %x->%x\n", line, levelPrev, levelNow); if (levelNow & SC_FOLDLEVELHEADERFLAG) { if (!(levelPrev & SC_FOLDLEVELHEADERFLAG)) { SendEditor(SCI_SETFOLDEXPANDED, line, 1); } } else if (levelPrev & SC_FOLDLEVELHEADERFLAG) { //Platform::DebugPrintf("Fold removed %d-%d\n", line, SendEditor(SCI_GETLASTCHILD, line)); if (!SendEditor(SCI_GETFOLDEXPANDED, line)) { // Removing the fold from one that has been contracted so should expand // otherwise lines are left invisible with no way to make them visible Expand(line, true, false, 0, levelPrev); } } } void SciTEBase::Expand(int &line, bool doExpand, bool force, int visLevels, int level) { int lineMaxSubord = SendEditor(SCI_GETLASTCHILD, line, level & SC_FOLDLEVELNUMBERMASK); line++; while (line <= lineMaxSubord) { if (force) { if (visLevels > 0) SendEditor(SCI_SHOWLINES, line, line); else SendEditor(SCI_HIDELINES, line, line); } else { if (doExpand) SendEditor(SCI_SHOWLINES, line, line); } int levelLine = level; if (levelLine == -1) levelLine = SendEditor(SCI_GETFOLDLEVEL, line); if (levelLine & SC_FOLDLEVELHEADERFLAG) { if (force) { if (visLevels > 1) SendEditor(SCI_SETFOLDEXPANDED, line, 1); else SendEditor(SCI_SETFOLDEXPANDED, line, 0); Expand(line, doExpand, force, visLevels - 1); } else { if (doExpand) { if (!SendEditor(SCI_GETFOLDEXPANDED, line)) SendEditor(SCI_SETFOLDEXPANDED, line, 1); Expand(line, true, force, visLevels - 1); } else { Expand(line, false, force, visLevels - 1); } } } else { line++; } } } void SciTEBase::FoldAll() { SendEditor(SCI_COLOURISE, 0, -1); int maxLine = SendEditor(SCI_GETLINECOUNT); bool expanding = true; for (int lineSeek = 0; lineSeek < maxLine; lineSeek++) { if (SendEditor(SCI_GETFOLDLEVEL, lineSeek) & SC_FOLDLEVELHEADERFLAG) { expanding = !SendEditor(SCI_GETFOLDEXPANDED, lineSeek); break; } } for (int line = 0; line < maxLine; line++) { int level = SendEditor(SCI_GETFOLDLEVEL, line); if ((level & SC_FOLDLEVELHEADERFLAG) && (SC_FOLDLEVELBASE == (level & SC_FOLDLEVELNUMBERMASK))) { if (expanding) { SendEditor(SCI_SETFOLDEXPANDED, line, 1); Expand(line, true, false, 0, level); line--; } else { int lineMaxSubord = SendEditor(SCI_GETLASTCHILD, line, -1); SendEditor(SCI_SETFOLDEXPANDED, line, 0); if (lineMaxSubord > line) SendEditor(SCI_HIDELINES, line + 1, lineMaxSubord); } } } } void SciTEBase::GotoLineEnsureVisible(int line) { SendEditor(SCI_ENSUREVISIBLEENFORCEPOLICY, line); SendEditor(SCI_GOTOLINE, line); } void SciTEBase::EnsureRangeVisible(int posStart, int posEnd, bool enforcePolicy) { int lineStart = SendEditor(SCI_LINEFROMPOSITION, Platform::Minimum(posStart, posEnd)); int lineEnd = SendEditor(SCI_LINEFROMPOSITION, Platform::Maximum(posStart, posEnd)); for (int line = lineStart; line <= lineEnd; line++) { SendEditor(enforcePolicy ? SCI_ENSUREVISIBLEENFORCEPOLICY : SCI_ENSUREVISIBLE, line); } } bool SciTEBase::MarginClick(int position, int modifiers) { int lineClick = SendEditor(SCI_LINEFROMPOSITION, position); //Platform::DebugPrintf("Margin click %d %d %x\n", position, lineClick, // SendEditor(SCI_GETFOLDLEVEL, lineClick) & SC_FOLDLEVELHEADERFLAG); if ((modifiers & SCMOD_SHIFT) && (modifiers & SCMOD_CTRL)) { FoldAll(); } else { int levelClick = SendEditor(SCI_GETFOLDLEVEL, lineClick); if (levelClick & SC_FOLDLEVELHEADERFLAG) { if (modifiers & SCMOD_SHIFT) { EnsureAllChildrenVisible(lineClick, levelClick); } else if (modifiers & SCMOD_CTRL) { ToggleFoldRecursive(lineClick, levelClick); } else { // Toggle this line SendEditor(SCI_TOGGLEFOLD, lineClick); } } } return true; } void SciTEBase::ToggleFoldRecursive(int line, int level) { if (SendEditor(SCI_GETFOLDEXPANDED, line)) { // Contract this line and all children SendEditor(SCI_SETFOLDEXPANDED, line, 0); Expand(line, false, true, 0, level); } else { // Expand this line and all children SendEditor(SCI_SETFOLDEXPANDED, line, 1); Expand(line, true, true, 100, level); } } void SciTEBase::EnsureAllChildrenVisible(int line, int level) { // Ensure all children visible SendEditor(SCI_SETFOLDEXPANDED, line, 1); Expand(line, true, true, 100, level); } void SciTEBase::NewLineInOutput() { if (executing) return; char cmd[200]; int line = SendOutput(SCI_LINEFROMPOSITION, SendOutput(SCI_GETCURRENTPOS)) - 1; int lineStart = SendOutput(SCI_POSITIONFROMLINE, line); int lineEnd = SendOutput(SCI_GETLINEENDPOSITION, line); int lineMax = lineStart + sizeof(cmd) - 1; if (lineEnd > lineMax) lineEnd = lineMax; GetRange(wOutput, lineStart, lineEnd, cmd); cmd[lineEnd - lineStart] = '\0'; // TODO: put a '>' at beginning of line returnOutputToCommand = false; AddCommand(cmd, ".", jobCLI); Execute(); } void SciTEBase::Notify(SCNotification *notification) { bool handled = false; //Platform::DebugPrintf("Notify %d\n", notification->nmhdr.code); switch (notification->nmhdr.code) { case SCEN_SETFOCUS: case SCEN_KILLFOCUS: CheckMenus(); break; case SCN_STYLENEEDED: { if (extender) { // Colourisation may be performed by script if ((notification->nmhdr.idFrom == IDM_SRCWIN) && (lexLanguage == SCLEX_CONTAINER)) { int endStyled = SendEditor(SCI_GETENDSTYLED); int lineEndStyled = SendEditor(SCI_LINEFROMPOSITION, endStyled); endStyled = SendEditor(SCI_POSITIONFROMLINE, lineEndStyled); WindowAccessor styler(wEditor.GetID(), props); int styleStart = 0; if (endStyled > 0) styleStart = styler.StyleAt(endStyled - 1); styler.SetCodePage(codePage); extender->OnStyle(endStyled, notification->position - endStyled, styleStart, &styler); styler.Flush(); } } // Colourisation is now normally performed by the SciLexer DLL #ifdef OLD_CODE if (notification->nmhdr.idFrom == IDM_SRCWIN) { int endStyled = SendEditor(SCI_GETENDSTYLED); int lineEndStyled = SendEditor(SCI_LINEFROMPOSITION, endStyled); endStyled = SendEditor(SCI_POSITIONFROMLINE, lineEndStyled); Colourise(endStyled, notification->position); } else { int endStyled = SendOutput(SCI_GETENDSTYLED); int lineEndStyled = SendOutput(SCI_LINEFROMPOSITION, endStyled); endStyled = SendOutput(SCI_POSITIONFROMLINE, lineEndStyled); Colourise(endStyled, notification->position, false); } #endif } break; case SCN_CHARADDED: if (extender) handled = extender->OnChar(static_cast(notification->ch)); if (!handled) { if (notification->nmhdr.idFrom == IDM_SRCWIN) { CharAdded(static_cast(notification->ch)); } else if (notification->ch == '\n') { NewLineInOutput(); } } break; case SCN_SAVEPOINTREACHED: if (notification->nmhdr.idFrom == IDM_SRCWIN) { if (extender) handled = extender->OnSavePointReached(); if (!handled) { isDirty = false; } } CheckMenus(); SetWindowName(); BuffersMenu(); break; case SCN_SAVEPOINTLEFT: if (notification->nmhdr.idFrom == IDM_SRCWIN) { if (extender) handled = extender->OnSavePointLeft(); if (!handled) { isDirty = true; isBuilt = false; } } CheckMenus(); SetWindowName(); BuffersMenu(); break; case SCN_DOUBLECLICK: if (extender) handled = extender->OnDoubleClick(); if (!handled && notification->nmhdr.idFrom == IDM_RUNWIN) { GoMessage(0); } break; case SCN_UPDATEUI: if (extender) handled = extender->OnUpdateUI(); if (!handled) { BraceMatch(notification->nmhdr.idFrom == IDM_SRCWIN); if (notification->nmhdr.idFrom == IDM_SRCWIN) { UpdateStatusBar(false); } CheckMenusClipboard(); } break; case SCN_MODIFIED: if (notification->modificationType & SC_LASTSTEPINUNDOREDO) { //when the user hits undo or redo, several normal insert/delete //notifications may fire, but we will end up here in the end EnableAMenuItem(IDM_UNDO, SendFocused(SCI_CANUNDO)); EnableAMenuItem(IDM_REDO, SendFocused(SCI_CANREDO)); } else if (notification->modificationType & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT)) { //this will be called a lot, and usually means "typing". EnableAMenuItem(IDM_UNDO, TRUE); EnableAMenuItem(IDM_REDO, FALSE); } if (notification->linesAdded && lineNumbers && lineNumbersExpand) SetLineNumberWidth(); if (0 != (notification->modificationType & SC_MOD_CHANGEFOLD)) { FoldChanged(notification->line, notification->foldLevelNow, notification->foldLevelPrev); } break; case SCN_MARGINCLICK: { if (extender) handled = extender->OnMarginClick(); if (!handled) { if (notification->margin == 2) { MarginClick(notification->position, notification->modifiers); } } } break; case SCN_NEEDSHOWN: { EnsureRangeVisible(notification->position, notification->position + notification->length, false); } break; case SCN_USERLISTSELECTION: { if (notification->wParam == 2) ContinueMacroList(notification->text); else if (extender && notification->wParam > 2) extender->OnUserListSelection(notification->wParam, notification->text); } break; case SCN_CALLTIPCLICK: { if (notification->position == 1 && currentCallTip > 0) { currentCallTip--; FillFunctionDefinition(); } else if (notification->position == 0 && currentCallTip + 1 < maxCallTips) { currentCallTip++; FillFunctionDefinition(); } } break; case SCN_MACRORECORD: RecordMacroCommand(notification); break; case SCN_URIDROPPED: OpenUriList(notification->text); break; case SCN_DWELLSTART: { if (INVALID_POSITION == notification->position) { char message[200]; sprintf(message, "%0d (%0d,%0d)", notification->position, notification->x, notification->y); } else { int endWord = notification->position; SString message = RangeExtendAndGrab(wEditor, notification->position, endWord, iswordcharforsel); if (message.length()) { SendEditorString(SCI_CALLTIPSHOW, notification->position, message.c_str()); } } } break; case SCN_DWELLEND: SendEditorString(SCI_CALLTIPCANCEL, 0, 0); break; case SCN_ZOOM: SetLineNumberWidth(); break; } } void SciTEBase::CheckMenusClipboard() { bool hasSelection = SendFocused(SCI_GETSELECTIONSTART) != SendFocused(SCI_GETSELECTIONEND); EnableAMenuItem(IDM_CUT, hasSelection); EnableAMenuItem(IDM_COPY, hasSelection); EnableAMenuItem(IDM_CLEAR, hasSelection); EnableAMenuItem(IDM_PASTE, SendFocused(SCI_CANPASTE)); } void SciTEBase::CheckMenus() { CheckMenusClipboard(); EnableAMenuItem(IDM_SAVE, isDirty); EnableAMenuItem(IDM_UNDO, SendFocused(SCI_CANUNDO)); EnableAMenuItem(IDM_REDO, SendFocused(SCI_CANREDO)); EnableAMenuItem(IDM_FINDINFILES, !executing); EnableAMenuItem(IDM_SHOWCALLTIP, apis != 0); EnableAMenuItem(IDM_COMPLETE, apis != 0); CheckAMenuItem(IDM_SPLITVERTICAL, splitVertical); EnableAMenuItem(IDM_OPENFILESHERE, props.GetInt("check.if.already.open") != 0); CheckAMenuItem(IDM_OPENFILESHERE, openFilesHere); CheckAMenuItem(IDM_WRAP, wrap); CheckAMenuItem(IDM_WRAPOUTPUT, wrapOutput); CheckAMenuItem(IDM_READONLY, isReadOnly); CheckAMenuItem(IDM_FULLSCREEN, fullScreen); CheckAMenuItem(IDM_VIEWTOOLBAR, tbVisible); CheckAMenuItem(IDM_VIEWTABBAR, tabVisible); CheckAMenuItem(IDM_VIEWSTATUSBAR, sbVisible); CheckAMenuItem(IDM_VIEWEOL, SendEditor(SCI_GETVIEWEOL)); CheckAMenuItem(IDM_VIEWSPACE, SendEditor(SCI_GETVIEWWS)); CheckAMenuItem(IDM_VIEWGUIDES, SendEditor(SCI_GETINDENTATIONGUIDES)); CheckAMenuItem(IDM_LINENUMBERMARGIN, lineNumbers); CheckAMenuItem(IDM_SELMARGIN, margin); CheckAMenuItem(IDM_FOLDMARGIN, foldMargin); CheckAMenuItem(IDM_TOGGLEOUTPUT, heightOutput > 0); CheckAMenuItem(IDM_TOGGLEPARAMETERS, wParameters.Created()); CheckAMenuItem(IDM_MONOFONT, useMonoFont); EnableAMenuItem(IDM_COMPILE, !executing && props.GetWild("command.compile.", fileName).size() != 0); EnableAMenuItem(IDM_BUILD, !executing && props.GetWild("command.build.", fileName).size() != 0); EnableAMenuItem(IDM_GO, !executing && props.GetWild("command.go.", fileName).size() != 0); for (int toolItem = 0; toolItem < toolMax; toolItem++) EnableAMenuItem(IDM_TOOLS + toolItem, !executing); EnableAMenuItem(IDM_STOPEXECUTE, executing); if (buffers.size > 0) { #if PLAT_WIN // Tab Bar #ifndef TCM_DESELECTALL #define TCM_DESELECTALL TCM_FIRST+50 #endif ::SendMessage(reinterpret_cast(wTabBar.GetID()), TCM_DESELECTALL, (WPARAM)0, (LPARAM)0); ::SendMessage(reinterpret_cast(wTabBar.GetID()), TCM_SETCURSEL, (WPARAM)buffers.Current(), (LPARAM)0); #endif #if PLAT_GTK if (wTabBar.GetID()) gtk_notebook_set_page(GTK_NOTEBOOK(wTabBar.GetID()), buffers.Current()); #endif for (int bufferItem = 0; bufferItem < buffers.length; bufferItem++) { CheckAMenuItem(IDM_BUFFER + bufferItem, bufferItem == buffers.Current()); } } EnableAMenuItem(IDM_MACROPLAY, !recording); EnableAMenuItem(IDM_MACRORECORD, !recording); EnableAMenuItem(IDM_MACROSTOPRECORD, recording); } void SciTEBase::ContextMenu(Window wSource, Point pt, Window wCmd) { int currentPos = SendWindow(wSource, SCI_GETCURRENTPOS); int anchor = SendWindow(wSource, SCI_GETANCHOR); popup.CreatePopUp(); bool writable = !SendWindow(wSource, SCI_GETREADONLY); AddToPopUp("Undo", IDM_UNDO, writable && SendWindow(wSource, SCI_CANUNDO)); AddToPopUp("Redo", IDM_REDO, writable && SendWindow(wSource, SCI_CANREDO)); AddToPopUp(""); AddToPopUp("Cut", IDM_CUT, writable && currentPos != anchor); AddToPopUp("Copy", IDM_COPY, currentPos != anchor); AddToPopUp("Paste", IDM_PASTE, writable && SendWindow(wSource, SCI_CANPASTE)); AddToPopUp("Delete", IDM_CLEAR, writable && currentPos != anchor); AddToPopUp(""); AddToPopUp("Select All", IDM_SELECTALL); AddToPopUp(""); if (wSource.GetID() == wOutput.GetID()) { AddToPopUp("Hide", IDM_TOGGLEOUTPUT, true); } else { AddToPopUp("Close", IDM_CLOSE, true); } SString userContextMenu = props.GetNewExpand("user.context.menu"); userContextMenu.substitute('|', '\0'); const char *userContextItem = userContextMenu.c_str(); const char *endDefinition = userContextItem + userContextMenu.length(); while (userContextItem < endDefinition) { const char *caption = userContextItem; userContextItem += strlen(userContextItem) + 1; if (userContextItem < endDefinition) { int cmd = GetMenuCommandAsInt(userContextItem); userContextItem += strlen(userContextItem) + 1; AddToPopUp(caption, cmd); } } popup.Show(pt, wCmd); } /** * Ensure that a splitter bar position is inside the main window. */ int SciTEBase::NormaliseSplit(int splitPos) { PRectangle rcClient = GetClientRectangle(); int w = rcClient.Width(); int h = rcClient.Height(); if (splitPos < 20) splitPos = 0; if (splitVertical) { if (splitPos > w - heightBar - 20) splitPos = w - heightBar; } else { if (splitPos > h - heightBar - 20) splitPos = h - heightBar; } return splitPos; } void SciTEBase::MoveSplit(Point ptNewDrag) { int newHeightOutput = heightOutputStartDrag + (ptStartDrag.y - ptNewDrag.y); if (splitVertical) newHeightOutput = heightOutputStartDrag + (ptStartDrag.x - ptNewDrag.x); newHeightOutput = NormaliseSplit(newHeightOutput); if (heightOutput != newHeightOutput) { heightOutput = newHeightOutput; SizeContentWindows(); //Redraw(); } previousHeightOutput = newHeightOutput; } void SciTEBase::UIAvailable() { SetImportMenu(); if (extender) { char homepath[MAX_PATH + 20]; if (GetSciteDefaultHome(homepath, sizeof(homepath))) { props.Set("SciteDefaultHome", homepath); } if (GetSciteUserHome(homepath, sizeof(homepath))) { props.Set("SciteUserHome", homepath); } extender->Initialise(this); } } /** * Find the character following a name which is made up of characters from * the set [a-zA-Z.] */ char AfterName(const char *s) { while (*s && ((*s == '.') || (*s >= 'a' && *s <= 'z') || (*s >= 'A' && *s <= 'A'))) s++; return *s; } void SciTEBase::PerformOne(char *action) { unsigned int len = UnSlash(action); char *arg = strchr(action, ':'); if (arg) { arg++; if (isprefix(action, "askfilename:")) { extender->OnMacro("filename", fullPath); } else if (isprefix(action, "askproperty:")) { PropertyToDirector(arg); } else if (isprefix(action, "close:")) { Close(); WindowSetFocus(wEditor); } else if (isprefix(action, "currentmacro:")) { currentMacro = arg; } else if (isprefix(action, "cwd:")) { if (chdir(arg) != 0) { SString msg = LocaliseMessage("Invalid directory '^0'.", arg); WindowMessageBox(wSciTE, msg, MB_OK | MB_ICONWARNING); } } else if (isprefix(action, "enumproperties:")) { EnumProperties(arg); } else if (isprefix(action, "exportashtml:")) { SaveToHTML(arg); } else if (isprefix(action, "exportasrtf:")) { SaveToRTF(arg); } else if (isprefix(action, "exportaspdf:")) { SaveToPDF(arg); } else if (isprefix(action, "exportaslatex:")) { SaveToTEX(arg); } else if (isprefix(action, "exportasxml:")) { SaveToXML(arg); } else if (isprefix(action, "find:") && fnEditor) { findWhat = arg; FindNext(false, false); } else if (isprefix(action, "goto:") && fnEditor) { int line = atoi(arg) - 1; GotoLineEnsureVisible(line); // jump to column if given and greater than 0 char *colstr = strchr(arg, ','); if (colstr != NULL) { int col = atoi(colstr + 1); if (col > 0) { int pos = SendEditor(SCI_GETCURRENTPOS) + col; // select the word you have found there int wordStart = SendEditor(SCI_WORDSTARTPOSITION, pos, true); int wordEnd = SendEditor(SCI_WORDENDPOSITION, pos, true); SendEditor(SCI_SETSEL, wordStart, wordEnd); } } } else if (isprefix(action, "insert:") && fnEditor) { SendEditorString(SCI_REPLACESEL, 0, arg); } else if (isprefix(action, "macrocommand:")) { ExecuteMacroCommand(arg); } else if (isprefix(action, "macroenable:")) { macrosEnabled = atoi(arg); SetToolsMenu(); } else if (isprefix(action, "macrolist:")) { StartMacroList(arg); } else if (isprefix(action, "menucommand:")) { MenuCommand(atoi(arg)); } else if (isprefix(action, "open:")) { Open(arg); } else if (isprefix(action, "output:") && fnOutput) { SendOutput(SCI_REPLACESEL, 0, reinterpret_cast(arg)); } else if (isprefix(action, "property:")) { PropertyFromDirector(arg); } else if (isprefix(action, "reloadproperties:")) { ReloadProperties(); } else if (isprefix(action, "quit:")) { QuitProgram(); } else if (isprefix(action, "replaceall:") && fnEditor) { if (len > strlen(action)) { char *arg2 = arg + strlen(arg) + 1; findWhat = arg; replaceWhat = arg2; ReplaceAll(false); } } else if (isprefix(action, "saveas:")) { SaveAs(arg); } else if (isprefix(action, "loadsession:")) { if (*arg) { LoadSession(arg); } } else if (isprefix(action, "extender:")) { extender->OnExecute(arg); } } } static bool IsSwitchCharacter(char ch) { #ifdef unix return ch == '-'; #else return (ch == '-') || (ch == '/'); #endif } // Called by SciTEBase::PerformOne when action="enumproperties:" void SciTEBase::EnumProperties(const char *propkind) { char *key = NULL; char *val = NULL; PropSetFile *pf = NULL; if (!extender) return; if (!strcmp(propkind, "dyn")) { SelectionIntoProperties(); // Refresh properties ... pf = &props; } else if (!strcmp(propkind, "local")) pf = &propsLocal; else if (!strcmp(propkind, "user")) pf = &propsUser; else if (!strcmp(propkind, "base")) pf = &propsBase; else if (!strcmp(propkind, "embed")) pf = &propsEmbed; else if (!strcmp(propkind, "abbrev")) pf = &propsAbbrev; if (pf != NULL) { bool b = pf->GetFirst(&key, &val); while (b) { SendOneProperty(propkind, key, val); b = pf->GetNext(&key, &val); } } } void SciTEBase::SendOneProperty(const char *kind, const char *key, const char *val) { size_t keysize = strlen(kind) + 1 + strlen(key) + 1 + strlen(val) + 1; char *m = new char[keysize]; if (m) { strcpy(m, kind); strcat(m, ":"); strcat(m, key); strcat(m, "="); strcat(m, val); extender->SendProperty(m); delete []m; } } void SciTEBase::PropertyFromDirector(const char *arg) { props.Set(arg); } void SciTEBase::PropertyToDirector(const char *arg) { if (!extender) return; SelectionIntoProperties(); SString gotprop = props.Get(arg); extender->OnMacro("macro:stringinfo", gotprop.c_str()); } /** * Menu/Toolbar command "Record". */ void SciTEBase::StartRecordMacro() { recording = true; CheckMenus(); SendEditor(SCI_STARTRECORD); } /** * Received a SCN_MACRORECORD from Scintilla: send it to director. */ bool SciTEBase::RecordMacroCommand(SCNotification *notification) { if (extender) { char *szMessage; char *t; bool handled; t = (char*)(notification->lParam); if (t != NULL) { //format : ";;1;" szMessage = new char[50 + strlen(t) + 4]; sprintf(szMessage, "%d;%ld;1;%s", notification->message, notification->wParam, t); } else { //format : ";;0;" szMessage = new char[50]; sprintf(szMessage, "%d;%ld;0;", notification->message, notification->wParam); } handled = extender->OnMacro("macro:record", szMessage); delete []szMessage; return handled; } return true; } /** * Menu/Toolbar command "Stop recording". */ void SciTEBase::StopRecordMacro() { SendEditor(SCI_STOPRECORD); if (extender) extender->OnMacro("macro:stoprecord", ""); recording = false; CheckMenus(); } /** * Menu/Toolbar command "Play macro...": tell director to build list of Macro names * Through this call, user has access to all macros in Filerx. */ void SciTEBase::AskMacroList() { if (extender) extender->OnMacro("macro:getlist", ""); } /** * List of Macro names has been created. Ask Scintilla to show it. */ bool SciTEBase::StartMacroList(const char *words) { if (words) { SendEditorString(SCI_USERLISTSHOW, 2, words); //listtype=2 } return true; } /** * User has chosen a macro in the list. Ask director to execute it. */ void SciTEBase::ContinueMacroList(const char *stext) { if ((extender) && (*stext != '\0')) { currentMacro = stext; StartPlayMacro(); } } /** * Menu/Toolbar command "Play current macro" (or called from ContinueMacroList). */ void SciTEBase::StartPlayMacro() { if (extender) extender->OnMacro("macro:run", currentMacro.c_str()); } /* SciTE received a macro command from director : execute it. If command needs answer (SCI_GETTEXTLENGTH ...) : give answer to director */ static uptr_t ReadNum(const char *&t) { const char *argend = strchr(t, ';'); // find ';' uptr_t v = 0; if (*t) v = atoi(t); // read value t = argend + 1; // update pointer return v; // return value } void SciTEBase::ExecuteMacroCommand(const char *command) { const char *nextarg = command; uptr_t wParam; sptr_t lParam = 0; int rep = 0; //Scintilla's answer char *answercmd; int l; char *string1 = NULL; char params[4]; //params describe types of return values and of arguments //0 : void or no param //I : integer //S : string //R : return string (for lParam only) //extract message,wParam ,lParam uptr_t message = ReadNum(nextarg); strncpy(params, nextarg, 3); nextarg += 4; if (*(params + 1) == 'R') { // in one function wParam is a string : void SetProperty(string key,string name) const char *s1 = nextarg; while (*nextarg != ';') nextarg++; int lstring1 = nextarg - s1; string1 = new char[lstring1 + 1]; if (lstring1 > 0) strncpy(string1, s1, lstring1); *(string1 + lstring1) = '\0'; wParam = reinterpret_cast(string1); nextarg++; } else { wParam = ReadNum(nextarg); } if (*(params + 2) == 'S') lParam = reinterpret_cast(nextarg); else if (*(params + 2) == 'I') lParam = atoi(nextarg); if (*params == '0') { // no answer ... SendEditor(message, wParam, lParam); if (string1 != NULL) delete []string1; return; } if (*params == 'S') { // string answer if (message == SCI_GETSELTEXT) { l = SendEditor(SCI_GETSELECTIONEND) - SendEditor(SCI_GETSELECTIONSTART); wParam = 0; } else if (message == SCI_GETCURLINE) { int line = SendEditor(SCI_LINEFROMPOSITION, SendEditor(SCI_GETCURRENTPOS)); l = SendEditor(SCI_LINELENGTH, line); wParam = l; } else if (message == SCI_GETTEXT) { l = SendEditor(SCI_GETLENGTH); wParam = l; } else if (message == SCI_GETLINE) { l = SendEditor(SCI_LINELENGTH, wParam); } else { l = 0; //unsupported calls EM } answercmd = "stringinfo:"; } else { //int answer answercmd = "intinfo:"; l = 30; } size_t alen = strlen(answercmd); char *tbuff = new char[l + alen + 1]; strcpy(tbuff, answercmd); if (*params == 'S') lParam = reinterpret_cast(tbuff + alen); if (l > 0) rep = SendEditor(message, wParam, lParam); if (*params == 'I') sprintf(tbuff + alen, "%0d", rep); extender->OnMacro("macro", tbuff); delete []tbuff; } void SciTEBase::LoadMRUAndSession(bool allowLoadSession) { InitialiseBuffers(); if (props.GetInt("save.recent")) { LoadRecentMenu(); } if (allowLoadSession && props.GetInt("buffers") && props.GetInt("save.session")) { LoadSession(""); } } /** * Process all the command line arguments. * Arguments that start with '-' (also '/' on Windows) are switches or commands with * other arguments being file names which are opened. Commands are distinguished * from switches by containing a ':' after the command name. * The print switch /p is special cased. * Processing occurs in two phases to allow switches that occur before any file opens * to be evaluated before creating the UI. * Call twice, first with phase=0, then with phase=1 after creating UI. */ bool SciTEBase::ProcessCommandLine(SString &args, int phase) { bool performPrint = false; bool evaluate = phase == 0; WordList wlArgs(true); wlArgs.Set(args.c_str()); for (int i = 0; i < wlArgs.len; i++) { char *arg = wlArgs[i]; if (IsSwitchCharacter(arg[0])) { arg++; if ((tolower(arg[0]) == 'p') && (strlen(arg) == 1)) { performPrint = true; } else { if (AfterName(arg) == ':') { if (isprefix(arg, "open:") || isprefix(arg, "loadsession:")) { if (phase == 0) return performPrint; else evaluate = true; } if (evaluate) PerformOne(arg); } else { if (evaluate) props.ReadLine(arg, true, ""); } } } else { // Not a switch: it is a file name if (phase == 0) return performPrint; else evaluate = true; LoadMRUAndSession(false); if (!PreOpenCheck(arg)) Open(arg, ofQuiet); } } if (phase == 1) { // If we have finished with all args and no buffer is open // try to load session. if (buffers.size == 0) { LoadMRUAndSession(true); } // No open file after session load so create empty document. if (IsUntitledFileName(fullPath) && buffers.length == 1 && !buffers.buffers[0].isDirty) { Open(""); } } return performPrint; } // Implement ExtensionAPI methods sptr_t SciTEBase::Send(Pane p, unsigned int msg, uptr_t wParam, sptr_t lParam) { if (p == paneEditor) return SendEditor(msg, wParam, lParam); else return SendOutput(msg, wParam, lParam); } char *SciTEBase::Range(Pane p, int start, int end) { int len = end - start; char *s = new char[len + 1]; if (s) { if (p == paneEditor) GetRange(wEditor, start, end, s); else GetRange(wOutput, start, end, s); } return s; } void SciTEBase::Remove(Pane p, int start, int end) { // Should have a scintilla call for this if (p == paneEditor) { SendEditor(SCI_SETSEL, start, end); SendEditor(SCI_CLEAR); } else { SendOutput(SCI_SETSEL, start, end); SendOutput(SCI_CLEAR); } } void SciTEBase::Insert(Pane p, int pos, const char *s) { if (p == paneEditor) SendEditorString(SCI_INSERTTEXT, pos, s); else SendOutputString(SCI_INSERTTEXT, pos, s); } void SciTEBase::Trace(const char *s) { MakeOutputVisible(); OutputAppendString(s); } char *SciTEBase::Property(const char *key) { SString value = props.GetExpanded(key); char *retval = new char[value.length() + 1]; if (retval) strcpy(retval, value.c_str()); return retval; } void SciTEBase::SetProperty(const char *key, const char *val) { props.Set(key, val); needReadProperties = true; } void SciTEBase::UnsetProperty(const char *key) { props.Unset(key); needReadProperties = true; } uptr_t SciTEBase::GetInstance() { return 0; } void SciTEBase::ShutDown() { QuitProgram(); } void SciTEBase::Perform(const char *actionList) { char *actionsDup = StringDup(actionList); char *actions = actionsDup; char *nextAct; while ((nextAct = strchr(actions, '\n')) != NULL) { *nextAct = '\0'; PerformOne(actions); actions = nextAct + 1; } PerformOne(actions); delete []actionsDup; } usr/src/sdlBasic/src/sdlBasic/src/SciTEIO.cxx0000777000076500007660000006443110463134202016174 0ustar // SciTE - Scintilla based Text Editor /** @file SciTEIO.cxx ** Manage input and output with the system. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include "Platform.h" #if PLAT_FOX #include #endif #if PLAT_GTK #include #include #endif #if PLAT_WIN #define _WIN32_WINNT 0x0400 #ifdef _MSC_VER // windows.h, et al, use a lot of nameless struct/unions - can't fix it, so allow it #pragma warning(disable: 4201) #endif #include #ifdef _MSC_VER // okay, that's done, don't allow it in our code #pragma warning(default: 4201) #endif #include // For chdir #ifdef _MSC_VER #include #endif #ifdef __BORLANDC__ #include #endif #endif #include "SciTE.h" #include "PropSet.h" #include "Accessor.h" #include "WindowAccessor.h" #include "Scintilla.h" #include "Extender.h" #include "Utf8_16.h" #include "SciTEBase.h" #ifdef unix const char pathSepString[] = "/"; const char pathSepChar = '/'; const char listSepString[] = ":"; const char configFileVisibilityString[] = "."; const char propUserFileName[] = ".sdlBasicUser.properties"; const char fileRead[] = "rb"; const char fileWrite[] = "wb"; #endif #ifdef __vms const char pathSepString[] = "/"; const char pathSepChar = '/'; const char listSepString[] = ":"; const char configFileVisibilityString[] = ""; const char propUserFileName[] = "sdlBasicUser.properties"; const char fileRead[] = "r"; const char fileWrite[] = "w"; #endif #ifdef WIN32 // Windows const char pathSepString[] = "\\"; const char pathSepChar = '\\'; const char listSepString[] = ";"; const char configFileVisibilityString[] = ""; const char propUserFileName[] = "../share/sdlBasic/sdlBasicUser.properties"; const char fileRead[] = "rb"; const char fileWrite[] = "wb"; const char propGlobalFileName[] = "../share/sdlBasic/Global.properties"; const char propAbbrevFileName[] = "../share/sdlBasic/abbrev.properties"; #else const char propGlobalFileName[] = "Global.properties"; const char propAbbrevFileName[] = "abbrev.properties"; #endif #define PROPERTIES_EXTENSION ".properties" static bool IsPropertiesFile(char *filename) { size_t nameLen = strlen(filename); size_t propLen = strlen(PROPERTIES_EXTENSION); if (nameLen <= propLen) return false; if (EqualCaseInsensitive(filename + nameLen - propLen, PROPERTIES_EXTENSION)) return true; return false; } bool SciTEBase::IsAbsolutePath(const char *path) { if (!path || *path == '\0') return false; #ifdef unix if (path[0] == '/') return true; #endif #ifdef __vms if (path[0] == '/') return true; #endif #ifdef WIN32 if (path[0] == '\\' || path[1] == ':') // UNC path or drive separator return true; #endif return false; } void SciTEBase::FixFilePath() { // Only used on Windows to fix the case of file names } #ifdef __vms const char *VMSToUnixStyle(const char *fileName) { // possible formats: // o disk:[dir.dir]file.type // o logical:file.type // o [dir.dir]file.type // o file.type // o /disk//dir/dir/file.type // o /disk/dir/dir/file.type static char unixStyleFileName[MAX_PATH + 20]; if (strchr(fileName, ':') == NULL && strchr(fileName, '[') == NULL) { // o file.type // o /disk//dir/dir/file.type // o /disk/dir/dir/file.type if (strstr (fileName, "//") == NULL) { return fileName; } strcpy(unixStyleFileName, fileName); char *p; while ((p = strstr (unixStyleFileName, "//")) != NULL) { strcpy (p, p + 1); } return unixStyleFileName; } // o disk:[dir.dir]file.type // o logical:file.type // o [dir.dir]file.type if (fileName [0] == '/') { strcpy(unixStyleFileName, fileName); } else { unixStyleFileName [0] = '/'; strcpy(unixStyleFileName + 1, fileName); char *p = strstr(unixStyleFileName, ":["); if (p == NULL) { // o logical:file.type p = strchr(unixStyleFileName, ':'); *p = '/'; } else { *p = '/'; strcpy(p + 1, p + 2); char *end = strchr(unixStyleFileName, ']'); if (*end != NULL) { *end = '/'; } while (p = strchr(unixStyleFileName, '.'), p != NULL && p < end) { *p = '/'; } } } return unixStyleFileName; } // VMSToUnixStyle #endif void SciTEBase::SetFileName(const char *openName, bool fixCase) { if (openName[0] == '\"') { // openName is surrounded by double quotes char pathCopy[MAX_PATH + 1]; pathCopy[0] = '\0'; strncpy(pathCopy, openName + 1, MAX_PATH); pathCopy[MAX_PATH] = '\0'; if (pathCopy[strlen(pathCopy) - 1] == '\"') { pathCopy[strlen(pathCopy) - 1] = '\0'; } AbsolutePath(fullPath, pathCopy, MAX_PATH); } else if (openName[0]) { AbsolutePath(fullPath, openName, MAX_PATH); } else { fullPath[0] = '\0'; } // Break fullPath into directory and file name using working directory for relative paths dirName[0] = '\0'; char *cpDirEnd = strrchr(fullPath, pathSepChar); if (IsAbsolutePath(fullPath)) { // Absolute path strcpy(fileName, cpDirEnd + 1); strcpy(dirName, fullPath); dirName[cpDirEnd - fullPath] = '\0'; //Platform::DebugPrintf("SetFileName: <%s> <%s>\n", fileName, dirName); } else { // Relative path. Since we ran AbsolutePath, we probably are here because fullPath is empty. GetDocumentDirectory(dirName, sizeof(dirName)); //Platform::DebugPrintf("Working directory: <%s>\n", dirName); if (cpDirEnd) { // directories and file name strcpy(fileName, cpDirEnd + 1); *cpDirEnd = '\0'; strncat(dirName, pathSepString, sizeof(dirName)); strncat(dirName, fullPath, sizeof(dirName)); } else { // Just a file name strcpy(fileName, fullPath); } } // Rebuild fullPath from directory and name strcpy(fullPath, dirName); strcat(fullPath, pathSepString); strcat(fullPath, fileName); //Platform::DebugPrintf("Path: <%s>\n", fullPath); if (fixCase) { FixFilePath(); } char fileBase[MAX_PATH]; strcpy(fileBase, fileName); char *extension = strrchr(fileBase, '.'); if (extension) { *extension = '\0'; strcpy(fileExt, extension + 1); } else { // No extension fileExt[0] = '\0'; } ReadLocalPropFile(); props.Set("FilePath", fullPath); props.Set("FileDir", dirName); props.Set("FileName", fileBase); props.Set("FileExt", fileExt); props.Set("FileNameExt", fileName); SetWindowName(); if (buffers.buffers) buffers.buffers[buffers.Current()].Set(fullPath); BuffersMenu(); } bool SciTEBase::Exists(const char *dir, const char *path, char *testPath) { char copyPath[MAX_PATH]; if (IsAbsolutePath(path) || !dir) { strcpy(copyPath, path); } else if (dir) { if ((strlen(dir) + strlen(pathSepString) + strlen(path) + 1) > MAX_PATH) return false; strcpy(copyPath, dir); strcat(copyPath, pathSepString); strcat(copyPath, path); } if (!copyPath[0]) return false; FILE *fp = fopen(copyPath, fileRead); if (!fp) return false; fclose(fp); if (testPath) AbsolutePath(testPath, copyPath, MAX_PATH); return true; } bool BuildPath(char *path, const char *dir, const char *fileName, unsigned int lenPath) { *path = '\0'; if ((strlen(dir) + strlen(pathSepString) + strlen(fileName)) < lenPath) { strcpy(path, dir); strcat(path, pathSepString); strcat(path, fileName); return true; } return false; } time_t GetModTime(const char *fullPath) { if (IsUntitledFileName(fullPath)) return 0; struct stat statusFile; if (stat(fullPath, &statusFile) != -1) return statusFile.st_mtime; else return 0; } void SciTEBase::CountLineEnds(int &linesCR, int &linesLF, int &linesCRLF) { linesCR = 0; linesLF = 0; linesCRLF = 0; int lengthDoc = LengthDocument(); char chPrev = ' '; WindowAccessor acc(wEditor.GetID(), props); for (int i = 0; i < lengthDoc; i++) { char ch = acc[i]; char chNext = acc.SafeGetCharAt(i + 1); if (ch == '\r') { if (chNext == '\n') linesCRLF++; else linesCR++; } else if (ch == '\n') { if (chPrev != '\r') { linesLF++; } } chPrev = ch; } } static bool isEncodingChar(char ch) { return (ch == '_') || (ch == '-') || (ch == '.') || (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9'); } static bool isSpaceChar(char ch) { return (ch == ' ') || (ch == '\t'); } static SString ExtractLine(const char *buf, size_t length) { unsigned int endl = 0; if (length > 0) { while ((endl < length) && (buf[endl] != '\r') && (buf[endl] != '\n')) { endl++; } if (((endl+1) < length) && (buf[endl] == '\r') && (buf[endl+1] == '\n')) { endl++; } if (endl < length) { endl++; } } return SString(buf, 0, endl); } static const char codingCookie[] = "coding"; static UniMode CookieValue(const SString &s) { int posCoding = s.search(codingCookie); if (posCoding >= 0) { posCoding += static_cast(strlen(codingCookie)); if ((s[posCoding] == ':') || (s[posCoding] == '=')) { posCoding++; if ((s[posCoding] == '\"') || (s[posCoding] == '\'')) { posCoding++; } while ((posCoding < static_cast(s.length())) && (isSpaceChar(s[posCoding]))) { posCoding++; } size_t endCoding = static_cast(posCoding); while ((endCoding < s.length()) && (isEncodingChar(s[endCoding]))) { endCoding++; } SString code(s.c_str(), posCoding, endCoding); code.lowercase(); if (code == "utf-8") { return uniCookie; } } } return uni8Bit; } void SciTEBase::DiscoverEOLSetting() { int linesCR; int linesLF; int linesCRLF; SetEol(); CountLineEnds(linesCR, linesLF, linesCRLF); if (((linesLF >= linesCR) && (linesLF > linesCRLF)) || ((linesLF > linesCR) && (linesLF >= linesCRLF))) SendEditor(SCI_SETEOLMODE, SC_EOL_LF); else if (((linesCR >= linesLF) && (linesCR > linesCRLF)) || ((linesCR > linesLF) && (linesCR >= linesCRLF))) SendEditor(SCI_SETEOLMODE, SC_EOL_CR); else if (((linesCRLF >= linesLF) && (linesCRLF > linesCR)) || ((linesCRLF > linesLF) && (linesCRLF >= linesCR))) SendEditor(SCI_SETEOLMODE, SC_EOL_CRLF); } void SciTEBase::DiscoverIndentSetting() { int lengthDoc = LengthDocument(); WindowAccessor acc(wEditor.GetID(), props); bool newline = true; int indent = 0; // current line indentation int tabSizes[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // number of lines with corresponding indentation (index 0 - tab) int prevIndent = 0; // previous line indentation int prevTabSize = -1; // previous line tab size for (int i = 0; i < lengthDoc; i++) { char ch = acc[i]; if (ch == '\r' || ch == '\n') { indent = 0; newline = true; } else if (newline && ch == ' ') { indent++; } else if (newline) { if (indent) { if (indent == prevIndent && prevTabSize != -1) { tabSizes[prevTabSize]++; } else if (indent > prevIndent && prevIndent != -1) { if (indent - prevIndent <= 8) { prevTabSize = indent - prevIndent; tabSizes[prevTabSize]++; } else { prevTabSize = -1; } } prevIndent = indent; } else if (ch == '\t') { tabSizes[0]++; prevIndent = -1; } else { prevIndent = 0; } newline = false; } } // maximum non-zero indent int topTabSize = -1; for (int j = 0; j <= 8; j++) { if (tabSizes[j] && (topTabSize == -1 || tabSizes[j] > tabSizes[topTabSize])) { topTabSize = j; } } // set indentation if (topTabSize == 0) { SendEditor(SCI_SETUSETABS, 1); } else if (topTabSize != -1) { SendEditor(SCI_SETUSETABS, 0); SendEditor(SCI_SETINDENT, topTabSize); } } void SciTEBase::OpenFile(int fileSize, bool suppressMessage) { Utf8_16_Read convert; FILE *fp = fopen(fullPath, fileRead); if (fp) { fileModTime = GetModTime(fullPath); fileModLastAsk = fileModTime; SendEditor(SCI_BEGINUNDOACTION); // Group together clear and insert SendEditor(SCI_CLEARALL); char data[blockSize]; size_t lenFile = fread(data, 1, sizeof(data), fp); SString l1 = ExtractLine(data, lenFile); SString l2 = ExtractLine(data+l1.length(), lenFile-l1.length()); SendEditor(SCI_ALLOCATE, fileSize + 1000); while (lenFile > 0) { lenFile = convert.convert(data, lenFile); SendEditorString(SCI_ADDTEXT, lenFile, convert.getNewBuf()); lenFile = fread(data, 1, sizeof(data), fp); } fclose(fp); SendEditor(SCI_ENDUNDOACTION); unicodeMode = static_cast( static_cast(convert.getEncoding())); // Check the first two lines for coding cookies if (unicodeMode == uni8Bit) { unicodeMode = CookieValue(l1); if (unicodeMode == uni8Bit) { unicodeMode = CookieValue(l2); } } if (unicodeMode != uni8Bit) { // Override the code page if Unicode codePage = SC_CP_UTF8; } else { codePage = props.GetInt("code.page"); } SendEditor(SCI_SETCODEPAGE, codePage); if (props.GetInt("eol.auto")) { DiscoverEOLSetting(); } if (props.GetInt("indent.auto")) { DiscoverIndentSetting(); } } else if (!suppressMessage) { SString msg = LocaliseMessage("Could not open file '^0'.", fullPath); WindowMessageBox(wSciTE, msg, MB_OK | MB_ICONWARNING); } SendEditor(SCI_SETUNDOCOLLECTION, 1); // Flick focus to the output window and back to // ensure palette realised correctly. WindowSetFocus(wOutput); WindowSetFocus(wEditor); SendEditor(SCI_SETSAVEPOINT); if (props.GetInt("fold.on.open") > 0) { FoldAll(); } SendEditor(SCI_GOTOPOS, 0); Redraw(); } bool SciTEBase::PreOpenCheck(const char *) { return false; } static int GetFileLength(const char *filePath) { int size = -1; if (filePath && *filePath) { FILE *fp = fopen(filePath, fileRead); if (fp) { fseek(fp, 0, SEEK_END); size = ftell(fp); fseek(fp, 0, SEEK_SET); fclose(fp); } } return size; } bool SciTEBase::Open(const char *file, OpenFlags of) { InitialiseBuffers(); if (!file) { SString msg = LocaliseMessage("Bad file."); WindowMessageBox(wSciTE, msg, MB_OK | MB_ICONWARNING); return false; } #ifdef __vms static char fixedFileName[MAX_PATH]; strcpy(fixedFileName, VMSToUnixStyle(file)); file = fixedFileName; #endif char absPath[MAX_PATH]; AbsolutePath(absPath, file, MAX_PATH); int index = buffers.GetDocumentByName(absPath); if (index >= 0) { SetDocumentAt(index); DeleteFileStackMenu(); SetFileStackMenu(); if (!(of & ofForceLoad)) // Just rotate into view return true; } // See if we can have a buffer for the file to open if (!CanMakeRoom(!(of & ofNoSaveIfDirty))) { return false; } int size = 0; if (absPath[0] != '\0') { // Real file, not empty buffer size = GetFileLength(absPath); int maxSize = props.GetInt("max.file.size"); if (maxSize > 0 && size > maxSize) { SString sSize(size), sMaxSize(maxSize); SString msg = LocaliseMessage("File '^0' is ^1 bytes long,\n" "larger than the ^2 bytes limit set in the properties.\n" "Do you still want to open it?", absPath, sSize.c_str(), sMaxSize.c_str()); int answer = WindowMessageBox(wSciTE, msg, MB_YESNO | MB_ICONWARNING); if (answer != IDYES) { return false; } } } if (buffers.size == buffers.length) { AddFileToStack(fullPath, GetSelection(), GetCurrentScrollPosition()); ClearDocument(); if (extender) extender->InitBuffer(buffers.Current()); } else { if (index < 0 || !(of & ofForceLoad)) { // No new buffer, already opened New(); } } //Platform::DebugPrintf("Opening %s\n", file); SetFileName(absPath); overrideExtension = ""; ReadProperties(); SetIndentSettings(); UpdateBuffersCurrent(); SizeSubWindows(); if (fileName[0]) { SendEditor(SCI_SETREADONLY, 0); SendEditor(SCI_CANCEL); if (of & ofPreserveUndo) { SendEditor(SCI_BEGINUNDOACTION); } else { SendEditor(SCI_SETUNDOCOLLECTION, 0); } OpenFile(size, of & ofQuiet); if (of & ofPreserveUndo) { SendEditor(SCI_ENDUNDOACTION); } else { SendEditor(SCI_EMPTYUNDOBUFFER); } isReadOnly = props.GetInt("read.only"); SendEditor(SCI_SETREADONLY, isReadOnly); } RemoveFileFromStack(fullPath); DeleteFileStackMenu(); SetFileStackMenu(); SetWindowName(); if (lineNumbers && lineNumbersExpand) SetLineNumberWidth(); UpdateStatusBar(true); if (extender) extender->OnOpen(fullPath); return true; } // Returns true if editor should get the focus bool SciTEBase::OpenSelected() { char selectedFilename[MAX_PATH]; char cTag[200]; unsigned long lineNumber = 0; SString selName = SelectionFilename(); strncpy(selectedFilename, selName.c_str(), MAX_PATH); selectedFilename[MAX_PATH - 1] = '\0'; if (selectedFilename[0] == '\0') { WarnUser(warnWrongFile); return false; // No selection } SString fileNameForExtension = ExtensionFileName(); SString openSuffix = props.GetNewExpand("open.suffix.", fileNameForExtension.c_str()); strcat(selectedFilename, openSuffix.c_str()); if (EqualCaseInsensitive(selectedFilename, fileName) || EqualCaseInsensitive(selectedFilename, fullPath)) { WarnUser(warnWrongFile); return true; // Do not open if it is the current file! } cTag[0] = '\0'; if (IsPropertiesFile(fileName) && strchr(selectedFilename, '.') == 0 && strlen(selectedFilename) + strlen(PROPERTIES_EXTENSION) < MAX_PATH) { // We are in a properties file and try to open a file without extension, // we suppose we want to open an imported .properties file // So we append the correct extension to open the included file. // Maybe we should check if the filename is preceded by "import"... strcat(selectedFilename, PROPERTIES_EXTENSION); } else { // Check if we have a line number (error message or grep result) // A bit of duplicate work with DecodeMessage, but we don't know // here the format of the line, so we do guess work. // Can't do much for space separated line numbers anyway... char *endPath = strchr(selectedFilename, '('); if (endPath) { // Visual Studio error message: F:\scite\src\SciTEBase.h(312): bool Exists( lineNumber = atol(endPath + 1); } else { endPath = strchr(selectedFilename + 2, ':'); // Skip Windows' drive separator if (endPath) { // grep -n line, perhaps gcc too: F:\scite\src\SciTEBase.h:312: bool Exists( lineNumber = atol(endPath + 1); } } if (lineNumber > 0) { *endPath = '\0'; } #if PLAT_WIN if (strncmp(selectedFilename, "http:", 5) == 0 || strncmp(selectedFilename, "https:", 6) == 0 || strncmp(selectedFilename, "ftp:", 4) == 0 || strncmp(selectedFilename, "ftps:", 5) == 0 || strncmp(selectedFilename, "news:", 5) == 0 || strncmp(selectedFilename, "mailto:", 7) == 0) { SString cmd = selectedFilename; AddCommand(cmd, "", jobShell); return false; // Job is done } #endif // Support the ctags format if (lineNumber == 0) { GetCTag(cTag, sizeof(cTag)); } } char path[MAX_PATH]; *path = '\0'; // Don't load the path of the current file if the selected // filename is an absolute pathname if (!IsAbsolutePath(selectedFilename)) { GetDocumentDirectory(path, sizeof(path)); // If not there, look in openpath if (!Exists(path, selectedFilename, NULL)) { SString openPath = props.GetNewExpand( "openpath.", fileNameForExtension.c_str()); while (openPath.length()) { SString tryPath(openPath); int sepIndex = tryPath.search(listSepString); if (sepIndex > 0) { tryPath.remove(sepIndex, 0); openPath.remove(0,sepIndex+1); } else { openPath.clear(); } if (Exists(tryPath.c_str(), selectedFilename, NULL)) { strncpy(path, tryPath.c_str(), sizeof(path)-1); path[sizeof(path)-1] = '\0'; break; } } } } if (Exists(path, selectedFilename, path)) { if (Open(path)) { if (lineNumber > 0) { SendEditor(SCI_GOTOLINE, lineNumber - 1); } else if (cTag[0] != '\0') { if (atol(cTag) > 0) { SendEditor(SCI_GOTOLINE, atol(cTag) - 1); } else { findWhat = cTag; FindNext(false); } } return true; } } else { WarnUser(warnWrongFile); } return false; } void SciTEBase::Revert() { RecentFile rf = GetFilePosition(); OpenFile(GetFileLength(fullPath), false); DisplayAround(rf); } void SciTEBase::CheckReload() { if (props.GetInt("load.on.activate")) { // Make a copy of fullPath as otherwise it gets aliased in Open char fullPathToCheck[MAX_PATH]; strcpy(fullPathToCheck, fullPath); time_t newModTime = GetModTime(fullPathToCheck); //Platform::DebugPrintf("Times are %d %d\n", fileModTime, newModTime); if (newModTime > fileModTime) { RecentFile rf = GetFilePosition(); OpenFlags of = props.GetInt("reload.preserves.undo") ? ofPreserveUndo : ofNone; if (isDirty || props.GetInt("are.you.sure.on.reload") != 0) { if ((0 == dialogsOnScreen) && (newModTime != fileModLastAsk)) { SString msg; if (isDirty) { msg = LocaliseMessage( "The file '^0' has been modified. Should it be reloaded?", fullPathToCheck); } else { msg = LocaliseMessage( "The file '^0' has been modified outside SciTE. Should it be reloaded?", fileName); } int decision = WindowMessageBox(wSciTE, msg, MB_YESNO); if (decision == IDYES) { Open(fullPathToCheck, static_cast(of | ofForceLoad)); DisplayAround(rf); } fileModLastAsk = newModTime; } } else { Open(fullPathToCheck, static_cast(of | ofForceLoad)); DisplayAround(rf); } } } } void SciTEBase::Activate(bool activeApp) { if (activeApp) { CheckReload(); } else { if (props.GetInt("save.on.deactivate")) { SaveTitledBuffers(); } } } int SciTEBase::SaveIfUnsure(bool forceQuestion) { if ((isDirty) && (LengthDocument() || fileName[0] || forceQuestion)) { if (props.GetInt("are.you.sure", 1) || IsUntitledFileName(fullPath) || forceQuestion) { SString msg; if (fileName[0]) { msg = LocaliseMessage("Save changes to '^0'?", fullPath); } else { msg = LocaliseMessage("Save changes to (Untitled)?"); } int decision = WindowMessageBox(wSciTE, msg, MB_YESNOCANCEL | MB_ICONQUESTION); if (decision == IDYES) { if (!Save()) decision = IDCANCEL; } return decision; } else { if (!Save()) return IDCANCEL; } } return IDYES; } int SciTEBase::SaveIfUnsureAll(bool forceQuestion) { if (SaveAllBuffers(forceQuestion) == IDCANCEL) { return IDCANCEL; } if (props.GetInt("save.recent", 0)) { for (int i = 0; i < buffers.length; ++i) { Buffer buff = buffers.buffers[i]; AddFileToStack(buff.FullPath(), buff.selection, buff.scrollPosition); } SaveRecentStack(); } if (props.GetInt("buffers") && props.GetInt("save.session", 0)) SaveSession(""); // Definitely going to exit now, so delete all documents // Set editor back to initial document SendEditor(SCI_SETDOCPOINTER, 0, buffers.buffers[0].doc); // Release all the extra documents for (int j = 0; j < buffers.size; j++) { if (buffers.buffers[j].doc) SendEditor(SCI_RELEASEDOCUMENT, 0, buffers.buffers[j].doc); } // Initial document will be deleted when editor deleted return IDYES; } int SciTEBase::SaveIfUnsureForBuilt() { if (isDirty) { if (props.GetInt("are.you.sure.for.build", 0)) return SaveIfUnsure(true); Save(); } return IDYES; } void SciTEBase::StripTrailingSpaces() { int maxLines = SendEditor(SCI_GETLINECOUNT); for (int line = 0; line < maxLines; line++) { int lineStart = SendEditor(SCI_POSITIONFROMLINE, line); int lineEnd = SendEditor(SCI_GETLINEENDPOSITION, line); int i = lineEnd-1; char ch = static_cast(SendEditor(SCI_GETCHARAT, i)); while ((i >= lineStart) && ((ch == ' ') || (ch == '\t'))) { i--; ch = static_cast(SendEditor(SCI_GETCHARAT, i)); } if (i < (lineEnd-1)) { SendEditor(SCI_SETTARGETSTART, i + 1); SendEditor(SCI_SETTARGETEND, lineEnd); SendEditorString(SCI_REPLACETARGET, 0, ""); } } } void SciTEBase::EnsureFinalNewLine() { int maxLines = SendEditor(SCI_GETLINECOUNT); bool appendNewLine = maxLines == 1; int endDocument = SendEditor(SCI_POSITIONFROMLINE, maxLines); if (maxLines > 1) { appendNewLine = endDocument > SendEditor(SCI_POSITIONFROMLINE, maxLines-1); } if (appendNewLine) { const char *eol = "\n"; switch (SendEditor(SCI_GETEOLMODE)) { case SC_EOL_CRLF: eol = "\r\n"; break; case SC_EOL_CR: eol = "\r"; break; } SendEditorString(SCI_INSERTTEXT, endDocument, eol); } } /** * Writes the buffer to the given filename. */ bool SciTEBase::SaveBuffer(const char *saveName) { bool retVal = false; // Perform clean ups on text before saving SendEditor(SCI_BEGINUNDOACTION); if (props.GetInt("strip.trailing.spaces")) StripTrailingSpaces(); if (props.GetInt("ensure.final.line.end")) EnsureFinalNewLine(); if (props.GetInt("ensure.consistent.line.ends")) SendEditor(SCI_CONVERTEOLS, SendEditor(SCI_GETEOLMODE)); if (extender) extender->OnBeforeSave(saveName); SendEditor(SCI_ENDUNDOACTION); Utf8_16_Write convert; if (unicodeMode != uniCookie) { // Save file with cookie without BOM. convert.setEncoding(static_cast( static_cast(unicodeMode))); } FILE *fp = convert.fopen(saveName, fileWrite); if (fp) { char data[blockSize + 1]; int lengthDoc = LengthDocument(); retVal = true; for (int i = 0; i < lengthDoc; i += blockSize) { int grabSize = lengthDoc - i; if (grabSize > blockSize) grabSize = blockSize; // TODO: This is wrong as it can retrieve partial UTF-8 characters. GetRange(wEditor, i, i + grabSize, data); size_t written = convert.fwrite(data, grabSize); if (written == 0) { retVal = false; break; } } convert.fclose(); if (extender) extender->OnSave(saveName); } UpdateStatusBar(true); return retVal; } void SciTEBase::ReloadProperties() { ReadGlobalPropFile(); SetImportMenu(); ReadLocalPropFile(); ReadAbbrevPropFile(); ReadProperties(); SetWindowName(); BuffersMenu(); Redraw(); } // Returns false if cancelled or failed to save bool SciTEBase::Save() { if (fileName[0]) { if (props.GetInt("save.deletes.first")) { unlink(fullPath); } if (SaveBuffer(fullPath)) { fileModTime = GetModTime(fullPath); SendEditor(SCI_SETSAVEPOINT); if (IsPropertiesFile(fileName)) { ReloadProperties(); } } else { SString msg = LocaliseMessage( "Could not save file '^0'. Save under a different name?", fullPath); int decision = WindowMessageBox(wSciTE, msg, MB_YESNO | MB_ICONWARNING); if (decision == IDYES) { return SaveAs(); } return false; } return true; } else { return SaveAs(); } } bool SciTEBase::SaveAs(const char *file) { if (file && *file) { SetFileName(file); Save(); ReadProperties(); SendEditor(SCI_CLEARDOCUMENTSTYLE); SendEditor(SCI_COLOURISE, 0, -1); Redraw(); SetWindowName(); BuffersMenu(); return true; } else { return SaveAsDialog(); } } usr/src/sdlBasic/src/sdlBasic/src/IFaceTable.h0000777000076500007660000000352110463133550016337 0ustar // SciTE - Scintilla based Text Editor /** @file IFaceTable.h ** SciTE iface function and constant descriptors. **/ // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef IFACETABLE_H #define IFACETABLE_H enum IFaceType { iface_void, iface_int, iface_length, iface_position, iface_colour, iface_bool, iface_keymod, iface_string, iface_stringresult, iface_cells, iface_textrange, iface_findtext, iface_formatrange }; struct IFaceConstant { const char *name; int value; }; struct IFaceFunction { const char *name; int value; IFaceType returnType; IFaceType paramType[2]; }; struct IFaceProperty { const char *name; int getter; int setter; IFaceType valueType; IFaceType paramType; IFaceFunction GetterFunction() const { IFaceFunction result = {"(property getter)",getter,valueType,{paramType,iface_void}}; return result; } IFaceFunction SetterFunction() const { IFaceFunction result = {"(property setter)",setter,iface_void,{valueType, iface_void}}; if (paramType != iface_void) { result.paramType[0] = paramType; result.paramType[1] = valueType; } return result; } }; struct IFaceObject { const char *name; const char *prefix; IFaceType indexType; }; class IFaceTable { public: static const IFaceFunction * const functions; static const IFaceConstant * const constants; static const IFaceProperty * const properties; static const int functionCount; static const int constantCount; static const int propertyCount; static int FindConstant(const char *name); static int FindFunction(const char *name); static int FindFunctionByConstantName(const char *name); static int FindProperty(const char *name); static int GetConstantName(int value, char *nameOut, unsigned nameBufferLen); }; #endif usr/src/sdlBasic/src/sdlBasic/src/MultiplexExtension.cxx0000777000076500007660000001447710463133550020667 0ustar // SciTE - Scintilla based Text Editor /** @file MultiplexExtension.cxx ** Extension that manages / dispatches messages to multiple extensions. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include "MultiplexExtension.h" MultiplexExtension::MultiplexExtension(): extensions(0), extensionCount(0), host(0) {} MultiplexExtension::~MultiplexExtension() { Finalise(); delete [] extensions; } bool MultiplexExtension::RegisterExtension(Extension &ext_) { for (int i=0; i < extensionCount; ++i) if (extensions[i] == &ext_) return true; Extension **newExtensions = new Extension *[extensionCount+1]; if (newExtensions) { if (extensions) { for (int i = 0; i < extensionCount; ++i) newExtensions[i] = extensions[i]; delete[] extensions; } extensions = newExtensions; extensions[extensionCount++] = &ext_; if (host) ext_.Initialise(host); return true; } else { return false; } } // Initialise, Finalise, Clear, and SetProperty get broadcast to all extensions, // regardless of return code. This does not strictly match the documentation, but // seems like the right thing to do. The others methods stop processing once one // Extension returns true. // // Load will eventually be changed to be smarter, so that each Extension can have // something different loaded into it. OnExecute and OnMacro might also be made // smarter with a syntax to indicate to which extension the command should be sent. bool MultiplexExtension::Initialise(ExtensionAPI *host_) { if (host) Finalise(); // shouldn't happen. host = host_; for (int i=0; i < extensionCount; ++i) extensions[i]->Initialise(host_); return false; } bool MultiplexExtension::Finalise() { if (host) { for (int i=extensionCount-1; i>=0; --i) extensions[i]->Finalise(); host = 0; } return false; } bool MultiplexExtension::Clear() { for (int i=0; iClear(); return false; } bool MultiplexExtension::Load(const char *filename) { bool handled = false; for (int i=0; iLoad(filename)) handled = true; return handled; } bool MultiplexExtension::InitBuffer(int index) { for (int i=0; iInitBuffer(index); return false; } bool MultiplexExtension::ActivateBuffer(int index) { for (int i=0; iActivateBuffer(index); return false; } bool MultiplexExtension::RemoveBuffer(int index) { for (int i=0; iRemoveBuffer(index); return false; } bool MultiplexExtension::OnOpen(const char *filename) { bool handled = false; for (int i=0; iOnOpen(filename)) handled = true; return handled; } bool MultiplexExtension::OnSwitchFile(const char *filename) { bool handled = false; for (int i=0; iOnSwitchFile(filename)) handled = true; return handled; } bool MultiplexExtension::OnBeforeSave(const char *filename) { bool handled = false; for (int i=0; iOnBeforeSave(filename)) handled = true; return handled; } bool MultiplexExtension::OnSave(const char *filename) { bool handled = false; for (int i=0; iOnSave(filename)) handled = true; return handled; } bool MultiplexExtension::OnChar(char c) { bool handled = false; for (int i=0; iOnChar(c)) handled = true; return handled; } bool MultiplexExtension::OnExecute(const char *cmd) { bool handled = false; for (int i=0; iOnExecute(cmd)) handled = true; return handled; } bool MultiplexExtension::OnSavePointReached() { bool handled = false; for (int i=0; iOnSavePointReached()) handled = true; return handled; } bool MultiplexExtension::OnSavePointLeft() { bool handled = false; for (int i=0; iOnSavePointLeft()) handled = true; return handled; } bool MultiplexExtension::OnStyle(unsigned int p, int q, int r, Accessor *s) { bool handled = false; for (int i=0; iOnStyle(p,q,r,s)) handled = true; return handled; } bool MultiplexExtension::OnDoubleClick() { bool handled = false; for (int i=0; iOnDoubleClick()) handled = true; return handled; } bool MultiplexExtension::OnUpdateUI() { bool handled = false; for (int i=0; iOnUpdateUI()) handled = true; return handled; } bool MultiplexExtension::OnMarginClick() { bool handled = false; for (int i=0; iOnMarginClick()) handled = true; return handled; } bool MultiplexExtension::OnMacro(const char *p, const char *q) { bool handled = false; for (int i=0; iOnMacro(p,q)) handled = true; return handled; } bool MultiplexExtension::OnUserListSelection(int listType, const char *selection) { bool handled = false; for (int i=0; iOnUserListSelection(listType, selection)) handled = true; return handled; } bool MultiplexExtension::SendProperty(const char *prop) { for (int i=0; iSendProperty(prop); return false; } usr/src/sdlBasic/src/sdlBasic/src/Exporters.cxx0000777000076500007660000012552410463133445017001 0ustar // SciTE - Scintilla based Text Editor /** @file Exporters.cxx ** Export the current document to various markup languages. **/ // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include "Platform.h" #if PLAT_GTK #include #include #endif #if PLAT_WIN #define _WIN32_WINNT 0x0400 #ifdef _MSC_VER // windows.h, et al, use a lot of nameless struct/unions - can't fix it, so allow it #pragma warning(disable: 4201) #endif #include #ifdef _MSC_VER // okay, that's done, don't allow it in our code #pragma warning(default: 4201) #endif #include // For chdir #ifdef _MSC_VER #include #endif #ifdef __BORLANDC__ #include #endif #endif #include "SciTE.h" #include "PropSet.h" #include "Accessor.h" #include "WindowAccessor.h" #include "Scintilla.h" #include "Extender.h" #include "SciTEBase.h" //---------- Save to RTF ---------- #define RTF_HEADEROPEN "{\\rtf1\\ansi\\deff0\\deftab720" #define RTF_FONTDEFOPEN "{\\fonttbl" #define RTF_FONTDEF "{\\f%d\\fnil\\fcharset%u %s;}" #define RTF_FONTDEFCLOSE "}" #define RTF_COLORDEFOPEN "{\\colortbl" #define RTF_COLORDEF "\\red%d\\green%d\\blue%d;" #define RTF_COLORDEFCLOSE "}" #define RTF_HEADERCLOSE "\n" #define RTF_BODYOPEN "" #define RTF_BODYCLOSE "}" #define RTF_SETFONTFACE "\\f" #define RTF_SETFONTSIZE "\\fs" #define RTF_SETCOLOR "\\cf" #define RTF_SETBACKGROUND "\\highlight" #define RTF_BOLD_ON "\\b" #define RTF_BOLD_OFF "\\b0" #define RTF_ITALIC_ON "\\i" #define RTF_ITALIC_OFF "\\i0" #define RTF_UNDERLINE_ON "\\ul" #define RTF_UNDERLINE_OFF "\\ulnone" #define RTF_STRIKE_ON "\\i" #define RTF_STRIKE_OFF "\\strike0" #define RTF_EOLN "\\par\n" #define RTF_TAB "\\tab " #define MAX_STYLEDEF 128 #define MAX_FONTDEF 64 #define MAX_COLORDEF 8 #define RTF_FONTFACE "Courier New" #define RTF_COLOR "#000000" // extract the next RTF control word from *style void GetRTFNextControl(char **style, char *control) { int len; char *pos = *style; *control = '\0'; if ('\0' == *pos) return; pos++; // implicit skip over leading '\' while ('\0' != *pos && '\\' != *pos) { pos++; } len = pos - *style; memcpy(control, *style, len); *(control + len) = '\0'; *style = pos; } // extracts control words that are different between two styles void GetRTFStyleChange(char *delta, char *last, char *current) { // \f0\fs20\cf0\highlight0\b0\i0 char lastControl[MAX_STYLEDEF], currentControl[MAX_STYLEDEF]; char *lastPos = last; char *currentPos = current; *delta = '\0'; // font face, size, color, background, bold, italic for (int i = 0; i < 6; i++) { GetRTFNextControl(&lastPos, lastControl); GetRTFNextControl(¤tPos, currentControl); if (strcmp(lastControl, currentControl)) { // changed strcat(delta, currentControl); } } if ('\0' != *delta) { strcat(delta, " "); } strcpy(last, current); } void SciTEBase::SaveToRTF(const char *saveName, int start, int end) { int lengthDoc = LengthDocument(); if (end < 0) end = lengthDoc; SendEditor(SCI_COLOURISE, 0, -1); // Read the default settings char key[200]; sprintf(key, "style.*.%0d", STYLE_DEFAULT); char *valdef = StringDup(props.GetExpanded(key).c_str()); sprintf(key, "style.%s.%0d", language.c_str(), STYLE_DEFAULT); char *val = StringDup(props.GetExpanded(key).c_str()); StyleDefinition defaultStyle(valdef); defaultStyle.ParseStyleDefinition(val); if (val) delete []val; if (valdef) delete []valdef; int tabSize = props.GetInt("export.rtf.tabsize", props.GetInt("tabsize")); int wysiwyg = props.GetInt("export.rtf.wysiwyg", 1); SString fontFace = props.GetExpanded("export.rtf.font.face"); if (fontFace.length()) { defaultStyle.font = fontFace; } else if (defaultStyle.font.length() == 0) { defaultStyle.font = RTF_FONTFACE; } int fontSize = props.GetInt("export.rtf.font.size", 0); if (fontSize > 0) { defaultStyle.size = fontSize << 1; } else if (defaultStyle.size == 0) { defaultStyle.size = 10 << 1; } else { defaultStyle.size <<= 1; } unsigned int characterset = props.GetInt("character.set", SC_CHARSET_DEFAULT); int tabs = props.GetInt("export.rtf.tabs", 0); if (tabSize == 0) tabSize = 4; FILE *fp = fopen(saveName, "wt"); if (fp) { char styles[STYLE_DEFAULT + 1][MAX_STYLEDEF]; char fonts[STYLE_DEFAULT + 1][MAX_FONTDEF]; char colors[STYLE_DEFAULT + 1][MAX_COLORDEF]; char lastStyle[MAX_STYLEDEF], deltaStyle[MAX_STYLEDEF]; int fontCount = 1, colorCount = 2, i; fputs(RTF_HEADEROPEN RTF_FONTDEFOPEN, fp); strncpy(fonts[0], defaultStyle.font.c_str(), MAX_FONTDEF); fprintf(fp, RTF_FONTDEF, 0, characterset, defaultStyle.font.c_str()); strncpy(colors[0], defaultStyle.fore.c_str(), MAX_COLORDEF); strncpy(colors[1], defaultStyle.back.c_str(), MAX_COLORDEF); for (int istyle = 0; istyle < STYLE_DEFAULT; istyle++) { sprintf(key, "style.*.%0d", istyle); char *valdef = StringDup(props.GetExpanded(key).c_str()); sprintf(key, "style.%s.%0d", language.c_str(), istyle); char *val = StringDup(props.GetExpanded(key).c_str()); StyleDefinition sd(valdef); sd.ParseStyleDefinition(val); if (sd.specified != StyleDefinition::sdNone) { if (wysiwyg && sd.font.length()) { for (i = 0; i < fontCount; i++) if (EqualCaseInsensitive(sd.font.c_str(), fonts[i])) break; if (i >= fontCount) { strncpy(fonts[fontCount++], sd.font.c_str(), MAX_FONTDEF); fprintf(fp, RTF_FONTDEF, i, characterset, sd.font.c_str()); } sprintf(lastStyle, RTF_SETFONTFACE "%d", i); } else { strcpy(lastStyle, RTF_SETFONTFACE "0"); } sprintf(lastStyle + strlen(lastStyle), RTF_SETFONTSIZE "%d", wysiwyg && sd.size ? sd.size << 1 : defaultStyle.size); if (sd.specified & StyleDefinition::sdFore) { for (i = 0; i < colorCount; i++) if (EqualCaseInsensitive(sd.fore.c_str(), colors[i])) break; if (i >= colorCount) strncpy(colors[colorCount++], sd.fore.c_str(), MAX_COLORDEF); sprintf(lastStyle + strlen(lastStyle), RTF_SETCOLOR "%d", i); } else { strcat(lastStyle, RTF_SETCOLOR "0"); // Default fore } // PL: highlights doesn't seems to follow a distinct table, at least with WordPad and Word 97 // Perhaps it is different for Word 6? // sprintf(lastStyle + strlen(lastStyle), RTF_SETBACKGROUND "%d", // sd.back.length() ? GetRTFHighlight(sd.back.c_str()) : 0); if (sd.specified & StyleDefinition::sdBack) { for (i = 0; i < colorCount; i++) if (EqualCaseInsensitive(sd.back.c_str(), colors[i])) break; if (i >= colorCount) strncpy(colors[colorCount++], sd.back.c_str(), MAX_COLORDEF); sprintf(lastStyle + strlen(lastStyle), RTF_SETBACKGROUND "%d", i); } else { strcat(lastStyle, RTF_SETBACKGROUND "1"); // Default back } if (sd.specified & StyleDefinition::sdBold) { strcat(lastStyle, sd.bold ? RTF_BOLD_ON : RTF_BOLD_OFF); } else { strcat(lastStyle, defaultStyle.bold ? RTF_BOLD_ON : RTF_BOLD_OFF); } if (sd.specified & StyleDefinition::sdItalics) { strcat(lastStyle, sd.italics ? RTF_ITALIC_ON : RTF_ITALIC_OFF); } else { strcat(lastStyle, defaultStyle.italics ? RTF_ITALIC_ON : RTF_ITALIC_OFF); } strncpy(styles[istyle], lastStyle, MAX_STYLEDEF); } else { sprintf(styles[istyle], RTF_SETFONTFACE "0" RTF_SETFONTSIZE "%d" RTF_SETCOLOR "0" RTF_SETBACKGROUND "1" RTF_BOLD_OFF RTF_ITALIC_OFF, defaultStyle.size); } if (val) delete []val; if (valdef) delete []valdef; } fputs(RTF_FONTDEFCLOSE RTF_COLORDEFOPEN, fp); for (i = 0; i < colorCount; i++) { fprintf(fp, RTF_COLORDEF, IntFromHexByte(colors[i] + 1), IntFromHexByte(colors[i] + 3), IntFromHexByte(colors[i] + 5)); } fprintf(fp, RTF_COLORDEFCLOSE RTF_HEADERCLOSE RTF_BODYOPEN RTF_SETFONTFACE "0" RTF_SETFONTSIZE "%d" RTF_SETCOLOR "0 ", defaultStyle.size); sprintf(lastStyle, RTF_SETFONTFACE "0" RTF_SETFONTSIZE "%d" RTF_SETCOLOR "0" RTF_SETBACKGROUND "1" RTF_BOLD_OFF RTF_ITALIC_OFF, defaultStyle.size); bool prevCR = false; int styleCurrent = -1; WindowAccessor acc(wEditor.GetID(), props); int column = 0; for (i = start; i < end; i++) { char ch = acc[i]; int style = acc.StyleAt(i); if (style > STYLE_DEFAULT) style = 0; if (style != styleCurrent) { GetRTFStyleChange(deltaStyle, lastStyle, styles[style]); if (*deltaStyle) fputs(deltaStyle, fp); styleCurrent = style; } if (ch == '{') fputs("\\{", fp); else if (ch == '}') fputs("\\}", fp); else if (ch == '\\') fputs("\\\\", fp); else if (ch == '\t') { if (tabs) { fputs(RTF_TAB, fp); } else { int ts = tabSize - (column % tabSize); for (int itab = 0; itab < ts; itab++) { fputc(' ', fp); } column += ts - 1; } } else if (ch == '\n') { if (!prevCR) { fputs(RTF_EOLN, fp); column = -1; } } else if (ch == '\r') { fputs(RTF_EOLN, fp); column = -1; } else fputc(ch, fp); column++; prevCR = ch == '\r'; } fputs(RTF_BODYCLOSE, fp); fclose(fp); } else { SString msg = LocaliseMessage("Could not save file '^0'.", fullPath); WindowMessageBox(wSciTE, msg, MB_OK | MB_ICONWARNING); } } //---------- Save to HTML ---------- void SciTEBase::SaveToHTML(const char *saveName) { SendEditor(SCI_COLOURISE, 0, -1); int tabSize = props.GetInt("tabsize"); if (tabSize == 0) tabSize = 4; int wysiwyg = props.GetInt("export.html.wysiwyg", 1); int tabs = props.GetInt("export.html.tabs", 0); int folding = props.GetInt("export.html.folding", 0); int onlyStylesUsed = props.GetInt("export.html.styleused", 0); int titleFullPath = props.GetInt("export.html.title.fullpath", 0); int lengthDoc = LengthDocument(); WindowAccessor acc(wEditor.GetID(), props); bool styleIsUsed[STYLE_MAX + 1]; if (onlyStylesUsed) { int i; for (i = 0; i <= STYLE_MAX; i++) { styleIsUsed[i] = false; } // check the used styles for (i = 0; i < lengthDoc; i++) { styleIsUsed[acc.StyleAt(i) & 0x7F] = true; } } else { for (int i = 0; i <= STYLE_MAX; i++) { styleIsUsed[i] = true; } } styleIsUsed[STYLE_DEFAULT] = true; FILE *fp = fopen(saveName, "wt"); if (fp) { fputs("\n", fp); fputs("\n", fp); fputs("\n", fp); if (titleFullPath) fprintf(fp, "%s\n", fullPath); else fprintf(fp, "%s\n", fileName); // Probably not used by robots, but making a little advertisement for those looking // at the source code doesn't hurt... fputs("\n", fp); if (folding) { fputs("\n", fp); } fputs("\n", fp); fputs("\n", fp); if (bgColour.length() > 0) fprintf(fp, "\n", bgColour.c_str()); else fputs("\n", fp); int line = acc.GetLine(0); int level = (acc.LevelAt(line) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE; int newLevel; int styleCurrent = acc.StyleAt(0); bool inStyleSpan = false; // Global span for default attributes if (wysiwyg) { fputs("", fp); } else { fputs("

", fp);
		}

		if (folding) {
			int lvl = acc.LevelAt(0);
			level = (lvl & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE;

			if (lvl & SC_FOLDLEVELHEADERFLAG) {
				fprintf(fp, "- ", line + 1);
			} else {
				fputs("  ", fp);
			}
		}

		if (styleIsUsed[styleCurrent]) {
			fprintf(fp, "", styleCurrent);
			inStyleSpan = true;
		}
		// Else, this style has no definition (beside default one):
		// no span for it, except the global one

		int column = 0;
		for (int i = 0; i < lengthDoc; i++) {
			char ch = acc[i];
			int style = acc.StyleAt(i);

			if (style != styleCurrent) {
				if (inStyleSpan) {
					fputs("", fp);
					inStyleSpan = false;
				}
				if (ch != '\r' && ch != '\n') {	// No need of a span for the EOL
					if (styleIsUsed[style]) {
						fprintf(fp, "", style);
						inStyleSpan = true;
					}
					styleCurrent = style;
				}
			}
			if (ch == ' ') {
				if (wysiwyg) {
					char prevCh = '\0';
					if (column == 0) {	// At start of line, must put a   because regular space will be collapsed
						prevCh = ' ';
					}
					while (i < lengthDoc && acc[i] == ' ') {
						if (prevCh != ' ') {
							fputc(' ', fp);
						} else {
							fputs(" ", fp);
						}
						prevCh = acc[i];
						i++;
						column++;
					}
					i--; // the last incrementation will be done by the for loop
				} else {
					fputc(' ', fp);
					column++;
				}
			} else if (ch == '\t') {
				int ts = tabSize - (column % tabSize);
				if (wysiwyg) {
					for (int itab = 0; itab < ts; itab++) {
						if (itab % 2) {
							fputc(' ', fp);
						} else {
							fputs(" ", fp);
						}
					}
					column += ts;
				} else {
					if (tabs) {
						fputc(ch, fp);
						column++;
					} else {
						for (int itab = 0; itab < ts; itab++) {
							fputc(' ', fp);
						}
						column += ts;
					}
				}
			} else if (ch == '\r' || ch == '\n') {
				if (inStyleSpan) {
					fputs("", fp);
					inStyleSpan = false;
				}
				if (ch == '\r' && acc[i + 1] == '\n') {
					i++;	// CR+LF line ending, skip the "extra" EOL char
				}
				column = 0;
				if (wysiwyg) {
					fputs("
", fp); } styleCurrent = acc.StyleAt(i + 1); if (folding) { line = acc.GetLine(i + 1); int lvl = acc.LevelAt(line); newLevel = (lvl & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE; if (newLevel < level) fprintf(fp, ""); fputc('\n', fp); // here to get clean code if (newLevel > level) fprintf(fp, "", line); if (lvl & SC_FOLDLEVELHEADERFLAG) fprintf(fp, "- ", line + 1); else fputs("  ", fp); level = newLevel; } else { fputc('\n', fp); } if (styleIsUsed[styleCurrent] && acc[i + 1] != '\r' && acc[i + 1] != '\n') { // We know it's the correct next style, // but no (empty) span for an empty line fprintf(fp, "", styleCurrent); inStyleSpan = true; } } else { switch (ch) { case '<': fputs("<", fp); break; case '>': fputs(">", fp); break; case '&': fputs("&", fp); break; default: fputc(ch, fp); } column++; } } if (inStyleSpan) { fputs("", fp); } if (folding) { while (level > 0) { fprintf(fp, ""); level--; } } if (!wysiwyg) { fputs("
", fp); } else { fputs("", fp); } fputs("\n\n\n", fp); fclose(fp); } else { SString msg = LocaliseMessage( "Could not save file \"^0\".", fullPath); WindowMessageBox(wSciTE, msg, MB_OK | MB_ICONWARNING); } } //---------- Save to PDF ---------- /* PDF Exporter. Status: Beta Contributed by Ahmad M. Zawawi Modifications by Darren Schroeder Feb 22, 2003; Philippe Lhoste 2003-10 Overhauled by Kein-Hong Man 2003-11 This exporter is meant to be small and simple; users are expected to use other methods for heavy-duty formatting. PDF elements marked with "PDF1.4Ref" states where in the PDF 1.4 Reference Spec (the PDF file of which is freely available from Adobe) the particular element can be found. Possible TODOs that will probably not be implemented: full styling, optimization, font substitution, compression, character set encoding. */ #define PDF_TAB_DEFAULT 8 #define PDF_FONT_DEFAULT 1 // Helvetica #define PDF_FONTSIZE_DEFAULT 10 #define PDF_SPACING_DEFAULT 1.2 #define PDF_HEIGHT_DEFAULT 792 // Letter #define PDF_WIDTH_DEFAULT 612 #define PDF_MARGIN_DEFAULT 72 // 1.0" #define PDF_ENCODING "WinAnsiEncoding" struct PDFStyle { char fore[24]; int font; }; static char *PDFfontNames[] = { "Courier", "Courier-Bold", "Courier-Oblique", "Courier-BoldOblique", "Helvetica", "Helvetica-Bold", "Helvetica-Oblique", "Helvetica-BoldOblique", "Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic" }; // ascender, descender aligns font origin point with page static short PDFfontAscenders[] = { 629, 718, 699 }; static short PDFfontDescenders[] = { 157, 207, 217 }; static short PDFfontWidths[] = { 600, 0, 0 }; inline void getPDFRGB(char* pdfcolour, const char* stylecolour) { // grab colour components (max string length produced = 18) for (int i = 1; i < 6; i += 2) { char val[20]; // 3 decimal places for enough dynamic range int c = (IntFromHexByte(stylecolour + i) * 1000 + 127) / 255; if (c == 0 || c == 1000) { // optimise sprintf(val, "%d ", c / 1000); } else { sprintf(val, "0.%03d ", c); } strcat(pdfcolour, val); } } void SciTEBase::SaveToPDF(const char *saveName) { // This class conveniently handles the tracking of PDF objects // so that the cross-reference table can be built (PDF1.4Ref(p39)) // All writes to fp passes through a PDFObjectTracker object. class PDFObjectTracker { private: FILE *fp; int *offsetList, tableSize; public: int index; PDFObjectTracker(FILE *fp_) { fp = fp_; tableSize = 100; offsetList = new int[tableSize]; index = 1; } ~PDFObjectTracker() { delete []offsetList; } void write(const char *objectData) { unsigned int length = strlen(objectData); // note binary write used, open with "wb" fwrite(objectData, sizeof(char), length, fp); } void write(int objectData) { char val[20]; sprintf(val, "%d", objectData); write(val); } // returns object number assigned to the supplied data int add(const char *objectData) { // resize xref offset table if too small if (index > tableSize) { int newSize = tableSize * 2; int *newList = new int[newSize]; for (int i = 0; i < tableSize; i++) { newList[i] = offsetList[i]; } delete []offsetList; offsetList = newList; tableSize = newSize; } // save offset, then format and write object offsetList[index - 1] = ftell(fp); write(index); write(" 0 obj\n"); write(objectData); write("endobj\n"); return index++; } // builds xref table, returns file offset of xref table int xref() { char val[32]; // xref start index and number of entries int xrefStart = ftell(fp); write("xref\n0 "); write(index); // a xref entry *must* be 20 bytes long (PDF1.4Ref(p64)) // so extra space added; also the first entry is special write("\n0000000000 65535 f \n"); for (int i = 0; i < index - 1; i++) { sprintf(val, "%010d 00000 n \n", offsetList[i]); write(val); } return xrefStart; } }; // Object to manage line and page rendering. Apart from startPDF, endPDF // everything goes in via add() and nextLine() so that line formatting // and pagination can be done properly. class PDFRender { private: bool pageStarted; bool firstLine; int pageCount; int pageContentStart; double xPos, yPos; // position tracking for line wrapping SString pageData; // holds PDF stream contents SString segment; // character data char *segStyle; // style of segment bool justWhiteSpace; int styleCurrent, stylePrev; double leading; char *buffer; public: PDFObjectTracker *oT; PDFStyle *style; int fontSize; // properties supplied by user int fontSet; int pageWidth, pageHeight; PRectangle pageMargin; // PDFRender() { pageStarted = false; pageCount = 0; style = NULL; buffer = new char[250]; segStyle = new char[100]; } ~PDFRender() { if (style) { delete []style; } delete []buffer; delete []segStyle; } // double fontToPoints(int thousandths) { return (double)fontSize * thousandths / 1000.0; } void setStyle(char *buff, int style_) { int styleNext = style_; if (style_ == -1) { styleNext = styleCurrent; } *buff = '\0'; if (styleNext != styleCurrent || style_ == -1) { if (style[styleCurrent].font != style[styleNext].font || style_ == -1) { sprintf(buff, "/F%d %d Tf ", style[styleNext].font + 1, fontSize); } if (strcmp(style[styleCurrent].fore, style[styleNext].fore) != 0 || style_ == -1) { strcat(buff, style[styleNext].fore); strcat(buff, "rg "); } } } // void startPDF() { if (fontSize <= 0) { fontSize = PDF_FONTSIZE_DEFAULT; } // leading is the term for distance between lines leading = fontSize * PDF_SPACING_DEFAULT; // sanity check for page size and margins int pageWidthMin = (int)leading + pageMargin.left + pageMargin.right; if (pageWidth < pageWidthMin) { pageWidth = pageWidthMin; } int pageHeightMin = (int)leading + pageMargin.top + pageMargin.bottom; if (pageHeight < pageHeightMin) { pageHeight = pageHeightMin; } // start to write PDF file here (PDF1.4Ref(p63)) // ASCII>127 characters to indicate binary-possible stream oT->write("%PDF-1.3\n%Çì¢\n"); styleCurrent = STYLE_DEFAULT; // build objects for font resources; note that font objects are // *expected* to start from index 1 since they are the first objects // to be inserted (PDF1.4Ref(p317)) for (int i = 0; i < 4; i++) { sprintf(buffer, "<>\n", i + 1, PDFfontNames[fontSet * 4 + i]); oT->add(buffer); } pageContentStart = oT->index; } void endPDF() { if (pageStarted) { // flush buffers endPage(); } // refer to all used or unused fonts for simplicity int resourceRef = oT->add( "<> >>\n"); // create all the page objects (PDF1.4Ref(p88)) // forward reference pages object; calculate its object number int pageObjectStart = oT->index; int pagesRef = pageObjectStart + pageCount; for (int i = 0; i < pageCount; i++) { sprintf(buffer, "<>\n", pagesRef, pageWidth, pageHeight, pageContentStart + i, resourceRef); oT->add(buffer); } // create page tree object (PDF1.4Ref(p86)) pageData = "<>\n", pageCount); pageData += buffer; oT->add(pageData.c_str()); // create catalog object (PDF1.4Ref(p83)) sprintf(buffer, "<>\n", pagesRef); int catalogRef = oT->add(buffer); // append the cross reference table (PDF1.4Ref(p64)) int xref = oT->xref(); // end the file with the trailer (PDF1.4Ref(p67)) sprintf(buffer, "trailer\n<< /Size %d /Root %d 0 R\n>>" "\nstartxref\n%d\n%%%%EOF\n", oT->index, catalogRef, xref); oT->write(buffer); } void add(char ch, int style_) { if (!pageStarted) { startPage(); } // get glyph width (TODO future non-monospace handling) double glyphWidth = fontToPoints(PDFfontWidths[fontSet]); xPos += glyphWidth; // if cannot fit into a line, flush, wrap to next line if (xPos > pageWidth - pageMargin.right) { nextLine(); xPos += glyphWidth; } // if different style, then change to style if (style_ != styleCurrent) { flushSegment(); // output code (if needed) for new style setStyle(segStyle, style_); stylePrev = styleCurrent; styleCurrent = style_; } // escape these characters if (ch == ')' || ch == '(' || ch == '\\') { segment += '\\'; } if (ch != ' ') { justWhiteSpace = false; } segment += ch; // add to segment data } void flushSegment() { if (segment.length() > 0) { if (justWhiteSpace) { // optimise styleCurrent = stylePrev; } else { pageData += segStyle; } pageData += "("; pageData += segment; pageData += ")Tj\n"; } segment.clear(); *segStyle = '\0'; justWhiteSpace = true; } void startPage() { pageStarted = true; firstLine = true; pageCount++; double fontAscender = fontToPoints(PDFfontAscenders[fontSet]); yPos = pageHeight - pageMargin.top - fontAscender; // start a new page sprintf(buffer, "BT 1 0 0 1 %d %d Tm\n", pageMargin.left, (int)yPos); // force setting of initial font, colour setStyle(segStyle, -1); strcat(buffer, segStyle); pageData = buffer; xPos = pageMargin.left; segment.clear(); flushSegment(); } void endPage() { pageStarted = false; flushSegment(); // build actual text object; +3 is for "ET\n" // PDF1.4Ref(p38) EOL marker preceding endstream not counted char *textObj = new char[pageData.length() + 100]; // concatenate stream within the text object sprintf(textObj, "<>\nstream\n%s" "ET\nendstream\n", pageData.length() - 1 + 3, pageData.c_str()); oT->add(textObj); delete []textObj; } void nextLine() { if (!pageStarted) { startPage(); } xPos = pageMargin.left; flushSegment(); // PDF follows cartesian coords, subtract -> down yPos -= leading; double fontDescender = fontToPoints(PDFfontDescenders[fontSet]); if (yPos < pageMargin.bottom + fontDescender) { endPage(); startPage(); return; } if (firstLine) { sprintf(buffer, "0 -%.1f TD\n", leading); firstLine = false; } else { sprintf(buffer, "T*\n"); } pageData += buffer; } }; PDFRender pr; SendEditor(SCI_COLOURISE, 0, -1); // read exporter flags int tabSize = props.GetInt("tabsize", PDF_TAB_DEFAULT); if (tabSize < 0) { tabSize = PDF_TAB_DEFAULT; } // read magnification value to add to default screen font size pr.fontSize = props.GetInt("export.pdf.magnification"); // set font family according to face name SString propItem = props.GetExpanded("export.pdf.font"); pr.fontSet = PDF_FONT_DEFAULT; if (propItem.length()) { if (propItem == "Courier") pr.fontSet = 0; else if (propItem == "Helvetica") pr.fontSet = 1; else if (propItem == "Times") pr.fontSet = 2; } // page size: width, height propItem = props.GetExpanded("export.pdf.pagesize"); char *buffer = new char[200]; char *ps = StringDup(propItem.c_str()); const char *next = GetNextPropItem(ps, buffer, 32); if (0 >= (pr.pageWidth = atol(buffer))) { pr.pageWidth = PDF_WIDTH_DEFAULT; } next = GetNextPropItem(next, buffer, 32); if (0 >= (pr.pageHeight = atol(buffer))) { pr.pageHeight = PDF_HEIGHT_DEFAULT; } delete []ps; // page margins: left, right, top, bottom propItem = props.GetExpanded("export.pdf.margins"); ps = StringDup(propItem.c_str()); next = GetNextPropItem(ps, buffer, 32); if (0 >= (pr.pageMargin.left = atol(buffer))) { pr.pageMargin.left = PDF_MARGIN_DEFAULT; } next = GetNextPropItem(next, buffer, 32); if (0 >= (pr.pageMargin.right = atol(buffer))) { pr.pageMargin.right = PDF_MARGIN_DEFAULT; } next = GetNextPropItem(next, buffer, 32); if (0 >= (pr.pageMargin.top = atol(buffer))) { pr.pageMargin.top = PDF_MARGIN_DEFAULT; } GetNextPropItem(next, buffer, 32); if (0 >= (pr.pageMargin.bottom = atol(buffer))) { pr.pageMargin.bottom = PDF_MARGIN_DEFAULT; } delete []ps; // collect all styles available for that 'language' // or the default style if no language is available... pr.style = new PDFStyle[STYLE_MAX + 1]; for (int i = 0; i <= STYLE_MAX; i++) { // get keys pr.style[i].font = 0; pr.style[i].fore[0] = '\0'; sprintf(buffer, "style.*.%0d", i); char *valdef = StringDup(props.GetExpanded(buffer).c_str()); sprintf(buffer, "style.%s.%0d", language.c_str(), i); char *val = StringDup(props.GetExpanded(buffer).c_str()); StyleDefinition sd(valdef); sd.ParseStyleDefinition(val); if (sd.specified != StyleDefinition::sdNone) { if (sd.italics) { pr.style[i].font |= 2; } if (sd.bold) { pr.style[i].font |= 1; } if (sd.fore.length()) { getPDFRGB(pr.style[i].fore, sd.fore.c_str()); } else if (i == STYLE_DEFAULT) { strcpy(pr.style[i].fore, "0 0 0 "); } // grab font size from default style if (i == STYLE_DEFAULT) { if (sd.size > 0) pr.fontSize += sd.size; else pr.fontSize = PDF_FONTSIZE_DEFAULT; } } if (val) delete []val; if (valdef) delete []valdef; } // patch in default foregrounds for (int j = 0; j <= STYLE_MAX; j++) { if (pr.style[j].fore[0] == '\0') { strcpy(pr.style[j].fore, pr.style[STYLE_DEFAULT].fore); } } delete []buffer; FILE *fp = fopen(saveName, "wb"); if (!fp) { // couldn't open the file for saving, issue an error message SString msg = LocaliseMessage("Could not save file '^0'.", fullPath); WindowMessageBox(wSciTE, msg, MB_OK | MB_ICONWARNING); return; } // initialise PDF rendering PDFObjectTracker ot(fp); pr.oT = &ot; pr.startPDF(); // do here all the writing int lengthDoc = LengthDocument(); WindowAccessor acc(wEditor.GetID(), props); int lineIndex = 0; if (!lengthDoc) { // enable zero length docs pr.nextLine(); } else { for (int i = 0; i < lengthDoc; i++) { char ch = acc[i]; int style = acc.StyleAt(i); if (ch == '\t') { // expand tabs int ts = tabSize - (lineIndex % tabSize); lineIndex += ts; for (; ts; ts--) { // add ts count of spaces pr.add(' ', style); // add spaces } } else if (ch == '\r' || ch == '\n') { if (ch == '\r' && acc[i + 1] == '\n') { i++; } // close and begin a newline... pr.nextLine(); lineIndex = 0; } else { // write the character normally... pr.add(ch, style); lineIndex++; } } } // write required stuff and close the PDF file pr.endPDF(); fclose(fp); } //---------- Save to TeX ---------- static char* getTexRGB(char* texcolor, const char* stylecolor) { //texcolor[rgb]{0,0.5,0}{....} float r = IntFromHexByte(stylecolor + 1) / 256.0; float g = IntFromHexByte(stylecolor + 3) / 256.0; float b = IntFromHexByte(stylecolor + 5) / 256.0; sprintf(texcolor, "%.1f, %.1f, %.1f", r, g, b); return texcolor; } #define CHARZ ('z' - 'b') static char* texStyle(int style) { static char buf[10]; int i = 0; do { buf[i++] = static_cast('a' + (style % CHARZ)); style /= CHARZ; } while ( style > 0 ); buf[i] = 0; return buf; } static void defineTexStyle(StyleDefinition &style, FILE* fp, int istyle) { int closing_brackets = 2; char rgb[200]; fprintf(fp, "\\newcommand{\\scite%s}[1]{\\noindent{\\ttfamily{", texStyle(istyle)); if (style.italics) { fputs("\\textit{", fp); closing_brackets++; } if (style.bold) { fputs("\\textbf{", fp); closing_brackets++; } if (style.fore.length()) { fprintf(fp, "\\textcolor[rgb]{%s}{", getTexRGB(rgb, style.fore.c_str()) ); closing_brackets++; } if (style.back.length()) { fprintf(fp, "\\colorbox[rgb]{%s}{", getTexRGB( rgb, style.back.c_str()) ); closing_brackets++; } fputs("#1", fp); for (int i = 0; i <= closing_brackets; i++) { fputc( '}', fp ); } fputc('\n', fp); } void SciTEBase::SaveToTEX(const char *saveName) { SendEditor(SCI_COLOURISE, 0, -1); int tabSize = props.GetInt("tabsize"); if (tabSize == 0) tabSize = 4; char key[200]; int lengthDoc = LengthDocument(); WindowAccessor acc(wEditor.GetID(), props); bool styleIsUsed[STYLE_MAX + 1]; int titleFullPath = props.GetInt("export.tex.title.fullpath", 0); int i; for (i = 0; i <= STYLE_MAX; i++) { styleIsUsed[i] = false; } for (i = 0; i < lengthDoc; i++) { // check the used styles styleIsUsed[acc.StyleAt(i) & 0X7f] = true; } styleIsUsed[STYLE_DEFAULT] = true; FILE *fp = fopen(saveName, "wt"); if (fp) { fputs("\\documentclass[a4paper]{article}\n" "\\usepackage[a4paper,margin=2cm]{geometry}\n" "\\usepackage[T1]{fontenc}\n" "\\usepackage{color}\n" "\\usepackage{alltt}\n" "\\usepackage{times}\n", fp); for (i = 0; i < STYLE_MAX; i++) { // get keys if (styleIsUsed[i]) { sprintf(key, "style.*.%0d", i); char *valdef = StringDup(props.GetExpanded(key).c_str()); sprintf(key, "style.%s.%0d", language.c_str(), i); char *val = StringDup(props.GetExpanded(key).c_str()); StyleDefinition sd(valdef); //check default properties sd.ParseStyleDefinition(val); //check language properties if (sd.specified != StyleDefinition::sdNone) { defineTexStyle(sd, fp, i); // writeout style macroses } // Else we should use STYLE_DEFAULT if (val) delete []val; if (valdef) delete []valdef; } } fputs("\\begin{document}\n\n", fp); fprintf(fp, "Source File: %s\n\n\\noindent\n\\tiny{\n", titleFullPath ? fullPath : fileName); int styleCurrent = acc.StyleAt(0); fprintf(fp, "\\scite%s{", texStyle(styleCurrent)); int lineIdx = 0; for (i = 0; i < lengthDoc; i++) { //here process each character of the document char ch = acc[i]; int style = acc.StyleAt(i); if (style != styleCurrent) { //new style? fprintf(fp, "}\n\\scite%s{", texStyle(style) ); styleCurrent = style; } switch ( ch ) { //write out current character. case '\t': { int ts = tabSize - (lineIdx % tabSize); lineIdx += ts - 1; fprintf(fp, "\\hspace*{%dem}", ts); break; } case '\\': fputs("{\\textbackslash}", fp); break; case '>': case '<': case '@': fprintf(fp, "$%c$", ch); break; case '{': case '}': case '^': case '_': case '&': case '$': case '#': case '%': case '~': fprintf(fp, "\\%c", ch); break; case '\r': case '\n': lineIdx = -1; // Because incremented below if (ch == '\r' && acc[i + 1] == '\n') i++; // Skip the LF styleCurrent = acc.StyleAt(i + 1); fprintf(fp, "} \\\\\n\\scite%s{", texStyle(styleCurrent) ); break; case ' ': if (acc[i + 1] == ' ') { fputs("{\\hspace*{1em}}", fp); } else { fputc(' ', fp); } break; default: fputc(ch, fp); } lineIdx++; } fputs("}\n} %end tiny\n\n\\end{document}\n", fp); //close last empty style macros and document too fclose(fp); } else { SString msg = LocaliseMessage( "Could not save file \"^0\".", fullPath); WindowMessageBox(wSciTE, msg, MB_OK | MB_ICONWARNING); } } //---------- Save to XML ---------- void SciTEBase::SaveToXML(const char *saveName) { // Author: Hans Hagen / PRAGMA ADE / www.pragma-ade.com // Version: 1.0 / august 18, 2003 // Remark: for a suitable style, see ConTeXt (future) distributions // The idea is that one can use whole files, or ranges of lines in manuals // and alike. Since ConTeXt can handle XML files, it's quite convenient to // use this format instead of raw TeX, although the output would not look // much different in structure. // We don't put style definitions in here since the main document will in // most cases determine the look and feel. This way we have full control over // the layout. The type attribute will hold the current lexer value. // : the whole thing // : reserved for metadata // : the main bodyof text // : a line of text // ... : tag // : space // : > // : < // : & // : # // We don't use entities, but empty elements for special characters // but will eventually use utf-8 (once i know how to get them out). SendEditor(SCI_COLOURISE, 0, -1) ; int tabSize = props.GetInt("tabsize") ; if (tabSize == 0) { tabSize = 4 ; } int lengthDoc = LengthDocument() ; WindowAccessor acc(wEditor.GetID(), props) ; FILE *fp = fopen(saveName, "wt"); if (fp) { bool collapseSpaces = (props.GetInt("export.xml.collapse.spaces", 1) == 1) ; bool collapseLines = (props.GetInt("export.xml.collapse.lines", 1) == 1) ; fputs("\n", fp) ; fputs("\n", fp) ; fputs("\n", fp) ; fputs("\n", fp) ; int styleCurrent = -1 ; // acc.StyleAt(0) ; int lineNumber = 1 ; int lineIndex = 0 ; bool styleDone = false ; bool lineDone = false ; bool charDone = false ; int styleNew = -1 ; int spaceLen = 0 ; int emptyLines = 0 ; for (int i = 0; i < lengthDoc; i++) { char ch = acc[i] ; int style = acc.StyleAt(i) ; if (style != styleCurrent) { styleCurrent = style ; styleNew = style ; } if (ch == ' ') { spaceLen++ ; } else if (ch == '\t') { int ts = tabSize - (lineIndex % tabSize) ; lineIndex += ts - 1 ; spaceLen += ts ; } else if (ch == '\f') { // ignore this animal } else if (ch == '\r' || ch == '\n') { if (ch == '\r' && acc[i + 1] == '\n') { i++; } if (styleDone) { fputs("", fp) ; styleDone = false ; } lineIndex = -1 ; if (lineDone) { fputs("\n", fp) ; lineDone = false ; } else if (collapseLines) { emptyLines++ ; } else { fprintf(fp, "\n", lineNumber) ; } charDone = false ; lineNumber++ ; styleCurrent = -1 ; // acc.StyleAt(i + 1) ; } else { if (collapseLines && (emptyLines > 0)) { fputs("\n", fp) ; } emptyLines = 0 ; if (! lineDone) { fprintf(fp, "", lineNumber) ; lineDone = true ; } if (styleNew >= 0) { if (styleDone) { fputs("", fp) ; } } if (! collapseSpaces) { while (spaceLen > 0) { fputs("", fp) ; spaceLen-- ; } } else if (spaceLen == 1) { fputs("", fp) ; spaceLen = 0 ; } else if (spaceLen > 1) { fprintf(fp, "", spaceLen) ; spaceLen = 0 ; } if (styleNew >= 0) { fprintf(fp, "", style) ; styleNew = -1 ; styleDone = true ; } switch (ch) { case '>' : fputs("", fp) ; break ; case '<' : fputs("", fp) ; break ; case '&' : fputs("", fp) ; break ; case '#' : fputs("", fp) ; break ; default : fputc(ch, fp) ; } charDone = true ; } lineIndex++ ; } if (styleDone) { fputs("", fp) ; } if (lineDone) { fputs("
\n", fp) ; } if (charDone) { // no last empty line: fprintf(fp, "", lineNumber) ; } fputs("\n", fp) ; fputs("\n", fp) ; fclose(fp) ; } else { SString msg = LocaliseMessage("Could not save file \"^0\".", fullPath) ; WindowMessageBox(wSciTE, msg, MB_OK | MB_ICONWARNING) ; } } usr/src/sdlBasic/src/sdlBasic/clean.sh0000777000076500007660000000007210463132677015105 0ustar cd scintilla/gtk make clean cd ../../gtk make clean cd ../usr/src/sdlBasic/src/sdlBasic/install.sh0000777000076500007660000000003310463132677015466 0ustar cd gtk make install cd ../ usr/src/sdlBasic/src/sdlBasic/scintilla/0000777000000000000000000000000010645354637017216 5ustar rootrootusr/src/sdlBasic/src/sdlBasic/scintilla/include/0000777000000000000000000000000010645354646020641 5ustar rootrootusr/src/sdlBasic/src/sdlBasic/scintilla/include/Platform.h0000777000076500007660000003334110463134721021026 0ustar // Scintilla source code edit control /** @file Platform.h ** Interface to platform facilities. Also includes some basic utilities. ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef PLATFORM_H #define PLATFORM_H // PLAT_GTK = GTK+ on Linux or Win32 // PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32 // PLAT_WIN = Win32 API on Win32 OS // PLAT_WX is wxWindows on any supported platform #define PLAT_GTK 0 #define PLAT_GTK_WIN32 0 #define PLAT_WIN 0 #define PLAT_WX 0 #define PLAT_FOX 0 #if defined(FOX) #undef PLAT_FOX #define PLAT_FOX 1 #elif defined(__WX__) #undef PLAT_WX #define PLAT_WX 1 #elif defined(GTK) #undef PLAT_GTK #define PLAT_GTK 1 #ifdef _MSC_VER #undef PLAT_GTK_WIN32 #define PLAT_GTK_WIN32 1 #endif #else #undef PLAT_WIN #define PLAT_WIN 1 #endif // Underlying the implementation of the platform classes are platform specific types. // Sometimes these need to be passed around by client code so they are defined here typedef void *FontID; typedef void *SurfaceID; typedef void *WindowID; typedef void *MenuID; typedef void *TickerID; typedef void *Function; typedef void *IdlerID; /** * A geometric point class. * Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably. */ class Point { public: int x; int y; explicit Point(int x_=0, int y_=0) : x(x_), y(y_) { } // Other automatically defined methods (assignment, copy constructor, destructor) are fine static Point FromLong(long lpoint); }; /** * A geometric rectangle class. * PRectangle is exactly the same as the Win32 RECT so can be used interchangeably. * PRectangles contain their top and left sides, but not their right and bottom sides. */ class PRectangle { public: int left; int top; int right; int bottom; PRectangle(int left_=0, int top_=0, int right_=0, int bottom_ = 0) : left(left_), top(top_), right(right_), bottom(bottom_) { } // Other automatically defined methods (assignment, copy constructor, destructor) are fine bool operator==(PRectangle &rc) { return (rc.left == left) && (rc.right == right) && (rc.top == top) && (rc.bottom == bottom); } bool Contains(Point pt) { return (pt.x >= left) && (pt.x <= right) && (pt.y >= top) && (pt.y <= bottom); } bool Contains(PRectangle rc) { return (rc.left >= left) && (rc.right <= right) && (rc.top >= top) && (rc.bottom <= bottom); } bool Intersects(PRectangle other) { return (right > other.left) && (left < other.right) && (bottom > other.top) && (top < other.bottom); } void Move(int xDelta, int yDelta) { left += xDelta; top += yDelta; right += xDelta; bottom += yDelta; } int Width() { return right - left; } int Height() { return bottom - top; } }; /** * In some circumstances, including Win32 in paletted mode and GTK+, each colour * must be allocated before use. The desired colours are held in the ColourDesired class, * and after allocation the allocation entry is stored in the ColourAllocated class. In other * circumstances, such as Win32 in true colour mode, the allocation process just copies * the RGB values from the desired to the allocated class. * As each desired colour requires allocation before it can be used, the ColourPair class * holds both a ColourDesired and a ColourAllocated * The Palette class is responsible for managing the palette of colours which contains a * list of ColourPair objects and performs the allocation. */ /** * Holds a desired RGB colour. */ class ColourDesired { long co; public: ColourDesired(long lcol=0) { co = lcol; } ColourDesired(unsigned int red, unsigned int green, unsigned int blue) { Set(red, green, blue); } bool operator==(const ColourDesired &other) const { return co == other.co; } void Set(long lcol) { co = lcol; } void Set(unsigned int red, unsigned int green, unsigned int blue) { co = red | (green << 8) | (blue << 16); } static inline unsigned int ValueOfHex(const char ch) { if (ch >= '0' && ch <= '9') return ch - '0'; else if (ch >= 'A' && ch <= 'F') return ch - 'A' + 10; else if (ch >= 'a' && ch <= 'f') return ch - 'a' + 10; else return 0; } void Set(const char *val) { if (*val == '#') { val++; } unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]); unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]); unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]); Set(r, g, b); } long AsLong() const { return co; } unsigned int GetRed() { return co & 0xff; } unsigned int GetGreen() { return (co >> 8) & 0xff; } unsigned int GetBlue() { return (co >> 16) & 0xff; } }; /** * Holds an allocated RGB colour which may be an approximation to the desired colour. */ class ColourAllocated { long coAllocated; public: ColourAllocated(long lcol=0) { coAllocated = lcol; } void Set(long lcol) { coAllocated = lcol; } long AsLong() const { return coAllocated; } }; /** * Colour pairs hold a desired colour and an allocated colour. */ struct ColourPair { ColourDesired desired; ColourAllocated allocated; ColourPair(ColourDesired desired_=ColourDesired(0,0,0)) { desired = desired_; allocated.Set(desired.AsLong()); } void Copy() { allocated.Set(desired.AsLong()); } }; class Window; // Forward declaration for Palette /** * Colour palette management. */ class Palette { int used; enum {numEntries = 100}; ColourPair entries[numEntries]; #if PLAT_GTK void *allocatedPalette; // GdkColor * int allocatedLen; #endif public: #if PLAT_WIN void *hpal; #endif bool allowRealization; Palette(); ~Palette(); void Release(); /** * This method either adds a colour to the list of wanted colours (want==true) * or retrieves the allocated colour back to the ColourPair. * This is one method to make it easier to keep the code for wanting and retrieving in sync. */ void WantFind(ColourPair &cp, bool want); void Allocate(Window &w); }; /** * Font management. */ class Font { protected: FontID id; #if PLAT_WX int ascent; #endif // Private so Font objects can not be copied Font(const Font &) {} Font &operator=(const Font &) { id=0; return *this; } public: Font(); virtual ~Font(); virtual void Create(const char *faceName, int characterSet, int size, bool bold, bool italic, bool extraFontFlag=false); virtual void Release(); FontID GetID() { return id; } // Alias another font - caller guarantees not to Release void SetID(FontID id_) { id = id_; } friend class Surface; friend class SurfaceImpl; }; /** * A surface abstracts a place to draw. */ class Surface { private: // Private so Surface objects can not be copied Surface(const Surface &) {} Surface &operator=(const Surface &) { return *this; } public: Surface() {}; virtual ~Surface() {}; static Surface *Allocate(); virtual void Init(WindowID wid)=0; virtual void Init(SurfaceID sid, WindowID wid)=0; virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0; virtual void Release()=0; virtual bool Initialised()=0; virtual void PenColour(ColourAllocated fore)=0; virtual int LogPixelsY()=0; virtual int DeviceHeightFont(int points)=0; virtual void MoveTo(int x_, int y_)=0; virtual void LineTo(int x_, int y_)=0; virtual void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back)=0; virtual void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; virtual void FillRectangle(PRectangle rc, ColourAllocated back)=0; virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0; virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0; virtual void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; virtual void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; virtual void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore)=0; virtual void MeasureWidths(Font &font_, const char *s, int len, int *positions)=0; virtual int WidthText(Font &font_, const char *s, int len)=0; virtual int WidthChar(Font &font_, char ch)=0; virtual int Ascent(Font &font_)=0; virtual int Descent(Font &font_)=0; virtual int InternalLeading(Font &font_)=0; virtual int ExternalLeading(Font &font_)=0; virtual int Height(Font &font_)=0; virtual int AverageCharWidth(Font &font_)=0; virtual int SetPalette(Palette *pal, bool inBackGround)=0; virtual void SetClip(PRectangle rc)=0; virtual void FlushCachedState()=0; virtual void SetUnicodeMode(bool unicodeMode_)=0; virtual void SetDBCSMode(int codePage)=0; }; /** * A simple callback action passing one piece of untyped user data. */ typedef void (*CallBackAction)(void*); /** * Class to hide the details of window manipulation. * Does not own the window which will normally have a longer life than this object. */ class Window { protected: WindowID id; public: Window() : id(0), cursorLast(cursorInvalid) {} Window(const Window &source) : id(source.id), cursorLast(cursorInvalid) {} virtual ~Window(); Window &operator=(WindowID id_) { id = id_; return *this; } WindowID GetID() const { return id; } bool Created() const { return id != 0; } void Destroy(); bool HasFocus(); PRectangle GetPosition(); void SetPosition(PRectangle rc); void SetPositionRelative(PRectangle rc, Window relativeTo); PRectangle GetClientPosition(); void Show(bool show=true); void InvalidateAll(); void InvalidateRectangle(PRectangle rc); virtual void SetFont(Font &font); enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand }; void SetCursor(Cursor curs); void SetTitle(const char *s); private: Cursor cursorLast; }; /** * Listbox management. */ class ListBox : public Window { public: ListBox(); virtual ~ListBox(); static ListBox *Allocate(); virtual void SetFont(Font &font)=0; virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_)=0; virtual void SetAverageCharWidth(int width)=0; virtual void SetVisibleRows(int rows)=0; virtual int GetVisibleRows() const=0; virtual PRectangle GetDesiredRect()=0; virtual int CaretFromEdge()=0; virtual void Clear()=0; virtual void Append(char *s, int type = -1)=0; virtual int Length()=0; virtual void Select(int n)=0; virtual int GetSelection()=0; virtual int Find(const char *prefix)=0; virtual void GetValue(int n, char *value, int len)=0; virtual void RegisterImage(int type, const char *xpm_data)=0; virtual void ClearRegisteredImages()=0; virtual void SetDoubleClickAction(CallBackAction, void *)=0; virtual void SetList(const char* list, char separator, char typesep)=0; }; /** * Menu management. */ class Menu { MenuID id; public: Menu(); MenuID GetID() { return id; } void CreatePopUp(); void Destroy(); void Show(Point pt, Window &w); }; class ElapsedTime { long bigBit; long littleBit; public: ElapsedTime(); double Duration(bool reset=false); }; /** * Dynamic Library (DLL/SO/...) loading */ class DynamicLibrary { public: virtual ~DynamicLibrary() {}; /// @return Pointer to function "name", or NULL on failure. virtual Function FindFunction(const char *name) = 0; /// @return true if the library was loaded successfully. virtual bool IsValid() = 0; /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. static DynamicLibrary *Load(const char *modulePath); }; /** * Platform class used to retrieve system wide parameters such as double click speed * and chrome colour. Not a creatable object, more of a module with several functions. */ class Platform { // Private so Platform objects can not be copied Platform(const Platform &) {} Platform &operator=(const Platform &) { return *this; } public: // Should be private because no new Platforms are ever created // but gcc warns about this Platform() {} ~Platform() {} static ColourDesired Chrome(); static ColourDesired ChromeHighlight(); static const char *DefaultFont(); static int DefaultFontSize(); static unsigned int DoubleClickTime(); static bool MouseButtonBounce(); static void DebugDisplay(const char *s); static bool IsKeyDown(int key); static long SendScintilla( WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0); static long SendScintillaPointer( WindowID w, unsigned int msg, unsigned long wParam=0, void *lParam=0); static bool IsDBCSLeadByte(int codePage, char ch); static int DBCSCharLength(int codePage, const char *s); static int DBCSCharMaxLength(); // These are utility functions not really tied to a platform static int Minimum(int a, int b); static int Maximum(int a, int b); // Next three assume 16 bit shorts and 32 bit longs static long LongFromTwoShorts(short a,short b) { return (a) | ((b) << 16); } static short HighShortFromLong(long x) { return static_cast(x >> 16); } static short LowShortFromLong(long x) { return static_cast(x & 0xffff); } static void DebugPrintf(const char *format, ...); static bool ShowAssertionPopUps(bool assertionPopUps_); static void Assert(const char *c, const char *file, int line); static int Clamp(int val, int minVal, int maxVal); }; #ifdef NDEBUG #define PLATFORM_ASSERT(c) ((void)0) #else #define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Platform::Assert(#c, __FILE__, __LINE__)) #endif // Shut up annoying Visual C++ warnings: #ifdef _MSC_VER #pragma warning(disable: 4244 4309 4514 4710) #endif #endif usr/src/sdlBasic/src/sdlBasic/scintilla/include/Accessor.h0000777000076500007660000000501010463134721020774 0ustar // Scintilla source code edit control /** @file Accessor.h ** Rapid easy access to contents of a Scintilla. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8}; class Accessor; typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len); /** * Interface to data in a Scintilla. */ class Accessor { protected: enum {extremePosition=0x7FFFFFFF}; /** @a bufferSize is a trade off between time taken to copy the characters * and retrieval overhead. * @a slopSize positions the buffer before the desired position * in case there is some backtracking. */ enum {bufferSize=4000, slopSize=bufferSize/8}; char buf[bufferSize+1]; int startPos; int endPos; int codePage; virtual bool InternalIsLeadByte(char ch)=0; virtual void Fill(int position)=0; public: Accessor() : startPos(extremePosition), endPos(0), codePage(0) {} virtual ~Accessor() {} char operator[](int position) { if (position < startPos || position >= endPos) { Fill(position); } return buf[position - startPos]; } /** Safe version of operator[], returning a defined value for invalid position. */ char SafeGetCharAt(int position, char chDefault=' ') { if (position < startPos || position >= endPos) { Fill(position); if (position < startPos || position >= endPos) { // Position is outside range of document return chDefault; } } return buf[position - startPos]; } bool IsLeadByte(char ch) { return codePage && InternalIsLeadByte(ch); } void SetCodePage(int codePage_) { codePage = codePage_; } virtual bool Match(int pos, const char *s)=0; virtual char StyleAt(int position)=0; virtual int GetLine(int position)=0; virtual int LineStart(int line)=0; virtual int LevelAt(int line)=0; virtual int Length()=0; virtual void Flush()=0; virtual int GetLineState(int line)=0; virtual int SetLineState(int line, int state)=0; virtual int GetPropertyInt(const char *key, int defaultValue=0)=0; virtual char *GetProperties()=0; // Style setting virtual void StartAt(unsigned int start, char chMask=31)=0; virtual void SetFlags(char chFlags_, char chWhile_)=0; virtual unsigned int GetStartSegment()=0; virtual void StartSegment(unsigned int pos)=0; virtual void ColourTo(unsigned int pos, int chAttr)=0; virtual void SetLevel(int line, int level)=0; virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0; }; usr/src/sdlBasic/src/sdlBasic/scintilla/include/PropSet.h0000777000076500007660000000602710463134755020646 0ustar // Scintilla source code edit control /** @file PropSet.h ** A Java style properties file module. **/ // Copyright 1998-2002 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef PROPSET_H #define PROPSET_H #include "SString.h" bool EqualCaseInsensitive(const char *a, const char *b); bool isprefix(const char *target, const char *prefix); struct Property { unsigned int hash; char *key; char *val; Property *next; Property() : hash(0), key(0), val(0), next(0) {} }; /** */ class PropSet { protected: enum { hashRoots=31 }; Property *props[hashRoots]; Property *enumnext; int enumhash; static unsigned int HashString(const char *s, size_t len) { unsigned int ret = 0; while (len--) { ret <<= 4; ret ^= *s; s++; } return ret; } static bool IncludesVar(const char *value, const char *key); public: PropSet *superPS; PropSet(); ~PropSet(); void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1); void Set(const char *keyVal); void Unset(const char *key, int lenKey=-1); void SetMultiple(const char *s); SString Get(const char *key); SString GetExpanded(const char *key); SString Expand(const char *withVars, int maxExpands=100); int GetInt(const char *key, int defaultValue=0); SString GetWild(const char *keybase, const char *filename); SString GetNewExpand(const char *keybase, const char *filename=""); void Clear(); char *ToString(); // Caller must delete[] the return value bool GetFirst(char **key, char **val); bool GetNext(char **key, char **val); private: // copy-value semantics not implemented PropSet(const PropSet ©); void operator=(const PropSet &assign); }; /** */ class WordList { public: // Each word contains at least one character - a empty word acts as sentinel at the end. char **words; char **wordsNoCase; char *list; int len; bool onlyLineEnds; ///< Delimited by any white space or only line ends bool sorted; bool sortedNoCase; int starts[256]; WordList(bool onlyLineEnds_ = false) : words(0), wordsNoCase(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), sorted(false), sortedNoCase(false) {} ~WordList() { Clear(); } operator bool() { return len ? true : false; } char *operator[](int ind) { return words[ind]; } void Clear(); void Set(const char *s); char *Allocate(int size); void SetFromAllocated(); bool InList(const char *s); bool InListAbbreviated(const char *s, const char marker); const char *GetNearestWord(const char *wordStart, int searchLen, bool ignoreCase = false, SString wordCharacters="", int wordIndex = -1); char *GetNearestWords(const char *wordStart, int searchLen, bool ignoreCase=false, char otherSeparator='\0', bool exactLen=false); }; inline bool IsAlphabetic(unsigned int ch) { return ((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a') && (ch <= 'z')); } #ifdef _MSC_VER // Visual C++ doesn't like the private copy idiom for disabling // the default copy constructor and operator=, but it's fine. #pragma warning(disable: 4511 4512) #endif #endif usr/src/sdlBasic/src/sdlBasic/scintilla/include/ScintillaWidget.h0000777000076500007660000000265410463135003022325 0ustar // Scintilla source code edit control /** @file ScintillaWidget.h ** Definition of Scintilla widget for GTK+. ** Only needed by GTK+ code but is harmless on other platforms. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SCINTILLAWIDGET_H #define SCINTILLAWIDGET_H #if PLAT_GTK #ifdef __cplusplus extern "C" { #endif #define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject) #define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass) #define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ()) typedef struct _ScintillaObject ScintillaObject; typedef struct _ScintillaClass ScintillaClass; struct _ScintillaObject { GtkContainer cont; void *pscin; }; struct _ScintillaClass { GtkContainerClass parent_class; void (* command) (ScintillaObject *ttt); void (* notify) (ScintillaObject *ttt); }; GtkType scintilla_get_type (void); GtkWidget* scintilla_new (void); void scintilla_set_id (ScintillaObject *sci,int id); sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam); void scintilla_release_resources(void); #if GTK_MAJOR_VERSION < 2 #define SCINTILLA_NOTIFY "notify" #else #define SCINTILLA_NOTIFY "sci-notify" #endif #ifdef __cplusplus } #endif #endif #endif usr/src/sdlBasic/src/sdlBasic/scintilla/include/WindowAccessor.h0000777000076500007660000000340310463135003022162 0ustar // Scintilla source code edit control /** @file WindowAccessor.h ** Implementation of BufferAccess and StylingAccess on a Scintilla ** rapid easy access to contents of a Scintilla. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. /** */ class WindowAccessor : public Accessor { // Private so WindowAccessor objects can not be copied WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {} WindowAccessor &operator=(const WindowAccessor &) { return *this; } protected: WindowID id; PropSet &props; int lenDoc; char styleBuf[bufferSize]; int validLen; char chFlags; char chWhile; unsigned int startSeg; bool InternalIsLeadByte(char ch); void Fill(int position); public: WindowAccessor(WindowID id_, PropSet &props_) : Accessor(), id(id_), props(props_), lenDoc(-1), validLen(0), chFlags(0), chWhile(0) { } ~WindowAccessor(); bool Match(int pos, const char *s); char StyleAt(int position); int GetLine(int position); int LineStart(int line); int LevelAt(int line); int Length(); void Flush(); int GetLineState(int line); int SetLineState(int line, int state); int GetPropertyInt(const char *key, int defaultValue=0) { return props.GetInt(key, defaultValue); } char *GetProperties() { return props.ToString(); } void StartAt(unsigned int start, char chMask=31); void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; unsigned int GetStartSegment() { return startSeg; } void StartSegment(unsigned int pos); void ColourTo(unsigned int pos, int chAttr); void SetLevel(int line, int level); int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); }; usr/src/sdlBasic/src/sdlBasic/scintilla/include/SString.h0000777000076500007660000002032010463134755020633 0ustar // SciTE - Scintilla based Text Editor /** @file SString.h ** A simple string class. **/ // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SSTRING_H #define SSTRING_H // These functions are implemented because each platform calls them something different. int CompareCaseInsensitive(const char *a, const char *b); int CompareNCaseInsensitive(const char *a, const char *b, size_t len); bool EqualCaseInsensitive(const char *a, const char *b); // Define another string class. // While it would be 'better' to use std::string, that doubles the executable size. // An SString may contain embedded nul characters. /** * Base class from which the two other classes (SBuffer & SString) * are derived. */ class SContainer { public: /** Type of string lengths (sizes) and positions (indexes). */ typedef size_t lenpos_t; /** Out of bounds value indicating that the string argument should be measured. */ enum { measure_length=0xffffffffU}; protected: char *s; ///< The C string lenpos_t sSize; ///< The size of the buffer, less 1: ie. the maximum size of the string SContainer() : s(0), sSize(0) {} ~SContainer() { delete []s; // Suppose it was allocated using StringAllocate s = 0; sSize = 0; } /** Size of buffer. */ lenpos_t size() const { if (s) { return sSize; } else { return 0; } } public: /** * Allocate uninitialized memory big enough to fit a string of the given length. * @return the pointer to the new string */ static char *StringAllocate(lenpos_t len); /** * Duplicate a buffer/C string. * Allocate memory of the given size, or big enough to fit the string if length isn't given; * then copy the given string in the allocated memory. * @return the pointer to the new string */ static char *StringAllocate( const char *s, ///< The string to duplicate lenpos_t len=measure_length); ///< The length of memory to allocate. Optional. }; /** * @brief A string buffer class. * * Main use is to ask an API the length of a string it can provide, * then to allocate a buffer of the given size, and to provide this buffer * to the API to put the string. * This class is intended to be shortlived, to be transformed as SString * as soon as it holds the string, so it has little members. * Note: we assume the buffer is filled by the API. If the length can be shorter, * we should set sLen to strlen(sb.ptr()) in related SString constructor and assignment. */ class SBuffer : protected SContainer { public: SBuffer(lenpos_t len) { s = StringAllocate(len); if (s) { *s = '\0'; sSize = len; } else { sSize = 0; } } private: /// Copy constructor // Here only to be on the safe size, user should avoid returning SBuffer values. SBuffer(const SBuffer &source) : SContainer() { s = StringAllocate(source.s, source.sSize); sSize = (s) ? source.sSize : 0; } /// Default assignment operator // Same here, shouldn't be used SBuffer &operator=(const SBuffer &source) { if (this != &source) { delete []s; s = StringAllocate(source.s, source.sSize); sSize = (s) ? source.sSize : 0; } return *this; } public: /** Provide direct read/write access to buffer. */ char *ptr() { return s; } /** Ownership of the buffer have been taken, so release it. */ void reset() { s = 0; sSize = 0; } /** Size of buffer. */ lenpos_t size() const { return SContainer::size(); } }; /** * @brief A simple string class. * * Hold the length of the string for quick operations, * can have a buffer bigger than the string to avoid too many memory allocations and copies. * May have embedded zeroes as a result of @a substitute, but relies too heavily on C string * functions to allow reliable manipulations of these strings, other than simple appends, etc. */ class SString : protected SContainer { lenpos_t sLen; ///< The size of the string in s lenpos_t sizeGrowth; ///< Minimum growth size when appending strings enum { sizeGrowthDefault = 64 }; bool grow(lenpos_t lenNew); SString &assign(const char *sOther, lenpos_t sSize_=measure_length); public: SString() : sLen(0), sizeGrowth(sizeGrowthDefault) {} SString(const SString &source) : SContainer(), sizeGrowth(sizeGrowthDefault) { s = StringAllocate(source.s, source.sLen); sSize = sLen = (s) ? source.sLen : 0; } SString(const char *s_) : sizeGrowth(sizeGrowthDefault) { s = StringAllocate(s_); sSize = sLen = (s) ? strlen(s) : 0; } SString(SBuffer &buf) : sizeGrowth(sizeGrowthDefault) { s = buf.ptr(); sSize = sLen = buf.size(); // Consumes the given buffer! buf.reset(); } SString(const char *s_, lenpos_t first, lenpos_t last) : sizeGrowth(sizeGrowthDefault) { // note: expects the "last" argument to point one beyond the range end (a la STL iterators) s = StringAllocate(s_ + first, last - first); sSize = sLen = (s) ? last - first : 0; } SString(int i); SString(double d, int precision); ~SString() { sLen = 0; } void clear() { if (s) { *s = '\0'; } sLen = 0; } /** Size of buffer. */ lenpos_t size() const { return SContainer::size(); } /** Size of string in buffer. */ lenpos_t length() const { return sLen; } /** Read access to a character of the string. */ char operator[](lenpos_t i) const { return (s && i < sSize) ? s[i] : '\0'; } SString &operator=(const char *source) { return assign(source); } SString &operator=(const SString &source) { if (this != &source) { assign(source.s, source.sLen); } return *this; } bool operator==(const SString &sOther) const; bool operator!=(const SString &sOther) const { return !operator==(sOther); } bool operator==(const char *sOther) const; bool operator!=(const char *sOther) const { return !operator==(sOther); } bool contains(char ch) const { return (s && *s) ? strchr(s, ch) != 0 : false; } void setsizegrowth(lenpos_t sizeGrowth_) { sizeGrowth = sizeGrowth_; } const char *c_str() const { return s ? s : ""; } /** Give ownership of buffer to caller which must use delete[] to free buffer. */ char *detach() { char *sRet = s; s = 0; sSize = 0; sLen = 0; return sRet; } SString substr(lenpos_t subPos, lenpos_t subLen=measure_length) const; SString &lowercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length); SString &uppercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length); SString &append(const char *sOther, lenpos_t sLenOther=measure_length, char sep = '\0'); SString &operator+=(const char *sOther) { return append(sOther, static_cast(measure_length)); } SString &operator+=(const SString &sOther) { return append(sOther.s, sOther.sLen); } SString &operator+=(char ch) { return append(&ch, 1); } SString &appendwithseparator(const char *sOther, char sep) { return append(sOther, strlen(sOther), sep); } SString &insert(lenpos_t pos, const char *sOther, lenpos_t sLenOther=measure_length); /** * Remove @a len characters from the @a pos position, included. * Characters at pos + len and beyond replace characters at pos. * If @a len is 0, or greater than the length of the string * starting at @a pos, the string is just truncated at @a pos. */ void remove(lenpos_t pos, lenpos_t len); SString &change(lenpos_t pos, char ch) { if (pos < sLen) { // character changed must be in string bounds *(s + pos) = ch; } return *this; } /** Read an integral numeric value from the string. */ int value() const { return s ? atoi(s) : 0; } bool startswith(const char *prefix); bool endswith(const char *suffix); int search(const char *sFind, lenpos_t start=0) const; bool contains(const char *sFind) const { return search(sFind) >= 0; } int substitute(char chFind, char chReplace); int substitute(const char *sFind, const char *sReplace); int remove(const char *sFind) { return substitute(sFind, ""); } }; /** * Duplicate a C string. * Allocate memory of the given size, or big enough to fit the string if length isn't given; * then copy the given string in the allocated memory. * @return the pointer to the new string */ inline char *StringDup( const char *s, ///< The string to duplicate SContainer::lenpos_t len=SContainer::measure_length) ///< The length of memory to allocate. Optional. { return SContainer::StringAllocate(s, len); } #endif usr/src/sdlBasic/src/sdlBasic/scintilla/include/Scintilla.h0000777000076500007660000005450210463135003021160 0ustar // Scintilla source code edit control /** @file Scintilla.h ** Interface to the edit control. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. // Most of this file is automatically generated from the Scintilla.iface interface definition // file which contains any comments about the definitions. HFacer.py does the generation. #ifndef SCINTILLA_H #define SCINTILLA_H #if LCCWIN typedef BOOL bool; #endif #if PLAT_WIN // Return false on failure: bool Scintilla_RegisterClasses(void *hInstance); bool Scintilla_ReleaseResources(); #endif int Scintilla_LinkLexers(); // Here should be placed typedefs for uptr_t, an unsigned integer type large enough to // hold a pointer and sptr_t, a signed integer large enough to hold a pointer. // May need to be changed for 64 bit platforms. #if _MSC_VER >= 1300 #include #endif #ifdef MAXULONG_PTR typedef ULONG_PTR uptr_t; typedef LONG_PTR sptr_t; #else typedef unsigned long uptr_t; typedef long sptr_t; #endif typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam); //++Autogenerated -- start of section automatically generated from Scintilla.iface #define INVALID_POSITION -1 #define SCI_START 2000 #define SCI_OPTIONAL_START 3000 #define SCI_LEXER_START 4000 #define SCI_ADDTEXT 2001 #define SCI_ADDSTYLEDTEXT 2002 #define SCI_INSERTTEXT 2003 #define SCI_CLEARALL 2004 #define SCI_CLEARDOCUMENTSTYLE 2005 #define SCI_GETLENGTH 2006 #define SCI_GETCHARAT 2007 #define SCI_GETCURRENTPOS 2008 #define SCI_GETANCHOR 2009 #define SCI_GETSTYLEAT 2010 #define SCI_REDO 2011 #define SCI_SETUNDOCOLLECTION 2012 #define SCI_SELECTALL 2013 #define SCI_SETSAVEPOINT 2014 #define SCI_GETSTYLEDTEXT 2015 #define SCI_CANREDO 2016 #define SCI_MARKERLINEFROMHANDLE 2017 #define SCI_MARKERDELETEHANDLE 2018 #define SCI_GETUNDOCOLLECTION 2019 #define SCWS_INVISIBLE 0 #define SCWS_VISIBLEALWAYS 1 #define SCWS_VISIBLEAFTERINDENT 2 #define SCI_GETVIEWWS 2020 #define SCI_SETVIEWWS 2021 #define SCI_POSITIONFROMPOINT 2022 #define SCI_POSITIONFROMPOINTCLOSE 2023 #define SCI_GOTOLINE 2024 #define SCI_GOTOPOS 2025 #define SCI_SETANCHOR 2026 #define SCI_GETCURLINE 2027 #define SCI_GETENDSTYLED 2028 #define SC_EOL_CRLF 0 #define SC_EOL_CR 1 #define SC_EOL_LF 2 #define SCI_CONVERTEOLS 2029 #define SCI_GETEOLMODE 2030 #define SCI_SETEOLMODE 2031 #define SCI_STARTSTYLING 2032 #define SCI_SETSTYLING 2033 #define SCI_GETBUFFEREDDRAW 2034 #define SCI_SETBUFFEREDDRAW 2035 #define SCI_SETTABWIDTH 2036 #define SCI_GETTABWIDTH 2121 #define SC_CP_UTF8 65001 #define SC_CP_DBCS 1 #define SCI_SETCODEPAGE 2037 #define SCI_SETUSEPALETTE 2039 #define MARKER_MAX 31 #define SC_MARK_CIRCLE 0 #define SC_MARK_ROUNDRECT 1 #define SC_MARK_ARROW 2 #define SC_MARK_SMALLRECT 3 #define SC_MARK_SHORTARROW 4 #define SC_MARK_EMPTY 5 #define SC_MARK_ARROWDOWN 6 #define SC_MARK_MINUS 7 #define SC_MARK_PLUS 8 #define SC_MARK_VLINE 9 #define SC_MARK_LCORNER 10 #define SC_MARK_TCORNER 11 #define SC_MARK_BOXPLUS 12 #define SC_MARK_BOXPLUSCONNECTED 13 #define SC_MARK_BOXMINUS 14 #define SC_MARK_BOXMINUSCONNECTED 15 #define SC_MARK_LCORNERCURVE 16 #define SC_MARK_TCORNERCURVE 17 #define SC_MARK_CIRCLEPLUS 18 #define SC_MARK_CIRCLEPLUSCONNECTED 19 #define SC_MARK_CIRCLEMINUS 20 #define SC_MARK_CIRCLEMINUSCONNECTED 21 #define SC_MARK_BACKGROUND 22 #define SC_MARK_DOTDOTDOT 23 #define SC_MARK_ARROWS 24 #define SC_MARK_PIXMAP 25 #define SC_MARK_FULLRECT 26 #define SC_MARK_CHARACTER 10000 #define SC_MARKNUM_FOLDEREND 25 #define SC_MARKNUM_FOLDEROPENMID 26 #define SC_MARKNUM_FOLDERMIDTAIL 27 #define SC_MARKNUM_FOLDERTAIL 28 #define SC_MARKNUM_FOLDERSUB 29 #define SC_MARKNUM_FOLDER 30 #define SC_MARKNUM_FOLDEROPEN 31 #define SC_MASK_FOLDERS 0xFE000000 #define SCI_MARKERDEFINE 2040 #define SCI_MARKERSETFORE 2041 #define SCI_MARKERSETBACK 2042 #define SCI_MARKERADD 2043 #define SCI_MARKERDELETE 2044 #define SCI_MARKERDELETEALL 2045 #define SCI_MARKERGET 2046 #define SCI_MARKERNEXT 2047 #define SCI_MARKERPREVIOUS 2048 #define SCI_MARKERDEFINEPIXMAP 2049 #define SC_MARGIN_SYMBOL 0 #define SC_MARGIN_NUMBER 1 #define SCI_SETMARGINTYPEN 2240 #define SCI_GETMARGINTYPEN 2241 #define SCI_SETMARGINWIDTHN 2242 #define SCI_GETMARGINWIDTHN 2243 #define SCI_SETMARGINMASKN 2244 #define SCI_GETMARGINMASKN 2245 #define SCI_SETMARGINSENSITIVEN 2246 #define SCI_GETMARGINSENSITIVEN 2247 #define STYLE_DEFAULT 32 #define STYLE_LINENUMBER 33 #define STYLE_BRACELIGHT 34 #define STYLE_BRACEBAD 35 #define STYLE_CONTROLCHAR 36 #define STYLE_INDENTGUIDE 37 #define STYLE_LASTPREDEFINED 39 #define STYLE_MAX 127 #define SC_CHARSET_ANSI 0 #define SC_CHARSET_DEFAULT 1 #define SC_CHARSET_BALTIC 186 #define SC_CHARSET_CHINESEBIG5 136 #define SC_CHARSET_EASTEUROPE 238 #define SC_CHARSET_GB2312 134 #define SC_CHARSET_GREEK 161 #define SC_CHARSET_HANGUL 129 #define SC_CHARSET_MAC 77 #define SC_CHARSET_OEM 255 #define SC_CHARSET_RUSSIAN 204 #define SC_CHARSET_SHIFTJIS 128 #define SC_CHARSET_SYMBOL 2 #define SC_CHARSET_TURKISH 162 #define SC_CHARSET_JOHAB 130 #define SC_CHARSET_HEBREW 177 #define SC_CHARSET_ARABIC 178 #define SC_CHARSET_VIETNAMESE 163 #define SC_CHARSET_THAI 222 #define SC_CHARSET_8859_15 1000 #define SCI_STYLECLEARALL 2050 #define SCI_STYLESETFORE 2051 #define SCI_STYLESETBACK 2052 #define SCI_STYLESETBOLD 2053 #define SCI_STYLESETITALIC 2054 #define SCI_STYLESETSIZE 2055 #define SCI_STYLESETFONT 2056 #define SCI_STYLESETEOLFILLED 2057 #define SCI_STYLERESETDEFAULT 2058 #define SCI_STYLESETUNDERLINE 2059 #define SC_CASE_MIXED 0 #define SC_CASE_UPPER 1 #define SC_CASE_LOWER 2 #define SCI_STYLESETCASE 2060 #define SCI_STYLESETCHARACTERSET 2066 #define SCI_STYLESETHOTSPOT 2409 #define SCI_SETSELFORE 2067 #define SCI_SETSELBACK 2068 #define SCI_SETCARETFORE 2069 #define SCI_ASSIGNCMDKEY 2070 #define SCI_CLEARCMDKEY 2071 #define SCI_CLEARALLCMDKEYS 2072 #define SCI_SETSTYLINGEX 2073 #define SCI_STYLESETVISIBLE 2074 #define SCI_GETCARETPERIOD 2075 #define SCI_SETCARETPERIOD 2076 #define SCI_SETWORDCHARS 2077 #define SCI_BEGINUNDOACTION 2078 #define SCI_ENDUNDOACTION 2079 #define INDIC_MAX 7 #define INDIC_PLAIN 0 #define INDIC_SQUIGGLE 1 #define INDIC_TT 2 #define INDIC_DIAGONAL 3 #define INDIC_STRIKE 4 #define INDIC_HIDDEN 5 #define INDIC_BOX 6 #define INDIC0_MASK 0x20 #define INDIC1_MASK 0x40 #define INDIC2_MASK 0x80 #define INDICS_MASK 0xE0 #define SCI_INDICSETSTYLE 2080 #define SCI_INDICGETSTYLE 2081 #define SCI_INDICSETFORE 2082 #define SCI_INDICGETFORE 2083 #define SCI_SETWHITESPACEFORE 2084 #define SCI_SETWHITESPACEBACK 2085 #define SCI_SETSTYLEBITS 2090 #define SCI_GETSTYLEBITS 2091 #define SCI_SETLINESTATE 2092 #define SCI_GETLINESTATE 2093 #define SCI_GETMAXLINESTATE 2094 #define SCI_GETCARETLINEVISIBLE 2095 #define SCI_SETCARETLINEVISIBLE 2096 #define SCI_GETCARETLINEBACK 2097 #define SCI_SETCARETLINEBACK 2098 #define SCI_STYLESETCHANGEABLE 2099 #define SCI_AUTOCSHOW 2100 #define SCI_AUTOCCANCEL 2101 #define SCI_AUTOCACTIVE 2102 #define SCI_AUTOCPOSSTART 2103 #define SCI_AUTOCCOMPLETE 2104 #define SCI_AUTOCSTOPS 2105 #define SCI_AUTOCSETSEPARATOR 2106 #define SCI_AUTOCGETSEPARATOR 2107 #define SCI_AUTOCSELECT 2108 #define SCI_AUTOCSETCANCELATSTART 2110 #define SCI_AUTOCGETCANCELATSTART 2111 #define SCI_AUTOCSETFILLUPS 2112 #define SCI_AUTOCSETCHOOSESINGLE 2113 #define SCI_AUTOCGETCHOOSESINGLE 2114 #define SCI_AUTOCSETIGNORECASE 2115 #define SCI_AUTOCGETIGNORECASE 2116 #define SCI_USERLISTSHOW 2117 #define SCI_AUTOCSETAUTOHIDE 2118 #define SCI_AUTOCGETAUTOHIDE 2119 #define SCI_AUTOCSETDROPRESTOFWORD 2270 #define SCI_AUTOCGETDROPRESTOFWORD 2271 #define SCI_REGISTERIMAGE 2405 #define SCI_CLEARREGISTEREDIMAGES 2408 #define SCI_AUTOCGETTYPESEPARATOR 2285 #define SCI_AUTOCSETTYPESEPARATOR 2286 #define SCI_AUTOCSETMAXWIDTH 2208 #define SCI_AUTOCGETMAXWIDTH 2209 #define SCI_AUTOCSETMAXHEIGHT 2210 #define SCI_AUTOCGETMAXHEIGHT 2211 #define SCI_SETINDENT 2122 #define SCI_GETINDENT 2123 #define SCI_SETUSETABS 2124 #define SCI_GETUSETABS 2125 #define SCI_SETLINEINDENTATION 2126 #define SCI_GETLINEINDENTATION 2127 #define SCI_GETLINEINDENTPOSITION 2128 #define SCI_GETCOLUMN 2129 #define SCI_SETHSCROLLBAR 2130 #define SCI_GETHSCROLLBAR 2131 #define SCI_SETINDENTATIONGUIDES 2132 #define SCI_GETINDENTATIONGUIDES 2133 #define SCI_SETHIGHLIGHTGUIDE 2134 #define SCI_GETHIGHLIGHTGUIDE 2135 #define SCI_GETLINEENDPOSITION 2136 #define SCI_GETCODEPAGE 2137 #define SCI_GETCARETFORE 2138 #define SCI_GETUSEPALETTE 2139 #define SCI_GETREADONLY 2140 #define SCI_SETCURRENTPOS 2141 #define SCI_SETSELECTIONSTART 2142 #define SCI_GETSELECTIONSTART 2143 #define SCI_SETSELECTIONEND 2144 #define SCI_GETSELECTIONEND 2145 #define SCI_SETPRINTMAGNIFICATION 2146 #define SCI_GETPRINTMAGNIFICATION 2147 #define SC_PRINT_NORMAL 0 #define SC_PRINT_INVERTLIGHT 1 #define SC_PRINT_BLACKONWHITE 2 #define SC_PRINT_COLOURONWHITE 3 #define SC_PRINT_COLOURONWHITEDEFAULTBG 4 #define SCI_SETPRINTCOLOURMODE 2148 #define SCI_GETPRINTCOLOURMODE 2149 #define SCFIND_WHOLEWORD 2 #define SCFIND_MATCHCASE 4 #define SCFIND_WORDSTART 0x00100000 #define SCFIND_REGEXP 0x00200000 #define SCFIND_POSIX 0x00400000 #define SCI_FINDTEXT 2150 #define SCI_FORMATRANGE 2151 #define SCI_GETFIRSTVISIBLELINE 2152 #define SCI_GETLINE 2153 #define SCI_GETLINECOUNT 2154 #define SCI_SETMARGINLEFT 2155 #define SCI_GETMARGINLEFT 2156 #define SCI_SETMARGINRIGHT 2157 #define SCI_GETMARGINRIGHT 2158 #define SCI_GETMODIFY 2159 #define SCI_SETSEL 2160 #define SCI_GETSELTEXT 2161 #define SCI_GETTEXTRANGE 2162 #define SCI_HIDESELECTION 2163 #define SCI_POINTXFROMPOSITION 2164 #define SCI_POINTYFROMPOSITION 2165 #define SCI_LINEFROMPOSITION 2166 #define SCI_POSITIONFROMLINE 2167 #define SCI_LINESCROLL 2168 #define SCI_SCROLLCARET 2169 #define SCI_REPLACESEL 2170 #define SCI_SETREADONLY 2171 #define SCI_NULL 2172 #define SCI_CANPASTE 2173 #define SCI_CANUNDO 2174 #define SCI_EMPTYUNDOBUFFER 2175 #define SCI_UNDO 2176 #define SCI_CUT 2177 #define SCI_COPY 2178 #define SCI_PASTE 2179 #define SCI_CLEAR 2180 #define SCI_SETTEXT 2181 #define SCI_GETTEXT 2182 #define SCI_GETTEXTLENGTH 2183 #define SCI_GETDIRECTFUNCTION 2184 #define SCI_GETDIRECTPOINTER 2185 #define SCI_SETOVERTYPE 2186 #define SCI_GETOVERTYPE 2187 #define SCI_SETCARETWIDTH 2188 #define SCI_GETCARETWIDTH 2189 #define SCI_SETTARGETSTART 2190 #define SCI_GETTARGETSTART 2191 #define SCI_SETTARGETEND 2192 #define SCI_GETTARGETEND 2193 #define SCI_REPLACETARGET 2194 #define SCI_REPLACETARGETRE 2195 #define SCI_SEARCHINTARGET 2197 #define SCI_SETSEARCHFLAGS 2198 #define SCI_GETSEARCHFLAGS 2199 #define SCI_CALLTIPSHOW 2200 #define SCI_CALLTIPCANCEL 2201 #define SCI_CALLTIPACTIVE 2202 #define SCI_CALLTIPPOSSTART 2203 #define SCI_CALLTIPSETHLT 2204 #define SCI_CALLTIPSETBACK 2205 #define SCI_CALLTIPSETFORE 2206 #define SCI_CALLTIPSETFOREHLT 2207 #define SCI_VISIBLEFROMDOCLINE 2220 #define SCI_DOCLINEFROMVISIBLE 2221 #define SCI_WRAPCOUNT 2235 #define SC_FOLDLEVELBASE 0x400 #define SC_FOLDLEVELWHITEFLAG 0x1000 #define SC_FOLDLEVELHEADERFLAG 0x2000 #define SC_FOLDLEVELBOXHEADERFLAG 0x4000 #define SC_FOLDLEVELBOXFOOTERFLAG 0x8000 #define SC_FOLDLEVELCONTRACTED 0x10000 #define SC_FOLDLEVELUNINDENT 0x20000 #define SC_FOLDLEVELNUMBERMASK 0x0FFF #define SCI_SETFOLDLEVEL 2222 #define SCI_GETFOLDLEVEL 2223 #define SCI_GETLASTCHILD 2224 #define SCI_GETFOLDPARENT 2225 #define SCI_SHOWLINES 2226 #define SCI_HIDELINES 2227 #define SCI_GETLINEVISIBLE 2228 #define SCI_SETFOLDEXPANDED 2229 #define SCI_GETFOLDEXPANDED 2230 #define SCI_TOGGLEFOLD 2231 #define SCI_ENSUREVISIBLE 2232 #define SC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002 #define SC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004 #define SC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008 #define SC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010 #define SC_FOLDFLAG_LEVELNUMBERS 0x0040 #define SC_FOLDFLAG_BOX 0x0001 #define SCI_SETFOLDFLAGS 2233 #define SCI_ENSUREVISIBLEENFORCEPOLICY 2234 #define SCI_SETTABINDENTS 2260 #define SCI_GETTABINDENTS 2261 #define SCI_SETBACKSPACEUNINDENTS 2262 #define SCI_GETBACKSPACEUNINDENTS 2263 #define SC_TIME_FOREVER 10000000 #define SCI_SETMOUSEDWELLTIME 2264 #define SCI_GETMOUSEDWELLTIME 2265 #define SCI_WORDSTARTPOSITION 2266 #define SCI_WORDENDPOSITION 2267 #define SC_WRAP_NONE 0 #define SC_WRAP_WORD 1 #define SC_WRAP_CHAR 2 #define SCI_SETWRAPMODE 2268 #define SCI_GETWRAPMODE 2269 #define SC_WRAPVISUALFLAG_NONE 0x0000 #define SC_WRAPVISUALFLAG_END 0x0001 #define SC_WRAPVISUALFLAG_START 0x0002 #define SCI_SETWRAPVISUALFLAGS 2460 #define SCI_GETWRAPVISUALFLAGS 2461 #define SC_WRAPVISUALFLAGLOC_DEFAULT 0x0000 #define SC_WRAPVISUALFLAGLOC_END_BY_TEXT 0x0001 #define SC_WRAPVISUALFLAGLOC_START_BY_TEXT 0x0002 #define SCI_SETWRAPVISUALFLAGSLOCATION 2462 #define SCI_GETWRAPVISUALFLAGSLOCATION 2463 #define SCI_SETWRAPSTARTINDENT 2464 #define SCI_GETWRAPSTARTINDENT 2465 #define SC_CACHE_NONE 0 #define SC_CACHE_CARET 1 #define SC_CACHE_PAGE 2 #define SC_CACHE_DOCUMENT 3 #define SCI_SETLAYOUTCACHE 2272 #define SCI_GETLAYOUTCACHE 2273 #define SCI_SETSCROLLWIDTH 2274 #define SCI_GETSCROLLWIDTH 2275 #define SCI_TEXTWIDTH 2276 #define SCI_SETENDATLASTLINE 2277 #define SCI_GETENDATLASTLINE 2278 #define SCI_TEXTHEIGHT 2279 #define SCI_SETVSCROLLBAR 2280 #define SCI_GETVSCROLLBAR 2281 #define SCI_APPENDTEXT 2282 #define SCI_GETTWOPHASEDRAW 2283 #define SCI_SETTWOPHASEDRAW 2284 #define SCI_TARGETFROMSELECTION 2287 #define SCI_LINESJOIN 2288 #define SCI_LINESSPLIT 2289 #define SCI_SETFOLDMARGINCOLOUR 2290 #define SCI_SETFOLDMARGINHICOLOUR 2291 #define SCI_LINEDOWN 2300 #define SCI_LINEDOWNEXTEND 2301 #define SCI_LINEUP 2302 #define SCI_LINEUPEXTEND 2303 #define SCI_CHARLEFT 2304 #define SCI_CHARLEFTEXTEND 2305 #define SCI_CHARRIGHT 2306 #define SCI_CHARRIGHTEXTEND 2307 #define SCI_WORDLEFT 2308 #define SCI_WORDLEFTEXTEND 2309 #define SCI_WORDRIGHT 2310 #define SCI_WORDRIGHTEXTEND 2311 #define SCI_HOME 2312 #define SCI_HOMEEXTEND 2313 #define SCI_LINEEND 2314 #define SCI_LINEENDEXTEND 2315 #define SCI_DOCUMENTSTART 2316 #define SCI_DOCUMENTSTARTEXTEND 2317 #define SCI_DOCUMENTEND 2318 #define SCI_DOCUMENTENDEXTEND 2319 #define SCI_PAGEUP 2320 #define SCI_PAGEUPEXTEND 2321 #define SCI_PAGEDOWN 2322 #define SCI_PAGEDOWNEXTEND 2323 #define SCI_EDITTOGGLEOVERTYPE 2324 #define SCI_CANCEL 2325 #define SCI_DELETEBACK 2326 #define SCI_TAB 2327 #define SCI_BACKTAB 2328 #define SCI_NEWLINE 2329 #define SCI_FORMFEED 2330 #define SCI_VCHOME 2331 #define SCI_VCHOMEEXTEND 2332 #define SCI_ZOOMIN 2333 #define SCI_ZOOMOUT 2334 #define SCI_DELWORDLEFT 2335 #define SCI_DELWORDRIGHT 2336 #define SCI_LINECUT 2337 #define SCI_LINEDELETE 2338 #define SCI_LINETRANSPOSE 2339 #define SCI_LINEDUPLICATE 2404 #define SCI_LOWERCASE 2340 #define SCI_UPPERCASE 2341 #define SCI_LINESCROLLDOWN 2342 #define SCI_LINESCROLLUP 2343 #define SCI_DELETEBACKNOTLINE 2344 #define SCI_HOMEDISPLAY 2345 #define SCI_HOMEDISPLAYEXTEND 2346 #define SCI_LINEENDDISPLAY 2347 #define SCI_LINEENDDISPLAYEXTEND 2348 #define SCI_HOMEWRAP 2349 #define SCI_HOMEWRAPEXTEND 2450 #define SCI_LINEENDWRAP 2451 #define SCI_LINEENDWRAPEXTEND 2452 #define SCI_VCHOMEWRAP 2453 #define SCI_VCHOMEWRAPEXTEND 2454 #define SCI_LINECOPY 2455 #define SCI_MOVECARETINSIDEVIEW 2401 #define SCI_LINELENGTH 2350 #define SCI_BRACEHIGHLIGHT 2351 #define SCI_BRACEBADLIGHT 2352 #define SCI_BRACEMATCH 2353 #define SCI_GETVIEWEOL 2355 #define SCI_SETVIEWEOL 2356 #define SCI_GETDOCPOINTER 2357 #define SCI_SETDOCPOINTER 2358 #define SCI_SETMODEVENTMASK 2359 #define EDGE_NONE 0 #define EDGE_LINE 1 #define EDGE_BACKGROUND 2 #define SCI_GETEDGECOLUMN 2360 #define SCI_SETEDGECOLUMN 2361 #define SCI_GETEDGEMODE 2362 #define SCI_SETEDGEMODE 2363 #define SCI_GETEDGECOLOUR 2364 #define SCI_SETEDGECOLOUR 2365 #define SCI_SEARCHANCHOR 2366 #define SCI_SEARCHNEXT 2367 #define SCI_SEARCHPREV 2368 #define SCI_LINESONSCREEN 2370 #define SCI_USEPOPUP 2371 #define SCI_SELECTIONISRECTANGLE 2372 #define SCI_SETZOOM 2373 #define SCI_GETZOOM 2374 #define SCI_CREATEDOCUMENT 2375 #define SCI_ADDREFDOCUMENT 2376 #define SCI_RELEASEDOCUMENT 2377 #define SCI_GETMODEVENTMASK 2378 #define SCI_SETFOCUS 2380 #define SCI_GETFOCUS 2381 #define SCI_SETSTATUS 2382 #define SCI_GETSTATUS 2383 #define SCI_SETMOUSEDOWNCAPTURES 2384 #define SCI_GETMOUSEDOWNCAPTURES 2385 #define SC_CURSORNORMAL -1 #define SC_CURSORWAIT 4 #define SCI_SETCURSOR 2386 #define SCI_GETCURSOR 2387 #define SCI_SETCONTROLCHARSYMBOL 2388 #define SCI_GETCONTROLCHARSYMBOL 2389 #define SCI_WORDPARTLEFT 2390 #define SCI_WORDPARTLEFTEXTEND 2391 #define SCI_WORDPARTRIGHT 2392 #define SCI_WORDPARTRIGHTEXTEND 2393 #define VISIBLE_SLOP 0x01 #define VISIBLE_STRICT 0x04 #define SCI_SETVISIBLEPOLICY 2394 #define SCI_DELLINELEFT 2395 #define SCI_DELLINERIGHT 2396 #define SCI_SETXOFFSET 2397 #define SCI_GETXOFFSET 2398 #define SCI_CHOOSECARETX 2399 #define SCI_GRABFOCUS 2400 #define CARET_SLOP 0x01 #define CARET_STRICT 0x04 #define CARET_JUMPS 0x10 #define CARET_EVEN 0x08 #define SCI_SETXCARETPOLICY 2402 #define SCI_SETYCARETPOLICY 2403 #define SCI_SETPRINTWRAPMODE 2406 #define SCI_GETPRINTWRAPMODE 2407 #define SCI_SETHOTSPOTACTIVEFORE 2410 #define SCI_SETHOTSPOTACTIVEBACK 2411 #define SCI_SETHOTSPOTACTIVEUNDERLINE 2412 #define SCI_SETHOTSPOTSINGLELINE 2421 #define SCI_PARADOWN 2413 #define SCI_PARADOWNEXTEND 2414 #define SCI_PARAUP 2415 #define SCI_PARAUPEXTEND 2416 #define SCI_POSITIONBEFORE 2417 #define SCI_POSITIONAFTER 2418 #define SCI_COPYRANGE 2419 #define SCI_COPYTEXT 2420 #define SC_SEL_STREAM 0 #define SC_SEL_RECTANGLE 1 #define SC_SEL_LINES 2 #define SCI_SETSELECTIONMODE 2422 #define SCI_GETSELECTIONMODE 2423 #define SCI_GETLINESELSTARTPOSITION 2424 #define SCI_GETLINESELENDPOSITION 2425 #define SCI_LINEDOWNRECTEXTEND 2426 #define SCI_LINEUPRECTEXTEND 2427 #define SCI_CHARLEFTRECTEXTEND 2428 #define SCI_CHARRIGHTRECTEXTEND 2429 #define SCI_HOMERECTEXTEND 2430 #define SCI_VCHOMERECTEXTEND 2431 #define SCI_LINEENDRECTEXTEND 2432 #define SCI_PAGEUPRECTEXTEND 2433 #define SCI_PAGEDOWNRECTEXTEND 2434 #define SCI_STUTTEREDPAGEUP 2435 #define SCI_STUTTEREDPAGEUPEXTEND 2436 #define SCI_STUTTEREDPAGEDOWN 2437 #define SCI_STUTTEREDPAGEDOWNEXTEND 2438 #define SCI_WORDLEFTEND 2439 #define SCI_WORDLEFTENDEXTEND 2440 #define SCI_WORDRIGHTEND 2441 #define SCI_WORDRIGHTENDEXTEND 2442 #define SCI_SETWHITESPACECHARS 2443 #define SCI_SETCHARSDEFAULT 2444 #define SCI_AUTOCGETCURRENT 2445 #define SCI_ALLOCATE 2446 #define SCI_TARGETASUTF8 2447 #define SCI_SETLENGTHFORENCODE 2448 #define SCI_ENCODEDFROMUTF8 2449 #define SCI_FINDCOLUMN 2456 #define SCI_GETCARETSTICKY 2457 #define SCI_SETCARETSTICKY 2458 #define SCI_TOGGLECARETSTICKY 2459 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 #define SCI_SETLEXER 4001 #define SCI_GETLEXER 4002 #define SCI_COLOURISE 4003 #define SCI_SETPROPERTY 4004 #define KEYWORDSET_MAX 8 #define SCI_SETKEYWORDS 4005 #define SCI_SETLEXERLANGUAGE 4006 #define SCI_LOADLEXERLIBRARY 4007 #define SCI_GETPROPERTY 4008 #define SCI_GETPROPERTYEXPANDED 4009 #define SCI_GETPROPERTYINT 4010 #define SC_MOD_INSERTTEXT 0x1 #define SC_MOD_DELETETEXT 0x2 #define SC_MOD_CHANGESTYLE 0x4 #define SC_MOD_CHANGEFOLD 0x8 #define SC_PERFORMED_USER 0x10 #define SC_PERFORMED_UNDO 0x20 #define SC_PERFORMED_REDO 0x40 #define SC_MULTISTEPUNDOREDO 0x80 #define SC_LASTSTEPINUNDOREDO 0x100 #define SC_MOD_CHANGEMARKER 0x200 #define SC_MOD_BEFOREINSERT 0x400 #define SC_MOD_BEFOREDELETE 0x800 #define SC_MULTILINEUNDOREDO 0x1000 #define SC_MODEVENTMASKALL 0x1FFF #define SCEN_CHANGE 768 #define SCEN_SETFOCUS 512 #define SCEN_KILLFOCUS 256 #define SCK_DOWN 300 #define SCK_UP 301 #define SCK_LEFT 302 #define SCK_RIGHT 303 #define SCK_HOME 304 #define SCK_END 305 #define SCK_PRIOR 306 #define SCK_NEXT 307 #define SCK_DELETE 308 #define SCK_INSERT 309 #define SCK_ESCAPE 7 #define SCK_BACK 8 #define SCK_TAB 9 #define SCK_RETURN 13 #define SCK_ADD 310 #define SCK_SUBTRACT 311 #define SCK_DIVIDE 312 #define SCMOD_SHIFT 1 #define SCMOD_CTRL 2 #define SCMOD_ALT 4 #define SCN_STYLENEEDED 2000 #define SCN_CHARADDED 2001 #define SCN_SAVEPOINTREACHED 2002 #define SCN_SAVEPOINTLEFT 2003 #define SCN_MODIFYATTEMPTRO 2004 #define SCN_KEY 2005 #define SCN_DOUBLECLICK 2006 #define SCN_UPDATEUI 2007 #define SCN_MODIFIED 2008 #define SCN_MACRORECORD 2009 #define SCN_MARGINCLICK 2010 #define SCN_NEEDSHOWN 2011 #define SCN_PAINTED 2013 #define SCN_USERLISTSELECTION 2014 #define SCN_URIDROPPED 2015 #define SCN_DWELLSTART 2016 #define SCN_DWELLEND 2017 #define SCN_ZOOM 2018 #define SCN_HOTSPOTCLICK 2019 #define SCN_HOTSPOTDOUBLECLICK 2020 #define SCN_CALLTIPCLICK 2021 #define SCN_AUTOCSELECTION 2022 //--Autogenerated -- end of section automatically generated from Scintilla.iface // These structures are defined to be exactly the same shape as the Win32 // CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs. // So older code that treats Scintilla as a RichEdit will work. struct CharacterRange { long cpMin; long cpMax; }; struct TextRange { struct CharacterRange chrg; char *lpstrText; }; struct TextToFind { struct CharacterRange chrg; char *lpstrText; struct CharacterRange chrgText; }; #ifdef PLATFORM_H // This structure is used in printing and requires some of the graphics types // from Platform.h. Not needed by most client code. struct RangeToFormat { SurfaceID hdc; SurfaceID hdcTarget; PRectangle rc; PRectangle rcPage; CharacterRange chrg; }; #endif struct NotifyHeader { // hwndFrom is really an environment specifc window handle or pointer // but most clients of Scintilla.h do not have this type visible. //WindowID hwndFrom; void *hwndFrom; unsigned int idFrom; unsigned int code; }; struct SCNotification { struct NotifyHeader nmhdr; int position; // SCN_STYLENEEDED, SCN_MODIFIED, SCN_DWELLSTART, SCN_DWELLEND int ch; // SCN_CHARADDED, SCN_KEY int modifiers; // SCN_KEY int modificationType; // SCN_MODIFIED const char *text; // SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION int length; // SCN_MODIFIED int linesAdded; // SCN_MODIFIED int message; // SCN_MACRORECORD uptr_t wParam; // SCN_MACRORECORD sptr_t lParam; // SCN_MACRORECORD int line; // SCN_MODIFIED int foldLevelNow; // SCN_MODIFIED int foldLevelPrev; // SCN_MODIFIED int margin; // SCN_MARGINCLICK int listType; // SCN_USERLISTSELECTION int x; // SCN_DWELLSTART, SCN_DWELLEND int y; // SCN_DWELLSTART, SCN_DWELLEND }; // Deprecation section listing all API features that are deprecated and will // will be removed completely in a future version. // To enable these features define INCLUDE_DEPRECATED_FEATURES #ifdef INCLUDE_DEPRECATED_FEATURES #define SCI_SETCARETPOLICY 2369 #define CARET_CENTER 0x02 #define CARET_XEVEN 0x08 #define CARET_XJUMPS 0x10 #define SCN_POSCHANGED 2012 #define SCN_CHECKBRACE 2007 #endif #endif usr/src/sdlBasic/src/sdlBasic/scintilla/include/KeyWords.h0000777000076500007660000000502210616625556021017 0ustar // Scintilla source code edit control /** @file KeyWords.h ** Colourise for particular languages. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler); /** * A LexerModule is responsible for lexing and folding a particular language. * The class maintains a list of LexerModules which can be searched to find a * module appropriate to a particular language. */ class LexerModule { protected: const LexerModule *next; int language; LexerFunction fnLexer; LexerFunction fnFolder; const char * const * wordListDescriptions; static const LexerModule *base; static int nextLanguage; public: const char *languageName; LexerModule(int language_, LexerFunction fnLexer_, const char *languageName_=0, LexerFunction fnFolder_=0, const char * const wordListDescriptions_[] = NULL); int GetLanguage() const { return language; } // -1 is returned if no WordList information is available int GetNumWordLists() const; const char *GetWordListDescription(int index) const; //virtual ~LexerModule(); virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const; virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const; static const LexerModule *Find(int language); static const LexerModule *Find(const char *languageName); }; /** * Check if a character is a space. * This is ASCII specific but is safe with chars >= 0x80. */ inline bool isspacechar(unsigned char ch) { return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); } inline bool iswordchar(char ch) { return isascii(ch) && (isalnum(ch) || ch == '.' || ch == '_'); } inline bool iswordstart(char ch) { return isascii(ch) && (isalnum(ch) || ch == '_'); } inline bool isoperator(char ch) { if (isascii(ch) && isalnum(ch)) return false; // '.' left out as it is used to make up numbers if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || ch == '(' || ch == ')' || ch == '-' || ch == '+' || ch == '=' || ch == '|' || ch == '{' || ch == '}' || ch == '[' || ch == ']' || ch == ':' || ch == ';' || ch == '<' || ch == '>' || ch == ',' || ch == '/' || ch == '?' || ch == '!' || ch == '.' || ch == '~') return true; return false; } usr/src/sdlBasic/src/sdlBasic/scintilla/include/SciLexer.h0000777000076500007660000006470010463135003020755 0ustar // Scintilla source code edit control /** @file SciLexer.h ** Interface to the added lexer functions in the SciLexer version of the edit control. **/ // Copyright 1998-2002 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. // Most of this file is automatically generated from the Scintilla.iface interface definition // file which contains any comments about the definitions. HFacer.py does the generation. #ifndef SCILEXER_H #define SCILEXER_H // SciLexer features - not in standard Scintilla //++Autogenerated -- start of section automatically generated from Scintilla.iface #define SCLEX_CONTAINER 0 #define SCLEX_NULL 1 #define SCLEX_PYTHON 2 #define SCLEX_CPP 3 #define SCLEX_HTML 4 #define SCLEX_XML 5 #define SCLEX_PERL 6 #define SCLEX_SQL 7 #define SCLEX_SDLB 8 #define SCLEX_PROPERTIES 9 #define SCLEX_ERRORLIST 10 #define SCLEX_MAKEFILE 11 #define SCLEX_BATCH 12 #define SCLEX_XCODE 13 #define SCLEX_LATEX 14 #define SCLEX_LUA 15 #define SCLEX_DIFF 16 #define SCLEX_CONF 17 #define SCLEX_PASCAL 18 #define SCLEX_AVE 19 #define SCLEX_ADA 20 #define SCLEX_LISP 21 #define SCLEX_RUBY 22 #define SCLEX_EIFFEL 23 #define SCLEX_EIFFELKW 24 #define SCLEX_TCL 25 #define SCLEX_NNCRONTAB 26 #define SCLEX_BULLANT 27 #define SCLEX_BAAN 31 #define SCLEX_MATLAB 32 #define SCLEX_SCRIPTOL 33 #define SCLEX_ASM 34 #define SCLEX_CPPNOCASE 35 #define SCLEX_FORTRAN 36 #define SCLEX_F77 37 #define SCLEX_CSS 38 #define SCLEX_POV 39 #define SCLEX_LOUT 40 #define SCLEX_ESCRIPT 41 #define SCLEX_PS 42 #define SCLEX_NSIS 43 #define SCLEX_MMIXAL 44 #define SCLEX_CLW 45 #define SCLEX_CLWNOCASE 46 #define SCLEX_LOT 47 #define SCLEX_YAML 48 #define SCLEX_TEX 49 #define SCLEX_METAPOST 50 #define SCLEX_POWERBASIC 51 #define SCLEX_FORTH 52 #define SCLEX_ERLANG 53 #define SCLEX_OCTAVE 54 #define SCLEX_MSSQL 55 #define SCLEX_VERILOG 56 #define SCLEX_KIX 57 #define SCLEX_GUI4CLI 58 #define SCLEX_SPECMAN 59 #define SCLEX_AU3 60 #define SCLEX_APDL 61 #define SCLEX_BASH 62 #define SCLEX_ASN1 63 #define SCLEX_VHDL 64 #define SCLEX_CAML 65 #define SCLEX_BLITZBASIC 66 #define SCLEX_PUREBASIC 67 #define SCLEX_HASKELL 68 #define SCLEX_PHPSCRIPT 69 #define SCLEX_TADS3 70 #define SCLEX_REBOL 71 #define SCLEX_SMALLTALK 72 #define SCLEX_FLAGSHIP 73 #define SCLEX_CSOUND 74 #define SCLEX_AUTOMATIC 1000 #define SCE_P_DEFAULT 0 #define SCE_P_COMMENTLINE 1 #define SCE_P_NUMBER 2 #define SCE_P_STRING 3 #define SCE_P_CHARACTER 4 #define SCE_P_WORD 5 #define SCE_P_TRIPLE 6 #define SCE_P_TRIPLEDOUBLE 7 #define SCE_P_CLASSNAME 8 #define SCE_P_DEFNAME 9 #define SCE_P_OPERATOR 10 #define SCE_P_IDENTIFIER 11 #define SCE_P_COMMENTBLOCK 12 #define SCE_P_STRINGEOL 13 #define SCE_C_DEFAULT 0 #define SCE_C_COMMENT 1 #define SCE_C_COMMENTLINE 2 #define SCE_C_COMMENTDOC 3 #define SCE_C_NUMBER 4 #define SCE_C_WORD 5 #define SCE_C_STRING 6 #define SCE_C_CHARACTER 7 #define SCE_C_UUID 8 #define SCE_C_PREPROCESSOR 9 #define SCE_C_OPERATOR 10 #define SCE_C_IDENTIFIER 11 #define SCE_C_STRINGEOL 12 #define SCE_C_VERBATIM 13 #define SCE_C_REGEX 14 #define SCE_C_COMMENTLINEDOC 15 #define SCE_C_WORD2 16 #define SCE_C_COMMENTDOCKEYWORD 17 #define SCE_C_COMMENTDOCKEYWORDERROR 18 #define SCE_C_GLOBALCLASS 19 #define SCE_H_DEFAULT 0 #define SCE_H_TAG 1 #define SCE_H_TAGUNKNOWN 2 #define SCE_H_ATTRIBUTE 3 #define SCE_H_ATTRIBUTEUNKNOWN 4 #define SCE_H_NUMBER 5 #define SCE_H_DOUBLESTRING 6 #define SCE_H_SINGLESTRING 7 #define SCE_H_OTHER 8 #define SCE_H_COMMENT 9 #define SCE_H_ENTITY 10 #define SCE_H_TAGEND 11 #define SCE_H_XMLSTART 12 #define SCE_H_XMLEND 13 #define SCE_H_SCRIPT 14 #define SCE_H_ASP 15 #define SCE_H_ASPAT 16 #define SCE_H_CDATA 17 #define SCE_H_QUESTION 18 #define SCE_H_VALUE 19 #define SCE_H_XCCOMMENT 20 #define SCE_H_SGML_DEFAULT 21 #define SCE_H_SGML_COMMAND 22 #define SCE_H_SGML_1ST_PARAM 23 #define SCE_H_SGML_DOUBLESTRING 24 #define SCE_H_SGML_SIMPLESTRING 25 #define SCE_H_SGML_ERROR 26 #define SCE_H_SGML_SPECIAL 27 #define SCE_H_SGML_ENTITY 28 #define SCE_H_SGML_COMMENT 29 #define SCE_H_SGML_1ST_PARAM_COMMENT 30 #define SCE_H_SGML_BLOCK_DEFAULT 31 #define SCE_HJ_START 40 #define SCE_HJ_DEFAULT 41 #define SCE_HJ_COMMENT 42 #define SCE_HJ_COMMENTLINE 43 #define SCE_HJ_COMMENTDOC 44 #define SCE_HJ_NUMBER 45 #define SCE_HJ_WORD 46 #define SCE_HJ_KEYWORD 47 #define SCE_HJ_DOUBLESTRING 48 #define SCE_HJ_SINGLESTRING 49 #define SCE_HJ_SYMBOLS 50 #define SCE_HJ_STRINGEOL 51 #define SCE_HJ_REGEX 52 #define SCE_HJA_START 55 #define SCE_HJA_DEFAULT 56 #define SCE_HJA_COMMENT 57 #define SCE_HJA_COMMENTLINE 58 #define SCE_HJA_COMMENTDOC 59 #define SCE_HJA_NUMBER 60 #define SCE_HJA_WORD 61 #define SCE_HJA_KEYWORD 62 #define SCE_HJA_DOUBLESTRING 63 #define SCE_HJA_SINGLESTRING 64 #define SCE_HJA_SYMBOLS 65 #define SCE_HJA_STRINGEOL 66 #define SCE_HJA_REGEX 67 #define SCE_HB_START 70 #define SCE_HB_DEFAULT 71 #define SCE_HB_COMMENTLINE 72 #define SCE_HB_NUMBER 73 #define SCE_HB_WORD 74 #define SCE_HB_STRING 75 #define SCE_HB_IDENTIFIER 76 #define SCE_HB_STRINGEOL 77 #define SCE_HBA_START 80 #define SCE_HBA_DEFAULT 81 #define SCE_HBA_COMMENTLINE 82 #define SCE_HBA_NUMBER 83 #define SCE_HBA_WORD 84 #define SCE_HBA_STRING 85 #define SCE_HBA_IDENTIFIER 86 #define SCE_HBA_STRINGEOL 87 #define SCE_HP_START 90 #define SCE_HP_DEFAULT 91 #define SCE_HP_COMMENTLINE 92 #define SCE_HP_NUMBER 93 #define SCE_HP_STRING 94 #define SCE_HP_CHARACTER 95 #define SCE_HP_WORD 96 #define SCE_HP_TRIPLE 97 #define SCE_HP_TRIPLEDOUBLE 98 #define SCE_HP_CLASSNAME 99 #define SCE_HP_DEFNAME 100 #define SCE_HP_OPERATOR 101 #define SCE_HP_IDENTIFIER 102 #define SCE_HPHP_COMPLEX_VARIABLE 104 #define SCE_HPA_START 105 #define SCE_HPA_DEFAULT 106 #define SCE_HPA_COMMENTLINE 107 #define SCE_HPA_NUMBER 108 #define SCE_HPA_STRING 109 #define SCE_HPA_CHARACTER 110 #define SCE_HPA_WORD 111 #define SCE_HPA_TRIPLE 112 #define SCE_HPA_TRIPLEDOUBLE 113 #define SCE_HPA_CLASSNAME 114 #define SCE_HPA_DEFNAME 115 #define SCE_HPA_OPERATOR 116 #define SCE_HPA_IDENTIFIER 117 #define SCE_HPHP_DEFAULT 118 #define SCE_HPHP_HSTRING 119 #define SCE_HPHP_SIMPLESTRING 120 #define SCE_HPHP_WORD 121 #define SCE_HPHP_NUMBER 122 #define SCE_HPHP_VARIABLE 123 #define SCE_HPHP_COMMENT 124 #define SCE_HPHP_COMMENTLINE 125 #define SCE_HPHP_HSTRING_VARIABLE 126 #define SCE_HPHP_OPERATOR 127 #define SCE_PL_DEFAULT 0 #define SCE_PL_ERROR 1 #define SCE_PL_COMMENTLINE 2 #define SCE_PL_POD 3 #define SCE_PL_NUMBER 4 #define SCE_PL_WORD 5 #define SCE_PL_STRING 6 #define SCE_PL_CHARACTER 7 #define SCE_PL_PUNCTUATION 8 #define SCE_PL_PREPROCESSOR 9 #define SCE_PL_OPERATOR 10 #define SCE_PL_IDENTIFIER 11 #define SCE_PL_SCALAR 12 #define SCE_PL_ARRAY 13 #define SCE_PL_HASH 14 #define SCE_PL_SYMBOLTABLE 15 #define SCE_PL_REGEX 17 #define SCE_PL_REGSUBST 18 #define SCE_PL_LONGQUOTE 19 #define SCE_PL_BACKTICKS 20 #define SCE_PL_DATASECTION 21 #define SCE_PL_HERE_DELIM 22 #define SCE_PL_HERE_Q 23 #define SCE_PL_HERE_QQ 24 #define SCE_PL_HERE_QX 25 #define SCE_PL_STRING_Q 26 #define SCE_PL_STRING_QQ 27 #define SCE_PL_STRING_QX 28 #define SCE_PL_STRING_QR 29 #define SCE_PL_STRING_QW 30 #define SCE_PL_POD_VERB 31 #define SCE_B_DEFAULT 0 #define SCE_B_COMMENT 1 #define SCE_B_NUMBER 2 #define SCE_B_KEYWORD 3 #define SCE_B_STRING 4 #define SCE_B_PREPROCESSOR 5 #define SCE_B_OPERATOR 6 #define SCE_B_IDENTIFIER 7 #define SCE_B_DATE 8 #define SCE_B_STRINGEOL 9 #define SCE_B_KEYWORD2 10 #define SCE_B_KEYWORD3 11 #define SCE_B_KEYWORD4 12 #define SCE_B_CONSTANT 13 #define SCE_B_ASM 14 #define SCE_B_LABEL 15 #define SCE_B_ERROR 16 #define SCE_B_HEXNUMBER 17 #define SCE_B_BINNUMBER 18 #define SCE_PROPS_DEFAULT 0 #define SCE_PROPS_COMMENT 1 #define SCE_PROPS_SECTION 2 #define SCE_PROPS_ASSIGNMENT 3 #define SCE_PROPS_DEFVAL 4 #define SCE_L_DEFAULT 0 #define SCE_L_COMMAND 1 #define SCE_L_TAG 2 #define SCE_L_MATH 3 #define SCE_L_COMMENT 4 #define SCE_LUA_DEFAULT 0 #define SCE_LUA_COMMENT 1 #define SCE_LUA_COMMENTLINE 2 #define SCE_LUA_COMMENTDOC 3 #define SCE_LUA_NUMBER 4 #define SCE_LUA_WORD 5 #define SCE_LUA_STRING 6 #define SCE_LUA_CHARACTER 7 #define SCE_LUA_LITERALSTRING 8 #define SCE_LUA_PREPROCESSOR 9 #define SCE_LUA_OPERATOR 10 #define SCE_LUA_IDENTIFIER 11 #define SCE_LUA_STRINGEOL 12 #define SCE_LUA_WORD2 13 #define SCE_LUA_WORD3 14 #define SCE_LUA_WORD4 15 #define SCE_LUA_WORD5 16 #define SCE_LUA_WORD6 17 #define SCE_LUA_WORD7 18 #define SCE_LUA_WORD8 19 #define SCE_ERR_DEFAULT 0 #define SCE_ERR_PYTHON 1 #define SCE_ERR_GCC 2 #define SCE_ERR_MS 3 #define SCE_ERR_CMD 4 #define SCE_ERR_BORLAND 5 #define SCE_ERR_PERL 6 #define SCE_ERR_NET 7 #define SCE_ERR_LUA 8 #define SCE_ERR_CTAG 9 #define SCE_ERR_DIFF_CHANGED 10 #define SCE_ERR_DIFF_ADDITION 11 #define SCE_ERR_DIFF_DELETION 12 #define SCE_ERR_DIFF_MESSAGE 13 #define SCE_ERR_PHP 14 #define SCE_ERR_ELF 15 #define SCE_ERR_IFC 16 #define SCE_ERR_IFORT 17 #define SCE_ERR_ABSF 18 #define SCE_ERR_TIDY 19 #define SCE_ERR_JAVA_STACK 20 #define SCE_BAT_DEFAULT 0 #define SCE_BAT_COMMENT 1 #define SCE_BAT_WORD 2 #define SCE_BAT_LABEL 3 #define SCE_BAT_HIDE 4 #define SCE_BAT_COMMAND 5 #define SCE_BAT_IDENTIFIER 6 #define SCE_BAT_OPERATOR 7 #define SCE_MAKE_DEFAULT 0 #define SCE_MAKE_COMMENT 1 #define SCE_MAKE_PREPROCESSOR 2 #define SCE_MAKE_IDENTIFIER 3 #define SCE_MAKE_OPERATOR 4 #define SCE_MAKE_TARGET 5 #define SCE_MAKE_IDEOL 9 #define SCE_DIFF_DEFAULT 0 #define SCE_DIFF_COMMENT 1 #define SCE_DIFF_COMMAND 2 #define SCE_DIFF_HEADER 3 #define SCE_DIFF_POSITION 4 #define SCE_DIFF_DELETED 5 #define SCE_DIFF_ADDED 6 #define SCE_CONF_DEFAULT 0 #define SCE_CONF_COMMENT 1 #define SCE_CONF_NUMBER 2 #define SCE_CONF_IDENTIFIER 3 #define SCE_CONF_EXTENSION 4 #define SCE_CONF_PARAMETER 5 #define SCE_CONF_STRING 6 #define SCE_CONF_OPERATOR 7 #define SCE_CONF_IP 8 #define SCE_CONF_DIRECTIVE 9 #define SCE_AVE_DEFAULT 0 #define SCE_AVE_COMMENT 1 #define SCE_AVE_NUMBER 2 #define SCE_AVE_WORD 3 #define SCE_AVE_STRING 6 #define SCE_AVE_ENUM 7 #define SCE_AVE_STRINGEOL 8 #define SCE_AVE_IDENTIFIER 9 #define SCE_AVE_OPERATOR 10 #define SCE_AVE_WORD1 11 #define SCE_AVE_WORD2 12 #define SCE_AVE_WORD3 13 #define SCE_AVE_WORD4 14 #define SCE_AVE_WORD5 15 #define SCE_AVE_WORD6 16 #define SCE_ADA_DEFAULT 0 #define SCE_ADA_WORD 1 #define SCE_ADA_IDENTIFIER 2 #define SCE_ADA_NUMBER 3 #define SCE_ADA_DELIMITER 4 #define SCE_ADA_CHARACTER 5 #define SCE_ADA_CHARACTEREOL 6 #define SCE_ADA_STRING 7 #define SCE_ADA_STRINGEOL 8 #define SCE_ADA_LABEL 9 #define SCE_ADA_COMMENTLINE 10 #define SCE_ADA_ILLEGAL 11 #define SCE_BAAN_DEFAULT 0 #define SCE_BAAN_COMMENT 1 #define SCE_BAAN_COMMENTDOC 2 #define SCE_BAAN_NUMBER 3 #define SCE_BAAN_WORD 4 #define SCE_BAAN_STRING 5 #define SCE_BAAN_PREPROCESSOR 6 #define SCE_BAAN_OPERATOR 7 #define SCE_BAAN_IDENTIFIER 8 #define SCE_BAAN_STRINGEOL 9 #define SCE_BAAN_WORD2 10 #define SCE_LISP_DEFAULT 0 #define SCE_LISP_COMMENT 1 #define SCE_LISP_NUMBER 2 #define SCE_LISP_KEYWORD 3 #define SCE_LISP_STRING 6 #define SCE_LISP_STRINGEOL 8 #define SCE_LISP_IDENTIFIER 9 #define SCE_LISP_OPERATOR 10 #define SCE_EIFFEL_DEFAULT 0 #define SCE_EIFFEL_COMMENTLINE 1 #define SCE_EIFFEL_NUMBER 2 #define SCE_EIFFEL_WORD 3 #define SCE_EIFFEL_STRING 4 #define SCE_EIFFEL_CHARACTER 5 #define SCE_EIFFEL_OPERATOR 6 #define SCE_EIFFEL_IDENTIFIER 7 #define SCE_EIFFEL_STRINGEOL 8 #define SCE_NNCRONTAB_DEFAULT 0 #define SCE_NNCRONTAB_COMMENT 1 #define SCE_NNCRONTAB_TASK 2 #define SCE_NNCRONTAB_SECTION 3 #define SCE_NNCRONTAB_KEYWORD 4 #define SCE_NNCRONTAB_MODIFIER 5 #define SCE_NNCRONTAB_ASTERISK 6 #define SCE_NNCRONTAB_NUMBER 7 #define SCE_NNCRONTAB_STRING 8 #define SCE_NNCRONTAB_ENVIRONMENT 9 #define SCE_NNCRONTAB_IDENTIFIER 10 #define SCE_FORTH_DEFAULT 0 #define SCE_FORTH_COMMENT 1 #define SCE_FORTH_COMMENT_ML 2 #define SCE_FORTH_IDENTIFIER 3 #define SCE_FORTH_CONTROL 4 #define SCE_FORTH_KEYWORD 5 #define SCE_FORTH_DEFWORD 6 #define SCE_FORTH_PREWORD1 7 #define SCE_FORTH_PREWORD2 8 #define SCE_FORTH_NUMBER 9 #define SCE_FORTH_STRING 10 #define SCE_FORTH_LOCALE 11 #define SCE_MATLAB_DEFAULT 0 #define SCE_MATLAB_COMMENT 1 #define SCE_MATLAB_COMMAND 2 #define SCE_MATLAB_NUMBER 3 #define SCE_MATLAB_KEYWORD 4 #define SCE_MATLAB_STRING 5 #define SCE_MATLAB_OPERATOR 6 #define SCE_MATLAB_IDENTIFIER 7 #define SCE_MATLAB_DOUBLEQUOTESTRING 8 #define SCE_SCRIPTOL_DEFAULT 0 #define SCE_SCRIPTOL_WHITE 1 #define SCE_SCRIPTOL_COMMENTLINE 2 #define SCE_SCRIPTOL_PERSISTENT 3 #define SCE_SCRIPTOL_CSTYLE 4 #define SCE_SCRIPTOL_COMMENTBLOCK 5 #define SCE_SCRIPTOL_NUMBER 6 #define SCE_SCRIPTOL_STRING 7 #define SCE_SCRIPTOL_CHARACTER 8 #define SCE_SCRIPTOL_STRINGEOL 9 #define SCE_SCRIPTOL_KEYWORD 10 #define SCE_SCRIPTOL_OPERATOR 11 #define SCE_SCRIPTOL_IDENTIFIER 12 #define SCE_SCRIPTOL_TRIPLE 13 #define SCE_SCRIPTOL_CLASSNAME 14 #define SCE_SCRIPTOL_PREPROCESSOR 15 #define SCE_ASM_DEFAULT 0 #define SCE_ASM_COMMENT 1 #define SCE_ASM_NUMBER 2 #define SCE_ASM_STRING 3 #define SCE_ASM_OPERATOR 4 #define SCE_ASM_IDENTIFIER 5 #define SCE_ASM_CPUINSTRUCTION 6 #define SCE_ASM_MATHINSTRUCTION 7 #define SCE_ASM_REGISTER 8 #define SCE_ASM_DIRECTIVE 9 #define SCE_ASM_DIRECTIVEOPERAND 10 #define SCE_ASM_COMMENTBLOCK 11 #define SCE_ASM_CHARACTER 12 #define SCE_ASM_STRINGEOL 13 #define SCE_ASM_EXTINSTRUCTION 14 #define SCE_F_DEFAULT 0 #define SCE_F_COMMENT 1 #define SCE_F_NUMBER 2 #define SCE_F_STRING1 3 #define SCE_F_STRING2 4 #define SCE_F_STRINGEOL 5 #define SCE_F_OPERATOR 6 #define SCE_F_IDENTIFIER 7 #define SCE_F_WORD 8 #define SCE_F_WORD2 9 #define SCE_F_WORD3 10 #define SCE_F_PREPROCESSOR 11 #define SCE_F_OPERATOR2 12 #define SCE_F_LABEL 13 #define SCE_F_CONTINUATION 14 #define SCE_CSS_DEFAULT 0 #define SCE_CSS_TAG 1 #define SCE_CSS_CLASS 2 #define SCE_CSS_PSEUDOCLASS 3 #define SCE_CSS_UNKNOWN_PSEUDOCLASS 4 #define SCE_CSS_OPERATOR 5 #define SCE_CSS_IDENTIFIER 6 #define SCE_CSS_UNKNOWN_IDENTIFIER 7 #define SCE_CSS_VALUE 8 #define SCE_CSS_COMMENT 9 #define SCE_CSS_ID 10 #define SCE_CSS_IMPORTANT 11 #define SCE_CSS_DIRECTIVE 12 #define SCE_CSS_DOUBLESTRING 13 #define SCE_CSS_SINGLESTRING 14 #define SCE_CSS_IDENTIFIER2 15 #define SCE_CSS_ATTRIBUTE 16 #define SCE_POV_DEFAULT 0 #define SCE_POV_COMMENT 1 #define SCE_POV_COMMENTLINE 2 #define SCE_POV_NUMBER 3 #define SCE_POV_OPERATOR 4 #define SCE_POV_IDENTIFIER 5 #define SCE_POV_STRING 6 #define SCE_POV_STRINGEOL 7 #define SCE_POV_DIRECTIVE 8 #define SCE_POV_BADDIRECTIVE 9 #define SCE_POV_WORD2 10 #define SCE_POV_WORD3 11 #define SCE_POV_WORD4 12 #define SCE_POV_WORD5 13 #define SCE_POV_WORD6 14 #define SCE_POV_WORD7 15 #define SCE_POV_WORD8 16 #define SCE_LOUT_DEFAULT 0 #define SCE_LOUT_COMMENT 1 #define SCE_LOUT_NUMBER 2 #define SCE_LOUT_WORD 3 #define SCE_LOUT_WORD2 4 #define SCE_LOUT_WORD3 5 #define SCE_LOUT_WORD4 6 #define SCE_LOUT_STRING 7 #define SCE_LOUT_OPERATOR 8 #define SCE_LOUT_IDENTIFIER 9 #define SCE_LOUT_STRINGEOL 10 #define SCE_ESCRIPT_DEFAULT 0 #define SCE_ESCRIPT_COMMENT 1 #define SCE_ESCRIPT_COMMENTLINE 2 #define SCE_ESCRIPT_COMMENTDOC 3 #define SCE_ESCRIPT_NUMBER 4 #define SCE_ESCRIPT_WORD 5 #define SCE_ESCRIPT_STRING 6 #define SCE_ESCRIPT_OPERATOR 7 #define SCE_ESCRIPT_IDENTIFIER 8 #define SCE_ESCRIPT_BRACE 9 #define SCE_ESCRIPT_WORD2 10 #define SCE_ESCRIPT_WORD3 11 #define SCE_PS_DEFAULT 0 #define SCE_PS_COMMENT 1 #define SCE_PS_DSC_COMMENT 2 #define SCE_PS_DSC_VALUE 3 #define SCE_PS_NUMBER 4 #define SCE_PS_NAME 5 #define SCE_PS_KEYWORD 6 #define SCE_PS_LITERAL 7 #define SCE_PS_IMMEVAL 8 #define SCE_PS_PAREN_ARRAY 9 #define SCE_PS_PAREN_DICT 10 #define SCE_PS_PAREN_PROC 11 #define SCE_PS_TEXT 12 #define SCE_PS_HEXSTRING 13 #define SCE_PS_BASE85STRING 14 #define SCE_PS_BADSTRINGCHAR 15 #define SCE_NSIS_DEFAULT 0 #define SCE_NSIS_COMMENT 1 #define SCE_NSIS_STRINGDQ 2 #define SCE_NSIS_STRINGLQ 3 #define SCE_NSIS_STRINGRQ 4 #define SCE_NSIS_FUNCTION 5 #define SCE_NSIS_VARIABLE 6 #define SCE_NSIS_LABEL 7 #define SCE_NSIS_USERDEFINED 8 #define SCE_NSIS_SECTIONDEF 9 #define SCE_NSIS_SUBSECTIONDEF 10 #define SCE_NSIS_IFDEFINEDEF 11 #define SCE_NSIS_MACRODEF 12 #define SCE_NSIS_STRINGVAR 13 #define SCE_NSIS_NUMBER 14 #define SCE_NSIS_SECTIONGROUP 15 #define SCE_NSIS_PAGEEX 16 #define SCE_NSIS_FUNCTIONDEF 17 #define SCE_NSIS_COMMENTBOX 18 #define SCE_MMIXAL_LEADWS 0 #define SCE_MMIXAL_COMMENT 1 #define SCE_MMIXAL_LABEL 2 #define SCE_MMIXAL_OPCODE 3 #define SCE_MMIXAL_OPCODE_PRE 4 #define SCE_MMIXAL_OPCODE_VALID 5 #define SCE_MMIXAL_OPCODE_UNKNOWN 6 #define SCE_MMIXAL_OPCODE_POST 7 #define SCE_MMIXAL_OPERANDS 8 #define SCE_MMIXAL_NUMBER 9 #define SCE_MMIXAL_REF 10 #define SCE_MMIXAL_CHAR 11 #define SCE_MMIXAL_STRING 12 #define SCE_MMIXAL_REGISTER 13 #define SCE_MMIXAL_HEX 14 #define SCE_MMIXAL_OPERATOR 15 #define SCE_MMIXAL_SYMBOL 16 #define SCE_MMIXAL_INCLUDE 17 #define SCE_CLW_DEFAULT 0 #define SCE_CLW_LABEL 1 #define SCE_CLW_COMMENT 2 #define SCE_CLW_STRING 3 #define SCE_CLW_USER_IDENTIFIER 4 #define SCE_CLW_INTEGER_CONSTANT 5 #define SCE_CLW_REAL_CONSTANT 6 #define SCE_CLW_PICTURE_STRING 7 #define SCE_CLW_KEYWORD 8 #define SCE_CLW_COMPILER_DIRECTIVE 9 #define SCE_CLW_RUNTIME_EXPRESSIONS 10 #define SCE_CLW_BUILTIN_PROCEDURES_FUNCTION 11 #define SCE_CLW_STRUCTURE_DATA_TYPE 12 #define SCE_CLW_ATTRIBUTE 13 #define SCE_CLW_STANDARD_EQUATE 14 #define SCE_CLW_ERROR 15 #define SCE_CLW_DEPRECATED 16 #define SCE_LOT_DEFAULT 0 #define SCE_LOT_HEADER 1 #define SCE_LOT_BREAK 2 #define SCE_LOT_SET 3 #define SCE_LOT_PASS 4 #define SCE_LOT_FAIL 5 #define SCE_LOT_ABORT 6 #define SCE_YAML_DEFAULT 0 #define SCE_YAML_COMMENT 1 #define SCE_YAML_IDENTIFIER 2 #define SCE_YAML_KEYWORD 3 #define SCE_YAML_NUMBER 4 #define SCE_YAML_REFERENCE 5 #define SCE_YAML_DOCUMENT 6 #define SCE_YAML_TEXT 7 #define SCE_YAML_ERROR 8 #define SCE_TEX_DEFAULT 0 #define SCE_TEX_SPECIAL 1 #define SCE_TEX_GROUP 2 #define SCE_TEX_SYMBOL 3 #define SCE_TEX_COMMAND 4 #define SCE_TEX_TEXT 5 #define SCE_METAPOST_DEFAULT 0 #define SCE_METAPOST_SPECIAL 1 #define SCE_METAPOST_GROUP 2 #define SCE_METAPOST_SYMBOL 3 #define SCE_METAPOST_COMMAND 4 #define SCE_METAPOST_TEXT 5 #define SCE_METAPOST_EXTRA 6 #define SCE_ERLANG_DEFAULT 0 #define SCE_ERLANG_COMMENT 1 #define SCE_ERLANG_VARIABLE 2 #define SCE_ERLANG_NUMBER 3 #define SCE_ERLANG_KEYWORD 4 #define SCE_ERLANG_STRING 5 #define SCE_ERLANG_OPERATOR 6 #define SCE_ERLANG_ATOM 7 #define SCE_ERLANG_FUNCTION_NAME 8 #define SCE_ERLANG_CHARACTER 9 #define SCE_ERLANG_MACRO 10 #define SCE_ERLANG_RECORD 11 #define SCE_ERLANG_SEPARATOR 12 #define SCE_ERLANG_NODE_NAME 13 #define SCE_ERLANG_UNKNOWN 31 #define SCE_MSSQL_DEFAULT 0 #define SCE_MSSQL_COMMENT 1 #define SCE_MSSQL_LINE_COMMENT 2 #define SCE_MSSQL_NUMBER 3 #define SCE_MSSQL_STRING 4 #define SCE_MSSQL_OPERATOR 5 #define SCE_MSSQL_IDENTIFIER 6 #define SCE_MSSQL_VARIABLE 7 #define SCE_MSSQL_COLUMN_NAME 8 #define SCE_MSSQL_STATEMENT 9 #define SCE_MSSQL_DATATYPE 10 #define SCE_MSSQL_SYSTABLE 11 #define SCE_MSSQL_GLOBAL_VARIABLE 12 #define SCE_MSSQL_FUNCTION 13 #define SCE_MSSQL_STORED_PROCEDURE 14 #define SCE_MSSQL_DEFAULT_PREF_DATATYPE 15 #define SCE_MSSQL_COLUMN_NAME_2 16 #define SCE_V_DEFAULT 0 #define SCE_V_COMMENT 1 #define SCE_V_COMMENTLINE 2 #define SCE_V_COMMENTLINEBANG 3 #define SCE_V_NUMBER 4 #define SCE_V_WORD 5 #define SCE_V_STRING 6 #define SCE_V_WORD2 7 #define SCE_V_WORD3 8 #define SCE_V_PREPROCESSOR 9 #define SCE_V_OPERATOR 10 #define SCE_V_IDENTIFIER 11 #define SCE_V_STRINGEOL 12 #define SCE_V_USER 19 #define SCE_KIX_DEFAULT 0 #define SCE_KIX_COMMENT 1 #define SCE_KIX_STRING1 2 #define SCE_KIX_STRING2 3 #define SCE_KIX_NUMBER 4 #define SCE_KIX_VAR 5 #define SCE_KIX_MACRO 6 #define SCE_KIX_KEYWORD 7 #define SCE_KIX_FUNCTIONS 8 #define SCE_KIX_OPERATOR 9 #define SCE_KIX_IDENTIFIER 31 #define SCE_GC_DEFAULT 0 #define SCE_GC_COMMENTLINE 1 #define SCE_GC_COMMENTBLOCK 2 #define SCE_GC_GLOBAL 3 #define SCE_GC_EVENT 4 #define SCE_GC_ATTRIBUTE 5 #define SCE_GC_CONTROL 6 #define SCE_GC_COMMAND 7 #define SCE_GC_STRING 8 #define SCE_GC_OPERATOR 9 #define SCE_SN_DEFAULT 0 #define SCE_SN_CODE 1 #define SCE_SN_COMMENTLINE 2 #define SCE_SN_COMMENTLINEBANG 3 #define SCE_SN_NUMBER 4 #define SCE_SN_WORD 5 #define SCE_SN_STRING 6 #define SCE_SN_WORD2 7 #define SCE_SN_WORD3 8 #define SCE_SN_PREPROCESSOR 9 #define SCE_SN_OPERATOR 10 #define SCE_SN_IDENTIFIER 11 #define SCE_SN_STRINGEOL 12 #define SCE_SN_REGEXTAG 13 #define SCE_SN_SIGNAL 14 #define SCE_SN_USER 19 #define SCE_AU3_DEFAULT 0 #define SCE_AU3_COMMENT 1 #define SCE_AU3_COMMENTBLOCK 2 #define SCE_AU3_NUMBER 3 #define SCE_AU3_FUNCTION 4 #define SCE_AU3_KEYWORD 5 #define SCE_AU3_MACRO 6 #define SCE_AU3_STRING 7 #define SCE_AU3_OPERATOR 8 #define SCE_AU3_VARIABLE 9 #define SCE_AU3_SENT 10 #define SCE_AU3_PREPROCESSOR 11 #define SCE_AU3_SPECIAL 12 #define SCE_AU3_EXPAND 13 #define SCE_APDL_DEFAULT 0 #define SCE_APDL_COMMENT 1 #define SCE_APDL_COMMENTBLOCK 2 #define SCE_APDL_NUMBER 3 #define SCE_APDL_STRING 4 #define SCE_APDL_OPERATOR 5 #define SCE_APDL_WORD 6 #define SCE_APDL_PROCESSOR 7 #define SCE_APDL_COMMAND 8 #define SCE_APDL_SLASHCOMMAND 9 #define SCE_APDL_STARCOMMAND 10 #define SCE_APDL_ARGUMENT 11 #define SCE_APDL_FUNCTION 12 #define SCE_SH_DEFAULT 0 #define SCE_SH_ERROR 1 #define SCE_SH_COMMENTLINE 2 #define SCE_SH_NUMBER 3 #define SCE_SH_WORD 4 #define SCE_SH_STRING 5 #define SCE_SH_CHARACTER 6 #define SCE_SH_OPERATOR 7 #define SCE_SH_IDENTIFIER 8 #define SCE_SH_SCALAR 9 #define SCE_SH_PARAM 10 #define SCE_SH_BACKTICKS 11 #define SCE_SH_HERE_DELIM 12 #define SCE_SH_HERE_Q 13 #define SCE_ASN1_DEFAULT 0 #define SCE_ASN1_COMMENT 1 #define SCE_ASN1_IDENTIFIER 2 #define SCE_ASN1_STRING 3 #define SCE_ASN1_OID 4 #define SCE_ASN1_SCALAR 5 #define SCE_ASN1_KEYWORD 6 #define SCE_ASN1_ATTRIBUTE 7 #define SCE_ASN1_DESCRIPTOR 8 #define SCE_ASN1_TYPE 9 #define SCE_ASN1_OPERATOR 10 #define SCE_VHDL_DEFAULT 0 #define SCE_VHDL_COMMENT 1 #define SCE_VHDL_COMMENTLINEBANG 2 #define SCE_VHDL_NUMBER 3 #define SCE_VHDL_STRING 4 #define SCE_VHDL_OPERATOR 5 #define SCE_VHDL_IDENTIFIER 6 #define SCE_VHDL_STRINGEOL 7 #define SCE_VHDL_KEYWORD 8 #define SCE_VHDL_STDOPERATOR 9 #define SCE_VHDL_ATTRIBUTE 10 #define SCE_VHDL_STDFUNCTION 11 #define SCE_VHDL_STDPACKAGE 12 #define SCE_VHDL_STDTYPE 13 #define SCE_VHDL_USERWORD 14 #define SCE_CAML_DEFAULT 0 #define SCE_CAML_IDENTIFIER 1 #define SCE_CAML_TAGNAME 2 #define SCE_CAML_KEYWORD 3 #define SCE_CAML_KEYWORD2 4 #define SCE_CAML_LINENUM 5 #define SCE_CAML_OPERATOR 6 #define SCE_CAML_NUMBER 7 #define SCE_CAML_CHAR 8 #define SCE_CAML_STRING 9 #define SCE_CAML_COMMENT 10 #define SCE_CAML_COMMENT1 11 #define SCE_CAML_COMMENT2 12 #define SCE_CAML_COMMENT3 13 #define SCE_HA_DEFAULT 0 #define SCE_HA_IDENTIFIER 1 #define SCE_HA_KEYWORD 2 #define SCE_HA_NUMBER 3 #define SCE_HA_STRING 4 #define SCE_HA_CHARACTER 5 #define SCE_HA_CLASS 6 #define SCE_HA_MODULE 7 #define SCE_HA_CAPITAL 8 #define SCE_HA_DATA 9 #define SCE_HA_IMPORT 10 #define SCE_HA_OPERATOR 11 #define SCE_HA_INSTANCE 12 #define SCE_HA_COMMENTLINE 13 #define SCE_HA_COMMENTBLOCK 14 #define SCE_HA_COMMENTBLOCK2 15 #define SCE_HA_COMMENTBLOCK3 16 #define SCE_T3_DEFAULT 0 #define SCE_T3_PREPROCESSOR 1 #define SCE_T3_BLOCK_COMMENT 2 #define SCE_T3_LINE_COMMENT 3 #define SCE_T3_OPERATOR 4 #define SCE_T3_KEYWORD 5 #define SCE_T3_NUMBER 6 #define SCE_T3_BRACKET 7 #define SCE_T3_HTML_TAG 8 #define SCE_T3_HTML_STRING 9 #define SCE_T3_S_STRING 10 #define SCE_T3_S_LIB_DIRECTIVE 11 #define SCE_T3_S_MSG_PARAM 12 #define SCE_T3_S_H_DEFAULT 13 #define SCE_T3_D_STRING 14 #define SCE_T3_D_LIB_DIRECTIVE 15 #define SCE_T3_D_MSG_PARAM 16 #define SCE_T3_D_H_DEFAULT 17 #define SCE_T3_X_DEFAULT 18 #define SCE_T3_X_PREPROCESSOR 19 #define SCE_T3_X_BLOCK_COMMENT 20 #define SCE_T3_X_LINE_COMMENT 21 #define SCE_T3_X_S_STRING 22 #define SCE_T3_X_S_LIB_DIRECTIVE 23 #define SCE_T3_X_S_MSG_PARAM 24 #define SCE_T3_X_S_H_DEFAULT 25 #define SCE_T3_X_D_STRING 26 #define SCE_T3_X_D_LIB_DIRECTIVE 27 #define SCE_T3_X_D_MSG_PARAM 28 #define SCE_T3_X_D_H_DEFAULT 29 #define SCE_T3_USER1 30 #define SCE_T3_USER2 31 #define SCE_REBOL_DEFAULT 0 #define SCE_REBOL_COMMENTLINE 1 #define SCE_REBOL_COMMENTBLOCK 2 #define SCE_REBOL_PREFACE 3 #define SCE_REBOL_OPERATOR 4 #define SCE_REBOL_CHARACTER 5 #define SCE_REBOL_QUOTEDSTRING 6 #define SCE_REBOL_BRACEDSTRING 7 #define SCE_REBOL_NUMBER 8 #define SCE_REBOL_PAIR 9 #define SCE_REBOL_TUPLE 10 #define SCE_REBOL_BINARY 11 #define SCE_REBOL_MONEY 12 #define SCE_REBOL_ISSUE 13 #define SCE_REBOL_TAG 14 #define SCE_REBOL_FILE 15 #define SCE_REBOL_EMAIL 16 #define SCE_REBOL_URL 17 #define SCE_REBOL_DATE 18 #define SCE_REBOL_TIME 19 #define SCE_REBOL_IDENTIFIER 20 #define SCE_REBOL_WORD 21 #define SCE_REBOL_WORD2 22 #define SCE_REBOL_WORD3 23 #define SCE_REBOL_WORD4 24 #define SCE_REBOL_WORD5 25 #define SCE_REBOL_WORD6 26 #define SCE_REBOL_WORD7 27 #define SCE_REBOL_WORD8 28 #define SCE_SQL_DEFAULT 0 #define SCE_SQL_COMMENT 1 #define SCE_SQL_COMMENTLINE 2 #define SCE_SQL_COMMENTDOC 3 #define SCE_SQL_NUMBER 4 #define SCE_SQL_WORD 5 #define SCE_SQL_STRING 6 #define SCE_SQL_CHARACTER 7 #define SCE_SQL_SQLPLUS 8 #define SCE_SQL_SQLPLUS_PROMPT 9 #define SCE_SQL_OPERATOR 10 #define SCE_SQL_IDENTIFIER 11 #define SCE_SQL_SQLPLUS_COMMENT 13 #define SCE_SQL_COMMENTLINEDOC 15 #define SCE_SQL_WORD2 16 #define SCE_SQL_COMMENTDOCKEYWORD 17 #define SCE_SQL_COMMENTDOCKEYWORDERROR 18 #define SCE_SQL_USER1 19 #define SCE_SQL_USER2 20 #define SCE_SQL_USER3 21 #define SCE_SQL_USER4 22 #define SCE_ST_DEFAULT 0 #define SCE_ST_STRING 1 #define SCE_ST_NUMBER 2 #define SCE_ST_COMMENT 3 #define SCE_ST_SYMBOL 4 #define SCE_ST_BINARY 5 #define SCE_ST_BOOL 6 #define SCE_ST_SELF 7 #define SCE_ST_SUPER 8 #define SCE_ST_NIL 9 #define SCE_ST_GLOBAL 10 #define SCE_ST_RETURN 11 #define SCE_ST_SPECIAL 12 #define SCE_ST_KWSEND 13 #define SCE_ST_ASSIGN 14 #define SCE_ST_CHARACTER 15 #define SCE_ST_SPEC_SEL 16 #define SCE_FS_DEFAULT 0 #define SCE_FS_COMMENT 1 #define SCE_FS_COMMENTLINE 2 #define SCE_FS_COMMENTDOC 3 #define SCE_FS_COMMENTLINEDOC 4 #define SCE_FS_COMMENTDOCKEYWORD 5 #define SCE_FS_COMMENTDOCKEYWORDERROR 6 #define SCE_FS_KEYWORD 7 #define SCE_FS_KEYWORD2 8 #define SCE_FS_KEYWORD3 9 #define SCE_FS_KEYWORD4 10 #define SCE_FS_NUMBER 11 #define SCE_FS_STRING 12 #define SCE_FS_PREPROCESSOR 13 #define SCE_FS_OPERATOR 14 #define SCE_FS_IDENTIFIER 15 #define SCE_FS_DATE 16 #define SCE_FS_STRINGEOL 17 #define SCE_FS_CONSTANT 18 #define SCE_FS_ASM 19 #define SCE_FS_LABEL 20 #define SCE_FS_ERROR 21 #define SCE_FS_HEXNUMBER 22 #define SCE_FS_BINNUMBER 23 #define SCE_CSOUND_DEFAULT 0 #define SCE_CSOUND_COMMENT 1 #define SCE_CSOUND_NUMBER 2 #define SCE_CSOUND_OPERATOR 3 #define SCE_CSOUND_INSTR 4 #define SCE_CSOUND_IDENTIFIER 5 #define SCE_CSOUND_OPCODE 6 #define SCE_CSOUND_HEADERSTMT 7 #define SCE_CSOUND_USERKEYWORD 8 #define SCE_CSOUND_COMMENTBLOCK 9 #define SCE_CSOUND_PARAM 10 #define SCE_CSOUND_ARATE_VAR 11 #define SCE_CSOUND_KRATE_VAR 12 #define SCE_CSOUND_IRATE_VAR 13 #define SCE_CSOUND_GLOBAL_VAR 14 #define SCE_CSOUND_STRINGEOL 15 #define SCLEX_ASP 29 #define SCLEX_PHP 30 //--Autogenerated -- end of section automatically generated from Scintilla.iface #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/0000777000000000000000000000000010645354651020001 5ustar rootrootusr/src/sdlBasic/src/sdlBasic/scintilla/src/SVector.h0000777000076500007660000000524110463136044017771 0ustar // Scintilla source code edit control /** @file SVector.h ** A simple expandable vector. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SVECTOR_H #define SVECTOR_H /** * A simple expandable integer vector. * Storage not allocated for elements until an element is used. * This makes it very lightweight unless used so is a good match for optional features. */ class SVector { enum { allocSize = 4000 }; int *v; ///< The vector unsigned int size; ///< Number of elements allocated unsigned int len; ///< Number of elements used in vector bool allocFailure; ///< A memory allocation call has failed /** Internally allocate more elements than the user wants * to avoid thrashing the memory allocator. */ void SizeTo(int newSize) { if (newSize < allocSize) newSize += allocSize; else newSize = (newSize * 3) / 2; int* newv = new int[newSize]; if (!newv) { allocFailure = true; return; } size = newSize; unsigned int i=0; for (; i 0) { SizeTo(other.Length()); if (!allocFailure) { for (int i=0;i 0) { SizeTo(other.Length()); if (!allocFailure) { for (int i=0;i= len) { if (i >= size) { SizeTo(i); } len = i+1; } return v[i]; } /// Reset vector. void Free() { delete []v; v = 0; size = 0; len = 0; } /** @brief Grow vector size. * Doesn't allow a vector to be shrinked. */ void SetLength(unsigned int newLength) { if (newLength > len) { if (newLength >= size) { SizeTo(newLength); } } len = newLength; } /// Get the current length (number of used elements) of the vector. int Length() const { return len; } }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/RESearch.h0000777000076500007660000000252210463136044020037 0ustar // Scintilla source code edit control /** @file RESearch.h ** Interface to the regular expression search library. **/ // Written by Neil Hodgson // Based on the work of Ozan S. Yigit. // This file is in the public domain. #ifndef RESEARCH_H #define RESEARCH_H /* * The following defines are not meant to be changeable. * They are for readability only. */ #define MAXCHR 256 #define CHRBIT 8 #define BITBLK MAXCHR/CHRBIT class CharacterIndexer { public: virtual char CharAt(int index)=0; }; class RESearch { public: RESearch(); ~RESearch(); void Init(); void Clear(); bool GrabMatches(CharacterIndexer &ci); void ChSet(char c); void ChSetWithCase(char c, bool caseSensitive); const char *Compile(const char *pat, int length, bool caseSensitive, bool posix); int Execute(CharacterIndexer &ci, int lp, int endp); void ModifyWord(char *s); int Substitute(CharacterIndexer &ci, char *src, char *dst); enum {MAXTAG=10}; enum {MAXNFA=2048}; enum {NOTFOUND=-1}; int bopat[MAXTAG]; int eopat[MAXTAG]; char *pat[MAXTAG]; private: int PMatch(CharacterIndexer &ci, int lp, int endp, char *ap); int bol; int tagstk[MAXTAG]; /* subpat tag stack..*/ char nfa[MAXNFA]; /* automaton.. */ int sta; char bittab[BITBLK]; /* bit table for CCL */ /* pre-set bits... */ int failure; }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/Document.h0000777000076500007660000002160710463135222020163 0ustar // Scintilla source code edit control /** @file Document.h ** Text document that handles notifications, DBCS, styling, words and end of line. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef DOCUMENT_H #define DOCUMENT_H /** * A Position is a position within a document between two characters or at the beginning or end. * Sometimes used as a character index where it identifies the character after the position. */ typedef int Position; const Position invalidPosition = -1; /** * The range class represents a range of text in a document. * The two values are not sorted as one end may be more significant than the other * as is the case for the selection where the end position is the position of the caret. * If either position is invalidPosition then the range is invalid and most operations will fail. */ class Range { public: Position start; Position end; Range(Position pos=0) : start(pos), end(pos) { }; Range(Position start_, Position end_) : start(start_), end(end_) { }; bool Valid() const { return (start != invalidPosition) && (end != invalidPosition); } // Is the position within the range? bool Contains(Position pos) const { if (start < end) { return (pos >= start && pos <= end); } else { return (pos <= start && pos >= end); } } // Is the character after pos within the range? bool ContainsCharacter(Position pos) const { if (start < end) { return (pos >= start && pos < end); } else { return (pos < start && pos >= end); } } bool Contains(Range other) const { return Contains(other.start) && Contains(other.end); } bool Overlaps(Range other) const { return Contains(other.start) || Contains(other.end) || other.Contains(start) || other.Contains(end); } }; class DocWatcher; class DocModification; class RESearch; /** */ class Document { public: /** Used to pair watcher pointer with user data. */ class WatcherWithUserData { public: DocWatcher *watcher; void *userData; WatcherWithUserData() { watcher = 0; userData = 0; } }; enum charClassification { ccSpace, ccNewLine, ccWord, ccPunctuation }; private: int refCount; CellBuffer cb; charClassification charClass[256]; char stylingMask; int endStyled; int styleClock; int enteredCount; int enteredReadOnlyCount; WatcherWithUserData *watchers; int lenWatchers; bool matchesValid; RESearch *pre; char *substituted; public: int stylingBits; int stylingBitsMask; int eolMode; /// Can also be SC_CP_UTF8 to enable UTF-8 mode int dbcsCodePage; int tabInChars; int indentInChars; int actualIndentInChars; bool useTabs; bool tabIndents; bool backspaceUnindents; Document(); virtual ~Document(); int AddRef(); int Release(); int LineFromPosition(int pos); int ClampPositionIntoDocument(int pos); bool IsCrLf(int pos); int LenChar(int pos); int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true); // Gateways to modifying document void ModifiedAt(int pos); bool DeleteChars(int pos, int len); bool InsertStyledString(int position, char *s, int insertLength); int Undo(); int Redo(); bool CanUndo() { return cb.CanUndo(); } bool CanRedo() { return cb.CanRedo(); } void DeleteUndoHistory() { cb.DeleteUndoHistory(); } bool SetUndoCollection(bool collectUndo) { return cb.SetUndoCollection(collectUndo); } bool IsCollectingUndo() { return cb.IsCollectingUndo(); } void BeginUndoAction() { cb.BeginUndoAction(); } void EndUndoAction() { cb.EndUndoAction(); } void SetSavePoint(); bool IsSavePoint() { return cb.IsSavePoint(); } int GetLineIndentation(int line); void SetLineIndentation(int line, int indent); int GetLineIndentPosition(int line); int GetColumn(int position); int FindColumn(int line, int column); void Indent(bool forwards, int lineBottom, int lineTop); static char *TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolMode); void ConvertLineEnds(int eolModeSet); void SetReadOnly(bool set) { cb.SetReadOnly(set); } bool IsReadOnly() { return cb.IsReadOnly(); } bool InsertChar(int pos, char ch); bool InsertString(int position, const char *s); bool InsertString(int position, const char *s, size_t insertLength); void ChangeChar(int pos, char ch); void DelChar(int pos); void DelCharBack(int pos); char CharAt(int position) { return cb.CharAt(position); } void GetCharRange(char *buffer, int position, int lengthRetrieve) { cb.GetCharRange(buffer, position, lengthRetrieve); } char StyleAt(int position) { return cb.StyleAt(position); } int GetMark(int line) { return cb.GetMark(line); } int AddMark(int line, int markerNum); void DeleteMark(int line, int markerNum); void DeleteMarkFromHandle(int markerHandle); void DeleteAllMarks(int markerNum); int LineFromHandle(int markerHandle) { return cb.LineFromHandle(markerHandle); } int LineStart(int line); int LineEnd(int line); int LineEndPosition(int position); int VCHomePosition(int position); int SetLevel(int line, int level); int GetLevel(int line) { return cb.GetLevel(line); } void ClearLevels() { cb.ClearLevels(); } int GetLastChild(int lineParent, int level=-1); int GetFoldParent(int line); void Indent(bool forwards); int ExtendWordSelect(int pos, int delta, bool onlyWordCharacters=false); int NextWordStart(int pos, int delta); int NextWordEnd(int pos, int delta); int Length() { return cb.Length(); } void Allocate(int newSize) { cb.Allocate(newSize*2); } long FindText(int minPos, int maxPos, const char *s, bool caseSensitive, bool word, bool wordStart, bool regExp, bool posix, int *length); long FindText(int iMessage, unsigned long wParam, long lParam); const char *SubstituteByPosition(const char *text, int *length); int LinesTotal(); void ChangeCase(Range r, bool makeUpperCase); void SetDefaultCharClasses(bool includeWordClass); void SetCharClasses(const unsigned char *chars, charClassification newCharClass); void SetStylingBits(int bits); void StartStyling(int position, char mask); bool SetStyleFor(int length, char style); bool SetStyles(int length, char *styles); int GetEndStyled() { return endStyled; } bool EnsureStyledTo(int pos); int GetStyleClock() { return styleClock; } void IncrementStyleClock(); int SetLineState(int line, int state) { return cb.SetLineState(line, state); } int GetLineState(int line) { return cb.GetLineState(line); } int GetMaxLineState() { return cb.GetMaxLineState(); } bool AddWatcher(DocWatcher *watcher, void *userData); bool RemoveWatcher(DocWatcher *watcher, void *userData); const WatcherWithUserData *GetWatchers() const { return watchers; } int GetLenWatchers() const { return lenWatchers; } bool IsWordPartSeparator(char ch); int WordPartLeft(int pos); int WordPartRight(int pos); int ExtendStyleRange(int pos, int delta, bool singleLine = false); bool IsWhiteLine(int line); int ParaUp(int pos); int ParaDown(int pos); int IndentSize() { return actualIndentInChars; } private: void CheckReadOnly(); charClassification WordCharClass(unsigned char ch); bool IsWordStartAt(int pos); bool IsWordEndAt(int pos); bool IsWordAt(int start, int end); void NotifyModifyAttempt(); void NotifySavePoint(bool atSavePoint); void NotifyModified(DocModification mh); }; /** * To optimise processing of document modifications by DocWatchers, a hint is passed indicating the * scope of the change. * If the DocWatcher is a document view then this can be used to optimise screen updating. */ class DocModification { public: int modificationType; int position; int length; int linesAdded; /**< Negative if lines deleted. */ const char *text; /**< Only valid for changes to text, not for changes to style. */ int line; int foldLevelNow; int foldLevelPrev; DocModification(int modificationType_, int position_=0, int length_=0, int linesAdded_=0, const char *text_=0, int line_=0) : modificationType(modificationType_), position(position_), length(length_), linesAdded(linesAdded_), text(text_), line(line_), foldLevelNow(0), foldLevelPrev(0) {} DocModification(int modificationType_, const Action &act, int linesAdded_=0) : modificationType(modificationType_), position(act.position / 2), length(act.lenData), linesAdded(linesAdded_), text(act.data), line(0), foldLevelNow(0), foldLevelPrev(0) {} }; /** * A class that wants to receive notifications from a Document must be derived from DocWatcher * and implement the notification methods. It can then be added to the watcher list with AddWatcher. */ class DocWatcher { public: virtual ~DocWatcher() {} virtual void NotifyModifyAttempt(Document *doc, void *userData) = 0; virtual void NotifySavePoint(Document *doc, void *userData, bool atSavePoint) = 0; virtual void NotifyModified(Document *doc, DocModification mh, void *userData) = 0; virtual void NotifyDeleted(Document *doc, void *userData) = 0; virtual void NotifyStyleNeeded(Document *doc, void *userData, int endPos) = 0; }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/XPM.cxx0000777000076500007660000001625610463136151017432 0ustar // Scintilla source code edit control /** @file XPM.cxx ** Define a class that holds data in the X Pixmap (XPM) format. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include "Platform.h" #include "XPM.h" static const char *NextField(const char *s) { // In case there are leading spaces in the string while (*s && *s == ' ') { s++; } while (*s && *s != ' ') { s++; } while (*s && *s == ' ') { s++; } return s; } // Data lines in XPM can be terminated either with NUL or " static size_t MeasureLength(const char *s) { size_t i = 0; while (s[i] && (s[i] != '\"')) i++; return i; } ColourAllocated XPM::ColourFromCode(int ch) { return colourCodeTable[ch]->allocated; #ifdef SLOW for (int i=0; iFillRectangle(rc, ColourFromCode(code)); } } XPM::XPM(const char *textForm) : data(0), codes(0), colours(0), lines(0) { Init(textForm); } XPM::XPM(const char * const *linesForm) : data(0), codes(0), colours(0), lines(0) { Init(linesForm); } XPM::~XPM() { Clear(); } void XPM::Init(const char *textForm) { Clear(); // Test done is two parts to avoid possibility of overstepping the memory // if memcmp implemented strangely. Must be 4 bytes at least at destination. if ((0 == memcmp(textForm, "/* X", 4)) && (0 == memcmp(textForm, "/* XPM */", 9))) { // Build the lines form out of the text form const char **linesForm = LinesFormFromTextForm(textForm); if (linesForm != 0) { Init(linesForm); delete []linesForm; } } else { // It is really in line form Init(reinterpret_cast(textForm)); } } void XPM::Init(const char * const *linesForm) { Clear(); height = 1; width = 1; nColours = 1; data = NULL; codeTransparent = ' '; codes = NULL; colours = NULL; lines = NULL; if (!linesForm) return; const char *line0 = linesForm[0]; width = atoi(line0); line0 = NextField(line0); height = atoi(line0); line0 = NextField(line0); nColours = atoi(line0); codes = new char[nColours]; colours = new ColourPair[nColours]; int strings = 1+height+nColours; lines = new char *[strings]; size_t allocation = 0; for (int i=0; i(codes[c])] = &(colours[c]); } } void XPM::Clear() { delete []data; data = 0; delete []codes; codes = 0; delete []colours; colours = 0; delete []lines; lines = 0; } void XPM::RefreshColourPalette(Palette &pal, bool want) { if (!data || !codes || !colours || !lines) { return; } for (int i=0; i= strings) { break; // Bad height or number of colors! } if ((countQuotes & 1) == 0) { linesForm[countQuotes / 2] = textForm + j + 1; } countQuotes++; } } if (textForm[j] == '\0' || countQuotes / 2 > strings) { // Malformed XPM! Height + number of colors too high or too low delete []linesForm; linesForm = 0; } return linesForm; } // In future, may want to minimize search time by sorting and using a binary search. XPMSet::XPMSet() : set(0), len(0), maximum(0), height(-1), width(-1) { } XPMSet::~XPMSet() { Clear(); } void XPMSet::Clear() { for (int i = 0; i < len; i++) { delete set[i]; } delete []set; set = 0; len = 0; maximum = 0; height = -1; width = -1; } void XPMSet::Add(int id, const char *textForm) { // Invalidate cached dimensions height = -1; width = -1; // Replace if this id already present for (int i = 0; i < len; i++) { if (set[i]->GetId() == id) { set[i]->Init(textForm); set[i]->CopyDesiredColours(); return; } } // Not present, so add to end XPM *pxpm = new XPM(textForm); if (pxpm) { pxpm->SetId(id); pxpm->CopyDesiredColours(); if (len == maximum) { maximum += 64; XPM **setNew = new XPM *[maximum]; for (int i = 0; i < len; i++) { setNew[i] = set[i]; } delete []set; set = setNew; } set[len] = pxpm; len++; } } XPM *XPMSet::Get(int id) { for (int i = 0; i < len; i++) { if (set[i]->GetId() == id) { return set[i]; } } return 0; } int XPMSet::GetHeight() { if (height < 0) { for (int i = 0; i < len; i++) { if (height < set[i]->GetHeight()) { height = set[i]->GetHeight(); } } } return (height > 0) ? height : 0; } int XPMSet::GetWidth() { if (width < 0) { for (int i = 0; i < len; i++) { if (width < set[i]->GetWidth()) { width = set[i]->GetWidth(); } } } return (width > 0) ? width : 0; } usr/src/sdlBasic/src/sdlBasic/scintilla/src/KeyMap.cxx0000777000076500007660000001200310463135664020146 0ustar // Scintilla source code edit control /** @file KeyMap.cxx ** Defines a mapping between keystrokes and commands. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include "Platform.h" #include "Scintilla.h" #include "KeyMap.h" KeyMap::KeyMap() : kmap(0), len(0), alloc(0) { for (int i = 0; MapDefault[i].key; i++) { AssignCmdKey(MapDefault[i].key, MapDefault[i].modifiers, MapDefault[i].msg); } } KeyMap::~KeyMap() { Clear(); } void KeyMap::Clear() { delete []kmap; kmap = 0; len = 0; alloc = 0; } void KeyMap::AssignCmdKey(int key, int modifiers, unsigned int msg) { if ((len+1) >= alloc) { KeyToCommand *ktcNew = new KeyToCommand[alloc + 5]; if (!ktcNew) return; for (int k = 0; k < len; k++) ktcNew[k] = kmap[k]; alloc += 5; delete []kmap; kmap = ktcNew; } for (int keyIndex = 0; keyIndex < len; keyIndex++) { if ((key == kmap[keyIndex].key) && (modifiers == kmap[keyIndex].modifiers)) { kmap[keyIndex].msg = msg; return; } } kmap[len].key = key; kmap[len].modifiers = modifiers; kmap[len].msg = msg; len++; } unsigned int KeyMap::Find(int key, int modifiers) { for (int i = 0; i < len; i++) { if ((key == kmap[i].key) && (modifiers == kmap[i].modifiers)) { return kmap[i].msg; } } return 0; } const KeyToCommand KeyMap::MapDefault[] = { {SCK_DOWN, SCI_NORM, SCI_LINEDOWN}, {SCK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND}, {SCK_DOWN, SCI_CTRL, SCI_LINESCROLLDOWN}, {SCK_DOWN, SCI_ASHIFT, SCI_LINEDOWNRECTEXTEND}, {SCK_UP, SCI_NORM, SCI_LINEUP}, {SCK_UP, SCI_SHIFT, SCI_LINEUPEXTEND}, {SCK_UP, SCI_CTRL, SCI_LINESCROLLUP}, {SCK_UP, SCI_ASHIFT, SCI_LINEUPRECTEXTEND}, {'[', SCI_CTRL, SCI_PARAUP}, {'[', SCI_CSHIFT, SCI_PARAUPEXTEND}, {']', SCI_CTRL, SCI_PARADOWN}, {']', SCI_CSHIFT, SCI_PARADOWNEXTEND}, {SCK_LEFT, SCI_NORM, SCI_CHARLEFT}, {SCK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND}, {SCK_LEFT, SCI_CTRL, SCI_WORDLEFT}, {SCK_LEFT, SCI_CSHIFT, SCI_WORDLEFTEXTEND}, {SCK_LEFT, SCI_ASHIFT, SCI_CHARLEFTRECTEXTEND}, {SCK_RIGHT, SCI_NORM, SCI_CHARRIGHT}, {SCK_RIGHT, SCI_SHIFT, SCI_CHARRIGHTEXTEND}, {SCK_RIGHT, SCI_CTRL, SCI_WORDRIGHT}, {SCK_RIGHT, SCI_CSHIFT, SCI_WORDRIGHTEXTEND}, {SCK_RIGHT, SCI_ASHIFT, SCI_CHARRIGHTRECTEXTEND}, {'/', SCI_CTRL, SCI_WORDPARTLEFT}, {'/', SCI_CSHIFT, SCI_WORDPARTLEFTEXTEND}, {'\\', SCI_CTRL, SCI_WORDPARTRIGHT}, {'\\', SCI_CSHIFT, SCI_WORDPARTRIGHTEXTEND}, {SCK_HOME, SCI_NORM, SCI_VCHOME}, {SCK_HOME, SCI_SHIFT, SCI_VCHOMEEXTEND}, {SCK_HOME, SCI_CTRL, SCI_DOCUMENTSTART}, {SCK_HOME, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND}, {SCK_HOME, SCI_ALT, SCI_HOMEDISPLAY}, // {SCK_HOME, SCI_ASHIFT, SCI_HOMEDISPLAYEXTEND}, {SCK_HOME, SCI_ASHIFT, SCI_VCHOMERECTEXTEND}, {SCK_END, SCI_NORM, SCI_LINEEND}, {SCK_END, SCI_SHIFT, SCI_LINEENDEXTEND}, {SCK_END, SCI_CTRL, SCI_DOCUMENTEND}, {SCK_END, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND}, {SCK_END, SCI_ALT, SCI_LINEENDDISPLAY}, // {SCK_END, SCI_ASHIFT, SCI_LINEENDDISPLAYEXTEND}, {SCK_END, SCI_ASHIFT, SCI_LINEENDRECTEXTEND}, {SCK_PRIOR, SCI_NORM, SCI_PAGEUP}, {SCK_PRIOR, SCI_SHIFT, SCI_PAGEUPEXTEND}, {SCK_PRIOR, SCI_ASHIFT, SCI_PAGEUPRECTEXTEND}, {SCK_NEXT, SCI_NORM, SCI_PAGEDOWN}, {SCK_NEXT, SCI_SHIFT, SCI_PAGEDOWNEXTEND}, {SCK_NEXT, SCI_ASHIFT, SCI_PAGEDOWNRECTEXTEND}, {SCK_DELETE, SCI_NORM, SCI_CLEAR}, {SCK_DELETE, SCI_SHIFT, SCI_CUT}, {SCK_DELETE, SCI_CTRL, SCI_DELWORDRIGHT}, {SCK_DELETE, SCI_CSHIFT, SCI_DELLINERIGHT}, {SCK_INSERT, SCI_NORM, SCI_EDITTOGGLEOVERTYPE}, {SCK_INSERT, SCI_SHIFT, SCI_PASTE}, {SCK_INSERT, SCI_CTRL, SCI_COPY}, {SCK_ESCAPE, SCI_NORM, SCI_CANCEL}, {SCK_BACK, SCI_NORM, SCI_DELETEBACK}, {SCK_BACK, SCI_SHIFT, SCI_DELETEBACK}, {SCK_BACK, SCI_CTRL, SCI_DELWORDLEFT}, {SCK_BACK, SCI_ALT, SCI_UNDO}, {SCK_BACK, SCI_CSHIFT, SCI_DELLINELEFT}, {'Z', SCI_CTRL, SCI_UNDO}, {'Y', SCI_CTRL, SCI_REDO}, {'X', SCI_CTRL, SCI_CUT}, {'C', SCI_CTRL, SCI_COPY}, {'V', SCI_CTRL, SCI_PASTE}, {'A', SCI_CTRL, SCI_SELECTALL}, {SCK_TAB, SCI_NORM, SCI_TAB}, {SCK_TAB, SCI_SHIFT, SCI_BACKTAB}, {SCK_RETURN, SCI_NORM, SCI_NEWLINE}, {SCK_RETURN, SCI_SHIFT, SCI_NEWLINE}, {SCK_ADD, SCI_CTRL, SCI_ZOOMIN}, {SCK_SUBTRACT, SCI_CTRL, SCI_ZOOMOUT}, {SCK_DIVIDE, SCI_CTRL, SCI_SETZOOM}, //'L', SCI_CTRL, SCI_FORMFEED, {'L', SCI_CTRL, SCI_LINECUT}, {'L', SCI_CSHIFT, SCI_LINEDELETE}, {'T', SCI_CSHIFT, SCI_LINECOPY}, {'T', SCI_CTRL, SCI_LINETRANSPOSE}, {'D', SCI_CTRL, SCI_LINEDUPLICATE}, {'U', SCI_CTRL, SCI_LOWERCASE}, {'U', SCI_CSHIFT, SCI_UPPERCASE}, {0,0,0}, }; usr/src/sdlBasic/src/sdlBasic/scintilla/src/CellBuffer.cxx0000777000076500007660000007216010463135107020773 0ustar // Scintilla source code edit control /** @file CellBuffer.cxx ** Manages a buffer of cells. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "SVector.h" #include "CellBuffer.h" MarkerHandleSet::MarkerHandleSet() { root = 0; } MarkerHandleSet::~MarkerHandleSet() { MarkerHandleNumber *mhn = root; while (mhn) { MarkerHandleNumber *mhnToFree = mhn; mhn = mhn->next; delete mhnToFree; } root = 0; } int MarkerHandleSet::Length() { int c = 0; MarkerHandleNumber *mhn = root; while (mhn) { c++; mhn = mhn->next; } return c; } int MarkerHandleSet::NumberFromHandle(int handle) { MarkerHandleNumber *mhn = root; while (mhn) { if (mhn->handle == handle) { return mhn->number; } mhn = mhn->next; } return - 1; } int MarkerHandleSet::MarkValue() { unsigned int m = 0; MarkerHandleNumber *mhn = root; while (mhn) { m |= (1 << mhn->number); mhn = mhn->next; } return m; } bool MarkerHandleSet::Contains(int handle) { MarkerHandleNumber *mhn = root; while (mhn) { if (mhn->handle == handle) { return true; } mhn = mhn->next; } return false; } bool MarkerHandleSet::InsertHandle(int handle, int markerNum) { MarkerHandleNumber *mhn = new MarkerHandleNumber; if (!mhn) return false; mhn->handle = handle; mhn->number = markerNum; mhn->next = root; root = mhn; return true; } void MarkerHandleSet::RemoveHandle(int handle) { MarkerHandleNumber **pmhn = &root; while (*pmhn) { MarkerHandleNumber *mhn = *pmhn; if (mhn->handle == handle) { *pmhn = mhn->next; delete mhn; return ; } pmhn = &((*pmhn)->next); } } bool MarkerHandleSet::RemoveNumber(int markerNum) { bool performedDeletion = false; MarkerHandleNumber **pmhn = &root; while (*pmhn) { MarkerHandleNumber *mhn = *pmhn; if (mhn->number == markerNum) { *pmhn = mhn->next; delete mhn; performedDeletion = true; } else { pmhn = &((*pmhn)->next); } } return performedDeletion; } void MarkerHandleSet::CombineWith(MarkerHandleSet *other) { MarkerHandleNumber **pmhn = &root; while (*pmhn) { pmhn = &((*pmhn)->next); } *pmhn = other->root; other->root = 0; } LineVector::LineVector() { linesData = 0; lines = 0; size = 0; levels = 0; sizeLevels = 0; handleCurrent = 1; growSize = 1000; Init(); } LineVector::~LineVector() { for (int line = 0; line < lines; line++) { delete linesData[line].handleSet; linesData[line].handleSet = 0; } delete []linesData; linesData = 0; delete []levels; levels = 0; } void LineVector::Init() { for (int line = 0; line < lines; line++) { delete linesData[line].handleSet; linesData[line].handleSet = 0; } delete []linesData; linesData = new LineData[static_cast(growSize)]; size = growSize; lines = 1; delete []levels; levels = 0; sizeLevels = 0; } void LineVector::Expand(int sizeNew) { LineData *linesDataNew = new LineData[sizeNew]; if (linesDataNew) { for (int i = 0; i < size; i++) linesDataNew[i] = linesData[i]; // Do not delete handleSets here as they are transferred to new linesData delete []linesData; linesData = linesDataNew; size = sizeNew; } else { Platform::DebugPrintf("No memory available\n"); // TODO: Blow up } } void LineVector::ExpandLevels(int sizeNew) { if (sizeNew == -1) sizeNew = size; int *levelsNew = new int[sizeNew]; if (levelsNew) { int i = 0; for (; i < sizeLevels; i++) levelsNew[i] = levels[i]; for (; i < sizeNew; i++) levelsNew[i] = SC_FOLDLEVELBASE; delete []levels; levels = levelsNew; sizeLevels = sizeNew; } else { Platform::DebugPrintf("No memory available\n"); // TODO: Blow up } } void LineVector::ClearLevels() { delete []levels; levels = 0; sizeLevels = 0; } void LineVector::InsertValue(int pos, int value) { //Platform::DebugPrintf("InsertValue[%d] = %d\n", pos, value); if ((lines + 2) >= size) { if (growSize * 6 < size) growSize *= 2; Expand(size + growSize); if (levels) { ExpandLevels(size + growSize); } } lines++; for (int i = lines; i > pos; i--) { linesData[i] = linesData[i - 1]; } linesData[pos].startPosition = value; linesData[pos].handleSet = 0; if (levels) { for (int j = lines; j > pos; j--) { levels[j] = levels[j - 1]; } if (pos == 0) { levels[pos] = SC_FOLDLEVELBASE; } else if (pos == (lines - 1)) { // Last line will not be a folder levels[pos] = SC_FOLDLEVELBASE; } else { levels[pos] = levels[pos - 1]; } } } void LineVector::SetValue(int pos, int value) { //Platform::DebugPrintf("SetValue[%d] = %d\n", pos, value); if ((pos + 2) >= size) { //Platform::DebugPrintf("Resize %d %d\n", size,pos); Expand(pos + growSize); //Platform::DebugPrintf("end Resize %d %d\n", size,pos); lines = pos; if (levels) { ExpandLevels(pos + growSize); } } linesData[pos].startPosition = value; } void LineVector::Remove(int pos) { //Platform::DebugPrintf("Remove %d\n", pos); // Retain the markers from the deleted line by oring them into the previous line if (pos > 0) { MergeMarkers(pos - 1); } for (int i = pos; i < lines; i++) { linesData[i] = linesData[i + 1]; } if (levels) { for (int j = pos; j < lines; j++) { levels[j] = levels[j + 1]; } } lines--; } int LineVector::LineFromPosition(int pos) { //Platform::DebugPrintf("LineFromPostion %d lines=%d end = %d\n", pos, lines, linesData[lines].startPosition); if (lines == 0) return 0; //Platform::DebugPrintf("LineFromPosition %d\n", pos); if (pos >= linesData[lines].startPosition) return lines - 1; int lower = 0; int upper = lines; do { int middle = (upper + lower + 1) / 2; // Round high if (pos < linesData[middle].startPosition) { upper = middle - 1; } else { lower = middle; } } while (lower < upper); //Platform::DebugPrintf("LineFromPostion %d %d %d\n", pos, lower, linesData[lower].startPosition, linesData[lower > 1 ? lower - 1 : 0].startPosition); return lower; } int LineVector::AddMark(int line, int markerNum) { handleCurrent++; if (!linesData[line].handleSet) { // Need new structure to hold marker handle linesData[line].handleSet = new MarkerHandleSet; if (!linesData[line].handleSet) return - 1; } linesData[line].handleSet->InsertHandle(handleCurrent, markerNum); return handleCurrent; } void LineVector::MergeMarkers(int pos) { if (linesData[pos + 1].handleSet != NULL) { if (linesData[pos].handleSet == NULL ) linesData[pos].handleSet = new MarkerHandleSet; linesData[pos].handleSet->CombineWith(linesData[pos + 1].handleSet); delete linesData[pos + 1].handleSet; linesData[pos + 1].handleSet = NULL; } } void LineVector::DeleteMark(int line, int markerNum, bool all) { if (linesData[line].handleSet) { if (markerNum == -1) { delete linesData[line].handleSet; linesData[line].handleSet = 0; } else { bool performedDeletion = linesData[line].handleSet->RemoveNumber(markerNum); while (all && performedDeletion) { performedDeletion = linesData[line].handleSet->RemoveNumber(markerNum); } if (linesData[line].handleSet->Length() == 0) { delete linesData[line].handleSet; linesData[line].handleSet = 0; } } } } void LineVector::DeleteMarkFromHandle(int markerHandle) { int line = LineFromHandle(markerHandle); if (line >= 0) { linesData[line].handleSet->RemoveHandle(markerHandle); if (linesData[line].handleSet->Length() == 0) { delete linesData[line].handleSet; linesData[line].handleSet = 0; } } } int LineVector::LineFromHandle(int markerHandle) { for (int line = 0; line < lines; line++) { if (linesData[line].handleSet) { if (linesData[line].handleSet->Contains(markerHandle)) { return line; } } } return - 1; } Action::Action() { at = startAction; position = 0; data = 0; lenData = 0; } Action::~Action() { Destroy(); } void Action::Create(actionType at_, int position_, char *data_, int lenData_, bool mayCoalesce_) { delete []data; position = position_; at = at_; data = data_; lenData = lenData_; mayCoalesce = mayCoalesce_; } void Action::Destroy() { delete []data; data = 0; } void Action::Grab(Action *source) { delete []data; position = source->position; at = source->at; data = source->data; lenData = source->lenData; mayCoalesce = source->mayCoalesce; // Ownership of source data transferred to this source->position = 0; source->at = startAction; source->data = 0; source->lenData = 0; source->mayCoalesce = true; } // The undo history stores a sequence of user operations that represent the user's view of the // commands executed on the text. // Each user operation contains a sequence of text insertion and text deletion actions. // All the user operations are stored in a list of individual actions with 'start' actions used // as delimiters between user operations. // Initially there is one start action in the history. // As each action is performed, it is recorded in the history. The action may either become // part of the current user operation or may start a new user operation. If it is to be part of the // current operation, then it overwrites the current last action. If it is to be part of a new // operation, it is appended after the current last action. // After writing the new action, a new start action is appended at the end of the history. // The decision of whether to start a new user operation is based upon two factors. If a // compound operation has been explicitly started by calling BeginUndoAction and no matching // EndUndoAction (these calls nest) has been called, then the action is coalesced into the current // operation. If there is no outstanding BeginUndoAction call then a new operation is started // unless it looks as if the new action is caused by the user typing or deleting a stream of text. // Sequences that look like typing or deletion are coalesced into a single user operation. UndoHistory::UndoHistory() { lenActions = 100; actions = new Action[lenActions]; maxAction = 0; currentAction = 0; undoSequenceDepth = 0; savePoint = 0; actions[currentAction].Create(startAction); } UndoHistory::~UndoHistory() { delete []actions; actions = 0; } void UndoHistory::EnsureUndoRoom() { // Have to test that there is room for 2 more actions in the array // as two actions may be created by the calling function if (currentAction >= (lenActions - 2)) { // Run out of undo nodes so extend the array int lenActionsNew = lenActions * 2; Action *actionsNew = new Action[lenActionsNew]; if (!actionsNew) return ; for (int act = 0; act <= currentAction; act++) actionsNew[act].Grab(&actions[act]); delete []actions; lenActions = lenActionsNew; actions = actionsNew; } } void UndoHistory::AppendAction(actionType at, int position, char *data, int lengthData) { EnsureUndoRoom(); //Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, lengthData, currentAction); //Platform::DebugPrintf("^ %d action %d %d\n", actions[currentAction - 1].at, // actions[currentAction - 1].position, actions[currentAction - 1].lenData); if (currentAction < savePoint) { savePoint = -1; } if (currentAction >= 1) { if (0 == undoSequenceDepth) { // Top level actions may not always be coalesced Action &actPrevious = actions[currentAction - 1]; // See if current action can be coalesced into previous action // Will work if both are inserts or deletes and position is same if (at != actPrevious.at) { currentAction++; } else if (currentAction == savePoint) { currentAction++; } else if ((at == insertAction) && (position != (actPrevious.position + actPrevious.lenData*2))) { // Insertions must be immediately after to coalesce currentAction++; } else if (!actions[currentAction].mayCoalesce) { // Not allowed to coalesce if this set currentAction++; } else if (at == removeAction) { if ((lengthData == 1) || (lengthData == 2)){ if ((position + lengthData * 2) == actPrevious.position) { ; // Backspace -> OK } else if (position == actPrevious.position) { ; // Delete -> OK } else { // Removals must be at same position to coalesce currentAction++; } } else { // Removals must be of one character to coalesce currentAction++; } } else { //Platform::DebugPrintf("action coalesced\n"); } } else { // Actions not at top level are always coalesced unless this is after return to top level if (!actions[currentAction].mayCoalesce) currentAction++; } } else { currentAction++; } actions[currentAction].Create(at, position, data, lengthData); currentAction++; actions[currentAction].Create(startAction); maxAction = currentAction; } void UndoHistory::BeginUndoAction() { EnsureUndoRoom(); if (undoSequenceDepth == 0) { if (actions[currentAction].at != startAction) { currentAction++; actions[currentAction].Create(startAction); maxAction = currentAction; } actions[currentAction].mayCoalesce = false; } undoSequenceDepth++; } void UndoHistory::EndUndoAction() { EnsureUndoRoom(); undoSequenceDepth--; if (0 == undoSequenceDepth) { if (actions[currentAction].at != startAction) { currentAction++; actions[currentAction].Create(startAction); maxAction = currentAction; } actions[currentAction].mayCoalesce = false; } } void UndoHistory::DropUndoSequence() { undoSequenceDepth = 0; } void UndoHistory::DeleteUndoHistory() { for (int i = 1; i < maxAction; i++) actions[i].Destroy(); maxAction = 0; currentAction = 0; actions[currentAction].Create(startAction); savePoint = 0; } void UndoHistory::SetSavePoint() { savePoint = currentAction; } bool UndoHistory::IsSavePoint() const { return savePoint == currentAction; } bool UndoHistory::CanUndo() const { return (currentAction > 0) && (maxAction > 0); } int UndoHistory::StartUndo() { // Drop any trailing startAction if (actions[currentAction].at == startAction && currentAction > 0) currentAction--; // Count the steps in this action int act = currentAction; while (actions[act].at != startAction && act > 0) { act--; } return currentAction - act; } const Action &UndoHistory::GetUndoStep() const { return actions[currentAction]; } void UndoHistory::CompletedUndoStep() { currentAction--; } bool UndoHistory::CanRedo() const { return maxAction > currentAction; } int UndoHistory::StartRedo() { // Drop any leading startAction if (actions[currentAction].at == startAction && currentAction < maxAction) currentAction++; // Count the steps in this action int act = currentAction; while (actions[act].at != startAction && act < maxAction) { act++; } return act - currentAction; } const Action &UndoHistory::GetRedoStep() const { return actions[currentAction]; } void UndoHistory::CompletedRedoStep() { currentAction++; } CellBuffer::CellBuffer(int initialLength) { body = new char[initialLength]; size = initialLength; length = 0; part1len = 0; gaplen = initialLength; part2body = body + gaplen; readOnly = false; collectingUndo = true; growSize = 4000; } CellBuffer::~CellBuffer() { delete []body; body = 0; } void CellBuffer::GapTo(int position) { if (position == part1len) return ; if (position < part1len) { int diff = part1len - position; //Platform::DebugPrintf("Move gap backwards to %d diff = %d part1len=%d length=%d \n", position,diff, part1len, length); for (int i = 0; i < diff; i++) body[part1len + gaplen - i - 1] = body[part1len - i - 1]; } else { // position > part1len int diff = position - part1len; //Platform::DebugPrintf("Move gap forwards to %d diff =%d\n", position,diff); for (int i = 0; i < diff; i++) body[part1len + i] = body[part1len + gaplen + i]; } part1len = position; part2body = body + gaplen; } void CellBuffer::RoomFor(int insertionLength) { //Platform::DebugPrintf("need room %d %d\n", gaplen, insertionLength); if (gaplen <= insertionLength) { //Platform::DebugPrintf("need room %d %d\n", gaplen, insertionLength); if (growSize * 6 < size) growSize *= 2; int newSize = size + insertionLength + growSize; Allocate(newSize); } } // To make it easier to write code that uses ByteAt, a position outside the range of the buffer // can be retrieved. All characters outside the range have the value '\0'. char CellBuffer::ByteAt(int position) { if (position < part1len) { if (position < 0) { return '\0'; } else { return body[position]; } } else { if (position >= length) { return '\0'; } else { return part2body[position]; } } } void CellBuffer::SetByteAt(int position, char ch) { if (position < 0) { //Platform::DebugPrintf("Bad position %d\n",position); return ; } if (position >= length + 11) { Platform::DebugPrintf("Very Bad position %d of %d\n", position, length); //exit(2); return ; } if (position >= length) { //Platform::DebugPrintf("Bad position %d of %d\n",position,length); return ; } if (position < part1len) { body[position] = ch; } else { part2body[position] = ch; } } char CellBuffer::CharAt(int position) { return ByteAt(position*2); } void CellBuffer::GetCharRange(char *buffer, int position, int lengthRetrieve) { if (lengthRetrieve < 0) return ; if (position < 0) return ; int bytePos = position * 2; if ((bytePos + lengthRetrieve * 2) > length) { Platform::DebugPrintf("Bad GetCharRange %d for %d of %d\n", bytePos, lengthRetrieve, length); return ; } GapTo(0); // Move the buffer so its easy to subscript into it char *pb = part2body + bytePos; while (lengthRetrieve--) { *buffer++ = *pb; pb += 2; } } char CellBuffer::StyleAt(int position) { return ByteAt(position*2 + 1); } const char *CellBuffer::InsertString(int position, char *s, int insertLength) { char *data = 0; // InsertString and DeleteChars are the bottleneck though which all changes occur if (!readOnly) { if (collectingUndo) { // Save into the undo/redo stack, but only the characters - not the formatting // This takes up about half load time data = new char[insertLength / 2]; for (int i = 0; i < insertLength / 2; i++) { data[i] = s[i * 2]; } uh.AppendAction(insertAction, position, data, insertLength / 2); } BasicInsertString(position, s, insertLength); } return data; } void CellBuffer::InsertCharStyle(int position, char ch, char style) { char s[2]; s[0] = ch; s[1] = style; InsertString(position*2, s, 2); } bool CellBuffer::SetStyleAt(int position, char style, char mask) { style &= mask; char curVal = ByteAt(position * 2 + 1); if ((curVal & mask) != style) { SetByteAt(position*2 + 1, static_cast((curVal & ~mask) | style)); return true; } else { return false; } } bool CellBuffer::SetStyleFor(int position, int lengthStyle, char style, char mask) { int bytePos = position * 2 + 1; bool changed = false; PLATFORM_ASSERT(lengthStyle == 0 || (lengthStyle > 0 && lengthStyle + position < length)); while (lengthStyle--) { char curVal = ByteAt(bytePos); if ((curVal & mask) != style) { SetByteAt(bytePos, static_cast((curVal & ~mask) | style)); changed = true; } bytePos += 2; } return changed; } const char *CellBuffer::DeleteChars(int position, int deleteLength) { // InsertString and DeleteChars are the bottleneck though which all changes occur char *data = 0; if (!readOnly) { if (collectingUndo) { // Save into the undo/redo stack, but only the characters - not the formatting data = new char[deleteLength / 2]; for (int i = 0; i < deleteLength / 2; i++) { data[i] = ByteAt(position + i * 2); } uh.AppendAction(removeAction, position, data, deleteLength / 2); } BasicDeleteChars(position, deleteLength); } return data; } int CellBuffer::ByteLength() { return length; } int CellBuffer::Length() { return ByteLength() / 2; } void CellBuffer::Allocate(int newSize) { if (newSize > length) { GapTo(length); char *newBody = new char[newSize]; memcpy(newBody, body, length); delete []body; body = newBody; gaplen += newSize - size; part2body = body + gaplen; size = newSize; } } int CellBuffer::Lines() { //Platform::DebugPrintf("Lines = %d\n", lv.lines); return lv.lines; } int CellBuffer::LineStart(int line) { if (line < 0) return 0; else if (line > lv.lines) return Length(); else return lv.linesData[line].startPosition; } bool CellBuffer::IsReadOnly() { return readOnly; } void CellBuffer::SetReadOnly(bool set) { readOnly = set; } void CellBuffer::SetSavePoint() { uh.SetSavePoint(); } bool CellBuffer::IsSavePoint() { return uh.IsSavePoint(); } int CellBuffer::AddMark(int line, int markerNum) { if ((line >= 0) && (line < lv.lines)) { return lv.AddMark(line, markerNum); } return - 1; } void CellBuffer::DeleteMark(int line, int markerNum) { if ((line >= 0) && (line < lv.lines)) { lv.DeleteMark(line, markerNum, false); } } void CellBuffer::DeleteMarkFromHandle(int markerHandle) { lv.DeleteMarkFromHandle(markerHandle); } int CellBuffer::GetMark(int line) { if ((line >= 0) && (line < lv.lines) && (lv.linesData[line].handleSet)) return lv.linesData[line].handleSet->MarkValue(); return 0; } void CellBuffer::DeleteAllMarks(int markerNum) { for (int line = 0; line < lv.lines; line++) { lv.DeleteMark(line, markerNum, true); } } int CellBuffer::LineFromHandle(int markerHandle) { return lv.LineFromHandle(markerHandle); } // Without undo void CellBuffer::BasicInsertString(int position, char *s, int insertLength) { //Platform::DebugPrintf("Inserting at %d for %d\n", position, insertLength); if (insertLength == 0) return ; RoomFor(insertLength); GapTo(position); memcpy(body + part1len, s, insertLength); length += insertLength; part1len += insertLength; gaplen -= insertLength; part2body = body + gaplen; int lineInsert = lv.LineFromPosition(position / 2) + 1; // Point all the lines after the insertion point further along in the buffer for (int lineAfter = lineInsert; lineAfter <= lv.lines; lineAfter++) { lv.linesData[lineAfter].startPosition += insertLength / 2; } char chPrev = ' '; if ((position - 2) >= 0) chPrev = ByteAt(position - 2); char chAfter = ' '; if ((position + insertLength) < length) chAfter = ByteAt(position + insertLength); if (chPrev == '\r' && chAfter == '\n') { //Platform::DebugPrintf("Splitting a crlf pair at %d\n", lineInsert); // Splitting up a crlf pair at position lv.InsertValue(lineInsert, position / 2); lineInsert++; } char ch = ' '; for (int i = 0; i < insertLength; i += 2) { ch = s[i]; if (ch == '\r') { //Platform::DebugPrintf("Inserting cr at %d\n", lineInsert); lv.InsertValue(lineInsert, (position + i) / 2 + 1); lineInsert++; } else if (ch == '\n') { if (chPrev == '\r') { //Platform::DebugPrintf("Patching cr before lf at %d\n", lineInsert-1); // Patch up what was end of line lv.SetValue(lineInsert - 1, (position + i) / 2 + 1); } else { //Platform::DebugPrintf("Inserting lf at %d\n", lineInsert); lv.InsertValue(lineInsert, (position + i) / 2 + 1); lineInsert++; } } chPrev = ch; } // Joining two lines where last insertion is cr and following text starts with lf if (chAfter == '\n') { if (ch == '\r') { //Platform::DebugPrintf("Joining cr before lf at %d\n", lineInsert-1); // End of line already in buffer so drop the newly created one lv.Remove(lineInsert - 1); } } } void CellBuffer::BasicDeleteChars(int position, int deleteLength) { //Platform::DebugPrintf("Deleting at %d for %d\n", position, deleteLength); if (deleteLength == 0) return ; if ((position == 0) && (deleteLength == length)) { // If whole buffer is being deleted, faster to reinitialise lines data // than to delete each line. //printf("Whole buffer being deleted\n"); lv.Init(); } else { // Have to fix up line positions before doing deletion as looking at text in buffer // to work out which lines have been removed int lineRemove = lv.LineFromPosition(position / 2) + 1; // Point all the lines after the insertion point further along in the buffer for (int lineAfter = lineRemove; lineAfter <= lv.lines; lineAfter++) { lv.linesData[lineAfter].startPosition -= deleteLength / 2; } char chPrev = ' '; if (position >= 2) chPrev = ByteAt(position - 2); char chBefore = chPrev; char chNext = ' '; if (position < length) chNext = ByteAt(position); bool ignoreNL = false; if (chPrev == '\r' && chNext == '\n') { //Platform::DebugPrintf("Deleting lf after cr, move line end to cr at %d\n", lineRemove); // Move back one lv.SetValue(lineRemove, position / 2); lineRemove++; ignoreNL = true; // First \n is not real deletion } char ch = chNext; for (int i = 0; i < deleteLength; i += 2) { chNext = ' '; if ((position + i + 2) < length) chNext = ByteAt(position + i + 2); //Platform::DebugPrintf("Deleting %d %x\n", i, ch); if (ch == '\r') { if (chNext != '\n') { //Platform::DebugPrintf("Removing cr end of line\n"); lv.Remove(lineRemove); } } else if (ch == '\n') { if (ignoreNL) { ignoreNL = false; // Further \n are real deletions } else { //Platform::DebugPrintf("Removing lf end of line\n"); lv.Remove(lineRemove); } } ch = chNext; } // May have to fix up end if last deletion causes cr to be next to lf // or removes one of a crlf pair char chAfter = ' '; if ((position + deleteLength) < length) chAfter = ByteAt(position + deleteLength); if (chBefore == '\r' && chAfter == '\n') { //d.printf("Joining cr before lf at %d\n", lineRemove); // Using lineRemove-1 as cr ended line before start of deletion lv.Remove(lineRemove - 1); lv.SetValue(lineRemove - 1, position / 2 + 1); } } GapTo(position); length -= deleteLength; gaplen += deleteLength; part2body = body + gaplen; } bool CellBuffer::SetUndoCollection(bool collectUndo) { collectingUndo = collectUndo; uh.DropUndoSequence(); return collectingUndo; } bool CellBuffer::IsCollectingUndo() { return collectingUndo; } void CellBuffer::BeginUndoAction() { uh.BeginUndoAction(); } void CellBuffer::EndUndoAction() { uh.EndUndoAction(); } void CellBuffer::DeleteUndoHistory() { uh.DeleteUndoHistory(); } bool CellBuffer::CanUndo() { return uh.CanUndo(); } int CellBuffer::StartUndo() { return uh.StartUndo(); } const Action &CellBuffer::GetUndoStep() const { return uh.GetUndoStep(); } void CellBuffer::PerformUndoStep() { const Action &actionStep = uh.GetUndoStep(); if (actionStep.at == insertAction) { BasicDeleteChars(actionStep.position, actionStep.lenData*2); } else if (actionStep.at == removeAction) { char *styledData = new char[actionStep.lenData * 2]; for (int i = 0; i < actionStep.lenData; i++) { styledData[i*2] = actionStep.data[i]; styledData[i*2 + 1] = 0; } BasicInsertString(actionStep.position, styledData, actionStep.lenData*2); delete []styledData; } uh.CompletedUndoStep(); } bool CellBuffer::CanRedo() { return uh.CanRedo(); } int CellBuffer::StartRedo() { return uh.StartRedo(); } const Action &CellBuffer::GetRedoStep() const { return uh.GetRedoStep(); } void CellBuffer::PerformRedoStep() { const Action &actionStep = uh.GetRedoStep(); if (actionStep.at == insertAction) { char *styledData = new char[actionStep.lenData * 2]; for (int i = 0; i < actionStep.lenData; i++) { styledData[i*2] = actionStep.data[i]; styledData[i*2 + 1] = 0; } BasicInsertString(actionStep.position, styledData, actionStep.lenData*2); delete []styledData; } else if (actionStep.at == removeAction) { BasicDeleteChars(actionStep.position, actionStep.lenData*2); } uh.CompletedRedoStep(); } int CellBuffer::SetLineState(int line, int state) { int stateOld = lineStates[line]; lineStates[line] = state; return stateOld; } int CellBuffer::GetLineState(int line) { return lineStates[line]; } int CellBuffer::GetMaxLineState() { return lineStates.Length(); } int CellBuffer::SetLevel(int line, int level) { int prev = 0; if ((line >= 0) && (line < lv.lines)) { if (!lv.levels) { lv.ExpandLevels(); } prev = lv.levels[line]; if (lv.levels[line] != level) { lv.levels[line] = level; } } return prev; } int CellBuffer::GetLevel(int line) { if (lv.levels && (line >= 0) && (line < lv.lines)) { return lv.levels[line]; } else { return SC_FOLDLEVELBASE; } } void CellBuffer::ClearLevels() { lv.ClearLevels(); } usr/src/sdlBasic/src/sdlBasic/scintilla/src/AutoComplete.h0000777000076500007660000000363210463135043021005 0ustar // Scintilla source code edit control /** @file AutoComplete.h ** Defines the auto completion list box. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef AUTOCOMPLETE_H #define AUTOCOMPLETE_H /** */ class AutoComplete { bool active; char stopChars[256]; char fillUpChars[256]; char separator; char typesep; // Type seperator public: bool ignoreCase; bool chooseSingle; ListBox *lb; int posStart; int startLen; /// Should autocompletion be canceled if editor's currentPos <= startPos? bool cancelAtStartPos; bool autoHide; bool dropRestOfWord; AutoComplete(); ~AutoComplete(); /// Is the auto completion list displayed? bool Active(); /// Display the auto completion list positioned to be near a character position void Start(Window &parent, int ctrlID, int position, Point location, int startLen_, int lineHeight, bool unicodeMode); /// The stop chars are characters which, when typed, cause the auto completion list to disappear void SetStopChars(const char *stopChars_); bool IsStopChar(char ch); /// The fillup chars are characters which, when typed, fill up the selected word void SetFillUpChars(const char *fillUpChars_); bool IsFillUpChar(char ch); /// The separator character is used when interpreting the list in SetList void SetSeparator(char separator_); char GetSeparator(); /// The typesep character is used for seperating the word from the type void SetTypesep(char separator_); char GetTypesep(); /// The list string contains a sequence of words separated by the separator character void SetList(const char *list); void Show(bool show); void Cancel(); /// Move the current list element by delta, scrolling appropriately void Move(int delta); /// Select a list element that starts with word as the current element void Select(const char *word); }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/KeyWords.cxx0000777000076500007660000000727410463135664020545 0ustar // Scintilla source code edit control /** @file KeyWords.cxx ** Colourise for particular languages. **/ // Copyright 1998-2002 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include "Platform.h" #include "PropSet.h" #include "Accessor.h" #include "KeyWords.h" #include "Scintilla.h" #include "SciLexer.h" const LexerModule *LexerModule::base = 0; int LexerModule::nextLanguage = SCLEX_AUTOMATIC+1; LexerModule::LexerModule(int language_, LexerFunction fnLexer_, const char *languageName_, LexerFunction fnFolder_, const char * const wordListDescriptions_[]) : language(language_), fnLexer(fnLexer_), fnFolder(fnFolder_), wordListDescriptions(wordListDescriptions_), languageName(languageName_) { next = base; base = this; if (language == SCLEX_AUTOMATIC) { language = nextLanguage; nextLanguage++; } } int LexerModule::GetNumWordLists() const { if (wordListDescriptions == NULL) { return -1; } else { int numWordLists = 0; while (wordListDescriptions[numWordLists]) { ++numWordLists; } return numWordLists; } } const char * LexerModule::GetWordListDescription(int index) const { static const char *emptyStr = ""; PLATFORM_ASSERT(index < GetNumWordLists()); if (index >= GetNumWordLists()) { return emptyStr; } else { return wordListDescriptions[index]; } } const LexerModule *LexerModule::Find(int language) { const LexerModule *lm = base; while (lm) { if (lm->language == language) { return lm; } lm = lm->next; } return 0; } const LexerModule *LexerModule::Find(const char *languageName) { if (languageName) { const LexerModule *lm = base; while (lm) { if (lm->languageName && 0 == strcmp(lm->languageName, languageName)) { return lm; } lm = lm->next; } } return 0; } void LexerModule::Lex(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const { if (fnLexer) fnLexer(startPos, lengthDoc, initStyle, keywordlists, styler); } void LexerModule::Fold(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const { if (fnFolder) { int lineCurrent = styler.GetLine(startPos); // Move back one line in case deletion wrecked current line fold state if (lineCurrent > 0) { lineCurrent--; int newStartPos = styler.LineStart(lineCurrent); lengthDoc += startPos - newStartPos; startPos = newStartPos; initStyle = 0; if (startPos > 0) { initStyle = styler.StyleAt(startPos - 1); } } fnFolder(startPos, lengthDoc, initStyle, keywordlists, styler); } } // Alternative historical name for Scintilla_LinkLexers int wxForceScintillaLexers(void) { return Scintilla_LinkLexers(); } // To add or remove a lexer, add or remove its file and run LexGen.py. // Force a reference to all of the Scintilla lexers so that the linker will // not remove the code of the lexers. int Scintilla_LinkLexers() { static int forcer = 0; // Shorten the code that declares a lexer and ensures it is linked in by calling a method. #define LINK_LEXER(lexer) extern LexerModule lexer; forcer += lexer.GetLanguage(); //++Autogenerated -- run src/LexGen.py to regenerate //**\(\tLINK_LEXER(\*);\n\) LINK_LEXER(lmBatch); LINK_LEXER(lmDiff); LINK_LEXER(lmProps); LINK_LEXER(lmMake); LINK_LEXER(lmErrorList); LINK_LEXER(lmLatex); LINK_LEXER(lmNull); LINK_LEXER(lmSDLB); //--Autogenerated -- end of automatically generated section return 1; } usr/src/sdlBasic/src/sdlBasic/scintilla/src/AutoComplete.cxx0000777000076500007660000000754310463135043021365 0ustar // Scintilla source code edit control /** @file AutoComplete.cxx ** Defines the auto completion list box. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include "Platform.h" #include "PropSet.h" #include "AutoComplete.h" AutoComplete::AutoComplete() : active(false), separator(' '), typesep('?'), ignoreCase(false), chooseSingle(false), lb(0), posStart(0), startLen(0), cancelAtStartPos(true), autoHide(true), dropRestOfWord(false) { lb = ListBox::Allocate(); stopChars[0] = '\0'; fillUpChars[0] = '\0'; } AutoComplete::~AutoComplete() { if (lb) { lb->Destroy(); delete lb; lb = 0; } } bool AutoComplete::Active() { return active; } void AutoComplete::Start(Window &parent, int ctrlID, int position, Point location, int startLen_, int lineHeight, bool unicodeMode) { if (active) { Cancel(); } lb->Create(parent, ctrlID, location, lineHeight, unicodeMode); lb->Clear(); active = true; startLen = startLen_; posStart = position; } void AutoComplete::SetStopChars(const char *stopChars_) { strncpy(stopChars, stopChars_, sizeof(stopChars)); stopChars[sizeof(stopChars) - 1] = '\0'; } bool AutoComplete::IsStopChar(char ch) { return ch && strchr(stopChars, ch); } void AutoComplete::SetFillUpChars(const char *fillUpChars_) { strncpy(fillUpChars, fillUpChars_, sizeof(fillUpChars)); fillUpChars[sizeof(fillUpChars) - 1] = '\0'; } bool AutoComplete::IsFillUpChar(char ch) { return ch && strchr(fillUpChars, ch); } void AutoComplete::SetSeparator(char separator_) { separator = separator_; } char AutoComplete::GetSeparator() { return separator; } void AutoComplete::SetTypesep(char separator_) { typesep = separator_; } char AutoComplete::GetTypesep() { return typesep; } void AutoComplete::SetList(const char *list) { lb->SetList(list, separator, typesep); } void AutoComplete::Show(bool show) { lb->Show(show); if (show) lb->Select(0); } void AutoComplete::Cancel() { if (lb->Created()) { lb->Clear(); lb->Destroy(); active = false; } } void AutoComplete::Move(int delta) { int count = lb->Length(); int current = lb->GetSelection(); current += delta; if (current >= count) current = count - 1; if (current < 0) current = 0; lb->Select(current); } void AutoComplete::Select(const char *word) { size_t lenWord = strlen(word); int location = -1; const int maxItemLen=1000; char item[maxItemLen]; int start = 0; // lower bound of the api array block to search int end = lb->Length() - 1; // upper bound of the api array block to search while ((start <= end) && (location == -1)) { // Binary searching loop int pivot = (start + end) / 2; lb->GetValue(pivot, item, maxItemLen); int cond; if (ignoreCase) cond = CompareNCaseInsensitive(word, item, lenWord); else cond = strncmp(word, item, lenWord); if (!cond) { // Find first match while (pivot > start) { lb->GetValue(pivot-1, item, maxItemLen); if (ignoreCase) cond = CompareNCaseInsensitive(word, item, lenWord); else cond = strncmp(word, item, lenWord); if (0 != cond) break; --pivot; } location = pivot; if (ignoreCase) { // Check for exact-case match for (; pivot <= end; pivot++) { lb->GetValue(pivot, item, maxItemLen); if (!strncmp(word, item, lenWord)) { location = pivot; break; } if (CompareNCaseInsensitive(word, item, lenWord)) break; } } } else if (cond < 0) { end = pivot - 1; } else if (cond > 0) { start = pivot + 1; } } if (location == -1 && autoHide) Cancel(); else lb->Select(location); } usr/src/sdlBasic/src/sdlBasic/scintilla/src/KeyMap.h0000777000076500007660000000157210463135664017604 0ustar // Scintilla source code edit control /** @file KeyMap.h ** Defines a mapping between keystrokes and commands. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef KEYTOCOMMAND_H #define KEYTOCOMMAND_H #define SCI_NORM 0 #define SCI_SHIFT SCMOD_SHIFT #define SCI_CTRL SCMOD_CTRL #define SCI_ALT SCMOD_ALT #define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT) #define SCI_ASHIFT (SCI_ALT | SCI_SHIFT) /** */ class KeyToCommand { public: int key; int modifiers; unsigned int msg; }; /** */ class KeyMap { KeyToCommand *kmap; int len; int alloc; static const KeyToCommand MapDefault[]; public: KeyMap(); ~KeyMap(); void Clear(); void AssignCmdKey(int key, int modifiers, unsigned int msg); unsigned int Find(int key, int modifiers); // 0 returned on failure }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/PropSet.cxx0000777000076500007660000007342710463135777020402 0ustar // SciTE - Scintilla based Text Editor /** @file PropSet.cxx ** A Java style properties file module. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. // Maintain a dictionary of properties #include #include #include #include "Platform.h" #include "PropSet.h" // The comparison and case changing functions here assume ASCII // or extended ASCII such as the normal Windows code page. static inline char MakeUpperCase(char ch) { if (ch < 'a' || ch > 'z') return ch; else return static_cast(ch - 'a' + 'A'); } static inline bool IsLetter(char ch) { return ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')); } inline bool IsASpace(unsigned int ch) { return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); } int CompareCaseInsensitive(const char *a, const char *b) { while (*a && *b) { if (*a != *b) { char upperA = MakeUpperCase(*a); char upperB = MakeUpperCase(*b); if (upperA != upperB) return upperA - upperB; } a++; b++; } // Either *a or *b is nul return *a - *b; } int CompareNCaseInsensitive(const char *a, const char *b, size_t len) { while (*a && *b && len) { if (*a != *b) { char upperA = MakeUpperCase(*a); char upperB = MakeUpperCase(*b); if (upperA != upperB) return upperA - upperB; } a++; b++; len--; } if (len == 0) return 0; else // Either *a or *b is nul return *a - *b; } bool EqualCaseInsensitive(const char *a, const char *b) { return 0 == CompareCaseInsensitive(a, b); } // Since the CaseInsensitive functions declared in SString // are implemented here, I will for now put the non-inline // implementations of the SString members here as well, so // that I can quickly see what effect this has. SString::SString(int i) : sizeGrowth(sizeGrowthDefault) { char number[32]; sprintf(number, "%0d", i); s = StringAllocate(number); sSize = sLen = (s) ? strlen(s) : 0; } SString::SString(double d, int precision) : sizeGrowth(sizeGrowthDefault) { char number[32]; sprintf(number, "%.*f", precision, d); s = StringAllocate(number); sSize = sLen = (s) ? strlen(s) : 0; } bool SString::grow(lenpos_t lenNew) { while (sizeGrowth * 6 < lenNew) { sizeGrowth *= 2; } char *sNew = new char[lenNew + sizeGrowth + 1]; if (sNew) { if (s) { memcpy(sNew, s, sLen); delete []s; } s = sNew; s[sLen] = '\0'; sSize = lenNew + sizeGrowth; } return sNew != 0; } SString &SString::assign(const char *sOther, lenpos_t sSize_) { if (!sOther) { sSize_ = 0; } else if (sSize_ == measure_length) { sSize_ = strlen(sOther); } if (sSize > 0 && sSize_ <= sSize) { // Does not allocate new buffer if the current is big enough if (s && sSize_) { memcpy(s, sOther, sSize_); } s[sSize_] = '\0'; sLen = sSize_; } else { delete []s; s = StringAllocate(sOther, sSize_); if (s) { sSize = sSize_; // Allow buffer bigger than real string, thus providing space to grow sLen = sSize_; } else { sSize = sLen = 0; } } return *this; } bool SString::operator==(const SString &sOther) const { if ((s == 0) && (sOther.s == 0)) return true; if ((s == 0) || (sOther.s == 0)) return false; return strcmp(s, sOther.s) == 0; } bool SString::operator==(const char *sOther) const { if ((s == 0) && (sOther == 0)) return true; if ((s == 0) || (sOther == 0)) return false; return strcmp(s, sOther) == 0; } SString SString::substr(lenpos_t subPos, lenpos_t subLen) const { if (subPos >= sLen) { return SString(); // return a null string if start index is out of bounds } if ((subLen == measure_length) || (subPos + subLen > sLen)) { subLen = sLen - subPos; // can't substr past end of source string } return SString(s, subPos, subPos + subLen); } SString &SString::lowercase(lenpos_t subPos, lenpos_t subLen) { if ((subLen == measure_length) || (subPos + subLen > sLen)) { subLen = sLen - subPos; // don't apply past end of string } for (lenpos_t i = subPos; i < subPos + subLen; i++) { if (s[i] < 'A' || s[i] > 'Z') continue; else s[i] = static_cast(s[i] - 'A' + 'a'); } return *this; } SString &SString::uppercase(lenpos_t subPos, lenpos_t subLen) { if ((subLen == measure_length) || (subPos + subLen > sLen)) { subLen = sLen - subPos; // don't apply past end of string } for (lenpos_t i = subPos; i < subPos + subLen; i++) { if (s[i] < 'a' || s[i] > 'z') continue; else s[i] = static_cast(s[i] - 'a' + 'A'); } return *this; } SString &SString::append(const char *sOther, lenpos_t sLenOther, char sep) { if (!sOther) { return *this; } if (sLenOther == measure_length) { sLenOther = strlen(sOther); } int lenSep = 0; if (sLen && sep) { // Only add a separator if not empty lenSep = 1; } lenpos_t lenNew = sLen + sLenOther + lenSep; // Conservative about growing the buffer: don't do it, unless really needed if ((lenNew < sSize) || (grow(lenNew))) { if (lenSep) { s[sLen] = sep; sLen++; } memcpy(&s[sLen], sOther, sLenOther); sLen += sLenOther; s[sLen] = '\0'; } return *this; } SString &SString::insert(lenpos_t pos, const char *sOther, lenpos_t sLenOther) { if (!sOther || pos > sLen) { return *this; } if (sLenOther == measure_length) { sLenOther = strlen(sOther); } lenpos_t lenNew = sLen + sLenOther; // Conservative about growing the buffer: don't do it, unless really needed if ((lenNew < sSize) || grow(lenNew)) { lenpos_t moveChars = sLen - pos + 1; for (lenpos_t i = moveChars; i > 0; i--) { s[pos + sLenOther + i - 1] = s[pos + i - 1]; } memcpy(s + pos, sOther, sLenOther); sLen = lenNew; } return *this; } /** * Remove @a len characters from the @a pos position, included. * Characters at pos + len and beyond replace characters at pos. * If @a len is 0, or greater than the length of the string * starting at @a pos, the string is just truncated at @a pos. */ void SString::remove(lenpos_t pos, lenpos_t len) { if (pos >= sLen) { return; } if (len < 1 || pos + len >= sLen) { s[pos] = '\0'; sLen = pos; } else { for (lenpos_t i = pos; i < sLen - len + 1; i++) { s[i] = s[i+len]; } sLen -= len; } } bool SString::startswith(const char *prefix) { lenpos_t lenPrefix = strlen(prefix); if (lenPrefix > sLen) { return false; } return strncmp(s, prefix, lenPrefix) == 0; } bool SString::endswith(const char *suffix) { lenpos_t lenSuffix = strlen(suffix); if (lenSuffix > sLen) { return false; } return strncmp(s + sLen - lenSuffix, suffix, lenSuffix) == 0; } int SString::search(const char *sFind, lenpos_t start) const { if (start < sLen) { const char *sFound = strstr(s + start, sFind); if (sFound) { return sFound - s; } } return -1; } int SString::substitute(char chFind, char chReplace) { int c = 0; char *t = s; while (t) { t = strchr(t, chFind); if (t) { *t = chReplace; t++; c++; } } return c; } int SString::substitute(const char *sFind, const char *sReplace) { int c = 0; lenpos_t lenFind = strlen(sFind); lenpos_t lenReplace = strlen(sReplace); int posFound = search(sFind); while (posFound >= 0) { remove(posFound, lenFind); insert(posFound, sReplace, lenReplace); posFound = search(sFind, posFound + lenReplace); c++; } return c; } char *SContainer::StringAllocate(lenpos_t len) { if (len != measure_length) { return new char[len + 1]; } else { return 0; } } char *SContainer::StringAllocate(const char *s, lenpos_t len) { if (s == 0) { return 0; } if (len == measure_length) { len = strlen(s); } char *sNew = new char[len + 1]; if (sNew) { memcpy(sNew, s, len); sNew[len] = '\0'; } return sNew; } // End SString functions PropSet::PropSet() { superPS = 0; for (int root = 0; root < hashRoots; root++) props[root] = 0; } PropSet::~PropSet() { superPS = 0; Clear(); } void PropSet::Set(const char *key, const char *val, int lenKey, int lenVal) { if (!*key) // Empty keys are not supported return; if (lenKey == -1) lenKey = static_cast(strlen(key)); if (lenVal == -1) lenVal = static_cast(strlen(val)); unsigned int hash = HashString(key, lenKey); for (Property *p = props[hash % hashRoots]; p; p = p->next) { if ((hash == p->hash) && ((strlen(p->key) == static_cast(lenKey)) && (0 == strncmp(p->key, key, lenKey)))) { // Replace current value delete [](p->val); p->val = StringDup(val, lenVal); return; } } // Not found Property *pNew = new Property; if (pNew) { pNew->hash = hash; pNew->key = StringDup(key, lenKey); pNew->val = StringDup(val, lenVal); pNew->next = props[hash % hashRoots]; props[hash % hashRoots] = pNew; } } void PropSet::Set(const char *keyVal) { while (IsASpace(*keyVal)) keyVal++; const char *endVal = keyVal; while (*endVal && (*endVal != '\n')) endVal++; const char *eqAt = strchr(keyVal, '='); if (eqAt) { Set(keyVal, eqAt + 1, eqAt-keyVal, endVal - eqAt - 1); } else if (*keyVal) { // No '=' so assume '=1' Set(keyVal, "1", endVal-keyVal, 1); } } void PropSet::Unset(const char *key, int lenKey) { if (!*key) // Empty keys are not supported return; if (lenKey == -1) lenKey = static_cast(strlen(key)); unsigned int hash = HashString(key, lenKey); Property *pPrev = NULL; for (Property *p = props[hash % hashRoots]; p; p = p->next) { if ((hash == p->hash) && ((strlen(p->key) == static_cast(lenKey)) && (0 == strncmp(p->key, key, lenKey)))) { if (pPrev) pPrev->next = p->next; else props[hash % hashRoots] = p->next; if (p == enumnext) enumnext = p->next; // Not that anyone should mix enum and Set / Unset. delete [](p->key); delete [](p->val); delete p; return; } else { pPrev = p; } } } void PropSet::SetMultiple(const char *s) { const char *eol = strchr(s, '\n'); while (eol) { Set(s); s = eol + 1; eol = strchr(s, '\n'); } Set(s); } SString PropSet::Get(const char *key) { unsigned int hash = HashString(key, strlen(key)); for (Property *p = props[hash % hashRoots]; p; p = p->next) { if ((hash == p->hash) && (0 == strcmp(p->key, key))) { return p->val; } } if (superPS) { // Failed here, so try in base property set return superPS->Get(key); } else { return ""; } } bool PropSet::IncludesVar(const char *value, const char *key) { const char *var = strstr(value, "$("); while (var) { if (isprefix(var + 2, key) && (var[2 + strlen(key)] == ')')) { // Found $(key) which would lead to an infinite loop so exit return true; } var = strstr(var + 2, ")"); if (var) var = strstr(var + 1, "$("); } return false; } // There is some inconsistency between GetExpanded("foo") and Expand("$(foo)"). // A solution is to keep a stack of variables that have been expanded, so that // recursive expansions can be skipped. For now I'll just use the C++ stack // for that, through a recursive function and a simple chain of pointers. struct VarChain { VarChain(const char*var_=NULL, const VarChain *link_=NULL): var(var_), link(link_) {} bool contains(const char *testVar) const { return (var && (0 == strcmp(var, testVar))) || (link && link->contains(testVar)); } const char *var; const VarChain *link; }; static int ExpandAllInPlace(PropSet &props, SString &withVars, int maxExpands, const VarChain &blankVars = VarChain()) { int varStart = withVars.search("$("); while ((varStart >= 0) && (maxExpands > 0)) { int varEnd = withVars.search(")", varStart+2); if (varEnd < 0) { break; } // For consistency, when we see '$(ab$(cde))', expand the inner variable first, // regardless whether there is actually a degenerate variable named 'ab$(cde'. int innerVarStart = withVars.search("$(", varStart+2); while ((innerVarStart > varStart) && (innerVarStart < varEnd)) { varStart = innerVarStart; innerVarStart = withVars.search("$(", varStart+2); } SString var(withVars.c_str(), varStart + 2, varEnd); SString val = props.Get(var.c_str()); if (blankVars.contains(var.c_str())) { val.clear(); // treat blankVar as an empty string (e.g. to block self-reference) } if (--maxExpands >= 0) { maxExpands = ExpandAllInPlace(props, val, maxExpands, VarChain(var.c_str(), &blankVars)); } withVars.remove(varStart, varEnd-varStart+1); withVars.insert(varStart, val.c_str(), val.length()); varStart = withVars.search("$("); } return maxExpands; } SString PropSet::GetExpanded(const char *key) { SString val = Get(key); ExpandAllInPlace(*this, val, 100, VarChain(key)); return val; } SString PropSet::Expand(const char *withVars, int maxExpands) { SString val = withVars; ExpandAllInPlace(*this, val, maxExpands); return val; } int PropSet::GetInt(const char *key, int defaultValue) { SString val = GetExpanded(key); if (val.length()) return val.value(); return defaultValue; } bool isprefix(const char *target, const char *prefix) { while (*target && *prefix) { if (*target != *prefix) return false; target++; prefix++; } if (*prefix) return false; else return true; } static bool IsSuffixCaseInsensitive(const char *target, const char *suffix) { size_t lentarget = strlen(target); size_t lensuffix = strlen(suffix); if (lensuffix > lentarget) return false; for (int i = static_cast(lensuffix) - 1; i >= 0; i--) { if (MakeUpperCase(target[i + lentarget - lensuffix]) != MakeUpperCase(suffix[i])) return false; } return true; } SString PropSet::GetWild(const char *keybase, const char *filename) { for (int root = 0; root < hashRoots; root++) { for (Property *p = props[root]; p; p = p->next) { if (isprefix(p->key, keybase)) { char * orgkeyfile = p->key + strlen(keybase); char *keyfile = NULL; if (strstr(orgkeyfile, "$(") == orgkeyfile) { char *cpendvar = strchr(orgkeyfile, ')'); if (cpendvar) { *cpendvar = '\0'; SString s = GetExpanded(orgkeyfile + 2); *cpendvar = ')'; keyfile = StringDup(s.c_str()); } } char *keyptr = keyfile; if (keyfile == NULL) keyfile = orgkeyfile; for (;;) { char *del = strchr(keyfile, ';'); if (del == NULL) del = keyfile + strlen(keyfile); char delchr = *del; *del = '\0'; if (*keyfile == '*') { if (IsSuffixCaseInsensitive(filename, keyfile + 1)) { *del = delchr; delete []keyptr; return p->val; } } else if (0 == strcmp(keyfile, filename)) { *del = delchr; delete []keyptr; return p->val; } if (delchr == '\0') break; *del = delchr; keyfile = del + 1; } delete []keyptr; if (0 == strcmp(p->key, keybase)) { return p->val; } } } } if (superPS) { // Failed here, so try in base property set return superPS->GetWild(keybase, filename); } else { return ""; } } // GetNewExpand does not use Expand as it has to use GetWild with the filename for each // variable reference found. SString PropSet::GetNewExpand(const char *keybase, const char *filename) { char *base = StringDup(GetWild(keybase, filename).c_str()); char *cpvar = strstr(base, "$("); int maxExpands = 1000; // Avoid infinite expansion of recursive definitions while (cpvar && (maxExpands > 0)) { char *cpendvar = strchr(cpvar, ')'); if (cpendvar) { int lenvar = cpendvar - cpvar - 2; // Subtract the $() char *var = StringDup(cpvar + 2, lenvar); SString val = GetWild(var, filename); if (0 == strcmp(var, keybase)) val.clear(); // Self-references evaluate to empty string size_t newlenbase = strlen(base) + val.length() - lenvar; char *newbase = new char[newlenbase]; strncpy(newbase, base, cpvar - base); strcpy(newbase + (cpvar - base), val.c_str()); strcpy(newbase + (cpvar - base) + val.length(), cpendvar + 1); delete []var; delete []base; base = newbase; } cpvar = strstr(base, "$("); maxExpands--; } SString sret = base; delete []base; return sret; } void PropSet::Clear() { for (int root = 0; root < hashRoots; root++) { Property *p = props[root]; while (p) { Property *pNext = p->next; p->hash = 0; delete []p->key; p->key = 0; delete []p->val; p->val = 0; delete p; p = pNext; } props[root] = 0; } } char *PropSet::ToString() { size_t len=0; for (int r = 0; r < hashRoots; r++) { for (Property *p = props[r]; p; p = p->next) { len += strlen(p->key) + 1; len += strlen(p->val) + 1; } } if (len == 0) len = 1; // Return as empty string char *ret = new char [len]; if (ret) { char *w = ret; for (int root = 0; root < hashRoots; root++) { for (Property *p = props[root]; p; p = p->next) { strcpy(w, p->key); w += strlen(p->key); *w++ = '='; strcpy(w, p->val); w += strlen(p->val); *w++ = '\n'; } } ret[len-1] = '\0'; } return ret; } /** * Initiate enumeration. */ bool PropSet::GetFirst(char **key, char **val) { for (int i = 0; i < hashRoots; i++) { for (Property *p = props[i]; p; p = p->next) { if (p) { *key = p->key; *val = p->val; enumnext = p->next; // GetNext will begin here ... enumhash = i; // ... in this block return true; } } } return false; } /** * Continue enumeration. */ bool PropSet::GetNext(char ** key, char ** val) { bool firstloop = true; // search begins where we left it : in enumhash block for (int i = enumhash; i < hashRoots; i++) { if (!firstloop) enumnext = props[i]; // Begin with first property in block // else : begin where we left firstloop = false; for (Property *p = enumnext; p; p = p->next) { if (p) { *key = p->key; *val = p->val; enumnext = p->next; // for GetNext enumhash = i; return true; } } } return false; } /** * Creates an array that points into each word in the string and puts \0 terminators * after each word. */ static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = false) { int prev = '\n'; int words = 0; // For rapid determination of whether a character is a separator, build // a look up table. bool wordSeparator[256]; for (int i=0;i<256; i++) { wordSeparator[i] = false; } wordSeparator['\r'] = true; wordSeparator['\n'] = true; if (!onlyLineEnds) { wordSeparator[' '] = true; wordSeparator['\t'] = true; } for (int j = 0; wordlist[j]; j++) { int curr = static_cast(wordlist[j]); if (!wordSeparator[curr] && wordSeparator[prev]) words++; prev = curr; } char **keywords = new char *[words + 1]; if (keywords) { words = 0; prev = '\0'; size_t slen = strlen(wordlist); for (size_t k = 0; k < slen; k++) { if (!wordSeparator[static_cast(wordlist[k])]) { if (!prev) { keywords[words] = &wordlist[k]; words++; } } else { wordlist[k] = '\0'; } prev = wordlist[k]; } keywords[words] = &wordlist[slen]; *len = words; } else { *len = 0; } return keywords; } void WordList::Clear() { if (words) { delete []list; delete []words; delete []wordsNoCase; } words = 0; wordsNoCase = 0; list = 0; len = 0; sorted = false; sortedNoCase = false; } void WordList::Set(const char *s) { list = StringDup(s); sorted = false; sortedNoCase = false; words = ArrayFromWordList(list, &len, onlyLineEnds); wordsNoCase = new char * [len + 1]; memcpy(wordsNoCase, words, (len + 1) * sizeof (*words)); } char *WordList::Allocate(int size) { list = new char[size + 1]; list[size] = '\0'; return list; } void WordList::SetFromAllocated() { sorted = false; sortedNoCase = false; words = ArrayFromWordList(list, &len, onlyLineEnds); wordsNoCase = new char * [len + 1]; memcpy(wordsNoCase, words, (len + 1) * sizeof (*words)); } int cmpString(const void *a1, const void *a2) { // Can't work out the correct incantation to use modern casts here return strcmp(*(char**)(a1), *(char**)(a2)); } int cmpStringNoCase(const void *a1, const void *a2) { // Can't work out the correct incantation to use modern casts here return CompareCaseInsensitive(*(char**)(a1), *(char**)(a2)); } static void SortWordList(char **words, unsigned int len) { qsort(reinterpret_cast(words), len, sizeof(*words), cmpString); } static void SortWordListNoCase(char **wordsNoCase, unsigned int len) { qsort(reinterpret_cast(wordsNoCase), len, sizeof(*wordsNoCase), cmpStringNoCase); } bool WordList::InList(const char *s) { if (0 == words) return false; if (!sorted) { sorted = true; SortWordList(words, len); for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++) starts[k] = -1; for (int l = len - 1; l >= 0; l--) { unsigned char indexChar = words[l][0]; starts[indexChar] = l; } } unsigned char firstChar = s[0]; int j = starts[firstChar]; if (j >= 0) { while (words[j][0] == firstChar) { if (s[1] == words[j][1]) { const char *a = words[j] + 1; const char *b = s + 1; while (*a && *a == *b) { a++; b++; } if (!*a && !*b) return true; } j++; } } j = starts['^']; if (j >= 0) { while (words[j][0] == '^') { const char *a = words[j] + 1; const char *b = s; while (*a && *a == *b) { a++; b++; } if (!*a) return true; j++; } } return false; } /** similar to InList, but word s can be a substring of keyword. * eg. the keyword define is defined as def~ine. This means the word must start * with def to be a keyword, but also defi, defin and define are valid. * The marker is ~ in this case. */ bool WordList::InListAbbreviated(const char *s, const char marker) { if (0 == words) return false; if (!sorted) { sorted = true; SortWordList(words, len); for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++) starts[k] = -1; for (int l = len - 1; l >= 0; l--) { unsigned char indexChar = words[l][0]; starts[indexChar] = l; } } unsigned char firstChar = s[0]; int j = starts[firstChar]; if (j >= 0) { while (words[j][0] == firstChar) { bool isSubword = false; int start = 1; if (words[j][1] == marker) { isSubword = true; start++; } if (s[1] == words[j][start]) { const char *a = words[j] + start; const char *b = s + 1; while (*a && *a == *b) { a++; if (*a == marker) { isSubword = true; a++; } b++; } if ((!*a || isSubword) && !*b) return true; } j++; } } j = starts['^']; if (j >= 0) { while (words[j][0] == '^') { const char *a = words[j] + 1; const char *b = s; while (*a && *a == *b) { a++; b++; } if (!*a) return true; j++; } } return false; } /** * Returns an element (complete) of the wordlist array which has * the same beginning as the passed string. * The length of the word to compare is passed too. * Letter case can be ignored or preserved (default). */ const char *WordList::GetNearestWord(const char *wordStart, int searchLen, bool ignoreCase /*= false*/, SString wordCharacters /*='/0' */, int wordIndex /*= -1 */) { int start = 0; // lower bound of the api array block to search int end = len - 1; // upper bound of the api array block to search int pivot; // index of api array element just being compared int cond; // comparison result (in the sense of strcmp() result) const char *word; // api array element just being compared if (0 == words) return NULL; if (ignoreCase) { if (!sortedNoCase) { sortedNoCase = true; SortWordListNoCase(wordsNoCase, len); } while (start <= end) { // binary searching loop pivot = (start + end) >> 1; word = wordsNoCase[pivot]; cond = CompareNCaseInsensitive(wordStart, word, searchLen); if (!cond) { // find first word start = pivot; while (start > 0 && !CompareNCaseInsensitive(wordStart, wordsNoCase[start-1], searchLen)) { start--; } // find last word end = pivot; while (end < len-1 && !CompareNCaseInsensitive(wordStart, wordsNoCase[end+1], searchLen)) { end++; } // Finds first word in a series of equal words for (pivot = start; pivot <= end; pivot++) { word = wordsNoCase[pivot]; if (!wordCharacters.contains(word[searchLen])) { if (wordIndex <= 0) // Checks if a specific index was requested return word; // result must not be freed with free() wordIndex--; } } return NULL; } else if (cond > 0) start = pivot + 1; else if (cond < 0) end = pivot - 1; } } else { // preserve the letter case if (!sorted) { sorted = true; SortWordList(words, len); } while (start <= end) { // binary searching loop pivot = (start + end) >> 1; word = words[pivot]; cond = strncmp(wordStart, word, searchLen); if (!cond) { // find first word start = pivot; while (start > 0 && !strncmp(wordStart, words[start-1], searchLen)) { start--; } // find last word end = pivot; while (end < len-1 && !strncmp(wordStart, words[end+1], searchLen)) { end++; } // Finds first word in a series of equal words pivot = start; while (pivot <= end) { word = words[pivot]; if (!wordCharacters.contains(word[searchLen])) { if (wordIndex <= 0) // Checks if a specific index was requested return word; // result must not be freed with free() wordIndex--; } pivot++; } return NULL; } else if (cond > 0) start = pivot + 1; else if (cond < 0) end = pivot - 1; } } return NULL; } /** * Find the length of a 'word' which is actually an identifier in a string * which looks like "identifier(..." or "identifier" and where * there may be extra spaces after the identifier that should not be * counted in the length. */ static unsigned int LengthWord(const char *word, char otherSeparator) { // Find a '('. If that fails go to the end of the string. const char *endWord = strchr(word, '('); if (!endWord && otherSeparator) endWord = strchr(word, otherSeparator); if (!endWord) endWord = word + strlen(word); // Last case always succeeds so endWord != 0 // Drop any space characters. if (endWord > word) { endWord--; // Back from the '(', otherSeparator, or '\0' // Move backwards over any spaces while ((endWord > word) && (IsASpace(*endWord))) { endWord--; } } return endWord - word; } /** * Returns elements (first words of them) of the wordlist array which have * the same beginning as the passed string. * The length of the word to compare is passed too. * Letter case can be ignored or preserved (default). * If there are more words meeting the condition they are returned all of * them in the ascending order separated with spaces. * * NOTE: returned buffer has to be freed with delete[]. */ char *WordList::GetNearestWords( const char *wordStart, int searchLen, bool ignoreCase /*= false*/, char otherSeparator /*= '\0'*/, bool exactLen /*=false*/) { unsigned int wordlen; // length of the word part (before the '(' brace) of the api array element SString wordsNear; wordsNear.setsizegrowth(1000); int start = 0; // lower bound of the api array block to search int end = len - 1; // upper bound of the api array block to search int pivot; // index of api array element just being compared int cond; // comparison result (in the sense of strcmp() result) if (0 == words) return NULL; if (ignoreCase) { if (!sortedNoCase) { sortedNoCase = true; SortWordListNoCase(wordsNoCase, len); } while (start <= end) { // Binary searching loop pivot = (start + end) / 2; cond = CompareNCaseInsensitive(wordStart, wordsNoCase[pivot], searchLen); if (!cond) { // Find first match while ((pivot > start) && (0 == CompareNCaseInsensitive(wordStart, wordsNoCase[pivot-1], searchLen))) { --pivot; } // Grab each match while ((pivot <= end) && (0 == CompareNCaseInsensitive(wordStart, wordsNoCase[pivot], searchLen))) { wordlen = LengthWord(wordsNoCase[pivot], otherSeparator) + 1; ++pivot; if (exactLen && wordlen != LengthWord(wordStart, otherSeparator) + 1) continue; wordsNear.append(wordsNoCase[pivot-1], wordlen, ' '); } return wordsNear.detach(); } else if (cond < 0) { end = pivot - 1; } else if (cond > 0) { start = pivot + 1; } } } else { // Preserve the letter case if (!sorted) { sorted = true; SortWordList(words, len); } while (start <= end) { // Binary searching loop pivot = (start + end) / 2; cond = strncmp(wordStart, words[pivot], searchLen); if (!cond) { // Find first match while ((pivot > start) && (0 == strncmp(wordStart, words[pivot-1], searchLen))) { --pivot; } // Grab each match while ((pivot <= end) && (0 == strncmp(wordStart, words[pivot], searchLen))) { wordlen = LengthWord(words[pivot], otherSeparator) + 1; ++pivot; if (exactLen && wordlen != LengthWord(wordStart, otherSeparator) + 1) continue; wordsNear.append(words[pivot-1], wordlen, ' '); } return wordsNear.detach(); } else if (cond < 0) { end = pivot - 1; } else if (cond > 0) { start = pivot + 1; } } } return NULL; } usr/src/sdlBasic/src/sdlBasic/scintilla/src/Indicator.cxx0000777000076500007660000000404310463135664020701 0ustar // Scintilla source code edit control /** @file Indicator.cxx ** Defines the style of indicators which are text decorations such as underlining. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include "Platform.h" #include "Scintilla.h" #include "Indicator.h" void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine) { surface->PenColour(fore.allocated); int ymid = (rc.bottom + rc.top) / 2; if (style == INDIC_SQUIGGLE) { surface->MoveTo(rc.left, rc.top); int x = rc.left + 2; int y = 2; while (x < rc.right) { surface->LineTo(x, rc.top + y); x += 2; y = 2 - y; } surface->LineTo(rc.right, rc.top + y); // Finish the line } else if (style == INDIC_TT) { surface->MoveTo(rc.left, ymid); int x = rc.left + 5; while (x < rc.right) { surface->LineTo(x, ymid); surface->MoveTo(x-3, ymid); surface->LineTo(x-3, ymid+2); x++; surface->MoveTo(x, ymid); x += 5; } surface->LineTo(rc.right, ymid); // Finish the line if (x - 3 <= rc.right) { surface->MoveTo(x-3, ymid); surface->LineTo(x-3, ymid+2); } } else if (style == INDIC_DIAGONAL) { int x = rc.left; while (x < rc.right) { surface->MoveTo(x, rc.top+2); int endX = x+3; int endY = rc.top - 1; if (endX > rc.right) { endY += endX - rc.right; endX = rc.right; } surface->LineTo(endX, endY); x += 4; } } else if (style == INDIC_STRIKE) { surface->MoveTo(rc.left, rc.top - 4); surface->LineTo(rc.right, rc.top - 4); } else if (style == INDIC_HIDDEN) { // Draw nothing } else if (style == INDIC_BOX) { surface->MoveTo(rc.left, ymid+1); surface->LineTo(rc.right, ymid+1); surface->LineTo(rc.right, rcLine.top+1); surface->LineTo(rc.left, rcLine.top+1); surface->LineTo(rc.left, ymid+1); } else { // Either INDIC_PLAIN or unknown surface->MoveTo(rc.left, ymid); surface->LineTo(rc.right, ymid); } } usr/src/sdlBasic/src/sdlBasic/scintilla/src/Document.cxx0000777000076500007660000012065410463135222020540 0ustar // Scintilla source code edit control /** @file Document.cxx ** Text document that handles notifications, DBCS, styling, words and end of line. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "SVector.h" #include "CellBuffer.h" #include "Document.h" #include "RESearch.h" // This is ASCII specific but is safe with chars >= 0x80 static inline bool isspacechar(unsigned char ch) { return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); } static inline bool IsPunctuation(char ch) { return isascii(ch) && ispunct(ch); } static inline bool IsADigit(char ch) { return isascii(ch) && isdigit(ch); } static inline bool IsLowerCase(char ch) { return isascii(ch) && islower(ch); } static inline bool IsUpperCase(char ch) { return isascii(ch) && isupper(ch); } Document::Document() { refCount = 0; #ifdef unix eolMode = SC_EOL_LF; #else eolMode = SC_EOL_CRLF; #endif dbcsCodePage = 0; stylingBits = 5; stylingBitsMask = 0x1F; stylingMask = 0; SetDefaultCharClasses(true); endStyled = 0; styleClock = 0; enteredCount = 0; enteredReadOnlyCount = 0; tabInChars = 8; indentInChars = 0; actualIndentInChars = 8; useTabs = true; tabIndents = true; backspaceUnindents = false; watchers = 0; lenWatchers = 0; matchesValid = false; pre = 0; substituted = 0; } Document::~Document() { for (int i = 0; i < lenWatchers; i++) { watchers[i].watcher->NotifyDeleted(this, watchers[i].userData); } delete []watchers; watchers = 0; lenWatchers = 0; delete pre; pre = 0; delete []substituted; substituted = 0; } // Increase reference count and return its previous value. int Document::AddRef() { return refCount++; } // Decrease reference count and return its previous value. // Delete the document if reference count reaches zero. int Document::Release() { int curRefCount = --refCount; if (curRefCount == 0) delete this; return curRefCount; } void Document::SetSavePoint() { cb.SetSavePoint(); NotifySavePoint(true); } int Document::AddMark(int line, int markerNum) { int prev = cb.AddMark(line, markerNum); DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); NotifyModified(mh); return prev; } void Document::DeleteMark(int line, int markerNum) { cb.DeleteMark(line, markerNum); DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); NotifyModified(mh); } void Document::DeleteMarkFromHandle(int markerHandle) { cb.DeleteMarkFromHandle(markerHandle); DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); NotifyModified(mh); } void Document::DeleteAllMarks(int markerNum) { cb.DeleteAllMarks(markerNum); DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); NotifyModified(mh); } int Document::LineStart(int line) { return cb.LineStart(line); } int Document::LineEnd(int line) { if (line == LinesTotal() - 1) { return LineStart(line + 1); } else { int position = LineStart(line + 1) - 1; // When line terminator is CR+LF, may need to go back one more if ((position > LineStart(line)) && (cb.CharAt(position - 1) == '\r')) { position--; } return position; } } int Document::LineFromPosition(int pos) { return cb.LineFromPosition(pos); } int Document::LineEndPosition(int position) { return LineEnd(LineFromPosition(position)); } int Document::VCHomePosition(int position) { int line = LineFromPosition(position); int startPosition = LineStart(line); int endLine = LineStart(line + 1) - 1; int startText = startPosition; while (startText < endLine && (cb.CharAt(startText) == ' ' || cb.CharAt(startText) == '\t' ) ) startText++; if (position == startText) return startPosition; else return startText; } int Document::SetLevel(int line, int level) { int prev = cb.SetLevel(line, level); if (prev != level) { DocModification mh(SC_MOD_CHANGEFOLD | SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0); mh.line = line; mh.foldLevelNow = level; mh.foldLevelPrev = prev; NotifyModified(mh); } return prev; } static bool IsSubordinate(int levelStart, int levelTry) { if (levelTry & SC_FOLDLEVELWHITEFLAG) return true; else return (levelStart & SC_FOLDLEVELNUMBERMASK) < (levelTry & SC_FOLDLEVELNUMBERMASK); } int Document::GetLastChild(int lineParent, int level) { if (level == -1) level = GetLevel(lineParent) & SC_FOLDLEVELNUMBERMASK; int maxLine = LinesTotal(); int lineMaxSubord = lineParent; while (lineMaxSubord < maxLine - 1) { EnsureStyledTo(LineStart(lineMaxSubord + 2)); if (!IsSubordinate(level, GetLevel(lineMaxSubord + 1))) break; lineMaxSubord++; } if (lineMaxSubord > lineParent) { if (level > (GetLevel(lineMaxSubord + 1) & SC_FOLDLEVELNUMBERMASK)) { // Have chewed up some whitespace that belongs to a parent so seek back if (GetLevel(lineMaxSubord) & SC_FOLDLEVELWHITEFLAG) { lineMaxSubord--; } } } return lineMaxSubord; } int Document::GetFoldParent(int line) { int level = GetLevel(line) & SC_FOLDLEVELNUMBERMASK; int lineLook = line - 1; while ((lineLook > 0) && ( (!(GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG)) || ((GetLevel(lineLook) & SC_FOLDLEVELNUMBERMASK) >= level)) ) { lineLook--; } if ((GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG) && ((GetLevel(lineLook) & SC_FOLDLEVELNUMBERMASK) < level)) { return lineLook; } else { return -1; } } int Document::ClampPositionIntoDocument(int pos) { return Platform::Clamp(pos, 0, Length()); } bool Document::IsCrLf(int pos) { if (pos < 0) return false; if (pos >= (Length() - 1)) return false; return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n'); } static const int maxBytesInDBCSCharacter=5; int Document::LenChar(int pos) { if (pos < 0) { return 1; } else if (IsCrLf(pos)) { return 2; } else if (SC_CP_UTF8 == dbcsCodePage) { unsigned char ch = static_cast(cb.CharAt(pos)); if (ch < 0x80) return 1; int len = 2; if (ch >= (0x80 + 0x40 + 0x20)) len = 3; int lengthDoc = Length(); if ((pos + len) > lengthDoc) return lengthDoc -pos; else return len; } else if (dbcsCodePage) { char mbstr[maxBytesInDBCSCharacter+1]; int i; for (i=0; i= Length()) return Length(); // PLATFORM_ASSERT(pos > 0 && pos < Length()); if (checkLineEnd && IsCrLf(pos - 1)) { if (moveDir > 0) return pos + 1; else return pos - 1; } // Not between CR and LF if (dbcsCodePage) { if (SC_CP_UTF8 == dbcsCodePage) { unsigned char ch = static_cast(cb.CharAt(pos)); while ((pos > 0) && (pos < Length()) && (ch >= 0x80) && (ch < (0x80 + 0x40))) { // ch is a trail byte if (moveDir > 0) pos++; else pos--; ch = static_cast(cb.CharAt(pos)); } } else { // Anchor DBCS calculations at start of line because start of line can // not be a DBCS trail byte. int posCheck = LineStart(LineFromPosition(pos)); while (posCheck < pos) { char mbstr[maxBytesInDBCSCharacter+1]; int i; for(i=0;i pos) { if (moveDir > 0) { return posCheck + mbsize; } else { return posCheck; } } posCheck += mbsize; } } } return pos; } void Document::ModifiedAt(int pos) { if (endStyled > pos) endStyled = pos; } void Document::CheckReadOnly() { if (cb.IsReadOnly() && enteredReadOnlyCount == 0) { enteredReadOnlyCount++; NotifyModifyAttempt(); enteredReadOnlyCount--; } } // Document only modified by gateways DeleteChars, InsertStyledString, Undo, Redo, and SetStyleAt. // SetStyleAt does not change the persistent state of a document // Unlike Undo, Redo, and InsertStyledString, the pos argument is a cell number not a char number bool Document::DeleteChars(int pos, int len) { if (len == 0) return false; if ((pos + len) > Length()) return false; CheckReadOnly(); if (enteredCount != 0) { return false; } else { enteredCount++; if (!cb.IsReadOnly()) { NotifyModified( DocModification( SC_MOD_BEFOREDELETE | SC_PERFORMED_USER, pos, len, 0, 0)); int prevLinesTotal = LinesTotal(); bool startSavePoint = cb.IsSavePoint(); const char *text = cb.DeleteChars(pos * 2, len * 2); if (startSavePoint && cb.IsCollectingUndo()) NotifySavePoint(!startSavePoint); if ((pos < Length()) || (pos == 0)) ModifiedAt(pos); else ModifiedAt(pos-1); NotifyModified( DocModification( SC_MOD_DELETETEXT | SC_PERFORMED_USER, pos, len, LinesTotal() - prevLinesTotal, text)); } enteredCount--; } return !cb.IsReadOnly(); } /** * Insert a styled string (char/style pairs) with a length. */ bool Document::InsertStyledString(int position, char *s, int insertLength) { CheckReadOnly(); if (enteredCount != 0) { return false; } else { enteredCount++; if (!cb.IsReadOnly()) { NotifyModified( DocModification( SC_MOD_BEFOREINSERT | SC_PERFORMED_USER, position / 2, insertLength / 2, 0, s)); int prevLinesTotal = LinesTotal(); bool startSavePoint = cb.IsSavePoint(); const char *text = cb.InsertString(position, s, insertLength); if (startSavePoint && cb.IsCollectingUndo()) NotifySavePoint(!startSavePoint); ModifiedAt(position / 2); NotifyModified( DocModification( SC_MOD_INSERTTEXT | SC_PERFORMED_USER, position / 2, insertLength / 2, LinesTotal() - prevLinesTotal, text)); } enteredCount--; } return !cb.IsReadOnly(); } int Document::Undo() { int newPos = -1; CheckReadOnly(); if (enteredCount == 0) { enteredCount++; if (!cb.IsReadOnly()) { bool startSavePoint = cb.IsSavePoint(); bool multiLine = false; int steps = cb.StartUndo(); //Platform::DebugPrintf("Steps=%d\n", steps); for (int step = 0; step < steps; step++) { const int prevLinesTotal = LinesTotal(); const Action &action = cb.GetUndoStep(); if (action.at == removeAction) { NotifyModified(DocModification( SC_MOD_BEFOREINSERT | SC_PERFORMED_UNDO, action)); } else { NotifyModified(DocModification( SC_MOD_BEFOREDELETE | SC_PERFORMED_UNDO, action)); } cb.PerformUndoStep(); int cellPosition = action.position / 2; ModifiedAt(cellPosition); newPos = cellPosition; int modFlags = SC_PERFORMED_UNDO; // With undo, an insertion action becomes a deletion notification if (action.at == removeAction) { newPos += action.lenData; modFlags |= SC_MOD_INSERTTEXT; } else { modFlags |= SC_MOD_DELETETEXT; } if (steps > 1) modFlags |= SC_MULTISTEPUNDOREDO; const int linesAdded = LinesTotal() - prevLinesTotal; if (linesAdded != 0) multiLine = true; if (step == steps - 1) { modFlags |= SC_LASTSTEPINUNDOREDO; if (multiLine) modFlags |= SC_MULTILINEUNDOREDO; } NotifyModified(DocModification(modFlags, cellPosition, action.lenData, linesAdded, action.data)); } bool endSavePoint = cb.IsSavePoint(); if (startSavePoint != endSavePoint) NotifySavePoint(endSavePoint); } enteredCount--; } return newPos; } int Document::Redo() { int newPos = -1; CheckReadOnly(); if (enteredCount == 0) { enteredCount++; if (!cb.IsReadOnly()) { bool startSavePoint = cb.IsSavePoint(); bool multiLine = false; int steps = cb.StartRedo(); for (int step = 0; step < steps; step++) { const int prevLinesTotal = LinesTotal(); const Action &action = cb.GetRedoStep(); if (action.at == insertAction) { NotifyModified(DocModification( SC_MOD_BEFOREINSERT | SC_PERFORMED_REDO, action)); } else { NotifyModified(DocModification( SC_MOD_BEFOREDELETE | SC_PERFORMED_REDO, action)); } cb.PerformRedoStep(); ModifiedAt(action.position / 2); newPos = action.position / 2; int modFlags = SC_PERFORMED_REDO; if (action.at == insertAction) { newPos += action.lenData; modFlags |= SC_MOD_INSERTTEXT; } else { modFlags |= SC_MOD_DELETETEXT; } if (steps > 1) modFlags |= SC_MULTISTEPUNDOREDO; const int linesAdded = LinesTotal() - prevLinesTotal; if (linesAdded != 0) multiLine = true; if (step == steps - 1) { modFlags |= SC_LASTSTEPINUNDOREDO; if (multiLine) modFlags |= SC_MULTILINEUNDOREDO; } NotifyModified( DocModification(modFlags, action.position / 2, action.lenData, linesAdded, action.data)); } bool endSavePoint = cb.IsSavePoint(); if (startSavePoint != endSavePoint) NotifySavePoint(endSavePoint); } enteredCount--; } return newPos; } /** * Insert a single character. */ bool Document::InsertChar(int pos, char ch) { char chs[2]; chs[0] = ch; chs[1] = 0; return InsertStyledString(pos*2, chs, 2); } /** * Insert a null terminated string. */ bool Document::InsertString(int position, const char *s) { return InsertString(position, s, strlen(s)); } /** * Insert a string with a length. */ bool Document::InsertString(int position, const char *s, size_t insertLength) { bool changed = false; if (insertLength > 0) { char *sWithStyle = new char[insertLength * 2]; if (sWithStyle) { for (size_t i = 0; i < insertLength; i++) { sWithStyle[i*2] = s[i]; sWithStyle[i*2 + 1] = 0; } changed = InsertStyledString(position*2, sWithStyle, static_cast(insertLength*2)); delete []sWithStyle; } } return changed; } void Document::ChangeChar(int pos, char ch) { DeleteChars(pos, 1); InsertChar(pos, ch); } void Document::DelChar(int pos) { DeleteChars(pos, LenChar(pos)); } void Document::DelCharBack(int pos) { if (pos <= 0) { return; } else if (IsCrLf(pos - 2)) { DeleteChars(pos - 2, 2); } else if (dbcsCodePage) { int startChar = MovePositionOutsideChar(pos - 1, -1, false); DeleteChars(startChar, pos - startChar); } else { DeleteChars(pos - 1, 1); } } static bool isindentchar(char ch) { return (ch == ' ') || (ch == '\t'); } static int NextTab(int pos, int tabSize) { return ((pos / tabSize) + 1) * tabSize; } static void CreateIndentation(char *linebuf, int length, int indent, int tabSize, bool insertSpaces) { length--; // ensure space for \0 if (!insertSpaces) { while ((indent >= tabSize) && (length > 0)) { *linebuf++ = '\t'; indent -= tabSize; length--; } } while ((indent > 0) && (length > 0)) { *linebuf++ = ' '; indent--; length--; } *linebuf = '\0'; } int Document::GetLineIndentation(int line) { int indent = 0; if ((line >= 0) && (line < LinesTotal())) { int lineStart = LineStart(line); int length = Length(); for (int i = lineStart;i < length;i++) { char ch = cb.CharAt(i); if (ch == ' ') indent++; else if (ch == '\t') indent = NextTab(indent, tabInChars); else return indent; } } return indent; } void Document::SetLineIndentation(int line, int indent) { int indentOfLine = GetLineIndentation(line); if (indent < 0) indent = 0; if (indent != indentOfLine) { char linebuf[1000]; CreateIndentation(linebuf, sizeof(linebuf), indent, tabInChars, !useTabs); int thisLineStart = LineStart(line); int indentPos = GetLineIndentPosition(line); BeginUndoAction(); DeleteChars(thisLineStart, indentPos - thisLineStart); InsertString(thisLineStart, linebuf); EndUndoAction(); } } int Document::GetLineIndentPosition(int line) { if (line < 0) return 0; int pos = LineStart(line); int length = Length(); while ((pos < length) && isindentchar(cb.CharAt(pos))) { pos++; } return pos; } int Document::GetColumn(int pos) { int column = 0; int line = LineFromPosition(pos); if ((line >= 0) && (line < LinesTotal())) { for (int i = LineStart(line);i < pos;) { char ch = cb.CharAt(i); if (ch == '\t') { column = NextTab(column, tabInChars); i++; } else if (ch == '\r') { return column; } else if (ch == '\n') { return column; } else { column++; i = MovePositionOutsideChar(i + 1, 1); } } } return column; } int Document::FindColumn(int line, int column) { int position = LineStart(line); int columnCurrent = 0; if ((line >= 0) && (line < LinesTotal())) { while ((columnCurrent < column) && (position < Length())) { char ch = cb.CharAt(position); if (ch == '\t') { columnCurrent = NextTab(columnCurrent, tabInChars); position++; } else if (ch == '\r') { return position; } else if (ch == '\n') { return position; } else { columnCurrent++; position = MovePositionOutsideChar(position + 1, 1); } } } return position; } void Document::Indent(bool forwards, int lineBottom, int lineTop) { // Dedent - suck white space off the front of the line to dedent by equivalent of a tab for (int line = lineBottom; line >= lineTop; line--) { int indentOfLine = GetLineIndentation(line); if (forwards) SetLineIndentation(line, indentOfLine + IndentSize()); else SetLineIndentation(line, indentOfLine - IndentSize()); } } // Convert line endings for a piece of text to a particular mode. // Stop at len or when a NUL is found. // Caller must delete the returned pointer. char *Document::TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolMode) { char *dest = new char[2 * len + 1]; const char *sptr = s; char *dptr = dest; for (size_t i = 0; (i < len) && (*sptr != '\0'); i++) { if (*sptr == '\n' || *sptr == '\r') { if (eolMode == SC_EOL_CR) { *dptr++ = '\r'; } else if (eolMode == SC_EOL_LF) { *dptr++ = '\n'; } else { // eolMode == SC_EOL_CRLF *dptr++ = '\r'; *dptr++ = '\n'; } if ((*sptr == '\r') && (i+1 < len) && (*(sptr+1) == '\n')) { i++; sptr++; } sptr++; } else { *dptr++ = *sptr++; } } *dptr++ = '\0'; *pLenOut = (dptr - dest) - 1; return dest; } void Document::ConvertLineEnds(int eolModeSet) { BeginUndoAction(); for (int pos = 0; pos < Length(); pos++) { if (cb.CharAt(pos) == '\r') { if (cb.CharAt(pos + 1) == '\n') { // CRLF if (eolModeSet == SC_EOL_CR) { DeleteChars(pos + 1, 1); // Delete the LF } else if (eolModeSet == SC_EOL_LF) { DeleteChars(pos, 1); // Delete the CR } else { pos++; } } else { // CR if (eolModeSet == SC_EOL_CRLF) { InsertString(pos + 1, "\n", 1); // Insert LF pos++; } else if (eolModeSet == SC_EOL_LF) { InsertString(pos, "\n", 1); // Insert LF DeleteChars(pos + 1, 1); // Delete CR } } } else if (cb.CharAt(pos) == '\n') { // LF if (eolModeSet == SC_EOL_CRLF) { InsertString(pos, "\r", 1); // Insert CR pos++; } else if (eolModeSet == SC_EOL_CR) { InsertString(pos, "\r", 1); // Insert CR DeleteChars(pos + 1, 1); // Delete LF } } } EndUndoAction(); } bool Document::IsWhiteLine(int line) { int currentChar = LineStart(line); int endLine = LineEnd(line); while (currentChar < endLine) { if (cb.CharAt(currentChar) != ' ' && cb.CharAt(currentChar) != '\t') { return false; } ++currentChar; } return true; } int Document::ParaUp(int pos) { int line = LineFromPosition(pos); line--; while (line >= 0 && IsWhiteLine(line)) { // skip empty lines line--; } while (line >= 0 && !IsWhiteLine(line)) { // skip non-empty lines line--; } line++; return LineStart(line); } int Document::ParaDown(int pos) { int line = LineFromPosition(pos); while (line < LinesTotal() && !IsWhiteLine(line)) { // skip non-empty lines line++; } while (line < LinesTotal() && IsWhiteLine(line)) { // skip empty lines line++; } if (line < LinesTotal()) return LineStart(line); else // end of a document return LineEnd(line-1); } Document::charClassification Document::WordCharClass(unsigned char ch) { if ((SC_CP_UTF8 == dbcsCodePage) && (ch >= 0x80)) return ccWord; return charClass[ch]; } /** * Used by commmands that want to select whole words. * Finds the start of word at pos when delta < 0 or the end of the word when delta >= 0. */ int Document::ExtendWordSelect(int pos, int delta, bool onlyWordCharacters) { charClassification ccStart = ccWord; if (delta < 0) { if (!onlyWordCharacters) ccStart = WordCharClass(cb.CharAt(pos-1)); while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == ccStart)) pos--; } else { if (!onlyWordCharacters) ccStart = WordCharClass(cb.CharAt(pos)); while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == ccStart)) pos++; } return MovePositionOutsideChar(pos, delta); } /** * Find the start of the next word in either a forward (delta >= 0) or backwards direction * (delta < 0). * This is looking for a transition between character classes although there is also some * additional movement to transit white space. * Used by cursor movement by word commands. */ int Document::NextWordStart(int pos, int delta) { if (delta < 0) { while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == ccSpace)) pos--; if (pos > 0) { charClassification ccStart = WordCharClass(cb.CharAt(pos-1)); while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == ccStart)) { pos--; } } } else { charClassification ccStart = WordCharClass(cb.CharAt(pos)); while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == ccStart)) pos++; while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == ccSpace)) pos++; } return pos; } /** * Find the end of the next word in either a forward (delta >= 0) or backwards direction * (delta < 0). * This is looking for a transition between character classes although there is also some * additional movement to transit white space. * Used by cursor movement by word commands. */ int Document::NextWordEnd(int pos, int delta) { if (delta < 0) { if (pos > 0) { charClassification ccStart = WordCharClass(cb.CharAt(pos-1)); if (ccStart != ccSpace) { while (pos > 0 && WordCharClass(cb.CharAt(pos - 1)) == ccStart) { pos--; } } while (pos > 0 && WordCharClass(cb.CharAt(pos - 1)) == ccSpace) { pos--; } } } else { while (pos < Length() && WordCharClass(cb.CharAt(pos)) == ccSpace) { pos++; } if (pos < Length()) { charClassification ccStart = WordCharClass(cb.CharAt(pos)); while (pos < Length() && WordCharClass(cb.CharAt(pos)) == ccStart) { pos++; } } } return pos; } /** * Check that the character at the given position is a word or punctuation character and that * the previous character is of a different character class. */ bool Document::IsWordStartAt(int pos) { if (pos > 0) { charClassification ccPos = WordCharClass(CharAt(pos)); return (ccPos == ccWord || ccPos == ccPunctuation) && (ccPos != WordCharClass(CharAt(pos - 1))); } return true; } /** * Check that the character at the given position is a word or punctuation character and that * the next character is of a different character class. */ bool Document::IsWordEndAt(int pos) { if (pos < Length()) { charClassification ccPrev = WordCharClass(CharAt(pos-1)); return (ccPrev == ccWord || ccPrev == ccPunctuation) && (ccPrev != WordCharClass(CharAt(pos))); } return true; } /** * Check that the given range is has transitions between character classes at both * ends and where the characters on the inside are word or punctuation characters. */ bool Document::IsWordAt(int start, int end) { return IsWordStartAt(start) && IsWordEndAt(end); } // The comparison and case changing functions here assume ASCII // or extended ASCII such as the normal Windows code page. static inline char MakeUpperCase(char ch) { if (ch < 'a' || ch > 'z') return ch; else return static_cast(ch - 'a' + 'A'); } static inline char MakeLowerCase(char ch) { if (ch < 'A' || ch > 'Z') return ch; else return static_cast(ch - 'A' + 'a'); } // Define a way for the Regular Expression code to access the document class DocumentIndexer : public CharacterIndexer { Document *pdoc; int end; public: DocumentIndexer(Document *pdoc_, int end_) : pdoc(pdoc_), end(end_) { } virtual char CharAt(int index) { if (index < 0 || index >= end) return 0; else return pdoc->CharAt(index); } }; /** * Find text in document, supporting both forward and backward * searches (just pass minPos > maxPos to do a backward search) * Has not been tested with backwards DBCS searches yet. */ long Document::FindText(int minPos, int maxPos, const char *s, bool caseSensitive, bool word, bool wordStart, bool regExp, bool posix, int *length) { if (regExp) { if (!pre) pre = new RESearch(); if (!pre) return -1; int increment = (minPos <= maxPos) ? 1 : -1; int startPos = minPos; int endPos = maxPos; // Range endpoints should not be inside DBCS characters, but just in case, move them. startPos = MovePositionOutsideChar(startPos, 1, false); endPos = MovePositionOutsideChar(endPos, 1, false); const char *errmsg = pre->Compile(s, *length, caseSensitive, posix); if (errmsg) { return -1; } // Find a variable in a property file: \$(\([A-Za-z0-9_.]+\)) // Replace first '.' with '-' in each property file variable reference: // Search: \$(\([A-Za-z0-9_-]+\)\.\([A-Za-z0-9_.]+\)) // Replace: $(\1-\2) int lineRangeStart = LineFromPosition(startPos); int lineRangeEnd = LineFromPosition(endPos); if ((increment == 1) && (startPos >= LineEnd(lineRangeStart)) && (lineRangeStart < lineRangeEnd)) { // the start position is at end of line or between line end characters. lineRangeStart++; startPos = LineStart(lineRangeStart); } int pos = -1; int lenRet = 0; char searchEnd = s[*length - 1]; int lineRangeBreak = lineRangeEnd + increment; for (int line = lineRangeStart; line != lineRangeBreak; line += increment) { int startOfLine = LineStart(line); int endOfLine = LineEnd(line); if (increment == 1) { if (line == lineRangeStart) { if ((startPos != startOfLine) && (s[0] == '^')) continue; // Can't match start of line if start position after start of line startOfLine = startPos; } if (line == lineRangeEnd) { if ((endPos != endOfLine) && (searchEnd == '$')) continue; // Can't match end of line if end position before end of line endOfLine = endPos; } } else { if (line == lineRangeEnd) { if ((endPos != startOfLine) && (s[0] == '^')) continue; // Can't match start of line if end position after start of line startOfLine = endPos; } if (line == lineRangeStart) { if ((startPos != endOfLine) && (searchEnd == '$')) continue; // Can't match end of line if start position before end of line endOfLine = startPos; } } DocumentIndexer di(this, endOfLine); int success = pre->Execute(di, startOfLine, endOfLine); if (success) { pos = pre->bopat[0]; lenRet = pre->eopat[0] - pre->bopat[0]; if (increment == -1) { // Check for the last match on this line. int repetitions = 1000; // Break out of infinite loop while (success && (pre->eopat[0] <= endOfLine) && (repetitions--)) { success = pre->Execute(di, pos+1, endOfLine); if (success) { if (pre->eopat[0] <= minPos) { pos = pre->bopat[0]; lenRet = pre->eopat[0] - pre->bopat[0]; } else { success = 0; } } } } break; } } *length = lenRet; return pos; } else { bool forward = minPos <= maxPos; int increment = forward ? 1 : -1; // Range endpoints should not be inside DBCS characters, but just in case, move them. int startPos = MovePositionOutsideChar(minPos, increment, false); int endPos = MovePositionOutsideChar(maxPos, increment, false); // Compute actual search ranges needed int lengthFind = *length; if (lengthFind == -1) lengthFind = static_cast(strlen(s)); int endSearch = endPos; if (startPos <= endPos) { endSearch = endPos - lengthFind + 1; } //Platform::DebugPrintf("Find %d %d %s %d\n", startPos, endPos, ft->lpstrText, lengthFind); char firstChar = s[0]; if (!caseSensitive) firstChar = static_cast(MakeUpperCase(firstChar)); int pos = forward ? startPos : (startPos - 1); while (forward ? (pos < endSearch) : (pos >= endSearch)) { char ch = CharAt(pos); if (caseSensitive) { if (ch == firstChar) { bool found = true; if (pos + lengthFind > Platform::Maximum(startPos, endPos)) found = false; for (int posMatch = 1; posMatch < lengthFind && found; posMatch++) { ch = CharAt(pos + posMatch); if (ch != s[posMatch]) found = false; } if (found) { if ((!word && !wordStart) || word && IsWordAt(pos, pos + lengthFind) || wordStart && IsWordStartAt(pos)) return pos; } } } else { if (MakeUpperCase(ch) == firstChar) { bool found = true; if (pos + lengthFind > Platform::Maximum(startPos, endPos)) found = false; for (int posMatch = 1; posMatch < lengthFind && found; posMatch++) { ch = CharAt(pos + posMatch); if (MakeUpperCase(ch) != MakeUpperCase(s[posMatch])) found = false; } if (found) { if ((!word && !wordStart) || word && IsWordAt(pos, pos + lengthFind) || wordStart && IsWordStartAt(pos)) return pos; } } } pos += increment; if (dbcsCodePage && (pos >= 0)) { // Ensure trying to match from start of character pos = MovePositionOutsideChar(pos, increment, false); } } } //Platform::DebugPrintf("Not found\n"); return -1; } const char *Document::SubstituteByPosition(const char *text, int *length) { if (!pre) return 0; delete []substituted; substituted = 0; DocumentIndexer di(this, Length()); if (!pre->GrabMatches(di)) return 0; unsigned int lenResult = 0; for (int i = 0; i < *length; i++) { if (text[i] == '\\') { if (text[i + 1] >= '1' && text[i + 1] <= '9') { unsigned int patNum = text[i + 1] - '0'; lenResult += pre->eopat[patNum] - pre->bopat[patNum]; i++; } else { switch (text[i + 1]) { case 'a': case 'b': case 'f': case 'n': case 'r': case 't': case 'v': i++; } lenResult++; } } else { lenResult++; } } substituted = new char[lenResult + 1]; if (!substituted) return 0; char *o = substituted; for (int j = 0; j < *length; j++) { if (text[j] == '\\') { if (text[j + 1] >= '1' && text[j + 1] <= '9') { unsigned int patNum = text[j + 1] - '0'; unsigned int len = pre->eopat[patNum] - pre->bopat[patNum]; if (pre->pat[patNum]) // Will be null if try for a match that did not occur memcpy(o, pre->pat[patNum], len); o += len; j++; } else { j++; switch (text[j]) { case 'a': *o++ = '\a'; break; case 'b': *o++ = '\b'; break; case 'f': *o++ = '\f'; break; case 'n': *o++ = '\n'; break; case 'r': *o++ = '\r'; break; case 't': *o++ = '\t'; break; case 'v': *o++ = '\v'; break; default: *o++ = '\\'; j--; } } } else { *o++ = text[j]; } } *o = '\0'; *length = lenResult; return substituted; } int Document::LinesTotal() { return cb.Lines(); } void Document::ChangeCase(Range r, bool makeUpperCase) { for (int pos = r.start; pos < r.end;) { int len = LenChar(pos); if (len == 1) { char ch = CharAt(pos); if (makeUpperCase) { if (IsLowerCase(ch)) { ChangeChar(pos, static_cast(MakeUpperCase(ch))); } } else { if (IsUpperCase(ch)) { ChangeChar(pos, static_cast(MakeLowerCase(ch))); } } } pos += len; } } void Document::SetDefaultCharClasses(bool includeWordClass) { // Initialize all char classes to default values for (int ch = 0; ch < 256; ch++) { if (ch == '\r' || ch == '\n') charClass[ch] = ccNewLine; else if (ch < 0x20 || ch == ' ') charClass[ch] = ccSpace; else if (includeWordClass && (ch >= 0x80 || isalnum(ch) || ch == '_')) charClass[ch] = ccWord; else charClass[ch] = ccPunctuation; } } void Document::SetCharClasses(const unsigned char *chars, charClassification newCharClass) { // Apply the newCharClass to the specifed chars if (chars) { while (*chars) { charClass[*chars] = newCharClass; chars++; } } } void Document::SetStylingBits(int bits) { stylingBits = bits; stylingBitsMask = 0; for (int bit = 0; bit < stylingBits; bit++) { stylingBitsMask <<= 1; stylingBitsMask |= 1; } } void Document::StartStyling(int position, char mask) { stylingMask = mask; endStyled = position; } bool Document::SetStyleFor(int length, char style) { if (enteredCount != 0) { return false; } else { enteredCount++; style &= stylingMask; int prevEndStyled = endStyled; if (cb.SetStyleFor(endStyled, length, style, stylingMask)) { DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER, prevEndStyled, length); NotifyModified(mh); } endStyled += length; enteredCount--; return true; } } bool Document::SetStyles(int length, char *styles) { if (enteredCount != 0) { return false; } else { enteredCount++; int prevEndStyled = endStyled; bool didChange = false; int lastChange = 0; for (int iPos = 0; iPos < length; iPos++, endStyled++) { PLATFORM_ASSERT(endStyled < Length()); if (cb.SetStyleAt(endStyled, styles[iPos], stylingMask)) { didChange = true; lastChange = iPos; } } if (didChange) { DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER, prevEndStyled, lastChange); NotifyModified(mh); } enteredCount--; return true; } } bool Document::EnsureStyledTo(int pos) { if (pos > GetEndStyled()) { IncrementStyleClock(); // Ask the watchers to style, and stop as soon as one responds. for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++) { watchers[i].watcher->NotifyStyleNeeded(this, watchers[i].userData, pos); } } return pos <= GetEndStyled(); } void Document::IncrementStyleClock() { styleClock++; if (styleClock > 0x100000) { styleClock = 0; } } bool Document::AddWatcher(DocWatcher *watcher, void *userData) { for (int i = 0; i < lenWatchers; i++) { if ((watchers[i].watcher == watcher) && (watchers[i].userData == userData)) return false; } WatcherWithUserData *pwNew = new WatcherWithUserData[lenWatchers + 1]; if (!pwNew) return false; for (int j = 0; j < lenWatchers; j++) pwNew[j] = watchers[j]; pwNew[lenWatchers].watcher = watcher; pwNew[lenWatchers].userData = userData; delete []watchers; watchers = pwNew; lenWatchers++; return true; } bool Document::RemoveWatcher(DocWatcher *watcher, void *userData) { for (int i = 0; i < lenWatchers; i++) { if ((watchers[i].watcher == watcher) && (watchers[i].userData == userData)) { if (lenWatchers == 1) { delete []watchers; watchers = 0; lenWatchers = 0; } else { WatcherWithUserData *pwNew = new WatcherWithUserData[lenWatchers]; if (!pwNew) return false; for (int j = 0; j < lenWatchers - 1; j++) { pwNew[j] = (j < i) ? watchers[j] : watchers[j + 1]; } delete []watchers; watchers = pwNew; lenWatchers--; } return true; } } return false; } void Document::NotifyModifyAttempt() { for (int i = 0; i < lenWatchers; i++) { watchers[i].watcher->NotifyModifyAttempt(this, watchers[i].userData); } } void Document::NotifySavePoint(bool atSavePoint) { for (int i = 0; i < lenWatchers; i++) { watchers[i].watcher->NotifySavePoint(this, watchers[i].userData, atSavePoint); } } void Document::NotifyModified(DocModification mh) { for (int i = 0; i < lenWatchers; i++) { watchers[i].watcher->NotifyModified(this, mh, watchers[i].userData); } } bool Document::IsWordPartSeparator(char ch) { return (WordCharClass(ch) == ccWord) && IsPunctuation(ch); } int Document::WordPartLeft(int pos) { if (pos > 0) { --pos; char startChar = cb.CharAt(pos); if (IsWordPartSeparator(startChar)) { while (pos > 0 && IsWordPartSeparator(cb.CharAt(pos))) { --pos; } } if (pos > 0) { startChar = cb.CharAt(pos); --pos; if (IsLowerCase(startChar)) { while (pos > 0 && IsLowerCase(cb.CharAt(pos))) --pos; if (!IsUpperCase(cb.CharAt(pos)) && !IsLowerCase(cb.CharAt(pos))) ++pos; } else if (IsUpperCase(startChar)) { while (pos > 0 && IsUpperCase(cb.CharAt(pos))) --pos; if (!IsUpperCase(cb.CharAt(pos))) ++pos; } else if (IsADigit(startChar)) { while (pos > 0 && IsADigit(cb.CharAt(pos))) --pos; if (!IsADigit(cb.CharAt(pos))) ++pos; } else if (IsPunctuation(startChar)) { while (pos > 0 && IsPunctuation(cb.CharAt(pos))) --pos; if (!IsPunctuation(cb.CharAt(pos))) ++pos; } else if (isspacechar(startChar)) { while (pos > 0 && isspacechar(cb.CharAt(pos))) --pos; if (!isspacechar(cb.CharAt(pos))) ++pos; } else if (!isascii(startChar)) { while (pos > 0 && !isascii(cb.CharAt(pos))) --pos; if (isascii(cb.CharAt(pos))) ++pos; } else { ++pos; } } } return pos; } int Document::WordPartRight(int pos) { char startChar = cb.CharAt(pos); int length = Length(); if (IsWordPartSeparator(startChar)) { while (pos < length && IsWordPartSeparator(cb.CharAt(pos))) ++pos; startChar = cb.CharAt(pos); } if (!isascii(startChar)) { while (pos < length && !isascii(cb.CharAt(pos))) ++pos; } else if (IsLowerCase(startChar)) { while (pos < length && IsLowerCase(cb.CharAt(pos))) ++pos; } else if (IsUpperCase(startChar)) { if (IsLowerCase(cb.CharAt(pos + 1))) { ++pos; while (pos < length && IsLowerCase(cb.CharAt(pos))) ++pos; } else { while (pos < length && IsUpperCase(cb.CharAt(pos))) ++pos; } if (IsLowerCase(cb.CharAt(pos)) && IsUpperCase(cb.CharAt(pos - 1))) --pos; } else if (IsADigit(startChar)) { while (pos < length && IsADigit(cb.CharAt(pos))) ++pos; } else if (IsPunctuation(startChar)) { while (pos < length && IsPunctuation(cb.CharAt(pos))) ++pos; } else if (isspacechar(startChar)) { while (pos < length && isspacechar(cb.CharAt(pos))) ++pos; } else { ++pos; } return pos; } bool IsLineEndChar(char c) { return (c == '\n' || c == '\r'); } int Document::ExtendStyleRange(int pos, int delta, bool singleLine) { int sStart = cb.StyleAt(pos); if (delta < 0) { while (pos > 0 && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos))) ) pos--; pos++; } else { while (pos < (Length()) && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos))) ) pos++; } return pos; } usr/src/sdlBasic/src/sdlBasic/scintilla/src/RESearch.cxx0000777000076500007660000005121410463136044020414 0ustar // Scintilla source code edit control /** @file RESearch.cxx ** Regular expression search library. **/ /* * regex - Regular expression pattern matching and replacement * * By: Ozan S. Yigit (oz) * Dept. of Computer Science * York University * * Original code available from http://www.cs.yorku.ca/~oz/ * Translation to C++ by Neil Hodgson neilh@scintilla.org * Removed all use of register. * Converted to modern function prototypes. * Put all global/static variables into an object so this code can be * used from multiple threads etc. * * These routines are the PUBLIC DOMAIN equivalents of regex * routines as found in 4.nBSD UN*X, with minor extensions. * * These routines are derived from various implementations found * in software tools books, and Conroy's grep. They are NOT derived * from licensed/restricted software. * For more interesting/academic/complicated implementations, * see Henry Spencer's regexp routines, or GNU Emacs pattern * matching module. * * Modification history removed. * * Interfaces: * RESearch::Compile: compile a regular expression into a NFA. * * char *RESearch::Compile(s) * char *s; * * RESearch::Execute: execute the NFA to match a pattern. * * int RESearch::Execute(s) * char *s; * * RESearch::ModifyWord change RESearch::Execute's understanding of what a "word" * looks like (for \< and \>) by adding into the * hidden word-syntax table. * * void RESearch::ModifyWord(s) * char *s; * * RESearch::Substitute: substitute the matched portions in a new string. * * int RESearch::Substitute(src, dst) * char *src; * char *dst; * * re_fail: failure routine for RESearch::Execute. * * void re_fail(msg, op) * char *msg; * char op; * * Regular Expressions: * * [1] char matches itself, unless it is a special * character (metachar): . \ [ ] * + ^ $ * * [2] . matches any character. * * [3] \ matches the character following it, except * when followed by a left or right round bracket, * a digit 1 to 9 or a left or right angle bracket. * (see [7], [8] and [9]) * It is used as an escape character for all * other meta-characters, and itself. When used * in a set ([4]), it is treated as an ordinary * character. * * [4] [set] matches one of the characters in the set. * If the first character in the set is "^", * it matches a character NOT in the set, i.e. * complements the set. A shorthand S-E is * used to specify a set of characters S upto * E, inclusive. The special characters "]" and * "-" have no special meaning if they appear * as the first chars in the set. * examples: match: * * [a-z] any lowercase alpha * * [^]-] any char except ] and - * * [^A-Z] any char except uppercase * alpha * * [a-zA-Z] any alpha * * [5] * any regular expression form [1] to [4], followed by * closure char (*) matches zero or more matches of * that form. * * [6] + same as [5], except it matches one or more. * * [7] a regular expression in the form [1] to [10], enclosed * as \(form\) matches what form matches. The enclosure * creates a set of tags, used for [8] and for * pattern substution. The tagged forms are numbered * starting from 1. * * [8] a \ followed by a digit 1 to 9 matches whatever a * previously tagged regular expression ([7]) matched. * * [9] \< a regular expression starting with a \< construct * \> and/or ending with a \> construct, restricts the * pattern matching to the beginning of a word, and/or * the end of a word. A word is defined to be a character * string beginning and/or ending with the characters * A-Z a-z 0-9 and _. It must also be preceded and/or * followed by any character outside those mentioned. * * [10] a composite regular expression xy where x and y * are in the form [1] to [10] matches the longest * match of x followed by a match for y. * * [11] ^ a regular expression starting with a ^ character * $ and/or ending with a $ character, restricts the * pattern matching to the beginning of the line, * or the end of line. [anchors] Elsewhere in the * pattern, ^ and $ are treated as ordinary characters. * * * Acknowledgements: * * HCR's Hugh Redelmeier has been most helpful in various * stages of development. He convinced me to include BOW * and EOW constructs, originally invented by Rob Pike at * the University of Toronto. * * References: * Software tools Kernighan & Plauger * Software tools in Pascal Kernighan & Plauger * Grep [rsx-11 C dist] David Conroy * ed - text editor Un*x Programmer's Manual * Advanced editing on Un*x B. W. Kernighan * RegExp routines Henry Spencer * * Notes: * * This implementation uses a bit-set representation for character * classes for speed and compactness. Each character is represented * by one bit in a 128-bit block. Thus, CCL always takes a * constant 16 bytes in the internal nfa, and RESearch::Execute does a single * bit comparison to locate the character in the set. * * Examples: * * pattern: foo*.* * compile: CHR f CHR o CLO CHR o END CLO ANY END END * matches: fo foo fooo foobar fobar foxx ... * * pattern: fo[ob]a[rz] * compile: CHR f CHR o CCL bitset CHR a CCL bitset END * matches: fobar fooar fobaz fooaz * * pattern: foo\\+ * compile: CHR f CHR o CHR o CHR \ CLO CHR \ END END * matches: foo\ foo\\ foo\\\ ... * * pattern: \(foo\)[1-3]\1 (same as foo[1-3]foo) * compile: BOT 1 CHR f CHR o CHR o EOT 1 CCL bitset REF 1 END * matches: foo1foo foo2foo foo3foo * * pattern: \(fo.*\)-\1 * compile: BOT 1 CHR f CHR o CLO ANY END EOT 1 CHR - REF 1 END * matches: foo-foo fo-fo fob-fob foobar-foobar ... */ #include "RESearch.h" #define OKP 1 #define NOP 0 #define CHR 1 #define ANY 2 #define CCL 3 #define BOL 4 #define EOL 5 #define BOT 6 #define EOT 7 #define BOW 8 #define EOW 9 #define REF 10 #define CLO 11 #define END 0 /* * The following defines are not meant to be changeable. * They are for readability only. */ #define BLKIND 0370 #define BITIND 07 #define ASCIIB 0177 const char bitarr[] = {1,2,4,8,16,32,64,'\200'}; #define badpat(x) (*nfa = END, x) RESearch::RESearch() { Init(); } RESearch::~RESearch() { Clear(); } void RESearch::Init() { sta = NOP; /* status of lastpat */ bol = 0; for (int i=0; i> 3] |= bitarr[(c) & BITIND]; } void RESearch::ChSetWithCase(char c, bool caseSensitive) { if (caseSensitive) { ChSet(c); } else { if ((c >= 'a') && (c <= 'z')) { ChSet(c); ChSet(static_cast(c - 'a' + 'A')); } else if ((c >= 'A') && (c <= 'Z')) { ChSet(c); ChSet(static_cast(c - 'A' + 'a')); } else { ChSet(c); } } } const char escapeValue(char ch) { switch (ch) { case 'a': return '\a'; case 'b': return '\b'; case 'f': return '\f'; case 'n': return '\n'; case 'r': return '\r'; case 't': return '\t'; case 'v': return '\v'; } return 0; } const char *RESearch::Compile(const char *pat, int length, bool caseSensitive, bool posix) { char *mp=nfa; /* nfa pointer */ char *lp; /* saved pointer.. */ char *sp=nfa; /* another one.. */ char *mpMax = mp + MAXNFA - BITBLK - 10; int tagi = 0; /* tag stack index */ int tagc = 1; /* actual tag count */ int n; char mask; /* xor mask -CCL/NCL */ int c1, c2; if (!pat || !length) if (sta) return 0; else return badpat("No previous regular expression"); sta = NOP; const char *p=pat; /* pattern pointer */ for (int i=0; i mpMax) return badpat("Pattern too long"); lp = mp; switch(*p) { case '.': /* match any char.. */ *mp++ = ANY; break; case '^': /* match beginning.. */ if (p == pat) *mp++ = BOL; else { *mp++ = CHR; *mp++ = *p; } break; case '$': /* match endofline.. */ if (!*(p+1)) *mp++ = EOL; else { *mp++ = CHR; *mp++ = *p; } break; case '[': /* match char class..*/ *mp++ = CCL; i++; if (*++p == '^') { mask = '\377'; i++; p++; } else mask = 0; if (*p == '-') { /* real dash */ i++; ChSet(*p++); } if (*p == ']') { /* real brace */ i++; ChSet(*p++); } while (*p && *p != ']') { if (*p == '-' && *(p+1) && *(p+1) != ']') { i++; p++; c1 = *(p-2) + 1; i++; c2 = *p++; while (c1 <= c2) { ChSetWithCase(static_cast(c1++), caseSensitive); } } else if (*p == '\\' && *(p+1)) { i++; p++; char escape = escapeValue(*p); if (escape) ChSetWithCase(escape, caseSensitive); else ChSetWithCase(*p, caseSensitive); i++; p++; } else { i++; ChSetWithCase(*p++, caseSensitive); } } if (!*p) return badpat("Missing ]"); for (n = 0; n < BITBLK; bittab[n++] = (char) 0) *mp++ = static_cast(mask ^ bittab[n]); break; case '*': /* match 0 or more.. */ case '+': /* match 1 or more.. */ if (p == pat) return badpat("Empty closure"); lp = sp; /* previous opcode */ if (*lp == CLO) /* equivalence.. */ break; switch(*lp) { case BOL: case BOT: case EOT: case BOW: case EOW: case REF: return badpat("Illegal closure"); default: break; } if (*p == '+') for (sp = mp; lp < sp; lp++) *mp++ = *lp; *mp++ = END; *mp++ = END; sp = mp; while (--mp > lp) *mp = mp[-1]; *mp = CLO; mp = sp; break; case '\\': /* tags, backrefs .. */ i++; switch(*++p) { case '<': *mp++ = BOW; break; case '>': if (*sp == BOW) return badpat("Null pattern inside \\<\\>"); *mp++ = EOW; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': n = *p-'0'; if (tagi > 0 && tagstk[tagi] == n) return badpat("Cyclical reference"); if (tagc > n) { *mp++ = static_cast(REF); *mp++ = static_cast(n); } else return badpat("Undetermined reference"); break; case 'a': case 'b': case 'n': case 'f': case 'r': case 't': case 'v': *mp++ = CHR; *mp++ = escapeValue(*p); break; default: if (!posix && *p == '(') { if (tagc < MAXTAG) { tagstk[++tagi] = tagc; *mp++ = BOT; *mp++ = static_cast(tagc++); } else return badpat("Too many \\(\\) pairs"); } else if (!posix && *p == ')') { if (*sp == BOT) return badpat("Null pattern inside \\(\\)"); if (tagi > 0) { *mp++ = static_cast(EOT); *mp++ = static_cast(tagstk[tagi--]); } else return badpat("Unmatched \\)"); } else { *mp++ = CHR; *mp++ = *p; } } break; default : /* an ordinary char */ if (posix && *p == '(') { if (tagc < MAXTAG) { tagstk[++tagi] = tagc; *mp++ = BOT; *mp++ = static_cast(tagc++); } else return badpat("Too many () pairs"); } else if (posix && *p == ')') { if (*sp == BOT) return badpat("Null pattern inside ()"); if (tagi > 0) { *mp++ = static_cast(EOT); *mp++ = static_cast(tagstk[tagi--]); } else return badpat("Unmatched )"); } else if (caseSensitive) { *mp++ = CHR; *mp++ = *p; } else { *mp++ = CCL; mask = 0; ChSetWithCase(*p, false); for (n = 0; n < BITBLK; bittab[n++] = (char) 0) *mp++ = static_cast(mask ^ bittab[n]); } break; } sp = lp; } if (tagi > 0) return badpat((posix ? "Unmatched (" : "Unmatched \\(")); *mp = END; sta = OKP; return 0; } /* * RESearch::Execute: * execute nfa to find a match. * * special cases: (nfa[0]) * BOL * Match only once, starting from the * beginning. * CHR * First locate the character without * calling PMatch, and if found, call * PMatch for the remaining string. * END * RESearch::Compile failed, poor luser did not * check for it. Fail fast. * * If a match is found, bopat[0] and eopat[0] are set * to the beginning and the end of the matched fragment, * respectively. * */ int RESearch::Execute(CharacterIndexer &ci, int lp, int endp) { char c; int ep = NOTFOUND; char *ap = nfa; bol = lp; failure = 0; Clear(); switch(*ap) { case BOL: /* anchored: match from BOL only */ ep = PMatch(ci, lp, endp, ap); break; case EOL: /* just searching for end of line normal path doesn't work */ if (*(ap+1) == END) { lp = endp; ep = lp; break; } else { return 0; } case CHR: /* ordinary char: locate it fast */ c = *(ap+1); while ((lp < endp) && (ci.CharAt(lp) != c)) lp++; if (lp >= endp) /* if EOS, fail, else fall thru. */ return 0; default: /* regular matching all the way. */ while (lp < endp) { ep = PMatch(ci, lp, endp, ap); if (ep != NOTFOUND) break; lp++; } break; case END: /* munged automaton. fail always */ return 0; } if (ep == NOTFOUND) return 0; bopat[0] = lp; eopat[0] = ep; return 1; } /* * PMatch: internal routine for the hard part * * This code is partly snarfed from an early grep written by * David Conroy. The backref and tag stuff, and various other * innovations are by oz. * * special case optimizations: (nfa[n], nfa[n+1]) * CLO ANY * We KNOW .* will match everything upto the * end of line. Thus, directly go to the end of * line, without recursive PMatch calls. As in * the other closure cases, the remaining pattern * must be matched by moving backwards on the * string recursively, to find a match for xy * (x is ".*" and y is the remaining pattern) * where the match satisfies the LONGEST match for * x followed by a match for y. * CLO CHR * We can again scan the string forward for the * single char and at the point of failure, we * execute the remaining nfa recursively, same as * above. * * At the end of a successful match, bopat[n] and eopat[n] * are set to the beginning and end of subpatterns matched * by tagged expressions (n = 1 to 9). * */ extern void re_fail(char *,char); /* * character classification table for word boundary operators BOW * and EOW. the reason for not using ctype macros is that we can * let the user add into our own table. see RESearch::ModifyWord. This table * is not in the bitset form, since we may wish to extend it in the * future for other character classifications. * * TRUE for 0-9 A-Z a-z _ */ static char chrtyp[MAXCHR] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; #define inascii(x) (0177&(x)) #define iswordc(x) chrtyp[inascii(x)] #define isinset(x,y) ((x)[((y)&BLKIND)>>3] & bitarr[(y)&BITIND]) /* * skip values for CLO XXX to skip past the closure */ #define ANYSKIP 2 /* [CLO] ANY END ... */ #define CHRSKIP 3 /* [CLO] CHR chr END ... */ #define CCLSKIP 34 /* [CLO] CCL 32bytes END ... */ int RESearch::PMatch(CharacterIndexer &ci, int lp, int endp, char *ap) { int op, c, n; int e; /* extra pointer for CLO */ int bp; /* beginning of subpat.. */ int ep; /* ending of subpat.. */ int are; /* to save the line ptr. */ while ((op = *ap++) != END) switch(op) { case CHR: if (ci.CharAt(lp++) != *ap++) return NOTFOUND; break; case ANY: if (lp++ >= endp) return NOTFOUND; break; case CCL: c = ci.CharAt(lp++); if (!isinset(ap,c)) return NOTFOUND; ap += BITBLK; break; case BOL: if (lp != bol) return NOTFOUND; break; case EOL: if (lp < endp) return NOTFOUND; break; case BOT: bopat[*ap++] = lp; break; case EOT: eopat[*ap++] = lp; break; case BOW: if (lp!=bol && iswordc(ci.CharAt(lp-1)) || !iswordc(ci.CharAt(lp))) return NOTFOUND; break; case EOW: if (lp==bol || !iswordc(ci.CharAt(lp-1)) || iswordc(ci.CharAt(lp))) return NOTFOUND; break; case REF: n = *ap++; bp = bopat[n]; ep = eopat[n]; while (bp < ep) if (ci.CharAt(bp++) != ci.CharAt(lp++)) return NOTFOUND; break; case CLO: are = lp; switch(*ap) { case ANY: while (lp < endp) lp++; n = ANYSKIP; break; case CHR: c = *(ap+1); while ((lp < endp) && (c == ci.CharAt(lp))) lp++; n = CHRSKIP; break; case CCL: while ((lp < endp) && isinset(ap+1,ci.CharAt(lp))) lp++; n = CCLSKIP; break; default: failure = true; //re_fail("closure: bad nfa.", *ap); return NOTFOUND; } ap += n; while (lp >= are) { if ((e = PMatch(ci, lp, endp, ap)) != NOTFOUND) return e; --lp; } return NOTFOUND; default: //re_fail("RESearch::Execute: bad nfa.", static_cast(op)); return NOTFOUND; } return lp; } /* * RESearch::ModifyWord: * add new characters into the word table to change RESearch::Execute's * understanding of what a word should look like. Note that we * only accept additions into the word definition. * * If the string parameter is 0 or null string, the table is * reset back to the default containing A-Z a-z 0-9 _. [We use * the compact bitset representation for the default table] */ static char deftab[16] = { 0, 0, 0, 0, 0, 0, '\377', 003, '\376', '\377', '\377', '\207', '\376', '\377', '\377', 007 }; void RESearch::ModifyWord(char *s) { int i; if (!s || !*s) { for (i = 0; i < MAXCHR; i++) if (!isinset(deftab,i)) iswordc(i) = 0; } else while(*s) iswordc(*s++) = 1; } /* * RESearch::Substitute: * substitute the matched portions of the src in dst. * * & substitute the entire matched pattern. * * \digit substitute a subpattern, with the given tag number. * Tags are numbered from 1 to 9. If the particular * tagged subpattern does not exist, null is substituted. */ int RESearch::Substitute(CharacterIndexer &ci, char *src, char *dst) { char c; int pin; int bp; int ep; if (!*src || !bopat[0]) return 0; while ((c = *src++) != 0) { switch(c) { case '&': pin = 0; break; case '\\': c = *src++; if (c >= '0' && c <= '9') { pin = c - '0'; break; } default: *dst++ = c; continue; } if ((bp = bopat[pin]) != 0 && (ep = eopat[pin]) != 0) { while (ci.CharAt(bp) && bp < ep) *dst++ = ci.CharAt(bp++); if (bp < ep) return 0; } } *dst = (char) 0; return 1; } usr/src/sdlBasic/src/sdlBasic/scintilla/src/Style.cxx0000777000076500007660000001057010463136100020051 0ustar // Scintilla source code edit control /** @file Style.cxx ** Defines the font and colour style for a class of text. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include "Platform.h" #include "Scintilla.h" #include "Style.h" Style::Style() { aliasOfDefaultFont = true; Clear(ColourDesired(0, 0, 0), ColourDesired(0xff, 0xff, 0xff), Platform::DefaultFontSize(), 0, SC_CHARSET_DEFAULT, false, false, false, false, caseMixed, true, true, false); } Style::Style(const Style &source) { Clear(ColourDesired(0, 0, 0), ColourDesired(0xff, 0xff, 0xff), 0, 0, 0, false, false, false, false, caseMixed, true, true, false); fore.desired = source.fore.desired; back.desired = source.back.desired; characterSet = source.characterSet; bold = source.bold; italic = source.italic; size = source.size; eolFilled = source.eolFilled; underline = source.underline; caseForce = source.caseForce; visible = source.visible; changeable = source.changeable; hotspot = source.hotspot; } Style::~Style() { if (aliasOfDefaultFont) font.SetID(0); else font.Release(); aliasOfDefaultFont = false; } Style &Style::operator=(const Style &source) { if (this == &source) return * this; Clear(ColourDesired(0, 0, 0), ColourDesired(0xff, 0xff, 0xff), 0, 0, SC_CHARSET_DEFAULT, false, false, false, false, caseMixed, true, true, false); fore.desired = source.fore.desired; back.desired = source.back.desired; characterSet = source.characterSet; bold = source.bold; italic = source.italic; size = source.size; eolFilled = source.eolFilled; underline = source.underline; caseForce = source.caseForce; visible = source.visible; changeable = source.changeable; return *this; } void Style::Clear(ColourDesired fore_, ColourDesired back_, int size_, const char *fontName_, int characterSet_, bool bold_, bool italic_, bool eolFilled_, bool underline_, ecaseForced caseForce_, bool visible_, bool changeable_, bool hotspot_) { fore.desired = fore_; back.desired = back_; characterSet = characterSet_; bold = bold_; italic = italic_; size = size_; fontName = fontName_; eolFilled = eolFilled_; underline = underline_; caseForce = caseForce_; visible = visible_; changeable = changeable_; hotspot = hotspot_; if (aliasOfDefaultFont) font.SetID(0); else font.Release(); aliasOfDefaultFont = false; } void Style::ClearTo(const Style &source) { Clear( source.fore.desired, source.back.desired, source.size, source.fontName, source.characterSet, source.bold, source.italic, source.eolFilled, source.underline, source.caseForce, source.visible, source.changeable, source.hotspot); } bool Style::EquivalentFontTo(const Style *other) const { if (bold != other->bold || italic != other->italic || size != other->size || characterSet != other->characterSet) return false; if (fontName == other->fontName) return true; if (!fontName) return false; if (!other->fontName) return false; return strcmp(fontName, other->fontName) == 0; } void Style::Realise(Surface &surface, int zoomLevel, Style *defaultStyle, bool extraFontFlag) { sizeZoomed = size + zoomLevel; if (sizeZoomed <= 2) // Hangs if sizeZoomed <= 1 sizeZoomed = 2; if (aliasOfDefaultFont) font.SetID(0); else font.Release(); int deviceHeight = surface.DeviceHeightFont(sizeZoomed); aliasOfDefaultFont = defaultStyle && (EquivalentFontTo(defaultStyle) || !fontName); if (aliasOfDefaultFont) { font.SetID(defaultStyle->font.GetID()); } else if (fontName) { font.Create(fontName, characterSet, deviceHeight, bold, italic, extraFontFlag); } else { font.SetID(0); } ascent = surface.Ascent(font); descent = surface.Descent(font); // Probably more typographically correct to include leading // but that means more complex drawing as leading must be erased //lineHeight = surface.ExternalLeading() + surface.Height(); externalLeading = surface.ExternalLeading(font); lineHeight = surface.Height(font); aveCharWidth = surface.AverageCharWidth(font); spaceWidth = surface.WidthChar(font, ' '); } usr/src/sdlBasic/src/sdlBasic/scintilla/src/Indicator.h0000777000076500007660000000106710463135664020331 0ustar // Scintilla source code edit control /** @file Indicator.h ** Defines the style of indicators which are text decorations such as underlining. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef INDICATOR_H #define INDICATOR_H /** */ class Indicator { public: int style; ColourPair fore; Indicator() : style(INDIC_PLAIN), fore(ColourDesired(0,0,0)) { } void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine); }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/SciTE.properties0000777000076500007660000000050710463136044021320 0ustar # SciTE.properties is the per directory local options file and can be used to override # settings made in SciTEGlobal.properties command.build.directory.*.cxx=..\win32 command.build.directory.*.h=..\win32 command.build.*.cxx=nmake -f scintilla.mak QUIET=1 DEBUG=1 command.build.*.h=nmake -f scintilla.mak QUIET=1 DEBUG=1 usr/src/sdlBasic/src/sdlBasic/scintilla/src/ScintillaBase.cxx0000777000076500007660000004302010463136044021471 0ustar // Scintilla source code edit control /** @file ScintillaBase.cxx ** An enhanced subclass of Editor with calltips, autocomplete and context menu. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "PropSet.h" #ifdef SCI_LEXER #include "SciLexer.h" #include "Accessor.h" #include "DocumentAccessor.h" #include "KeyWords.h" #endif #include "ContractionState.h" #include "SVector.h" #include "CellBuffer.h" #include "CallTip.h" #include "KeyMap.h" #include "Indicator.h" #include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "ViewStyle.h" #include "AutoComplete.h" #include "Document.h" #include "Editor.h" #include "ScintillaBase.h" ScintillaBase::ScintillaBase() { displayPopupMenu = true; listType = 0; maxListWidth = 0; #ifdef SCI_LEXER lexLanguage = SCLEX_CONTAINER; lexCurrent = 0; for (int wl = 0;wl < numWordLists;wl++) keyWordLists[wl] = new WordList; keyWordLists[numWordLists] = 0; #endif } ScintillaBase::~ScintillaBase() { #ifdef SCI_LEXER for (int wl = 0;wl < numWordLists;wl++) delete keyWordLists[wl]; #endif } void ScintillaBase::Finalise() { Editor::Finalise(); popup.Destroy(); } void ScintillaBase::RefreshColourPalette(Palette &pal, bool want) { Editor::RefreshColourPalette(pal, want); ct.RefreshColourPalette(pal, want); } void ScintillaBase::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { bool isFillUp = ac.Active() && ac.IsFillUpChar(*s); if (!isFillUp) { Editor::AddCharUTF(s, len, treatAsDBCS); } if (ac.Active()) { AutoCompleteCharacterAdded(s[0]); // For fill ups add the character after the autocompletion has // triggered so containers see the key so can display a calltip. if (isFillUp) { Editor::AddCharUTF(s, len, treatAsDBCS); } } } void ScintillaBase::Command(int cmdId) { switch (cmdId) { case idAutoComplete: // Nothing to do break; case idCallTip: // Nothing to do break; case idcmdUndo: WndProc(SCI_UNDO, 0, 0); break; case idcmdRedo: WndProc(SCI_REDO, 0, 0); break; case idcmdCut: WndProc(SCI_CUT, 0, 0); break; case idcmdCopy: WndProc(SCI_COPY, 0, 0); break; case idcmdPaste: WndProc(SCI_PASTE, 0, 0); break; case idcmdDelete: WndProc(SCI_CLEAR, 0, 0); break; case idcmdSelectAll: WndProc(SCI_SELECTALL, 0, 0); break; } } int ScintillaBase::KeyCommand(unsigned int iMessage) { // Most key commands cancel autocompletion mode if (ac.Active()) { switch (iMessage) { // Except for these case SCI_LINEDOWN: AutoCompleteMove(1); return 0; case SCI_LINEUP: AutoCompleteMove( -1); return 0; case SCI_PAGEDOWN: AutoCompleteMove(5); return 0; case SCI_PAGEUP: AutoCompleteMove( -5); return 0; case SCI_VCHOME: AutoCompleteMove( -5000); return 0; case SCI_LINEEND: AutoCompleteMove(5000); return 0; case SCI_DELETEBACK: DelCharBack(true); AutoCompleteCharacterDeleted(); EnsureCaretVisible(); return 0; case SCI_DELETEBACKNOTLINE: DelCharBack(false); AutoCompleteCharacterDeleted(); EnsureCaretVisible(); return 0; case SCI_TAB: AutoCompleteCompleted(); return 0; case SCI_NEWLINE: AutoCompleteCompleted(); return 0; default: ac.Cancel(); } } if (ct.inCallTipMode) { if ( (iMessage != SCI_CHARLEFT) && (iMessage != SCI_CHARLEFTEXTEND) && (iMessage != SCI_CHARRIGHT) && (iMessage != SCI_CHARLEFTEXTEND) && (iMessage != SCI_EDITTOGGLEOVERTYPE) && (iMessage != SCI_DELETEBACK) && (iMessage != SCI_DELETEBACKNOTLINE) ) { ct.CallTipCancel(); } if ((iMessage == SCI_DELETEBACK) || (iMessage == SCI_DELETEBACKNOTLINE)) { if (currentPos <= ct.posStartCallTip) { ct.CallTipCancel(); } } } return Editor::KeyCommand(iMessage); } void ScintillaBase::AutoCompleteDoubleClick(void* p) { ScintillaBase* sci = reinterpret_cast(p); sci->AutoCompleteCompleted(); } void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { //Platform::DebugPrintf("AutoComplete %s\n", list); ct.CallTipCancel(); if (ac.chooseSingle && (listType == 0)) { if (list && !strchr(list, ac.GetSeparator())) { const char *typeSep = strchr(list, ac.GetTypesep()); size_t lenInsert = (typeSep) ? (typeSep-list) : strlen(list); if (ac.ignoreCase) { SetEmptySelection(currentPos - lenEntered); pdoc->DeleteChars(currentPos, lenEntered); SetEmptySelection(currentPos); pdoc->InsertString(currentPos, list, lenInsert); SetEmptySelection(currentPos + lenInsert); } else { SetEmptySelection(currentPos); pdoc->InsertString(currentPos, list + lenEntered, lenInsert - lenEntered); SetEmptySelection(currentPos + lenInsert - lenEntered); } return; } } ac.Start(wMain, idAutoComplete, currentPos, LocationFromPosition(currentPos), lenEntered, vs.lineHeight, IsUnicodeMode()); PRectangle rcClient = GetClientRectangle(); Point pt = LocationFromPosition(currentPos - lenEntered); int heightLB = 100; int widthLB = 100; if (pt.x >= rcClient.right - widthLB) { HorizontalScrollTo(xOffset + pt.x - rcClient.right + widthLB); Redraw(); pt = LocationFromPosition(currentPos); } PRectangle rcac; rcac.left = pt.x - ac.lb->CaretFromEdge(); if (pt.y >= rcClient.bottom - heightLB && // Wont fit below. pt.y >= (rcClient.bottom + rcClient.top) / 2) { // and there is more room above. rcac.top = pt.y - heightLB; if (rcac.top < 0) { heightLB += rcac.top; rcac.top = 0; } } else { rcac.top = pt.y + vs.lineHeight; } rcac.right = rcac.left + widthLB; rcac.bottom = Platform::Minimum(rcac.top + heightLB, rcClient.bottom); ac.lb->SetPositionRelative(rcac, wMain); ac.lb->SetFont(vs.styles[STYLE_DEFAULT].font); unsigned int aveCharWidth = vs.styles[STYLE_DEFAULT].aveCharWidth; ac.lb->SetAverageCharWidth(aveCharWidth); ac.lb->SetDoubleClickAction(AutoCompleteDoubleClick, this); ac.SetList(list); // Fiddle the position of the list so it is right next to the target and wide enough for all its strings PRectangle rcList = ac.lb->GetDesiredRect(); int heightAlloced = rcList.bottom - rcList.top; widthLB = Platform::Maximum(widthLB, rcList.right - rcList.left); if (maxListWidth != 0) widthLB = Platform::Minimum(widthLB, aveCharWidth*maxListWidth); // Make an allowance for large strings in list rcList.left = pt.x - ac.lb->CaretFromEdge(); rcList.right = rcList.left + widthLB; if (((pt.y + vs.lineHeight) >= (rcClient.bottom - heightAlloced)) && // Wont fit below. ((pt.y + vs.lineHeight / 2) >= (rcClient.bottom + rcClient.top) / 2)) { // and there is more room above. rcList.top = pt.y - heightAlloced; } else { rcList.top = pt.y + vs.lineHeight; } rcList.bottom = rcList.top + heightAlloced; ac.lb->SetPositionRelative(rcList, wMain); ac.Show(true); if (lenEntered != 0) { AutoCompleteMoveToCurrentWord(); } } void ScintillaBase::AutoCompleteCancel() { ac.Cancel(); } void ScintillaBase::AutoCompleteMove(int delta) { ac.Move(delta); } void ScintillaBase::AutoCompleteMoveToCurrentWord() { char wordCurrent[1000]; int i; int startWord = ac.posStart - ac.startLen; for (i = startWord; i < currentPos && i - startWord < 1000; i++) wordCurrent[i - startWord] = pdoc->CharAt(i); wordCurrent[Platform::Minimum(i - startWord, 999)] = '\0'; ac.Select(wordCurrent); } void ScintillaBase::AutoCompleteCharacterAdded(char ch) { if (ac.IsFillUpChar(ch)) { AutoCompleteCompleted(); } else if (ac.IsStopChar(ch)) { ac.Cancel(); } else { AutoCompleteMoveToCurrentWord(); } } void ScintillaBase::AutoCompleteCharacterDeleted() { if (currentPos < ac.posStart - ac.startLen) { ac.Cancel(); } else if (ac.cancelAtStartPos && (currentPos <= ac.posStart)) { ac.Cancel(); } else { AutoCompleteMoveToCurrentWord(); } } void ScintillaBase::AutoCompleteCompleted() { int item = ac.lb->GetSelection(); char selected[1000]; selected[0] = '\0'; if (item != -1) { ac.lb->GetValue(item, selected, sizeof(selected)); } else { ac.Cancel(); return; } ac.Show(false); listSelected = selected; SCNotification scn = {0}; scn.nmhdr.code = listType > 0 ? SCN_USERLISTSELECTION : SCN_AUTOCSELECTION; scn.message = 0; scn.wParam = listType; scn.listType = listType; Position firstPos = ac.posStart - ac.startLen; scn.lParam = firstPos; scn.text = listSelected.c_str(); NotifyParent(scn); if (!ac.Active()) return; ac.Cancel(); if (listType > 0) return; Position endPos = currentPos; if (ac.dropRestOfWord) endPos = pdoc->ExtendWordSelect(endPos, 1, true); if (endPos < firstPos) return; pdoc->BeginUndoAction(); if (endPos != firstPos) { pdoc->DeleteChars(firstPos, endPos - firstPos); } SetEmptySelection(ac.posStart); if (item != -1) { SString piece = selected; pdoc->InsertString(firstPos, piece.c_str()); SetEmptySelection(firstPos + static_cast(piece.length())); } pdoc->EndUndoAction(); } int ScintillaBase::AutoCompleteGetCurrent() { return ac.lb->GetSelection(); } void ScintillaBase::CallTipShow(Point pt, const char *defn) { AutoCompleteCancel(); pt.y += vs.lineHeight; PRectangle rc = ct.CallTipStart(currentPos, pt, defn, vs.styles[STYLE_DEFAULT].fontName, vs.styles[STYLE_DEFAULT].sizeZoomed, CodePage(), vs.styles[STYLE_DEFAULT].characterSet, wMain); // If the call-tip window would be out of the client // space, adjust so it displays above the text. PRectangle rcClient = GetClientRectangle(); if (rc.bottom > rcClient.bottom) { int offset = vs.lineHeight + rc.Height(); rc.top -= offset; rc.bottom -= offset; } // Now display the window. CreateCallTipWindow(rc); ct.wCallTip.SetPositionRelative(rc, wMain); ct.wCallTip.Show(); } void ScintillaBase::CallTipClick() { SCNotification scn = {0}; scn.nmhdr.code = SCN_CALLTIPCLICK; scn.position = ct.clickPlace; NotifyParent(scn); } void ScintillaBase::ContextMenu(Point pt) { if (displayPopupMenu) { bool writable = !WndProc(SCI_GETREADONLY, 0, 0); popup.CreatePopUp(); AddToPopUp("Undo", idcmdUndo, writable && pdoc->CanUndo()); AddToPopUp("Redo", idcmdRedo, writable && pdoc->CanRedo()); AddToPopUp(""); AddToPopUp("Cut", idcmdCut, writable && currentPos != anchor); AddToPopUp("Copy", idcmdCopy, currentPos != anchor); AddToPopUp("Paste", idcmdPaste, writable && WndProc(SCI_CANPASTE, 0, 0)); AddToPopUp("Delete", idcmdDelete, writable && currentPos != anchor); AddToPopUp(""); AddToPopUp("Select All", idcmdSelectAll); popup.Show(pt, wMain); } } void ScintillaBase::CancelModes() { AutoCompleteCancel(); ct.CallTipCancel(); Editor::CancelModes(); } void ScintillaBase::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) { CancelModes(); Editor::ButtonDown(pt, curTime, shift, ctrl, alt); } #ifdef SCI_LEXER void ScintillaBase::SetLexer(uptr_t wParam) { lexLanguage = wParam; lexCurrent = LexerModule::Find(lexLanguage); if (!lexCurrent) lexCurrent = LexerModule::Find(SCLEX_NULL); } void ScintillaBase::SetLexerLanguage(const char *languageName) { lexLanguage = SCLEX_CONTAINER; lexCurrent = LexerModule::Find(languageName); if (!lexCurrent) lexCurrent = LexerModule::Find(SCLEX_NULL); if (lexCurrent) lexLanguage = lexCurrent->GetLanguage(); } void ScintillaBase::Colourise(int start, int end) { int lengthDoc = pdoc->Length(); if (end == -1) end = lengthDoc; int len = end - start; PLATFORM_ASSERT(len >= 0); PLATFORM_ASSERT(start + len <= lengthDoc); //WindowAccessor styler(wMain.GetID(), props); DocumentAccessor styler(pdoc, props, wMain.GetID()); int styleStart = 0; if (start > 0) styleStart = styler.StyleAt(start - 1); styler.SetCodePage(pdoc->dbcsCodePage); if (lexCurrent && (len > 0)) { // Should always succeed as null lexer should always be available lexCurrent->Lex(start, len, styleStart, keyWordLists, styler); styler.Flush(); if (styler.GetPropertyInt("fold")) { lexCurrent->Fold(start, len, styleStart, keyWordLists, styler); styler.Flush(); } } } #endif void ScintillaBase::NotifyStyleToNeeded(int endStyleNeeded) { #ifdef SCI_LEXER if (lexLanguage != SCLEX_CONTAINER) { int endStyled = WndProc(SCI_GETENDSTYLED, 0, 0); int lineEndStyled = WndProc(SCI_LINEFROMPOSITION, endStyled, 0); endStyled = WndProc(SCI_POSITIONFROMLINE, lineEndStyled, 0); Colourise(endStyled, endStyleNeeded); return; } #endif Editor::NotifyStyleToNeeded(endStyleNeeded); } sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { switch (iMessage) { case SCI_AUTOCSHOW: listType = 0; AutoCompleteStart(wParam, reinterpret_cast(lParam)); break; case SCI_AUTOCCANCEL: AutoCompleteCancel(); break; case SCI_AUTOCACTIVE: return ac.Active(); case SCI_AUTOCPOSSTART: return ac.posStart; case SCI_AUTOCCOMPLETE: AutoCompleteCompleted(); break; case SCI_AUTOCSETSEPARATOR: ac.SetSeparator(static_cast(wParam)); break; case SCI_AUTOCGETSEPARATOR: return ac.GetSeparator(); case SCI_AUTOCSTOPS: ac.SetStopChars(reinterpret_cast(lParam)); break; case SCI_AUTOCSELECT: ac.Select(reinterpret_cast(lParam)); break; case SCI_AUTOCGETCURRENT: return AutoCompleteGetCurrent(); case SCI_AUTOCSETCANCELATSTART: ac.cancelAtStartPos = wParam != 0; break; case SCI_AUTOCGETCANCELATSTART: return ac.cancelAtStartPos; case SCI_AUTOCSETFILLUPS: ac.SetFillUpChars(reinterpret_cast(lParam)); break; case SCI_AUTOCSETCHOOSESINGLE: ac.chooseSingle = wParam != 0; break; case SCI_AUTOCGETCHOOSESINGLE: return ac.chooseSingle; case SCI_AUTOCSETIGNORECASE: ac.ignoreCase = wParam != 0; break; case SCI_AUTOCGETIGNORECASE: return ac.ignoreCase; case SCI_USERLISTSHOW: listType = wParam; AutoCompleteStart(0, reinterpret_cast(lParam)); break; case SCI_AUTOCSETAUTOHIDE: ac.autoHide = wParam != 0; break; case SCI_AUTOCGETAUTOHIDE: return ac.autoHide; case SCI_AUTOCSETDROPRESTOFWORD: ac.dropRestOfWord = wParam != 0; break; case SCI_AUTOCGETDROPRESTOFWORD: return ac.dropRestOfWord; case SCI_AUTOCSETMAXHEIGHT: ac.lb->SetVisibleRows(wParam); break; case SCI_AUTOCGETMAXHEIGHT: return ac.lb->GetVisibleRows(); case SCI_AUTOCSETMAXWIDTH: maxListWidth = wParam; break; case SCI_AUTOCGETMAXWIDTH: return maxListWidth; case SCI_REGISTERIMAGE: ac.lb->RegisterImage(wParam, reinterpret_cast(lParam)); break; case SCI_CLEARREGISTEREDIMAGES: ac.lb->ClearRegisteredImages(); break; case SCI_AUTOCSETTYPESEPARATOR: ac.SetTypesep(static_cast(wParam)); break; case SCI_AUTOCGETTYPESEPARATOR: return ac.GetTypesep(); case SCI_CALLTIPSHOW: CallTipShow(LocationFromPosition(wParam), reinterpret_cast(lParam)); break; case SCI_CALLTIPCANCEL: ct.CallTipCancel(); break; case SCI_CALLTIPACTIVE: return ct.inCallTipMode; case SCI_CALLTIPPOSSTART: return ct.posStartCallTip; case SCI_CALLTIPSETHLT: ct.SetHighlight(wParam, lParam); break; case SCI_CALLTIPSETBACK: ct.colourBG = ColourDesired(wParam); InvalidateStyleRedraw(); break; case SCI_CALLTIPSETFORE: ct.colourUnSel = ColourDesired(wParam); InvalidateStyleRedraw(); break; case SCI_CALLTIPSETFOREHLT: ct.colourSel = ColourDesired(wParam); InvalidateStyleRedraw(); break; case SCI_USEPOPUP: displayPopupMenu = wParam != 0; break; #ifdef SCI_LEXER case SCI_SETLEXER: SetLexer(wParam); lexLanguage = wParam; break; case SCI_GETLEXER: return lexLanguage; case SCI_COLOURISE: if (lexLanguage == SCLEX_CONTAINER) { pdoc->ModifiedAt(wParam); NotifyStyleToNeeded((lParam == -1) ? pdoc->Length() : lParam); } else { Colourise(wParam, lParam); } Redraw(); break; case SCI_SETPROPERTY: props.Set(reinterpret_cast(wParam), reinterpret_cast(lParam)); break; case SCI_GETPROPERTY: { SString val = props.Get(reinterpret_cast(wParam)); const int n = val.length(); if (lParam != 0) { char *ptr = reinterpret_cast(lParam); memcpy(ptr, val.c_str(), n); ptr[n] = '\0'; // terminate } return n; // Not including NUL } case SCI_GETPROPERTYEXPANDED: { SString val = props.GetExpanded(reinterpret_cast(wParam)); const int n = val.length(); if (lParam != 0) { char *ptr = reinterpret_cast(lParam); memcpy(ptr, val.c_str(), n); ptr[n] = '\0'; // terminate } return n; // Not including NUL } case SCI_GETPROPERTYINT: return props.GetInt(reinterpret_cast(wParam), lParam); case SCI_SETKEYWORDS: if (wParam < numWordLists) { keyWordLists[wParam]->Clear(); keyWordLists[wParam]->Set(reinterpret_cast(lParam)); } break; case SCI_SETLEXERLANGUAGE: SetLexerLanguage(reinterpret_cast(lParam)); break; #endif default: return Editor::WndProc(iMessage, wParam, lParam); } return 0l; } usr/src/sdlBasic/src/sdlBasic/scintilla/src/LexSDLB.cxx0000777000076500007660000001515010463136151020153 0ustar // Scintilla source code edit control /** @file LexSDLB.cxx ** Lexer for sdlBasic **/ // based upon LexVB modified by zoiba // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include "Platform.h" #include "PropSet.h" #include "Accessor.h" #include "StyleContext.h" #include "KeyWords.h" #include "Scintilla.h" #include "SciLexer.h" static bool IsVBComment(Accessor &styler, int pos, int len) { return len>0 && styler[pos]=='\''; } static inline bool IsTypeCharacter(int ch) { return ch == '%' || ch == '&' || ch == '@' || ch == '!' || ch == '#' || ch == '$'; } // Extended to accept accented characters static inline bool IsAWordChar(int ch) { return ch >= 0x80 || (isalnum(ch) || ch == '.' || ch == '_'); } static inline bool IsAWordStart(int ch) { return ch >= 0x80 || (isalnum(ch) || ch == '_'); } static inline bool IsADateCharacter(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '|' || ch == '-' || ch == '/' || ch == ':' || ch == ' ' || ch == '\t'); } static void ColouriseSDLBDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler ) { WordList &keywords = *keywordlists[0]; WordList &keywords2 = *keywordlists[1]; WordList &keywords3 = *keywordlists[2]; WordList &keywords4 = *keywordlists[3]; styler.StartAt(startPos); int visibleChars = 0; StyleContext sc(startPos, length, initStyle, styler); for (; sc.More(); sc.Forward()) { if (sc.state == SCE_B_OPERATOR) { sc.SetState(SCE_B_DEFAULT); } else if (sc.state == SCE_B_IDENTIFIER) { if (!IsAWordChar(sc.ch)) { // In Basic (except VBScript), a variable name or a function name // can end with a special character indicating the type of the value // held or returned. bool skipType = false; if (sc.ch == ']') { sc.Forward(); } char s[100]; sc.GetCurrentLowered(s, sizeof(s)); if (skipType) { s[strlen(s) - 1] = '\0'; } //if (strcmp(s, "rem") == 0) { // sc.ChangeState(SCE_B_COMMENT); //} else { if (keywords.InList(s)) { sc.ChangeState(SCE_B_KEYWORD); } else if (keywords2.InList(s)) { sc.ChangeState(SCE_B_KEYWORD2); } else if (keywords3.InList(s)) { sc.ChangeState(SCE_B_KEYWORD3); } else if (keywords4.InList(s)) { sc.ChangeState(SCE_B_KEYWORD4); } // Else, it is really an identifier... sc.SetState(SCE_B_DEFAULT); //} } } else if (sc.state == SCE_B_NUMBER) { if (!IsAWordChar(sc.ch)) { sc.SetState(SCE_B_DEFAULT); } } else if (sc.state == SCE_B_STRING) { // VB doubles quotes to preserve them, so just end this string // state now as a following quote will start again if (sc.ch == '\"') { if (tolower(sc.chNext) == 'c') { sc.Forward(); } sc.ForwardSetState(SCE_B_DEFAULT); } else if (sc.atLineEnd) { sc.ChangeState(SCE_B_STRINGEOL); sc.ForwardSetState(SCE_B_DEFAULT); } } else if (sc.state == SCE_B_COMMENT) { if (sc.atLineEnd) { sc.SetState(SCE_B_DEFAULT); } } else if (sc.state == SCE_B_PREPROCESSOR) { if (sc.atLineEnd) { sc.SetState(SCE_B_DEFAULT); } } else if (sc.state == SCE_B_DATE) { if (sc.ch == '#' || !IsADateCharacter(sc.chNext)) { sc.ForwardSetState(SCE_B_DEFAULT); } } if (sc.state == SCE_B_DEFAULT) { if (sc.ch == '\'') { sc.SetState(SCE_B_COMMENT); } else if (sc.Match('-', '-')) { sc.SetState(SCE_B_COMMENT); } else if (sc.Match('/', '/')) { sc.SetState(SCE_B_COMMENT); } else if (sc.ch == '\"') { sc.SetState(SCE_B_STRING); } else if (sc.ch == '#' && visibleChars == 0) { // Preprocessor commands are alone on their line sc.SetState(SCE_B_PREPROCESSOR); } else if (sc.ch == '#') { int n = 1; int chSeek = ' '; while ((n < 100) && (chSeek == ' ' || chSeek == '\t')) { chSeek = sc.GetRelative(n); n++; } if (IsADigit(chSeek)) { sc.SetState(SCE_B_DATE); } else { sc.SetState(SCE_B_OPERATOR); } } else if (sc.ch == '&' && tolower(sc.chNext) == 'h') { sc.SetState(SCE_B_NUMBER); } else if (sc.ch == '&' && tolower(sc.chNext) == 'o') { sc.SetState(SCE_B_NUMBER); } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { sc.SetState(SCE_B_NUMBER); } else if (IsAWordStart(sc.ch) || (sc.ch == '[')) { sc.SetState(SCE_B_IDENTIFIER); } else if (isoperator(static_cast(sc.ch)) || (sc.ch == '\\')) { sc.SetState(SCE_B_OPERATOR); } } if (sc.atLineEnd) { visibleChars = 0; } if (!IsASpace(sc.ch)) { visibleChars++; } } sc.Complete(); } static void FoldSDLBDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { int endPos = startPos + length; // Backtrack to previous line in case need to fix its fold status int lineCurrent = styler.GetLine(startPos); if (startPos > 0) { if (lineCurrent > 0) { lineCurrent--; startPos = styler.LineStart(lineCurrent); } } int spaceFlags = 0; int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsVBComment); char chNext = styler[startPos]; for (int i = startPos; i < endPos; i++) { char ch = chNext; chNext = styler.SafeGetCharAt(i + 1); if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == endPos)) { int lev = indentCurrent; int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsVBComment); if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { // Only non whitespace lines can be headers if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) { lev |= SC_FOLDLEVELHEADERFLAG; } else if (indentNext & SC_FOLDLEVELWHITEFLAG) { // Line after is blank so check the next - maybe should continue further? int spaceFlags2 = 0; int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsVBComment); if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) { lev |= SC_FOLDLEVELHEADERFLAG; } } } indentCurrent = indentNext; styler.SetLevel(lineCurrent, lev); lineCurrent++; } } } static const char * const sdlbWordListDesc[] = { "Keywords", "user1", "user2", "user3", 0 }; LexerModule lmSDLB(SCLEX_SDLB, ColouriseSDLBDoc, "sdlb", FoldSDLBDoc, sdlbWordListDesc); usr/src/sdlBasic/src/sdlBasic/scintilla/src/ContractionState.h0000777000076500007660000000271410463135107021671 0ustar // Scintilla source code edit control /** @file ContractionState.h ** Manages visibility of lines for folding. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef CONTRACTIONSTATE_H #define CONTRACTIONSTATE_H /** */ class OneLine { public: int displayLine; ///< Position within set of visible lines //int docLine; ///< Inverse of @a displayLine int height; ///< Number of display lines needed to show all of the line bool visible; bool expanded; OneLine(); virtual ~OneLine() {} }; /** */ class ContractionState { void Grow(int sizeNew); enum { growSize = 4000 }; int linesInDoc; mutable int linesInDisplay; mutable OneLine *lines; int size; mutable int *docLines; mutable int sizeDocLines; mutable bool valid; void MakeValid() const; public: ContractionState(); virtual ~ContractionState(); void Clear(); int LinesInDoc() const; int LinesDisplayed() const; int DisplayFromDoc(int lineDoc) const; int DocFromDisplay(int lineDisplay) const; void InsertLines(int lineDoc, int lineCount); void DeleteLines(int lineDoc, int lineCount); bool GetVisible(int lineDoc) const; bool SetVisible(int lineDocStart, int lineDocEnd, bool visible); bool GetExpanded(int lineDoc) const; bool SetExpanded(int lineDoc, bool expanded); int GetHeight(int lineDoc) const; bool SetHeight(int lineDoc, int height); void ShowAll(); }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/ExternalLexer.h0000777000076500007660000000532110463135664021174 0ustar // Scintilla source code edit control /** @file ExternalLexer.h ** Support external lexers in DLLs. **/ // Copyright 2001 Simon Steele , portions copyright Neil Hodgson. // The License.txt file describes the conditions under which this software may be distributed. #ifndef EXTERNALLEXER_H #define EXTERNALLEXER_H #if PLAT_WIN #define EXT_LEXER_DECL __stdcall #elif PLAT_GTK #define EXT_LEXER_DECL #endif // External Lexer function definitions... typedef void (EXT_LEXER_DECL *ExtLexerFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle, char *words[], WindowID window, char *props); typedef void (EXT_LEXER_DECL *ExtFoldFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle, char *words[], WindowID window, char *props); typedef void* (EXT_LEXER_DECL *GetLexerFunction)(unsigned int Index); typedef int (EXT_LEXER_DECL *GetLexerCountFn)(); typedef void (EXT_LEXER_DECL *GetLexerNameFn)(unsigned int Index, char *name, int buflength); //class DynamicLibrary; /// Sub-class of LexerModule to use an external lexer. class ExternalLexerModule : protected LexerModule { protected: ExtLexerFunction fneLexer; ExtFoldFunction fneFolder; int externalLanguage; char name[100]; public: ExternalLexerModule(int language_, LexerFunction fnLexer_, const char *languageName_=0, LexerFunction fnFolder_=0) : LexerModule(language_, fnLexer_, 0, fnFolder_){ strncpy(name, languageName_, sizeof(name)); languageName = name; }; virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const; virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const; virtual void SetExternal(ExtLexerFunction fLexer, ExtFoldFunction fFolder, int index); }; /// LexerMinder points to an ExternalLexerModule - so we don't leak them. class LexerMinder { public: ExternalLexerModule *self; LexerMinder *next; }; /// LexerLibrary exists for every External Lexer DLL, contains LexerMinders. class LexerLibrary { DynamicLibrary *lib; LexerMinder *first; LexerMinder *last; public: LexerLibrary(const char* ModuleName); ~LexerLibrary(); void Release(); LexerLibrary *next; SString m_sModuleName; }; /// LexerManager manages external lexers, contains LexerLibrarys. class LexerManager { public: ~LexerManager(); static LexerManager *GetInstance(); static void DeleteInstance(); void Load(const char* path); void Clear(); private: LexerManager(); static LexerManager *theInstance; void LoadLexerLibrary(const char* module); LexerLibrary *first; LexerLibrary *last; }; class LMMinder { public: ~LMMinder(); }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/CallTip.h0000777000076500007660000000317610463135043017737 0ustar // Scintilla source code edit control /** @file CallTip.h ** Interface to the call tip control. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef CALLTIP_H #define CALLTIP_H /** */ class CallTip { int startHighlight; int endHighlight; char *val; Font font; int xUp; int xDown; int lineHeight; int offsetMain; // Private so CallTip objects can not be copied CallTip(const CallTip &) {} CallTip &operator=(const CallTip &) { return *this; } void DrawChunk(Surface *surface, int &x, const char *s, int posStart, int posEnd, int ytext, PRectangle rcClient, bool highlight, bool draw); int PaintContents(Surface *surfaceWindow, bool draw); public: Window wCallTip; Window wDraw; bool inCallTipMode; int posStartCallTip; ColourPair colourBG; ColourPair colourUnSel; ColourPair colourSel; ColourPair colourShade; ColourPair colourLight; int codePage; int clickPlace; CallTip(); ~CallTip(); /// Claim or accept palette entries for the colours required to paint a calltip. void RefreshColourPalette(Palette &pal, bool want); void PaintCT(Surface *surfaceWindow); void MouseClick(Point pt); /// Setup the calltip and return a rectangle of the area required. PRectangle CallTipStart(int pos, Point pt, const char *defn, const char *faceName, int size, int codePage_, int characterSet, Window &wParent); void CallTipCancel(); /// Set a range of characters to be displayed in a highlight style. /// Commonly used to highlight the current parameter. void SetHighlight(int start, int end); }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/LineMarker.cxx0000777000076500007660000002552710463135727021030 0ustar // Scintilla source code edit control /** @file LineMarker.cxx ** Defines the look of a line marker in the margin . **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include "Platform.h" #include "Scintilla.h" #include "XPM.h" #include "LineMarker.h" void LineMarker::RefreshColourPalette(Palette &pal, bool want) { pal.WantFind(fore, want); pal.WantFind(back, want); if (pxpm) { pxpm->RefreshColourPalette(pal, want); } } void LineMarker::SetXPM(const char *textForm) { delete pxpm; pxpm = new XPM(textForm); markType = SC_MARK_PIXMAP; } void LineMarker::SetXPM(const char * const *linesForm) { delete pxpm; pxpm = new XPM(linesForm); markType = SC_MARK_PIXMAP; } static void DrawBox(Surface *surface, int centreX, int centreY, int armSize, ColourAllocated fore, ColourAllocated back) { PRectangle rc; rc.left = centreX - armSize; rc.top = centreY - armSize; rc.right = centreX + armSize + 1; rc.bottom = centreY + armSize + 1; surface->RectangleDraw(rc, back, fore); } static void DrawCircle(Surface *surface, int centreX, int centreY, int armSize, ColourAllocated fore, ColourAllocated back) { PRectangle rcCircle; rcCircle.left = centreX - armSize; rcCircle.top = centreY - armSize; rcCircle.right = centreX + armSize + 1; rcCircle.bottom = centreY + armSize + 1; surface->Ellipse(rcCircle, back, fore); } static void DrawPlus(Surface *surface, int centreX, int centreY, int armSize, ColourAllocated fore) { PRectangle rcV(centreX, centreY - armSize + 2, centreX + 1, centreY + armSize - 2 + 1); surface->FillRectangle(rcV, fore); PRectangle rcH(centreX - armSize + 2, centreY, centreX + armSize - 2 + 1, centreY+1); surface->FillRectangle(rcH, fore); } static void DrawMinus(Surface *surface, int centreX, int centreY, int armSize, ColourAllocated fore) { PRectangle rcH(centreX - armSize + 2, centreY, centreX + armSize - 2 + 1, centreY+1); surface->FillRectangle(rcH, fore); } void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter) { if ((markType == SC_MARK_PIXMAP) && (pxpm)) { pxpm->Draw(surface, rcWhole); return; } // Restrict most shapes a bit PRectangle rc = rcWhole; rc.top++; rc.bottom--; int minDim = Platform::Minimum(rc.Width(), rc.Height()); minDim--; // Ensure does not go beyond edge int centreX = (rc.right + rc.left) / 2; int centreY = (rc.bottom + rc.top) / 2; int dimOn2 = minDim / 2; int dimOn4 = minDim / 4; int blobSize = dimOn2-1; int armSize = dimOn2-2; if (rc.Width() > (rc.Height() * 2)) { // Wide column is line number so move to left to try to avoid overlapping number centreX = rc.left + dimOn2 + 1; } if (markType == SC_MARK_ROUNDRECT) { PRectangle rcRounded = rc; rcRounded.left = rc.left + 1; rcRounded.right = rc.right - 1; surface->RoundedRectangle(rcRounded, fore.allocated, back.allocated); } else if (markType == SC_MARK_CIRCLE) { PRectangle rcCircle; rcCircle.left = centreX - dimOn2; rcCircle.top = centreY - dimOn2; rcCircle.right = centreX + dimOn2; rcCircle.bottom = centreY + dimOn2; surface->Ellipse(rcCircle, fore.allocated, back.allocated); } else if (markType == SC_MARK_ARROW) { Point pts[] = { Point(centreX - dimOn4, centreY - dimOn2), Point(centreX - dimOn4, centreY + dimOn2), Point(centreX + dimOn2 - dimOn4, centreY), }; surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), fore.allocated, back.allocated); } else if (markType == SC_MARK_ARROWDOWN) { Point pts[] = { Point(centreX - dimOn2, centreY - dimOn4), Point(centreX + dimOn2, centreY - dimOn4), Point(centreX, centreY + dimOn2 - dimOn4), }; surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), fore.allocated, back.allocated); } else if (markType == SC_MARK_PLUS) { Point pts[] = { Point(centreX - armSize, centreY - 1), Point(centreX - 1, centreY - 1), Point(centreX - 1, centreY - armSize), Point(centreX + 1, centreY - armSize), Point(centreX + 1, centreY - 1), Point(centreX + armSize, centreY -1), Point(centreX + armSize, centreY +1), Point(centreX + 1, centreY + 1), Point(centreX + 1, centreY + armSize), Point(centreX - 1, centreY + armSize), Point(centreX - 1, centreY + 1), Point(centreX - armSize, centreY + 1), }; surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), fore.allocated, back.allocated); } else if (markType == SC_MARK_MINUS) { Point pts[] = { Point(centreX - armSize, centreY - 1), Point(centreX + armSize, centreY -1), Point(centreX + armSize, centreY +1), Point(centreX - armSize, centreY + 1), }; surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), fore.allocated, back.allocated); } else if (markType == SC_MARK_SMALLRECT) { PRectangle rcSmall; rcSmall.left = rc.left + 1; rcSmall.top = rc.top + 2; rcSmall.right = rc.right - 1; rcSmall.bottom = rc.bottom - 2; surface->RectangleDraw(rcSmall, fore.allocated, back.allocated); } else if (markType == SC_MARK_EMPTY || markType == SC_MARK_BACKGROUND) { // An invisible marker so don't draw anything } else if (markType == SC_MARK_VLINE) { surface->PenColour(back.allocated); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, rcWhole.bottom); } else if (markType == SC_MARK_LCORNER) { surface->PenColour(back.allocated); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, rc.top + dimOn2); surface->LineTo(rc.right - 2, rc.top + dimOn2); } else if (markType == SC_MARK_TCORNER) { surface->PenColour(back.allocated); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, rcWhole.bottom); surface->MoveTo(centreX, rc.top + dimOn2); surface->LineTo(rc.right - 2, rc.top + dimOn2); } else if (markType == SC_MARK_LCORNERCURVE) { surface->PenColour(back.allocated); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, rc.top + dimOn2-3); surface->LineTo(centreX+3, rc.top + dimOn2); surface->LineTo(rc.right - 1, rc.top + dimOn2); } else if (markType == SC_MARK_TCORNERCURVE) { surface->PenColour(back.allocated); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, rcWhole.bottom); surface->MoveTo(centreX, rc.top + dimOn2-3); surface->LineTo(centreX+3, rc.top + dimOn2); surface->LineTo(rc.right - 1, rc.top + dimOn2); } else if (markType == SC_MARK_BOXPLUS) { surface->PenColour(back.allocated); DrawBox(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); DrawPlus(surface, centreX, centreY, blobSize, back.allocated); } else if (markType == SC_MARK_BOXPLUSCONNECTED) { surface->PenColour(back.allocated); DrawBox(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); DrawPlus(surface, centreX, centreY, blobSize, back.allocated); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, rcWhole.bottom); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, centreY - blobSize); } else if (markType == SC_MARK_BOXMINUS) { surface->PenColour(back.allocated); DrawBox(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); DrawMinus(surface, centreX, centreY, blobSize, back.allocated); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, rcWhole.bottom); } else if (markType == SC_MARK_BOXMINUSCONNECTED) { surface->PenColour(back.allocated); DrawBox(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); DrawMinus(surface, centreX, centreY, blobSize, back.allocated); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, rcWhole.bottom); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, centreY - blobSize); } else if (markType == SC_MARK_CIRCLEPLUS) { DrawCircle(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); surface->PenColour(back.allocated); DrawPlus(surface, centreX, centreY, blobSize, back.allocated); } else if (markType == SC_MARK_CIRCLEPLUSCONNECTED) { DrawCircle(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); surface->PenColour(back.allocated); DrawPlus(surface, centreX, centreY, blobSize, back.allocated); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, rcWhole.bottom); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, centreY - blobSize); } else if (markType == SC_MARK_CIRCLEMINUS) { DrawCircle(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); surface->PenColour(back.allocated); DrawMinus(surface, centreX, centreY, blobSize, back.allocated); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, rcWhole.bottom); } else if (markType == SC_MARK_CIRCLEMINUSCONNECTED) { DrawCircle(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); surface->PenColour(back.allocated); DrawMinus(surface, centreX, centreY, blobSize, back.allocated); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, rcWhole.bottom); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, centreY - blobSize); } else if (markType >= SC_MARK_CHARACTER) { char character[1]; character[0] = static_cast(markType - SC_MARK_CHARACTER); int width = surface->WidthText(fontForCharacter, character, 1); rc.left += (rc.Width() - width) / 2; rc.right = rc.left + width; surface->DrawTextClipped(rc, fontForCharacter, rc.bottom - 2, character, 1, fore.allocated, back.allocated); } else if (markType == SC_MARK_DOTDOTDOT) { int right = centreX - 6; for (int b=0; b<3; b++) { PRectangle rcBlob(right, rc.bottom - 4, right + 2, rc.bottom-2); surface->FillRectangle(rcBlob, fore.allocated); right += 5; } } else if (markType == SC_MARK_ARROWS) { surface->PenColour(fore.allocated); int right = centreX - 2; for (int b=0; b<3; b++) { surface->MoveTo(right - 4, centreY - 4); surface->LineTo(right, centreY); surface->LineTo(right - 5, centreY + 5); right += 4; } } else if (markType == SC_MARK_SHORTARROW) { Point pts[] = { Point(centreX, centreY + dimOn2), Point(centreX + dimOn2, centreY), Point(centreX, centreY - dimOn2), Point(centreX, centreY - dimOn4), Point(centreX - dimOn4, centreY - dimOn4), Point(centreX - dimOn4, centreY + dimOn4), Point(centreX, centreY + dimOn4), Point(centreX, centreY + dimOn2), }; surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), fore.allocated, back.allocated); } else { // SC_MARK_FULLRECT surface->FillRectangle(rcWhole, back.allocated); } } usr/src/sdlBasic/src/sdlBasic/scintilla/src/LexOthers.cxx0000777000076500007660000006674110463135727020717 0ustar // Scintilla source code edit control /** @file LexOthers.cxx ** Lexers for batch files, diff results, properties files, make files and error lists. ** Also lexer for LaTeX documents. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include "Platform.h" #include "PropSet.h" #include "Accessor.h" #include "KeyWords.h" #include "Scintilla.h" #include "SciLexer.h" static bool Is0To9(char ch) { return (ch >= '0') && (ch <= '9'); } static bool Is1To9(char ch) { return (ch >= '1') && (ch <= '9'); } static inline bool AtEOL(Accessor &styler, unsigned int i) { return (styler[i] == '\n') || ((styler[i] == '\r') && (styler.SafeGetCharAt(i + 1) != '\n')); } static void ColouriseBatchLine( char *lineBuffer, unsigned int lengthLine, unsigned int startLine, unsigned int endPos, WordList &keywords, Accessor &styler) { unsigned int i = 0; unsigned int state = SCE_BAT_DEFAULT; while ((i < lengthLine) && isspacechar(lineBuffer[i])) { // Skip initial spaces i++; } if (lineBuffer[i] == '@') { // Hide command (ECHO OFF) styler.ColourTo(startLine + i, SCE_BAT_HIDE); i++; while ((i < lengthLine) && isspacechar(lineBuffer[i])) { // Skip next spaces i++; } } if (lineBuffer[i] == ':') { // Label if (lineBuffer[i + 1] == ':') { // :: is a fake label, similar to REM, see http://content.techweb.com/winmag/columns/explorer/2000/21.htm styler.ColourTo(endPos, SCE_BAT_COMMENT); } else { // Real label styler.ColourTo(endPos, SCE_BAT_LABEL); } } else { // Check if initial word is a keyword char wordBuffer[21]; unsigned int wbl = 0, offset = i; // Copy word in buffer for (; offset < lengthLine && wbl < 20 && !isspacechar(lineBuffer[offset]); wbl++, offset++) { wordBuffer[wbl] = static_cast(tolower(lineBuffer[offset])); } wordBuffer[wbl] = '\0'; // Check if it is a comment if (CompareCaseInsensitive(wordBuffer, "rem") == 0) { styler.ColourTo(endPos, SCE_BAT_COMMENT); return; } // Check if it is in the list if (keywords.InList(wordBuffer)) { styler.ColourTo(startLine + offset - 1, SCE_BAT_WORD); // Regular keyword } else { // Search end of word (can be a long path) while (offset < lengthLine && !isspacechar(lineBuffer[offset])) { offset++; } styler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND); // External command / program } // Remainder of the line: colourise the variables. while (offset < lengthLine) { if (state == SCE_BAT_DEFAULT && lineBuffer[offset] == '%') { styler.ColourTo(startLine + offset - 1, state); if (Is0To9(lineBuffer[offset + 1])) { styler.ColourTo(startLine + offset + 1, SCE_BAT_IDENTIFIER); offset += 2; } else if (lineBuffer[offset + 1] == '%' && !isspacechar(lineBuffer[offset + 2])) { // Should be safe, as there is CRLF at the end of the line... styler.ColourTo(startLine + offset + 2, SCE_BAT_IDENTIFIER); offset += 3; } else { state = SCE_BAT_IDENTIFIER; } } else if (state == SCE_BAT_IDENTIFIER && lineBuffer[offset] == '%') { styler.ColourTo(startLine + offset, state); state = SCE_BAT_DEFAULT; } else if (state == SCE_BAT_DEFAULT && (lineBuffer[offset] == '*' || lineBuffer[offset] == '?' || lineBuffer[offset] == '=' || lineBuffer[offset] == '<' || lineBuffer[offset] == '>' || lineBuffer[offset] == '|')) { styler.ColourTo(startLine + offset - 1, state); styler.ColourTo(startLine + offset, SCE_BAT_OPERATOR); } offset++; } // if (endPos > startLine + offset - 1) { styler.ColourTo(endPos, SCE_BAT_DEFAULT); // Remainder of line, currently not lexed // } } } // ToDo: (not necessarily at beginning of line) GOTO, [IF] NOT, ERRORLEVEL // IF [NO] (test) (command) -- test is EXIST (filename) | (string1)==(string2) | ERRORLEVEL (number) // FOR %%(variable) IN (set) DO (command) -- variable is [a-zA-Z] -- eg for %%X in (*.txt) do type %%X // ToDo: %n (parameters), %EnvironmentVariable% colourising // ToDo: Colourise = > >> < | " static void ColouriseBatchDoc( unsigned int startPos, int length, int /*initStyle*/, WordList *keywordlists[], Accessor &styler) { char lineBuffer[1024]; WordList &keywords = *keywordlists[0]; styler.StartAt(startPos); styler.StartSegment(startPos); unsigned int linePos = 0; unsigned int startLine = startPos; for (unsigned int i = startPos; i < startPos + length; i++) { lineBuffer[linePos++] = styler[i]; if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) { // End of line (or of line buffer) met, colourise it lineBuffer[linePos] = '\0'; ColouriseBatchLine(lineBuffer, linePos, startLine, i, keywords, styler); linePos = 0; startLine = i + 1; } } if (linePos > 0) { // Last line does not have ending characters ColouriseBatchLine(lineBuffer, linePos, startLine, startPos + length - 1, keywords, styler); } } static void ColouriseDiffLine(char *lineBuffer, int endLine, Accessor &styler) { // It is needed to remember the current state to recognize starting // comment lines before the first "diff " or "--- ". If a real // difference starts then each line starting with ' ' is a whitespace // otherwise it is considered a comment (Only in..., Binary file...) if (0 == strncmp(lineBuffer, "diff ", 5)) { styler.ColourTo(endLine, SCE_DIFF_COMMAND); } else if (0 == strncmp(lineBuffer, "--- ", 4)) { // In a context diff, --- appears in both the header and the position markers if (atoi(lineBuffer+4) && !strchr(lineBuffer, '/')) styler.ColourTo(endLine, SCE_DIFF_POSITION); else styler.ColourTo(endLine, SCE_DIFF_HEADER); } else if (0 == strncmp(lineBuffer, "+++ ", 4)) { // I don't know of any diff where "+++ " is a position marker, but for // consistency, do the same as with "--- " and "*** ". if (atoi(lineBuffer+4) && !strchr(lineBuffer, '/')) styler.ColourTo(endLine, SCE_DIFF_POSITION); else styler.ColourTo(endLine, SCE_DIFF_HEADER); } else if (0 == strncmp(lineBuffer, "====", 4)) { // For p4's diff styler.ColourTo(endLine, SCE_DIFF_HEADER); } else if (0 == strncmp(lineBuffer, "***", 3)) { // In a context diff, *** appears in both the header and the position markers. // Also ******** is a chunk header, but here it's treated as part of the // position marker since there is no separate style for a chunk header. if (lineBuffer[3] == ' ' && atoi(lineBuffer+4) && !strchr(lineBuffer, '/')) styler.ColourTo(endLine, SCE_DIFF_POSITION); else if (lineBuffer[3] == '*') styler.ColourTo(endLine, SCE_DIFF_POSITION); else styler.ColourTo(endLine, SCE_DIFF_HEADER); } else if (0 == strncmp(lineBuffer, "? ", 2)) { // For difflib styler.ColourTo(endLine, SCE_DIFF_HEADER); } else if (lineBuffer[0] == '@') { styler.ColourTo(endLine, SCE_DIFF_POSITION); } else if (lineBuffer[0] >= '0' && lineBuffer[0] <= '9') { styler.ColourTo(endLine, SCE_DIFF_POSITION); } else if (lineBuffer[0] == '-' || lineBuffer[0] == '<') { styler.ColourTo(endLine, SCE_DIFF_DELETED); } else if (lineBuffer[0] == '+' || lineBuffer[0] == '>') { styler.ColourTo(endLine, SCE_DIFF_ADDED); } else if (lineBuffer[0] != ' ') { styler.ColourTo(endLine, SCE_DIFF_COMMENT); } else { styler.ColourTo(endLine, SCE_DIFF_DEFAULT); } } static void ColouriseDiffDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { char lineBuffer[1024]; styler.StartAt(startPos); styler.StartSegment(startPos); unsigned int linePos = 0; for (unsigned int i = startPos; i < startPos + length; i++) { lineBuffer[linePos++] = styler[i]; if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) { // End of line (or of line buffer) met, colourise it lineBuffer[linePos] = '\0'; ColouriseDiffLine(lineBuffer, i, styler); linePos = 0; } } if (linePos > 0) { // Last line does not have ending characters ColouriseDiffLine(lineBuffer, startPos + length - 1, styler); } } static void FoldDiffDoc(unsigned int startPos, int length, int, WordList*[], Accessor &styler) { int curLine = styler.GetLine(startPos); int prevLevel = SC_FOLDLEVELBASE; if (curLine > 0) prevLevel = styler.LevelAt(curLine-1); int curLineStart = styler.LineStart(curLine); do { int nextLevel = prevLevel; if (prevLevel & SC_FOLDLEVELHEADERFLAG) nextLevel = (prevLevel & SC_FOLDLEVELNUMBERMASK) + 1; int lineType = styler.StyleAt(curLineStart); if (lineType == SCE_DIFF_COMMAND) nextLevel = (SC_FOLDLEVELBASE + 1) | SC_FOLDLEVELHEADERFLAG; else if (lineType == SCE_DIFF_HEADER) { nextLevel = (SC_FOLDLEVELBASE + 2) | SC_FOLDLEVELHEADERFLAG; } else if (lineType == SCE_DIFF_POSITION) nextLevel = (SC_FOLDLEVELBASE + 3) | SC_FOLDLEVELHEADERFLAG; if ((nextLevel & SC_FOLDLEVELHEADERFLAG) && (nextLevel == prevLevel)) styler.SetLevel(curLine-1, prevLevel & ~SC_FOLDLEVELHEADERFLAG); styler.SetLevel(curLine, nextLevel); prevLevel = nextLevel; curLineStart = styler.LineStart(++curLine); } while (static_cast(startPos) + length > curLineStart); } static void ColourisePropsLine( char *lineBuffer, unsigned int lengthLine, unsigned int startLine, unsigned int endPos, Accessor &styler) { unsigned int i = 0; while ((i < lengthLine) && isspacechar(lineBuffer[i])) // Skip initial spaces i++; if (i < lengthLine) { if (lineBuffer[i] == '#' || lineBuffer[i] == '!' || lineBuffer[i] == ';') { styler.ColourTo(endPos, SCE_PROPS_COMMENT); } else if (lineBuffer[i] == '[') { styler.ColourTo(endPos, SCE_PROPS_SECTION); } else if (lineBuffer[i] == '@') { styler.ColourTo(startLine + i, SCE_PROPS_DEFVAL); if (lineBuffer[++i] == '=') styler.ColourTo(startLine + i, SCE_PROPS_ASSIGNMENT); styler.ColourTo(endPos, SCE_PROPS_DEFAULT); } else { // Search for the '=' character while ((i < lengthLine) && (lineBuffer[i] != '=')) i++; if ((i < lengthLine) && (lineBuffer[i] == '=')) { styler.ColourTo(startLine + i - 1, SCE_PROPS_DEFAULT); styler.ColourTo(startLine + i, 3); styler.ColourTo(endPos, SCE_PROPS_DEFAULT); } else { styler.ColourTo(endPos, SCE_PROPS_DEFAULT); } } } else { styler.ColourTo(endPos, SCE_PROPS_DEFAULT); } } static void ColourisePropsDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { char lineBuffer[1024]; styler.StartAt(startPos); styler.StartSegment(startPos); unsigned int linePos = 0; unsigned int startLine = startPos; for (unsigned int i = startPos; i < startPos + length; i++) { lineBuffer[linePos++] = styler[i]; if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) { // End of line (or of line buffer) met, colourise it lineBuffer[linePos] = '\0'; ColourisePropsLine(lineBuffer, linePos, startLine, i, styler); linePos = 0; startLine = i + 1; } } if (linePos > 0) { // Last line does not have ending characters ColourisePropsLine(lineBuffer, linePos, startLine, startPos + length - 1, styler); } } // adaption by ksc, using the "} else {" trick of 1.53 // 030721 static void FoldPropsDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; unsigned int endPos = startPos + length; int visibleChars = 0; int lineCurrent = styler.GetLine(startPos); char chNext = styler[startPos]; int styleNext = styler.StyleAt(startPos); bool headerPoint = false; int lev; for (unsigned int i = startPos; i < endPos; i++) { char ch = chNext; chNext = styler[i+1]; int style = styleNext; styleNext = styler.StyleAt(i + 1); bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); if (style == SCE_PROPS_SECTION) { headerPoint = true; } if (atEOL) { lev = SC_FOLDLEVELBASE; if (lineCurrent > 0) { int levelPrevious = styler.LevelAt(lineCurrent - 1); if (levelPrevious & SC_FOLDLEVELHEADERFLAG) { lev = SC_FOLDLEVELBASE + 1; } else { lev = levelPrevious & SC_FOLDLEVELNUMBERMASK; } } if (headerPoint) { lev = SC_FOLDLEVELBASE; } if (visibleChars == 0 && foldCompact) lev |= SC_FOLDLEVELWHITEFLAG; if (headerPoint) { lev |= SC_FOLDLEVELHEADERFLAG; } if (lev != styler.LevelAt(lineCurrent)) { styler.SetLevel(lineCurrent, lev); } lineCurrent++; visibleChars = 0; headerPoint = false; } if (!isspacechar(ch)) visibleChars++; } if (lineCurrent > 0) { int levelPrevious = styler.LevelAt(lineCurrent - 1); if (levelPrevious & SC_FOLDLEVELHEADERFLAG) { lev = SC_FOLDLEVELBASE + 1; } else { lev = levelPrevious & SC_FOLDLEVELNUMBERMASK; } } else { lev = SC_FOLDLEVELBASE; } int flagsNext = styler.LevelAt(lineCurrent); styler.SetLevel(lineCurrent, lev | flagsNext & ~SC_FOLDLEVELNUMBERMASK); } static void ColouriseMakeLine( char *lineBuffer, unsigned int lengthLine, unsigned int startLine, unsigned int endPos, Accessor &styler) { unsigned int i = 0; int lastNonSpace = -1; unsigned int state = SCE_MAKE_DEFAULT; bool bSpecial = false; // Skip initial spaces while ((i < lengthLine) && isspacechar(lineBuffer[i])) { i++; } if (lineBuffer[i] == '#') { // Comment styler.ColourTo(endPos, SCE_MAKE_COMMENT); return; } if (lineBuffer[i] == '!') { // Special directive styler.ColourTo(endPos, SCE_MAKE_PREPROCESSOR); return; } while (i < lengthLine) { if (lineBuffer[i] == '$' && lineBuffer[i + 1] == '(') { styler.ColourTo(startLine + i - 1, state); state = SCE_MAKE_IDENTIFIER; } else if (state == SCE_MAKE_IDENTIFIER && lineBuffer[i] == ')') { styler.ColourTo(startLine + i, state); state = SCE_MAKE_DEFAULT; } if (!bSpecial) { if (lineBuffer[i] == ':') { // We should check that no colouring was made since the beginning of the line, // to avoid colouring stuff like /OUT:file if (lastNonSpace >= 0) styler.ColourTo(startLine + lastNonSpace, SCE_MAKE_TARGET); styler.ColourTo(startLine + i - 1, SCE_MAKE_DEFAULT); styler.ColourTo(startLine + i, SCE_MAKE_OPERATOR); bSpecial = true; // Only react to the first ':' of the line state = SCE_MAKE_DEFAULT; } else if (lineBuffer[i] == '=') { if (lastNonSpace >= 0) styler.ColourTo(startLine + lastNonSpace, SCE_MAKE_IDENTIFIER); styler.ColourTo(startLine + i - 1, SCE_MAKE_DEFAULT); styler.ColourTo(startLine + i, SCE_MAKE_OPERATOR); bSpecial = true; // Only react to the first '=' of the line state = SCE_MAKE_DEFAULT; } } if (!isspacechar(lineBuffer[i])) { lastNonSpace = i; } i++; } if (state == SCE_MAKE_IDENTIFIER) { styler.ColourTo(endPos, SCE_MAKE_IDEOL); // Error, variable reference not ended } else { styler.ColourTo(endPos, SCE_MAKE_DEFAULT); } } static void ColouriseMakeDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { char lineBuffer[1024]; styler.StartAt(startPos); styler.StartSegment(startPos); unsigned int linePos = 0; unsigned int startLine = startPos; for (unsigned int i = startPos; i < startPos + length; i++) { lineBuffer[linePos++] = styler[i]; if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) { // End of line (or of line buffer) met, colourise it lineBuffer[linePos] = '\0'; ColouriseMakeLine(lineBuffer, linePos, startLine, i, styler); linePos = 0; startLine = i + 1; } } if (linePos > 0) { // Last line does not have ending characters ColouriseMakeLine(lineBuffer, linePos, startLine, startPos + length - 1, styler); } } static bool strstart(const char *haystack, const char *needle) { return strncmp(haystack, needle, strlen(needle)) == 0; } static int RecogniseErrorListLine(const char *lineBuffer, unsigned int lengthLine) { if (lineBuffer[0] == '>') { // Command or return status return SCE_ERR_CMD; } else if (lineBuffer[0] == '<') { // Diff removal, but not interested. Trapped to avoid hitting CTAG cases. return SCE_ERR_DEFAULT; } else if (lineBuffer[0] == '!') { return SCE_ERR_DIFF_CHANGED; } else if (lineBuffer[0] == '+') { return SCE_ERR_DIFF_ADDITION; } else if (lineBuffer[0] == '-' && lineBuffer[1] == '-' && lineBuffer[2] == '-') { return SCE_ERR_DIFF_MESSAGE; } else if (lineBuffer[0] == '-') { return SCE_ERR_DIFF_DELETION; } else if (strstart(lineBuffer, "cf90-")) { // Absoft Pro Fortran 90/95 v8.2 error and/or warning message return SCE_ERR_ABSF; } else if (strstart(lineBuffer, "fortcom:")) { // Intel Fortran Compiler v8.0 error/warning message return SCE_ERR_IFORT; } else if (strstr(lineBuffer, "File \"") && strstr(lineBuffer, ", line ")) { return SCE_ERR_PYTHON; } else if (strstr(lineBuffer, " in ") && strstr(lineBuffer, " on line ")) { return SCE_ERR_PHP; } else if ((strstart(lineBuffer, "Error ") || strstart(lineBuffer, "Warning ")) && strstr(lineBuffer, " at (") && strstr(lineBuffer, ") : ") && (strstr(lineBuffer, " at (") < strstr(lineBuffer, ") : "))) { // Intel Fortran Compiler error/warning message return SCE_ERR_IFC; } else if (strstart(lineBuffer, "Error ")) { // Borland error message return SCE_ERR_BORLAND; } else if (strstart(lineBuffer, "Warning ")) { // Borland warning message return SCE_ERR_BORLAND; } else if (strstr(lineBuffer, "at line " ) && (strstr(lineBuffer, "at line " ) < (lineBuffer + lengthLine)) && strstr(lineBuffer, "file ") && (strstr(lineBuffer, "file ") < (lineBuffer + lengthLine))) { // Lua 4 error message return SCE_ERR_LUA; } else if (strstr(lineBuffer, " at " ) && (strstr(lineBuffer, " at " ) < (lineBuffer + lengthLine)) && strstr(lineBuffer, " line ") && (strstr(lineBuffer, " line ") < (lineBuffer + lengthLine)) && (strstr(lineBuffer, " at " ) < (strstr(lineBuffer, " line ")))) { // perl error message return SCE_ERR_PERL; } else if ((memcmp(lineBuffer, " at ", 6) == 0) && strstr(lineBuffer, ":line ")) { // A .NET traceback return SCE_ERR_NET; } else if (strstart(lineBuffer, "Line ") && strstr(lineBuffer, ", file ")) { // Essential Lahey Fortran error message return SCE_ERR_ELF; } else if (strstart(lineBuffer, "line ") && strstr(lineBuffer, " column ")) { // HTML tidy style: line 42 column 1 return SCE_ERR_TIDY; } else if (strstart(lineBuffer, "\tat ") && strstr(lineBuffer, "(") && strstr(lineBuffer, ".java:")) { // Java stack back trace return SCE_ERR_JAVA_STACK; } else { // Look for one of the following formats: // GCC: :: // Microsoft: () : // Common: (): warning|error|note|remark|catastrophic|fatal // Common: () warning|error|note|remark|catastrophic|fatal // Microsoft: (,) // CTags: \t // Lua 5 traceback: \t:: bool initialTab = (lineBuffer[0] == '\t'); enum { stInitial, stGccStart, stGccDigit, stGcc, stMsStart, stMsDigit, stMsBracket, stMsVc, stMsDigitComma, stMsDotNet, stCtagsStart, stCtagsStartString, stCtagsStringDollar, stCtags, stUnrecognized } state = stInitial; for (unsigned int i = 0; i < lengthLine; i++) { char ch = lineBuffer[i]; char chNext = ' '; if ((i + 1) < lengthLine) chNext = lineBuffer[i + 1]; if (state == stInitial) { if (ch == ':') { // May be GCC, or might be Lua 5 (Lua traceback same but with tab prefix) if ((chNext != '\\') && (chNext != '/')) { // This check is not completely accurate as may be on // GTK+ with a file name that includes ':'. state = stGccStart; } } else if ((ch == '(') && Is1To9(chNext) && (!initialTab)) { // May be Microsoft // Check against '0' often removes phone numbers state = stMsStart; } else if ((ch == '\t') && (!initialTab)) { // May be CTags state = stCtagsStart; } } else if (state == stGccStart) { // : state = Is1To9(ch) ? stGccDigit : stUnrecognized; } else if (state == stGccDigit) { // : if (ch == ':') { state = stGcc; // :9.*: is GCC break; } else if (!Is0To9(ch)) { state = stUnrecognized; } } else if (state == stMsStart) { // ( state = Is0To9(ch) ? stMsDigit : stUnrecognized; } else if (state == stMsDigit) { // ( if (ch == ',') { state = stMsDigitComma; } else if (ch == ')') { state = stMsBracket; } else if ((ch != ' ') && !Is0To9(ch)) { state = stUnrecognized; } } else if (state == stMsBracket) { // () if ((ch == ' ') && (chNext == ':')) { state = stMsVc; } else if ((ch == ':' && chNext == ' ') || (ch == ' ')) { // Possibly Delphi.. don't test against chNext as it's one of the strings below. char word[512]; unsigned int j, chPos; unsigned numstep; chPos = 0; if (ch == ' ') numstep = 1; // ch was ' ', handle as if it's a delphi errorline, only add 1 to i. else numstep = 2; // otherwise add 2. for (j = i + numstep; j < lengthLine && isalpha(lineBuffer[j]) && chPos < sizeof(word) - 1; j++) word[chPos++] = lineBuffer[j]; word[chPos] = 0; if (!CompareCaseInsensitive(word, "error") || !CompareCaseInsensitive(word, "warning") || !CompareCaseInsensitive(word, "fatal") || !CompareCaseInsensitive(word, "catastrophic") || !CompareCaseInsensitive(word, "note") || !CompareCaseInsensitive(word, "remark")) { state = stMsVc; } else state = stUnrecognized; } else { state = stUnrecognized; } } else if (state == stMsDigitComma) { // (, if (ch == ')') { state = stMsDotNet; break; } else if ((ch != ' ') && !Is0To9(ch)) { state = stUnrecognized; } } else if (state == stCtagsStart) { if ((lineBuffer[i - 1] == '\t') && ((ch == '/' && lineBuffer[i + 1] == '^') || Is0To9(ch))) { state = stCtags; break; } else if ((ch == '/') && (lineBuffer[i + 1] == '^')) { state = stCtagsStartString; } } else if ((state == stCtagsStartString) && ((lineBuffer[i] == '$') && (lineBuffer[i + 1] == '/'))) { state = stCtagsStringDollar; break; } } if (state == stGcc) { return SCE_ERR_GCC; } else if ((state == stMsVc) || (state == stMsDotNet)) { return SCE_ERR_MS; } else if ((state == stCtagsStringDollar) || (state == stCtags)) { return SCE_ERR_CTAG; } else { return SCE_ERR_DEFAULT; } } } static void ColouriseErrorListLine( char *lineBuffer, unsigned int lengthLine, unsigned int endPos, Accessor &styler) { styler.ColourTo(endPos, RecogniseErrorListLine(lineBuffer, lengthLine)); } static void ColouriseErrorListDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { char lineBuffer[1024]; styler.StartAt(startPos); styler.StartSegment(startPos); unsigned int linePos = 0; for (unsigned int i = startPos; i < startPos + length; i++) { lineBuffer[linePos++] = styler[i]; if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) { // End of line (or of line buffer) met, colourise it lineBuffer[linePos] = '\0'; ColouriseErrorListLine(lineBuffer, linePos, i, styler); linePos = 0; } } if (linePos > 0) { // Last line does not have ending characters ColouriseErrorListLine(lineBuffer, linePos, startPos + length - 1, styler); } } static int isSpecial(char s) { return (s == '\\') || (s == ',') || (s == ';') || (s == '\'') || (s == ' ') || (s == '\"') || (s == '`') || (s == '^') || (s == '~'); } static int isTag(int start, Accessor &styler) { char s[6]; unsigned int i = 0, e = 1; while (i < 5 && e) { s[i] = styler[start + i]; i++; e = styler[start + i] != '{'; } s[i] = '\0'; return (strcmp(s, "begin") == 0) || (strcmp(s, "end") == 0); } static void ColouriseLatexDoc(unsigned int startPos, int length, int initStyle, WordList *[], Accessor &styler) { styler.StartAt(startPos); int state = initStyle; char chNext = styler[startPos]; styler.StartSegment(startPos); int lengthDoc = startPos + length; for (int i = startPos; i < lengthDoc; i++) { char ch = chNext; chNext = styler.SafeGetCharAt(i + 1); if (styler.IsLeadByte(ch)) { chNext = styler.SafeGetCharAt(i + 2); i++; continue; } switch (state) { case SCE_L_DEFAULT : switch (ch) { case '\\' : styler.ColourTo(i - 1, state); if (isSpecial(styler[i + 1])) { styler.ColourTo(i + 1, SCE_L_COMMAND); i++; chNext = styler.SafeGetCharAt(i + 1); } else { if (isTag(i + 1, styler)) state = SCE_L_TAG; else state = SCE_L_COMMAND; } break; case '$' : styler.ColourTo(i - 1, state); state = SCE_L_MATH; if (chNext == '$') { i++; chNext = styler.SafeGetCharAt(i + 1); } break; case '%' : styler.ColourTo(i - 1, state); state = SCE_L_COMMENT; break; } break; case SCE_L_COMMAND : if (chNext == '[' || chNext == '{' || chNext == '}' || chNext == ' ' || chNext == '\r' || chNext == '\n') { styler.ColourTo(i, state); state = SCE_L_DEFAULT; i++; chNext = styler.SafeGetCharAt(i + 1); } break; case SCE_L_TAG : if (ch == '}') { styler.ColourTo(i, state); state = SCE_L_DEFAULT; } break; case SCE_L_MATH : if (ch == '$') { if (chNext == '$') { i++; chNext = styler.SafeGetCharAt(i + 1); } styler.ColourTo(i, state); state = SCE_L_DEFAULT; } break; case SCE_L_COMMENT : if (ch == '\r' || ch == '\n') { styler.ColourTo(i - 1, state); state = SCE_L_DEFAULT; } } } styler.ColourTo(lengthDoc-1, state); } static const char * const batchWordListDesc[] = { "Keywords", 0 }; static const char * const emptyWordListDesc[] = { 0 }; static void ColouriseNullDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { // Null language means all style bytes are 0 so just mark the end - no need to fill in. if (length > 0) { styler.StartAt(startPos + length - 1); styler.StartSegment(startPos + length - 1); styler.ColourTo(startPos + length - 1, 0); } } LexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc, "batch", 0, batchWordListDesc); LexerModule lmDiff(SCLEX_DIFF, ColouriseDiffDoc, "diff", FoldDiffDoc, emptyWordListDesc); LexerModule lmProps(SCLEX_PROPERTIES, ColourisePropsDoc, "props", FoldPropsDoc, emptyWordListDesc); LexerModule lmMake(SCLEX_MAKEFILE, ColouriseMakeDoc, "makefile", 0, emptyWordListDesc); LexerModule lmErrorList(SCLEX_ERRORLIST, ColouriseErrorListDoc, "errorlist", 0, emptyWordListDesc); LexerModule lmLatex(SCLEX_LATEX, ColouriseLatexDoc, "latex", 0, emptyWordListDesc); LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null"); usr/src/sdlBasic/src/sdlBasic/scintilla/src/UniConversion.cxx0000777000076500007660000000431010463136100021545 0ustar // Scintilla source code edit control /** @file UniConversion.cxx ** Functions to handle UFT-8 and UCS-2 strings. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include "UniConversion.h" unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen) { unsigned int len = 0; for (unsigned int i = 0; i < tlen && uptr[i]; i++) { unsigned int uch = uptr[i]; if (uch < 0x80) len++; else if (uch < 0x800) len += 2; else len +=3; } return len; } void UTF8FromUCS2(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len) { int k = 0; for (unsigned int i = 0; i < tlen && uptr[i]; i++) { unsigned int uch = uptr[i]; if (uch < 0x80) { putf[k++] = static_cast(uch); } else if (uch < 0x800) { putf[k++] = static_cast(0xC0 | (uch >> 6)); putf[k++] = static_cast(0x80 | (uch & 0x3f)); } else { putf[k++] = static_cast(0xE0 | (uch >> 12)); putf[k++] = static_cast(0x80 | ((uch >> 6) & 0x3f)); putf[k++] = static_cast(0x80 | (uch & 0x3f)); } } putf[len] = '\0'; } unsigned int UCS2Length(const char *s, unsigned int len) { unsigned int ulen = 0; for (unsigned int i=0;i(s[i]); if ((ch < 0x80) || (ch > (0x80 + 0x40))) ulen++; } return ulen; } unsigned int UCS2FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen) { unsigned int ui=0; const unsigned char *us = reinterpret_cast(s); unsigned int i=0; while ((i((ch & 0x1F) << 6); ch = us[i++]; tbuf[ui] = static_cast(tbuf[ui] + (ch & 0x7F)); } else { tbuf[ui] = static_cast((ch & 0xF) << 12); ch = us[i++]; tbuf[ui] = static_cast(tbuf[ui] + ((ch & 0x7F) << 6)); ch = us[i++]; tbuf[ui] = static_cast(tbuf[ui] + (ch & 0x7F)); } ui++; } return ui; } usr/src/sdlBasic/src/sdlBasic/scintilla/src/CallTip.cxx0000777000076500007660000002120510463135043020303 0ustar // Scintilla source code edit control /** @file CallTip.cxx ** Code for displaying call tips. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include "Platform.h" #include "Scintilla.h" #include "CallTip.h" CallTip::CallTip() { wCallTip = 0; inCallTipMode = false; posStartCallTip = 0; val = 0; xUp = -100; xDown = -100; lineHeight = 1; startHighlight = 0; endHighlight = 0; colourBG.desired = ColourDesired(0xff, 0xff, 0xff); colourUnSel.desired = ColourDesired(0x80, 0x80, 0x80); colourSel.desired = ColourDesired(0, 0, 0x80); colourShade.desired = ColourDesired(0, 0, 0); colourLight.desired = ColourDesired(0xc0, 0xc0, 0xc0); } CallTip::~CallTip() { font.Release(); wCallTip.Destroy(); delete []val; val = 0; } const int widthArrow = 14; void CallTip::RefreshColourPalette(Palette &pal, bool want) { pal.WantFind(colourBG, want); pal.WantFind(colourUnSel, want); pal.WantFind(colourSel, want); pal.WantFind(colourShade, want); pal.WantFind(colourLight, want); } static bool IsArrowCharacter(char ch) { return (ch == 0) || (ch == '\001') || (ch == '\002'); } void CallTip::DrawChunk(Surface *surface, int &x, const char *s, int posStart, int posEnd, int ytext, PRectangle rcClient, bool highlight, bool draw) { s += posStart; int len = posEnd - posStart; int maxEnd = 0; int ends[10]; for (int i=0;i 0) ends[maxEnd++] = i; ends[maxEnd++] = i+1; } } ends[maxEnd++] = len; int startSeg = 0; int xEnd; for (int seg = 0; seg startSeg) { if (IsArrowCharacter(s[startSeg])) { xEnd = x + widthArrow; offsetMain = xEnd; if (draw) { const int halfWidth = widthArrow / 2 - 3; const int centreX = x + widthArrow / 2 - 1; const int centreY = (rcClient.top + rcClient.bottom) / 2; rcClient.left = x; rcClient.right = xEnd; surface->FillRectangle(rcClient, colourBG.allocated); PRectangle rcClientInner(rcClient.left+1, rcClient.top+1, rcClient.right-2, rcClient.bottom-1); surface->FillRectangle(rcClientInner, colourUnSel.allocated); if (s[startSeg] == '\001') { // Up arrow Point pts[] = { Point(centreX - halfWidth, centreY + halfWidth / 2), Point(centreX + halfWidth, centreY + halfWidth / 2), Point(centreX, centreY - halfWidth + halfWidth / 2), }; surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), colourBG.allocated, colourBG.allocated); } else { // Down arrow Point pts[] = { Point(centreX - halfWidth, centreY - halfWidth / 2), Point(centreX + halfWidth, centreY - halfWidth / 2), Point(centreX, centreY + halfWidth - halfWidth / 2), }; surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), colourBG.allocated, colourBG.allocated); } } else { if (s[startSeg] == '\001') { xUp = x+1; } else { xDown = x+1; } } } else { xEnd = x + surface->WidthText(font, s+startSeg, endSeg - startSeg); if (draw) { rcClient.left = x; rcClient.right = xEnd; surface->DrawTextNoClip(rcClient, font, ytext, s+startSeg, endSeg - startSeg, highlight ? colourSel.allocated : colourUnSel.allocated, colourBG.allocated); } } x = xEnd; startSeg = endSeg; } } } int CallTip::PaintContents(Surface *surfaceWindow, bool draw) { PRectangle rcClientPos = wCallTip.GetClientPosition(); PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left, rcClientPos.bottom - rcClientPos.top); PRectangle rcClient(1, 1, rcClientSize.right - 1, rcClientSize.bottom - 1); // To make a nice small call tip window, it is only sized to fit most normal characters without accents int ascent = surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font); // For each line... // Draw the definition in three parts: before highlight, highlighted, after highlight int ytext = rcClient.top + ascent + 1; rcClient.bottom = ytext + surfaceWindow->Descent(font) + 1; char *chunkVal = val; bool moreChunks = true; int maxWidth = 0; while (moreChunks) { char *chunkEnd = strchr(chunkVal, '\n'); if (chunkEnd == NULL) { chunkEnd = chunkVal + strlen(chunkVal); moreChunks = false; } int chunkOffset = chunkVal - val; int chunkLength = chunkEnd - chunkVal; int chunkEndOffset = chunkOffset + chunkLength; int thisStartHighlight = Platform::Maximum(startHighlight, chunkOffset); thisStartHighlight = Platform::Minimum(thisStartHighlight, chunkEndOffset); thisStartHighlight -= chunkOffset; int thisEndHighlight = Platform::Maximum(endHighlight, chunkOffset); thisEndHighlight = Platform::Minimum(thisEndHighlight, chunkEndOffset); thisEndHighlight -= chunkOffset; rcClient.top = ytext - ascent - 1; int x = 5; DrawChunk(surfaceWindow, x, chunkVal, 0, thisStartHighlight, ytext, rcClient, false, draw); DrawChunk(surfaceWindow, x, chunkVal, thisStartHighlight, thisEndHighlight, ytext, rcClient, true, draw); DrawChunk(surfaceWindow, x, chunkVal, thisEndHighlight, chunkLength, ytext, rcClient, false, draw); chunkVal = chunkEnd + 1; ytext += lineHeight; rcClient.bottom += lineHeight; maxWidth = Platform::Maximum(maxWidth, x); } return maxWidth; } void CallTip::PaintCT(Surface *surfaceWindow) { if (!val) return; PRectangle rcClientPos = wCallTip.GetClientPosition(); PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left, rcClientPos.bottom - rcClientPos.top); PRectangle rcClient(1, 1, rcClientSize.right - 1, rcClientSize.bottom - 1); surfaceWindow->FillRectangle(rcClient, colourBG.allocated); offsetMain = 5; PaintContents(surfaceWindow, true); // Draw a raised border around the edges of the window surfaceWindow->MoveTo(0, rcClientSize.bottom - 1); surfaceWindow->PenColour(colourShade.allocated); surfaceWindow->LineTo(rcClientSize.right - 1, rcClientSize.bottom - 1); surfaceWindow->LineTo(rcClientSize.right - 1, 0); surfaceWindow->PenColour(colourLight.allocated); surfaceWindow->LineTo(0, 0); surfaceWindow->LineTo(0, rcClientSize.bottom - 1); } void CallTip::MouseClick(Point pt) { clickPlace = 0; if (pt.y < lineHeight) { if ((pt.x > xUp) && (pt.x < xUp + widthArrow - 2)) { clickPlace = 1; } else if ((pt.x > xDown) && (pt.x < xDown + widthArrow - 2)) { clickPlace = 2; } } } PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn, const char *faceName, int size, int codePage_, int characterSet, Window &wParent) { clickPlace = 0; if (val) delete []val; val = new char[strlen(defn) + 1]; if (!val) return PRectangle(); strcpy(val, defn); codePage = codePage_; Surface *surfaceMeasure = Surface::Allocate(); if (!surfaceMeasure) return PRectangle(); surfaceMeasure->Init(wParent.GetID()); surfaceMeasure->SetUnicodeMode(SC_CP_UTF8 == codePage); surfaceMeasure->SetDBCSMode(codePage); startHighlight = 0; endHighlight = 0; inCallTipMode = true; posStartCallTip = pos; int deviceHeight = surfaceMeasure->DeviceHeightFont(size); font.Create(faceName, characterSet, deviceHeight, false, false); // Look for multiple lines in the text // Only support \n here - simply means container must avoid \r! int numLines = 1; const char *newline; const char *look = val; xUp = -100; xDown = -100; offsetMain = 5; int width = PaintContents(surfaceMeasure, false) + 5; while ((newline = strchr(look, '\n')) != NULL) { look = newline + 1; numLines++; } lineHeight = surfaceMeasure->Height(font); // Extra line for border and an empty line at top and bottom int height = lineHeight * numLines - surfaceMeasure->InternalLeading(font) + 2 + 2; delete surfaceMeasure; return PRectangle(pt.x - offsetMain, pt.y + 1, pt.x + width - offsetMain, pt.y + 1 + height); } void CallTip::CallTipCancel() { inCallTipMode = false; if (wCallTip.Created()) { wCallTip.Destroy(); } } void CallTip::SetHighlight(int start, int end) { // Avoid flashing by checking something has really changed if ((start != startHighlight) || (end != endHighlight)) { startHighlight = start; endHighlight = end; if (wCallTip.Created()) { wCallTip.InvalidateAll(); } } } usr/src/sdlBasic/src/sdlBasic/scintilla/src/DocumentAccessor.h0000777000076500007660000000400610463135222021640 0ustar // Scintilla source code edit control /** @file DocumentAccessor.h ** Implementation of BufferAccess and StylingAccess on a Scintilla ** rapid easy access to contents of a Scintilla. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. class Document; /** */ class DocumentAccessor : public Accessor { // Private so DocumentAccessor objects can not be copied DocumentAccessor(const DocumentAccessor &source) : Accessor(), props(source.props) {} DocumentAccessor &operator=(const DocumentAccessor &) { return *this; } protected: Document *pdoc; PropSet &props; WindowID id; int lenDoc; char styleBuf[bufferSize]; int validLen; char chFlags; char chWhile; unsigned int startSeg; int startPosStyling; int mask; bool InternalIsLeadByte(char ch); void Fill(int position); public: DocumentAccessor(Document *pdoc_, PropSet &props_, WindowID id_=0) : Accessor(), pdoc(pdoc_), props(props_), id(id_), lenDoc(-1), validLen(0), chFlags(0), chWhile(0), startSeg(0), startPosStyling(0), mask(127) { // Initialize the mask to be big enough for any lexer. } ~DocumentAccessor(); bool Match(int pos, const char *s); char StyleAt(int position); int GetLine(int position); int LineStart(int line); int LevelAt(int line); int Length(); void Flush(); int GetLineState(int line); int SetLineState(int line, int state); int GetPropertyInt(const char *key, int defaultValue=0) { return props.GetInt(key, defaultValue); } char *GetProperties() { return props.ToString(); } WindowID GetWindow() { return id; } void StartAt(unsigned int start, char chMask=31); void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; unsigned int GetStartSegment() { return startSeg; } void StartSegment(unsigned int pos); void ColourTo(unsigned int pos, int chAttr); void SetLevel(int line, int level); int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); }; usr/src/sdlBasic/src/sdlBasic/scintilla/src/UniConversion.h0000777000076500007660000000110610463136100021172 0ustar // Scintilla source code edit control /** @file UniConversion.h ** Functions to handle UFT-8 and UCS-2 strings. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen); void UTF8FromUCS2(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len); unsigned int UCS2Length(const char *s, unsigned int len); unsigned int UCS2FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen); usr/src/sdlBasic/src/sdlBasic/scintilla/src/Style.h0000777000076500007660000000267710463136100017507 0ustar // Scintilla source code edit control /** @file Style.h ** Defines the font and colour style for a class of text. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef STYLE_H #define STYLE_H /** */ class Style { public: ColourPair fore; ColourPair back; bool aliasOfDefaultFont; bool bold; bool italic; int size; const char *fontName; int characterSet; bool eolFilled; bool underline; enum ecaseForced {caseMixed, caseUpper, caseLower}; ecaseForced caseForce; bool visible; bool changeable; bool hotspot; Font font; int sizeZoomed; unsigned int lineHeight; unsigned int ascent; unsigned int descent; unsigned int externalLeading; unsigned int aveCharWidth; unsigned int spaceWidth; Style(); Style(const Style &source); ~Style(); Style &operator=(const Style &source); void Clear(ColourDesired fore_, ColourDesired back_, int size_, const char *fontName_, int characterSet_, bool bold_, bool italic_, bool eolFilled_, bool underline_, ecaseForced caseForce_, bool visible_, bool changeable_, bool hotspot_); void ClearTo(const Style &source); bool EquivalentFontTo(const Style *other) const; void Realise(Surface &surface, int zoomLevel, Style *defaultStyle = 0, bool extraFontFlag = false); bool IsProtected() const { return !(changeable && visible);}; }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/Editor.cxx0000777000076500007660000065373510463135620020225 0ustar // Scintilla source code edit control /** @file Editor.cxx ** Main code for the edit control. **/ // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include "Platform.h" #ifndef PLAT_QT #define INCLUDE_DEPRECATED_FEATURES #endif #include "Scintilla.h" #include "ContractionState.h" #include "SVector.h" #include "CellBuffer.h" #include "KeyMap.h" #include "Indicator.h" #include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "ViewStyle.h" #include "Document.h" #include "Editor.h" /* return whether this modification represents an operation that may reasonably be deferred (not done now OR [possibly] at all) */ static bool CanDeferToLastStep(const DocModification& mh) { if (mh.modificationType & (SC_MOD_BEFOREINSERT|SC_MOD_BEFOREDELETE)) return true; // CAN skip if (!(mh.modificationType & (SC_PERFORMED_UNDO|SC_PERFORMED_REDO))) return false; // MUST do if (mh.modificationType & SC_MULTISTEPUNDOREDO) return true; // CAN skip return false; // PRESUMABLY must do } static bool CanEliminate(const DocModification& mh) { return (mh.modificationType & (SC_MOD_BEFOREINSERT|SC_MOD_BEFOREDELETE)) != 0; } /* return whether this modification represents the FINAL step in a [possibly lengthy] multi-step Undo/Redo sequence */ static bool IsLastStep(const DocModification& mh) { return (mh.modificationType & (SC_PERFORMED_UNDO|SC_PERFORMED_REDO)) != 0 && (mh.modificationType & SC_MULTISTEPUNDOREDO) != 0 && (mh.modificationType & SC_LASTSTEPINUNDOREDO) != 0 && (mh.modificationType & SC_MULTILINEUNDOREDO) != 0; } Caret::Caret() : active(false), on(false), period(500) {} Timer::Timer() : ticking(false), ticksToWait(0), tickerID(0) {} Idler::Idler() : state(false), idlerID(0) {} LineLayout::LineLayout(int maxLineLength_) : lineStarts(0), lenLineStarts(0), lineNumber(-1), inCache(false), maxLineLength(-1), numCharsInLine(0), validity(llInvalid), xHighlightGuide(0), highlightColumn(0), selStart(0), selEnd(0), containsCaret(false), edgeColumn(0), chars(0), styles(0), indicators(0), positions(0), hsStart(0), hsEnd(0), widthLine(wrapWidthInfinite), lines(1) { Resize(maxLineLength_); } LineLayout::~LineLayout() { Free(); } void LineLayout::Resize(int maxLineLength_) { if (maxLineLength_ > maxLineLength) { Free(); chars = new char[maxLineLength_ + 1]; styles = new unsigned char[maxLineLength_ + 1]; indicators = new char[maxLineLength_ + 1]; // Extra position allocated as sometimes the Windows // GetTextExtentExPoint API writes an extra element. positions = new int[maxLineLength_ + 1 + 1]; maxLineLength = maxLineLength_; } } void LineLayout::Free() { delete []chars; chars = 0; delete []styles; styles = 0; delete []indicators; indicators = 0; delete []positions; positions = 0; delete []lineStarts; lineStarts = 0; } void LineLayout::Invalidate(validLevel validity_) { if (validity > validity_) validity = validity_; } void LineLayout::SetLineStart(int line, int start) { if ((line >= lenLineStarts) && (line != 0)) { int newMaxLines = line + 20; int *newLineStarts = new int[newMaxLines]; if (!newLineStarts) return; for (int i = 0; i < newMaxLines; i++) { if (i < lenLineStarts) newLineStarts[i] = lineStarts[i]; else newLineStarts[i] = 0; } delete []lineStarts; lineStarts = newLineStarts; lenLineStarts = newMaxLines; } lineStarts[line] = start; } void LineLayout::SetBracesHighlight(Range rangeLine, Position braces[], char bracesMatchStyle, int xHighlight) { if (rangeLine.ContainsCharacter(braces[0])) { int braceOffset = braces[0] - rangeLine.start; if (braceOffset < numCharsInLine) { bracePreviousStyles[0] = styles[braceOffset]; styles[braceOffset] = bracesMatchStyle; } } if (rangeLine.ContainsCharacter(braces[1])) { int braceOffset = braces[1] - rangeLine.start; if (braceOffset < numCharsInLine) { bracePreviousStyles[1] = styles[braceOffset]; styles[braceOffset] = bracesMatchStyle; } } if ((braces[0] >= rangeLine.start && braces[1] <= rangeLine.end) || (braces[1] >= rangeLine.start && braces[0] <= rangeLine.end)) { xHighlightGuide = xHighlight; } } void LineLayout::RestoreBracesHighlight(Range rangeLine, Position braces[]) { if (rangeLine.ContainsCharacter(braces[0])) { int braceOffset = braces[0] - rangeLine.start; if (braceOffset < numCharsInLine) { styles[braceOffset] = bracePreviousStyles[0]; } } if (rangeLine.ContainsCharacter(braces[1])) { int braceOffset = braces[1] - rangeLine.start; if (braceOffset < numCharsInLine) { styles[braceOffset] = bracePreviousStyles[1]; } } xHighlightGuide = 0; } LineLayoutCache::LineLayoutCache() : level(0), length(0), size(0), cache(0), allInvalidated(false), styleClock(-1) { Allocate(0); } LineLayoutCache::~LineLayoutCache() { Deallocate(); } void LineLayoutCache::Allocate(int length_) { allInvalidated = false; length = length_; size = length; if (size > 1) { size = (size / 16 + 1) * 16; } if (size > 0) { cache = new LineLayout * [size]; } for (int i = 0; i < size; i++) cache[i] = 0; } void LineLayoutCache::AllocateForLevel(int linesOnScreen, int linesInDoc) { int lengthForLevel = 0; if (level == llcCaret) { lengthForLevel = 1; } else if (level == llcPage) { lengthForLevel = linesOnScreen + 1; } else if (level == llcDocument) { lengthForLevel = linesInDoc; } if (lengthForLevel > size) { Deallocate(); } else if (lengthForLevel < length) { for (int i = lengthForLevel; i < length; i++) { delete cache[i]; cache[i] = 0; } } if (!cache) { Allocate(lengthForLevel); } } void LineLayoutCache::Deallocate() { for (int i = 0; i < length; i++) delete cache[i]; delete []cache; cache = 0; length = 0; } void LineLayoutCache::Invalidate(LineLayout::validLevel validity_) { if (cache && !allInvalidated) { for (int i = 0; i < length; i++) { if (cache[i]) { cache[i]->Invalidate(validity_); } } if (validity_ == LineLayout::llInvalid) { allInvalidated = true; } } } void LineLayoutCache::SetLevel(int level_) { allInvalidated = false; if ((level_ != -1) && (level != level_)) { level = level_; Deallocate(); } } LineLayout *LineLayoutCache::Retrieve(int lineNumber, int lineCaret, int maxChars, int styleClock_, int linesOnScreen, int linesInDoc) { AllocateForLevel(linesOnScreen, linesInDoc); if (styleClock != styleClock_) { Invalidate(LineLayout::llCheckTextAndStyle); styleClock = styleClock_; } allInvalidated = false; int pos = -1; LineLayout *ret = 0; if (level == llcCaret) { pos = 0; } else if (level == llcPage) { if (lineNumber == lineCaret) { pos = length; } else { pos = lineNumber % length; } } else if (level == llcDocument) { pos = lineNumber; } if (pos >= 0) { if (cache && (pos < length)) { if (cache[pos]) { if ((cache[pos]->lineNumber != lineNumber) || (cache[pos]->maxLineLength < maxChars)) { delete cache[pos]; cache[pos] = 0; } } if (!cache[pos]) { cache[pos] = new LineLayout(maxChars); } if (cache[pos]) { cache[pos]->lineNumber = lineNumber; cache[pos]->inCache = true; ret = cache[pos]; } } } if (!ret) { ret = new LineLayout(maxChars); ret->lineNumber = lineNumber; } return ret; } void LineLayoutCache::Dispose(LineLayout *ll) { allInvalidated = false; if (ll) { if (!ll->inCache) { delete ll; } } } Editor::Editor() { ctrlID = 0; stylesValid = false; printMagnification = 0; printColourMode = SC_PRINT_NORMAL; printWrapState = eWrapWord; cursorMode = SC_CURSORNORMAL; controlCharSymbol = 0; /* Draw the control characters */ hasFocus = false; hideSelection = false; inOverstrike = false; errorStatus = 0; mouseDownCaptures = true; bufferedDraw = true; twoPhaseDraw = true; lastClickTime = 0; dwellDelay = SC_TIME_FOREVER; ticksToDwell = SC_TIME_FOREVER; dwelling = false; ptMouseLast.x = 0; ptMouseLast.y = 0; inDragDrop = false; dropWentOutside = false; posDrag = invalidPosition; posDrop = invalidPosition; selectionType = selChar; lastXChosen = 0; lineAnchor = 0; originalAnchorPos = 0; selType = selStream; moveExtendsSelection = false; xStartSelect = 0; xEndSelect = 0; primarySelection = true; caretXPolicy = CARET_SLOP | CARET_EVEN; caretXSlop = 50; caretYPolicy = CARET_EVEN; caretYSlop = 0; searchAnchor = 0; xOffset = 0; xCaretMargin = 50; horizontalScrollBarVisible = true; scrollWidth = 2000; verticalScrollBarVisible = true; endAtLastLine = true; caretSticky = false; pixmapLine = Surface::Allocate(); pixmapSelMargin = Surface::Allocate(); pixmapSelPattern = Surface::Allocate(); pixmapIndentGuide = Surface::Allocate(); pixmapIndentGuideHighlight = Surface::Allocate(); currentPos = 0; anchor = 0; targetStart = 0; targetEnd = 0; searchFlags = 0; topLine = 0; posTopLine = 0; lengthForEncode = -1; needUpdateUI = true; braces[0] = invalidPosition; braces[1] = invalidPosition; bracesMatchStyle = STYLE_BRACEBAD; highlightGuideColumn = 0; theEdge = 0; paintState = notPainting; modEventMask = SC_MODEVENTMASKALL; pdoc = new Document(); pdoc->AddRef(); pdoc->AddWatcher(this, 0); recordingMacro = false; foldFlags = 0; wrapState = eWrapNone; wrapWidth = LineLayout::wrapWidthInfinite; docLineLastWrapped = -1; docLastLineToWrap = -1; backgroundWrapEnabled = true; wrapVisualFlags = 0; wrapVisualFlagsLocation = 0; wrapVisualStartIndent = 0; actualWrapVisualStartIndent = 0; hsStart = -1; hsEnd = -1; llc.SetLevel(LineLayoutCache::llcCaret); } Editor::~Editor() { pdoc->RemoveWatcher(this, 0); pdoc->Release(); pdoc = 0; DropGraphics(); delete pixmapLine; delete pixmapSelMargin; delete pixmapSelPattern; delete pixmapIndentGuide; delete pixmapIndentGuideHighlight; } void Editor::Finalise() { SetIdle(false); CancelModes(); } void Editor::DropGraphics() { pixmapLine->Release(); pixmapSelMargin->Release(); pixmapSelPattern->Release(); pixmapIndentGuide->Release(); } void Editor::InvalidateStyleData() { stylesValid = false; palette.Release(); DropGraphics(); llc.Invalidate(LineLayout::llInvalid); if (selType == selRectangle) { xStartSelect = XFromPosition(anchor); xEndSelect = XFromPosition(currentPos); } } void Editor::InvalidateStyleRedraw() { NeedWrapping(); InvalidateStyleData(); Redraw(); } void Editor::RefreshColourPalette(Palette &pal, bool want) { vs.RefreshColourPalette(pal, want); } void Editor::RefreshStyleData() { if (!stylesValid) { stylesValid = true; AutoSurface surface(this); if (surface) { vs.Refresh(*surface); RefreshColourPalette(palette, true); palette.Allocate(wMain); RefreshColourPalette(palette, false); } SetScrollBars(); } } PRectangle Editor::GetClientRectangle() { return wMain.GetClientPosition(); } PRectangle Editor::GetTextRectangle() { PRectangle rc = GetClientRectangle(); rc.left += vs.fixedColumnWidth; rc.right -= vs.rightMarginWidth; return rc; } int Editor::LinesOnScreen() { PRectangle rcClient = GetClientRectangle(); int htClient = rcClient.bottom - rcClient.top; //Platform::DebugPrintf("lines on screen = %d\n", htClient / lineHeight + 1); return htClient / vs.lineHeight; } int Editor::LinesToScroll() { int retVal = LinesOnScreen() - 1; if (retVal < 1) return 1; else return retVal; } int Editor::MaxScrollPos() { //Platform::DebugPrintf("Lines %d screen = %d maxScroll = %d\n", //LinesTotal(), LinesOnScreen(), LinesTotal() - LinesOnScreen() + 1); int retVal = cs.LinesDisplayed(); if (endAtLastLine) { retVal -= LinesOnScreen(); } else { retVal--; } if (retVal < 0) { return 0; } else { return retVal; } } static inline bool IsControlCharacter(int ch) { // iscntrl returns true for lots of chars > 127 which are displayable return ch >= 0 && ch < ' '; } const char *ControlCharacterString(unsigned char ch) { const char *reps[] = { "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" }; if (ch < (sizeof(reps) / sizeof(reps[0]))) { return reps[ch]; } else { return "BAD"; } } /** * Convenience class to ensure LineLayout objects are always disposed. */ class AutoLineLayout { LineLayoutCache &llc; LineLayout *ll; AutoLineLayout &operator=(const AutoLineLayout &) { return * this; } public: AutoLineLayout(LineLayoutCache &llc_, LineLayout *ll_) : llc(llc_), ll(ll_) {} ~AutoLineLayout() { llc.Dispose(ll); ll = 0; } LineLayout *operator->() const { return ll; } operator LineLayout *() const { return ll; } void Set(LineLayout *ll_) { llc.Dispose(ll); ll = ll_; } }; /** * Allows to iterate through the lines of a selection. * Althought it can be called for a stream selection, in most cases * it is inefficient and it should be used only for * a rectangular or a line selection. */ class SelectionLineIterator { private: Editor *ed; int line; ///< Current line within the iteration. bool forward; ///< True if iterating by increasing line number, false otherwise. int selStart, selEnd; ///< Positions of the start and end of the selection relative to the start of the document. int minX, maxX; ///< Left and right of selection rectangle. public: int lineStart, lineEnd; ///< Line numbers, first and last lines of the selection. int startPos, endPos; ///< Positions of the beginning and end of the selection on the current line. void Reset() { if (forward) { line = lineStart; } else { line = lineEnd; } } SelectionLineIterator(Editor *ed_, bool forward_ = true) : line(0), startPos(0), endPos(0) { ed = ed_; forward = forward_; selStart = ed->SelectionStart(); selEnd = ed->SelectionEnd(); lineStart = ed->pdoc->LineFromPosition(selStart); lineEnd = ed->pdoc->LineFromPosition(selEnd); // Left of rectangle minX = Platform::Minimum(ed->xStartSelect, ed->xEndSelect); // Right of rectangle maxX = Platform::Maximum(ed->xStartSelect, ed->xEndSelect); Reset(); } ~SelectionLineIterator() {} void SetAt(int line) { if (line < lineStart || line > lineEnd) { startPos = endPos = INVALID_POSITION; } else { if (ed->selType == ed->selRectangle) { // Measure line and return character closest to minX startPos = ed->PositionFromLineX(line, minX); // Measure line and return character closest to maxX endPos = ed->PositionFromLineX(line, maxX); } else if (ed->selType == ed->selLines) { startPos = ed->pdoc->LineStart(line); endPos = ed->pdoc->LineStart(line + 1); } else { // Stream selection, here only for completion if (line == lineStart) { startPos = selStart; } else { startPos = ed->pdoc->LineStart(line); } if (line == lineEnd) { endPos = selEnd; } else { endPos = ed->pdoc->LineStart(line + 1); } } } } bool Iterate() { SetAt(line); if (forward) { line++; } else { line--; } return startPos != INVALID_POSITION; } }; Point Editor::LocationFromPosition(int pos) { Point pt; RefreshStyleData(); if (pos == INVALID_POSITION) return pt; int line = pdoc->LineFromPosition(pos); int lineVisible = cs.DisplayFromDoc(line); //Platform::DebugPrintf("line=%d\n", line); AutoSurface surface(this); AutoLineLayout ll(llc, RetrieveLineLayout(line)); if (surface && ll) { // -1 because of adding in for visible lines in following loop. pt.y = (lineVisible - topLine - 1) * vs.lineHeight; pt.x = 0; unsigned int posLineStart = pdoc->LineStart(line); LayoutLine(line, surface, vs, ll, wrapWidth); int posInLine = pos - posLineStart; // In case of very long line put x at arbitrary large position if (posInLine > ll->maxLineLength) { pt.x = ll->positions[ll->maxLineLength] - ll->positions[ll->LineStart(ll->lines)]; } for (int subLine = 0; subLine < ll->lines; subLine++) { if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) { pt.x = ll->positions[posInLine] - ll->positions[ll->LineStart(subLine)]; if (actualWrapVisualStartIndent != 0) { int lineStart = ll->LineStart(subLine); if (lineStart != 0) // Wrapped pt.x += actualWrapVisualStartIndent * vs.aveCharWidth; } } if (posInLine >= ll->LineStart(subLine)) { pt.y += vs.lineHeight; } } pt.x += vs.fixedColumnWidth - xOffset; } return pt; } int Editor::XFromPosition(int pos) { Point pt = LocationFromPosition(pos); return pt.x - vs.fixedColumnWidth + xOffset; } int Editor::LineFromLocation(Point pt) { return cs.DocFromDisplay(pt.y / vs.lineHeight + topLine); } void Editor::SetTopLine(int topLineNew) { topLine = topLineNew; posTopLine = pdoc->LineStart(cs.DocFromDisplay(topLine)); } static inline bool IsEOLChar(char ch) { return (ch == '\r') || (ch == '\n'); } int Editor::PositionFromLocation(Point pt) { RefreshStyleData(); pt.x = pt.x - vs.fixedColumnWidth + xOffset; int visibleLine = pt.y / vs.lineHeight + topLine; if (pt.y < 0) { // Division rounds towards 0 visibleLine = (pt.y - (vs.lineHeight - 1)) / vs.lineHeight + topLine; } if (visibleLine < 0) visibleLine = 0; int lineDoc = cs.DocFromDisplay(visibleLine); if (lineDoc >= pdoc->LinesTotal()) return pdoc->Length(); unsigned int posLineStart = pdoc->LineStart(lineDoc); int retVal = posLineStart; AutoSurface surface(this); AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); if (surface && ll) { LayoutLine(lineDoc, surface, vs, ll, wrapWidth); int lineStartSet = cs.DisplayFromDoc(lineDoc); int subLine = visibleLine - lineStartSet; if (subLine < ll->lines) { int lineStart = ll->LineStart(subLine); int lineEnd = ll->LineStart(subLine + 1); int subLineStart = ll->positions[lineStart]; if (actualWrapVisualStartIndent != 0) { if (lineStart != 0) // Wrapped pt.x -= actualWrapVisualStartIndent * vs.aveCharWidth; } for (int i = lineStart; i < lineEnd; i++) { if (pt.x < (((ll->positions[i] + ll->positions[i + 1]) / 2) - subLineStart) || IsEOLChar(ll->chars[i])) { return pdoc->MovePositionOutsideChar(i + posLineStart, 1); } } return lineEnd + posLineStart; } retVal = ll->numCharsInLine + posLineStart; } return retVal; } // Like PositionFromLocation but INVALID_POSITION returned when not near any text. int Editor::PositionFromLocationClose(Point pt) { RefreshStyleData(); PRectangle rcClient = GetTextRectangle(); if (!rcClient.Contains(pt)) return INVALID_POSITION; if (pt.x < vs.fixedColumnWidth) return INVALID_POSITION; if (pt.y < 0) return INVALID_POSITION; pt.x = pt.x - vs.fixedColumnWidth + xOffset; int visibleLine = pt.y / vs.lineHeight + topLine; if (pt.y < 0) { // Division rounds towards 0 visibleLine = (pt.y - (vs.lineHeight - 1)) / vs.lineHeight + topLine; } int lineDoc = cs.DocFromDisplay(visibleLine); if (lineDoc < 0) return INVALID_POSITION; if (lineDoc >= pdoc->LinesTotal()) return INVALID_POSITION; AutoSurface surface(this); AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); if (surface && ll) { LayoutLine(lineDoc, surface, vs, ll, wrapWidth); unsigned int posLineStart = pdoc->LineStart(lineDoc); int lineStartSet = cs.DisplayFromDoc(lineDoc); int subLine = visibleLine - lineStartSet; if (subLine < ll->lines) { int lineStart = ll->LineStart(subLine); int lineEnd = ll->LineStart(subLine + 1); int subLineStart = ll->positions[lineStart]; if (actualWrapVisualStartIndent != 0) { if (lineStart != 0) // Wrapped pt.x -= actualWrapVisualStartIndent * vs.aveCharWidth; } for (int i = lineStart; i < lineEnd; i++) { if (pt.x < (((ll->positions[i] + ll->positions[i + 1]) / 2) - subLineStart) || IsEOLChar(ll->chars[i])) { return pdoc->MovePositionOutsideChar(i + posLineStart, 1); } } } } return INVALID_POSITION; } /** * Find the document position corresponding to an x coordinate on a particular document line. * Ensure is between whole characters when document is in multi-byte or UTF-8 mode. */ int Editor::PositionFromLineX(int lineDoc, int x) { RefreshStyleData(); if (lineDoc >= pdoc->LinesTotal()) return pdoc->Length(); //Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine); AutoSurface surface(this); AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); int retVal = 0; if (surface && ll) { unsigned int posLineStart = pdoc->LineStart(lineDoc); LayoutLine(lineDoc, surface, vs, ll, wrapWidth); retVal = ll->numCharsInLine + posLineStart; int subLine = 0; int lineStart = ll->LineStart(subLine); int lineEnd = ll->LineStart(subLine + 1); int subLineStart = ll->positions[lineStart]; if (actualWrapVisualStartIndent != 0) { if (lineStart != 0) // Wrapped x -= actualWrapVisualStartIndent * vs.aveCharWidth; } for (int i = lineStart; i < lineEnd; i++) { if (x < (((ll->positions[i] + ll->positions[i + 1]) / 2) - subLineStart) || IsEOLChar(ll->chars[i])) { retVal = pdoc->MovePositionOutsideChar(i + posLineStart, 1); break; } } } return retVal; } /** * If painting then abandon the painting because a wider redraw is needed. * @return true if calling code should stop drawing. */ bool Editor::AbandonPaint() { if ((paintState == painting) && !paintingAllText) { paintState = paintAbandoned; } return paintState == paintAbandoned; } void Editor::RedrawRect(PRectangle rc) { //Platform::DebugPrintf("Redraw %0d,%0d - %0d,%0d\n", rc.left, rc.top, rc.right, rc.bottom); // Clip the redraw rectangle into the client area PRectangle rcClient = GetClientRectangle(); if (rc.top < rcClient.top) rc.top = rcClient.top; if (rc.bottom > rcClient.bottom) rc.bottom = rcClient.bottom; if (rc.left < rcClient.left) rc.left = rcClient.left; if (rc.right > rcClient.right) rc.right = rcClient.right; if ((rc.bottom > rc.top) && (rc.right > rc.left)) { wMain.InvalidateRectangle(rc); } } void Editor::Redraw() { //Platform::DebugPrintf("Redraw all\n"); PRectangle rcClient = GetClientRectangle(); wMain.InvalidateRectangle(rcClient); //wMain.InvalidateAll(); } void Editor::RedrawSelMargin() { if (!AbandonPaint()) { if (vs.maskInLine) { Redraw(); } else { PRectangle rcSelMargin = GetClientRectangle(); rcSelMargin.right = vs.fixedColumnWidth; wMain.InvalidateRectangle(rcSelMargin); } } } PRectangle Editor::RectangleFromRange(int start, int end) { int minPos = start; if (minPos > end) minPos = end; int maxPos = start; if (maxPos < end) maxPos = end; int minLine = cs.DisplayFromDoc(pdoc->LineFromPosition(minPos)); int lineDocMax = pdoc->LineFromPosition(maxPos); int maxLine = cs.DisplayFromDoc(lineDocMax) + cs.GetHeight(lineDocMax) - 1; PRectangle rcClient = GetTextRectangle(); PRectangle rc; rc.left = vs.fixedColumnWidth; rc.top = (minLine - topLine) * vs.lineHeight; if (rc.top < 0) rc.top = 0; rc.right = rcClient.right; rc.bottom = (maxLine - topLine + 1) * vs.lineHeight; // Ensure PRectangle is within 16 bit space rc.top = Platform::Clamp(rc.top, -32000, 32000); rc.bottom = Platform::Clamp(rc.bottom, -32000, 32000); return rc; } void Editor::InvalidateRange(int start, int end) { RedrawRect(RectangleFromRange(start, end)); } int Editor::CurrentPosition() { return currentPos; } bool Editor::SelectionEmpty() { return anchor == currentPos; } int Editor::SelectionStart() { return Platform::Minimum(currentPos, anchor); } int Editor::SelectionEnd() { return Platform::Maximum(currentPos, anchor); } void Editor::SetRectangularRange() { if (selType == selRectangle) { xStartSelect = XFromPosition(anchor); xEndSelect = XFromPosition(currentPos); } } void Editor::InvalidateSelection(int currentPos_, int anchor_) { int firstAffected = anchor; if (firstAffected > currentPos) firstAffected = currentPos; if (firstAffected > anchor_) firstAffected = anchor_; if (firstAffected > currentPos_) firstAffected = currentPos_; int lastAffected = anchor; if (lastAffected < currentPos) lastAffected = currentPos; if (lastAffected < anchor_) lastAffected = anchor_; if (lastAffected < (currentPos_ + 1)) // +1 ensures caret repainted lastAffected = (currentPos_ + 1); needUpdateUI = true; InvalidateRange(firstAffected, lastAffected); } void Editor::SetSelection(int currentPos_, int anchor_) { currentPos_ = pdoc->ClampPositionIntoDocument(currentPos_); anchor_ = pdoc->ClampPositionIntoDocument(anchor_); if ((currentPos != currentPos_) || (anchor != anchor_)) { InvalidateSelection(currentPos_, anchor_); currentPos = currentPos_; anchor = anchor_; } SetRectangularRange(); ClaimSelection(); } void Editor::SetSelection(int currentPos_) { currentPos_ = pdoc->ClampPositionIntoDocument(currentPos_); if (currentPos != currentPos_) { InvalidateSelection(currentPos_, currentPos_); currentPos = currentPos_; } SetRectangularRange(); ClaimSelection(); } void Editor::SetEmptySelection(int currentPos_) { selType = selStream; moveExtendsSelection = false; SetSelection(currentPos_, currentPos_); } bool Editor::RangeContainsProtected(int start, int end) const { if (vs.ProtectionActive()) { if (start > end) { int t = start; start = end; end = t; } int mask = pdoc->stylingBitsMask; for (int pos = start; pos < end; pos++) { if (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected()) return true; } } return false; } bool Editor::SelectionContainsProtected() { // DONE, but untested...: make support rectangular selection bool scp = false; if (selType == selStream) { scp = RangeContainsProtected(anchor, currentPos); } else { SelectionLineIterator lineIterator(this); while (lineIterator.Iterate()) { if (RangeContainsProtected(lineIterator.startPos, lineIterator.endPos)) { scp = true; break; } } } return scp; } /** * Asks document to find a good position and then moves out of any invisible positions. */ int Editor::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) { pos = pdoc->MovePositionOutsideChar(pos, moveDir, checkLineEnd); if (vs.ProtectionActive()) { int mask = pdoc->stylingBitsMask; if (moveDir > 0) { if ((pos > 0) && vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected()) { while ((pos < pdoc->Length()) && (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected())) pos++; } } else if (moveDir < 0) { if (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected()) { while ((pos > 0) && (vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected())) pos--; } } } return pos; } int Editor::MovePositionTo(int newPos, selTypes sel, bool ensureVisible) { int delta = newPos - currentPos; newPos = pdoc->ClampPositionIntoDocument(newPos); newPos = MovePositionOutsideChar(newPos, delta); if (sel != noSel) { selType = sel; } if (sel != noSel || moveExtendsSelection) { SetSelection(newPos); } else { SetEmptySelection(newPos); } ShowCaretAtCurrentPosition(); if (ensureVisible) { EnsureCaretVisible(); } NotifyMove(newPos); return 0; } int Editor::MovePositionSoVisible(int pos, int moveDir) { pos = pdoc->ClampPositionIntoDocument(pos); pos = MovePositionOutsideChar(pos, moveDir); int lineDoc = pdoc->LineFromPosition(pos); if (cs.GetVisible(lineDoc)) { return pos; } else { int lineDisplay = cs.DisplayFromDoc(lineDoc); if (moveDir > 0) { // lineDisplay is already line before fold as lines in fold use display line of line after fold lineDisplay = Platform::Clamp(lineDisplay, 0, cs.LinesDisplayed()); return pdoc->LineStart(cs.DocFromDisplay(lineDisplay)); } else { lineDisplay = Platform::Clamp(lineDisplay - 1, 0, cs.LinesDisplayed()); return pdoc->LineEnd(cs.DocFromDisplay(lineDisplay)); } } } /** * Choose the x position that the caret will try to stick to * as it moves up and down. */ void Editor::SetLastXChosen() { Point pt = LocationFromPosition(currentPos); lastXChosen = pt.x; } void Editor::ScrollTo(int line, bool moveThumb) { int topLineNew = Platform::Clamp(line, 0, MaxScrollPos()); if (topLineNew != topLine) { // Try to optimise small scrolls int linesToMove = topLine - topLineNew; SetTopLine(topLineNew); ShowCaretAtCurrentPosition(); // Perform redraw rather than scroll if many lines would be redrawn anyway. #ifndef UNDER_CE if (abs(linesToMove) <= 10) { ScrollText(linesToMove); } else { Redraw(); } #else Redraw(); #endif if (moveThumb) { SetVerticalScrollPos(); } } } void Editor::ScrollText(int /* linesToMove */) { //Platform::DebugPrintf("Editor::ScrollText %d\n", linesToMove); Redraw(); } void Editor::HorizontalScrollTo(int xPos) { //Platform::DebugPrintf("HorizontalScroll %d\n", xPos); if (xPos < 0) xPos = 0; if ((wrapState == eWrapNone) && (xOffset != xPos)) { xOffset = xPos; SetHorizontalScrollPos(); RedrawRect(GetClientRectangle()); } } void Editor::MoveCaretInsideView(bool ensureVisible) { PRectangle rcClient = GetTextRectangle(); Point pt = LocationFromPosition(currentPos); if (pt.y < rcClient.top) { MovePositionTo(PositionFromLocation( Point(lastXChosen, rcClient.top)), noSel, ensureVisible); } else if ((pt.y + vs.lineHeight - 1) > rcClient.bottom) { int yOfLastLineFullyDisplayed = rcClient.top + (LinesOnScreen() - 1) * vs.lineHeight; MovePositionTo(PositionFromLocation( Point(lastXChosen, rcClient.top + yOfLastLineFullyDisplayed)), noSel, ensureVisible); } } int Editor::DisplayFromPosition(int pos) { int lineDoc = pdoc->LineFromPosition(pos); int lineDisplay = cs.DisplayFromDoc(lineDoc); AutoSurface surface(this); AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); if (surface && ll) { LayoutLine(lineDoc, surface, vs, ll, wrapWidth); unsigned int posLineStart = pdoc->LineStart(lineDoc); int posInLine = pos - posLineStart; lineDisplay--; // To make up for first increment ahead. for (int subLine = 0; subLine < ll->lines; subLine++) { if (posInLine >= ll->LineStart(subLine)) { lineDisplay++; } } } return lineDisplay; } /** * Ensure the caret is reasonably visible in context. * Caret policy in SciTE If slop is set, we can define a slop value. This value defines an unwanted zone (UZ) where the caret is... unwanted. This zone is defined as a number of pixels near the vertical margins, and as a number of lines near the horizontal margins. By keeping the caret away from the edges, it is seen within its context, so it is likely that the identifier that the caret is on can be completely seen, and that the current line is seen with some of the lines following it which are often dependent on that line. If strict is set, the policy is enforced... strictly. The caret is centred on the display if slop is not set, and cannot go in the UZ if slop is set. If jumps is set, the display is moved more energetically so the caret can move in the same direction longer before the policy is applied again. '3UZ' notation is used to indicate three time the size of the UZ as a distance to the margin. If even is not set, instead of having symmetrical UZs, the left and bottom UZs are extended up to right and top UZs respectively. This way, we favour the displaying of useful information: the begining of lines, where most code reside, and the lines after the caret, eg. the body of a function. | | | | | slop | strict | jumps | even | Caret can go to the margin | When reaching limitÝ(caret going out of | | | | | visibility or going into the UZ) display is... -----+--------+-------+------+--------------------------------------------+-------------------------------------------------------------- 0 | 0 | 0 | 0 | Yes | moved to put caret on top/on right 0 | 0 | 0 | 1 | Yes | moved by one position 0 | 0 | 1 | 0 | Yes | moved to put caret on top/on right 0 | 0 | 1 | 1 | Yes | centred on the caret 0 | 1 | - | 0 | Caret is always on top/on right of display | - 0 | 1 | - | 1 | No, caret is always centred | - 1 | 0 | 0 | 0 | Yes | moved to put caret out of the asymmetrical UZ 1 | 0 | 0 | 1 | Yes | moved to put caret out of the UZ 1 | 0 | 1 | 0 | Yes | moved to put caret at 3UZ of the top or right margin 1 | 0 | 1 | 1 | Yes | moved to put caret at 3UZ of the margin 1 | 1 | - | 0 | Caret is always at UZ of top/right margin | - 1 | 1 | 0 | 1 | No, kept out of UZ | moved by one position 1 | 1 | 1 | 1 | No, kept out of UZ | moved to put caret at 3UZ of the margin */ void Editor::EnsureCaretVisible(bool useMargin, bool vert, bool horiz) { //Platform::DebugPrintf("EnsureCaretVisible %d %s\n", xOffset, useMargin ? " margin" : " "); PRectangle rcClient = GetTextRectangle(); //int rcClientFullWidth = rcClient.Width(); int posCaret = currentPos; if (posDrag >= 0) { posCaret = posDrag; } Point pt = LocationFromPosition(posCaret); Point ptBottomCaret = pt; ptBottomCaret.y += vs.lineHeight - 1; int lineCaret = DisplayFromPosition(posCaret); bool bSlop, bStrict, bJump, bEven; // Vertical positioning if (vert && (pt.y < rcClient.top || ptBottomCaret.y > rcClient.bottom || (caretYPolicy & CARET_STRICT) != 0)) { int linesOnScreen = LinesOnScreen(); int halfScreen = Platform::Maximum(linesOnScreen - 1, 2) / 2; int newTopLine = topLine; bSlop = (caretYPolicy & CARET_SLOP) != 0; bStrict = (caretYPolicy & CARET_STRICT) != 0; bJump = (caretYPolicy & CARET_JUMPS) != 0; bEven = (caretYPolicy & CARET_EVEN) != 0; // It should be possible to scroll the window to show the caret, // but this fails to remove the caret on GTK+ if (bSlop) { // A margin is defined int yMoveT, yMoveB; if (bStrict) { int yMarginT, yMarginB; if (!useMargin) { // In drag mode, avoid moves // otherwise, a double click will select several lines. yMarginT = yMarginB = 0; } else { // yMarginT must equal to caretYSlop, with a minimum of 1 and // a maximum of slightly less than half the heigth of the text area. yMarginT = Platform::Clamp(caretYSlop, 1, halfScreen); if (bEven) { yMarginB = yMarginT; } else { yMarginB = linesOnScreen - yMarginT - 1; } } yMoveT = yMarginT; if (bEven) { if (bJump) { yMoveT = Platform::Clamp(caretYSlop * 3, 1, halfScreen); } yMoveB = yMoveT; } else { yMoveB = linesOnScreen - yMoveT - 1; } if (lineCaret < topLine + yMarginT) { // Caret goes too high newTopLine = lineCaret - yMoveT; } else if (lineCaret > topLine + linesOnScreen - 1 - yMarginB) { // Caret goes too low newTopLine = lineCaret - linesOnScreen + 1 + yMoveB; } } else { // Not strict yMoveT = bJump ? caretYSlop * 3 : caretYSlop; yMoveT = Platform::Clamp(yMoveT, 1, halfScreen); if (bEven) { yMoveB = yMoveT; } else { yMoveB = linesOnScreen - yMoveT - 1; } if (lineCaret < topLine) { // Caret goes too high newTopLine = lineCaret - yMoveT; } else if (lineCaret > topLine + linesOnScreen - 1) { // Caret goes too low newTopLine = lineCaret - linesOnScreen + 1 + yMoveB; } } } else { // No slop if (!bStrict && !bJump) { // Minimal move if (lineCaret < topLine) { // Caret goes too high newTopLine = lineCaret; } else if (lineCaret > topLine + linesOnScreen - 1) { // Caret goes too low if (bEven) { newTopLine = lineCaret - linesOnScreen + 1; } else { newTopLine = lineCaret; } } } else { // Strict or going out of display if (bEven) { // Always center caret newTopLine = lineCaret - halfScreen; } else { // Always put caret on top of display newTopLine = lineCaret; } } } newTopLine = Platform::Clamp(newTopLine, 0, MaxScrollPos()); if (newTopLine != topLine) { Redraw(); SetTopLine(newTopLine); SetVerticalScrollPos(); } } // Horizontal positioning if (horiz && (wrapState == eWrapNone)) { int halfScreen = Platform::Maximum(rcClient.Width() - 4, 4) / 2; int xOffsetNew = xOffset; bSlop = (caretXPolicy & CARET_SLOP) != 0; bStrict = (caretXPolicy & CARET_STRICT) != 0; bJump = (caretXPolicy & CARET_JUMPS) != 0; bEven = (caretXPolicy & CARET_EVEN) != 0; if (bSlop) { // A margin is defined int xMoveL, xMoveR; if (bStrict) { int xMarginL, xMarginR; if (!useMargin) { // In drag mode, avoid moves unless very near of the margin // otherwise, a simple click will select text. xMarginL = xMarginR = 2; } else { // xMargin must equal to caretXSlop, with a minimum of 2 and // a maximum of slightly less than half the width of the text area. xMarginR = Platform::Clamp(caretXSlop, 2, halfScreen); if (bEven) { xMarginL = xMarginR; } else { xMarginL = rcClient.Width() - xMarginR - 4; } } if (bJump && bEven) { // Jump is used only in even mode xMoveL = xMoveR = Platform::Clamp(caretXSlop * 3, 1, halfScreen); } else { xMoveL = xMoveR = 0; // Not used, avoid a warning } if (pt.x < rcClient.left + xMarginL) { // Caret is on the left of the display if (bJump && bEven) { xOffsetNew -= xMoveL; } else { // Move just enough to allow to display the caret xOffsetNew -= (rcClient.left + xMarginL) - pt.x; } } else if (pt.x >= rcClient.right - xMarginR) { // Caret is on the right of the display if (bJump && bEven) { xOffsetNew += xMoveR; } else { // Move just enough to allow to display the caret xOffsetNew += pt.x - (rcClient.right - xMarginR) + 1; } } } else { // Not strict xMoveR = bJump ? caretXSlop * 3 : caretXSlop; xMoveR = Platform::Clamp(xMoveR, 1, halfScreen); if (bEven) { xMoveL = xMoveR; } else { xMoveL = rcClient.Width() - xMoveR - 4; } if (pt.x < rcClient.left) { // Caret is on the left of the display xOffsetNew -= xMoveL; } else if (pt.x >= rcClient.right) { // Caret is on the right of the display xOffsetNew += xMoveR; } } } else { // No slop if (bStrict || (bJump && (pt.x < rcClient.left || pt.x >= rcClient.right))) { // Strict or going out of display if (bEven) { // Center caret xOffsetNew += pt.x - rcClient.left - halfScreen; } else { // Put caret on right xOffsetNew += pt.x - rcClient.right + 1; } } else { // Move just enough to allow to display the caret if (pt.x < rcClient.left) { // Caret is on the left of the display if (bEven) { xOffsetNew -= rcClient.left - pt.x; } else { xOffsetNew += pt.x - rcClient.right + 1; } } else if (pt.x >= rcClient.right) { // Caret is on the right of the display xOffsetNew += pt.x - rcClient.right + 1; } } } // In case of a jump (find result) largely out of display, adjust the offset to display the caret if (pt.x + xOffset < rcClient.left + xOffsetNew) { xOffsetNew = pt.x + xOffset - rcClient.left; } else if (pt.x + xOffset >= rcClient.right + xOffsetNew) { xOffsetNew = pt.x + xOffset - rcClient.right + 1; } if (xOffsetNew < 0) { xOffsetNew = 0; } if (xOffset != xOffsetNew) { xOffset = xOffsetNew; if (xOffsetNew > 0) { PRectangle rcText = GetTextRectangle(); if (horizontalScrollBarVisible == true && rcText.Width() + xOffset > scrollWidth) { scrollWidth = xOffset + rcText.Width(); SetScrollBars(); } } SetHorizontalScrollPos(); Redraw(); } } UpdateSystemCaret(); } void Editor::ShowCaretAtCurrentPosition() { if (hasFocus) { caret.active = true; caret.on = true; SetTicking(true); } else { caret.active = false; caret.on = false; } InvalidateCaret(); } void Editor::DropCaret() { caret.active = false; InvalidateCaret(); } void Editor::InvalidateCaret() { if (posDrag >= 0) InvalidateRange(posDrag, posDrag + 1); else InvalidateRange(currentPos, currentPos + 1); UpdateSystemCaret(); } void Editor::UpdateSystemCaret() { } void Editor::NeedWrapping(int docLineStartWrapping, int docLineEndWrapping) { docLineStartWrapping = Platform::Minimum(docLineStartWrapping, pdoc->LinesTotal()-1); docLineEndWrapping = Platform::Minimum(docLineEndWrapping, pdoc->LinesTotal()-1); bool noWrap = (docLastLineToWrap == docLineLastWrapped); if (docLineLastWrapped > (docLineStartWrapping - 1)) { docLineLastWrapped = docLineStartWrapping - 1; if (docLineLastWrapped < -1) docLineLastWrapped = -1; llc.Invalidate(LineLayout::llPositions); } if (noWrap) { docLastLineToWrap = docLineEndWrapping; } else if (docLastLineToWrap < docLineEndWrapping) { docLastLineToWrap = docLineEndWrapping + 1; } if (docLastLineToWrap < -1) docLastLineToWrap = -1; if (docLastLineToWrap >= pdoc->LinesTotal()) docLastLineToWrap = pdoc->LinesTotal()-1; // Wrap lines during idle. if ((wrapState != eWrapNone) && backgroundWrapEnabled && (docLastLineToWrap != docLineLastWrapped)) { SetIdle(true); } } // Check if wrapping needed and perform any needed wrapping. // fullwrap: if true, all lines which need wrapping will be done, // in this single call. // priorityWrapLineStart: If greater than zero, all lines starting from // here to 100 lines past will be wrapped (even if there are // more lines under wrapping process in idle). // If it is neither fullwrap, nor priorityWrap, then 100 lines will be // wrapped, if there are any wrapping going on in idle. (Generally this // condition is called only from idler). // Return true if wrapping occurred. bool Editor::WrapLines(bool fullWrap, int priorityWrapLineStart) { // If there are any pending wraps, do them during idle if possible. if (wrapState != eWrapNone) { if (docLineLastWrapped < docLastLineToWrap) { if (!(backgroundWrapEnabled && SetIdle(true))) { // Background wrapping is disabled, or idle processing // not supported. A full wrap is required. fullWrap = true; } } if (!fullWrap && priorityWrapLineStart >= 0 && // .. and if the paint window is outside pending wraps (((priorityWrapLineStart + 100) < docLineLastWrapped) || (priorityWrapLineStart > docLastLineToWrap))) { // No priority wrap pending return false; } } int goodTopLine = topLine; bool wrapOccurred = false; if (docLineLastWrapped < pdoc->LinesTotal()) { if (wrapState == eWrapNone) { if (wrapWidth != LineLayout::wrapWidthInfinite) { wrapWidth = LineLayout::wrapWidthInfinite; for (int lineDoc = 0; lineDoc < pdoc->LinesTotal(); lineDoc++) { cs.SetHeight(lineDoc, 1); } wrapOccurred = true; } docLineLastWrapped = 0x7ffffff; } else { //ElapsedTime et; int lineDocTop = cs.DocFromDisplay(topLine); int subLineTop = topLine - cs.DisplayFromDoc(lineDocTop); PRectangle rcTextArea = GetClientRectangle(); rcTextArea.left = vs.fixedColumnWidth; rcTextArea.right -= vs.rightMarginWidth; wrapWidth = rcTextArea.Width(); // Ensure all of the document is styled. pdoc->EnsureStyledTo(pdoc->Length()); RefreshStyleData(); AutoSurface surface(this); if (surface) { bool priorityWrap = false; int lastLineToWrap = docLastLineToWrap; int firstLineToWrap = docLineLastWrapped; if (!fullWrap) { if (priorityWrapLineStart >= 0) { // This is a priority wrap. firstLineToWrap = priorityWrapLineStart; lastLineToWrap = firstLineToWrap + 100; priorityWrap = true; } else { // This is idle wrap. lastLineToWrap = docLineLastWrapped + 100; } if (lastLineToWrap >= docLastLineToWrap) lastLineToWrap = docLastLineToWrap; } // else do a fullWrap. // printf("Wraplines: full = %d, priorityStart = %d (wrapping: %d to %d)\n", fullWrap, priorityWrapLineStart, firstLineToWrap, lastLineToWrap); // printf("Pending wraps: %d to %d\n", docLineLastWrapped, docLastLineToWrap); while (firstLineToWrap < lastLineToWrap) { firstLineToWrap++; if (!priorityWrap) docLineLastWrapped++; if (firstLineToWrap < pdoc->LinesTotal()) { AutoLineLayout ll(llc, RetrieveLineLayout(firstLineToWrap)); int linesWrapped = 1; if (ll) { LayoutLine(firstLineToWrap, surface, vs, ll, wrapWidth); linesWrapped = ll->lines; } if (cs.SetHeight(firstLineToWrap, linesWrapped)) { wrapOccurred = true; } } } // If wrapping is done, bring it to resting position if (docLineLastWrapped > docLastLineToWrap) { docLineLastWrapped = -1; docLastLineToWrap = -1; } } goodTopLine = cs.DisplayFromDoc(lineDocTop); if (subLineTop < cs.GetHeight(lineDocTop)) goodTopLine += subLineTop; else goodTopLine += cs.GetHeight(lineDocTop); //double durWrap = et.Duration(true); //Platform::DebugPrintf("Wrap:%9.6g \n", durWrap); } } if (wrapOccurred) { SetScrollBars(); SetTopLine(Platform::Clamp(goodTopLine, 0, MaxScrollPos())); SetVerticalScrollPos(); } return wrapOccurred; } void Editor::LinesJoin() { if (!RangeContainsProtected(targetStart, targetEnd)) { pdoc->BeginUndoAction(); bool prevNonWS = true; for (int pos = targetStart; pos < targetEnd; pos++) { if (IsEOLChar(pdoc->CharAt(pos))) { targetEnd -= pdoc->LenChar(pos); pdoc->DelChar(pos); if (prevNonWS) { // Ensure at least one space separating previous lines pdoc->InsertChar(pos, ' '); } } else { prevNonWS = pdoc->CharAt(pos) != ' '; } } pdoc->EndUndoAction(); } } const char *StringFromEOLMode(int eolMode) { if (eolMode == SC_EOL_CRLF) { return "\r\n"; } else if (eolMode == SC_EOL_CR) { return "\r"; } else { return "\n"; } } void Editor::LinesSplit(int pixelWidth) { if (!RangeContainsProtected(targetStart, targetEnd)) { if (pixelWidth == 0) { PRectangle rcText = GetTextRectangle(); pixelWidth = rcText.Width(); } int lineStart = pdoc->LineFromPosition(targetStart); int lineEnd = pdoc->LineFromPosition(targetEnd); const char *eol = StringFromEOLMode(pdoc->eolMode); pdoc->BeginUndoAction(); for (int line = lineStart; line <= lineEnd; line++) { AutoSurface surface(this); AutoLineLayout ll(llc, RetrieveLineLayout(line)); if (surface && ll) { unsigned int posLineStart = pdoc->LineStart(line); LayoutLine(line, surface, vs, ll, pixelWidth); for (int subLine = 1; subLine < ll->lines; subLine++) { pdoc->InsertString(posLineStart + (subLine - 1) * strlen(eol) + ll->LineStart(subLine), eol); targetEnd += static_cast(strlen(eol)); } } } pdoc->EndUndoAction(); } } int Editor::SubstituteMarkerIfEmpty(int markerCheck, int markerDefault) { if (vs.markers[markerCheck].markType == SC_MARK_EMPTY) return markerDefault; return markerCheck; } // Avoid 64 bit compiler warnings. // Scintilla does not support text buffers larger than 2**31 static int istrlen(const char *s) { return static_cast(strlen(s)); } void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { if (vs.fixedColumnWidth == 0) return; PRectangle rcMargin = GetClientRectangle(); rcMargin.right = vs.fixedColumnWidth; if (!rc.Intersects(rcMargin)) return; Surface *surface; if (bufferedDraw) { surface = pixmapSelMargin; } else { surface = surfWindow; } PRectangle rcSelMargin = rcMargin; rcSelMargin.right = rcMargin.left; for (int margin = 0; margin < vs.margins; margin++) { if (vs.ms[margin].width > 0) { rcSelMargin.left = rcSelMargin.right; rcSelMargin.right = rcSelMargin.left + vs.ms[margin].width; if (vs.ms[margin].symbol) { /* alternate scheme: if (vs.ms[margin].mask & SC_MASK_FOLDERS) surface->FillRectangle(rcSelMargin, vs.styles[STYLE_DEFAULT].back.allocated); else // Required because of special way brush is created for selection margin surface->FillRectangle(rcSelMargin, pixmapSelPattern); */ if (vs.ms[margin].mask & SC_MASK_FOLDERS) // Required because of special way brush is created for selection margin surface->FillRectangle(rcSelMargin, *pixmapSelPattern); else surface->FillRectangle(rcSelMargin, vs.styles[STYLE_LINENUMBER].back.allocated); } else { surface->FillRectangle(rcSelMargin, vs.styles[STYLE_LINENUMBER].back.allocated); } int visibleLine = topLine; int yposScreen = 0; // Work out whether the top line is whitespace located after a // lessening of fold level which implies a 'fold tail' but which should not // be displayed until the last of a sequence of whitespace. bool needWhiteClosure = false; int level = pdoc->GetLevel(cs.DocFromDisplay(topLine)); if (level & SC_FOLDLEVELWHITEFLAG) { int lineBack = cs.DocFromDisplay(topLine); int levelPrev = level; while ((lineBack > 0) && (levelPrev & SC_FOLDLEVELWHITEFLAG)) { lineBack--; levelPrev = pdoc->GetLevel(lineBack); } if (!(levelPrev & SC_FOLDLEVELHEADERFLAG)) { if ((level & SC_FOLDLEVELNUMBERMASK) < (levelPrev & SC_FOLDLEVELNUMBERMASK)) needWhiteClosure = true; } } // Old code does not know about new markers needed to distinguish all cases int folderOpenMid = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEROPENMID, SC_MARKNUM_FOLDEROPEN); int folderEnd = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEREND, SC_MARKNUM_FOLDER); while ((visibleLine < cs.LinesDisplayed()) && yposScreen < rcMargin.bottom) { PLATFORM_ASSERT(visibleLine < cs.LinesDisplayed()); int lineDoc = cs.DocFromDisplay(visibleLine); PLATFORM_ASSERT(cs.GetVisible(lineDoc)); bool firstSubLine = visibleLine == cs.DisplayFromDoc(lineDoc); // Decide which fold indicator should be displayed level = pdoc->GetLevel(lineDoc); int levelNext = pdoc->GetLevel(lineDoc + 1); int marks = pdoc->GetMark(lineDoc); if (!firstSubLine) marks = 0; int levelNum = level & SC_FOLDLEVELNUMBERMASK; int levelNextNum = levelNext & SC_FOLDLEVELNUMBERMASK; if (level & SC_FOLDLEVELHEADERFLAG) { if (firstSubLine) { if (cs.GetExpanded(lineDoc)) { if (levelNum == SC_FOLDLEVELBASE) marks |= 1 << SC_MARKNUM_FOLDEROPEN; else marks |= 1 << folderOpenMid; } else { if (levelNum == SC_FOLDLEVELBASE) marks |= 1 << SC_MARKNUM_FOLDER; else marks |= 1 << folderEnd; } } else { marks |= 1 << SC_MARKNUM_FOLDERSUB; } needWhiteClosure = false; } else if (level & SC_FOLDLEVELWHITEFLAG) { if (needWhiteClosure) { if (levelNext & SC_FOLDLEVELWHITEFLAG) { marks |= 1 << SC_MARKNUM_FOLDERSUB; } else if (levelNum > SC_FOLDLEVELBASE) { marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; needWhiteClosure = false; } else { marks |= 1 << SC_MARKNUM_FOLDERTAIL; needWhiteClosure = false; } } else if (levelNum > SC_FOLDLEVELBASE) { if (levelNextNum < levelNum) { if (levelNextNum > SC_FOLDLEVELBASE) { marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; } else { marks |= 1 << SC_MARKNUM_FOLDERTAIL; } } else { marks |= 1 << SC_MARKNUM_FOLDERSUB; } } } else if (levelNum > SC_FOLDLEVELBASE) { if (levelNextNum < levelNum) { needWhiteClosure = false; if (levelNext & SC_FOLDLEVELWHITEFLAG) { marks |= 1 << SC_MARKNUM_FOLDERSUB; needWhiteClosure = true; } else if (levelNextNum > SC_FOLDLEVELBASE) { marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; } else { marks |= 1 << SC_MARKNUM_FOLDERTAIL; } } else { marks |= 1 << SC_MARKNUM_FOLDERSUB; } } marks &= vs.ms[margin].mask; PRectangle rcMarker = rcSelMargin; rcMarker.top = yposScreen; rcMarker.bottom = yposScreen + vs.lineHeight; if (!vs.ms[margin].symbol) { char number[100]; number[0] = '\0'; if (firstSubLine) sprintf(number, "%d", lineDoc + 1); if (foldFlags & SC_FOLDFLAG_LEVELNUMBERS) { int lev = pdoc->GetLevel(lineDoc); sprintf(number, "%c%c %03X %03X", (lev & SC_FOLDLEVELHEADERFLAG) ? 'H' : '_', (lev & SC_FOLDLEVELWHITEFLAG) ? 'W' : '_', lev & SC_FOLDLEVELNUMBERMASK, lev >> 16 ); } PRectangle rcNumber = rcMarker; // Right justify int width = surface->WidthText(vs.styles[STYLE_LINENUMBER].font, number, istrlen(number)); int xpos = rcNumber.right - width - 3; rcNumber.left = xpos; surface->DrawTextNoClip(rcNumber, vs.styles[STYLE_LINENUMBER].font, rcNumber.top + vs.maxAscent, number, istrlen(number), vs.styles[STYLE_LINENUMBER].fore.allocated, vs.styles[STYLE_LINENUMBER].back.allocated); } if (marks) { for (int markBit = 0; (markBit < 32) && marks; markBit++) { if (marks & 1) { vs.markers[markBit].Draw(surface, rcMarker, vs.styles[STYLE_LINENUMBER].font); } marks >>= 1; } } visibleLine++; yposScreen += vs.lineHeight; } } } PRectangle rcBlankMargin = rcMargin; rcBlankMargin.left = rcSelMargin.right; surface->FillRectangle(rcBlankMargin, vs.styles[STYLE_DEFAULT].back.allocated); if (bufferedDraw) { surfWindow->Copy(rcMargin, Point(), *pixmapSelMargin); } } void DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid) { int ydiff = (rcTab.bottom - rcTab.top) / 2; int xhead = rcTab.right - 1 - ydiff; if (xhead <= rcTab.left) { ydiff -= rcTab.left - xhead - 1; xhead = rcTab.left - 1; } if ((rcTab.left + 2) < (rcTab.right - 1)) surface->MoveTo(rcTab.left + 2, ymid); else surface->MoveTo(rcTab.right - 1, ymid); surface->LineTo(rcTab.right - 1, ymid); surface->LineTo(xhead, ymid - ydiff); surface->MoveTo(rcTab.right - 1, ymid); surface->LineTo(xhead, ymid + ydiff); } static bool IsSpaceOrTab(char ch) { return ch == ' ' || ch == '\t'; } LineLayout *Editor::RetrieveLineLayout(int lineNumber) { int posLineStart = pdoc->LineStart(lineNumber); int posLineEnd = pdoc->LineStart(lineNumber + 1); int lineCaret = pdoc->LineFromPosition(currentPos); return llc.Retrieve(lineNumber, lineCaret, posLineEnd - posLineStart, pdoc->GetStyleClock(), LinesOnScreen() + 1, pdoc->LinesTotal()); } /** * Fill in the LineLayout data for the given line. * Copy the given @a line and its styles from the document into local arrays. * Also determine the x position at which each character starts. */ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout *ll, int width) { if (!ll) return; PLATFORM_ASSERT(line < pdoc->LinesTotal()); int posLineStart = pdoc->LineStart(line); int posLineEnd = pdoc->LineStart(line + 1); // If the line is very long, limit the treatment to a length that should fit in the viewport if (posLineEnd > (posLineStart + ll->maxLineLength)) { posLineEnd = posLineStart + ll->maxLineLength; } if (ll->validity == LineLayout::llCheckTextAndStyle) { int lineLength = 0; for (int cid = posLineStart; cid < posLineEnd; cid++) { char chDoc = pdoc->CharAt(cid); if (vstyle.viewEOL || (!IsEOLChar(chDoc))) { lineLength++; } } if (lineLength == ll->numCharsInLine) { int numCharsInLine = 0; // See if chars, styles, indicators, are all the same bool allSame = true; const int styleMask = pdoc->stylingBitsMask; // Check base line layout for (int charInDoc = posLineStart; allSame && (charInDoc < posLineEnd); charInDoc++) { char chDoc = pdoc->CharAt(charInDoc); if (vstyle.viewEOL || (!IsEOLChar(chDoc))) { char styleByte = pdoc->StyleAt(charInDoc); allSame = allSame && (ll->styles[numCharsInLine] == static_cast(styleByte & styleMask)); allSame = allSame && (ll->indicators[numCharsInLine] == static_cast(styleByte & ~styleMask)); if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseUpper) allSame = allSame && (ll->chars[numCharsInLine] == static_cast(toupper(chDoc))); else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower) allSame = allSame && (ll->chars[numCharsInLine] == static_cast(tolower(chDoc))); else allSame = allSame && (ll->chars[numCharsInLine] == chDoc); numCharsInLine++; } } if (allSame) { ll->validity = LineLayout::llPositions; } else { ll->validity = LineLayout::llInvalid; } } else { ll->validity = LineLayout::llInvalid; } } if (ll->validity == LineLayout::llInvalid) { ll->widthLine = LineLayout::wrapWidthInfinite; ll->lines = 1; int numCharsInLine = 0; if (vstyle.edgeState == EDGE_BACKGROUND) { ll->edgeColumn = pdoc->FindColumn(line, theEdge); if (ll->edgeColumn >= posLineStart) { ll->edgeColumn -= posLineStart; } } else { ll->edgeColumn = -1; } char styleByte = 0; int styleMask = pdoc->stylingBitsMask; // Fill base line layout for (int charInDoc = posLineStart; charInDoc < posLineEnd; charInDoc++) { char chDoc = pdoc->CharAt(charInDoc); styleByte = pdoc->StyleAt(charInDoc); if (vstyle.viewEOL || (!IsEOLChar(chDoc))) { ll->chars[numCharsInLine] = chDoc; ll->styles[numCharsInLine] = static_cast(styleByte & styleMask); ll->indicators[numCharsInLine] = static_cast(styleByte & ~styleMask); if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseUpper) ll->chars[numCharsInLine] = static_cast(toupper(chDoc)); else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower) ll->chars[numCharsInLine] = static_cast(tolower(chDoc)); numCharsInLine++; } } ll->xHighlightGuide = 0; // Extra element at the end of the line to hold end x position and act as ll->chars[numCharsInLine] = 0; // Also triggers processing in the loops as this is a control character ll->styles[numCharsInLine] = styleByte; // For eolFilled ll->indicators[numCharsInLine] = 0; // Layout the line, determining the position of each character, // with an extra element at the end for the end of the line. int startseg = 0; // Start of the current segment, in char. number int startsegx = 0; // Start of the current segment, in pixels ll->positions[0] = 0; unsigned int tabWidth = vstyle.spaceWidth * pdoc->tabInChars; bool lastSegItalics = false; Font &ctrlCharsFont = vstyle.styles[STYLE_CONTROLCHAR].font; bool isControlNext = IsControlCharacter(ll->chars[0]); for (int charInLine = 0; charInLine < numCharsInLine; charInLine++) { bool isControl = isControlNext; isControlNext = IsControlCharacter(ll->chars[charInLine + 1]); if ((ll->styles[charInLine] != ll->styles[charInLine + 1]) || isControl || isControlNext) { ll->positions[startseg] = 0; if (vstyle.styles[ll->styles[charInLine]].visible) { if (isControl) { if (ll->chars[charInLine] == '\t') { ll->positions[charInLine + 1] = ((((startsegx + 2) / tabWidth) + 1) * tabWidth) - startsegx; } else if (controlCharSymbol < 32) { const char *ctrlChar = ControlCharacterString(ll->chars[charInLine]); // +3 For a blank on front and rounded edge each side: ll->positions[charInLine + 1] = surface->WidthText(ctrlCharsFont, ctrlChar, istrlen(ctrlChar)) + 3; } else { char cc[2] = { static_cast(controlCharSymbol), '\0' }; surface->MeasureWidths(ctrlCharsFont, cc, 1, ll->positions + startseg + 1); } lastSegItalics = false; } else { // Regular character int lenSeg = charInLine - startseg + 1; if ((lenSeg == 1) && (' ' == ll->chars[startseg])) { lastSegItalics = false; // Over half the segments are single characters and of these about half are space characters. ll->positions[charInLine + 1] = vstyle.styles[ll->styles[charInLine]].spaceWidth; } else { lastSegItalics = vstyle.styles[ll->styles[charInLine]].italic; surface->MeasureWidths(vstyle.styles[ll->styles[charInLine]].font, ll->chars + startseg, lenSeg, ll->positions + startseg + 1); } } } else { // invisible for (int posToZero = startseg; posToZero <= (charInLine + 1); posToZero++) { ll->positions[posToZero] = 0; } } for (int posToIncrease = startseg; posToIncrease <= (charInLine + 1); posToIncrease++) { ll->positions[posToIncrease] += startsegx; } startsegx = ll->positions[charInLine + 1]; startseg = charInLine + 1; } } // Small hack to make lines that end with italics not cut off the edge of the last character if ((startseg > 0) && lastSegItalics) { ll->positions[startseg] += 2; } ll->numCharsInLine = numCharsInLine; ll->validity = LineLayout::llPositions; } // Hard to cope when too narrow, so just assume there is space if (width < 20) { width = 20; } if ((ll->validity == LineLayout::llPositions) || (ll->widthLine != width)) { ll->widthLine = width; if (width == LineLayout::wrapWidthInfinite) { ll->lines = 1; } else if (width > ll->positions[ll->numCharsInLine]) { // Simple common case where line does not need wrapping. ll->lines = 1; } else { if (wrapVisualFlags & SC_WRAPVISUALFLAG_END) { width -= vstyle.aveCharWidth; // take into account the space for end wrap mark } ll->lines = 0; // Calculate line start positions based upon width. // For now this is simplistic - wraps on byte rather than character and // in the middle of words. Should search for spaces or style changes. int lastGoodBreak = 0; int lastLineStart = 0; int startOffset = 0; int p = 0; while (p < ll->numCharsInLine) { if ((ll->positions[p + 1] - startOffset) >= width) { if (lastGoodBreak == lastLineStart) { // Try moving to start of last character if (p > 0) { lastGoodBreak = pdoc->MovePositionOutsideChar(p + posLineStart, -1) - posLineStart; } if (lastGoodBreak == lastLineStart) { // Ensure at least one character on line. lastGoodBreak = pdoc->MovePositionOutsideChar(lastGoodBreak + posLineStart + 1, 1) - posLineStart; } } lastLineStart = lastGoodBreak; ll->lines++; ll->SetLineStart(ll->lines, lastGoodBreak); startOffset = ll->positions[lastGoodBreak]; // take into account the space for start wrap mark and indent startOffset -= actualWrapVisualStartIndent * vstyle.aveCharWidth; p = lastGoodBreak + 1; continue; } if (p > 0) { if (wrapState == eWrapChar){ lastGoodBreak = pdoc->MovePositionOutsideChar(p + posLineStart, -1) - posLineStart; p = pdoc->MovePositionOutsideChar(p + 1 + posLineStart, 1) - posLineStart; continue; } else if (ll->styles[p] != ll->styles[p - 1]) { lastGoodBreak = p; } else if (IsSpaceOrTab(ll->chars[p - 1]) && !IsSpaceOrTab(ll->chars[p])) { lastGoodBreak = p; } } p++; } ll->lines++; } ll->validity = LineLayout::llLines; } } ColourAllocated Editor::TextBackground(ViewStyle &vsDraw, bool overrideBackground, ColourAllocated background, bool inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll) { if (inSelection) { if (vsDraw.selbackset) { if (primarySelection) return vsDraw.selbackground.allocated; else return vsDraw.selbackground2.allocated; } } else { if ((vsDraw.edgeState == EDGE_BACKGROUND) && (i >= ll->edgeColumn) && !IsEOLChar(ll->chars[i])) return vsDraw.edgecolour.allocated; if (inHotspot && vsDraw.hotspotBackgroundSet) return vsDraw.hotspotBackground.allocated; if (overrideBackground) return background; } return vsDraw.styles[styleMain].back.allocated; } void Editor::DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight) { Point from(0, ((lineVisible & 1) && (lineHeight & 1)) ? 1 : 0); PRectangle rcCopyArea(start + 1, rcSegment.top, start + 2, rcSegment.bottom); surface->Copy(rcCopyArea, from, highlight ? *pixmapIndentGuideHighlight : *pixmapIndentGuide); } void Editor::DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourAllocated wrapColour) { surface->PenColour(wrapColour); enum { xa = 1 }; // gap before start int w = rcPlace.right - rcPlace.left - xa - 1; bool xStraight = isEndMarker; // x-mirrored symbol for start marker bool yStraight = true; //bool yStraight= isEndMarker; // comment in for start marker y-mirrowed int x0 = xStraight ? rcPlace.left : rcPlace.right - 1; int y0 = yStraight ? rcPlace.top : rcPlace.bottom - 1; int dy = (rcPlace.bottom - rcPlace.top) / 5; int y = (rcPlace.bottom - rcPlace.top) / 2 + dy; struct Relative { Surface *surface; int xBase; int xDir; int yBase; int yDir; void MoveTo(int xRelative, int yRelative) { surface->MoveTo(xBase + xDir * xRelative, yBase + yDir * yRelative); } void LineTo(int xRelative, int yRelative) { surface->LineTo(xBase + xDir * xRelative, yBase + yDir * yRelative); } }; Relative rel = {surface, x0, xStraight?1:-1, y0, yStraight?1:-1}; // arrow head rel.MoveTo(xa, y); rel.LineTo(xa + 2*w / 3, y - dy); rel.MoveTo(xa, y); rel.LineTo(xa + 2*w / 3, y + dy); // arrow body rel.MoveTo(xa, y); rel.LineTo(xa + w, y); rel.LineTo(xa + w, y - 2 * dy); rel.LineTo(xa - 1, // on windows lineto is exclusive endpoint, perhaps GTK not... y - 2 * dy); } void Editor::DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll, int line, int lineEnd, int xStart, int subLine, int subLineStart, bool overrideBackground, ColourAllocated background, bool drawWrapMarkEnd, ColourAllocated wrapColour) { int styleMask = pdoc->stylingBitsMask; PRectangle rcSegment = rcLine; // Fill in a PRectangle representing the end of line characters int xEol = ll->positions[lineEnd] - subLineStart; rcSegment.left = xEol + xStart; rcSegment.right = xEol + vsDraw.aveCharWidth + xStart; int posLineEnd = pdoc->LineStart(line + 1); bool eolInSelection = (subLine == (ll->lines - 1)) && (posLineEnd > ll->selStart) && (posLineEnd <= ll->selEnd) && (ll->selStart != ll->selEnd); if (eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1)) { if (primarySelection) surface->FillRectangle(rcSegment, vsDraw.selbackground.allocated); else surface->FillRectangle(rcSegment, vsDraw.selbackground2.allocated); } else if (overrideBackground) { surface->FillRectangle(rcSegment, background); } else { surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated); } rcSegment.left = xEol + vsDraw.aveCharWidth + xStart; rcSegment.right = rcLine.right; if (overrideBackground) { surface->FillRectangle(rcSegment, background); } else if (vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].eolFilled) { surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated); } else { surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated); } if (drawWrapMarkEnd) { PRectangle rcPlace = rcSegment; if (wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_END_BY_TEXT) { rcPlace.left = xEol + xStart; rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; } else { // draw left of the right text margin, to avoid clipping by the current clip rect rcPlace.right = rcLine.right - vs.rightMarginWidth; rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; } DrawWrapMarker(surface, rcPlace, true, wrapColour); } } void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, PRectangle rcLine, LineLayout *ll, int subLine) { PRectangle rcSegment = rcLine; // Using one font for all control characters so it can be controlled independently to ensure // the box goes around the characters tightly. Seems to be no way to work out what height // is taken by an individual character - internal leading gives varying results. Font &ctrlCharsFont = vsDraw.styles[STYLE_CONTROLCHAR].font; // See if something overrides the line background color: Either if caret is on the line // and background color is set for that, or if a marker is defined that forces its background // color onto the line, or if a marker is defined but has no selection margin in which to // display itself (as long as it's not an SC_MARK_EMPTY marker). These are checked in order // with the earlier taking precedence. When multiple markers cause background override, // the color for the highest numbered one is used. bool overrideBackground = false; ColourAllocated background; if (caret.active && vsDraw.showCaretLineBackground && ll->containsCaret) { overrideBackground = true; background = vsDraw.caretLineBackground.allocated; } if (!overrideBackground) { int marks = pdoc->GetMark(line); for (int markBit = 0; (markBit < 32) && marks; markBit++) { if ((marks & 1) && vsDraw.markers[markBit].markType == SC_MARK_BACKGROUND) { background = vsDraw.markers[markBit].back.allocated; overrideBackground = true; } marks >>= 1; } } if (!overrideBackground) { if (vsDraw.maskInLine) { int marks = pdoc->GetMark(line) & vsDraw.maskInLine; if (marks) { for (int markBit = 0; (markBit < 32) && marks; markBit++) { if ((marks & 1) && (vsDraw.markers[markBit].markType != SC_MARK_EMPTY)) { overrideBackground = true; background = vsDraw.markers[markBit].back.allocated; } marks >>= 1; } } } } bool drawWhitespaceBackground = (vsDraw.viewWhitespace != wsInvisible) && (!overrideBackground) && (vsDraw.whitespaceBackgroundSet); bool inIndentation = subLine == 0; // Do not handle indentation except on first subline. int indentWidth = pdoc->IndentSize() * vsDraw.spaceWidth; int posLineStart = pdoc->LineStart(line); int startseg = ll->LineStart(subLine); int subLineStart = ll->positions[startseg]; int lineStart = 0; int lineEnd = 0; if (subLine < ll->lines) { lineStart = ll->LineStart(subLine); lineEnd = ll->LineStart(subLine + 1); } bool drawWrapMarkEnd = false; if (wrapVisualFlags & SC_WRAPVISUALFLAG_END) { if (subLine + 1 < ll->lines) { drawWrapMarkEnd = ll->LineStart(subLine + 1) != 0; } } if (actualWrapVisualStartIndent != 0) { bool continuedWrapLine = false; if (subLine < ll->lines) { continuedWrapLine = ll->LineStart(subLine) != 0; } if (continuedWrapLine) { // draw continuation rect PRectangle rcPlace = rcSegment; rcPlace.left = ll->positions[startseg] + xStart - subLineStart; rcPlace.right = rcPlace.left + actualWrapVisualStartIndent * vsDraw.aveCharWidth; // default bgnd here.. surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated); // main line style would be below but this would be inconsistent with end markers // also would possibly not be the style at wrap point //int styleMain = ll->styles[lineStart]; //surface->FillRectangle(rcPlace, vsDraw.styles[styleMain].back.allocated); if (wrapVisualFlags & SC_WRAPVISUALFLAG_START) { if (wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_START_BY_TEXT) rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; else rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; DrawWrapMarker(surface, rcPlace, false, vsDraw.whitespaceForeground.allocated); } xStart += actualWrapVisualStartIndent * vsDraw.aveCharWidth; } } int i; // Background drawing loop for (i = lineStart; twoPhaseDraw && (i < lineEnd); i++) { int iDoc = i + posLineStart; // If there is the end of a style run for any reason if ((ll->styles[i] != ll->styles[i + 1]) || i == (lineEnd - 1) || IsControlCharacter(ll->chars[i]) || IsControlCharacter(ll->chars[i + 1]) || ((ll->selStart != ll->selEnd) && ((iDoc + 1 == ll->selStart) || (iDoc + 1 == ll->selEnd))) || (i == (ll->edgeColumn - 1))) { rcSegment.left = ll->positions[startseg] + xStart - subLineStart; rcSegment.right = ll->positions[i + 1] + xStart - subLineStart; // Only try to draw if really visible - enhances performance by not calling environment to // draw strings that are completely past the right side of the window. if ((rcSegment.left <= rcLine.right) && (rcSegment.right >= rcLine.left)) { int styleMain = ll->styles[i]; bool inSelection = (iDoc >= ll->selStart) && (iDoc < ll->selEnd) && (ll->selStart != ll->selEnd); bool inHotspot = (ll->hsStart != -1) && (iDoc >= ll->hsStart) && (iDoc < ll->hsEnd); ColourAllocated textBack = TextBackground(vsDraw, overrideBackground, background, inSelection, inHotspot, styleMain, i, ll); if (ll->chars[i] == '\t') { // Tab display if (drawWhitespaceBackground && (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) textBack = vsDraw.whitespaceBackground.allocated; surface->FillRectangle(rcSegment, textBack); } else if (IsControlCharacter(ll->chars[i])) { // Control character display inIndentation = false; surface->FillRectangle(rcSegment, textBack); } else { // Normal text display surface->FillRectangle(rcSegment, textBack); if (vsDraw.viewWhitespace != wsInvisible || (inIndentation && vsDraw.viewIndentationGuides)) { for (int cpos = 0; cpos <= i - startseg; cpos++) { if (ll->chars[cpos + startseg] == ' ') { if (drawWhitespaceBackground && (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) { PRectangle rcSpace(ll->positions[cpos + startseg] + xStart, rcSegment.top, ll->positions[cpos + startseg + 1] + xStart, rcSegment.bottom); surface->FillRectangle(rcSpace, vsDraw.whitespaceBackground.allocated); } } else { inIndentation = false; } } } } } startseg = i + 1; } } if (twoPhaseDraw) { DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd, xStart, subLine, subLineStart, overrideBackground, background, drawWrapMarkEnd, vsDraw.whitespaceForeground.allocated); } inIndentation = subLine == 0; // Do not handle indentation except on first subline. startseg = ll->LineStart(subLine); // Foreground drawing loop for (i = lineStart; i < lineEnd; i++) { int iDoc = i + posLineStart; // If there is the end of a style run for any reason if ((ll->styles[i] != ll->styles[i + 1]) || i == (lineEnd - 1) || IsControlCharacter(ll->chars[i]) || IsControlCharacter(ll->chars[i + 1]) || ((ll->selStart != ll->selEnd) && ((iDoc + 1 == ll->selStart) || (iDoc + 1 == ll->selEnd))) || (i == (ll->edgeColumn - 1))) { rcSegment.left = ll->positions[startseg] + xStart - subLineStart; rcSegment.right = ll->positions[i + 1] + xStart - subLineStart; // Only try to draw if really visible - enhances performance by not calling environment to // draw strings that are completely past the right side of the window. if ((rcSegment.left <= rcLine.right) && (rcSegment.right >= rcLine.left)) { int styleMain = ll->styles[i]; ColourAllocated textFore = vsDraw.styles[styleMain].fore.allocated; Font &textFont = vsDraw.styles[styleMain].font; //hotspot foreground if (ll->hsStart != -1 && iDoc >= ll->hsStart && iDoc < hsEnd) { if (vsDraw.hotspotForegroundSet) textFore = vsDraw.hotspotForeground.allocated; } bool inSelection = (iDoc >= ll->selStart) && (iDoc < ll->selEnd) && (ll->selStart != ll->selEnd); if (inSelection && (vsDraw.selforeset)) { textFore = vsDraw.selforeground.allocated; } bool inHotspot = (ll->hsStart != -1) && (iDoc >= ll->hsStart) && (iDoc < ll->hsEnd); ColourAllocated textBack = TextBackground(vsDraw, overrideBackground, background, inSelection, inHotspot, styleMain, i, ll); if (ll->chars[i] == '\t') { // Tab display if (!twoPhaseDraw) { if (drawWhitespaceBackground && (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) textBack = vsDraw.whitespaceBackground.allocated; surface->FillRectangle(rcSegment, textBack); } if ((vsDraw.viewWhitespace != wsInvisible) || ((inIndentation && vsDraw.viewIndentationGuides))) { if (vsDraw.whitespaceForegroundSet) textFore = vsDraw.whitespaceForeground.allocated; surface->PenColour(textFore); } if (inIndentation && vsDraw.viewIndentationGuides) { for (int xIG = ll->positions[i] / indentWidth * indentWidth; xIG < ll->positions[i + 1]; xIG += indentWidth) { if (xIG >= ll->positions[i] && xIG > 0) { DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIG + xStart, rcSegment, (ll->xHighlightGuide == xIG)); } } } if (vsDraw.viewWhitespace != wsInvisible) { if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4, rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); DrawTabArrow(surface, rcTab, rcSegment.top + vsDraw.lineHeight / 2); } } } else if (IsControlCharacter(ll->chars[i])) { // Control character display inIndentation = false; if (controlCharSymbol < 32) { // Draw the character const char *ctrlChar = ControlCharacterString(ll->chars[i]); if (!twoPhaseDraw) { surface->FillRectangle(rcSegment, textBack); } int normalCharHeight = surface->Ascent(ctrlCharsFont) - surface->InternalLeading(ctrlCharsFont); PRectangle rcCChar = rcSegment; rcCChar.left = rcCChar.left + 1; rcCChar.top = rcSegment.top + vsDraw.maxAscent - normalCharHeight; rcCChar.bottom = rcSegment.top + vsDraw.maxAscent + 1; PRectangle rcCentral = rcCChar; rcCentral.top++; rcCentral.bottom--; surface->FillRectangle(rcCentral, textFore); PRectangle rcChar = rcCChar; rcChar.left++; rcChar.right--; surface->DrawTextClipped(rcChar, ctrlCharsFont, rcSegment.top + vsDraw.maxAscent, ctrlChar, istrlen(ctrlChar), textBack, textFore); } else { char cc[2] = { static_cast(controlCharSymbol), '\0' }; surface->DrawTextNoClip(rcSegment, ctrlCharsFont, rcSegment.top + vsDraw.maxAscent, cc, 1, textBack, textFore); } } else { // Normal text display if (vsDraw.styles[styleMain].visible) { if (twoPhaseDraw) { surface->DrawTextTransparent(rcSegment, textFont, rcSegment.top + vsDraw.maxAscent, ll->chars + startseg, i - startseg + 1, textFore); } else { surface->DrawTextNoClip(rcSegment, textFont, rcSegment.top + vsDraw.maxAscent, ll->chars + startseg, i - startseg + 1, textFore, textBack); } } if (vsDraw.viewWhitespace != wsInvisible || (inIndentation && vsDraw.viewIndentationGuides)) { for (int cpos = 0; cpos <= i - startseg; cpos++) { if (ll->chars[cpos + startseg] == ' ') { if (vsDraw.viewWhitespace != wsInvisible) { if (vsDraw.whitespaceForegroundSet) textFore = vsDraw.whitespaceForeground.allocated; if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { int xmid = (ll->positions[cpos + startseg] + ll->positions[cpos + startseg + 1]) / 2; if (!twoPhaseDraw && drawWhitespaceBackground && (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) { textBack = vsDraw.whitespaceBackground.allocated; PRectangle rcSpace(ll->positions[cpos + startseg] + xStart, rcSegment.top, ll->positions[cpos + startseg + 1] + xStart, rcSegment.bottom); surface->FillRectangle(rcSpace, textBack); } PRectangle rcDot(xmid + xStart - subLineStart, rcSegment.top + vsDraw.lineHeight / 2, 0, 0); rcDot.right = rcDot.left + 1; rcDot.bottom = rcDot.top + 1; surface->FillRectangle(rcDot, textFore); } } if (inIndentation && vsDraw.viewIndentationGuides) { int startSpace = ll->positions[cpos + startseg]; if (startSpace > 0 && (startSpace % indentWidth == 0)) { DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, startSpace + xStart, rcSegment, (ll->xHighlightGuide == ll->positions[cpos + startseg])); } } } else { inIndentation = false; } } } } if (ll->hsStart != -1 && vsDraw.hotspotUnderline && iDoc >= ll->hsStart && iDoc < ll->hsEnd ) { PRectangle rcUL = rcSegment; rcUL.top = rcUL.top + vsDraw.maxAscent + 1; rcUL.bottom = rcUL.top + 1; if (vsDraw.hotspotForegroundSet) surface->FillRectangle(rcUL, vsDraw.hotspotForeground.allocated); else surface->FillRectangle(rcUL, textFore); } else if (vsDraw.styles[styleMain].underline) { PRectangle rcUL = rcSegment; rcUL.top = rcUL.top + vsDraw.maxAscent + 1; rcUL.bottom = rcUL.top + 1; surface->FillRectangle(rcUL, textFore); } } startseg = i + 1; } } // Draw indicators // foreach indicator... for (int indicnum = 0, mask = 1 << pdoc->stylingBits; mask < 0x100; indicnum++) { int startPos = -1; // foreach style pos in line... for (int indicPos = lineStart; indicPos <= lineEnd; indicPos++) { // look for starts... if (startPos < 0) { // NOT in indicator run, looking for START if (indicPos < lineEnd && (ll->indicators[indicPos] & mask)) startPos = indicPos; } // ... or ends if (startPos >= 0) { // IN indicator run, looking for END if (indicPos >= lineEnd || !(ll->indicators[indicPos] & mask)) { // AT end of indicator run, DRAW it! PRectangle rcIndic( ll->positions[startPos] + xStart - subLineStart, rcLine.top + vsDraw.maxAscent, ll->positions[indicPos] + xStart - subLineStart, rcLine.top + vsDraw.maxAscent + 3); vsDraw.indicators[indicnum].Draw(surface, rcIndic, rcLine); // RESET control var startPos = -1; } } } mask <<= 1; } // End of the drawing of the current line if (!twoPhaseDraw) { DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd, xStart, subLine, subLineStart, overrideBackground, background, drawWrapMarkEnd, vsDraw.whitespaceForeground.allocated); } if (vsDraw.edgeState == EDGE_LINE) { int edgeX = theEdge * vsDraw.spaceWidth; rcSegment.left = edgeX + xStart; rcSegment.right = rcSegment.left + 1; surface->FillRectangle(rcSegment, vsDraw.edgecolour.allocated); } } void Editor::RefreshPixMaps(Surface *surfaceWindow) { if (!pixmapSelPattern->Initialised()) { const int patternSize = 8; pixmapSelPattern->InitPixMap(patternSize, patternSize, surfaceWindow, wMain.GetID()); // This complex procedure is to reproduce the checkerboard dithered pattern used by windows // for scroll bars and Visual Studio for its selection margin. The colour of this pattern is half // way between the chrome colour and the chrome highlight colour making a nice transition // between the window chrome and the content area. And it works in low colour depths. PRectangle rcPattern(0, 0, patternSize, patternSize); // Initialize default colours based on the chrome colour scheme. Typically the highlight is white. ColourAllocated colourFMFill = vs.selbar.allocated; ColourAllocated colourFMStripes = vs.selbarlight.allocated; if (!(vs.selbarlight.desired == ColourDesired(0xff, 0xff, 0xff))) { // User has chosen an unusual chrome colour scheme so just use the highlight edge colour. // (Typically, the highlight colour is white.) colourFMFill = vs.selbarlight.allocated; } if (vs.foldmarginColourSet) { // override default fold margin colour colourFMFill = vs.foldmarginColour.allocated; } if (vs.foldmarginHighlightColourSet) { // override default fold margin highlight colour colourFMStripes = vs.foldmarginHighlightColour.allocated; } pixmapSelPattern->FillRectangle(rcPattern, colourFMFill); pixmapSelPattern->PenColour(colourFMStripes); for (int stripe = 0; stripe < patternSize; stripe++) { // Alternating 1 pixel stripes is same as checkerboard. pixmapSelPattern->MoveTo(0, stripe * 2); pixmapSelPattern->LineTo(patternSize, stripe * 2 - patternSize); } } if (!pixmapIndentGuide->Initialised()) { // 1 extra pixel in height so can handle odd/even positions and so produce a continuous line pixmapIndentGuide->InitPixMap(1, vs.lineHeight + 1, surfaceWindow, wMain.GetID()); pixmapIndentGuideHighlight->InitPixMap(1, vs.lineHeight + 1, surfaceWindow, wMain.GetID()); PRectangle rcIG(0, 0, 1, vs.lineHeight); pixmapIndentGuide->FillRectangle(rcIG, vs.styles[STYLE_INDENTGUIDE].back.allocated); pixmapIndentGuide->PenColour(vs.styles[STYLE_INDENTGUIDE].fore.allocated); pixmapIndentGuideHighlight->FillRectangle(rcIG, vs.styles[STYLE_BRACELIGHT].back.allocated); pixmapIndentGuideHighlight->PenColour(vs.styles[STYLE_BRACELIGHT].fore.allocated); for (int stripe = 1; stripe < vs.lineHeight + 1; stripe += 2) { pixmapIndentGuide->MoveTo(0, stripe); pixmapIndentGuide->LineTo(2, stripe); pixmapIndentGuideHighlight->MoveTo(0, stripe); pixmapIndentGuideHighlight->LineTo(2, stripe); } } if (bufferedDraw) { if (!pixmapLine->Initialised()) { PRectangle rcClient = GetClientRectangle(); pixmapLine->InitPixMap(rcClient.Width(), rcClient.Height(), surfaceWindow, wMain.GetID()); pixmapSelMargin->InitPixMap(vs.fixedColumnWidth, rcClient.Height(), surfaceWindow, wMain.GetID()); } } } void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { //Platform::DebugPrintf("Paint:%1d (%3d,%3d) ... (%3d,%3d)\n", // paintingAllText, rcArea.left, rcArea.top, rcArea.right, rcArea.bottom); RefreshStyleData(); RefreshPixMaps(surfaceWindow); PRectangle rcClient = GetClientRectangle(); //Platform::DebugPrintf("Client: (%3d,%3d) ... (%3d,%3d) %d\n", // rcClient.left, rcClient.top, rcClient.right, rcClient.bottom); surfaceWindow->SetPalette(&palette, true); pixmapLine->SetPalette(&palette, !hasFocus); int screenLinePaintFirst = rcArea.top / vs.lineHeight; // The area to be painted plus one extra line is styled. // The extra line is to determine when a style change, such as starting a comment flows on to other lines. int lineStyleLast = topLine + (rcArea.bottom - 1) / vs.lineHeight + 1; //Platform::DebugPrintf("Paint lines = %d .. %d\n", topLine + screenLinePaintFirst, lineStyleLast); int endPosPaint = pdoc->Length(); if (lineStyleLast < cs.LinesDisplayed()) endPosPaint = pdoc->LineStart(cs.DocFromDisplay(lineStyleLast + 1)); int xStart = vs.fixedColumnWidth - xOffset; int ypos = 0; if (!bufferedDraw) ypos += screenLinePaintFirst * vs.lineHeight; int yposScreen = screenLinePaintFirst * vs.lineHeight; // Ensure we are styled as far as we are painting. pdoc->EnsureStyledTo(endPosPaint); bool paintAbandonedByStyling = paintState == paintAbandoned; if (needUpdateUI) { NotifyUpdateUI(); needUpdateUI = false; } // Call priority lines wrap on a window of lines which are likely // to rendered with the following paint (that is wrap the visible // lines first). int startLineToWrap = cs.DocFromDisplay(topLine) - 5; if (startLineToWrap < 0) startLineToWrap = -1; if (WrapLines(false, startLineToWrap)) { // The wrapping process has changed the height of some lines so // abandon this paint for a complete repaint. if (AbandonPaint()) { return; } RefreshPixMaps(surfaceWindow); // In case pixmaps invalidated by scrollbar change } PLATFORM_ASSERT(pixmapSelPattern->Initialised()); PaintSelMargin(surfaceWindow, rcArea); PRectangle rcRightMargin = rcClient; rcRightMargin.left = rcRightMargin.right - vs.rightMarginWidth; if (rcArea.Intersects(rcRightMargin)) { surfaceWindow->FillRectangle(rcRightMargin, vs.styles[STYLE_DEFAULT].back.allocated); } if (paintState == paintAbandoned) { // Either styling or NotifyUpdateUI noticed that painting is needed // outside the current painting rectangle //Platform::DebugPrintf("Abandoning paint\n"); if (wrapState != eWrapNone) { if (paintAbandonedByStyling) { // Styling has spilled over a line end, such as occurs by starting a multiline // comment. The width of subsequent text may have changed, so rewrap. NeedWrapping(cs.DocFromDisplay(topLine)); } } return; } //Platform::DebugPrintf("start display %d, offset = %d\n", pdoc->Length(), xOffset); // Do the painting if (rcArea.right > vs.fixedColumnWidth) { Surface *surface = surfaceWindow; if (bufferedDraw) { surface = pixmapLine; PLATFORM_ASSERT(pixmapLine->Initialised()); } surface->SetUnicodeMode(IsUnicodeMode()); surface->SetDBCSMode(CodePage()); int visibleLine = topLine + screenLinePaintFirst; int posCaret = currentPos; if (posDrag >= 0) posCaret = posDrag; int lineCaret = pdoc->LineFromPosition(posCaret); // Remove selection margin from drawing area so text will not be drawn // on it in unbuffered mode. PRectangle rcTextArea = rcClient; rcTextArea.left = vs.fixedColumnWidth; rcTextArea.right -= vs.rightMarginWidth; surfaceWindow->SetClip(rcTextArea); // Loop on visible lines //double durLayout = 0.0; //double durPaint = 0.0; //double durCopy = 0.0; //ElapsedTime etWhole; int lineDocPrevious = -1; // Used to avoid laying out one document line multiple times AutoLineLayout ll(llc, 0); SelectionLineIterator lineIterator(this); while (visibleLine < cs.LinesDisplayed() && yposScreen < rcArea.bottom) { int lineDoc = cs.DocFromDisplay(visibleLine); // Only visible lines should be handled by the code within the loop PLATFORM_ASSERT(cs.GetVisible(lineDoc)); int lineStartSet = cs.DisplayFromDoc(lineDoc); int subLine = visibleLine - lineStartSet; // Copy this line and its styles from the document into local arrays // and determine the x position at which each character starts. //ElapsedTime et; if (lineDoc != lineDocPrevious) { ll.Set(0); ll.Set(RetrieveLineLayout(lineDoc)); LayoutLine(lineDoc, surface, vs, ll, wrapWidth); lineDocPrevious = lineDoc; } //durLayout += et.Duration(true); if (ll) { if (selType == selStream) { ll->selStart = SelectionStart(); ll->selEnd = SelectionEnd(); } else { lineIterator.SetAt(lineDoc); ll->selStart = lineIterator.startPos; ll->selEnd = lineIterator.endPos; } ll->containsCaret = lineDoc == lineCaret; if (hideSelection) { ll->selStart = -1; ll->selEnd = -1; ll->containsCaret = false; } GetHotSpotRange(ll->hsStart, ll->hsEnd); PRectangle rcLine = rcClient; rcLine.top = ypos; rcLine.bottom = ypos + vs.lineHeight; Range rangeLine(pdoc->LineStart(lineDoc), pdoc->LineStart(lineDoc + 1)); // Highlight the current braces if any ll->SetBracesHighlight(rangeLine, braces, static_cast(bracesMatchStyle), highlightGuideColumn * vs.spaceWidth); // Draw the line DrawLine(surface, vs, lineDoc, visibleLine, xStart, rcLine, ll, subLine); //durPaint += et.Duration(true); // Restore the previous styles for the brace highlights in case layout is in cache. ll->RestoreBracesHighlight(rangeLine, braces); bool expanded = cs.GetExpanded(lineDoc); if ((foldFlags & SC_FOLDFLAG_BOX) == 0) { // Paint the line above the fold if ((expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_EXPANDED)) || (!expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_CONTRACTED))) { if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) { PRectangle rcFoldLine = rcLine; rcFoldLine.bottom = rcFoldLine.top + 1; surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); } } // Paint the line below the fold if ((expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_EXPANDED)) || (!expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) { if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) { PRectangle rcFoldLine = rcLine; rcFoldLine.top = rcFoldLine.bottom - 1; surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); } } } else { int FoldLevelCurr = (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE; int FoldLevelPrev = (pdoc->GetLevel(lineDoc - 1) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE; int FoldLevelFlags = (pdoc->GetLevel(lineDoc) & ~SC_FOLDLEVELNUMBERMASK) & ~(0xFFF0000); int indentationStep = pdoc->IndentSize(); // Draw line above fold if ((FoldLevelPrev < FoldLevelCurr) || (FoldLevelFlags & SC_FOLDLEVELBOXHEADERFLAG && (pdoc->GetLevel(lineDoc - 1) & SC_FOLDLEVELBOXFOOTERFLAG) == 0)) { PRectangle rcFoldLine = rcLine; rcFoldLine.bottom = rcFoldLine.top + 1; rcFoldLine.left += xStart + FoldLevelCurr * vs.spaceWidth * indentationStep - 1; surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); } // Line below the fold (or below a contracted fold) if (FoldLevelFlags & SC_FOLDLEVELBOXFOOTERFLAG || (!expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) { PRectangle rcFoldLine = rcLine; rcFoldLine.top = rcFoldLine.bottom - 1; rcFoldLine.left += xStart + (FoldLevelCurr) * vs.spaceWidth * indentationStep - 1; surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); } PRectangle rcBoxLine = rcLine; // Draw vertical line for every fold level for (int i = 0; i <= FoldLevelCurr; i++) { rcBoxLine.left = xStart + i * vs.spaceWidth * indentationStep - 1; rcBoxLine.right = rcBoxLine.left + 1; surface->FillRectangle(rcBoxLine, vs.styles[STYLE_DEFAULT].fore.allocated); } } // Draw the Caret if (lineDoc == lineCaret) { int offset = Platform::Minimum(posCaret - rangeLine.start, ll->maxLineLength); if ((offset >= ll->LineStart(subLine)) && ((offset < ll->LineStart(subLine + 1)) || offset == ll->numCharsInLine)) { int xposCaret = ll->positions[offset] - ll->positions[ll->LineStart(subLine)] + xStart; if (actualWrapVisualStartIndent != 0) { int lineStart = ll->LineStart(subLine); if (lineStart != 0) // Wrapped xposCaret += actualWrapVisualStartIndent * vs.aveCharWidth; } int widthOverstrikeCaret; if (posCaret == pdoc->Length()) { // At end of document widthOverstrikeCaret = vs.aveCharWidth; } else if ((posCaret - rangeLine.start) >= ll->numCharsInLine) { // At end of line widthOverstrikeCaret = vs.aveCharWidth; } else { widthOverstrikeCaret = ll->positions[offset + 1] - ll->positions[offset]; } if (widthOverstrikeCaret < 3) // Make sure its visible widthOverstrikeCaret = 3; if (((caret.active && caret.on) || (posDrag >= 0)) && xposCaret >= 0) { PRectangle rcCaret = rcLine; int caretWidthOffset = 0; if ((offset > 0) && (vs.caretWidth > 1)) caretWidthOffset = 1; // Move back so overlaps both character cells. if (posDrag >= 0) { rcCaret.left = xposCaret - caretWidthOffset; rcCaret.right = rcCaret.left + vs.caretWidth; } else { if (inOverstrike) { rcCaret.top = rcCaret.bottom - 2; rcCaret.left = xposCaret + 1; rcCaret.right = rcCaret.left + widthOverstrikeCaret - 1; } else { rcCaret.left = xposCaret - caretWidthOffset; rcCaret.right = rcCaret.left + vs.caretWidth; } } surface->FillRectangle(rcCaret, vs.caretcolour.allocated); } } } if (bufferedDraw) { Point from(vs.fixedColumnWidth, 0); PRectangle rcCopyArea(vs.fixedColumnWidth, yposScreen, rcClient.right, yposScreen + vs.lineHeight); surfaceWindow->Copy(rcCopyArea, from, *pixmapLine); } //durCopy += et.Duration(true); } if (!bufferedDraw) { ypos += vs.lineHeight; } yposScreen += vs.lineHeight; visibleLine++; //gdk_flush(); } //if (durPaint < 0.00000001) // durPaint = 0.00000001; // Right column limit indicator PRectangle rcBeyondEOF = rcClient; rcBeyondEOF.left = vs.fixedColumnWidth; rcBeyondEOF.right = rcBeyondEOF.right; rcBeyondEOF.top = (cs.LinesDisplayed() - topLine) * vs.lineHeight; if (rcBeyondEOF.top < rcBeyondEOF.bottom) { surfaceWindow->FillRectangle(rcBeyondEOF, vs.styles[STYLE_DEFAULT].back.allocated); if (vs.edgeState == EDGE_LINE) { int edgeX = theEdge * vs.spaceWidth; rcBeyondEOF.left = edgeX + xStart; rcBeyondEOF.right = rcBeyondEOF.left + 1; surfaceWindow->FillRectangle(rcBeyondEOF, vs.edgecolour.allocated); } } //Platform::DebugPrintf( //"Layout:%9.6g Paint:%9.6g Ratio:%9.6g Copy:%9.6g Total:%9.6g\n", //durLayout, durPaint, durLayout / durPaint, durCopy, etWhole.Duration()); NotifyPainted(); } } // Space (3 space characters) between line numbers and text when printing. #define lineNumberPrintSpace " " ColourDesired InvertedLight(ColourDesired orig) { unsigned int r = orig.GetRed(); unsigned int g = orig.GetGreen(); unsigned int b = orig.GetBlue(); unsigned int l = (r + g + b) / 3; // There is a better calculation for this that matches human eye unsigned int il = 0xff - l; if (l == 0) return ColourDesired(0xff, 0xff, 0xff); r = r * il / l; g = g * il / l; b = b * il / l; return ColourDesired(Platform::Minimum(r, 0xff), Platform::Minimum(g, 0xff), Platform::Minimum(b, 0xff)); } // This is mostly copied from the Paint method but with some things omitted // such as the margin markers, line numbers, selection and caret // Should be merged back into a combined Draw method. long Editor::FormatRange(bool draw, RangeToFormat *pfr) { if (!pfr) return 0; AutoSurface surface(pfr->hdc, this); if (!surface) return 0; AutoSurface surfaceMeasure(pfr->hdcTarget, this); if (!surfaceMeasure) { return 0; } ViewStyle vsPrint(vs); // Modify the view style for printing as do not normally want any of the transient features to be printed // Printing supports only the line number margin. int lineNumberIndex = -1; for (int margin = 0; margin < ViewStyle::margins; margin++) { if ((!vsPrint.ms[margin].symbol) && (vsPrint.ms[margin].width > 0)) { lineNumberIndex = margin; } else { vsPrint.ms[margin].width = 0; } } vsPrint.showMarkedLines = false; vsPrint.fixedColumnWidth = 0; vsPrint.zoomLevel = printMagnification; vsPrint.viewIndentationGuides = false; // Don't show the selection when printing vsPrint.selbackset = false; vsPrint.selforeset = false; vsPrint.whitespaceBackgroundSet = false; vsPrint.whitespaceForegroundSet = false; vsPrint.showCaretLineBackground = false; // Set colours for printing according to users settings for (int sty = 0;sty <= STYLE_MAX;sty++) { if (printColourMode == SC_PRINT_INVERTLIGHT) { vsPrint.styles[sty].fore.desired = InvertedLight(vsPrint.styles[sty].fore.desired); vsPrint.styles[sty].back.desired = InvertedLight(vsPrint.styles[sty].back.desired); } else if (printColourMode == SC_PRINT_BLACKONWHITE) { vsPrint.styles[sty].fore.desired = ColourDesired(0, 0, 0); vsPrint.styles[sty].back.desired = ColourDesired(0xff, 0xff, 0xff); } else if (printColourMode == SC_PRINT_COLOURONWHITE) { vsPrint.styles[sty].back.desired = ColourDesired(0xff, 0xff, 0xff); } else if (printColourMode == SC_PRINT_COLOURONWHITEDEFAULTBG) { if (sty <= STYLE_DEFAULT) { vsPrint.styles[sty].back.desired = ColourDesired(0xff, 0xff, 0xff); } } } // White background for the line numbers vsPrint.styles[STYLE_LINENUMBER].back.desired = ColourDesired(0xff, 0xff, 0xff); vsPrint.Refresh(*surfaceMeasure); // Ensure colours are set up vsPrint.RefreshColourPalette(palette, true); vsPrint.RefreshColourPalette(palette, false); // Determining width must hapen after fonts have been realised in Refresh int lineNumberWidth = 0; if (lineNumberIndex >= 0) { lineNumberWidth = surfaceMeasure->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, "99999" lineNumberPrintSpace, 5 + istrlen(lineNumberPrintSpace)); vsPrint.ms[lineNumberIndex].width = lineNumberWidth; } int linePrintStart = pdoc->LineFromPosition(pfr->chrg.cpMin); int linePrintLast = linePrintStart + (pfr->rc.bottom - pfr->rc.top) / vsPrint.lineHeight - 1; if (linePrintLast < linePrintStart) linePrintLast = linePrintStart; int linePrintMax = pdoc->LineFromPosition(pfr->chrg.cpMax); if (linePrintLast > linePrintMax) linePrintLast = linePrintMax; //Platform::DebugPrintf("Formatting lines=[%0d,%0d,%0d] top=%0d bottom=%0d line=%0d %0d\n", // linePrintStart, linePrintLast, linePrintMax, pfr->rc.top, pfr->rc.bottom, vsPrint.lineHeight, // surfaceMeasure->Height(vsPrint.styles[STYLE_LINENUMBER].font)); int endPosPrint = pdoc->Length(); if (linePrintLast < pdoc->LinesTotal()) endPosPrint = pdoc->LineStart(linePrintLast + 1); // Ensure we are styled to where we are formatting. pdoc->EnsureStyledTo(endPosPrint); int xStart = vsPrint.fixedColumnWidth + pfr->rc.left + lineNumberWidth; int ypos = pfr->rc.top; int lineDoc = linePrintStart; int nPrintPos = pfr->chrg.cpMin; int visibleLine = 0; int widthPrint = pfr->rc.Width() - lineNumberWidth; if (printWrapState == eWrapNone) widthPrint = LineLayout::wrapWidthInfinite; while (lineDoc <= linePrintLast && ypos < pfr->rc.bottom) { // When printing, the hdc and hdcTarget may be the same, so // changing the state of surfaceMeasure may change the underlying // state of surface. Therefore, any cached state is discarded before // using each surface. surfaceMeasure->FlushCachedState(); // Copy this line and its styles from the document into local arrays // and determine the x position at which each character starts. LineLayout ll(8000); LayoutLine(lineDoc, surfaceMeasure, vsPrint, &ll, widthPrint); ll.selStart = -1; ll.selEnd = -1; ll.containsCaret = false; PRectangle rcLine; rcLine.left = pfr->rc.left + lineNumberWidth; rcLine.top = ypos; rcLine.right = pfr->rc.right - 1; rcLine.bottom = ypos + vsPrint.lineHeight; // When document line is wrapped over multiple display lines, find where // to start printing from to ensure a particular position is on the first // line of the page. if (visibleLine == 0) { int startWithinLine = nPrintPos - pdoc->LineStart(lineDoc); for (int iwl = 0; iwl < ll.lines - 1; iwl++) { if (ll.LineStart(iwl) <= startWithinLine && ll.LineStart(iwl + 1) >= startWithinLine) { visibleLine = -iwl; } } if (ll.lines > 1 && startWithinLine >= ll.LineStart(ll.lines - 1)) { visibleLine = -(ll.lines - 1); } } if (draw && lineNumberWidth && (ypos + vsPrint.lineHeight <= pfr->rc.bottom) && (visibleLine >= 0)) { char number[100]; sprintf(number, "%d" lineNumberPrintSpace, lineDoc + 1); PRectangle rcNumber = rcLine; rcNumber.right = rcNumber.left + lineNumberWidth; // Right justify rcNumber.left -= surfaceMeasure->WidthText( vsPrint.styles[STYLE_LINENUMBER].font, number, istrlen(number)); surface->FlushCachedState(); surface->DrawTextNoClip(rcNumber, vsPrint.styles[STYLE_LINENUMBER].font, ypos + vsPrint.maxAscent, number, istrlen(number), vsPrint.styles[STYLE_LINENUMBER].fore.allocated, vsPrint.styles[STYLE_LINENUMBER].back.allocated); } // Draw the line surface->FlushCachedState(); for (int iwl = 0; iwl < ll.lines; iwl++) { if (ypos + vsPrint.lineHeight <= pfr->rc.bottom) { if (visibleLine >= 0) { if (draw) { rcLine.top = ypos; rcLine.bottom = ypos + vsPrint.lineHeight; DrawLine(surface, vsPrint, lineDoc, visibleLine, xStart, rcLine, &ll, iwl); } ypos += vsPrint.lineHeight; } visibleLine++; if (iwl == ll.lines - 1) nPrintPos = pdoc->LineStart(lineDoc + 1); else nPrintPos += ll.LineStart(iwl + 1) - ll.LineStart(iwl); } } ++lineDoc; } return nPrintPos; } int Editor::TextWidth(int style, const char *text) { RefreshStyleData(); AutoSurface surface(this); if (surface) { return surface->WidthText(vs.styles[style].font, text, istrlen(text)); } else { return 1; } } // Empty method is overridden on GTK+ to show / hide scrollbars void Editor::ReconfigureScrollBars() {} void Editor::SetScrollBars() { RefreshStyleData(); int nMax = MaxScrollPos(); int nPage = LinesOnScreen(); bool modified = ModifyScrollBars(nMax + nPage - 1, nPage); if (modified) { DwellEnd(true); } // TODO: ensure always showing as many lines as possible // May not be, if, for example, window made larger if (topLine > MaxScrollPos()) { SetTopLine(Platform::Clamp(topLine, 0, MaxScrollPos())); SetVerticalScrollPos(); Redraw(); } if (modified) { if (!AbandonPaint()) Redraw(); } //Platform::DebugPrintf("end max = %d page = %d\n", nMax, nPage); } void Editor::ChangeSize() { DropGraphics(); SetScrollBars(); if (wrapState != eWrapNone) { PRectangle rcTextArea = GetClientRectangle(); rcTextArea.left = vs.fixedColumnWidth; rcTextArea.right -= vs.rightMarginWidth; if (wrapWidth != rcTextArea.Width()) { NeedWrapping(); Redraw(); } } } void Editor::AddChar(char ch) { char s[2]; s[0] = ch; s[1] = '\0'; AddCharUTF(s, 1); } void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { bool wasSelection = currentPos != anchor; ClearSelection(); if (inOverstrike && !wasSelection && !RangeContainsProtected(currentPos, currentPos + 1)) { if (currentPos < (pdoc->Length())) { if (!IsEOLChar(pdoc->CharAt(currentPos))) { pdoc->DelChar(currentPos); } } } if (pdoc->InsertString(currentPos, s, len)) { SetEmptySelection(currentPos + len); } EnsureCaretVisible(); // Avoid blinking during rapid typing: ShowCaretAtCurrentPosition(); if (!caretSticky) { SetLastXChosen(); } if (treatAsDBCS) { NotifyChar((static_cast(s[0]) << 8) | static_cast(s[1])); } else { int byte = static_cast(s[0]); if ((byte < 0xC0) || (1 == len)) { // Handles UTF-8 characters between 0x01 and 0x7F and single byte // characters when not in UTF-8 mode. // Also treats \0 and naked trail bytes 0x80 to 0xBF as valid // characters representing themselves. } else { // Unroll 1 to 3 byte UTF-8 sequences. See reference data at: // http://www.cl.cam.ac.uk/~mgk25/unicode.html // http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt if (byte < 0xE0) { int byte2 = static_cast(s[1]); if ((byte2 & 0xC0) == 0x80) { // Two-byte-character lead-byte followed by a trail-byte. byte = (((byte & 0x1F) << 6) | (byte2 & 0x3F)); } // A two-byte-character lead-byte not followed by trail-byte // represents itself. } else if (byte < 0xF0) { int byte2 = static_cast(s[1]); int byte3 = static_cast(s[2]); if (((byte2 & 0xC0) == 0x80) && ((byte3 & 0xC0) == 0x80)) { // Three-byte-character lead byte followed by two trail bytes. byte = (((byte & 0x0F) << 12) | ((byte2 & 0x3F) << 6) | (byte3 & 0x3F)); } // A three-byte-character lead-byte not followed by two trail-bytes // represents itself. } } NotifyChar(byte); } } void Editor::ClearSelection() { if (!SelectionContainsProtected()) { int startPos = SelectionStart(); if (selType == selStream) { unsigned int chars = SelectionEnd() - startPos; if (0 != chars) { pdoc->BeginUndoAction(); pdoc->DeleteChars(startPos, chars); pdoc->EndUndoAction(); } } else { pdoc->BeginUndoAction(); SelectionLineIterator lineIterator(this, false); while (lineIterator.Iterate()) { startPos = lineIterator.startPos; unsigned int chars = lineIterator.endPos - startPos; if (0 != chars) { pdoc->DeleteChars(startPos, chars); } } pdoc->EndUndoAction(); selType = selStream; } SetEmptySelection(startPos); } } void Editor::ClearAll() { pdoc->BeginUndoAction(); if (0 != pdoc->Length()) { pdoc->DeleteChars(0, pdoc->Length()); } if (!pdoc->IsReadOnly()) { cs.Clear(); } pdoc->EndUndoAction(); anchor = 0; currentPos = 0; SetTopLine(0); SetVerticalScrollPos(); InvalidateStyleRedraw(); } void Editor::ClearDocumentStyle() { pdoc->StartStyling(0, '\377'); pdoc->SetStyleFor(pdoc->Length(), 0); cs.ShowAll(); pdoc->ClearLevels(); } void Editor::Cut() { if (!pdoc->IsReadOnly() && !SelectionContainsProtected()) { Copy(); ClearSelection(); } } void Editor::PasteRectangular(int pos, const char *ptr, int len) { if (pdoc->IsReadOnly() || SelectionContainsProtected()) { return; } currentPos = pos; int xInsert = XFromPosition(currentPos); int line = pdoc->LineFromPosition(currentPos); bool prevCr = false; pdoc->BeginUndoAction(); for (int i = 0; i < len; i++) { if (IsEOLChar(ptr[i])) { if ((ptr[i] == '\r') || (!prevCr)) line++; if (line >= pdoc->LinesTotal()) { if (pdoc->eolMode != SC_EOL_LF) pdoc->InsertChar(pdoc->Length(), '\r'); if (pdoc->eolMode != SC_EOL_CR) pdoc->InsertChar(pdoc->Length(), '\n'); } // Pad the end of lines with spaces if required currentPos = PositionFromLineX(line, xInsert); if ((XFromPosition(currentPos) < xInsert) && (i + 1 < len)) { for (int i = 0; i < xInsert - XFromPosition(currentPos); i++) { pdoc->InsertChar(currentPos, ' '); currentPos++; } } prevCr = ptr[i] == '\r'; } else { pdoc->InsertString(currentPos, ptr + i, 1); currentPos++; prevCr = false; } } pdoc->EndUndoAction(); SetEmptySelection(pos); } bool Editor::CanPaste() { return !pdoc->IsReadOnly() && !SelectionContainsProtected(); } void Editor::Clear() { if (currentPos == anchor) { if (!RangeContainsProtected(currentPos, currentPos + 1)) { DelChar(); } } else { ClearSelection(); } SetEmptySelection(currentPos); } void Editor::SelectAll() { SetSelection(0, pdoc->Length()); Redraw(); } void Editor::Undo() { if (pdoc->CanUndo()) { InvalidateCaret(); int newPos = pdoc->Undo(); if (newPos >= 0) SetEmptySelection(newPos); EnsureCaretVisible(); } } void Editor::Redo() { if (pdoc->CanRedo()) { int newPos = pdoc->Redo(); if (newPos >= 0) SetEmptySelection(newPos); EnsureCaretVisible(); } } void Editor::DelChar() { if (!RangeContainsProtected(currentPos, currentPos + 1)) { pdoc->DelChar(currentPos); } // Avoid blinking during rapid typing: ShowCaretAtCurrentPosition(); } void Editor::DelCharBack(bool allowLineStartDeletion) { if (currentPos == anchor) { if (!RangeContainsProtected(currentPos - 1, currentPos)) { int lineCurrentPos = pdoc->LineFromPosition(currentPos); if (allowLineStartDeletion || (pdoc->LineStart(lineCurrentPos) != currentPos)) { if (pdoc->GetColumn(currentPos) <= pdoc->GetLineIndentation(lineCurrentPos) && pdoc->GetColumn(currentPos) > 0 && pdoc->backspaceUnindents) { pdoc->BeginUndoAction(); int indentation = pdoc->GetLineIndentation(lineCurrentPos); int indentationStep = pdoc->IndentSize(); if (indentation % indentationStep == 0) { pdoc->SetLineIndentation(lineCurrentPos, indentation - indentationStep); } else { pdoc->SetLineIndentation(lineCurrentPos, indentation - (indentation % indentationStep)); } SetEmptySelection(pdoc->GetLineIndentPosition(lineCurrentPos)); pdoc->EndUndoAction(); } else { pdoc->DelCharBack(currentPos); } } } } else { ClearSelection(); SetEmptySelection(currentPos); } // Avoid blinking during rapid typing: ShowCaretAtCurrentPosition(); } void Editor::NotifyFocus(bool) {} void Editor::NotifyStyleToNeeded(int endStyleNeeded) { SCNotification scn = {0}; scn.nmhdr.code = SCN_STYLENEEDED; scn.position = endStyleNeeded; NotifyParent(scn); } void Editor::NotifyStyleNeeded(Document*, void *, int endStyleNeeded) { NotifyStyleToNeeded(endStyleNeeded); } void Editor::NotifyChar(int ch) { SCNotification scn = {0}; scn.nmhdr.code = SCN_CHARADDED; scn.ch = ch; NotifyParent(scn); if (recordingMacro) { char txt[2]; txt[0] = static_cast(ch); txt[1] = '\0'; NotifyMacroRecord(SCI_REPLACESEL, 0, reinterpret_cast(txt)); } } void Editor::NotifySavePoint(bool isSavePoint) { SCNotification scn = {0}; if (isSavePoint) { scn.nmhdr.code = SCN_SAVEPOINTREACHED; } else { scn.nmhdr.code = SCN_SAVEPOINTLEFT; } NotifyParent(scn); } void Editor::NotifyModifyAttempt() { SCNotification scn = {0}; scn.nmhdr.code = SCN_MODIFYATTEMPTRO; NotifyParent(scn); } void Editor::NotifyDoubleClick(Point, bool) { SCNotification scn = {0}; scn.nmhdr.code = SCN_DOUBLECLICK; NotifyParent(scn); } void Editor::NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt) { SCNotification scn = {0}; scn.nmhdr.code = SCN_HOTSPOTDOUBLECLICK; scn.position = position; scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | (alt ? SCI_ALT : 0); NotifyParent(scn); } void Editor::NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt) { SCNotification scn = {0}; scn.nmhdr.code = SCN_HOTSPOTCLICK; scn.position = position; scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | (alt ? SCI_ALT : 0); NotifyParent(scn); } void Editor::NotifyUpdateUI() { SCNotification scn = {0}; scn.nmhdr.code = SCN_UPDATEUI; NotifyParent(scn); } void Editor::NotifyPainted() { SCNotification scn = {0}; scn.nmhdr.code = SCN_PAINTED; NotifyParent(scn); } bool Editor::NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt) { int marginClicked = -1; int x = 0; for (int margin = 0; margin < ViewStyle::margins; margin++) { if ((pt.x > x) && (pt.x < x + vs.ms[margin].width)) marginClicked = margin; x += vs.ms[margin].width; } if ((marginClicked >= 0) && vs.ms[marginClicked].sensitive) { SCNotification scn = {0}; scn.nmhdr.code = SCN_MARGINCLICK; scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | (alt ? SCI_ALT : 0); scn.position = pdoc->LineStart(LineFromLocation(pt)); scn.margin = marginClicked; NotifyParent(scn); return true; } else { return false; } } void Editor::NotifyNeedShown(int pos, int len) { SCNotification scn = {0}; scn.nmhdr.code = SCN_NEEDSHOWN; scn.position = pos; scn.length = len; NotifyParent(scn); } void Editor::NotifyDwelling(Point pt, bool state) { SCNotification scn = {0}; scn.nmhdr.code = state ? SCN_DWELLSTART : SCN_DWELLEND; scn.position = PositionFromLocationClose(pt); scn.x = pt.x; scn.y = pt.y; NotifyParent(scn); } void Editor::NotifyZoom() { SCNotification scn = {0}; scn.nmhdr.code = SCN_ZOOM; NotifyParent(scn); } // Notifications from document void Editor::NotifyModifyAttempt(Document*, void *) { //Platform::DebugPrintf("** Modify Attempt\n"); NotifyModifyAttempt(); } void Editor::NotifyMove(int position) { SCNotification scn = {0}; scn.nmhdr.code = SCN_POSCHANGED; scn.position = position; NotifyParent(scn); } void Editor::NotifySavePoint(Document*, void *, bool atSavePoint) { //Platform::DebugPrintf("** Save Point %s\n", atSavePoint ? "On" : "Off"); NotifySavePoint(atSavePoint); } void Editor::CheckModificationForWrap(DocModification mh) { if (mh.modificationType & (SC_MOD_INSERTTEXT|SC_MOD_DELETETEXT)) { llc.Invalidate(LineLayout::llCheckTextAndStyle); if (wrapState != eWrapNone) { int lineDoc = pdoc->LineFromPosition(mh.position); if (mh.linesAdded <= 0) { AutoSurface surface(this); AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); if (surface && ll) { LayoutLine(lineDoc, surface, vs, ll, wrapWidth); if (cs.GetHeight(lineDoc) != ll->lines) { NeedWrapping(lineDoc - 1, lineDoc + 1); Redraw(); } } } else { NeedWrapping(lineDoc, lineDoc + 1 + mh.linesAdded); } } } } // Move a position so it is still after the same character as before the insertion. static inline int MovePositionForInsertion(int position, int startInsertion, int length) { if (position > startInsertion) { return position + length; } return position; } // Move a position so it is still after the same character as before the deletion if that // character is still present else after the previous surviving character. static inline int MovePositionForDeletion(int position, int startDeletion, int length) { if (position > startDeletion) { int endDeletion = startDeletion + length; if (position > endDeletion) { return position - length; } else { return startDeletion; } } else { return position; } } void Editor::NotifyModified(Document*, DocModification mh, void *) { needUpdateUI = true; if (paintState == painting) { CheckForChangeOutsidePaint(Range(mh.position, mh.position + mh.length)); } if (mh.modificationType & SC_MOD_CHANGESTYLE) { pdoc->IncrementStyleClock(); if (paintState == notPainting) { if (mh.position < pdoc->LineStart(topLine)) { // Styling performed before this view Redraw(); } else { InvalidateRange(mh.position, mh.position + mh.length); } } } else { // Move selection and brace highlights if (mh.modificationType & SC_MOD_INSERTTEXT) { currentPos = MovePositionForInsertion(currentPos, mh.position, mh.length); anchor = MovePositionForInsertion(anchor, mh.position, mh.length); braces[0] = MovePositionForInsertion(braces[0], mh.position, mh.length); braces[1] = MovePositionForInsertion(braces[1], mh.position, mh.length); } else if (mh.modificationType & SC_MOD_DELETETEXT) { currentPos = MovePositionForDeletion(currentPos, mh.position, mh.length); anchor = MovePositionForDeletion(anchor, mh.position, mh.length); braces[0] = MovePositionForDeletion(braces[0], mh.position, mh.length); braces[1] = MovePositionForDeletion(braces[1], mh.position, mh.length); } if (cs.LinesDisplayed() < cs.LinesInDoc()) { // Some lines are hidden so may need shown. // TODO: check if the modified area is hidden. if (mh.modificationType & SC_MOD_BEFOREINSERT) { NotifyNeedShown(mh.position, mh.length); } else if (mh.modificationType & SC_MOD_BEFOREDELETE) { NotifyNeedShown(mh.position, mh.length); } } if (mh.linesAdded != 0) { // Update contraction state for inserted and removed lines // lineOfPos should be calculated in context of state before modification, shouldn't it int lineOfPos = pdoc->LineFromPosition(mh.position); if (mh.linesAdded > 0) { cs.InsertLines(lineOfPos, mh.linesAdded); } else { cs.DeleteLines(lineOfPos, -mh.linesAdded); } } CheckModificationForWrap(mh); if (mh.linesAdded != 0) { // Avoid scrolling of display if change before current display if (mh.position < posTopLine && !CanDeferToLastStep(mh)) { int newTop = Platform::Clamp(topLine + mh.linesAdded, 0, MaxScrollPos()); if (newTop != topLine) { SetTopLine(newTop); SetVerticalScrollPos(); } } //Platform::DebugPrintf("** %x Doc Changed\n", this); // TODO: could invalidate from mh.startModification to end of screen //InvalidateRange(mh.position, mh.position + mh.length); if (paintState == notPainting && !CanDeferToLastStep(mh)) { Redraw(); } } else { //Platform::DebugPrintf("** %x Line Changed %d .. %d\n", this, // mh.position, mh.position + mh.length); if (paintState == notPainting && mh.length && !CanEliminate(mh)) { InvalidateRange(mh.position, mh.position + mh.length); } } } if (mh.linesAdded != 0 && !CanDeferToLastStep(mh)) { SetScrollBars(); } if (mh.modificationType & SC_MOD_CHANGEMARKER) { if (paintState == notPainting) { RedrawSelMargin(); } } // NOW pay the piper WRT "deferred" visual updates if (IsLastStep(mh)) { SetScrollBars(); Redraw(); } // If client wants to see this modification if (mh.modificationType & modEventMask) { if ((mh.modificationType & SC_MOD_CHANGESTYLE) == 0) { // Real modification made to text of document. NotifyChange(); // Send EN_CHANGE } SCNotification scn = {0}; scn.nmhdr.code = SCN_MODIFIED; scn.position = mh.position; scn.modificationType = mh.modificationType; scn.text = mh.text; scn.length = mh.length; scn.linesAdded = mh.linesAdded; scn.line = mh.line; scn.foldLevelNow = mh.foldLevelNow; scn.foldLevelPrev = mh.foldLevelPrev; NotifyParent(scn); } } void Editor::NotifyDeleted(Document *, void *) { /* Do nothing */ } void Editor::NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long lParam) { // Enumerates all macroable messages switch (iMessage) { case SCI_CUT: case SCI_COPY: case SCI_PASTE: case SCI_CLEAR: case SCI_REPLACESEL: case SCI_ADDTEXT: case SCI_INSERTTEXT: case SCI_APPENDTEXT: case SCI_CLEARALL: case SCI_SELECTALL: case SCI_GOTOLINE: case SCI_GOTOPOS: case SCI_SEARCHANCHOR: case SCI_SEARCHNEXT: case SCI_SEARCHPREV: case SCI_LINEDOWN: case SCI_LINEDOWNEXTEND: case SCI_PARADOWN: case SCI_PARADOWNEXTEND: case SCI_LINEUP: case SCI_LINEUPEXTEND: case SCI_PARAUP: case SCI_PARAUPEXTEND: case SCI_CHARLEFT: case SCI_CHARLEFTEXTEND: case SCI_CHARRIGHT: case SCI_CHARRIGHTEXTEND: case SCI_WORDLEFT: case SCI_WORDLEFTEXTEND: case SCI_WORDRIGHT: case SCI_WORDRIGHTEXTEND: case SCI_WORDPARTLEFT: case SCI_WORDPARTLEFTEXTEND: case SCI_WORDPARTRIGHT: case SCI_WORDPARTRIGHTEXTEND: case SCI_WORDLEFTEND: case SCI_WORDLEFTENDEXTEND: case SCI_WORDRIGHTEND: case SCI_WORDRIGHTENDEXTEND: case SCI_HOME: case SCI_HOMEEXTEND: case SCI_LINEEND: case SCI_LINEENDEXTEND: case SCI_HOMEWRAP: case SCI_HOMEWRAPEXTEND: case SCI_LINEENDWRAP: case SCI_LINEENDWRAPEXTEND: case SCI_DOCUMENTSTART: case SCI_DOCUMENTSTARTEXTEND: case SCI_DOCUMENTEND: case SCI_DOCUMENTENDEXTEND: case SCI_STUTTEREDPAGEUP: case SCI_STUTTEREDPAGEUPEXTEND: case SCI_STUTTEREDPAGEDOWN: case SCI_STUTTEREDPAGEDOWNEXTEND: case SCI_PAGEUP: case SCI_PAGEUPEXTEND: case SCI_PAGEDOWN: case SCI_PAGEDOWNEXTEND: case SCI_EDITTOGGLEOVERTYPE: case SCI_CANCEL: case SCI_DELETEBACK: case SCI_TAB: case SCI_BACKTAB: case SCI_FORMFEED: case SCI_VCHOME: case SCI_VCHOMEEXTEND: case SCI_VCHOMEWRAP: case SCI_VCHOMEWRAPEXTEND: case SCI_DELWORDLEFT: case SCI_DELWORDRIGHT: case SCI_DELLINELEFT: case SCI_DELLINERIGHT: case SCI_LINECOPY: case SCI_LINECUT: case SCI_LINEDELETE: case SCI_LINETRANSPOSE: case SCI_LINEDUPLICATE: case SCI_LOWERCASE: case SCI_UPPERCASE: case SCI_LINESCROLLDOWN: case SCI_LINESCROLLUP: case SCI_DELETEBACKNOTLINE: case SCI_HOMEDISPLAY: case SCI_HOMEDISPLAYEXTEND: case SCI_LINEENDDISPLAY: case SCI_LINEENDDISPLAYEXTEND: case SCI_SETSELECTIONMODE: case SCI_LINEDOWNRECTEXTEND: case SCI_LINEUPRECTEXTEND: case SCI_CHARLEFTRECTEXTEND: case SCI_CHARRIGHTRECTEXTEND: case SCI_HOMERECTEXTEND: case SCI_VCHOMERECTEXTEND: case SCI_LINEENDRECTEXTEND: case SCI_PAGEUPRECTEXTEND: case SCI_PAGEDOWNRECTEXTEND: break; // Filter out all others like display changes. Also, newlines are redundant // with char insert messages. case SCI_NEWLINE: default: // printf("Filtered out %ld of macro recording\n", iMessage); return ; } // Send notification SCNotification scn = {0}; scn.nmhdr.code = SCN_MACRORECORD; scn.message = iMessage; scn.wParam = wParam; scn.lParam = lParam; NotifyParent(scn); } /** * Force scroll and keep position relative to top of window. * * If stuttered = true and not already at first/last row, move to first/last row of window. * If stuttered = true and already at first/last row, scroll as normal. */ void Editor::PageMove(int direction, selTypes sel, bool stuttered) { int topLineNew, newPos; // I consider only the caretYSlop, and ignore the caretYPolicy-- is that a problem? int currentLine = pdoc->LineFromPosition(currentPos); int topStutterLine = topLine + caretYSlop; int bottomStutterLine = topLine + LinesToScroll() - caretYSlop; if (stuttered && (direction < 0 && currentLine > topStutterLine)) { topLineNew = topLine; newPos = PositionFromLocation(Point(lastXChosen, vs.lineHeight * caretYSlop)); } else if (stuttered && (direction > 0 && currentLine < bottomStutterLine)) { topLineNew = topLine; newPos = PositionFromLocation(Point(lastXChosen, vs.lineHeight * (LinesToScroll() - caretYSlop))); } else { Point pt = LocationFromPosition(currentPos); topLineNew = Platform::Clamp( topLine + direction * LinesToScroll(), 0, MaxScrollPos()); newPos = PositionFromLocation( Point(lastXChosen, pt.y + direction * (vs.lineHeight * LinesToScroll()))); } if (topLineNew != topLine) { SetTopLine(topLineNew); MovePositionTo(newPos, sel); Redraw(); SetVerticalScrollPos(); } else { MovePositionTo(newPos, sel); } } void Editor::ChangeCaseOfSelection(bool makeUpperCase) { pdoc->BeginUndoAction(); int startCurrent = currentPos; int startAnchor = anchor; if (selType == selStream) { pdoc->ChangeCase(Range(SelectionStart(), SelectionEnd()), makeUpperCase); SetSelection(startCurrent, startAnchor); } else { SelectionLineIterator lineIterator(this, false); while (lineIterator.Iterate()) { pdoc->ChangeCase( Range(lineIterator.startPos, lineIterator.endPos), makeUpperCase); } // Would be nicer to keep the rectangular selection but this is complex SetEmptySelection(startCurrent); } pdoc->EndUndoAction(); } void Editor::LineTranspose() { int line = pdoc->LineFromPosition(currentPos); if (line > 0) { int startPrev = pdoc->LineStart(line - 1); int endPrev = pdoc->LineEnd(line - 1); int start = pdoc->LineStart(line); int end = pdoc->LineEnd(line); int startNext = pdoc->LineStart(line + 1); if (end < pdoc->Length()) { end = startNext; char *thisLine = CopyRange(start, end); pdoc->DeleteChars(start, end - start); if (pdoc->InsertString(startPrev, thisLine, end - start)) { MovePositionTo(startPrev + end - start); } delete []thisLine; } else { // Last line so line has no line end char *thisLine = CopyRange(start, end); char *prevEnd = CopyRange(endPrev, start); pdoc->DeleteChars(endPrev, end - endPrev); pdoc->InsertString(startPrev, thisLine, end - start); if (pdoc->InsertString(startPrev + end - start, prevEnd, start - endPrev)) { MovePositionTo(startPrev + end - endPrev); } delete []thisLine; delete []prevEnd; } } } void Editor::LineDuplicate() { int line = pdoc->LineFromPosition(currentPos); int start = pdoc->LineStart(line); int end = pdoc->LineEnd(line); char *thisLine = CopyRange(start, end); const char *eol = StringFromEOLMode(pdoc->eolMode); pdoc->InsertString(end, eol); pdoc->InsertString(end + istrlen(eol), thisLine, end - start); delete []thisLine; } void Editor::CancelModes() { moveExtendsSelection = false; } void Editor::NewLine() { ClearSelection(); const char *eol = "\n"; if (pdoc->eolMode == SC_EOL_CRLF) { eol = "\r\n"; } else if (pdoc->eolMode == SC_EOL_CR) { eol = "\r"; } // else SC_EOL_LF -> "\n" already set if (pdoc->InsertString(currentPos, eol)) { SetEmptySelection(currentPos + istrlen(eol)); while (*eol) { NotifyChar(*eol); eol++; } } SetLastXChosen(); EnsureCaretVisible(); // Avoid blinking during rapid typing: ShowCaretAtCurrentPosition(); } void Editor::CursorUpOrDown(int direction, selTypes sel) { Point pt = LocationFromPosition(currentPos); int posNew = PositionFromLocation( Point(lastXChosen, pt.y + direction * vs.lineHeight)); if (direction < 0) { // Line wrapping may lead to a location on the same line, so // seek back if that is the case. // There is an equivalent case when moving down which skips // over a line but as that does not trap the user it is fine. Point ptNew = LocationFromPosition(posNew); while ((posNew > 0) && (pt.y == ptNew.y)) { posNew--; ptNew = LocationFromPosition(posNew); } } MovePositionTo(posNew, sel); } void Editor::ParaUpOrDown(int direction, selTypes sel) { int lineDoc, savedPos = currentPos; do { MovePositionTo(direction > 0 ? pdoc->ParaDown(currentPos) : pdoc->ParaUp(currentPos), sel); lineDoc = pdoc->LineFromPosition(currentPos); if (direction > 0) { if (currentPos >= pdoc->Length() && !cs.GetVisible(lineDoc)) { if (sel == noSel) { MovePositionTo(pdoc->LineEndPosition(savedPos)); } break; } } } while (!cs.GetVisible(lineDoc)); } int Editor::StartEndDisplayLine(int pos, bool start) { RefreshStyleData(); int line = pdoc->LineFromPosition(pos); AutoSurface surface(this); AutoLineLayout ll(llc, RetrieveLineLayout(line)); int posRet = INVALID_POSITION; if (surface && ll) { unsigned int posLineStart = pdoc->LineStart(line); LayoutLine(line, surface, vs, ll, wrapWidth); int posInLine = pos - posLineStart; if (posInLine <= ll->maxLineLength) { for (int subLine = 0; subLine < ll->lines; subLine++) { if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) { if (start) { posRet = ll->LineStart(subLine) + posLineStart; } else { if (subLine == ll->lines - 1) posRet = ll->LineStart(subLine + 1) + posLineStart; else posRet = ll->LineStart(subLine + 1) + posLineStart - 1; } } } } } if (posRet == INVALID_POSITION) { return pos; } else { return posRet; } } int Editor::KeyCommand(unsigned int iMessage) { switch (iMessage) { case SCI_LINEDOWN: CursorUpOrDown(1); break; case SCI_LINEDOWNEXTEND: CursorUpOrDown(1, selStream); break; case SCI_LINEDOWNRECTEXTEND: CursorUpOrDown(1, selRectangle); break; case SCI_PARADOWN: ParaUpOrDown(1); break; case SCI_PARADOWNEXTEND: ParaUpOrDown(1, selStream); break; case SCI_LINESCROLLDOWN: ScrollTo(topLine + 1); MoveCaretInsideView(false); break; case SCI_LINEUP: CursorUpOrDown(-1); break; case SCI_LINEUPEXTEND: CursorUpOrDown(-1, selStream); break; case SCI_LINEUPRECTEXTEND: CursorUpOrDown(-1, selRectangle); break; case SCI_PARAUP: ParaUpOrDown(-1); break; case SCI_PARAUPEXTEND: ParaUpOrDown(-1, selStream); break; case SCI_LINESCROLLUP: ScrollTo(topLine - 1); MoveCaretInsideView(false); break; case SCI_CHARLEFT: if (SelectionEmpty() || moveExtendsSelection) { MovePositionTo(MovePositionSoVisible(currentPos - 1, -1)); } else { MovePositionTo(SelectionStart()); } SetLastXChosen(); break; case SCI_CHARLEFTEXTEND: MovePositionTo(MovePositionSoVisible(currentPos - 1, -1), selStream); SetLastXChosen(); break; case SCI_CHARLEFTRECTEXTEND: MovePositionTo(MovePositionSoVisible(currentPos - 1, -1), selRectangle); SetLastXChosen(); break; case SCI_CHARRIGHT: if (SelectionEmpty() || moveExtendsSelection) { MovePositionTo(MovePositionSoVisible(currentPos + 1, 1)); } else { MovePositionTo(SelectionEnd()); } SetLastXChosen(); break; case SCI_CHARRIGHTEXTEND: MovePositionTo(MovePositionSoVisible(currentPos + 1, 1), selStream); SetLastXChosen(); break; case SCI_CHARRIGHTRECTEXTEND: MovePositionTo(MovePositionSoVisible(currentPos + 1, 1), selRectangle); SetLastXChosen(); break; case SCI_WORDLEFT: MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, -1), -1)); SetLastXChosen(); break; case SCI_WORDLEFTEXTEND: MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, -1), -1), selStream); SetLastXChosen(); break; case SCI_WORDRIGHT: MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, 1), 1)); SetLastXChosen(); break; case SCI_WORDRIGHTEXTEND: MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, 1), 1), selStream); SetLastXChosen(); break; case SCI_WORDLEFTEND: MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, -1), -1)); SetLastXChosen(); break; case SCI_WORDLEFTENDEXTEND: MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, -1), -1), selStream); SetLastXChosen(); break; case SCI_WORDRIGHTEND: MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, 1), 1)); SetLastXChosen(); break; case SCI_WORDRIGHTENDEXTEND: MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, 1), 1), selStream); SetLastXChosen(); break; case SCI_HOME: MovePositionTo(pdoc->LineStart(pdoc->LineFromPosition(currentPos))); SetLastXChosen(); break; case SCI_HOMEEXTEND: MovePositionTo(pdoc->LineStart(pdoc->LineFromPosition(currentPos)), selStream); SetLastXChosen(); break; case SCI_HOMERECTEXTEND: MovePositionTo(pdoc->LineStart(pdoc->LineFromPosition(currentPos)), selRectangle); SetLastXChosen(); break; case SCI_LINEEND: MovePositionTo(pdoc->LineEndPosition(currentPos)); SetLastXChosen(); break; case SCI_LINEENDEXTEND: MovePositionTo(pdoc->LineEndPosition(currentPos), selStream); SetLastXChosen(); break; case SCI_LINEENDRECTEXTEND: MovePositionTo(pdoc->LineEndPosition(currentPos), selRectangle); SetLastXChosen(); break; case SCI_HOMEWRAP: { int homePos = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); if (currentPos <= homePos) homePos = pdoc->LineStart(pdoc->LineFromPosition(currentPos)); MovePositionTo(homePos); SetLastXChosen(); } break; case SCI_HOMEWRAPEXTEND: { int homePos = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); if (currentPos <= homePos) homePos = pdoc->LineStart(pdoc->LineFromPosition(currentPos)); MovePositionTo(homePos, selStream); SetLastXChosen(); } break; case SCI_LINEENDWRAP: { int endPos = MovePositionSoVisible(StartEndDisplayLine(currentPos, false), 1); int realEndPos = pdoc->LineEndPosition(currentPos); if (endPos > realEndPos // if moved past visible EOLs || currentPos >= endPos) // if at end of display line already endPos = realEndPos; MovePositionTo(endPos); SetLastXChosen(); } break; case SCI_LINEENDWRAPEXTEND: { int endPos = MovePositionSoVisible(StartEndDisplayLine(currentPos, false), 1); int realEndPos = pdoc->LineEndPosition(currentPos); if (endPos > realEndPos // if moved past visible EOLs || currentPos >= endPos) // if at end of display line already endPos = realEndPos; MovePositionTo(endPos, selStream); SetLastXChosen(); } break; case SCI_DOCUMENTSTART: MovePositionTo(0); SetLastXChosen(); break; case SCI_DOCUMENTSTARTEXTEND: MovePositionTo(0, selStream); SetLastXChosen(); break; case SCI_DOCUMENTEND: MovePositionTo(pdoc->Length()); SetLastXChosen(); break; case SCI_DOCUMENTENDEXTEND: MovePositionTo(pdoc->Length(), selStream); SetLastXChosen(); break; case SCI_STUTTEREDPAGEUP: PageMove(-1, noSel, true); break; case SCI_STUTTEREDPAGEUPEXTEND: PageMove(-1, selStream, true); break; case SCI_STUTTEREDPAGEDOWN: PageMove(1, noSel, true); break; case SCI_STUTTEREDPAGEDOWNEXTEND: PageMove(1, selStream, true); break; case SCI_PAGEUP: PageMove(-1); break; case SCI_PAGEUPEXTEND: PageMove(-1, selStream); break; case SCI_PAGEUPRECTEXTEND: PageMove(-1, selRectangle); break; case SCI_PAGEDOWN: PageMove(1); break; case SCI_PAGEDOWNEXTEND: PageMove(1, selStream); break; case SCI_PAGEDOWNRECTEXTEND: PageMove(1, selRectangle); break; case SCI_EDITTOGGLEOVERTYPE: inOverstrike = !inOverstrike; DropCaret(); ShowCaretAtCurrentPosition(); NotifyUpdateUI(); break; case SCI_CANCEL: // Cancel any modes - handled in subclass // Also unselect text CancelModes(); break; case SCI_DELETEBACK: DelCharBack(true); if (!caretSticky) { SetLastXChosen(); } EnsureCaretVisible(); break; case SCI_DELETEBACKNOTLINE: DelCharBack(false); if (!caretSticky) { SetLastXChosen(); } EnsureCaretVisible(); break; case SCI_TAB: Indent(true); if (!caretSticky) { SetLastXChosen(); } EnsureCaretVisible(); break; case SCI_BACKTAB: Indent(false); if (!caretSticky) { SetLastXChosen(); } EnsureCaretVisible(); break; case SCI_NEWLINE: NewLine(); break; case SCI_FORMFEED: AddChar('\f'); break; case SCI_VCHOME: MovePositionTo(pdoc->VCHomePosition(currentPos)); SetLastXChosen(); break; case SCI_VCHOMEEXTEND: MovePositionTo(pdoc->VCHomePosition(currentPos), selStream); SetLastXChosen(); break; case SCI_VCHOMERECTEXTEND: MovePositionTo(pdoc->VCHomePosition(currentPos), selRectangle); SetLastXChosen(); break; case SCI_VCHOMEWRAP: { int homePos = pdoc->VCHomePosition(currentPos); int viewLineStart = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); if ((viewLineStart < currentPos) && (viewLineStart > homePos)) homePos = viewLineStart; MovePositionTo(homePos); SetLastXChosen(); } break; case SCI_VCHOMEWRAPEXTEND: { int homePos = pdoc->VCHomePosition(currentPos); int viewLineStart = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); if ((viewLineStart < currentPos) && (viewLineStart > homePos)) homePos = viewLineStart; MovePositionTo(homePos, selStream); SetLastXChosen(); } break; case SCI_ZOOMIN: if (vs.zoomLevel < 20) { vs.zoomLevel++; InvalidateStyleRedraw(); NotifyZoom(); } break; case SCI_ZOOMOUT: if (vs.zoomLevel > -10) { vs.zoomLevel--; InvalidateStyleRedraw(); NotifyZoom(); } break; case SCI_DELWORDLEFT: { int startWord = pdoc->NextWordStart(currentPos, -1); pdoc->DeleteChars(startWord, currentPos - startWord); SetLastXChosen(); } break; case SCI_DELWORDRIGHT: { int endWord = pdoc->NextWordStart(currentPos, 1); pdoc->DeleteChars(currentPos, endWord - currentPos); } break; case SCI_DELLINELEFT: { int line = pdoc->LineFromPosition(currentPos); int start = pdoc->LineStart(line); pdoc->DeleteChars(start, currentPos - start); SetLastXChosen(); } break; case SCI_DELLINERIGHT: { int line = pdoc->LineFromPosition(currentPos); int end = pdoc->LineEnd(line); pdoc->DeleteChars(currentPos, end - currentPos); } break; case SCI_LINECOPY: { int lineStart = pdoc->LineFromPosition(SelectionStart()); int lineEnd = pdoc->LineFromPosition(SelectionEnd()); CopyRangeToClipboard(pdoc->LineStart(lineStart), pdoc->LineStart(lineEnd + 1)); } break; case SCI_LINECUT: { int lineStart = pdoc->LineFromPosition(SelectionStart()); int lineEnd = pdoc->LineFromPosition(SelectionEnd()); int start = pdoc->LineStart(lineStart); int end = pdoc->LineStart(lineEnd + 1); SetSelection(start, end); Cut(); SetLastXChosen(); } break; case SCI_LINEDELETE: { int line = pdoc->LineFromPosition(currentPos); int start = pdoc->LineStart(line); int end = pdoc->LineStart(line + 1); pdoc->DeleteChars(start, end - start); } break; case SCI_LINETRANSPOSE: LineTranspose(); break; case SCI_LINEDUPLICATE: LineDuplicate(); break; case SCI_LOWERCASE: ChangeCaseOfSelection(false); break; case SCI_UPPERCASE: ChangeCaseOfSelection(true); break; case SCI_WORDPARTLEFT: MovePositionTo(MovePositionSoVisible(pdoc->WordPartLeft(currentPos), -1)); SetLastXChosen(); break; case SCI_WORDPARTLEFTEXTEND: MovePositionTo(MovePositionSoVisible(pdoc->WordPartLeft(currentPos), -1), selStream); SetLastXChosen(); break; case SCI_WORDPARTRIGHT: MovePositionTo(MovePositionSoVisible(pdoc->WordPartRight(currentPos), 1)); SetLastXChosen(); break; case SCI_WORDPARTRIGHTEXTEND: MovePositionTo(MovePositionSoVisible(pdoc->WordPartRight(currentPos), 1), selStream); SetLastXChosen(); break; case SCI_HOMEDISPLAY: MovePositionTo(MovePositionSoVisible( StartEndDisplayLine(currentPos, true), -1)); SetLastXChosen(); break; case SCI_HOMEDISPLAYEXTEND: MovePositionTo(MovePositionSoVisible( StartEndDisplayLine(currentPos, true), -1), selStream); SetLastXChosen(); break; case SCI_LINEENDDISPLAY: MovePositionTo(MovePositionSoVisible( StartEndDisplayLine(currentPos, false), 1)); SetLastXChosen(); break; case SCI_LINEENDDISPLAYEXTEND: MovePositionTo(MovePositionSoVisible( StartEndDisplayLine(currentPos, false), 1), selStream); SetLastXChosen(); break; } return 0; } int Editor::KeyDefault(int, int) { return 0; } int Editor::KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed) { DwellEnd(false); int modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | (alt ? SCI_ALT : 0); int msg = kmap.Find(key, modifiers); if (msg) { if (consumed) *consumed = true; return WndProc(msg, 0, 0); } else { if (consumed) *consumed = false; return KeyDefault(key, modifiers); } } void Editor::SetWhitespaceVisible(int view) { vs.viewWhitespace = static_cast(view); } int Editor::GetWhitespaceVisible() { return vs.viewWhitespace; } void Editor::Indent(bool forwards) { //Platform::DebugPrintf("INdent %d\n", forwards); int lineOfAnchor = pdoc->LineFromPosition(anchor); int lineCurrentPos = pdoc->LineFromPosition(currentPos); if (lineOfAnchor == lineCurrentPos) { if (forwards) { pdoc->BeginUndoAction(); ClearSelection(); if (pdoc->GetColumn(currentPos) <= pdoc->GetColumn(pdoc->GetLineIndentPosition(lineCurrentPos)) && pdoc->tabIndents) { int indentation = pdoc->GetLineIndentation(lineCurrentPos); int indentationStep = pdoc->IndentSize(); pdoc->SetLineIndentation(lineCurrentPos, indentation + indentationStep - indentation % indentationStep); SetEmptySelection(pdoc->GetLineIndentPosition(lineCurrentPos)); } else { if (pdoc->useTabs) { pdoc->InsertChar(currentPos, '\t'); SetEmptySelection(currentPos + 1); } else { int numSpaces = (pdoc->tabInChars) - (pdoc->GetColumn(currentPos) % (pdoc->tabInChars)); if (numSpaces < 1) numSpaces = pdoc->tabInChars; for (int i = 0; i < numSpaces; i++) { pdoc->InsertChar(currentPos + i, ' '); } SetEmptySelection(currentPos + numSpaces); } } pdoc->EndUndoAction(); } else { if (pdoc->GetColumn(currentPos) <= pdoc->GetLineIndentation(lineCurrentPos) && pdoc->tabIndents) { pdoc->BeginUndoAction(); int indentation = pdoc->GetLineIndentation(lineCurrentPos); int indentationStep = pdoc->IndentSize(); pdoc->SetLineIndentation(lineCurrentPos, indentation - indentationStep); SetEmptySelection(pdoc->GetLineIndentPosition(lineCurrentPos)); pdoc->EndUndoAction(); } else { int newColumn = ((pdoc->GetColumn(currentPos) - 1) / pdoc->tabInChars) * pdoc->tabInChars; if (newColumn < 0) newColumn = 0; int newPos = currentPos; while (pdoc->GetColumn(newPos) > newColumn) newPos--; SetEmptySelection(newPos); } } } else { int anchorPosOnLine = anchor - pdoc->LineStart(lineOfAnchor); int currentPosPosOnLine = currentPos - pdoc->LineStart(lineCurrentPos); // Multiple lines selected so indent / dedent int lineTopSel = Platform::Minimum(lineOfAnchor, lineCurrentPos); int lineBottomSel = Platform::Maximum(lineOfAnchor, lineCurrentPos); if (pdoc->LineStart(lineBottomSel) == anchor || pdoc->LineStart(lineBottomSel) == currentPos) lineBottomSel--; // If not selecting any characters on a line, do not indent pdoc->BeginUndoAction(); pdoc->Indent(forwards, lineBottomSel, lineTopSel); pdoc->EndUndoAction(); if (lineOfAnchor < lineCurrentPos) { if (currentPosPosOnLine == 0) SetSelection(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor)); else SetSelection(pdoc->LineStart(lineCurrentPos + 1), pdoc->LineStart(lineOfAnchor)); } else { if (anchorPosOnLine == 0) SetSelection(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor)); else SetSelection(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor + 1)); } } } /** * Search of a text in the document, in the given range. * @return The position of the found text, -1 if not found. */ long Editor::FindText( uptr_t wParam, ///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD, ///< @c SCFIND_WORDSTART, @c SCFIND_REGEXP or @c SCFIND_POSIX. sptr_t lParam) { ///< @c TextToFind structure: The text to search for in the given range. TextToFind *ft = reinterpret_cast(lParam); int lengthFound = istrlen(ft->lpstrText); int pos = pdoc->FindText(ft->chrg.cpMin, ft->chrg.cpMax, ft->lpstrText, (wParam & SCFIND_MATCHCASE) != 0, (wParam & SCFIND_WHOLEWORD) != 0, (wParam & SCFIND_WORDSTART) != 0, (wParam & SCFIND_REGEXP) != 0, (wParam & SCFIND_POSIX) != 0, &lengthFound); if (pos != -1) { ft->chrgText.cpMin = pos; ft->chrgText.cpMax = pos + lengthFound; } return pos; } /** * Relocatable search support : Searches relative to current selection * point and sets the selection to the found text range with * each search. */ /** * Anchor following searches at current selection start: This allows * multiple incremental interactive searches to be macro recorded * while still setting the selection to found text so the find/select * operation is self-contained. */ void Editor::SearchAnchor() { searchAnchor = SelectionStart(); } /** * Find text from current search anchor: Must call @c SearchAnchor first. * Used for next text and previous text requests. * @return The position of the found text, -1 if not found. */ long Editor::SearchText( unsigned int iMessage, ///< Accepts both @c SCI_SEARCHNEXT and @c SCI_SEARCHPREV. uptr_t wParam, ///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD, ///< @c SCFIND_WORDSTART, @c SCFIND_REGEXP or @c SCFIND_POSIX. sptr_t lParam) { ///< The text to search for. const char *txt = reinterpret_cast(lParam); int pos; int lengthFound = istrlen(txt); if (iMessage == SCI_SEARCHNEXT) { pos = pdoc->FindText(searchAnchor, pdoc->Length(), txt, (wParam & SCFIND_MATCHCASE) != 0, (wParam & SCFIND_WHOLEWORD) != 0, (wParam & SCFIND_WORDSTART) != 0, (wParam & SCFIND_REGEXP) != 0, (wParam & SCFIND_POSIX) != 0, &lengthFound); } else { pos = pdoc->FindText(searchAnchor, 0, txt, (wParam & SCFIND_MATCHCASE) != 0, (wParam & SCFIND_WHOLEWORD) != 0, (wParam & SCFIND_WORDSTART) != 0, (wParam & SCFIND_REGEXP) != 0, (wParam & SCFIND_POSIX) != 0, &lengthFound); } if (pos != -1) { SetSelection(pos, pos + lengthFound); } return pos; } /** * Search for text in the target range of the document. * @return The position of the found text, -1 if not found. */ long Editor::SearchInTarget(const char *text, int length) { int lengthFound = length; int pos = pdoc->FindText(targetStart, targetEnd, text, (searchFlags & SCFIND_MATCHCASE) != 0, (searchFlags & SCFIND_WHOLEWORD) != 0, (searchFlags & SCFIND_WORDSTART) != 0, (searchFlags & SCFIND_REGEXP) != 0, (searchFlags & SCFIND_POSIX) != 0, &lengthFound); if (pos != -1) { targetStart = pos; targetEnd = pos + lengthFound; } return pos; } void Editor::GoToLine(int lineNo) { if (lineNo > pdoc->LinesTotal()) lineNo = pdoc->LinesTotal(); if (lineNo < 0) lineNo = 0; SetEmptySelection(pdoc->LineStart(lineNo)); ShowCaretAtCurrentPosition(); EnsureCaretVisible(); } static bool Close(Point pt1, Point pt2) { if (abs(pt1.x - pt2.x) > 3) return false; if (abs(pt1.y - pt2.y) > 3) return false; return true; } char *Editor::CopyRange(int start, int end) { char *text = 0; if (start < end) { int len = end - start; text = new char[len + 1]; if (text) { for (int i = 0; i < len; i++) { text[i] = pdoc->CharAt(start + i); } text[len] = '\0'; } } return text; } void Editor::CopySelectionFromRange(SelectionText *ss, int start, int end) { ss->Set(CopyRange(start, end), end - start + 1, pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false); } void Editor::CopySelectionRange(SelectionText *ss) { if (selType == selStream) { CopySelectionFromRange(ss, SelectionStart(), SelectionEnd()); } else { char *text = 0; int size = 0; SelectionLineIterator lineIterator(this); while (lineIterator.Iterate()) { size += lineIterator.endPos - lineIterator.startPos; if (selType != selLines) { size++; if (pdoc->eolMode == SC_EOL_CRLF) { size++; } } } if (size > 0) { text = new char[size + 1]; if (text) { int j = 0; lineIterator.Reset(); while (lineIterator.Iterate()) { for (int i = lineIterator.startPos; i < lineIterator.endPos; i++) { text[j++] = pdoc->CharAt(i); } if (selType != selLines) { if (pdoc->eolMode != SC_EOL_LF) { text[j++] = '\r'; } if (pdoc->eolMode != SC_EOL_CR) { text[j++] = '\n'; } } } text[size] = '\0'; } } ss->Set(text, size + 1, pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, selType == selRectangle); } } void Editor::CopyRangeToClipboard(int start, int end) { start = pdoc->ClampPositionIntoDocument(start); end = pdoc->ClampPositionIntoDocument(end); SelectionText selectedText; selectedText.Set(CopyRange(start, end), end - start + 1, pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false); CopyToClipboard(selectedText); } void Editor::CopyText(int length, const char *text) { SelectionText selectedText; selectedText.Copy(text, length, pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false); CopyToClipboard(selectedText); } void Editor::SetDragPosition(int newPos) { if (newPos >= 0) { newPos = MovePositionOutsideChar(newPos, 1); posDrop = newPos; } if (posDrag != newPos) { caret.on = true; SetTicking(true); InvalidateCaret(); posDrag = newPos; InvalidateCaret(); } } void Editor::DisplayCursor(Window::Cursor c) { if (cursorMode == SC_CURSORNORMAL) wMain.SetCursor(c); else wMain.SetCursor(static_cast(cursorMode)); } void Editor::StartDrag() { // Always handled by subclasses //SetMouseCapture(true); //DisplayCursor(Window::cursorArrow); } void Editor::DropAt(int position, const char *value, bool moving, bool rectangular) { //Platform::DebugPrintf("DropAt %d\n", inDragDrop); if (inDragDrop) dropWentOutside = false; int positionWasInSelection = PositionInSelection(position); bool positionOnEdgeOfSelection = (position == SelectionStart()) || (position == SelectionEnd()); if ((!inDragDrop) || !(0 == positionWasInSelection) || (positionOnEdgeOfSelection && !moving)) { int selStart = SelectionStart(); int selEnd = SelectionEnd(); pdoc->BeginUndoAction(); int positionAfterDeletion = position; if (inDragDrop && moving) { // Remove dragged out text if (rectangular || selType == selLines) { SelectionLineIterator lineIterator(this); while (lineIterator.Iterate()) { if (position >= lineIterator.startPos) { if (position > lineIterator.endPos) { positionAfterDeletion -= lineIterator.endPos - lineIterator.startPos; } else { positionAfterDeletion -= position - lineIterator.startPos; } } } } else { if (position > selStart) { positionAfterDeletion -= selEnd - selStart; } } ClearSelection(); } position = positionAfterDeletion; if (rectangular) { PasteRectangular(position, value, istrlen(value)); pdoc->EndUndoAction(); // Should try to select new rectangle but it may not be a rectangle now so just select the drop position SetEmptySelection(position); } else { position = MovePositionOutsideChar(position, currentPos - position); if (pdoc->InsertString(position, value)) { SetSelection(position + istrlen(value), position); } pdoc->EndUndoAction(); } } else if (inDragDrop) { SetEmptySelection(position); } } /** * @return -1 if given position is before the selection, * 1 if position is after the selection, * 0 if position is inside the selection, */ int Editor::PositionInSelection(int pos) { pos = MovePositionOutsideChar(pos, currentPos - pos); if (pos < SelectionStart()) { return -1; } if (pos > SelectionEnd()) { return 1; } if (selType == selStream) { return 0; } else { SelectionLineIterator lineIterator(this); lineIterator.SetAt(pdoc->LineFromPosition(pos)); if (pos < lineIterator.startPos) { return -1; } else if (pos > lineIterator.endPos) { return 1; } else { return 0; } } } bool Editor::PointInSelection(Point pt) { int pos = PositionFromLocation(pt); if (0 == PositionInSelection(pos)) { // Probably inside, but we must make a finer test int selStart, selEnd; if (selType == selStream) { selStart = SelectionStart(); selEnd = SelectionEnd(); } else { SelectionLineIterator lineIterator(this); lineIterator.SetAt(pdoc->LineFromPosition(pos)); selStart = lineIterator.startPos; selEnd = lineIterator.endPos; } if (pos == selStart) { // see if just before selection Point locStart = LocationFromPosition(pos); if (pt.x < locStart.x) { return false; } } if (pos == selEnd) { // see if just after selection Point locEnd = LocationFromPosition(pos); if (pt.x > locEnd.x) { return false; } } return true; } return false; } bool Editor::PointInSelMargin(Point pt) { // Really means: "Point in a margin" if (vs.fixedColumnWidth > 0) { // There is a margin PRectangle rcSelMargin = GetClientRectangle(); rcSelMargin.right = vs.fixedColumnWidth - vs.leftMarginWidth; return rcSelMargin.Contains(pt); } else { return false; } } void Editor::LineSelection(int lineCurrent_, int lineAnchor_) { if (lineAnchor_ < lineCurrent_) { SetSelection(pdoc->LineStart(lineCurrent_ + 1), pdoc->LineStart(lineAnchor_)); } else if (lineAnchor_ > lineCurrent_) { SetSelection(pdoc->LineStart(lineCurrent_), pdoc->LineStart(lineAnchor_ + 1)); } else { // Same line, select it SetSelection(pdoc->LineStart(lineAnchor_ + 1), pdoc->LineStart(lineAnchor_)); } } void Editor::DwellEnd(bool mouseMoved) { if (mouseMoved) ticksToDwell = dwellDelay; else ticksToDwell = SC_TIME_FOREVER; if (dwelling && (dwellDelay < SC_TIME_FOREVER)) { dwelling = false; NotifyDwelling(ptMouseLast, dwelling); } } void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) { //Platform::DebugPrintf("Scintilla:ButtonDown %d %d = %d alt=%d\n", curTime, lastClickTime, curTime - lastClickTime, alt); ptMouseLast = pt; int newPos = PositionFromLocation(pt); newPos = MovePositionOutsideChar(newPos, currentPos - newPos); inDragDrop = false; moveExtendsSelection = false; bool processed = NotifyMarginClick(pt, shift, ctrl, alt); if (processed) return; bool inSelMargin = PointInSelMargin(pt); if (shift & !inSelMargin) { SetSelection(newPos); } if (((curTime - lastClickTime) < Platform::DoubleClickTime()) && Close(pt, lastClick)) { //Platform::DebugPrintf("Double click %d %d = %d\n", curTime, lastClickTime, curTime - lastClickTime); SetMouseCapture(true); SetEmptySelection(newPos); bool doubleClick = false; // Stop mouse button bounce changing selection type if (!Platform::MouseButtonBounce() || curTime != lastClickTime) { if (selectionType == selChar) { selectionType = selWord; doubleClick = true; } else if (selectionType == selWord) { selectionType = selLine; } else { selectionType = selChar; originalAnchorPos = currentPos; } } if (selectionType == selWord) { if (currentPos >= originalAnchorPos) { // Moved forward SetSelection(pdoc->ExtendWordSelect(currentPos, 1), pdoc->ExtendWordSelect(originalAnchorPos, -1)); } else { // Moved backward SetSelection(pdoc->ExtendWordSelect(currentPos, -1), pdoc->ExtendWordSelect(originalAnchorPos, 1)); } } else if (selectionType == selLine) { lineAnchor = LineFromLocation(pt); SetSelection(pdoc->LineStart(lineAnchor + 1), pdoc->LineStart(lineAnchor)); //Platform::DebugPrintf("Triple click: %d - %d\n", anchor, currentPos); } else { SetEmptySelection(currentPos); } //Platform::DebugPrintf("Double click: %d - %d\n", anchor, currentPos); if (doubleClick) { NotifyDoubleClick(pt, shift); if (PositionIsHotspot(newPos)) NotifyHotSpotDoubleClicked(newPos, shift, ctrl, alt); } } else { // Single click if (inSelMargin) { selType = selStream; if (ctrl) { SelectAll(); lastClickTime = curTime; return; } if (!shift) { lineAnchor = LineFromLocation(pt); // Single click in margin: select whole line LineSelection(lineAnchor, lineAnchor); SetSelection(pdoc->LineStart(lineAnchor + 1), pdoc->LineStart(lineAnchor)); } else { // Single shift+click in margin: select from line anchor to clicked line if (anchor > currentPos) lineAnchor = pdoc->LineFromPosition(anchor - 1); else lineAnchor = pdoc->LineFromPosition(anchor); int lineStart = LineFromLocation(pt); LineSelection(lineStart, lineAnchor); //lineAnchor = lineStart; // Keep the same anchor for ButtonMove } SetDragPosition(invalidPosition); SetMouseCapture(true); selectionType = selLine; } else { if (PointIsHotspot(pt)) { NotifyHotSpotClicked(newPos, shift, ctrl, alt); } if (!shift) { inDragDrop = PointInSelection(pt); } if (inDragDrop) { SetMouseCapture(false); SetDragPosition(newPos); CopySelectionRange(&drag); StartDrag(); } else { SetDragPosition(invalidPosition); SetMouseCapture(true); if (!shift) { SetEmptySelection(newPos); } selType = alt ? selRectangle : selStream; selectionType = selChar; originalAnchorPos = currentPos; SetRectangularRange(); } } } lastClickTime = curTime; lastXChosen = pt.x; ShowCaretAtCurrentPosition(); } bool Editor::PositionIsHotspot(int position) { return vs.styles[pdoc->StyleAt(position) & pdoc->stylingBitsMask].hotspot; } bool Editor::PointIsHotspot(Point pt) { int pos = PositionFromLocationClose(pt); if (pos == INVALID_POSITION) return false; return PositionIsHotspot(pos); } void Editor::SetHotSpotRange(Point *pt) { if (pt) { int pos = PositionFromLocation(*pt); // If we don't limit this to word characters then the // range can encompass more than the run range and then // the underline will not be drawn properly. int hsStart_ = pdoc->ExtendStyleRange(pos, -1, vs.hotspotSingleLine); int hsEnd_ = pdoc->ExtendStyleRange(pos, 1, vs.hotspotSingleLine); // Only invalidate the range if the hotspot range has changed... if (hsStart_ != hsStart || hsEnd_ != hsEnd) { if (hsStart != -1) { InvalidateRange(hsStart, hsEnd); } hsStart = hsStart_; hsEnd = hsEnd_; InvalidateRange(hsStart, hsEnd); } } else { if (hsStart != -1) { int hsStart_ = hsStart; int hsEnd_ = hsEnd; hsStart = -1; hsEnd = -1; InvalidateRange(hsStart_, hsEnd_); } else { hsStart = -1; hsEnd = -1; } } } void Editor::GetHotSpotRange(int& hsStart_, int& hsEnd_) { hsStart_ = hsStart; hsEnd_ = hsEnd; } void Editor::ButtonMove(Point pt) { if ((ptMouseLast.x != pt.x) || (ptMouseLast.y != pt.y)) { DwellEnd(true); } ptMouseLast = pt; //Platform::DebugPrintf("Move %d %d\n", pt.x, pt.y); if (HaveMouseCapture()) { // Slow down autoscrolling/selection autoScrollTimer.ticksToWait -= timer.tickSize; if (autoScrollTimer.ticksToWait > 0) return; autoScrollTimer.ticksToWait = autoScrollDelay; // Adjust selection int movePos = PositionFromLocation(pt); movePos = MovePositionOutsideChar(movePos, currentPos - movePos); if (posDrag >= 0) { SetDragPosition(movePos); } else { if (selectionType == selChar) { SetSelection(movePos); } else if (selectionType == selWord) { // Continue selecting by word if (movePos == originalAnchorPos) { // Didn't move // No need to do anything. Previously this case was lumped // in with "Moved forward", but that can be harmful in this // case: a handler for the NotifyDoubleClick re-adjusts // the selection for a fancier definition of "word" (for // example, in Perl it is useful to include the leading // '$', '%' or '@' on variables for word selection). In this // the ButtonMove() called via Tick() for auto-scrolling // could result in the fancier word selection adjustment // being unmade. } else if (movePos > originalAnchorPos) { // Moved forward SetSelection(pdoc->ExtendWordSelect(movePos, 1), pdoc->ExtendWordSelect(originalAnchorPos, -1)); } else { // Moved backward SetSelection(pdoc->ExtendWordSelect(movePos, -1), pdoc->ExtendWordSelect(originalAnchorPos, 1)); } } else { // Continue selecting by line int lineMove = LineFromLocation(pt); LineSelection(lineMove, lineAnchor); } } // While dragging to make rectangular selection, we don't want the current // position to jump to the end of smaller or empty lines. //xEndSelect = pt.x - vs.fixedColumnWidth + xOffset; xEndSelect = XFromPosition(movePos); // Autoscroll PRectangle rcClient = GetClientRectangle(); if (pt.y > rcClient.bottom) { int lineMove = cs.DisplayFromDoc(LineFromLocation(pt)); if (lineMove < 0) { lineMove = cs.DisplayFromDoc(pdoc->LinesTotal() - 1); } ScrollTo(lineMove - LinesOnScreen() + 5); Redraw(); } else if (pt.y < rcClient.top) { int lineMove = cs.DisplayFromDoc(LineFromLocation(pt)); ScrollTo(lineMove - 5); Redraw(); } EnsureCaretVisible(false, false, true); if (hsStart != -1 && !PositionIsHotspot(movePos)) SetHotSpotRange(NULL); } else { if (vs.fixedColumnWidth > 0) { // There is a margin if (PointInSelMargin(pt)) { DisplayCursor(Window::cursorReverseArrow); return; // No need to test for selection } } // Display regular (drag) cursor over selection if (PointInSelection(pt)) { DisplayCursor(Window::cursorArrow); } else if (PointIsHotspot(pt)) { DisplayCursor(Window::cursorHand); SetHotSpotRange(&pt); } else { DisplayCursor(Window::cursorText); SetHotSpotRange(NULL); } } } void Editor::ButtonUp(Point pt, unsigned int curTime, bool ctrl) { //Platform::DebugPrintf("ButtonUp %d\n", HaveMouseCapture()); if (HaveMouseCapture()) { if (PointInSelMargin(pt)) { DisplayCursor(Window::cursorReverseArrow); } else { DisplayCursor(Window::cursorText); SetHotSpotRange(NULL); } ptMouseLast = pt; SetMouseCapture(false); int newPos = PositionFromLocation(pt); newPos = MovePositionOutsideChar(newPos, currentPos - newPos); if (inDragDrop) { int selStart = SelectionStart(); int selEnd = SelectionEnd(); if (selStart < selEnd) { if (drag.len) { if (ctrl) { if (pdoc->InsertString(newPos, drag.s, drag.len)) { SetSelection(newPos, newPos + drag.len); } } else if (newPos < selStart) { pdoc->DeleteChars(selStart, drag.len); if (pdoc->InsertString(newPos, drag.s, drag.len)) { SetSelection(newPos, newPos + drag.len); } } else if (newPos > selEnd) { pdoc->DeleteChars(selStart, drag.len); newPos -= drag.len; if (pdoc->InsertString(newPos, drag.s, drag.len)) { SetSelection(newPos, newPos + drag.len); } } else { SetEmptySelection(newPos); } drag.Free(); } selectionType = selChar; } } else { if (selectionType == selChar) { SetSelection(newPos); } } SetRectangularRange(); lastClickTime = curTime; lastClick = pt; lastXChosen = pt.x; if (selType == selStream) { SetLastXChosen(); } inDragDrop = false; EnsureCaretVisible(false); } } // Called frequently to perform background UI including // caret blinking and automatic scrolling. void Editor::Tick() { if (HaveMouseCapture()) { // Auto scroll ButtonMove(ptMouseLast); } if (caret.period > 0) { timer.ticksToWait -= timer.tickSize; if (timer.ticksToWait <= 0) { caret.on = !caret.on; timer.ticksToWait = caret.period; InvalidateCaret(); } } if ((dwellDelay < SC_TIME_FOREVER) && (ticksToDwell > 0) && (!HaveMouseCapture())) { ticksToDwell -= timer.tickSize; if (ticksToDwell <= 0) { dwelling = true; NotifyDwelling(ptMouseLast, dwelling); } } } bool Editor::Idle() { bool idleDone; bool wrappingDone = (wrapState == eWrapNone) || (!backgroundWrapEnabled); if (!wrappingDone) { // Wrap lines during idle. WrapLines(false, -1); // No more wrapping if (docLineLastWrapped == docLastLineToWrap) wrappingDone = true; } // Add more idle things to do here, but make sure idleDone is // set correctly before the function returns. returning // false will stop calling this idle funtion until SetIdle() is // called again. idleDone = wrappingDone; // && thatDone && theOtherThingDone... return !idleDone; } void Editor::SetFocusState(bool focusState) { hasFocus = focusState; NotifyFocus(hasFocus); if (hasFocus) { ShowCaretAtCurrentPosition(); } else { CancelModes(); DropCaret(); } } static bool IsIn(int a, int minimum, int maximum) { return (a >= minimum) && (a <= maximum); } static bool IsOverlap(int mina, int maxa, int minb, int maxb) { return IsIn(mina, minb, maxb) || IsIn(maxa, minb, maxb) || IsIn(minb, mina, maxa) || IsIn(maxb, mina, maxa); } void Editor::CheckForChangeOutsidePaint(Range r) { if (paintState == painting && !paintingAllText) { //Platform::DebugPrintf("Checking range in paint %d-%d\n", r.start, r.end); if (!r.Valid()) return; PRectangle rcText = GetTextRectangle(); // Determine number of lines displayed including a possible partially displayed last line int linesDisplayed = (rcText.bottom - rcText.top - 1) / vs.lineHeight + 1; int bottomLine = topLine + linesDisplayed - 1; int lineRangeStart = cs.DisplayFromDoc(pdoc->LineFromPosition(r.start)); int lineRangeEnd = cs.DisplayFromDoc(pdoc->LineFromPosition(r.end)); if (!IsOverlap(topLine, bottomLine, lineRangeStart, lineRangeEnd)) { //Platform::DebugPrintf("No overlap (%d-%d) with window(%d-%d)\n", // lineRangeStart, lineRangeEnd, topLine, bottomLine); return; } // Assert rcPaint contained within or equal to rcText if (rcPaint.top > rcText.top) { // does range intersect rcText.top .. rcPaint.top int paintTopLine = ((rcPaint.top - rcText.top - 1) / vs.lineHeight) + topLine; // paintTopLine is the top line of the paint rectangle or the line just above if that line is completely inside the paint rectangle if (IsOverlap(topLine, paintTopLine, lineRangeStart, lineRangeEnd)) { //Platform::DebugPrintf("Change (%d-%d) in top npv(%d-%d)\n", // lineRangeStart, lineRangeEnd, topLine, paintTopLine); AbandonPaint(); return; } } if (rcPaint.bottom < rcText.bottom) { // does range intersect rcPaint.bottom .. rcText.bottom int paintBottomLine = ((rcPaint.bottom - rcText.top - 1) / vs.lineHeight + 1) + topLine; // paintTopLine is the bottom line of the paint rectangle or the line just below if that line is completely inside the paint rectangle if (IsOverlap(paintBottomLine, bottomLine, lineRangeStart, lineRangeEnd)) { //Platform::DebugPrintf("Change (%d-%d) in bottom npv(%d-%d)\n", // lineRangeStart, lineRangeEnd, paintBottomLine, bottomLine); AbandonPaint(); return; } } } } char BraceOpposite(char ch) { switch (ch) { case '(': return ')'; case ')': return '('; case '[': return ']'; case ']': return '['; case '{': return '}'; case '}': return '{'; case '<': return '>'; case '>': return '<'; default: return '\0'; } } // TODO: should be able to extend styled region to find matching brace // TODO: may need to make DBCS safe // so should be moved into Document int Editor::BraceMatch(int position, int /*maxReStyle*/) { char chBrace = pdoc->CharAt(position); char chSeek = BraceOpposite(chBrace); if (chSeek == '\0') return - 1; char styBrace = static_cast( pdoc->StyleAt(position) & pdoc->stylingBitsMask); int direction = -1; if (chBrace == '(' || chBrace == '[' || chBrace == '{' || chBrace == '<') direction = 1; int depth = 1; position = position + direction; while ((position >= 0) && (position < pdoc->Length())) { char chAtPos = pdoc->CharAt(position); char styAtPos = static_cast(pdoc->StyleAt(position) & pdoc->stylingBitsMask); if ((position > pdoc->GetEndStyled()) || (styAtPos == styBrace)) { if (chAtPos == chBrace) depth++; if (chAtPos == chSeek) depth--; if (depth == 0) return position; } position = position + direction; } return - 1; } void Editor::SetBraceHighlight(Position pos0, Position pos1, int matchStyle) { if ((pos0 != braces[0]) || (pos1 != braces[1]) || (matchStyle != bracesMatchStyle)) { if ((braces[0] != pos0) || (matchStyle != bracesMatchStyle)) { CheckForChangeOutsidePaint(Range(braces[0])); CheckForChangeOutsidePaint(Range(pos0)); braces[0] = pos0; } if ((braces[1] != pos1) || (matchStyle != bracesMatchStyle)) { CheckForChangeOutsidePaint(Range(braces[1])); CheckForChangeOutsidePaint(Range(pos1)); braces[1] = pos1; } bracesMatchStyle = matchStyle; if (paintState == notPainting) { Redraw(); } } } void Editor::SetDocPointer(Document *document) { //Platform::DebugPrintf("** %x setdoc to %x\n", pdoc, document); pdoc->RemoveWatcher(this, 0); pdoc->Release(); if (document == NULL) { pdoc = new Document(); } else { pdoc = document; } pdoc->AddRef(); // Ensure all positions within document selType = selStream; currentPos = 0; anchor = 0; targetStart = 0; targetEnd = 0; braces[0] = invalidPosition; braces[1] = invalidPosition; // Reset the contraction state to fully shown. cs.Clear(); cs.InsertLines(0, pdoc->LinesTotal() - 1); llc.Deallocate(); NeedWrapping(); pdoc->AddWatcher(this, 0); SetScrollBars(); Redraw(); } /** * Recursively expand a fold, making lines visible except where they have an unexpanded parent. */ void Editor::Expand(int &line, bool doExpand) { int lineMaxSubord = pdoc->GetLastChild(line); line++; while (line <= lineMaxSubord) { if (doExpand) cs.SetVisible(line, line, true); int level = pdoc->GetLevel(line); if (level & SC_FOLDLEVELHEADERFLAG) { if (doExpand && cs.GetExpanded(line)) { Expand(line, true); } else { Expand(line, false); } } else { line++; } } } void Editor::ToggleContraction(int line) { if (line >= 0) { if ((pdoc->GetLevel(line) & SC_FOLDLEVELHEADERFLAG) == 0) { line = pdoc->GetFoldParent(line); if (line < 0) return; } if (cs.GetExpanded(line)) { int lineMaxSubord = pdoc->GetLastChild(line); cs.SetExpanded(line, 0); if (lineMaxSubord > line) { cs.SetVisible(line + 1, lineMaxSubord, false); int lineCurrent = pdoc->LineFromPosition(currentPos); if (lineCurrent > line && lineCurrent <= lineMaxSubord) { // This does not re-expand the fold EnsureCaretVisible(); } SetScrollBars(); Redraw(); } } else { if (!(cs.GetVisible(line))) { EnsureLineVisible(line, false); GoToLine(line); } cs.SetExpanded(line, 1); Expand(line, true); SetScrollBars(); Redraw(); } } } /** * Recurse up from this line to find any folds that prevent this line from being visible * and unfold them all. */ void Editor::EnsureLineVisible(int lineDoc, bool enforcePolicy) { // In case in need of wrapping to ensure DisplayFromDoc works. WrapLines(true, -1); if (!cs.GetVisible(lineDoc)) { int lineParent = pdoc->GetFoldParent(lineDoc); if (lineParent >= 0) { if (lineDoc != lineParent) EnsureLineVisible(lineParent, enforcePolicy); if (!cs.GetExpanded(lineParent)) { cs.SetExpanded(lineParent, 1); Expand(lineParent, true); } } SetScrollBars(); Redraw(); } if (enforcePolicy) { int lineDisplay = cs.DisplayFromDoc(lineDoc); if (visiblePolicy & VISIBLE_SLOP) { if ((topLine > lineDisplay) || ((visiblePolicy & VISIBLE_STRICT) && (topLine + visibleSlop > lineDisplay))) { SetTopLine(Platform::Clamp(lineDisplay - visibleSlop, 0, MaxScrollPos())); SetVerticalScrollPos(); Redraw(); } else if ((lineDisplay > topLine + LinesOnScreen() - 1) || ((visiblePolicy & VISIBLE_STRICT) && (lineDisplay > topLine + LinesOnScreen() - 1 - visibleSlop))) { SetTopLine(Platform::Clamp(lineDisplay - LinesOnScreen() + 1 + visibleSlop, 0, MaxScrollPos())); SetVerticalScrollPos(); Redraw(); } } else { if ((topLine > lineDisplay) || (lineDisplay > topLine + LinesOnScreen() - 1) || (visiblePolicy & VISIBLE_STRICT)) { SetTopLine(Platform::Clamp(lineDisplay - LinesOnScreen() / 2 + 1, 0, MaxScrollPos())); SetVerticalScrollPos(); Redraw(); } } } } int Editor::ReplaceTarget(bool replacePatterns, const char *text, int length) { pdoc->BeginUndoAction(); if (length == -1) length = istrlen(text); if (replacePatterns) { text = pdoc->SubstituteByPosition(text, &length); if (!text) return 0; } if (targetStart != targetEnd) pdoc->DeleteChars(targetStart, targetEnd - targetStart); targetEnd = targetStart; pdoc->InsertString(targetStart, text, length); targetEnd = targetStart + length; pdoc->EndUndoAction(); return length; } bool Editor::IsUnicodeMode() const { return pdoc && (SC_CP_UTF8 == pdoc->dbcsCodePage); } int Editor::CodePage() const { if (pdoc) return pdoc->dbcsCodePage; else return 0; } int Editor::WrapCount(int line) { AutoSurface surface(this); AutoLineLayout ll(llc, RetrieveLineLayout(line)); if (surface && ll) { LayoutLine(line, surface, vs, ll, wrapWidth); return ll->lines; } else { return 1; } } static bool ValidMargin(unsigned long wParam) { return wParam < ViewStyle::margins; } static char *CharPtrFromSPtr(sptr_t lParam) { return reinterpret_cast(lParam); } sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { //Platform::DebugPrintf("S start wnd proc %d %d %d\n",iMessage, wParam, lParam); // Optional macro recording hook if (recordingMacro) NotifyMacroRecord(iMessage, wParam, lParam); switch (iMessage) { case SCI_GETTEXT: { if (lParam == 0) return pdoc->Length() + 1; if (wParam == 0) return 0; char *ptr = CharPtrFromSPtr(lParam); unsigned int iChar = 0; for (; iChar < wParam - 1; iChar++) ptr[iChar] = pdoc->CharAt(iChar); ptr[iChar] = '\0'; return iChar; } case SCI_SETTEXT: { if (lParam == 0) return 0; pdoc->BeginUndoAction(); pdoc->DeleteChars(0, pdoc->Length()); SetEmptySelection(0); pdoc->InsertString(0, CharPtrFromSPtr(lParam)); pdoc->EndUndoAction(); return 1; } case SCI_GETTEXTLENGTH: return pdoc->Length(); case SCI_CUT: Cut(); SetLastXChosen(); break; case SCI_COPY: Copy(); break; case SCI_COPYRANGE: CopyRangeToClipboard(wParam, lParam); break; case SCI_COPYTEXT: CopyText(wParam, CharPtrFromSPtr(lParam)); break; case SCI_PASTE: Paste(); if (!caretSticky) { SetLastXChosen(); } EnsureCaretVisible(); break; case SCI_CLEAR: Clear(); SetLastXChosen(); EnsureCaretVisible(); break; case SCI_UNDO: Undo(); SetLastXChosen(); break; case SCI_CANUNDO: return (pdoc->CanUndo() && !pdoc->IsReadOnly()) ? 1 : 0; case SCI_EMPTYUNDOBUFFER: pdoc->DeleteUndoHistory(); return 0; case SCI_GETFIRSTVISIBLELINE: return topLine; case SCI_GETLINE: { // Risk of overwriting the end of the buffer int lineStart = pdoc->LineStart(wParam); int lineEnd = pdoc->LineStart(wParam + 1); if (lParam == 0) { return lineEnd - lineStart; } char *ptr = CharPtrFromSPtr(lParam); int iPlace = 0; for (int iChar = lineStart; iChar < lineEnd; iChar++) { ptr[iPlace++] = pdoc->CharAt(iChar); } return iPlace; } case SCI_GETLINECOUNT: if (pdoc->LinesTotal() == 0) return 1; else return pdoc->LinesTotal(); case SCI_GETMODIFY: return !pdoc->IsSavePoint(); case SCI_SETSEL: { int nStart = static_cast(wParam); int nEnd = static_cast(lParam); if (nEnd < 0) nEnd = pdoc->Length(); if (nStart < 0) nStart = nEnd; // Remove selection selType = selStream; SetSelection(nEnd, nStart); EnsureCaretVisible(); } break; case SCI_GETSELTEXT: { if (lParam == 0) { if (selType == selStream) { return 1 + SelectionEnd() - SelectionStart(); } else { // TODO: why is selLines handled the slow way? int size = 0; int extraCharsPerLine = 0; if (selType != selLines) extraCharsPerLine = (pdoc->eolMode == SC_EOL_CRLF) ? 2 : 1; SelectionLineIterator lineIterator(this); while (lineIterator.Iterate()) { size += lineIterator.endPos + extraCharsPerLine - lineIterator.startPos; } return 1 + size; } } SelectionText selectedText; CopySelectionRange(&selectedText); char *ptr = CharPtrFromSPtr(lParam); int iChar = 0; if (selectedText.len) { for (; iChar < selectedText.len; iChar++) ptr[iChar] = selectedText.s[iChar]; } else { ptr[0] = '\0'; } return iChar; } case SCI_LINEFROMPOSITION: if (static_cast(wParam) < 0) return 0; return pdoc->LineFromPosition(wParam); case SCI_POSITIONFROMLINE: if (static_cast(wParam) < 0) wParam = pdoc->LineFromPosition(SelectionStart()); if (wParam == 0) return 0; // Even if there is no text, there is a first line that starts at 0 if (static_cast(wParam) > pdoc->LinesTotal()) return -1; //if (wParam > pdoc->LineFromPosition(pdoc->Length())) // Useful test, anyway... // return -1; return pdoc->LineStart(wParam); // Replacement of the old Scintilla interpretation of EM_LINELENGTH case SCI_LINELENGTH: if ((static_cast(wParam) < 0) || (static_cast(wParam) > pdoc->LineFromPosition(pdoc->Length()))) return 0; return pdoc->LineStart(wParam + 1) - pdoc->LineStart(wParam); case SCI_REPLACESEL: { if (lParam == 0) return 0; pdoc->BeginUndoAction(); ClearSelection(); char *replacement = CharPtrFromSPtr(lParam); pdoc->InsertString(currentPos, replacement); pdoc->EndUndoAction(); SetEmptySelection(currentPos + istrlen(replacement)); EnsureCaretVisible(); } break; case SCI_SETTARGETSTART: targetStart = wParam; break; case SCI_GETTARGETSTART: return targetStart; case SCI_SETTARGETEND: targetEnd = wParam; break; case SCI_GETTARGETEND: return targetEnd; case SCI_TARGETFROMSELECTION: if (currentPos < anchor) { targetStart = currentPos; targetEnd = anchor; } else { targetStart = anchor; targetEnd = currentPos; } break; case SCI_REPLACETARGET: PLATFORM_ASSERT(lParam); return ReplaceTarget(false, CharPtrFromSPtr(lParam), wParam); case SCI_REPLACETARGETRE: PLATFORM_ASSERT(lParam); return ReplaceTarget(true, CharPtrFromSPtr(lParam), wParam); case SCI_SEARCHINTARGET: PLATFORM_ASSERT(lParam); return SearchInTarget(CharPtrFromSPtr(lParam), wParam); case SCI_SETSEARCHFLAGS: searchFlags = wParam; break; case SCI_GETSEARCHFLAGS: return searchFlags; case SCI_POSITIONBEFORE: return pdoc->MovePositionOutsideChar(wParam-1, -1, true); case SCI_POSITIONAFTER: return pdoc->MovePositionOutsideChar(wParam+1, 1, true); case SCI_LINESCROLL: ScrollTo(topLine + lParam); HorizontalScrollTo(xOffset + wParam * vs.spaceWidth); return 1; case SCI_SETXOFFSET: xOffset = wParam; SetHorizontalScrollPos(); Redraw(); break; case SCI_GETXOFFSET: return xOffset; case SCI_CHOOSECARETX: SetLastXChosen(); break; case SCI_SCROLLCARET: EnsureCaretVisible(); break; case SCI_SETREADONLY: pdoc->SetReadOnly(wParam != 0); return 1; case SCI_GETREADONLY: return pdoc->IsReadOnly(); case SCI_CANPASTE: return CanPaste(); case SCI_POINTXFROMPOSITION: if (lParam < 0) { return 0; } else { Point pt = LocationFromPosition(lParam); return pt.x; } case SCI_POINTYFROMPOSITION: if (lParam < 0) { return 0; } else { Point pt = LocationFromPosition(lParam); return pt.y; } case SCI_FINDTEXT: return FindText(wParam, lParam); case SCI_GETTEXTRANGE: { if (lParam == 0) return 0; TextRange *tr = reinterpret_cast(lParam); int cpMax = tr->chrg.cpMax; if (cpMax == -1) cpMax = pdoc->Length(); PLATFORM_ASSERT(cpMax <= pdoc->Length()); int len = cpMax - tr->chrg.cpMin; // No -1 as cpMin and cpMax are referring to inter character positions pdoc->GetCharRange(tr->lpstrText, tr->chrg.cpMin, len); // Spec says copied text is terminated with a NUL tr->lpstrText[len] = '\0'; return len; // Not including NUL } case SCI_HIDESELECTION: hideSelection = wParam != 0; Redraw(); break; case SCI_FORMATRANGE: return FormatRange(wParam != 0, reinterpret_cast(lParam)); case SCI_GETMARGINLEFT: return vs.leftMarginWidth; case SCI_GETMARGINRIGHT: return vs.rightMarginWidth; case SCI_SETMARGINLEFT: vs.leftMarginWidth = lParam; InvalidateStyleRedraw(); break; case SCI_SETMARGINRIGHT: vs.rightMarginWidth = lParam; InvalidateStyleRedraw(); break; // Control specific mesages case SCI_ADDTEXT: { if (lParam == 0) return 0; pdoc->InsertString(CurrentPosition(), CharPtrFromSPtr(lParam), wParam); SetEmptySelection(currentPos + wParam); return 0; } case SCI_ADDSTYLEDTEXT: { if (lParam == 0) return 0; pdoc->InsertStyledString(CurrentPosition() * 2, CharPtrFromSPtr(lParam), wParam); SetEmptySelection(currentPos + wParam / 2); return 0; } case SCI_INSERTTEXT: { if (lParam == 0) return 0; int insertPos = wParam; if (static_cast(wParam) == -1) insertPos = CurrentPosition(); int newCurrent = CurrentPosition(); char *sz = CharPtrFromSPtr(lParam); pdoc->InsertString(insertPos, sz); if (newCurrent > insertPos) newCurrent += istrlen(sz); SetEmptySelection(newCurrent); return 0; } case SCI_APPENDTEXT: pdoc->InsertString(pdoc->Length(), CharPtrFromSPtr(lParam), wParam); return 0; case SCI_CLEARALL: ClearAll(); return 0; case SCI_CLEARDOCUMENTSTYLE: ClearDocumentStyle(); return 0; case SCI_SETUNDOCOLLECTION: pdoc->SetUndoCollection(wParam != 0); return 0; case SCI_GETUNDOCOLLECTION: return pdoc->IsCollectingUndo(); case SCI_BEGINUNDOACTION: pdoc->BeginUndoAction(); return 0; case SCI_ENDUNDOACTION: pdoc->EndUndoAction(); return 0; case SCI_GETCARETPERIOD: return caret.period; case SCI_SETCARETPERIOD: caret.period = wParam; break; case SCI_SETWORDCHARS: { pdoc->SetDefaultCharClasses(false); if (lParam == 0) return 0; pdoc->SetCharClasses(reinterpret_cast(lParam), Document::ccWord); } break; case SCI_SETWHITESPACECHARS: { if (lParam == 0) return 0; pdoc->SetCharClasses(reinterpret_cast(lParam), Document::ccSpace); } break; case SCI_SETCHARSDEFAULT: pdoc->SetDefaultCharClasses(true); break; case SCI_GETLENGTH: return pdoc->Length(); case SCI_ALLOCATE: pdoc->Allocate(wParam); break; case SCI_GETCHARAT: return pdoc->CharAt(wParam); case SCI_SETCURRENTPOS: SetSelection(wParam, anchor); break; case SCI_GETCURRENTPOS: return currentPos; case SCI_SETANCHOR: SetSelection(currentPos, wParam); break; case SCI_GETANCHOR: return anchor; case SCI_SETSELECTIONSTART: SetSelection(Platform::Maximum(currentPos, wParam), wParam); break; case SCI_GETSELECTIONSTART: return Platform::Minimum(anchor, currentPos); case SCI_SETSELECTIONEND: SetSelection(wParam, Platform::Minimum(anchor, wParam)); break; case SCI_GETSELECTIONEND: return Platform::Maximum(anchor, currentPos); case SCI_SETPRINTMAGNIFICATION: printMagnification = wParam; break; case SCI_GETPRINTMAGNIFICATION: return printMagnification; case SCI_SETPRINTCOLOURMODE: printColourMode = wParam; break; case SCI_GETPRINTCOLOURMODE: return printColourMode; case SCI_SETPRINTWRAPMODE: printWrapState = (wParam == SC_WRAP_WORD) ? eWrapWord : eWrapNone; break; case SCI_GETPRINTWRAPMODE: return printWrapState; case SCI_GETSTYLEAT: if (static_cast(wParam) >= pdoc->Length()) return 0; else return pdoc->StyleAt(wParam); case SCI_REDO: Redo(); break; case SCI_SELECTALL: SelectAll(); break; case SCI_SETSAVEPOINT: pdoc->SetSavePoint(); break; case SCI_GETSTYLEDTEXT: { if (lParam == 0) return 0; TextRange *tr = reinterpret_cast(lParam); int iPlace = 0; for (int iChar = tr->chrg.cpMin; iChar < tr->chrg.cpMax; iChar++) { tr->lpstrText[iPlace++] = pdoc->CharAt(iChar); tr->lpstrText[iPlace++] = pdoc->StyleAt(iChar); } tr->lpstrText[iPlace] = '\0'; tr->lpstrText[iPlace + 1] = '\0'; return iPlace; } case SCI_CANREDO: return (pdoc->CanRedo() && !pdoc->IsReadOnly()) ? 1 : 0; case SCI_MARKERLINEFROMHANDLE: return pdoc->LineFromHandle(wParam); case SCI_MARKERDELETEHANDLE: pdoc->DeleteMarkFromHandle(wParam); break; case SCI_GETVIEWWS: return vs.viewWhitespace; case SCI_SETVIEWWS: vs.viewWhitespace = static_cast(wParam); Redraw(); break; case SCI_POSITIONFROMPOINT: return PositionFromLocation(Point(wParam, lParam)); case SCI_POSITIONFROMPOINTCLOSE: return PositionFromLocationClose(Point(wParam, lParam)); case SCI_GOTOLINE: GoToLine(wParam); break; case SCI_GOTOPOS: SetEmptySelection(wParam); EnsureCaretVisible(); Redraw(); break; case SCI_GETCURLINE: { int lineCurrentPos = pdoc->LineFromPosition(currentPos); int lineStart = pdoc->LineStart(lineCurrentPos); unsigned int lineEnd = pdoc->LineStart(lineCurrentPos + 1); if (lParam == 0) { return 1 + lineEnd - lineStart; } char *ptr = CharPtrFromSPtr(lParam); unsigned int iPlace = 0; for (unsigned int iChar = lineStart; iChar < lineEnd && iPlace < wParam - 1; iChar++) { ptr[iPlace++] = pdoc->CharAt(iChar); } ptr[iPlace] = '\0'; return currentPos - lineStart; } case SCI_GETENDSTYLED: return pdoc->GetEndStyled(); case SCI_GETEOLMODE: return pdoc->eolMode; case SCI_SETEOLMODE: pdoc->eolMode = wParam; break; case SCI_STARTSTYLING: pdoc->StartStyling(wParam, static_cast(lParam)); break; case SCI_SETSTYLING: pdoc->SetStyleFor(wParam, static_cast(lParam)); break; case SCI_SETSTYLINGEX: // Specify a complete styling buffer if (lParam == 0) return 0; pdoc->SetStyles(wParam, CharPtrFromSPtr(lParam)); break; case SCI_SETBUFFEREDDRAW: bufferedDraw = wParam != 0; break; case SCI_GETBUFFEREDDRAW: return bufferedDraw; case SCI_GETTWOPHASEDRAW: return twoPhaseDraw; case SCI_SETTWOPHASEDRAW: twoPhaseDraw = wParam != 0; InvalidateStyleRedraw(); break; case SCI_SETTABWIDTH: if (wParam > 0) { pdoc->tabInChars = wParam; if (pdoc->indentInChars == 0) pdoc->actualIndentInChars = pdoc->tabInChars; } InvalidateStyleRedraw(); break; case SCI_GETTABWIDTH: return pdoc->tabInChars; case SCI_SETINDENT: pdoc->indentInChars = wParam; if (pdoc->indentInChars != 0) pdoc->actualIndentInChars = pdoc->indentInChars; else pdoc->actualIndentInChars = pdoc->tabInChars; InvalidateStyleRedraw(); break; case SCI_GETINDENT: return pdoc->indentInChars; case SCI_SETUSETABS: pdoc->useTabs = wParam != 0; InvalidateStyleRedraw(); break; case SCI_GETUSETABS: return pdoc->useTabs; case SCI_SETLINEINDENTATION: pdoc->SetLineIndentation(wParam, lParam); break; case SCI_GETLINEINDENTATION: return pdoc->GetLineIndentation(wParam); case SCI_GETLINEINDENTPOSITION: return pdoc->GetLineIndentPosition(wParam); case SCI_SETTABINDENTS: pdoc->tabIndents = wParam != 0; break; case SCI_GETTABINDENTS: return pdoc->tabIndents; case SCI_SETBACKSPACEUNINDENTS: pdoc->backspaceUnindents = wParam != 0; break; case SCI_GETBACKSPACEUNINDENTS: return pdoc->backspaceUnindents; case SCI_SETMOUSEDWELLTIME: dwellDelay = wParam; ticksToDwell = dwellDelay; break; case SCI_GETMOUSEDWELLTIME: return dwellDelay; case SCI_WORDSTARTPOSITION: return pdoc->ExtendWordSelect(wParam, -1, lParam != 0); case SCI_WORDENDPOSITION: return pdoc->ExtendWordSelect(wParam, 1, lParam != 0); case SCI_SETWRAPMODE: switch(wParam){ case SC_WRAP_WORD: wrapState = eWrapWord; break; case SC_WRAP_CHAR: wrapState = eWrapChar; break; default: wrapState = eWrapNone; break; } xOffset = 0; InvalidateStyleRedraw(); ReconfigureScrollBars(); break; case SCI_GETWRAPMODE: return wrapState; case SCI_SETWRAPVISUALFLAGS: wrapVisualFlags = wParam; actualWrapVisualStartIndent = wrapVisualStartIndent; if ((wrapVisualFlags & SC_WRAPVISUALFLAG_START) && (actualWrapVisualStartIndent == 0)) actualWrapVisualStartIndent = 1; // must indent to show start visual InvalidateStyleRedraw(); ReconfigureScrollBars(); break; case SCI_GETWRAPVISUALFLAGS: return wrapVisualFlags; case SCI_SETWRAPVISUALFLAGSLOCATION: wrapVisualFlagsLocation = wParam; InvalidateStyleRedraw(); break; case SCI_GETWRAPVISUALFLAGSLOCATION: return wrapVisualFlagsLocation; case SCI_SETWRAPSTARTINDENT: wrapVisualStartIndent = wParam; actualWrapVisualStartIndent = wrapVisualStartIndent; if ((wrapVisualFlags & SC_WRAPVISUALFLAG_START) && (actualWrapVisualStartIndent == 0)) actualWrapVisualStartIndent = 1; // must indent to show start visual InvalidateStyleRedraw(); ReconfigureScrollBars(); break; case SCI_GETWRAPSTARTINDENT: return wrapVisualStartIndent; case SCI_SETLAYOUTCACHE: llc.SetLevel(wParam); break; case SCI_GETLAYOUTCACHE: return llc.GetLevel(); case SCI_SETSCROLLWIDTH: PLATFORM_ASSERT(wParam > 0); if ((wParam > 0) && (wParam != static_cast(scrollWidth))) { scrollWidth = wParam; SetScrollBars(); } break; case SCI_GETSCROLLWIDTH: return scrollWidth; case SCI_LINESJOIN: LinesJoin(); break; case SCI_LINESSPLIT: LinesSplit(wParam); break; case SCI_TEXTWIDTH: PLATFORM_ASSERT(wParam <= STYLE_MAX); PLATFORM_ASSERT(lParam); return TextWidth(wParam, CharPtrFromSPtr(lParam)); case SCI_TEXTHEIGHT: return vs.lineHeight; case SCI_SETENDATLASTLINE: PLATFORM_ASSERT((wParam == 0) || (wParam == 1)); if (endAtLastLine != (wParam != 0)) { endAtLastLine = wParam != 0; SetScrollBars(); } break; case SCI_GETENDATLASTLINE: return endAtLastLine; case SCI_SETCARETSTICKY: PLATFORM_ASSERT((wParam == 0) || (wParam == 1)); if (caretSticky != (wParam != 0)) { caretSticky = wParam != 0; } break; case SCI_GETCARETSTICKY: return caretSticky; case SCI_TOGGLECARETSTICKY: caretSticky = !caretSticky; break; case SCI_GETCOLUMN: return pdoc->GetColumn(wParam); case SCI_FINDCOLUMN: return pdoc->FindColumn(wParam, lParam); case SCI_SETHSCROLLBAR : if (horizontalScrollBarVisible != (wParam != 0)) { horizontalScrollBarVisible = wParam != 0; SetScrollBars(); ReconfigureScrollBars(); } break; case SCI_GETHSCROLLBAR: return horizontalScrollBarVisible; case SCI_SETVSCROLLBAR: if (verticalScrollBarVisible != (wParam != 0)) { verticalScrollBarVisible = wParam != 0; SetScrollBars(); ReconfigureScrollBars(); } break; case SCI_GETVSCROLLBAR: return verticalScrollBarVisible; case SCI_SETINDENTATIONGUIDES: vs.viewIndentationGuides = wParam != 0; Redraw(); break; case SCI_GETINDENTATIONGUIDES: return vs.viewIndentationGuides; case SCI_SETHIGHLIGHTGUIDE: if ((highlightGuideColumn != static_cast(wParam)) || (wParam > 0)) { highlightGuideColumn = wParam; Redraw(); } break; case SCI_GETHIGHLIGHTGUIDE: return highlightGuideColumn; case SCI_GETLINEENDPOSITION: return pdoc->LineEnd(wParam); case SCI_SETCODEPAGE: pdoc->dbcsCodePage = wParam; InvalidateStyleRedraw(); break; case SCI_GETCODEPAGE: return pdoc->dbcsCodePage; case SCI_SETUSEPALETTE: palette.allowRealization = wParam != 0; InvalidateStyleRedraw(); break; case SCI_GETUSEPALETTE: return palette.allowRealization; // Marker definition and setting case SCI_MARKERDEFINE: if (wParam <= MARKER_MAX) vs.markers[wParam].markType = lParam; InvalidateStyleData(); RedrawSelMargin(); break; case SCI_MARKERSETFORE: if (wParam <= MARKER_MAX) vs.markers[wParam].fore.desired = ColourDesired(lParam); InvalidateStyleData(); RedrawSelMargin(); break; case SCI_MARKERSETBACK: if (wParam <= MARKER_MAX) vs.markers[wParam].back.desired = ColourDesired(lParam); InvalidateStyleData(); RedrawSelMargin(); break; case SCI_MARKERADD: { int markerID = pdoc->AddMark(wParam, lParam); return markerID; } case SCI_MARKERDELETE: pdoc->DeleteMark(wParam, lParam); break; case SCI_MARKERDELETEALL: pdoc->DeleteAllMarks(static_cast(wParam)); break; case SCI_MARKERGET: return pdoc->GetMark(wParam); case SCI_MARKERNEXT: { int lt = pdoc->LinesTotal(); for (int iLine = wParam; iLine < lt; iLine++) { if ((pdoc->GetMark(iLine) & lParam) != 0) return iLine; } } return -1; case SCI_MARKERPREVIOUS: { for (int iLine = wParam; iLine >= 0; iLine--) { if ((pdoc->GetMark(iLine) & lParam) != 0) return iLine; } } return -1; case SCI_MARKERDEFINEPIXMAP: if (wParam <= MARKER_MAX) { vs.markers[wParam].SetXPM(CharPtrFromSPtr(lParam)); }; InvalidateStyleData(); RedrawSelMargin(); break; case SCI_SETMARGINTYPEN: if (ValidMargin(wParam)) { vs.ms[wParam].symbol = (lParam == SC_MARGIN_SYMBOL); InvalidateStyleRedraw(); } break; case SCI_GETMARGINTYPEN: if (ValidMargin(wParam)) return vs.ms[wParam].symbol ? SC_MARGIN_SYMBOL : SC_MARGIN_NUMBER; else return 0; case SCI_SETMARGINWIDTHN: if (ValidMargin(wParam)) { // Short-circuit if the width is unchanged, to avoid unnecessary redraw. if (vs.ms[wParam].width != lParam) { vs.ms[wParam].width = lParam; InvalidateStyleRedraw(); } } break; case SCI_GETMARGINWIDTHN: if (ValidMargin(wParam)) return vs.ms[wParam].width; else return 0; case SCI_SETMARGINMASKN: if (ValidMargin(wParam)) { vs.ms[wParam].mask = lParam; InvalidateStyleRedraw(); } break; case SCI_GETMARGINMASKN: if (ValidMargin(wParam)) return vs.ms[wParam].mask; else return 0; case SCI_SETMARGINSENSITIVEN: if (ValidMargin(wParam)) { vs.ms[wParam].sensitive = lParam != 0; InvalidateStyleRedraw(); } break; case SCI_GETMARGINSENSITIVEN: if (ValidMargin(wParam)) return vs.ms[wParam].sensitive ? 1 : 0; else return 0; case SCI_STYLECLEARALL: vs.ClearStyles(); InvalidateStyleRedraw(); break; case SCI_STYLESETFORE: if (wParam <= STYLE_MAX) { vs.styles[wParam].fore.desired = ColourDesired(lParam); InvalidateStyleRedraw(); } break; case SCI_STYLESETBACK: if (wParam <= STYLE_MAX) { vs.styles[wParam].back.desired = ColourDesired(lParam); InvalidateStyleRedraw(); } break; case SCI_STYLESETBOLD: if (wParam <= STYLE_MAX) { vs.styles[wParam].bold = lParam != 0; InvalidateStyleRedraw(); } break; case SCI_STYLESETITALIC: if (wParam <= STYLE_MAX) { vs.styles[wParam].italic = lParam != 0; InvalidateStyleRedraw(); } break; case SCI_STYLESETEOLFILLED: if (wParam <= STYLE_MAX) { vs.styles[wParam].eolFilled = lParam != 0; InvalidateStyleRedraw(); } break; case SCI_STYLESETSIZE: if (wParam <= STYLE_MAX) { vs.styles[wParam].size = lParam; InvalidateStyleRedraw(); } break; case SCI_STYLESETFONT: if (lParam == 0) return 0; if (wParam <= STYLE_MAX) { vs.SetStyleFontName(wParam, CharPtrFromSPtr(lParam)); InvalidateStyleRedraw(); } break; case SCI_STYLESETUNDERLINE: if (wParam <= STYLE_MAX) { vs.styles[wParam].underline = lParam != 0; InvalidateStyleRedraw(); } break; case SCI_STYLESETCASE: if (wParam <= STYLE_MAX) { vs.styles[wParam].caseForce = static_cast(lParam); InvalidateStyleRedraw(); } break; case SCI_STYLESETCHARACTERSET: if (wParam <= STYLE_MAX) { vs.styles[wParam].characterSet = lParam; InvalidateStyleRedraw(); } break; case SCI_STYLESETVISIBLE: if (wParam <= STYLE_MAX) { vs.styles[wParam].visible = lParam != 0; InvalidateStyleRedraw(); } break; case SCI_STYLESETCHANGEABLE: if (wParam <= STYLE_MAX) { vs.styles[wParam].changeable = lParam != 0; InvalidateStyleRedraw(); } break; case SCI_STYLESETHOTSPOT: if (wParam <= STYLE_MAX) { vs.styles[wParam].hotspot = lParam != 0; InvalidateStyleRedraw(); } break; case SCI_STYLERESETDEFAULT: vs.ResetDefaultStyle(); InvalidateStyleRedraw(); break; case SCI_SETSTYLEBITS: pdoc->SetStylingBits(wParam); break; case SCI_GETSTYLEBITS: return pdoc->stylingBits; case SCI_SETLINESTATE: return pdoc->SetLineState(wParam, lParam); case SCI_GETLINESTATE: return pdoc->GetLineState(wParam); case SCI_GETMAXLINESTATE: return pdoc->GetMaxLineState(); case SCI_GETCARETLINEVISIBLE: return vs.showCaretLineBackground; case SCI_SETCARETLINEVISIBLE: vs.showCaretLineBackground = wParam != 0; InvalidateStyleRedraw(); break; case SCI_GETCARETLINEBACK: return vs.caretLineBackground.desired.AsLong(); case SCI_SETCARETLINEBACK: vs.caretLineBackground.desired = wParam; InvalidateStyleRedraw(); break; // Folding messages case SCI_VISIBLEFROMDOCLINE: return cs.DisplayFromDoc(wParam); case SCI_DOCLINEFROMVISIBLE: return cs.DocFromDisplay(wParam); case SCI_WRAPCOUNT: return WrapCount(wParam); case SCI_SETFOLDLEVEL: { int prev = pdoc->SetLevel(wParam, lParam); if (prev != lParam) RedrawSelMargin(); return prev; } case SCI_GETFOLDLEVEL: return pdoc->GetLevel(wParam); case SCI_GETLASTCHILD: return pdoc->GetLastChild(wParam, lParam); case SCI_GETFOLDPARENT: return pdoc->GetFoldParent(wParam); case SCI_SHOWLINES: cs.SetVisible(wParam, lParam, true); SetScrollBars(); Redraw(); break; case SCI_HIDELINES: cs.SetVisible(wParam, lParam, false); SetScrollBars(); Redraw(); break; case SCI_GETLINEVISIBLE: return cs.GetVisible(wParam); case SCI_SETFOLDEXPANDED: if (cs.SetExpanded(wParam, lParam != 0)) { RedrawSelMargin(); } break; case SCI_GETFOLDEXPANDED: return cs.GetExpanded(wParam); case SCI_SETFOLDFLAGS: foldFlags = wParam; Redraw(); break; case SCI_TOGGLEFOLD: ToggleContraction(wParam); break; case SCI_ENSUREVISIBLE: EnsureLineVisible(wParam, false); break; case SCI_ENSUREVISIBLEENFORCEPOLICY: EnsureLineVisible(wParam, true); break; case SCI_SEARCHANCHOR: SearchAnchor(); break; case SCI_SEARCHNEXT: case SCI_SEARCHPREV: return SearchText(iMessage, wParam, lParam); #ifdef INCLUDE_DEPRECATED_FEATURES case SCI_SETCARETPOLICY: // Deprecated caretXPolicy = caretYPolicy = wParam; caretXSlop = caretYSlop = lParam; break; #endif case SCI_SETXCARETPOLICY: caretXPolicy = wParam; caretXSlop = lParam; break; case SCI_SETYCARETPOLICY: caretYPolicy = wParam; caretYSlop = lParam; break; case SCI_SETVISIBLEPOLICY: visiblePolicy = wParam; visibleSlop = lParam; break; case SCI_LINESONSCREEN: return LinesOnScreen(); case SCI_SETSELFORE: vs.selforeset = wParam != 0; vs.selforeground.desired = ColourDesired(lParam); InvalidateStyleRedraw(); break; case SCI_SETSELBACK: vs.selbackset = wParam != 0; vs.selbackground.desired = ColourDesired(lParam); InvalidateStyleRedraw(); break; case SCI_SETWHITESPACEFORE: vs.whitespaceForegroundSet = wParam != 0; vs.whitespaceForeground.desired = ColourDesired(lParam); InvalidateStyleRedraw(); break; case SCI_SETWHITESPACEBACK: vs.whitespaceBackgroundSet = wParam != 0; vs.whitespaceBackground.desired = ColourDesired(lParam); InvalidateStyleRedraw(); break; case SCI_SETCARETFORE: vs.caretcolour.desired = ColourDesired(wParam); InvalidateStyleRedraw(); break; case SCI_GETCARETFORE: return vs.caretcolour.desired.AsLong(); case SCI_SETCARETWIDTH: if (wParam <= 0) vs.caretWidth = 0; else if (wParam >= 3) vs.caretWidth = 3; else vs.caretWidth = wParam; InvalidateStyleRedraw(); break; case SCI_GETCARETWIDTH: return vs.caretWidth; case SCI_ASSIGNCMDKEY: kmap.AssignCmdKey(Platform::LowShortFromLong(wParam), Platform::HighShortFromLong(wParam), lParam); break; case SCI_CLEARCMDKEY: kmap.AssignCmdKey(Platform::LowShortFromLong(wParam), Platform::HighShortFromLong(wParam), SCI_NULL); break; case SCI_CLEARALLCMDKEYS: kmap.Clear(); break; case SCI_INDICSETSTYLE: if (wParam <= INDIC_MAX) { vs.indicators[wParam].style = lParam; InvalidateStyleRedraw(); } break; case SCI_INDICGETSTYLE: return (wParam <= INDIC_MAX) ? vs.indicators[wParam].style : 0; case SCI_INDICSETFORE: if (wParam <= INDIC_MAX) { vs.indicators[wParam].fore.desired = ColourDesired(lParam); InvalidateStyleRedraw(); } break; case SCI_INDICGETFORE: return (wParam <= INDIC_MAX) ? vs.indicators[wParam].fore.desired.AsLong() : 0; case SCI_LINEDOWN: case SCI_LINEDOWNEXTEND: case SCI_PARADOWN: case SCI_PARADOWNEXTEND: case SCI_LINEUP: case SCI_LINEUPEXTEND: case SCI_PARAUP: case SCI_PARAUPEXTEND: case SCI_CHARLEFT: case SCI_CHARLEFTEXTEND: case SCI_CHARRIGHT: case SCI_CHARRIGHTEXTEND: case SCI_WORDLEFT: case SCI_WORDLEFTEXTEND: case SCI_WORDRIGHT: case SCI_WORDRIGHTEXTEND: case SCI_WORDLEFTEND: case SCI_WORDLEFTENDEXTEND: case SCI_WORDRIGHTEND: case SCI_WORDRIGHTENDEXTEND: case SCI_HOME: case SCI_HOMEEXTEND: case SCI_LINEEND: case SCI_LINEENDEXTEND: case SCI_HOMEWRAP: case SCI_HOMEWRAPEXTEND: case SCI_LINEENDWRAP: case SCI_LINEENDWRAPEXTEND: case SCI_DOCUMENTSTART: case SCI_DOCUMENTSTARTEXTEND: case SCI_DOCUMENTEND: case SCI_DOCUMENTENDEXTEND: case SCI_STUTTEREDPAGEUP: case SCI_STUTTEREDPAGEUPEXTEND: case SCI_STUTTEREDPAGEDOWN: case SCI_STUTTEREDPAGEDOWNEXTEND: case SCI_PAGEUP: case SCI_PAGEUPEXTEND: case SCI_PAGEDOWN: case SCI_PAGEDOWNEXTEND: case SCI_EDITTOGGLEOVERTYPE: case SCI_CANCEL: case SCI_DELETEBACK: case SCI_TAB: case SCI_BACKTAB: case SCI_NEWLINE: case SCI_FORMFEED: case SCI_VCHOME: case SCI_VCHOMEEXTEND: case SCI_VCHOMEWRAP: case SCI_VCHOMEWRAPEXTEND: case SCI_ZOOMIN: case SCI_ZOOMOUT: case SCI_DELWORDLEFT: case SCI_DELWORDRIGHT: case SCI_DELLINELEFT: case SCI_DELLINERIGHT: case SCI_LINECOPY: case SCI_LINECUT: case SCI_LINEDELETE: case SCI_LINETRANSPOSE: case SCI_LINEDUPLICATE: case SCI_LOWERCASE: case SCI_UPPERCASE: case SCI_LINESCROLLDOWN: case SCI_LINESCROLLUP: case SCI_WORDPARTLEFT: case SCI_WORDPARTLEFTEXTEND: case SCI_WORDPARTRIGHT: case SCI_WORDPARTRIGHTEXTEND: case SCI_DELETEBACKNOTLINE: case SCI_HOMEDISPLAY: case SCI_HOMEDISPLAYEXTEND: case SCI_LINEENDDISPLAY: case SCI_LINEENDDISPLAYEXTEND: case SCI_LINEDOWNRECTEXTEND: case SCI_LINEUPRECTEXTEND: case SCI_CHARLEFTRECTEXTEND: case SCI_CHARRIGHTRECTEXTEND: case SCI_HOMERECTEXTEND: case SCI_VCHOMERECTEXTEND: case SCI_LINEENDRECTEXTEND: case SCI_PAGEUPRECTEXTEND: case SCI_PAGEDOWNRECTEXTEND: return KeyCommand(iMessage); case SCI_BRACEHIGHLIGHT: SetBraceHighlight(static_cast(wParam), lParam, STYLE_BRACELIGHT); break; case SCI_BRACEBADLIGHT: SetBraceHighlight(static_cast(wParam), -1, STYLE_BRACEBAD); break; case SCI_BRACEMATCH: // wParam is position of char to find brace for, // lParam is maximum amount of text to restyle to find it return BraceMatch(wParam, lParam); case SCI_GETVIEWEOL: return vs.viewEOL; case SCI_SETVIEWEOL: vs.viewEOL = wParam != 0; InvalidateStyleRedraw(); break; case SCI_SETZOOM: vs.zoomLevel = wParam; InvalidateStyleRedraw(); NotifyZoom(); break; case SCI_GETZOOM: return vs.zoomLevel; case SCI_GETEDGECOLUMN: return theEdge; case SCI_SETEDGECOLUMN: theEdge = wParam; InvalidateStyleRedraw(); break; case SCI_GETEDGEMODE: return vs.edgeState; case SCI_SETEDGEMODE: vs.edgeState = wParam; InvalidateStyleRedraw(); break; case SCI_GETEDGECOLOUR: return vs.edgecolour.desired.AsLong(); case SCI_SETEDGECOLOUR: vs.edgecolour.desired = ColourDesired(wParam); InvalidateStyleRedraw(); break; case SCI_GETDOCPOINTER: return reinterpret_cast(pdoc); case SCI_SETDOCPOINTER: CancelModes(); SetDocPointer(reinterpret_cast(lParam)); return 0; case SCI_CREATEDOCUMENT: { Document *doc = new Document(); if (doc) { doc->AddRef(); } return reinterpret_cast(doc); } case SCI_ADDREFDOCUMENT: (reinterpret_cast(lParam))->AddRef(); break; case SCI_RELEASEDOCUMENT: (reinterpret_cast(lParam))->Release(); break; case SCI_SETMODEVENTMASK: modEventMask = wParam; return 0; case SCI_GETMODEVENTMASK: return modEventMask; case SCI_CONVERTEOLS: pdoc->ConvertLineEnds(wParam); SetSelection(currentPos, anchor); // Ensure selection inside document return 0; case SCI_SETLENGTHFORENCODE: lengthForEncode = wParam; return 0; case SCI_SELECTIONISRECTANGLE: return selType == selRectangle ? 1 : 0; case SCI_SETSELECTIONMODE: { switch (wParam) { case SC_SEL_STREAM: moveExtendsSelection = !moveExtendsSelection || (selType != selStream); selType = selStream; break; case SC_SEL_RECTANGLE: moveExtendsSelection = !moveExtendsSelection || (selType != selRectangle); selType = selRectangle; break; case SC_SEL_LINES: moveExtendsSelection = !moveExtendsSelection || (selType != selLines); selType = selLines; break; default: moveExtendsSelection = !moveExtendsSelection || (selType != selStream); selType = selStream; } InvalidateSelection(currentPos, anchor); } case SCI_GETSELECTIONMODE: switch (selType) { case selStream: return SC_SEL_STREAM; case selRectangle: return SC_SEL_RECTANGLE; case selLines: return SC_SEL_LINES; default: // ?! return SC_SEL_STREAM; } case SCI_GETLINESELSTARTPOSITION: { SelectionLineIterator lineIterator(this); lineIterator.SetAt(wParam); return lineIterator.startPos; } case SCI_GETLINESELENDPOSITION: { SelectionLineIterator lineIterator(this); lineIterator.SetAt(wParam); return lineIterator.endPos; } case SCI_SETOVERTYPE: inOverstrike = wParam != 0; break; case SCI_GETOVERTYPE: return inOverstrike ? 1 : 0; case SCI_SETFOCUS: SetFocusState(wParam != 0); break; case SCI_GETFOCUS: return hasFocus; case SCI_SETSTATUS: errorStatus = wParam; break; case SCI_GETSTATUS: return errorStatus; case SCI_SETMOUSEDOWNCAPTURES: mouseDownCaptures = wParam != 0; break; case SCI_GETMOUSEDOWNCAPTURES: return mouseDownCaptures; case SCI_SETCURSOR: cursorMode = wParam; DisplayCursor(Window::cursorText); break; case SCI_GETCURSOR: return cursorMode; case SCI_SETCONTROLCHARSYMBOL: controlCharSymbol = wParam; break; case SCI_GETCONTROLCHARSYMBOL: return controlCharSymbol; case SCI_STARTRECORD: recordingMacro = true; return 0; case SCI_STOPRECORD: recordingMacro = false; return 0; case SCI_MOVECARETINSIDEVIEW: MoveCaretInsideView(); break; case SCI_SETFOLDMARGINCOLOUR: vs.foldmarginColourSet = wParam != 0; vs.foldmarginColour.desired = ColourDesired(lParam); InvalidateStyleRedraw(); break; case SCI_SETFOLDMARGINHICOLOUR: vs.foldmarginHighlightColourSet = wParam != 0; vs.foldmarginHighlightColour.desired = ColourDesired(lParam); InvalidateStyleRedraw(); break; case SCI_SETHOTSPOTACTIVEFORE: vs.hotspotForegroundSet = wParam != 0; vs.hotspotForeground.desired = ColourDesired(lParam); InvalidateStyleRedraw(); break; case SCI_SETHOTSPOTACTIVEBACK: vs.hotspotBackgroundSet = wParam != 0; vs.hotspotBackground.desired = ColourDesired(lParam); InvalidateStyleRedraw(); break; case SCI_SETHOTSPOTACTIVEUNDERLINE: vs.hotspotUnderline = wParam != 0; InvalidateStyleRedraw(); break; case SCI_SETHOTSPOTSINGLELINE: vs.hotspotSingleLine = wParam != 0; InvalidateStyleRedraw(); break; default: return DefWndProc(iMessage, wParam, lParam); } //Platform::DebugPrintf("end wnd proc\n"); return 0l; } usr/src/sdlBasic/src/sdlBasic/scintilla/src/DocumentAccessor.cxx0000777000076500007660000001152410463135222022216 0ustar // Scintilla source code edit control /** @file DocumentAccessor.cxx ** Rapid easy access to contents of a Scintilla. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include "Platform.h" #include "PropSet.h" #include "SVector.h" #include "Accessor.h" #include "DocumentAccessor.h" #include "CellBuffer.h" #include "Scintilla.h" #include "Document.h" DocumentAccessor::~DocumentAccessor() { } bool DocumentAccessor::InternalIsLeadByte(char ch) { if (SC_CP_UTF8 == codePage) // For lexing, all characters >= 0x80 are treated the // same so none is considered a lead byte. return false; else return Platform::IsDBCSLeadByte(codePage, ch); } void DocumentAccessor::Fill(int position) { if (lenDoc == -1) lenDoc = pdoc->Length(); startPos = position - slopSize; if (startPos + bufferSize > lenDoc) startPos = lenDoc - bufferSize; if (startPos < 0) startPos = 0; endPos = startPos + bufferSize; if (endPos > lenDoc) endPos = lenDoc; pdoc->GetCharRange(buf, startPos, endPos-startPos); buf[endPos-startPos] = '\0'; } bool DocumentAccessor::Match(int pos, const char *s) { for (int i=0; *s; i++) { if (*s != SafeGetCharAt(pos+i)) return false; s++; } return true; } char DocumentAccessor::StyleAt(int position) { // Mask off all bits which aren't in the 'mask'. return static_cast(pdoc->StyleAt(position) & mask); } int DocumentAccessor::GetLine(int position) { return pdoc->LineFromPosition(position); } int DocumentAccessor::LineStart(int line) { return pdoc->LineStart(line); } int DocumentAccessor::LevelAt(int line) { return pdoc->GetLevel(line); } int DocumentAccessor::Length() { if (lenDoc == -1) lenDoc = pdoc->Length(); return lenDoc; } int DocumentAccessor::GetLineState(int line) { return pdoc->GetLineState(line); } int DocumentAccessor::SetLineState(int line, int state) { return pdoc->SetLineState(line, state); } void DocumentAccessor::StartAt(unsigned int start, char chMask) { // Store the mask specified for use with StyleAt. mask = chMask; pdoc->StartStyling(start, chMask); startPosStyling = start; } void DocumentAccessor::StartSegment(unsigned int pos) { startSeg = pos; } void DocumentAccessor::ColourTo(unsigned int pos, int chAttr) { // Only perform styling if non empty range if (pos != startSeg - 1) { if (pos < startSeg) { Platform::DebugPrintf("Bad colour positions %d - %d\n", startSeg, pos); } if (validLen + (pos - startSeg + 1) >= bufferSize) Flush(); if (validLen + (pos - startSeg + 1) >= bufferSize) { // Too big for buffer so send directly pdoc->SetStyleFor(pos - startSeg + 1, static_cast(chAttr)); } else { if (chAttr != chWhile) chFlags = 0; chAttr |= chFlags; for (unsigned int i = startSeg; i <= pos; i++) { PLATFORM_ASSERT((startPosStyling + validLen) < Length()); styleBuf[validLen++] = static_cast(chAttr); } } } startSeg = pos+1; } void DocumentAccessor::SetLevel(int line, int level) { pdoc->SetLevel(line, level); } void DocumentAccessor::Flush() { startPos = extremePosition; lenDoc = -1; if (validLen > 0) { pdoc->SetStyles(validLen, styleBuf); startPosStyling += validLen; validLen = 0; } } int DocumentAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) { int end = Length(); int spaceFlags = 0; // Determines the indentation level of the current line and also checks for consistent // indentation compared to the previous line. // Indentation is judged consistent when the indentation whitespace of each line lines // the same or the indentation of one line is a prefix of the other. int pos = LineStart(line); char ch = (*this)[pos]; int indent = 0; bool inPrevPrefix = line > 0; int posPrev = inPrevPrefix ? LineStart(line-1) : 0; while ((ch == ' ' || ch == '\t') && (pos < end)) { if (inPrevPrefix) { char chPrev = (*this)[posPrev++]; if (chPrev == ' ' || chPrev == '\t') { if (chPrev != ch) spaceFlags |= wsInconsistent; } else { inPrevPrefix = false; } } if (ch == ' ') { spaceFlags |= wsSpace; indent++; } else { // Tab spaceFlags |= wsTab; if (spaceFlags & wsSpace) spaceFlags |= wsSpaceTab; indent = (indent / 8 + 1) * 8; } ch = (*this)[++pos]; } *flags = spaceFlags; indent += SC_FOLDLEVELBASE; // if completely empty line or the start of a comment... if ((ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) ) return indent | SC_FOLDLEVELWHITEFLAG; else return indent; } usr/src/sdlBasic/src/sdlBasic/scintilla/src/ExternalLexer.cxx0000777000076500007660000001405110463135620021537 0ustar // Scintilla source code edit control /** @file ExternalLexer.cxx ** Support external lexers in DLLs. **/ // Copyright 2001 Simon Steele , portions copyright Neil Hodgson. // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include "Platform.h" #include "SciLexer.h" #include "PropSet.h" #include "Accessor.h" #include "DocumentAccessor.h" #include "KeyWords.h" #include "ExternalLexer.h" LexerManager *LexerManager::theInstance = NULL; //------------------------------------------ // // ExternalLexerModule // //------------------------------------------ char **WordListsToStrings(WordList *val[]) { int dim = 0; while (val[dim]) dim++; char **wls = new char * [dim + 1]; for (int i = 0;i < dim;i++) { SString words; words = ""; for (int n = 0; n < val[i]->len; n++) { words += val[i]->words[n]; if (n != val[i]->len - 1) words += " "; } wls[i] = new char[words.length() + 1]; strcpy(wls[i], words.c_str()); } wls[dim] = 0; return wls; } void DeleteWLStrings(char *strs[]) { int dim = 0; while (strs[dim]) { delete strs[dim]; dim++; } delete [] strs; } void ExternalLexerModule::Lex(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const { if (!fneLexer) return ; char **kwds = WordListsToStrings(keywordlists); char *ps = styler.GetProperties(); // The accessor passed in is always a DocumentAccessor so this cast and the subsequent // access will work. Can not use the stricter dynamic_cast as that requires RTTI. DocumentAccessor &da = static_cast(styler); WindowID wID = da.GetWindow(); fneLexer(externalLanguage, startPos, lengthDoc, initStyle, kwds, wID, ps); delete ps; DeleteWLStrings(kwds); } void ExternalLexerModule::Fold(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const { if (!fneFolder) return ; char **kwds = WordListsToStrings(keywordlists); char *ps = styler.GetProperties(); // The accessor passed in is always a DocumentAccessor so this cast and the subsequent // access will work. Can not use the stricter dynamic_cast as that requires RTTI. DocumentAccessor &da = static_cast(styler); WindowID wID = da.GetWindow(); fneFolder(externalLanguage, startPos, lengthDoc, initStyle, kwds, wID, ps); delete ps; DeleteWLStrings(kwds); } void ExternalLexerModule::SetExternal(ExtLexerFunction fLexer, ExtFoldFunction fFolder, int index) { fneLexer = fLexer; fneFolder = fFolder; externalLanguage = index; } //------------------------------------------ // // LexerLibrary // //------------------------------------------ LexerLibrary::LexerLibrary(const char* ModuleName) { // Initialise some members... first = NULL; last = NULL; // Load the DLL lib = DynamicLibrary::Load(ModuleName); if (lib->IsValid()) { m_sModuleName = ModuleName; //Cannot use reinterpret_cast because: ANSI C++ forbids casting between pointers to functions and objects GetLexerCountFn GetLexerCount = (GetLexerCountFn)lib->FindFunction("GetLexerCount"); if (GetLexerCount) { ExternalLexerModule *lex; LexerMinder *lm; // Find functions in the DLL GetLexerNameFn GetLexerName = (GetLexerNameFn)lib->FindFunction("GetLexerName"); ExtLexerFunction Lexer = (ExtLexerFunction)lib->FindFunction("Lex"); ExtFoldFunction Folder = (ExtFoldFunction)lib->FindFunction("Fold"); // Assign a buffer for the lexer name. char lexname[100]; strcpy(lexname, ""); int nl = GetLexerCount(); for (int i = 0; i < nl; i++) { GetLexerName(i, lexname, 100); lex = new ExternalLexerModule(SCLEX_AUTOMATIC, NULL, lexname, NULL); // Create a LexerMinder so we don't leak the ExternalLexerModule... lm = new LexerMinder; lm->self = lex; lm->next = NULL; if (first != NULL) { last->next = lm; last = lm; } else { first = lm; last = lm; } // The external lexer needs to know how to call into its DLL to // do its lexing and folding, we tell it here. Folder may be null. lex->SetExternal(Lexer, Folder, i); } } } next = NULL; } LexerLibrary::~LexerLibrary() { Release(); delete lib; } void LexerLibrary::Release() { //TODO maintain a list of lexers created, and delete them! LexerMinder *lm; LexerMinder *next; lm = first; while (NULL != lm) { next = lm->next; delete lm->self; delete lm; lm = next; } first = NULL; last = NULL; } //------------------------------------------ // // LexerManager // //------------------------------------------ /// Return the single LexerManager instance... LexerManager *LexerManager::GetInstance() { if(!theInstance) theInstance = new LexerManager; return theInstance; } /// Delete any LexerManager instance... void LexerManager::DeleteInstance() { if(theInstance) { delete theInstance; theInstance = NULL; } } /// protected constructor - this is a singleton... LexerManager::LexerManager() { first = NULL; last = NULL; } LexerManager::~LexerManager() { Clear(); } void LexerManager::Load(const char* path) { LoadLexerLibrary(path); } void LexerManager::LoadLexerLibrary(const char* module) { LexerLibrary *lib = new LexerLibrary(module); if (NULL != first) { last->next = lib; last = lib; } else { first = lib; last = lib; } } void LexerManager::Clear() { if (NULL != first) { LexerLibrary *cur = first; LexerLibrary *next; while (cur) { next = cur->next; delete cur; cur = next; } first = NULL; last = NULL; } } //------------------------------------------ // // LexerManager // //------------------------------------------ LMMinder::~LMMinder() { LexerManager::DeleteInstance(); } LMMinder minder; usr/src/sdlBasic/src/sdlBasic/scintilla/src/XPM.h0000777000076500007660000000376010463136151017053 0ustar // Scintilla source code edit control /** @file XPM.h ** Define a class that holds data in the X Pixmap (XPM) format. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef XPM_H #define XPM_H /** * Hold a pixmap in XPM format. */ class XPM { int id; // Assigned by container int height; int width; int nColours; char *data; char codeTransparent; char *codes; ColourPair *colours; ColourAllocated ColourFromCode(int ch); void FillRun(Surface *surface, int code, int startX, int y, int x); char **lines; ColourPair *colourCodeTable[256]; public: XPM(const char *textForm); XPM(const char * const *linesForm); ~XPM(); void Init(const char *textForm); void Init(const char * const *linesForm); void Clear(); /// Similar to same named method in ViewStyle: void RefreshColourPalette(Palette &pal, bool want); /// No palette used, so just copy the desired colours to the allocated colours void CopyDesiredColours(); /// Decompose image into runs and use FillRectangle for each run void Draw(Surface *surface, PRectangle &rc); char **InLinesForm() { return lines; } void SetId(int id_) { id = id_; } int GetId() { return id; } int GetHeight() { return height; } int GetWidth() { return width; } static const char **LinesFormFromTextForm(const char *textForm); }; /** * A collection of pixmaps indexed by integer id. */ class XPMSet { XPM **set; ///< The stored XPMs. int len; ///< Current number of XPMs. int maximum; ///< Current maximum number of XPMs, increased by steps if reached. int height; ///< Memorize largest height of the set. int width; ///< Memorize largest width of the set. public: XPMSet(); ~XPMSet(); /// Remove all XPMs. void Clear(); /// Add a XPM. void Add(int id, const char *textForm); /// Get XPM by id. XPM *Get(int id); /// Give the largest height of the set. int GetHeight(); /// Give the largest width of the set. int GetWidth(); }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/Editor.h0000777000076500007660000004005010463135620017626 0ustar // Scintilla source code edit control /** @file Editor.h ** Defines the main editor class. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef EDITOR_H #define EDITOR_H /** */ class Caret { public: bool active; bool on; int period; Caret(); }; /** */ class Timer { public: bool ticking; int ticksToWait; enum {tickSize = 100}; TickerID tickerID; Timer(); }; /** */ class Idler { public: bool state; IdlerID idlerID; Idler(); }; /** */ class LineLayout { private: friend class LineLayoutCache; int *lineStarts; int lenLineStarts; /// Drawing is only performed for @a maxLineLength characters on each line. int lineNumber; bool inCache; public: enum { wrapWidthInfinite = 0x7ffffff }; int maxLineLength; int numCharsInLine; enum validLevel { llInvalid, llCheckTextAndStyle, llPositions, llLines } validity; int xHighlightGuide; bool highlightColumn; int selStart; int selEnd; bool containsCaret; int edgeColumn; char *chars; unsigned char *styles; char *indicators; int *positions; char bracePreviousStyles[2]; // Hotspot support int hsStart; int hsEnd; // Wrapped line support int widthLine; int lines; LineLayout(int maxLineLength_); virtual ~LineLayout(); void Resize(int maxLineLength_); void Free(); void Invalidate(validLevel validity_); int LineStart(int line) { if (line <= 0) { return 0; } else if ((line >= lines) || !lineStarts) { return numCharsInLine; } else { return lineStarts[line]; } } void SetLineStart(int line, int start); void SetBracesHighlight(Range rangeLine, Position braces[], char bracesMatchStyle, int xHighlight); void RestoreBracesHighlight(Range rangeLine, Position braces[]); }; /** */ class LineLayoutCache { int level; int length; int size; LineLayout **cache; bool allInvalidated; int styleClock; void Allocate(int length_); void AllocateForLevel(int linesOnScreen, int linesInDoc); public: LineLayoutCache(); virtual ~LineLayoutCache(); void Deallocate(); enum { llcNone=SC_CACHE_NONE, llcCaret=SC_CACHE_CARET, llcPage=SC_CACHE_PAGE, llcDocument=SC_CACHE_DOCUMENT }; void Invalidate(LineLayout::validLevel validity_); void SetLevel(int level_); int GetLevel() { return level; } LineLayout *Retrieve(int lineNumber, int lineCaret, int maxChars, int styleClock_, int linesOnScreen, int linesInDoc); void Dispose(LineLayout *ll); }; /** * Hold a piece of text selected for copying or dragging. * The text is expected to hold a terminating '\0' and this is counted in len. */ class SelectionText { public: char *s; int len; bool rectangular; int codePage; int characterSet; SelectionText() : s(0), len(0), rectangular(false), codePage(0), characterSet(0) {} ~SelectionText() { Free(); } void Free() { Set(0, 0, 0, 0, false); } void Set(char *s_, int len_, int codePage_, int characterSet_, bool rectangular_) { delete []s; s = s_; if (s) len = len_; else len = 0; codePage = codePage_; characterSet = characterSet_; rectangular = rectangular_; } void Copy(const char *s_, int len_, int codePage_, int characterSet_, bool rectangular_) { delete []s; s = new char[len_]; if (s) { len = len_; for (int i = 0; i < len_; i++) { s[i] = s_[i]; } } else { len = 0; } codePage = codePage_; characterSet = characterSet_; rectangular = rectangular_; } void Copy(const SelectionText &other) { Copy(other.s, other.len, other.codePage, other.characterSet, other.rectangular); } }; /** */ class Editor : public DocWatcher { // Private so Editor objects can not be copied Editor(const Editor &) : DocWatcher() {} Editor &operator=(const Editor &) { return *this; } protected: // ScintillaBase subclass needs access to much of Editor /** On GTK+, Scintilla is a container widget holding two scroll bars * whereas on Windows there is just one window with both scroll bars turned on. */ Window wMain; ///< The Scintilla parent window /** Style resources may be expensive to allocate so are cached between uses. * When a style attribute is changed, this cache is flushed. */ bool stylesValid; ViewStyle vs; Palette palette; int printMagnification; int printColourMode; int printWrapState; int cursorMode; int controlCharSymbol; bool hasFocus; bool hideSelection; bool inOverstrike; int errorStatus; bool mouseDownCaptures; /** In bufferedDraw mode, graphics operations are drawn to a pixmap and then copied to * the screen. This avoids flashing but is about 30% slower. */ bool bufferedDraw; /** In twoPhaseDraw mode, drawing is performed in two phases, first the background * and then the foreground. This avoids chopping off characters that overlap the next run. */ bool twoPhaseDraw; int xOffset; ///< Horizontal scrolled amount in pixels int xCaretMargin; ///< Ensure this many pixels visible on both sides of caret bool horizontalScrollBarVisible; int scrollWidth; bool verticalScrollBarVisible; bool endAtLastLine; bool caretSticky; Surface *pixmapLine; Surface *pixmapSelMargin; Surface *pixmapSelPattern; Surface *pixmapIndentGuide; Surface *pixmapIndentGuideHighlight; LineLayoutCache llc; KeyMap kmap; Caret caret; Timer timer; Timer autoScrollTimer; enum { autoScrollDelay = 200 }; Idler idler; Point lastClick; unsigned int lastClickTime; int dwellDelay; int ticksToDwell; bool dwelling; enum { selChar, selWord, selLine } selectionType; Point ptMouseLast; bool inDragDrop; bool dropWentOutside; int posDrag; int posDrop; int lastXChosen; int lineAnchor; int originalAnchorPos; int currentPos; int anchor; int targetStart; int targetEnd; int searchFlags; int topLine; int posTopLine; int lengthForEncode; bool needUpdateUI; Position braces[2]; int bracesMatchStyle; int highlightGuideColumn; int theEdge; enum { notPainting, painting, paintAbandoned } paintState; PRectangle rcPaint; bool paintingAllText; int modEventMask; SelectionText drag; enum selTypes { noSel, selStream, selRectangle, selLines }; selTypes selType; bool moveExtendsSelection; int xStartSelect; ///< x position of start of rectangular selection int xEndSelect; ///< x position of end of rectangular selection bool primarySelection; int caretXPolicy; int caretXSlop; ///< Ensure this many pixels visible on both sides of caret int caretYPolicy; int caretYSlop; ///< Ensure this many lines visible on both sides of caret int visiblePolicy; int visibleSlop; int searchAnchor; bool recordingMacro; int foldFlags; ContractionState cs; // Hotspot support int hsStart; int hsEnd; // Wrapping support enum { eWrapNone, eWrapWord, eWrapChar } wrapState; bool backgroundWrapEnabled; int wrapWidth; int docLineLastWrapped; int docLastLineToWrap; int wrapVisualFlags; int wrapVisualFlagsLocation; int wrapVisualStartIndent; int actualWrapVisualStartIndent; Document *pdoc; Editor(); virtual ~Editor(); virtual void Initialise() = 0; virtual void Finalise(); void InvalidateStyleData(); void InvalidateStyleRedraw(); virtual void RefreshColourPalette(Palette &pal, bool want); void RefreshStyleData(); void DropGraphics(); virtual PRectangle GetClientRectangle(); PRectangle GetTextRectangle(); int LinesOnScreen(); int LinesToScroll(); int MaxScrollPos(); Point LocationFromPosition(int pos); int XFromPosition(int pos); int PositionFromLocation(Point pt); int PositionFromLocationClose(Point pt); int PositionFromLineX(int line, int x); int LineFromLocation(Point pt); void SetTopLine(int topLineNew); bool AbandonPaint(); void RedrawRect(PRectangle rc); void Redraw(); void RedrawSelMargin(); PRectangle RectangleFromRange(int start, int end); void InvalidateRange(int start, int end); int CurrentPosition(); bool SelectionEmpty(); int SelectionStart(); int SelectionEnd(); void SetRectangularRange(); void InvalidateSelection(int currentPos_, int anchor_); void SetSelection(int currentPos_, int anchor_); void SetSelection(int currentPos_); void SetEmptySelection(int currentPos_); bool RangeContainsProtected(int start, int end) const; bool SelectionContainsProtected(); int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true); int MovePositionTo(int newPos, selTypes sel=noSel, bool ensureVisible=true); int MovePositionSoVisible(int pos, int moveDir); void SetLastXChosen(); void ScrollTo(int line, bool moveThumb=true); virtual void ScrollText(int linesToMove); void HorizontalScrollTo(int xPos); void MoveCaretInsideView(bool ensureVisible=true); int DisplayFromPosition(int pos); void EnsureCaretVisible(bool useMargin=true, bool vert=true, bool horiz=true); void ShowCaretAtCurrentPosition(); void DropCaret(); void InvalidateCaret(); virtual void UpdateSystemCaret(); void NeedWrapping(int docLineStartWrapping = 0, int docLineEndWrapping = 0x7ffffff); bool WrapLines(bool fullWrap, int priorityWrapLineStart); void LinesJoin(); void LinesSplit(int pixelWidth); int SubstituteMarkerIfEmpty(int markerCheck, int markerDefault); void PaintSelMargin(Surface *surface, PRectangle &rc); LineLayout *RetrieveLineLayout(int lineNumber); void LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout *ll, int width=LineLayout::wrapWidthInfinite); ColourAllocated TextBackground(ViewStyle &vsDraw, bool overrideBackground, ColourAllocated background, bool inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll); void DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight); void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourAllocated wrapColour); void DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll, int line, int lineEnd, int xStart, int subLine, int subLineStart, bool overrideBackground, ColourAllocated background, bool drawWrapMark, ColourAllocated wrapColour); void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, PRectangle rcLine, LineLayout *ll, int subLine=0); void RefreshPixMaps(Surface *surfaceWindow); void Paint(Surface *surfaceWindow, PRectangle rcArea); long FormatRange(bool draw, RangeToFormat *pfr); int TextWidth(int style, const char *text); virtual void SetVerticalScrollPos() = 0; virtual void SetHorizontalScrollPos() = 0; virtual bool ModifyScrollBars(int nMax, int nPage) = 0; virtual void ReconfigureScrollBars(); void SetScrollBars(); void ChangeSize(); void AddChar(char ch); virtual void AddCharUTF(char *s, unsigned int len, bool treatAsDBCS=false); void ClearSelection(); void ClearAll(); void ClearDocumentStyle(); void Cut(); void PasteRectangular(int pos, const char *ptr, int len); virtual void Copy() = 0; virtual bool CanPaste(); virtual void Paste() = 0; void Clear(); void SelectAll(); void Undo(); void Redo(); void DelChar(); void DelCharBack(bool allowLineStartDeletion); virtual void ClaimSelection() = 0; virtual void NotifyChange() = 0; virtual void NotifyFocus(bool focus); virtual int GetCtrlID() { return ctrlID; } virtual void NotifyParent(SCNotification scn) = 0; virtual void NotifyStyleToNeeded(int endStyleNeeded); void NotifyChar(int ch); void NotifyMove(int position); void NotifySavePoint(bool isSavePoint); void NotifyModifyAttempt(); virtual void NotifyDoubleClick(Point pt, bool shift); void NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt); void NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt); void NotifyUpdateUI(); void NotifyPainted(); bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt); void NotifyNeedShown(int pos, int len); void NotifyDwelling(Point pt, bool state); void NotifyZoom(); void NotifyModifyAttempt(Document *document, void *userData); void NotifySavePoint(Document *document, void *userData, bool atSavePoint); void CheckModificationForWrap(DocModification mh); void NotifyModified(Document *document, DocModification mh, void *userData); void NotifyDeleted(Document *document, void *userData); void NotifyStyleNeeded(Document *doc, void *userData, int endPos); void NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lParam); void PageMove(int direction, selTypes sel=noSel, bool stuttered = false); void ChangeCaseOfSelection(bool makeUpperCase); void LineTranspose(); void LineDuplicate(); virtual void CancelModes(); void NewLine(); void CursorUpOrDown(int direction, selTypes sel=noSel); void ParaUpOrDown(int direction, selTypes sel=noSel); int StartEndDisplayLine(int pos, bool start); virtual int KeyCommand(unsigned int iMessage); virtual int KeyDefault(int /* key */, int /*modifiers*/); int KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed=0); int GetWhitespaceVisible(); void SetWhitespaceVisible(int view); void Indent(bool forwards); long FindText(uptr_t wParam, sptr_t lParam); void SearchAnchor(); long SearchText(unsigned int iMessage, uptr_t wParam, sptr_t lParam); long SearchInTarget(const char *text, int length); void GoToLine(int lineNo); virtual void CopyToClipboard(const SelectionText &selectedText) = 0; char *CopyRange(int start, int end); void CopySelectionFromRange(SelectionText *ss, int start, int end); void CopySelectionRange(SelectionText *ss); void CopyRangeToClipboard(int start, int end); void CopyText(int length, const char *text); void SetDragPosition(int newPos); virtual void DisplayCursor(Window::Cursor c); virtual void StartDrag(); void DropAt(int position, const char *value, bool moving, bool rectangular); /** PositionInSelection returns 0 if position in selection, -1 if position before selection, and 1 if after. * Before means either before any line of selection or before selection on its line, with a similar meaning to after. */ int PositionInSelection(int pos); bool PointInSelection(Point pt); bool PointInSelMargin(Point pt); void LineSelection(int lineCurrent_, int lineAnchor_); void DwellEnd(bool mouseMoved); virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt); void ButtonMove(Point pt); void ButtonUp(Point pt, unsigned int curTime, bool ctrl); void Tick(); bool Idle(); virtual void SetTicking(bool on) = 0; virtual bool SetIdle(bool) { return false; } virtual void SetMouseCapture(bool on) = 0; virtual bool HaveMouseCapture() = 0; void SetFocusState(bool focusState); void CheckForChangeOutsidePaint(Range r); int BraceMatch(int position, int maxReStyle); void SetBraceHighlight(Position pos0, Position pos1, int matchStyle); void SetDocPointer(Document *document); void Expand(int &line, bool doExpand); void ToggleContraction(int line); void EnsureLineVisible(int lineDoc, bool enforcePolicy); int ReplaceTarget(bool replacePatterns, const char *text, int length=-1); bool PositionIsHotspot(int position); bool PointIsHotspot(Point pt); void SetHotSpotRange(Point *pt); void GetHotSpotRange(int& hsStart, int& hsEnd); int CodePage() const; int WrapCount(int line); virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) = 0; public: // Public so the COM thunks can access it. bool IsUnicodeMode() const; // Public so scintilla_send_message can use it. virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); // Public so scintilla_set_id can use it. int ctrlID; friend class AutoSurface; friend class SelectionLineIterator; }; /** * A smart pointer class to ensure Surfaces are set up and deleted correctly. */ class AutoSurface { private: Surface *surf; public: AutoSurface(Editor *ed) : surf(0) { if (ed->wMain.GetID()) { surf = Surface::Allocate(); if (surf) { surf->Init(ed->wMain.GetID()); surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); surf->SetDBCSMode(ed->CodePage()); } } } AutoSurface(SurfaceID sid, Editor *ed) : surf(0) { if (ed->wMain.GetID()) { surf = Surface::Allocate(); if (surf) { surf->Init(sid, ed->wMain.GetID()); surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); surf->SetDBCSMode(ed->CodePage()); } } } ~AutoSurface() { delete surf; } Surface *operator->() const { return surf; } operator Surface *() const { return surf; } }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/StyleContext.h0000777000076500007660000001013210463136100021035 0ustar // Scintilla source code edit control /** @file StyleContext.cxx ** Lexer infrastructure. **/ // Copyright 1998-2004 by Neil Hodgson // This file is in the public domain. // All languages handled so far can treat all characters >= 0x80 as one class // which just continues the current token or starts an identifier if in default. // DBCS treated specially as the second character can be < 0x80 and hence // syntactically significant. UTF-8 avoids this as all trail bytes are >= 0x80 class StyleContext { Accessor &styler; unsigned int endPos; StyleContext& operator=(const StyleContext&) { return *this; } void GetNextChar(unsigned int pos) { chNext = static_cast(styler.SafeGetCharAt(pos+1)); if (styler.IsLeadByte(static_cast(chNext))) { chNext = chNext << 8; chNext |= static_cast(styler.SafeGetCharAt(pos+2)); } // End of line? // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) // or on LF alone (Unix). Avoid triggering two times on Dos/Win. atLineEnd = (ch == '\r' && chNext != '\n') || (ch == '\n') || (currentPos >= endPos); } public: unsigned int currentPos; bool atLineStart; bool atLineEnd; int state; int chPrev; int ch; int chNext; StyleContext(unsigned int startPos, unsigned int length, int initStyle, Accessor &styler_, char chMask=31) : styler(styler_), endPos(startPos + length), currentPos(startPos), atLineStart(true), atLineEnd(false), state(initStyle & chMask), // Mask off all bits which aren't in the chMask. chPrev(0), ch(0), chNext(0) { styler.StartAt(startPos, chMask); styler.StartSegment(startPos); unsigned int pos = currentPos; ch = static_cast(styler.SafeGetCharAt(pos)); if (styler.IsLeadByte(static_cast(ch))) { pos++; ch = ch << 8; ch |= static_cast(styler.SafeGetCharAt(pos)); } GetNextChar(pos); } void Complete() { styler.ColourTo(currentPos - 1, state); } bool More() { return currentPos < endPos; } void Forward() { if (currentPos < endPos) { atLineStart = atLineEnd; chPrev = ch; currentPos++; if (ch >= 0x100) currentPos++; ch = chNext; GetNextChar(currentPos + ((ch >= 0x100) ? 1 : 0)); } else { atLineStart = false; chPrev = ' '; ch = ' '; chNext = ' '; atLineEnd = true; } } void Forward(int nb) { for (int i = 0; i < nb; i++) { Forward(); } } void ChangeState(int state_) { state = state_; } void SetState(int state_) { styler.ColourTo(currentPos - 1, state); state = state_; } void ForwardSetState(int state_) { Forward(); styler.ColourTo(currentPos - 1, state); state = state_; } int LengthCurrent() { return currentPos - styler.GetStartSegment(); } int GetRelative(int n) { return styler.SafeGetCharAt(currentPos+n); } bool Match(char ch0) { return ch == ch0; } bool Match(char ch0, char ch1) { return (ch == ch0) && (chNext == ch1); } bool Match(const char *s) { if (ch != *s) return false; s++; if (chNext != *s) return false; s++; for (int n=2; *s; n++) { if (*s != styler.SafeGetCharAt(currentPos+n)) return false; s++; } return true; } bool MatchIgnoreCase(const char *s) { if (tolower(ch) != *s) return false; s++; if (tolower(chNext) != *s) return false; s++; for (int n=2; *s; n++) { if (*s != tolower((styler.SafeGetCharAt(currentPos+n)))) return false; s++; } return true; } // Non-inline void GetCurrent(char *s, unsigned int len); void GetCurrentLowered(char *s, unsigned int len); }; inline bool IsASpace(unsigned int ch) { return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); } inline bool IsASpaceOrTab(unsigned int ch) { return (ch == ' ') || (ch == '\t'); } inline bool IsADigit(unsigned int ch) { return (ch >= '0') && (ch <= '9'); } inline bool IsADigit(unsigned int ch, unsigned int base) { if (base <= 10) { return (ch >= '0') && (ch < '0' + base); } else { return ((ch >= '0') && (ch <= '9')) || ((ch >= 'A') && (ch < 'A' + base - 10)) || ((ch >= 'a') && (ch < 'a' + base - 10)); } } usr/src/sdlBasic/src/sdlBasic/scintilla/src/WindowAccessor.cxx0000777000076500007660000001153010463136100021700 0ustar // Scintilla source code edit control /** @file WindowAccessor.cxx ** Rapid easy access to contents of a Scintilla. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include "Platform.h" #include "PropSet.h" #include "Accessor.h" #include "WindowAccessor.h" #include "Scintilla.h" WindowAccessor::~WindowAccessor() { } bool WindowAccessor::InternalIsLeadByte(char ch) { if (SC_CP_UTF8 == codePage) // For lexing, all characters >= 0x80 are treated the // same so none is considered a lead byte. return false; else return Platform::IsDBCSLeadByte(codePage, ch); } void WindowAccessor::Fill(int position) { if (lenDoc == -1) lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0); startPos = position - slopSize; if (startPos + bufferSize > lenDoc) startPos = lenDoc - bufferSize; if (startPos < 0) startPos = 0; endPos = startPos + bufferSize; if (endPos > lenDoc) endPos = lenDoc; TextRange tr = {{startPos, endPos}, buf}; Platform::SendScintillaPointer(id, SCI_GETTEXTRANGE, 0, &tr); } bool WindowAccessor::Match(int pos, const char *s) { for (int i=0; *s; i++) { if (*s != SafeGetCharAt(pos+i)) return false; s++; } return true; } char WindowAccessor::StyleAt(int position) { return static_cast(Platform::SendScintilla( id, SCI_GETSTYLEAT, position, 0)); } int WindowAccessor::GetLine(int position) { return Platform::SendScintilla(id, SCI_LINEFROMPOSITION, position, 0); } int WindowAccessor::LineStart(int line) { return Platform::SendScintilla(id, SCI_POSITIONFROMLINE, line, 0); } int WindowAccessor::LevelAt(int line) { return Platform::SendScintilla(id, SCI_GETFOLDLEVEL, line, 0); } int WindowAccessor::Length() { if (lenDoc == -1) lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0); return lenDoc; } int WindowAccessor::GetLineState(int line) { return Platform::SendScintilla(id, SCI_GETLINESTATE, line); } int WindowAccessor::SetLineState(int line, int state) { return Platform::SendScintilla(id, SCI_SETLINESTATE, line, state); } void WindowAccessor::StartAt(unsigned int start, char chMask) { Platform::SendScintilla(id, SCI_STARTSTYLING, start, chMask); } void WindowAccessor::StartSegment(unsigned int pos) { startSeg = pos; } void WindowAccessor::ColourTo(unsigned int pos, int chAttr) { // Only perform styling if non empty range if (pos != startSeg - 1) { if (pos < startSeg) { Platform::DebugPrintf("Bad colour positions %d - %d\n", startSeg, pos); } if (validLen + (pos - startSeg + 1) >= bufferSize) Flush(); if (validLen + (pos - startSeg + 1) >= bufferSize) { // Too big for buffer so send directly Platform::SendScintilla(id, SCI_SETSTYLING, pos - startSeg + 1, chAttr); } else { if (chAttr != chWhile) chFlags = 0; chAttr |= chFlags; for (unsigned int i = startSeg; i <= pos; i++) { styleBuf[validLen++] = static_cast(chAttr); } } } startSeg = pos+1; } void WindowAccessor::SetLevel(int line, int level) { Platform::SendScintilla(id, SCI_SETFOLDLEVEL, line, level); } void WindowAccessor::Flush() { startPos = extremePosition; lenDoc = -1; if (validLen > 0) { Platform::SendScintillaPointer(id, SCI_SETSTYLINGEX, validLen, styleBuf); validLen = 0; } } int WindowAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) { int end = Length(); int spaceFlags = 0; // Determines the indentation level of the current line and also checks for consistent // indentation compared to the previous line. // Indentation is judged consistent when the indentation whitespace of each line lines // the same or the indentation of one line is a prefix of the other. int pos = LineStart(line); char ch = (*this)[pos]; int indent = 0; bool inPrevPrefix = line > 0; int posPrev = inPrevPrefix ? LineStart(line-1) : 0; while ((ch == ' ' || ch == '\t') && (pos < end)) { if (inPrevPrefix) { char chPrev = (*this)[posPrev++]; if (chPrev == ' ' || chPrev == '\t') { if (chPrev != ch) spaceFlags |= wsInconsistent; } else { inPrevPrefix = false; } } if (ch == ' ') { spaceFlags |= wsSpace; indent++; } else { // Tab spaceFlags |= wsTab; if (spaceFlags & wsSpace) spaceFlags |= wsSpaceTab; indent = (indent / 8 + 1) * 8; } ch = (*this)[++pos]; } *flags = spaceFlags; indent += SC_FOLDLEVELBASE; // if completely empty line or the start of a comment... if (isspace(ch) || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) ) return indent | SC_FOLDLEVELWHITEFLAG; else return indent; } usr/src/sdlBasic/src/sdlBasic/scintilla/src/ViewStyle.cxx0000777000076500007660000002176010463136100020707 0ustar // Scintilla source code edit control /** @file ViewStyle.cxx ** Store information on how the document is to be viewed. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include "Platform.h" #include "Scintilla.h" #include "Indicator.h" #include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "ViewStyle.h" MarginStyle::MarginStyle() : symbol(false), width(16), mask(0xffffffff), sensitive(false) { } // A list of the fontnames - avoids wasting space in each style FontNames::FontNames() { max = 0; } FontNames::~FontNames() { Clear(); } void FontNames::Clear() { for (int i=0;i 0) maskInLine &= ~ms[margin].mask; } zoomLevel = 0; viewWhitespace = wsInvisible; viewIndentationGuides = false; viewEOL = false; showMarkedLines = true; extraFontFlag = false; } void ViewStyle::RefreshColourPalette(Palette &pal, bool want) { unsigned int i; for (i=0;i<(sizeof(styles)/sizeof(styles[0]));i++) { pal.WantFind(styles[i].fore, want); pal.WantFind(styles[i].back, want); } for (i=0;i<(sizeof(indicators)/sizeof(indicators[0]));i++) { pal.WantFind(indicators[i].fore, want); } for (i=0;i<(sizeof(markers)/sizeof(markers[0]));i++) { markers[i].RefreshColourPalette(pal, want); } pal.WantFind(selforeground, want); pal.WantFind(selbackground, want); pal.WantFind(selbackground2, want); pal.WantFind(foldmarginColour, want); pal.WantFind(foldmarginHighlightColour, want); pal.WantFind(whitespaceForeground, want); pal.WantFind(whitespaceBackground, want); pal.WantFind(selbar, want); pal.WantFind(selbarlight, want); pal.WantFind(caretcolour, want); pal.WantFind(caretLineBackground, want); pal.WantFind(edgecolour, want); pal.WantFind(hotspotForeground, want); pal.WantFind(hotspotBackground, want); } void ViewStyle::Refresh(Surface &surface) { selbar.desired = Platform::Chrome(); selbarlight.desired = Platform::ChromeHighlight(); styles[STYLE_DEFAULT].Realise(surface, zoomLevel, NULL, extraFontFlag); maxAscent = styles[STYLE_DEFAULT].ascent; maxDescent = styles[STYLE_DEFAULT].descent; someStylesProtected = false; for (unsigned int i=0;i<(sizeof(styles)/sizeof(styles[0]));i++) { if (i != STYLE_DEFAULT) { styles[i].Realise(surface, zoomLevel, &styles[STYLE_DEFAULT], extraFontFlag); if (maxAscent < styles[i].ascent) maxAscent = styles[i].ascent; if (maxDescent < styles[i].descent) maxDescent = styles[i].descent; } if (styles[i].IsProtected()) { someStylesProtected = true; } } lineHeight = maxAscent + maxDescent; aveCharWidth = styles[STYLE_DEFAULT].aveCharWidth; spaceWidth = styles[STYLE_DEFAULT].spaceWidth; fixedColumnWidth = leftMarginWidth; symbolMargin = false; maskInLine = 0xffffffff; for (int margin=0; margin < margins; margin++) { fixedColumnWidth += ms[margin].width; symbolMargin = symbolMargin || ms[margin].symbol; if (ms[margin].width > 0) maskInLine &= ~ms[margin].mask; } } void ViewStyle::ResetDefaultStyle() { styles[STYLE_DEFAULT].Clear(ColourDesired(0,0,0), ColourDesired(0xff,0xff,0xff), Platform::DefaultFontSize(), fontNames.Save(Platform::DefaultFont()), SC_CHARSET_DEFAULT, false, false, false, false, Style::caseMixed, true, true, false); } void ViewStyle::ClearStyles() { // Reset all styles to be like the default style for (unsigned int i=0;i<(sizeof(styles)/sizeof(styles[0]));i++) { if (i != STYLE_DEFAULT) { styles[i].ClearTo(styles[STYLE_DEFAULT]); } } styles[STYLE_LINENUMBER].back.desired = Platform::Chrome(); } void ViewStyle::SetStyleFontName(int styleIndex, const char *name) { styles[styleIndex].fontName = fontNames.Save(name); } bool ViewStyle::ProtectionActive() const { return someStylesProtected; } usr/src/sdlBasic/src/sdlBasic/scintilla/src/LineMarker.h0000777000076500007660000000243310463135727020444 0ustar // Scintilla source code edit control /** @file LineMarker.h ** Defines the look of a line marker in the margin . **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef LINEMARKER_H #define LINEMARKER_H /** */ class LineMarker { public: int markType; ColourPair fore; ColourPair back; XPM *pxpm; LineMarker() { markType = SC_MARK_CIRCLE; fore = ColourDesired(0,0,0); back = ColourDesired(0xff,0xff,0xff); pxpm = NULL; } LineMarker(const LineMarker &) { // Defined to avoid pxpm being blindly copied, not as real copy constructor markType = SC_MARK_CIRCLE; fore = ColourDesired(0,0,0); back = ColourDesired(0xff,0xff,0xff); pxpm = NULL; } ~LineMarker() { delete pxpm; } LineMarker &operator=(const LineMarker &) { // Defined to avoid pxpm being blindly copied, not as real assignment operator markType = SC_MARK_CIRCLE; fore = ColourDesired(0,0,0); back = ColourDesired(0xff,0xff,0xff); delete pxpm; pxpm = NULL; return *this; } void RefreshColourPalette(Palette &pal, bool want); void SetXPM(const char *textForm); void SetXPM(const char * const *linesForm); void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter); }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/ScintillaBase.h0000777000076500007660000000503210463136100021110 0ustar // Scintilla source code edit control /** @file ScintillaBase.h ** Defines an enhanced subclass of Editor with calltips, autocomplete and context menu. **/ // Copyright 1998-2002 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SCINTILLABASE_H #define SCINTILLABASE_H /** */ class ScintillaBase : public Editor { // Private so ScintillaBase objects can not be copied ScintillaBase(const ScintillaBase &) : Editor() {} ScintillaBase &operator=(const ScintillaBase &) { return *this; } protected: /** Enumeration of commands and child windows. */ enum { idCallTip=1, idAutoComplete=2, idcmdUndo=10, idcmdRedo=11, idcmdCut=12, idcmdCopy=13, idcmdPaste=14, idcmdDelete=15, idcmdSelectAll=16 }; bool displayPopupMenu; Menu popup; AutoComplete ac; CallTip ct; int listType; ///< 0 is an autocomplete list SString listSelected; ///< Receives listbox selected string int maxListWidth; /// Maximum width of list, in average character widths #ifdef SCI_LEXER int lexLanguage; const LexerModule *lexCurrent; PropSet props; enum {numWordLists=KEYWORDSET_MAX+1}; WordList *keyWordLists[numWordLists+1]; void SetLexer(uptr_t wParam); void SetLexerLanguage(const char *languageName); void Colourise(int start, int end); #endif ScintillaBase(); virtual ~ScintillaBase(); virtual void Initialise() = 0; virtual void Finalise() = 0; virtual void RefreshColourPalette(Palette &pal, bool want); virtual void AddCharUTF(char *s, unsigned int len, bool treatAsDBCS=false); void Command(int cmdId); virtual void CancelModes(); virtual int KeyCommand(unsigned int iMessage); void AutoCompleteStart(int lenEntered, const char *list); void AutoCompleteCancel(); void AutoCompleteMove(int delta); int AutoCompleteGetCurrent(); void AutoCompleteCharacterAdded(char ch); void AutoCompleteCharacterDeleted(); void AutoCompleteCompleted(); void AutoCompleteMoveToCurrentWord(); static void AutoCompleteDoubleClick(void* p); void CallTipClick(); void CallTipShow(Point pt, const char *defn); virtual void CreateCallTipWindow(PRectangle rc) = 0; virtual void AddToPopUp(const char *label, int cmd=0, bool enabled=true) = 0; void ContextMenu(Point pt); virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt); virtual void NotifyStyleToNeeded(int endStyleNeeded); public: // Public so scintilla_send_message can use it virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/ContractionState.cxx0000777000076500007660000001527310463135107022250 0ustar // Scintilla source code edit control /** @file ContractionState.cxx ** Manages visibility of lines for folding. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include "Platform.h" #include "ContractionState.h" OneLine::OneLine() { displayLine = 0; //docLine = 0; visible = true; height = 1; expanded = true; } ContractionState::ContractionState() { lines = 0; size = 0; linesInDoc = 1; linesInDisplay = 1; valid = false; docLines = 0; sizeDocLines = 0; } ContractionState::~ContractionState() { Clear(); } void ContractionState::MakeValid() const { if (!valid) { // Could be cleverer by keeping the index of the last still valid entry // rather than invalidating all. linesInDisplay = 0; for (int lineInDoc=0; lineInDoc= 0) && (lineDoc < linesInDoc)) { return lines[lineDoc].displayLine; } return -1; } int ContractionState::DocFromDisplay(int lineDisplay) const { if (lineDisplay <= 0) return 0; if (lineDisplay >= linesInDisplay) return linesInDoc; if (size == 0) return lineDisplay; MakeValid(); if (docLines) { // Valid allocation return docLines[lineDisplay]; } else { return 0; } } void ContractionState::Grow(int sizeNew) { OneLine *linesNew = new OneLine[sizeNew]; if (linesNew) { int i = 0; for (; i < size; i++) { linesNew[i] = lines[i]; } for (; i < sizeNew; i++) { linesNew[i].displayLine = i; } delete []lines; lines = linesNew; size = sizeNew; valid = false; } else { Platform::DebugPrintf("No memory available\n"); // TODO: Blow up } } void ContractionState::InsertLines(int lineDoc, int lineCount) { if (size == 0) { linesInDoc += lineCount; linesInDisplay += lineCount; return; } //Platform::DebugPrintf("InsertLine[%d] = %d\n", lineDoc); if ((linesInDoc + lineCount + 2) >= size) { Grow(linesInDoc + lineCount + growSize); } linesInDoc += lineCount; for (int i = linesInDoc; i >= lineDoc + lineCount; i--) { lines[i].visible = lines[i - lineCount].visible; lines[i].height = lines[i - lineCount].height; linesInDisplay += lines[i].height; lines[i].expanded = lines[i - lineCount].expanded; } for (int d=0;d= 0) && (lineDoc < linesInDoc)) { return lines[lineDoc].visible; } else { return false; } } bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool visible) { if (lineDocStart == 0) lineDocStart++; if (lineDocStart > lineDocEnd) return false; if (size == 0) { Grow(linesInDoc + growSize); } // TODO: modify docLine members to mirror displayLine int delta = 0; // Change lineDocs if ((lineDocStart <= lineDocEnd) && (lineDocStart >= 0) && (lineDocEnd < linesInDoc)) { for (int line=lineDocStart; line <= lineDocEnd; line++) { if (lines[line].visible != visible) { delta += visible ? lines[line].height : -lines[line].height; lines[line].visible = visible; } } } linesInDisplay += delta; valid = false; return delta != 0; } bool ContractionState::GetExpanded(int lineDoc) const { if (size == 0) return true; if ((lineDoc >= 0) && (lineDoc < linesInDoc)) { return lines[lineDoc].expanded; } else { return false; } } bool ContractionState::SetExpanded(int lineDoc, bool expanded) { if (size == 0) { if (expanded) { // If in completely expanded state then setting // one line to expanded has no effect. return false; } Grow(linesInDoc + growSize); } if ((lineDoc >= 0) && (lineDoc < linesInDoc)) { if (lines[lineDoc].expanded != expanded) { lines[lineDoc].expanded = expanded; return true; } } return false; } int ContractionState::GetHeight(int lineDoc) const { if (size == 0) return 1; if ((lineDoc >= 0) && (lineDoc < linesInDoc)) { return lines[lineDoc].height; } else { return 1; } } // Set the number of display lines needed for this line. // Return true if this is a change. bool ContractionState::SetHeight(int lineDoc, int height) { if (lineDoc > linesInDoc) return false; if (size == 0) { if (height == 1) { // If in completely expanded state then all lines // assumed to have height of one so no effect here. return false; } Grow(linesInDoc + growSize); } if (lines[lineDoc].height != height) { lines[lineDoc].height = height; valid = false; return true; } else { return false; } } void ContractionState::ShowAll() { delete []lines; lines = 0; size = 0; } usr/src/sdlBasic/src/sdlBasic/scintilla/src/CellBuffer.h0000777000076500007660000001476110463135107020423 0ustar // Scintilla source code edit control /** @file CellBuffer.h ** Manages the text of the document. **/ // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef CELLBUFFER_H #define CELLBUFFER_H /** * This holds the marker identifier and the marker type to display. * MarkerHandleNumbers are members of lists. */ struct MarkerHandleNumber { int handle; int number; MarkerHandleNumber *next; }; /** * A marker handle set contains any number of MarkerHandleNumbers. */ class MarkerHandleSet { MarkerHandleNumber *root; public: MarkerHandleSet(); ~MarkerHandleSet(); int Length(); int NumberFromHandle(int handle); int MarkValue(); ///< Bit set of marker numbers. bool Contains(int handle); bool InsertHandle(int handle, int markerNum); void RemoveHandle(int handle); bool RemoveNumber(int markerNum); void CombineWith(MarkerHandleSet *other); }; /** * Each line stores the starting position of the first character of the line in the cell buffer * and potentially a marker handle set. Often a line will not have any attached markers. */ struct LineData { int startPosition; MarkerHandleSet *handleSet; LineData() : startPosition(0), handleSet(0) { } }; /** * The line vector contains information about each of the lines in a cell buffer. */ class LineVector { public: int growSize; int lines; LineData *linesData; int size; int *levels; int sizeLevels; /// Handles are allocated sequentially and should never have to be reused as 32 bit ints are very big. int handleCurrent; LineVector(); ~LineVector(); void Init(); void Expand(int sizeNew); void ExpandLevels(int sizeNew=-1); void ClearLevels(); void InsertValue(int pos, int value); void SetValue(int pos, int value); void Remove(int pos); int LineFromPosition(int pos); int AddMark(int line, int marker); void MergeMarkers(int pos); void DeleteMark(int line, int markerNum, bool all); void DeleteMarkFromHandle(int markerHandle); int LineFromHandle(int markerHandle); }; enum actionType { insertAction, removeAction, startAction }; /** * Actions are used to store all the information required to perform one undo/redo step. */ class Action { public: actionType at; int position; char *data; int lenData; bool mayCoalesce; Action(); ~Action(); void Create(actionType at_, int position_=0, char *data_=0, int lenData_=0, bool mayCoalesce_=true); void Destroy(); void Grab(Action *source); }; /** * */ class UndoHistory { Action *actions; int lenActions; int maxAction; int currentAction; int undoSequenceDepth; int savePoint; void EnsureUndoRoom(); public: UndoHistory(); ~UndoHistory(); void AppendAction(actionType at, int position, char *data, int length); void BeginUndoAction(); void EndUndoAction(); void DropUndoSequence(); void DeleteUndoHistory(); /// The save point is a marker in the undo stack where the container has stated that /// the buffer was saved. Undo and redo can move over the save point. void SetSavePoint(); bool IsSavePoint() const; /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is /// called that many times. Similarly for redo. bool CanUndo() const; int StartUndo(); const Action &GetUndoStep() const; void CompletedUndoStep(); bool CanRedo() const; int StartRedo(); const Action &GetRedoStep() const; void CompletedRedoStep(); }; /** * Holder for an expandable array of characters that supports undo and line markers. * Based on article "Data Structures in a Bit-Mapped Text Editor" * by Wilfred J. Hansen, Byte January 1987, page 183. */ class CellBuffer { private: char *body; ///< The cell buffer itself. int size; ///< Allocated size of the buffer. int length; ///< Total length of the data. int part1len; ///< Length of the first part. int gaplen; ///< Length of the gap between the two parts. char *part2body; ///< The second part of the cell buffer. ///< Doesn't point after the gap but set so that ///< part2body[position] is consistent with body[position]. bool readOnly; int growSize; bool collectingUndo; UndoHistory uh; LineVector lv; SVector lineStates; void GapTo(int position); void RoomFor(int insertionLength); inline char ByteAt(int position); void SetByteAt(int position, char ch); public: CellBuffer(int initialLength = 4000); ~CellBuffer(); /// Retrieving positions outside the range of the buffer works and returns 0 char CharAt(int position); void GetCharRange(char *buffer, int position, int lengthRetrieve); char StyleAt(int position); int ByteLength(); int Length(); void Allocate(int newSize); int Lines(); int LineStart(int line); int LineFromPosition(int pos) { return lv.LineFromPosition(pos); } const char *InsertString(int position, char *s, int insertLength); void InsertCharStyle(int position, char ch, char style); /// Setting styles for positions outside the range of the buffer is safe and has no effect. /// @return true if the style of a character is changed. bool SetStyleAt(int position, char style, char mask='\377'); bool SetStyleFor(int position, int length, char style, char mask); const char *DeleteChars(int position, int deleteLength); bool IsReadOnly(); void SetReadOnly(bool set); /// The save point is a marker in the undo stack where the container has stated that /// the buffer was saved. Undo and redo can move over the save point. void SetSavePoint(); bool IsSavePoint(); /// Line marker functions int AddMark(int line, int markerNum); void DeleteMark(int line, int markerNum); void DeleteMarkFromHandle(int markerHandle); int GetMark(int line); void DeleteAllMarks(int markerNum); int LineFromHandle(int markerHandle); /// Actions without undo void BasicInsertString(int position, char *s, int insertLength); void BasicDeleteChars(int position, int deleteLength); bool SetUndoCollection(bool collectUndo); bool IsCollectingUndo(); void BeginUndoAction(); void EndUndoAction(); void DeleteUndoHistory(); /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is /// called that many times. Similarly for redo. bool CanUndo(); int StartUndo(); const Action &GetUndoStep() const; void PerformUndoStep(); bool CanRedo(); int StartRedo(); const Action &GetRedoStep() const; void PerformRedoStep(); int SetLineState(int line, int state); int GetLineState(int line); int GetMaxLineState(); int SetLevel(int line, int level); int GetLevel(int line); void ClearLevels(); }; #define CELL_SIZE 2 #endif usr/src/sdlBasic/src/sdlBasic/scintilla/src/StyleContext.cxx0000777000076500007660000000226510463136100021420 0ustar // Scintilla source code edit control /** @file StyleContext.cxx ** Lexer infrastructure. **/ // Copyright 1998-2004 by Neil Hodgson // This file is in the public domain. #include #include #include #include #include "Platform.h" #include "PropSet.h" #include "Accessor.h" #include "StyleContext.h" static void getRange(unsigned int start, unsigned int end, Accessor &styler, char *s, unsigned int len) { unsigned int i = 0; while ((i < end - start + 1) && (i < len-1)) { s[i] = styler[start + i]; i++; } s[i] = '\0'; } void StyleContext::GetCurrent(char *s, unsigned int len) { getRange(styler.GetStartSegment(), currentPos - 1, styler, s, len); } static void getRangeLowered(unsigned int start, unsigned int end, Accessor &styler, char *s, unsigned int len) { unsigned int i = 0; while ((i < end - start + 1) && (i < len-1)) { s[i] = static_cast(tolower(styler[start + i])); i++; } s[i] = '\0'; } void StyleContext::GetCurrentLowered(char *s, unsigned int len) { getRangeLowered(styler.GetStartSegment(), currentPos - 1, styler, s, len); } usr/src/sdlBasic/src/sdlBasic/scintilla/src/ViewStyle.h0000777000076500007660000000502610463136100020331 0ustar // Scintilla source code edit control /** @file ViewStyle.h ** Store information on how the document is to be viewed. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef VIEWSTYLE_H #define VIEWSTYLE_H /** */ class MarginStyle { public: bool symbol; int width; int mask; bool sensitive; MarginStyle(); }; /** */ class FontNames { private: char *names[STYLE_MAX + 1]; int max; public: FontNames(); ~FontNames(); void Clear(); const char *Save(const char *name); }; enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterIndent=2}; /** */ class ViewStyle { public: FontNames fontNames; Style styles[STYLE_MAX + 1]; LineMarker markers[MARKER_MAX + 1]; Indicator indicators[INDIC_MAX + 1]; int lineHeight; unsigned int maxAscent; unsigned int maxDescent; unsigned int aveCharWidth; unsigned int spaceWidth; bool selforeset; ColourPair selforeground; bool selbackset; ColourPair selbackground; ColourPair selbackground2; bool whitespaceForegroundSet; ColourPair whitespaceForeground; bool whitespaceBackgroundSet; ColourPair whitespaceBackground; ColourPair selbar; ColourPair selbarlight; bool foldmarginColourSet; ColourPair foldmarginColour; bool foldmarginHighlightColourSet; ColourPair foldmarginHighlightColour; bool hotspotForegroundSet; ColourPair hotspotForeground; bool hotspotBackgroundSet; ColourPair hotspotBackground; bool hotspotUnderline; bool hotspotSingleLine; /// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin enum { margins=3 }; int leftMarginWidth; ///< Spacing margin on left of text int rightMarginWidth; ///< Spacing margin on left of text bool symbolMargin; int maskInLine; ///< Mask for markers to be put into text because there is nowhere for them to go in margin MarginStyle ms[margins]; int fixedColumnWidth; int zoomLevel; WhiteSpaceVisibility viewWhitespace; bool viewIndentationGuides; bool viewEOL; bool showMarkedLines; ColourPair caretcolour; bool showCaretLineBackground; ColourPair caretLineBackground; ColourPair edgecolour; int edgeState; int caretWidth; bool someStylesProtected; bool extraFontFlag; ViewStyle(); ViewStyle(const ViewStyle &source); ~ViewStyle(); void Init(); void RefreshColourPalette(Palette &pal, bool want); void Refresh(Surface &surface); void ResetDefaultStyle(); void ClearStyles(); void SetStyleFontName(int styleIndex, const char *name); bool ProtectionActive() const; }; #endif usr/src/sdlBasic/src/sdlBasic/scintilla/gtk/0000777000000000000000000000000010645354663020002 5ustar rootrootusr/src/sdlBasic/src/sdlBasic/scintilla/gtk/scintilla-marshal.c0000777000076500007660000000756510463134656022026 0ustar #include #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) #define g_marshal_value_peek_char(v) g_value_get_char (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) #define g_marshal_value_peek_long(v) g_value_get_long (v) #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) #define g_marshal_value_peek_int64(v) g_value_get_int64 (v) #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) #define g_marshal_value_peek_enum(v) g_value_get_enum (v) #define g_marshal_value_peek_flags(v) g_value_get_flags (v) #define g_marshal_value_peek_float(v) g_value_get_float (v) #define g_marshal_value_peek_double(v) g_value_get_double (v) #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) #define g_marshal_value_peek_param(v) g_value_get_param (v) #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) #define g_marshal_value_peek_object(v) g_value_get_object (v) #else /* !G_ENABLE_DEBUG */ /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. * Do not access GValues directly in your code. Instead, use the * g_value_get_*() functions */ #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int #define g_marshal_value_peek_char(v) (v)->data[0].v_int #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint #define g_marshal_value_peek_int(v) (v)->data[0].v_int #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint #define g_marshal_value_peek_long(v) (v)->data[0].v_long #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 #define g_marshal_value_peek_enum(v) (v)->data[0].v_int #define g_marshal_value_peek_flags(v) (v)->data[0].v_uint #define g_marshal_value_peek_float(v) (v)->data[0].v_float #define g_marshal_value_peek_double(v) (v)->data[0].v_double #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer #endif /* !G_ENABLE_DEBUG */ /* NONE:INT,POINTER (scintilla-marshal.list:1) */ void scintilla_marshal_VOID__INT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__INT_POINTER) (gpointer data1, gint arg_1, gpointer arg_2, gpointer data2); register GMarshalFunc_VOID__INT_POINTER callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__INT_POINTER) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_int (param_values + 1), g_marshal_value_peek_pointer (param_values + 2), data2); } usr/src/sdlBasic/src/sdlBasic/scintilla/gtk/Converter.h0000777000076500007660000000370010463134411020343 0ustar // Scintilla source code edit control // Converter.h - Encapsulation of iconv // Copyright 2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. //#include #if GTK_MAJOR_VERSION >= 2 typedef GIConv ConverterHandle; #else typedef iconv_t ConverterHandle; #endif const ConverterHandle iconvhBad = (ConverterHandle)(-1); // Since various versions of iconv can not agree on whether the src argument // is char ** or const char ** provide a templatised adaptor. template size_t iconv_adaptor(size_t(*f_iconv)(ConverterHandle, T, size_t *, char **, size_t *), ConverterHandle cd, char** src, size_t *srcleft, char **dst, size_t *dstleft) { return f_iconv(cd, (T)src, srcleft, dst, dstleft); } /** * Encapsulate iconv safely and avoid iconv_adaptor complexity in client code. */ class Converter { ConverterHandle iconvh; public: Converter() { iconvh = iconvhBad; } Converter(const char *charSetDestination, const char *charSetSource) { iconvh = iconvhBad; Open(charSetDestination, charSetSource); } ~Converter() { Close(); } operator bool() const { return iconvh != iconvhBad; } void Open(const char *charSetDestination, const char *charSetSource) { Close(); if (*charSetSource) { #if GTK_MAJOR_VERSION >= 2 iconvh = g_iconv_open(charSetDestination, charSetSource); #else iconvh = iconv_open(charSetDestination, charSetSource); #endif } } void Close() { if (iconvh != iconvhBad) { #if GTK_MAJOR_VERSION >= 2 g_iconv_close(iconvh); #else iconv_close(iconvh); #endif iconvh = iconvhBad; } } size_t Convert(char** src, size_t *srcleft, char **dst, size_t *dstleft) const { if (iconvh == iconvhBad) { return (size_t)(-1); } else { #if GTK_MAJOR_VERSION >= 2 return iconv_adaptor(g_iconv, iconvh, src, srcleft, dst, dstleft); #else return iconv_adaptor(iconv, iconvh, src, srcleft, dst, dstleft); #endif } } }; usr/src/sdlBasic/src/sdlBasic/scintilla/gtk/scintilla-marshal.list0000777000076500007660000000002210463134721022525 0ustar NONE:INT,POINTER usr/src/sdlBasic/src/sdlBasic/scintilla/gtk/scintilla.mak0000777000076500007660000002626610463134721020717 0ustar # Make file for GTK+/Scintilla on Windows Visual C++ # Borland C++ does not work # Copyright 1998-2000 by Neil Hodgson # The License.txt file describes the conditions under which this software may be distributed. # This makefile is for using Visual C++ with nmake or Borland C++ with make depending on # the setting of the VENDOR macro. If no VENDOR is defined n the command line then # the tool used is automatically detected. # Usage for Microsoft: # nmake -f scintilla.mak # Usage for Borland: # make -f scintilla.mak # For debug versions define DEBUG on the command line, for Borland: # make DEBUG=1 -f scintilla.mak # The main makefile uses mingw32 gcc and may be more current than this file. .SUFFIXES: .cxx DIR_O=. DIR_BIN=..\bin COMPONENT=$(DIR_BIN)\Scintilla.dll LEXCOMPONENT=$(DIR_BIN)\SciLexer.dll STATIC_LIB=$(DIR_BIN)\Scintilla-static.lib !IFNDEF VENDOR !IFDEF _NMAKE_VER #Microsoft nmake so make default VENDOR MICROSOFT VENDOR=MICROSOFT !ELSE VENDOR=BORLAND !ENDIF !ENDIF !IF "$(VENDOR)"=="MICROSOFT" CC=cl RC=rc LD=link !IFDEF USE_GTK2 MARSHALLER=$(DIR_O)\scintilla-marshal.obj GTK_TOP= ../../gtk2 TOP = $(GTK_TOP) !INCLUDE $(TOP)/glib/build/win32/make.msc GTK_INCLUDES= -I$(GTK_TOP)/gtk+ \ -I$(GTK_TOP)/gtk+/gdk \ -I$(GTK_TOP)/glib/glib \ -I$(GTK_TOP)/glib/gmodule \ -I$(GTK_TOP)/glib \ -I$(GTK_TOP)\libiconv\include \ -I$(GTK_TOP)\pango \ -I$(GTK_TOP)\atk ALL_GTK_LIBS=$(GTK2_LIBS) $(GLIB_LIBS) $(LIBICONV_LIBS) !ELSE GTK_TOP= ../../win32gtk GTK_INCLUDES= -I $(GTK_TOP)/gtk+ -I $(GTK_TOP)/gtk+/gdk -I $(GTK_TOP)/glib -I $(GTK_TOP)/glib/gmodule ALL_GTK_LIBS=$(GTK_TOP)/gtk+/gtk/gtk-1.3.lib \ $(GTK_TOP)/gtk+/gdk/gdk-1.3.lib \ $(GTK_TOP)/glib/gmodule/gmodule-1.3.lib \ $(GTK_TOP)/glib/glib-1.3.lib !ENDIF INCLUDEDIRS=-I ../include -I ../src $(GTK_INCLUDES) CXXFLAGS=/TP /W4 -DGTK CFLAGS=/W4 -DGTK # For something scary:/Wp64 CXXDEBUG=/Zi /Od /MDd -DDEBUG CXXNDEBUG=/Ox /MD -DNDEBUG NAMEFLAG=-Fo LDFLAGS=/opt:nowin98 LDDEBUG=/DEBUG #LIBS=KERNEL32.lib USER32.lib GDI32.lib IMM32.lib OLE32.LIB LIBS=$(ALL_GTK_LIBS) !IFDEF QUIET CC=@$(CC) CXXDEBUG=$(CXXDEBUG) /nologo CXXNDEBUG=$(CXXNDEBUG) /nologo LDFLAGS=$(LDFLAGS) /nologo !ENDIF !ELSE # BORLAND !error Borland C++ not supported CC=bcc32 RC=brcc32 -r LD=ilink32 INCLUDEDIRS=-I../include -I../src CXXFLAGS = -v CXXFLAGS=-P -tWM -w -w-prc -w-inl -RT- -x- # Above turns off warnings for clarfying parentheses and inlines with for not expanded CXXDEBUG=-v -DDEBUG CXXNDEBUG=-O1 -DNDEBUG NAMEFLAG=-o LDFLAGS= LDDEBUG=-v LIBS=import32 cw32mt !ENDIF !IFDEF DEBUG CXXFLAGS=$(CXXFLAGS) $(CXXDEBUG) LDFLAGS=$(LDDEBUG) $(LDFLAGS) !ELSE CXXFLAGS=$(CXXFLAGS) $(CXXNDEBUG) !ENDIF #ALL: $(STATIC_LIB) $(COMPONENT) $(LEXCOMPONENT) $(DIR_O)\ScintillaGTKS.obj $(DIR_O)\WindowAccessor.obj ALL: $(STATIC_LIB) $(DIR_O)\ScintillaGTKS.obj $(DIR_O)\WindowAccessor.obj clean:: -del /q $(DIR_O)\*.obj $(DIR_O)\*.pdb $(COMPONENT) $(LEXCOMPONENT) $(DIR_O)\*.res $(DIR_BIN)\*.map SOBJS=\ $(DIR_O)\AutoComplete.obj \ $(DIR_O)\CallTip.obj \ $(DIR_O)\CellBuffer.obj \ $(DIR_O)\ContractionState.obj \ $(DIR_O)\Document.obj \ $(DIR_O)\Editor.obj \ $(DIR_O)\ExternalLexer.obj \ $(DIR_O)\Indicator.obj \ $(DIR_O)\KeyMap.obj \ $(DIR_O)\LineMarker.obj \ $(DIR_O)\PlatGTK.obj \ $(MARSHALLER) \ $(DIR_O)\RESearch.obj \ $(DIR_O)\PropSet.obj \ $(DIR_O)\ScintillaBase.obj \ $(DIR_O)\ScintillaGTK.obj \ $(DIR_O)\Style.obj \ $(DIR_O)\UniConversion.obj \ $(DIR_O)\ViewStyle.obj \ $(DIR_O)\XPM.obj #++Autogenerated -- run src/LexGen.py to regenerate #**LEXOBJS=\\\n\(\t$(DIR_O)\\\*.obj \\\n\) LEXOBJS=\ $(DIR_O)\LexOthers.obj \ $(DIR_O)\LexSDLB.obj \ #--Autogenerated -- end of automatically generated section LOBJS=\ $(DIR_O)\AutoComplete.obj \ $(DIR_O)\CallTip.obj \ $(DIR_O)\CellBuffer.obj \ $(DIR_O)\ContractionState.obj \ $(DIR_O)\Document.obj \ $(DIR_O)\DocumentAccessor.obj \ $(DIR_O)\Editor.obj \ $(DIR_O)\Indicator.obj \ $(DIR_O)\KeyMap.obj \ $(DIR_O)\KeyWords.obj \ $(DIR_O)\LineMarker.obj \ $(DIR_O)\PlatGTK.obj \ $(MARSHALLER) \ $(DIR_O)\RESearch.obj \ $(DIR_O)\PropSet.obj \ $(DIR_O)\ScintillaBaseL.obj \ $(DIR_O)\ScintillaGTKL.obj \ $(DIR_O)\Style.obj \ $(DIR_O)\StyleContext.obj \ $(DIR_O)\UniConversion.obj \ $(DIR_O)\ViewStyle.obj \ $(DIR_O)\XPM.obj \ $(DIR_O)\ExternalLexer.obj \ $(LEXOBJS) !IF "$(VENDOR)"=="MICROSOFT" $(STATIC_LIB): $(LOBJS) #$(DIR_O)\ScintRes.res lib.exe /OUT:$@ $(LOBJS) $(LIBS) $(COMPONENT): $(SOBJS) #$(DIR_O)\ScintRes.res $(LD) $(LDFLAGS) /DLL /OUT:$@ $(SOBJS) $(LIBS) $(DIR_O)\ScintRes.res : ScintRes.rc $(RC) /fo$@ $(*B).rc $(LEXCOMPONENT): $(LOBJS) #$(DIR_O)\ScintRes.res $(LD) $(LDFLAGS) /DLL /OUT:$@ $(LOBJS) $(LIBS) !ELSE $(STATIC_LIB): $(LOBJS) #$(DIR_O)\ScintRes.res $(LD) /OUT:$@ $(LOBJS) $(LIBS) $(COMPONENT): $(SOBJS) ScintRes.res $(LD) $(LDFLAGS) -Tpd -c c0d32 $(SOBJS), $@, , $(LIBS), , ScintRes.res $(DIR_O)\ScintRes.res: ScintRes.rc $(RC) $*.rc $(LEXCOMPONENT): $(LOBJS) $(LD) $(LDFLAGS) -Tpd -c c0d32 $(LOBJS), $@, , $(LIBS), , ScintRes.res !ENDIF # Define how to build all the objects and what they depend on # Most of the source is in ..\src with a couple in this directory {..\src}.cxx{$(DIR_O)}.obj: $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -c $(NAMEFLAG)$@ $< {.}.cxx{$(DIR_O)}.obj: $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -c $(NAMEFLAG)$@ $< {.}.c{$(DIR_O)}.obj: $(CC) $(INCLUDEDIRS) $(CFLAGS) -c $(NAMEFLAG)$@ $< # Some source files are compiled into more than one object because of different conditional compilation $(DIR_O)\ScintillaBaseL.obj: ..\src\ScintillaBase.cxx $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -DSCI_LEXER -c $(NAMEFLAG)$@ ..\src\ScintillaBase.cxx $(DIR_O)\ScintillaGTKL.obj: ScintillaGTK.cxx $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -DSCI_LEXER -c $(NAMEFLAG)$@ ScintillaGTK.cxx $(DIR_O)\ScintillaGTKS.obj: ScintillaGTK.cxx $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -DSTATIC_BUILD -c $(NAMEFLAG)$@ ScintillaGTK.cxx # Dependencies # All lexers depend on this set of headers LEX_HEADERS=..\include\Platform.h ..\include\PropSet.h \ ..\include\SString.h ..\include\Accessor.h ..\include\KeyWords.h \ ..\include\Scintilla.h ..\include\SciLexer.h ..\src\StyleContext.h $(DIR_O)\AutoComplete.obj: ..\src\AutoComplete.cxx ..\include\Platform.h ..\src\AutoComplete.h $(DIR_O)\CallTip.obj: ..\src\CallTip.cxx ..\include\Platform.h ..\src\CallTip.h $(DIR_O)\CellBuffer.obj: ..\src\CellBuffer.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\CellBuffer.h $(DIR_O)\ContractionState.obj: ..\src\ContractionState.cxx ..\include\Platform.h ..\src\ContractionState.h $(DIR_O)\Document.obj: ..\src\Document.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\RESearch.h \ ..\src\CellBuffer.h ..\src\Document.h $(DIR_O)\DocumentAccessor.obj: ..\src\DocumentAccessor.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\src\DocumentAccessor.h ..\include\Scintilla.h $(DIR_O)\Editor.obj: ..\src\Editor.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\ContractionState.h \ ..\src\CellBuffer.h ..\src\KeyMap.h ..\src\Indicator.h ..\src\LineMarker.h ..\src\Style.h ..\src\ViewStyle.h \ ..\src\Document.h ..\src\Editor.h $(DIR_O)\ExternalLexer.obj: ..\src\ExternalLexer.cxx ..\include\Platform.h ..\include\Scintilla.h ..\include\SciLexer.h \ ..\include\PropSet.h ..\include\Accessor.h ..\src\DocumentAccessor.h ..\include\Keywords.h ..\src\ExternalLexer.h $(DIR_O)\Indicator.obj: ..\src\Indicator.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\Indicator.h $(DIR_O)\KeyMap.obj: ..\src\KeyMap.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\KeyMap.h $(DIR_O)\KeyWords.obj: ..\src\KeyWords.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \ ..\include\Scintilla.h ..\include\SciLexer.h #++Autogenerated -- run src/LexGen.py to regenerate #**\n\($(DIR_O)\\\*.obj: ..\\src\\\*.cxx $(LEX_HEADERS)\n\n\) $(DIR_O)\LexOthers.obj: ..\src\LexOthers.cxx $(LEX_HEADERS) $(DIR_O)\LexSDLB.obj: ..\src\LexSDLB.cxx $(LEX_HEADERS) #--Autogenerated -- end of automatically generated section $(DIR_O)\LineMarker.obj: ..\src\LineMarker.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\LineMarker.h $(DIR_O)\PlatWin.obj: PlatWin.cxx ..\include\Platform.h PlatformRes.h ..\src\UniConversion.h $(DIR_O)\PropSet.obj: ..\src\PropSet.cxx ..\include\Platform.h ..\include\PropSet.h \ ..\include\SString.h $(DIR_O)\RESearch.obj: ..\src\RESearch.cxx ..\src\RESearch.h $(DIR_O)\ScintillaBase.obj: ..\src\ScintillaBase.cxx ..\include\Platform.h ..\include\Scintilla.h \ ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ ..\src\LineMarker.h ..\src\Style.h ..\src\ViewStyle.h ..\src\AutoComplete.h ..\src\Document.h ..\src\Editor.h \ ..\src\ScintillaBase.h $(DIR_O)\ScintillaBaseL.obj: ..\src\ScintillaBase.cxx ..\include\Platform.h ..\include\Scintilla.h ..\include\SciLexer.h \ ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \ ..\src\ScintillaBase.h ..\include\PropSet.h ..\include\Accessor.h ..\src\DocumentAccessor.h ..\include\KeyWords.h $(DIR_O)\ScintillaWin.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h \ ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \ ..\src\ScintillaBase.h ..\src\UniConversion.h $(DIR_O)\ScintillaWinL.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h ..\include\SciLexer.h \ ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \ ..\src\ScintillaBase.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h ..\src\UniConversion.h $(DIR_O)\ScintillaWinS.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h \ ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \ ..\src\ScintillaBase.h ..\src\UniConversion.h $(DIR_O)\Style.obj: ..\src\Style.cxx ..\include\Platform.h ..\src\Style.h $(DIR_O)\StyleContext.obj: ..\src\StyleContext.cxx ..\include\Platform.h ..\include\Accessor.h ..\include\PropSet.h ..\src\StyleContext.h $(DIR_O)\ViewStyle.obj: ..\src\ViewStyle.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\Indicator.h \ ..\src\LineMarker.h ..\src\Style.h ..\src\ViewStyle.h $(DIR_O)\UniConversion.obj: ..\src\UniConversion.cxx ..\src\UniConversion.h $(DIR_O)\WindowAccessor.obj: ..\src\WindowAccessor.cxx ..\include\Platform.h ..\include\PropSet.h \ ..\include\Accessor.h ..\include\WindowAccessor.h ..\include\Scintilla.h usr/src/sdlBasic/src/sdlBasic/scintilla/gtk/scintilla-marshal.h0000777000076500007660000000141010463134721022003 0ustar #ifndef __scintilla_marshal_MARSHAL_H__ #define __scintilla_marshal_MARSHAL_H__ #include G_BEGIN_DECLS /* NONE:INT,POINTER (scintilla-marshal.list:1) */ extern void scintilla_marshal_VOID__INT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); #define scintilla_marshal_NONE__INT_POINTER scintilla_marshal_VOID__INT_POINTER G_END_DECLS #endif /* __scintilla_marshal_MARSHAL_H__ */ usr/src/sdlBasic/src/sdlBasic/scintilla/gtk/deps.mak0000777000076500007660000002662010463134656017671 0ustar PlatGTK.o: PlatGTK.cxx Converter.h \ ../include/Platform.h \ ../include/Scintilla.h ../include/ScintillaWidget.h \ ../src/UniConversion.h ../src/XPM.h ScintillaGTK.o: ScintillaGTK.cxx Converter.h \ ../include/Platform.h \ ../include/Scintilla.h ../include/ScintillaWidget.h \ ../include/SciLexer.h ../include/PropSet.h ../include/SString.h \ ../include/Accessor.h ../include/KeyWords.h ../src/ContractionState.h \ ../src/SVector.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \ ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \ ../src/AutoComplete.h ../src/ViewStyle.h ../src/Document.h \ ../src/Editor.h ../src/ScintillaBase.h ../src/UniConversion.h \ ../src/ExternalLexer.h AutoComplete.o: ../src/AutoComplete.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../src/AutoComplete.h CallTip.o: ../src/CallTip.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/CallTip.h CellBuffer.o: ../src/CellBuffer.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/SVector.h ../src/CellBuffer.h ContractionState.o: ../src/ContractionState.cxx ../include/Platform.h \ ../src/ContractionState.h DocumentAccessor.o: ../src/DocumentAccessor.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../src/SVector.h \ ../include/Accessor.h ../src/DocumentAccessor.h ../src/CellBuffer.h \ ../include/Scintilla.h ../src/Document.h Document.o: ../src/Document.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/SVector.h ../src/CellBuffer.h \ ../src/Document.h ../src/RESearch.h Editor.o: ../src/Editor.cxx ../include/Platform.h ../include/Scintilla.h \ ../src/ContractionState.h ../src/SVector.h ../src/CellBuffer.h \ ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \ ../src/Style.h ../src/ViewStyle.h ../src/Document.h ../src/Editor.h ExternalLexer.o: ../src/ExternalLexer.cxx ../include/Platform.h \ ../include/SciLexer.h ../include/PropSet.h ../include/SString.h \ ../include/Accessor.h ../src/DocumentAccessor.h ../include/KeyWords.h \ ../src/ExternalLexer.h Indicator.o: ../src/Indicator.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/Indicator.h KeyMap.o: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintilla.h \ ../src/KeyMap.h KeyWords.o: ../src/KeyWords.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexAda.o: ../src/LexAda.cxx ../include/Platform.h ../include/Accessor.h \ ../src/StyleContext.h ../include/PropSet.h ../include/SString.h \ ../include/KeyWords.h ../include/SciLexer.h LexAsm.o: ../src/LexAsm.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexAVE.o: ../src/LexAVE.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexBaan.o: ../src/LexBaan.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexBullant.o: ../src/LexBullant.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexCLW.o: ../src/LexCLW.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexConf.o: ../src/LexConf.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ ../include/Scintilla.h ../include/SciLexer.h LexCPP.o: ../src/LexCPP.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexCrontab.o: ../src/LexCrontab.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexCSS.o: ../src/LexCSS.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexEiffel.o: ../src/LexEiffel.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \ ../include/SciLexer.h LexErlang.o: ../src/LexErlang.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \ ../include/SciLexer.h LexEScript.o: ../src/LexEScript.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \ ../include/SciLexer.h LexForth.o: ../src/LexForth.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexFortran.o: ../src/LexFortran.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \ ../include/SciLexer.h LexHTML.o: ../src/LexHTML.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexLisp.o: ../src/LexLisp.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ ../include/Scintilla.h ../include/SciLexer.h LexLout.o: ../src/LexLout.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexLua.o: ../src/LexLua.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexMatlab.o: ../src/LexMatlab.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \ ../include/SciLexer.h LexMetapost.o: ../src/LexMetapost.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h \ ../src/StyleContext.h LexMMIXAL.o: ../src/LexMMIXAL.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \ ../include/SciLexer.h LexMPT.o: ../src/LexMPT.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ ../include/Scintilla.h ../include/SciLexer.h LexNsis.o: ../src/LexNsis.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ ../include/Scintilla.h ../include/SciLexer.h LexOthers.o: ../src/LexOthers.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexPascal.o: ../src/LexPascal.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h \ ../src/StyleContext.h LexPB.o: ../src/LexPB.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexPerl.o: ../src/LexPerl.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ ../include/Scintilla.h ../include/SciLexer.h LexPOV.o: ../src/LexPOV.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexPS.o: ../src/LexPS.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexPython.o: ../src/LexPython.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \ ../include/SciLexer.h LexRuby.o: ../src/LexRuby.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ ../include/Scintilla.h ../include/SciLexer.h LexScriptol.o: ../src/LexScriptol.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexSQL.o: ../src/LexSQL.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ ../include/Scintilla.h ../include/SciLexer.h LexTeX.o: ../src/LexTeX.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ ../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h LexSDLB.o: ../src/LexSDLB.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexYAML.o: ../src/LexYAML.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LineMarker.o: ../src/LineMarker.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/XPM.h ../src/LineMarker.h PropSet.o: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h RESearch.o: ../src/RESearch.cxx ../src/RESearch.h ScintillaBase.o: ../src/ScintillaBase.cxx ../include/Platform.h \ ../include/Scintilla.h ../include/PropSet.h ../include/SString.h \ ../include/SciLexer.h ../include/Accessor.h ../src/DocumentAccessor.h \ ../include/KeyWords.h ../src/ContractionState.h ../src/SVector.h \ ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h \ ../src/XPM.h ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \ ../src/AutoComplete.h ../src/Document.h ../src/Editor.h \ ../src/ScintillaBase.h StyleContext.o: ../src/StyleContext.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../src/StyleContext.h Style.o: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \ ../src/Style.h UniConversion.o: ../src/UniConversion.cxx ../src/UniConversion.h ViewStyle.o: ../src/ViewStyle.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/Indicator.h ../src/XPM.h \ ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h WindowAccessor.o: ../src/WindowAccessor.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../include/WindowAccessor.h ../include/Scintilla.h XPM.o: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h usr/src/sdlBasic/src/sdlBasic/scintilla/gtk/ScintillaGTK.cxx0000777000076500007660000024252610463134656021265 0ustar // Scintilla source code edit control // ScintillaGTK.cxx - GTK+ specific subclass of ScintillaBase // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include "Platform.h" #if PLAT_GTK_WIN32 #include "Windows.h" #endif #include "Scintilla.h" #include "ScintillaWidget.h" #ifdef SCI_LEXER #include "SciLexer.h" #include "PropSet.h" #include "Accessor.h" #include "KeyWords.h" #endif #include "ContractionState.h" #include "SVector.h" #include "CellBuffer.h" #include "CallTip.h" #include "KeyMap.h" #include "Indicator.h" #include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "AutoComplete.h" #include "ViewStyle.h" #include "Document.h" #include "Editor.h" #include "SString.h" #include "ScintillaBase.h" #include "UniConversion.h" #include "gtk/gtksignal.h" #include "gtk/gtkmarshal.h" #if GTK_MAJOR_VERSION >= 2 #include "scintilla-marshal.h" #endif #ifdef SCI_LEXER #include #include #include "ExternalLexer.h" #endif #define INTERNATIONAL_INPUT #if !PLAT_GTK_WIN32 || GTK_MAJOR_VERSION >= 2 #define USE_CONVERTER #endif #ifdef USE_CONVERTER #include "Converter.h" #endif #ifdef _MSC_VER // Constant conditional expressions are because of GTK+ headers #pragma warning(disable: 4127) // Ignore unreferenced local functions in GTK+ headers #pragma warning(disable: 4505) #endif #if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 2 #define USE_GTK_CLIPBOARD #endif extern char *UTF8FromLatin1(const char *s, int &len); class ScintillaGTK : public ScintillaBase { _ScintillaObject *sci; Window wText; Window scrollbarv; Window scrollbarh; GtkObject *adjustmentv; GtkObject *adjustmenth; int scrollBarWidth; int scrollBarHeight; // Because clipboard access is asynchronous, copyText is created by Copy #ifndef USE_GTK_CLIPBOARD SelectionText copyText; #endif SelectionText primary; GdkEventButton evbtn; bool capturedMouse; bool dragWasDropped; int lastKey; GtkWidgetClass *parentClass; static GdkAtom atomClipboard; static GdkAtom atomUTF8; static GdkAtom atomString; GdkAtom atomSought; #if PLAT_GTK_WIN32 CLIPFORMAT cfColumnSelect; #endif #ifdef INTERNATIONAL_INPUT #if GTK_MAJOR_VERSION < 2 // Input context used for supporting internationalized key entry GdkIC *ic; GdkICAttr *ic_attr; #else Window wPreedit; Window wPreeditDraw; GtkIMContext *im_context; #endif #endif // Wheel mouse support unsigned int linesPerScroll; GTimeVal lastWheelMouseTime; gint lastWheelMouseDirection; gint wheelMouseIntensity; // Private so ScintillaGTK objects can not be copied ScintillaGTK(const ScintillaGTK &) : ScintillaBase() {} ScintillaGTK &operator=(const ScintillaGTK &) { return * this; } public: ScintillaGTK(_ScintillaObject *sci_); virtual ~ScintillaGTK(); static void ClassInit(GtkObjectClass* object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class); private: virtual void Initialise(); virtual void Finalise(); virtual void DisplayCursor(Window::Cursor c); virtual void StartDrag(); int TargetAsUTF8(char *text); int EncodedFromUTF8(char *utf8, char *encoded); public: // Public for scintilla_send_message virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); private: virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); virtual void SetTicking(bool on); virtual bool SetIdle(bool on); virtual void SetMouseCapture(bool on); virtual bool HaveMouseCapture(); void FullPaint(); virtual PRectangle GetClientRectangle(); void SyncPaint(PRectangle rc); virtual void ScrollText(int linesToMove); virtual void SetVerticalScrollPos(); virtual void SetHorizontalScrollPos(); virtual bool ModifyScrollBars(int nMax, int nPage); void ReconfigureScrollBars(); virtual void NotifyChange(); virtual void NotifyFocus(bool focus); virtual void NotifyParent(SCNotification scn); void NotifyKey(int key, int modifiers); void NotifyURIDropped(const char *list); bool UseInputMethod() const; const char *CharacterSetID() const; virtual int KeyDefault(int key, int modifiers); virtual void CopyToClipboard(const SelectionText &selectedText); virtual void Copy(); virtual void Paste(); virtual void CreateCallTipWindow(PRectangle rc); virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true); bool OwnPrimarySelection(); virtual void ClaimSelection(); void GetGtkSelectionText(GtkSelectionData *selectionData, SelectionText &selText); void ReceivedSelection(GtkSelectionData *selection_data); void ReceivedDrop(GtkSelectionData *selection_data); static void GetSelection(GtkSelectionData *selection_data, guint info, SelectionText *selected); #ifdef USE_GTK_CLIPBOARD static void ClipboardGetSelection(GtkClipboard* clip, GtkSelectionData *selection_data, guint info, void *data); static void ClipboardClearSelection(GtkClipboard* clip, void *data); #endif void UnclaimSelection(GdkEventSelection *selection_event); void Resize(int width, int height); // Callback functions void RealizeThis(GtkWidget *widget); static void Realize(GtkWidget *widget); void UnRealizeThis(GtkWidget *widget); static void UnRealize(GtkWidget *widget); void MapThis(); static void Map(GtkWidget *widget); void UnMapThis(); static void UnMap(GtkWidget *widget); static gint CursorMoved(GtkWidget *widget, int xoffset, int yoffset, ScintillaGTK *sciThis); static gint FocusIn(GtkWidget *widget, GdkEventFocus *event); static gint FocusOut(GtkWidget *widget, GdkEventFocus *event); static void SizeRequest(GtkWidget *widget, GtkRequisition *requisition); static void SizeAllocate(GtkWidget *widget, GtkAllocation *allocation); gint Expose(GtkWidget *widget, GdkEventExpose *ose); static gint ExposeMain(GtkWidget *widget, GdkEventExpose *ose); static void Draw(GtkWidget *widget, GdkRectangle *area); void ForAll(GtkCallback callback, gpointer callback_data); static void MainForAll(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data); static void ScrollSignal(GtkAdjustment *adj, ScintillaGTK *sciThis); static void ScrollHSignal(GtkAdjustment *adj, ScintillaGTK *sciThis); gint PressThis(GdkEventButton *event); static gint Press(GtkWidget *widget, GdkEventButton *event); static gint MouseRelease(GtkWidget *widget, GdkEventButton *event); #if PLAT_GTK_WIN32 || (GTK_MAJOR_VERSION >= 2) static gint ScrollEvent(GtkWidget *widget, GdkEventScroll *event); #endif static gint Motion(GtkWidget *widget, GdkEventMotion *event); gint KeyThis(GdkEventKey *event); static gint KeyPress(GtkWidget *widget, GdkEventKey *event); static gint KeyRelease(GtkWidget *widget, GdkEventKey *event); #if GTK_MAJOR_VERSION >= 2 static gint ExposePreedit(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis); gint ExposePreeditThis(GtkWidget *widget, GdkEventExpose *ose); static void Commit(GtkIMContext *context, char *str, ScintillaGTK *sciThis); void CommitThis(char *str); static void PreeditChanged(GtkIMContext *context, ScintillaGTK *sciThis); void PreeditChangedThis(); #endif static gint StyleSetText(GtkWidget *widget, GtkStyle *previous, void*); static gint RealizeText(GtkWidget *widget, void*); static void Destroy(GtkObject *object); static void SelectionReceived(GtkWidget *widget, GtkSelectionData *selection_data, guint time); static void SelectionGet(GtkWidget *widget, GtkSelectionData *selection_data, guint info, guint time); static gint SelectionClear(GtkWidget *widget, GdkEventSelection *selection_event); #if GTK_MAJOR_VERSION < 2 static gint SelectionNotify(GtkWidget *widget, GdkEventSelection *selection_event); #endif static void DragBegin(GtkWidget *widget, GdkDragContext *context); static gboolean DragMotion(GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time); static void DragLeave(GtkWidget *widget, GdkDragContext *context, guint time); static void DragEnd(GtkWidget *widget, GdkDragContext *context); static gboolean Drop(GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time); static void DragDataReceived(GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time); static void DragDataGet(GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time); static gint TimeOut(ScintillaGTK *sciThis); static gint IdleCallback(ScintillaGTK *sciThis); static void PopUpCB(ScintillaGTK *sciThis, guint action, GtkWidget *widget); gint ExposeTextThis(GtkWidget *widget, GdkEventExpose *ose); static gint ExposeText(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis); static gint ExposeCT(GtkWidget *widget, GdkEventExpose *ose, CallTip *ct); static gint PressCT(GtkWidget *widget, GdkEventButton *event, ScintillaGTK *sciThis); static sptr_t DirectFunction(ScintillaGTK *sciThis, unsigned int iMessage, uptr_t wParam, sptr_t lParam); }; enum { COMMAND_SIGNAL, NOTIFY_SIGNAL, LAST_SIGNAL }; static gint scintilla_signals[LAST_SIGNAL] = { 0 }; static GtkWidgetClass* parent_class = NULL; enum { TARGET_STRING, TARGET_TEXT, TARGET_COMPOUND_TEXT, TARGET_UTF8_STRING }; GdkAtom ScintillaGTK::atomClipboard = 0; GdkAtom ScintillaGTK::atomUTF8 = 0; GdkAtom ScintillaGTK::atomString = 0; static const GtkTargetEntry clipboardTargets[] = { { "UTF8_STRING", 0, TARGET_UTF8_STRING }, { "STRING", 0, TARGET_STRING }, // { "TEXT", 0, TARGET_TEXT }, // { "COMPOUND_TEXT", 0, TARGET_COMPOUND_TEXT }, { "text/uri-list", 0, 0 }, }; static const gint nClipboardTargets = sizeof(clipboardTargets) / sizeof(clipboardTargets[0]); static GtkWidget *PWidget(Window &w) { return reinterpret_cast(w.GetID()); } static ScintillaGTK *ScintillaFromWidget(GtkWidget *widget) { ScintillaObject *scio = reinterpret_cast(widget); return reinterpret_cast(scio->pscin); } ScintillaGTK::ScintillaGTK(_ScintillaObject *sci_) : adjustmentv(0), adjustmenth(0), scrollBarWidth(30), scrollBarHeight(30), capturedMouse(false), dragWasDropped(false), lastKey(0), parentClass(0), #ifdef INTERNATIONAL_INPUT #if GTK_MAJOR_VERSION < 2 ic(NULL), ic_attr(NULL), #else im_context(NULL), #endif #endif lastWheelMouseDirection(0), wheelMouseIntensity(0) { sci = sci_; wMain = GTK_WIDGET(sci); #if PLAT_GTK_WIN32 // There does not seem to be a real standard for indicating that the clipboard // contains a rectangular selection, so copy Developer Studio. cfColumnSelect = static_cast( ::RegisterClipboardFormat("MSDEVColumnSelect")); // Get intellimouse parameters when running on win32; otherwise use // reasonable default #ifndef SPI_GETWHEELSCROLLLINES #define SPI_GETWHEELSCROLLLINES 104 #endif ::SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, &linesPerScroll, 0); #else linesPerScroll = 4; #endif lastWheelMouseTime.tv_sec = 0; lastWheelMouseTime.tv_usec = 0; Initialise(); } ScintillaGTK::~ScintillaGTK() { } void ScintillaGTK::RealizeThis(GtkWidget *widget) { //Platform::DebugPrintf("ScintillaGTK::realize this\n"); GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); GdkWindowAttr attrs; attrs.window_type = GDK_WINDOW_CHILD; attrs.x = widget->allocation.x; attrs.y = widget->allocation.y; attrs.width = widget->allocation.width; attrs.height = widget->allocation.height; attrs.wclass = GDK_INPUT_OUTPUT; attrs.visual = gtk_widget_get_visual(widget); attrs.colormap = gtk_widget_get_colormap(widget); attrs.event_mask = gtk_widget_get_events(widget) | GDK_EXPOSURE_MASK; GdkCursor *cursor = gdk_cursor_new(GDK_XTERM); attrs.cursor = cursor; widget->window = gdk_window_new(gtk_widget_get_parent_window(widget), &attrs, GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP | GDK_WA_CURSOR); gdk_window_set_user_data(widget->window, widget); gdk_window_set_background(widget->window, &widget->style->bg[GTK_STATE_NORMAL]); gdk_window_show(widget->window); gdk_cursor_destroy(cursor); widget->style = gtk_style_attach(widget->style, widget->window); #ifdef INTERNATIONAL_INPUT #if GTK_MAJOR_VERSION < 2 if (gdk_im_ready() && (ic_attr = gdk_ic_attr_new()) != NULL) { gint width, height; GdkColormap *colormap; GdkEventMask mask; GdkICAttr *attr = ic_attr; GdkICAttributesType attrmask = GDK_IC_ALL_REQ; GdkIMStyle style; GdkIMStyle supported_style = (GdkIMStyle) (GDK_IM_PREEDIT_NONE | GDK_IM_PREEDIT_NOTHING | GDK_IM_PREEDIT_POSITION | GDK_IM_STATUS_NONE | GDK_IM_STATUS_NOTHING); if (widget->style && widget->style->font->type != GDK_FONT_FONTSET) supported_style = (GdkIMStyle) ((int) supported_style & ~GDK_IM_PREEDIT_POSITION); attr->style = style = gdk_im_decide_style(supported_style); attr->client_window = widget->window; if ((colormap = gtk_widget_get_colormap (widget)) != gtk_widget_get_default_colormap ()) { attrmask = (GdkICAttributesType) ((int) attrmask | GDK_IC_PREEDIT_COLORMAP); attr->preedit_colormap = colormap; } switch (style & GDK_IM_PREEDIT_MASK) { case GDK_IM_PREEDIT_POSITION: if (widget->style && widget->style->font->type != GDK_FONT_FONTSET) { g_warning("over-the-spot style requires fontset"); break; } attrmask = (GdkICAttributesType) ((int) attrmask | GDK_IC_PREEDIT_POSITION_REQ); gdk_window_get_size(widget->window, &width, &height); attr->spot_location.x = 0; attr->spot_location.y = height; attr->preedit_area.x = 0; attr->preedit_area.y = 0; attr->preedit_area.width = width; attr->preedit_area.height = height; attr->preedit_fontset = widget->style->font; break; } ic = gdk_ic_new(attr, attrmask); if (ic == NULL) { g_warning("Can't create input context."); } else { mask = gdk_window_get_events(widget->window); mask = (GdkEventMask) ((int) mask | gdk_ic_get_events(ic)); gdk_window_set_events(widget->window, mask); if (GTK_WIDGET_HAS_FOCUS(widget)) gdk_im_begin(ic, widget->window); } } #else wPreedit = gtk_window_new(GTK_WINDOW_POPUP); wPreeditDraw = gtk_drawing_area_new(); gtk_signal_connect(GTK_OBJECT(PWidget(wPreeditDraw)), "expose_event", GtkSignalFunc(ExposePreedit), this); gtk_container_add(GTK_CONTAINER(PWidget(wPreedit)), PWidget(wPreeditDraw)); gtk_widget_realize(PWidget(wPreedit)); gtk_widget_realize(PWidget(wPreeditDraw)); gtk_widget_show(PWidget(wPreeditDraw)); im_context = gtk_im_multicontext_new(); g_signal_connect(im_context, "commit", G_CALLBACK(Commit), this); g_signal_connect(im_context, "preedit_changed", G_CALLBACK(PreeditChanged), this); gtk_im_context_set_client_window(im_context, widget->window); #endif #endif gtk_signal_connect_after(GTK_OBJECT(PWidget(wText)), "style_set", GtkSignalFunc(ScintillaGTK::StyleSetText), NULL); gtk_signal_connect_after(GTK_OBJECT(PWidget(wText)), "realize", GtkSignalFunc(ScintillaGTK::RealizeText), NULL); gtk_widget_realize(PWidget(wText)); gtk_widget_realize(PWidget(scrollbarv)); gtk_widget_realize(PWidget(scrollbarh)); } void ScintillaGTK::Realize(GtkWidget *widget) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); sciThis->RealizeThis(widget); } void ScintillaGTK::UnRealizeThis(GtkWidget *widget) { if (GTK_WIDGET_MAPPED(widget)) { gtk_widget_unmap(widget); } GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED); gtk_widget_unrealize(PWidget(wText)); gtk_widget_unrealize(PWidget(scrollbarv)); gtk_widget_unrealize(PWidget(scrollbarh)); #ifdef INTERNATIONAL_INPUT #if GTK_MAJOR_VERSION < 2 if (ic) { gdk_ic_destroy(ic); ic = NULL; } if (ic_attr) { gdk_ic_attr_destroy(ic_attr); ic_attr = NULL; } #else gtk_widget_unrealize(PWidget(wPreedit)); gtk_widget_unrealize(PWidget(wPreeditDraw)); g_object_unref(im_context); im_context = NULL; #endif #endif if (GTK_WIDGET_CLASS(parentClass)->unrealize) GTK_WIDGET_CLASS(parentClass)->unrealize(widget); Finalise(); } void ScintillaGTK::UnRealize(GtkWidget *widget) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); sciThis->UnRealizeThis(widget); } static void MapWidget(GtkWidget *widget) { if (widget && GTK_WIDGET_VISIBLE(widget) && !GTK_WIDGET_MAPPED(widget)) { gtk_widget_map(widget); } } void ScintillaGTK::MapThis() { //Platform::DebugPrintf("ScintillaGTK::map this\n"); GTK_WIDGET_SET_FLAGS(PWidget(wMain), GTK_MAPPED); MapWidget(PWidget(wText)); MapWidget(PWidget(scrollbarh)); MapWidget(PWidget(scrollbarv)); wMain.SetCursor(Window::cursorArrow); scrollbarv.SetCursor(Window::cursorArrow); scrollbarh.SetCursor(Window::cursorArrow); ChangeSize(); gdk_window_show(PWidget(wMain)->window); } void ScintillaGTK::Map(GtkWidget *widget) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); sciThis->MapThis(); } void ScintillaGTK::UnMapThis() { //Platform::DebugPrintf("ScintillaGTK::unmap this\n"); GTK_WIDGET_UNSET_FLAGS(PWidget(wMain), GTK_MAPPED); gdk_window_hide(PWidget(wMain)->window); gtk_widget_unmap(PWidget(wText)); gtk_widget_unmap(PWidget(scrollbarh)); gtk_widget_unmap(PWidget(scrollbarv)); } void ScintillaGTK::UnMap(GtkWidget *widget) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); sciThis->UnMapThis(); } void ScintillaGTK::ForAll(GtkCallback callback, gpointer callback_data) { (*callback) (PWidget(wText), callback_data); (*callback) (PWidget(scrollbarv), callback_data); (*callback) (PWidget(scrollbarh), callback_data); } void ScintillaGTK::MainForAll(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data) { ScintillaGTK *sciThis = ScintillaFromWidget((GtkWidget *)container); if (callback != NULL && include_internals) { sciThis->ForAll(callback, callback_data); } } #ifdef INTERNATIONAL_INPUT #if GTK_MAJOR_VERSION < 2 gint ScintillaGTK::CursorMoved(GtkWidget *widget, int xoffset, int yoffset, ScintillaGTK *sciThis) { if (GTK_WIDGET_HAS_FOCUS(widget) && gdk_im_ready() && sciThis->ic && (gdk_ic_get_style(sciThis->ic) & GDK_IM_PREEDIT_POSITION)) { sciThis->ic_attr->spot_location.x = xoffset; sciThis->ic_attr->spot_location.y = yoffset; gdk_ic_set_attr(sciThis->ic, sciThis->ic_attr, GDK_IC_SPOT_LOCATION); } return FALSE; } #else gint ScintillaGTK::CursorMoved(GtkWidget *, int xoffset, int yoffset, ScintillaGTK *sciThis) { GdkRectangle area; area.x = xoffset; area.y = yoffset; area.width = 1; area.height = 1; gtk_im_context_set_cursor_location(sciThis->im_context, &area); return FALSE; } #endif #else gint ScintillaGTK::CursorMoved(GtkWidget *, int, int, ScintillaGTK *) { return FALSE; } #endif gint ScintillaGTK::FocusIn(GtkWidget *widget, GdkEventFocus * /*event*/) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); //Platform::DebugPrintf("ScintillaGTK::focus in %x\n", sciThis); GTK_WIDGET_SET_FLAGS(widget, GTK_HAS_FOCUS); sciThis->SetFocusState(true); #ifdef INTERNATIONAL_INPUT #if GTK_MAJOR_VERSION < 2 if (sciThis->ic) gdk_im_begin(sciThis->ic, widget->window); #else if (sciThis->im_context != NULL) { gchar *str = NULL; gint cursor_pos; gtk_im_context_get_preedit_string(sciThis->im_context, &str, NULL, &cursor_pos); if (PWidget(sciThis->wPreedit) != NULL) { if (strlen(str) > 0) { gtk_widget_show(PWidget(sciThis->wPreedit)); } else { gtk_widget_hide(PWidget(sciThis->wPreedit)); } } g_free(str); gtk_im_context_focus_in(sciThis->im_context); } #endif #endif return FALSE; } gint ScintillaGTK::FocusOut(GtkWidget *widget, GdkEventFocus * /*event*/) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); //Platform::DebugPrintf("ScintillaGTK::focus out %x\n", sciThis); GTK_WIDGET_UNSET_FLAGS(widget, GTK_HAS_FOCUS); sciThis->SetFocusState(false); #ifdef INTERNATIONAL_INPUT #if GTK_MAJOR_VERSION < 2 gdk_im_end(); #else if (PWidget(sciThis->wPreedit) != NULL) gtk_widget_hide(PWidget(sciThis->wPreedit)); if (sciThis->im_context != NULL) gtk_im_context_focus_out(sciThis->im_context); #endif #endif return FALSE; } void ScintillaGTK::SizeRequest(GtkWidget *widget, GtkRequisition *requisition) { requisition->width = 600; requisition->height = gdk_screen_height(); ScintillaGTK *sciThis = ScintillaFromWidget(widget); GtkRequisition child_requisition; gtk_widget_size_request(PWidget(sciThis->scrollbarh), &child_requisition); gtk_widget_size_request(PWidget(sciThis->scrollbarv), &child_requisition); } void ScintillaGTK::SizeAllocate(GtkWidget *widget, GtkAllocation *allocation) { widget->allocation = *allocation; ScintillaGTK *sciThis = ScintillaFromWidget(widget); if (GTK_WIDGET_REALIZED(widget)) gdk_window_move_resize(widget->window, widget->allocation.x, widget->allocation.y, widget->allocation.width, widget->allocation.height); sciThis->Resize(allocation->width, allocation->height); #ifdef INTERNATIONAL_INPUT #if GTK_MAJOR_VERSION < 2 if (sciThis->ic && (gdk_ic_get_style(sciThis->ic) & GDK_IM_PREEDIT_POSITION)) { gint width, height; gdk_window_get_size(widget->window, &width, &height); sciThis->ic_attr->preedit_area.width = width; sciThis->ic_attr->preedit_area.height = height; gdk_ic_set_attr(sciThis->ic, sciThis->ic_attr, GDK_IC_PREEDIT_AREA); } #endif #endif } void ScintillaGTK::Initialise() { //Platform::DebugPrintf("ScintillaGTK::Initialise\n"); parentClass = reinterpret_cast( gtk_type_class(gtk_container_get_type())); GTK_WIDGET_SET_FLAGS(PWidget(wMain), GTK_CAN_FOCUS); GTK_WIDGET_SET_FLAGS(GTK_WIDGET(PWidget(wMain)), GTK_SENSITIVE); gtk_widget_set_events(PWidget(wMain), GDK_EXPOSURE_MASK | GDK_STRUCTURE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); wText = gtk_drawing_area_new(); gtk_widget_set_parent(PWidget(wText), PWidget(wMain)); gtk_widget_show(PWidget(wText)); gtk_signal_connect(GTK_OBJECT(PWidget(wText)), "expose_event", GtkSignalFunc(ScintillaGTK::ExposeText), this); gtk_widget_set_events(PWidget(wText), GDK_EXPOSURE_MASK); #if GTK_MAJOR_VERSION >= 2 // Avoid background drawing flash gtk_widget_set_double_buffered(PWidget(wText), FALSE); #endif gtk_drawing_area_size(GTK_DRAWING_AREA(PWidget(wText)), 100,100); adjustmentv = gtk_adjustment_new(0.0, 0.0, 201.0, 1.0, 20.0, 20.0); scrollbarv = gtk_vscrollbar_new(GTK_ADJUSTMENT(adjustmentv)); GTK_WIDGET_UNSET_FLAGS(PWidget(scrollbarv), GTK_CAN_FOCUS); gtk_signal_connect(GTK_OBJECT(adjustmentv), "value_changed", GTK_SIGNAL_FUNC(ScrollSignal), this); gtk_widget_set_parent(PWidget(scrollbarv), PWidget(wMain)); gtk_widget_show(PWidget(scrollbarv)); adjustmenth = gtk_adjustment_new(0.0, 0.0, 101.0, 1.0, 20.0, 20.0); scrollbarh = gtk_hscrollbar_new(GTK_ADJUSTMENT(adjustmenth)); GTK_WIDGET_UNSET_FLAGS(PWidget(scrollbarh), GTK_CAN_FOCUS); gtk_signal_connect(GTK_OBJECT(adjustmenth), "value_changed", GTK_SIGNAL_FUNC(ScrollHSignal), this); gtk_widget_set_parent(PWidget(scrollbarh), PWidget(wMain)); gtk_widget_show(PWidget(scrollbarh)); gtk_widget_grab_focus(PWidget(wMain)); gtk_selection_add_targets(GTK_WIDGET(PWidget(wMain)), GDK_SELECTION_PRIMARY, clipboardTargets, nClipboardTargets); #ifndef USE_GTK_CLIPBOARD gtk_selection_add_targets(GTK_WIDGET(PWidget(wMain)), atomClipboard, clipboardTargets, nClipboardTargets); #endif gtk_drag_dest_set(GTK_WIDGET(PWidget(wMain)), GTK_DEST_DEFAULT_ALL, clipboardTargets, nClipboardTargets, static_cast(GDK_ACTION_COPY | GDK_ACTION_MOVE)); SetTicking(true); } void ScintillaGTK::Finalise() { SetTicking(false); ScintillaBase::Finalise(); } void ScintillaGTK::DisplayCursor(Window::Cursor c) { if (cursorMode == SC_CURSORNORMAL) wText.SetCursor(c); else wText.SetCursor(static_cast(cursorMode)); } void ScintillaGTK::StartDrag() { dragWasDropped = false; static const GtkTargetEntry targets[] = { { "UTF8_STRING", 0, TARGET_UTF8_STRING }, { "STRING", 0, TARGET_STRING }, // { "TEXT", 0, TARGET_TEXT }, // { "COMPOUND_TEXT", 0, TARGET_COMPOUND_TEXT }, }; static const gint n_targets = sizeof(targets) / sizeof(targets[0]); GtkTargetList *tl = gtk_target_list_new(targets, n_targets); gtk_drag_begin(GTK_WIDGET(PWidget(wMain)), tl, static_cast(GDK_ACTION_COPY | GDK_ACTION_MOVE), evbtn.button, reinterpret_cast(&evbtn)); } #ifdef USE_CONVERTER static char *ConvertText(int *lenResult, char *s, size_t len, const char *charSetDest, const char *charSetSource) { *lenResult = 0; char *destForm = 0; Converter conv(charSetDest, charSetSource); if (conv) { destForm = new char[len*3+1]; char *pin = s; size_t inLeft = len; char *pout = destForm; size_t outLeft = len*3+1; size_t conversions = conv.Convert(&pin, &inLeft, &pout, &outLeft); if (conversions == ((size_t)(-1))) { fprintf(stderr, "iconv %s->%s failed for %s\n", charSetSource, charSetDest, static_cast(s)); delete []destForm; destForm = 0; } else { //fprintf(stderr, "iconv OK %s %d\n", destForm, pout - destForm); *pout = '\0'; *lenResult = pout - destForm; } } else { fprintf(stderr, "Can not iconv %s %s\n", charSetDest, charSetSource); } if (!destForm) { destForm = new char[1]; destForm[0] = '\0'; *lenResult = 0; } return destForm; } #endif // Returns the target converted to UTF8. // Return the length in bytes. int ScintillaGTK::TargetAsUTF8(char *text) { int targetLength = targetEnd - targetStart; if (IsUnicodeMode()) { if (text) { pdoc->GetCharRange(text, targetStart, targetLength); } } else { // Need to convert #ifdef USE_CONVERTER const char *charSetBuffer = CharacterSetID(); if (*charSetBuffer) { //~ fprintf(stderr, "AsUTF8 %s %d %0d-%0d\n", charSetBuffer, targetLength, targetStart, targetEnd); char *s = new char[targetLength]; if (s) { pdoc->GetCharRange(s, targetStart, targetLength); //~ fprintf(stderr, " \"%s\"\n", s); if (text) { char *tmputf = ConvertText(&targetLength, s, targetLength, "UTF-8", charSetBuffer); memcpy(text, tmputf, targetLength); delete []tmputf; //~ fprintf(stderr, " \"%s\"\n", text); } delete []s; } } else { if (text) { pdoc->GetCharRange(text, targetStart, targetLength); } } #else // Fail return 0; #endif } //~ fprintf(stderr, "Length = %d bytes\n", targetLength); return targetLength; } // Translates a nul terminated UTF8 string into the document encoding. // Return the length of the result in bytes. int ScintillaGTK::EncodedFromUTF8(char *utf8, char *encoded) { int inputLength = (lengthForEncode >= 0) ? lengthForEncode : strlen(utf8); if (IsUnicodeMode()) { if (encoded) { memcpy(encoded, utf8, inputLength); } return inputLength; } else { // Need to convert #ifdef USE_CONVERTER const char *charSetBuffer = CharacterSetID(); if (*charSetBuffer) { //~ fprintf(stderr, "Encode %s %d\n", charSetBuffer, inputLength); int outLength = 0; char *tmpEncoded = ConvertText(&outLength, utf8, inputLength, charSetBuffer, "UTF-8"); if (tmpEncoded) { //~ fprintf(stderr, " \"%s\"\n", tmpEncoded); if (encoded) { memcpy(encoded, tmpEncoded, outLength); } delete []tmpEncoded; } return outLength; } else { if (encoded) { memcpy(encoded, utf8, inputLength); } return inputLength; } #endif } // Fail return 0; } sptr_t ScintillaGTK::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { switch (iMessage) { case SCI_GRABFOCUS: gtk_widget_grab_focus(PWidget(wMain)); break; case SCI_GETDIRECTFUNCTION: return reinterpret_cast(DirectFunction); case SCI_GETDIRECTPOINTER: return reinterpret_cast(this); #ifdef SCI_LEXER case SCI_LOADLEXERLIBRARY: LexerManager::GetInstance()->Load(reinterpret_cast(wParam)); break; #endif case SCI_TARGETASUTF8: return TargetAsUTF8(reinterpret_cast(lParam)); case SCI_ENCODEDFROMUTF8: return EncodedFromUTF8(reinterpret_cast(wParam), reinterpret_cast(lParam)); default: return ScintillaBase::WndProc(iMessage, wParam, lParam); } return 0l; } sptr_t ScintillaGTK::DefWndProc(unsigned int, uptr_t, sptr_t) { return 0; } void ScintillaGTK::SetTicking(bool on) { if (timer.ticking != on) { timer.ticking = on; if (timer.ticking) { timer.tickerID = reinterpret_cast(gtk_timeout_add(timer.tickSize, (GtkFunction)TimeOut, this)); } else { gtk_timeout_remove(GPOINTER_TO_UINT(timer.tickerID)); } } timer.ticksToWait = caret.period; } bool ScintillaGTK::SetIdle(bool on) { if (on) { // Start idler, if it's not running. if (idler.state == false) { idler.state = true; idler.idlerID = reinterpret_cast (gtk_idle_add((GtkFunction)IdleCallback, this)); } } else { // Stop idler, if it's running if (idler.state == true) { idler.state = false; gtk_idle_remove(GPOINTER_TO_UINT(idler.idlerID)); } } return true; } void ScintillaGTK::SetMouseCapture(bool on) { if (mouseDownCaptures) { if (on) { gtk_grab_add(GTK_WIDGET(PWidget(wMain))); } else { gtk_grab_remove(GTK_WIDGET(PWidget(wMain))); } } capturedMouse = on; } bool ScintillaGTK::HaveMouseCapture() { return capturedMouse; } // Redraw all of text area. This paint will not be abandoned. void ScintillaGTK::FullPaint() { #if GTK_MAJOR_VERSION < 2 paintState = painting; rcPaint = GetClientRectangle(); //Platform::DebugPrintf("ScintillaGTK::FullPaint %0d,%0d %0d,%0d\n", // rcPaint.left, rcPaint.top, rcPaint.right, rcPaint.bottom); paintingAllText = true; if ((PWidget(wText))->window) { Surface *sw = Surface::Allocate(); if (sw) { sw->Init(PWidget(wText)->window, PWidget(wText)); Paint(sw, rcPaint); sw->Release(); delete sw; } } paintState = notPainting; #else wText.InvalidateAll(); #endif } PRectangle ScintillaGTK::GetClientRectangle() { PRectangle rc = wMain.GetClientPosition(); if (verticalScrollBarVisible) rc.right -= scrollBarWidth; if (horizontalScrollBarVisible && (wrapState == eWrapNone)) rc.bottom -= scrollBarHeight; // Move to origin rc.right -= rc.left; rc.bottom -= rc.top; rc.left = 0; rc.top = 0; return rc; } // Synchronously paint a rectangle of the window. void ScintillaGTK::SyncPaint(PRectangle rc) { paintState = painting; rcPaint = rc; PRectangle rcClient = GetClientRectangle(); paintingAllText = rcPaint.Contains(rcClient); if ((PWidget(wText))->window) { Surface *sw = Surface::Allocate(); if (sw) { sw->Init(PWidget(wText)->window, PWidget(wText)); Paint(sw, rc); sw->Release(); delete sw; } } if (paintState == paintAbandoned) { // Painting area was insufficient to cover new styling or brace highlight positions FullPaint(); } paintState = notPainting; } void ScintillaGTK::ScrollText(int linesToMove) { int diff = vs.lineHeight * -linesToMove; //Platform::DebugPrintf("ScintillaGTK::ScrollText %d %d %0d,%0d %0d,%0d\n", linesToMove, diff, // rc.left, rc.top, rc.right, rc.bottom); GtkWidget *wi = PWidget(wText); #if GTK_MAJOR_VERSION < 2 PRectangle rc = GetClientRectangle(); GdkGC *gc = gdk_gc_new(wi->window); // Set up gc so we get GraphicsExposures from gdk_draw_pixmap // which calls XCopyArea gdk_gc_set_exposures(gc, TRUE); // Redraw exposed bit : scrolling upwards if (diff > 0) { gdk_draw_pixmap(wi->window, gc, wi->window, 0, diff, 0, 0, rc.Width()-1, rc.Height() - diff); SyncPaint(PRectangle(0, rc.Height() - diff, rc.Width(), rc.Height()+1)); // Redraw exposed bit : scrolling downwards } else { gdk_draw_pixmap(wi->window, gc, wi->window, 0, 0, 0, -diff, rc.Width()-1, rc.Height() + diff); SyncPaint(PRectangle(0, 0, rc.Width(), -diff)); } // Look for any graphics expose GdkEvent* event; while ((event = gdk_event_get_graphics_expose(wi->window)) != NULL) { gtk_widget_event(wi, event); if (event->expose.count == 0) { gdk_event_free(event); break; } gdk_event_free(event); } gdk_gc_unref(gc); #else gdk_window_scroll(wi->window, 0, -diff); gdk_window_process_updates(wi->window, FALSE); #endif } void ScintillaGTK::SetVerticalScrollPos() { DwellEnd(true); gtk_adjustment_set_value(GTK_ADJUSTMENT(adjustmentv), topLine); } void ScintillaGTK::SetHorizontalScrollPos() { DwellEnd(true); gtk_adjustment_set_value(GTK_ADJUSTMENT(adjustmenth), xOffset / 2); } bool ScintillaGTK::ModifyScrollBars(int nMax, int nPage) { bool modified = false; int pageScroll = LinesToScroll(); if (GTK_ADJUSTMENT(adjustmentv)->upper != (nMax + 1) || GTK_ADJUSTMENT(adjustmentv)->page_size != nPage || GTK_ADJUSTMENT(adjustmentv)->page_increment != pageScroll) { GTK_ADJUSTMENT(adjustmentv)->upper = nMax + 1; GTK_ADJUSTMENT(adjustmentv)->page_size = nPage; GTK_ADJUSTMENT(adjustmentv)->page_increment = pageScroll; gtk_adjustment_changed(GTK_ADJUSTMENT(adjustmentv)); modified = true; } PRectangle rcText = GetTextRectangle(); int horizEndPreferred = scrollWidth; if (horizEndPreferred < 0) horizEndPreferred = 0; unsigned int pageWidth = rcText.Width(); if (GTK_ADJUSTMENT(adjustmenth)->upper != horizEndPreferred || GTK_ADJUSTMENT(adjustmenth)->page_size != pageWidth) { GTK_ADJUSTMENT(adjustmenth)->upper = horizEndPreferred; GTK_ADJUSTMENT(adjustmenth)->page_size = pageWidth; gtk_adjustment_changed(GTK_ADJUSTMENT(adjustmenth)); modified = true; } return modified; } void ScintillaGTK::ReconfigureScrollBars() { PRectangle rc = wMain.GetClientPosition(); Resize(rc.Width(), rc.Height()); } void ScintillaGTK::NotifyChange() { gtk_signal_emit(GTK_OBJECT(sci), scintilla_signals[COMMAND_SIGNAL], Platform::LongFromTwoShorts(GetCtrlID(), SCEN_CHANGE), PWidget(wMain)); } void ScintillaGTK::NotifyFocus(bool focus) { gtk_signal_emit(GTK_OBJECT(sci), scintilla_signals[COMMAND_SIGNAL], Platform::LongFromTwoShorts(GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS), PWidget(wMain)); } void ScintillaGTK::NotifyParent(SCNotification scn) { scn.nmhdr.hwndFrom = PWidget(wMain); scn.nmhdr.idFrom = GetCtrlID(); gtk_signal_emit(GTK_OBJECT(sci), scintilla_signals[NOTIFY_SIGNAL], GetCtrlID(), &scn); } void ScintillaGTK::NotifyKey(int key, int modifiers) { SCNotification scn = {0}; scn.nmhdr.code = SCN_KEY; scn.ch = key; scn.modifiers = modifiers; NotifyParent(scn); } void ScintillaGTK::NotifyURIDropped(const char *list) { SCNotification scn = {0}; scn.nmhdr.code = SCN_URIDROPPED; scn.text = list; NotifyParent(scn); } bool ScintillaGTK::UseInputMethod() const { switch (vs.styles[STYLE_DEFAULT].characterSet) { case SC_CHARSET_CHINESEBIG5: case SC_CHARSET_GB2312: case SC_CHARSET_HANGUL: case SC_CHARSET_SHIFTJIS: case SC_CHARSET_JOHAB: case SC_CHARSET_HEBREW: case SC_CHARSET_ARABIC: case SC_CHARSET_VIETNAMESE: case SC_CHARSET_THAI: return true; default: return false; } } const char *CharacterSetID(int characterSet); const char *ScintillaGTK::CharacterSetID() const { return ::CharacterSetID(vs.styles[STYLE_DEFAULT].characterSet); } #if GTK_MAJOR_VERSION >= 2 #define IS_ACC(x) \ ((x) >= 65103 && (x) <= 65111) #define IS_CHAR(x) \ ((x) >= 0 && (x) <= 128) #define IS_ACC_OR_CHAR(x) \ (IS_CHAR(x)) || (IS_ACC(x)) #define IS_ACC(x) \ ((x) >= 65103 && (x) <= 65111) #define IS_CHAR(x) \ ((x) >= 0 && (x) <= 128) #define IS_ACC_OR_CHAR(x) \ (IS_CHAR(x)) || (IS_ACC(x)) static int MakeAccent(int key, int acc) { const char *conv[] = { "aeiounc AEIOUNC", "ãeiõuñc~ÃEIÕUÑC", "áéíóúnç'ÁÉÍÓÚNÇ", "àèìòùnc`ÀÈÌÒÙNC", "âêîôûnc^ÂÊÎÔÛNC", "äëïöünc¨ÄËÏÖÜNC" }; int idx; for (idx = 0; idx < 15; ++idx) { if (char(key) == conv[0][idx]) { break; } } if (idx == 15) { return key; } if (acc == GDK_dead_tilde) { // ~ return int((unsigned char)(conv[1][idx])); } else if (acc == GDK_dead_acute) { // ' return int((unsigned char)(conv[2][idx])); } else if (acc == GDK_dead_grave) { // ` return int((unsigned char)(conv[3][idx])); } else if (acc == GDK_dead_circumflex) { // ^ return int((unsigned char)(conv[4][idx])); } else if (acc == GDK_dead_diaeresis) { // " return int((unsigned char)(conv[5][idx])); } return key; } #endif int ScintillaGTK::KeyDefault(int key, int modifiers) { if (!(modifiers & SCI_CTRL) && !(modifiers & SCI_ALT)) { #if GTK_MAJOR_VERSION >= 2 if (!UseInputMethod()) { char utfVal[4]="\0\0\0"; wchar_t wcs[2]; if (IS_CHAR(key) && IS_ACC(lastKey)) { lastKey = key = MakeAccent(key, lastKey); } if (IS_ACC_OR_CHAR(key)) { lastKey = key; } wcs[0] = gdk_keyval_to_unicode(key); wcs[1] = 0; UTF8FromUCS2(wcs, 1, utfVal, 3); if (key <= 0xFE00) { if (IsUnicodeMode()) { AddCharUTF(utfVal,strlen(utfVal)); return 1; } else { const char *source = CharacterSetID(); if (*source) { Converter conv(source, "UTF-8"); if (conv) { char localeVal[4]="\0\0\0"; char *pin = utfVal; size_t inLeft = strlen(utfVal); char *pout = localeVal; size_t outLeft = sizeof(localeVal); size_t conversions = conv.Convert(&pin, &inLeft, &pout, &outLeft); if (conversions != ((size_t)(-1))) { *pout = '\0'; for (int i=0; localeVal[i]; i++) { AddChar(localeVal[i]); } return 1; } } } } } } #endif if (key < 256) { AddChar(key); return 1; } else { // Pass up to container in case it is an accelerator NotifyKey(key, modifiers); return 0; } } else { // Pass up to container in case it is an accelerator NotifyKey(key, modifiers); return 0; } //Platform::DebugPrintf("SK-key: %d %x %x\n",key, modifiers); } void ScintillaGTK::CopyToClipboard(const SelectionText &selectedText) { #ifndef USE_GTK_CLIPBOARD copyText.Copy(selectedText); gtk_selection_owner_set(GTK_WIDGET(PWidget(wMain)), atomClipboard, GDK_CURRENT_TIME); #else GtkClipboard *clipBoard; clipBoard = gtk_widget_get_clipboard(GTK_WIDGET(PWidget(wMain)), atomClipboard); if (clipBoard == NULL) // Occurs if widget isn't in a toplevel return; SelectionText *clipText = new SelectionText(); clipText->Copy(selectedText); gtk_clipboard_set_with_data(clipBoard, clipboardTargets, nClipboardTargets, ClipboardGetSelection, ClipboardClearSelection, clipText); #endif } void ScintillaGTK::Copy() { if (currentPos != anchor) { #ifndef USE_GTK_CLIPBOARD CopySelectionRange(©Text); gtk_selection_owner_set(GTK_WIDGET(PWidget(wMain)), atomClipboard, GDK_CURRENT_TIME); #else GtkClipboard *clipBoard; clipBoard = gtk_widget_get_clipboard(GTK_WIDGET(PWidget(wMain)), atomClipboard); if (clipBoard == NULL) // Occurs if widget isn't in a toplevel return; SelectionText *clipText = new SelectionText(); CopySelectionRange(clipText); gtk_clipboard_set_with_data(clipBoard, clipboardTargets, nClipboardTargets, ClipboardGetSelection, ClipboardClearSelection, clipText); #endif #if PLAT_GTK_WIN32 if (selType == selRectangle) { ::OpenClipboard(NULL); ::SetClipboardData(cfColumnSelect, 0); ::CloseClipboard(); } #endif } } void ScintillaGTK::Paste() { atomSought = atomUTF8; gtk_selection_convert(GTK_WIDGET(PWidget(wMain)), atomClipboard, atomSought, GDK_CURRENT_TIME); } void ScintillaGTK::CreateCallTipWindow(PRectangle rc) { if (!ct.wCallTip.Created()) { ct.wCallTip = gtk_window_new(GTK_WINDOW_POPUP); ct.wDraw = gtk_drawing_area_new(); gtk_container_add(GTK_CONTAINER(PWidget(ct.wCallTip)), PWidget(ct.wDraw)); gtk_signal_connect(GTK_OBJECT(PWidget(ct.wDraw)), "expose_event", GtkSignalFunc(ScintillaGTK::ExposeCT), &ct); gtk_signal_connect(GTK_OBJECT(PWidget(ct.wDraw)), "button_press_event", GtkSignalFunc(ScintillaGTK::PressCT), static_cast(this)); gtk_widget_set_events(PWidget(ct.wDraw), GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK); } gtk_drawing_area_size(GTK_DRAWING_AREA(PWidget(ct.wDraw)), rc.Width(), rc.Height()); ct.wDraw.Show(); //ct.wCallTip.Show(); //gtk_widget_set_usize(PWidget(ct.wCallTip), rc.Width(), rc.Height()); gdk_window_resize(PWidget(ct.wCallTip)->window, rc.Width(), rc.Height()); } void ScintillaGTK::AddToPopUp(const char *label, int cmd, bool enabled) { char fulllabel[200]; strcpy(fulllabel, "/"); strcat(fulllabel, label); GtkItemFactoryCallback menuSig = GtkItemFactoryCallback(PopUpCB); GtkItemFactoryEntry itemEntry = { fulllabel, NULL, menuSig, cmd, const_cast(label[0] ? "" : ""), #if GTK_MAJOR_VERSION >= 2 NULL #endif }; gtk_item_factory_create_item(GTK_ITEM_FACTORY(popup.GetID()), &itemEntry, this, 1); if (cmd) { GtkWidget *item = gtk_item_factory_get_widget_by_action( reinterpret_cast(popup.GetID()), cmd); if (item) gtk_widget_set_sensitive(item, enabled); } } bool ScintillaGTK::OwnPrimarySelection() { return ((gdk_selection_owner_get(GDK_SELECTION_PRIMARY) == GTK_WIDGET(PWidget(wMain))->window) && (GTK_WIDGET(PWidget(wMain))->window != NULL)); } void ScintillaGTK::ClaimSelection() { // X Windows has a 'primary selection' as well as the clipboard. // Whenever the user selects some text, we become the primary selection if (currentPos != anchor) { primarySelection = true; gtk_selection_owner_set(GTK_WIDGET(PWidget(wMain)), GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME); primary.Free(); } else if (OwnPrimarySelection()) { primarySelection = true; if (primary.s == NULL) gtk_selection_owner_set(NULL, GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME); } else { primarySelection = false; primary.Free(); } } // Detect rectangular text, convert line ends to current mode, convert from or to UTF-8 void ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, SelectionText &selText) { char *data = reinterpret_cast(selectionData->data); int len = selectionData->length; GdkAtom selectionType = selectionData->type; // Return empty string if selection is not a string if ((selectionType != GDK_TARGET_STRING) && (selectionType != atomUTF8)) { char *empty = new char[1]; empty[0] = '\0'; selText.Set(empty, 0, SC_CP_UTF8, 0, false); return; } // Check for "\n\0" ending to string indicating that selection is rectangular bool isRectangular; #if PLAT_GTK_WIN32 isRectangular = ::IsClipboardFormatAvailable(cfColumnSelect) != 0; #else isRectangular = ((len > 2) && (data[len - 1] == 0 && data[len - 2] == '\n')); #endif char *dest; if (selectionType == GDK_TARGET_STRING) { dest = Document::TransformLineEnds(&len, data, len, pdoc->eolMode); if (IsUnicodeMode()) { // Unknown encoding so assume in Latin1 char *destPrevious = dest; dest = UTF8FromLatin1(dest, len); selText.Set(dest, len, SC_CP_UTF8, 0, selText.rectangular); delete []destPrevious; } else { // Assume buffer is in same encoding as selection selText.Set(dest, len, pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, isRectangular); } } else { // UTF-8 dest = Document::TransformLineEnds(&len, data, len, pdoc->eolMode); selText.Set(dest, len, SC_CP_UTF8, 0, isRectangular); #ifdef USE_CONVERTER const char *charSetBuffer = CharacterSetID(); if (!IsUnicodeMode() && *charSetBuffer) { //fprintf(stderr, "Convert to locale %s\n", CharacterSetID()); // Convert to locale dest = ConvertText(&len, selText.s, selText.len, charSetBuffer, "UTF-8"); selText.Set(dest, len, pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, selText.rectangular); } #endif } } void ScintillaGTK::ReceivedSelection(GtkSelectionData *selection_data) { if ((selection_data->selection == atomClipboard) || (selection_data->selection == GDK_SELECTION_PRIMARY)) { if ((atomSought == atomUTF8) && (selection_data->length <= 0)) { atomSought = atomString; gtk_selection_convert(GTK_WIDGET(PWidget(wMain)), selection_data->selection, atomSought, GDK_CURRENT_TIME); } else if ((selection_data->length > 0) && ((selection_data->type == GDK_TARGET_STRING) || (selection_data->type == atomUTF8))) { SelectionText selText; GetGtkSelectionText(selection_data, selText); pdoc->BeginUndoAction(); if (selection_data->selection != GDK_SELECTION_PRIMARY) { ClearSelection(); } int selStart = SelectionStart(); if (selText.rectangular) { PasteRectangular(selStart, selText.s, selText.len); } else { pdoc->InsertString(currentPos, selText.s, selText.len); SetEmptySelection(currentPos + selText.len); } pdoc->EndUndoAction(); } } // else fprintf(stderr, "Target non string %d %d\n", (int)(selection_data->type), // (int)(atomUTF8)); Redraw(); } void ScintillaGTK::ReceivedDrop(GtkSelectionData *selection_data) { dragWasDropped = true; if ((selection_data->type == GDK_TARGET_STRING) || (selection_data->type == atomUTF8)) { if (selection_data->length > 0) { SelectionText selText; GetGtkSelectionText(selection_data, selText); DropAt(posDrop, selText.s, false, selText.rectangular); } } else { char *ptr = reinterpret_cast(selection_data->data); NotifyURIDropped(ptr); } Redraw(); } void ScintillaGTK::GetSelection(GtkSelectionData *selection_data, guint info, SelectionText *text) { #if GTK_MAJOR_VERSION >= 2 // Convert text to utf8 if it isn't already SelectionText *converted = 0; if ((text->codePage != SC_CP_UTF8) && (info == TARGET_UTF8_STRING)) { const char *charSet = ::CharacterSetID(text->characterSet); if (*charSet) { int new_len; char* tmputf = ConvertText(&new_len, text->s, text->len, "UTF-8", charSet); converted = new SelectionText(); converted->Set(tmputf, new_len, SC_CP_UTF8, 0, text->rectangular); text = converted; } } // Here is a somewhat evil kludge. // As I can not work out how to store data on the clipboard in multiple formats // and need some way to mark the clipping as being stream or rectangular, // the terminating \0 is included in the length for rectangular clippings. // All other tested aplications behave benignly by ignoring the \0. // The #if is here because on Windows cfColumnSelect clip entry is used // instead as standard indicator of rectangularness (so no need to kludge) int len = strlen(text->s); #if PLAT_GTK_WIN32 == 0 if (text->rectangular) len++; #endif if (info == TARGET_UTF8_STRING) { gtk_selection_data_set_text(selection_data, text->s, len); } else { gtk_selection_data_set(selection_data, static_cast(GDK_SELECTION_TYPE_STRING), 8, reinterpret_cast(text->s), len); } delete converted; #else /* Gtk 1 */ char *selBuffer = text->s; #if PLAT_GTK_WIN32 // Many native win32 programs require \n line endings, // so make a copy of the clip text now with newlines converted int new_len; char *tmpstr = Document::TransformLineEnds(&new_len, selBuffer, text->len, SC_EOL_LF); selBuffer = tmpstr; #endif char *tmputf = 0; if ((info == TARGET_UTF8_STRING) || (info == TARGET_STRING)) { int len = strlen(selBuffer); #ifdef USE_CONVERTER // Possible character set conversion const char *charSetBuffer = ::CharacterSetID(text->characterSet); if (info == TARGET_UTF8_STRING) { //fprintf(stderr, "Copy to clipboard as UTF-8\n"); if (text->codePage != SC_CP_UTF8) { // Convert to UTF-8 //fprintf(stderr, "Convert to UTF-8 from %s\n", charSetBuffer); tmputf = ConvertText(&len, selBuffer, len, "UTF-8", charSetBuffer); selBuffer = tmputf; } } else if (info == TARGET_STRING) { if (text->codePage == SC_CP_UTF8) { //fprintf(stderr, "Convert to locale %s\n", charSetBuffer); // Convert to locale tmputf = ConvertText(&len, selBuffer, len, charSetBuffer, "UTF-8"); selBuffer = tmputf; } } #endif // Here is a somewhat evil kludge. // As I can not work out how to store data on the clipboard in multiple formats // and need some way to mark the clipping as being stream or rectangular, // the terminating \0 is included in the length for rectangular clippings. // All other tested aplications behave benignly by ignoring the \0. // The #if is here because on Windows cfColumnSelect clip entry is used // instead as standard indicator of rectangularness (so no need to kludge) #if PLAT_GTK_WIN32 == 0 if (text->rectangular) len++; #endif gtk_selection_data_set(selection_data, (info == TARGET_STRING) ? static_cast(GDK_SELECTION_TYPE_STRING) : atomUTF8, 8, reinterpret_cast(selBuffer), len); } else if ((info == TARGET_TEXT) || (info == TARGET_COMPOUND_TEXT)) { guchar *text; GdkAtom encoding; gint format; gint new_length; gdk_string_to_compound_text(reinterpret_cast(selBuffer), &encoding, &format, &text, &new_length); gtk_selection_data_set(selection_data, encoding, format, text, new_length); gdk_free_compound_text(text); } delete []tmputf; #if PLAT_GTK_WIN32 delete []tmpstr; #endif #endif /* Gtk >= 2 */ } #ifdef USE_GTK_CLIPBOARD void ScintillaGTK::ClipboardGetSelection(GtkClipboard *, GtkSelectionData *selection_data, guint info, void *data) { GetSelection(selection_data, info, static_cast(data)); } void ScintillaGTK::ClipboardClearSelection(GtkClipboard *, void *data) { SelectionText *obj = static_cast(data); delete obj; } #endif void ScintillaGTK::UnclaimSelection(GdkEventSelection *selection_event) { //Platform::DebugPrintf("UnclaimSelection\n"); if (selection_event->selection == GDK_SELECTION_PRIMARY) { //Platform::DebugPrintf("UnclaimPrimarySelection\n"); if (!OwnPrimarySelection()) { primary.Free(); primarySelection = false; FullPaint(); } } } void ScintillaGTK::Resize(int width, int height) { //Platform::DebugPrintf("Resize %d %d\n", width, height); //printf("Resize %d %d\n", width, height); // Not always needed, but some themes can have different sizes of scrollbars scrollBarWidth = GTK_WIDGET(PWidget(scrollbarv))->requisition.width; scrollBarHeight = GTK_WIDGET(PWidget(scrollbarh))->requisition.height; // These allocations should never produce negative sizes as they would wrap around to huge // unsigned numbers inside GTK+ causing warnings. bool showSBHorizontal = horizontalScrollBarVisible && (wrapState == eWrapNone); int horizontalScrollBarHeight = scrollBarHeight; if (!showSBHorizontal) horizontalScrollBarHeight = 0; int verticalScrollBarHeight = scrollBarWidth; if (!verticalScrollBarVisible) verticalScrollBarHeight = 0; GtkAllocation alloc; alloc.x = 0; if (showSBHorizontal) { alloc.y = height - scrollBarHeight; alloc.width = Platform::Maximum(1, width - scrollBarWidth) + 1; alloc.height = horizontalScrollBarHeight; } else { alloc.y = -scrollBarHeight; alloc.width = 0; alloc.height = 0; } gtk_widget_size_allocate(GTK_WIDGET(PWidget(scrollbarh)), &alloc); alloc.y = 0; if (verticalScrollBarVisible) { alloc.x = width - scrollBarWidth; alloc.width = scrollBarWidth; alloc.height = Platform::Maximum(1, height - scrollBarHeight) + 1; if (!showSBHorizontal) alloc.height += scrollBarWidth-1; } else { alloc.x = -scrollBarWidth; alloc.width = 0; alloc.height = 0; } gtk_widget_size_allocate(GTK_WIDGET(PWidget(scrollbarv)), &alloc); if (GTK_WIDGET_MAPPED(PWidget(wMain))) { ChangeSize(); } alloc.x = 0; alloc.y = 0; alloc.width = Platform::Maximum(1, width - scrollBarWidth); alloc.height = Platform::Maximum(1, height - scrollBarHeight); if (!showSBHorizontal) alloc.height += scrollBarWidth; gtk_widget_size_allocate(GTK_WIDGET(PWidget(wText)), &alloc); } static void SetAdjustmentValue(GtkObject *object, int value) { GtkAdjustment *adjustment = GTK_ADJUSTMENT(object); int maxValue = static_cast( adjustment->upper - adjustment->page_size); if (value > maxValue) value = maxValue; if (value < 0) value = 0; gtk_adjustment_set_value(adjustment, value); } gint ScintillaGTK::PressThis(GdkEventButton *event) { //Platform::DebugPrintf("Press %x time=%d state = %x button = %x\n",this,event->time, event->state, event->button); // Do not use GTK+ double click events as Scintilla has its own double click detection if (event->type != GDK_BUTTON_PRESS) return FALSE; evbtn = *event; Point pt; pt.x = int(event->x); pt.y = int(event->y); PRectangle rcClient = GetClientRectangle(); //Platform::DebugPrintf("Press %0d,%0d in %0d,%0d %0d,%0d\n", // pt.x, pt.y, rcClient.left, rcClient.top, rcClient.right, rcClient.bottom); if ((pt.x > rcClient.right) || (pt.y > rcClient.bottom)) { Platform::DebugPrintf("Bad location\n"); return FALSE; } bool ctrl = (event->state & GDK_CONTROL_MASK) != 0; gtk_widget_grab_focus(PWidget(wMain)); if (event->button == 1) { // On X, instead of sending literal modifiers use control instead of alt // This is because most X window managers grab alt + click for moving #if !PLAT_GTK_WIN32 ButtonDown(pt, event->time, (event->state & GDK_SHIFT_MASK) != 0, (event->state & GDK_CONTROL_MASK) != 0, (event->state & GDK_CONTROL_MASK) != 0); #else ButtonDown(pt, event->time, (event->state & GDK_SHIFT_MASK) != 0, (event->state & GDK_CONTROL_MASK) != 0, (event->state & GDK_MOD1_MASK) != 0); #endif } else if (event->button == 2) { // Grab the primary selection if it exists Position pos = PositionFromLocation(pt); if (OwnPrimarySelection() && primary.s == NULL) CopySelectionRange(&primary); SetSelection(pos, pos); atomSought = atomUTF8; gtk_selection_convert(GTK_WIDGET(PWidget(wMain)), GDK_SELECTION_PRIMARY, atomSought, event->time); } else if (event->button == 3) { if (displayPopupMenu) { // PopUp menu // Convert to screen int ox = 0; int oy = 0; gdk_window_get_origin(PWidget(wMain)->window, &ox, &oy); ContextMenu(Point(pt.x + ox, pt.y + oy)); } else { return FALSE; } } else if (event->button == 4) { // Wheel scrolling up (only xwin gtk does it this way) if (ctrl) SetAdjustmentValue(adjustmenth, (xOffset / 2) - 6); else SetAdjustmentValue(adjustmentv, topLine - 3); } else if (event->button == 5) { // Wheel scrolling down (only xwin gtk does it this way) if (ctrl) SetAdjustmentValue(adjustmenth, (xOffset / 2) + 6); else SetAdjustmentValue(adjustmentv, topLine + 3); } #if GTK_MAJOR_VERSION >= 2 return TRUE; #else return FALSE; #endif } gint ScintillaGTK::Press(GtkWidget *widget, GdkEventButton *event) { if (event->window != widget->window) return FALSE; ScintillaGTK *sciThis = ScintillaFromWidget(widget); return sciThis->PressThis(event); } gint ScintillaGTK::MouseRelease(GtkWidget *widget, GdkEventButton *event) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); //Platform::DebugPrintf("Release %x %d %d\n",sciThis,event->time,event->state); if (!sciThis->HaveMouseCapture()) return FALSE; if (event->button == 1) { Point pt; pt.x = int(event->x); pt.y = int(event->y); //Platform::DebugPrintf("Up %x %x %d %d %d\n", // sciThis,event->window,event->time, pt.x, pt.y); if (event->window != PWidget(sciThis->wMain)->window) // If mouse released on scroll bar then the position is relative to the // scrollbar, not the drawing window so just repeat the most recent point. pt = sciThis->ptMouseLast; sciThis->ButtonUp(pt, event->time, (event->state & 4) != 0); } return FALSE; } // win32gtk has a special wheel mouse event for whatever reason and doesn't // use the button4/5 trick used under X windows. #if PLAT_GTK_WIN32 || (GTK_MAJOR_VERSION >= 2) gint ScintillaGTK::ScrollEvent(GtkWidget *widget, GdkEventScroll *event) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); if (widget == NULL || event == NULL) return FALSE; // Compute amount and direction to scroll (even tho on win32 there is // intensity of scrolling info in the native message, gtk doesn't // support this so we simulate similarly adaptive scrolling) int cLineScroll; int timeDelta = 1000000; GTimeVal curTime; g_get_current_time(&curTime); if (curTime.tv_sec == sciThis->lastWheelMouseTime.tv_sec) timeDelta = curTime.tv_usec - sciThis->lastWheelMouseTime.tv_usec; else if (curTime.tv_sec == sciThis->lastWheelMouseTime.tv_sec + 1) timeDelta = 1000000 + (curTime.tv_usec - sciThis->lastWheelMouseTime.tv_usec); if ((event->direction == sciThis->lastWheelMouseDirection) && (timeDelta < 250000)) { if (sciThis->wheelMouseIntensity < 12) sciThis->wheelMouseIntensity++; cLineScroll = sciThis->wheelMouseIntensity; } else { cLineScroll = sciThis->linesPerScroll; if (cLineScroll == 0) cLineScroll = 4; sciThis->wheelMouseIntensity = cLineScroll; } if (event->direction == GDK_SCROLL_UP) { cLineScroll *= -1; } g_get_current_time(&sciThis->lastWheelMouseTime); sciThis->lastWheelMouseDirection = event->direction; // Note: Unpatched versions of win32gtk don't set the 'state' value so // only regular scrolling is supported there. Also, unpatched win32gtk // issues spurious button 2 mouse events during wheeling, which can cause // problems (a patch for both was submitted by archaeopteryx.com on 13Jun2001) // Data zoom not supported if (event->state & GDK_SHIFT_MASK) { return FALSE; } // Text font size zoom if (event->state & GDK_CONTROL_MASK) { if (cLineScroll < 0) { sciThis->KeyCommand(SCI_ZOOMIN); return TRUE; } else { sciThis->KeyCommand(SCI_ZOOMOUT); return TRUE; } // Regular scrolling } else { sciThis->ScrollTo(sciThis->topLine + cLineScroll); return TRUE; } } #endif gint ScintillaGTK::Motion(GtkWidget *widget, GdkEventMotion *event) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); //Platform::DebugPrintf("Motion %x %d\n",sciThis,event->time); if (event->window != widget->window) return FALSE; int x = 0; int y = 0; GdkModifierType state; if (event->is_hint) { gdk_window_get_pointer(event->window, &x, &y, &state); } else { x = static_cast(event->x); y = static_cast(event->y); state = static_cast(event->state); } //Platform::DebugPrintf("Move %x %x %d %c %d %d\n", // sciThis,event->window,event->time,event->is_hint? 'h' :'.', x, y); Point pt(x, y); sciThis->ButtonMove(pt); return FALSE; } // Map the keypad keys to their equivalent functions static int KeyTranslate(int keyIn) { switch (keyIn) { case GDK_ISO_Left_Tab: return SCK_TAB; case GDK_KP_Down: return SCK_DOWN; case GDK_KP_Up: return SCK_UP; case GDK_KP_Left: return SCK_LEFT; case GDK_KP_Right: return SCK_RIGHT; case GDK_KP_Home: return SCK_HOME; case GDK_KP_End: return SCK_END; case GDK_KP_Page_Up: return SCK_PRIOR; case GDK_KP_Page_Down: return SCK_NEXT; case GDK_KP_Delete: return SCK_DELETE; case GDK_KP_Insert: return SCK_INSERT; case GDK_KP_Enter: return SCK_RETURN; case GDK_Down: return SCK_DOWN; case GDK_Up: return SCK_UP; case GDK_Left: return SCK_LEFT; case GDK_Right: return SCK_RIGHT; case GDK_Home: return SCK_HOME; case GDK_End: return SCK_END; case GDK_Page_Up: return SCK_PRIOR; case GDK_Page_Down: return SCK_NEXT; case GDK_Delete: return SCK_DELETE; case GDK_Insert: return SCK_INSERT; case GDK_Escape: return SCK_ESCAPE; case GDK_BackSpace: return SCK_BACK; case GDK_Tab: return SCK_TAB; case GDK_Return: return SCK_RETURN; case GDK_KP_Add: return SCK_ADD; case GDK_KP_Subtract: return SCK_SUBTRACT; case GDK_KP_Divide: return SCK_DIVIDE; default: return keyIn; } } gint ScintillaGTK::KeyThis(GdkEventKey *event) { //Platform::DebugPrintf("SC-key: %d %x [%s]\n", // event->keyval, event->state, (event->length > 0) ? event->string : "empty"); #if GTK_MAJOR_VERSION >= 2 if (UseInputMethod()) { if (gtk_im_context_filter_keypress(im_context, event)) { return 1; } } #endif if (!event->keyval) { return true; } bool shift = (event->state & GDK_SHIFT_MASK) != 0; bool ctrl = (event->state & GDK_CONTROL_MASK) != 0; bool alt = (event->state & GDK_MOD1_MASK) != 0; int key = event->keyval; if (ctrl && (key < 128)) key = toupper(key); else if (!ctrl && (key >= GDK_KP_Multiply && key <= GDK_KP_9)) key &= 0x7F; // Hack for keys over 256 and below command keys but makes Hungarian work. // This will have to change for Unicode else if (key >= 0xFE00) key = KeyTranslate(key); else if (IsUnicodeMode()) ; // No operation #if GTK_MAJOR_VERSION < 2 else if ((key >= 0x100) && (key < 0x1000)) key &= 0xff; #endif bool consumed = false; bool added = KeyDown(key, shift, ctrl, alt, &consumed) != 0; if (!consumed) consumed = added; //Platform::DebugPrintf("SK-key: %d %x %x\n",event->keyval, event->state, consumed); if (event->keyval == 0xffffff && event->length > 0) { ClearSelection(); if (pdoc->InsertString(CurrentPosition(), event->string)) { MovePositionTo(CurrentPosition() + event->length); } } return consumed; } gint ScintillaGTK::KeyPress(GtkWidget *widget, GdkEventKey *event) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); return sciThis->KeyThis(event); } gint ScintillaGTK::KeyRelease(GtkWidget *, GdkEventKey * /*event*/) { //Platform::DebugPrintf("SC-keyrel: %d %x %3s\n",event->keyval, event->state, event->string); return FALSE; } #if GTK_MAJOR_VERSION >= 2 gint ScintillaGTK::ExposePreedit(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis) { return sciThis->ExposePreeditThis(widget, ose); } gint ScintillaGTK::ExposePreeditThis(GtkWidget *widget, GdkEventExpose *ose) { gchar *str; gint cursor_pos; PangoAttrList *attrs; gtk_im_context_get_preedit_string(im_context, &str, &attrs, &cursor_pos); PangoLayout *layout = gtk_widget_create_pango_layout(PWidget(wText), str); pango_layout_set_attributes(layout, attrs); GdkGC *gc = gdk_gc_new(widget->window); GdkColor color[2] = { {0, 0x0000, 0x0000, 0x0000}, {0, 0xffff, 0xffff, 0xffff}}; gdk_color_alloc(gdk_colormap_get_system(), color); gdk_color_alloc(gdk_colormap_get_system(), color + 1); gdk_gc_set_foreground(gc, color + 1); gdk_draw_rectangle(widget->window, gc, TRUE, ose->area.x, ose->area.y, ose->area.width, ose->area.height); gdk_gc_set_foreground(gc, color); gdk_gc_set_background(gc, color + 1); gdk_draw_layout(widget->window, gc, 0, 0, layout); gdk_gc_unref(gc); g_free(str); pango_attr_list_unref(attrs); g_object_unref(layout); return TRUE; } void ScintillaGTK::Commit(GtkIMContext *, char *str, ScintillaGTK *sciThis) { sciThis->CommitThis(str); } void ScintillaGTK::CommitThis(char *str) { AddCharUTF(str, strlen(str)); } void ScintillaGTK::PreeditChanged(GtkIMContext *, ScintillaGTK *sciThis) { sciThis->PreeditChangedThis(); } void ScintillaGTK::PreeditChangedThis() { gchar *str; PangoAttrList *attrs; gint cursor_pos; gtk_im_context_get_preedit_string(im_context, &str, &attrs, &cursor_pos); if (strlen(str) > 0){ PangoLayout *layout = gtk_widget_create_pango_layout(PWidget(wText), str); pango_layout_set_attributes(layout, attrs); gint w, h; pango_layout_get_pixel_size(layout, &w, &h); g_object_unref(layout); gint x, y; gdk_window_get_origin((PWidget(wText))->window, &x, &y); Point pt = LocationFromPosition(currentPos); if (pt.x < 0) pt.x = 0; if (pt.y < 0) pt.y = 0; gtk_window_move(GTK_WINDOW(PWidget(wPreedit)), x+pt.x, y+pt.y); gtk_window_resize(GTK_WINDOW(PWidget(wPreedit)), w, h); gtk_widget_show(PWidget(wPreedit)); gtk_widget_queue_draw_area(PWidget(wPreeditDraw), 0, 0, w, h); } else { gtk_widget_hide(PWidget(wPreedit)); } g_free(str); pango_attr_list_unref(attrs); } #endif gint ScintillaGTK::StyleSetText(GtkWidget *widget, GtkStyle *, void*) { if (widget->window != NULL) gdk_window_set_back_pixmap(widget->window, NULL, FALSE); return FALSE; } gint ScintillaGTK::RealizeText(GtkWidget *widget, void*) { if (widget->window != NULL) gdk_window_set_back_pixmap(widget->window, NULL, FALSE); return FALSE; } void ScintillaGTK::Destroy(GtkObject* object) { ScintillaObject *scio = reinterpret_cast(object); // This avoids a double destruction if (!scio->pscin) return; ScintillaGTK *sciThis = reinterpret_cast(scio->pscin); //Platform::DebugPrintf("Destroying %x %x\n", sciThis, object); sciThis->Finalise(); if (GTK_OBJECT_CLASS(parent_class)->destroy) (* GTK_OBJECT_CLASS(parent_class)->destroy)(object); delete sciThis; scio->pscin = 0; } static void DrawChild(GtkWidget *widget, GdkRectangle *area) { GdkRectangle areaIntersect; if (widget && GTK_WIDGET_DRAWABLE(widget) && gtk_widget_intersect(widget, area, &areaIntersect)) { gtk_widget_draw(widget, &areaIntersect); } } void ScintillaGTK::Draw(GtkWidget *widget, GdkRectangle *area) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); //Platform::DebugPrintf("Draw %p %0d,%0d %0d,%0d\n", widget, area->x, area->y, area->width, area->height); PRectangle rcPaint(area->x, area->y, area->x + area->width, area->y + area->height); sciThis->SyncPaint(rcPaint); if (GTK_WIDGET_DRAWABLE(PWidget(sciThis->wMain))) { DrawChild(PWidget(sciThis->scrollbarh), area); DrawChild(PWidget(sciThis->scrollbarv), area); } #ifdef INTERNATIONAL_INPUT Point pt = sciThis->LocationFromPosition(sciThis->currentPos); pt.y += sciThis->vs.lineHeight - 2; if (pt.x < 0) pt.x = 0; if (pt.y < 0) pt.y = 0; CursorMoved(widget, pt.x, pt.y, sciThis); #endif } gint ScintillaGTK::ExposeTextThis(GtkWidget * /*widget*/, GdkEventExpose *ose) { paintState = painting; rcPaint.left = ose->area.x; rcPaint.top = ose->area.y; rcPaint.right = ose->area.x + ose->area.width; rcPaint.bottom = ose->area.y + ose->area.height; PRectangle rcClient = GetClientRectangle(); paintingAllText = rcPaint.Contains(rcClient); Surface *surfaceWindow = Surface::Allocate(); if (surfaceWindow) { surfaceWindow->Init(PWidget(wText)->window, PWidget(wText)); Paint(surfaceWindow, rcPaint); surfaceWindow->Release(); delete surfaceWindow; } if (paintState == paintAbandoned) { // Painting area was insufficient to cover new styling or brace highlight positions FullPaint(); } paintState = notPainting; return FALSE; } gint ScintillaGTK::ExposeText(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis) { return sciThis->ExposeTextThis(widget, ose); } gint ScintillaGTK::ExposeMain(GtkWidget *widget, GdkEventExpose *ose) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); //Platform::DebugPrintf("Expose Main %0d,%0d %0d,%0d\n", //ose->area.x, ose->area.y, ose->area.width, ose->area.height); return sciThis->Expose(widget, ose); } gint ScintillaGTK::Expose(GtkWidget *, GdkEventExpose *ose) { //fprintf(stderr, "Expose %0d,%0d %0d,%0d\n", //ose->area.x, ose->area.y, ose->area.width, ose->area.height); #if GTK_MAJOR_VERSION < 2 paintState = painting; rcPaint.left = ose->area.x; rcPaint.top = ose->area.y; rcPaint.right = ose->area.x + ose->area.width; rcPaint.bottom = ose->area.y + ose->area.height; PRectangle rcClient = GetClientRectangle(); paintingAllText = rcPaint.Contains(rcClient); Surface *surfaceWindow = Surface::Allocate(); if (surfaceWindow) { surfaceWindow->Init(PWidget(wMain)->window, PWidget(wMain)); // Fill the corner between the scrollbars if (verticalScrollBarVisible) { if (horizontalScrollBarVisible && (wrapState == eWrapNone)) { PRectangle rcCorner = wMain.GetClientPosition(); rcCorner.left = rcCorner.right - scrollBarWidth + 1; rcCorner.top = rcCorner.bottom - scrollBarHeight + 1; //fprintf(stderr, "Corner %0d,%0d %0d,%0d\n", //rcCorner.left, rcCorner.top, rcCorner.right, rcCorner.bottom); surfaceWindow->FillRectangle(rcCorner, vs.styles[STYLE_LINENUMBER].back.allocated); } } //Paint(surfaceWindow, rcPaint); surfaceWindow->Release(); delete surfaceWindow; } if (paintState == paintAbandoned) { // Painting area was insufficient to cover new styling or brace highlight positions FullPaint(); } paintState = notPainting; #else // For GTK+ 2, the text is painted in ExposeText gtk_container_propagate_expose( GTK_CONTAINER(PWidget(wMain)), PWidget(scrollbarh), ose); gtk_container_propagate_expose( GTK_CONTAINER(PWidget(wMain)), PWidget(scrollbarv), ose); #endif return FALSE; } void ScintillaGTK::ScrollSignal(GtkAdjustment *adj, ScintillaGTK *sciThis) { sciThis->ScrollTo(static_cast(adj->value), false); } void ScintillaGTK::ScrollHSignal(GtkAdjustment *adj, ScintillaGTK *sciThis) { sciThis->HorizontalScrollTo(static_cast(adj->value * 2)); } void ScintillaGTK::SelectionReceived(GtkWidget *widget, GtkSelectionData *selection_data, guint) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); //Platform::DebugPrintf("Selection received\n"); sciThis->ReceivedSelection(selection_data); } void ScintillaGTK::SelectionGet(GtkWidget *widget, GtkSelectionData *selection_data, guint info, guint) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); //Platform::DebugPrintf("Selection get\n"); if (selection_data->selection == GDK_SELECTION_PRIMARY) { if (sciThis->primary.s == NULL) { sciThis->CopySelectionRange(&sciThis->primary); } sciThis->GetSelection(selection_data, info, &sciThis->primary); } #ifndef USE_GTK_CLIPBOARD else { sciThis->GetSelection(selection_data, info, &sciThis->copyText); } #endif } gint ScintillaGTK::SelectionClear(GtkWidget *widget, GdkEventSelection *selection_event) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); //Platform::DebugPrintf("Selection clear\n"); sciThis->UnclaimSelection(selection_event); return gtk_selection_clear(widget, selection_event); } #if GTK_MAJOR_VERSION < 2 gint ScintillaGTK::SelectionNotify(GtkWidget *widget, GdkEventSelection *selection_event) { //Platform::DebugPrintf("Selection notify\n"); return gtk_selection_notify(widget, selection_event); } #endif void ScintillaGTK::DragBegin(GtkWidget *, GdkDragContext *) { //Platform::DebugPrintf("DragBegin\n"); } gboolean ScintillaGTK::DragMotion(GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint dragtime) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); //Platform::DebugPrintf("DragMotion %d %d %x %x %x\n", x, y, // context->actions, context->suggested_action, sciThis); Point npt(x, y); sciThis->inDragDrop = true; sciThis->SetDragPosition(sciThis->PositionFromLocation(npt)); gdk_drag_status(context, context->suggested_action, dragtime); return FALSE; } void ScintillaGTK::DragLeave(GtkWidget *widget, GdkDragContext * /*context*/, guint) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); sciThis->SetDragPosition(invalidPosition); //Platform::DebugPrintf("DragLeave %x\n", sciThis); } void ScintillaGTK::DragEnd(GtkWidget *widget, GdkDragContext * /*context*/) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); // If drag did not result in drop here or elsewhere if (!sciThis->dragWasDropped) sciThis->SetEmptySelection(sciThis->posDrag); sciThis->SetDragPosition(invalidPosition); //Platform::DebugPrintf("DragEnd %x %d\n", sciThis, sciThis->dragWasDropped); } gboolean ScintillaGTK::Drop(GtkWidget *widget, GdkDragContext * /*context*/, gint, gint, guint) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); //Platform::DebugPrintf("Drop %x\n", sciThis); sciThis->SetDragPosition(invalidPosition); return FALSE; } void ScintillaGTK::DragDataReceived(GtkWidget *widget, GdkDragContext * /*context*/, gint, gint, GtkSelectionData *selection_data, guint /*info*/, guint) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); sciThis->ReceivedDrop(selection_data); sciThis->SetDragPosition(invalidPosition); } void ScintillaGTK::DragDataGet(GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); sciThis->dragWasDropped = true; if (sciThis->currentPos != sciThis->anchor) { sciThis->GetSelection(selection_data, info, &sciThis->drag); } if (context->action == GDK_ACTION_MOVE) { int selStart = sciThis->SelectionStart(); int selEnd = sciThis->SelectionEnd(); if (sciThis->posDrop > selStart) { if (sciThis->posDrop > selEnd) sciThis->posDrop = sciThis->posDrop - (selEnd - selStart); else sciThis->posDrop = selStart; sciThis->posDrop = sciThis->pdoc->ClampPositionIntoDocument(sciThis->posDrop); } sciThis->ClearSelection(); } sciThis->SetDragPosition(invalidPosition); } int ScintillaGTK::TimeOut(ScintillaGTK *sciThis) { sciThis->Tick(); return 1; } int ScintillaGTK::IdleCallback(ScintillaGTK *sciThis) { // Idler will be automatically stoped, if there is nothing // to do while idle. bool ret = sciThis->Idle(); if (ret == false) { // FIXME: This will remove the idler from GTK, we don't want to // remove it as it is removed automatically when this function // returns false (although, it should be harmless). sciThis->SetIdle(false); } return ret; } void ScintillaGTK::PopUpCB(ScintillaGTK *sciThis, guint action, GtkWidget *) { if (action) { sciThis->Command(action); } } gint ScintillaGTK::PressCT(GtkWidget *widget, GdkEventButton *event, ScintillaGTK *sciThis) { if (event->window != widget->window) return FALSE; if (event->type != GDK_BUTTON_PRESS) return FALSE; Point pt; pt.x = int(event->x); pt.y = int(event->y); sciThis->ct.MouseClick(pt); sciThis->CallTipClick(); #if GTK_MAJOR_VERSION >= 2 return TRUE; #else return FALSE; #endif } gint ScintillaGTK::ExposeCT(GtkWidget *widget, GdkEventExpose * /*ose*/, CallTip *ctip) { Surface *surfaceWindow = Surface::Allocate(); if (surfaceWindow) { surfaceWindow->Init(widget->window, widget); ctip->PaintCT(surfaceWindow); surfaceWindow->Release(); delete surfaceWindow; } return TRUE; } sptr_t ScintillaGTK::DirectFunction( ScintillaGTK *sciThis, unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return sciThis->WndProc(iMessage, wParam, lParam); } sptr_t scintilla_send_message(ScintillaObject *sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam) { ScintillaGTK *psci = reinterpret_cast(sci->pscin); return psci->WndProc(iMessage, wParam, lParam); } static void scintilla_class_init(ScintillaClass *klass); static void scintilla_init(ScintillaObject *sci); extern void Platform_Initialise(); extern void Platform_Finalise(); GtkType scintilla_get_type() { static GtkType scintilla_type = 0; if (!scintilla_type) { Platform_Initialise(); static GtkTypeInfo scintilla_info = { "Scintilla", sizeof (ScintillaObject), sizeof (ScintillaClass), (GtkClassInitFunc) scintilla_class_init, (GtkObjectInitFunc) scintilla_init, (gpointer) NULL, (gpointer) NULL, 0 }; scintilla_type = gtk_type_unique(gtk_container_get_type(), &scintilla_info); } return scintilla_type; } void ScintillaGTK::ClassInit(GtkObjectClass* object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class) { atomClipboard = gdk_atom_intern("CLIPBOARD", FALSE); atomUTF8 = gdk_atom_intern("UTF8_STRING", FALSE); atomString = GDK_SELECTION_TYPE_STRING; // Define default signal handlers for the class: Could move more // of the signal handlers here (those that currently attached to wDraw // in Initialise() may require coordinate translation?) object_class->destroy = Destroy; widget_class->size_request = SizeRequest; widget_class->size_allocate = SizeAllocate; widget_class->expose_event = ExposeMain; #if GTK_MAJOR_VERSION < 2 widget_class->draw = Draw; #endif widget_class->motion_notify_event = Motion; widget_class->button_press_event = Press; widget_class->button_release_event = MouseRelease; #if PLAT_GTK_WIN32 || (GTK_MAJOR_VERSION >= 2) widget_class->scroll_event = ScrollEvent; #endif widget_class->key_press_event = KeyPress; widget_class->key_release_event = KeyRelease; widget_class->focus_in_event = FocusIn; widget_class->focus_out_event = FocusOut; widget_class->selection_received = SelectionReceived; widget_class->selection_get = SelectionGet; widget_class->selection_clear_event = SelectionClear; #if GTK_MAJOR_VERSION < 2 widget_class->selection_notify_event = SelectionNotify; #endif widget_class->drag_data_received = DragDataReceived; widget_class->drag_motion = DragMotion; widget_class->drag_leave = DragLeave; widget_class->drag_end = DragEnd; widget_class->drag_drop = Drop; widget_class->drag_data_get = DragDataGet; widget_class->realize = Realize; widget_class->unrealize = UnRealize; widget_class->map = Map; widget_class->unmap = UnMap; container_class->forall = MainForAll; } #if GTK_MAJOR_VERSION < 2 #define GTK_CLASS_TYPE(c) (c->type) #define SIG_MARSHAL gtk_marshal_NONE__INT_POINTER #else #define SIG_MARSHAL scintilla_marshal_NONE__INT_POINTER #endif #define MARSHAL_ARGUMENTS GTK_TYPE_INT, GTK_TYPE_POINTER static void scintilla_class_init(ScintillaClass *klass) { GtkObjectClass *object_class = (GtkObjectClass*) klass; GtkWidgetClass *widget_class = (GtkWidgetClass*) klass; GtkContainerClass *container_class = (GtkContainerClass*) klass; parent_class = (GtkWidgetClass*) gtk_type_class(gtk_container_get_type()); scintilla_signals[COMMAND_SIGNAL] = gtk_signal_new( "command", GTK_RUN_LAST, GTK_CLASS_TYPE(object_class), GTK_SIGNAL_OFFSET(ScintillaClass, command), SIG_MARSHAL, GTK_TYPE_NONE, 2, MARSHAL_ARGUMENTS); scintilla_signals[NOTIFY_SIGNAL] = gtk_signal_new( SCINTILLA_NOTIFY, GTK_RUN_LAST, GTK_CLASS_TYPE(object_class), GTK_SIGNAL_OFFSET(ScintillaClass, notify), SIG_MARSHAL, GTK_TYPE_NONE, 2, MARSHAL_ARGUMENTS); #if GTK_MAJOR_VERSION < 2 gtk_object_class_add_signals(object_class, reinterpret_cast(scintilla_signals), LAST_SIGNAL); #endif klass->command = NULL; klass->notify = NULL; ScintillaGTK::ClassInit(object_class, widget_class, container_class); } static void scintilla_init(ScintillaObject *sci) { GTK_WIDGET_SET_FLAGS(sci, GTK_CAN_FOCUS); sci->pscin = new ScintillaGTK(sci); } GtkWidget* scintilla_new() { return GTK_WIDGET(gtk_type_new(scintilla_get_type())); } void scintilla_set_id(ScintillaObject *sci, int id) { ScintillaGTK *psci = reinterpret_cast(sci->pscin); psci->ctrlID = id; } void scintilla_release_resources(void) { Platform_Finalise(); } usr/src/sdlBasic/src/sdlBasic/scintilla/gtk/makefile0000777000076500007660000000463610463134656017747 0ustar # Make file for Scintilla on Linux or compatible OS # Copyright 1998-2001 by Neil Hodgson # The License.txt file describes the conditions under which this software may be distributed. # This makefile assumes GCC 3.1 is used and changes will be needed to use other compilers. # GNU make does not like \r\n line endings so should be saved to CVS in binary form. # Builds for GTK+ 2 if available else GTK+ 1. # To force GTK+ 2 build, define GTK2 on the make command line. # To force GTK+ 1 build, define GTK1 on the make command line. .SUFFIXES: .cxx .c .o .h .a CC = g++ CCOMP = gcc AR = ar RANLIB = touch ifeq ($(shell uname),Darwin) RANLIB = ranlib endif COMPLIB=scintilla.a vpath %.h ../src ../include vpath %.cxx ../src INCLUDEDIRS=-I ../include -I ../src CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -DGTK -DSCI_LEXER $(INCLUDEDIRS) ifdef NOTHREADS THREADFLAGS=-DG_THREADS_IMPL_NONE else THREADFLAGS= endif ifdef DEBUG CXXFLAGS=-DDEBUG -g $(CXXBASEFLAGS) $(THREADFLAGS) else CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS) endif # If explicit setting of GTK1 or GTK2 then use that else look for # pkg-config which is an OK indication that GTK2 is available ifdef GTK2 CONFIGFLAGS=pkg-config --cflags gtk+-2.0 MARSHALLER=scintilla-marshal.o else ifdef GTK1 CONFIGFLAGS=gtk-config --cflags else ifneq (,$(findstring /,$(shell whereis pkg-config))) CONFIGFLAGS=pkg-config --cflags gtk+-2.0 MARSHALLER=scintilla-marshal.o else CONFIGFLAGS=gtk-config --cflags endif endif endif .cxx.o: $(CC) `$(CONFIGFLAGS)` $(CXXFLAGS) -c $< .c.o: $(CCOMP) `$(CONFIGFLAGS)` $(CXXFLAGS) -w -c $< #++Autogenerated -- run src/LexGen.py to regenerate #**LEXOBJS=\\\n\(\*.o \) LEXOBJS=\ LexOthers.o LexSDLB.o #--Autogenerated -- end of automatically generated section all: $(COMPLIB) clean: rm -f *.o $(COMPLIB) deps: $(CC) -MM `$(CONFIGFLAGS)` $(CXXFLAGS) *.cxx ../src/*.cxx >deps.mak $(COMPLIB): DocumentAccessor.o WindowAccessor.o KeyWords.o StyleContext.o Document.o CallTip.o \ ScintillaBase.o ContractionState.o Editor.o ExternalLexer.o PropSet.o PlatGTK.o \ KeyMap.o LineMarker.o ScintillaGTK.o CellBuffer.o ViewStyle.o \ RESearch.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \ $(MARSHALLER) $(LEXOBJS) $(AR) rc $@ $^ $(RANLIB) $@ # Automatically generate header dependencies with "make deps" include deps.mak usr/src/sdlBasic/src/sdlBasic/scintilla/gtk/PlatGTK.cxx0000777000076500007660000020754510463134511020233 0ustar // Scintilla source code edit control // PlatGTK.cxx - implementation of platform facilities on GTK+/Linux // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "ScintillaWidget.h" #include "UniConversion.h" #include "XPM.h" /* GLIB must be compiled with thread support, otherwise we will bail on trying to use locks, and that could lead to problems for someone. `glib-config --libs gthread` needs to be used to get the glib libraries for linking, otherwise g_thread_init will fail */ #define USE_LOCK defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE) /* Use fast way of getting char data on win32 to work around problems with gdk_string_extents. */ #define FAST_WAY #ifdef G_OS_WIN32 #define snprintf _snprintf #endif #if GTK_MAJOR_VERSION >= 2 #define USE_PANGO 1 #include "Converter.h" #endif #ifdef _MSC_VER // Ignore unreferenced local functions in GTK+ headers #pragma warning(disable: 4505) #endif enum encodingType { singleByte, UTF8, dbcs}; struct LOGFONT { int size; bool bold; bool italic; int characterSet; char faceName[300]; }; #if USE_LOCK static GMutex *fontMutex = NULL; static void InitializeGLIBThreads() { if (!g_thread_supported()) { g_thread_init(NULL); } } #endif static void FontMutexAllocate() { #if USE_LOCK if (!fontMutex) { InitializeGLIBThreads(); fontMutex = g_mutex_new(); } #endif } static void FontMutexFree() { #if USE_LOCK if (fontMutex) { g_mutex_free(fontMutex); fontMutex = NULL; } #endif } static void FontMutexLock() { #if USE_LOCK g_mutex_lock(fontMutex); #endif } static void FontMutexUnlock() { #if USE_LOCK if (fontMutex) { g_mutex_unlock(fontMutex); } #endif } // On GTK+ 1.x holds a GdkFont* but on GTK+ 2.x can hold a GdkFont* or a // PangoFontDescription*. class FontHandle { int width[128]; encodingType et; public: int ascent; GdkFont *pfont; #ifdef USE_PANGO PangoFontDescription *pfd; int characterSet; #endif FontHandle(GdkFont *pfont_) { et = singleByte; ascent = 0; pfont = pfont_; #ifdef USE_PANGO pfd = 0; characterSet = -1; #endif ResetWidths(et); } #ifdef USE_PANGO FontHandle(PangoFontDescription *pfd_, int characterSet_) { et = singleByte; ascent = 0; pfont = 0; pfd = pfd_; characterSet = characterSet_; ResetWidths(et); } #endif ~FontHandle() { if (pfont) gdk_font_unref(pfont); pfont = 0; #ifdef USE_PANGO if (pfd) pango_font_description_free(pfd); pfd = 0; #endif } void ResetWidths(encodingType et_) { et = et_; for (int i=0; i<=127; i++) { width[i] = 0; } } int CharWidth(unsigned char ch, encodingType et_) { int w = 0; FontMutexLock(); if ((ch <= 127) && (et == et_)) { w = width[ch]; } FontMutexUnlock(); return w; } void SetCharWidth(unsigned char ch, int w, encodingType et_) { if (ch <= 127) { FontMutexLock(); if (et != et_) { ResetWidths(et_); } width[ch] = w; FontMutexUnlock(); } } }; // X has a 16 bit coordinate space, so stop drawing here to avoid wrapping static const int maxCoordinate = 32000; static FontHandle *PFont(Font &f) { return reinterpret_cast(f.GetID()); } static GtkWidget *PWidget(WindowID id) { return reinterpret_cast(id); } static GtkWidget *PWidget(Window &w) { return PWidget(w.GetID()); } Point Point::FromLong(long lpoint) { return Point( Platform::LowShortFromLong(lpoint), Platform::HighShortFromLong(lpoint)); } Palette::Palette() { used = 0; allowRealization = false; allocatedPalette = 0; allocatedLen = 0; } Palette::~Palette() { Release(); } void Palette::Release() { used = 0; delete [](reinterpret_cast(allocatedPalette)); allocatedPalette = 0; allocatedLen = 0; } // This method either adds a colour to the list of wanted colours (want==true) // or retrieves the allocated colour back to the ColourPair. // This is one method to make it easier to keep the code for wanting and retrieving in sync. void Palette::WantFind(ColourPair &cp, bool want) { if (want) { for (int i = 0; i < used; i++) { if (entries[i].desired == cp.desired) return; } if (used < numEntries) { entries[used].desired = cp.desired; entries[used].allocated.Set(cp.desired.AsLong()); used++; } } else { for (int i = 0; i < used; i++) { if (entries[i].desired == cp.desired) { cp.allocated = entries[i].allocated; return; } } cp.allocated.Set(cp.desired.AsLong()); } } void Palette::Allocate(Window &w) { //* if (allocatedPalette) { gdk_colormap_free_colors(gtk_widget_get_colormap(PWidget(w)), reinterpret_cast(allocatedPalette), allocatedLen); delete [](reinterpret_cast(allocatedPalette)); allocatedPalette = 0; allocatedLen = 0; //*/} GdkColor *paletteNew = new GdkColor[used]; allocatedPalette = paletteNew; gboolean *successPalette = new gboolean[used]; if (paletteNew) { allocatedLen = used; int iPal = 0; for (iPal = 0; iPal < used; iPal++) { paletteNew[iPal].red = entries[iPal].desired.GetRed() * (65535 / 255); paletteNew[iPal].green = entries[iPal].desired.GetGreen() * (65535 / 255); paletteNew[iPal].blue = entries[iPal].desired.GetBlue() * (65535 / 255); paletteNew[iPal].pixel = entries[iPal].desired.AsLong(); } gdk_colormap_alloc_colors(gtk_widget_get_colormap(PWidget(w)), paletteNew, allocatedLen, FALSE, TRUE, successPalette); for (iPal = 0; iPal < used; iPal++) { entries[iPal].allocated.Set(paletteNew[iPal].pixel); } } delete []successPalette; } } static const char *CharacterSetName(int characterSet) { switch (characterSet) { case SC_CHARSET_ANSI: return "iso8859-*"; case SC_CHARSET_DEFAULT: return "iso8859-*"; case SC_CHARSET_BALTIC: return "iso8859-13"; case SC_CHARSET_CHINESEBIG5: return "*-*"; case SC_CHARSET_EASTEUROPE: return "*-2"; case SC_CHARSET_GB2312: return "gb2312.1980-*"; case SC_CHARSET_GREEK: return "*-7"; case SC_CHARSET_HANGUL: return "ksc5601.1987-*"; case SC_CHARSET_MAC: return "*-*"; case SC_CHARSET_OEM: return "*-*"; case SC_CHARSET_RUSSIAN: return "*-r"; case SC_CHARSET_SHIFTJIS: return "jisx0208.1983-*"; case SC_CHARSET_SYMBOL: return "*-*"; case SC_CHARSET_TURKISH: return "*-9"; case SC_CHARSET_JOHAB: return "*-*"; case SC_CHARSET_HEBREW: return "*-8"; case SC_CHARSET_ARABIC: return "*-6"; case SC_CHARSET_VIETNAMESE: return "*-*"; case SC_CHARSET_THAI: return "*-1"; case SC_CHARSET_8859_15: return "iso8859-15"; default: return "*-*"; } } static bool IsDBCSCharacterSet(int characterSet) { switch (characterSet) { case SC_CHARSET_GB2312: case SC_CHARSET_HANGUL: case SC_CHARSET_SHIFTJIS: case SC_CHARSET_CHINESEBIG5: return true; default: return false; } } static void GenerateFontSpecStrings(const char *fontName, int characterSet, char *foundary, int foundary_len, char *faceName, int faceName_len, char *charset, int charset_len) { // supported font strings include: // foundary-fontface-isoxxx-x // fontface-isoxxx-x // foundary-fontface // fontface if (strchr(fontName, '-')) { char tmp[300]; char *d1 = NULL, *d2 = NULL, *d3 = NULL; strncpy(tmp, fontName, sizeof(tmp) - 1); d1 = strchr(tmp, '-'); // we know the first dash exists d2 = strchr(d1 + 1, '-'); if (d2) d3 = strchr(d2 + 1, '-'); if (d3) { // foundary-fontface-isoxxx-x *d2 = '\0'; foundary[0] = '-'; foundary[1] = '\0'; strncpy(faceName, tmp, foundary_len - 1); strncpy(charset, d2 + 1, charset_len - 1); } else if (d2) { // fontface-isoxxx-x *d1 = '\0'; strcpy(foundary, "-*-"); strncpy(faceName, tmp, faceName_len - 1); strncpy(charset, d1 + 1, charset_len - 1); } else { // foundary-fontface foundary[0] = '-'; foundary[1] = '\0'; strncpy(faceName, tmp, faceName_len - 1); strncpy(charset, CharacterSetName(characterSet), charset_len - 1); } } else { strncpy(foundary, "-*-", foundary_len); strncpy(faceName, fontName, faceName_len - 1); strncpy(charset, CharacterSetName(characterSet), charset_len - 1); } } static void SetLogFont(LOGFONT &lf, const char *faceName, int characterSet, int size, bool bold, bool italic) { memset(&lf, 0, sizeof(lf)); lf.size = size; lf.bold = bold; lf.italic = italic; lf.characterSet = characterSet; strncpy(lf.faceName, faceName, sizeof(lf.faceName) - 1); } /** * Create a hash from the parameters for a font to allow easy checking for identity. * If one font is the same as another, its hash will be the same, but if the hash is the * same then they may still be different. */ static int HashFont(const char *faceName, int characterSet, int size, bool bold, bool italic) { return size ^ (characterSet << 10) ^ (bold ? 0x10000000 : 0) ^ (italic ? 0x20000000 : 0) ^ faceName[0]; } class FontCached : Font { FontCached *next; int usage; LOGFONT lf; int hash; FontCached(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_); ~FontCached() {} bool SameAs(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_); virtual void Release(); static FontID CreateNewFont(const char *fontName, int characterSet, int size, bool bold, bool italic); static FontCached *first; public: static FontID FindOrCreate(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_); static void ReleaseId(FontID id_); }; FontCached *FontCached::first = 0; FontCached::FontCached(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_) : next(0), usage(0), hash(0) { ::SetLogFont(lf, faceName_, characterSet_, size_, bold_, italic_); hash = HashFont(faceName_, characterSet_, size_, bold_, italic_); id = CreateNewFont(faceName_, characterSet_, size_, bold_, italic_); usage = 1; } bool FontCached::SameAs(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_) { return lf.size == size_ && lf.bold == bold_ && lf.italic == italic_ && lf.characterSet == characterSet_ && 0 == strcmp(lf.faceName, faceName_); } void FontCached::Release() { if (id) delete PFont(*this); id = 0; } FontID FontCached::FindOrCreate(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_) { FontID ret = 0; FontMutexLock(); int hashFind = HashFont(faceName_, characterSet_, size_, bold_, italic_); for (FontCached *cur = first; cur; cur = cur->next) { if ((cur->hash == hashFind) && cur->SameAs(faceName_, characterSet_, size_, bold_, italic_)) { cur->usage++; ret = cur->id; } } if (ret == 0) { FontCached *fc = new FontCached(faceName_, characterSet_, size_, bold_, italic_); if (fc) { fc->next = first; first = fc; ret = fc->id; } } FontMutexUnlock(); return ret; } void FontCached::ReleaseId(FontID id_) { FontMutexLock(); FontCached **pcur = &first; for (FontCached *cur = first; cur; cur = cur->next) { if (cur->id == id_) { cur->usage--; if (cur->usage == 0) { *pcur = cur->next; cur->Release(); cur->next = 0; delete cur; } break; } pcur = &cur->next; } FontMutexUnlock(); } static GdkFont *LoadFontOrSet(const char *fontspec, int characterSet) { if (IsDBCSCharacterSet(characterSet)) { return gdk_fontset_load(fontspec); } else { return gdk_font_load(fontspec); } } FontID FontCached::CreateNewFont(const char *fontName, int characterSet, int size, bool bold, bool italic) { char fontset[1024]; char fontspec[300]; char foundary[50]; char faceName[100]; char charset[50]; fontset[0] = '\0'; fontspec[0] = '\0'; foundary[0] = '\0'; faceName[0] = '\0'; charset[0] = '\0'; #ifdef USE_PANGO if (fontName[0] == '!') { PangoFontDescription *pfd = pango_font_description_new(); if (pfd) { pango_font_description_set_family(pfd, fontName+1); pango_font_description_set_size(pfd, size * PANGO_SCALE); pango_font_description_set_weight(pfd, bold ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL); pango_font_description_set_style(pfd, italic ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL); return new FontHandle(pfd, characterSet); } } #endif GdkFont *newid = 0; // If name of the font begins with a '-', assume, that it is // a full fontspec. if (fontName[0] == '-') { if (strchr(fontName, ',') || IsDBCSCharacterSet(characterSet)) { newid = gdk_fontset_load(fontName); } else { newid = gdk_font_load(fontName); } if (!newid) { // Font not available so substitute a reasonable code font // iso8859 appears to only allow western characters. newid = LoadFontOrSet("-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-*", characterSet); } return new FontHandle(newid); } // it's not a full fontspec, build one. // This supports creating a FONT_SET // in a method that allows us to also set size, slant and // weight for the fontset. The expected input is multiple // partial fontspecs seperated by comma // eg. adobe-courier-iso10646-1,*-courier-iso10646-1,*-*-*-* if (strchr(fontName, ',')) { // build a fontspec and use gdk_fontset_load int remaining = sizeof(fontset); char fontNameCopy[1024]; strncpy(fontNameCopy, fontName, sizeof(fontNameCopy) - 1); char *fn = fontNameCopy; char *fp = strchr(fn, ','); for (;;) { const char *spec = "%s%s%s%s-*-*-*-%0d-*-*-*-*-%s"; if (fontset[0] != '\0') { // if this is not the first font in the list, // append a comma seperator spec = ",%s%s%s%s-*-*-*-%0d-*-*-*-*-%s"; } if (fp) *fp = '\0'; // nullify the comma GenerateFontSpecStrings(fn, characterSet, foundary, sizeof(foundary), faceName, sizeof(faceName), charset, sizeof(charset)); snprintf(fontspec, sizeof(fontspec) - 1, spec, foundary, faceName, bold ? "-bold" : "-medium", italic ? "-i" : "-r", size * 10, charset); // if this is the first font in the list, and // we are doing italic, add an oblique font // to the list if (italic && fontset[0] == '\0') { strncat(fontset, fontspec, remaining - 1); remaining -= strlen(fontset); snprintf(fontspec, sizeof(fontspec) - 1, ",%s%s%s-o-*-*-*-%0d-*-*-*-*-%s", foundary, faceName, bold ? "-bold" : "-medium", size * 10, charset); } strncat(fontset, fontspec, remaining - 1); remaining -= strlen(fontset); if (!fp) break; fn = fp + 1; fp = strchr(fn, ','); } newid = gdk_fontset_load(fontset); if (newid) return new FontHandle(newid); // if fontset load failed, fall through, we'll use // the last font entry and continue to try and // get something that matches } // single fontspec support GenerateFontSpecStrings(fontName, characterSet, foundary, sizeof(foundary), faceName, sizeof(faceName), charset, sizeof(charset)); snprintf(fontspec, sizeof(fontspec) - 1, "%s%s%s%s-*-*-*-%0d-*-*-*-*-%s", foundary, faceName, bold ? "-bold" : "-medium", italic ? "-i" : "-r", size * 10, charset); newid = LoadFontOrSet(fontspec, characterSet); if (!newid) { // some fonts have oblique, not italic snprintf(fontspec, sizeof(fontspec) - 1, "%s%s%s%s-*-*-*-%0d-*-*-*-*-%s", foundary, faceName, bold ? "-bold" : "-medium", italic ? "-o" : "-r", size * 10, charset); newid = LoadFontOrSet(fontspec, characterSet); } if (!newid) { snprintf(fontspec, sizeof(fontspec) - 1, "-*-*-*-*-*-*-*-%0d-*-*-*-*-%s", size * 10, charset); newid = gdk_font_load(fontspec); } if (!newid) { // Font not available so substitute a reasonable code font // iso8859 appears to only allow western characters. newid = LoadFontOrSet("-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-*", characterSet); } return new FontHandle(newid); } Font::Font() : id(0) {} Font::~Font() {} void Font::Create(const char *faceName, int characterSet, int size, bool bold, bool italic, bool) { Release(); id = FontCached::FindOrCreate(faceName, characterSet, size, bold, italic); } void Font::Release() { if (id) FontCached::ReleaseId(id); id = 0; } class SurfaceImpl : public Surface { encodingType et; GdkDrawable *drawable; GdkGC *gc; GdkPixmap *ppixmap; int x; int y; bool inited; bool createdGC; #ifdef USE_PANGO PangoContext *pcontext; PangoLayout *layout; Converter conv; int characterSet; void SetConverter(int characterSet_); #endif public: SurfaceImpl(); virtual ~SurfaceImpl(); void Init(WindowID wid); void Init(SurfaceID sid, WindowID wid); void InitPixMap(int width, int height, Surface *surface_, WindowID wid); void Release(); bool Initialised(); void PenColour(ColourAllocated fore); int LogPixelsY(); int DeviceHeightFont(int points); void MoveTo(int x_, int y_); void LineTo(int x_, int y_); void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back); void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back); void FillRectangle(PRectangle rc, ColourAllocated back); void FillRectangle(PRectangle rc, Surface &surfacePattern); void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back); void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back); void Copy(PRectangle rc, Point from, Surface &surfaceSource); void DrawTextBase(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore); void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back); void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back); void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore); void MeasureWidths(Font &font_, const char *s, int len, int *positions); int WidthText(Font &font_, const char *s, int len); int WidthChar(Font &font_, char ch); int Ascent(Font &font_); int Descent(Font &font_); int InternalLeading(Font &font_); int ExternalLeading(Font &font_); int Height(Font &font_); int AverageCharWidth(Font &font_); int SetPalette(Palette *pal, bool inBackGround); void SetClip(PRectangle rc); void FlushCachedState(); void SetUnicodeMode(bool unicodeMode_); void SetDBCSMode(int codePage); }; const char *CharacterSetID(int characterSet) { switch (characterSet) { case SC_CHARSET_ANSI: return ""; case SC_CHARSET_DEFAULT: return "LATIN1"; case SC_CHARSET_BALTIC: return "ISO-8859-13"; case SC_CHARSET_CHINESEBIG5: return "BIG-5"; case SC_CHARSET_EASTEUROPE: return "ISO-8859-2"; case SC_CHARSET_GB2312: return "GB2312"; case SC_CHARSET_GREEK: return "ISO-8859-7"; case SC_CHARSET_HANGUL: return ""; case SC_CHARSET_MAC: return "MACINTOSH"; case SC_CHARSET_OEM: return "ASCII"; case SC_CHARSET_RUSSIAN: return "KOI8-R"; case SC_CHARSET_SHIFTJIS: return "SHIFT-JIS"; case SC_CHARSET_SYMBOL: return ""; case SC_CHARSET_TURKISH: return "ISO-8859-9"; case SC_CHARSET_JOHAB: return "JOHAB"; case SC_CHARSET_HEBREW: return "ISO-8859-8"; case SC_CHARSET_ARABIC: return "ISO-8859-6"; case SC_CHARSET_VIETNAMESE: return ""; case SC_CHARSET_THAI: return "ISO-8859-1"; case SC_CHARSET_8859_15: return "ISO-8859-15"; default: return ""; } } #ifdef USE_PANGO void SurfaceImpl::SetConverter(int characterSet_) { if (characterSet != characterSet_) { characterSet = characterSet_; conv.Open("UTF-8", CharacterSetID(characterSet)); } } #endif SurfaceImpl::SurfaceImpl() : et(singleByte), drawable(0), gc(0), ppixmap(0), x(0), y(0), inited(false), createdGC(false) #ifdef USE_PANGO , pcontext(0), layout(0), characterSet(-1) #endif { } SurfaceImpl::~SurfaceImpl() { Release(); } void SurfaceImpl::Release() { et = singleByte; drawable = 0; if (createdGC) { createdGC = false; gdk_gc_unref(gc); } gc = 0; if (ppixmap) gdk_pixmap_unref(ppixmap); ppixmap = 0; #ifdef USE_PANGO if (layout) g_object_unref(layout); layout = 0; if (pcontext) g_object_unref(pcontext); pcontext = 0; conv.Close(); characterSet = -1; #endif x = 0; y = 0; inited = false; createdGC = false; } bool SurfaceImpl::Initialised() { return inited; } // The WindowID argument is only used for Pango builds #ifdef USE_PANGO #define WID_NAME wid #else #define WID_NAME #endif void SurfaceImpl::Init(WindowID WID_NAME) { Release(); #ifdef USE_PANGO PLATFORM_ASSERT(wid); pcontext = gtk_widget_create_pango_context(PWidget(wid)); PLATFORM_ASSERT(pcontext); layout = pango_layout_new(pcontext); PLATFORM_ASSERT(layout); #endif inited = true; } void SurfaceImpl::Init(SurfaceID sid, WindowID WID_NAME) { PLATFORM_ASSERT(sid); GdkDrawable *drawable_ = reinterpret_cast(sid); Release(); #ifdef USE_PANGO PLATFORM_ASSERT(wid); pcontext = gtk_widget_create_pango_context(PWidget(wid)); layout = pango_layout_new(pcontext); #endif drawable = drawable_; gc = gdk_gc_new(drawable_); // Ask for lines that do not paint the last pixel so is like Win32 gdk_gc_set_line_attributes(gc, 0, GDK_LINE_SOLID, GDK_CAP_NOT_LAST, GDK_JOIN_MITER); createdGC = true; inited = true; } void SurfaceImpl::InitPixMap(int width, int height, Surface *surface_, WindowID WID_NAME) { PLATFORM_ASSERT(surface_); Release(); SurfaceImpl *surfImpl = static_cast(surface_); PLATFORM_ASSERT(surfImpl->drawable); #ifdef USE_PANGO PLATFORM_ASSERT(wid); pcontext = gtk_widget_create_pango_context(PWidget(wid)); PLATFORM_ASSERT(pcontext); layout = pango_layout_new(pcontext); PLATFORM_ASSERT(layout); #endif if (height > 0 && width > 0) ppixmap = gdk_pixmap_new(surfImpl->drawable, width, height, -1); drawable = ppixmap; gc = gdk_gc_new(surfImpl->drawable); // Ask for lines that do not paint the last pixel so is like Win32 gdk_gc_set_line_attributes(gc, 0, GDK_LINE_SOLID, GDK_CAP_NOT_LAST, GDK_JOIN_MITER); createdGC = true; inited = true; } void SurfaceImpl::PenColour(ColourAllocated fore) { if (gc) { GdkColor co; co.pixel = fore.AsLong(); gdk_gc_set_foreground(gc, &co); } } int SurfaceImpl::LogPixelsY() { return 72; } int SurfaceImpl::DeviceHeightFont(int points) { int logPix = LogPixelsY(); return (points * logPix + logPix / 2) / 72; } void SurfaceImpl::MoveTo(int x_, int y_) { x = x_; y = y_; } void SurfaceImpl::LineTo(int x_, int y_) { if (drawable && gc) { gdk_draw_line(drawable, gc, x, y, x_, y_); } x = x_; y = y_; } void SurfaceImpl::Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back) { GdkPoint gpts[20]; if (npts < static_cast((sizeof(gpts) / sizeof(gpts[0])))) { for (int i = 0;i < npts;i++) { gpts[i].x = pts[i].x; gpts[i].y = pts[i].y; } PenColour(back); gdk_draw_polygon(drawable, gc, 1, gpts, npts); PenColour(fore); gdk_draw_polygon(drawable, gc, 0, gpts, npts); } } void SurfaceImpl::RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back) { if (gc && drawable) { PenColour(back); gdk_draw_rectangle(drawable, gc, 1, rc.left + 1, rc.top + 1, rc.right - rc.left - 2, rc.bottom - rc.top - 2); PenColour(fore); // The subtraction of 1 off the width and height here shouldn't be needed but // otherwise a different rectangle is drawn than would be done if the fill parameter == 1 gdk_draw_rectangle(drawable, gc, 0, rc.left, rc.top, rc.right - rc.left - 1, rc.bottom - rc.top - 1); } } void SurfaceImpl::FillRectangle(PRectangle rc, ColourAllocated back) { PenColour(back); if (drawable && (rc.left < maxCoordinate)) { // Protect against out of range gdk_draw_rectangle(drawable, gc, 1, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top); } } void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern) { if (static_cast(surfacePattern).drawable) { // Tile pattern over rectangle // Currently assumes 8x8 pattern int widthPat = 8; int heightPat = 8; for (int xTile = rc.left; xTile < rc.right; xTile += widthPat) { int widthx = (xTile + widthPat > rc.right) ? rc.right - xTile : widthPat; for (int yTile = rc.top; yTile < rc.bottom; yTile += heightPat) { int heighty = (yTile + heightPat > rc.bottom) ? rc.bottom - yTile : heightPat; gdk_draw_pixmap(drawable, gc, static_cast(surfacePattern).drawable, 0, 0, xTile, yTile, widthx, heighty); } } } else { // Something is wrong so try to show anyway // Shows up black because colour not allocated FillRectangle(rc, ColourAllocated(0)); } } void SurfaceImpl::RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back) { if (((rc.right - rc.left) > 4) && ((rc.bottom - rc.top) > 4)) { // Approximate a round rect with some cut off corners Point pts[] = { Point(rc.left + 2, rc.top), Point(rc.right - 2, rc.top), Point(rc.right, rc.top + 2), Point(rc.right, rc.bottom - 2), Point(rc.right - 2, rc.bottom), Point(rc.left + 2, rc.bottom), Point(rc.left, rc.bottom - 2), Point(rc.left, rc.top + 2), }; Polygon(pts, sizeof(pts) / sizeof(pts[0]), fore, back); } else { RectangleDraw(rc, fore, back); } } void SurfaceImpl::Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back) { PenColour(back); gdk_draw_arc(drawable, gc, 1, rc.left + 1, rc.top + 1, rc.right - rc.left - 2, rc.bottom - rc.top - 2, 0, 32767); // The subtraction of 1 here is similar to the case for RectangleDraw PenColour(fore); gdk_draw_arc(drawable, gc, 0, rc.left, rc.top, rc.right - rc.left - 1, rc.bottom - rc.top - 1, 0, 32767); } void SurfaceImpl::Copy(PRectangle rc, Point from, Surface &surfaceSource) { if (static_cast(surfaceSource).drawable) { gdk_draw_pixmap(drawable, gc, static_cast(surfaceSource).drawable, from.x, from.y, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top); } } static size_t UTF8Len(char ch) { unsigned char uch = static_cast(ch); if (uch < 0x80) return 1; else if (uch < (0x80 + 0x40 + 0x20)) return 2; else return 3; } char *UTF8FromLatin1(const char *s, int &len) { char *utfForm = new char[len*2+1]; size_t lenU = 0; for (int i=0;i(s[i]); if (uch < 0x80) { utfForm[lenU++] = uch; } else { utfForm[lenU++] = static_cast(0xC0 | (uch >> 6)); utfForm[lenU++] = static_cast(0x80 | (uch & 0x3f)); } } utfForm[lenU] = '\0'; len = lenU; return utfForm; } #ifdef USE_PANGO static char *UTF8FromIconv(const Converter &conv, const char *s, int &len) { if (conv) { char *utfForm = new char[len*3+1]; char *pin = const_cast(s); size_t inLeft = len; char *pout = utfForm; size_t outLeft = len*3+1; size_t conversions = conv.Convert(&pin, &inLeft, &pout, &outLeft); if (conversions != ((size_t)(-1))) { *pout = '\0'; len = pout - utfForm; return utfForm; } delete []utfForm; } return 0; } // Work out how many bytes are in a character by trying to convert using iconv, // returning the first length that succeeds. static size_t MultiByteLenFromIconv(const Converter &conv, const char *s, size_t len) { for (size_t lenMB=1; (lenMB<4) && (lenMB <= len); lenMB++) { char wcForm[2]; char *pin = const_cast(s); size_t inLeft = lenMB; char *pout = wcForm; size_t outLeft = 2; size_t conversions = conv.Convert(&pin, &inLeft, &pout, &outLeft); if (conversions != ((size_t)(-1))) { return lenMB; } } return 1; } static char *UTF8FromGdkWChar(GdkWChar *wctext, int wclen) { char *utfForm = new char[wclen*3+1]; // Maximum of 3 UTF-8 bytes per character size_t lenU = 0; for (int i = 0; i < wclen && wctext[i]; i++) { unsigned int uch = wctext[i]; if (uch < 0x80) { utfForm[lenU++] = static_cast(uch); } else if (uch < 0x800) { utfForm[lenU++] = static_cast(0xC0 | (uch >> 6)); utfForm[lenU++] = static_cast(0x80 | (uch & 0x3f)); } else { utfForm[lenU++] = static_cast(0xE0 | (uch >> 12)); utfForm[lenU++] = static_cast(0x80 | ((uch >> 6) & 0x3f)); utfForm[lenU++] = static_cast(0x80 | (uch & 0x3f)); } } utfForm[lenU] = '\0'; return utfForm; } static char *UTF8FromDBCS(const char *s, int &len) { GdkWChar *wctext = new GdkWChar[len + 1]; GdkWChar *wcp = wctext; int wclen = gdk_mbstowcs(wcp, s, len); if (wclen < 1) { // In the annoying case when non-locale chars in the line. // e.g. latin1 chars in Japanese locale. delete []wctext; return 0; } char *utfForm = UTF8FromGdkWChar(wctext, wclen); delete []wctext; len = strlen(utfForm); return utfForm; } static size_t UTF8CharLength(const char *s) { const unsigned char *us = reinterpret_cast(s); unsigned char ch = *us; if (ch < 0x80) { return 1; } else if (ch < 0x80 + 0x40 + 0x20) { return 2; } else { return 3; } } #endif // On GTK+, wchar_t is 4 bytes const int maxLengthTextRun = 10000; void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore) { PenColour(fore); if (gc && drawable) { int x = rc.left; #ifdef USE_PANGO if (PFont(font_)->pfd) { char *utfForm = 0; bool useGFree = false; if (et == UTF8) { pango_layout_set_text(layout, s, len); } else { if (!utfForm) { SetConverter(PFont(font_)->characterSet); utfForm = UTF8FromIconv(conv, s, len); } if (!utfForm) { // iconv failed so try DBCS if DBCS mode if (et == dbcs) { // Convert to utf8 utfForm = UTF8FromDBCS(s, len); } } if (!utfForm) { // iconv and DBCS failed so treat as Latin1 utfForm = UTF8FromLatin1(s, len); } pango_layout_set_text(layout, utfForm, len); } pango_layout_set_font_description(layout, PFont(font_)->pfd); PangoLayoutLine *pll = pango_layout_get_line(layout,0); gdk_draw_layout_line(drawable, gc, x, ybase, pll); if (useGFree) { g_free(utfForm); } else { delete []utfForm; } return; } #endif // Draw text as a series of segments to avoid limitations in X servers const int segmentLength = 1000; bool draw8bit = true; if (et != singleByte) { GdkWChar wctext[maxLengthTextRun]; if (len >= maxLengthTextRun) len = maxLengthTextRun-1; int wclen; if (et == UTF8) { wclen = UCS2FromUTF8(s, len, reinterpret_cast(wctext), maxLengthTextRun - 1); } else { // dbcs, so convert using current locale char sMeasure[maxLengthTextRun]; memcpy(sMeasure, s, len); sMeasure[len] = '\0'; wclen = gdk_mbstowcs( wctext, sMeasure, maxLengthTextRun - 1); } if (wclen > 0) { draw8bit = false; wctext[wclen] = L'\0'; GdkWChar *wcp = wctext; while ((wclen > 0) && (x < maxCoordinate)) { int lenDraw = Platform::Minimum(wclen, segmentLength); gdk_draw_text_wc(drawable, PFont(font_)->pfont, gc, x, ybase, wcp, lenDraw); wclen -= lenDraw; if (wclen > 0) { // Avoid next calculation if possible as may be expensive x += gdk_text_width_wc(PFont(font_)->pfont, wcp, lenDraw); } wcp += lenDraw; } } } if (draw8bit) { while ((len > 0) && (x < maxCoordinate)) { int lenDraw = Platform::Minimum(len, segmentLength); gdk_draw_text(drawable, PFont(font_)->pfont, gc, x, ybase, s, lenDraw); len -= lenDraw; if (len > 0) { // Avoid next calculation if possible as may be expensive x += gdk_text_width(PFont(font_)->pfont, s, lenDraw); } s += lenDraw; } } } } void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back) { FillRectangle(rc, back); DrawTextBase(rc, font_, ybase, s, len, fore); } // On GTK+, exactly same as DrawTextNoClip void SurfaceImpl::DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back) { FillRectangle(rc, back); DrawTextBase(rc, font_, ybase, s, len, fore); } void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore) { // Avoid drawing spaces in transparent mode for (int i=0;ipfd) { if (len == 1) { int width = PFont(font_)->CharWidth(*s, et); if (width) { positions[0] = width; return; } } PangoRectangle pos; pango_layout_set_font_description(layout, PFont(font_)->pfd); if (et == UTF8) { // Simple and direct as UTF-8 is native Pango encoding pango_layout_set_text(layout, s, len); PangoLayoutIter *iter = pango_layout_get_iter (layout); int i = 0; while (pango_layout_iter_next_cluster (iter)) { pango_layout_iter_get_cluster_extents(iter, NULL, &pos); int position = PANGO_PIXELS(pos.x); int curIndex = pango_layout_iter_get_index (iter); while (i < curIndex) { positions[i++] = position; } } pango_layout_iter_free (iter); } else { int positionsCalculated = 0; if (et == dbcs) { SetConverter(PFont(font_)->characterSet); char *utfForm = UTF8FromIconv(conv, s, len); if (utfForm) { // Convert to UTF-8 so can ask Pango for widths, then // Loop through UTF-8 and DBCS forms, taking account of different // character byte lengths. Converter convMeasure("UCS-2", CharacterSetID(characterSet)); pango_layout_set_text(layout, utfForm, strlen(utfForm)); int i = 0; int utfIndex = 0; PangoLayoutIter *iter = pango_layout_get_iter (layout); while (pango_layout_iter_next_cluster (iter)) { pango_layout_iter_get_cluster_extents (iter, NULL, &pos); int position = PANGO_PIXELS(pos.x); int utfIndexNext = pango_layout_iter_get_index (iter); while (utfIndex < utfIndexNext) { size_t lenChar = MultiByteLenFromIconv(convMeasure, s+i, len-i); //size_t lenChar = mblen(s+i, MB_CUR_MAX); while (lenChar--) { positions[i++] = position; positionsCalculated++; } utfIndex += UTF8CharLength(utfForm+utfIndex); } } pango_layout_iter_free (iter); delete []utfForm; } } if (positionsCalculated < 1 ) { // Either Latin1 or DBCS conversion failed so treat as Latin1. bool useGFree = false; SetConverter(PFont(font_)->characterSet); char *utfForm = UTF8FromIconv(conv, s, len); if (!utfForm) { utfForm = UTF8FromLatin1(s, len); } pango_layout_set_text(layout, utfForm, len); int i = 0; PangoLayoutIter *iter = pango_layout_get_iter (layout); while (pango_layout_iter_next_cluster (iter)) { pango_layout_iter_get_cluster_extents(iter, NULL, &pos); positions[i++] = PANGO_PIXELS(pos.x); } pango_layout_iter_free(iter); if (useGFree) { g_free(utfForm); } else { delete []utfForm; } } } if (len == 1) { PFont(font_)->SetCharWidth(*s, positions[0], et); } return; } #endif GdkFont *gf = PFont(font_)->pfont; bool measure8bit = true; if (et != singleByte) { GdkWChar wctext[maxLengthTextRun]; if (len >= maxLengthTextRun) len = maxLengthTextRun-1; int wclen; if (et == UTF8) { wclen = UCS2FromUTF8(s, len, reinterpret_cast(wctext), maxLengthTextRun - 1); } else { // dbcsMode, so convert using current locale char sDraw[maxLengthTextRun]; memcpy(sDraw, s, len); sDraw[len] = '\0'; wclen = gdk_mbstowcs( wctext, sDraw, maxLengthTextRun - 1); } if (wclen > 0) { measure8bit = false; wctext[wclen] = L'\0'; // Map widths back to utf-8 or DBCS input string int i = 0; for (int iU = 0; iU < wclen; iU++) { int width = gdk_char_width_wc(gf, wctext[iU]); totalWidth += width; int lenChar; if (et == UTF8) { lenChar = UTF8Len(s[i]); } else { lenChar = mblen(s+i, MB_CUR_MAX); if (lenChar < 0) lenChar = 1; } while (lenChar--) { positions[i++] = totalWidth; } } while (i < len) { // In case of problems with lengths positions[i++] = totalWidth; } } } if (measure8bit) { // Either Latin1 or conversion failed so treat as Latin1. for (int i = 0; i < len; i++) { int width = gdk_char_width(gf, s[i]); totalWidth += width; positions[i] = totalWidth; } } } else { // No font so return an ascending range of values for (int i = 0; i < len; i++) { positions[i] = i + 1; } } } int SurfaceImpl::WidthText(Font &font_, const char *s, int len) { if (font_.GetID()) { #ifdef USE_PANGO if (PFont(font_)->pfd) { char *utfForm = 0; pango_layout_set_font_description(layout, PFont(font_)->pfd); PangoRectangle pos; bool useGFree = false; if (et == UTF8) { pango_layout_set_text(layout, s, len); } else { if (et == dbcs) { // Convert to utf8 utfForm = UTF8FromDBCS(s, len); } if (!utfForm) { // DBCS failed so treat as iconv SetConverter(PFont(font_)->characterSet); utfForm = UTF8FromIconv(conv, s, len); } if (!utfForm) { // g_locale_to_utf8 failed so treat as Latin1 utfForm = UTF8FromLatin1(s, len); } pango_layout_set_text(layout, utfForm, len); } PangoLayoutLine *pangoLine = pango_layout_get_line(layout, 0); pango_layout_line_get_extents(pangoLine, NULL, &pos); if (useGFree) { g_free(utfForm); } else { delete []utfForm; } return PANGO_PIXELS(pos.width); } #endif if (et == UTF8) { GdkWChar wctext[maxLengthTextRun]; size_t wclen = UCS2FromUTF8(s, len, (wchar_t *)wctext, sizeof(wctext) / sizeof(GdkWChar) - 1); wctext[wclen] = L'\0'; return gdk_text_width_wc(PFont(font_)->pfont, wctext, wclen); } else { return gdk_text_width(PFont(font_)->pfont, s, len); } } else { return 1; } } int SurfaceImpl::WidthChar(Font &font_, char ch) { if (font_.GetID()) { #ifdef USE_PANGO if (PFont(font_)->pfd) { return WidthText(font_, &ch, 1); } #endif return gdk_char_width(PFont(font_)->pfont, ch); } else { return 1; } } // Three possible strategies for determining ascent and descent of font: // 1) Call gdk_string_extents with string containing all letters, numbers and punctuation. // 2) Use the ascent and descent fields of GdkFont. // 3) Call gdk_string_extents with string as 1 but also including accented capitals. // Smallest values given by 1 and largest by 3 with 2 in between. // Techniques 1 and 2 sometimes chop off extreme portions of ascenders and // descenders but are mostly OK except for accented characters like Å which are // rarely used in code. // This string contains a good range of characters to test for size. const char largeSizeString[] = "ÂÃÅÄ `~!@#$%^&*()-_=+\\|[]{};:\"\'<,>.?/1234567890" "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; const char sizeString[] = "`~!@#$%^&*()-_=+\\|[]{};:\"\'<,>.?/1234567890" "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; int SurfaceImpl::Ascent(Font &font_) { if (!(font_.GetID())) return 1; #ifdef FAST_WAY FontMutexLock(); int ascent = PFont(font_)->ascent; #ifdef USE_PANGO if ((ascent == 0) && (PFont(font_)->pfd)) { PangoFontMetrics *metrics = pango_context_get_metrics(pcontext, PFont(font_)->pfd, pango_context_get_language(pcontext)); PFont(font_)->ascent = PANGO_PIXELS(pango_font_metrics_get_ascent(metrics)); pango_font_metrics_unref(metrics); ascent = PFont(font_)->ascent; } #endif if ((ascent == 0) && (PFont(font_)->pfont)) { ascent = PFont(font_)->pfont->ascent; } if (ascent == 0) { ascent = 1; } FontMutexUnlock(); return ascent; #else gint lbearing; gint rbearing; gint width; gint ascent; gint descent; gdk_string_extents(PFont(font_)->pfont, sizeString, &lbearing, &rbearing, &width, &ascent, &descent); return ascent; #endif } int SurfaceImpl::Descent(Font &font_) { if (!(font_.GetID())) return 1; #ifdef FAST_WAY #ifdef USE_PANGO if (PFont(font_)->pfd) { PangoFontMetrics *metrics = pango_context_get_metrics(pcontext, PFont(font_)->pfd, pango_context_get_language(pcontext)); int descent = PANGO_PIXELS(pango_font_metrics_get_descent(metrics)); pango_font_metrics_unref(metrics); return descent; } #endif return PFont(font_)->pfont->descent; #else gint lbearing; gint rbearing; gint width; gint ascent; gint descent; gdk_string_extents(PFont(font_)->pfont, sizeString, &lbearing, &rbearing, &width, &ascent, &descent); return descent; #endif } int SurfaceImpl::InternalLeading(Font &) { return 0; } int SurfaceImpl::ExternalLeading(Font &) { return 0; } int SurfaceImpl::Height(Font &font_) { return Ascent(font_) + Descent(font_); } int SurfaceImpl::AverageCharWidth(Font &font_) { return WidthChar(font_, 'n'); } int SurfaceImpl::SetPalette(Palette *, bool) { // Handled in palette allocation for GTK so this does nothing return 0; } void SurfaceImpl::SetClip(PRectangle rc) { GdkRectangle area = {rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top}; gdk_gc_set_clip_rectangle(gc, &area); } void SurfaceImpl::FlushCachedState() {} void SurfaceImpl::SetUnicodeMode(bool unicodeMode_) { if (unicodeMode_) et = UTF8; } void SurfaceImpl::SetDBCSMode(int codePage) { if (codePage && (codePage != SC_CP_UTF8)) et = dbcs; } Surface *Surface::Allocate() { return new SurfaceImpl; } Window::~Window() {} void Window::Destroy() { if (id) gtk_widget_destroy(GTK_WIDGET(id)); id = 0; } bool Window::HasFocus() { return GTK_WIDGET_HAS_FOCUS(id); } PRectangle Window::GetPosition() { // Before any size allocated pretend its 1000 wide so not scrolled PRectangle rc(0, 0, 1000, 1000); if (id) { rc.left = PWidget(id)->allocation.x; rc.top = PWidget(id)->allocation.y; if (PWidget(id)->allocation.width > 20) { rc.right = rc.left + PWidget(id)->allocation.width; rc.bottom = rc.top + PWidget(id)->allocation.height; } } return rc; } void Window::SetPosition(PRectangle rc) { #if 1 //gtk_widget_set_uposition(id, rc.left, rc.top); GtkAllocation alloc; alloc.x = rc.left; alloc.y = rc.top; alloc.width = rc.Width(); alloc.height = rc.Height(); gtk_widget_size_allocate(PWidget(id), &alloc); #else gtk_widget_set_uposition(id, rc.left, rc.top); gtk_widget_set_usize(id, rc.right - rc.left, rc.bottom - rc.top); #endif } void Window::SetPositionRelative(PRectangle rc, Window relativeTo) { int ox = 0; int oy = 0; gdk_window_get_origin(PWidget(relativeTo.id)->window, &ox, &oy); ox += rc.left; if (ox < 0) ox = 0; oy += rc.top; if (oy < 0) oy = 0; /* do some corrections to fit into screen */ int sizex = rc.right - rc.left; int sizey = rc.bottom - rc.top; int screenWidth = gdk_screen_width(); int screenHeight = gdk_screen_height(); if (sizex > screenWidth) ox = 0; /* the best we can do */ else if (ox + sizex > screenWidth) ox = screenWidth - sizex; if (oy + sizey > screenHeight) oy = screenHeight - sizey; gtk_widget_set_uposition(PWidget(id), ox, oy); #if 0 GtkAllocation alloc; alloc.x = rc.left + ox; alloc.y = rc.top + oy; alloc.width = rc.right - rc.left; alloc.height = rc.bottom - rc.top; gtk_widget_size_allocate(id, &alloc); #endif gtk_widget_set_usize(PWidget(id), sizex, sizey); } PRectangle Window::GetClientPosition() { // On GTK+, the client position is the window position return GetPosition(); } void Window::Show(bool show) { if (show) gtk_widget_show(PWidget(id)); } void Window::InvalidateAll() { if (id) { gtk_widget_queue_draw(PWidget(id)); } } void Window::InvalidateRectangle(PRectangle rc) { if (id) { gtk_widget_queue_draw_area(PWidget(id), rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top); } } void Window::SetFont(Font &) { // Can not be done generically but only needed for ListBox } void Window::SetCursor(Cursor curs) { // We don't set the cursor to same value numerous times under gtk because // it stores the cursor in the window once it's set if (curs == cursorLast) return; cursorLast = curs; GdkCursor *gdkCurs; switch (curs) { case cursorText: gdkCurs = gdk_cursor_new(GDK_XTERM); break; case cursorArrow: gdkCurs = gdk_cursor_new(GDK_LEFT_PTR); break; case cursorUp: gdkCurs = gdk_cursor_new(GDK_CENTER_PTR); break; case cursorWait: gdkCurs = gdk_cursor_new(GDK_WATCH); break; case cursorHand: gdkCurs = gdk_cursor_new(GDK_HAND2); break; case cursorReverseArrow: gdkCurs = gdk_cursor_new(GDK_RIGHT_PTR); break; default: gdkCurs = gdk_cursor_new(GDK_LEFT_PTR); cursorLast = cursorArrow; break; } if (PWidget(id)->window) gdk_window_set_cursor(PWidget(id)->window, gdkCurs); gdk_cursor_destroy(gdkCurs); } void Window::SetTitle(const char *s) { gtk_window_set_title(GTK_WINDOW(id), s); } struct ListImage { const char *xpm_data; #if GTK_MAJOR_VERSION < 2 GdkPixmap *pixmap; GdkBitmap *bitmap; #else GdkPixbuf *pixbuf; #endif }; static void list_image_free(gpointer, gpointer value, gpointer) { ListImage *list_image = (ListImage *) value; #if GTK_MAJOR_VERSION < 2 if (list_image->pixmap) gdk_pixmap_unref(list_image->pixmap); if (list_image->bitmap) gdk_bitmap_unref(list_image->bitmap); #else if (list_image->pixbuf) gdk_pixbuf_unref (list_image->pixbuf); #endif g_free(list_image); } ListBox::ListBox() { } ListBox::~ListBox() { } #if GTK_MAJOR_VERSION >= 2 enum { PIXBUF_COLUMN, TEXT_COLUMN, N_COLUMNS }; #endif class ListBoxX : public ListBox { WindowID list; WindowID scroller; #if GTK_MAJOR_VERSION < 2 int current; #endif void *pixhash; int lineHeight; XPMSet xset; bool unicodeMode; int desiredVisibleRows; unsigned int maxItemCharacters; unsigned int aveCharWidth; public: CallBackAction doubleClickAction; void *doubleClickActionData; ListBoxX() : list(0), pixhash(NULL), desiredVisibleRows(5), maxItemCharacters(0), doubleClickAction(NULL), doubleClickActionData(NULL) { #if GTK_MAJOR_VERSION < 2 current = 0; #endif } virtual ~ListBoxX() { if (pixhash) { g_hash_table_foreach((GHashTable *) pixhash, list_image_free, NULL); g_hash_table_destroy((GHashTable *) pixhash); } } virtual void SetFont(Font &font); virtual void Create(Window &parent, int ctrlID, Point location_, int lineHeight_, bool unicodeMode_); virtual void SetAverageCharWidth(int width); virtual void SetVisibleRows(int rows); virtual int GetVisibleRows() const; virtual PRectangle GetDesiredRect(); virtual int CaretFromEdge(); virtual void Clear(); virtual void Append(char *s, int type = -1); virtual int Length(); virtual void Select(int n); virtual int GetSelection(); virtual int Find(const char *prefix); virtual void GetValue(int n, char *value, int len); virtual void RegisterImage(int type, const char *xpm_data); virtual void ClearRegisteredImages(); virtual void SetDoubleClickAction(CallBackAction action, void *data) { doubleClickAction = action; doubleClickActionData = data; } virtual void SetList(const char* list, char separator, char typesep); }; ListBox *ListBox::Allocate() { ListBoxX *lb = new ListBoxX(); return lb; } #if GTK_MAJOR_VERSION < 2 static void UnselectionAC(GtkWidget *, gint, gint, GdkEventButton *, gpointer p) { int *pi = reinterpret_cast(p); *pi = -1; } static void SelectionAC(GtkWidget *, gint row, gint, GdkEventButton *, gpointer p) { int *pi = reinterpret_cast(p); *pi = row; } #endif static gboolean ButtonPress(GtkWidget *, GdkEventButton* ev, gpointer p) { ListBoxX* lb = reinterpret_cast(p); if (ev->type == GDK_2BUTTON_PRESS && lb->doubleClickAction != NULL) { lb->doubleClickAction(lb->doubleClickActionData); return TRUE; } return FALSE; } void ListBoxX::Create(Window &, int, Point, int, bool) { id = gtk_window_new(GTK_WINDOW_POPUP); GtkWidget *frame = gtk_frame_new(NULL); gtk_widget_show(frame); gtk_container_add(GTK_CONTAINER(GetID()), frame); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_OUT); gtk_container_set_border_width(GTK_CONTAINER(frame), 0); scroller = gtk_scrolled_window_new(NULL, NULL); gtk_container_set_border_width(GTK_CONTAINER(scroller), 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroller), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(frame), PWidget(scroller)); gtk_widget_show(PWidget(scroller)); #if GTK_MAJOR_VERSION < 2 list = gtk_clist_new(1); gtk_widget_show(PWidget(list)); gtk_container_add(GTK_CONTAINER(PWidget(scroller)), PWidget(list)); gtk_clist_set_column_auto_resize(GTK_CLIST(PWidget(list)), 0, TRUE); gtk_clist_set_selection_mode(GTK_CLIST(PWidget(list)), GTK_SELECTION_BROWSE); gtk_signal_connect(GTK_OBJECT(PWidget(list)), "unselect_row", GTK_SIGNAL_FUNC(UnselectionAC), ¤t); gtk_signal_connect(GTK_OBJECT(PWidget(list)), "select_row", GTK_SIGNAL_FUNC(SelectionAC), ¤t); gtk_signal_connect(GTK_OBJECT(PWidget(list)), "button_press_event", GTK_SIGNAL_FUNC(ButtonPress), this); gtk_clist_set_shadow_type(GTK_CLIST(PWidget(list)), GTK_SHADOW_NONE); #else /* Tree and its model */ GtkListStore *store = gtk_list_store_new(N_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING); list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(list)); gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(list), FALSE); gtk_tree_view_set_reorderable(GTK_TREE_VIEW(list), FALSE); /* Columns */ GtkTreeViewColumn *column = gtk_tree_view_column_new(); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); gtk_tree_view_column_set_title(column, "Autocomplete"); GtkCellRenderer *renderer = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_pack_start(column, renderer, FALSE); gtk_tree_view_column_add_attribute(column, renderer, "pixbuf", PIXBUF_COLUMN); renderer = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start(column, renderer, TRUE); gtk_tree_view_column_add_attribute(column, renderer, "text", TEXT_COLUMN); gtk_tree_view_append_column(GTK_TREE_VIEW(list), column); gtk_container_add(GTK_CONTAINER(PWidget(scroller)), PWidget(list)); gtk_widget_show(PWidget(list)); gtk_signal_connect(GTK_OBJECT(PWidget(list)), "button_press_event", GTK_SIGNAL_FUNC(ButtonPress), this); #endif gtk_widget_realize(PWidget(id)); } void ListBoxX::SetFont(Font &scint_font) { #if GTK_MAJOR_VERSION < 2 GtkStyle *style = gtk_widget_get_style(GTK_WIDGET(PWidget(list))); if (!gdk_font_equal(style->font, PFont(scint_font)->pfont)) { style = gtk_style_copy(style); gdk_font_unref(style->font); style->font = PFont(scint_font)->pfont; gdk_font_ref(style->font); gtk_widget_set_style(GTK_WIDGET(PWidget(list)), style); gtk_style_unref(style); } #else // Only do for Pango font as there have been crashes for GDK fonts if (PFont(scint_font)->pfd) { // Current font is Pango font gtk_widget_modify_font(PWidget(list), PFont(scint_font)->pfd); } #endif } void ListBoxX::SetAverageCharWidth(int width) { aveCharWidth = width; } void ListBoxX::SetVisibleRows(int rows) { desiredVisibleRows = rows; } int ListBoxX::GetVisibleRows() const { return desiredVisibleRows; } PRectangle ListBoxX::GetDesiredRect() { // Before any size allocated pretend its 100 wide so not scrolled PRectangle rc(0, 0, 100, 100); if (id) { int rows = Length(); if ((rows == 0) || (rows > desiredVisibleRows)) rows = desiredVisibleRows; GtkRequisition req; int height; // First calculate height of the clist for our desired visible // row count otherwise it tries to expand to the total # of rows #if GTK_MAJOR_VERSION < 2 int ythickness = PWidget(list)->style->klass->ythickness; height = (rows * GTK_CLIST(list)->row_height + rows + 1 + 2 * (ythickness + GTK_CONTAINER(PWidget(list))->border_width)); #else // Get cell height int row_width=0; int row_height=0; GtkTreeViewColumn * column = gtk_tree_view_get_column(GTK_TREE_VIEW(list), 0); gtk_tree_view_column_cell_get_size(column, NULL, NULL, NULL, &row_width, &row_height); int ythickness = PWidget(list)->style->ythickness; height = (rows * row_height + 2 * (ythickness + GTK_CONTAINER(PWidget(list))->border_width + 1)); #endif gtk_widget_set_usize(GTK_WIDGET(PWidget(list)), -1, height); // Get the size of the scroller because we set usize on the window gtk_widget_size_request(GTK_WIDGET(scroller), &req); rc.right = req.width; rc.bottom = req.height; gtk_widget_set_usize(GTK_WIDGET(list), -1, -1); int width = maxItemCharacters; if (width < 12) width = 12; rc.right = width * (aveCharWidth + aveCharWidth / 3); if (Length() > rows) rc.right = rc.right + 16; } return rc; } int ListBoxX::CaretFromEdge() { return 4 + xset.GetWidth(); } void ListBoxX::Clear() { #if GTK_MAJOR_VERSION < 2 gtk_clist_clear(GTK_CLIST(list)); #else GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list)); gtk_list_store_clear(GTK_LIST_STORE(model)); #endif maxItemCharacters = 0; } #if GTK_MAJOR_VERSION < 2 static void init_pixmap(ListImage *list_image, GtkWidget *window) { #else static void init_pixmap(ListImage *list_image) { #endif const char *textForm = list_image->xpm_data; const char * const * xpm_lineform = reinterpret_cast(textForm); const char **xpm_lineformfromtext = 0; // The XPM data can be either in atext form as will be read from a file // or in a line form (array of char *) as will be used for images defined in code. // Test for text form and convert to line form if ((0 == memcmp(textForm, "/* X", 4)) && (0 == memcmp(textForm, "/* XPM */", 9))) { // Test done is two parts to avoid possibility of overstepping the memory // if memcmp implemented strangely. Must be 4 bytes at least at destination. xpm_lineformfromtext = XPM::LinesFormFromTextForm(textForm); xpm_lineform = xpm_lineformfromtext; } // Drop any existing pixmap/bitmap as data may have changed #if GTK_MAJOR_VERSION < 2 if (list_image->pixmap) gdk_pixmap_unref(list_image->pixmap); list_image->pixmap = NULL; if (list_image->bitmap) gdk_bitmap_unref(list_image->bitmap); list_image->bitmap = NULL; list_image->pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL , gtk_widget_get_colormap(window), &(list_image->bitmap), NULL , (gchar **) xpm_lineform); if (NULL == list_image->pixmap) { if (list_image->bitmap) gdk_bitmap_unref(list_image->bitmap); list_image->bitmap = NULL; } #else if (list_image->pixbuf) gdk_pixbuf_unref(list_image->pixbuf); list_image->pixbuf = gdk_pixbuf_new_from_xpm_data((const gchar**)xpm_lineform); #endif delete []xpm_lineformfromtext; } #define SPACING 5 void ListBoxX::Append(char *s, int type) { ListImage *list_image = NULL; if ((type >= 0) && pixhash) { list_image = (ListImage *) g_hash_table_lookup((GHashTable *) pixhash , (gconstpointer) GINT_TO_POINTER(type)); } #if GTK_MAJOR_VERSION < 2 char * szs[] = { s, NULL }; int rownum = gtk_clist_append(GTK_CLIST(list), szs); if (list_image) { if (NULL == list_image->pixmap) init_pixmap(list_image, (GtkWidget *) list); gtk_clist_set_pixtext(GTK_CLIST(list), rownum, 0, s, SPACING , list_image->pixmap, list_image->bitmap); } #else GtkTreeIter iter; GtkListStore *store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(list))); gtk_list_store_append(GTK_LIST_STORE(store), &iter); if (list_image) { if (NULL == list_image->pixbuf) init_pixmap(list_image); if (list_image->pixbuf) { gtk_list_store_set(GTK_LIST_STORE(store), &iter, PIXBUF_COLUMN, list_image->pixbuf, TEXT_COLUMN, s, -1); } else { gtk_list_store_set(GTK_LIST_STORE(store), &iter, TEXT_COLUMN, s, -1); } } else { gtk_list_store_set(GTK_LIST_STORE(store), &iter, TEXT_COLUMN, s, -1); } #endif size_t len = strlen(s); if (maxItemCharacters < len) maxItemCharacters = len; } int ListBoxX::Length() { if (id) #if GTK_MAJOR_VERSION < 2 return GTK_CLIST(list)->rows; #else return gtk_tree_model_iter_n_children(gtk_tree_view_get_model (GTK_TREE_VIEW(list)), NULL); #endif return 0; } void ListBoxX::Select(int n) { #if GTK_MAJOR_VERSION < 2 if (n == -1) { gtk_clist_unselect_row(GTK_CLIST(list), current, 0); } else { gtk_clist_select_row(GTK_CLIST(list), n, 0); gtk_clist_moveto(GTK_CLIST(list), n, 0, 0.5, 0.5); } #else GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list)); GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(list)); if (n < 0) { gtk_tree_selection_unselect_all(selection); return; } bool valid = gtk_tree_model_iter_nth_child(model, &iter, NULL, n); if (valid) { gtk_tree_selection_select_iter(selection, &iter); // Move the scrollbar to show the selection. int total = Length(); GtkAdjustment *adj = gtk_tree_view_get_vadjustment(GTK_TREE_VIEW(list)); gfloat value = ((gfloat)n / total) * (adj->upper - adj->lower) + adj->lower - adj->page_size / 2; // Get cell height int row_width; int row_height; GtkTreeViewColumn * column = gtk_tree_view_get_column(GTK_TREE_VIEW(list), 0); gtk_tree_view_column_cell_get_size(column, NULL, NULL, NULL, &row_width, &row_height); int rows = Length(); if ((rows == 0) || (rows > desiredVisibleRows)) rows = desiredVisibleRows; if (rows & 0x1) { // Odd rows to display -- We are now in the middle. // Align it so that we don't chop off rows. value += (gfloat)row_height / 2.0; } // Clamp it. value = (value < 0)? 0 : value; value = (value > (adj->upper - adj->page_size))? (adj->upper - adj->page_size) : value; // Set it. gtk_adjustment_set_value(adj, value); } else { gtk_tree_selection_unselect_all(selection); } #endif } int ListBoxX::GetSelection() { #if GTK_MAJOR_VERSION < 2 return current; #else GtkTreeIter iter; GtkTreeModel *model; GtkTreeSelection *selection; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(list)); if (gtk_tree_selection_get_selected(selection, &model, &iter)) { GtkTreePath *path = gtk_tree_model_get_path(model, &iter); int *indices = gtk_tree_path_get_indices(path); // Don't free indices. if (indices) return indices[0]; } return -1; #endif } int ListBoxX::Find(const char *prefix) { #if GTK_MAJOR_VERSION < 2 int count = Length(); for (int i = 0; i < count; i++) { char *s = 0; gtk_clist_get_text(GTK_CLIST(list), i, 0, &s); if (s && (0 == strncmp(prefix, s, strlen(prefix)))) { return i; } } #else GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list)); bool valid = gtk_tree_model_get_iter_first(model, &iter); int i = 0; while(valid) { gchar *s; gtk_tree_model_get(model, &iter, TEXT_COLUMN, &s, -1); if (s && (0 == strncmp(prefix, s, strlen(prefix)))) { return i; } valid = gtk_tree_model_iter_next(model, &iter); i++; } #endif return -1; } void ListBoxX::GetValue(int n, char *value, int len) { char *text = NULL; #if GTK_MAJOR_VERSION < 2 GtkCellType type = gtk_clist_get_cell_type(GTK_CLIST(list), n, 0); switch (type) { case GTK_CELL_TEXT: gtk_clist_get_text(GTK_CLIST(list), n, 0, &text); break; case GTK_CELL_PIXTEXT: gtk_clist_get_pixtext(GTK_CLIST(list), n, 0, &text, NULL, NULL, NULL); break; default: break; } #else GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list)); bool valid = gtk_tree_model_iter_nth_child(model, &iter, NULL, n); if (valid) { gtk_tree_model_get(model, &iter, TEXT_COLUMN, &text, -1); } #endif if (text && len > 0) { strncpy(value, text, len); value[len - 1] = '\0'; } else { value[0] = '\0'; } } // g_return_if_fail causes unnecessary compiler warning in release compile. #ifdef _MSC_VER #pragma warning(disable: 4127) #endif void ListBoxX::RegisterImage(int type, const char *xpm_data) { g_return_if_fail(xpm_data); // Saved and use the saved copy so caller's copy can disappear. xset.Add(type, xpm_data); XPM *pxpm = xset.Get(type); xpm_data = reinterpret_cast(pxpm->InLinesForm()); if (!pixhash) { pixhash = g_hash_table_new(g_direct_hash, g_direct_equal); } ListImage *list_image = (ListImage *) g_hash_table_lookup((GHashTable *) pixhash, (gconstpointer) GINT_TO_POINTER(type)); if (list_image) { // Drop icon already registered #if GTK_MAJOR_VERSION < 2 if (list_image->pixmap) gdk_pixmap_unref(list_image->pixmap); list_image->pixmap = 0; if (list_image->bitmap) gdk_bitmap_unref(list_image->bitmap); list_image->bitmap = 0; #else if (list_image->pixbuf) gdk_pixbuf_unref(list_image->pixbuf); list_image->pixbuf = NULL; #endif list_image->xpm_data = xpm_data; } else { list_image = g_new0(ListImage, 1); list_image->xpm_data = xpm_data; g_hash_table_insert((GHashTable *) pixhash, GINT_TO_POINTER(type), (gpointer) list_image); } } void ListBoxX::ClearRegisteredImages() { xset.Clear(); } void ListBoxX::SetList(const char* list, char separator, char typesep) { Clear(); int count = strlen(list) + 1; char *words = new char[count]; if (words) { memcpy(words, list, count); char *startword = words; char *numword = NULL; int i = 0; for (; words[i]; i++) { if (words[i] == separator) { words[i] = '\0'; if (numword) *numword = '\0'; Append(startword, numword?atoi(numword + 1):-1); startword = words + i + 1; numword = NULL; } else if (words[i] == typesep) { numword = words + i; } } if (startword) { if (numword) *numword = '\0'; Append(startword, numword?atoi(numword + 1):-1); } delete []words; } } Menu::Menu() : id(0) {} void Menu::CreatePopUp() { Destroy(); id = gtk_item_factory_new(GTK_TYPE_MENU, "
", NULL); } void Menu::Destroy() { if (id) gtk_object_unref(GTK_OBJECT(id)); id = 0; } void Menu::Show(Point pt, Window &) { int screenHeight = gdk_screen_height(); int screenWidth = gdk_screen_width(); GtkItemFactory *factory = reinterpret_cast(id); GtkWidget *widget = gtk_item_factory_get_widget(factory, "
"); gtk_widget_show_all(widget); GtkRequisition requisition; gtk_widget_size_request(widget, &requisition); if ((pt.x + requisition.width) > screenWidth) { pt.x = screenWidth - requisition.width; } if ((pt.y + requisition.height) > screenHeight) { pt.y = screenHeight - requisition.height; } #if GTK_MAJOR_VERSION >= 2 gtk_item_factory_popup(factory, pt.x - 4, pt.y - 4, 3, gtk_get_current_event_time()); #else gtk_item_factory_popup(factory, pt.x - 4, pt.y - 4, 3, 0); #endif } ElapsedTime::ElapsedTime() { GTimeVal curTime; g_get_current_time(&curTime); bigBit = curTime.tv_sec; littleBit = curTime.tv_usec; } class DynamicLibraryImpl : public DynamicLibrary { protected: GModule* m; public: DynamicLibraryImpl(const char *modulePath) { m = g_module_open(modulePath, G_MODULE_BIND_LAZY); } virtual ~DynamicLibraryImpl() { if (m != NULL) g_module_close(m); } // Use g_module_symbol to get a pointer to the relevant function. virtual Function FindFunction(const char *name) { if (m != NULL) { gpointer fn_address = NULL; gboolean status = g_module_symbol(m, name, &fn_address); if (status) return static_cast(fn_address); else return NULL; } else return NULL; } virtual bool IsValid() { return m != NULL; } }; DynamicLibrary *DynamicLibrary::Load(const char *modulePath) { return static_cast( new DynamicLibraryImpl(modulePath) ); } double ElapsedTime::Duration(bool reset) { GTimeVal curTime; g_get_current_time(&curTime); long endBigBit = curTime.tv_sec; long endLittleBit = curTime.tv_usec; double result = 1000000.0 * (endBigBit - bigBit); result += endLittleBit - littleBit; result /= 1000000.0; if (reset) { bigBit = endBigBit; littleBit = endLittleBit; } return result; } ColourDesired Platform::Chrome() { return ColourDesired(0xe0, 0xe0, 0xe0); } ColourDesired Platform::ChromeHighlight() { return ColourDesired(0xff, 0xff, 0xff); } const char *Platform::DefaultFont() { #ifdef G_OS_WIN32 return "Lucida Console"; #else return "lucidatypewriter"; #endif } int Platform::DefaultFontSize() { #ifdef G_OS_WIN32 return 10; #else return 12; #endif } unsigned int Platform::DoubleClickTime() { return 500; // Half a second } bool Platform::MouseButtonBounce() { return true; } void Platform::DebugDisplay(const char *s) { printf("%s", s); } bool Platform::IsKeyDown(int) { // TODO: discover state of keys in GTK+/X return false; } long Platform::SendScintilla( WindowID w, unsigned int msg, unsigned long wParam, long lParam) { return scintilla_send_message(SCINTILLA(w), msg, wParam, lParam); } long Platform::SendScintillaPointer( WindowID w, unsigned int msg, unsigned long wParam, void *lParam) { return scintilla_send_message(SCINTILLA(w), msg, wParam, reinterpret_cast(lParam)); } bool Platform::IsDBCSLeadByte(int /* codePage */, char /* ch */) { return false; } #if GTK_MAJOR_VERSION < 2 int Platform::DBCSCharLength(int, const char *s) { int bytes = mblen(s, MB_CUR_MAX); if (bytes >= 1) return bytes; else return 1; } #else int Platform::DBCSCharLength(int codePage, const char *s) { if (codePage == 999932) { // Experimental and disabled code - change 999932 to 932 above to // enable locale avoiding but expensive character length determination. // Avoid locale with explicit use of iconv Converter convMeasure("UCS-2", CharacterSetID(SC_CHARSET_SHIFTJIS)); size_t lenChar = MultiByteLenFromIconv(convMeasure, s, strlen(s)); return lenChar; } else { int bytes = mblen(s, MB_CUR_MAX); if (bytes >= 1) return bytes; else return 1; } } #endif int Platform::DBCSCharMaxLength() { return MB_CUR_MAX; //return 2; } // These are utility functions not really tied to a platform int Platform::Minimum(int a, int b) { if (a < b) return a; else return b; } int Platform::Maximum(int a, int b) { if (a > b) return a; else return b; } //#define TRACE #ifdef TRACE void Platform::DebugPrintf(const char *format, ...) { char buffer[2000]; va_list pArguments; va_start(pArguments, format); vsprintf(buffer, format, pArguments); va_end(pArguments); Platform::DebugDisplay(buffer); } #else void Platform::DebugPrintf(const char *, ...) {} #endif // Not supported for GTK+ static bool assertionPopUps = true; bool Platform::ShowAssertionPopUps(bool assertionPopUps_) { bool ret = assertionPopUps; assertionPopUps = assertionPopUps_; return ret; } void Platform::Assert(const char *c, const char *file, int line) { char buffer[2000]; sprintf(buffer, "Assertion [%s] failed at %s %d", c, file, line); strcat(buffer, "\r\n"); Platform::DebugDisplay(buffer); abort(); } int Platform::Clamp(int val, int minVal, int maxVal) { if (val > maxVal) val = maxVal; if (val < minVal) val = minVal; return val; } void Platform_Initialise() { FontMutexAllocate(); } void Platform_Finalise() { FontMutexFree(); } usr/src/sdlBasic/src/sdlBasic/scintilla/win32/0000777000000000000000000000000010645354660020154 5ustar rootrootusr/src/sdlBasic/src/sdlBasic/scintilla/win32/clean.bat0000777000076500007660000000021210463136373020156 0ustar rem WARNING!!! verify the correct path of mingGw set MINGWPATH=c:\devel\c-cpp\mingw @path %MINGWPATH%\bin;%PATH% mingw32-make clean usr/src/sdlBasic/src/sdlBasic/scintilla/win32/PlatformRes.h0000777000076500007660000000051310463136265021017 0ustar // Scintilla source code edit control /** @file PlatformRes.h ** Defines IDs of resources used by Scintilla on Windows platform. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #define IDC_MARGIN 400 usr/src/sdlBasic/src/sdlBasic/scintilla/win32/Lexers.a0000777000175000017500000004305010622616341022143 0ustar vrobyvroby! / 1179327713 0 0 0 144 ` ÔÔÔÔÔÔÔ//_lmBatch_lmDiff_lmProps_lmMake_lmErrorList_lmLatex_lmNull__ZN8Accessor13SafeGetCharAtEic_lmSDLBLexOthers.o/ 1179327712 0 0 100666 11763 ` L@&5.text` ´!ƒ `.data@À.bssЀÀ.ctors!6&@ÀU‰åŠE]ƒè0< –À¶ÀÃU‰åŠE]ƒè1<–À¶ÀÃremU‰åWVS1Ûƒì(‹}ÇEÐ;] s‹UŠ1Ò< tƒè <wº„ÒtCëÜ‹M€< @„÷‹M€< :„Ñ1ö;] s4ƒþw/‹E1ÉŠ€ú tB÷<w¹„Éu¾ÂPCèˆD5ÔFXëÇh'ÆD5ÔuÔVèZY…Àu‹jÿuWÿPLeô[^_]ÃVÿuèZY„À…N;] s‹UŠ1Ò< tƒè <wº„ÒuCëÜ‹j‹MD ÿPWÿRLƒÄ ;] sF‹E4ƒ}Ðu ‹U€<%t}ƒ}ÐtYƒ}Ðu‹UŠ<*t.t<|tCF;] rÀ‹jÿuWÿPLƒÄ éPÿÿÿ‹VÿÿuÐRWÿPL‹jVWÿPLƒÄëË‹M€< %už‹jVWÿPLÇEÐƒÄ ë­‹FÿjPWÿRL‹MŠL ¾ÁPˆMÏèþÿÿƒÄ„ÀuC€}Ï%t ÇEÐéuÿÿÿ‹UŠD1Ò< tƒè <wº„Òu׋FjƒÃPƒÆWÿRLë’‹FjƒÃPƒÆWÿRLé{ÿÿÿ‹jéÑþÿÿ€| :t ‹jéÿÿÿ‹jéÿÿÿ‹E‹ØjPCWÿRLƒÄ ;] ƒîýÿÿ‹UŠ1Ò< tƒè <wº„Ò„ÎýÿÿCëÔU‰åWVSì‹E‹}‹‰…ðûÿÿ‹jÿuWÿP<‹ÿuWÿPH‹EƒÄ‰Æ‰…èûÿÿE Ç…ìûÿÿ9ƃ‹ìûÿÿÿ…ìûÿÿ;·¨|;·¬| ‹VWÿPYX‰ð+‡¨¾Dˆ„ôûÿÿÇ…äûÿÿ;·¨|;·¬| ‹VWÿPXZ‹—¨‰ð)оD< „9Ö|;·¬| ‹VWÿPY[‹—¨‰ð)оD< „£€½äûÿÿu ½ìûÿÿþv?‹•ìûÿÿW…ôûÿÿÆ„ôûÿÿÿµðûÿÿVÿµèûÿÿRPèVüÿÿƒÄNÇ…ìûÿÿ‰èûÿÿ‹EFE 9Æ‚þþÿÿƒ½ìûÿÿueô[^_]ËU‹M WÿµðûÿÿDÿP…ôûÿÿÿµèûÿÿÿµìûÿÿPèöûÿÿƒÄëÉ^9Ó|;Ÿ¬|5‹SWÿPX;Ÿ¨Z|;Ÿ¬|¸ < „(ÿÿÿÇ…äûÿÿéÿÿÿ+Ÿ¨¾DëÜdiff --- +++ ====***? U¸Œ‰å¹W‰ÇV‹uüS‹]ó¦„-¸’‹uü¹‰Çó¦„í¸—‹uü¹‰Çó¦„Õ¸œ‹uü¹‰Çó¦t&¸¡‹uü¹‰Çó¦uN‹E€x t%‹}€*t‹jÿu SÿPLƒÄ eô[^_]ËjëèƒÀPè^…ÀtÍj/ÿuèZY…Àu½ëÚ¸¥‹uü¹‰Çó¦t°‹EŠ€ú@t¼BÐ< vµ€ú-t,€út€ú t‹jë„‹jé{ÿÿÿ‹jérÿÿÿ‹jéiÿÿÿ‹EƒÀPèY…À„Pÿÿÿj/ÿuè_Z…Àé;ÿÿÿ‹jé8ÿÿÿU‰åWVSì‹}‹jÿuWÿP<‹ÿuWÿPH‹uƒÄ‰ðE Ç…ðûÿÿ9ƃè‹ðûÿÿÿ…ðûÿÿ;·¨|;·¬| ‹VWÿPYX‰ð+‡¨¾Dˆ„ôûÿÿÇ…ìûÿÿ;·¨|;·¬| ‹VWÿPXZ‹—¨‰ð)оD< „Ø9Ö|;·¬| ‹VWÿPY[‹—¨‰ð)оD< t{€½ìûÿÿu ½ðûÿÿþv)‹…ðûÿÿWVÆ„ôûÿÿ…ôûÿÿPèœýÿÿƒÄ Ç…ðûÿÿ‹EFE 9Æ‚ÿÿÿƒ½ðûÿÿueô[^_]ËU‹M WDÿP…ôûÿÿPèWýÿÿƒÄ ëÛ^9Ó|;Ÿ¬|5‹SWÿPX;Ÿ¨Z|;Ÿ¬|¸ < „PÿÿÿÇ…ìûÿÿéAÿÿÿ+Ÿ¨¾DëÜU‰åWVSV‹}‹ÿuWÿPY‰ÆÇEð[…À~@ÿ‹PWÿR ‰EðXZ‹VWÿP[‰ÂX‹]ð÷Eð t ‰Ø%ÿX‹RWÿP¾ÀZƒøYtgƒøt[ƒøtO÷à t;]ðt*‹SVFWÿPP‰]ð‹VWÿP‰ÂƒÄ‹EE 9Рeô[^_]ÉڋâÿßÿÿRVÿRWÿPPƒÄ ë¾»$못$룻$ëœU‰åWVS‹} ‹u1Û9ûsm‹E1ÉŠ€ú tB÷<w¹„ÉtCëÜ9ûsI€ú#„²€ú!„©€ú;„ €ú[„‘€ú@t^€ú=tC9ûs‹E€<=uò9ûs ‹E€<=t‹jÿuVÿPLƒÄ eô[^_]Ã]‹jCÿPVÿRL‹jSVÿPL‹jÿuVÿPLƒÄ$ëЋE‹ØjPCVÿRL‹EƒÄ €<=u§‹E‹ØjPVÿRLƒÄ 딋jë’‹jëŒU‰åWVSì ‹}‹jÿuWÿP<‹ÿuWÿPH‹EƒÄ‰Æ‰…ìûÿÿE Ç…ðûÿÿ9ƃü‹ðûÿÿÿ…ðûÿÿ;·¨|;·¬| ‹VWÿPYX‰ð+‡¨¾Dˆ„ôûÿÿÇ…èûÿÿ;·¨|;·¬| ‹VWÿPXZ‹—¨‰ð)оD< „ø9Ö|;·¬| ‹VWÿPY[‹—¨‰ð)оD< „—€½èûÿÿu ½ðûÿÿþv9‹•ðûÿÿWV…ôûÿÿÆ„ôûÿÿÿµìûÿÿRPèëýÿÿƒÄNÇ…ðûÿÿ‰ìûÿÿ‹EFE 9Æ‚ÿÿÿƒ½ðûÿÿueô[^_]ËU‹M WDÿP…ôûÿÿÿµìûÿÿÿµðûÿÿPè‘ýÿÿƒÄëÏ^9Ó|;Ÿ¬|5‹SWÿPX;Ÿ¨Z|;Ÿ¬|¸ < „4ÿÿÿÇ…èûÿÿé%ÿÿÿ+Ÿ¨¾DëÜfold.compactU‰åWVSƒì$‹u‹]‹jh? VÿP4ƒÄ …À‹E •Eó؉EìÇEè‹SVÿPY‰Eä_;ž¨|;ž¬| ‹SVÿPXZ‰Ø+†¨ŠDˆEã‹SVÿP¾À_‰EÜX‰]Ô‹EìÆEÛ9ÉßGŠEãˆEÓ;¾¨|;¾¬| ‹WVÿPY[‰ø‹]Ü+†¨ŠDˆEã‹WVÿP¾ÀY‰EÜZ1À€}Ó „'€}Ó „ƒû„„Àt»ƒ}ä~!‹Eä‹HPVÿR [© Z»u‰Ããÿ€}Ût»ƒ}èu €}ótË€}ÛtË ‹ÿuäVÿP Z9ÃYt ‹SÿuäVÿPPƒÄ ÿEäÇEèÆEÛ1Ò€}Ó t ŠEÓƒè <wº„ÒuÿEè‹EìÿEÔG9EÔ‚ðþÿÿƒ}ä~F‹Eä‹H»PVÿR Z© Yu‰Ããÿ‹ÿuäVÿP %ðÿÿ‹ ÃSÿuäVÿRPƒÄeô[^_]ûëÔÆEÛéóþÿÿ°éãþÿÿ€}ã uóéÎþÿÿU1ɉåWV1ÿSƒì ‹]ÇEðÿÿÿÿÆEï;} s‹UŠ1Ò< tƒè <wº„ÒtGëÜ‹UŠ<#„ t81Ò<‰Ç‹…ìýÿÿŠ@² ;E sŠW…ö…•€û:t|€û(tY€û tD‹U ÿ…ìýÿÿG9•ìýÿÿrĺƒþ„¿ýÿÿƒþtƒþ tFôƒøÒƒâ é¥ýÿÿºé›ýÿÿ€½óýÿÿu³¾ 묾ÂPè¶ëÿÿZ„Àt™€½óýÿÿu¾뎀ú\t‰€ú/t„¾ézÿÿÿƒþ„Pƒþ„4ƒþ„ƒþ„åƒþ„¬ƒþtsƒþ t&ƒþ …:ÿÿÿ€û$…1ÿÿÿ€/…'ÿÿÿ¾ é/ÿÿÿ€ÿ t€û/…ÿÿÿ€^…ÿÿÿ¾ éúþÿÿ€û/t¾ÃPèëêÿÿZ„Àtо éïþÿÿ€^uâëî€û)t%€û „Çþÿÿ¾ÃPè½êÿÿY„À…µþÿÿ¾é«þÿÿ¾ é³þÿÿ€û „€û:„ý€û uÕ1À1ö‹•ìýÿÿ€û •À\;] s?‹E¾¡ƒ8„³hRèYZ…Àtþþw‹UŠCˆ„5ôýÿÿFë¼hGôýÿÿSÆ„5ôýÿÿè^Z…Àu ¾é þÿÿhMSèZY…ÀtåhUSèY^…ÀtÔh[Sè^Z…ÀtÃhhSèZY…Àt²hmSè[^…À¾…«ýÿÿë–¡‹f‹Pf%·ÀéCÿÿÿ€ú …úþÿÿéúþÿÿ¾€ú:…Þþÿÿéqýÿÿ€û,t€û)…“þÿÿ¾éYýÿÿ¾éOýÿÿ¾ÃPèEéÿÿY„À”À¶ðtöé4ýÿÿ€û:…dþÿÿ¾é3ýÿÿ¾ÃP¾è&éÿÿ[éPþÿÿj(ÿuè^_…À„¯üÿÿhtÿuèºY…À[…¼úÿÿéŽüÿÿhÿuè^‹]_] 9؃Îûÿÿh{ÿuèZY…À„·ûÿÿh{ÿuè^_9؃ ûÿÿhÿuèh{ÿu‰ÃèƒÄº9Â@úÿÿéoûÿÿh‚ÿuèZY…À„Aûÿÿh‚ÿuèº^9Ø_‚úÿÿé ûÿÿhˆÿuèY[…À„¡úÿÿhÿuèhˆÿu‰ÃèƒÄº9ÂÀùÿÿépúÿÿ‹U€z-tº <-…ùÿÿé ùÿÿ€z-uèº éùÿÿU‰åVS‹]‹3ÿu ÿuè)ùÿÿYZPÿuSÿVLƒÄ eø[^]ÃU‰åWVSì‹}‹jÿuWÿP<‹ÿuWÿPH‹uƒÄ‰ðE Ç…ðûÿÿ9ƃí‹ðûÿÿÿ…ðûÿÿ;·¨|;·¬| ‹VWÿPXZ‰ð+‡¨¾Dˆ„ôûÿÿÇ…ìûÿÿ;·¨|;·¬| ‹VWÿPY[‹—¨‰ð)оD< „ã9Ö|;·¬| ‹VWÿPXZ‹—¨‰ð)оD< „‚€½ìûÿÿu ½ðûÿÿþv*W‹…ðûÿÿVPÆ„ôûÿÿ…ôûÿÿPèÅþÿÿƒÄÇ…ðûÿÿ‹EFE 9Æ‚ÿÿÿƒ½ðûÿÿueô[^_]ËU‹M WDÿP…ôûÿÿÿµðûÿÿPèzþÿÿƒÄëÕ^9Ó|;Ÿ¬|5‹SWÿPY;Ÿ¨X|;Ÿ¬|¸ < „IÿÿÿÇ…ìûÿÿé:ÿÿÿ+Ÿ¨¾DëÜU1À‰åŠU€ú\t*€ú,t%€ú;t €ú't€ú t€ú"t€ú`t €ú^t€ú~t]øë÷beginendU‰åWVSƒì‹} ‹uÇEà;·¨|;·¬| ‹VWÿPXZ‰ð‹Uà+‡¨F‰ó¾DˆDäB‰Uà;·¨|;·¬| ‹SWÿPYX+Ÿ¨¾D<{•À¶Àƒ}àw…Àu–‹EàuäüÆDä¿j¹1Ûó¦tuä¿p¹ó¦u»eô‰Ø[^_]ÃU‰åWVSƒì‹u‹]‹jSVÿP<‹EƒÄ ‰Eð;ž¨|;ž¬| ‹SVÿP_X‰Ø‰ß+†¨ŠDˆEï‹SVÿPH‹E ZØY‰Eè9ÔŠEï_ˆEç;ž¨| ;ž¬ŒÆ‹SVÿPY;ž¨X| ;ž¬Œ©¸ ˆEï1Ûƒ¾°…t„Ûte_;ž¨|;ž¬|E‹SVÿPX;ž¨Z|;ž¬|,¸ GˆEïG;}èŒlÿÿÿ‹Eè‹HÿuðPVÿRLƒÄ eô[^_]Ã+ž¨¾Dë̃}ðwÊ‹Eðÿ$…`‰ötÉæ:€}ç%„ó€}ç%n€}ç$u”‹GÿÿuðPVÿRLƒÄ ÇEð€}ï$…sÿÿÿG_;ž¨|;ž¬|&‹SVÿPX;ž¨Z|;ž¬| ¸ ˆEïé9ÿÿÿ+ž¨¾Dëë€}ç\…"ÿÿÿ‹GÿÿuðP_VÿRLƒÄ ;ž¨|;ž¬| ‹SVÿPYX+ž¨¾DPèóüÿÿZ…Àt‹_j‰ßSVÿPLƒÄ éXÿÿÿVGPèýÿÿY…À[•À¶À@‰Eðé­þÿÿ‹GÿÿuðPVÿRLÇEðƒÄ é‘þÿÿ€}ï[t"€}ï{t€}ï}t€}ï t€}ï t €}ï …iþÿÿ‹ÿuðWGVÿPLÇEð냀}ç}…Kþÿÿ‹ÿuðWVÿPLÇEð럀}ç$….þÿÿ€}ï$uÝG_;ž¨|;ž¬|#‹SVÿPY;ž¨X|;ž¬| ¸ ˆEïë¦+ž¨¾Dëî€}ç t €}ç …Ôýÿÿ‹GÿÿuðPVÿRL넾Uç‹RVÿY„ÀZ„xýÿÿ»énýÿÿ+ž¨¾DéLýÿÿU‰åVS‹U ‹u…Ò~#‹]‹j\ÿSVÿP<‹SVÿPH‹jSVÿPLƒÄ eø[^]ÃnulllatexerrorlistmakefilepropsdiffbatchU‰åS} ÿÿ‹]t‹]üÉÃû„üƒû„˃û„šƒûtpƒûtIƒût"KuÎjjhÁhˆjh¨èƒÄë¯h@ jhÆh0jhŒèƒÄë¼h@ jhÌhzj hpèƒÄë•h@ jhÖhÊj hTèƒÄékÿÿÿh@ hL hßhr j h8èƒÄé>ÿÿÿh@ h¨håhjhèƒÄé ÿÿÿh8 jhêh¨j hèƒÄéßþÿÿKeywords/ U‰åhÿÿjèþÿÿXZÉÃD ®2»É1ë0ªÊâúT3c-pÖ3é-` ²/Éë ...6.AI.Yl‡.–²ÎÖ.áé.þ.'/.CV^.r….¡˜*¬4Ðä1ùÿ1 1!1,21=C1Y+ú- .*2.GO.^f.u}.‚Œ.¦®.½Å.Þæ.õý. .Z`dhlp7<CH,RY^ej,t{€‡Œ,–¢©®,»ÀÅÊÑÖ,ãèíòùþ,    # ,8 .fileþÿgLexOthers.cxx  , M¨ |¨   Ψ ÷z r  ML  wV  Ê Ë˜ ÞŽ þP (z [, jt 0 ®ˆ Üð  @  8 3D  .textW ƒ.data.bssÄ.ctors_lmBatch_lmDiff_lmProps8_lmMakeTGp_lmLatexŒ_lmNull¨Thw _strchr _strstr _strncmp ´ Í _tolower _atoi ï ù__Z6Is0To9c__Z6Is1To9c__Z18ColouriseBatchLinePcjjjR8WordListR8Accessor__Z17ColouriseBatchDocjiiPP8WordListR8Accessor__Z17ColouriseDiffLinePciR8Accessor__Z16ColouriseDiffDocjiiPP8WordListR8Accessor__Z11FoldDiffDocjiiPP8WordListR8Accessor__Z18ColourisePropsLinePcjjjR8Accessor__Z17ColourisePropsDocjiiPP8WordListR8Accessor__Z12FoldPropsDocjiiPP8WordListR8Accessor__Z17ColouriseMakeLinePcjjjR8Accessor__Z16ColouriseMakeDocjiiPP8WordListR8Accessor__Z8strstartPKcS0___Z22RecogniseErrorListLinePKcj__Z22ColouriseErrorListLinePcjjR8Accessor__Z21ColouriseErrorListDocjiiPP8WordListR8Accessor__Z9isSpecialc__Z5isTagiR8Accessor__Z17ColouriseLatexDocjiiPP8WordListR8Accessor__Z16ColouriseNullDocjiiPP8WordListR8Accessor__Z41__static_initialization_and_destruction_0ii_emptyWordListDesc_batchWordListDesc__GLOBAL__I_lmBatch_lmErrorList__imp____mb_cur_max__imp___pctype__ZN11LexerModuleC1EiPFvjiiPP8WordListR8AccessorEPKcS6_PKS8___ZN8WordList6InListEPKc__Z22CompareCaseInsensitivePKcS0___isctype LexSDLB.o/ 1179327713 0 0 100666 5863 ` Lø.textÐÜ1 `.data@À.bss €À/4T¬ à.ctorsî@ÀU‰åWV1ÿS‹u‹] ƒ}~(;ž¨|;ž¬| ‹SVÿPXZ+ž¨¾D<'t eô‰ø[^_]ÿëïU‰åWVS줋E‹]‹u‹}‹ƒç‰•`ÿÿÿ‹P‰•\ÿÿÿ‹P‹@ ‰•Xÿÿÿ‰…Tÿÿÿ‹jVSÿP<‰ðƒÄ E ‰]Ô‰uÜÇ…Pÿÿÿ‰E؉}äÆEàÆEáÇEèÇEìÇEð‹jVSÿP<ƒÄ ‹EÔ‹VPÿRH‹]ÔX‹uÜZ;³¨| ;³¬Œ¤ ‹VSÿP_;³¨X| ;³¬Œ‡ ¸ ¶À‹MÔ‰Eì1ÛŠU샹°…J „Û…$ j FP1ÛÿuÔè‹MÔ¶À‰EðƒÄ ŠUðƒ¹°…Û „Û…³ ‹Eì1Òƒø „– ƒø t‹EØ9EÜr²ˆUá‹UÜ;U؃ê‹Eäƒø„` ƒø„W ƒø„íƒø„ƒø„ûƒø„Ƀø„*ƒ}ä…Ü‹Eìƒø'„ 1Òƒø-„ì„Ò…°1Òƒø/„ń҅ƒø"„tƒø#„®ƒø&„‘ƒ}ì&„s‹]ìCЃø †Dƒû.„,1öƒû¡ƒ8„ühSèZY…À…݃û_„Ô‰ð„À…ªƒ}ì[„ Š]ì¾óVè_…Àt%¡ƒ8„jhVèY^1Ò…À…Ú€û%„@€û^„7€û&„.€û*„%€û(„€û)„€û-„ €û+„€û=„ø€û|„ï€û{„æ€û}„Ý€û[„Ô€û]„Ë€û:„€û;„¹€û<„°€û>„§€û,„ž€û/„•€û?„Œ€û!„ƒ€û.„z1Ò€û~„o„Ò…Gƒ}ì\„=Š]á„Ût Ç…Pÿÿÿ‹Mì1Òƒù tA÷ƒøwº„Òuÿ…Pÿÿÿ‹UÜuÔ;U؃ÚBˆ]à‰Mè‰EÜùÿ~B‰EÜ‹Eð‹]܉Eì=ÿ~Cj CP1ÿÿuÔè‹MÔ¶À‰EðƒÄ ŠUðƒ¹°un‰ú„ÒuL‹F1Òƒø t:ƒø t‹F9Fr²ˆV ‹UÜ;UØ‚ýÿÿ‹EÔ‹UÜJ‹ÿuäRPÿQLƒÄ eô[^_]Ã~ uÍë¾ÁfCj Pÿ6èƒÄ ¶À F똾ҋRQÿY„ÀZtƒ¿éyÿÿÿÆEàÇEè ÇEì ÇEð ÆEáéyÿÿÿ‹EÔ‹UÜJ‹ÿuäRPÿQLƒÄ ÇEäé£þÿÿºé‡þÿÿ¡‹f‹pf%·ÀéŒýÿÿ‹EÔ‹UÜJ‹ÿuäRPÿQLƒÄ ÇEäébþÿÿ¾é"ýÿÿ¡‹f‹Xf%·Àéúüÿÿ‹Eðƒè0ƒø ‡Åüÿÿ‹EÔ‹UÜJ‹ÿuäRPÿQLƒÄ ÇEäéþÿÿÿuðè[ƒøo…{üÿÿëÌÿuðè^ƒøh…]üÿÿ븃½Pÿÿÿ„ƒø#…<üÿÿ¿‹]Ô‹uÜþ;³¨|;³¬|]‹VSÿPX;³¨Z|;³¬|D¸ G¾Àƒÿc ƒø t¼ƒø t·ƒè0ƒø ‡·þÿÿ‹EÔ‹UÜJ‹ÿuäRPÿQLƒÄ ÇEäéZýÿÿ+³¨¾D3ë´‹EÔ‹UÜJ‹ÿuäRPÿQLƒÄ ÇEäé-ýÿÿ‹EÔ‹UÜJ‹ÿuäRPÿQLƒÄ ÇEäé ýÿÿ‹EÔ‹ÿuä‹UÜJRPÿQLƒÄ ÇEäéíüÿÿƒ}ð/…1ûÿÿºé'ûÿÿƒ}ð-… ûÿÿºéûÿÿ‹EÔ‹jë·ƒ}ì#tm‹]ð1öƒûY¡ƒ8„ahSèY_…À…Bƒû|„9ƒû-„0ƒû/„'ƒû:„ƒû „ƒû „ ‰ð„À…cúÿÿ‹MÜuÔ;M؃ԊEá‹UìˆEà‰UèAúÿ‰EÜ~A‰EÜ‹Eð‹]܉Eì=ÿ~Cj CP1ÿÿuÔè‹MÔ¶À‰EðƒÄ ŠUðƒ¹°ue‰ú„ÒuC‹F1Òƒø t1ƒø t‹F9Fr²ˆV ‹‹ÿv‹VJRPÿQLƒÄ ÇFéºùÿÿƒ~ uÖëÇÁfCj Pÿ6èƒÄ ¶À F롾ҋRQÿY„ÀZtŒ¿ë…ÆEàÇEè ÇEì ÇEð ÆEá눾éêþÿÿ¡‹f‹Xf%·Àé•þÿÿ€}á„6ùÿÿ‹EÔ‹j‹UÜJRPÿQLƒÄ ÇEäéùÿÿ€}á„ ùÿÿ‹EÔ‹jëÕ‹Mìƒù"tAŠEá„À„ñøÿÿ‹UÜuÔÇEä ;U؃[ÿÿÿˆEà‰MèBùÿ‰EÜB‰þÿÿé‡þÿÿÿuðè[ƒøc„‡‹MÜuÔ;M؃ÿÿÿŠEá‹UìˆEà‰UèAúÿ‰EÜ~A‰EÜ‹Eð‹]܉Eì=ÿ~Cj CP1ÿÿuÔè‹MÔ¶À‰EðƒÄ ŠUðƒ¹°u ‰ø„ÀéAþÿÿ¾Ò‹RQÿZ„ÀYtè¿ëá‹MÜuÔ;M؃ºŠEá‹UìˆEà‰UèAúÿ‰EÜ~A‰EÜ‹Eð‹]܉Eì=ÿ~Cj CP1ÿÿuÔè‹MÔ¶À‰EðƒÄ ŠUðƒ¹°uK‰ú„Òu)‹F1Òƒø tƒø t‹F9Fr²ˆV éêþÿÿƒ~ uðëáÁfCj Pÿ6èƒÄ ¶À F뻾ҋRQÿZ„ÀYt¦¿ëŸÆEàÇEè ÇEì ÇEð ÆEáéŽþÿÿ‹]ì1öƒû<¡ƒ8t9hSè_Z…Àu!ƒû.tƒû_t‰ð„À…þöÿÿ‹EÔ‹ÿuäéÂýÿÿ¾ëâ¡‹f‹Xf%·ÀëÀ‹]ì1öƒûÑ¡ƒ8„ÍhSè_Z…À…®ƒû.„¥ƒû_„œ‰ð„À…‰öÿÿƒ}ì]„©jddÿÿÿSEÔPè1ÀƒÄ „Àtü‰ßƒÉÿò®÷ÑÆ„)bÿÿÿSÿµ`ÿÿÿè^_„Àt ÇEäé6ÿÿÿSÿµ\ÿÿÿèZY„Àt ÇEä éÿÿÿSÿµXÿÿÿè^_„Àt ÇEä éúþÿÿSÿµTÿÿÿèY[„À„äþÿÿÇEä éØþÿÿ‹MÜ]Ô;M؃®ŠEáQˆEà‰UÜ‹Eð‰ÖÇEè]‰Eì=ÿ~qj FP1ÿÿuÔè‹MÔ¶À‰EðƒÄ ŠUðƒ¹°uK‰ú„Òu)‹C1Òƒø tƒø t‹C9Cr²ˆS éÔþÿÿƒ{ uðëáÁcFj Pÿ3èƒÄ ¶À C뻾ҋRQÿZ„ÀYt¦¿ëŸÆEàÇEè ÇEì ÇEð ÆEáéxþÿÿ¾éZþÿÿ¡‹f‹Xf%·Àé)þÿÿ‹EÔ‹jéžûÿÿƒ}ð …môÿÿé[ôÿÿj FPÿuÔÁeðèƒÄ ¶À Eðé-ôÿÿ¾Ò‹RQÿY„À_„ôÿÿ»éôÿÿj FVÿuÔÁeìèƒÄ ¶À Eìé¾óÿÿ¾Ò‹RQÿZ„ÀY„£óÿÿ»é™óÿÿ‰ð+ƒ¨¾DélóÿÿU‰åWVSƒì$‹]‹E ‹u؉Eè‹SVÿP‰Ç…ÛXZt…ÿ~ O‹WVÿPY‰ÃX‹UðhRWVÇEðÿPTƒÄ‰Eä;ž¨|;ž¬| ‹SVÿPXZ‰Ø+†¨ŠD‰]܈Eã‹Eè9Ã}fŠUã‹]܈UÛC;ž¨| ;ž¬Œá‹SVÿPY;ž¨X| ;ž¬ŒÄ¸ ˆEã€}Û „¥€}Û t‹Eè9EÜt‹UèÿEÜ9UÜ|šeô[^_]ËEðh‹]äPGPVÿRTƒÄ‰EÔ÷Ãu‰Ú%ÿâÿ‰UÐ9Â|D÷EÔu‹EÔ‰Eä‹SWGVÿPPƒÄ 똋EìhPGPVÇEìÿRT%ÿƒÄ9EÐ}ÅË ë½< …tÿÿÿéNÿÿÿ+ž¨¾Dé1ÿÿÿsdlbU‰å} ÿÿtÉÃ}uøh¨h¸ hLhNjhèƒÄëÓKeywordsuser1user2user3‰ö‹”š U‰åhÿÿjè‡ÿÿÿXZÉÃU‰åVSP‹uŠE‹] ˆE÷;ž¨|;ž¬|$‹SVÿPY;ž¨X|;ž¬| ¾E÷eø[^]Ã+ž¨¾Dëì¼S n‚µ¿ÓG  7xÁÕ$8Ò D “2 Œ  k ½ Í  " 6 x Ÿ ½ Û ù S « ý < w ô ±  g l q v }‚¨ ¬ ° ´  .fileþÿgLexSDLB.cxx) FN t¸  R Ψ༠óS .textÏ1.data.bss.ctors_lmSDLB8L[ ˜ ± _isascii _tolower Û å.text$_ZN8Accessor13SafeGetCharAtEic__Z11IsVBCommentR8Accessorii__Z16ColouriseSDLBDocjiiPP8WordListR8Accessor__Z11FoldSDLBDocjiiPP8WordListR8Accessor__Z41__static_initialization_and_destruction_0ii_sdlbWordListDesc__GLOBAL__I_lmSDLB.text$_ZN8Accessor13SafeGetCharAtEic__ZN8Accessor13SafeGetCharAtEic__imp____mb_cur_max__imp___pctype__ZN11LexerModuleC1EiPFvjiiPP8WordListR8AccessorEPKcS6_PKS8___ZN8WordList6InListEPKc__ZN12StyleContext17GetCurrentLoweredEPcj__isctype usr/src/sdlBasic/src/sdlBasic/scintilla/win32/scintilla.mak0000777000076500007660000002476110463136373021077 0ustar # Make file for Scintilla on Windows Visual C++ and Borland C++ version # Copyright 1998-2003 by Neil Hodgson # The License.txt file describes the conditions under which this software may be distributed. # This makefile is for using Visual C++ with nmake or Borland C++ with make depending on # the setting of the VENDOR macro. If no VENDOR is defined n the command line then # the tool used is automatically detected. # Usage for Microsoft: # nmake -f scintilla.mak # Usage for Borland: # make -f scintilla.mak # For debug versions define DEBUG on the command line, for Borland: # make DEBUG=1 -f scintilla.mak # The main makefile uses mingw32 gcc and may be more current than this file. .SUFFIXES: .cxx DIR_O=. DIR_BIN=..\bin COMPONENT=$(DIR_BIN)\Scintilla.dll LEXCOMPONENT=$(DIR_BIN)\SciLexer.dll !IFNDEF VENDOR !IFDEF _NMAKE_VER #Microsoft nmake so make default VENDOR MICROSOFT VENDOR=MICROSOFT !ELSE VENDOR=BORLAND !ENDIF !ENDIF !IF "$(VENDOR)"=="MICROSOFT" CC=cl RC=rc LD=link CXXFLAGS=-Zi -TP -W4 -Zc:forScope -Zc:wchar_t # For something scary:-Wp64 CXXDEBUG=-Od -MTd -DDEBUG CXXNDEBUG=-O1 -MT -DNDEBUG -GL NAME=-Fo LDFLAGS=-OPT:NOWIN98 -OPT:REF -LTCG -DEBUG LDDEBUG= LIBS=KERNEL32.lib USER32.lib GDI32.lib IMM32.lib OLE32.LIB NOLOGO=-nologo !ELSE # BORLAND CC=bcc32 RC=brcc32 -r LD=ilink32 CXXFLAGS=-P -tWM -w -w-prc -w-inl -w-pin -RT- -x- # Above turns off warnings for clarfying parentheses and inlines with for not expanded CXXDEBUG=-Od -v -DDEBUG CXXNDEBUG=-O1 -DNDEBUG NAME=-o LDFLAGS=-Gn -x -c LDDEBUG=-v LIBS=import32 cw32mt NOLOGO=-q !ENDIF !IFDEF QUIET CC=@$(CC) CXXFLAGS=$(CXXFLAGS) $(NOLOGO) LDFLAGS=$(LDFLAGS) $(NOLOGO) !ENDIF !IFDEF DEBUG CXXFLAGS=$(CXXFLAGS) $(CXXDEBUG) LDFLAGS=$(LDDEBUG) $(LDFLAGS) !ELSE CXXFLAGS=$(CXXFLAGS) $(CXXNDEBUG) !ENDIF INCLUDEDIRS=-I../include -I../src CXXFLAGS=$(CXXFLAGS) $(INCLUDEDIRS) ALL: $(COMPONENT) $(LEXCOMPONENT) $(DIR_O)\ScintillaWinS.obj $(DIR_O)\WindowAccessor.obj clean: -del /q $(DIR_O)\*.obj $(DIR_O)\*.pdb $(COMPONENT) $(LEXCOMPONENT) \ $(DIR_O)\*.res $(DIR_BIN)\*.map $(DIR_BIN)\*.exp $(DIR_BIN)\*.pdb $(DIR_BIN)\*.lib SOBJS=\ $(DIR_O)\AutoComplete.obj \ $(DIR_O)\CallTip.obj \ $(DIR_O)\CellBuffer.obj \ $(DIR_O)\ContractionState.obj \ $(DIR_O)\Document.obj \ $(DIR_O)\Editor.obj \ $(DIR_O)\Indicator.obj \ $(DIR_O)\KeyMap.obj \ $(DIR_O)\LineMarker.obj \ $(DIR_O)\PlatWin.obj \ $(DIR_O)\PropSet.obj \ $(DIR_O)\RESearch.obj \ $(DIR_O)\ScintillaBase.obj \ $(DIR_O)\ScintillaWin.obj \ $(DIR_O)\Style.obj \ $(DIR_O)\UniConversion.obj \ $(DIR_O)\ViewStyle.obj \ $(DIR_O)\XPM.obj #++Autogenerated -- run src/LexGen.py to regenerate #**LEXOBJS=\\\n\(\t$(DIR_O)\\\*.obj \\\n\) LEXOBJS=\ $(DIR_O)\LexOthers.obj \ $(DIR_O)\LexSDLB.obj \ #--Autogenerated -- end of automatically generated section LOBJS=\ $(DIR_O)\AutoComplete.obj \ $(DIR_O)\CallTip.obj \ $(DIR_O)\CellBuffer.obj \ $(DIR_O)\ContractionState.obj \ $(DIR_O)\Document.obj \ $(DIR_O)\DocumentAccessor.obj \ $(DIR_O)\Editor.obj \ $(DIR_O)\ExternalLexer.obj \ $(DIR_O)\Indicator.obj \ $(DIR_O)\KeyMap.obj \ $(DIR_O)\KeyWords.obj \ $(DIR_O)\LineMarker.obj \ $(DIR_O)\PlatWin.obj \ $(DIR_O)\RESearch.obj \ $(DIR_O)\PropSet.obj \ $(DIR_O)\ScintillaBaseL.obj \ $(DIR_O)\ScintillaWinL.obj \ $(DIR_O)\Style.obj \ $(DIR_O)\StyleContext.obj \ $(DIR_O)\UniConversion.obj \ $(DIR_O)\ViewStyle.obj \ $(DIR_O)\XPM.obj \ $(LEXOBJS) $(DIR_O)\ScintRes.res : ScintRes.rc $(RC) -fo$@ $** !IF "$(VENDOR)"=="MICROSOFT" $(COMPONENT): $(SOBJS) $(DIR_O)\ScintRes.res $(LD) $(LDFLAGS) -DEF:Scintilla.def -DLL -OUT:$@ $** $(LIBS) $(LEXCOMPONENT): $(LOBJS) $(DIR_O)\ScintRes.res $(LD) $(LDFLAGS) -DEF:Scintilla.def -DLL -OUT:$@ $** $(LIBS) !ELSE $(COMPONENT): $(SOBJS) $(DIR_O)\ScintRes.res $(LD) $(LDFLAGS) -Tpd c0d32 $(SOBJS), $@, , $(LIBS), , $(DIR_O)\ScintRes.res $(LEXCOMPONENT): $(LOBJS) $(DIR_O)\ScintRes.res $(LD) $(LDFLAGS) -Tpd c0d32 $(LOBJS), $@, , $(LIBS), , $(DIR_O)\ScintRes.res !ENDIF # Define how to build all the objects and what they depend on # Most of the source is in ..\src with a couple in this directory {..\src}.cxx{$(DIR_O)}.obj: $(CC) $(CXXFLAGS) -c $(NAME)$@ $< {.}.cxx{$(DIR_O)}.obj: $(CC) $(CXXFLAGS) -c $(NAME)$@ $< # Some source files are compiled into more than one object because of different conditional compilation $(DIR_O)\ScintillaBaseL.obj: ..\src\ScintillaBase.cxx $(CC) $(CXXFLAGS) -DSCI_LEXER -c $(NAME)$@ ..\src\ScintillaBase.cxx $(DIR_O)\ScintillaWinL.obj: ScintillaWin.cxx $(CC) $(CXXFLAGS) -DSCI_LEXER -c $(NAME)$@ ScintillaWin.cxx $(DIR_O)\ScintillaWinS.obj: ScintillaWin.cxx $(CC) $(CXXFLAGS) -DSTATIC_BUILD -c $(NAME)$@ ScintillaWin.cxx # Dependencies # All lexers depend on this set of headers LEX_HEADERS=..\include\Platform.h ..\include\PropSet.h \ ..\include\SString.h ..\include\Accessor.h ..\include\KeyWords.h \ ..\include\Scintilla.h ..\include\SciLexer.h ..\src\StyleContext.h $(DIR_O)\AutoComplete.obj: ../src/AutoComplete.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../src/AutoComplete.h $(DIR_O)\CallTip.obj: ../src/CallTip.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/CallTip.h $(DIR_O)\CellBuffer.obj: ../src/CellBuffer.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/SVector.h ../src/CellBuffer.h $(DIR_O)\ContractionState.obj: ../src/ContractionState.cxx ../include/Platform.h \ ../src/ContractionState.h $(DIR_O)\Document.obj: ../src/Document.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/SVector.h ../src/CellBuffer.h \ ../src/Document.h ../src/RESearch.h $(DIR_O)\DocumentAccessor.obj: ../src/DocumentAccessor.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../src/SVector.h \ ../include/Accessor.h ../src/DocumentAccessor.h ../src/CellBuffer.h \ ../include/Scintilla.h ../src/Document.h $(DIR_O)\Editor.obj: ../src/Editor.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/ContractionState.h ../src/SVector.h \ ../src/CellBuffer.h ../src/KeyMap.h ../src/Indicator.h \ ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \ ../src/Document.h ../src/Editor.h ../src/XPM.h $(DIR_O)\ExternalLexer.obj: ../src/ExternalLexer.cxx ../include/Platform.h \ ../include/SciLexer.h ../include/PropSet.h ../include/SString.h \ ../include/Accessor.h ../src/DocumentAccessor.h ../include/KeyWords.h \ ../src/ExternalLexer.h $(DIR_O)\Indicator.obj: ../src/Indicator.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/Indicator.h $(DIR_O)\KeyMap.obj: ../src/KeyMap.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/KeyMap.h $(DIR_O)\KeyWords.obj: ../src/KeyWords.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h #++Autogenerated -- run src/LexGen.py to regenerate #**\n\($(DIR_O)\\\*.obj: ..\\src\\\*.cxx $(LEX_HEADERS)\n\n\) $(DIR_O)\LexOthers.obj: ..\src\LexOthers.cxx $(LEX_HEADERS) $(DIR_O)\LexSDLB.obj: ..\src\LexSDLB.cxx $(LEX_HEADERS) #--Autogenerated -- end of automatically generated section $(DIR_O)\LineMarker.obj: ../src/LineMarker.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/LineMarker.h ../src/XPM.h $(DIR_O)\PlatWin.obj: PlatWin.cxx ../include/Platform.h PlatformRes.h \ ../src/UniConversion.h ../src/XPM.h $(DIR_O)\PropSet.obj: ../src/PropSet.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h $(DIR_O)\RESearch.obj: ../src/RESearch.cxx ../src/RESearch.h $(DIR_O)\ScintillaBase.obj: ../src/ScintillaBase.cxx ../include/Platform.h \ ../include/Scintilla.h ../include/PropSet.h ../include/SString.h \ ../src/ContractionState.h ../src/SVector.h ../src/CellBuffer.h \ ../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h \ ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \ ../src/AutoComplete.h ../src/Document.h ../src/Editor.h \ ../src/ScintillaBase.h ../src/XPM.h $(DIR_O)\ScintillaBaseL.obj: ..\src\ScintillaBase.cxx ..\include\Platform.h ..\include\Scintilla.h ..\include\SciLexer.h \ ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \ ..\src\ScintillaBase.h ..\include\PropSet.h ..\include\SString.h ..\include\Accessor.h \ ..\src\DocumentAccessor.h ..\include\KeyWords.h ../src/XPM.h $(DIR_O)\ScintillaWin.obj: ScintillaWin.cxx ../include/Platform.h \ ../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \ ../src/SVector.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \ ../src/Indicator.h ../src/LineMarker.h ../src/Style.h \ ../src/AutoComplete.h ../src/ViewStyle.h ../src/Document.h \ ../src/Editor.h ../src/ScintillaBase.h ../src/UniConversion.h ../src/XPM.h $(DIR_O)\ScintillaWinL.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h ..\include\SciLexer.h \ ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \ ..\src\ScintillaBase.h ..\include\PropSet.h \ ..\include\SString.h ..\include\Accessor.h ..\include\KeyWords.h ..\src\UniConversion.h ../src/XPM.h $(DIR_O)\ScintillaWinS.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h \ ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \ ..\src\ScintillaBase.h ..\src\UniConversion.h $(DIR_O)\Style.obj: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \ ../src/Style.h $(DIR_O)\StyleContext.obj: ../src/StyleContext.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../src/StyleContext.h $(DIR_O)\UniConversion.obj: ../src/UniConversion.cxx ../src/UniConversion.h $(DIR_O)\ViewStyle.obj: ../src/ViewStyle.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/Indicator.h ../src/LineMarker.h \ ../src/Style.h ../src/ViewStyle.h ../src/XPM.h $(DIR_O)\WindowAccessor.obj: ../src/WindowAccessor.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../include/WindowAccessor.h ../include/Scintilla.h $(DIR_O)\XPM.obj: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h usr/src/sdlBasic/src/sdlBasic/scintilla/win32/compile.bat0000777000076500007660000000020210463136373020523 0ustar rem WARNING!!! verify the correct path of mingGw set MINGWPATH=c:\devel\c-cpp\mingw @path %MINGWPATH%\bin;%PATH% mingw32-make usr/src/sdlBasic/src/sdlBasic/scintilla/win32/PlatWin.cxx0000777000076500007660000015412110463136265020517 0ustar // Scintilla source code edit control /** @file PlatWin.cxx ** Implementation of platform facilities on Windows. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #define _WIN32_WINNT 0x0400 #include #include #include #include #include "Platform.h" #include "PlatformRes.h" #include "UniConversion.h" #include "XPM.h" #ifndef IDC_HAND #define IDC_HAND MAKEINTRESOURCE(32649) #endif // Take care of 32/64 bit pointers #ifdef GetWindowLongPtr static void *PointerFromWindow(HWND hWnd) { return reinterpret_cast(::GetWindowLongPtr(hWnd, 0)); } static void SetWindowPointer(HWND hWnd, void *ptr) { ::SetWindowLongPtr(hWnd, 0, reinterpret_cast(ptr)); } #else static void *PointerFromWindow(HWND hWnd) { return reinterpret_cast(::GetWindowLong(hWnd, 0)); } static void SetWindowPointer(HWND hWnd, void *ptr) { ::SetWindowLong(hWnd, 0, reinterpret_cast(ptr)); } #endif static CRITICAL_SECTION crPlatformLock; static HINSTANCE hinstPlatformRes = 0; static bool onNT = false; bool IsNT() { return onNT; } Point Point::FromLong(long lpoint) { return Point(static_cast(LOWORD(lpoint)), static_cast(HIWORD(lpoint))); } static RECT RectFromPRectangle(PRectangle prc) { RECT rc = {prc.left, prc.top, prc.right, prc.bottom}; return rc; } Palette::Palette() { used = 0; allowRealization = false; hpal = 0; } Palette::~Palette() { Release(); } void Palette::Release() { used = 0; if (hpal) ::DeleteObject(hpal); hpal = 0; } /** * This method either adds a colour to the list of wanted colours (want==true) * or retrieves the allocated colour back to the ColourPair. * This is one method to make it easier to keep the code for wanting and retrieving in sync. */ void Palette::WantFind(ColourPair &cp, bool want) { if (want) { for (int i=0; i < used; i++) { if (entries[i].desired == cp.desired) return; } if (used < numEntries) { entries[used].desired = cp.desired; entries[used].allocated.Set(cp.desired.AsLong()); used++; } } else { for (int i=0; i < used; i++) { if (entries[i].desired == cp.desired) { cp.allocated = entries[i].allocated; return; } } cp.allocated.Set(cp.desired.AsLong()); } } void Palette::Allocate(Window &) { if (hpal) ::DeleteObject(hpal); hpal = 0; if (allowRealization) { char *pal = new char[sizeof(LOGPALETTE) + (used-1) * sizeof(PALETTEENTRY)]; LOGPALETTE *logpal = reinterpret_cast(pal); logpal->palVersion = 0x300; logpal->palNumEntries = static_cast(used); for (int iPal=0;iPalpalPalEntry[iPal].peRed = static_cast(desired.GetRed()); logpal->palPalEntry[iPal].peGreen = static_cast(desired.GetGreen()); logpal->palPalEntry[iPal].peBlue = static_cast(desired.GetBlue()); entries[iPal].allocated.Set( PALETTERGB(desired.GetRed(), desired.GetGreen(), desired.GetBlue())); // PC_NOCOLLAPSE means exact colours allocated even when in background this means other windows // are less likely to get their colours and also flashes more when switching windows logpal->palPalEntry[iPal].peFlags = PC_NOCOLLAPSE; // 0 allows approximate colours when in background, yielding moe colours to other windows //logpal->palPalEntry[iPal].peFlags = 0; } hpal = ::CreatePalette(logpal); delete []pal; } } static void SetLogFont(LOGFONT &lf, const char *faceName, int characterSet, int size, bool bold, bool italic) { memset(&lf, 0, sizeof(lf)); // The negative is to allow for leading lf.lfHeight = -(abs(size)); lf.lfWeight = bold ? FW_BOLD : FW_NORMAL; lf.lfItalic = static_cast(italic ? 1 : 0); lf.lfCharSet = static_cast(characterSet); strncpy(lf.lfFaceName, faceName, sizeof(lf.lfFaceName)); } /** * Create a hash from the parameters for a font to allow easy checking for identity. * If one font is the same as another, its hash will be the same, but if the hash is the * same then they may still be different. */ static int HashFont(const char *faceName, int characterSet, int size, bool bold, bool italic) { return size ^ (characterSet << 10) ^ (bold ? 0x10000000 : 0) ^ (italic ? 0x20000000 : 0) ^ faceName[0]; } class FontCached : Font { FontCached *next; int usage; LOGFONT lf; int hash; FontCached(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_); ~FontCached() {} bool SameAs(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_); virtual void Release(); static FontCached *first; public: static FontID FindOrCreate(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_); static void ReleaseId(FontID id_); }; FontCached *FontCached::first = 0; FontCached::FontCached(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_) : next(0), usage(0), hash(0) { ::SetLogFont(lf, faceName_, characterSet_, size_, bold_, italic_); hash = HashFont(faceName_, characterSet_, size_, bold_, italic_); id = ::CreateFontIndirect(&lf); usage = 1; } bool FontCached::SameAs(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_) { return (lf.lfHeight == -(abs(size_))) && (lf.lfWeight == (bold_ ? FW_BOLD : FW_NORMAL)) && (lf.lfItalic == static_cast(italic_ ? 1 : 0)) && (lf.lfCharSet == characterSet_) && 0 == strcmp(lf.lfFaceName,faceName_); } void FontCached::Release() { if (id) ::DeleteObject(id); id = 0; } FontID FontCached::FindOrCreate(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_) { FontID ret = 0; ::EnterCriticalSection(&crPlatformLock); int hashFind = HashFont(faceName_, characterSet_, size_, bold_, italic_); for (FontCached *cur=first; cur; cur=cur->next) { if ((cur->hash == hashFind) && cur->SameAs(faceName_, characterSet_, size_, bold_, italic_)) { cur->usage++; ret = cur->id; } } if (ret == 0) { FontCached *fc = new FontCached(faceName_, characterSet_, size_, bold_, italic_); if (fc) { fc->next = first; first = fc; ret = fc->id; } } ::LeaveCriticalSection(&crPlatformLock); return ret; } void FontCached::ReleaseId(FontID id_) { ::EnterCriticalSection(&crPlatformLock); FontCached **pcur=&first; for (FontCached *cur=first; cur; cur=cur->next) { if (cur->id == id_) { cur->usage--; if (cur->usage == 0) { *pcur = cur->next; cur->Release(); cur->next = 0; delete cur; } break; } pcur=&cur->next; } ::LeaveCriticalSection(&crPlatformLock); } Font::Font() { id = 0; } Font::~Font() { } #define FONTS_CACHED void Font::Create(const char *faceName, int characterSet, int size, bool bold, bool italic, bool) { Release(); #ifndef FONTS_CACHED LOGFONT lf; ::SetLogFont(lf, faceName, characterSet, size, bold, italic); id = ::CreateFontIndirect(&lf); #else id = FontCached::FindOrCreate(faceName, characterSet, size, bold, italic); #endif } void Font::Release() { #ifndef FONTS_CACHED if (id) ::DeleteObject(id); #else if (id) FontCached::ReleaseId(id); #endif id = 0; } class SurfaceImpl : public Surface { bool unicodeMode; HDC hdc; bool hdcOwned; HPEN pen; HPEN penOld; HBRUSH brush; HBRUSH brushOld; HFONT font; HFONT fontOld; HBITMAP bitmap; HBITMAP bitmapOld; HPALETTE paletteOld; int maxWidthMeasure; int maxLenText; void BrushColor(ColourAllocated back); void SetFont(Font &font_); // Private so SurfaceImpl objects can not be copied SurfaceImpl(const SurfaceImpl &) : Surface() {} SurfaceImpl &operator=(const SurfaceImpl &) { return *this; } public: SurfaceImpl(); virtual ~SurfaceImpl(); void Init(WindowID wid); void Init(SurfaceID sid, WindowID wid); void InitPixMap(int width, int height, Surface *surface_, WindowID wid); void Release(); bool Initialised(); void PenColour(ColourAllocated fore); int LogPixelsY(); int DeviceHeightFont(int points); void MoveTo(int x_, int y_); void LineTo(int x_, int y_); void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back); void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back); void FillRectangle(PRectangle rc, ColourAllocated back); void FillRectangle(PRectangle rc, Surface &surfacePattern); void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back); void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back); void Copy(PRectangle rc, Point from, Surface &surfaceSource); void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back); void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back); void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore); void MeasureWidths(Font &font_, const char *s, int len, int *positions); int WidthText(Font &font_, const char *s, int len); int WidthChar(Font &font_, char ch); int Ascent(Font &font_); int Descent(Font &font_); int InternalLeading(Font &font_); int ExternalLeading(Font &font_); int Height(Font &font_); int AverageCharWidth(Font &font_); int SetPalette(Palette *pal, bool inBackGround); void SetClip(PRectangle rc); void FlushCachedState(); void SetUnicodeMode(bool unicodeMode_); void SetDBCSMode(int codePage); }; SurfaceImpl::SurfaceImpl() : unicodeMode(false), hdc(0), hdcOwned(false), pen(0), penOld(0), brush(0), brushOld(0), font(0), fontOld(0), bitmap(0), bitmapOld(0), paletteOld(0) { // Windows 9x has only a 16 bit coordinate system so break after 30000 pixels maxWidthMeasure = IsNT() ? 1000000 : 30000; // There appears to be a 16 bit string length limit in GDI on NT and a limit of // 8192 characters on Windows 95. maxLenText = IsNT() ? 65535 : 8192; } SurfaceImpl::~SurfaceImpl() { Release(); } void SurfaceImpl::Release() { if (penOld) { ::SelectObject(reinterpret_cast(hdc), penOld); ::DeleteObject(pen); penOld = 0; } pen = 0; if (brushOld) { ::SelectObject(reinterpret_cast(hdc), brushOld); ::DeleteObject(brush); brushOld = 0; } brush = 0; if (fontOld) { // Fonts are not deleted as they are owned by a Font object ::SelectObject(reinterpret_cast(hdc), fontOld); fontOld = 0; } font = 0; if (bitmapOld) { ::SelectObject(reinterpret_cast(hdc), bitmapOld); ::DeleteObject(bitmap); bitmapOld = 0; } bitmap = 0; if (paletteOld) { // Fonts are not deleted as they are owned by a Palette object ::SelectPalette(reinterpret_cast(hdc), reinterpret_cast(paletteOld), TRUE); paletteOld = 0; } if (hdcOwned) { ::DeleteDC(reinterpret_cast(hdc)); hdc = 0; hdcOwned = false; } } bool SurfaceImpl::Initialised() { return hdc != 0; } void SurfaceImpl::Init(WindowID) { Release(); hdc = ::CreateCompatibleDC(NULL); hdcOwned = true; ::SetTextAlign(reinterpret_cast(hdc), TA_BASELINE); } void SurfaceImpl::Init(SurfaceID sid, WindowID) { Release(); hdc = reinterpret_cast(sid); ::SetTextAlign(reinterpret_cast(hdc), TA_BASELINE); } void SurfaceImpl::InitPixMap(int width, int height, Surface *surface_, WindowID) { Release(); hdc = ::CreateCompatibleDC(static_cast(surface_)->hdc); hdcOwned = true; bitmap = ::CreateCompatibleBitmap(static_cast(surface_)->hdc, width, height); bitmapOld = static_cast(::SelectObject(hdc, bitmap)); ::SetTextAlign(reinterpret_cast(hdc), TA_BASELINE); } void SurfaceImpl::PenColour(ColourAllocated fore) { if (pen) { ::SelectObject(hdc, penOld); ::DeleteObject(pen); pen = 0; penOld = 0; } pen = ::CreatePen(0,1,fore.AsLong()); penOld = static_cast(::SelectObject(reinterpret_cast(hdc), pen)); } void SurfaceImpl::BrushColor(ColourAllocated back) { if (brush) { ::SelectObject(hdc, brushOld); ::DeleteObject(brush); brush = 0; brushOld = 0; } // Only ever want pure, non-dithered brushes ColourAllocated colourNearest = ::GetNearestColor(hdc, back.AsLong()); brush = ::CreateSolidBrush(colourNearest.AsLong()); brushOld = static_cast(::SelectObject(hdc, brush)); } void SurfaceImpl::SetFont(Font &font_) { if (font_.GetID() != font) { if (fontOld) { ::SelectObject(hdc, font_.GetID()); } else { fontOld = static_cast(::SelectObject(hdc, font_.GetID())); } font = reinterpret_cast(font_.GetID()); } } int SurfaceImpl::LogPixelsY() { return ::GetDeviceCaps(hdc, LOGPIXELSY); } int SurfaceImpl::DeviceHeightFont(int points) { return ::MulDiv(points, LogPixelsY(), 72); } void SurfaceImpl::MoveTo(int x_, int y_) { ::MoveToEx(hdc, x_, y_, 0); } void SurfaceImpl::LineTo(int x_, int y_) { ::LineTo(hdc, x_, y_); } void SurfaceImpl::Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back) { PenColour(fore); BrushColor(back); ::Polygon(hdc, reinterpret_cast(pts), npts); } void SurfaceImpl::RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back) { PenColour(fore); BrushColor(back); ::Rectangle(hdc, rc.left, rc.top, rc.right, rc.bottom); } void SurfaceImpl::FillRectangle(PRectangle rc, ColourAllocated back) { // Using ExtTextOut rather than a FillRect ensures that no dithering occurs. // There is no need to allocate a brush either. RECT rcw = RectFromPRectangle(rc); ::SetBkColor(hdc, back.AsLong()); ::ExtTextOut(hdc, rc.left, rc.top, ETO_OPAQUE, &rcw, TEXT(""), 0, NULL); } void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern) { HBRUSH br; if (static_cast(surfacePattern).bitmap) br = ::CreatePatternBrush(static_cast(surfacePattern).bitmap); else // Something is wrong so display in red br = ::CreateSolidBrush(RGB(0xff, 0, 0)); RECT rcw = RectFromPRectangle(rc); ::FillRect(hdc, &rcw, br); ::DeleteObject(br); } void SurfaceImpl::RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back) { PenColour(fore); BrushColor(back); ::RoundRect(hdc, rc.left + 1, rc.top, rc.right - 1, rc.bottom, 8, 8 ); } void SurfaceImpl::Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back) { PenColour(fore); BrushColor(back); ::Ellipse(hdc, rc.left, rc.top, rc.right, rc.bottom); } void SurfaceImpl::Copy(PRectangle rc, Point from, Surface &surfaceSource) { ::BitBlt(hdc, rc.left, rc.top, rc.Width(), rc.Height(), static_cast(surfaceSource).hdc, from.x, from.y, SRCCOPY); } #define MAX_US_LEN 10000 void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back) { SetFont(font_); ::SetTextColor(hdc, fore.AsLong()); ::SetBkColor(hdc, back.AsLong()); RECT rcw = RectFromPRectangle(rc); if (unicodeMode) { wchar_t tbuf[MAX_US_LEN]; int tlen = UCS2FromUTF8(s, len, tbuf, sizeof(tbuf)/sizeof(wchar_t)-1); tbuf[tlen] = L'\0'; ::ExtTextOutW(hdc, rc.left, ybase, ETO_OPAQUE, &rcw, tbuf, tlen, NULL); } else { ::ExtTextOut(hdc, rc.left, ybase, ETO_OPAQUE, &rcw, s, Platform::Minimum(len, maxLenText), NULL); } } void SurfaceImpl::DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back) { SetFont(font_); ::SetTextColor(hdc, fore.AsLong()); ::SetBkColor(hdc, back.AsLong()); RECT rcw = RectFromPRectangle(rc); if (unicodeMode) { wchar_t tbuf[MAX_US_LEN]; int tlen = UCS2FromUTF8(s, len, tbuf, sizeof(tbuf)/sizeof(wchar_t)-1); tbuf[tlen] = L'\0'; ::ExtTextOutW(hdc, rc.left, ybase, ETO_OPAQUE | ETO_CLIPPED, &rcw, tbuf, tlen, NULL); } else { ::ExtTextOut(hdc, rc.left, ybase, ETO_OPAQUE | ETO_CLIPPED, &rcw, s, Platform::Minimum(len, maxLenText), NULL); } } void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore) { // Avoid drawing spaces in transparent mode for (int i=0;i(s); int i=0; while (ui= 0x80) { if (uch < (0x80 + 0x40 + 0x20)) { positions[i++] = poses[ui]; } else { positions[i++] = poses[ui]; positions[i++] = poses[ui]; } } ui++; } int lastPos = 0; if (i > 0) lastPos = positions[i-1]; while (iallowRealization) { paletteOld = ::SelectPalette(hdc, reinterpret_cast(pal->hpal), inBackGround); changes = ::RealizePalette(hdc); } return changes; } void SurfaceImpl::SetClip(PRectangle rc) { ::IntersectClipRect(hdc, rc.left, rc.top, rc.right, rc.bottom); } void SurfaceImpl::FlushCachedState() { pen = 0; brush = 0; font = 0; } void SurfaceImpl::SetUnicodeMode(bool unicodeMode_) { unicodeMode=unicodeMode_; } void SurfaceImpl::SetDBCSMode(int) { // No action on window as automatically handled by system. } Surface *Surface::Allocate() { return new SurfaceImpl; } Window::~Window() { } void Window::Destroy() { if (id) ::DestroyWindow(reinterpret_cast(id)); id = 0; } bool Window::HasFocus() { return ::GetFocus() == id; } PRectangle Window::GetPosition() { RECT rc; ::GetWindowRect(reinterpret_cast(id), &rc); return PRectangle(rc.left, rc.top, rc.right, rc.bottom); } void Window::SetPosition(PRectangle rc) { ::SetWindowPos(reinterpret_cast(id), 0, rc.left, rc.top, rc.Width(), rc.Height(), SWP_NOZORDER|SWP_NOACTIVATE); } void Window::SetPositionRelative(PRectangle rc, Window w) { LONG style = ::GetWindowLong(reinterpret_cast(id), GWL_STYLE); if (style & WS_POPUP) { RECT rcOther; ::GetWindowRect(reinterpret_cast(w.GetID()), &rcOther); rc.Move(rcOther.left, rcOther.top); if (rc.left < 0) { rc.Move(-rc.left,0); } if (rc.top < 0) { rc.Move(0,-rc.top); } } SetPosition(rc); } PRectangle Window::GetClientPosition() { RECT rc={0,0,0,0}; if (id) ::GetClientRect(reinterpret_cast(id), &rc); return PRectangle(rc.left, rc.top, rc.right, rc.bottom); } void Window::Show(bool show) { if (show) ::ShowWindow(reinterpret_cast(id), SW_SHOWNOACTIVATE); else ::ShowWindow(reinterpret_cast(id), SW_HIDE); } void Window::InvalidateAll() { ::InvalidateRect(reinterpret_cast(id), NULL, FALSE); } void Window::InvalidateRectangle(PRectangle rc) { RECT rcw = RectFromPRectangle(rc); ::InvalidateRect(reinterpret_cast(id), &rcw, FALSE); } static LRESULT Window_SendMessage(Window *w, UINT msg, WPARAM wParam=0, LPARAM lParam=0) { return ::SendMessage(reinterpret_cast(w->GetID()), msg, wParam, lParam); } void Window::SetFont(Font &font) { Window_SendMessage(this, WM_SETFONT, reinterpret_cast(font.GetID()), 0); } void Window::SetCursor(Cursor curs) { switch (curs) { case cursorText: ::SetCursor(::LoadCursor(NULL,IDC_IBEAM)); break; case cursorUp: ::SetCursor(::LoadCursor(NULL,IDC_UPARROW)); break; case cursorWait: ::SetCursor(::LoadCursor(NULL,IDC_WAIT)); break; case cursorHoriz: ::SetCursor(::LoadCursor(NULL,IDC_SIZEWE)); break; case cursorVert: ::SetCursor(::LoadCursor(NULL,IDC_SIZENS)); break; case cursorHand: ::SetCursor(::LoadCursor(NULL,IDC_HAND)); break; case cursorReverseArrow: { if (!hinstPlatformRes) hinstPlatformRes = ::GetModuleHandle(TEXT("Scintilla")); if (!hinstPlatformRes) hinstPlatformRes = ::GetModuleHandle(TEXT("SciLexer")); if (!hinstPlatformRes) hinstPlatformRes = ::GetModuleHandle(NULL); HCURSOR hcursor = ::LoadCursor(hinstPlatformRes, MAKEINTRESOURCE(IDC_MARGIN)); if (hcursor) ::SetCursor(hcursor); else ::SetCursor(::LoadCursor(NULL,IDC_ARROW)); } break; case cursorArrow: case cursorInvalid: // Should not occur, but just in case. ::SetCursor(::LoadCursor(NULL,IDC_ARROW)); break; } } void Window::SetTitle(const char *s) { ::SetWindowText(reinterpret_cast(id), s); } struct ListItemData { const char *text; int pixId; }; #define _ROUND2(n,pow2) \ ( ( (n) + (pow2) - 1) & ~((pow2) - 1) ) class LineToItem { char *words; int wordsCount; int wordsSize; ListItemData *data; int len; int count; private: void FreeWords() { delete []words; words = NULL; wordsCount = 0; wordsSize = 0; } char *AllocWord(const char *word); public: LineToItem() : words(NULL), wordsCount(0), wordsSize(0), data(NULL), len(0), count(0) { } ~LineToItem() { Clear(); } void Clear() { FreeWords(); delete []data; data = NULL; len = 0; count = 0; } ListItemData *Append(const char *text, int value); ListItemData Get(int index) const { if (index >= 0 && index < count) { return data[index]; } else { ListItemData missing = {"", -1}; return missing; } } int Count() const { return count; } ListItemData *AllocItem(); void SetWords(char *s) { words = s; // N.B. will be deleted on destruction } }; char *LineToItem::AllocWord(const char *text) { int chars = strlen(text) + 1; int newCount = wordsCount + chars; if (newCount > wordsSize) { wordsSize = _ROUND2(newCount * 2, 8192); char *wordsNew = new char[wordsSize]; memcpy(wordsNew, words, wordsCount); int offset = wordsNew - words; for (int i=0; i= len) { int lenNew = _ROUND2((count+1) * 2, 1024); ListItemData *dataNew = new ListItemData[lenNew]; memcpy(dataNew, data, count * sizeof(ListItemData)); delete []data; data = dataNew; len = lenNew; } ListItemData *item = &data[count]; count++; return item; } ListItemData *LineToItem::Append(const char *text, int imageIndex) { ListItemData *item = AllocItem(); item->text = AllocWord(text); item->pixId = imageIndex; return item; } const char ListBoxX_ClassName[] = "ListBoxX"; ListBox::ListBox() { } ListBox::~ListBox() { } class ListBoxX : public ListBox { int lineHeight; FontID fontCopy; XPMSet xset; LineToItem lti; HWND lb; bool unicodeMode; int desiredVisibleRows; unsigned int maxItemCharacters; unsigned int aveCharWidth; Window *parent; int ctrlID; CallBackAction doubleClickAction; void *doubleClickActionData; const char *widestItem; unsigned int maxCharWidth; int resizeHit; PRectangle rcPreSize; Point dragOffset; Point location; // Caret location at which the list is opened HWND GetHWND() const; void AppendListItem(const char *startword, const char *numword); void AdjustWindowRect(PRectangle *rc) const; int ItemHeight() const; int MinClientWidth() const; int TextOffset() const; Point GetClientExtent() const; Point MinTrackSize() const; Point MaxTrackSize() const; void SetRedraw(bool on); void OnDoubleClick(); void ResizeToCursor(); void StartResize(WPARAM); int NcHitTest(WPARAM, LPARAM) const; void CentreItem(int); void Paint(HDC); void Erase(HDC); static long PASCAL ControlWndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam); static const Point ItemInset; // Padding around whole item static const Point TextInset; // Padding around text static const Point ImageInset; // Padding around image public: ListBoxX() : lineHeight(10), fontCopy(0), lb(0), unicodeMode(false), desiredVisibleRows(5), maxItemCharacters(0), aveCharWidth(8), parent(NULL), ctrlID(0), doubleClickAction(NULL), doubleClickActionData(NULL), widestItem(NULL), maxCharWidth(1), resizeHit(0) { } virtual ~ListBoxX() { if (fontCopy) { ::DeleteObject(fontCopy); fontCopy = 0; } } virtual void SetFont(Font &font); virtual void Create(Window &parent, int ctrlID, Point location_, int lineHeight_, bool unicodeMode_); virtual void SetAverageCharWidth(int width); virtual void SetVisibleRows(int rows); virtual int GetVisibleRows() const; virtual PRectangle GetDesiredRect(); virtual int CaretFromEdge(); virtual void Clear(); virtual void Append(char *s, int type = -1); virtual int Length(); virtual void Select(int n); virtual int GetSelection(); virtual int Find(const char *prefix); virtual void GetValue(int n, char *value, int len); virtual void RegisterImage(int type, const char *xpm_data); virtual void ClearRegisteredImages(); virtual void SetDoubleClickAction(CallBackAction action, void *data) { doubleClickAction = action; doubleClickActionData = data; } virtual void SetList(const char *list, char separator, char typesep); void Draw(DRAWITEMSTRUCT *pDrawItem); long WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam); static long PASCAL StaticWndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam); }; const Point ListBoxX::ItemInset(0, 0); const Point ListBoxX::TextInset(2, 0); const Point ListBoxX::ImageInset(1, 0); ListBox *ListBox::Allocate() { ListBoxX *lb = new ListBoxX(); return lb; } void ListBoxX::Create(Window &parent_, int ctrlID_, Point location_, int lineHeight_, bool unicodeMode_) { parent = &parent_; ctrlID = ctrlID_; location = location_; lineHeight = lineHeight_; unicodeMode = unicodeMode_; HWND hwndParent = reinterpret_cast(parent->GetID()); HINSTANCE hinstanceParent = GetWindowInstance(hwndParent); // Window created as popup so not clipped within parent client area id = ::CreateWindowEx( WS_EX_WINDOWEDGE, ListBoxX_ClassName, TEXT(""), WS_POPUP | WS_THICKFRAME, 100,100, 150,80, hwndParent, NULL, hinstanceParent, this); ::MapWindowPoints(hwndParent, NULL, reinterpret_cast(&location), 1); } void ListBoxX::SetFont(Font &font) { LOGFONT lf; if (0 != ::GetObject(font.GetID(), sizeof(lf), &lf)) { if (fontCopy) { ::DeleteObject(fontCopy); fontCopy = 0; } fontCopy = ::CreateFontIndirect(&lf); ::SendMessage(lb, WM_SETFONT, reinterpret_cast(fontCopy), 0); } } void ListBoxX::SetAverageCharWidth(int width) { aveCharWidth = width; } void ListBoxX::SetVisibleRows(int rows) { desiredVisibleRows = rows; } int ListBoxX::GetVisibleRows() const { return desiredVisibleRows; } HWND ListBoxX::GetHWND() const { return reinterpret_cast(GetID()); } PRectangle ListBoxX::GetDesiredRect() { PRectangle rcDesired = GetPosition(); int rows = Length(); if ((rows == 0) || (rows > desiredVisibleRows)) rows = desiredVisibleRows; rcDesired.bottom = rcDesired.top + ItemHeight() * rows; int width = MinClientWidth(); HDC hdc = ::GetDC(lb); HFONT oldFont = SelectFont(hdc, fontCopy); SIZE textSize = {0, 0}; int len = widestItem ? strlen(widestItem) : 0; if (unicodeMode) { wchar_t tbuf[MAX_US_LEN]; len = UCS2FromUTF8(widestItem, len, tbuf, sizeof(tbuf)/sizeof(wchar_t)-1); tbuf[len] = L'\0'; ::GetTextExtentPoint32W(hdc, tbuf, len, &textSize); } else { ::GetTextExtentPoint32(hdc, widestItem, len, &textSize); } TEXTMETRIC tm; ::GetTextMetrics(hdc, &tm); maxCharWidth = tm.tmMaxCharWidth; SelectFont(hdc, oldFont); ::ReleaseDC(lb, hdc); int widthDesired = Platform::Maximum(textSize.cx, (len + 1) * tm.tmAveCharWidth); if (width < widthDesired) width = widthDesired; rcDesired.right = rcDesired.left + TextOffset() + width + (TextInset.x * 2); if (Length() > rows) rcDesired.right += ::GetSystemMetrics(SM_CXVSCROLL); AdjustWindowRect(&rcDesired); return rcDesired; } int ListBoxX::TextOffset() const { int pixWidth = const_cast(&xset)->GetWidth(); return pixWidth == 0 ? ItemInset.x : ItemInset.x + pixWidth + (ImageInset.x * 2); } int ListBoxX::CaretFromEdge() { PRectangle rc; AdjustWindowRect(&rc); return TextOffset() + TextInset.x + (0 - rc.left) - 1; } void ListBoxX::Clear() { ::SendMessage(lb, LB_RESETCONTENT, 0, 0); maxItemCharacters = 0; widestItem = NULL; lti.Clear(); } void ListBoxX::Append(char *s, int type) { int index = ::SendMessage(lb, LB_ADDSTRING, 0, reinterpret_cast(s)); if (index < 0) return; ListItemData *newItem = lti.Append(s, type); unsigned int len = static_cast(strlen(s)); if (maxItemCharacters < len) { maxItemCharacters = len; widestItem = newItem->text; } } int ListBoxX::Length() { return lti.Count(); } void ListBoxX::Select(int n) { // We are going to scroll to centre on the new selection and then select it, so disable // redraw to avoid flicker caused by a painting new selection twice in unselected and then // selected states SetRedraw(false); CentreItem(n); ::SendMessage(lb, LB_SETCURSEL, n, 0); SetRedraw(true); } int ListBoxX::GetSelection() { return ::SendMessage(lb, LB_GETCURSEL, 0, 0); } // This is not actually called at present int ListBoxX::Find(const char *) { return LB_ERR; } void ListBoxX::GetValue(int n, char *value, int len) { ListItemData item = lti.Get(n); strncpy(value, item.text, len); value[len-1] = '\0'; } void ListBoxX::RegisterImage(int type, const char *xpm_data) { xset.Add(type, xpm_data); } void ListBoxX::ClearRegisteredImages() { xset.Clear(); } void ListBoxX::Draw(DRAWITEMSTRUCT *pDrawItem) { if ((pDrawItem->itemAction == ODA_SELECT) || (pDrawItem->itemAction == ODA_DRAWENTIRE)) { RECT rcBox = pDrawItem->rcItem; rcBox.left += TextOffset(); if (pDrawItem->itemState & ODS_SELECTED) { RECT rcImage = pDrawItem->rcItem; rcImage.right = rcBox.left; // The image is not highlighted ::FillRect(pDrawItem->hDC, &rcImage, reinterpret_cast(COLOR_WINDOW+1)); ::FillRect(pDrawItem->hDC, &rcBox, reinterpret_cast(COLOR_HIGHLIGHT+1)); ::SetBkColor(pDrawItem->hDC, ::GetSysColor(COLOR_HIGHLIGHT)); ::SetTextColor(pDrawItem->hDC, ::GetSysColor(COLOR_HIGHLIGHTTEXT)); } else { ::FillRect(pDrawItem->hDC, &pDrawItem->rcItem, reinterpret_cast(COLOR_WINDOW+1)); ::SetBkColor(pDrawItem->hDC, ::GetSysColor(COLOR_WINDOW)); ::SetTextColor(pDrawItem->hDC, ::GetSysColor(COLOR_WINDOWTEXT)); } ListItemData item = lti.Get(pDrawItem->itemID); int pixId = item.pixId; const char *text = item.text; int len = strlen(text); RECT rcText = rcBox; ::InsetRect(&rcText, TextInset.x, TextInset.y); if (unicodeMode) { wchar_t tbuf[MAX_US_LEN]; int tlen = UCS2FromUTF8(text, len, tbuf, sizeof(tbuf)/sizeof(wchar_t)-1); tbuf[tlen] = L'\0'; ::DrawTextW(pDrawItem->hDC, tbuf, tlen, &rcText, DT_NOPREFIX|DT_END_ELLIPSIS|DT_SINGLELINE|DT_NOCLIP); } else { ::DrawText(pDrawItem->hDC, text, len, &rcText, DT_NOPREFIX|DT_END_ELLIPSIS|DT_SINGLELINE|DT_NOCLIP); } if (pDrawItem->itemState & ODS_SELECTED) { ::DrawFocusRect(pDrawItem->hDC, &rcBox); } // Draw the image, if any XPM *pxpm = xset.Get(pixId); if (pxpm) { Surface *surfaceItem = Surface::Allocate(); if (surfaceItem) { surfaceItem->Init(pDrawItem->hDC, pDrawItem->hwndItem); //surfaceItem->SetUnicodeMode(unicodeMode); //surfaceItem->SetDBCSMode(codePage); int left = pDrawItem->rcItem.left + ItemInset.x + ImageInset.x; PRectangle rcImage(left, pDrawItem->rcItem.top, left + xset.GetWidth(), pDrawItem->rcItem.bottom); pxpm->Draw(surfaceItem, rcImage); delete surfaceItem; ::SetTextAlign(pDrawItem->hDC, TA_TOP); } } } } void ListBoxX::AppendListItem(const char *startword, const char *numword) { ListItemData *item = lti.AllocItem(); item->text = startword; if (numword) { int pixId = 0; char ch; while ( (ch = *++numword) != '\0' ) { pixId = 10 * pixId + (ch - '0'); } item->pixId = pixId; } else { item->pixId = -1; } unsigned int len = static_cast(strlen(item->text)); if (maxItemCharacters < len) { maxItemCharacters = len; widestItem = item->text; } } void ListBoxX::SetList(const char *list, char separator, char typesep) { // Turn off redraw while populating the list - this has a significant effect, even if // the listbox is not visible. SetRedraw(false); Clear(); int size = strlen(list) + 1; char *words = new char[size]; if (words) { lti.SetWords(words); memcpy(words, list, size); char *startword = words; char *numword = NULL; int i = 0; for (; words[i]; i++) { if (words[i] == separator) { words[i] = '\0'; if (numword) *numword = '\0'; AppendListItem(startword, numword); startword = words + i + 1; numword = NULL; } else if (words[i] == typesep) { numword = words + i; } } if (startword) { if (numword) *numword = '\0'; AppendListItem(startword, numword); } // Finally populate the listbox itself with the correct number of items int count = lti.Count(); ::SendMessage(lb, LB_INITSTORAGE, count, 0); for (int j=0; j(rc), WS_THICKFRAME, false, WS_EX_WINDOWEDGE); } int ListBoxX::ItemHeight() const { int itemHeight = lineHeight + (TextInset.y * 2); int pixHeight = const_cast(&xset)->GetHeight() + (ImageInset.y * 2); if (itemHeight < pixHeight) { itemHeight = pixHeight; } return itemHeight; } int ListBoxX::MinClientWidth() const { return 12 * (aveCharWidth+aveCharWidth/3); } Point ListBoxX::MinTrackSize() const { PRectangle rc(0, 0, MinClientWidth(), ItemHeight()); AdjustWindowRect(&rc); return Point(rc.Width(), rc.Height()); } Point ListBoxX::MaxTrackSize() const { PRectangle rc(0, 0, maxCharWidth * maxItemCharacters, ItemHeight() * lti.Count()); AdjustWindowRect(&rc); return Point(rc.Width(), rc.Height()); } void ListBoxX::SetRedraw(bool on) { ::SendMessage(lb, WM_SETREDRAW, static_cast(on), 0); if (on) ::InvalidateRect(lb, NULL, TRUE); } void ListBoxX::ResizeToCursor() { PRectangle rc = GetPosition(); Point pt; ::GetCursorPos(reinterpret_cast(&pt)); pt.x += dragOffset.x; pt.y += dragOffset.y; switch (resizeHit) { case HTLEFT: rc.left = pt.x; break; case HTRIGHT: rc.right = pt.x; break; case HTTOP: rc.top = pt.y; break; case HTTOPLEFT: rc.top = pt.y; rc.left = pt.x; break; case HTTOPRIGHT: rc.top = pt.y; rc.right = pt.x; break; case HTBOTTOM: rc.bottom = pt.y; break; case HTBOTTOMLEFT: rc.bottom = pt.y; rc.left = pt.x; break; case HTBOTTOMRIGHT: rc.bottom = pt.y; rc.right = pt.x; break; } Point ptMin = MinTrackSize(); Point ptMax = MaxTrackSize(); // We don't allow the left edge to move at present, but just in case rc.left = Platform::Maximum(Platform::Minimum(rc.left, rcPreSize.right - ptMin.x), rcPreSize.right - ptMax.x); rc.top = Platform::Maximum(Platform::Minimum(rc.top, rcPreSize.bottom - ptMin.y), rcPreSize.bottom - ptMax.y); rc.right = Platform::Maximum(Platform::Minimum(rc.right, rcPreSize.left + ptMax.x), rcPreSize.left + ptMin.x); rc.bottom = Platform::Maximum(Platform::Minimum(rc.bottom, rcPreSize.top + ptMax.y), rcPreSize.top + ptMin.y); SetPosition(rc); } void ListBoxX::StartResize(WPARAM hitCode) { rcPreSize = GetPosition(); POINT cursorPos; ::GetCursorPos(&cursorPos); switch (hitCode) { case HTRIGHT: case HTBOTTOM: case HTBOTTOMRIGHT: dragOffset.x = rcPreSize.right - cursorPos.x; dragOffset.y = rcPreSize.bottom - cursorPos.y; break; case HTTOPRIGHT: dragOffset.x = rcPreSize.right - cursorPos.x; dragOffset.y = rcPreSize.top - cursorPos.y; break; // Note that the current hit test code prevents the left edge cases ever firing // as we don't want the left edge to be moveable case HTLEFT: case HTTOP: case HTTOPLEFT: dragOffset.x = rcPreSize.left - cursorPos.x; dragOffset.y = rcPreSize.top - cursorPos.y; break; case HTBOTTOMLEFT: dragOffset.x = rcPreSize.left - cursorPos.x; dragOffset.y = rcPreSize.bottom - cursorPos.y; break; default: return; } ::SetCapture(GetHWND()); resizeHit = hitCode; } int ListBoxX::NcHitTest(WPARAM wParam, LPARAM lParam) const { int hit = ::DefWindowProc(GetHWND(), WM_NCHITTEST, wParam, lParam); // There is an apparent bug in the DefWindowProc hit test code whereby it will // return HTTOPXXX if the window in question is shorter than the default // window caption height + frame, even if one is hovering over the bottom edge of // the frame, so workaround that here if (hit >= HTTOP && hit <= HTTOPRIGHT) { int minHeight = GetSystemMetrics(SM_CYMINTRACK); PRectangle rc = const_cast(this)->GetPosition(); int yPos = GET_Y_LPARAM(lParam); if ((rc.Height() < minHeight) && (yPos > ((rc.top + rc.bottom)/2))) { hit += HTBOTTOM - HTTOP; } } // Nerver permit resizing that moves the left edge. Allow movement of top or bottom edge // depending on whether the list is above or below the caret switch (hit) { case HTLEFT: case HTTOPLEFT: case HTBOTTOMLEFT: hit = HTERROR; break; case HTTOP: case HTTOPRIGHT: { PRectangle rc = const_cast(this)->GetPosition(); // Valid only if caret below list if (location.y < rc.top) hit = HTERROR; } break; case HTBOTTOM: case HTBOTTOMRIGHT: { PRectangle rc = const_cast(this)->GetPosition(); // Valid only if caret above list if (rc.bottom < location.y) hit = HTERROR; } break; } return hit; } void ListBoxX::OnDoubleClick() { if (doubleClickAction != NULL) { doubleClickAction(doubleClickActionData); } } Point ListBoxX::GetClientExtent() const { PRectangle rc = const_cast(this)->GetClientPosition(); return Point(rc.Width(), rc.Height()); } void ListBoxX::CentreItem(int n) { // If below mid point, scroll up to centre, but with more items below if uneven if (n >= 0) { Point extent = GetClientExtent(); int visible = extent.y/ItemHeight(); if (visible < Length()) { int top = ::SendMessage(lb, LB_GETTOPINDEX, 0, 0); int half = (visible - 1) / 2; if (n > (top + half)) ::SendMessage(lb, LB_SETTOPINDEX, n - half , 0); } } } // Performs a double-buffered paint operation to avoid flicker void ListBoxX::Paint(HDC hDC) { Point extent = GetClientExtent(); HBITMAP hBitmap = ::CreateCompatibleBitmap(hDC, extent.x, extent.y); HDC bitmapDC = ::CreateCompatibleDC(hDC); SelectBitmap(bitmapDC, hBitmap); // The list background is mainly erased during painting, but can be a small // unpainted area when at the end of a non-integrally sized list with a // vertical scroll bar RECT rc = { 0, 0, extent.x, extent.y }; ::FillRect(bitmapDC, &rc, reinterpret_cast(COLOR_WINDOW+1)); // Paint the entire client area and vertical scrollbar ::SendMessage(lb, WM_PRINT, reinterpret_cast(bitmapDC), PRF_CLIENT|PRF_NONCLIENT); ::BitBlt(hDC, 0, 0, extent.x, extent.y, bitmapDC, 0, 0, SRCCOPY); ::DeleteDC(bitmapDC); ::DeleteObject(hBitmap); } long PASCAL ListBoxX::ControlWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_ERASEBKGND: return TRUE; case WM_PAINT: { PAINTSTRUCT ps; HDC hDC = ::BeginPaint(hWnd, &ps); ListBoxX *lbx = reinterpret_cast(PointerFromWindow(::GetParent(hWnd))); if (lbx) lbx->Paint(hDC); ::EndPaint(hWnd, &ps); } return 0; case WM_MOUSEACTIVATE: // This prevents the view activating when the scrollbar is clicked return MA_NOACTIVATE; case WM_LBUTTONDOWN: { // We must take control of selection to prevent the ListBox activating // the popup LRESULT lResult = ::SendMessage(hWnd, LB_ITEMFROMPOINT, 0, lParam); int item = LOWORD(lResult); if (HIWORD(lResult) == 0 && item >= 0) { ::SendMessage(hWnd, LB_SETCURSEL, item, 0); } } return 0; case WM_LBUTTONUP: return 0; case WM_LBUTTONDBLCLK: { ListBoxX *lbx = reinterpret_cast(PointerFromWindow(::GetParent(hWnd))); if (lbx) { lbx->OnDoubleClick(); } } return 0; } WNDPROC prevWndProc = reinterpret_cast(GetWindowLong(hWnd, GWL_USERDATA)); if (prevWndProc) { return ::CallWindowProc(prevWndProc, hWnd, uMsg, wParam, lParam); } else { return ::DefWindowProc(hWnd, uMsg, wParam, lParam); } } long ListBoxX::WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) { switch (iMessage) { case WM_CREATE: { HINSTANCE hinstanceParent = GetWindowInstance(reinterpret_cast(parent->GetID())); // Note that LBS_NOINTEGRALHEIGHT is specified to fix cosmetic issue when resizing the list // but has useful side effect of speeding up list population significantly lb = ::CreateWindowEx( 0, TEXT("listbox"), TEXT(""), WS_CHILD | WS_VSCROLL | WS_VISIBLE | LBS_OWNERDRAWFIXED | LBS_NODATA | LBS_NOINTEGRALHEIGHT, 0, 0, 150,80, hWnd, reinterpret_cast(ctrlID), hinstanceParent, 0); WNDPROC prevWndProc = reinterpret_cast(::SetWindowLong(lb, GWL_WNDPROC, reinterpret_cast(ControlWndProc))); ::SetWindowLong(lb, GWL_USERDATA, reinterpret_cast(prevWndProc)); } break; case WM_SIZE: if (lb) { SetRedraw(false); ::SetWindowPos(lb, 0, 0,0, LOWORD(lParam), HIWORD(lParam), SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOMOVE); // Ensure the selection remains visible CentreItem(GetSelection()); SetRedraw(true); } break; case WM_PAINT: { PAINTSTRUCT ps; ::BeginPaint(hWnd, &ps); ::EndPaint(hWnd, &ps); } break; case WM_COMMAND: // This is not actually needed now - the registered double click action is used // directly to action a choice from the list. ::SendMessage(reinterpret_cast(parent->GetID()), iMessage, wParam, lParam); break; case WM_MEASUREITEM: { MEASUREITEMSTRUCT *pMeasureItem = reinterpret_cast(lParam); pMeasureItem->itemHeight = static_cast(ItemHeight()); } break; case WM_DRAWITEM: Draw(reinterpret_cast(lParam)); break; case WM_DESTROY: lb = 0; ::SetWindowLong(hWnd, 0, 0); return ::DefWindowProc(hWnd, iMessage, wParam, lParam); case WM_ERASEBKGND: // To reduce flicker we can elide background erasure since this window is // completely covered by its child. return TRUE; case WM_GETMINMAXINFO: { MINMAXINFO *minMax = reinterpret_cast(lParam); *reinterpret_cast(&minMax->ptMaxTrackSize) = MaxTrackSize(); *reinterpret_cast(&minMax->ptMinTrackSize) = MinTrackSize(); } break; case WM_MOUSEACTIVATE: return MA_NOACTIVATE; case WM_NCHITTEST: return NcHitTest(wParam, lParam); case WM_NCLBUTTONDOWN: // We have to implement our own window resizing because the DefWindowProc // implementation insists on activating the resized window StartResize(wParam); return 0; case WM_MOUSEMOVE: { if (resizeHit == 0) { return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } else { ResizeToCursor(); } } break; case WM_LBUTTONUP: case WM_CANCELMODE: if (resizeHit != 0) { resizeHit = 0; ::ReleaseCapture(); } return ::DefWindowProc(hWnd, iMessage, wParam, lParam); default: return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } return 0; } long PASCAL ListBoxX::StaticWndProc( HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) { if (iMessage == WM_CREATE) { CREATESTRUCT *pCreate = reinterpret_cast(lParam); SetWindowPointer(hWnd, pCreate->lpCreateParams); } // Find C++ object associated with window. ListBoxX *lbx = reinterpret_cast(PointerFromWindow(hWnd)); if (lbx) { return lbx->WndProc(hWnd, iMessage, wParam, lParam); } else { return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } } static bool ListBoxX_Register() { WNDCLASSEX wndclassc; wndclassc.cbSize = sizeof(wndclassc); // We need CS_HREDRAW and CS_VREDRAW because of the ellipsis that might be drawn for // truncated items in the list and the appearance/disappearance of the vertical scroll bar. // The list repaint is double-buffered to avoid the flicker this would otherwise cause. wndclassc.style = CS_GLOBALCLASS | CS_HREDRAW | CS_VREDRAW; wndclassc.cbClsExtra = 0; wndclassc.cbWndExtra = sizeof(ListBoxX *); wndclassc.hInstance = hinstPlatformRes; wndclassc.hIcon = NULL; wndclassc.hbrBackground = NULL; wndclassc.lpszMenuName = NULL; wndclassc.lpfnWndProc = ListBoxX::StaticWndProc; wndclassc.hCursor = ::LoadCursor(NULL, IDC_ARROW); wndclassc.lpszClassName = ListBoxX_ClassName; wndclassc.hIconSm = 0; return ::RegisterClassEx(&wndclassc) != 0; } bool ListBoxX_Unregister() { return ::UnregisterClass(ListBoxX_ClassName, hinstPlatformRes) != 0; } Menu::Menu() : id(0) { } void Menu::CreatePopUp() { Destroy(); id = ::CreatePopupMenu(); } void Menu::Destroy() { if (id) ::DestroyMenu(reinterpret_cast(id)); id = 0; } void Menu::Show(Point pt, Window &w) { ::TrackPopupMenu(reinterpret_cast(id), 0, pt.x - 4, pt.y, 0, reinterpret_cast(w.GetID()), NULL); Destroy(); } static bool initialisedET = false; static bool usePerformanceCounter = false; static LARGE_INTEGER frequency; ElapsedTime::ElapsedTime() { if (!initialisedET) { usePerformanceCounter = ::QueryPerformanceFrequency(&frequency) != 0; initialisedET = true; } if (usePerformanceCounter) { LARGE_INTEGER timeVal; ::QueryPerformanceCounter(&timeVal); bigBit = timeVal.HighPart; littleBit = timeVal.LowPart; } else { bigBit = clock(); } } double ElapsedTime::Duration(bool reset) { double result; long endBigBit; long endLittleBit; if (usePerformanceCounter) { LARGE_INTEGER lEnd; ::QueryPerformanceCounter(&lEnd); endBigBit = lEnd.HighPart; endLittleBit = lEnd.LowPart; LARGE_INTEGER lBegin; lBegin.HighPart = bigBit; lBegin.LowPart = littleBit; double elapsed = lEnd.QuadPart - lBegin.QuadPart; result = elapsed / static_cast(frequency.QuadPart); } else { endBigBit = clock(); endLittleBit = 0; double elapsed = endBigBit - bigBit; result = elapsed / CLOCKS_PER_SEC; } if (reset) { bigBit = endBigBit; littleBit = endLittleBit; } return result; } class DynamicLibraryImpl : public DynamicLibrary { protected: HMODULE h; public: DynamicLibraryImpl(const char *modulePath) { h = ::LoadLibrary(modulePath); } virtual ~DynamicLibraryImpl() { if (h != NULL) ::FreeLibrary(h); } // Use GetProcAddress to get a pointer to the relevant function. virtual Function FindFunction(const char *name) { if (h != NULL) { return static_cast( (void *)(::GetProcAddress(h, name))); } else return NULL; } virtual bool IsValid() { return h != NULL; } }; DynamicLibrary *DynamicLibrary::Load(const char *modulePath) { return static_cast( new DynamicLibraryImpl(modulePath) ); } ColourDesired Platform::Chrome() { return ::GetSysColor(COLOR_3DFACE); } ColourDesired Platform::ChromeHighlight() { return ::GetSysColor(COLOR_3DHIGHLIGHT); } const char *Platform::DefaultFont() { return "Verdana"; } int Platform::DefaultFontSize() { return 8; } unsigned int Platform::DoubleClickTime() { return ::GetDoubleClickTime(); } bool Platform::MouseButtonBounce() { return false; } void Platform::DebugDisplay(const char *s) { ::OutputDebugString(s); } bool Platform::IsKeyDown(int key) { return (::GetKeyState(key) & 0x80000000) != 0; } long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam) { return ::SendMessage(reinterpret_cast(w), msg, wParam, lParam); } long Platform::SendScintillaPointer(WindowID w, unsigned int msg, unsigned long wParam, void *lParam) { return ::SendMessage(reinterpret_cast(w), msg, wParam, reinterpret_cast(lParam)); } bool Platform::IsDBCSLeadByte(int codePage, char ch) { return ::IsDBCSLeadByteEx(codePage, ch) != 0; } int Platform::DBCSCharLength(int codePage, const char *s) { return (::IsDBCSLeadByteEx(codePage, s[0]) != 0) ? 2 : 1; } int Platform::DBCSCharMaxLength() { return 2; } // These are utility functions not really tied to a platform int Platform::Minimum(int a, int b) { if (a < b) return a; else return b; } int Platform::Maximum(int a, int b) { if (a > b) return a; else return b; } //#define TRACE #ifdef TRACE void Platform::DebugPrintf(const char *format, ...) { char buffer[2000]; va_list pArguments; va_start(pArguments, format); vsprintf(buffer,format,pArguments); va_end(pArguments); Platform::DebugDisplay(buffer); } #else void Platform::DebugPrintf(const char *, ...) { } #endif static bool assertionPopUps = true; bool Platform::ShowAssertionPopUps(bool assertionPopUps_) { bool ret = assertionPopUps; assertionPopUps = assertionPopUps_; return ret; } void Platform::Assert(const char *c, const char *file, int line) { char buffer[2000]; sprintf(buffer, "Assertion [%s] failed at %s %d", c, file, line); if (assertionPopUps) { int idButton = ::MessageBox(0, buffer, "Assertion failure", MB_ABORTRETRYIGNORE|MB_ICONHAND|MB_SETFOREGROUND|MB_TASKMODAL); if (idButton == IDRETRY) { ::DebugBreak(); } else if (idButton == IDIGNORE) { // all OK } else { abort(); } } else { strcat(buffer, "\r\n"); Platform::DebugDisplay(buffer); abort(); } } int Platform::Clamp(int val, int minVal, int maxVal) { if (val > maxVal) val = maxVal; if (val < minVal) val = minVal; return val; } void Platform_Initialise(void *hInstance) { OSVERSIONINFO osv = {sizeof(OSVERSIONINFO),0,0,0,0,TEXT("")}; ::GetVersionEx(&osv); onNT = osv.dwPlatformId == VER_PLATFORM_WIN32_NT; ::InitializeCriticalSection(&crPlatformLock); hinstPlatformRes = reinterpret_cast(hInstance); ListBoxX_Register(); } void Platform_Finalise() { ListBoxX_Unregister(); ::DeleteCriticalSection(&crPlatformLock); } usr/src/sdlBasic/src/sdlBasic/scintilla/win32/ScintRes.rc0000777000076500007660000000206710463136265020476 0ustar // Resource file for Scintilla // Copyright 1998-2005 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef __BORLANDC__ #include #endif #include "PlatformRes.h" VS_VERSION_INFO VERSIONINFO FILEVERSION 1, 6, 4, 0 PRODUCTVERSION 1, 6, 4, 0 FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 FILETYPE VFT_APP FILESUBTYPE VFT2_UNKNOWN BEGIN BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Neil Hodgson neilh@scintilla.org\0" VALUE "FileDescription", "Scintilla.DLL - a Source Editing Component\0" VALUE "FileVersion", "1.64\0" VALUE "InternalName", "Scintilla\0" VALUE "LegalCopyright", "Copyright 1998-2005 by Neil Hodgson\0" VALUE "OriginalFilename", "Scintilla.DLL\0" VALUE "ProductName", "Scintilla\0" VALUE "ProductVersion", "1.64\0" END END END IDC_MARGIN CURSOR DISCARDABLE "Margin.cur" usr/src/sdlBasic/src/sdlBasic/scintilla/win32/Margin.cur0000777000076500007660000000050610463136152020335 0ustar  0( @ÿÿÿ ˜¸øøøøøøx8ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿóÿÿÿáÿÿÿáÿÿÿðÿÿÿðûÿÿøsÿÿøcÿÿüÿÿüÿÿÀÿÿàÿÿðÿÿøÿÿüÿÿþÿÿÿÿÿÿƒÿÿÿÃÿÿÿãÿÿÿóÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿusr/src/sdlBasic/src/sdlBasic/scintilla/win32/deps.mak0000777000076500007660000001006210463136373020035 0ustar PlatWin.o: PlatWin.cxx ../include/Platform.h PlatformRes.h \ ../src/UniConversion.h ../src/XPM.h ScintillaWin.o: ScintillaWin.cxx ../include/Platform.h \ ../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \ ../src/SVector.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \ ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \ ../src/AutoComplete.h ../src/ViewStyle.h ../src/Document.h \ ../src/Editor.h ../src/ScintillaBase.h ../src/UniConversion.h AutoComplete.o: ../src/AutoComplete.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../src/AutoComplete.h CallTip.o: ../src/CallTip.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/CallTip.h CellBuffer.o: ../src/CellBuffer.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/SVector.h ../src/CellBuffer.h ContractionState.o: ../src/ContractionState.cxx ../include/Platform.h \ ../src/ContractionState.h Document.o: ../src/Document.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/SVector.h ../src/CellBuffer.h \ ../src/Document.h ../src/RESearch.h DocumentAccessor.o: ../src/DocumentAccessor.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../src/SVector.h \ ../include/Accessor.h ../src/DocumentAccessor.h ../src/CellBuffer.h \ ../include/Scintilla.h ../src/Document.h Editor.o: ../src/Editor.cxx ../include/Platform.h ../include/Scintilla.h \ ../src/ContractionState.h ../src/SVector.h ../src/CellBuffer.h \ ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \ ../src/Style.h ../src/ViewStyle.h ../src/Document.h ../src/Editor.h ExternalLexer.o: ../src/ExternalLexer.cxx ../include/Platform.h \ ../include/SciLexer.h ../include/PropSet.h ../include/SString.h \ ../include/Accessor.h ../src/DocumentAccessor.h ../include/KeyWords.h \ ../src/ExternalLexer.h Indicator.o: ../src/Indicator.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/Indicator.h KeyMap.o: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintilla.h \ ../src/KeyMap.h KeyWords.o: ../src/KeyWords.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexOthers.o: ../src/LexOthers.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LexVB.o: ../src/LexVB.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h LineMarker.o: ../src/LineMarker.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/XPM.h ../src/LineMarker.h PropSet.o: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h \ ../include/SString.h RESearch.o: ../src/RESearch.cxx ../src/RESearch.h ScintillaBase.o: ../src/ScintillaBase.cxx ../include/Platform.h \ ../include/Scintilla.h ../include/PropSet.h ../include/SString.h \ ../src/ContractionState.h ../src/SVector.h ../src/CellBuffer.h \ ../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h \ ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \ ../src/AutoComplete.h ../src/Document.h ../src/Editor.h \ ../src/ScintillaBase.h Style.o: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \ ../src/Style.h StyleContext.o: ../src/StyleContext.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../src/StyleContext.h UniConversion.o: ../src/UniConversion.cxx ../src/UniConversion.h ViewStyle.o: ../src/ViewStyle.cxx ../include/Platform.h \ ../include/Scintilla.h ../src/Indicator.h ../src/XPM.h \ ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h WindowAccessor.o: ../src/WindowAccessor.cxx ../include/Platform.h \ ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ../include/WindowAccessor.h ../include/Scintilla.h XPM.o: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h usr/src/sdlBasic/src/sdlBasic/scintilla/win32/makefile0000777000076500007660000001014710463136373020114 0ustar # Make file for Scintilla on Windows # Copyright 1998-2003 by Neil Hodgson # The License.txt file describes the conditions under which this software may be distributed. # This makefile assumes the mingw32 version of GCC 2.95.3 is used and changes will # be needed to use other compilers. # The -fvtable-thunks option is required for older (2.9*) versions of gcc but can be removed # safely if using a newer version which may display warning messages. .SUFFIXES: .cxx CC = g++ DLLWRAP = dllwrap DEL = del /q COMPONENT = ../bin/Scintilla.dll LEXCOMPONENT = ../bin/SciLexer.dll LEXLIB = Lexers.a ifndef NOTHUNKS gversion = $(word 1,$(subst ., ,$(shell g++ --version))) ifeq ($(gversion),2) THUNKFLAGS=-fvtable-thunks endif endif vpath %.h ../src ../include vpath %.cxx ../src LDFLAGS=-mwindows -lstdc++ -limm32 -lole32 -luuid -mno-cygwin # Add -MMD to get dependencies #CXXFLAGS = -g -pg -pedantic -Os -fno-exceptions -fvtable-thunks -fno-rtti INCLUDEDIRS=-I ../include -I ../src CXXBASEFLAGS=-Wall -Wno-missing-braces -pedantic $(INCLUDEDIRS) -Os -fno-exceptions $(THUNKFLAGS) -fno-rtti -mno-cygwin ifdef DEBUG CXXFLAGS=-DDEBUG $(CXXBASEFLAGS) else CXXFLAGS=-DNDEBUG $(CXXBASEFLAGS) endif .cxx.o: $(CC) $(CXXFLAGS) -c $< ALL: $(LEXLIB) PropSet.o PlatWin.o UniConversion.o XPM.o editor.o DocumentAccessor.o KeyWords.o \ ExternalLexer.o ContractionState.o CellBuffer.o CallTip.o KeyMap.o Indicator.o LineMarker.o \ RESearch.o Autocomplete.o Document.o ScintillaWinL.o ScintillaBaseL.o Style.o ViewStyle.o \ StyleContext.o ScintillaWinS.o WindowAccessor.o # $(COMPONENT) $(LEXCOMPONENT) $(LEXLIB) ScintillaWinS.o WindowAccessor.o clean: $(DEL) *.exe *.o *.obj *.dll *.res *.map deps: $(CC) -MM $(CXXFLAGS) *.cxx ../src/*.cxx >deps.mak #++Autogenerated -- run src/LexGen.py to regenerate #**LEXOBJS=\\\n\(\*.o \) LEXOBJS=\ LexOthers.o LexSDLB.o #--Autogenerated -- end of automatically generated section SOBJS = ScintillaWin.o ScintillaBase.o Editor.o Document.o \ ContractionState.o CellBuffer.o CallTip.o \ ScintRes.o PlatWin.o KeyMap.o Indicator.o LineMarker.o RESearch.o \ Style.o ViewStyle.o AutoComplete.o UniConversion.o PropSet.o XPM.o $(COMPONENT): $(SOBJS) Scintilla.def $(DLLWRAP) --add-stdcall-alias --target i386-mingw32 -o $@ $(SOBJS) $(LDFLAGS) -s --relocatable LOBJS = ScintillaWinL.o ScintillaBaseL.o Editor.o Document.o \ ContractionState.o CellBuffer.o CallTip.o \ ScintRes.o PlatWin.o KeyMap.o Indicator.o LineMarker.o RESearch.o \ Style.o ViewStyle.o AutoComplete.o UniConversion.o KeyWords.o \ DocumentAccessor.o PropSet.o ExternalLexer.o StyleContext.o XPM.o $(LEXOBJS) $(LEXCOMPONENT): $(LOBJS) Scintilla.def $(DLLWRAP) --add-stdcall-alias --target i386-mingw32 -o $@ $(LOBJS) $(LDFLAGS) -s --relocatable $(LEXLIB): $(LEXOBJS) $(AR) rc $@ $^ ranlib $@ # Automatically generate dependencies for most files with "make deps" include deps.mak # These dependencies are maintained by hand as they do not use the default output name ScintillaBaseL.o: ScintillaBase.cxx Platform.h Scintilla.h SciLexer.h \ ContractionState.h CellBuffer.h CallTip.h KeyMap.h Indicator.h \ LineMarker.h Style.h AutoComplete.h ViewStyle.h Document.h Editor.h \ ScintillaBase.h PropSet.h SString.h Accessor.h DocumentAccessor.h \ KeyWords.h ExternalLexer.h ScintillaWinL.o: ScintillaWin.cxx Platform.h Scintilla.h SciLexer.h \ ContractionState.h CellBuffer.h CallTip.h KeyMap.h Indicator.h \ LineMarker.h Style.h AutoComplete.h ViewStyle.h Document.h Editor.h \ ScintillaBase.h PropSet.h SString.h Accessor.h KeyWords.h \ ExternalLexer.h UniConversion.h ScintillaWinS.o: ScintillaWin.cxx Platform.h Scintilla.h \ ContractionState.h CellBuffer.h CallTip.h KeyMap.h Indicator.h \ LineMarker.h Style.h AutoComplete.h ViewStyle.h Document.h Editor.h \ ScintillaBase.h UniConversion.h ScintillaBaseL.o: $(CC) $(CXXFLAGS) -D SCI_LEXER -c $< -o $@ ScintillaWinS.o: $(CC) $(CXXFLAGS) -D STATIC_BUILD -c $< -o $@ ScintillaWinL.o: $(CC) $(CXXFLAGS) -D SCI_LEXER -c $< -o $@ ScintRes.o: ScintRes.rc PlatformRes.h windres ScintRes.rc $@ usr/src/sdlBasic/src/sdlBasic/scintilla/win32/ScintillaWin.cxx0000777000076500007660000020417010463136373021541 0ustar // Scintilla source code edit control /** @file ScintillaWin.cxx ** Windows specific subclass of ScintillaBase. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #define _WIN32_WINNT 0x0400 #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "SString.h" #ifdef SCI_LEXER #include "SciLexer.h" #include "PropSet.h" #include "Accessor.h" #include "KeyWords.h" #endif #include "ContractionState.h" #include "SVector.h" #include "CellBuffer.h" #include "CallTip.h" #include "KeyMap.h" #include "Indicator.h" #include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "AutoComplete.h" #include "ViewStyle.h" #include "Document.h" #include "Editor.h" #include "ScintillaBase.h" #include "UniConversion.h" #ifdef SCI_LEXER #include "ExternalLexer.h" #endif #ifndef SPI_GETWHEELSCROLLLINES #define SPI_GETWHEELSCROLLLINES 104 #endif #ifndef WM_UNICHAR #define WM_UNICHAR 0x0109 #endif #ifndef UNICODE_NOCHAR #define UNICODE_NOCHAR 0xFFFF #endif #ifndef WM_IME_STARTCOMPOSITION #include #endif #include #ifndef __BORLANDC__ #ifndef __DMC__ #include #endif #endif #include #ifndef MK_ALT #define MK_ALT 32 #endif #define SC_WIN_IDLE 5001 // Functions imported from PlatWin extern bool IsNT(); extern void Platform_Initialise(void *hInstance); extern void Platform_Finalise(); /** TOTAL_CONTROL ifdef surrounds code that will only work when ScintillaWin * is derived from ScintillaBase (all features) rather than directly from Editor * (lightweight editor). */ #define TOTAL_CONTROL // GCC has trouble with the standard COM ABI so do it the old C way with explicit vtables. const char scintillaClassName[] = "Scintilla"; const char callClassName[] = "CallTip"; class ScintillaWin; // Forward declaration for COM interface subobjects /** */ class FormatEnumerator { public: void **vtbl; int ref; int pos; CLIPFORMAT formats[2]; int formatsLen; FormatEnumerator(int pos_, CLIPFORMAT formats_[], int formatsLen_); }; /** */ class DropSource { public: void **vtbl; ScintillaWin *sci; DropSource(); }; /** */ class DataObject { public: void **vtbl; ScintillaWin *sci; DataObject(); }; /** */ class DropTarget { public: void **vtbl; ScintillaWin *sci; DropTarget(); }; /** */ class ScintillaWin : public ScintillaBase { bool lastKeyDownConsumed; bool capturedMouse; unsigned int linesPerScroll; ///< Intellimouse support int wheelDelta; ///< Wheel delta from roll bool hasOKText; CLIPFORMAT cfColumnSelect; DropSource ds; DataObject dob; DropTarget dt; static HINSTANCE hInstance; ScintillaWin(HWND hwnd); ScintillaWin(const ScintillaWin &) : ScintillaBase() {} virtual ~ScintillaWin(); ScintillaWin &operator=(const ScintillaWin &) { return *this; } virtual void Initialise(); virtual void Finalise(); HWND MainHWND(); static sptr_t DirectFunction( ScintillaWin *sci, UINT iMessage, uptr_t wParam, sptr_t lParam); static sptr_t PASCAL SWndProc( HWND hWnd, UINT iMessage, WPARAM wParam, sptr_t lParam); static sptr_t PASCAL CTWndProc( HWND hWnd, UINT iMessage, WPARAM wParam, sptr_t lParam); enum { invalidTimerID, standardTimerID, idleTimerID }; virtual void StartDrag(); sptr_t WndPaint(uptr_t wParam); sptr_t HandleComposition(uptr_t wParam, sptr_t lParam); virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); virtual bool SetIdle(bool on); virtual void SetTicking(bool on); virtual void SetMouseCapture(bool on); virtual bool HaveMouseCapture(); virtual void ScrollText(int linesToMove); virtual void UpdateSystemCaret(); virtual void SetVerticalScrollPos(); virtual void SetHorizontalScrollPos(); virtual bool ModifyScrollBars(int nMax, int nPage); virtual void NotifyChange(); virtual void NotifyFocus(bool focus); virtual int GetCtrlID(); virtual void NotifyParent(SCNotification scn); virtual void NotifyDoubleClick(Point pt, bool shift); virtual void Copy(); virtual bool CanPaste(); virtual void Paste(); virtual void CreateCallTipWindow(PRectangle rc); virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true); virtual void ClaimSelection(); // DBCS void ImeStartComposition(); void ImeEndComposition(); void AddCharBytes(char b0, char b1); void GetIntelliMouseParameters(); virtual void CopyToClipboard(const SelectionText &selectedText); void ScrollMessage(WPARAM wParam); void HorizontalScrollMessage(WPARAM wParam); void RealizeWindowPalette(bool inBackGround); void FullPaint(); void FullPaintDC(HDC dc); bool IsCompatibleDC(HDC dc); virtual int SetScrollInfo(int nBar, LPCSCROLLINFO lpsi, BOOL bRedraw); virtual bool GetScrollInfo(int nBar, LPSCROLLINFO lpsi); void ChangeScrollPos(int barType, int pos); public: // Public for benefit of Scintilla_DirectFunction virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); /// Implement IUnknown STDMETHODIMP QueryInterface(REFIID riid, PVOID *ppv); STDMETHODIMP_(ULONG)AddRef(); STDMETHODIMP_(ULONG)Release(); /// Implement IDropTarget STDMETHODIMP DragEnter(LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL pt, PDWORD pdwEffect); STDMETHODIMP DragOver(DWORD grfKeyState, POINTL pt, PDWORD pdwEffect); STDMETHODIMP DragLeave(); STDMETHODIMP Drop(LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL pt, PDWORD pdwEffect); /// Implement important part of IDataObject STDMETHODIMP GetData(FORMATETC *pFEIn, STGMEDIUM *pSTM); // External Lexers #ifdef SCI_LEXER void SetLexerLanguage(const char *languageName); void SetLexer(uptr_t wParam); #endif static bool Register(HINSTANCE hInstance_); static bool Unregister(); friend class DropSource; friend class DataObject; friend class DropTarget; bool DragIsRectangularOK(CLIPFORMAT fmt) { return drag.rectangular && (fmt == cfColumnSelect); } private: // For use in creating a system caret bool HasCaretSizeChanged(); BOOL CreateSystemCaret(); BOOL DestroySystemCaret(); HBITMAP sysCaretBitmap; int sysCaretWidth; int sysCaretHeight; }; HINSTANCE ScintillaWin::hInstance = 0; ScintillaWin::ScintillaWin(HWND hwnd) { lastKeyDownConsumed = false; capturedMouse = false; linesPerScroll = 0; wheelDelta = 0; // Wheel delta from roll hasOKText = false; // There does not seem to be a real standard for indicating that the clipboard // contains a rectangular selection, so copy Developer Studio. cfColumnSelect = static_cast( ::RegisterClipboardFormat("MSDEVColumnSelect")); wMain = hwnd; dob.sci = this; ds.sci = this; dt.sci = this; sysCaretBitmap = 0; sysCaretWidth = 0; sysCaretHeight = 0; Initialise(); } ScintillaWin::~ScintillaWin() {} void ScintillaWin::Initialise() { // Initialize COM. If the app has already done this it will have // no effect. If the app hasnt, we really shouldnt ask them to call // it just so this internal feature works. ::OleInitialize(NULL); } void ScintillaWin::Finalise() { ScintillaBase::Finalise(); SetTicking(false); SetIdle(false); DestroySystemCaret(); ::RevokeDragDrop(MainHWND()); ::OleUninitialize(); } HWND ScintillaWin::MainHWND() { return reinterpret_cast(wMain.GetID()); } void ScintillaWin::StartDrag() { DWORD dwEffect = 0; dropWentOutside = true; IDataObject *pDataObject = reinterpret_cast(&dob); IDropSource *pDropSource = reinterpret_cast(&ds); //Platform::DebugPrintf("About to DoDragDrop %x %x\n", pDataObject, pDropSource); HRESULT hr = ::DoDragDrop( pDataObject, pDropSource, DROPEFFECT_COPY | DROPEFFECT_MOVE, &dwEffect); //Platform::DebugPrintf("DoDragDrop = %x\n", hr); if (SUCCEEDED(hr)) { if ((hr == DRAGDROP_S_DROP) && (dwEffect == DROPEFFECT_MOVE) && dropWentOutside) { // Remove dragged out text ClearSelection(); } } inDragDrop = false; SetDragPosition(invalidPosition); } // Avoid warnings everywhere for old style casts by concentrating them here static WORD LoWord(DWORD l) { return LOWORD(l); } static WORD HiWord(DWORD l) { return HIWORD(l); } static int InputCodePage() { HKL inputLocale = ::GetKeyboardLayout(0); LANGID inputLang = LOWORD(inputLocale); char sCodePage[10]; int res = ::GetLocaleInfo(MAKELCID(inputLang, SORT_DEFAULT), LOCALE_IDEFAULTANSICODEPAGE, sCodePage, sizeof(sCodePage)); if (!res) return 0; return atoi(sCodePage); } #ifndef VK_OEM_2 static const VK_OEM_2=0xbf; static const VK_OEM_3=0xc0; static const VK_OEM_4=0xdb; static const VK_OEM_5=0xdc; static const VK_OEM_6=0xdd; #endif /** Map the key codes to their equivalent SCK_ form. */ static int KeyTranslate(int keyIn) { //PLATFORM_ASSERT(!keyIn); switch (keyIn) { case VK_DOWN: return SCK_DOWN; case VK_UP: return SCK_UP; case VK_LEFT: return SCK_LEFT; case VK_RIGHT: return SCK_RIGHT; case VK_HOME: return SCK_HOME; case VK_END: return SCK_END; case VK_PRIOR: return SCK_PRIOR; case VK_NEXT: return SCK_NEXT; case VK_DELETE: return SCK_DELETE; case VK_INSERT: return SCK_INSERT; case VK_ESCAPE: return SCK_ESCAPE; case VK_BACK: return SCK_BACK; case VK_TAB: return SCK_TAB; case VK_RETURN: return SCK_RETURN; case VK_ADD: return SCK_ADD; case VK_SUBTRACT: return SCK_SUBTRACT; case VK_DIVIDE: return SCK_DIVIDE; case VK_OEM_2: return '/'; case VK_OEM_3: return '`'; case VK_OEM_4: return '['; case VK_OEM_5: return '\\'; case VK_OEM_6: return ']'; default: return keyIn; } } LRESULT ScintillaWin::WndPaint(uptr_t wParam) { //ElapsedTime et; // Redirect assertions to debug output and save current state bool assertsPopup = Platform::ShowAssertionPopUps(false); paintState = painting; PAINTSTRUCT ps; PAINTSTRUCT *pps; bool IsOcxCtrl = (wParam != 0); // if wParam != 0, it contains // a PAINSTRUCT* from the OCX if (IsOcxCtrl) { pps = reinterpret_cast(wParam); } else { pps = &ps; ::BeginPaint(MainHWND(), pps); } AutoSurface surfaceWindow(pps->hdc, this); if (surfaceWindow) { rcPaint = PRectangle(pps->rcPaint.left, pps->rcPaint.top, pps->rcPaint.right, pps->rcPaint.bottom); PRectangle rcClient = GetClientRectangle(); paintingAllText = rcPaint.Contains(rcClient); if (paintingAllText) { //Platform::DebugPrintf("Performing full text paint\n"); } else { //Platform::DebugPrintf("Performing partial paint %d .. %d\n", rcPaint.top, rcPaint.bottom); } Paint(surfaceWindow, rcPaint); surfaceWindow->Release(); } if(!IsOcxCtrl) ::EndPaint(MainHWND(), pps); if (paintState == paintAbandoned) { // Painting area was insufficient to cover new styling or brace highlight positions FullPaint(); } paintState = notPainting; // Restore debug output state Platform::ShowAssertionPopUps(assertsPopup); //Platform::DebugPrintf("Paint took %g\n", et.Duration()); return 0l; } sptr_t ScintillaWin::HandleComposition(uptr_t wParam, sptr_t lParam) { #ifdef __DMC__ // Digital Mars compiler does not include Imm library return 0; #else if (lParam & GCS_RESULTSTR) { HIMC hIMC = ::ImmGetContext(MainHWND()); if (hIMC) { const int maxLenInputIME = 200; wchar_t wcs[maxLenInputIME]; LONG bytes = ::ImmGetCompositionStringW(hIMC, GCS_RESULTSTR, wcs, (maxLenInputIME-1)*2); int wides = bytes / 2; if (IsUnicodeMode()) { char utfval[maxLenInputIME * 3]; unsigned int len = UTF8Length(wcs, wides); UTF8FromUCS2(wcs, wides, utfval, len); utfval[len] = '\0'; AddCharUTF(utfval, len); } else { char dbcsval[maxLenInputIME * 2]; int size = ::WideCharToMultiByte(InputCodePage(), 0, wcs, wides, dbcsval, sizeof(dbcsval) - 1, 0, 0); for (int i=0; i(wMain.GetID())); // Get Intellimouse scroll line parameters GetIntelliMouseParameters(); ::RegisterDragDrop(MainHWND(), reinterpret_cast(&dt)); break; case WM_COMMAND: #ifdef TOTAL_CONTROL Command(LoWord(wParam)); #endif break; case WM_PAINT: return WndPaint(wParam); case WM_PRINTCLIENT: { HDC hdc = reinterpret_cast(wParam); if (!IsCompatibleDC(hdc)) { return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); } FullPaintDC(hdc); } break; case WM_VSCROLL: ScrollMessage(wParam); break; case WM_HSCROLL: HorizontalScrollMessage(wParam); break; case WM_SIZE: { //Platform::DebugPrintf("Scintilla WM_SIZE %d %d\n", LoWord(lParam), HiWord(lParam)); ChangeSize(); } break; case WM_MOUSEWHEEL: // Don't handle datazoom. // (A good idea for datazoom would be to "fold" or "unfold" details. // i.e. if datazoomed out only class structures are visible, when datazooming in the control // structures appear, then eventually the individual statements...) if (wParam & MK_SHIFT) { return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); } // Either SCROLL or ZOOM. We handle the wheel steppings calculation wheelDelta -= static_cast(HiWord(wParam)); if (abs(wheelDelta) >= WHEEL_DELTA && linesPerScroll > 0) { int linesToScroll = linesPerScroll; if (linesPerScroll == WHEEL_PAGESCROLL) linesToScroll = LinesOnScreen() - 1; if (linesToScroll == 0) { linesToScroll = 1; } linesToScroll *= (wheelDelta / WHEEL_DELTA); if (wheelDelta >= 0) wheelDelta = wheelDelta % WHEEL_DELTA; else wheelDelta = - (-wheelDelta % WHEEL_DELTA); if (wParam & MK_CONTROL) { // Zoom! We play with the font sizes in the styles. // Number of steps/line is ignored, we just care if sizing up or down if (linesToScroll < 0) { KeyCommand(SCI_ZOOMIN); } else { KeyCommand(SCI_ZOOMOUT); } } else { // Scroll ScrollTo(topLine + linesToScroll); } } return 0; case WM_TIMER: if (wParam == standardTimerID && timer.ticking) { Tick(); } else if (wParam == idleTimerID && idler.state) { SendMessage(MainHWND(), SC_WIN_IDLE, 0, 1); } else { return 1; } break; case SC_WIN_IDLE: // wParam=dwTickCountInitial, or 0 to initialize. lParam=bSkipUserInputTest if (idler.state) { if (lParam || (WAIT_TIMEOUT==MsgWaitForMultipleObjects(0,0,0,0, QS_INPUT|QS_HOTKEY))) { if (Idle()) { // User input was given priority above, but all events do get a turn. Other // messages, notifications, etc. will get interleaved with the idle messages. // However, some things like WM_PAINT are a lower priority, and will not fire // when there's a message posted. So, several times a second, we stop and let // the low priority events have a turn (after which the timer will fire again). DWORD dwCurrent = GetTickCount(); DWORD dwStart = wParam ? wParam : dwCurrent; if (dwCurrent >= dwStart && dwCurrent > 200 && dwCurrent - 200 < dwStart) PostMessage(MainHWND(), SC_WIN_IDLE, dwStart, 0); } else { SetIdle(false); } } } break; case WM_GETMINMAXINFO: return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); case WM_LBUTTONDOWN: { // For IME, set the composition string as the result string. HIMC hIMC = ::ImmGetContext(MainHWND()); ::ImmNotifyIME(hIMC, NI_COMPOSITIONSTR, CPS_COMPLETE, 0); ::ImmReleaseContext(MainHWND(), hIMC); // //Platform::DebugPrintf("Buttdown %d %x %x %x %x %x\n",iMessage, wParam, lParam, // Platform::IsKeyDown(VK_SHIFT), // Platform::IsKeyDown(VK_CONTROL), // Platform::IsKeyDown(VK_MENU)); ButtonDown(Point::FromLong(lParam), ::GetMessageTime(), (wParam & MK_SHIFT) != 0, (wParam & MK_CONTROL) != 0, Platform::IsKeyDown(VK_MENU)); ::SetFocus(MainHWND()); } break; case WM_MOUSEMOVE: ButtonMove(Point::FromLong(lParam)); break; case WM_LBUTTONUP: ButtonUp(Point::FromLong(lParam), ::GetMessageTime(), (wParam & MK_CONTROL) != 0); break; case WM_SETCURSOR: if (LoWord(lParam) == HTCLIENT) { if (inDragDrop) { DisplayCursor(Window::cursorUp); } else { // Display regular (drag) cursor over selection POINT pt; ::GetCursorPos(&pt); ::ScreenToClient(MainHWND(), &pt); if (PointInSelMargin(Point(pt.x, pt.y))) { DisplayCursor(Window::cursorReverseArrow); } else if (PointInSelection(Point(pt.x, pt.y))) { DisplayCursor(Window::cursorArrow); } else if (PointIsHotspot(Point(pt.x, pt.y))) { DisplayCursor(Window::cursorHand); } else { DisplayCursor(Window::cursorText); } } return TRUE; } else { return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); } case WM_CHAR: if (!iscntrl(wParam&0xff) || !lastKeyDownConsumed) { if (IsUnicodeMode()) { // For a wide character version of the window: //char utfval[4]; //wchar_t wcs[2] = {wParam, 0}; //unsigned int len = UTF8Length(wcs, 1); //UTF8FromUCS2(wcs, 1, utfval, len); //AddCharUTF(utfval, len); AddCharBytes('\0', LOBYTE(wParam)); } else { AddChar(LOBYTE(wParam)); } } return 0; case WM_UNICHAR: if (wParam == UNICODE_NOCHAR) { return 1; } else if (lastKeyDownConsumed) { return 1; } else { if (IsUnicodeMode()) { char utfval[4]; wchar_t wcs[2] = {wParam, 0}; unsigned int len = UTF8Length(wcs, 1); UTF8FromUCS2(wcs, 1, utfval, len); AddCharUTF(utfval, len); return 1; } else { return 0; } } case WM_SYSKEYDOWN: case WM_KEYDOWN: { //Platform::DebugPrintf("S keydown %d %x %x %x %x\n",iMessage, wParam, lParam, ::IsKeyDown(VK_SHIFT), ::IsKeyDown(VK_CONTROL)); lastKeyDownConsumed = false; int ret = KeyDown(KeyTranslate(wParam), Platform::IsKeyDown(VK_SHIFT), Platform::IsKeyDown(VK_CONTROL), Platform::IsKeyDown(VK_MENU), &lastKeyDownConsumed); if (!ret && !lastKeyDownConsumed) { return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); } break; } case WM_IME_KEYDOWN: return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); case WM_KEYUP: //Platform::DebugPrintf("S keyup %d %x %x\n",iMessage, wParam, lParam); return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); case WM_SETTINGCHANGE: //Platform::DebugPrintf("Setting Changed\n"); InvalidateStyleData(); // Get Intellimouse scroll line parameters GetIntelliMouseParameters(); break; case WM_GETDLGCODE: return DLGC_HASSETSEL | DLGC_WANTALLKEYS; case WM_KILLFOCUS: { HWND wOther = reinterpret_cast(wParam); HWND wThis = MainHWND(); HWND wCT = reinterpret_cast(ct.wCallTip.GetID()); if (!wParam || !(::IsChild(wThis,wOther) || (wOther == wCT))) { SetFocusState(false); DestroySystemCaret(); } } //RealizeWindowPalette(true); break; case WM_SETFOCUS: SetFocusState(true); RealizeWindowPalette(false); DestroySystemCaret(); CreateSystemCaret(); break; case WM_SYSCOLORCHANGE: //Platform::DebugPrintf("Setting Changed\n"); InvalidateStyleData(); break; case WM_PALETTECHANGED: if (wParam != reinterpret_cast(MainHWND())) { //Platform::DebugPrintf("** Palette Changed\n"); RealizeWindowPalette(true); } break; case WM_QUERYNEWPALETTE: //Platform::DebugPrintf("** Query palette\n"); RealizeWindowPalette(false); break; case WM_IME_STARTCOMPOSITION: // dbcs ImeStartComposition(); return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); case WM_IME_ENDCOMPOSITION: // dbcs ImeEndComposition(); return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); case WM_IME_COMPOSITION: return HandleComposition(wParam, lParam); case WM_IME_CHAR: { AddCharBytes(HIBYTE(wParam), LOBYTE(wParam)); return 0; } case WM_CONTEXTMENU: #ifdef TOTAL_CONTROL if (displayPopupMenu) { Point pt = Point::FromLong(lParam); if ((pt.x == -1) && (pt.y == -1)) { // Caused by keyboard so display menu near caret pt = LocationFromPosition(currentPos); POINT spt = {pt.x, pt.y}; ::ClientToScreen(MainHWND(), &spt); pt = Point(spt.x, spt.y); } ContextMenu(pt); return 0; } #endif return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); case WM_INPUTLANGCHANGE: //::SetThreadLocale(LOWORD(lParam)); return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); case WM_INPUTLANGCHANGEREQUEST: return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); case WM_ERASEBKGND: return 1; // Avoid any background erasure as whole window painted. case WM_CAPTURECHANGED: capturedMouse = false; return 0; // These are not handled in Scintilla and its faster to dispatch them here. // Also moves time out to here so profile doesn't count lots of empty message calls. case WM_MOVE: case WM_MOUSEACTIVATE: case WM_NCHITTEST: case WM_NCCALCSIZE: case WM_NCPAINT: case WM_NCMOUSEMOVE: case WM_NCLBUTTONDOWN: case WM_IME_SETCONTEXT: case WM_IME_NOTIFY: case WM_SYSCOMMAND: case WM_WINDOWPOSCHANGING: case WM_WINDOWPOSCHANGED: return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); case EM_LINEFROMCHAR: if (static_cast(wParam) < 0) { wParam = SelectionStart(); } return pdoc->LineFromPosition(wParam); case EM_EXLINEFROMCHAR: return pdoc->LineFromPosition(lParam); case EM_GETSEL: if (wParam) { *reinterpret_cast(wParam) = SelectionStart(); } if (lParam) { *reinterpret_cast(lParam) = SelectionEnd(); } return MAKELONG(SelectionStart(), SelectionEnd()); case EM_EXGETSEL: { if (lParam == 0) { return 0; } CharacterRange *pCR = reinterpret_cast(lParam); pCR->cpMin = SelectionStart(); pCR->cpMax = SelectionEnd(); } break; case EM_SETSEL: { int nStart = static_cast(wParam); int nEnd = static_cast(lParam); if (nStart == 0 && nEnd == -1) { nEnd = pdoc->Length(); } if (nStart == -1) { nStart = nEnd; // Remove selection } if (nStart > nEnd) { SetSelection(nEnd, nStart); } else { SetSelection(nStart, nEnd); } EnsureCaretVisible(); } break; case EM_EXSETSEL: { if (lParam == 0) { return 0; } CharacterRange *pCR = reinterpret_cast(lParam); selType = selStream; if (pCR->cpMax == 0 && pCR->cpMax == -1) { SetSelection(pCR->cpMin, pdoc->Length()); } else { SetSelection(pCR->cpMin, pCR->cpMax); } EnsureCaretVisible(); return pdoc->LineFromPosition(SelectionStart()); } case SCI_GETDIRECTFUNCTION: return reinterpret_cast(DirectFunction); case SCI_GETDIRECTPOINTER: return reinterpret_cast(this); case SCI_GRABFOCUS: ::SetFocus(MainHWND()); break; #ifdef SCI_LEXER case SCI_LOADLEXERLIBRARY: LexerManager::GetInstance()->Load(reinterpret_cast(lParam)); break; #endif default: return ScintillaBase::WndProc(iMessage, wParam, lParam); } return 0l; } sptr_t ScintillaWin::DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); } void ScintillaWin::SetTicking(bool on) { if (timer.ticking != on) { timer.ticking = on; if (timer.ticking) { timer.tickerID = ::SetTimer(MainHWND(), standardTimerID, timer.tickSize, NULL) ? reinterpret_cast(standardTimerID) : 0; } else { ::KillTimer(MainHWND(), reinterpret_cast(timer.tickerID)); timer.tickerID = 0; } } timer.ticksToWait = caret.period; } bool ScintillaWin::SetIdle(bool on) { // On Win32 the Idler is implemented as a Timer on the Scintilla window. This // takes advantage of the fact that WM_TIMER messages are very low priority, // and are only posted when the message queue is empty, i.e. during idle time. if (idler.state != on) { if (on) { idler.idlerID = ::SetTimer(MainHWND(), idleTimerID, 10, NULL) ? reinterpret_cast(idleTimerID) : 0; } else { ::KillTimer(MainHWND(), reinterpret_cast(idler.idlerID)); idler.idlerID = 0; } idler.state = idler.idlerID != 0; } return idler.state; } void ScintillaWin::SetMouseCapture(bool on) { if (mouseDownCaptures) { if (on) { ::SetCapture(MainHWND()); } else { ::ReleaseCapture(); } } capturedMouse = on; } bool ScintillaWin::HaveMouseCapture() { // Cannot just see if GetCapture is this window as the scroll bar also sets capture for the window return capturedMouse; //return capturedMouse && (::GetCapture() == MainHWND()); } void ScintillaWin::ScrollText(int linesToMove) { //Platform::DebugPrintf("ScintillaWin::ScrollText %d\n", linesToMove); ::ScrollWindow(MainHWND(), 0, vs.lineHeight * linesToMove, 0, 0); ::UpdateWindow(MainHWND()); } void ScintillaWin::UpdateSystemCaret() { if (hasFocus) { if (HasCaretSizeChanged()) { DestroySystemCaret(); CreateSystemCaret(); } Point pos = LocationFromPosition(currentPos); ::SetCaretPos(pos.x, pos.y); } } int ScintillaWin::SetScrollInfo(int nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) { return ::SetScrollInfo(MainHWND(), nBar, lpsi, bRedraw); } bool ScintillaWin::GetScrollInfo(int nBar, LPSCROLLINFO lpsi) { return ::GetScrollInfo(MainHWND(), nBar, lpsi) ? true : false; } // Change the scroll position but avoid repaint if changing to same value void ScintillaWin::ChangeScrollPos(int barType, int pos) { SCROLLINFO sci = { sizeof(sci),0,0,0,0,0,0 }; sci.fMask = SIF_POS; GetScrollInfo(barType, &sci); if (sci.nPos != pos) { DwellEnd(true); sci.nPos = pos; SetScrollInfo(barType, &sci, TRUE); } } void ScintillaWin::SetVerticalScrollPos() { ChangeScrollPos(SB_VERT, topLine); } void ScintillaWin::SetHorizontalScrollPos() { ChangeScrollPos(SB_HORZ, xOffset); } bool ScintillaWin::ModifyScrollBars(int nMax, int nPage) { bool modified = false; SCROLLINFO sci = { sizeof(sci),0,0,0,0,0,0 }; sci.fMask = SIF_PAGE | SIF_RANGE; GetScrollInfo(SB_VERT, &sci); int vertEndPreferred = nMax; if (!verticalScrollBarVisible) vertEndPreferred = 0; if ((sci.nMin != 0) || (sci.nMax != vertEndPreferred) || (sci.nPage != static_cast(nPage)) || (sci.nPos != 0)) { //Platform::DebugPrintf("Scroll info changed %d %d %d %d %d\n", // sci.nMin, sci.nMax, sci.nPage, sci.nPos, sci.nTrackPos); sci.fMask = SIF_PAGE | SIF_RANGE; sci.nMin = 0; sci.nMax = vertEndPreferred; sci.nPage = nPage; sci.nPos = 0; sci.nTrackPos = 1; SetScrollInfo(SB_VERT, &sci, TRUE); modified = true; } PRectangle rcText = GetTextRectangle(); int horizEndPreferred = scrollWidth; if (horizEndPreferred < 0) horizEndPreferred = 0; if (!horizontalScrollBarVisible || (wrapState != eWrapNone)) horizEndPreferred = 0; unsigned int pageWidth = rcText.Width(); sci.fMask = SIF_PAGE | SIF_RANGE; GetScrollInfo(SB_HORZ, &sci); if ((sci.nMin != 0) || (sci.nMax != horizEndPreferred) || (sci.nPage != pageWidth) || (sci.nPos != 0)) { sci.fMask = SIF_PAGE | SIF_RANGE; sci.nMin = 0; sci.nMax = horizEndPreferred; sci.nPage = pageWidth; sci.nPos = 0; sci.nTrackPos = 1; SetScrollInfo(SB_HORZ, &sci, TRUE); modified = true; if (scrollWidth < static_cast(pageWidth)) { HorizontalScrollTo(0); } } return modified; } void ScintillaWin::NotifyChange() { ::SendMessage(::GetParent(MainHWND()), WM_COMMAND, MAKELONG(GetCtrlID(), SCEN_CHANGE), reinterpret_cast(MainHWND())); } void ScintillaWin::NotifyFocus(bool focus) { ::SendMessage(::GetParent(MainHWND()), WM_COMMAND, MAKELONG(GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS), reinterpret_cast(MainHWND())); } int ScintillaWin::GetCtrlID() { return ::GetDlgCtrlID(reinterpret_cast(wMain.GetID())); } void ScintillaWin::NotifyParent(SCNotification scn) { scn.nmhdr.hwndFrom = MainHWND(); scn.nmhdr.idFrom = GetCtrlID(); ::SendMessage(::GetParent(MainHWND()), WM_NOTIFY, GetCtrlID(), reinterpret_cast(&scn)); } void ScintillaWin::NotifyDoubleClick(Point pt, bool shift) { //Platform::DebugPrintf("ScintillaWin Double click 0\n"); ScintillaBase::NotifyDoubleClick(pt, shift); // Send myself a WM_LBUTTONDBLCLK, so the container can handle it too. ::SendMessage(MainHWND(), WM_LBUTTONDBLCLK, shift ? MK_SHIFT : 0, MAKELPARAM(pt.x, pt.y)); } void ScintillaWin::Copy() { //Platform::DebugPrintf("Copy\n"); if (currentPos != anchor) { SelectionText selectedText; CopySelectionRange(&selectedText); CopyToClipboard(selectedText); } } bool ScintillaWin::CanPaste() { if (!Editor::CanPaste()) return false; if (::IsClipboardFormatAvailable(CF_TEXT)) return true; if (IsUnicodeMode()) return ::IsClipboardFormatAvailable(CF_UNICODETEXT) != 0; return false; } static UINT CodePageFromCharSet(DWORD characterSet, UINT documentCodePage) { CHARSETINFO ci = { 0, 0, { { 0, 0, 0, 0 }, { 0, 0 } } }; BOOL bci = ::TranslateCharsetInfo((DWORD*)characterSet, &ci, TCI_SRCCHARSET); UINT cp; if (bci) cp = ci.ciACP; else cp = documentCodePage; CPINFO cpi; if (!IsValidCodePage(cp) && !GetCPInfo(cp, &cpi)) cp = CP_ACP; return cp; } void ScintillaWin::Paste() { if (!::OpenClipboard(MainHWND())) return; pdoc->BeginUndoAction(); ClearSelection(); int selStart = SelectionStart(); bool isRectangular = ::IsClipboardFormatAvailable(cfColumnSelect) != 0; // Always use CF_UNICODETEXT if available HGLOBAL hmemUSelection = ::GetClipboardData(CF_UNICODETEXT); if (hmemUSelection) { wchar_t *uptr = static_cast(::GlobalLock(hmemUSelection)); if (uptr) { unsigned int len; char *putf; // Default Scintilla behaviour in Unicode mode if (IsUnicodeMode()) { unsigned int bytes = ::GlobalSize(hmemUSelection); len = UTF8Length(uptr, bytes / 2); putf = new char[len + 1]; if (putf) { UTF8FromUCS2(uptr, bytes / 2, putf, len); } } else { // CF_UNICODETEXT available, but not in Unicode mode // Convert from Unicode to current Scintilla code page UINT cpDest = CodePageFromCharSet( vs.styles[STYLE_DEFAULT].characterSet, pdoc->dbcsCodePage); len = ::WideCharToMultiByte(cpDest, 0, uptr, -1, NULL, 0, NULL, NULL) - 1; // subtract 0 terminator putf = new char[len + 1]; if (putf) { ::WideCharToMultiByte(cpDest, 0, uptr, -1, putf, len + 1, NULL, NULL); } } if (putf) { if (isRectangular) { PasteRectangular(selStart, putf, len); } else { if (pdoc->InsertString(currentPos, putf, len)) { SetEmptySelection(currentPos + len); } } delete []putf; } } ::GlobalUnlock(hmemUSelection); } else { // CF_UNICODETEXT not available, paste ANSI text HGLOBAL hmemSelection = ::GetClipboardData(CF_TEXT); if (hmemSelection) { char *ptr = static_cast( ::GlobalLock(hmemSelection)); if (ptr) { unsigned int bytes = ::GlobalSize(hmemSelection); unsigned int len = bytes; for (unsigned int i = 0; i < bytes; i++) { if ((len == bytes) && (0 == ptr[i])) len = i; } // In Unicode mode, convert clipboard text to UTF-8 if (IsUnicodeMode()) { wchar_t *uptr = static_cast(::GlobalAlloc(GPTR, len * 2 + 2)); unsigned int ulen = ::MultiByteToWideChar(CP_ACP, 0, ptr, len, uptr, GlobalSize(static_cast(uptr))); unsigned int mlen = UTF8Length(uptr, ulen); char *putf = new char[mlen + 1]; if (putf) { // CP_UTF8 not available on Windows 95, so use UTF8FromUCS2() UTF8FromUCS2(uptr, ulen, putf, mlen); } ::GlobalFree(static_cast(uptr)); if (isRectangular) { PasteRectangular(selStart, putf, mlen); } else { pdoc->InsertString(currentPos, putf, mlen); SetEmptySelection(currentPos + mlen); } delete []putf; } else { if (isRectangular) { PasteRectangular(selStart, ptr, len); } else { pdoc->InsertString(currentPos, ptr, len); SetEmptySelection(currentPos + len); } } } ::GlobalUnlock(hmemSelection); } } ::CloseClipboard(); pdoc->EndUndoAction(); NotifyChange(); Redraw(); } void ScintillaWin::CreateCallTipWindow(PRectangle) { #ifdef TOTAL_CONTROL if (!ct.wCallTip.Created()) { ct.wCallTip = ::CreateWindow(callClassName, TEXT("ACallTip"), WS_POPUP, 100, 100, 150, 20, MainHWND(), 0, GetWindowInstance(MainHWND()), this); ct.wDraw = ct.wCallTip; } #endif } void ScintillaWin::AddToPopUp(const char *label, int cmd, bool enabled) { #ifdef TOTAL_CONTROL HMENU hmenuPopup = reinterpret_cast(popup.GetID()); if (!label[0]) ::AppendMenu(hmenuPopup, MF_SEPARATOR, 0, ""); else if (enabled) ::AppendMenu(hmenuPopup, MF_STRING, cmd, label); else ::AppendMenu(hmenuPopup, MF_STRING | MF_DISABLED | MF_GRAYED, cmd, label); #endif } void ScintillaWin::ClaimSelection() { // Windows does not have a primary selection } #ifdef SCI_LEXER /* Initial Windows-Only implementation of the external lexer system in ScintillaWin class. Intention is to create a LexerModule subclass (?) to have lex and fold methods which will call out to their relevant DLLs... */ void ScintillaWin::SetLexer(uptr_t wParam) { lexLanguage = wParam; lexCurrent = LexerModule::Find(lexLanguage); if (!lexCurrent) lexCurrent = LexerModule::Find(SCLEX_NULL); } void ScintillaWin::SetLexerLanguage(const char *languageName) { lexLanguage = SCLEX_CONTAINER; lexCurrent = LexerModule::Find(languageName); if (!lexCurrent) lexCurrent = LexerModule::Find(SCLEX_NULL); if (lexCurrent) lexLanguage = lexCurrent->GetLanguage(); } #endif /// Implement IUnknown STDMETHODIMP_(ULONG)FormatEnumerator_AddRef(FormatEnumerator *fe); STDMETHODIMP FormatEnumerator_QueryInterface(FormatEnumerator *fe, REFIID riid, PVOID *ppv) { //Platform::DebugPrintf("EFE QI"); *ppv = NULL; if (riid == IID_IUnknown) *ppv = reinterpret_cast(fe); if (riid == IID_IEnumFORMATETC) *ppv = reinterpret_cast(fe); if (!*ppv) return E_NOINTERFACE; FormatEnumerator_AddRef(fe); return S_OK; } STDMETHODIMP_(ULONG)FormatEnumerator_AddRef(FormatEnumerator *fe) { return ++fe->ref; } STDMETHODIMP_(ULONG)FormatEnumerator_Release(FormatEnumerator *fe) { fe->ref--; if (fe->ref > 0) return fe->ref; delete fe; return 0; } /// Implement IEnumFORMATETC STDMETHODIMP FormatEnumerator_Next(FormatEnumerator *fe, ULONG celt, FORMATETC *rgelt, ULONG *pceltFetched) { //Platform::DebugPrintf("EFE Next %d %d", fe->pos, celt); if (rgelt == NULL) return E_POINTER; // We only support one format, so this is simple. unsigned int putPos = 0; while ((fe->pos < fe->formatsLen) && (putPos < celt)) { rgelt->cfFormat = fe->formats[fe->pos]; rgelt->ptd = 0; rgelt->dwAspect = DVASPECT_CONTENT; rgelt->lindex = -1; rgelt->tymed = TYMED_HGLOBAL; fe->pos++; putPos++; } if (pceltFetched) *pceltFetched = putPos; return putPos ? S_OK : S_FALSE; } STDMETHODIMP FormatEnumerator_Skip(FormatEnumerator *fe, ULONG celt) { fe->pos += celt; return S_OK; } STDMETHODIMP FormatEnumerator_Reset(FormatEnumerator *fe) { fe->pos = 0; return S_OK; } STDMETHODIMP FormatEnumerator_Clone(FormatEnumerator *fe, IEnumFORMATETC **ppenum) { FormatEnumerator *pfe = new FormatEnumerator(fe->pos, fe->formats, fe->formatsLen); return FormatEnumerator_QueryInterface(pfe, IID_IEnumFORMATETC, reinterpret_cast(ppenum)); } static void *vtFormatEnumerator[] = { (void *)(FormatEnumerator_QueryInterface), (void *)(FormatEnumerator_AddRef), (void *)(FormatEnumerator_Release), (void *)(FormatEnumerator_Next), (void *)(FormatEnumerator_Skip), (void *)(FormatEnumerator_Reset), (void *)(FormatEnumerator_Clone) }; FormatEnumerator::FormatEnumerator(int pos_, CLIPFORMAT formats_[], int formatsLen_) { vtbl = vtFormatEnumerator; ref = 0; // First QI adds first reference... pos = pos_; formatsLen = formatsLen_; for (int i=0;isci->QueryInterface(riid, ppv); } STDMETHODIMP_(ULONG)DropSource_AddRef(DropSource *ds) { return ds->sci->AddRef(); } STDMETHODIMP_(ULONG)DropSource_Release(DropSource *ds) { return ds->sci->Release(); } /// Implement IDropSource STDMETHODIMP DropSource_QueryContinueDrag(DropSource *, BOOL fEsc, DWORD grfKeyState) { if (fEsc) return DRAGDROP_S_CANCEL; if (!(grfKeyState & MK_LBUTTON)) return DRAGDROP_S_DROP; return S_OK; } STDMETHODIMP DropSource_GiveFeedback(DropSource *, DWORD) { return DRAGDROP_S_USEDEFAULTCURSORS; } static void *vtDropSource[] = { (void *)(DropSource_QueryInterface), (void *)(DropSource_AddRef), (void *)(DropSource_Release), (void *)(DropSource_QueryContinueDrag), (void *)(DropSource_GiveFeedback) }; DropSource::DropSource() { vtbl = vtDropSource; sci = 0; } /// Implement IUnkown STDMETHODIMP DataObject_QueryInterface(DataObject *pd, REFIID riid, PVOID *ppv) { //Platform::DebugPrintf("DO QI %x\n", pd); return pd->sci->QueryInterface(riid, ppv); } STDMETHODIMP_(ULONG)DataObject_AddRef(DataObject *pd) { return pd->sci->AddRef(); } STDMETHODIMP_(ULONG)DataObject_Release(DataObject *pd) { return pd->sci->Release(); } /// Implement IDataObject STDMETHODIMP DataObject_GetData(DataObject *pd, FORMATETC *pFEIn, STGMEDIUM *pSTM) { return pd->sci->GetData(pFEIn, pSTM); } STDMETHODIMP DataObject_GetDataHere(DataObject *, FORMATETC *, STGMEDIUM *) { //Platform::DebugPrintf("DOB GetDataHere\n"); return E_NOTIMPL; } STDMETHODIMP DataObject_QueryGetData(DataObject *pd, FORMATETC *pFE) { if (pd->sci->DragIsRectangularOK(pFE->cfFormat) && pFE->ptd == 0 && (pFE->dwAspect & DVASPECT_CONTENT) != 0 && pFE->lindex == -1 && (pFE->tymed & TYMED_HGLOBAL) != 0 ) { return S_OK; } bool formatOK = (pFE->cfFormat == CF_TEXT) || ((pFE->cfFormat == CF_UNICODETEXT) && pd->sci->IsUnicodeMode()); if (!formatOK || pFE->ptd != 0 || (pFE->dwAspect & DVASPECT_CONTENT) == 0 || pFE->lindex != -1 || (pFE->tymed & TYMED_HGLOBAL) == 0 ) { //Platform::DebugPrintf("DOB QueryGetData No %x\n",pFE->cfFormat); //return DATA_E_FORMATETC; return S_FALSE; } //Platform::DebugPrintf("DOB QueryGetData OK %x\n",pFE->cfFormat); return S_OK; } STDMETHODIMP DataObject_GetCanonicalFormatEtc(DataObject *pd, FORMATETC *, FORMATETC *pFEOut) { //Platform::DebugPrintf("DOB GetCanon\n"); if (pd->sci->IsUnicodeMode()) pFEOut->cfFormat = CF_UNICODETEXT; else pFEOut->cfFormat = CF_TEXT; pFEOut->ptd = 0; pFEOut->dwAspect = DVASPECT_CONTENT; pFEOut->lindex = -1; pFEOut->tymed = TYMED_HGLOBAL; return S_OK; } STDMETHODIMP DataObject_SetData(DataObject *, FORMATETC *, STGMEDIUM *, BOOL) { //Platform::DebugPrintf("DOB SetData\n"); return E_FAIL; } STDMETHODIMP DataObject_EnumFormatEtc(DataObject *pd, DWORD dwDirection, IEnumFORMATETC **ppEnum) { //Platform::DebugPrintf("DOB EnumFormatEtc %d\n", dwDirection); if (dwDirection != DATADIR_GET) { *ppEnum = 0; return E_FAIL; } FormatEnumerator *pfe; if (pd->sci->IsUnicodeMode()) { CLIPFORMAT formats[] = {CF_UNICODETEXT, CF_TEXT}; pfe = new FormatEnumerator(0, formats, 2); } else { CLIPFORMAT formats[] = {CF_TEXT}; pfe = new FormatEnumerator(0, formats, 1); } return FormatEnumerator_QueryInterface(pfe, IID_IEnumFORMATETC, reinterpret_cast(ppEnum)); } STDMETHODIMP DataObject_DAdvise(DataObject *, FORMATETC *, DWORD, IAdviseSink *, PDWORD) { //Platform::DebugPrintf("DOB DAdvise\n"); return E_FAIL; } STDMETHODIMP DataObject_DUnadvise(DataObject *, DWORD) { //Platform::DebugPrintf("DOB DUnadvise\n"); return E_FAIL; } STDMETHODIMP DataObject_EnumDAdvise(DataObject *, IEnumSTATDATA **) { //Platform::DebugPrintf("DOB EnumDAdvise\n"); return E_FAIL; } static void *vtDataObject[] = { (void *)(DataObject_QueryInterface), (void *)(DataObject_AddRef), (void *)(DataObject_Release), (void *)(DataObject_GetData), (void *)(DataObject_GetDataHere), (void *)(DataObject_QueryGetData), (void *)(DataObject_GetCanonicalFormatEtc), (void *)(DataObject_SetData), (void *)(DataObject_EnumFormatEtc), (void *)(DataObject_DAdvise), (void *)(DataObject_DUnadvise), (void *)(DataObject_EnumDAdvise) }; DataObject::DataObject() { vtbl = vtDataObject; sci = 0; } /// Implement IUnknown STDMETHODIMP DropTarget_QueryInterface(DropTarget *dt, REFIID riid, PVOID *ppv) { //Platform::DebugPrintf("DT QI %x\n", dt); return dt->sci->QueryInterface(riid, ppv); } STDMETHODIMP_(ULONG)DropTarget_AddRef(DropTarget *dt) { return dt->sci->AddRef(); } STDMETHODIMP_(ULONG)DropTarget_Release(DropTarget *dt) { return dt->sci->Release(); } /// Implement IDropTarget by forwarding to Scintilla STDMETHODIMP DropTarget_DragEnter(DropTarget *dt, LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL pt, PDWORD pdwEffect) { return dt->sci->DragEnter(pIDataSource, grfKeyState, pt, pdwEffect); } STDMETHODIMP DropTarget_DragOver(DropTarget *dt, DWORD grfKeyState, POINTL pt, PDWORD pdwEffect) { return dt->sci->DragOver(grfKeyState, pt, pdwEffect); } STDMETHODIMP DropTarget_DragLeave(DropTarget *dt) { return dt->sci->DragLeave(); } STDMETHODIMP DropTarget_Drop(DropTarget *dt, LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL pt, PDWORD pdwEffect) { return dt->sci->Drop(pIDataSource, grfKeyState, pt, pdwEffect); } static void *vtDropTarget[] = { (void *)(DropTarget_QueryInterface), (void *)(DropTarget_AddRef), (void *)(DropTarget_Release), (void *)(DropTarget_DragEnter), (void *)(DropTarget_DragOver), (void *)(DropTarget_DragLeave), (void *)(DropTarget_Drop) }; DropTarget::DropTarget() { vtbl = vtDropTarget; sci = 0; } /** * DBCS: support Input Method Editor (IME). * Called when IME Window opened. */ void ScintillaWin::ImeStartComposition() { #ifndef __DMC__ // Digital Mars compiler does not include Imm library if (caret.active) { // Move IME Window to current caret position HIMC hIMC = ::ImmGetContext(MainHWND()); Point pos = LocationFromPosition(currentPos); COMPOSITIONFORM CompForm; CompForm.dwStyle = CFS_POINT; CompForm.ptCurrentPos.x = pos.x; CompForm.ptCurrentPos.y = pos.y; ::ImmSetCompositionWindow(hIMC, &CompForm); // Set font of IME window to same as surrounded text. if (stylesValid) { // Since the style creation code has been made platform independent, // The logfont for the IME is recreated here. int styleHere = (pdoc->StyleAt(currentPos)) & 31; LOGFONT lf = {0,0,0,0,0,0,0,0,0,0,0,0,0,TEXT("")}; int sizeZoomed = vs.styles[styleHere].size + vs.zoomLevel; if (sizeZoomed <= 2) // Hangs if sizeZoomed <= 1 sizeZoomed = 2; AutoSurface surface(this); int deviceHeight = sizeZoomed; if (surface) { deviceHeight = (sizeZoomed * surface->LogPixelsY()) / 72; } // The negative is to allow for leading lf.lfHeight = -(abs(deviceHeight)); lf.lfWeight = vs.styles[styleHere].bold ? FW_BOLD : FW_NORMAL; lf.lfItalic = static_cast(vs.styles[styleHere].italic ? 1 : 0); lf.lfCharSet = DEFAULT_CHARSET; lf.lfFaceName[0] = '\0'; if (vs.styles[styleHere].fontName) strcpy(lf.lfFaceName, vs.styles[styleHere].fontName); ::ImmSetCompositionFont(hIMC, &lf); } ::ImmReleaseContext(MainHWND(), hIMC); // Caret is displayed in IME window. So, caret in Scintilla is useless. DropCaret(); } #endif } /** Called when IME Window closed. */ void ScintillaWin::ImeEndComposition() { ShowCaretAtCurrentPosition(); } void ScintillaWin::AddCharBytes(char b0, char b1) { int inputCodePage = InputCodePage(); if (inputCodePage && IsUnicodeMode()) { char utfval[4]="\0\0\0"; char ansiChars[3]; wchar_t wcs[2]; if (b0) { // Two bytes from IME ansiChars[0] = b0; ansiChars[1] = b1; ansiChars[2] = '\0'; ::MultiByteToWideChar(inputCodePage, 0, ansiChars, 2, wcs, 1); } else { ansiChars[0] = b1; ansiChars[1] = '\0'; ::MultiByteToWideChar(inputCodePage, 0, ansiChars, 1, wcs, 1); } unsigned int len = UTF8Length(wcs, 1); UTF8FromUCS2(wcs, 1, utfval, len); utfval[len] = '\0'; AddCharUTF(utfval,len); } else if (b0) { char dbcsChars[3]; dbcsChars[0] = b0; dbcsChars[1] = b1; dbcsChars[2] = '\0'; AddCharUTF(dbcsChars, 2, true); } else { AddChar(b1); } } void ScintillaWin::GetIntelliMouseParameters() { // This retrieves the number of lines per scroll as configured inthe Mouse Properties sheet in Control Panel ::SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, &linesPerScroll, 0); } void ScintillaWin::CopyToClipboard(const SelectionText &selectedText) { if (!::OpenClipboard(MainHWND())) return ; ::EmptyClipboard(); HGLOBAL uhand; wchar_t *uptr = 0; // Default Scintilla behaviour in Unicode mode if (IsUnicodeMode()) { int uchars = UCS2Length(selectedText.s, selectedText.len); uhand = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, 2 * (uchars)); if (uhand) { uptr = static_cast(::GlobalLock(uhand)); UCS2FromUTF8(selectedText.s, selectedText.len, uptr, uchars); } } else { // Not Unicode mode // Convert to Unicode using the current Scintilla code page UINT cpSrc = CodePageFromCharSet( selectedText.characterSet, selectedText.codePage); uhand = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, 2 * (selectedText.len + 1)); if (uhand) { uptr = static_cast(::GlobalLock(uhand)); ::MultiByteToWideChar(cpSrc, 0, selectedText.s, selectedText.len, uptr, GlobalSize(uhand)); } } // Copy ANSI text to clipboard on Windows 9x // Convert from Unicode text, so other ANSI programs can // paste the text // Windows NT, 2k, XP automatically generates CF_TEXT if (!IsNT() && uhand) { HGLOBAL hand = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, selectedText.len); if (hand) { char *ptr = static_cast(::GlobalLock(hand)); ::WideCharToMultiByte(CP_ACP, 0, uptr, -1, ptr, GlobalSize(hand), NULL, NULL); ::GlobalUnlock(hand); ::SetClipboardData(CF_TEXT, hand); } } if (uhand) { ::GlobalUnlock(uhand); ::SetClipboardData(CF_UNICODETEXT, uhand); } // There was a failure - try to copy at least ANSI text if (!uhand) { HGLOBAL hand = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, selectedText.len); if (hand) { char *ptr = static_cast(::GlobalLock(hand)); memcpy(ptr, selectedText.s, selectedText.len); ::GlobalUnlock(hand); ::SetClipboardData(CF_TEXT, hand); } } if (selectedText.rectangular) { ::SetClipboardData(cfColumnSelect, 0); } ::CloseClipboard(); } void ScintillaWin::ScrollMessage(WPARAM wParam) { //DWORD dwStart = timeGetTime(); //Platform::DebugPrintf("Scroll %x %d\n", wParam, lParam); SCROLLINFO sci; memset(&sci, 0, sizeof(sci)); sci.cbSize = sizeof(sci); sci.fMask = SIF_ALL; GetScrollInfo(SB_VERT, &sci); //Platform::DebugPrintf("ScrollInfo %d mask=%x min=%d max=%d page=%d pos=%d track=%d\n", b,sci.fMask, //sci.nMin, sci.nMax, sci.nPage, sci.nPos, sci.nTrackPos); int topLineNew = topLine; switch (LoWord(wParam)) { case SB_LINEUP: topLineNew -= 1; break; case SB_LINEDOWN: topLineNew += 1; break; case SB_PAGEUP: topLineNew -= LinesToScroll(); break; case SB_PAGEDOWN: topLineNew += LinesToScroll(); break; case SB_TOP: topLineNew = 0; break; case SB_BOTTOM: topLineNew = MaxScrollPos(); break; case SB_THUMBPOSITION: topLineNew = sci.nTrackPos; break; case SB_THUMBTRACK: topLineNew = sci.nTrackPos; break; } ScrollTo(topLineNew); } void ScintillaWin::HorizontalScrollMessage(WPARAM wParam) { int xPos = xOffset; PRectangle rcText = GetTextRectangle(); int pageWidth = rcText.Width() * 2 / 3; switch (LoWord(wParam)) { case SB_LINEUP: xPos -= 20; break; case SB_LINEDOWN: // May move past the logical end xPos += 20; break; case SB_PAGEUP: xPos -= pageWidth; break; case SB_PAGEDOWN: xPos += pageWidth; if (xPos > scrollWidth - rcText.Width()) { // Hit the end exactly xPos = scrollWidth - rcText.Width(); } break; case SB_TOP: xPos = 0; break; case SB_BOTTOM: xPos = scrollWidth; break; case SB_THUMBPOSITION: xPos = HiWord(wParam); break; case SB_THUMBTRACK: xPos = HiWord(wParam); break; } HorizontalScrollTo(xPos); } void ScintillaWin::RealizeWindowPalette(bool inBackGround) { RefreshStyleData(); HDC hdc = ::GetDC(MainHWND()); AutoSurface surfaceWindow(hdc, this); if (surfaceWindow) { int changes = surfaceWindow->SetPalette(&palette, inBackGround); if (changes > 0) Redraw(); surfaceWindow->Release(); } ::ReleaseDC(MainHWND(), hdc); } /** * Redraw all of text area. * This paint will not be abandoned. */ void ScintillaWin::FullPaint() { HDC hdc = ::GetDC(MainHWND()); FullPaintDC(hdc); ::ReleaseDC(MainHWND(), hdc); } /** * Redraw all of text area on the specified DC. * This paint will not be abandoned. */ void ScintillaWin::FullPaintDC(HDC hdc) { paintState = painting; rcPaint = GetClientRectangle(); paintingAllText = true; AutoSurface surfaceWindow(hdc, this); if (surfaceWindow) { Paint(surfaceWindow, rcPaint); surfaceWindow->Release(); } paintState = notPainting; } static bool CompareDevCap(HDC hdc, HDC hOtherDC, int nIndex) { return ::GetDeviceCaps(hdc, nIndex) == ::GetDeviceCaps(hOtherDC, nIndex); } bool ScintillaWin::IsCompatibleDC(HDC hOtherDC) { HDC hdc = ::GetDC(MainHWND()); bool isCompatible = CompareDevCap(hdc, hOtherDC, TECHNOLOGY) && CompareDevCap(hdc, hOtherDC, LOGPIXELSY) && CompareDevCap(hdc, hOtherDC, LOGPIXELSX) && CompareDevCap(hdc, hOtherDC, BITSPIXEL) && CompareDevCap(hdc, hOtherDC, PLANES); ::ReleaseDC(MainHWND(), hdc); return isCompatible; } /// Implement IUnknown STDMETHODIMP ScintillaWin::QueryInterface(REFIID riid, PVOID *ppv) { *ppv = NULL; if (riid == IID_IUnknown) *ppv = reinterpret_cast(&dt); if (riid == IID_IDropSource) *ppv = reinterpret_cast(&ds); if (riid == IID_IDropTarget) *ppv = reinterpret_cast(&dt); if (riid == IID_IDataObject) *ppv = reinterpret_cast(&dob); if (!*ppv) return E_NOINTERFACE; return S_OK; } STDMETHODIMP_(ULONG) ScintillaWin::AddRef() { return 1; } STDMETHODIMP_(ULONG) ScintillaWin::Release() { return 1; } /// Implement IDropTarget STDMETHODIMP ScintillaWin::DragEnter(LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL, PDWORD pdwEffect) { if (pIDataSource == NULL) return E_POINTER; if (IsUnicodeMode()) { FORMATETC fmtu = {CF_UNICODETEXT, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; HRESULT hrHasUText = pIDataSource->QueryGetData(&fmtu); hasOKText = (hrHasUText == S_OK); } if (!hasOKText) { FORMATETC fmte = {CF_TEXT, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; HRESULT hrHasText = pIDataSource->QueryGetData(&fmte); hasOKText = (hrHasText == S_OK); } if (!hasOKText) { *pdwEffect = DROPEFFECT_NONE; return S_OK; } if (inDragDrop) // Internal defaults to move *pdwEffect = DROPEFFECT_MOVE; else *pdwEffect = DROPEFFECT_COPY; if (grfKeyState & MK_ALT) *pdwEffect = DROPEFFECT_MOVE; if (grfKeyState & MK_CONTROL) *pdwEffect = DROPEFFECT_COPY; return S_OK; } STDMETHODIMP ScintillaWin::DragOver(DWORD grfKeyState, POINTL pt, PDWORD pdwEffect) { if (!hasOKText || pdoc->IsReadOnly()) { *pdwEffect = DROPEFFECT_NONE; return S_OK; } // These are the Wordpad semantics. if (inDragDrop) // Internal defaults to move *pdwEffect = DROPEFFECT_MOVE; else *pdwEffect = DROPEFFECT_COPY; if (grfKeyState & MK_ALT) *pdwEffect = DROPEFFECT_MOVE; if (grfKeyState & MK_CONTROL) *pdwEffect = DROPEFFECT_COPY; // Update the cursor. POINT rpt = {pt.x, pt.y}; ::ScreenToClient(MainHWND(), &rpt); SetDragPosition(PositionFromLocation(Point(rpt.x, rpt.y))); return S_OK; } STDMETHODIMP ScintillaWin::DragLeave() { SetDragPosition(invalidPosition); return S_OK; } STDMETHODIMP ScintillaWin::Drop(LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL pt, PDWORD pdwEffect) { if (inDragDrop) // Internal defaults to move *pdwEffect = DROPEFFECT_MOVE; else *pdwEffect = DROPEFFECT_COPY; if (grfKeyState & MK_ALT) *pdwEffect = DROPEFFECT_MOVE; if (grfKeyState & MK_CONTROL) *pdwEffect = DROPEFFECT_COPY; if (pIDataSource == NULL) return E_POINTER; SetDragPosition(invalidPosition); STGMEDIUM medium={0,{0},0}; HRESULT hr = S_OK; char *data = 0; bool dataAllocated = false; if (IsUnicodeMode()) { FORMATETC fmtu = {CF_UNICODETEXT, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; hr = pIDataSource->GetData(&fmtu, &medium); if (SUCCEEDED(hr) && medium.hGlobal) { wchar_t *udata = static_cast(::GlobalLock(medium.hGlobal)); int tlen = ::GlobalSize(medium.hGlobal); // Convert UCS-2 to UTF-8 int dataLen = UTF8Length(udata, tlen/2); data = new char[dataLen+1]; if (data) { UTF8FromUCS2(udata, tlen/2, data, dataLen); dataAllocated = true; } } } if (!data) { FORMATETC fmte = {CF_TEXT, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; hr = pIDataSource->GetData(&fmte, &medium); if (SUCCEEDED(hr) && medium.hGlobal) { data = static_cast(::GlobalLock(medium.hGlobal)); } } if (!data) { //Platform::DebugPrintf("Bad data format: 0x%x\n", hres); return hr; } FORMATETC fmtr = {cfColumnSelect, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL}; HRESULT hrRectangular = pIDataSource->QueryGetData(&fmtr); POINT rpt = {pt.x, pt.y}; ::ScreenToClient(MainHWND(), &rpt); int movePos = PositionFromLocation(Point(rpt.x, rpt.y)); DropAt(movePos, data, *pdwEffect == DROPEFFECT_MOVE, hrRectangular == S_OK); ::GlobalUnlock(medium.hGlobal); // Free data if (medium.pUnkForRelease != NULL) medium.pUnkForRelease->Release(); else ::GlobalFree(medium.hGlobal); if (dataAllocated) delete []data; return S_OK; } /// Implement important part of IDataObject STDMETHODIMP ScintillaWin::GetData(FORMATETC *pFEIn, STGMEDIUM *pSTM) { bool formatOK = (pFEIn->cfFormat == CF_TEXT) || ((pFEIn->cfFormat == CF_UNICODETEXT) && IsUnicodeMode()); if (!formatOK || pFEIn->ptd != 0 || (pFEIn->dwAspect & DVASPECT_CONTENT) == 0 || pFEIn->lindex != -1 || (pFEIn->tymed & TYMED_HGLOBAL) == 0 ) { //Platform::DebugPrintf("DOB GetData No %d %x %x fmt=%x\n", lenDrag, pFEIn, pSTM, pFEIn->cfFormat); return DATA_E_FORMATETC; } pSTM->tymed = TYMED_HGLOBAL; //Platform::DebugPrintf("DOB GetData OK %d %x %x\n", lenDrag, pFEIn, pSTM); HGLOBAL hand; if (pFEIn->cfFormat == CF_UNICODETEXT) { int uchars = UCS2Length(drag.s, drag.len); hand = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, 2 * (uchars)); if (hand) { wchar_t *uptr = static_cast(::GlobalLock(hand)); UCS2FromUTF8(drag.s, drag.len, uptr, uchars); } } else { hand = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, drag.len); if (hand) { char *ptr = static_cast(::GlobalLock(hand)); for (int i = 0; i < drag.len; i++) { ptr[i] = drag.s[i]; } } } ::GlobalUnlock(hand); pSTM->hGlobal = hand; pSTM->pUnkForRelease = 0; return S_OK; } bool ScintillaWin::Register(HINSTANCE hInstance_) { hInstance = hInstance_; bool result; #if 0 // Register the Scintilla class if (IsNT()) { //if (0) { // Register Scintilla as a wide character window WNDCLASSEXW wndclass; wndclass.cbSize = sizeof(wndclass); wndclass.style = CS_GLOBALCLASS | CS_HREDRAW | CS_VREDRAW; wndclass.lpfnWndProc = ::ScintillaWin::SWndProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = sizeof(ScintillaWin *); wndclass.hInstance = hInstance; wndclass.hIcon = NULL; wndclass.hCursor = NULL; wndclass.hbrBackground = NULL; wndclass.lpszMenuName = NULL; wndclass.lpszClassName = L"Scintilla"; wndclass.hIconSm = 0; result = ::RegisterClassExW(&wndclass); } else { #endif // Register Scintilla as a normal character window WNDCLASSEX wndclass; wndclass.cbSize = sizeof(wndclass); wndclass.style = CS_GLOBALCLASS | CS_HREDRAW | CS_VREDRAW; wndclass.lpfnWndProc = ::ScintillaWin::SWndProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = sizeof(ScintillaWin *); wndclass.hInstance = hInstance; wndclass.hIcon = NULL; wndclass.hCursor = NULL; wndclass.hbrBackground = NULL; wndclass.lpszMenuName = NULL; wndclass.lpszClassName = scintillaClassName; wndclass.hIconSm = 0; result = ::RegisterClassEx(&wndclass) != 0; //} if (result) { // Register the CallTip class WNDCLASSEX wndclassc; wndclassc.cbSize = sizeof(wndclassc); wndclassc.style = CS_GLOBALCLASS | CS_HREDRAW | CS_VREDRAW; wndclassc.cbClsExtra = 0; wndclassc.cbWndExtra = sizeof(ScintillaWin *); wndclassc.hInstance = hInstance; wndclassc.hIcon = NULL; wndclassc.hbrBackground = NULL; wndclassc.lpszMenuName = NULL; wndclassc.lpfnWndProc = ScintillaWin::CTWndProc; wndclassc.hCursor = ::LoadCursor(NULL, IDC_ARROW); wndclassc.lpszClassName = callClassName; wndclassc.hIconSm = 0; result = ::RegisterClassEx(&wndclassc) != 0; } return result; } bool ScintillaWin::Unregister() { bool result = ::UnregisterClass(scintillaClassName, hInstance) != 0; if (::UnregisterClass(callClassName, hInstance) == 0) result = false; return result; } bool ScintillaWin::HasCaretSizeChanged() { if ( ( (0 != vs.caretWidth) && (sysCaretWidth != vs.caretWidth) ) || (0 != vs.lineHeight) && (sysCaretHeight != vs.lineHeight) ) { return true; } return false; } BOOL ScintillaWin::CreateSystemCaret() { sysCaretWidth = vs.caretWidth; if (0 == sysCaretWidth) { sysCaretWidth = 1; } sysCaretHeight = vs.lineHeight; int bitmapSize = (((sysCaretWidth + 15) & ~15) >> 3) * sysCaretHeight; char *bits = new char[bitmapSize]; memset(bits, 0, bitmapSize); sysCaretBitmap = ::CreateBitmap(sysCaretWidth, sysCaretHeight, 1, 1, reinterpret_cast(bits)); delete []bits; BOOL retval = ::CreateCaret( MainHWND(), sysCaretBitmap, sysCaretWidth, sysCaretHeight); ::ShowCaret(MainHWND()); return retval; } BOOL ScintillaWin::DestroySystemCaret() { ::HideCaret(MainHWND()); BOOL retval = ::DestroyCaret(); if (sysCaretBitmap) { ::DeleteObject(sysCaretBitmap); sysCaretBitmap = 0; } return retval; } // Take care of 32/64 bit pointers #ifdef GetWindowLongPtr static void *PointerFromWindow(HWND hWnd) { return reinterpret_cast(::GetWindowLongPtr(hWnd, 0)); } static void SetWindowPointer(HWND hWnd, void *ptr) { ::SetWindowLongPtr(hWnd, 0, reinterpret_cast(ptr)); } #else static void *PointerFromWindow(HWND hWnd) { return reinterpret_cast(::GetWindowLong(hWnd, 0)); } static void SetWindowPointer(HWND hWnd, void *ptr) { ::SetWindowLong(hWnd, 0, reinterpret_cast(ptr)); } #endif sptr_t PASCAL ScintillaWin::CTWndProc( HWND hWnd, UINT iMessage, WPARAM wParam, sptr_t lParam) { // Find C++ object associated with window. ScintillaWin *sciThis = reinterpret_cast(PointerFromWindow(hWnd)); // ctp will be zero if WM_CREATE not seen yet if (sciThis == 0) { if (iMessage == WM_CREATE) { // Associate CallTip object with window CREATESTRUCT *pCreate = reinterpret_cast(lParam); SetWindowPointer(hWnd, pCreate->lpCreateParams); return 0; } else { return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } } else { if (iMessage == WM_NCDESTROY) { ::SetWindowLong(hWnd, 0, 0); return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } else if (iMessage == WM_PAINT) { PAINTSTRUCT ps; ::BeginPaint(hWnd, &ps); Surface *surfaceWindow = Surface::Allocate(); if (surfaceWindow) { surfaceWindow->Init(ps.hdc, hWnd); surfaceWindow->SetUnicodeMode(SC_CP_UTF8 == sciThis->ct.codePage); surfaceWindow->SetDBCSMode(sciThis->ct.codePage); sciThis->ct.PaintCT(surfaceWindow); surfaceWindow->Release(); delete surfaceWindow; } ::EndPaint(hWnd, &ps); return 0; } else if ((iMessage == WM_NCLBUTTONDOWN) || (iMessage == WM_NCLBUTTONDBLCLK)) { POINT pt; pt.x = static_cast(LOWORD(lParam)); pt.y = static_cast(HIWORD(lParam)); ScreenToClient(hWnd, &pt); sciThis->ct.MouseClick(Point(pt.x, pt.y)); sciThis->CallTipClick(); return 0; } else if (iMessage == WM_LBUTTONDOWN) { // This does not fire due to the hit test code sciThis->ct.MouseClick(Point::FromLong(lParam)); sciThis->CallTipClick(); return 0; } else if (iMessage == WM_SETCURSOR) { ::SetCursor(::LoadCursor(NULL,IDC_ARROW)); return 0; } else if (iMessage == WM_NCHITTEST) { return HTCAPTION; } else { return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } } } sptr_t ScintillaWin::DirectFunction( ScintillaWin *sci, UINT iMessage, uptr_t wParam, sptr_t lParam) { return sci->WndProc(iMessage, wParam, lParam); } extern "C" __declspec(dllexport) sptr_t __stdcall Scintilla_DirectFunction( ScintillaWin *sci, UINT iMessage, uptr_t wParam, sptr_t lParam) { return sci->WndProc(iMessage, wParam, lParam); } sptr_t PASCAL ScintillaWin::SWndProc( HWND hWnd, UINT iMessage, WPARAM wParam, sptr_t lParam) { //Platform::DebugPrintf("S W:%x M:%x WP:%x L:%x\n", hWnd, iMessage, wParam, lParam); // Find C++ object associated with window. ScintillaWin *sci = reinterpret_cast(PointerFromWindow(hWnd)); // sci will be zero if WM_CREATE not seen yet if (sci == 0) { if (iMessage == WM_CREATE) { // Create C++ object associated with window sci = new ScintillaWin(hWnd); SetWindowPointer(hWnd, sci); return sci->WndProc(iMessage, wParam, lParam); } else { return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } } else { if (iMessage == WM_NCDESTROY) { sci->Finalise(); delete sci; ::SetWindowLong(hWnd, 0, 0); return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } else { return sci->WndProc(iMessage, wParam, lParam); } } } // This function is externally visible so it can be called from container when building statically. // Must be called once only. bool Scintilla_RegisterClasses(void *hInstance) { Platform_Initialise(hInstance); bool result = ScintillaWin::Register(reinterpret_cast(hInstance)); #ifdef SCI_LEXER Scintilla_LinkLexers(); #endif return result; } // This function is externally visible so it can be called from container when building statically. bool Scintilla_ReleaseResources() { bool result = ScintillaWin::Unregister(); Platform_Finalise(); return result; } #ifndef STATIC_BUILD extern "C" int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID) { //Platform::DebugPrintf("Scintilla::DllMain %d %d\n", hInstance, dwReason); if (dwReason == DLL_PROCESS_ATTACH) { if (!Scintilla_RegisterClasses(hInstance)) return FALSE; } else if (dwReason == DLL_PROCESS_DETACH) { Scintilla_ReleaseResources(); } return TRUE; } #endif usr/src/sdlBasic/src/sdlBasic/compile.bat0000777000076500007660000000013310463132677015605 0ustar cd scintilla cd win32 call compile.bat cd .. cd .. cd win32 call compile.bat cd .. usr/src/sdlBasic/src/sdlBasic/sdlBasic_IDE_License.txt0000777000076500007660000000167110463132677020105 0ustar License for Scintilla and sdlBasic Editor Copyright 1998-2003 by Neil Hodgson Copyright 2005 by sdlBasic team http://sdlBasic.sf.net All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. usr/src/sdlBasic/src/sdlBasic/install.bat0000777000076500007660000000004310463132677015623 0ustar cd win32 call install.bat cd .. usr/src/sdlBasic/src/sdlBasic/gtk/0000777000000000000000000000000010645354634016016 5ustar rootrootusr/src/sdlBasic/src/sdlBasic/gtk/sdlBIDE48M.png0000777000076500007660000000213210463133331016444 0ustar ‰PNG  IHDR00Wù‡bKGDÿÿÿ ½§“ pHYsÄÄ•+tIMEÕ &:ÑRüçIDAT8Ëí™?hg‡Ÿ;É։ت°3t¨e+Atw&:¤ÈCHm2”Ì¢|Ê’¥[›8¡»’ìÝÜ´` I†RLK¦wЙ,l©Ør¥(ËÉH±tº’åÐ4Hº;~Ï÷þî}ß»O"@hB“€Ï€¦aÎr üðÐ].›†ù2lÙ‡øyàg`Ùø¦…z¡ mEÚ'}Ï@³U<ˆnsÀœ&´5àa‰†i•¦s0 ³îpXÈhB[ƒ€H]¬ò0ëÁŽŸ_Úßß›†Yׄ¦ûçú‘B´Ê&ðq›ß]\óµZ²KÙ±r¹\´,‹r¹æ½ööp¼ëŒ´ˆ¼Š{{{ôÄktéXF‰©TŠ™™FFFN `x‘]ÒV}÷ÑÑQR©ÓÓÓ}I&áÞ=¸s‡LàNœH$H$}±V2 óópá‚Ï>P¯×‘$ɤT*Q(BI&aaΟ÷ÙÈ677uEQ¨T*LLL0>>Þ¤a­02âeÅÛV!{>y`ß4G‹Åº‚4Â4Íž ×%³­€Hæ‹ÌêÁÁÁcà£wÿ¬Õjìîî²³³ƒ,ËÄãñŽ –ey~ó&\¿gϺ;ǴέY¦õ×1 MMMeºÙ R©°µµÅöö¶ëŒ„m{š=Ö¢^*Œ_Y†»w} o7ÍDýT˜v N‰„"þHvI[‹©0Í ýnp¶3Ñ0šW¥Ré·po¸—ÍËmܿ߾Áyz&v;)ŠB< SwöõV¢“µEarrUU‘$‰b±ˆeYT«ûƒõZ¥HµZ=ÞUUQU•R©ü1xÍ N16öAÏ2 sÊã€÷`h¨v:b±*º^àÆßûШBuà9ð-°âçB³³Òé¿®qxék–KFΘ6ü^èâE‹ááZß﨑3Þ§›¸~ÊôÿÙ`äŒ]àS`}Ð…·Ô±QÂÈëÀºÈ‹+ö›Š+&üà‰.™ÕŽ³È ˆÊ ÿx¦KæŽÃœÈ‹«öÊ_ ú®ð‘ƒ(üÈ*nÆéû3Vq0rvå9©›·«U\?Ð4U¡«À#ÜoòõÔ*ž‡9#gü\<²\çÌ™Ãn³@J—ÌïüЇmÖ6eÕq÷RˆÖ·ÓµšÌë×ãllœÛ¯Våø­[¿²J gb#gÔí¡oYä…«ýãHäÍ/éô?^½úpehèÍm»@< ²Ú¾3Ð!#-;øMذ®KfÏg+)ÈÉÍÖ²ú!¼o|mšå“IEND®B`‚usr/src/sdlBasic/src/sdlBasic/gtk/SciIcon.h0000777000076500007660000000107110463132700015737 0ustar /* XPM */ static char * SciIcon_xpm[] = { "16 16 13 1", " c None", ". c #336633", "+ c #588B58", "@ c #669966", "# c #A3D633", "$ c #417441", "% c #659865", "& c #CCFF33", "* c #386B33", "= c #3C6F3C", "- c #699C64", "; c #C6F936", "> c #71A460", " . ", " ... .. ", " +........... ", " @@+.........# ", " $%@@+.....#&& ", "+...%@...#&&&&. ", "@@+.....*&&&&&.#", "@@@@+..=*&&&&&&&", "@@@@@@@@-&&&&&&&", "@@@@@@@@-&&&&&&&", "@@@@@@;@-&&&&&&&", " @@@@@&@-&&&&&&&", " @@@@&@-&&&&& ", " @@@@@&@-&&& ", " @@@&>-& ", " @& "}; usr/src/sdlBasic/src/sdlBasic/gtk/pixmapsGNOME.h0000777000076500007660000037471010463133331016675 0ustar // Set of images for tool bar buttons // Icons Copyright(C) 1998 by Dean S. Jones // http://jfa.javalobby.org/projects/icons/ // Modified to have same names as tigert.h // Not really anything to do with Gnome - just calling this // file pixmapsGNOME to fit in with previous code. /* XPM */ static char * close_xpm[] = { "32 32 607 2", " c None", ". c #CFD3CF", "+ c #738573", "@ c #345B34", "# c #D4D7D4", "$ c #AA1104", "% c #B31A05", "& c #AD1706", "* c #8A5549", "= c #405333", "- c #316131", "; c #336633", "> c #536C53", ", c #6E816E", "' c #D6D8D6", ") c #932C2C", "! c #962F2F", "~ c #822B2B", "{ c #B21402", "] c #CF360A", "^ c #E34B12", "/ c #D53708", "( c #A1280C", "_ c #613D1F", ": c #3B5C2E", "< c #3A5D3A", "[ c #305D30", "} c #677B67", "| c #AEABA4", "1 c #B78A8A", "2 c #A52B2B", "3 c #D03C3C", "4 c #DE4A4A", "5 c #B83B3B", "6 c #862F2F", "7 c #C45142", "8 c #D13A07", "9 c #ED6429", "0 c #F4946D", "a c #EE744A", "b c #D3340A", "c c #9F270D", "d c #613E20", "e c #3B5D2F", "f c #CCD0CC", "g c #5F765F", "h c #385B2E", "i c #593F29", "j c #9D3330", "k c #D03A3A", "l c #EE7575", "m c #F48E8E", "n c #E75E5E", "o c #BB4040", "p c #863333", "q c #B0402E", "r c #D03D04", "s c #EF6829", "t c #F9AB8D", "u c #FCD9D3", "v c #F9C1B3", "w c #ED704D", "x c #D1300B", "y c #9E240F", "z c #5F3E20", "A c #37572C", "B c #305F30", "C c #5A725A", "D c #335A33", "E c #395D2F", "F c #5A4329", "G c #962B25", "H c #CD3333", "I c #EC7373", "J c #F9C3C3", "K c #FCD7D7", "L c #F8A3A3", "M c #E96363", "N c #BC4545", "O c #833434", "P c #B21100", "Q c #D43E05", "R c #F26E26", "S c #FAA987", "T c #FDD5D1", "U c #FEDFDF", "V c #FEDBDB", "W c #F9B8AD", "X c #E96647", "Y c #CE2C0E", "Z c #9A220F", "` c #5D4022", " . c #326432", ".. c #3A5D2F", "+. c #5B4227", "@. c #942922", "#. c #CC2F2F", "$. c #EA6868", "%. c #F9BABA", "&. c #FEDCDC", "*. c #FDD2D2", "=. c #F9A0A0", "-. c #EC6767", ";. c #B84747", ">. c #7A3333", ",. c #BE1E00", "'. c #EE5F0D", "). c #FB935E", "!. c #FDC8C0", "~. c #FED4D4", "{. c #FFD5D5", "]. c #FED2D1", "^. c #F8ADA3", "/. c #E85E46", "(. c #CB260E", "_. c #982110", ":. c #5D3F22", "<. c #3B5C2F", "[. c #5B4025", "}. c #94241E", "|. c #C92929", "1. c #E96262", "2. c #F8B1B1", "3. c #FED2D2", "4. c #FDC5C5", "5. c #FA8989", "6. c #E25C5C", "7. c #873939", "8. c #B71600", "9. c #DF4905", "0. c #F67A38", "a. c #FBAE96", "b. c #FEC8C6", "c. c #FFCBCA", "d. c #FFCBCB", "e. c #FEC7C7", "f. c #F7A49C", "g. c #E65643", "h. c #C91F0C", "i. c #972011", "j. c #5E3F23", "k. c #3C5C2F", "l. c #5D3F25", "m. c #96221B", "n. c #C82121", "o. c #E65A5A", "p. c #F8A7A7", "q. c #FEC9C9", "r. c #FEC6C6", "s. c #FBA9A9", "t. c #F37373", "u. c #CB4F4F", "v. c #743131", "w. c #AF3112", "x. c #DD4605", "y. c #F57338", "z. c #FBA48E", "A. c #FEBEBC", "B. c #FFC1C1", "C. c #FEBEBE", "D. c #F69C97", "E. c #E24F40", "F. c #C5190B", "G. c #961D10", "H. c #643720", "I. c #663521", "J. c #961D17", "K. c #C61A1A", "L. c #E35150", "M. c #F69F9F", "N. c #FEBFBF", "O. c #FBA0A0", "P. c #F26E6E", "Q. c #CC4B4B", "R. c #863434", "S. c #421B1B", "T. c #6E7664", "U. c #5D351B", "V. c #A42B09", "W. c #DB4106", "X. c #F16B34", "Y. c #F99985", "Z. c #FEB4B2", "`. c #FFB7B7", " + c #FEB4B3", ".+ c #F5928E", "++ c #E1493F", "@+ c #C2150D", "#+ c #9B140F", "$+ c #9E1411", "%+ c #C31515", "&+ c #E24C4C", "*+ c #F69595", "=+ c #FEB4B4", "-+ c #FEB3B3", ";+ c #F99595", ">+ c #EE6665", ",+ c #CB4845", "'+ c #883232", ")+ c #441A1A", "!+ c #447144", "~+ c #3A6D3A", "{+ c #395C2E", "]+ c #5D3B1C", "^+ c #A02809", "/+ c #D73D08", "(+ c #F06332", "_+ c #F8907D", ":+ c #FEAAA9", "<+ c #FFADAD", "[+ c #FDA9A8", "}+ c #F48885", "|+ c #DF413C", "1+ c #C60C0A", "2+ c #C70F0E", "3+ c #E14545", "4+ c #F58B8B", "5+ c #FEAAAA", "6+ c #FEA9A9", "7+ c #F88C8C", "8+ c #EC5E5E", "9+ c #C94340", "0+ c #90472F", "a+ c #544139", "b+ c #8E8F8A", "c+ c #649764", "d+ c #5C8F5C", "e+ c #467946", "f+ c #3A5F30", "g+ c #5A3B1D", "h+ c #9C260A", "i+ c #D33708", "j+ c #ED5B2E", "k+ c #F88777", "l+ c #FEA09E", "m+ c #FFA2A2", "n+ c #FFA3A3", "o+ c #FD9F9E", "p+ c #F47F7E", "q+ c #E03F3E", "r+ c #E14343", "s+ c #F58383", "t+ c #FE9F9F", "u+ c #F78383", "v+ c #EA5656", "w+ c #C63D3B", "x+ c #8D432C", "y+ c #7C7623", "z+ c #2A4B26", "A+ c #2F562F", "B+ c #669966", "C+ c #609360", "D+ c #4A7042", "E+ c #5C4022", "F+ c #9A250B", "G+ c #D13106", "H+ c #EA522B", "I+ c #F77D6F", "J+ c #FD9493", "K+ c #FF9898", "L+ c #FD9696", "M+ c #F78282", "N+ c #F88484", "O+ c #FE9696", "P+ c #FD9494", "Q+ c #F67A7A", "R+ c #E64E4D", "S+ c #C53734", "T+ c #8D4029", "U+ c #7C7521", "V+ c #9EC027", "W+ c #306130", "X+ c #477A33", "Y+ c #6E9B30", "Z+ c #5D8254", "`+ c #634629", " @ c #99260D", ".@ c #CF2C06", "+@ c #E84B2A", "@@ c #F67467", "#@ c #FD8A89", "$@ c #FF8E8E", "%@ c #FD8989", "&@ c #F57070", "*@ c #E54747", "=@ c #C3312F", "-@ c #903F26", ";@ c #7F7622", ">@ c #A0C127", ",@ c #C2F330", "'@ c #3B6E33", ")@ c #6DA033", "!@ c #ADE033", "~@ c #C7FA33", "{@ c #668B5C", "]@ c #715637", "^@ c #9B260F", "/@ c #CB2707", "(@ c #E54327", "_@ c #F56B61", ":@ c #FD8181", "<@ c #FF8484", "[@ c #FD8080", "}@ c #F46868", "|@ c #E33F3F", "1@ c #C02A2A", "2@ c #903B23", "3@ c #7F7420", "4@ c #CCFF33", "5@ c #BAED33", "6@ c #668A5C", "7@ c #7B4932", "8@ c #A61E0C", "9@ c #D12405", "0@ c #E63C24", "a@ c #F5655E", "b@ c #FD7878", "c@ c #FE7979", "d@ c #FD7777", "e@ c #F46161", "f@ c #E43838", "g@ c #CA2626", "h@ c #932C22", "i@ c #7C641F", "j@ c #A0C027", "k@ c #6C8559", "l@ c #83452F", "m@ c #B0200B", "n@ c #D52401", "o@ c #E02A0C", "p@ c #E94031", "q@ c #F0524B", "r@ c #F25652", "s@ c #F25755", "t@ c #F25656", "u@ c #F15454", "v@ c #EF4E4E", "w@ c #E73B3B", "x@ c #DF2626", "y@ c #CF2525", "z@ c #9F2D24", "A@ c #8C6C23", "B@ c #B7D72D", "C@ c #CBFE32", "D@ c #6C865A", "E@ c #835135", "F@ c #B02B10", "G@ c #D32802", "H@ c #DF2900", "I@ c #DE2201", "J@ c #DB1D04", "K@ c #D91807", "L@ c #D61309", "M@ c #D40E0A", "N@ c #D40E0D", "O@ c #D61212", "P@ c #D91616", "Q@ c #DB1B1B", "R@ c #DD2020", "S@ c #DE2626", "T@ c #CC2A2A", "U@ c #A64129", "V@ c #A7952C", "W@ c #C1E530", "X@ c #6C8659", "Y@ c #845134", "Z@ c #B12D0F", "`@ c #D82F01", " # c #E23000", ".# c #E02A00", "+# c #DE2200", "@# c #DA1900", "## c #D61200", "$# c #D30B00", "%# c #D00400", "&# c #D00403", "*# c #D30A0A", "=# c #D61010", "-# c #DA1818", ";# c #DD1F1F", "># c #E12727", ",# c #E22D2D", "'# c #CE3130", ")# c #A8492D", "!# c #A6972D", "~# c #C1E630", "{# c #6C875A", "]# c #855133", "^# c #B22D0E", "/# c #DB3501", "(# c #E63700", "_# c #E43100", ":# c #DB1A00", "<# c #D71200", "[# c #E42E2E", "}# c #E43433", "|# c #D03735", "1# c #A64930", "2# c #A4972E", "3# c #C1E731", "4# c #608F60", "5# c #5A855A", "6# c #6C8558", "7# c #874F31", "8# c #B62F0C", "9# c #DD3B01", "0# c #EA3F00", "a# c #E83900", "b# c #E53100", "c# c #E12A00", "d# c #CE0400", "e# c #CF0403", "f# c #E73535", "g# c #E83B3B", "h# c #D23C3B", "i# c #A74C33", "j# c #A4972F", "k# c #C0E531", "l# c #5C7F5C", "m# c #8E9E8E", "n# c #7D7B68", "o# c #894F31", "p# c #BA330C", "q# c #E14200", "r# c #ED4700", "s# c #EB4000", "t# c #CF0B01", "u# c #BC0906", "v# c #BD0908", "w# c #CF0A0A", "x# c #EB3B3B", "y# c #EC4242", "z# c #D64341", "A# c #AA5137", "B# c #A2972F", "C# c #BFE531", "D# c #964D3E", "E# c #BB360C", "F# c #E44700", "G# c #EF4E00", "H# c #EE4800", "I# c #D31201", "J# c #B81007", "K# c #911713", "L# c #931815", "M# c #BA100F", "N# c #D31111", "O# c #EE4343", "P# c #EE4948", "Q# c #D74947", "R# c #A9543A", "S# c #A19830", "T# c #C0E631", "U# c #C6F831", "V# c #AB0700", "W# c #C63D14", "X# c #E64D00", "Y# c #F35600", "Z# c #F25000", "`# c #D61A00", " $ c #BD1605", ".$ c #902A13", "+$ c #5C3F2D", "@$ c #634732", "#$ c #97331B", "$$ c #BD1614", "%$ c #D61818", "&$ c #F24A4A", "*$ c #F25050", "=$ c #D84E4D", "-$ c #A9583E", ";$ c #8F8630", ">$ c #9FAE63", ",$ c #BB1B00", "'$ c #E95100", ")$ c #F75E00", "!$ c #F55800", "~$ c #D92100", "{$ c #C01A05", "]$ c #983010", "^$ c #776323", "/$ c #53754E", "($ c #608557", "_$ c #93882F", ":$ c #9F401C", "<$ c #BE1D1A", "[$ c #D91F1F", "}$ c #F55151", "|$ c #F55858", "1$ c #D75353", "2$ c #995B5B", "3$ c #C2361E", "4$ c #EA5400", "5$ c #F85F00", "6$ c #DD2800", "7$ c #C01D06", "8$ c #97300F", "9$ c #88731A", "0$ c #86A736", "a$ c #619261", "b$ c #669964", "c$ c #A3CC3E", "d$ c #A59E26", "e$ c #9E431F", "f$ c #BF2220", "g$ c #DC2727", "h$ c #F75858", "i$ c #DC5454", "j$ c #813636", "k$ c #AA5046", "l$ c #C43705", "m$ c #EB5200", "n$ c #F45700", "o$ c #DF2F00", "p$ c #C32206", "q$ c #8C2315", "r$ c #87721A", "s$ c #A3C527", "t$ c #9ECF42", "u$ c #679A65", "v$ c #ABDE43", "w$ c #C2EC2F", "x$ c #A6A027", "y$ c #9C4421", "z$ c #C12725", "A$ c #DF2D2D", "B$ c #F35050", "C$ c #E15050", "D$ c #A44040", "E$ c #582424", "F$ c #C8B0AD", "G$ c #9A3F31", "H$ c #C33506", "I$ c #E84B00", "J$ c #F14F00", "K$ c #E43600", "L$ c #C72605", "M$ c #8F2514", "N$ c #5C4730", "O$ c #A2C527", "P$ c #C3F430", "Q$ c #A6D946", "R$ c #C2EC30", "S$ c #A5A028", "T$ c #9E4925", "U$ c #C32C2A", "V$ c #E23434", "W$ c #F04A4A", "X$ c #A63D3D", "Y$ c #5D2424", "Z$ c #BB5B53", "`$ c #C4330A", " % c #E54500", ".% c #E63D00", "+% c #C92B04", "@% c #902614", "#% c #5E462F", "$% c #55764E", "%% c #C4F531", "&% c #A8DB45", "*% c #9EBB32", "=% c #90794C", "-% c #A44847", ";% c #C42F2F", ">% c #E53B3B", ",% c #ED4242", "'% c #DB4343", ")% c #A53737", "!% c #5F2424", "~% c #9E0C03", "{% c #C2300D", "]% c #DA3802", "^% c #C92E04", "/% c #912612", "(% c #55764F", "_% c #C0F339", ":% c #97CA4D", "<% c #689A62", "[% c #ADD631", "}% c #A6BA69", "|% c #D4D8C6", "1% c #922727", "2% c #C23535", "3% c #D03B3B", "4% c #A23333", "5% c #5E2121", "6% c #920B03", "7% c #9A1105", "8% c #880E06", "9% c #6F4B43", "0% c #4D6347", "a% c #5C8B5C", "b% c #C2F331", "c% c #A2C539", "d% c #AFBE7F", "e% c #C6CCC6", "f% c #ABB990", "g% c #792424", "h% c #792626", "i% c #581E1E", "j% c #C3C0C0", "k% c #C9CCC9", "l% c #859785", "m% c #5B815B", "n% c #A7CE34", "o% c #A9BC73", "p% c #DADDCF", " . + @ # ", " $ % & * = - ; > , ' ) ! ~ ", " { ] ^ / ( _ : ; < ; [ } | 1 2 3 4 5 6 ", " 7 8 9 0 a b c d e f g g f < ; ; h i j k l m n o p ", " q r s t u v w x y z A ; ; B C D ; E F G H I J K L M N O ", " P Q R S T U V W X Y Z ` e ; ; . ...+.@.#.$.%.&.U *.=.-.;.>. ", " ,.'.).!.~.{.{.].^./.(._.:.: ; ; <.[.}.|.1.2.3.{.{.~.4.5.6.7. ", " 8.9.0.a.b.c.d.d.e.f.g.h.i.j.e k.l.m.n.o.p.q.d.d.d.r.s.t.u.v. ", " w.x.y.z.A.B.B.B.C.D.E.F.G.H.I.J.K.L.M.N.B.B.B.C.O.P.Q.R.S. ", "' T.U.V.W.X.Y.Z.`.`.`. +.+++@+#+$+%+&+*+=+`.`.`.-+;+>+,+'+)+ ", "!+~+{+]+^+/+(+_+:+<+<+<+[+}+|+1+2+3+4+5+<+<+<+6+7+8+9+0+a+b+ ", "c+d+e+f+g+h+i+j+k+l+m+n+n+o+p+q+r+s+t+n+n+m+t+u+v+w+x+y+z+A+, ' ", "B+B+B+C+D+E+F+G+H+I+J+K+K+K+L+M+N+O+K+K+K+P+Q+R+S+T+U+V+W+; X+Y+", "B+B+B+B+c+Z+`+ @.@+@@@#@$@$@$@$@$@$@$@$@%@&@*@=@-@;@>@,@'@)@!@~@", "B+B+B+B+B+B+{@]@^@/@(@_@:@<@<@<@<@<@<@[@}@|@1@2@3@>@,@4@5@4@4@4@", "B+B+B+B+B+B+B+6@7@8@9@0@a@b@c@c@c@c@d@e@f@g@h@i@j@,@4@4@4@4@4@4@", "B+B+B+B+B+B+B+k@l@m@n@o@p@q@r@s@t@u@v@w@x@y@z@A@B@C@4@4@4@4@4@4@", "B+B+B+B+B+B+D@E@F@G@H@I@J@K@L@M@N@O@P@Q@R@S@T@U@V@W@4@4@4@4@4@4@", "B+B+B+B+B+X@Y@Z@`@ #.#+#@###$#%#&#*#=#-#;#>#,#'#)#!#~#4@4@4@4@4@", "B+B+B+B+{#]#^#/#(#_#.#+#:#<#$#%#&#*#=#-#;#>#[#}#|#1#2#3#4@4@4@4@", "B+4#5#6#7#8#9#0#a#b#c#+#:#<#$#d#e#*#=#-#;#>#[#f#g#h#i#j#k#4@4@4@", "l#m#n#o#p#q#r#s#a#b#c#+#:#<#t#u#v#w#=#-#;#>#[#f#x#y#z#A#B#C#4@4@", " D#E#F#G#H#s#a#_#c#+#:#I#J#K#L#M#N#-#;#>#[#f#x#O#P#Q#R#S#T#U#", " V#W#X#Y#Z#H#s#a#_#.#+#`# $.$+$@$#$$$%$;#>#[#f#x#O#&$*$=$-$;$>$", " ,$'$)$!$Z#H#s#a#_#c#~${$]$^$/$($_$:$<$[$>#[#f#x#O#&$}$|$1$2$ ", " 3$4$5$!$Z#H#s#a#b#6$7$8$9$0$a$b$c$d$e$f$g$[#f#x#O#&$}$h$i$j$ ", " k$l$m$n$Z#H#s#a#o$p$q$r$s$t$B+u$v$w$x$y$z$A$f#x#O#&$B$C$D$E$ ", " F$G$H$I$J$H#s#K$L$M$N$O$P$Q$B+u$v$4@R$S$T$U$V$x#O#W$4 X$Y$ ", " Z$`$ %r#.%+%@%#%$%%%4@&%u$u$v$4@U#*%=%-%;%>%,%'%)%!% ", " ~%{%]%^%/%#%(%a$4@4@_%:%<%v$[%}%|% 1%2%3%4%5% ", " 6%7%8%9%0%a%B+4@b%c%d%e%f% g%h%i% ", " j%k%l%m%n%o%p% "}; #if 0 /* XPM */ static char * DocumentIn_xpm[] = { "20 20 17 1", " c None", ". c #B6B6B6", "+ c #626262", "@ c #000000", "# c #B1FFFF", "$ c #FFB1B1", "% c #CECECE", "& c #7A7A7A", "* c #E6E6E6", "= c #FFFFFF", "- c #868686", "; c #007373", "> c #6E6E6E", ", c #48B8FF", "' c #8ED4FF", ") c #0092DC", "! c #DADADA", " .+++++++++++. ", " +@@@@@@@@@@@+. ", " +@#$####%@%&@+. ", " +@.$%***%@=%&@+. ", " +@#$####%@==%&@+. ", " +@.$%**=%@===%@+. ", " +@#$####%@@@@@@+. ", " +@.$%**==%%%%%@+. ", " +@#-;#########@+. ", " +@.@@>*====***@+. ", "---@-@,@;#######@+. ", "@@@@@@,,@>====**@+. ", "@',,,,,,,@;#####@+. ", "@))))),,)@>====*@+. ", "@@@@@@,)@;######@+. ", "---@+@)@>****===@+. ", " +@#@@;########@+. ", " +@.--%!!!!****@+. ", " +@@@@@@@@@@@@@@+. ", " .++++++++++++++. "}; #endif #if 0 /* XPM */ static char * Forward_xpm[] = { "20 20 22 1", " c None", ". c #AAAAAA", "+ c #626262", "@ c #3E3E3E", "# c #000000", "$ c #626200", "% c #937A00", "& c #B6B6B6", "* c #AF9200", "= c #FFF0D4", "- c #DFD48E", "; c #FFFFFF", "> c #C3B848", ", c #BDAA25", "' c #9E9E9E", ") c #F2F2F2", "! c #DADADA", "~ c #48B8FF", "{ c #565656", "] c #323200", "^ c #8ED4FF", "/ c #0092DC", " .+@#@+. ", " .@#$%$#@. ", " &+#*=--%#+& ", " &@$=;->,$@& ", " &#%--->,%#& ", " &@$->>,*$@& ", " +#%,,*%#+ ", " '+#$%$#+' ", " +####@#@####+", " @@+#)))))!!!!#+", " ##@#!.))!!!.!#+", "+++++#~##.{)!!!!{!#+", "######~~#@]]]]]]]!#+", "#^~~~~~~~#]*%%%%]!#+", "#/////~~/##*%]*%###+", "######~/#@#*%]*%#++&", "+++++#/#@+#*%#*%#+ ", " ##@ +#*%#*%#+ ", " @@ +#$$#$$#+ ", " +#######+ "}; #endif #if 0 /* XPM */ static char * Help_xpm[] = { "20 20 20 1", " c None", ". c #B6B6B6", "+ c #626262", "@ c #000000", "# c #505000", "$ c #FFAA25", "% c #FFC66B", "& c #FFE2B1", "* c #FFFFFF", "= c #FFFF6B", "- c #B9B900", "; c #969600", "> c #3E3E3E", ", c #808000", "' c #FEFE00", ") c #1A1A1A", "! c #DCDC00", "~ c #323232", "{ c #262626", "] c #6E6E6E", " .++++++++++++++++. ", ".+@@@@@@@@@@@@@@@@+.", "+@#$%%%%%%%%%%%%$#@+", "+@$%&&&&&&&&&&&&&$@+", "+@%&**=-;+>,-===&%@+", "+@%&*='>,=+@)!==&%@+", "+@%&*=!@~=!@@-==&%@+", "+@%&*==~+=!@@-==&%@+", "+@%&*=====,@>!==&%@+", "+@%&*====={+!===&%@+", "+@%&=====]-=====&%@+", "+@%&====!>;=====&%@+", "+@%&====+@@=====&%@+", "+@%&====;@>=====&%@+", "+@$%==========&&%$@+", "+@#$&=&&%%%%%%%%$#@+", " +@@&&&%$@@@@@@@@@+.", " +@%%$@@>++++++++. ", " +@$@@>+ ", " +@@@+. "}; #endif #if 0 /* XPM */ static char * Left_xpm[] = { "20 20 11 1", " c None", ". c #B6B6B6", "+ c #626262", "@ c #000000", "# c #8ED4FF", "$ c #B1E2FF", "% c #48B8FF", "& c #FFFFFF", "* c #25AAFF", "= c #0092DC", "- c #007AB9", " ", " ", " .. ", " .++. ", " .+@@+. ", " .+@#@+.......... ", " .+@#$@+++++++++++.", " .+@#$%@@@@@@@@@@@@+", ".+@#&%%%#########*@+", "+@#&%%%%%%%%%%%%%=@+", "+@-*%%%%%%%%%%%%%=@+", ".+@-*%*===========@+", " .+@-**@@@@@@@@@@@@+", " .+@-*@+++++++++++.", " .+@-@+.......... ", " .+@@+. ", " .++. ", " .. ", " ", " "}; #endif /* XPM */ static char * search_xpm[] = { "32 32 516 2", " c None", ". c #A4A4A4", "+ c #616161", "@ c #686868", "# c #7F7F7D", "$ c #898885", "% c #7F7E7C", "& c #646363", "* c #4E4E4E", "= c #727272", "- c #BDBDBD", "; c #5B5B5B", "> c #8E8D8B", ", c #C4C2BB", "' c #CDCCCA", ") c #BEC1CA", "! c #B1B6C6", "~ c #B1B5C0", "{ c #B9B8B8", "] c #B5B2AB", "^ c #868583", "/ c #383838", "( c #787878", "_ c #8A8A8A", ": c #737373", "< c #D0CDC7", "[ c #C4C7CF", "} c #909FCB", "| c #91A3D7", "1 c #A1B2E2", "2 c #A4B4E3", "3 c #91A4DA", "4 c #7087C7", "5 c #687DB7", "6 c #9BA1B4", "7 c #B9B7B0", "8 c #686766", "9 c #353535", "0 c #8B8B8B", "a c #828282", "b c #E4E2DC", "c c #BBC7E6", "d c #A4BAEE", "e c #C5D7F6", "f c #E5EFF9", "g c #F2F7FA", "h c #F3F7FA", "i c #EDF4F9", "j c #DFECF7", "k c #C5D9F7", "l c #7695D3", "m c #687EB4", "n c #B1AFAD", "o c #797876", "p c #2B2B2B", "q c #BEBEBE", "r c #717171", "s c #E6E3DE", "t c #B7C7EA", "u c #9FBCE7", "v c #B3CED2", "w c #CFE0E2", "x c #F1F6FB", "y c #FAFCFD", "z c #F0F6FB", "A c #DDEAF4", "B c #D6E6F4", "C c #D5E9F7", "D c #A9CAF9", "E c #5D7BBC", "F c #A9A7A5", "G c #626261", "H c #505050", "I c #565656", "J c #D1CEC9", "K c #C2D0E5", "L c #8AB0D5", "M c #99BEC1", "N c #95B9B9", "O c #C7DAE0", "P c #F4F8FC", "Q c #FEFEFE", "R c #C9DCE2", "S c #B6D0DC", "T c #BED8EA", "U c #C7E1F3", "V c #A3C9FA", "W c #637BAD", "X c #A6A39E", "Y c #2A2A2A", "Z c #BCBCBC", "` c #A7A7A7", " . c #898A88", ".. c #D8DBDD", "+. c #7AA3C0", "@. c #7EADB5", "#. c #81ADB1", "$. c #88B1B4", "%. c #BBD3DC", "&. c #E8F1F8", "*. c #F6F9FC", "=. c #F7FAFD", "-. c #E7F1F8", ";. c #B1CCD2", ">. c #8EB5B9", ",. c #92BAC4", "'. c #A2C6D8", "). c #B1D3E9", "!. c #7DACF0", "~. c #808899", "{. c #787673", "]. c #585858", "^. c #C4C1BC", "/. c #A6BECC", "(. c #669BB1", "_. c #78A9B1", ":. c #7AA9B1", "<. c #7DABB1", "[. c #9ABEC7", "}. c #B6D1D9", "|. c #C3D8DE", "1. c #CBDEE6", "2. c #C3DAE7", "3. c #99BEC6", "4. c #7EABB1", "5. c #7AAAB5", "6. c #85B3C4", "7. c #95C4E7", "8. c #6986B5", "9. c #94918C", "0. c #1A1A1A", "a. c #5B5B5A", "b. c #DDDAD6", "c. c #84AABB", "d. c #6CA2B1", "e. c #70A5B1", "f. c #74A6B1", "g. c #77A8B1", "h. c #7BAAB2", "i. c #83AEB5", "j. c #88B2B8", "k. c #8CB5BB", "l. c #8EB6C2", "m. c #80AEB7", "n. c #70A4B1", "o. c #72A5B1", "p. c #85B5C0", "q. c #7AA3DA", "r. c #8C8C8F", "s. c #373735", "t. c #A6A6A6", "u. c #6E6E6D", "v. c #E0DFE0", "w. c #81ACB9", "x. c #7AAAB3", "y. c #73A6B1", "z. c #75A7B1", "A. c #84B1B3", "B. c #91BBEE", "C. c #828790", "D. c #4C4B49", "E. c #797979", "F. c #747573", "G. c #DEDEE0", "H. c #8EB9C3", "I. c #8DB9BD", "J. c #83B2B8", "K. c #7AABB3", "L. c #71A5B1", "M. c #74A7B1", "N. c #78A8B1", "O. c #82ADB1", "P. c #8EB7B3", "Q. c #9FC6F2", "R. c #7F8691", "S. c #514F4E", "T. c #6C6C6C", "U. c #6B6E6A", "V. c #DAD9D9", "W. c #9BC2CD", "X. c #9CC4C4", "Y. c #97C0C2", "Z. c #8EBABE", "`. c #84B2B7", " + c #7DABB2", ".+ c #79A9B1", "++ c #79A8B1", "@+ c #7BAAB1", "#+ c #7EACB1", "$+ c #88B2B1", "%+ c #94BCB1", "&+ c #B1D5BD", "*+ c #9FC4EB", "=+ c #80858C", "-+ c #464642", ";+ c #7F7F7F", ">+ c #CCC9C7", ",+ c #AACAD6", "'+ c #9CC4C2", ")+ c #A2C7C4", "!+ c #9DC5C4", "~+ c #99C2C2", "{+ c #8DB7B9", "]+ c #84AFB1", "^+ c #83AEB1", "/+ c #86B0B1", "(+ c #8AB3B1", "_+ c #95BDB1", ":+ c #A7CDB1", "<+ c #BCE0B1", "[+ c #CFEFD0", "}+ c #90B2D5", "|+ c #848484", "1+ c #2C2C2B", "2+ c #B0B0B0", "3+ c #636363", "4+ c #AAA7A5", "5+ c #C8D9E0", "6+ c #8EB9B8", "7+ c #A1C4BD", "8+ c #A2C7C2", "9+ c #A3C8C4", "0+ c #98BEBB", "a+ c #8EB4B1", "b+ c #8DB4B1", "c+ c #8FB5B1", "d+ c #99BEB1", "e+ c #AACFB1", "f+ c #C8ECB1", "g+ c #CFF1B1", "h+ c #CDEEEE", "i+ c #7E94AA", "j+ c #807D7B", "k+ c #161616", "l+ c #C4C4C4", "m+ c #707070", "n+ c #D7D6D6", "o+ c #A1C4CE", "p+ c #95B9B3", "q+ c #9CBFB8", "r+ c #A0C3BD", "s+ c #9BBEB9", "t+ c #93B7B1", "u+ c #96B8B3", "v+ c #97BCB1", "w+ c #B4D7B1", "x+ c #C9ECB1", "y+ c #CEF1B1", "z+ c #D0F2B1", "A+ c #D8F5D0", "B+ c #A7C8E7", "C+ c #84878B", "D+ c #595958", "E+ c #4A4A4A", "F+ c #EBEBEB", "G+ c #A6A5A3", "H+ c #D4DAE1", "I+ c #9BC0C7", "J+ c #98BAB1", "K+ c #9ABBB3", "L+ c #99BBB3", "M+ c #9BBBB5", "N+ c #B3CCC7", "O+ c #A2C2B5", "P+ c #C0E2B1", "Q+ c #D1F2B1", "R+ c #D3F3B1", "S+ c #D9F5C7", "T+ c #C5E3FB", "U+ c #808D9A", "V+ c #7F7D7B", "W+ c #1A1B1B", "X+ c #D9D9D9", "Y+ c #E3E4E3", "Z+ c #AFB6AF", "`+ c #575957", " @ c #B6B4B2", ".@ c #CDD6DE", "+@ c #A6C8CF", "@@ c #9ABBB1", "#@ c #9CBBB1", "$@ c #A8C3BB", "%@ c #D3E1DD", "&@ c #AEC9BB", "*@ c #C4E3B1", "=@ c #D6F5B1", "-@ c #DCF7D0", ";@ c #C6E2F7", ">@ c #8796A4", ",@ c #9A9896", "'@ c #7A7B7B", ")@ c #1A1717", "!@ c #CFCDCD", "~@ c #AEB7AE", "{@ c #4D6C4D", "]@ c #325632", "^@ c #646964", "/@ c #ADACAA", "(@ c #C6CACE", "_@ c #BBD1DD", ":@ c #AFCCD1", "<@ c #ABC8C2", "[@ c #B6D0C7", "}@ c #B5CFC5", "|@ c #B4D0C1", "1@ c #D1EDD0", "2@ c #D2ECEC", "3@ c #B0C6D8", "4@ c #8D959C", "5@ c #92908E", "6@ c #B3B3B3", "7@ c #DCE2E2", "8@ c #9E7A79", "9@ c #C53D30", "0@ c #751819", "a@ c #859685", "b@ c #497449", "c@ c #477947", "d@ c #3D6A3D", "e@ c #5E675E", "f@ c #91908F", "g@ c #B3B2B1", "h@ c #BABFC4", "i@ c #BCC9D4", "j@ c #BFD0DF", "k@ c #C0D1E2", "l@ c #BACBDA", "m@ c #ACBAC6", "n@ c #9AA1A8", "o@ c #929191", "p@ c #807E7D", "q@ c #414141", "r@ c #777F7F", "s@ c #BCBDBF", "t@ c #E1E4EB", "u@ c #F5F4BF", "v@ c #F89241", "w@ c #710D0D", "x@ c #D4D4D4", "y@ c #486948", "z@ c #417141", "A@ c #4E814E", "B@ c #518451", "C@ c #3F723F", "D@ c #425C42", "E@ c #636863", "F@ c #868584", "G@ c #9B9998", "H@ c #9F9E9D", "I@ c #9D9C9B", "J@ c #979695", "K@ c #8D8B8A", "L@ c #7A7877", "M@ c #4D4D4D", "N@ c #2F2F2F", "O@ c #989898", "P@ c #7E1F1E", "Q@ c #C0B1A7", "R@ c #C0C8C5", "S@ c #F5E481", "T@ c #FFFA59", "U@ c #F5963E", "V@ c #700C0C", "W@ c #D2D2D2", "X@ c #508150", "Y@ c #477A47", "Z@ c #407340", "`@ c #437643", " # c #3B6E3B", ".# c #3A6D33", "+# c #71A433", "@# c #7FA129", "## c #425641", "$# c #485447", "%# c #4B544B", "&# c #485244", "*# c #516130", "=# c #595959", "-# c #B6B6B6", ";# c #A32A2A", "># c #E9A16A", ",# c #F9D762", "'# c #FFB62C", ")# c #FFC93E", "!# c #FFFB5F", "~# c #F39A40", "{# c #6E0C0C", "]# c #CDCDCD", "^# c #629562", "/# c #5F925F", "(# c #548754", "_# c #497C3F", ":# c #8CBF38", "<# c #C6F933", "[# c #CBFE33", "}# c #C8FB31", "|# c #B4E730", "1# c #A9D92E", "2# c #B6C293", "3# c #D7C5C5", "4# c #A10E08", "5# c #ED5A03", "6# c #FF890F", "7# c #FFA527", "8# c #FFCA40", "9# c #FFFB5E", "0# c #F29D41", "a# c #6D0C0B", "b# c #CDCCCC", "c# c #639563", "d# c #639663", "e# c #5D905B", "f# c #659859", "g# c #99CC43", "h# c #C7FA33", "i# c #C9FC33", "j# c #C0F030", "k# c #B8C493", "l# c #DACDCD", "m# c #990E09", "n# c #E85705", "o# c #FF8B10", "p# c #FFA426", "q# c #FFC93F", "r# c #FFFA5E", "s# c #F0A142", "t# c #6C0C0A", "u# c #C8C8C8", "v# c #578157", "w# c #5E8E5E", "x# c #659862", "y# c #77AA59", "z# c #7CAF56", "A# c #9FD245", "B# c #CAFE31", "C# c #C9FC30", "D# c #BCEE2D", "E# c #DCD2D2", "F# c #930F0B", "G# c #E65605", "H# c #FFC83E", "I# c #EFA444", "J# c #690F0C", "K# c #BBBBBB", "L# c #839583", "M# c #567D56", "N# c #609360", "O# c #699C60", "P# c #91C44C", "Q# c #A1D445", "R# c #C6F932", "S# c #C9FE30", "T# c #C4F82E", "U# c #B4E32B", "V# c #A0C535", "W# c #C6CEAC", "X# c #DDD4D4", "Y# c #8D0F0B", "Z# c #E35405", "`# c #FF8A10", " $ c #FFA325", ".$ c #FFC73E", "+$ c #FFFC5E", "@$ c #E7923C", "#$ c #4D1C1C", "$$ c #A8B3A8", "%$ c #597C59", "&$ c #96C949", "*$ c #93C649", "=$ c #9FD243", "-$ c #C0F12F", ";$ c #B2E12C", ">$ c #9FC337", ",$ c #A3BA66", "'$ c #C3CDA8", ")$ c #DFD9D9", "!$ c #86100D", "~$ c #DF5205", "{$ c #FFA224", "]$ c #FFD743", "^$ c #EA9B39", "/$ c #481515", "($ c #BAC2BA", "_$ c #6E876E", ":$ c #577E57", "<$ c #62925A", "[$ c #92C546", "}$ c #90C041", "|$ c #8FBC3D", "1$ c #9CC137", "2$ c #A5BB69", "3$ c #C9D1B2", "4$ c #E2E4DD", "5$ c #E0DBDB", "6$ c #80110F", "7$ c #DA4F04", "8$ c #FF8A11", "9$ c #F58B21", "0$ c #861D09", "a$ c #827E7E", "b$ c #D1D5D1", "c$ c #9BA89B", "d$ c #688460", "e$ c #7FA543", "f$ c #8DA854", "g$ c #9EAF7E", "h$ c #C4CDAC", "i$ c #E1E3DA", "j$ c #E2DEDE", "k$ c #7B1413", "l$ c #971F03", "m$ c #670904", "n$ c #6F6868", "o$ c #CED2CD", "p$ c #C0C8B3", "q$ c #DADED2", " . + @ # $ % & * = ", " - ; > , ' ) ! ~ { ] ^ / ( ", " _ : < [ } | 1 2 3 4 5 6 7 8 9 ", " 0 a b c d e f g h i j k l m n o p ", " q r s t u v w x y y z A B C D E F G H ", " I J K L M N O P Q Q g R S T U V W X Y Z ", " ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.9 ", " ].^./.(._.:.<.[.}.|.1.2.3.4.:.5.6.7.8.9.0. ", " a.b.c.d.e.f.g.h.i.j.k.l.m.g.f.n.o.p.q.r.s.t. ", " u.v.w.x.y.n.e.o.f.z.z.f.o.e.n.f.:.A.B.C.D.E. ", " F.G.H.I.J.K.f.L.e.e.n.e.o.M.N.<.O.P.Q.R.S.T. ", " U.V.W.X.Y.Z.`. +.+++++.+@+#+O.$+%+&+*+=+-+;+ ", " I >+,+'+)+!+~+{+]+^+^+]+/+(+_+:+<+[+}+|+1+2+ ", " 3+4+5+6+7+8+9+0+a+b+b+c+d+e+<+f+g+h+i+j+k+ ", " l+m+n+o+p+q+r+s+t+u+u+v+w+x+y+z+A+B+C+D+E+ ", " F++ G+H+I+J+K+L+M+N+N+O+P+Q+R+S+T+U+V+W+X+ ", " Y+Z+`+ @.@+@@@#@$@%@%@&@*@=@-@;@>@,@'@)@!@ ", " ~@{@]@^@/@(@_@:@<@[@}@|@1@2@3@4@5@6@7@8@9@0@X+ ", " a@b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@r@s@t@u@v@w@x@ ", " y@z@A@B@C@D@E@F@G@H@I@J@K@L@M@N@O@P@Q@R@S@T@U@V@W@ ", " X@Y@Z@`@ #.#+#@###$#%#&#*#=#-# ;#>#,#'#)#!#~#{#]# ", " ^#/#(#Y@Z@_#:#<#[#}#|#1#2# 3#4#5#6#7#8#9#0#a#b# ", " c#d#^#/#e#f#g#h#[#[#i#j#k# l#m#n#o#p#q#r#s#t#u# ", " v#w#d#x#y#z#A#h#[#B#C#D#k# E#F#G#o#p#H#r#I#J#K#", " L#M#N#O#P#P#Q#R#S#T#U#V#W# X#Y#Z#`# $.$+$@$#$", " $$%$w#O#&$*$=$-$;$>$,$'$ )$!$~$`#{$]$^$/$", " ($_$:$<$[$}$|$1$2$3$4$ 5$6$7$8$9$0$a$", " b$c$d$e$f$g$h$i$ j$k$l$m$n$ ", " o$p$q$ ", " ", " ", " "}; /* XPM */ static char * filenew_xpm[] = { "32 32 331 2", " c None", ". c #E5BD91", "+ c #E6B48C", "@ c #FBDF6F", "# c #E4AA7C", "$ c #E3AF79", "% c #FFFF99", "& c #E1A96E", "* c #EBC8AE", "= c #F8BE56", "- c #F2BA70", "; c #DFA364", "> c #CB9558", ", c #416041", "' c #2F5B2F", ") c #ECA23E", "! c #F1C471", "~ c #E7AA7D", "{ c #F0F0F0", "] c #DBDDDB", "^ c #728572", "/ c #B8BFB8", "( c #E1E3E1", "_ c #E08B42", ": c #FFF48C", "< c #FFFC95", "[ c #F1C175", "} c #D79551", "| c #A48242", "1 c #306130", "2 c #E0A946", "3 c #D59357", "4 c #DFE1DF", "5 c #D4D7D4", "6 c #476447", "7 c #2E5A2E", "8 c #375B37", "9 c #708370", "0 c #E1E2E1", "a c #E2D0C4", "b c #F5AF49", "c c #F5B349", "d c #E88326", "e c #CD7E27", "f c #C39F43", "g c #E4A84A", "h c #565E39", "i c #657B65", "j c #93A093", "k c #406040", "l c #2F602F", "m c #306230", "n c #2E5C2E", "o c #385B38", "p c #6C806C", "q c #B1B9B1", "r c #E6E8E6", "s c #EBEBEB", "t c #C2AEA0", "u c #F0AF4B", "v c #FFFD95", "w c #FACE5C", "x c #DFA846", "y c #4A5125", "z c #2F612F", "A c #2E5D2E", "B c #335933", "C c #2F592F", "D c #336633", "E c #316431", "F c #2F5D2F", "G c #385D38", "H c #687D68", "I c #E8E9E8", "J c #EFEAE6", "K c #EDC9B0", "L c #E4B697", "M c #C3AD9E", "N c #B46833", "O c #F5B249", "P c #7C622B", "Q c #455D2C", "R c #3B6530", "S c #4E6228", "T c #38632E", "U c #306330", "V c #2F5E2E", "W c #436639", "X c #8E9F7A", "Y c #E6E8E5", "Z c #E8AD80", "` c #F8C762", " . c #F8CB66", ".. c #F8CC66", "+. c #F8CD66", "@. c #FFF489", "#. c #FFFFC8", "$. c #C5B259", "%. c #808D47", "&. c #728643", "*. c #7A8944", "=. c #55672C", "-. c #356833", ";. c #3D7033", ">. c #5A8D33", ",. c #83B631", "'. c #89AB3D", "). c #E1E4DB", "!. c #E6AC79", "~. c #FFFB95", "{. c #7A6D2A", "]. c #598C33", "^. c #87BA33", "/. c #ACDF33", "(. c #C5F833", "_. c #A2C538", ":. c #E1E4D9", "<. c #E3CABA", "[. c #E9C5A5", "}. c #E09D5F", "|. c #A0753F", "1. c #B97E3D", "2. c #F0942C", "3. c #FFF285", "4. c #C28340", "5. c #896D2C", "6. c #7F6E29", "7. c #6A6C2C", "8. c #3C642F", "9. c #346733", "0. c #578A33", "a. c #88BB33", "b. c #B0E333", "c. c #C4F733", "d. c #CBFE33", "e. c #CCFF33", "f. c #A1C637", "g. c #D5D9CD", "h. c #EAEAEA", "i. c #3A683A", "j. c #B37B3F", "k. c #FDE97F", "l. c #FFF485", "m. c #BC7F44", "n. c #356835", "o. c #326432", "p. c #3C6F33", "q. c #588B33", "r. c #B1E433", "s. c #98C430", "t. c #76896E", "u. c #E2DCD9", "v. c #B47B2C", "w. c #FDE87F", "x. c #FDEA7F", "y. c #F0962C", "z. c #9B6D22", "A. c #36602F", "B. c #386B33", "C. c #6EA133", "D. c #C3F633", "E. c #CAFD33", "F. c #9ACD31", "G. c #36642E", "H. c #385C38", "I. c #738766", "J. c #ECD1BB", "K. c #FDE47C", "L. c #B08845", "M. c #94813F", "N. c #BC863C", "O. c #A37E3C", "P. c #8C6921", "Q. c #8ABD33", "R. c #9CCF33", "S. c #447731", "T. c #5A8C30", "U. c #7DAC2F", "V. c #E4A066", "W. c #FFF78F", "X. c #FDE67C", "Y. c #C98444", "Z. c #649764", "`. c #998F53", " + c #AB8848", ".+ c #A47A3D", "++ c #AF6E1E", "@+ c #8DC033", "#+ c #C6F933", "$+ c #B2E533", "%+ c #8CBF33", "&+ c #AEE133", "*+ c #C4F731", "=+ c #D9BEAC", "-+ c #AD7B30", ";+ c #8B7A42", ">+ c #669966", ",+ c #A08348", "'+ c #9D8045", ")+ c #4D804D", "!+ c #3F723F", "~+ c #9C6025", "{+ c #AB6C1E", "]+ c #61652E", "^+ c #457845", "/+ c #44773A", "(+ c #8EC133", "_+ c #C9FC33", ":+ c #C7FA33", "<+ c #BA8230", "[+ c #9F8940", "}+ c #639663", "|+ c #5A8D5A", "1+ c #528552", "2+ c #558855", "3+ c #5E915E", "4+ c #5F925F", "5+ c #5E9155", "6+ c #99CC3E", "7+ c #758A53", "8+ c #AE8A3B", "9+ c #6A9460", "0+ c #659865", "a+ c #6B9E61", "b+ c #A0D346", "c+ c #C7FA34", "d+ c #669965", "e+ c #6C9F62", "f+ c #A2D547", "g+ c #C8FB34", "h+ c #629362", "i+ c #6FA260", "j+ c #78AB5B", "k+ c #6DA061", "l+ c #5C7F5C", "m+ c #5A7F5A", "n+ c #73A65E", "o+ c #9ED149", "p+ c #A6D944", "q+ c #7DB059", "r+ c #AEB7AE", "s+ c #728B72", "t+ c #5E8E5E", "u+ c #84B756", "v+ c #C4F736", "w+ c #B6E93D", "x+ c #7FB258", "y+ c #CAFE31", "z+ c #C8FC31", "A+ c #E4E6E4", "B+ c #8D9D8D", "C+ c #5A825A", "D+ c #619261", "E+ c #85B855", "F+ c #C6F935", "G+ c #B7EA3C", "H+ c #C8FA30", "I+ c #B8E72F", "J+ c #A4C936", "K+ c #D3D7D3", "L+ c #8A9B8A", "M+ c #A2C638", "N+ c #A8BC6D", "O+ c #C9D1AF", "P+ c #E3E4E3", "Q+ c #ADB7AD", "R+ c #6C866C", "S+ c #5A855A", "T+ c #649664", "U+ c #C8FA32", "V+ c #A3C737", "W+ c #A8BC6E", "X+ c #CED5B8", "Y+ c #E6E8E1", "Z+ c #ACB7AC", "`+ c #608060", " @ c #5C895C", ".@ c #B7E52E", "+@ c #A2C737", "@@ c #A6BC69", "#@ c #CDD5B8", "$@ c #E0E2E0", "%@ c #99A799", "&@ c #648164", "*@ c #598359", "=@ c #609360", "-@ c #C7FB31", ";@ c #B6E52E", ">@ c #A6BC68", ",@ c #CCD4B6", "'@ c #D0D5D0", ")@ c #92A292", "!@ c #648264", "~@ c #598459", "{@ c #BDF039", "]@ c #8EC14F", "^@ c #70A35D", "/@ c #9FD245", "(@ c #B5E331", "_@ c #A2C43B", ":@ c #A6BB69", "<@ c #E9EAE5", "[@ c #D1D5D1", "}@ c #638163", "|@ c #598559", "1@ c #639363", "2@ c #83B654", "3@ c #C3F634", "4@ c #B9E830", "5@ c #91B63F", "6@ c #74925D", "7@ c #86A552", "8@ c #A3B86A", "9@ c #CBD3B4", "0@ c #ECECE8", "a@ c #CAD0CA", "b@ c #889B88", "c@ c #5F7F5F", "d@ c #76A14D", "e@ c #A2CA35", "f@ c #A2BB58", "g@ c #C0CA9F", "h@ c #DBDFD4", "i@ c #D2D7C8", "j@ c #ECECEA", "k@ c #D7DBD7", "l@ c #839683", "m@ c #73994D", "n@ c #9BBA46", "o@ c #C6CFAA", "p@ c #EBECE8", " . ", " + @ # ", " $ % & ", " * = - ; % > , ' ) ! ~ { ] ^ ^ / ( ", " _ : < [ } % | 1 2 < : 3 4 5 6 7 8 9 / 0 ", " a b < < c d % e f < < g h i j k l m n o p q r ", " s t u < v w % w v < x y z A B C m D E m F G H q I ", "J K L M N O < v % v < O P Q R S T E D D D D E U V W X Y ", "Z ` . ...+.@.% #.% @.+.$.%.&.*.=.D D D D D -.;.>.,.'.). ", "!.~.% % % % % #.#.#.% % % % % ~.{.D D D -.;.].^./.(._.:. ", "<.[.}.|.1.2.3.% #.% 3.2.4.5.6.7.8.D 9.;.0.a.b.c.d.e.f.g. ", " h.i.j.k.% l.% l.% k.m.n.o.D D p.q.^.r.c.d.e.e.e.s.t./ 0 ", " u.v.w.% x.y.% y.x.% w.z.A.D B.C./.D.E.e.e.e.e.e.F.G.H.I. ", " J.K.% k.L.M.% N.O.k.% K.P.D p.Q.(.e.e.e.e.e.e.e.R.S.T.U. ", " V.W.X.Y.Z.`.% +n..+X.W.++D p.@+#+e.e.e.e.e.e.e.$+%+&+*+ ", " =+-+;+>+>+,+% '+)+!+~+{+]+^+/+(+#+e.e.e.e.e.e.e._+:+d.e. ", " >+>+>+>+<+v [+}+|+1+2+3+4+5+6+:+e.e.e.e.e.e.e.e.e.e.e. ", " >+>+>+>+7+8+9+>+0+Z.Z.0+0+a+b+c+e.e.e.e.e.e.e.e.e.e.e. ", " >+>+>+>+>+>+>+>+>+>+>+d+d+e+f+g+e.e.e.e.e.e.e.e.e.e.e. ", " Z.h+Z.>+>+>+>+>+>+d+i+j+k+e+f+g+e.e.e.e.e.e.e.e.e.e.e. ", " l+m+h+>+>+>+>+>+>+n+o+p+q+e+f+g+e.e.e.e.e.e.e.e.e.e.e. ", " r+s+t+>+>+>+>+>+>+u+v+w+x+e+f+g+e.e.e.e.e.e.e.e.e.y+z+ ", " A+B+C+D+Z.>+>+>+>+E+F+G+x+e+f+g+e.e.e.e.e.e.e.y+H+I+J+ ", " K+L+m+h+>+>+>+>+E+F+G+x+e+f+g+e.e.e.e.e.e.H+I+M+N+O+ ", " P+Q+R+S+T+>+>+>+>+E+F+G+x+e+f+g+e.e.e.e.U+I+V+W+X+Y+ ", " Z+`+ @}+>+>+>+>+>+E+F+G+x+e+f+g+e.e.H+.@+@@@#@Y+ ", " $@%@&@*@=@>+>+>+>+E+F+G+x+e+f+g+-@;@M+>@,@Y+ ", " '@)@!@~@h+>+>+E+F+{@]@^@/@(@_@:@,@<@ ", " [@)@}@|@1@2@3@4@5@6@7@8@9@0@ ", " a@b@c@d@e@f@g@h@i@j@ ", " k@l@m@n@o@p@ ", " "}; /* XPM */ static char * fileopen_xpm[] = { "32 32 621 2", " c None", ". c #E1E5E1", "+ c #8EA88E", "@ c #3D6D3D", "# c #336633", "$ c #91AA91", "% c #CDD7CD", "& c #3B6C3B", "* c #8BA68B", "= c #E0E4E0", "- c #E3E7E3", "; c #668B66", "> c #5A825A", ", c #83A083", "' c #B9C8B9", ") c #8AA58A", "! c #BDD0BD", "~ c #558855", "{ c #3C6F3C", "] c #346734", "^ c #BED0BE", "/ c #669966", "( c #3F7233", "_ c #85B833", ": c #D6F091", "< c #9EB79E", "[ c #508350", "} c #649764", "| c #3A6D3A", "1 c #C5F833", "2 c #CCFF33", "3 c #DDF791", "4 c #6A926A", "5 c #386B38", "6 c #4C804C", "7 c #B7DB6A", "8 c #5B8E5B", "9 c #427542", "0 c #4B7E4B", "a c #477A33", "b c #80B333", "c c #96B28A", "d c #4E8133", "e c #8CBF33", "f c #407340", "g c #487B48", "h c #508335", "i c #AEBCD9", "j c #6884C2", "k c #4168B8", "l c #2358B3", "m c #2058B7", "n c #1C54B6", "o c #7189B9", "p c #DCDCDC", "q c #ECECEC", "r c #619469", "s c #588D6E", "t c #4A7E6E", "u c #437779", "v c #376E81", "w c #3A7188", "x c #578F8A", "y c #49859C", "z c #87B33E", "A c #C4F531", "B c #CAFD32", "C c #6284C2", "D c #376DC9", "E c #7DA4E4", "F c #93B7ED", "G c #A7C8F5", "H c #B6D6FC", "I c #AAD1FA", "J c #2362BE", "K c #7B7C7F", "L c #CCCFD3", "M c #C3CFE2", "N c #A5BBDB", "O c #518779", "P c #4A8181", "Q c #457D8B", "R c #447C95", "S c #4980A2", "T c #5387AF", "U c #6092B9", "V c #71A0C5", "W c #80ACCC", "X c #8EB7D2", "Y c #9BC5D6", "Z c #B5E0D2", "` c #83BFCD", " . c #4C6C3B", ".. c #ABD62A", "+. c #C4F631", "@. c #134DBA", "#. c #A3CAFF", "$. c #B0DDFF", "%. c #9ED1FF", "&. c #91CAFF", "*. c #85C3FF", "=. c #8DCAFF", "-. c #4994EC", ";. c #2156A5", ">. c #427AC9", ",. c #5890D9", "'. c #72A4E3", "). c #83B0CF", "!. c #94BDD5", "~. c #A3C8D9", "{. c #ACD0DD", "]. c #B2D4DE", "^. c #B3D6DE", "/. c #B0D5DE", "(. c #A9D1DE", "_. c #A7D2DB", ":. c #99C9DD", "<. c #92C6DC", "[. c #9FD6D3", "}. c #7DC1D3", "|. c #3E6552", "1. c #93B824", "2. c #BDED2F", "3. c #CBFE32", "4. c #124EBB", "5. c #71B0FE", "6. c #8DC7FF", "7. c #96CAFF", "8. c #A3D1FF", "9. c #B1D8FF", "0. c #BDDEFF", "a. c #C1E0FF", "b. c #CAE7FF", "c. c #D4ECFF", "d. c #D6EEFF", "e. c #D5EDFF", "f. c #C4E1EF", "g. c #BEDEF1", "h. c #ACD0DE", "i. c #A5CDDE", "j. c #A1CBDE", "k. c #9DC9DE", "l. c #99C6DE", "m. c #9FCED9", "n. c #A7D8D3", "o. c #90C4DD", "p. c #8CC2DC", "q. c #99D2D3", "r. c #7CC4D3", "s. c #3D6C6C", "t. c #84A521", "u. c #B8E62E", "v. c #184CB1", "w. c #AFCAF7", "x. c #EFFAFF", "y. c #DFF0FF", "z. c #E0F1FF", "A. c #DEEFFF", "B. c #D7EBFF", "C. c #D0E8FF", "D. c #CBE5FF", "E. c #C5E2FF", "F. c #BADDFF", "G. c #B2D7F7", "H. c #A4CDE0", "I. c #A1CADE", "J. c #9BC8DE", "K. c #98C6DE", "L. c #9FCFD9", "M. c #A5D7D3", "N. c #8DC2DD", "O. c #8AC1DC", "P. c #8FCCD3", "Q. c #7DC7D3", "R. c #437989", "S. c #76941D", "T. c #B3E02C", "U. c #C8FB32", "V. c #CCFE33", "W. c #D7FA6F", "X. c #3159AF", "Y. c #95B6EF", "Z. c #E6F4FF", "`. c #D5E9FF", " + c #D5E8FF", ".+ c #D0E6FF", "++ c #C6E3FF", "@+ c #C3E1FF", "#+ c #C0E0FF", "$+ c #BCDEFF", "%+ c #B9DCFF", "&+ c #B6DBFF", "*+ c #B3D9FF", "=+ c #ABD4F6", "-+ c #9DC9E0", ";+ c #9AC7DE", ">+ c #95C5DE", ",+ c #9CCDD9", "'+ c #A1D6D3", ")+ c #8AC1DD", "!+ c #84BEDC", "~+ c #85C7D3", "{+ c #80C9D3", "]+ c #4C89A1", "^+ c #68821D", "/+ c #AEDA2B", "(+ c #C7F831", "_+ c #E9F2CC", ":+ c #5573B5", "<+ c #729CE5", "[+ c #E8F3FF", "}+ c #D4E6FF", "|+ c #D0E5FF", "1+ c #CBE3FF", "2+ c #C6E2FF", "3+ c #BEDFFF", "4+ c #BBDDFF", "5+ c #B7DBFF", "6+ c #B4DAFF", "7+ c #B0D7FE", "8+ c #A3CEEA", "9+ c #96C5DE", "0+ c #94C4DE", "a+ c #91C2DE", "b+ c #98CCD9", "c+ c #9DD4D3", "d+ c #85BEDD", "e+ c #7BB9DC", "f+ c #82C6D3", "g+ c #80C8D3", "h+ c #569AB5", "i+ c #5C741F", "j+ c #A4C14E", "k+ c #D5E0BA", "l+ c #D2D8E5", "m+ c #B5C3DC", "n+ c #E0E3E7", "o+ c #8196C2", "p+ c #5484D9", "q+ c #E6F3FF", "r+ c #CFE4FF", "s+ c #CBE2FF", "t+ c #C6E1FF", "u+ c #C1DFFF", "v+ c #B8DCFF", "w+ c #B5DBFF", "x+ c #B2D9FF", "y+ c #AFD7FF", "z+ c #ABD5FF", "A+ c #A6D3FC", "B+ c #9ECBEE", "C+ c #95C5E0", "D+ c #92C3DE", "E+ c #8FC1DE", "F+ c #8CC0DE", "G+ c #92C9D9", "H+ c #97D1D3", "I+ c #7CB9DD", "J+ c #75B6DC", "K+ c #81C5D3", "L+ c #7DC6D3", "M+ c #559CC9", "N+ c #153A6E", "O+ c #1E52A0", "P+ c #1D64C6", "Q+ c #1F6FD3", "R+ c #1665CF", "S+ c #515E77", "T+ c #AFBBD3", "U+ c #376ECB", "V+ c #DEEEFF", "W+ c #CAE1FF", "X+ c #C6E0FF", "Y+ c #C1DEFF", "Z+ c #BCDCFF", "`+ c #B0D8FF", " @ c #ACD6FF", ".@ c #A9D5FF", "+@ c #A7D4FF", "@@ c #A5D2FF", "#@ c #A2D1FF", "$@ c #9CCDFC", "%@ c #93C6EE", "&@ c #89BFE0", "*@ c #83BCDE", "=@ c #88C4D9", "-@ c #8DCBD3", ";@ c #81C1D9", ">@ c #72B6E1", ",@ c #77BEE1", "'@ c #68B6F6", ")@ c #4996EC", "!@ c #1457B1", "~@ c #2C83D7", "{@ c #3190ED", "]@ c #38A1FF", "^@ c #1963C1", "/@ c #373738", "(@ c #DADDE4", "_@ c #255DBE", ":@ c #D1E5FF", "<@ c #C7DFFF", "[@ c #C0DDFF", "}@ c #BBDBFF", "|@ c #B6DAFF", "1@ c #AED7FF", "2@ c #97CBFF", "3@ c #8CC6FF", "4@ c #84C2FF", "5@ c #7DBEFF", "6@ c #7ABCFF", "7@ c #77BAFC", "8@ c #75B7EE", "9@ c #7DBEDC", "0@ c #7DC1E8", "a@ c #72B9FB", "b@ c #6BB5FF", "c@ c #64B2FF", "d@ c #5EB0FF", "e@ c #4EA0F8", "f@ c #124FA3", "g@ c #2570B9", "h@ c #2B82D8", "i@ c #2F92F8", "j@ c #0D3674", "k@ c #4A4A4A", "l@ c #1F55B6", "m@ c #BFD8FF", "n@ c #C5DFFF", "o@ c #BBDAFF", "p@ c #B6D8FF", "q@ c #B2D7FF", "r@ c #B2D8FF", "s@ c #A6D3FF", "t@ c #85C2FF", "u@ c #67B3FF", "v@ c #58ACFF", "w@ c #54AAFF", "x@ c #56ABFF", "y@ c #5CAEFF", "z@ c #62B1FF", "A@ c #68B3FF", "B@ c #6CB6FF", "C@ c #6EB7FF", "D@ c #68B4FF", "E@ c #5EAFFF", "F@ c #4FA6FF", "G@ c #1654AB", "H@ c #2168B0", "I@ c #2A7CCC", "J@ c #2580E7", "K@ c #12213D", "L@ c #6B6B6B", "M@ c #295AB2", "N@ c #A9C7F9", "O@ c #C4DFFF", "P@ c #B6D7FF", "Q@ c #B3D6FF", "R@ c #B1D7FF", "S@ c #81BDFF", "T@ c #45A0FF", "U@ c #3198FF", "V@ c #389CFF", "W@ c #42A1FF", "X@ c #4BA5FF", "Y@ c #52A9FF", "Z@ c #5DAEFF", "`@ c #61B0FF", " # c #63B1FF", ".# c #65B2FF", "+# c #60B0FF", "@# c #57ABFF", "## c #51A8FF", "$# c #4DAAFF", "%# c #185CBA", "&# c #1D5EA4", "*# c #2979C7", "=# c #1A66C5", "-# c #27282D", ";# c #858585", "># c #4468B3", ",# c #8EB2F0", "'# c #C5E0FF", ")# c #B2D5FF", "!# c #ADD3FF", "~# c #62A8FF", "{# c #2C8DFF", "]# c #2E92FF", "^# c #3398FF", "/# c #3F9FFF", "(# c #45A2FF", "_# c #50A8FF", ":# c #5AADFF", "<# c #5BADFF", "[# c #4FA7FF", "}# c #348DEF", "|# c #0343AE", "1# c #1A5699", "2# c #297ACC", "3# c #144488", "4# c #454545", "5# c #9C9C9C", "6# c #6883BC", "7# c #719BE6", "8# c #AFD4FF", "9# c #66A7FF", "0# c #2985FF", "a# c #328EFF", "b# c #3392FF", "c# c #3395FF", "d# c #3399FF", "e# c #3E9FFF", "f# c #43A2FF", "g# c #48A4FF", "h# c #4CA6FF", "i# c #4EA7FF", "j# c #49A6FF", "k# c #3B99F8", "l# c #2369CB", "m# c #205FBF", "n# c #114A90", "o# c #2779D3", "p# c #142A49", "q# c #656565", "r# c #B2B2B2", "s# c #90A3C8", "t# c #5483DA", "u# c #C9E4FF", "v# c #89BBFF", "w# c #2F82FF", "x# c #3287FF", "y# c #338BFF", "z# c #338FFF", "A# c #369BFF", "B# c #3B9DFF", "C# c #43A1FF", "D# c #46A3FF", "E# c #49A4FF", "F# c #3FA1FF", "G# c #1665CE", "H# c #85B0E5", "I# c #3E7DD1", "J# c #0C4997", "K# c #226EC7", "L# c #23272E", "M# c #818181", "N# c #C7C7C7", "O# c #BAC4D8", "P# c #396BCB", "Q# c #C5E1FF", "R# c #5597FF", "S# c #2C7DFF", "T# c #3385FF", "U# c #3388FF", "V# c #338CFF", "W# c #3397FF", "X# c #3499FF", "Y# c #379BFF", "Z# c #3A9DFF", "`# c #3D9EFF", " $ c #3C9EFF", ".$ c #3DA2FF", "+$ c #1770DD", "@$ c #6191D5", "#$ c #80B9F0", "$$ c #3B80D3", "%$ c #125BBD", "&$ c #194F94", "*$ c #3F3F3F", "=$ c #979797", "-$ c #D8D8D8", ";$ c #DEE0E5", ">$ c #275CBD", ",$ c #B3D2FF", "'$ c #3A82FF", ")$ c #317DFF", "!$ c #3382FF", "~$ c #338EFF", "{$ c #3391FF", "]$ c #3393FF", "^$ c #349AFF", "/$ c #369AFF", "($ c #359AFF", "_$ c #379EFF", ":$ c #2282ED", "<$ c #3D77CB", "[$ c #90C0EF", "}$ c #5CA5EA", "|$ c #6BA8E4", "1$ c #125CCB", "2$ c #132B51", "3$ c #606060", "4$ c #AEAEAE", "5$ c #E3E3E3", "6$ c #EEEEEE", "7$ c #1E53B4", "8$ c #98BCFF", "9$ c #367BFF", "0$ c #327BFF", "a$ c #337FFF", "b$ c #338AFF", "c$ c #338DFF", "d$ c #3394FF", "e$ c #3396FF", "f$ c #3498FF", "g$ c #2F91FC", "h$ c #1B64CC", "i$ c #88B7ED", "j$ c #569FEA", "k$ c #62A6EC", "l$ c #65A4EA", "m$ c #0B49B3", "n$ c #1E232E", "o$ c #7E7E7E", "p$ c #C4C4C4", "q$ c #5778B4", "r$ c #326BDD", "s$ c #397AFF", "t$ c #3378FF", "u$ c #337CFF", "v$ c #3381FF", "w$ c #3384FF", "x$ c #3487FF", "y$ c #348AFF", "z$ c #348DFF", "A$ c #348FFF", "B$ c #3592FF", "C$ c #3594FF", "D$ c #3595FF", "E$ c #3495FF", "F$ c #308CFE", "G$ c #2C86F3", "H$ c #135DCC", "I$ c #0C48AC", "J$ c #124BA2", "K$ c #0A3987", "L$ c #092E6F", "M$ c #09255A", "N$ c #111F38", "O$ c #444444", "P$ c #D6D6D6", "Q$ c #DBDBDB", "R$ c #2450A2", "S$ c #2566ED", "T$ c #387AFF", "U$ c #367CFF", "V$ c #367FFF", "W$ c #3582FF", "X$ c #3484FF", "Y$ c #3184FF", "Z$ c #2F82FA", "`$ c #2D7DEE", " % c #2A75DE", ".% c #2569C7", "+% c #1F59AA", "@% c #1A488B", "#% c #16376C", "$% c #152D51", "%% c #17253E", "&% c #1D2433", "*% c #272B32", "=% c #333336", "-% c #414141", ";% c #525252", ">% c #616161", ",% c #717171", "'% c #8E8E8E", ")% c #BCBCBC", "!% c #EBEBEB", "~% c #C6C6C7", "{% c #1E3F7A", "]% c #1D5EE0", "^% c #1E5DDA", "/% c #1753C2", "(% c #144CAA", "_% c #14428F", ":% c #143973", "<% c #15305A", "[% c #182A46", "}% c #1E2838", "|% c #252B32", "1% c #303234", "2% c #3D3D3D", "3% c #4C4C4C", "4% c #5D5D5D", "5% c #6C6C6C", "6% c #7B7B7B", "7% c #888888", "8% c #909090", "9% c #9A9A9A", "0% c #A3A3A3", "a% c #B8B8B8", "b% c #C0C0C0", "c% c #CFCFCF", "d% c #E0E0E0", "e% c #E7E7E7", "f% c #BFBFBF", "g% c #353E4F", "h% c #202635", "i% c #292B2F", "j% c #363637", "k% c #464646", "l% c #555555", "m% c #666666", "n% c #767676", "o% c #969696", "p% c #A0A0A0", "q% c #A9A9A9", "r% c #B4B4B4", "s% c #BEBEBE", "t% c #D4D4D4", "u% c #E9E9E9", "v% c #A1A1A1", "w% c #939393", "x% c #A5A5A5", "y% c #AFAFAF", "z% c #B9B9B9", "A% c #CCCCCC", "B% c #DADADA", "C% c #DEDEDE", "D% c #E2E2E2", " . + @ # $ % & * = ", " - + @ # # # ; > , ' # # & ) = ", " ! ~ { # # # # # # ] # # # # & * = ", " ^ / / ~ { # # # # # # # # # ( _ : ", " < [ } / / ~ | # # # # # ( _ 1 2 3 ", " 4 # # 5 [ } / 6 # # # ( _ 1 2 2 2 7 = ", " / 8 9 # # 5 [ 0 # # a 1 2 2 2 2 2 b & c ", " / / / 8 9 # # # # # d 2 2 2 2 2 2 e _ 1 ", " / / / / / 8 9 # f g h 2 2 2 2 2 2 2 2 2 ", " i j k l m n o p q / / / / / r s t u v w x y z A B 2 2 2 2 ", "C D E F G H I J K L M N O P Q R S T U V W X Y Z ` ...+.2 2 2 2 ", "@.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.[.}.|.1.2.3.2 2 2 ", "4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.B 2 2 2 ", "v.w.x.y.z.A.B.C.D.E.a.0.F.G.H.I.k.J.K.L.M.N.O.P.Q.R.S.T.U.2 V.W.", "X.Y.Z.`. +.+D.++@+#+$+%+&+*+=+-+;+K.>+,+'+)+!+~+{+]+^+/+(+W._+ ", ":+<+[+}+|+1+2+a.3+4+5+6+7+8+J.l.9+0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+", "o+p+q+r+s+t+u+$+v+w+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+", "T+U+V+W+X+Y+Z+5+*+`+ @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@^@/@", "(@_@:@<@[@}@|@9.1@y+ @#@2@3@4@5@6@7@8@9@0@a@b@c@d@e@f@g@h@i@j@k@", "q l@m@n@o@p@q@r@s@t@u@v@w@x@y@z@A@B@C@C@B@D@c@E@v@F@G@H@I@J@K@L@", " M@N@O@P@Q@R@S@T@U@V@W@X@Y@v@Z@`@ #.#.# #+#y@@###$#%#&#*#=#-#;#", " >#,#'#)#!#~#{#]#^#V@/#(#X@_#w@v@:#<#<#:#@#w@[#$#}#|#1#2#3#4#5#", " 6#7#t+8#9#0#a#b#c#d#V@e#f#g#h#[###Y@Y@##i#X@j#k#l#m#n#o#p#q#r#", " s#t#u#v#w#x#y#z#b#c#^#A#B#/#C#D#g#E#E#g#D#f#F#G#H#I#J#K#L#M#N#", " O#P#Q#R#S#T#U#V#z#b#c#W#X#Y#Z#`#/#/#/#e# $.$+$@$#$$$%$&$*$=$-$", " ;$>$,$'$)$!$T#U#y#~${$]$c#W#d#^$/$A#A#($_$:$<$[$}$|$1$2$3$4$5$", " 6$7$8$9$0$a$!$T#U#b$c$z#{$]$d$c#e$W#f$($g$h$i$j$k$l$m$n$o$p$ ", " q$r$s$t$u$a$v$w$x$y$z$A$B$C$D$E$b#F$G$H$I$J$K$L$M$N$O$=$P$ ", " Q$R$S$T$U$V$W$X$w$Y$Z$`$ %.%+%@%#%$%%%&%*%=%-%;%>%,%'%)%5$ ", " !%~%{%]%^%/%(%_%:%<%[%}%|%1%2%3%4%5%6%7%8%9%0%4$a%b%c%d% ", " e%f%g%h%i%j%k%l%m%n%;#'%o%p%q%r%s%N#c%t%Q$d%5$u%!% ", " e%N#v%w%9%x%y%z%p$A%t%B%C%D%e%!%q "}; #if 0 /* XPM */ static char * Print_xpm[] = { "20 20 25 1", " c None", ". c #B6B6B6", "+ c #626262", "@ c #000000", "# c #323232", "$ c #AAAAAA", "% c #FFC7B1", "& c #CECECE", "* c #E6E6E6", "= c #FFFFFF", "- c #8EFFFF", "; c #6E6E6E", "> c #00DCDC", ", c #C2C2C2", "' c #4A4A00", ") c #00B9B9", "! c #FFAB8E", "~ c #937A00", "{ c #F8E2B1", "] c #C3B848", "^ c #C5AA00", "/ c #AF9200", "( c #DFD48E", "_ c #D1C96B", ": c #626200", " .+@@@@@@@@@#. ", " .@$%&**====@+.", " .+@-%-------@;.", " ..@$%&***===@#. ", " .++@>%>>>>>--@#..", " .+@@$%,,,&***@'@@;", " .+@+@)!)))>>>>@'~~@", ".+@+{''''''''''']=^@", "+@+{]]]]]]]]]]]]=^/@", "+@==============^{/@", "+@{{{{{{{{{{{((^{(/@", "+@{{_____(((::(^((/@", "+@{_____(((((~(^(//@", "+@________(((((^/]~@", "+@~~~~~~~~~~~~~~]]@#", "+@+]]]]]]]]]]]^~]@#.", ".+@+^^^^^^^^^^~]@#. ", " .+@@@@@@@@@@@@@#. ", " .+++++++++++++. ", " ............. "}; #endif /* XPM */ static char * redo_xpm[] = { "32 32 160 2", " c None", ". c #3A4B3B", "+ c #1D301E", "@ c #B0B6B1", "# c #001A01", "$ c #0D8C14", "% c #001901", "& c #848E85", "* c #A2DDA5", "= c #7ACC7F", "- c #003002", "; c #49584A", "> c #DDDEDD", ", c #9FDCA3", "' c #F6FCF6", ") c #BEE8C0", "! c #006005", "~ c #1D311E", "{ c #BFC3BF", "] c #9ADA9E", "^ c #E7F7E8", "/ c #DCF3DD", "( c #16931D", "_ c #848D85", ": c #EBEBEB", "< c #939B93", "[ c #0E250F", "} c #001C01", "| c #93D797", "1 c #D9F2DA", "2 c #5DBE62", "3 c #002201", "4 c #586659", "5 c #758076", "6 c #0E240F", "7 c #003202", "8 c #098810", "9 c #C8ECCA", "0 c #CBEDCD", "a c #004E04", "b c #2C3E2D", "c c #003C03", "d c #46B24C", "e c #B3E4B6", "f c #B6E5B8", "g c #B8E6BB", "h c #BBE7BE", "i c #C0E9C3", "j c #C3EAC5", "k c #04840B", "l c #0E260F", "m c #129019", "n c #A4DEA7", "o c #A9E0AC", "p c #ACE1AF", "q c #AEE2B1", "r c #B1E3B3", "s c #3DAD44", "t c #42B049", "u c #91D695", "v c #95D899", "w c #9DDBA0", "x c #A7DFAA", "y c #78CB7C", "z c #3CAC42", "A c #7ECE83", "B c #81CF85", "C c #83D087", "D c #85D189", "E c #87D28C", "F c #8CD490", "G c #8ED592", "H c #98D99C", "I c #969996", "J c #A2A8A2", "K c #002001", "L c #30A537", "M c #6FC774", "N c #71C876", "O c #76CA7A", "P c #8AD38E", "Q c #004203", "R c #2F3E2F", "S c #B3B3B3", "T c #028209", "U c #3FAE45", "V c #4BB551", "W c #53B959", "X c #61C066", "Y c #65C26A", "Z c #6BC570", "` c #73C978", " . c #002502", ".. c #5E665E", "+. c #C2C2C2", "@. c #004604", "#. c #3AAB40", "$. c #41AF47", "%. c #44B14A", "&. c #48B34E", "*. c #4DB653", "=. c #51B857", "-. c #55BA5B", ";. c #57BB5C", ">. c #5BBD60", ",. c #63C168", "'. c #67C36C", "). c #69C46E", "!. c #D3F0D5", "~. c #007E07", "{. c #0B210C", "]. c #818581", "^. c #CACACA", "/. c #249D2B", "(. c #004303", "_. c #233424", ":. c #A4A5A4", "<. c #D6D6D6", "[. c #38AA3F", "}. c #525C52", "|. c #BFBFBF", "1. c #E2E2E2", "2. c #CED0CE", "3. c #219B28", "4. c #172B18", "5. c #6C736C", "6. c #D1EFD2", "7. c #757B75", "8. c #C7C7C7", "9. c #004503", "0. c #37A93D", "a. c #005805", "b. c #172A18", "c. c #C5C5C5", "d. c #D9D9D9", "e. c #233524", "f. c #989A98", "g. c #D3D3D3", "h. c #002602", "i. c #465246", "j. c #28A02F", "k. c #6DC672", "l. c #697169", "m. c #1D9824", "n. c #35A83B", "o. c #465547", "p. c #D1D1D1", "q. c #677367", "r. c #005905", "s. c #DFDFDF", "t. c #3A4C3B", "u. c #007C07", "v. c #001801", "w. c #0C8B13", "x. c #CECECE", "y. c #002702", "z. c #E5E5E5", "A. c #003E03", "B. c #005404", "C. c #989E98", " . + @ ", " @ # $ % & ", " @ # * = - ; > ", " @ # , ' ) ! ~ { ", " @ # ] ^ ^ / ( % _ : ", " < ; [ } | 1 1 1 / 2 3 4 > ", " 5 6 7 8 2 9 9 9 0 0 0 0 * a b { ", " @ ~ c d e e f g g h h ) ) i j ) k l < ", " _ % m ] * n n n o o p q q r e e f g s 3 4 ", " 4 3 t u u | v v ] ] w , , n n x x p q q y c b ", " 5 3 z A B C D D E F F G u v v H ] , , * , w x 7 I ", " J K L M M N O y y = A B B D E P F G G E A w B Q R S ", " > [ T U V W 2 X Y Z M N ` ` ` O ` ` M Z ` h U ...+. ", " 4 @.#.U $.%.d &.*.*.=.-.;.>.2 X ,.'.).F !.~.{.].^. ", " @ % /.#.U $.%.d ;.B r 1 1 1 O 2 X ,.'.n , (._.:.<. ", " ; a [.#.U $.W H 1 W ~.Q # } >.2 X O i W .}.|.1. ", " 2.% 3.[.#.U = 1 U 7 4.}.].5.# >.2 u 6.$ {.7.8. ", " 5 9.0.[.#.v , a.b.7.c.d. @ # X p h a.e.f.g. ", " b ~.0.[.v B h.i.S @ # 6.). .i.S ", " 2.% j.0.k.B h.l.c. @ # m.% 7.c. ", " < - n.d r Q i.c. o.R f.p. ", " q.r.n.x $ R +. <.s. ", " t.u.-.B v.:.1. ", " v.w.] a...p. ", " v.$.B {.S ", " @ # M ~.i.x. ", " @ y.r .f.z. ", " @ A.W 4.c. ", " @ B.$ i.<. ", " @ B.Q ].1. ", " @ .v.S ", " C.f.p. "}; /* XPM */ static char * filesave_xpm[] = { "32 32 532 2", " c None", ". c #CCCCDE", "+ c #3F43AD", "@ c #1731AF", "# c #1830AF", "$ c #172EAC", "% c #172EAB", "& c #172DAB", "* c #162DAB", "= c #162DAA", "- c #162CAA", "; c #152CAA", "> c #142BAA", ", c #172FAE", "' c #1730AF", ") c #2F3AAB", "! c #BBBBD7", "~ c #3C44AC", "{ c #4887EA", "] c #74B7FE", "^ c #9CBCE7", "/ c #C3D4ED", "( c #BFD4F1", "_ c #BDD2F0", ": c #BBD0EF", "< c #B9CEEF", "[ c #B7CDEE", "} c #B6CCED", "| c #B6CCEC", "1 c #B7CCEC", "2 c #B7CCEB", "3 c #B7CCEA", "4 c #B8CCEA", "5 c #B8CCE9", "6 c #B8CCE8", "7 c #BACDE8", "8 c #BCCDE5", "9 c #8FABD2", "0 c #53A1FF", "a c #3C8BF6", "b c #2C3AAD", "c c #102FB3", "d c #85C5FF", "e c #8CC4FF", "f c #C1CFE4", "g c #FFFDFB", "h c #FDFEFF", "i c #F9FBFF", "j c #DDE6E3", "k c #94B299", "l c #5C865F", "m c #547F57", "n c #76977B", "o c #739678", "p c #698E6B", "q c #98B296", "r c #D9E5D4", "s c #F9FCFA", "t c #FEFEFF", "u c #FFFFFF", "v c #FFFFFE", "w c #B6BFCD", "x c #589BEE", "y c #519EEA", "z c #1641C3", "A c #B0B0B0", "B c #1633B5", "C c #81C0FF", "D c #86C0FF", "E c #BFCEE5", "F c #FAF9F9", "G c #F7FAFF", "H c #F4F7FF", "I c #B5C9BD", "J c #679269", "K c #4D7F4D", "L c #427342", "M c #3B6D3B", "N c #3D6F38", "O c #4D8035", "P c #7BAA45", "Q c #B9D88C", "R c #E2EDE3", "S c #EFF4FB", "T c #F5F8FF", "U c #F8F8FB", "V c #B4BFD1", "W c #4185D5", "X c #2D7AC5", "Y c #1B44C4", "Z c #1835B4", "` c #7FBFFF", " . c #84BFFF", ".. c #C2D1E7", "+. c #FDFBFA", "@. c #FAFCFF", "#. c #F6F9FF", "$. c #7CA37F", "%. c #528453", "&. c #4C7F4C", "*. c #467946", "=. c #396C37", "-. c #548732", ";. c #90C332", ">. c #B2E634", ",. c #B1DC57", "'. c #BAD59D", "). c #CEE2B9", "!. c #F3F7FF", "~. c #F6F6FB", "{. c #B3BCCD", "]. c #59A3FE", "^. c #52A8FF", "/. c #1B43C1", "(. c #1A37B4", "_. c #7EBEFF", ":. c #83BEFF", "<. c #C5D4E9", "[. c #FFFDFA", "}. c #FCFEFF", "|. c #629462", "1. c #588B58", "2. c #4E814E", "3. c #447744", "4. c #40733C", "5. c #71A437", "6. c #BCEF33", "7. c #C9FB32", "8. c #B5E837", "9. c #AFDC48", "0. c #BCE750", "a. c #F1F5FF", "b. c #F4F5FB", "c. c #B5BFCE", "d. c #5CA4FE", "e. c #55A8FF", "f. c #1D45C1", "g. c #1D38B4", "h. c #7DBEFF", "i. c #82BEFF", "j. c #C8D6EA", "k. c #FFFEFA", "l. c #FBFDFF", "m. c #659866", "n. c #639663", "o. c #609360", "p. c #5C8F59", "q. c #5E9155", "r. c #86B948", "s. c #C3F635", "t. c #CBFE33", "u. c #C8FB33", "v. c #C7FA33", "w. c #EFF4FF", "x. c #F2F4FB", "y. c #B7C1D0", "z. c #5AA3FD", "A. c #52A7FF", "B. c #1F46C1", "C. c #1F39B4", "D. c #7CBDFF", "E. c #80BDFF", "F. c #CBD9EC", "G. c #FFFEFB", "H. c #FEFFFF", "I. c #80AA81", "J. c #6D9E6D", "K. c #659865", "L. c #72A55D", "M. c #79AC58", "N. c #90C34D", "O. c #C4F736", "P. c #CBFE32", "Q. c #CBFE36", "R. c #CDFE3C", "S. c #CCFE3C", "T. c #EDF2FF", "U. c #F0F2FB", "V. c #BAC3D1", "W. c #5AA2FD", "X. c #50A5FF", "Y. c #2248C1", "Z. c #213AB4", "`. c #7BBDFF", " + c #7FBCFF", ".+ c #CEDBEE", "++ c #C8D9C8", "@+ c #8AB18B", "#+ c #699B69", "$+ c #7BAE59", "%+ c #84B754", "&+ c #92C54D", "*+ c #C4F539", "=+ c #CDFD44", "-+ c #D2FA6A", ";+ c #D7F78B", ">+ c #D8F691", ",+ c #EBF1FF", "'+ c #EEF1FB", ")+ c #BDC5D3", "!+ c #59A2FD", "~+ c #4EA4FF", "{+ c #2449C1", "]+ c #233CB4", "^+ c #7ABCFF", "/+ c #7DBBFF", "(+ c #D1DEEF", "_+ c #ECF1EC", ":+ c #AFC9AF", "<+ c #7CA77C", "[+ c #80B25D", "}+ c #8BBD58", "|+ c #9AC95A", "1+ c #CDF56B", "2+ c #DCF89D", "3+ c #E4F3D2", "4+ c #E5F0EC", "5+ c #E5EEF2", "6+ c #E8EFFF", "7+ c #ECEFFB", "8+ c #BFC7D4", "9+ c #58A2FD", "0+ c #4CA3FF", "a+ c #264BC1", "b+ c #263DB4", "c+ c #79BBFF", "d+ c #7CBAFF", "e+ c #D4E0F1", "f+ c #FFFFFD", "g+ c #FBFCFB", "h+ c #E1EAE1", "i+ c #B5CEB5", "j+ c #9BC477", "k+ c #ACD17C", "l+ c #C4DFA4", "m+ c #E5F5C7", "n+ c #EDF7ED", "o+ c #F0F5FF", "p+ c #EDF3FF", "q+ c #EAF1FF", "r+ c #E8F0FF", "s+ c #EBEFFE", "t+ c #C2CAD6", "u+ c #57A1FD", "v+ c #4AA1FF", "w+ c #294CC1", "x+ c #283FB4", "y+ c #78BAFF", "z+ c #7BBAFF", "A+ c #DBE5F1", "B+ c #FFFEF7", "C+ c #FFFCF9", "D+ c #FFFCF8", "E+ c #FEFBF7", "F+ c #F6F6F0", "G+ c #D5E1D0", "H+ c #AFCF88", "I+ c #C3DF95", "J+ c #E1EBD0", "K+ c #EDF0E5", "L+ c #F0F0F1", "M+ c #EEEEF2", "N+ c #ECECF1", "O+ c #E9EAF0", "P+ c #E7E8F0", "Q+ c #E6E6EC", "R+ c #C7CCD3", "S+ c #57A1FE", "T+ c #48A0FF", "U+ c #2B4EC1", "V+ c #2A40B4", "W+ c #77BAFF", "X+ c #7AB9FF", "Y+ c #BCD7F8", "Z+ c #CADCF4", "`+ c #C6DAF3", " @ c #C5D8F2", ".@ c #C3D7F0", "+@ c #C2D6EF", "@@ c #C0D4EE", "#@ c #BFD3EC", "$@ c #BED2EB", "%@ c #BCD0EA", "&@ c #BBCFE8", "*@ c #BACDE7", "=@ c #B8CCE6", "-@ c #B7CBE4", ";@ c #B6CAE3", ">@ c #B4C8E2", ",@ c #B4C7DF", "'@ c #AFC7E6", ")@ c #56A2FF", "!@ c #469FFF", "~@ c #2D4FC1", "{@ c #2C41B4", "]@ c #74B6FF", "^@ c #72B4FF", "/@ c #71B5FF", "(@ c #6EB5FF", "_@ c #6BB3FF", ":@ c #69B2FF", "<@ c #67B0FF", "[@ c #65AFFF", "}@ c #62AEFF", "|@ c #60ACFF", "1@ c #5EABFF", "2@ c #5CAAFF", "3@ c #59A8FF", "4@ c #57A7FF", "5@ c #55A6FF", "6@ c #56A7FF", "7@ c #53A5FF", "8@ c #4FA0FF", "9@ c #4D9EFF", "0@ c #4498FF", "a@ c #3051C1", "b@ c #2E43B4", "c@ c #76BAFF", "d@ c #70B4FF", "e@ c #6FB5FF", "f@ c #5698FB", "g@ c #4D86F4", "h@ c #4E89F4", "i@ c #4C88F4", "j@ c #4B87F4", "k@ c #4986F4", "l@ c #4885F4", "m@ c #4684F4", "n@ c #4583F4", "o@ c #4382F4", "p@ c #4181F4", "q@ c #4080F4", "r@ c #3E7FF5", "s@ c #3076F8", "t@ c #3279F9", "u@ c #4193FE", "v@ c #4197FF", "w@ c #3F94FF", "x@ c #479FFF", "y@ c #3252C1", "z@ c #3144B4", "A@ c #76B9FF", "B@ c #6EB2FF", "C@ c #6CB4FF", "D@ c #5388F2", "E@ c #C8C8E3", "F@ c #D8DAE9", "G@ c #D6D8E8", "H@ c #D6D7E8", "I@ c #D7D8E8", "J@ c #DBDBE8", "K@ c #C8CBE4", "L@ c #2753EB", "M@ c #1C4FF1", "N@ c #3F8DFD", "O@ c #4198FF", "P@ c #3C93FF", "Q@ c #459EFF", "R@ c #3454C1", "S@ c #3346B4", "T@ c #75B8FF", "U@ c #6BB1FF", "V@ c #68B1FF", "W@ c #598DF1", "X@ c #E5E4E9", "Y@ c #F8F7F2", "Z@ c #FEFAEE", "`@ c #FEFBEE", " # c #F5F4F1", ".# c #F9F8F2", "+# c #E2E3E8", "@# c #3A65EC", "## c #2D61F3", "$# c #3F8FFD", "%# c #3E96FF", "&# c #3A91FF", "*# c #439DFF", "=# c #3655C1", "-# c #3547B4", ";# c #74B8FF", "># c #68AFFF", ",# c #66B0FF", "'# c #558AF0", ")# c #DDDCE5", "!# c #E6E6E7", "~# c #6E87DF", "{# c #6580E0", "]# c #DADCE4", "^# c #EEEEEE", "/# c #EBEBED", "(# c #EFEFEE", "_# c #D9DAE4", ":# c #446FEC", "<# c #3C6EF5", "[# c #3F8FFE", "}# c #3B93FF", "|# c #3790FF", "1# c #419CFF", "2# c #3957C1", "3# c #3749B4", "4# c #73B7FF", "5# c #66ADFF", "6# c #63AEFF", "7# c #5388EE", "8# c #D7D6E0", "9# c #DDDDE1", "0# c #1040E7", "a# c #0033EA", "b# c #CCCFDF", "c# c #E9E8E9", "d# c #E3E3E8", "e# c #E7E6E9", "f# c #D2D4DF", "g# c #507AED", "h# c #4A7BF7", "i# c #3F90FE", "j# c #3891FF", "k# c #358EFF", "l# c #409BFF", "m# c #3B58C1", "n# c #394AB4", "o# c #72B7FF", "p# c #63ABFF", "q# c #61ADFF", "r# c #5086EE", "s# c #CFCEDC", "t# c #D6D5DD", "u# c #1A47E6", "v# c #0A3CE8", "w# c #C6C8DB", "x# c #E1E0E5", "y# c #DCDCE4", "z# c #E0DFE5", "A# c #CBCDDB", "B# c #5B85EE", "C# c #5889F8", "D# c #3F91FE", "E# c #358FFF", "F# c #328CFF", "G# c #3E9AFF", "H# c #3D5AC1", "I# c #3B4BB4", "J# c #72B6FF", "K# c #60AAFF", "L# c #4D84ED", "M# c #C9C7D7", "N# c #CECED8", "O# c #1040E6", "P# c #0337EA", "Q# c #BFC1D6", "R# c #DAD9E0", "S# c #D5D5DF", "T# c #D8D8E0", "U# c #C5C7D6", "V# c #6790EE", "W# c #6696FA", "X# c #328DFF", "Y# c #2F8BFF", "Z# c #3D99FF", "`# c #405BC1", " $ c #3D4DB4", ".$ c #71B6FF", "+$ c #5DA8FF", "@$ c #4B82EC", "#$ c #BEBDD1", "$$ c #C7C6D3", "%$ c #6F83D0", "&$ c #6C81D1", "*$ c #BEBFD1", "=$ c #CECEDA", "-$ c #CBCBD9", ";$ c #CECDDA", ">$ c #BDBED0", ",$ c #739AEF", "'$ c #74A3FB", ")$ c #3F92FE", "!$ c #2D89FF", "~$ c #3B98FF", "{$ c #425DC1", "]$ c #3D4CB4", "^$ c #6EB6FF", "/$ c #59A5FF", "($ c #58A8FF", "_$ c #477EEB", ":$ c #ADABC4", "<$ c #BCBBCC", "[$ c #C2C0C9", "}$ c #C3C0C9", "|$ c #BABACB", "1$ c #B9B9CB", "2$ c #BBBBCC", "3$ c #AFB1C6", "4$ c #7EA5F0", "5$ c #82B0FD", "6$ c #3D92FF", "7$ c #2A88FF", "8$ c #2886FF", "9$ c #3696FF", "0$ c #435FC3", "a$ c #3D43AA", "b$ c #75B1F7", "c$ c #68B6FF", "d$ c #65B5FF", "e$ c #548DEE", "f$ c #C3C1CF", "g$ c #D9D8DD", "h$ c #D5D5DB", "i$ c #D8D8DD", "j$ c #C3C5D0", "k$ c #93BBF5", "l$ c #9BCAFF", "m$ c #4EA2FF", "n$ c #3997FF", "o$ c #3796FF", "p$ c #53A4FE", "q$ c #3844AB", "r$ c #B1B1D3", "s$ c #424AAF", "t$ c #4962C0", "u$ c #4760C0", "v$ c #4457B9", "w$ c #5A5AA2", "x$ c #5F5FA4", "y$ c #5E5EA4", "z$ c #595AA3", "A$ c #4C5FBC", "B$ c #4F63C0", "C$ c #445DC0", "D$ c #415BC0", "E$ c #445FC0", "F$ c #3F4BB2", "G$ c #7474A3", " ", " ", " ", " . + @ # $ $ $ % % % % & * = - ; ; ; > ; , ' ) ! ", " ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b ", " c d e f g h i j k l m n o p q r s t u v w x y z A ", " B C D E F G H I J K L M N O P Q R S T U V W X Y A A ", " Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.A A ", " (._.:.<.[.}.i |.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.A A ", " g.h.i.j.k.u l.m.n.o.p.q.r.s.t.u.v.u.w.x.y.z.A.B.A A ", " C.D.E.F.G.u H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.A A ", " Z.`. +.+G.u u ++@+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+A A ", " ]+^+/+(+G.u u _+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+A A ", " b+c+d+e+f+u u g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+A A ", " x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+A A ", " V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@A A ", " {@W+]@^@/@(@_@:@<@[@}@|@1@2@3@4@5@6@7@8@9@0@T+a@A A ", " b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@r@s@t@u@v@w@x@y@A A ", " z@A@B@C@D@E@F@G@G@G@H@G@G@G@I@J@K@L@M@N@O@P@Q@R@A A ", " S@T@U@V@W@X@Y@Z@`@ # # # # # #.#+#@###$#%#&#*#=#A A ", " -#;#>#,#'#)#!#~#{#]#^#/#/#/#/#(#_#:#<#[#}#|#1#2#A A ", " 3#4#5#6#7#8#9#0#a#b#c#d#d#d#d#e#f#g#h#i#j#k#l#m#A A ", " n#o#p#q#r#s#t#u#v#w#x#y#y#y#y#z#A#B#C#D#E#F#G#H#A A ", " I#J#K#1@L#M#N#O#P#Q#R#S#S#S#S#T#U#V#W#D#X#Y#Z#`#A A ", " $.$+$2@@$#$$$%$&$*$=$-$-$-$-$;$>$,$'$)$Y#!$~${$A A ", " ]$^$/$($_$:$<$[$}$|$1$1$1$1$1$2$3$4$5$6$7$8$9$0$A A ", " a$b$c$d$e$f$g$h$h$h$h$h$h$h$h$i$j$k$l$m$n$o$p$q$A A ", " r$s$t$u$v$w$x$y$y$y$y$y$y$y$y$x$z$A$B$C$D$E$F$G$A A ", " A A A A A A A A A A A A A A A A A A A A A A A A ", " A A A A A A A A A A A A A A A A A A A A A A A A ", " A A A A A A A A A A A A A A A A A A A A A A ", " "}; #if 0 /* XPM */ static char * filesave_all_xpm[] = { "20 20 13 1", " c None", ". c #6E6E6E", "+ c #4A4A4A", "@ c #000000", "# c #B6B6B6", "$ c #CECECE", "% c #929292", "& c #7A7A7A", "* c #FFFFFF", "= c #F2F2F2", "- c #565656", "; c #DADADA", "> c #C2C2C2", " .++.........++. ", " +++@@@@@@@@@+++#", " ++$.........$++#", " +@%.........#@+#", ".++.........++..#@+#", "+++@@@@@@@@@+++.$@+#", "++$.........$++$&@+#", "+@%.........#@+&&@+#", "+@%.........#@+%&@+#", "+@%.........$@+.&@+#", "+@&%%%%%###$&@+.&@+#", "+@&&&&&&&&&&&@+.&@+#", "+@&&......%%&@+.&@+#", "+@&.***===-.&@+@@@+#", "+@&.;.->>;-.&@++++.#", "+@&.;-@>>;-.&@+#### ", "+@+.;&&>>;-.&@+# ", "#+@@@@@@@@@@@@+# ", " #++++++++++++.# ", " ############# "}; #endif /* XPM */ static char * undo_xpm[] = { "32 32 254 2", " c None", ". c #E0E0E0", "+ c #6B5A5A", "@ c #584040", "# c #CAC9C9", "$ c #BFBDBD", "% c #552A2A", "& c #9C3535", "* c #821414", "= c #7E7A7A", "- c #958B8B", "; c #551313", "> c #BC7E7E", ", c #FFDADA", "' c #8C1B1B", ") c #7A7777", "! c #776565", "~ c #702020", "{ c #E2B3B3", "] c #FFFCFC", "^ c #FFD9D9", "/ c #5D3939", "( c #933F3F", "_ c #F5D3D3", ": c #FFF1F1", "< c #FFD0D0", "[ c #9D9A9A", "} c #521616", "| c #B26666", "1 c #FFE0E0", "2 c #FFE6E6", "3 c #FFE5E5", "4 c #FFC7C7", "5 c #501919", "6 c #705454", "7 c #7F7474", "8 c #671717", "9 c #D89A9A", "0 c #FFDDDD", "a c #FFDCDC", "b c #FFDBDB", "c c #FFD8D8", "d c #FFD7D7", "e c #E2ADAD", "f c #BC7676", "g c #863333", "h c #D5D4D4", "i c #654848", "j c #892F2F", "k c #F5BDBD", "l c #FFD3D3", "m c #FFD2D2", "n c #FFD1D1", "o c #FFCFCF", "p c #FFCECE", "q c #FFCDCD", "r c #FFCBCB", "s c #FFCACA", "t c #FFC9C9", "u c #FFC6C6", "v c #EB9E9E", "w c #9C3E3E", "x c #5A2424", "y c #A9A6A6", "z c #B25A5A", "A c #FFC8C8", "B c #FFC5C5", "C c #FFC4C4", "D c #FFC2C2", "E c #FFC0C0", "F c #FFBFBF", "G c #FFBDBD", "H c #FFBBBB", "I c #FFBABA", "J c #FFB8B8", "K c #FFB6B6", "L c #FFB4B4", "M c #D87373", "N c #701919", "O c #641616", "P c #CF7E7E", "Q c #FFC3C3", "R c #FFBEBE", "S c #FFBCBC", "T c #FFB9B9", "U c #FFB7B7", "V c #FFB5B5", "W c #FFB3B3", "X c #FFB1B1", "Y c #FFAFAF", "Z c #FFADAD", "` c #FFABAB", " . c #FFA9A9", ".. c #FFA7A7", "+. c #FFA5A5", "@. c #F58E8E", "#. c #7F1616", "$. c #634B4B", "%. c #4D1C1C", "&. c #C57C7C", "*. c #FFB2B2", "=. c #FFB0B0", "-. c #FFA6A6", ";. c #FFA4A4", ">. c #FFA2A2", ",. c #FFA0A0", "'. c #FF9D9D", "). c #FF9B9B", "!. c #FF9898", "~. c #FF9696", "{. c #FF9494", "]. c #FF8D8D", "^. c #931E1E", "/. c #9D9494", "(. c #611C1C", "_. c #C57F7F", ":. c #FF9E9E", "<. c #FF9F9F", "[. c #FF9A9A", "}. c #FF9797", "|. c #FF9292", "1. c #FF8F8F", "2. c #FF8C8C", "3. c #FF8A8A", "4. c #FF8787", "5. c #FF8585", "6. c #FF8282", "7. c #F57070", "8. c #7F1010", "9. c #796F6F", "0. c #ADABAB", "a. c #552424", "b. c #9F4C4C", "c. c #FF9999", "d. c #FF8888", "e. c #FF8B8B", "f. c #FF7B7B", "g. c #FF7474", "h. c #FF7171", "i. c #FF6565", "j. c #FF5D5D", "k. c #FF5252", "l. c #EB3D3D", "m. c #641111", "n. c #AAA8A8", "o. c #D1D1D1", "p. c #604848", "q. c #7D2C2C", "r. c #EBB2B2", "s. c #FFA8A8", "t. c #FF7E7E", "u. c #FF7A7A", "v. c #FF7777", "w. c #FF7373", "x. c #FF6F6F", "y. c #FF6B6B", "z. c #FF6767", "A. c #FF6464", "B. c #FF6060", "C. c #FF5C5C", "D. c #FF5858", "E. c #FF5555", "F. c #FF5151", "G. c #FF4D4D", "H. c #FF4A4A", "I. c #FF4646", "J. c #C52A2A", "K. c #522828", "L. c #807777", "M. c #CF8C8C", "N. c #FFCCCC", "O. c #FF7575", "P. c #FF4242", "Q. c #891313", "R. c #897F7F", "S. c #A29F9F", "T. c #572121", "U. c #A85959", "V. c #FF9393", "W. c #641919", "X. c #934242", "Y. c #BC7272", "Z. c #F5BFBF", "`. c #D82F2F", " + c #C6C5C5", ".+ c #604343", "++ c #893636", "@+ c #FF7878", "#+ c #6A6666", "$+ c #A7A5A5", "%+ c #858282", "&+ c #5B4343", "*+ c #FF3E3E", "=+ c #7D1111", "-+ c #979494", ";+ c #766C6C", ">+ c #D89999", ",+ c #FF8080", "'+ c #E2E2E2", ")+ c #C0BFBF", "!+ c #635252", "~+ c #FF4E4E", "{+ c #C52525", "]+ c #603D3D", "^+ c #9F9D9D", "/+ c #8C2D2D", "(+ c #5A1E1E", "_+ c #FF4B4B", ":+ c #F53737", "<+ c #C4C2C2", "[+ c #5A3737", "}+ c #822626", "|+ c #572828", "1+ c #FF3B3B", "2+ c #861414", "3+ c #898686", "4+ c #DDDCDC", "5+ c #796969", "6+ c #624B4B", "7+ c #A3A2A2", "8+ c #E2A5A5", "9+ c #FF7C7C", "0+ c #B21C1C", "a+ c #6A5454", "b+ c #D6D6D6", "c+ c #DDDDDD", "d+ c #928F8F", "e+ c #702323", "f+ c #FF4444", "g+ c #D82A2A", "h+ c #5A3131", "i+ c #D9D9D9", "j+ c #FF8383", "k+ c #F53434", "l+ c #C8C8C8", "m+ c #5F1F1F", "n+ c #F5B6B6", "o+ c #FF4040", "p+ c #641010", "q+ c #6E5757", "r+ c #FF6E6E", "s+ c #861313", "t+ c #8E8B8B", "u+ c #B4B1B1", "v+ c #6E2626", "w+ c #951010", "x+ c #B22323", "y+ c #B25353", "z+ c #756C6C", "A+ c #654747", "B+ c #6A1313", "C+ c #706060", "D+ c #999797", "E+ c #B7B6B6", " . + @ # ", " $ % & * = ", " - ; > , ' ) ", " . ! ~ { ] ^ ' ) ", " # / ( _ : : < ' ) ", " [ } | 1 2 2 3 4 ' 5 6 [ ", " . 7 8 9 0 a b , ^ c d e f g 5 7 h ", " # i j k l m n o p q r s t 4 u v w x [ ", " y x z A s A 4 B C D E F G H I J K L M N ! ", " 7 O P C Q E R S H T U V W X Y Z ` ...+.@.#.$. ", " %.&.L X T K L *.=.Z ` .-.;.>.,.'.).!.~.{.].^.$. ", " /.(._.T !.:.+...;.>.<.'.[.}.{.|.1.2.3.4.5.6.7.8.9. ", " 0.a.b.C c.5.5.d.3.e.3.3.3.4.5.6.f.g.h.i.j.k.l.m.n. ", " o.p.q.r.s.6.t.u.v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.K. ", " L.(.M.G d.u.v.w.x.N.N.N.U ).O.E.F.G.H.I.P.Q.R. ", " S.T.U.4 V.v.w.x.' ; W.X.Y.Z.G x.G.H.I.P.`.a.o. ", " +.+++Z.` @+x.' #+$+%+&+; U.Z.;.k.I.P.*+=+-+ ", " . ;+W.>+E ,+' ) '+)+!+W.>+W ~+P.*+{+]+ ", " ^+} | N./+) ^+(+_.*._+*+:+; )+ ", " <+[+X.}+) <+|+_.,.*+1+2+3+ ", " 4+5+6+7+ $ ; 8+9+1+0+a+ ", " b+c+ d+e+Q f+g+h+i+ ", " i | j+k+} l+ ", " $ m+n+o+p+$+ ", " q+| r+s+t+ ", " u+v+Y w+) ", " % M.x+) ", " 7 b.y+z+ ", " u+e+| A+ ", " 5 b.A+ ", " $.B+C+ ", " h D+E+ "}; /* XPM */ static char * replace_xpm[] = { "32 32 605 2", " c None", ". c #D0D0D0", "+ c #9F9F9F", "@ c #898989", "# c #898988", "$ c #8C8B88", "% c #878684", "& c #807F7F", "* c #8B8B8B", "= c #B2B2B2", "- c #DADADA", "; c #959595", "> c #979694", ", c #C4C2BB", "' c #CECDCB", ") c #C2C3CC", "! c #B6BBC9", "~ c #B5B9C3", "{ c #BAB9B9", "] c #B5B2AB", "^ c #898886", "/ c #696969", "( c #B6B6B6", "_ c #C2C3C3", ": c #858585", "< c #D0CDC7", "[ c #D2D5DE", "} c #97AADF", "| c #8AA1E6", "1 c #A2B6EE", "2 c #ADBFF1", "3 c #A0B4ED", "4 c #7F99DF", "5 c #7287C5", "6 c #9BA1B4", "7 c #B9B7B0", "8 c #6B6A69", "9 c #828282", "0 c #C3C3C3", "a c #E4E2DC", "b c #AEBDE6", "c c #7EA1F1", "d c #B5CDFE", "e c #E7F2FF", "f c #F7FCFF", "g c #FAFCFF", "h c #E7F3FF", "i c #BAD5FF", "j c #749AE9", "k c #687EB4", "l c #B1AFAD", "m c #797876", "n c #777777", "o c #DBDBDB", "p c #818181", "q c #E6E3DE", "r c #A8BDED", "s c #87B0FB", "t c #CCE7FF", "u c #E2F1FF", "v c #F3F8FF", "w c #FDFDFF", "x c #FEFEFF", "y c #F0F7FF", "z c #DAEDFF", "A c #CAE8FF", "B c #92BEFF", "C c #5D7BBC", "D c #A9A7A5", "E c #626261", "F c #9B9B9B", "G c #909090", "H c #D1CEC9", "I c #C2D0F0", "J c #85B3FD", "K c #BEE2FF", "L c #C7E4FF", "M c #DAECFF", "N c #F5F9FF", "O c #F3F9FF", "P c #D5E9FF", "Q c #BCDEFF", "R c #B7DFFF", "S c #8FC1FF", "T c #637BAD", "U c #A6A39E", "V c #424242", "W c #D8D8D8", "X c #D1D1D1", "Y c #90908F", "Z c #E8E9ED", "` c #8AB5FB", " . c #A6D4FF", ".. c #B1D9FF", "+. c #D3E8FF", "@. c #EFF7FF", "#. c #FDFEFF", "$. c #EDF6FF", "%. c #CCE5FF", "&. c #B4DAFF", "*. c #A8D4FF", "=. c #A5D6FF", "-. c #74A8F2", ";. c #808899", ">. c #787673", ",. c #838383", "'. c #D3CACA", "). c #D9D2D2", "!. c #9A9A9A", "~. c #C4C1BC", "{. c #C5D7F7", "]. c #86BDFF", "^. c #A3D3FF", "/. c #A7D3FF", "(. c #B1D8FF", "_. c #C1DFFF", ":. c #DCEEFF", "<. c #F1F7FF", "[. c #F7FBFF", "}. c #D8EBFF", "|. c #BADDFF", "1. c #AAD5FF", "2. c #9FD0FF", "3. c #99CDFF", "4. c #95CCFF", "5. c #6986B5", "6. c #94918C", "7. c #484848", "8. c #D2C6C6", "9. c #A58281", "0. c #8F4F48", "a. c #92514B", "b. c #A57B7A", "c. c #CCBEBE", "d. c #80807F", "e. c #DDDAD6", "f. c #AACBFC", "g. c #8FC7FF", "h. c #97CCFF", "i. c #9DCEFF", "j. c #A4D1FF", "k. c #AED7FF", "l. c #BEDEFF", "m. c #CFE7FF", "n. c #D6EBFF", "o. c #CEE6FF", "p. c #BADCFF", "q. c #A9D4FF", "r. c #96CBFF", "s. c #99CCFF", "t. c #A8D8FF", "u. c #7AA3DA", "v. c #8C8C8F", "w. c #454443", "x. c #CECECE", "y. c #E4E3E3", "z. c #C3B0B0", "A. c #905B58", "B. c #8B403A", "C. c #AD4E2D", "D. c #AD3B10", "E. c #8E2110", "F. c #905151", "G. c #CEC2C2", "H. c #7D7D7C", "I. c #E0DFE0", "J. c #A5CCFF", "K. c #A2D1FF", "L. c #9BCEFF", "M. c #9CCDFF", "N. c #A5D1FF", "O. c #ACD6FF", "P. c #AED6FF", "Q. c #AAD4FF", "R. c #A2D0FF", "S. c #98CCFF", "T. c #9CCEFF", "U. c #A6D3FF", "V. c #B5DEFF", "W. c #91BBEE", "X. c #828790", "Y. c #4D4B4A", "Z. c #A8A1A1", "`. c #B29793", " + c #915642", ".+ c #9D5533", "++ c #BB8876", "@+ c #DC9E6C", "#+ c #E47C28", "$+ c #C24109", "%+ c #8D1F0F", "&+ c #A17272", "*+ c #DDD8D8", "=+ c #DEDEE0", "-+ c #ACD2FF", ";+ c #AAD6FF", ">+ c #A2D2FF", ",+ c #9ACCFF", "'+ c #9DCFFF", ")+ c #A3D2FF", "!+ c #ABD6FF", "~+ c #B3DAFF", "{+ c #C2E4FF", "]+ c #9FC6F2", "^+ c #7D828D", "/+ c #4E403E", "(+ c #7C5148", "_+ c #8E4620", ":+ c #B66A1D", "<+ c #D9A759", "[+ c #DECCAF", "}+ c #E3C6A3", "|+ c #EDA14E", "1+ c #E5721A", "2+ c #B33307", "3+ c #852C28", "4+ c #C0ADAD", "5+ c #7C7C7B", "6+ c #DAD9D9", "7+ c #B6D8FF", "8+ c #BEE0FF", "9+ c #B9DDFF", "0+ c #B2D9FF", "a+ c #ACD7FF", "b+ c #A5D3FF", "c+ c #A4D2FF", "d+ c #A8D5FF", "e+ c #ADD7FF", "f+ c #B9DEFF", "g+ c #C1E2FF", "h+ c #CEEBFF", "i+ c #9ABADF", "j+ c #6F5E61", "k+ c #5D2514", "l+ c #984910", "m+ c #CB8325", "n+ c #ECBE54", "o+ c #F5DA83", "p+ c #E8DAA9", "q+ c #D3C5B2", "r+ c #D6AB7E", "s+ c #E58E3B", "t+ c #CA5213", "u+ c #871F11", "v+ c #A88B8B", "w+ c #CCC9C7", "x+ c #C3DFFC", "y+ c #C2E3FF", "z+ c #C8E5FF", "A+ c #BCE0FF", "B+ c #B8DDFF", "C+ c #B6DCFF", "D+ c #B5DBFF", "E+ c #BDE0FF", "F+ c #C2E2FF", "G+ c #C7E5FF", "H+ c #C8E3FB", "I+ c #BFD0DE", "J+ c #766E7E", "K+ c #773A1E", "L+ c #A65811", "M+ c #D89D36", "N+ c #F3CD66", "O+ c #FBDF7D", "P+ c #FBDD6A", "Q+ c #EFD059", "R+ c #D0BD7E", "S+ c #BCA991", "T+ c #C18E69", "U+ c #B65429", "V+ c #852619", "W+ c #AA8E8D", "X+ c #A7A7A7", "Y+ c #AAA7A5", "Z+ c #D5E3F0", "`+ c #BCE1FF", " @ c #D1EAFF", ".@ c #CCE8FF", "+@ c #CAE7FF", "@@ c #C6E5FF", "#@ c #C6E4FF", "$@ c #CAE3F9", "%@ c #B0B2C0", "&@ c #84625D", "*@ c #823F18", "=@ c #B7721D", "-@ c #E4B24A", ";@ c #F7D775", ">@ c #FCE079", ",@ c #FEDB55", "'@ c #FDD227", ")@ c #F9CB12", "!@ c #E5C02B", "~@ c #C29F57", "{@ c #9E6654", "]@ c #85342D", "^@ c #8F5654", "/@ c #D0C4C4", "(@ c #DDDDDD", "_@ c #D7D6D6", ":@ c #C2E0FC", "<@ c #CFE9FF", "[@ c #D3EBFF", "}@ c #D0E9FF", "|@ c #D8ECFF", "1@ c #E3F1FF", "2@ c #E0F0FF", "3@ c #D4EBFF", "4@ c #CEE8FD", "5@ c #C6D7EB", "6@ c #A9A4AF", "7@ c #875846", "8@ c #994F15", "9@ c #CC8B2C", "0@ c #EEC65B", "a@ c #FADF7C", "b@ c #FDE16F", "c@ c #FED942", "d@ c #FED118", "e@ c #FCCC03", "f@ c #F6C401", "g@ c #DFA408", "h@ c #B06716", "i@ c #863F2E", "j@ c #966868", "k@ c #CCBDBD", "l@ c #A3A4A4", "m@ c #A6A5A3", "n@ c #D4DAE1", "o@ c #C3E3FF", "p@ c #D7EEFF", "q@ c #D7EDFF", "r@ c #E8F4FF", "s@ c #F9FCFF", "t@ c #F5FAFF", "u@ c #E1F1FF", "v@ c #D2E8FB", "w@ c #BBC2D1", "x@ c #927778", "y@ c #884C2D", "z@ c #AB661A", "A@ c #DCA73E", "B@ c #F4D46D", "C@ c #FDE37E", "D@ c #FEDF5F", "E@ c #FED72E", "F@ c #FDD20D", "G@ c #FACC00", "H@ c #F1BE01", "I@ c #D59606", "J@ c #A55D0F", "K@ c #8C4D33", "L@ c #AB8B89", "M@ c #DAD3D3", "N@ c #B6B4B2", "O@ c #CDD6DE", "P@ c #C7E4FD", "Q@ c #D9EFFF", "R@ c #F6FAFF", "S@ c #E1EAF6", "T@ c #B9B8C2", "U@ c #8B625A", "V@ c #914A1B", "W@ c #C17F24", "X@ c #E6BC53", "Y@ c #F8DE79", "Z@ c #FDE477", "`@ c #FEDD4E", " # c #FED620", ".# c #FDD207", "+# c #F9CC00", "@# c #E9B404", "## c #C47E08", "$# c #974E17", "%# c #9A6D5F", "&# c #C3B1B0", "*# c #E1DFDF", "=# c #7D7D7D", "-# c #ADACAA", ";# c #C6CACE", "># c #C6DAEC", ",# c #D2EAFF", "'# c #E3F3FF", ")# c #EDF8FF", "!# c #E0E6EB", "~# c #AB9C9E", "{# c #86533F", "]# c #9C5717", "^# c #D19734", "/# c #F0CD64", "(# c #FAE27D", "_# c #FEE26A", ":# c #FED93A", "<# c #FED213", "[# c #FCCD03", "}# c #F5C202", "|# c #DEA207", "1# c #B1690C", "2# c #8A4522", "3# c #9B716B", "4# c #D2C8C8", "5# c #E8E7E7", "6# c #888888", "7# c #91908F", "8# c #B3B2B1", "9# c #BABFC4", "0# c #BBC5D0", "a# c #A8ABB5", "b# c #876A68", "c# c #854624", "d# c #B27020", "e# c #DDAF47", "f# c #F5D873", "g# c #FDE17A", "h# c #FEDA56", "i# c #FECF28", "j# c #FEC90B", "k# c #FBC302", "l# c #EFB304", "m# c #CF8809", "n# c #9C4B09", "o# c #844833", "p# c #AE9390", "q# c #D9D3D3", "r# c #B4B4B4", "s# c #7E7E7E", "t# c #848382", "u# c #8A7E7D", "v# c #724438", "w# c #904A18", "x# c #C4852D", "y# c #EAC15B", "z# c #F9DC7B", "A# c #FCDA70", "B# c #FECE43", "C# c #FEC319", "D# c #FDBD04", "E# c #F7B501", "F# c #E69D06", "G# c #C06D0B", "H# c #8F3F0D", "I# c #893815", "J# c #7F3131", "K# c #D8D6D6", "L# c #B3AFAF", "M# c #73534D", "N# c #8E441F", "O# c #D0913D", "P# c #F1C86B", "Q# c #FBD77E", "R# c #FED062", "S# c #FEC131", "T# c #FCB40E", "U# c #FAAD02", "V# c #F2A403", "W# c #D98709", "X# c #AC560D", "Y# c #83310C", "Z# c #96551B", "`# c #D6C64B", " $ c #EE963E", ".$ c #994645", "+$ c #E0DFDF", "@$ c #C0B1B1", "#$ c #8B594F", "$$ c #C37B53", "%$ c #F1BF75", "&$ c #FCD178", "*$ c #FEC350", "=$ c #FEB221", "-$ c #FEA707", ";$ c #F69B01", ">$ c #E88C06", ",$ c #C96E0D", "'$ c #953C0D", ")$ c #852506", "!$ c #B15009", "~$ c #E59022", "{$ c #FBC63E", "]$ c #FFFB5E", "^$ c #F29D41", "/$ c #974443", "($ c #DFDFDF", "_$ c #CEC5C5", ":$ c #916C6A", "<$ c #A47167", "[$ c #E4AF8D", "}$ c #F9B970", "|$ c #FDB23D", "1$ c #FDA413", "2$ c #FB9A02", "3$ c #F79502", "4$ c #E27F09", "5$ c #B85610", "6$ c #89391C", "7$ c #875651", "8$ c #9C3330", "9$ c #DF5304", "0$ c #FF8B10", "a$ c #FFA426", "b$ c #FFC93F", "c$ c #FFFA5E", "d$ c #F0A142", "e$ c #934140", "f$ c #DAD5D5", "g$ c #917070", "h$ c #89534C", "i$ c #CDAB99", "j$ c #EFCFB0", "k$ c #F7B26E", "l$ c #FA9923", "m$ c #FA9105", "n$ c #F18804", "o$ c #D6700C", "p$ c #A54612", "q$ c #7F3524", "r$ c #96716D", "s$ c #CDC4C4", "t$ c #E4DEDE", "u$ c #B74744", "v$ c #E65605", "w$ c #FFC83E", "x$ c #EFA444", "y$ c #914340", "z$ c #D8D7D7", "A$ c #B6A5A6", "B$ c #653434", "C$ c #886359", "D$ c #D4C4AB", "E$ c #EBD7B4", "F$ c #EAB987", "G$ c #E99041", "H$ c #DF7413", "I$ c #C35B0F", "J$ c #933B19", "K$ c #7D433A", "L$ c #A38988", "M$ c #D5CFCF", "N$ c #E8E2E2", "O$ c #B34946", "P$ c #E35405", "Q$ c #FF8A10", "R$ c #FFA325", "S$ c #FFC73E", "T$ c #FFFC5E", "U$ c #E7923C", "V$ c #8C6565", "W$ c #DAD6D6", "X$ c #846464", "Y$ c #431B1B", "Z$ c #574C45", "`$ c #A3907A", " % c #C49B7D", ".% c #B97E62", "+% c #A8573A", "@% c #953A1B", "#% c #7F3421", "$% c #7B4D4A", "%% c #B5A6A6", "&% c #E3E1E1", "*% c #E8E4E4", "=% c #AF4D4A", "-% c #DF5205", ";% c #FFA224", ">% c #FFD743", ",% c #EA9B39", "'% c #845B5B", ")% c #E6E5E5", "!% c #B3A2A2", "~% c #622C2C", "{% c #451313", "]% c #42211F", "^% c #69372F", "/% c #804338", "(% c #7F463F", "_% c #865651", ":% c #96706E", "<% c #AC9695", "[% c #C5BEBE", "}% c #E8E5E5", "|% c #AC514F", "1% c #DA4F04", "2% c #FF8A11", "3% c #F58B21", "4% c #922E1A", "5% c #BBB9B9", "6% c #DFDCDC", "7% c #9F8585", "8% c #6D3636", "9% c #673535", "0% c #7A5756", "a% c #977A7A", "b% c #AF9A9A", "c% c #C6BABA", "d% c #D7D2D2", "e% c #E9E6E6", "f% c #AB5756", "g% c #A02D12", "h% c #86322E", "i% c #B1ACAC", "j% c #E9E9E9", "k% c #CFC7C7", "l% c #BDAFAF", "m% c #C9C0C0", "n% c #D9D5D5", " ", " ", " . + @ # $ % & * = ", " - ; > , ' ) ! ~ { ] ^ / ( ", " _ : < [ } | 1 2 3 4 5 6 7 8 9 ", " 0 @ a b c d e f g f h i j k l m n ", " o p q r s t u v w x w y z A B C D E F ", " G H I J K L M N x x x O P Q R S T U V W ", "X Y Z ` ...Q +.@.#.x w $.%.&.*.=.-.;.>.,. '.). ", "!.~.{.].^./.(._.:.<.[.y }.|.1.2.3.4.5.6.7. 8.9.0.a.b.c. ", "d.e.f.g.h.i.j.k.l.m.n.o.p.q.i.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G. ", "H.I.J.K.L.r.h.M.N.O.P.Q.R.S.r.T.U.V.W.X.Y.Z.`. +.+++@+#+$+%+&+*+", "H.=+-+..;+>+T.S.S.3.s.3.,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+4+", "5+6+7+8+9+0+a+*.b+c+c+b+d+e+~+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+", ",.w+x+y+z+g+A+B+C+D+D+C+f+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+V+W+", "X+Y+Z+`+ @.@+@G+@@z+L #@z++@.@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@^@/@", "(@p _@:@<@[@}@<@|@1@2@3@<@4@5@6@7@8@9@0@a@b@c@d@e@f@g@h@i@j@k@ ", " l@m@n@o@p@q@|@r@s@t@u@v@w@x@y@z@A@B@C@D@E@F@G@H@I@J@K@L@M@ ", " p N@O@P@Q@2@$.g R@S@T@U@V@W@X@Y@Z@`@ #.#+#@###$#%#&#*# ", " o =#-#;#>#,#'#)#!#~#{#]#^#/#(#_#:#<#[#}#|#1#2#3#4#5# ", " (@6#7#8#9#0#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#q# ", " r#s#t#u#v#w#x#y#z#A#B#C#D#E#F#G#H#I#J#K# ", " L#M#N#O#P#Q#R#S#T#U#V#W#X#Y#Z#`# $.$+$ ", " @$#$$$%$&$*$=$-$;$>$,$'$)$!$~${$]$^$/$($ ", " _$:$<$[$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$(@ ", " f$g$h$i$j$k$l$m$n$o$p$q$r$s$t$u$v$0$a$w$c$x$y$z$ ", " A$B$C$D$E$F$G$H$I$J$K$L$M$ N$O$P$Q$R$S$T$U$V$ ", " W$X$Y$Z$`$ %.%+%@%#%$%%%&% *%=%-%Q$;%>%,%'% ", " )%!%~%{%]%^%/%(%_%:%<%[% }%|%1%2%3%4%5% ", " 6%7%8%9%0%a%b%c%d% e%f%g%h%i% ", " j%k%l%m%n% ", " "}; /* XPM */ /* static char * replace_xpm[] = { "20 20 9 1", " c None", ". c #4A4A4A", "+ c #6E6E6E", "@ c #000000", "# c #006296", "$ c #0092DC", "% c #007AB9", "& c #868686", "* c #003250", " ", " .....+.....+ ", ".@@@@@@@@@@@@. ", ".@####@@####@@. ", ".@@#$$#@@#$$#@@. ", " .@@#$%#@@#$%#@@. ", " .@@#$%#@@#$%#@@. ", " .@@#$%#@@$%%#@@. ", " .@@#$%#@@$%%#@@&", " .@*#$%#@*$$%#@@", " .@*#$%#@*#$%#@@", " .@@#$%#@@#$%#@@&", " .@@#$%#@@#$%#@@. ", " .@@#$%#@@#$%#@@. ", " .@@#%%#@@#%%#@@. ", ".@@#%%#@@#%%#@@. ", ".@####@@####@@. ", ".@@@@@@@@@@@@. ", " .....+.....+ ", " "}; */ #if 0 /* XPM */ static char * World_xpm[] = { "20 20 32 1", " c None", ". c #B6B6B6", "+ c #AAAAAA", "@ c #868686", "# c #6E6E6E", "$ c #4A4A4A", "% c #323232", "& c #000000", "* c #565656", "= c #006296", "- c #CECECE", "; c #FFFFFF", "> c #007AB9", ", c #0092DC", "' c #48B8FF", ") c #007373", "! c #00734A", "~ c #00AAFF", "{ c #8ED4FF", "] c #25AAFF", "^ c #00B9B9", "/ c #005050", "( c #DADADA", "_ c #C5AA00", ": c #626200", "< c #4A4A00", "[ c #323200", "} c #3E3E3E", "| c #B1FFFF", "1 c #48FFFF", "2 c #004A73", "3 c #003250", " ..+@##@+.. ", " .@$%&**&%$@. ", " .*&=-;;-;>=&*. ", " .*&,,';-;-'))&*. ", " .*&!~{{']']^///&*. ", ".@&!^;;'](((!_::<&@.", ".$!^.;']';;((_::<[$.", "+%:'{']']]]^!_::<[%+", "@&:...((((^!:_:<<[&@", "#}<[.(;|||11_::<[>2#", "#}<..((((],!:::<>>2#", "@&@.((],],]/::<,>>&@", "+%@.,],],],,/:<>>=%+", ".$[,,,,,,,,,,/<>=3$.", ".@&,>,@,>,>,@>/23&@.", " .*&3@.@>>>.;@23&*. ", " .*&3%..;..@23&*. ", " .*&3%;;;.@3&*. ", " .@$%&%%&%$@. ", " ..+@##@+.. "}; #endif /* XPM */ static char * findnext_xpm[] = { "32 32 550 2", " c None", ". c #B2B2B2", "+ c #666666", "@ c #626262", "# c #7B7B79", "$ c #888784", "% c #5E5D5D", "& c #535353", "* c #878787", "= c #C8C8C8", "- c #5D5D5D", "; c #8A8987", "> c #C4C2BB", ", c #CDCCCA", "' c #BEC1CA", ") c #B1B6C6", "! c #B1B5C0", "~ c #B9B8B8", "{ c #B5B2AB", "] c #858481", "^ c #3A3A3A", "/ c #8F8F8F", "( c #999999", "_ c #6D6D6D", ": c #D0CDC7", "< c #D2D5DE", "[ c #93A6DE", "} c #7692E3", "| c #7B96E9", "1 c #809DEC", "2 c #7894E7", "3 c #6987DA", "4 c #6D84C4", "5 c #9BA1B4", "6 c #B9B7B0", "7 c #676665", "8 c #484848", "9 c #9A9A9A", "0 c #7F7F7F", "a c #E4E2DC", "b c #AEBDE6", "c c #799DF1", "d c #A8C6FE", "e c #D6EAFF", "f c #EAF7FF", "g c #EDF9FF", "h c #E7F6FF", "i c #D6ECFF", "j c #AFCFFF", "k c #7198E9", "l c #687EB4", "m c #B1AFAD", "n c #797876", "o c #3D3D3D", "p c #CBCBCB", "q c #6C6C6C", "r c #E6E3DE", "s c #A8BDED", "t c #87B0FB", "u c #C9E6FF", "v c #D7EEFF", "w c #E1F0FF", "x c #ECF5FF", "y c #F1F7FF", "z c #E8F3FF", "A c #D7EAFF", "B c #CDE8FF", "C c #C8E8FF", "D c #92BEFF", "E c #5D7BBC", "F c #A9A7A5", "G c #626261", "H c #696969", "I c #585858", "J c #D1CEC9", "K c #C2D0F0", "L c #85B3FD", "M c #BEE2FF", "N c #C1E1FF", "O c #D0E7FF", "P c #FAFCFF", "Q c #FDFEFF", "R c #F6FAFF", "S c #DDEDFF", "T c #C3E1FF", "U c #B8DCFF", "V c #B7DFFF", "W c #8FC1FF", "X c #637BAD", "Y c #A6A39E", "Z c #292929", "` c #B6B6B6", " . c #868685", ".. c #E8E9ED", "+. c #8AB5FB", "@. c #A6D4FF", "#. c #B1D9FF", "$. c #B6DBFF", "%. c #CBE4FF", "&. c #FEFEFF", "*. c #BDDEFF", "=. c #AFD8FF", "-. c #A8D4FF", ";. c #A5D6FF", ">. c #74A8F2", ",. c #808899", "'. c #787673", "). c #4B4B4B", "!. c #606060", "~. c #C4C1BC", "{. c #C5D7F7", "]. c #86BDFF", "^. c #A3D3FF", "/. c #A7D3FF", "(. c #ACD6FF", "_. c #BFDFFF", ":. c #DEEEFF", "<. c #FBFDFF", "[. c #F0F7FF", "}. c #CFE7FF", "|. c #B2D9FF", "1. c #A6D3FF", "2. c #9FD0FF", "3. c #99CDFF", "4. c #95CCFF", "5. c #6986B5", "6. c #94918C", "7. c #1E1E1E", "8. c #EAEAEA", "9. c #575756", "0. c #DDDAD6", "a. c #AACBFC", "b. c #8FC7FF", "c. c #97CCFF", "d. c #9DCEFF", "e. c #A2D1FF", "f. c #AAD4FF", "g. c #D5E9FF", "h. c #DCEDFF", "i. c #CDE6FF", "j. c #B4D9FF", "k. c #9CCEFF", "l. c #96CBFF", "m. c #99CCFF", "n. c #A8D8FF", "o. c #7AA3DA", "p. c #8C8C8F", "q. c #363534", "r. c #B8B8B8", "s. c #696968", "t. c #E0DFE0", "u. c #A5CCFF", "v. c #9BCEFF", "w. c #9ACDFF", "x. c #9FCFFF", "y. c #ABD4FF", "z. c #ADD5FF", "A. c #9BCDFF", "B. c #B5DEFF", "C. c #91BBEE", "D. c #828790", "E. c #4C4A49", "F. c #909090", "G. c #6D6D6C", "H. c #DEDEE0", "I. c #ACD2FF", "J. c #AAD6FF", "K. c #A2D2FF", "L. c #98CCFF", "M. c #98CBFF", "N. c #9DCFFF", "O. c #A3D2FF", "P. c #ABD6FF", "Q. c #B3DAFF", "R. c #C2E4FF", "S. c #9FC6F2", "T. c #7F8691", "U. c #514F4E", "V. c #838383", "W. c #636362", "X. c #DAD9D9", "Y. c #B6D8FF", "Z. c #BDDFFE", "`. c #B2D6F6", " + c #AED5FA", ".+ c #ACD7FF", "++ c #A5D3FF", "@+ c #A4D2FF", "#+ c #A8D5FF", "$+ c #ADD7FF", "%+ c #B9DEFF", "&+ c #C1E2FF", "*+ c #CEEBFF", "=+ c #9FC4EB", "-+ c #80858C", ";+ c #434341", ">+ c #969696", ",+ c #CCC9C7", "'+ c #C3DFFC", ")+ c #A3C4D6", "!+ c #65837C", "~+ c #79999D", "{+ c #AACDE7", "]+ c #B8DDFF", "^+ c #B6DCFF", "/+ c #B5DBFF", "(+ c #BDE0FF", "_+ c #C2E2FF", ":+ c #C7E5FF", "<+ c #CCE7FF", "[+ c #D4EFFF", "}+ c #90B2D5", "|+ c #848484", "1+ c #2A2A29", "2+ c #C1C1C1", "3+ c #707070", "4+ c #AAA7A5", "5+ c #D3E1EE", "6+ c #84A7B0", "7+ c #286E1E", "8+ c #2F8621", "9+ c #5F8572", "0+ c #A1BDCE", "a+ c #C2E0FA", "b+ c #C5E4FF", "c+ c #C6E4FF", "d+ c #C8E5FF", "e+ c #CAE7FF", "f+ c #CCE8FF", "g+ c #CEE9FF", "h+ c #D3EBFF", "i+ c #CEEDFF", "j+ c #7E94AA", "k+ c #807D7B", "l+ c #D0D0D0", "m+ c #6B6B6B", "n+ c #D5D4D4", "o+ c #84A4A8", "p+ c #3E9B2B", "q+ c #9ED691", "r+ c #52AB3F", "s+ c #478049", "t+ c #88A2A6", "u+ c #BED8EC", "v+ c #CEE8FF", "w+ c #CFE9FF", "x+ c #D0EAFF", "y+ c #D2EAFF", "z+ c #D4EBFF", "A+ c #DDF3FF", "B+ c #A7C8E7", "C+ c #84878B", "D+ c #595958", "E+ c #616161", "F+ c #6A6B6B", "G+ c #A4A3A1", "H+ c #90A096", "I+ c #3F9D2D", "J+ c #D9F0D3", "K+ c #D2EDCB", "L+ c #76C166", "M+ c #358D28", "N+ c #6F8B81", "O+ c #B9CFDE", "P+ c #D3EAFE", "Q+ c #D5ECFF", "R+ c #D8EDFF", "S+ c #DFF3FF", "T+ c #C5E3FB", "U+ c #808D9A", "V+ c #7F7D7B", "W+ c #202121", "X+ c #E2E2E2", "Y+ c #E0E1E0", "Z+ c #DBDCDB", "`+ c #D2D3D2", " @ c #505250", ".@ c #778171", "+@ c #3F9B29", "@@ c #CFECC8", "#@ c #D4EECE", "$@ c #9AD48C", "%@ c #389724", "&@ c #5C8165", "*@ c #AEC1CA", "=@ c #D7EAFA", "-@ c #DFF1FF", ";@ c #E2F6FF", ">@ c #C6E2F7", ",@ c #8796A4", "'@ c #9A9896", ")@ c #7A7B7B", "!@ c #282626", "~@ c #F0F0F0", "{@ c #51634D", "]@ c #315329", "^@ c #2E5126", "/@ c #2E5026", "(@ c #2E4E26", "_@ c #284821", ":@ c #1F4217", "<@ c #3B9A24", "[@ c #CDEBC6", "}@ c #90CF81", "|@ c #86CA76", "1@ c #C4E7BB", "2@ c #BDE4B3", "3@ c #53AB3F", "4@ c #518150", "5@ c #A2B6B8", "6@ c #CCE3F4", "7@ c #B0C6D8", "8@ c #8D959C", "9@ c #92908E", "0@ c #B3B3B3", "a@ c #DCE2E2", "b@ c #9E7A79", "c@ c #BB3B2F", "d@ c #722728", "e@ c #185209", "f@ c #55AB40", "g@ c #6FB95C", "h@ c #70BA5E", "i@ c #72BC60", "j@ c #9BD48D", "k@ c #7BC469", "l@ c #4CA835", "m@ c #72BF5F", "n@ c #BBE3B1", "o@ c #CBEAC3", "p@ c #5BB146", "q@ c #386B34", "r@ c #6E7877", "s@ c #8E8E8D", "t@ c #807E7D", "u@ c #404040", "v@ c #777F7F", "w@ c #BCBDBF", "x@ c #E1E4EB", "y@ c #F5F4BF", "z@ c #F89241", "A@ c #6B1818", "B@ c #DEDEDE", "C@ c #176005", "D@ c #B4E0A9", "E@ c #A1D793", "F@ c #A3D895", "G@ c #A9DB9D", "H@ c #ADDDA2", "I@ c #B2DFA7", "J@ c #B0DEA4", "K@ c #6BBB57", "L@ c #44A32D", "M@ c #4AA733", "N@ c #67B953", "O@ c #5CB147", "P@ c #2D5A22", "Q@ c #3A3E39", "R@ c #3C3C3C", "S@ c #ABACAC", "T@ c #752423", "U@ c #C0B1A7", "V@ c #C0C8C5", "W@ c #F5E481", "X@ c #FFFA59", "Y@ c #F5963E", "Z@ c #6A1717", "`@ c #DDDCDC", " # c #175E05", ".# c #98D38A", "+# c #74C061", "@# c #2E9215", "## c #2C9113", "$# c #35981D", "%# c #3C9D24", "&# c #40A028", "*# c #47A530", "=# c #3D9E25", "-# c #5FB44A", ";# c #CEEBC7", "># c #49A133", ",# c #26411F", "'# c #B8BBB8", ")# c #9B3F3F", "!# c #E9A16A", "~# c #F9D762", "{# c #FFB62C", "]# c #FFC93E", "^# c #FFFB5F", "/# c #F39A40", "(# c #681615", "_# c #D9D9D9", ":# c #94D185", "<# c #5CB246", "[# c #146700", "}# c #146500", "|# c #177400", "1# c #187C00", "2# c #1E8404", "3# c #248A0B", "4# c #62B64D", "5# c #166503", "6# c #70766F", "7# c #DCD1D1", "8# c #931510", "9# c #ED5A03", "0# c #FF890F", "a# c #FFA527", "b# c #FFCA40", "c# c #FFFB5E", "d# c #F29D41", "e# c #671514", "f# c #D7D7D7", "g# c #58B042", "h# c #136200", "i# c #125E00", "j# c #156D00", "k# c #187800", "l# c #1B8101", "m# c #208606", "n# c #288D0E", "o# c #2F9316", "p# c #4FAA38", "q# c #1C7C03", "r# c #5E655C", "s# c #E1D9D9", "t# c #8D1512", "u# c #E85705", "v# c #FF8B10", "w# c #FFA426", "x# c #FFC93F", "y# c #FFFA5E", "z# c #F0A142", "A# c #661412", "B# c #D3D3D3", "C# c #165C05", "D# c #53AD3D", "E# c #125B00", "F# c #115900", "G# c #167000", "H# c #187A00", "I# c #1D8303", "J# c #218707", "K# c #268C0D", "L# c #34971B", "M# c #3F9F27", "N# c #82C772", "O# c #17500A", "P# c #888C87", "Q# c #E3DCDC", "R# c #871714", "S# c #E65605", "T# c #FFC83E", "U# c #EFA444", "V# c #631613", "W# c #CAC9C9", "X# c #79C367", "Y# c #42A12A", "Z# c #4DA937", "`# c #319519", " $ c #258B0C", ".$ c #B6E1AC", "+$ c #A8DA9C", "@$ c #1F7A07", "#$ c #4F5C4C", "$$ c #D7D8D7", "%$ c #E4DEDE", "&$ c #821815", "*$ c #E35405", "=$ c #FF8A10", "-$ c #FFA325", ";$ c #FFC73E", ">$ c #FFFC5E", ",$ c #E7923C", "'$ c #532C2C", ")$ c #165A05", "!$ c #81C770", "~$ c #A0D692", "{$ c #9DD590", "]$ c #A2D794", "^$ c #A4D897", "/$ c #B3DFA8", "($ c #49A632", "_$ c #23830C", ":$ c #374B32", "<$ c #BABCBA", "[$ c #E6E2E2", "}$ c #7D1A18", "|$ c #DF5205", "1$ c #FFA224", "2$ c #FFD743", "3$ c #EA9B39", "4$ c #4D2424", "5$ c #1E4415", "6$ c #1F7908", "7$ c #278110", "8$ c #247F0E", "9$ c #237E0D", "0$ c #22800B", "a$ c #5AAF45", "b$ c #46A42E", "c$ c #64B74F", "d$ c #96D188", "e$ c #26810F", "f$ c #31432D", "g$ c #B1B4B0", "h$ c #E7E4E4", "i$ c #781C1A", "j$ c #DA4F04", "k$ c #FF8A11", "l$ c #F58B21", "m$ c #811D09", "n$ c #979494", "o$ c #99A198", "p$ c #7F897C", "q$ c #7D887B", "r$ c #7D867B", "s$ c #3A4B36", "t$ c #298711", "u$ c #ABDC9F", "v$ c #77BF65", "w$ c #1A7004", "x$ c #3E4D3B", "y$ c #E9E6E6", "z$ c #752120", "A$ c #911E03", "B$ c #610E09", "C$ c #858181", "D$ c #6D786A", "E$ c #298613", "F$ c #50A83A", "G$ c #18500B", "H$ c #5A6458", "I$ c #D1D2D1", "J$ c #6D796B", "K$ c #2C8815", "L$ c #83C872", "M$ c #2A8812", "N$ c #264C1D", "O$ c #848B83", "P$ c #1F7D07", "Q$ c #50A93B", "R$ c #1A6A07", "S$ c #445640", "T$ c #ABAEAA", "U$ c #E8E8E8", "V$ c #858D83", "W$ c #153D0B", "X$ c #1F4416", "Y$ c #6E776C", " . + @ # $ # % & * ", " = - ; > , ' ) ! ~ { ] ^ / ", " ( _ : < [ } | 1 2 3 4 5 6 7 8 ", " 9 0 a b c d e f g h i j k l m n o ", " p q r s t u v w x y z A B C D E F G H ", " I J K L M N O z P Q R S T U V W X Y Z p ", " ` ...+.@.#.$.%.x Q &.P S *.=.-.;.>.,.'.). ", " !.~.{.].^./.(._.:.R <.[.}.|.1.2.3.4.5.6.7.8. ", " 9.0.a.b.c.d.e.f._.g.h.i.j.e.k.l.m.n.o.p.q.r. ", " s.t.u.e.v.l.c.w.x.y.z./.A.c.l.k.1.B.C.D.E.F. ", " G.H.I.#.J.K.k.L.c.c.M.c.m.N.O.P.Q.R.S.T.U.V. ", " W.X.Y.Z.`. +.+-.++@+@+++#+$+Q.%+&+*+=+-+;+>+ ", " & ,+'+)+!+~+{+]+^+/+/+^+%+(+_+:+<+[+}+|+1+2+ ", " 3+4+5+6+7+8+9+0+a+b+b+c+d+e+f+g+h+i+j+k+7. ", " l+m+n+o+p+q+r+s+t+u+v+g+w+x+y+z+A+B+C+D+E+ ", " F+G+H+I+J+K+L+M+N+O+P+Q+i R+S+T+U+V+W+X+ ", "Y+Z+Z+Z+`+ @.@+@K+@@#@$@%@&@*@=@-@;@>@,@'@)@!@X.~@ ", "{@]@^@/@(@_@:@<@[@}@|@1@2@3@4@5@6@7@8@9@0@a@b@c@d@X+ ", "e@f@g@h@h@h@i@j@#@k@l@m@n@o@p@q@r@s@t@u@v@w@x@y@z@A@B@ ", "C@$@D@E@F@G@H@I@J@K@L@M@N@G@[@O@P@Q@R@S@T@U@V@W@X@Y@Z@`@ ", " #.#+#@###$#%#&#*#=#=#L@M@-#G@;#>#,#'# )#!#~#{#]#^#/#(#_# ", " #:#<#[#}#|#1#2#3###$#=#L@M@4#n@G@5#6# 7#8#9#0#a#b#c#d#e#f# ", " #:#g#h#i#j#k#l#m#n#o#$#=#L@p#q+2@q#r# s#t#u#v#w#x#y#z#A#B# ", "C#}@D#E#F#}#G#H#I#J#K#@#L#M#m@o@N#O#P# Q#R#S#v#w#T#y#U#V#W#", "C#}@X#Y#&#*#Z#D#D#`#m# $`#4#.$+$@$#$$$ %$&$*$=$-$;$>$,$'$", ")$!$~${$~$]$^$/$I@($l#K#-#D@^$_$:$<$ [$}$|$=$1$2$3$4$", "5$6$7$8$8$9$0$a$J@b$ $c$.$d$e$f$g$ h$i$j$k$l$m$n$", "o$p$q$q$p$r$s$t$u$K@+#.$v$w$x$<$ y$z$A$B$C$ ", " D$E$J@I@H@F$G$H$I$ ", " J$K$J@L$M$N$O$Y+ ", " J$P$Q$R$S$T$U$ ", " V$W$X$Y$$$ "}; /* XPM */ static char * stop_xpm[] = { "32 32 128 2", " c None", ". c #660000", "+ c #720000", "@ c #990000", "# c #7F0000", "$ c #E44848", "% c #FC9191", "& c #E14040", "* c #F68080", "= c #DE3737", "- c #F16F6F", "; c #DB2E2E", "> c #EB5D5D", ", c #D82626", "' c #E54D4D", ") c #DF4B4B", "! c #CA4949", "~ c #DB4B4B", "{ c #E34C4C", "] c #D61D1D", "^ c #E03B3B", "/ c #DB3B3B", "( c #CB3F3F", "_ c #BC4343", ": c #B24545", "< c #D33D3D", "[ c #DA3B3B", "} c #D73C3C", "| c #BE4343", "1 c #C94040", "2 c #DA3C3C", "3 c #D31515", "4 c #DA2A2A", "5 c #D03636", "6 c #BE4444", "7 c #B34848", "8 c #BB3F3F", "9 c #B84141", "0 c #BF3C3C", "a c #B54646", "b c #B94040", "c c #C63737", "d c #D42D2D", "e c #D00C0C", "f c #D41919", "g c #CE3F3F", "h c #C46969", "i c #BD5B5B", "j c #B54B4B", "k c #B34747", "l c #CA6060", "m c #D22E2E", "n c #CD0404", "o c #CE0808", "p c #CD0808", "q c #C43535", "r c #C36767", "s c #C87171", "t c #D69191", "u c #EAC3C3", "v c #D53838", "w c #CC0000", "x c #C14242", "y c #B54747", "z c #B44A4A", "A c #BB5757", "B c #C26565", "C c #B85151", "D c #EDCBCB", "E c #CD4242", "F c #C80808", "G c #B64D4D", "H c #E5B6B6", "I c #C16262", "J c #C65858", "K c #C97373", "L c #E8BEBE", "M c #DFA7A7", "N c #C76F6F", "O c #CA7676", "P c #E9C0C0", "Q c #CF8181", "R c #C86666", "S c #C96060", "T c #D38A8A", "U c #CB1313", "V c #CA2D2D", "W c #E3B1B1", "X c #DDA2A2", "Y c #EBBFBF", "Z c #CB0606", "` c #C94D4D", " . c #C97070", ".. c #E4B3B3", "+. c #E07B7B", "@. c #D53A3A", "#. c #CB0404", "$. c #C86B6B", "%. c #CC0303", "&. c #CE0000", "*. c #D00000", "=. c #CF0808", "-. c #CC2F2F", ";. c #C95555", ">. c #CF8080", ",. c #E8B8B8", "'. c #E17B7B", "). c #D83A3A", "!. c #D00303", "~. c #D10000", "{. c #D70000", "]. c #D50909", "^. c #D03333", "/. c #CA5E5E", "(. c #E1A6A6", "_. c #E48282", ":. c #DC3434", "<. c #D70303", "[. c #D50000", "}. c #DF0000", "|. c #D90000", "1. c #E70000", "2. c #DD0000", "3. c #EE0000", "4. c #E10000", "5. c #F60000", "6. c #5F0000", "7. c #5D0000", " ", " ", " . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ . ", " . # $ % % % % % % % % % % % % % % % % % % % % % % % $ . ", " . # & * * * * * * * * * * * * * * * * * * * * * * * & . ", " . # = - - - - - - - - - - - - - - - - - - - - - - - = . ", " . # ; > > > > > > > > > > > > > > > > > > > > > > > ; . ", " . # , ' ' ' ' ' ' ' ' ) ! ~ ' { ) ' ' ' ' ' ' ' ' ' , . ", " . # ] ^ ^ ^ ^ ^ ^ / ( _ : < [ } | 1 2 ^ ^ ^ ^ ^ ^ ^ ] . ", " . # 3 4 4 4 4 4 5 6 : 7 7 8 9 0 a : b c d 4 4 4 4 4 3 . ", " . # e f f f f f g h i j 7 7 7 : 7 7 7 k l m f f f f e . ", " . # n o o o o p q r s h i 7 7 7 7 7 h t u v o o o o n . ", " . # w w w w w x y z A B s C 7 7 h t u D D E F w w w w . ", " . # w w w w w s h i j z A G 7 i H D D D D I J w w w w . ", " . # w w w w w K K s h i j 7 G i L D D D D M u w w w w . ", " . # w w w w w K K K K s h r N O P D D D D D D w w w w . ", " . # w w w w w K K K K K K K K Q u D D D D D D w w w w . ", " . # w w w w w R S K K K K t T Q u D D D D D D w w w w . ", " . # w w w w w U V K K K K W X Q u D D D D D Y w w w w . ", " . # w w w w w w Z ` .K K ..X Q u D D D Y +.@.w w w w . ", " . # w w w w w #.V $.K K K ..X Q u D Y +.@.%.w w w w w . ", " . # &.*.*.*.*.*.=.-.;.K K ..M >.,.'.).!.*.*.*.*.*.*.&.. ", " . # ~.{.{.{.{.{.{.{.].^./.(._.v :.<.{.{.{.{.{.{.{.{.~.. ", " . # [.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.[.. ", " . # |.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.|.. ", " . # 2.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.2.. ", " . # 4.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.4.. ", " + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ . ", " . 6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.7. ", " ", " "}; /* XPM */ static char * go_xpm[] = { "32 32 241 2", " c None", ". c #CED6CE", "+ c #1D541D", "@ c #0E490E", "# c #93AA93", "$ c #B0C0B0", "% c #003F00", "& c #3CDA40", "* c #005400", "= c #2C5F2C", "- c #F9FEF9", "; c #ECFDEC", "> c #13BF15", ", c #497449", "' c #F1FDF2", ") c #F8FEF8", "! c #F6FEF7", "~ c #BDF6C0", "{ c #019302", "] c #759575", "^ c #DDE0DD", "/ c #E9FCEA", "( c #F3FEF4", "_ c #EEFDEE", ": c #68E86D", "< c #006A00", "[ c #DAFADB", "} c #CFF9D0", "| c #DDFBDE", "1 c #004F00", "2 c #3A6A3A", "3 c #C8F8CA", "4 c #D7FAD9", "5 c #ABF3AF", "6 c #C2F7C3", "7 c #E2FBE3", "8 c #04A306", "9 c #587F58", "0 c #BBF6BC", "a c #8EEF92", "b c #AFF4B2", "c c #D5F9D6", "d c #54E257", "e c #008600", "f c #A3F2A6", "g c #71E975", "h c #6ADC6D", "i c #4FA251", "j c #64CF67", "k c #6FE673", "l c #8BE08F", "m c #B6F5B9", "n c #22CC25", "o c #005E00", "p c #A2B5A2", "q c #93EF97", "r c #52D655", "s c #46AA47", "t c #39813A", "u c #326632", "v c #4CC14E", "w c #52D555", "x c #4FCC52", "y c #3B853C", "z c #44A446", "A c #73DA77", "B c #79EB7D", "C c #07AB08", "D c #004C00", "E c #BFCBBF", "F c #6ACA6D", "G c #3B873C", "H c #336633", "I c #358036", "J c #347834", "K c #378C37", "L c #336C34", "M c #326532", "N c #357C35", "O c #3CA23E", "P c #6CD86F", "Q c #44DD47", "R c #019201", "S c #678A67", "T c #64E76A", "U c #5DC15E", "V c #5C8F5C", "W c #4C7F4C", "X c #396C39", "Y c #316532", "Z c #336732", "` c #5FA832", " . c #42CD36", ".. c #8AEE8E", "+. c #18C41B", "@. c #006300", "#. c #84A084", "$. c #53E055", "%. c #42A643", "&. c #598C59", "*. c #659865", "=. c #346734", "-. c #356833", ";. c #619433", ">. c #91C433", ",. c #C4F733", "'. c #4CD827", "). c #2CD22F", "!. c #61E666", "~. c #04A506", "{. c #004600", "]. c #49974A", "^. c #387038", "/. c #366936", "(. c #477A47", "_. c #578A57", ":. c #3F723F", "<. c #CCFF33", "[. c #4AB726", "}. c #1AB71D", "|. c #29D12D", "1. c #5AE45E", "2. c #25CF28", "3. c #3A6D3A", "4. c #4D8033", "5. c #B8EB33", "6. c #598E31", "7. c #569E2D", "8. c #17C319", "9. c #2DD330", "0. c #47DE4A", "a. c #10BC13", "b. c #007500", "c. c #669966", "d. c #3C6F3C", "e. c #4F8234", "f. c #BFF233", "g. c #A7DA33", "h. c #BCC0BC", "i. c #588B58", "j. c #629562", "k. c #6B9E50", "l. c #C2F536", "m. c #029903", "n. c #235723", "o. c #BCBFBC", "p. c #669965", "q. c #77AA5C", "r. c #C3F637", "s. c #005A00", "t. c #0B450B", "u. c #758C75", "v. c #D1D2D1", "w. c #629E62", "x. c #58A058", "y. c #8BBE53", "z. c #85B856", "A. c #19C61C", "B. c #0DB810", "C. c #527452", "D. c #B0B6B0", "E. c #C7CAC7", "F. c #E5E5E5", "G. c #53D456", "H. c #3BB63D", "I. c #AFE241", "J. c #9FD249", "K. c #C2FC31", "L. c #20CB23", "M. c #019502", "N. c #2F5B2F", "O. c #A4ADA4", "P. c #C2C5C2", "Q. c #DFE0DF", "R. c #5EE563", "S. c #2FCE32", "T. c #52AA53", "U. c #649A64", "V. c #B2E53F", "W. c #8CED30", "X. c #59DF2F", "Y. c #05A606", "Z. c #004900", "`. c #174E17", " + c #8D9C8D", ".+ c #BFC2BF", "++ c #D3D5D3", "@+ c #EBEBEB", "#+ c #6CE370", "$+ c #47BE4A", "%+ c #629A62", "&+ c #C2FC32", "*+ c #8FEF33", "=+ c #5FE235", "-+ c #14BE14", ";+ c #006D00", ">+ c #698469", ",+ c #CED0CE", "'+ c #E8E8E8", ")+ c #44D546", "!+ c #51BF52", "~+ c #5CA85D", "{+ c #A6D945", "]+ c #77AB5A", "^+ c #BAF337", "/+ c #94F138", "(+ c #69E63D", "_+ c #2AD02A", ":+ c #008C01", "<+ c #466D46", "[+ c #E2E3E2", "}+ c #86ED8A", "|+ c #50E154", "1+ c #52DA55", "2+ c #59BF5B", "3+ c #61A462", "4+ c #ABE23F", "5+ c #9DF13E", "6+ c #66D154", "7+ c #6EE64B", "8+ c #44DC43", "9+ c #98A498", "0+ c #DDDEDD", "a+ c #819481", "b+ c #75EA79", "c+ c #2FD533", "d+ c #008000", "e+ c #5E7C5E", "f+ c #029B03", "g+ c #A0F1A3", "h+ c #0CB60E", "i+ c #D9DAD9", "j+ c #B3F4B5", "k+ c #34D738", "l+ c #008E01", "m+ c #CACCCA", "n+ c #3A643A", "o+ c #C5C7C5", "p+ c #BCC7BC", "q+ c #9BA79B", "r+ c #D6D8D6", " . + @ # ", " $ % & * = $ ", " $ % - ; > % , . ", " $ % ' ) ! ~ { % ] ^ ", " $ % / ( ( ( _ : < + # ", " $ % [ ; } [ / ; | > 1 2 $ ", " $ % 3 4 5 5 5 6 | 7 5 8 % 9 . ", " $ % 0 3 a a a a a b c } d e @ ] ", " $ % f f g g h i j g k l 3 m n o + p ", " $ % q q r s t u v w x y z A ~ B C D 2 E ", " $ % B F G u H H I J K L M N O P f Q R % S ^ ", " $ % T U V W X H H H Y H H H Z ` .: ..+.@.@ #. ", " $ % $.%.&.*.V W =.H H H -.;.>.,.'.n ).!.T ~.{.+ $ ", " $ % ].^./.(._.*.:.H H ;.>.,.<.<.[.}.+.+.|.1.2.R % 2 . ", " $ % *.V W X /.(.3.H 4.5.<.<.<.<.6.7.8.8.8.8.9.0.a.b.% ] ", " $ % c.c.*.V W X H d.e.f.<.<.<.<.g.,.8.8.8.8.8.8.n 8.~.% h. ", " $ % c.c.c.c.*.V i.j.k.l.<.<.<.<.<.<.8.8.8.8.8.8.8.m.{.n.o. ", " $ % c.c.c.c.c.c.c.p.q.r.<.<.<.<.<.<.8.8.8.8.8.C s.t.u.o.v. ", " $ % w.x.c.c.c.c.y.z.q.r.<.<.<.<.<.<.A.A.A.B.b.% C.D.E.F. ", " $ % G.H.c.c.c.c.I.J.q.r.<.<.<.<.<.K.L.+.M.% N.O.P.Q. ", " $ % R.S.T.U.c.c.V.J.q.r.<.<.<.K.W.X.Y.Z.`. +.+++@+ ", " $ % #+$+%+c.c.c.V.J.q.r.<.&+*+=+-+;+t.>+o.,+'+ ", " $ % B )+!+~+c.c.V.{+]+^+/+(+_+:+% <+D.E.[+@+ ", " $ % }+|+|+1+2+3+4+5+6+7+8+~.{.N.9+P.0+ ", " $ % q !.!.!.!.!.!.!.!.> * `.a+.+++'+ ", " $ % b+b+b+b+b+b+b+c+d+t.e+o.,+F. ", " $ % ..........T f+% <+O.E.Q.@+ ", " $ % g+g+g+q h+{.N. +.+i+ ", " $ % j+j+k+s.`.u.o.++'+ ", " $ % : l+% e+D.m+F.@+ ", " E % % n+O.o+Q. ", " p+q+.+r+@+ "}; /* XPM */ static char * togglebookmark_xpm[] = { "32 32 343 2", " c None", ". c #E3BA8F", "+ c #E4B28A", "@ c #FBDF6F", "# c #E3A97A", "$ c #E1AD78", "% c #FFFF99", "& c #E0A86D", "* c #E7C4AB", "= c #F8BE56", "- c #F1B96E", "; c #E0A364", "> c #F3A846", ", c #F5C775", "' c #E5A77B", ") c #DF8A41", "! c #FFF48C", "~ c #FFFC95", "{ c #F2C176", "] c #DF9C59", "^ c #E2B07F", "/ c #F3B85A", "( c #E29D63", "_ c #DECCC0", ": c #F5AF49", "< c #F5B349", "[ c #E88326", "} c #E89242", "| c #F2C172", "1 c #F3B55A", "2 c #DFCDC2", "3 c #C6B2A5", "4 c #F4B34F", "5 c #FFFD95", "6 c #FACE5C", "7 c #F3B75A", "8 c #C2AA9C", "9 c #E9C5AD", "0 c #E1B294", "a c #CCB5A7", "b c #C87847", "c c #F5B249", "d c #D5A384", "e c #D6C7BD", "f c #E9E3DF", "g c #EAD3C4", "h c #EAE4E0", "i c #E6AB7D", "j c #F8C762", "k c #F8CB66", "l c #F8CC66", "m c #F8CD66", "n c #FFF489", "o c #FFFFC8", "p c #F4D387", "q c #F0DEB6", "r c #EFE0C0", "s c #EFDDB9", "t c #E9D2C0", "u c #E4AA77", "v c #FFFB95", "w c #E6BB96", "x c #85C685", "y c #059C07", "z c #0E9F0E", "A c #C1D4C1", "B c #E0C7B6", "C c #E6C2A2", "D c #DE9B5E", "E c #D19E70", "F c #D39257", "G c #F0942C", "H c #FFF285", "I c #D28E51", "J c #D2A174", "K c #E2B68D", "L c #E7C6A9", "M c #E7E0DB", "N c #40AA40", "O c #0CA50F", "P c #4FD439", "Q c #1BB51A", "R c #475F47", "S c #CD8E5A", "T c #FDE97F", "U c #FFF485", "V c #CC8A53", "W c #99CA9B", "X c #0C9612", "Y c #29B824", "Z c #8FEE54", "` c #5BDC3F", " . c #06850B", ".. c #5C645C", "+. c #DDD8D4", "@. c #E49A5D", "#. c #FDE87F", "$. c #FDEA7F", "%. c #F0962C", "&. c #E5A26C", "*. c #E0DBD8", "=. c #45A64B", "-. c #089B13", ";. c #58D23C", ">. c #BCFE64", ",. c #65DE42", "'. c #03890E", "). c #415141", "!. c #D1D1D1", "~. c #E8CDB7", "{. c #FDE47C", "]. c #E6AD7B", "^. c #E4B98F", "/. c #E1A061", "(. c #E6AF80", "_. c #E6AA7B", ":. c #A4CBA7", "<. c #118F1E", "[. c #23B025", "}. c #8CEA52", "|. c #D5FF6B", "1. c #67DE44", "2. c #048A13", "3. c #394B39", "4. c #D4D4D4", "5. c #E29E65", "6. c #FFF78F", "7. c #FDE67C", "8. c #D48B4F", "9. c #E1E6E1", "0. c #DEBB98", "a. c #D9A876", "b. c #D9A072", "c. c #E0924F", "d. c #50A359", "e. c #0B921A", "f. c #4DC93A", "g. c #B4F95F", "h. c #D7FF6A", "i. c #68DD45", "j. c #088B18", "k. c #324835", "l. c #D0D0D0", "m. c #D5BAA8", "n. c #DA975D", "o. c #CBA282", "p. c #3C9946", "q. c #148F23", "r. c #9B8446", "s. c #C59A6D", "t. c #B87441", "u. c #D88C4B", "v. c #D3B4A0", "w. c #ACCDB1", "x. c #1A892A", "y. c #21A628", "z. c #7DE14D", "A. c #C7FD66", "B. c #CCFF64", "C. c #69DB47", "D. c #0C8B1E", "E. c #2D4531", "F. c #CACACA", "G. c #148924", "H. c #48C93D", "I. c #A98221", "J. c #E0B181", "K. c #5CA268", "L. c #0F8922", "M. c #46BF39", "N. c #A5F05F", "O. c #CAFB6F", "P. c #C3FA64", "Q. c #6CDA48", "R. c #108C24", "S. c #29422E", "T. c #C5C5C5", "U. c #218336", "V. c #4CBC3E", "W. c #88C63E", "X. c #8F8A24", "Y. c #486345", "Z. c #B7CFBC", "`. c #228337", " + c #209B2C", ".+ c #72D74B", "++ c #BEF771", "@+ c #C6F777", "#+ c #BEF767", "$+ c #6ED949", "%+ c #148C2A", "&+ c #25412B", "*+ c #C0C0C0", "=+ c #9BBEA3", "-+ c #1A8B2D", ";+ c #98E85E", ">+ c #87E15D", ",+ c #1B982E", "'+ c #3C6247", ")+ c #67A175", "!+ c #13802C", "~+ c #3FB539", "{+ c #9AE961", "]+ c #C7F680", "^+ c #C0F37D", "/+ c #BBF46A", "(+ c #70D74A", "_+ c #188C2F", ":+ c #213F29", "<+ c #BABABA", "[+ c #287E41", "}+ c #4EBA43", "|+ c #D7FC9E", "1+ c #80DC5D", "2+ c #1D9532", "3+ c #3C5D47", "4+ c #C3D2C7", "5+ c #2C7F45", "6+ c #209132", "7+ c #67CE49", "8+ c #B7F277", "9+ c #C6F48A", "0+ c #BBF07F", "a+ c #B8F26D", "b+ c #71D64B", "c+ c #1C8C34", "d+ c #1F3E29", "e+ c #B4B4B4", "f+ c #91B49D", "g+ c #1E8932", "h+ c #9DE574", "i+ c #E1FCB7", "j+ c #79D856", "k+ c #1F8D34", "l+ c #2A6040", "m+ c #197635", "n+ c #3AAA3A", "o+ c #8FE25F", "p+ c #C4F38A", "q+ c #C1F08D", "r+ c #B8EE81", "s+ c #B5F070", "t+ c #72D54C", "u+ c #1F8C39", "v+ c #1D3D29", "w+ c #ACACAC", "x+ c #237241", "y+ c #51BA42", "z+ c #CEF6A4", "A+ c #D2F6A7", "B+ c #76D253", "C+ c #279B38", "D+ c #5BC147", "E+ c #ADEC76", "F+ c #C5F194", "G+ c #BAED8B", "H+ c #B5EC80", "I+ c #B1ED71", "J+ c #73D44C", "K+ c #238C3E", "L+ c #1C3C2A", "M+ c #A6A6A6", "N+ c #7CA18E", "O+ c #26893B", "P+ c #95E269", "Q+ c #CFF3AC", "R+ c #BFEE94", "S+ c #9AE469", "T+ c #B7ED86", "U+ c #BEEE93", "V+ c #B4EA86", "W+ c #B0EA7F", "X+ c #ADEB71", "Y+ c #72D34C", "Z+ c #268B42", "`+ c #1A3B2C", " @ c #A0A0A0", ".@ c #226A47", "+@ c #56BB46", "@@ c #B8EE89", "#@ c #BBEB95", "$@ c #BBEC92", "%@ c #B4E98A", "&@ c #ADE881", "*@ c #AAE77B", "=@ c #A7E86E", "-@ c #72D24B", ";@ c #2A8B47", ">@ c #1B3B2E", ",@ c #989898", "'@ c #6B8E83", ")@ c #2D8942", "!@ c #8DDE5F", "~@ c #B0E886", "{@ c #A9E57E", "]@ c #A5E479", "^@ c #A2E375", "/@ c #A0E56A", "(@ c #70D04A", "_@ c #2D8A4A", ":@ c #1B3A32", "<@ c #919191", "[@ c #25644E", "}@ c #57BB46", "|@ c #9FE46E", "1@ c #9CE071", "2@ c #99DF6C", "3@ c #97E163", "4@ c #6ECF48", "5@ c #308A4D", "6@ c #1B3A36", "7@ c #8A8A8A", "8@ c #5C7C7C", "9@ c #338949", "0@ c #7DD84F", "a@ c #90DC63", "b@ c #8CDC5A", "c@ c #6ACD44", "d@ c #328A50", "e@ c #1E3A3B", "f@ c #838384", "g@ c #CAD0D2", "h@ c #296056", "i@ c #55BA42", "j@ c #82DB4B", "k@ c #65CB40", "l@ c #358953", "m@ c #1F3A3F", "n@ c #7B7B7C", "o@ c #516B79", "p@ c #398D4C", "q@ c #5BCA37", "r@ c #388A55", "s@ c #223A46", "t@ c #747474", "u@ c #BDC3C9", "v@ c #336161", "w@ c #37805C", "x@ c #263A4A", "y@ c #6D6D6F", "z@ c #747880", "A@ c #2D3445", "B@ c #656567", " . ", " + @ # ", " $ % & ", " * = - ; % & > , ' ", " ) ! ~ { ] % ^ / ~ ! ( ", " _ : ~ ~ < [ % } | ~ ~ 1 2 ", " 3 4 ~ 5 6 % 6 5 ~ 7 8 ", " 9 0 a b c ~ 5 % 5 ~ c d e f g h ", "i j k k l m n % o % n m p q r s t ", "u v % % % % % o o o % % % % % v w x y z A ", "B C D E F G H % o % H G I J K L M N O P Q R ", " S T % U % U % T V W X Y Z ` ...", " +.@.#.% $.%.% %.$.% #.&.*. =.-.;.>.,.'.).!.", " ~.{.% T ].^.% /.(.T % {._. :.<.[.}.|.1.2.3.4. ", " 5.6.7.8.9.0.% a. b.7.6.c. d.e.f.g.h.i.j.k.l. ", " m.n.o.p.q.r.% s. t.u.v. w.x.y.z.A.B.C.D.E.F. ", " G.H.I.5 J. K.L.M.N.O.P.Q.R.S.T. ", " U.V.W.X.Y. Z.`. +.+++@+#+$+%+&+*+ ", " =+-+;+>+,+'+ )+!+~+{+]+^+/+(+_+:+<+ ", " [+}+|+1+2+3+ 4+5+6+7+8+9+0+a+b+c+d+e+ ", " f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+ ", " x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+ ", " N+O+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @ ", " .@+@@@#@$@%@&@*@=@-@;@>@,@ ", " '@)@!@~@{@]@^@/@(@_@:@<@ ", " [@}@|@1@2@3@4@5@6@7@ ", " 8@9@0@a@b@c@d@e@f@ ", " g@h@i@j@k@l@m@n@ ", " o@p@q@r@s@t@ ", " u@v@w@x@y@ ", " z@A@B@ ", " "}; /* XPM */ static char * nextbookmark_xpm[] = { "32 32 403 2", " c None", ". c #E1E7E1", "+ c #98CC98", "@ c #62BC62", "# c #BAD0BA", "$ c #D8E1D8", "% c #6DBE6D", "& c #44C132", "* c #26B11E", "= c #639963", "- c #A2CFA5", "; c #45B442", "> c #57CA36", ", c #5ACF39", "' c #2B9723", ") c #7E967E", "! c #D3DED3", "~ c #65B36C", "{ c #45B837", "] c #79D745", "^ c #7BDB48", "/ c #369929", "( c #648B67", "_ c #E1E1E1", ": c #C7DACA", "< c #72B77B", "[ c #9CC5A1", "} c #A9CCAD", "| c #4FAD50", "1 c #57C13C", "2 c #93E550", "3 c #86DE4D", "4 c #389B2C", "5 c #5F8B64", "6 c #D4D4D4", "7 c #80B989", "8 c #289F2D", "9 c #3EA23A", "0 c #86A78B", "a c #DDE3DD", "b c #78B582", "c c #44AD40", "d c #6FCE49", "e c #ADF060", "f c #8BDD51", "g c #37942F", "h c #5A825F", "i c #DBDBDB", "j c #ABCAB2", "k c #3EA63E", "l c #61C746", "m c #43A040", "n c #84A78B", "o c #ACC8B4", "p c #4FA358", "q c #53B644", "r c #8FDB5E", "s c #B2EF6B", "t c #89DB55", "u c #3B9634", "v c #57845F", "w c #D0D1D0", "x c #61A66B", "y c #73C55A", "z c #89D56B", "A c #449741", "B c #7A9E85", "C c #7AAB87", "D c #45A148", "E c #6AC352", "F c #A7E772", "G c #BBF078", "H c #88D75A", "I c #3C9135", "J c #507959", "K c #5576B6", "L c #0E3E9E", "M c #1443A1", "N c #1343A1", "O c #0F3F9F", "P c #215A8E", "Q c #3B9742", "R c #4CA747", "S c #87D365", "T c #B1EA7F", "U c #B3EC7B", "V c #86D55D", "W c #3E933D", "X c #517B5C", "Y c #C7C8C7", "Z c #264CA4", "` c #A7B6D8", " . c #E0E4EC", ".. c #D7DBE7", "+. c #D5DAE6", "@. c #D5D9E5", "#. c #D4D8E4", "$. c #D2D7E3", "%. c #D6DAE5", "&. c #B7C2DB", "*. c #124399", "=. c #8CD075", "-. c #9DE075", ";. c #B5EA86", ">. c #AFE97C", ",. c #85D25F", "'. c #3D8C3B", "). c #497157", "!. c #CCCCCC", "~. c #2A4DA5", "{. c #BAC5DF", "]. c #F1EDEF", "^. c #E1E0E8", "/. c #DEDDE6", "(. c #DCDBE5", "_. c #DAD9E3", ":. c #D8D7E2", "<. c #D6D6E0", "[. c #DDDBE2", "}. c #C9CFE0", "|. c #134396", "1. c #A5DC87", "2. c #ABE680", "3. c #A4E474", "4. c #80D05C", "5. c #418E43", "6. c #4C725B", "7. c #C0C3C1", "8. c #2A4BA5", "9. c #B7C2DE", "0. c #F7F2F1", "a. c #81A2D6", "b. c #346DC3", "c. c #396EC0", "d. c #3568BB", "e. c #295DB5", "f. c #597DBF", "g. c #E1DEE4", "h. c #C7CDE0", "i. c #0E3D93", "j. c #90D470", "k. c #98DF6A", "l. c #7ACC5A", "m. c #418A43", "n. c #456957", "o. c #C1C1C1", "p. c #2A48A4", "q. c #B8C2DE", "r. c #FBF5F2", "s. c #7099D5", "t. c #135BC1", "u. c #1A5CBD", "v. c #1555B8", "w. c #0748B0", "x. c #416EBC", "y. c #E4E1E6", "z. c #C8CEE0", "A. c #0B3791", "B. c #71C556", "C. c #71C94F", "D. c #428B47", "E. c #486B5C", "F. c #B8BCBC", "G. c #2A46A4", "H. c #B8C2DF", "I. c #FDF7F4", "J. c #77A0DA", "K. c #1E66C8", "L. c #2466C4", "M. c #2060BF", "N. c #1353B7", "O. c #4A77C1", "P. c #E6E3E7", "Q. c #C9CEE1", "R. c #0B3494", "S. c #499E4C", "T. c #3F8845", "U. c #42615A", "V. c #B8B8B8", "W. c #2B44A4", "X. c #B9C2DF", "Y. c #FEF9F5", "Z. c #7AA5DD", "`. c #236DCD", " + c #296DC9", ".+ c #175ABD", "++ c #4E7CC5", "@+ c #E8E4E8", "#+ c #C9CEE2", "$+ c #113498", "%+ c #366356", "&+ c #46625C", "*+ c #B1B3B5", "=+ c #DBDDE5", "-+ c #DADCE4", ";+ c #273CA0", ">+ c #B9C1DF", ",+ c #FFFBF6", "'+ c #7EA9E1", ")+ c #2873D3", "!+ c #2E73CF", "~+ c #1C61C2", "{+ c #5281CA", "]+ c #EAE7EA", "^+ c #CACFE2", "/+ c #15349C", "(+ c #979AAE", "_+ c #B5B7BF", ":+ c #5065B1", "<+ c #1E3AA0", "[+ c #19369E", "}+ c #19359E", "|+ c #0B2496", "1+ c #BDC5E1", "2+ c #FFFCF7", "3+ c #81AEE5", "4+ c #2C7AD8", "5+ c #3279D4", "6+ c #2067C8", "7+ c #5587CE", "8+ c #EBE8EB", "9+ c #CDD2E4", "0+ c #102D9B", "a+ c #19339D", "b+ c #1A369F", "c+ c #1A379F", "d+ c #1D399F", "e+ c #425AAD", "f+ c #25349D", "g+ c #6577BE", "h+ c #E5E8F4", "i+ c #DDE0EF", "j+ c #DBDFEE", "k+ c #DBDDED", "l+ c #F0F0F5", "m+ c #FAF6F5", "n+ c #85B3E9", "o+ c #3180DE", "p+ c #3680D9", "q+ c #256ECD", "r+ c #598CD2", "s+ c #E8E6EA", "t+ c #E8E8EE", "u+ c #D2D5E5", "v+ c #D0D3E4", "w+ c #CED2E3", "x+ c #CCD0E2", "y+ c #DDE0E9", "z+ c #7F8DC5", "A+ c #172998", "B+ c #B8BDD7", "C+ c #15299A", "D+ c #D7DBEE", "E+ c #FFFFFF", "F+ c #FEFDFC", "G+ c #FAFAFB", "H+ c #FCFBFA", "I+ c #F5F4F6", "J+ c #FCF6F5", "K+ c #89B8EC", "L+ c #3587E3", "M+ c #3B86DF", "N+ c #2A74D3", "O+ c #5E91D7", "P+ c #EAE7EB", "Q+ c #E4E3E9", "R+ c #E7E5EA", "S+ c #E0E0E7", "T+ c #DFDFE6", "U+ c #E5E4E8", "V+ c #DEE0E9", "W+ c #1D329E", "X+ c #A0A6CE", "Y+ c #7A80BE", "Z+ c #384AAA", "`+ c #FAFBFD", " @ c #FEFEFC", ".@ c #B6D9FC", "+@ c #6DB6FD", "@@ c #73B6F9", "#@ c #71B1F4", "$@ c #56A0EF", "%@ c #4291E9", "&@ c #408CE4", "*@ c #357FD9", "=@ c #3C7FD5", "-@ c #548BD5", ";@ c #5086D1", ">@ c #4079CA", ",@ c #7B9DD3", "'@ c #E2E0E7", ")@ c #F3F2F1", "!@ c #5464B5", "~@ c #585FB0", "{@ c #E6E6E9", "]@ c #32379F", "^@ c #7F8AC8", "/@ c #EFF6FC", "(@ c #6DB7FF", "_@ c #48A5FE", ":@ c #4BA2F9", "<@ c #4A9EF3", "[@ c #4999EE", "}@ c #4493E9", "|@ c #2B75D3", "1@ c #206BCD", "2@ c #3071CB", "3@ c #C6CFE3", "4@ c #F9F6F2", "5@ c #9AA3D1", "6@ c #1B2498", "7@ c #D9DBE4", "8@ c #C3C5DB", "9@ c #0D1893", "0@ c #C1C5E4", "a@ c #DDECFC", "b@ c #5BAFFF", "c@ c #52AAFE", "d@ c #52A6F9", "e@ c #4D9FF4", "f@ c #4899EE", "g@ c #347FD9", "h@ c #2D76D3", "i@ c #AFC3E3", "j@ c #F9F4F1", "k@ c #D2D4E7", "l@ c #111E97", "m@ c #A9ADD1", "n@ c #8D8FC5", "o@ c #212C9E", "p@ c #EBECF6", "q@ c #C0DEFD", "r@ c #50AAFF", "s@ c #54ABFE", "t@ c #3F8CE4", "u@ c #307FDE", "v@ c #91B5E4", "w@ c #F6F1F0", "x@ c #F2F2F4", "y@ c #3945A8", "z@ c #6C6EB7", "A@ c #5555AC", "B@ c #4D55B2", "C@ c #FFFFFD", "D@ c #A6D3FD", "E@ c #4CA8FF", "F@ c #55ACFE", "G@ c #388CE8", "H@ c #7DAEE9", "I@ c #F1EEF1", "J@ c #FFFFF9", "K@ c #6A72BD", "L@ c #3A3AA1", "M@ c #DFE0E6", "N@ c #2E2E9C", "O@ c #787DC4", "P@ c #98CCFE", "Q@ c #419AF4", "R@ c #76B1F0", "S@ c #EEEEF2", "T@ c #FFFFFC", "U@ c #9499CF", "V@ c #181995", "W@ c #D0D1E0", "X@ c #CACBDE", "Y@ c #171793", "Z@ c #9599D1", "`@ c #FEFEFD", " # c #9ACDFE", ".# c #49A6FE", "+# c #81BDF8", "@# c #EFF0F5", "## c #B0B3DB", "$# c #0D1091", "%# c #B4B5D5", "&# c #B6B6D5", "*# c #0D0F90", "=# c #9EA0D5", "-# c #B4D9FD", ";# c #A7D2FD", "># c #F8F8F9", ",# c #B9BADF", "'# c #0D0F91", ")# c #9D9DCB", "!# c #AFAFD2", "~# c #0D0E90", "{# c #8C8DCC", "]# c #A4A5D6", "^# c #9595C7", "/# c #BCBCD8", "(# c #2A2A99", "_# c #4B4BAE", ":# c #B5B5DE", "<# c #BDBDE1", "[# c #5D5DB6", "}# c #1C1C95", "|# c #A7A7CF", "1# c #DADAE4", "2# c #6666B2", "3# c #131391", "4# c #0D0D8F", "5# c #5555AB", "6# c #CDCDDF", " ", " . + @ # ", " $ % & * = ", " - ; > , ' ) ", " ! ~ { ] ^ / ( _ ", " : < [ } | 1 2 3 4 5 6 ", " 7 8 9 0 a b c d e f g h i ", " j k l m n o p q r s t u v w ", " x y z A B C D E F G H I J 6 ", " K L M N N N N N N M O P Q R S T U V W X Y ", " Z ` .....+.@.#.$.%.&.*.=.-.;.>.,.'.).!. ", " ~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7. ", " 8.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o. ", " p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F. ", " G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V. ", " W.X.Y.Z.`. +L..+++@+#+$+%+&+*+ ", " =+-+-+-+-+;+>+,+'+)+!+ +~+{+]+^+/+(+_+-+-+-+ ", ":+<+[+[+[+}+|+1+2+3+4+5+!+6+7+8+9+0+a+b+c+[+d+e+ ", "f+g+h+i+j+j+k+l+m+n+o+p+5+q+r+s+t+u+v+w+x+y+z+A+ ", "B+C+D+E+F+G+H+I+J+K+L+M+p+N+O+P+Q+R+S+T+U+V+W+X+ ", " Y+Z+`+ @.@+@@@#@$@%@&@M+*@=@-@;@>@,@'@)@!@~@ ", " {@]@^@E+/@(@_@:@<@[@}@&@M+*@|@1@2@3@4@5@6@7@ ", " 8@9@0@E+a@b@c@d@e@f@}@&@M+g@h@i@j@k@l@m@ ", " n@o@p@E+q@r@s@d@e@[@}@t@u@v@w@x@y@z@ ", " A@B@E+C@D@E@F@d@e@[@G@H@I@J@K@L@ ", " M@N@O@E+C@P@E@F@d@Q@R@S@T@U@V@W@ ", " X@Y@Z@E+`@ #E@.#+#@#C@##$#%# ", " &#*#=#E+C@-#;#>#E+,#'#)# ", " !#~#{#E+E+E+E+]#~#^# ", " /#(#_#:#<#[#}#|# ", " 1#2#3#4#5#6# ", " "}; /* XPM */ static char * previousbookmark_xpm[] = { "32 32 417 2", " c None", ". c #DADAE4", "+ c #6666B2", "@ c #131391", "# c #0D0D8F", "$ c #5555AB", "% c #CDCDDF", "& c #BCBCD8", "* c #2A2A99", "= c #4B4BAE", "- c #B5B5DE", "; c #BDBDE1", "> c #5D5DB6", ", c #1C1C95", "' c #A7A7CF", ") c #AFAFD2", "! c #0D0E90", "~ c #8C8DCC", "{ c #FFFFFF", "] c #A4A5D6", "^ c #9595C7", "/ c #B6B6D5", "( c #0D0F90", "_ c #9EA0D5", ": c #FFFFFD", "< c #B4D9FD", "[ c #A7D2FD", "} c #F8F8F9", "| c #B9BADF", "1 c #0D0F91", "2 c #9D9DCB", "3 c #CACBDE", "4 c #171793", "5 c #9599D1", "6 c #FEFEFD", "7 c #9ACDFE", "8 c #4CA8FF", "9 c #49A6FE", "0 c #81BDF8", "a c #EFF0F5", "b c #B0B3DB", "c c #0D1091", "d c #B4B5D5", "e c #DFE0E6", "f c #2E2E9C", "g c #787DC4", "h c #98CCFE", "i c #55ACFE", "j c #52A6F9", "k c #419AF4", "l c #76B1F0", "m c #EEEEF2", "n c #FFFFFC", "o c #9499CF", "p c #181995", "q c #D0D1E0", "r c #5555AC", "s c #4D55B2", "t c #A6D3FD", "u c #4D9FF4", "v c #4999EE", "w c #388CE8", "x c #7DAEE9", "y c #F1EEF1", "z c #FFFFF9", "A c #6A72BD", "B c #3A3AA1", "C c #E6E6E9", "D c #8D8FC5", "E c #212C9E", "F c #EBECF6", "G c #C0DEFD", "H c #50AAFF", "I c #54ABFE", "J c #4493E9", "K c #3F8CE4", "L c #307FDE", "M c #91B5E4", "N c #F6F1F0", "O c #F2F2F4", "P c #3945A8", "Q c #6C6EB7", "R c #C3C5DB", "S c #0D1893", "T c #C1C5E4", "U c #DDECFC", "V c #5BAFFF", "W c #52AAFE", "X c #4899EE", "Y c #408CE4", "Z c #3B86DF", "` c #347FD9", " . c #2D76D3", ".. c #AFC3E3", "+. c #F9F4F1", "@. c #D2D4E7", "#. c #111E97", "$. c #A9ADD1", "%. c #32379F", "&. c #7F8AC8", "*. c #EFF6FC", "=. c #6DB7FF", "-. c #48A5FE", ";. c #4BA2F9", ">. c #4A9EF3", ",. c #357FD9", "'. c #2B75D3", "). c #206BCD", "!. c #3071CB", "~. c #C6CFE3", "{. c #F9F6F2", "]. c #9AA3D1", "^. c #1B2498", "/. c #D9DBE4", "(. c #7A80BE", "_. c #384AAA", ":. c #FAFBFD", "<. c #FEFEFC", "[. c #B6D9FC", "}. c #6DB6FD", "|. c #73B6F9", "1. c #71B1F4", "2. c #56A0EF", "3. c #4291E9", "4. c #3C7FD5", "5. c #548BD5", "6. c #5086D1", "7. c #4079CA", "8. c #7B9DD3", "9. c #E2E0E7", "0. c #F3F2F1", "a. c #5464B5", "b. c #585FB0", "c. c #B8BDD7", "d. c #15299A", "e. c #D7DBEE", "f. c #FEFDFC", "g. c #FAFAFB", "h. c #FCFBFA", "i. c #F5F4F6", "j. c #FCF6F5", "k. c #89B8EC", "l. c #3587E3", "m. c #3680D9", "n. c #2A74D3", "o. c #5E91D7", "p. c #EAE7EB", "q. c #E4E3E9", "r. c #E7E5EA", "s. c #E0E0E7", "t. c #DFDFE6", "u. c #E5E4E8", "v. c #DEE0E9", "w. c #1D329E", "x. c #A0A6CE", "y. c #25349D", "z. c #6577BE", "A. c #E5E8F4", "B. c #DDE0EF", "C. c #DBDFEE", "D. c #DBDDED", "E. c #F0F0F5", "F. c #FAF6F5", "G. c #85B3E9", "H. c #3180DE", "I. c #3279D4", "J. c #256ECD", "K. c #598CD2", "L. c #E8E6EA", "M. c #E8E8EE", "N. c #D2D5E5", "O. c #D0D3E4", "P. c #CED2E3", "Q. c #CCD0E2", "R. c #DDE0E9", "S. c #7F8DC5", "T. c #172998", "U. c #5065B1", "V. c #1E3AA0", "W. c #19369E", "X. c #19359E", "Y. c #0B2496", "Z. c #BDC5E1", "`. c #FFFCF7", " + c #81AEE5", ".+ c #2C7AD8", "++ c #2E73CF", "@+ c #2067C8", "#+ c #5587CE", "$+ c #EBE8EB", "%+ c #CDD2E4", "&+ c #102D9B", "*+ c #19339D", "=+ c #1A369F", "-+ c #1A379F", ";+ c #1D399F", ">+ c #425AAD", ",+ c #DBDDE5", "'+ c #DADCE4", ")+ c #273CA0", "!+ c #B9C1DF", "~+ c #FFFBF6", "{+ c #7EA9E1", "]+ c #2873D3", "^+ c #296DC9", "/+ c #1C61C2", "(+ c #5281CA", "_+ c #EAE7EA", ":+ c #CACFE2", "<+ c #16359D", "[+ c #CDD1DF", "}+ c #2B44A4", "|+ c #B9C2DF", "1+ c #FEF9F5", "2+ c #7AA5DD", "3+ c #236DCD", "4+ c #2466C4", "5+ c #175ABD", "6+ c #4E7CC5", "7+ c #E8E4E8", "8+ c #C9CEE2", "9+ c #1A3B9F", "0+ c #E0E2E7", "a+ c #E1E7E1", "b+ c #98CC98", "c+ c #62BC62", "d+ c #BAD0BA", "e+ c #2A46A4", "f+ c #B8C2DF", "g+ c #FDF7F4", "h+ c #77A0DA", "i+ c #1E66C8", "j+ c #2060BF", "k+ c #1353B7", "l+ c #4A77C1", "m+ c #E6E3E7", "n+ c #C9CEE1", "o+ c #1A3DA0", "p+ c #DDDFE6", "q+ c #D8E1D8", "r+ c #6DBE6D", "s+ c #44C132", "t+ c #26B11E", "u+ c #639963", "v+ c #2A48A4", "w+ c #B8C2DE", "x+ c #FBF5F2", "y+ c #7099D5", "z+ c #135BC1", "A+ c #1A5CBD", "B+ c #1555B8", "C+ c #0748B0", "D+ c #416EBC", "E+ c #E4E1E6", "F+ c #C8CEE0", "G+ c #1A3FA0", "H+ c #E7E9E7", "I+ c #A2CFA5", "J+ c #45B442", "K+ c #57CA36", "L+ c #5ACF39", "M+ c #2B9723", "N+ c #7E967E", "O+ c #2A4BA5", "P+ c #B7C2DE", "Q+ c #F7F2F1", "R+ c #81A2D6", "S+ c #346DC3", "T+ c #396EC0", "U+ c #3568BB", "V+ c #295DB5", "W+ c #597DBF", "X+ c #E1DEE4", "Y+ c #C7CDE0", "Z+ c #1A42A1", "`+ c #D3DED3", " @ c #65B36C", ".@ c #45B837", "+@ c #79D745", "@@ c #7BDB48", "#@ c #369929", "$@ c #648B67", "%@ c #E1E1E1", "&@ c #2A4DA5", "*@ c #BAC5DF", "=@ c #F1EDEF", "-@ c #E1E0E8", ";@ c #DEDDE6", ">@ c #DCDBE5", ",@ c #DAD9E3", "'@ c #D8D7E2", ")@ c #D6D6E0", "!@ c #DDDBE2", "~@ c #C9CFE0", "{@ c #1A45A1", "]@ c #E5E7E5", "^@ c #A9CCAD", "/@ c #4FAD50", "(@ c #57C13C", "_@ c #93E550", ":@ c #86DE4D", "<@ c #389B2C", "[@ c #5F8B64", "}@ c #D4D4D4", "|@ c #264CA4", "1@ c #A7B6D8", "2@ c #E0E4EC", "3@ c #D7DBE7", "4@ c #D5DAE6", "5@ c #D5D9E5", "6@ c #D4D8E4", "7@ c #D2D7E3", "8@ c #D6DAE5", "9@ c #B7C2DB", "0@ c #1643A0", "a@ c #DCDFE5", "b@ c #DDE3DD", "c@ c #78B582", "d@ c #44AD40", "e@ c #6FCE49", "f@ c #ADF060", "g@ c #8BDD51", "h@ c #37942F", "i@ c #5A825F", "j@ c #DBDBDB", "k@ c #5576B6", "l@ c #0E3E9E", "m@ c #1443A1", "n@ c #1343A1", "o@ c #0F3F9F", "p@ c #204F95", "q@ c #DFE0E3", "r@ c #ACC8B4", "s@ c #4FA358", "t@ c #53B644", "u@ c #8FDB5E", "v@ c #B2EF6B", "w@ c #89DB55", "x@ c #3B9634", "y@ c #57845F", "z@ c #D0D1D0", "A@ c #61A66B", "B@ c #73C55A", "C@ c #89D56B", "D@ c #449741", "E@ c #7A9E85", "F@ c #7AAB87", "G@ c #45A148", "H@ c #6AC352", "I@ c #A7E772", "J@ c #BBF078", "K@ c #88D75A", "L@ c #3C9135", "M@ c #507959", "N@ c #A5C4AF", "O@ c #49A34B", "P@ c #A1E07E", "Q@ c #89D26F", "R@ c #3D9A40", "S@ c #4CA747", "T@ c #87D365", "U@ c #B1EA7F", "V@ c #B3EC7B", "W@ c #86D55D", "X@ c #3E933D", "Y@ c #517B5C", "Z@ c #C7C8C7", "`@ c #DADFDD", " # c #509562", ".# c #72C061", "+# c #BBEC91", "@# c #96DB73", "## c #9DE075", "$# c #B5EA86", "%# c #AFE97C", "&# c #85D25F", "*# c #3D8C3B", "=# c #497157", "-# c #CCCCCC", ";# c #99B4A7", "># c #4A9B4E", ",# c #9ADB76", "'# c #B0E786", ")# c #ABE680", "!# c #A4E474", "~# c #80D05C", "{# c #418E43", "]# c #4C725B", "^# c #C0C3C1", "/# c #DBDFDD", "(# c #559068", "_# c #69B957", ":# c #9ADF6E", "<# c #98DF6A", "[# c #7ACC5A", "}# c #418A43", "|# c #456957", "1# c #C1C1C1", "2# c #93AEA4", "3# c #47944E", "4# c #79CF52", "5# c #71C94F", "6# c #428B47", "7# c #486B5C", "8# c #B8BCBC", "9# c #CED4D6", "0# c #4D8267", "a# c #4EA648", "b# c #3F8845", "c# c #42615A", "d# c #B8B8B8", "e# c #8E9FA1", "f# c #396654", "g# c #46625C", "h# c #B1B3B5", "i# c #ADADB3", "j# c #C3C3C3", " ", " . + @ # $ % ", " & * = - ; > , ' ", " ) ! ~ { { { { ] ! ^ ", " / ( _ { : < [ } { | 1 2 ", " 3 4 5 { 6 7 8 9 0 a : b c d ", " e f g { : h 8 i j k l m n o p q ", " r s { : t 8 i j u v w x y z A B C ", " D E F { G H I j u v J K L M N O P Q ", " R S T { U V W j u X J Y Z ` ...+.@.#.$. ", " C %.&.{ *.=.-.;.>.v J Y Z ,.'.).!.~.{.].^./. ", " (._.:.<.[.}.|.1.2.3.Y Z ,.4.5.6.7.8.9.0.a.b. ", "c.d.e.{ f.g.h.i.j.k.l.Z m.n.o.p.q.r.s.t.u.v.w.x. ", "y.z.A.B.C.C.D.E.F.G.H.m.I.J.K.L.M.N.O.P.Q.R.S.T. ", "U.V.W.W.W.X.Y.Z.`. +.+I.++@+#+$+%+&+*+=+-+W.;+>+ ", " ,+'+'+'+'+)+!+~+{+]+++^+/+(+_+:+<+[+'+'+'+'+ ", " }+|+1+2+3+^+4+5+6+7+8+9+0+ a+b+c+d+", " e+f+g+h+i+4+j+k+l+m+n+o+p+ q+r+s+t+u+", " v+w+x+y+z+A+B+C+D+E+F+G+p+ H+I+J+K+L+M+N+", " O+P+Q+R+S+T+U+V+W+X+Y+Z+p+ `+ @.@+@@@#@$@%@", " &@*@=@-@;@>@,@'@)@!@~@{@p+ ]@^@/@(@_@:@<@[@}@ ", " |@1@2@3@3@4@5@6@7@8@9@0@a@ b@c@d@e@f@g@h@i@j@ ", " k@l@m@n@n@n@n@n@n@m@o@p@q@ r@s@t@u@v@w@x@y@z@ ", " A@B@C@D@E@F@G@H@I@J@K@L@M@}@ ", " N@O@P@Q@R@S@T@U@V@W@X@Y@Z@ ", " `@ #.#+#@###$#%#&#*#=#-# ", " ;#>#,#'#)#!#~#{#]#^# ", " /#(#_#:#<#[#}#|#1# ", " 2#3#4#5#6#7#8# ", " 9#0#a#b#c#d# ", " e#f#g#h# ", " %@i#j# "}; usr/src/sdlBasic/src/sdlBasic/gtk/SciTEGTK.cxx0000755000076500007660000036457210637411000016312 0ustar // SciTE - Scintilla based Text Editor // SciTEGTK.cxx - main code for the GTK+ version of the editor // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include #include #include #include #include "Platform.h" #include #include #include #include #include #include #include "SciTE.h" #include "PropSet.h" #include "Accessor.h" #include "KeyWords.h" #include "Scintilla.h" #include "ScintillaWidget.h" #include "Extender.h" #include "SciTEBase.h" #include "SciTEKeys.h" #ifndef NO_EXTENSIONS #include "MultiplexExtension.h" //#ifndef NO_LUA //#include "LuaExtension.h" //#endif //#ifndef NO_FILER //#include "DirectorExtension.h" //#endif #endif #include "pixmapsGNOME.h" #include "SciIcon.h" #if GTK_MAJOR_VERSION >= 2 #if !PLAT_GTK_WIN32 #define ENCODE_TRANSLATION #include // Since various versions of iconv can not agree on whether the src argument // is char ** or const char ** provide a templatised adaptor. template size_t iconv_adaptor(size_t(*f_iconv)(iconv_t, T, size_t *, char **, size_t *), iconv_t cd, char** src, size_t *srcleft, char **dst, size_t *dstleft) { return f_iconv(cd, (T)src, srcleft, dst, dstleft); } #endif #endif #if GTK_MAJOR_VERSION >= 2 && GTK_MINOR_VERSION >= 4 #define USE_FILE_CHOOSER #endif #define MB_ABOUTBOX 0x100000L const char appName[] = "sdlBasic"; #ifdef __vms char g_modulePath[MAX_PATH]; #endif static GtkWidget *PWidget(Window &w) { return reinterpret_cast(w.GetID()); } class Dialog : public Window { public: Dialog() : dialogCanceled(true) {} Dialog &operator=(WindowID id_) { id = id_; return *this; } bool ShowModal(GtkWidget *parent = 0) { GtkWidget * widgetThis = reinterpret_cast(GetID()); // Mark it as a modal transient dialog gtk_window_set_modal(GTK_WINDOW(widgetThis), TRUE); if (parent) { gtk_window_set_transient_for(GTK_WINDOW(widgetThis), GTK_WINDOW(parent)); } gtk_signal_connect(GTK_OBJECT(widgetThis), "key_press_event", GtkSignalFunc(SignalKey), this); gtk_signal_connect(GTK_OBJECT(widgetThis), "destroy", GtkSignalFunc(SignalDestroy), this); Show(); while (Created()) { gtk_main_iteration(); } return dialogCanceled; } void OK() { dialogCanceled = false; Destroy(); } void Cancel() { dialogCanceled = true; Destroy(); } static void SignalCancel(GtkWidget *, Dialog *d) { if (d) { d->Cancel(); } } private: bool dialogCanceled; static void SignalDestroy(GtkWidget *, Dialog *d) { if (d) { d->id = 0; } } static gint SignalKey(GtkWidget *w, GdkEventKey *event, Dialog *d) { if (event->keyval == GDK_Escape) { gtk_signal_emit_stop_by_name(GTK_OBJECT(w), "key_press_event"); d->Cancel(); } return FALSE; } }; // Field added to GTK+ 1.x ItemFactoryEntry for 2.x so have a struct that is the same as 1.x struct SciTEItemFactoryEntry { char *path; char *accelerator; GtkItemFactoryCallback callback; unsigned int callback_action; char *item_type; }; long SciTEKeys::ParseKeyCode(const char *mnemonic) { int modsInKey = 0; int keyval = -1; if (mnemonic && *mnemonic) { SString sKey = mnemonic; if (sKey.contains("Ctrl+")) { modsInKey |= GDK_CONTROL_MASK; sKey.remove("Ctrl+"); } if (sKey.contains("Shift+")) { modsInKey |= GDK_SHIFT_MASK; sKey.remove("Shift+"); } if (sKey.contains("Alt+")) { modsInKey |= GDK_MOD1_MASK; sKey.remove("Alt+"); } if (sKey.length() == 1) { if (modsInKey & GDK_CONTROL_MASK && !(modsInKey & GDK_SHIFT_MASK)) sKey.lowercase(); keyval = sKey[0]; } else if ((sKey.length() > 1)) { if ((sKey[0] == 'F') && (isdigit(sKey[1]))) { sKey.remove("F"); int fkeyNum = sKey.value(); if (fkeyNum >= 1 && fkeyNum <= 12) keyval = fkeyNum - 1 + GDK_F1; } else { if (sKey == "Left") { keyval = GDK_Left; } else if (sKey == "Right") { keyval = GDK_Right; } else if (sKey == "Up") { keyval = GDK_Up; } else if (sKey == "Down") { keyval = GDK_Down; } else if (sKey == "Insert") { keyval = GDK_Escape; } else if (sKey == "End") { keyval = GDK_End; } else if (sKey == "Home") { keyval = GDK_Home; } else if (sKey == "Enter") { keyval = GDK_Return; } else if (sKey == "Space") { keyval = GDK_space; } else if (sKey == "KeypadPlus") { keyval = GDK_KP_Add; } else if (sKey == "KeypadMinus") { keyval = GDK_KP_Subtract; } else if (sKey == "Escape") { keyval = GDK_Escape; } else if (sKey == "Delete") { keyval = GDK_Delete; } else if (sKey == "PageUp") { keyval = GDK_Page_Up; } else if (sKey == "PageDown") { keyval = GDK_Page_Down; } else if (sKey == "Slash") { keyval = GDK_slash; } else if (sKey == "Question") { keyval = GDK_question; } else if (sKey == "Equal") { keyval = GDK_equal; } } } } return (keyval > 0) ? (keyval | (modsInKey<<16)) : 0; } bool SciTEKeys::MatchKeyCode(long parsedKeyCode, int keyval, int modifiers) { return parsedKeyCode && !(0xFFFF0000 & (keyval | modifiers)) && (parsedKeyCode == (keyval | (modifiers<<16))); } class SciTEGTK : public SciTEBase { protected: Point ptOld; GdkGC *xor_gc; guint sbContextID; Window wToolBarBox; int toolbarDetachable; int menuSource; // Control of sub process int icmd; int originalEnd; int fdFIFO; int pidShell; bool triedKill; int exitStatus; guint pollID; char resultsFile[MAX_PATH]; int inputHandle; ElapsedTime commandTime; // Command Pipe variables int pipeFD; char pipeName[MAX_PATH]; enum FileFormat { sfSource, sfCopy, sfHTML, sfRTF, sfPDF, sfTEX, sfXML } saveFormat; Dialog dlgFileSelector; Dialog dlgFindInFiles; GtkWidget *comboFiles; Dialog dlgGoto; bool paramDialogCanceled; GtkWidget *wIncrementPanel; Dialog dlgFindIncrement; GtkWidget *IncSearchEntry; GtkWidget *gotoEntry; GtkWidget *toggleWord; GtkWidget *toggleCase; GtkWidget *toggleRegExp; GtkWidget *toggleWrap; GtkWidget *toggleUnSlash; GtkWidget *toggleReverse; GtkWidget *toggleRec; GtkWidget *comboFind; GtkWidget *comboFindInFiles; GtkWidget *comboDir; GtkWidget *comboReplace; GtkWidget *entryParam[maxParam]; GtkWidget *btnGo; GtkWidget *btnCompile; GtkWidget *btnBuild; GtkWidget *btnStop; GtkItemFactory *itemFactory; GtkAccelGroup *accelGroup; gint fileSelectorWidth; gint fileSelectorHeight; // Fullscreen handling GdkRectangle saved; GtkWidget *AddMBButton(GtkWidget *dialog, const char *label, int val, GtkAccelGroup *accel_group, bool isDefault = false); void SetWindowName(); void ShowFileInStatus(); void SetIcon(); virtual void ReadLocalisation(); virtual void ReadPropertiesInitial(); virtual void ReadProperties(); virtual void SizeContentWindows(); virtual void SizeSubWindows(); virtual void SetMenuItem(int menuNumber, int position, int itemID, const char *text, const char *mnemonic = 0); virtual void DestroyMenuItem(int menuNumber, int itemID); virtual void CheckAMenuItem(int wIDCheckItem, bool val); virtual void EnableAMenuItem(int wIDCheckItem, bool val); virtual void CheckMenus(); virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true); virtual void ExecuteNext(); virtual void OpenUriList(const char *list); virtual void AbsolutePath(char *absPath, const char *relativePath, int size); virtual bool OpenDialog(const char *filter); void HandleSaveAs(const char *savePath); bool SaveAsXXX(FileFormat fmt, const char *title); virtual bool SaveAsDialog(); virtual void SaveACopy(); virtual void SaveAsHTML(); virtual void SaveAsRTF(); virtual void SaveAsPDF(); virtual void SaveAsTEX(); virtual void SaveAsXML(); virtual void LoadSessionDialog(); virtual void SaveSessionDialog(); virtual void Print(bool); virtual void PrintSetup(); virtual SString GetRangeInUIEncoding(Window &wCurrent, int selStart, int selEnd); virtual int WindowMessageBox(Window &w, const SString &msg, int style); virtual void AboutDialog(); virtual void QuitProgram(); virtual SString EncodeString(const SString &s); void FindReplaceGrabFields(); void HandleFindReplace(); virtual void Find(); void TranslatedSetTitle(GtkWindow *w, const char *original); GtkWidget *TranslatedLabel(const char *original); GtkWidget *TranslatedCommand(const char *original, GtkAccelGroup *accel_group, GtkSignalFunc func, gpointer data, GdkModifierType accelMask=GDK_MOD1_MASK); GtkWidget *TranslatedToggle(const char *original, GtkAccelGroup *accel_group, bool active); virtual void FindIncrement(); virtual void FindInFiles(); virtual void Replace(); virtual void FindReplace(bool replace); virtual void DestroyFindReplace(); virtual void GoLineDialog(); virtual bool AbbrevDialog(); virtual void TabSizeDialog(); virtual bool ParametersDialog(bool modal); virtual void GetDefaultDirectory(char *directory, size_t size); virtual bool GetSciteDefaultHome(char *path, unsigned int lenPath); virtual bool GetSciteUserHome(char *path, unsigned int lenPath); virtual void SetStatusBarText(const char *s); virtual void SetFileProperties(PropSet &ps); virtual void UpdateStatusBar(bool bUpdateSlowData); virtual void Notify(SCNotification *notification); virtual void ShowToolBar(); virtual void ShowTabBar(); virtual void ShowStatusBar(); void Command(unsigned long wParam, long lParam = 0); void ContinueExecute(int fromPoll); static void ReadPipe(gpointer data, gint source, GdkInputCondition condition); void SendFileName(int sendPipe, const char* filename); void CheckForRunningInstance(int argc, char* argv[]); // GTK+ Signal Handlers static void OpenCancelSignal(GtkWidget *w, SciTEGTK *scitew); static gint OpenKeySignal(GtkWidget *w, GdkEventKey *event, SciTEGTK *scitew); static void OpenOKSignal(GtkWidget *w, SciTEGTK *scitew); static void OpenSessionOKSignal(GtkWidget *w, SciTEGTK *scitew); static void SaveSessionOKSignal(GtkWidget *w, SciTEGTK *scitew); static void OpenResizeSignal(GtkWidget *w, GtkAllocation *allocation, SciTEGTK *scitew); static void SaveAsSignal(GtkWidget *w, SciTEGTK *scitew); static void FindInFilesSignal(GtkWidget *w, SciTEGTK *scitew); static void GotoSignal(GtkWidget *w, SciTEGTK *scitew); static void FindIncrementSignal(GtkWidget *, SciTEGTK *scitew); static void FindIncrementCompleteSignal(GtkWidget *, SciTEGTK *scitew); static void FindIncrementEscapeSignal(GtkWidget *w, GdkEventKey *event, SciTEGTK *scitew); static void FRCancelSignal(GtkWidget *w, SciTEGTK *scitew); static gint FRKeySignal(GtkWidget *w, GdkEventKey *event, SciTEGTK *scitew); static void FRFindSignal(GtkWidget *w, SciTEGTK *scitew); static void FRReplaceSignal(GtkWidget *w, SciTEGTK *scitew); static void FRReplaceAllSignal(GtkWidget *w, SciTEGTK *scitew); static void FRReplaceInSelectionSignal(GtkWidget *w, SciTEGTK *scitew); virtual void ParamGrab(); static gint ParamKeySignal(GtkWidget *w, GdkEventKey *event, SciTEGTK *scitew); static void ParamCancelSignal(GtkWidget *w, SciTEGTK *scitew); static void ParamSignal(GtkWidget *w, SciTEGTK *scitew); static void IOSignal(SciTEGTK *scitew); static gint MoveResize(GtkWidget *widget, GtkAllocation *allocation, SciTEGTK *scitew); static gint QuitSignal(GtkWidget *w, GdkEventAny *e, SciTEGTK *scitew); static void ButtonSignal(GtkWidget *widget, gpointer data); static void MenuSignal(SciTEGTK *scitew, guint action, GtkWidget *w); static void CommandSignal(GtkWidget *w, gint wParam, gpointer lParam, SciTEGTK *scitew); static void NotifySignal(GtkWidget *w, gint wParam, gpointer lParam, SciTEGTK *scitew); static gint KeyPress(GtkWidget *widget, GdkEventKey *event, SciTEGTK *scitew); gint Key(GdkEventKey *event); static gint MousePress(GtkWidget *widget, GdkEventButton *event, SciTEGTK *scitew); gint Mouse(GdkEventButton *event); void DividerXOR(Point pt); static gint DividerExpose(GtkWidget *widget, GdkEventExpose *ose, SciTEGTK *scitew); static gint DividerMotion(GtkWidget *widget, GdkEventMotion *event, SciTEGTK *scitew); static gint DividerPress(GtkWidget *widget, GdkEventButton *event, SciTEGTK *scitew); static gint DividerRelease(GtkWidget *widget, GdkEventButton *event, SciTEGTK *scitew); static void DragDataReceived(GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time, SciTEGTK *scitew); static void GtkTabBarSwitch(GtkNotebook *notebook, GdkEventButton *event); #if GTK_MAJOR_VERSION >= 2 // This is used to create the pixmaps used in the interface. GdkPixbuf *CreatePixbuf(const char *filename); #endif #ifdef USE_FILE_CHOOSER // Callback function to show hidden files in filechooser static void toggle_hidden_cb(GtkToggleButton *toggle, gpointer data); #endif public: // TODO: get rid of this - use callback argument to find SciTEGTK static SciTEGTK *instance; SciTEGTK(Extension *ext = 0); ~SciTEGTK(); void WarnUser(int warnID); GtkWidget *pixmap_new(GtkWidget *window, gchar **xpm); GtkWidget *AddToolButton(const char *text, int cmd, GtkWidget *toolbar_icon); void AddToolBar(); SString TranslatePath(const char *path); //SciTEGTK:: void CreateTranslatedMenu(int n, SciTEItemFactoryEntry items[], int nRepeats = 0, const char *prefix = 0, int startNum = 0, int startID = 0, const char *radioStart = 0); void CreateMenu(); void CreateUI(); void Run(int argc, char *argv[]); void ProcessExecute(); virtual void Execute(); virtual void StopExecute(); static int PollTool(SciTEGTK *scitew); static void ChildSignal(int); }; SciTEGTK *SciTEGTK::instance; SciTEGTK::SciTEGTK(Extension *ext) : SciTEBase(ext) { menuSource = 0; // Control of sub process icmd = 0; originalEnd = 0; fdFIFO = 0; pidShell = 0; triedKill = false; exitStatus = 0; pollID = 0; sprintf(resultsFile, "/tmp/sdlBasic%x.results", static_cast(getpid())); inputHandle = 0; pipeFD = -1; propsEmbed.Set("PLAT_GTK", "1"); ReadGlobalPropFile(); ReadAbbrevPropFile(); ptOld = Point(0, 0); xor_gc = 0; saveFormat = sfSource; comboFiles = 0; paramDialogCanceled = true; gotoEntry = 0; IncSearchEntry = 0; toggleWord = 0; toggleCase = 0; toggleRegExp = 0; toggleWrap = 0; toggleUnSlash = 0; toggleReverse = 0; comboFind = 0; comboFindInFiles = 0; comboReplace = 0; btnGo = 0; btnCompile = 0; btnBuild = 0; btnStop = 0; itemFactory = 0; fileSelectorWidth = 580; fileSelectorHeight = 480; // Fullscreen handling fullScreen = false; instance = this; } SciTEGTK::~SciTEGTK() {} static void destroyDialog(GtkWidget *, gpointer *window) { if (window) { Window *pwin = reinterpret_cast(window); *(pwin) = 0; } } void SciTEGTK::WarnUser(int) {} static GtkWidget *messageBoxDialog = 0; static long messageBoxResult = 0; static gint messageBoxKey(GtkWidget *w, GdkEventKey *event, gpointer p) { if (event->keyval == GDK_Escape) { gtk_signal_emit_stop_by_name(GTK_OBJECT(w), "key_press_event"); gtk_widget_destroy(GTK_WIDGET(w)); messageBoxDialog = 0; messageBoxResult = reinterpret_cast(p); } return FALSE; } static void messageBoxDestroy(GtkWidget *, gpointer *) { messageBoxDialog = 0; } static void messageBoxOK(GtkWidget *, gpointer p) { gtk_widget_destroy(GTK_WIDGET(messageBoxDialog)); messageBoxDialog = 0; messageBoxResult = reinterpret_cast(p); } static GtkWidget *MakeToggle(const char *text, GtkAccelGroup *accel_group, bool active) { GtkWidget *toggle = gtk_check_button_new_with_label(""); guint key = gtk_label_parse_uline(GTK_LABEL(GTK_BIN(toggle)->child), text); gtk_widget_add_accelerator(toggle, "clicked", accel_group, key, GDK_MOD1_MASK, (GtkAccelFlags)0); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), active); return toggle; } static GtkWidget *MakeCommand(const char *text, GtkAccelGroup *accel_group, GtkSignalFunc func, gpointer data, GdkModifierType accelMask) { GtkWidget *command = gtk_button_new_with_label(""); GTK_WIDGET_SET_FLAGS(command, GTK_CAN_DEFAULT); guint key = gtk_label_parse_uline(GTK_LABEL(GTK_BIN(command)->child), text); gtk_widget_add_accelerator(command, "clicked", accel_group, key, accelMask, (GtkAccelFlags)0); gtk_signal_connect(GTK_OBJECT(command), "clicked", func, data); return command; } GtkWidget *SciTEGTK::AddMBButton(GtkWidget *dialog, const char *label, int val, GtkAccelGroup *accel_group, bool isDefault) { GtkWidget *button = TranslatedCommand(label, accel_group, GtkSignalFunc(messageBoxOK), reinterpret_cast(val), GdkModifierType(0)); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 0); if (isDefault) { gtk_widget_grab_default(GTK_WIDGET(button)); } gtk_widget_show(button); return button; } #if GTK_MAJOR_VERSION >= 2 // This is an internally used function to create pixmaps. GdkPixbuf *SciTEGTK::CreatePixbuf(const char *filename) { char path[MAX_PATH + 20]; strncpy(path, PIXMAP_PATH, sizeof(path)); strcat(path, pathSepString); strcat(path, filename); GError *error = NULL; GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(path, &error); if (!pixbuf) { fprintf(stderr, "Failed to load pixbuf file: %s: %s\n", path, error->message); g_error_free(error); } return pixbuf; } #endif void SciTEGTK::GetDefaultDirectory(char *directory, size_t size) { directory[0] = '\0'; char *where = getenv("SdlBasic_HOME"); #ifdef SYSCONF_PATH if (!where) { where = SYSCONF_PATH; } #else if (!where) { where = getenv("HOME"); } #endif if (where) { #ifdef __vms strncpy(directory, VMSToUnixStyle(where), size); #else strncpy(directory, where, size); #endif } directory[size - 1] = '\0'; } bool SciTEGTK::GetSciteDefaultHome(char *path, unsigned int lenPath) { char *where = getenv("sdlBasic_HOME"); #ifdef __vms if (where == NULL) { where = g_modulePath; } #endif #ifdef SYSCONF_PATH if (!where) { where = SYSCONF_PATH; } #else if (!where) { where = getenv("HOME"); } #endif if (where) { #ifdef __vms strncpy(path, VMSToUnixStyle(where), lenPath); #else strncpy(path, where, lenPath); #endif return true; } return false; } bool SciTEGTK::GetSciteUserHome(char *path, unsigned int lenPath) { char *where = getenv("sdlBasic_HOME"); if (!where) { where = getenv("HOME"); } if (where) { strncpy(path, where, lenPath); return true; } return false; } void SciTEGTK::ShowFileInStatus() { char sbText[1000]; sprintf(sbText, " File: "); if (fileName[0] == '\0') strcat(sbText, "Untitled"); else strcat(sbText, fullPath); SetStatusBarText(sbText); } void SciTEGTK::SetWindowName() { SciTEBase::SetWindowName(); ShowFileInStatus(); } void SciTEGTK::SetStatusBarText(const char *s) { gtk_statusbar_pop(GTK_STATUSBAR(PWidget(wStatusBar)), sbContextID); gtk_statusbar_push(GTK_STATUSBAR(PWidget(wStatusBar)), sbContextID, s); } void SciTEGTK::SetFileProperties(PropSet &ps) { // Could use Unix standard calls here, someone less lazy than me (PL) should do it. ps.Set("FileTime", ""); ps.Set("FileDate", ""); ps.Set("FileAttr", ""); ps.Set("CurrentDate", ""); ps.Set("CurrentTime", ""); } void SciTEGTK::UpdateStatusBar(bool bUpdateSlowData) { SciTEBase::UpdateStatusBar(bUpdateSlowData); } void SciTEGTK::Notify(SCNotification *notification) { SciTEBase::Notify(notification); } void SciTEGTK::ShowToolBar() { if (GTK_TOOLBAR(PWidget(wToolBar))->num_children < 1) { AddToolBar(); } if (tbVisible) { if (toolbarDetachable == 1) { gtk_widget_show(GTK_WIDGET(PWidget(wToolBarBox))); } else { gtk_widget_show(GTK_WIDGET(PWidget(wToolBar))); } } else { if (toolbarDetachable == 1) { gtk_widget_hide(GTK_WIDGET(PWidget(wToolBarBox))); } else { gtk_widget_hide(GTK_WIDGET(PWidget(wToolBar))); } } } void SciTEGTK::ShowTabBar() { #if GTK_MAJOR_VERSION >= 2 if (tabVisible && (!tabHideOne || buffers.length > 1) && buffers.size>1) { gtk_widget_show(GTK_WIDGET(PWidget(wTabBar))); } else { gtk_widget_hide(GTK_WIDGET(PWidget(wTabBar))); } #endif } void SciTEGTK::ShowStatusBar() { if (sbVisible) { gtk_widget_show(GTK_WIDGET(PWidget(wStatusBar))); } else { gtk_widget_hide(GTK_WIDGET(PWidget(wStatusBar))); } } void SciTEGTK::Command(unsigned long wParam, long) { int cmdID = ControlIDOfCommand(wParam); int notifyCode = wParam >> 16; switch (cmdID) { case IDM_SRCWIN: if (notifyCode == SCEN_SETFOCUS) { Activate(true); CheckMenus(); } else if (notifyCode == SCEN_KILLFOCUS) { Activate(false); } break; case IDM_RUNWIN: if (notifyCode == SCEN_SETFOCUS) CheckMenus(); break; case IDM_FULLSCREEN: fullScreen = !fullScreen; if (fullScreen) { int screen_x, screen_y; int scite_x, scite_y; int width, height; GdkWindow* parent_w = PWidget(wSciTE)->window; gdk_window_get_origin(parent_w, &screen_x, &screen_y); gdk_window_get_geometry(parent_w, &scite_x, &scite_y, &width, &height, NULL); saved.x = screen_x - scite_x; saved.y = screen_y - scite_y; saved.width = width; saved.height = height; gdk_window_move_resize(parent_w, -scite_x, -scite_y, gdk_screen_width() + 1, gdk_screen_height() + 1); SizeSubWindows(); } else { GdkWindow* parent_w = PWidget(wSciTE)->window; gdk_window_move_resize(parent_w, saved.x, saved.y, saved.width, saved.height); SizeSubWindows(); } CheckMenus(); break; default: SciTEBase::MenuCommand(cmdID, menuSource); menuSource = 0; } UpdateStatusBar(true); } void SciTEGTK::ReadLocalisation() { SciTEBase::ReadLocalisation(); #ifdef ENCODE_TRANSLATION SString encoding = propsUI.Get("translation.encoding"); if (encoding.length()) { iconv_t iconvh = iconv_open("UTF-8", encoding.c_str()); char *key = NULL; char *val = NULL; // Get encoding bool more = propsUI.GetFirst(&key, &val); while (more) { char converted[1000]; converted[0] = '\0'; char *pin = val; size_t inLeft = strlen(val); char *pout = converted; size_t outLeft = sizeof(converted); size_t conversions = iconv_adaptor(iconv, iconvh, &pin, &inLeft, &pout, &outLeft); if (conversions != ((size_t)(-1))) { *pout = '\0'; propsUI.Set(key, converted); } more = propsUI.GetNext(&key, &val); } iconv_close(iconvh); } #endif } void SciTEGTK::ReadPropertiesInitial() { SciTEBase::ReadPropertiesInitial(); ShowToolBar(); ShowTabBar(); ShowStatusBar(); } void SciTEGTK::ReadProperties() { SciTEBase::ReadProperties(); CheckMenus(); // Need this here to handle tabbar.hide.one properly ShowTabBar(); } void SciTEGTK::SizeContentWindows() { PRectangle rcClient = GetClientRectangle(); #if GTK_MAJOR_VERSION < 2 int left = 0; int top = 0; #else int left = rcClient.left; int top = rcClient.top; #endif int w = rcClient.right - rcClient.left; int h = rcClient.bottom - rcClient.top; heightOutput = NormaliseSplit(heightOutput); if (splitVertical) { wEditor.SetPosition(PRectangle(left, top, w - heightOutput - heightBar + left, h + top)); wDivider.SetPosition(PRectangle(w - heightOutput - heightBar + left, top, w - heightOutput + left, h + top)); wOutput.SetPosition(PRectangle(w - heightOutput + left, top, w + left, h + top)); } else { wEditor.SetPosition(PRectangle(left, top, w + left, h - heightOutput - heightBar + top)); wDivider.SetPosition(PRectangle(left, h - heightOutput - heightBar + top, w + left, h - heightOutput + top)); wOutput.SetPosition(PRectangle(left, h - heightOutput + top, w + left, h + top)); } } void SciTEGTK::SizeSubWindows() { SizeContentWindows(); } void SciTEGTK::SetMenuItem(int, int, int itemID, const char *text, const char *mnemonic) { DestroyMenuItem(0, itemID); // On GTK+ the menuNumber and position are ignored as the menu item already exists and is in the right // place so only needs to be shown and have its text set. SString itemText(text); // Remove accelerator as does not work. itemText.remove("&"); long keycode = 0; if (mnemonic && *mnemonic) { keycode = SciTEKeys::ParseKeyCode(mnemonic); if (keycode) { itemText += " "; itemText += mnemonic; } // the keycode could be used to make a custom accelerator table // but for now, the menu's item data is used instead for command // tools, and for other menu entries it is just discarded. } // Reorder shift and ctrl indicators for compatibility with other menus itemText.substitute("Ctrl+Shift+", "Shift+Ctrl+"); GtkWidget *item = gtk_item_factory_get_widget_by_action(itemFactory, itemID); if (item) { GList *al = gtk_container_children(GTK_CONTAINER(item)); for (unsigned int ii = 0; ii < g_list_length(al); ii++) { gpointer d = g_list_nth(al, ii); GtkWidget **w = (GtkWidget **)d; gtk_label_set_text(GTK_LABEL(*w), itemText.c_str()); // Have not managed to make accelerator work //guint key = gtk_label_parse_uline(GTK_LABEL(*w), itemText); //gtk_widget_add_accelerator(*w, "clicked", accelGroup, // key, 0, (GtkAccelFlags)0); } g_list_free(al); gtk_widget_show(item); if (itemID >= IDM_TOOLS && itemID < IDM_TOOLS + toolMax) { // Stow the keycode for later retrieval. // Do this even if 0, in case the menu already existed (e.g. ModifyMenu) gtk_object_set_user_data(GTK_OBJECT(item), reinterpret_cast(keycode)); } } } void SciTEGTK::DestroyMenuItem(int, int itemID) { // On GTK+ menu items are just hidden rather than destroyed as they can not be recreated in the middle of a menu // The menuNumber is ignored as all menu items in GTK+ can be found from the root of the menu tree if (itemID) { GtkWidget *item = gtk_item_factory_get_widget_by_action(itemFactory, itemID); if (item) { gtk_widget_hide(item); gtk_object_set_user_data(GTK_OBJECT(item), 0); } } } void SciTEGTK::CheckAMenuItem(int wIDCheckItem, bool val) { GtkWidget *item = gtk_item_factory_get_widget_by_action(itemFactory, wIDCheckItem); allowMenuActions = false; if (item) gtk_check_menu_item_set_state(GTK_CHECK_MENU_ITEM(item), val ? TRUE : FALSE); //else // Platform::DebugPrintf("Could not find %x\n", wIDCheckItem); allowMenuActions = true; } void SciTEGTK::EnableAMenuItem(int wIDCheckItem, bool val) { GtkWidget *item = gtk_item_factory_get_widget_by_action(itemFactory, wIDCheckItem); if (item) { //Platform::DebugPrintf("Set %d to %d\n", wIDCheckItem, val); if (GTK_IS_WIDGET(item)) gtk_widget_set_sensitive(item, val); } } void SciTEGTK::CheckMenus() { SciTEBase::CheckMenus(); CheckAMenuItem(IDM_EOL_CRLF, SendEditor(SCI_GETEOLMODE) == SC_EOL_CRLF); CheckAMenuItem(IDM_EOL_CR, SendEditor(SCI_GETEOLMODE) == SC_EOL_CR); CheckAMenuItem(IDM_EOL_LF, SendEditor(SCI_GETEOLMODE) == SC_EOL_LF); CheckAMenuItem(IDM_ENCODING_DEFAULT, unicodeMode == uni8Bit); CheckAMenuItem(IDM_ENCODING_UCS2BE, unicodeMode == uni16BE); CheckAMenuItem(IDM_ENCODING_UCS2LE, unicodeMode == uni16LE); CheckAMenuItem(IDM_ENCODING_UTF8, unicodeMode == uniUTF8); CheckAMenuItem(IDM_ENCODING_UCOOKIE, unicodeMode == uniCookie); CheckAMenuItem(IDM_VIEWSTATUSBAR, sbVisible); CheckAMenuItem(IDM_VIEWTABBAR, tabVisible); if (btnBuild) { gtk_widget_set_sensitive(btnBuild, !executing); gtk_widget_set_sensitive(btnCompile, !executing); gtk_widget_set_sensitive(btnStop, executing); } } char *split(char*& s, char c) { char *t = s; if (s && (s = strchr(s, c))) * s++ = '\0'; return t; } /** * Replace any %xx escapes by their single-character equivalent. */ static void unquote(char *s) { char *o = s; while (*s) { if ((*s == '%') && s[1] && s[2]) { *o = IntFromHexDigit(s[1]) * 16 + IntFromHexDigit(s[2]); s += 2; } else { *o = *s; } o++; s++; } *o = '\0'; } /** * Open a list of URIs each terminated by "\r\n". * Only "file:" URIs currently understood. */ void SciTEGTK::OpenUriList(const char *list) { if (list) { char *uri = StringDup(list); if (uri) { char *enduri = strchr(uri, '\r'); while (enduri) { *enduri = '\0'; if (isprefix(uri, "file:")) { uri += strlen("file:"); if (isprefix(uri, "///")) { uri += 2; // There can be an optional // before the file path that starts with / } unquote(uri); Open(uri); } else { SString msg = LocaliseMessage("URI '^0' not understood.", uri); WindowMessageBox(wSciTE, msg, MB_OK | MB_ICONWARNING); } uri = enduri + 1; if (*uri == '\n') uri++; enduri = strchr(uri, '\r'); } } } } // on Linux return the shortest path equivalent to pathname (remove . and ..) void SciTEGTK::AbsolutePath(char *absPath, const char *relativePath, int /*size*/) { char path[MAX_PATH + 1], *cur, *last, *part, *tmp; if (!absPath) return; if (!relativePath) return; strcpy(path, relativePath); cur = absPath; *cur = '\0'; tmp = path; last = NULL; if (*tmp == pathSepChar) { *cur++ = pathSepChar; *cur = '\0'; tmp++; } while ((part = split(tmp, pathSepChar))) { if (strcmp(part, ".") == 0) ; else if (strcmp(part, "..") == 0 && (last = strrchr(absPath, pathSepChar))) { if (last > absPath) cur = last; else cur = last + 1; *cur = '\0'; } else { if (cur > absPath && *(cur - 1) != pathSepChar) *cur++ = pathSepChar; strcpy(cur, part); cur += strlen(part); } } } bool SciTEGTK::OpenDialog(const char *filter) { chdir(dirName); bool canceled = true; if (!dlgFileSelector.Created()) { #ifndef USE_FILE_CHOOSER filter=filter; // Ignore unused argument dlgFileSelector = gtk_file_selection_new(LocaliseString("Open File").c_str()); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(PWidget(dlgFileSelector))->ok_button), "clicked", GtkSignalFunc(OpenOKSignal), this); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(PWidget(dlgFileSelector))->cancel_button), "clicked", GtkSignalFunc(OpenCancelSignal), this); gtk_signal_connect(GTK_OBJECT(PWidget(dlgFileSelector)), "size_allocate", GtkSignalFunc(OpenResizeSignal), this); // Get a bigger open dialog gtk_window_set_default_size(GTK_WINDOW(PWidget(dlgFileSelector)), fileSelectorWidth, fileSelectorHeight); canceled = dlgFileSelector.ShowModal(PWidget(wSciTE)); #else GtkWidget *dlg = gtk_file_chooser_dialog_new( LocaliseString("Open File").c_str(), GTK_WINDOW(wSciTE.GetID()), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dlg), TRUE); gtk_dialog_set_default_response(GTK_DIALOG(dlg), GTK_RESPONSE_ACCEPT); if (props.GetInt("open.dialog.in.file.directory")) { gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dlg), dirName); } // Add a show hidden files toggle GtkWidget *toggle = gtk_check_button_new_with_label( LocaliseString("Show hidden files").c_str()); gtk_widget_show(toggle); gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(dlg), toggle); g_signal_connect(toggle, "toggled", G_CALLBACK(toggle_hidden_cb), GTK_DIALOG(dlg)); if (props.GetInt("fileselector.show.hidden")) g_object_set(GTK_OBJECT(toggle), "active", TRUE, NULL); SString openFilter; if (filter) openFilter = filter; else openFilter = props.GetExpanded("open.filter"); if (openFilter.length()) { openFilter.substitute('|', '\0'); size_t start = 0; while (start < openFilter.length()) { const char *filterName = openFilter.c_str() + start; SString localised = LocaliseString(filterName, false); if (localised.length()) { openFilter.remove(start, strlen(filterName)); openFilter.insert(start, localised.c_str()); } GtkFileFilter *filter = gtk_file_filter_new(); gtk_file_filter_set_name(filter, openFilter.c_str() + start); start += strlen(openFilter.c_str() + start) + 1; SString oneSet(openFilter.c_str() + start); oneSet.substitute(';', '\0'); size_t item = 0; while (item < oneSet.length()) { gtk_file_filter_add_pattern(filter, oneSet.c_str() + item); item += strlen(oneSet.c_str() + item) + 1; } gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dlg), filter); start += strlen(openFilter.c_str() + start) + 1; } } gtk_window_set_default_size(GTK_WINDOW(dlg), fileSelectorWidth, fileSelectorHeight); if (gtk_dialog_run(GTK_DIALOG(dlg)) == GTK_RESPONSE_ACCEPT) { GSList *names = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dlg)); GSList *nameCurrent = names; while (nameCurrent) { char *filename = static_cast(nameCurrent->data); Open(filename); g_free(filename); nameCurrent = g_slist_next(nameCurrent); } g_slist_free(names); canceled = false; } gtk_widget_destroy(dlg); #endif } return !canceled; } #ifdef USE_FILE_CHOOSER // Callback function to show hidden files in filechooser void SciTEGTK::toggle_hidden_cb(GtkToggleButton *toggle, gpointer data) { GtkWidget *file_chooser = GTK_WIDGET(data); if (gtk_toggle_button_get_active(toggle)) g_object_set(GTK_FILE_CHOOSER(file_chooser), "show-hidden", TRUE, NULL); else g_object_set(GTK_FILE_CHOOSER(file_chooser), "show-hidden", FALSE, NULL); } #endif void SciTEGTK::HandleSaveAs(const char *savePath) { switch (saveFormat) { case sfCopy: SaveBuffer(savePath); break; case sfHTML: SaveToHTML(savePath); break; case sfRTF: SaveToRTF(savePath); break; case sfPDF: SaveToPDF(savePath); break; case sfTEX: SaveToTEX(savePath); break; case sfXML: SaveToXML(savePath); break; default: SaveAs(savePath); } dlgFileSelector.OK(); } bool SciTEGTK::SaveAsXXX(FileFormat fmt, const char *title) { chdir(dirName); bool canceled = true; saveFormat = fmt; if (!dlgFileSelector.Created()) { #ifndef USE_FILE_CHOOSER dlgFileSelector = gtk_file_selection_new(LocaliseString(title).c_str()); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(PWidget(dlgFileSelector))->ok_button), "clicked", GtkSignalFunc(SaveAsSignal), this); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(PWidget(dlgFileSelector))->cancel_button), "clicked", GtkSignalFunc(OpenCancelSignal), this); // Get a bigger save as dialog gtk_window_set_default_size(GTK_WINDOW(PWidget(dlgFileSelector)), fileSelectorWidth, fileSelectorHeight); canceled = dlgFileSelector.ShowModal(PWidget(wSciTE)); #else GtkWidget *dlg = gtk_file_chooser_dialog_new(LocaliseString(title).c_str(), GTK_WINDOW(wSciTE.GetID()), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dlg), GTK_RESPONSE_ACCEPT); if (gtk_dialog_run(GTK_DIALOG(dlg)) == GTK_RESPONSE_ACCEPT) { char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dlg)); HandleSaveAs(filename); g_free(filename); } gtk_widget_destroy(dlg); #endif } return !canceled; } bool SciTEGTK::SaveAsDialog() { return SaveAsXXX(sfSource, "Save File As"); } void SciTEGTK::SaveACopy() { SaveAsXXX(sfCopy, "Save a Copy"); } void SciTEGTK::SaveAsHTML() { SaveAsXXX(sfHTML, "Export File As HTML"); } void SciTEGTK::SaveAsRTF() { SaveAsXXX(sfRTF, "Export File As RTF"); } void SciTEGTK::SaveAsPDF() { SaveAsXXX(sfPDF, "Export File As PDF"); } void SciTEGTK::SaveAsTEX() { SaveAsXXX(sfTEX, "Export File As LaTeX"); } void SciTEGTK::SaveAsXML() { SaveAsXXX(sfXML, "Export File As XML"); } void SciTEGTK::LoadSessionDialog() { chdir(dirName); if (!dlgFileSelector.Created()) { #ifndef USE_FILE_CHOOSER dlgFileSelector = gtk_file_selection_new(LocaliseString("Load Session").c_str()); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(PWidget(dlgFileSelector))->ok_button), "clicked", GtkSignalFunc(OpenSessionOKSignal), this); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(PWidget(dlgFileSelector))->cancel_button), "clicked", GtkSignalFunc(OpenCancelSignal), this); gtk_signal_connect(GTK_OBJECT(PWidget(dlgFileSelector)), "size_allocate", GtkSignalFunc(OpenResizeSignal), this); // Get a bigger open dialog gtk_window_set_default_size(GTK_WINDOW(PWidget(dlgFileSelector)), fileSelectorWidth, fileSelectorHeight); dlgFileSelector.ShowModal(PWidget(wSciTE)); #else GtkWidget *dlg = gtk_file_chooser_dialog_new("Load Session", GTK_WINDOW(wSciTE.GetID()), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); gtk_window_set_default_size(GTK_WINDOW(dlg), fileSelectorWidth, fileSelectorHeight); if (gtk_dialog_run(GTK_DIALOG(dlg)) == GTK_RESPONSE_ACCEPT) { char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dlg)); LoadSession(filename); g_free(filename); } gtk_widget_destroy(dlg); #endif } } void SciTEGTK::SaveSessionDialog() { chdir(dirName); if (!dlgFileSelector.Created()) { #ifndef USE_FILE_CHOOSER dlgFileSelector = gtk_file_selection_new(LocaliseString("Save Session").c_str()); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(PWidget(dlgFileSelector))->ok_button), "clicked", GtkSignalFunc(SaveSessionOKSignal), this); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(PWidget(dlgFileSelector))->cancel_button), "clicked", GtkSignalFunc(OpenCancelSignal), this); gtk_signal_connect(GTK_OBJECT(PWidget(dlgFileSelector)), "size_allocate", GtkSignalFunc(OpenResizeSignal), this); // Get a bigger open dialog gtk_window_set_default_size(GTK_WINDOW(PWidget(dlgFileSelector)), fileSelectorWidth, fileSelectorHeight); dlgFileSelector.ShowModal(PWidget(wSciTE)); #else GtkWidget *dlg = gtk_file_chooser_dialog_new("Save Session", GTK_WINDOW(wSciTE.GetID()), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); if (gtk_dialog_run(GTK_DIALOG(dlg)) == GTK_RESPONSE_ACCEPT) { char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dlg)); SaveSession(filename); g_free(filename); } gtk_widget_destroy(dlg); #endif } } void SciTEGTK::Print(bool) { SelectionIntoProperties(); AddCommand(props.GetWild("command.print.", fileName), "", SubsystemType("command.print.subsystem.")); if (commandCurrent > 0) { isBuilding = true; Execute(); } } void SciTEGTK::PrintSetup() { // Printing not yet supported on GTK+ } SString SciTEGTK::GetRangeInUIEncoding(Window &win, int selStart, int selEnd) { int len = selEnd - selStart; SBuffer allocation(len * 3); Platform::SendScintilla(win.GetID(), SCI_SETTARGETSTART, selStart); Platform::SendScintilla(win.GetID(), SCI_SETTARGETEND, selEnd); int byteLength = Platform::SendScintillaPointer( win.GetID(), SCI_TARGETASUTF8, 0, allocation.ptr()); SString sel(allocation); sel.remove(byteLength, 0); return sel; } void SciTEGTK::HandleFindReplace() {} void SciTEGTK::Find() { if (wFindReplace.Created()) return; SelectionIntoFind(); FindReplace(false); } static SString Padded(const SString &s) { SString ret(s); ret.insert(0, " "); ret += " "; return ret; } void SciTEGTK::TranslatedSetTitle(GtkWindow *w, const char *original) { gtk_window_set_title(w, LocaliseString(original).c_str()); } GtkWidget *SciTEGTK::TranslatedLabel(const char *original) { SString text = LocaliseString(original); // Don't know how to make an access key on a label transfer focus // to the next widget so remove the access key indicator. text.remove("_"); return gtk_label_new(text.c_str()); } GtkWidget *SciTEGTK::TranslatedCommand(const char *original, GtkAccelGroup *accel_group, GtkSignalFunc func, gpointer data, GdkModifierType accelMask) { return MakeCommand(Padded(LocaliseString(original)).c_str(), accel_group, func, data, accelMask); } GtkWidget *SciTEGTK::TranslatedToggle(const char *original, GtkAccelGroup *accel_group, bool active) { return MakeToggle(LocaliseString(original).c_str(), accel_group, active); } static void FillComboFromMemory(GtkWidget *combo, const ComboMemory &mem, bool useTop = false) { GtkWidget * list = GTK_COMBO(combo)->list; for (int i = 0; i < mem.Length(); i++) { GtkWidget *item = gtk_list_item_new_with_label(mem.At(i).c_str()); gtk_container_add(GTK_CONTAINER(list), item); gtk_widget_show(item); } if (useTop) { gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo)->entry), mem.At(0).c_str()); } } SString SciTEGTK::EncodeString(const SString &s) { Platform::SendScintilla(PWidget(wEditor), SCI_SETLENGTHFORENCODE, s.length(), 0); int len = Platform::SendScintillaPointer(PWidget(wEditor), SCI_ENCODEDFROMUTF8, reinterpret_cast(s.c_str()), 0); SBuffer ret(len); Platform::SendScintillaPointer(PWidget(wEditor), SCI_ENCODEDFROMUTF8, reinterpret_cast(s.c_str()), ret.ptr()); return SString(ret); } void SciTEGTK::FindReplaceGrabFields() { const char *findEntry = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(comboFind)->entry)); findWhat = findEntry; memFinds.Insert(findWhat); if (comboReplace) { const char *replaceEntry = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(comboReplace)->entry)); replaceWhat = replaceEntry; memReplaces.Insert(replaceWhat); } wholeWord = GTK_TOGGLE_BUTTON(toggleWord)->active; matchCase = GTK_TOGGLE_BUTTON(toggleCase)->active; regExp = GTK_TOGGLE_BUTTON(toggleRegExp)->active; wrapFind = GTK_TOGGLE_BUTTON(toggleWrap)->active; unSlash = GTK_TOGGLE_BUTTON(toggleUnSlash)->active; reverseFind = GTK_TOGGLE_BUTTON(toggleReverse)->active; } void SciTEGTK::FRCancelSignal(GtkWidget *, SciTEGTK *scitew) { scitew->wFindReplace.Destroy(); } gint SciTEGTK::FRKeySignal(GtkWidget *w, GdkEventKey *event, SciTEGTK *scitew) { if (event->keyval == GDK_Escape) { gtk_signal_emit_stop_by_name(GTK_OBJECT(w), "key_press_event"); scitew->wFindReplace.Destroy(); } return FALSE; } void SciTEGTK::FRFindSignal(GtkWidget *, SciTEGTK *scitew) { scitew->FindReplaceGrabFields(); if (!scitew->comboReplace) scitew->wFindReplace.Destroy(); if (scitew->findWhat[0]) { scitew->FindNext(scitew->reverseFind); } } void SciTEGTK::FRReplaceSignal(GtkWidget *, SciTEGTK *scitew) { scitew->FindReplaceGrabFields(); if (scitew->findWhat[0]) { scitew->ReplaceOnce(); } } void SciTEGTK::FRReplaceAllSignal(GtkWidget *, SciTEGTK *scitew) { scitew->FindReplaceGrabFields(); if (scitew->findWhat[0]) { scitew->ReplaceAll(false); scitew->wFindReplace.Destroy(); } } void SciTEGTK::FRReplaceInSelectionSignal(GtkWidget *, SciTEGTK *scitew) { scitew->FindReplaceGrabFields(); if (scitew->findWhat[0]) { scitew->ReplaceAll(true); scitew->wFindReplace.Destroy(); } } void SciTEGTK::FindInFilesSignal(GtkWidget *, SciTEGTK *scitew) { const char *findEntry = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(scitew->comboFindInFiles)->entry)); scitew->props.Set("find.what", findEntry); scitew->memFinds.Insert(findEntry); const char *dirEntry = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(scitew->comboDir)->entry)); scitew->props.Set("find.directory", dirEntry); scitew->memDirectory.Insert(dirEntry); #ifdef RECURSIVE_GREP_WORKING if (GTK_TOGGLE_BUTTON(scitew->toggleRec)->active) scitew->props.Set("find.recursive", scitew->props.Get("find.recursive.recursive").c_str()); else scitew->props.Set("find.recursive", scitew->props.Get("find.recursive.not").c_str()); #endif const char *filesEntry = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(scitew->comboFiles)->entry)); scitew->props.Set("find.files", filesEntry); scitew->memFiles.Insert(filesEntry); scitew->dlgFindInFiles.Destroy(); //printf("Grepping for <%s> in <%s>\n", // scitew->props.Get("find.what"), // scitew->props.Get("find.files")); scitew->SelectionIntoProperties(); scitew->AddCommand(scitew->props.GetNewExpand("find.command"), scitew->props.Get("find.directory"), jobCLI); if (scitew->commandCurrent > 0) scitew->Execute(); } void SciTEGTK::FindInFiles() { GtkAccelGroup *accel_group = gtk_accel_group_new(); SelectionIntoFind(); props.Set("find.what", findWhat.c_str()); char findInDir[1024]; GetDocumentDirectory(findInDir, sizeof(findInDir)); props.Set("find.directory", findInDir); dlgFindInFiles = gtk_dialog_new(); gtk_window_set_policy(GTK_WINDOW(PWidget(dlgFindInFiles)), FALSE, TRUE, FALSE); TranslatedSetTitle(GTK_WINDOW(PWidget(dlgFindInFiles)), "Find in Files"); #ifdef RECURSIVE_GREP_WORKING GtkWidget *table = gtk_table_new(4, 2, FALSE); #else GtkWidget *table = gtk_table_new(3, 2, FALSE); #endif gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(dlgFindInFiles))->vbox), table, TRUE, TRUE, 0); GtkAttachOptions opts = static_cast( GTK_SHRINK | GTK_FILL); GtkAttachOptions optse = static_cast( GTK_SHRINK | GTK_FILL | GTK_EXPAND); int row = 0; comboFindInFiles = gtk_combo_new(); GtkWidget *labelFind = TranslatedLabel("Find what:"); gtk_table_attach(GTK_TABLE(table), labelFind, 0, 1, row, row + 1, opts, opts, 5, 5); gtk_widget_show(labelFind); FillComboFromMemory(comboFindInFiles, memFinds); gtk_combo_set_case_sensitive(GTK_COMBO(comboFindInFiles), TRUE); gtk_combo_set_use_arrows_always(GTK_COMBO(comboFindInFiles), TRUE); gtk_table_attach(GTK_TABLE(table), comboFindInFiles, 1, 2, row, row + 1, optse, opts, 5, 5); gtk_widget_show(comboFindInFiles); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(comboFindInFiles)->entry), findWhat.c_str()); gtk_entry_select_region(GTK_ENTRY(GTK_COMBO(comboFindInFiles)->entry), 0, findWhat.length()); gtk_signal_connect(GTK_OBJECT(GTK_COMBO(comboFindInFiles)->entry), "activate", GtkSignalFunc(FindInFilesSignal), this); gtk_combo_disable_activate(GTK_COMBO(comboFindInFiles)); row++; GtkWidget *labelFiles = TranslatedLabel("Files:"); gtk_table_attach(GTK_TABLE(table), labelFiles, 0, 1, row, row + 1, opts, opts, 5, 5); gtk_widget_show(labelFiles); comboFiles = gtk_combo_new(); FillComboFromMemory(comboFiles, memFiles, true); gtk_combo_set_case_sensitive(GTK_COMBO(comboFiles), TRUE); gtk_combo_set_use_arrows_always(GTK_COMBO(comboFiles), TRUE); gtk_table_attach(GTK_TABLE(table), comboFiles, 1, 2, row, row + 1, optse, opts, 5, 5); gtk_widget_show(comboFiles); gtk_signal_connect(GTK_OBJECT(GTK_COMBO(comboFiles)->entry), "activate", GtkSignalFunc(FindInFilesSignal), this); gtk_combo_disable_activate(GTK_COMBO(comboFiles)); row++; GtkWidget *labelDir = TranslatedLabel("Directory:"); gtk_table_attach(GTK_TABLE(table), labelDir, 0, 1, row, row + 1, opts, opts, 5, 5); gtk_widget_show(labelDir); comboDir = gtk_combo_new(); FillComboFromMemory(comboDir, memDirectory); gtk_combo_set_case_sensitive(GTK_COMBO(comboDir), TRUE); gtk_combo_set_use_arrows_always(GTK_COMBO(comboDir), TRUE); gtk_table_attach(GTK_TABLE(table), comboDir, 1, 2, row, row + 1, optse, opts, 5, 5); gtk_widget_show(comboDir); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(comboDir)->entry), findInDir); // Make a little wider than would happen automatically to show realistic paths #if GTK_MAJOR_VERSION >= 2 gtk_entry_set_width_chars(GTK_ENTRY(GTK_COMBO(comboDir)->entry), 40); #endif gtk_signal_connect(GTK_OBJECT(GTK_COMBO(comboDir)->entry), "activate", GtkSignalFunc(FindInFilesSignal), this); gtk_combo_disable_activate(GTK_COMBO(comboDir)); #ifdef RECURSIVE_GREP_WORKING row++; toggleRec = TranslatedToggle("Re_cursive Directories", accel_group, false); gtk_table_attach(GTK_TABLE(table), toggleRec, 1, 2, row, row + 1, opts, opts, 3, 0); gtk_widget_show(toggleRec); #endif gtk_widget_show(table); GtkWidget *btnFind = TranslatedCommand("F_ind", accel_group, GtkSignalFunc(FindInFilesSignal), this); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(dlgFindInFiles))->action_area), btnFind, TRUE, TRUE, 0); gtk_widget_show(btnFind); GtkWidget *btnCancel = TranslatedCommand("_Cancel", accel_group, GtkSignalFunc(Dialog::SignalCancel), &dlgFindInFiles); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(dlgFindInFiles))->action_area), btnCancel, TRUE, TRUE, 0); gtk_widget_show(btnCancel); gtk_widget_grab_default(GTK_WIDGET(btnFind)); gtk_widget_grab_focus(GTK_WIDGET(GTK_COMBO(comboFindInFiles)->entry)); gtk_window_add_accel_group(GTK_WINDOW(PWidget(dlgFindInFiles)), accel_group); dlgFindInFiles.ShowModal(PWidget(wSciTE)); } void SciTEGTK::Replace() { if (wFindReplace.Created()) return; SelectionIntoFind(); FindReplace(true); } void SciTEGTK::ExecuteNext() { icmd++; if (icmd < commandCurrent && icmd < commandMax) { Execute(); } else { icmd = 0; executing = false; if (needReadProperties) ReadProperties(); CheckReload(); CheckMenus(); ClearJobQueue(); } } void SciTEGTK::ContinueExecute(int fromPoll) { char buf[8192]; int count = read(fdFIFO, buf, sizeof(buf) - 1); if (count > 0) { buf[count] = '\0'; OutputAppendString(buf); } else if (count == 0) { SString sExitMessage(WEXITSTATUS(exitStatus)); sExitMessage.insert(0, ">Exit code: "); if (WIFSIGNALED(exitStatus)) { SString sSignal(WTERMSIG(exitStatus)); sSignal.insert(0, " Signal: "); sExitMessage += sSignal; } if (timeCommands) { sExitMessage += " Time: "; sExitMessage += SString(commandTime.Duration(), 3); } sExitMessage.append("\n"); OutputAppendString(sExitMessage.c_str()); // Move selection back to beginning of this run so that F4 will go // to first error of this run. if (scrollOutput && returnOutputToCommand) SendOutput(SCI_GOTOPOS, originalEnd); returnOutputToCommand = true; gdk_input_remove(inputHandle); inputHandle = 0; gtk_timeout_remove(pollID); pollID = 0; close(fdFIFO); fdFIFO = 0; unlink(resultsFile); pidShell = 0; triedKill = false; ExecuteNext(); GoMessage(1); } else { // count < 0 // The FIFO is not ready - expected when called from polling callback. if (!fromPoll) { OutputAppendString(">End Bad\n"); } } } void SciTEGTK::IOSignal(SciTEGTK *scitew) { scitew->ContinueExecute(FALSE); } int xsystem(const char *s, const char *resultsFile) { int pid = 0; //printf("xsystem %s %s\n", s, resultsFile); if ((pid = fork()) == 0) { close(0); int fh = open(resultsFile, O_WRONLY); close(1); dup(fh); close(2); dup(fh); execlp("/bin/sh", "sh", "-c", s, NULL); exit(127); } return pid; } static bool MakePipe(const char *name) { // comment: () isn't implemented in cygwin yet #if defined(__vms) || defined(__CYGWIN__) // No mkfifo on OpenVMS or CYGWIN int fd = creat(name, 0777); close(fd); // Handle must be closed before re-opened #else int fd = mkfifo(name, S_IRUSR | S_IWUSR); #endif return fd >= 0; } void SciTEGTK::Execute() { SciTEBase::Execute(); commandTime.Duration(true); if (scrollOutput) SendOutput(SCI_GOTOPOS, SendOutput(SCI_GETTEXTLENGTH)); originalEnd = SendOutput(SCI_GETCURRENTPOS); OutputAppendString(">"); OutputAppendString(jobQueue[icmd].command.c_str()); OutputAppendString("\n"); unlink(resultsFile); if (jobQueue[icmd].directory != "") { chdir(jobQueue[icmd].directory.c_str()); } if (jobQueue[icmd].jobType == jobShell) { if (fork() == 0) execlp("/bin/sh", "sh", "-c", jobQueue[icmd].command.c_str(), NULL); else ExecuteNext(); } else if (jobQueue[icmd].jobType == jobExtension) { if (extender) extender->OnExecute(jobQueue[icmd].command.c_str()); ExecuteNext(); } else { if (!MakePipe(resultsFile)) { OutputAppendString(">Failed to create FIFO\n"); ExecuteNext(); return; } pidShell = xsystem(jobQueue[icmd].command.c_str(), resultsFile); triedKill = false; fdFIFO = open(resultsFile, O_RDONLY | O_NONBLOCK); if (fdFIFO < 0) { OutputAppendString(">Failed to open\n"); fdFIFO = 0; return; } inputHandle = gdk_input_add(fdFIFO, GDK_INPUT_READ, (GdkInputFunction) IOSignal, this); // Also add a background task in case there is no output from the tool pollID = gtk_timeout_add(200, (gint (*)(void *)) SciTEGTK::PollTool, this); } } void SciTEGTK::StopExecute() { if (!triedKill && pidShell) { kill(pidShell, SIGKILL); triedKill = true; } } void SciTEGTK::GotoSignal(GtkWidget *, SciTEGTK *scitew) { const char *lineEntry = gtk_entry_get_text(GTK_ENTRY(scitew->gotoEntry)); int lineNo = atoi(lineEntry); scitew->GotoLineEnsureVisible(lineNo - 1); scitew->dlgGoto.Destroy(); } void SciTEGTK::GoLineDialog() { GtkAccelGroup *accel_group = gtk_accel_group_new(); dlgGoto = gtk_dialog_new(); TranslatedSetTitle(GTK_WINDOW(PWidget(dlgGoto)), "Go To"); gtk_container_border_width(GTK_CONTAINER(PWidget(dlgGoto)), 0); GtkWidget *table = gtk_table_new(2, 1, TRUE);//false gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(dlgGoto))->vbox), table, TRUE, TRUE, 0); GtkAttachOptions opts = static_cast( GTK_EXPAND | GTK_SHRINK | GTK_FILL); GtkWidget *label = TranslatedLabel("Destination Line Number:"); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, opts, opts, 5, 5); gtk_widget_show(label); gotoEntry = gtk_entry_new(); gtk_table_attach(GTK_TABLE(table), gotoEntry, 1, 2, 0, 1, opts, opts, 5, 5); gtk_signal_connect(GTK_OBJECT(gotoEntry), "activate", GtkSignalFunc(GotoSignal), this); gtk_widget_grab_focus(GTK_WIDGET(gotoEntry)); gtk_widget_show(gotoEntry); gtk_widget_show(table); GtkWidget *btnGoTo = TranslatedCommand("_Go To", accel_group, GtkSignalFunc(GotoSignal), this); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(dlgGoto))->action_area), btnGoTo, TRUE, TRUE, 0); gtk_widget_grab_default(GTK_WIDGET(btnGoTo)); gtk_widget_show(btnGoTo); GtkWidget *btnCancel = TranslatedCommand("_Cancel", accel_group, GtkSignalFunc(Dialog::SignalCancel), &dlgGoto); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(dlgGoto))->action_area), btnCancel, TRUE, TRUE, 0); gtk_widget_show(btnCancel); gtk_window_add_accel_group(GTK_WINDOW(PWidget(dlgGoto)), accel_group); dlgGoto.ShowModal(PWidget(wSciTE)); } bool SciTEGTK::AbbrevDialog() { return false; } void SciTEGTK::TabSizeDialog() {} void SciTEGTK::ParamGrab() { if (wParameters.Created()) { for (int param = 0; param < maxParam; param++) { SString paramText(param + 1); const char *paramVal = gtk_entry_get_text(GTK_ENTRY(entryParam[param])); props.Set(paramText.c_str(), paramVal); } UpdateStatusBar(true); } } gint SciTEGTK::ParamKeySignal(GtkWidget *w, GdkEventKey *event, SciTEGTK *scitew) { if (event->keyval == GDK_Escape) { gtk_signal_emit_stop_by_name(GTK_OBJECT(w), "key_press_event"); scitew->wParameters.Destroy(); } return FALSE; } void SciTEGTK::ParamCancelSignal(GtkWidget *, SciTEGTK *scitew) { scitew->wParameters.Destroy(); scitew->CheckMenus(); } void SciTEGTK::ParamSignal(GtkWidget *, SciTEGTK *scitew) { scitew->paramDialogCanceled = false; scitew->ParamGrab(); scitew->wParameters.Destroy(); scitew->CheckMenus(); } bool SciTEGTK::ParametersDialog(bool modal) { if (wParameters.Created()) { ParamGrab(); if (!modal) { wParameters.Destroy(); } return true; } paramDialogCanceled = true; GtkAccelGroup *accel_group = gtk_accel_group_new(); wParameters = gtk_dialog_new(); TranslatedSetTitle(GTK_WINDOW(PWidget(wParameters)), "Parameters"); gtk_container_border_width(GTK_CONTAINER(PWidget(wParameters)), 0); gtk_signal_connect(GTK_OBJECT(PWidget(wParameters)), "destroy", GtkSignalFunc(destroyDialog), &wParameters); GtkWidget *table = gtk_table_new(2, modal ? 10 : 9, FALSE); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(wParameters))->vbox), table, TRUE, TRUE, 0); GtkAttachOptions opts = static_cast( GTK_EXPAND | GTK_SHRINK | GTK_FILL); int row = 0; if (modal) { GtkWidget *cmd = gtk_label_new(parameterisedCommand.c_str()); gtk_table_attach(GTK_TABLE(table), cmd, 0, 2, row, row + 1, opts, opts, 5, 5); gtk_widget_show(cmd); row++; } for (int param = 0; param < maxParam; param++) { SString paramText(param + 1); SString paramTextVal = props.Get(paramText.c_str()); paramText.append(":"); GtkWidget *label = gtk_label_new(paramText.c_str()); gtk_table_attach(GTK_TABLE(table), label, 0, 1, row, row + 1, opts, opts, 5, 5); gtk_widget_show(label); entryParam[param] = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entryParam[param]), paramTextVal.c_str()); if (param == 0) gtk_entry_select_region(GTK_ENTRY(entryParam[param]), 0, paramTextVal.length()); gtk_table_attach(GTK_TABLE(table), entryParam[param], 1, 2, row, row + 1, opts, opts, 5, 5); gtk_signal_connect(GTK_OBJECT(entryParam[param]), "activate", GtkSignalFunc(ParamSignal), this); gtk_widget_show(entryParam[param]); row++; } gtk_widget_grab_focus(GTK_WIDGET(entryParam[0])); gtk_widget_show(table); GtkWidget *btnExecute = TranslatedCommand(modal ? "_Execute" : "_Set", accel_group, GtkSignalFunc(ParamSignal), this); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(wParameters))->action_area), btnExecute, TRUE, TRUE, 0); gtk_widget_grab_default(GTK_WIDGET(btnExecute)); gtk_widget_show(btnExecute); GtkWidget *btnCancel = TranslatedCommand(modal ? "_Cancel" : "_Close", accel_group, GtkSignalFunc(ParamCancelSignal), this); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(wParameters))->action_area), btnCancel, TRUE, TRUE, 0); gtk_widget_show(btnCancel); // Mark it as a modal transient dialog gtk_window_set_modal(GTK_WINDOW(PWidget(wParameters)), modal); gtk_window_set_transient_for (GTK_WINDOW(PWidget(wParameters)), GTK_WINDOW(PWidget(wSciTE))); gtk_window_add_accel_group(GTK_WINDOW(PWidget(wParameters)), accelGroup); wParameters.Show(); if (modal) { while (wParameters.Created()) { gtk_main_iteration(); } } return !paramDialogCanceled; } void SciTEGTK::FindReplace(bool replace) { GtkAccelGroup *accel_group = gtk_accel_group_new(); replacing = replace; wFindReplace = gtk_dialog_new(); gtk_window_set_policy(GTK_WINDOW(PWidget(wFindReplace)), TRUE, TRUE, FALSE); TranslatedSetTitle(GTK_WINDOW(PWidget(wFindReplace)), replace ? "Replace" : "Find"); gtk_signal_connect(GTK_OBJECT(PWidget(wFindReplace)), "destroy", GtkSignalFunc(destroyDialog), &wFindReplace); GtkWidget *table = gtk_table_new(2, replace ? 4 : 3, FALSE); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(wFindReplace))->vbox), table, TRUE, TRUE, 0); GtkAttachOptions opts = static_cast( GTK_SHRINK | GTK_FILL); GtkAttachOptions optse = static_cast( GTK_SHRINK | GTK_FILL | GTK_EXPAND); int row = 0; GtkWidget *labelFind = TranslatedLabel("Find what:"); gtk_table_attach(GTK_TABLE(table), labelFind, 0, 1, row, row + 1, opts, opts, 5, 5); gtk_widget_show(labelFind); comboFind = gtk_combo_new(); FillComboFromMemory(comboFind, memFinds); gtk_table_attach(GTK_TABLE(table), comboFind, 1, 2, row, row + 1, optse, opts, 5, 5); gtk_widget_show(comboFind); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(comboFind)->entry), findWhat.c_str()); #if GTK_MAJOR_VERSION >= 2 gtk_entry_set_width_chars(GTK_ENTRY(GTK_COMBO(comboFind)->entry), 40); #endif gtk_entry_select_region(GTK_ENTRY(GTK_COMBO(comboFind)->entry), 0, findWhat.length()); gtk_signal_connect(GTK_OBJECT(GTK_COMBO(comboFind)->entry), "activate", GtkSignalFunc(FRFindSignal), this); gtk_combo_disable_activate(GTK_COMBO(comboFind)); gtk_combo_set_case_sensitive(GTK_COMBO(comboFind), TRUE); gtk_combo_set_use_arrows_always(GTK_COMBO(comboFind), TRUE); row++; if (replace) { GtkWidget *labelReplace = TranslatedLabel("Replace with:"); gtk_table_attach(GTK_TABLE(table), labelReplace, 0, 1, row, row + 1, opts, opts, 5, 5); gtk_widget_show(labelReplace); comboReplace = gtk_combo_new(); FillComboFromMemory(comboReplace, memReplaces); gtk_table_attach(GTK_TABLE(table), comboReplace, 1, 2, row, row + 1, optse, opts, 5, 5); gtk_widget_show(comboReplace); gtk_signal_connect(GTK_OBJECT(GTK_COMBO(comboReplace)->entry), "activate", GtkSignalFunc(FRFindSignal), this); gtk_combo_disable_activate(GTK_COMBO(comboReplace)); gtk_combo_set_case_sensitive(GTK_COMBO(comboReplace), TRUE); gtk_combo_set_use_arrows_always(GTK_COMBO(comboReplace), TRUE); row++; } else { comboReplace = 0; } // Whole Word toggleWord = TranslatedToggle("Match whole word _only", accel_group, wholeWord); gtk_table_attach(GTK_TABLE(table), toggleWord, 0, 2, row, row + 1, opts, opts, 3, 0); row++; // Case Sensitive toggleCase = TranslatedToggle("_Match case", accel_group, matchCase); gtk_table_attach(GTK_TABLE(table), toggleCase, 0, 2, row, row + 1, opts, opts, 3, 0); row++; // Regular Expression toggleRegExp = TranslatedToggle("Regular e_xpression", accel_group, regExp); gtk_table_attach(GTK_TABLE(table), toggleRegExp, 0, 2, row, row + 1, opts, opts, 3, 0); row++; // Wrap Around toggleWrap = TranslatedToggle("_Wrap around", accel_group, wrapFind); gtk_table_attach(GTK_TABLE(table), toggleWrap, 0, 2, row, row + 1, opts, opts, 3, 0); row++; // Transform backslash expressions toggleUnSlash = TranslatedToggle("_Transform backslash expressions", accel_group, unSlash); gtk_table_attach(GTK_TABLE(table), toggleUnSlash, 0, 2, row, row + 1, opts, opts, 3, 0); row++; // Reverse toggleReverse = TranslatedToggle("Re_verse direction", accel_group, reverseFind); gtk_table_attach(GTK_TABLE(table), toggleReverse, 0, 2, row, row + 1, opts, opts, 3, 0); row++; gtk_widget_show_all(table); gtk_box_set_homogeneous( GTK_BOX(GTK_DIALOG(PWidget(wFindReplace))->action_area), false); GtkWidget *btnFind = TranslatedCommand("F_ind", accel_group, GtkSignalFunc(FRFindSignal), this); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(wFindReplace))->action_area), btnFind, TRUE, TRUE, 0); if (replace) { GtkWidget *btnReplace = TranslatedCommand("_Replace", accel_group, GtkSignalFunc(FRReplaceSignal), this); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(wFindReplace))->action_area), btnReplace, TRUE, TRUE, 0); GtkWidget *btnReplaceAll = TranslatedCommand("Replace _All", accel_group, GtkSignalFunc(FRReplaceAllSignal), this); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(wFindReplace))->action_area), btnReplaceAll, TRUE, TRUE, 0); #if GTK_MAJOR_VERSION < 2 GtkWidget *btnReplaceInSelection = TranslatedCommand("Replace in _Selection", accel_group, GtkSignalFunc(FRReplaceInSelectionSignal), this); #else // GTK+ 2 uses more space so use shorter button text GtkWidget *btnReplaceInSelection = TranslatedCommand("In _Selection", accel_group, GtkSignalFunc(FRReplaceInSelectionSignal), this); #endif gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(wFindReplace))->action_area), btnReplaceInSelection, TRUE, TRUE, 0); } GtkWidget *btnCancel = TranslatedCommand("_Cancel", accel_group, GtkSignalFunc(FRCancelSignal), this); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(PWidget(wFindReplace))->action_area), btnCancel, TRUE, TRUE, 0); gtk_signal_connect(GTK_OBJECT(PWidget(wFindReplace)), "key_press_event", GtkSignalFunc(FRKeySignal), this); gtk_widget_show_all(GTK_WIDGET(GTK_DIALOG(PWidget(wFindReplace))->action_area)); GTK_WIDGET_SET_FLAGS(GTK_WIDGET(btnFind), GTK_CAN_DEFAULT); gtk_widget_grab_default(GTK_WIDGET(btnFind)); gtk_widget_grab_focus(GTK_WIDGET(GTK_COMBO(comboFind)->entry)); // Mark it as a transient dialog gtk_window_set_transient_for (GTK_WINDOW(PWidget(wFindReplace)), GTK_WINDOW(PWidget(wSciTE))); gtk_window_add_accel_group(GTK_WINDOW(PWidget(wFindReplace)), accel_group); wFindReplace.Show(); } void SciTEGTK::DestroyFindReplace() { wFindReplace.Destroy(); } int SciTEGTK::WindowMessageBox(Window &w, const SString &msg, int style) { if (!messageBoxDialog) { dialogsOnScreen++; GtkAccelGroup *accel_group = gtk_accel_group_new(); messageBoxResult = -1; messageBoxDialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(messageBoxDialog), appName); gtk_container_border_width(GTK_CONTAINER(messageBoxDialog), 0); gtk_signal_connect(GTK_OBJECT(messageBoxDialog), "destroy", GtkSignalFunc(messageBoxDestroy), &messageBoxDialog); int escapeResult = IDOK; if ((style & 0xf) == MB_OK) { AddMBButton(messageBoxDialog, "_OK", IDOK, accel_group, true); } else { AddMBButton(messageBoxDialog, "_Yes", IDYES, accel_group, true); AddMBButton(messageBoxDialog, "_No", IDNO, accel_group); escapeResult = IDNO; if ((style & 0xf) == MB_YESNOCANCEL) { AddMBButton(messageBoxDialog, "_Cancel", IDCANCEL, accel_group); escapeResult = IDCANCEL; } } gtk_signal_connect(GTK_OBJECT(messageBoxDialog), "key_press_event", GtkSignalFunc(messageBoxKey), reinterpret_cast(escapeResult)); if (style & MB_ABOUTBOX) { GtkWidget *explanation = scintilla_new(); scintilla_set_id(SCINTILLA(explanation), 0); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(messageBoxDialog)->vbox), explanation, TRUE, TRUE, 0); gtk_widget_set_usize(GTK_WIDGET(explanation), 480, 380); gtk_widget_show_all(explanation); SetAboutMessage(explanation, "sdlBasic IDE "); } else { GtkWidget *label = gtk_label_new(msg.c_str()); gtk_misc_set_padding(GTK_MISC(label), 10, 10); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(messageBoxDialog)->vbox), label, TRUE, TRUE, 0); gtk_widget_show(label); } // Mark it as a modal transient dialog gtk_window_set_modal(GTK_WINDOW(messageBoxDialog), TRUE); gtk_window_set_transient_for(GTK_WINDOW(messageBoxDialog), GTK_WINDOW(PWidget(w))); gtk_widget_show(messageBoxDialog); gtk_window_add_accel_group(GTK_WINDOW(messageBoxDialog), accel_group); while (messageBoxResult < 0) { gtk_main_iteration(); } dialogsOnScreen--; } return messageBoxResult; } void SciTEGTK::AboutDialog() { WindowMessageBox(wSciTE, "sdlBasic editor based on SciTE\nby Neil Hodgson neilh@scintilla.org .", MB_OK | MB_ABOUTBOX); } void SciTEGTK::QuitProgram() { if (SaveIfUnsureAll() != IDCANCEL) { #ifndef NO_FILER int fdPipe = props.GetInt("sdlbasic.ipc_fdpipe"); if (fdPipe != -1) { close(fdPipe); unlink(props.Get("sdlbasic.ipc_name").c_str()); } #else //clean up any pipes that are ours if (pipeFD != -1) { //printf("Cleaning up pipe\n"); close(pipeFD); unlink(pipeName); } #endif gtk_exit(0); } } gint SciTEGTK::MoveResize(GtkWidget *, GtkAllocation * /*allocation*/, SciTEGTK *scitew) { //Platform::DebugPrintf("SciTEGTK move resize %d %d\n", allocation->width, allocation->height); scitew->SizeSubWindows(); return TRUE; } gint SciTEGTK::QuitSignal(GtkWidget *, GdkEventAny *, SciTEGTK *scitew) { if (scitew->SaveIfUnsureAll() != IDCANCEL) { //clean up any pipes that are ours if (scitew->pipeFD != -1) { //printf("Cleaning up pipe\n"); close(scitew->pipeFD); unlink(scitew->pipeName); } gtk_exit(0); } // No need to return FALSE for quit as gtk_exit will have been called // if needed. return TRUE; } void SciTEGTK::ButtonSignal(GtkWidget *, gpointer data) { instance->Command((guint)data); } void SciTEGTK::MenuSignal(SciTEGTK *scitew, guint action, GtkWidget *) { //Platform::DebugPrintf("action %d %x \n", action, w); if (scitew->allowMenuActions) scitew->Command(action); } void SciTEGTK::CommandSignal(GtkWidget *, gint wParam, gpointer lParam, SciTEGTK *scitew) { //Platform::DebugPrintf("Command: %x %x %x\n", w, wParam, lParam); scitew->Command(wParam, reinterpret_cast(lParam)); } void SciTEGTK::NotifySignal(GtkWidget *, gint /*wParam*/, gpointer lParam, SciTEGTK *scitew) { //Platform::DebugPrintf("Notify: %x %x %x\n", w, wParam, lParam); scitew->Notify(reinterpret_cast(lParam)); } gint SciTEGTK::KeyPress(GtkWidget * /*widget*/, GdkEventKey *event, SciTEGTK *scitew) { return scitew->Key(event); } gint SciTEGTK::MousePress(GtkWidget * /*widget*/, GdkEventButton *event, SciTEGTK *scitew) { return scitew->Mouse(event); } // Translate key strokes that are not in a menu into commands class KeyToCommand { public: int modifiers; unsigned int key; // For alphabetic keys has to match the shift modifier. int msg; }; enum { m__ = 0, mS_ = GDK_SHIFT_MASK, m_C = GDK_CONTROL_MASK, mSC = GDK_SHIFT_MASK | GDK_CONTROL_MASK }; static KeyToCommand kmap[] = { {m_C, GDK_Tab, IDM_NEXTFILE}, {mSC, GDK_ISO_Left_Tab, IDM_PREVFILE}, {m_C, GDK_KP_Enter, IDM_COMPLETEWORD}, {m_C, GDK_F3, IDM_FINDNEXTSEL}, {mSC, GDK_F3, IDM_FINDNEXTBACKSEL}, {m_C, 'j', IDM_PREVMATCHPPC}, {mSC, 'J', IDM_SELECTTOPREVMATCHPPC}, {m_C, 'k', IDM_NEXTMATCHPPC}, {mSC, 'K', IDM_SELECTTONEXTMATCHPPC}, {m_C, GDK_KP_Multiply, IDM_EXPAND}, {0, 0, 0}, }; inline bool KeyMatch(const char *menuKey, int keyval, int modifiers) { return SciTEKeys::MatchKeyCode( SciTEKeys::ParseKeyCode(menuKey), keyval, modifiers); } gint SciTEGTK::Key(GdkEventKey *event) { //printf("S-key: %d %x %x %x %x\n",event->keyval, event->state, GDK_SHIFT_MASK, GDK_CONTROL_MASK, GDK_F3); int modifiers = event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK); int commandID = 0; for (int i = 0; kmap[i].msg; i++) { if ((event->keyval == kmap[i].key) && (modifiers == kmap[i].modifiers)) { commandID = kmap[i].msg; } } if (!commandID) { // Look through language menu for (int j = 0; j < languageItems; j++) { if (KeyMatch(languageMenu[j].menuKey.c_str(), event->keyval, modifiers)) { commandID = IDM_LANGUAGE + j; } } } if (commandID) { Command(commandID); } if ((commandID == IDM_NEXTFILE) || (commandID == IDM_PREVFILE)) { // Stop the default key processing from moving the focus gtk_signal_emit_stop_by_name( GTK_OBJECT(PWidget(wSciTE)), "key_press_event"); } // check tools menu command shortcuts // TODO: test this on GTK+ 1 and 2. for (int tool_i = 0; tool_i < toolMax; ++tool_i) { GtkWidget *item = gtk_item_factory_get_widget_by_action(itemFactory, IDM_TOOLS + tool_i); if (item) { long keycode = reinterpret_cast(gtk_object_get_user_data(GTK_OBJECT(item))); if (keycode && SciTEKeys::MatchKeyCode(keycode, event->keyval, modifiers)) { SciTEBase::MenuCommand(IDM_TOOLS + tool_i); return 1; } } } // check user defined keys for (int cut_i = 0; cut_i < shortCutItems; cut_i++) { if (KeyMatch(shortCutItemList[cut_i].menuKey.c_str(), event->keyval, modifiers)) { int commandNum = SciTEBase::GetMenuCommandAsInt(shortCutItemList[cut_i].menuCommand); if (commandNum != -1) { if (commandNum < 2000) { SciTEBase::MenuCommand(commandNum); } else { SciTEBase::SendFocused(commandNum); } gtk_signal_emit_stop_by_name( GTK_OBJECT(PWidget(wSciTE)), "key_press_event"); return 1; } } } return 0; } void SciTEGTK::AddToPopUp(const char *label, int cmd, bool enabled) { SString localised = LocaliseString(label); localised.insert(0, "/"); GtkItemFactoryEntry itemEntry = { const_cast(localised.c_str()), NULL, GTK_SIGNAL_FUNC(MenuSignal), cmd, const_cast(label[0] ? "" : "") #if GTK_MAJOR_VERSION >= 2 ,0 #endif }; gtk_item_factory_create_item(GTK_ITEM_FACTORY(popup.GetID()), &itemEntry, this, 1); if (cmd) { GtkWidget *item = gtk_item_factory_get_widget_by_action( reinterpret_cast(popup.GetID()), cmd); if (item) gtk_widget_set_sensitive(item, enabled); } } gint SciTEGTK::Mouse(GdkEventButton *event) { if (event->button == 3) { // PopUp menu Window w = wEditor; menuSource = IDM_SRCWIN; if (PWidget(w)->window != event->window) { if (PWidget(wOutput)->window == event->window) { menuSource = IDM_RUNWIN; w = wOutput; } else { menuSource = 0; //fprintf(stderr, "Menu source focus\n"); return FALSE; } } // Convert to screen int ox = 0; int oy = 0; gdk_window_get_origin(PWidget(w)->window, &ox, &oy); ContextMenu(w, Point(static_cast(event->x) + ox, static_cast(event->y) + oy), wSciTE); //fprintf(stderr, "Menu source %s\n", // (menuSource == IDM_SRCWIN) ? "IDM_SRCWIN" : "IDM_RUNWIN"); } else { menuSource = 0; //fprintf(stderr, "Menu source focus\n"); } return FALSE; } void SciTEGTK::DividerXOR(Point pt) { if (!xor_gc) { GdkGCValues values; values.foreground = PWidget(wSciTE)->style->white; values.function = GDK_XOR; values.subwindow_mode = GDK_INCLUDE_INFERIORS; xor_gc = gdk_gc_new_with_values(PWidget(wSciTE)->window, &values, static_cast( GDK_GC_FOREGROUND | GDK_GC_FUNCTION | GDK_GC_SUBWINDOW)); } if (splitVertical) { gdk_draw_line(PWidget(wSciTE)->window, xor_gc, pt.x, 0, pt.x, PWidget(wSciTE)->allocation.height - 1); } else { gdk_draw_line(PWidget(wSciTE)->window, xor_gc, 0, pt.y, PWidget(wSciTE)->allocation.width - 1, pt.y); } ptOld = pt; } gint SciTEGTK::DividerExpose(GtkWidget *widget, GdkEventExpose *, SciTEGTK *sciThis) { //GtkStyle style = gtk_widget_get_default_style(); GdkRectangle area; area.x = 0; area.y = 0; area.width = widget->allocation.width; area.height = widget->allocation.height; gdk_window_clear_area(widget->window, area.x, area.y, area.width, area.height); if (widget->allocation.width > widget->allocation.height) { // Horizontal divider gtk_paint_hline(widget->style, widget->window, GTK_STATE_NORMAL, &area, widget, const_cast("vpaned"), 0, widget->allocation.width - 1, area.height / 2 - 1); gtk_paint_box (widget->style, widget->window, GTK_STATE_NORMAL, GTK_SHADOW_OUT, &area, widget, const_cast("paned"), area.width - sciThis->heightBar * 2, 1, sciThis->heightBar - 2, sciThis->heightBar - 2); } else { // Vertical divider gtk_paint_vline(widget->style, widget->window, GTK_STATE_NORMAL, &area, widget, const_cast("hpaned"), 0, widget->allocation.height - 1, area.width / 2 - 1); gtk_paint_box (widget->style, widget->window, GTK_STATE_NORMAL, GTK_SHADOW_OUT, &area, widget, const_cast("paned"), 1, area.height - sciThis->heightBar * 2, sciThis->heightBar - 2, sciThis->heightBar - 2); } return TRUE; } gint SciTEGTK::DividerMotion(GtkWidget *, GdkEventMotion *event, SciTEGTK *scitew) { if (scitew->capturedMouse) { int x = 0; int y = 0; GdkModifierType state; if (event->is_hint) { gdk_window_get_pointer(PWidget(scitew->wSciTE)->window, &x, &y, &state); if (state & GDK_BUTTON1_MASK) { scitew->DividerXOR(scitew->ptOld); scitew->DividerXOR(Point(x, y)); } } } return TRUE; } gint SciTEGTK::DividerPress(GtkWidget *, GdkEventButton *, SciTEGTK *scitew) { int x = 0; int y = 0; GdkModifierType state; gdk_window_get_pointer(PWidget(scitew->wSciTE)->window, &x, &y, &state); scitew->ptStartDrag = Point(x, y); scitew->capturedMouse = true; scitew->heightOutputStartDrag = scitew->heightOutput; gtk_widget_grab_focus(GTK_WIDGET(PWidget(scitew->wDivider))); gtk_grab_add(GTK_WIDGET(PWidget(scitew->wDivider))); scitew->DividerXOR(scitew->ptStartDrag); return TRUE; } gint SciTEGTK::DividerRelease(GtkWidget *, GdkEventButton *, SciTEGTK *scitew) { if (scitew->capturedMouse) { scitew->capturedMouse = false; gtk_grab_remove(GTK_WIDGET(PWidget(scitew->wDivider))); scitew->DividerXOR(scitew->ptOld); int x = 0; int y = 0; GdkModifierType state; gdk_window_get_pointer(PWidget(scitew->wSciTE)->window, &x, &y, &state); scitew->MoveSplit(Point(x, y)); } return TRUE; } void SciTEGTK::DragDataReceived(GtkWidget *, GdkDragContext *context, gint /*x*/, gint /*y*/, GtkSelectionData *seldata, guint /*info*/, guint time, SciTEGTK *scitew) { scitew->OpenUriList(reinterpret_cast(seldata->data)); gtk_drag_finish(context, TRUE, FALSE, time); } void SciTEGTK::GtkTabBarSwitch(GtkNotebook *notebook, GdkEventButton *event) { if (event->button == 1) ButtonSignal(NULL,(gpointer)(bufferCmdID+gtk_notebook_get_current_page(notebook))); } void SciTEGTK::OpenCancelSignal(GtkWidget *, SciTEGTK *scitew) { scitew->dlgFileSelector.Cancel(); } gint SciTEGTK::OpenKeySignal(GtkWidget *w, GdkEventKey *event, SciTEGTK *scitew) { if (event->keyval == GDK_Escape) { gtk_signal_emit_stop_by_name(GTK_OBJECT(w), "key_press_event"); scitew->dlgFileSelector.Cancel(); } return FALSE; } void SciTEGTK::OpenOKSignal(GtkWidget *, SciTEGTK *scitew) { scitew->Open(gtk_file_selection_get_filename( GTK_FILE_SELECTION(PWidget(scitew->dlgFileSelector)))); scitew->dlgFileSelector.OK(); } void SciTEGTK::OpenSessionOKSignal(GtkWidget *, SciTEGTK *scitew) { scitew->LoadSession(gtk_file_selection_get_filename( GTK_FILE_SELECTION(PWidget(scitew->dlgFileSelector)))); scitew->dlgFileSelector.OK(); } void SciTEGTK::SaveSessionOKSignal(GtkWidget *, SciTEGTK *scitew) { scitew->SaveSession(gtk_file_selection_get_filename( GTK_FILE_SELECTION(PWidget(scitew->dlgFileSelector)))); scitew->dlgFileSelector.OK(); } void SciTEGTK::OpenResizeSignal(GtkWidget *, GtkAllocation *allocation, SciTEGTK *scitew) { scitew->fileSelectorWidth = allocation->width; scitew->fileSelectorHeight = allocation->height; } void SciTEGTK::SaveAsSignal(GtkWidget *, SciTEGTK *scitew) { scitew->HandleSaveAs(gtk_file_selection_get_filename( GTK_FILE_SELECTION(PWidget(scitew->dlgFileSelector)))); } void SetFocus(GtkWidget *hwnd) { Platform::SendScintilla(hwnd, SCI_GRABFOCUS, 0, 0); } GtkWidget *SciTEGTK::pixmap_new(GtkWidget *window, gchar **xpm) { GdkBitmap *mask = 0; /* now for the pixmap from gdk */ GtkStyle *style = gtk_widget_get_style(window); GdkPixmap *pixmap = gdk_pixmap_create_from_xpm_d( window->window, &mask, &style->bg[GTK_STATE_NORMAL], xpm); /* a pixmap widget to contain the pixmap */ GtkWidget *pixmapwid = gtk_pixmap_new(pixmap, mask); gtk_widget_show(pixmapwid); return pixmapwid; } GtkWidget *SciTEGTK::AddToolButton(const char *text, int cmd, GtkWidget *toolbar_icon) { GtkWidget *button = gtk_toolbar_append_element(GTK_TOOLBAR(PWidget(wToolBar)), GTK_TOOLBAR_CHILD_BUTTON, NULL, NULL, text, NULL, toolbar_icon, NULL, NULL); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC (ButtonSignal), (gpointer)cmd); return button; } void SciTEGTK::AddToolBar() { if (props.GetInt("toolbar.usestockicons") == 1) { AddToolButton("New", IDM_NEW, gtk_image_new_from_stock("gtk-new", GTK_ICON_SIZE_LARGE_TOOLBAR)); AddToolButton("Open", IDM_OPEN, gtk_image_new_from_stock("gtk-open", GTK_ICON_SIZE_LARGE_TOOLBAR)); AddToolButton("Save", IDM_SAVE, gtk_image_new_from_stock("gtk-save", GTK_ICON_SIZE_LARGE_TOOLBAR)); AddToolButton("Close", IDM_CLOSE, gtk_image_new_from_stock("gtk-close", GTK_ICON_SIZE_LARGE_TOOLBAR)); gtk_toolbar_append_space(GTK_TOOLBAR(PWidget(wToolBar))); AddToolButton("Undo", IDM_UNDO, gtk_image_new_from_stock("gtk-undo", GTK_ICON_SIZE_LARGE_TOOLBAR)); AddToolButton("Redo", IDM_REDO, gtk_image_new_from_stock("gtk-redo", GTK_ICON_SIZE_LARGE_TOOLBAR)); gtk_toolbar_append_space(GTK_TOOLBAR(PWidget(wToolBar))); AddToolButton("Find in Files", IDM_FINDINFILES, gtk_image_new_from_stock("gtk-find", GTK_ICON_SIZE_LARGE_TOOLBAR)); AddToolButton("Find", IDM_FIND, gtk_image_new_from_stock("gtk-zoom-fit", GTK_ICON_SIZE_LARGE_TOOLBAR)); AddToolButton("Find Next", IDM_FINDNEXT, gtk_image_new_from_stock("gtk-jump-to", GTK_ICON_SIZE_LARGE_TOOLBAR)); AddToolButton("Replace", IDM_REPLACE, gtk_image_new_from_stock("gtk-find-and-replace", GTK_ICON_SIZE_LARGE_TOOLBAR)); gtk_toolbar_append_space(GTK_TOOLBAR(PWidget(wToolBar))); btnGo = AddToolButton("Go", IDM_GO, gtk_image_new_from_stock("gtk-convert", GTK_ICON_SIZE_LARGE_TOOLBAR)); btnStop = AddToolButton("Stop", IDM_STOPEXECUTE, gtk_image_new_from_stock("gtk-stop", GTK_ICON_SIZE_LARGE_TOOLBAR)); gtk_toolbar_append_space(GTK_TOOLBAR(PWidget(wToolBar))); AddToolButton("Previous", IDM_PREVFILE, gtk_image_new_from_stock("gtk-go-back", GTK_ICON_SIZE_LARGE_TOOLBAR)); AddToolButton("Next Buffer", IDM_NEXTFILE, gtk_image_new_from_stock("gtk-go-forward", GTK_ICON_SIZE_LARGE_TOOLBAR)); } else { AddToolButton("New", IDM_NEW, pixmap_new(PWidget(wSciTE), filenew_xpm)); AddToolButton("Open", IDM_OPEN, pixmap_new(PWidget(wSciTE), fileopen_xpm)); AddToolButton("Save", IDM_SAVE, pixmap_new(PWidget(wSciTE), filesave_xpm)); AddToolButton("Close", IDM_CLOSE, pixmap_new(PWidget(wSciTE), close_xpm)); gtk_toolbar_append_space(GTK_TOOLBAR(PWidget(wToolBar))); AddToolButton("Undo", IDM_UNDO, pixmap_new(PWidget(wSciTE), undo_xpm)); AddToolButton("Redo", IDM_REDO, pixmap_new(PWidget(wSciTE), redo_xpm)); gtk_toolbar_append_space(GTK_TOOLBAR(PWidget(wToolBar))); //AddToolButton("Find in Files", IDM_FINDINFILES, pixmap_new(PWidget(wSciTE), findinfiles_xpm)); AddToolButton("Find", IDM_FIND, pixmap_new(PWidget(wSciTE), search_xpm)); AddToolButton("Find Next", IDM_FINDNEXT, pixmap_new(PWidget(wSciTE), findnext_xpm)); AddToolButton("Replace", IDM_REPLACE, pixmap_new(PWidget(wSciTE), replace_xpm)); gtk_toolbar_append_space(GTK_TOOLBAR(PWidget(wToolBar))); //AddToolButton("Clear All Bookmarks", IDM_BOOKMARK_CLEARALL, pixmap_new(PWidget(wSciTE), build_xpm)); AddToolButton("Toggle Bookmark", IDM_BOOKMARK_TOGGLE, pixmap_new(PWidget(wSciTE), togglebookmark_xpm)); AddToolButton("Previous Bookmark", IDM_BOOKMARK_PREV, pixmap_new(PWidget(wSciTE), previousbookmark_xpm)); AddToolButton("Next Bookmark", IDM_BOOKMARK_NEXT, pixmap_new(PWidget(wSciTE), nextbookmark_xpm)); // go - stop buttons gtk_toolbar_append_space(GTK_TOOLBAR(PWidget(wToolBar))); btnGo = AddToolButton("Go", IDM_GO, pixmap_new(PWidget(wSciTE), go_xpm)); btnStop = AddToolButton("Stop", IDM_STOPEXECUTE, pixmap_new(PWidget(wSciTE), stop_xpm)); //gtk_toolbar_append_space(GTK_TOOLBAR(PWidget(wToolBar))); //AddToolButton("Previous", IDM_PREVFILE, pixmap_new(PWidget(wSciTE), prev_xpm)); //AddToolButton("Next Buffer", IDM_NEXTFILE, pixmap_new(PWidget(wSciTE), next_xpm)); } } SString SciTEGTK::TranslatePath(const char *path) { if (path && path[0] == '/') { SString spathTranslated; SString spath(path, 1, strlen(path)); spath.append("/"); int end = spath.search("/"); while (spath.length() > 1) { SString segment(spath.c_str(), 0, end); SString segmentLocalised = LocaliseString(segment.c_str()); segmentLocalised.substitute("/", "|"); spathTranslated.append("/"); spathTranslated.append(segmentLocalised.c_str()); spath.remove(0, end + 1); end = spath.search("/"); } return spathTranslated; } else { return path; } } void SciTEGTK::CreateTranslatedMenu(int n, SciTEItemFactoryEntry items[], int nRepeats, const char *prefix, int startNum, int startID, const char *radioStart) { char *gthis = reinterpret_cast(this); int dim = n + nRepeats; GtkItemFactoryEntry *translatedItems = new GtkItemFactoryEntry[dim]; SString *translatedText = new SString[dim]; SString *translatedRadios = new SString[dim]; char **userDefinedAccels = new char*[n]; SString menuPath; int i = 0; for (; i < n; i++) { // Try to find user-defined accelerator key menuPath = "menukey"; // menupath="menukey" menuPath += items[i].path; // menupath="menukey/File/Save _As..." menuPath.remove("_"); // menupath="menukey/File/Save As..." menuPath.remove("."); // menupath="menukey/File/Save As" menuPath.substitute('/', '.'); // menupath="menukey.File.Save As" menuPath.substitute(' ', '_'); // menupath="menukey.File.Save_As" menuPath.lowercase(); // menupath="menukey.file.save_as" SString accelKey = props.Get(menuPath.c_str()); int accLength = accelKey.length(); if (accLength > 0) { if (accelKey == "\"\"" || accelKey == "none") { accelKey.clear(); // Allow user to clear accelerator key } userDefinedAccels[i] = new char[accLength + 1]; strncpy(userDefinedAccels[i], accelKey.c_str(), accLength + 1); items[i].accelerator = userDefinedAccels[i]; } else { userDefinedAccels[i] = NULL; } translatedItems[i].path = items[i].path; translatedItems[i].accelerator = items[i].accelerator; translatedItems[i].callback = items[i].callback; translatedItems[i].callback_action = items[i].callback_action; translatedItems[i].item_type = items[i].item_type; #if GTK_MAJOR_VERSION >= 2 translatedItems[i].extra_data = 0; #endif translatedText[i] = TranslatePath(translatedItems[i].path); translatedItems[i].path = const_cast(translatedText[i].c_str()); translatedRadios[i] = TranslatePath(translatedItems[i].item_type); translatedItems[i].item_type = const_cast(translatedRadios[i].c_str()); } GtkItemFactoryCallback menuSig = GtkItemFactoryCallback(MenuSignal); for (; i < dim; i++) { int suffix = i - n + startNum; SString ssnum(suffix); translatedText[i] = TranslatePath(prefix); translatedText[i] += ssnum; translatedItems[i].path = const_cast(translatedText[i].c_str()); translatedItems[i].accelerator = NULL; translatedItems[i].callback = menuSig; translatedItems[i].callback_action = startID + suffix; translatedRadios[i] = TranslatePath(radioStart); translatedItems[i].item_type = const_cast(translatedRadios[i].c_str()); } gtk_item_factory_create_items(itemFactory, dim, translatedItems, gthis); delete []translatedRadios; delete []translatedText; delete []translatedItems; // Release all the memory allocated for the user-defined accelerator keys for (i = 0; i < n; i++) { if (userDefinedAccels[i] != NULL) delete[] userDefinedAccels[i]; } delete[] userDefinedAccels; } #define ELEMENTS(a) (sizeof(a) / sizeof(a[0])) void SciTEGTK::CreateMenu() { GtkItemFactoryCallback menuSig = GtkItemFactoryCallback(MenuSignal); SciTEItemFactoryEntry menuItems[] = { {"/_File", NULL, NULL, 0, ""}, {"/File/_New", "N", menuSig, IDM_NEW, 0}, {"/File/_Open...", "O", menuSig, IDM_OPEN, 0}, {"/File/Open Selected _Filename", "O", menuSig, IDM_OPENSELECTED, 0}, {"/File/_Revert", "R", menuSig, IDM_REVERT, 0}, {"/File/_Close", "W", menuSig, IDM_CLOSE, 0}, {"/File/_Save", "S", menuSig, IDM_SAVE, 0}, {"/File/Save _As...", "S", menuSig, IDM_SAVEAS, 0}, {"/File/Save a Co_py...", "P", menuSig, IDM_SAVEACOPY, 0}, {"/File/Encodin_g", NULL, NULL, 0, ""}, {"/File/Encoding/_8 Bit", NULL, menuSig, IDM_ENCODING_DEFAULT, ""}, {"/File/Encoding/UCS-2 _Big Endian", NULL, menuSig, IDM_ENCODING_UCS2BE, "/File/Encoding/8 Bit"}, {"/File/Encoding/UCS-2 _Little Endian", NULL, menuSig, IDM_ENCODING_UCS2LE, "/File/Encoding/8 Bit"}, {"/File/Encoding/_UTF-8", NULL, menuSig, IDM_ENCODING_UTF8, "/File/Encoding/8 Bit"}, {"/File/Encoding/UTF-8 _Cookie", NULL, menuSig, IDM_ENCODING_UCOOKIE, "/File/Encoding/8 Bit"}, {"/File/_Export", "", 0, 0, ""}, {"/File/Export/As _HTML...", NULL, menuSig, IDM_SAVEASHTML, 0}, {"/File/Export/As _RTF...", NULL, menuSig, IDM_SAVEASRTF, 0}, {"/File/Export/As _PDF...", NULL, menuSig, IDM_SAVEASPDF, 0}, {"/File/Export/As _LaTeX...", NULL, menuSig, IDM_SAVEASTEX, 0}, {"/File/Export/As _XML...", NULL, menuSig, IDM_SAVEASXML, 0}, {"/File/_Print", "P", menuSig, IDM_PRINT, 0}, {"/File/sep1", NULL, NULL, 0, ""}, {"/File/Load Session...", "", menuSig, IDM_LOADSESSION, 0}, {"/File/Save Session...", "", menuSig, IDM_SAVESESSION, 0}, {"/File/sep2", NULL, menuSig, IDM_MRU_SEP, ""}, {"/File/File0", "", menuSig, fileStackCmdID + 0, 0}, {"/File/File1", "", menuSig, fileStackCmdID + 1, 0}, {"/File/File2", "", menuSig, fileStackCmdID + 2, 0}, {"/File/File3", "", menuSig, fileStackCmdID + 3, 0}, {"/File/File4", "", menuSig, fileStackCmdID + 4, 0}, {"/File/File5", "", menuSig, fileStackCmdID + 5, 0}, {"/File/File6", "", menuSig, fileStackCmdID + 6, 0}, {"/File/File7", "", menuSig, fileStackCmdID + 7, 0}, {"/File/File8", "", menuSig, fileStackCmdID + 8, 0}, {"/File/File9", "", menuSig, fileStackCmdID + 9, 0}, {"/File/sep3", NULL, NULL, 0, ""}, {"/File/E_xit", "", menuSig, IDM_QUIT, 0}, {"/_Edit", NULL, NULL, 0, ""}, {"/Edit/_Undo", "Z", menuSig, IDM_UNDO, 0}, {"/Edit/_Redo", "Y", menuSig, IDM_REDO, 0}, {"/Edit/sep1", NULL, NULL, 0, ""}, {"/Edit/Cu_t", "X", menuSig, IDM_CUT, 0}, {"/Edit/_Copy", "C", menuSig, IDM_COPY, 0}, {"/Edit/_Paste", "V", menuSig, IDM_PASTE, 0}, {"/Edit/_Delete", "Del", menuSig, IDM_CLEAR, 0}, {"/Edit/Select _All", "A", menuSig, IDM_SELECTALL, 0}, {"/Edit/sep2", NULL, NULL, 0, ""}, {"/Edit/Match _Brace", "E", menuSig, IDM_MATCHBRACE, 0}, {"/Edit/Select t_o Brace", "E", menuSig, IDM_SELECTTOBRACE, 0}, {"/Edit/S_how Calltip", "T", menuSig, IDM_SHOWCALLTIP, 0}, {"/Edit/sep2", NULL, NULL, 0, ""}, {"/Edit/Complete S_ymbol", "I", menuSig, IDM_COMPLETE, 0}, {"/Edit/Complete _Word", "Return", menuSig, IDM_COMPLETEWORD, 0}, {"/Edit/_Expand Abbreviation", "B", menuSig, IDM_ABBREV, 0}, //{"/Edit/_Insert Abbreviation", "D", menuSig, IDM_INS_ABBREV, 0}, {"/Edit/sep2", NULL, NULL, 0, ""}, {"/Edit/Block Co_mment or Uncomment", "Q", menuSig, IDM_BLOCK_COMMENT, 0}, //{"/Edit/Bo_x Comment", "B", menuSig, IDM_BOX_COMMENT, 0}, //{"/Edit/Stream Comme_nt", "Q", menuSig, IDM_STREAM_COMMENT, 0}, {"/Edit/Make _Selection Uppercase", "U", menuSig, IDM_UPRCASE, 0}, {"/Edit/Make Selection _Lowercase", "L", menuSig, IDM_LWRCASE, 0}, //{"/Edit/Para_graph", NULL, NULL, 0, ""}, //{"/Edit/Para_graph/_Join", NULL, menuSig, IDM_JOIN, 0}, //{"/Edit/Para_graph/_Split", NULL, menuSig, IDM_SPLIT, 0}, {"/_Search", NULL, NULL, 0, ""}, {"/Search/_Find...", "F", menuSig, IDM_FIND, 0}, {"/Search/Find _Next", "F3", menuSig, IDM_FINDNEXT, 0}, {"/Search/Find Previou_s", "F3", menuSig, IDM_FINDNEXTBACK, 0}, {"/Search/F_ind in Files...", "F", menuSig, IDM_FINDINFILES, 0}, {"/Search/R_eplace...", "H", menuSig, IDM_REPLACE, 0}, #ifdef INCREMENTAL_SEARCH {"/Search/Incrementa&l Search", "I", menuSig, IDM_INCSEARCH, 0}, #endif {"/Search/sep3", NULL, NULL, 0, ""}, {"/Search/_Go To...", "G", menuSig, IDM_GOTO, 0}, {"/Search/Next Book_mark", "F2", menuSig, IDM_BOOKMARK_NEXT, 0}, {"/Search/Pre_vious Bookmark", "F2", menuSig, IDM_BOOKMARK_PREV, 0}, {"/Search/Toggle Bookmar_k", "M", menuSig, IDM_BOOKMARK_TOGGLE, 0}, {"/Search/_Clear All Bookmarks", "", menuSig, IDM_BOOKMARK_CLEARALL, 0}, {"/_View", NULL, NULL, 0, ""}, {"/View/Toggle _current fold", "", menuSig, IDM_EXPAND, 0}, {"/View/Toggle _all folds", "", menuSig, IDM_TOGGLE_FOLDALL, 0}, {"/View/sep1", NULL, NULL, 0, ""}, {"/View/Full Scree_n", "F11", menuSig, IDM_FULLSCREEN, ""}, {"/View/_Tool Bar", "", menuSig, IDM_VIEWTOOLBAR, ""}, #if GTK_MAJOR_VERSION >= 2 {"/View/Tab _Bar", "", menuSig, IDM_VIEWTABBAR, ""}, #endif {"/View/_Status Bar", "", menuSig, IDM_VIEWSTATUSBAR, ""}, {"/View/sep2", NULL, NULL, 0, ""}, {"/View/_Whitespace", "A", menuSig, IDM_VIEWSPACE, ""}, {"/View/_End of Line", "D", menuSig, IDM_VIEWEOL, ""}, {"/View/_Indentation Guides", NULL, menuSig, IDM_VIEWGUIDES, ""}, {"/View/_Line Numbers", "", menuSig, IDM_LINENUMBERMARGIN, ""}, {"/View/_Margin", NULL, menuSig, IDM_SELMARGIN, ""}, {"/View/_Fold Margin", NULL, menuSig, IDM_FOLDMARGIN, ""}, //{"/View/_Output", "F8", menuSig, IDM_TOGGLEOUTPUT, ""}, //{"/View/_Parameters", NULL, menuSig, IDM_TOGGLEPARAMETERS, ""}, {"/_Tools", NULL, NULL, 0, ""}, {"/Tools/_Go", "F5", menuSig, IDM_GO, 0}, {"/Tools/_Stop Executing", ".", menuSig, IDM_STOPEXECUTE, NULL}, {"/Tools/sep1", NULL, NULL, 0, ""}, //{"/Tools/_Next Message", "F4", menuSig, IDM_NEXTMSG, 0}, //{"/Tools/_Previous Message", "F4", menuSig, IDM_PREVMSG, 0}, //{"/Tools/Clear _Output", "F5", menuSig, IDM_CLEAROUTPUT, 0}, {"/Tools/_Switch Pane", "F6", menuSig, IDM_SWITCHPANE, 0}, {"/_Plugins", NULL, NULL, 0, ""}, {"/Plugins/Tool0", NULL, menuSig, IDM_TOOLS + 0, 0}, {"/Plugins/Tool1", NULL, menuSig, IDM_TOOLS + 1, 0}, {"/Plugins/Tool2", NULL, menuSig, IDM_TOOLS + 2, 0}, {"/Plugins/Tool3", NULL, menuSig, IDM_TOOLS + 3, 0}, {"/Plugins/Tool4", NULL, menuSig, IDM_TOOLS + 4, 0}, {"/Plugins/Tool5", NULL, menuSig, IDM_TOOLS + 5, 0}, {"/Plugins/Tool6", NULL, menuSig, IDM_TOOLS + 6, 0}, {"/Plugins/Tool7", NULL, menuSig, IDM_TOOLS + 7, 0}, {"/Plugins/Tool8", NULL, menuSig, IDM_TOOLS + 8, 0}, {"/Plugins/Tool9", NULL, menuSig, IDM_TOOLS + 9, 0}, {"/Plugins/Tool10", NULL, menuSig, IDM_TOOLS + 10, 0}, {"/Plugins/Tool11", NULL, menuSig, IDM_TOOLS + 11, 0}, {"/Plugins/Tool12", NULL, menuSig, IDM_TOOLS + 12, 0}, {"/Plugins/Tool13", NULL, menuSig, IDM_TOOLS + 13, 0}, {"/Plugins/Tool14", NULL, menuSig, IDM_TOOLS + 14, 0}, {"/Plugins/Tool15", NULL, menuSig, IDM_TOOLS + 15, 0}, {"/Plugins/Tool16", NULL, menuSig, IDM_TOOLS + 16, 0}, {"/Plugins/Tool17", NULL, menuSig, IDM_TOOLS + 17, 0}, {"/Plugins/Tool18", NULL, menuSig, IDM_TOOLS + 18, 0}, {"/Plugins/Tool19", NULL, menuSig, IDM_TOOLS + 19, 0}, {"/Plugins/Tool20", NULL, menuSig, IDM_TOOLS + 20, 0}, {"/Plugins/Tool21", NULL, menuSig, IDM_TOOLS + 21, 0}, {"/Plugins/Tool22", NULL, menuSig, IDM_TOOLS + 22, 0}, {"/Plugins/Tool23", NULL, menuSig, IDM_TOOLS + 23, 0}, {"/Plugins/Tool24", NULL, menuSig, IDM_TOOLS + 24, 0}, {"/Plugins/Tool25", NULL, menuSig, IDM_TOOLS + 25, 0}, {"/Plugins/Tool26", NULL, menuSig, IDM_TOOLS + 26, 0}, {"/Plugins/Tool27", NULL, menuSig, IDM_TOOLS + 27, 0}, {"/Plugins/Tool28", NULL, menuSig, IDM_TOOLS + 28, 0}, {"/Plugins/Tool29", NULL, menuSig, IDM_TOOLS + 29, 0}, {"/Plugins/Tool30", NULL, menuSig, IDM_TOOLS + 30, 0}, {"/Plugins/Tool31", NULL, menuSig, IDM_TOOLS + 31, 0}, {"/Plugins/Tool32", NULL, menuSig, IDM_TOOLS + 32, 0}, {"/Plugins/Tool33", NULL, menuSig, IDM_TOOLS + 33, 0}, {"/Plugins/Tool34", NULL, menuSig, IDM_TOOLS + 34, 0}, {"/Plugins/Tool35", NULL, menuSig, IDM_TOOLS + 35, 0}, {"/Plugins/Tool36", NULL, menuSig, IDM_TOOLS + 36, 0}, {"/Plugins/Tool37", NULL, menuSig, IDM_TOOLS + 37, 0}, {"/Plugins/Tool38", NULL, menuSig, IDM_TOOLS + 38, 0}, {"/Plugins/Tool39", NULL, menuSig, IDM_TOOLS + 39, 0}, {"/Plugins/Tool40", NULL, menuSig, IDM_TOOLS + 40, 0}, {"/Plugins/Tool41", NULL, menuSig, IDM_TOOLS + 41, 0}, {"/Plugins/Tool42", NULL, menuSig, IDM_TOOLS + 42, 0}, {"/Plugins/Tool43", NULL, menuSig, IDM_TOOLS + 43, 0}, {"/Plugins/Tool44", NULL, menuSig, IDM_TOOLS + 44, 0}, {"/Plugins/Tool45", NULL, menuSig, IDM_TOOLS + 45, 0}, {"/Plugins/Tool46", NULL, menuSig, IDM_TOOLS + 46, 0}, {"/Plugins/Tool47", NULL, menuSig, IDM_TOOLS + 47, 0}, {"/Plugins/Tool48", NULL, menuSig, IDM_TOOLS + 48, 0}, {"/Plugins/Tool49", NULL, menuSig, IDM_TOOLS + 49, 0}, }; SciTEItemFactoryEntry menuItemsOptions[] = { {"/_Options", NULL, NULL, 0, ""}, {"/Options/Vertical _Split", "", menuSig, IDM_SPLITVERTICAL, ""}, {"/Options/_Wrap", "", menuSig, IDM_WRAP, ""}, {"/Options/Wrap Out_put", "", menuSig, IDM_WRAPOUTPUT, ""}, {"/Options/_Read-Only", "", menuSig, IDM_READONLY, ""}, {"/Options/sep1", NULL, NULL, 0, ""}, {"/Options/_Line End Characters", "", 0, 0, ""}, {"/Options/Line End Characters/CR _+ LF", "", menuSig, IDM_EOL_CRLF, ""}, {"/Options/Line End Characters/_CR", "", menuSig, IDM_EOL_CR, "/Options/Line End Characters/CR + LF"}, {"/Options/Line End Characters/_LF", "", menuSig, IDM_EOL_LF, "/Options/Line End Characters/CR + LF"}, {"/Options/_Convert Line End Characters", "", menuSig, IDM_EOL_CONVERT, 0}, {"/Options/sep2", NULL, NULL, 0, ""}, {"/Options/Use _Monospaced Font", "F11", menuSig, IDM_MONOFONT, ""}, {"/Options/sep3", NULL, NULL, 0, ""}, {"/Options/Open Local _Options File", "", menuSig, IDM_OPENLOCALPROPERTIES, 0}, {"/Options/Open _User Options File", "", menuSig, IDM_OPENUSERPROPERTIES, 0}, {"/Options/Open _Global Options File", "", menuSig, IDM_OPENGLOBALPROPERTIES, 0}, {"/Options/Open A_bbreviations File", "", menuSig, IDM_OPENABBREVPROPERTIES, 0}, {"/Options/sep4", NULL, NULL, 0, ""}, {"/Options/Edit Properties", "", 0, 0, ""}, }; //SciTEItemFactoryEntry menuItemsLanguage[] = { // {"/_Language", NULL, NULL, 0, ""}, // }; SciTEItemFactoryEntry menuItemsBuffer[] = { {"/_Buffers", NULL, NULL, 0, ""}, {"/Buffers/_Previous", "F6", menuSig, IDM_PREVFILE, 0}, {"/Buffers/_Next", "F6", menuSig, IDM_NEXTFILE, 0}, {"/Buffers/_Close All", "", menuSig, IDM_CLOSEALL, 0}, {"/Buffers/_Save All", "", menuSig, IDM_SAVEALL, 0}, {"/Buffers/sep2", NULL, NULL, 0, ""}, {"/Buffers/Buffer0", "1", menuSig, bufferCmdID + 0, ""}, {"/Buffers/Buffer1", "2", menuSig, bufferCmdID + 1, "/Buffers/Buffer0"}, {"/Buffers/Buffer2", "3", menuSig, bufferCmdID + 2, "/Buffers/Buffer0"}, {"/Buffers/Buffer3", "4", menuSig, bufferCmdID + 3, "/Buffers/Buffer0"}, {"/Buffers/Buffer4", "5", menuSig, bufferCmdID + 4, "/Buffers/Buffer0"}, {"/Buffers/Buffer5", "6", menuSig, bufferCmdID + 5, "/Buffers/Buffer0"}, {"/Buffers/Buffer6", "7", menuSig, bufferCmdID + 6, "/Buffers/Buffer0"}, {"/Buffers/Buffer7", "8", menuSig, bufferCmdID + 7, "/Buffers/Buffer0"}, {"/Buffers/Buffer8", "9", menuSig, bufferCmdID + 8, "/Buffers/Buffer0"}, {"/Buffers/Buffer9", "0", menuSig, bufferCmdID + 9, "/Buffers/Buffer0"}, }; SciTEItemFactoryEntry menuItemsHelp[] = { {"/_Help", NULL, NULL, 0, ""}, {"/Help/Quick _Help", "F1", menuSig, IDM_HELP, 0}, {"/Help/_sdlBasic Reference Guide", "", menuSig, IDM_HELP_SCITE, 0}, {"/Help/_About sdlBasic IDE", "", menuSig, IDM_ABOUT, 0}, }; accelGroup = gtk_accel_group_new(); itemFactory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "
", accelGroup); CreateTranslatedMenu(ELEMENTS(menuItems), menuItems); CreateTranslatedMenu(ELEMENTS(menuItemsOptions), menuItemsOptions, 50, "/Options/Edit Properties/Props", 0, IDM_IMPORT, 0); //CreateTranslatedMenu(ELEMENTS(menuItemsLanguage), menuItemsLanguage, // 60, "/Language/Language", 0, IDM_LANGUAGE, 0); if (props.GetInt("buffers") > 1) CreateTranslatedMenu(ELEMENTS(menuItemsBuffer), menuItemsBuffer, 30, "/Buffers/Buffer", 10, bufferCmdID, "/Buffers/Buffer0"); CreateTranslatedMenu(ELEMENTS(menuItemsHelp), menuItemsHelp); #if GTK_MAJOR_VERSION < 2 gtk_accel_group_attach(accelGroup, GTK_OBJECT(PWidget(wSciTE))); #else gtk_window_add_accel_group(GTK_WINDOW(PWidget(wSciTE)), accelGroup); #endif } void SciTEGTK::CreateUI() { wSciTE = gtk_window_new(GTK_WINDOW_TOPLEVEL); //GTK_WIDGET_UNSET_FLAGS(PWidget(wSciTE), GTK_CAN_FOCUS); gtk_window_set_policy(GTK_WINDOW(PWidget(wSciTE)), TRUE, TRUE, FALSE); char *gthis = reinterpret_cast(this); gtk_widget_set_events(PWidget(wSciTE), GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK ); gtk_signal_connect(GTK_OBJECT(PWidget(wSciTE)), "delete_event", GTK_SIGNAL_FUNC(QuitSignal), gthis); gtk_signal_connect(GTK_OBJECT(PWidget(wSciTE)), "key_press_event", GtkSignalFunc(KeyPress), gthis); gtk_signal_connect(GTK_OBJECT(PWidget(wSciTE)), "button_press_event", GtkSignalFunc(MousePress), gthis); gtk_window_set_title(GTK_WINDOW(PWidget(wSciTE)), appName); const int useDefault = 0x10000000; int left = props.GetInt("position.left", useDefault); int top = props.GetInt("position.top", useDefault); int width = props.GetInt("position.width", useDefault); int height = props.GetInt("position.height", useDefault); bool maximize = false; if (width == -1 || height == -1) { maximize = true; width = gdk_screen_width() - left - 10; height = gdk_screen_height() - top - 30; } fileSelectorWidth = props.GetInt("fileselector.width", fileSelectorWidth); fileSelectorHeight = props.GetInt("fileselector.height", fileSelectorHeight); GtkWidget *boxMain = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(PWidget(wSciTE)), boxMain); GTK_WIDGET_UNSET_FLAGS(boxMain, GTK_CAN_FOCUS); // The Menubar CreateMenu(); if (props.GetInt("menubar.detachable") == 1) { GtkWidget *handle_box = gtk_handle_box_new(); gtk_container_add(GTK_CONTAINER(handle_box), gtk_item_factory_get_widget(itemFactory, "
")); gtk_box_pack_start(GTK_BOX(boxMain), handle_box, FALSE, FALSE, 0); } else { gtk_box_pack_start(GTK_BOX(boxMain), gtk_item_factory_get_widget(itemFactory, "
"), FALSE, FALSE, 0); } // The Toolbar #if GTK_MAJOR_VERSION < 2 wToolBar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS); #else wToolBar = gtk_toolbar_new(); gtk_toolbar_set_orientation(GTK_TOOLBAR(PWidget(wToolBar)), GTK_ORIENTATION_HORIZONTAL); #endif gtk_toolbar_set_style(GTK_TOOLBAR(PWidget(wToolBar)), GTK_TOOLBAR_ICONS); toolbarDetachable = props.GetInt("toolbar.detachable"); if (toolbarDetachable == 1) { wToolBarBox = gtk_handle_box_new(); gtk_container_add(GTK_CONTAINER(PWidget(wToolBarBox)), PWidget(wToolBar)); gtk_box_pack_start(GTK_BOX(boxMain), PWidget(wToolBarBox), FALSE, FALSE, 0); gtk_widget_hide(GTK_WIDGET(PWidget(wToolBarBox))); } else { gtk_box_pack_start(GTK_BOX(boxMain), PWidget(wToolBar), FALSE, FALSE, 0); gtk_widget_hide(GTK_WIDGET(PWidget(wToolBar))); } gtk_container_set_border_width(GTK_CONTAINER(PWidget(wToolBar)), 0); #if GTK_MAJOR_VERSION < 2 gtk_toolbar_set_space_size(GTK_TOOLBAR(PWidget(wToolBar)), 17); gtk_toolbar_set_space_style(GTK_TOOLBAR(PWidget(wToolBar)), GTK_TOOLBAR_SPACE_LINE); gtk_toolbar_set_button_relief(GTK_TOOLBAR(PWidget(wToolBar)), GTK_RELIEF_NONE); #endif tbVisible = false; // The Notebook (GTK2) #if GTK_MAJOR_VERSION >= 2 wTabBar = gtk_notebook_new(); GTK_WIDGET_UNSET_FLAGS(PWidget(wTabBar),GTK_CAN_FOCUS); gtk_box_pack_start(GTK_BOX(boxMain),PWidget(wTabBar),FALSE,FALSE,0); gtk_signal_connect(GTK_OBJECT(PWidget(wTabBar)),"button-release-event",GTK_SIGNAL_FUNC(GtkTabBarSwitch),NULL); #endif tabVisible = false; wContent = gtk_fixed_new(); GTK_WIDGET_UNSET_FLAGS(PWidget(wContent), GTK_CAN_FOCUS); gtk_box_pack_start(GTK_BOX(boxMain), PWidget(wContent), TRUE, TRUE, 0); gtk_signal_connect(GTK_OBJECT(PWidget(wContent)), "size_allocate", GTK_SIGNAL_FUNC(MoveResize), gthis); wEditor = scintilla_new(); scintilla_set_id(SCINTILLA(PWidget(wEditor)), IDM_SRCWIN); fnEditor = reinterpret_cast(Platform::SendScintilla( PWidget(wEditor), SCI_GETDIRECTFUNCTION, 0, 0)); ptrEditor = Platform::SendScintilla(PWidget(wEditor), SCI_GETDIRECTPOINTER, 0, 0); SendEditor(SCI_USEPOPUP, 0); gtk_fixed_put(GTK_FIXED(PWidget(wContent)), PWidget(wEditor), 0, 0); gtk_signal_connect(GTK_OBJECT(PWidget(wEditor)), "command", GtkSignalFunc(CommandSignal), this); gtk_signal_connect(GTK_OBJECT(PWidget(wEditor)), SCINTILLA_NOTIFY, GtkSignalFunc(NotifySignal), this); wDivider = gtk_drawing_area_new(); gtk_signal_connect(GTK_OBJECT(PWidget(wDivider)), "expose_event", GtkSignalFunc(DividerExpose), this); gtk_signal_connect(GTK_OBJECT(PWidget(wDivider)), "motion_notify_event", GtkSignalFunc(DividerMotion), this); gtk_signal_connect(GTK_OBJECT(PWidget(wDivider)), "button_press_event", GtkSignalFunc(DividerPress), this); gtk_signal_connect(GTK_OBJECT(PWidget(wDivider)), "button_release_event", GtkSignalFunc(DividerRelease), this); gtk_widget_set_events(PWidget(wDivider), GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK ); gtk_drawing_area_size(GTK_DRAWING_AREA(PWidget(wDivider)), (width == useDefault) ? 100 : width, 10); gtk_fixed_put(GTK_FIXED(PWidget(wContent)), PWidget(wDivider), 0, 600); wOutput = scintilla_new(); scintilla_set_id(SCINTILLA(PWidget(wOutput)), IDM_RUNWIN); fnOutput = reinterpret_cast(Platform::SendScintilla( PWidget(wOutput), SCI_GETDIRECTFUNCTION, 0, 0)); ptrOutput = Platform::SendScintilla(PWidget(wOutput), SCI_GETDIRECTPOINTER, 0, 0); SendOutput(SCI_USEPOPUP, 0); gtk_fixed_put(GTK_FIXED(PWidget(wContent)), PWidget(wOutput), (width == useDefault) ? 100 : width, 0); gtk_signal_connect(GTK_OBJECT(PWidget(wOutput)), "command", GtkSignalFunc(CommandSignal), this); gtk_signal_connect(GTK_OBJECT(PWidget(wOutput)), SCINTILLA_NOTIFY, GtkSignalFunc(NotifySignal), this); #ifdef INCREMENTAL_SEARCH GtkWidget *table = gtk_table_new(1, 2, FALSE); wIncrementPanel = table; gtk_box_pack_start(GTK_BOX(boxMain), table, FALSE, FALSE, 0); GtkAttachOptions opts = static_cast( GTK_EXPAND | GTK_SHRINK | GTK_FILL); GtkWidget *label = TranslatedLabel("Search for:"); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, opts, opts, 5, 5); gtk_widget_show(label); IncSearchEntry = gtk_entry_new(); gtk_table_attach(GTK_TABLE(table), IncSearchEntry, 1, 2, 0, 1, opts, opts, 5, 5); gtk_signal_connect(GTK_OBJECT(IncSearchEntry),"activate", GtkSignalFunc(FindIncrementCompleteSignal), this); gtk_signal_connect(GTK_OBJECT(IncSearchEntry), "key_press_event", GtkSignalFunc(FindIncrementEscapeSignal), this); gtk_signal_connect(GTK_OBJECT(IncSearchEntry),"changed", GtkSignalFunc(FindIncrementSignal), this); gtk_signal_connect(GTK_OBJECT(IncSearchEntry),"focus-out-event", GtkSignalFunc(FindIncrementCompleteSignal), this); gtk_widget_show(IncSearchEntry); #endif SendOutput(SCI_SETMARGINWIDTHN, 1, 0); wStatusBar = gtk_statusbar_new(); sbContextID = gtk_statusbar_get_context_id( GTK_STATUSBAR(PWidget(wStatusBar)), "global"); gtk_box_pack_start(GTK_BOX(boxMain), PWidget(wStatusBar), FALSE, FALSE, 0); gtk_statusbar_push(GTK_STATUSBAR(PWidget(wStatusBar)), sbContextID, "Initial"); sbVisible = false; static const GtkTargetEntry dragtypes[] = { { "text/uri-list", 0, 0 } }; static const gint n_dragtypes = sizeof(dragtypes) / sizeof(dragtypes[0]); gtk_drag_dest_set(PWidget(wSciTE), GTK_DEST_DEFAULT_ALL, dragtypes, n_dragtypes, GDK_ACTION_COPY); (void)gtk_signal_connect(GTK_OBJECT(PWidget(wSciTE)), "drag_data_received", GTK_SIGNAL_FUNC(DragDataReceived), this); SetFocus(PWidget(wOutput)); if ((left != useDefault) && (top != useDefault)) gtk_widget_set_uposition(GTK_WIDGET(PWidget(wSciTE)), left, top); if ((width != useDefault) && (height != useDefault)) gtk_window_set_default_size(GTK_WINDOW(PWidget(wSciTE)), width, height); gtk_widget_show_all(PWidget(wSciTE)); SetIcon(); #if GTK_MAJOR_VERSION >= 2 if (maximize) gtk_window_maximize(GTK_WINDOW(PWidget(wSciTE))); #endif UIAvailable(); #ifdef INCREMENTAL_SEARCH gtk_widget_hide(wIncrementPanel); #endif } void SciTEGTK::FindIncrementSignal(GtkWidget *entry, SciTEGTK *scitew) { const char *lineEntry = gtk_entry_get_text(GTK_ENTRY(entry)); Platform::DebugPrintf("Output in console"); SString ffLastWhat; ffLastWhat = scitew->findWhat; scitew->findWhat = lineEntry; scitew->wholeWord = false; if (scitew->findWhat != "") { scitew->FindNext(false, false); if ((!scitew->havefound) && (ffLastWhat.length() == scitew->findWhat.length()-1)) { scitew->findWhat = ffLastWhat; gtk_entry_set_text(GTK_ENTRY(scitew->IncSearchEntry), scitew->findWhat.c_str()); gtk_editable_set_position(GTK_EDITABLE(scitew->IncSearchEntry), scitew->findWhat.length()); } } } void SciTEGTK::FindIncrementEscapeSignal(GtkWidget *w, GdkEventKey *event, SciTEGTK *scitew) { if (event->keyval == GDK_Escape) { gtk_signal_emit_stop_by_name(GTK_OBJECT(w), "key_press_event"); gtk_widget_hide(scitew->wIncrementPanel); SetFocus(PWidget(scitew->wEditor)); } } void SciTEGTK::FindIncrementCompleteSignal(GtkWidget *, SciTEGTK *scitew) { gtk_widget_hide(scitew->wIncrementPanel); SetFocus(PWidget(scitew->wEditor)); } void SciTEGTK::FindIncrement() { gtk_widget_show(wIncrementPanel); gtk_widget_grab_focus(GTK_WIDGET(IncSearchEntry)); gtk_entry_set_text(GTK_ENTRY(IncSearchEntry), ""); } void SciTEGTK::SetIcon() { /*#if GTK_MAJOR_VERSION >= 2 GdkPixbuf *icon_pix_buf = CreatePixbuf("Sci48M.png"); if (icon_pix_buf) { gtk_window_set_icon(GTK_WINDOW(PWidget(wSciTE)), icon_pix_buf); gdk_pixbuf_unref(icon_pix_buf); return; } #endif*/ GtkStyle *style = gtk_widget_get_style(PWidget(wSciTE)); GdkBitmap *mask; GdkPixmap *icon_pix = gdk_pixmap_create_from_xpm_d( PWidget(wSciTE)->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **)SciIcon_xpm); gdk_window_set_icon(PWidget(wSciTE)->window, NULL, icon_pix, mask); } // Callback function that gets called when there is data to be read // from the pipe. void SciTEGTK::ReadPipe(gpointer data, gint source, GdkInputCondition condition) { // Shouldn't happen. We're just looking for data to read. if (condition != GDK_INPUT_READ) return; int readLength; char pipeData[8192]; SciTEGTK* scitew = reinterpret_cast(data); // Multiple filenames could be read in one read call. They will be NULL // separated. An empty string means the window should be brought forward. while ((readLength = read(source, pipeData, sizeof(pipeData))) > 0) { char *ii = pipeData; char *start = pipeData; char *end = pipeData + readLength; while (ii < end) { while ((ii < end) && (*ii != '\0')) ++ii; if (strlen(start) > 0) scitew->Open(start); #if GTK_MAJOR_VERSION >= 2 else gtk_window_present(GTK_WINDOW(scitew->GetID())); #endif start = ++ii; } } } // Send the filename through the pipe. Make the path absolute if it is not // already. If filename is empty, one NULL character will be written. // This signifies that the existing instance should present itself. void SciTEGTK::SendFileName(int sendPipe, const char* filename) { // Create the command to send thru the pipe. char pipeData[CHAR_MAX]; // Check to see if path is already absolute. If it isn't then add the // absolute path to the front of the command to send. if (g_path_is_absolute(filename) || (strlen(filename) == 0)) { snprintf(pipeData, sizeof(pipeData) - 1, "%s", filename); } else { gchar *currentPath = g_get_current_dir(); snprintf(pipeData, sizeof(pipeData) - 1, "%s/%s", currentPath, filename); g_free(currentPath); } // Send it. if (write(sendPipe, pipeData, strlen(pipeData) + 1) == -1) perror("Unable to write to pipe"); } void SciTEGTK::CheckForRunningInstance(int argc, char *argv[]) { // Use ipc.scite.name for the pipe name if it exists. const SString pipeFilename = props.Get("ipc.sdlBasic.name"); if (pipeFilename.size() > 0) snprintf(pipeName, sizeof(pipeName), "%s", pipeFilename.c_str()); else snprintf(pipeName, sizeof(pipeName), "%s/.sdlBasic.%s.ipc", g_get_tmp_dir (), g_get_user_name()); // Attempt to open the pipe as a writer to send out data. int sendPipe = open(pipeName, O_WRONLY | O_NONBLOCK); // If open succeeded, write filename data. if (sendPipe != -1) { for (int ii = 1; ii < argc; ++ii) { if (argv[ii][0] != '-') SendFileName(sendPipe, argv[ii]); } // Force the SciTE instance to come to the front. SendFileName(sendPipe, ""); gtk_exit(0); } // If pipe doesn't exist, create it. If pipe exists without a // reader, do nothing. Return an error on any other condition. if (errno == ENOENT) MakePipe(pipeName); else if (errno != ENXIO) { perror("Unable to open pipe as writer"); gtk_exit(0); } // Now open it as a reader to receive data. pipeFD = open(pipeName, O_RDWR | O_NONBLOCK); if (pipeFD == -1) { perror("Unable to open pipe as reader"); unlink(pipeName); gtk_exit(0); } // Handler to read data. gdk_input_add(pipeFD, GDK_INPUT_READ, ReadPipe, this); } void SciTEGTK::Run(int argc, char *argv[]) { // Collect the argv into one string with each argument separated by '\n' SString args; int arg; for (arg = 1; arg < argc; arg++) { args.appendwithseparator(argv[arg], '\n'); } // Process any initial switches ProcessCommandLine(args, 0); // Check if SciTE is already running. This could exit the program. if ((props.Get("ipc.director.name").size() == 0) && props.GetInt ("check.if.already.open")) CheckForRunningInstance (argc, argv); CreateUI(); // Process remaining switches and files ProcessCommandLine(args, 1); CheckMenus(); SizeSubWindows(); SetFocus(PWidget(wEditor)); gtk_widget_grab_focus(GTK_WIDGET(PWidget(wSciTE))); gtk_main(); } // Avoid zombie detached processes by reaping their exit statuses when // they are shut down. void SciTEGTK::ChildSignal(int) { int status = 0; int pid = wait(&status); if (pid == instance->pidShell) { // If this child is the currently running tool, save the exit status instance->pidShell = 0; instance->triedKill = false; instance->exitStatus = status; } } // Detect if the tool has exited without producing any output int SciTEGTK::PollTool(SciTEGTK *scitew) { scitew->ContinueExecute(TRUE); return TRUE; } int main(int argc, char *argv[]) { #ifdef NO_EXTENSIONS Extension *extender = 0; #else MultiplexExtension multiExtender; Extension *extender = &multiExtender; //#ifndef NO_LUA // multiExtender.RegisterExtension(LuaExtension::Instance()); //#endif //#ifndef NO_FILER // multiExtender.RegisterExtension(DirectorExtension::Instance()); //#endif #endif signal(SIGCHLD, SciTEGTK::ChildSignal); #ifdef __vms // Store the path part of the module name strcpy(g_modulePath, argv[0]); char *p = strstr(g_modulePath, "]["); if (p != NULL) { strcpy (p, p + 2); } p = strchr(g_modulePath, ']'); if (p == NULL) { p = strchr(g_modulePath, '>'); } if (p == NULL) { p = strchr(g_modulePath, ':'); } if (p != NULL) { *(p + 1) = '\0'; } strcpy(g_modulePath, VMSToUnixStyle(g_modulePath)); g_modulePath[strlen(g_modulePath) - 1] = '\0'; // remove trailing "/" #endif gtk_set_locale(); gtk_init(&argc, &argv); SciTEGTK scite(extender); scite.Run(argc, argv); return 0; } usr/src/sdlBasic/src/sdlBasic/gtk/sdlBasic.desktop0000777000076500007660000000100610463133331017355 0ustar [Desktop Entry] Categories=GNOME;Application; Comment=sdlBasic sdlBasic Editor Comment[it]=sdlBasic sdlBasic Editor Encoding=UTF-8 Exec=/opt/sdlBasic/bin/sdlBasic GenericName=Editor for sdlBasic language GenericName[it]=Editor for sdlBasic language Icon=/home/zoiba/Lavoro/sdlBasic/sdlBIDE/scite/gtk/sdlBIDE48M.png MimeType= MultipleArgs=false Name=sdlBasic Name[it]=sdlBasic StartupNotify=true Terminal=false TerminalOptions= Type=Application Version=1.0 X-DCOP-ServiceType= X-KDE-SubstituteUID=false X-KDE-Username= usr/src/sdlBasic/src/sdlBasic/gtk/deps.mak0000777000076500007660000000461010463133111015663 0ustar SciTEGTK.o: SciTEGTK.cxx ../../scintilla/include/Platform.h \ ../src/SciTE.h ../../scintilla/include/PropSet.h \ ../../scintilla/include/SString.h ../../scintilla/include/Accessor.h \ ../../scintilla/include/KeyWords.h ../../scintilla/include/Scintilla.h \ ../../scintilla/include/ScintillaWidget.h ../src/Extender.h \ ../src/SciTEBase.h ../src/SciTEKeys.h ../src/MultiplexExtension.h \ pixmapsGNOME.h SciIcon.h Exporters.o: ../src/Exporters.cxx ../../scintilla/include/Platform.h \ ../src/SciTE.h ../../scintilla/include/PropSet.h \ ../../scintilla/include/SString.h ../../scintilla/include/Accessor.h \ ../../scintilla/include/WindowAccessor.h \ ../../scintilla/include/Scintilla.h ../src/Extender.h \ ../src/SciTEBase.h IFaceTable.o: ../src/IFaceTable.cxx ../src/IFaceTable.h MultiplexExtension.o: ../src/MultiplexExtension.cxx \ ../src/MultiplexExtension.h ../src/Extender.h \ ../../scintilla/include/Scintilla.h SciTEBase.o: ../src/SciTEBase.cxx ../../scintilla/include/Platform.h \ ../src/SciTE.h ../../scintilla/include/PropSet.h \ ../../scintilla/include/SString.h ../../scintilla/include/Accessor.h \ ../../scintilla/include/WindowAccessor.h \ ../../scintilla/include/KeyWords.h ../../scintilla/include/Scintilla.h \ ../../scintilla/include/ScintillaWidget.h \ ../../scintilla/include/SciLexer.h ../src/Extender.h ../src/SciTEBase.h SciTEBuffers.o: ../src/SciTEBuffers.cxx \ ../../scintilla/include/Platform.h ../src/SciTE.h \ ../../scintilla/include/PropSet.h ../../scintilla/include/SString.h \ ../../scintilla/include/Accessor.h \ ../../scintilla/include/WindowAccessor.h \ ../../scintilla/include/Scintilla.h ../../scintilla/include/SciLexer.h \ ../src/Extender.h ../src/SciTEBase.h SciTEIO.o: ../src/SciTEIO.cxx ../../scintilla/include/Platform.h \ ../src/SciTE.h ../../scintilla/include/PropSet.h \ ../../scintilla/include/SString.h ../../scintilla/include/Accessor.h \ ../../scintilla/include/WindowAccessor.h \ ../../scintilla/include/Scintilla.h ../src/Extender.h ../src/Utf8_16.h \ ../src/SciTEBase.h SciTEProps.o: ../src/SciTEProps.cxx ../../scintilla/include/Platform.h \ ../src/SciTE.h ../../scintilla/include/PropSet.h \ ../../scintilla/include/SString.h ../../scintilla/include/Accessor.h \ ../../scintilla/include/Scintilla.h ../../scintilla/include/SciLexer.h \ ../src/Extender.h ../src/SciTEBase.h Utf8_16.o: ../src/Utf8_16.cxx ../src/Utf8_16.h usr/src/sdlBasic/src/sdlBasic/gtk/makefile0000777000076500007660000000723710463133111015746 0ustar # Make file for SciTE on Linux or compatible OS # Copyright 1998-2002 by Neil Hodgson # The License.txt file describes the conditions under which this software may be distributed. # This makefile assumes GCC 2.95.2 is used and changes will be needed to use other compilers. # GNU make does not like \r\n line endings so should be saved to CVS in binary form. .SUFFIXES: .cxx .o .h .a .c CC = g++ AR = ar # If explicit setting of GTK1 or GTK2 then use that else look for # pkg-config which is an OK indication that GTK2 is available ifndef GTK1 ifndef GTK2 ifneq (,$(findstring /,$(shell whereis pkg-config))) GTK2=1 else GTK1=1 endif endif endif # For the Gnome desktop stuff to work, prefix must point to where Gnome thinks it is. # "h@h@" is printed here when gnome-config unavailable. Seems harmless. ifdef GTK2 CONFIGFLAGS=pkg-config --cflags gtk+-2.0 CONFIGLIB=pkg-config --libs gtk+-2.0 gthread-2.0 CONFIGTHREADS= gnomeprefix:=$(shell pkg-config --variable=prefix gtk+-2.0 2>/dev/null) else CONFIGFLAGS=gtk-config --cflags CONFIGLIB=gtk-config --libs CONFIGTHREADS=glib-config --libs gthread gnomeprefix:=$(shell gnome-config --prefix 2>/dev/null) endif ifndef prefix prefix=/opt/sdlBasic endif datadir=$(prefix)/share pixmapdir=$(datadir)/pixmaps bindir=$(prefix)/bin SYSCONF_PATH=$(prefix)/share/sdlBasic DOC_PATH=$(prefix)/share/doc/sdlBasic PLUGINS_PATH=$(prefix)/share/sdlBasic/plugins INSTALL=install -o root -g root PROG = ../../../bin/sdlBasic all: $(PROG) strip $(PROG) vpath %.h ../src ../scintilla/include vpath %.cxx ../src #CXXFLAGS= -g -DGTK -DSCI_LEXER -DSYSCONF_PATH=\"$(SYSCONF_PATH)\" -Wwrite-strings INCLUDEDIRS=-I ../scintilla/include -I ../src CXXBASEFLAGS=-W -Wall -DGTK -DSCI_LEXER -DPIXMAP_PATH=\"$(pixmapdir)\" -DSYSCONF_PATH=\"$(SYSCONF_PATH)\" $(INCLUDEDIRS) ifdef DEBUG CXXTFLAGS=-DDEBUG -g $(CXXBASEFLAGS) else CXXTFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) endif CXXFLAGS=$(CXXTFLAGS) -DNO_LUA ifeq ($(shell uname), Darwin) CXXFLAGS:=$(CXXFLAGS) -Dunix endif .cxx.o: $(CC) `$(CONFIGFLAGS)` $(CXXFLAGS) -c $< -o $@ clean: rm -f *.o $(PROG) deps: $(CC) -MM `$(CONFIGFLAGS)` $(CXXFLAGS) *.cxx ../src/*.cxx >deps.mak # make should be run in ../../scintilla/gtk to compile all the lexers. COMPLIB=../scintilla/gtk/scintilla.a $(PROG): SciTEGTK.o SciTEBase.o SciTEBuffers.o SciTEIO.o Exporters.o \ MultiplexExtension.o SciTEProps.o Utf8_16.o \ $(COMPLIB) $(LUA_OBJS) $(CC) `$(CONFIGTHREADS)` -DGTK $^ -o $@ `$(CONFIGLIB)` # Automatically generate header dependencies with "make deps" include deps.mak # The two last install commands will fail if Gnome is not installed or is not at $(prefix). # This is OK - just means no SciTE in the Gnome Applications menu # Dead: install -D SciTEGTK.properties $(SYSCONF_PATH)/SciTEGlobal.properties install: $(INSTALL) -m 755 -d $(bindir) $(SYSCONF_PATH) $(INSTALL) -m 755 -d $(bindir) $(DOC_PATH) $(INSTALL) -m 755 -d $(bindir) $(PLUGINS_PATH) $(INSTALL) -m 755 $(PROG) $(bindir) for files in ../../../share/sdlBasic/*.properties ../../../share/sdlBasic/*.api; \ do \ $(INSTALL) -m 644 $$files $(SYSCONF_PATH); \ done #for files in ..../share/doc/sdlBasic/*.html ../doc/SciTEIco.png ../doc/PrintHi.png; \ #do \ #$(INSTALL) -m 644 $$files $(DOC_PATH); \ #done for files in ../../../share/sdlBasic/plugins/*.sdlbas; \ do \ $(INSTALL) -m 644 $$files $(PLUGINS_PATH); \ done uninstall: #rm -f $(DESTDIR)$(bindir)/SciTE #rm -rf $(DESTDIR)$(SYSCONF_PATH) #ifdef gnomeprefix #rm -f $(DESTDIR)$(datadir)/gnome/apps/Applications/SciTE.desktop #rm -f $(DESTDIR)$(pixmapdir)/Sci48M.png #endif usr/src/sdlBasic/src/sdlBasic/gtk/.cvsignore0000777000076500007660000000000310463132700016231 0ustar *.ousr/src/sdlBasic/src/sdlBasic/win32/0000777000000000000000000000000010645354711016167 5ustar rootrootusr/src/sdlBasic/src/sdlBasic/win32/clean.bat0000777000076500007660000000021210463136771016176 0ustar rem WARNING!!! verify the correct path of mingGw set MINGWPATH=c:\devel\c-cpp\mingw @path %MINGWPATH%\bin;%PATH% mingw32-make clean usr/src/sdlBasic/src/sdlBasic/win32/SciTEWinBar.cxx0000777000076500007660000007126210463136620017230 0ustar // SciTE - Scintilla based Text Editor // sdlbasic editor version // this version of scite was create as editor for sdlbasic language /** @file SciTEWinBar.cxx ** Bar and menu code for the Windows version of the editor. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include "SciTEWin.h" /** * Set up properties for FileTime, FileDate, CurrentTime, CurrentDate and FileAttr. */ void SciTEWin::SetFileProperties( PropSet &ps) { ///< Property set to update. const int TEMP_LEN = 100; char temp[TEMP_LEN]; HANDLE hf = ::CreateFile(fullPath, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hf != INVALID_HANDLE_VALUE) { FILETIME ft; ::GetFileTime(hf, NULL, NULL, &ft); ::CloseHandle(hf); FILETIME lft; ::FileTimeToLocalFileTime(&ft, &lft); SYSTEMTIME st; ::FileTimeToSystemTime(&lft, &st); ::GetTimeFormat(LOCALE_USER_DEFAULT, 0, &st, NULL, temp, TEMP_LEN); ps.Set("FileTime", temp); ::GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, temp, TEMP_LEN); ps.Set("FileDate", temp); DWORD attr = ::GetFileAttributes(fullPath); SString fa; if (attr & FILE_ATTRIBUTE_READONLY) { fa += "R"; } if (attr & FILE_ATTRIBUTE_HIDDEN) { fa += "H"; } if (attr & FILE_ATTRIBUTE_SYSTEM) { fa += "S"; } ps.Set("FileAttr", fa.c_str()); } else { /* Reset values for new buffers with no file */ ps.Set("FileTime", ""); ps.Set("FileDate", ""); ps.Set("FileAttr", ""); } ::GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, // Current date NULL, temp, TEMP_LEN); ps.Set("CurrentDate", temp); ::GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, // Current time NULL, temp, TEMP_LEN); ps.Set("CurrentTime", temp); } /** * Update the status bar text. */ void SciTEWin::SetStatusBarText(const char *s) { ::SendMessage(reinterpret_cast(wStatusBar.GetID()), SB_SETTEXT, 0, reinterpret_cast(s)); } /** * Manage Windows specific notifications. */ void SciTEWin::Notify(SCNotification *notification) { switch (notification->nmhdr.code) { case TCN_SELCHANGE: // Change of tab if (notification->nmhdr.idFrom == IDM_TABWIN) { int index = Platform::SendScintilla(wTabBar.GetID(), TCM_GETCURSEL, (WPARAM)0, (LPARAM)0); SetDocumentAt(index); CheckReload(); } break; case NM_RCLICK: // Right click on a control if (notification->nmhdr.idFrom == IDM_TABWIN) { Point ptCursor; ::GetCursorPos(reinterpret_cast(&ptCursor)); Point ptClient = ptCursor; ::ScreenToClient(reinterpret_cast(wTabBar.GetID()), reinterpret_cast(&ptClient)); TCHITTESTINFO info; info.pt.x = ptClient.x; info.pt.y = ptClient.y; int tabbarHitLast = TabCtrl_HitTest(reinterpret_cast (wTabBar.GetID()), &info); if (buffers.Current() != tabbarHitLast) { SetDocumentAt(tabbarHitLast); CheckReload(); } // Pop up menu here: popup.CreatePopUp(); AddToPopUp("Close", IDM_CLOSE, true); AddToPopUp(""); AddToPopUp("Save", IDM_SAVE, true); AddToPopUp("Save As", IDM_SAVEAS, true); AddToPopUp("Find Next", IDM_FINDNEXT, true); AddToPopUp("Toggle Bookmark", IDM_BOOKMARK_TOGGLE, true); AddToPopUp("Previous Bookmark", IDM_BOOKMARK_PREV, true); AddToPopUp("Next Bookmark", IDM_BOOKMARK_NEXT, true); AddToPopUp("Go", IDM_GO, true); AddToPopUp("Stop", IDM_STOPEXECUTE, true); AddToPopUp(""); bool bAddSeparator = false; for (int item = 0; item < toolMax; item++) { int itemID = IDM_TOOLS + item; SString prefix = "command.name."; prefix += SString(item); prefix += "."; SString commandName = props.GetNewExpand(prefix.c_str(), fileName); if (commandName.length()) { SString sMenuItem = commandName; SString sMnemonic = "Ctrl+"; sMnemonic += SString(item); AddToPopUp(sMenuItem.c_str(), itemID, true); bAddSeparator = true; } } if (bAddSeparator) AddToPopUp(""); AddToPopUp("Print", IDM_PRINT, true); popup.Show(ptCursor, wSciTE); } break; case NM_CLICK: // Click on a control if (notification->nmhdr.idFrom == IDM_STATUSWIN) { // Click on the status bar NMMOUSE *pNMMouse = (NMMOUSE *)notification; switch (pNMMouse->dwItemSpec) { case 0: /* Display of status */ sbNum++; if (sbNum > props.GetInt("statusbar.number")) { sbNum = 1; } UpdateStatusBar(true); break; default: break; } } break; case TTN_GETDISPINFO: // Ask for tooltip text { static char ttt[MAX_PATH*2 + 1]; const char *ttext = 0; NMTTDISPINFO *pDispInfo = (NMTTDISPINFO *)notification; // Toolbar tooltips switch (notification->nmhdr.idFrom) { case IDM_NEW: ttext = "New"; break; case IDM_OPEN: ttext = "Open"; break; case IDM_SAVE: ttext = "Save"; break; case IDM_CLOSE: ttext = "Close"; break; case IDM_PRINT: ttext = "Print"; break; case IDM_CUT: ttext = "Cut"; break; case IDM_COPY: ttext = "Copy"; break; case IDM_PASTE: ttext = "Paste"; break; case IDM_CLEAR: ttext = "Delete"; break; case IDM_UNDO: ttext = "Undo"; break; case IDM_REDO: ttext = "Redo"; break; case IDM_FIND: ttext = "Find"; break; case IDM_FINDNEXT: ttext = "Findnext"; break; case IDM_REPLACE: ttext = "Replace"; break; case IDM_BOOKMARK_TOGGLE: ttext = "Toggle Bookmark"; break; case IDM_BOOKMARK_PREV: ttext = "Previous Bookmark"; break; case IDM_BOOKMARK_NEXT: ttext = "Next Bookmark"; break; case IDM_MACRORECORD: ttext = "Record Macro"; break; case IDM_MACROSTOPRECORD: ttext = "Stop Recording"; break; case IDM_MACROPLAY: ttext = "Run Macro"; break; case IDM_GO: ttext = "Go"; break; case IDM_STOPEXECUTE: ttext = "Stop"; break; default: { // notification->nmhdr.idFrom appears to be the buffer number for tabbar tooltips Point ptCursor; ::GetCursorPos(reinterpret_cast(&ptCursor)); Point ptClient = ptCursor; ::ScreenToClient(reinterpret_cast(wTabBar.GetID()), reinterpret_cast(&ptClient)); TCHITTESTINFO info; info.pt.x = ptClient.x; info.pt.y = ptClient.y; int index = Platform::SendScintilla(wTabBar.GetID(), TCM_HITTEST, (WPARAM)0, (LPARAM) & info); if (index >= 0) { SString path = buffers.buffers[index].FullPath(); // Handle '&' characters in path, since they are interpreted in // tooltips. int amp = 0; while ((amp = path.search("&", amp)) >= 0) { path.insert(amp, "&"); amp += 2; } strcpy(ttt, path.c_str()); pDispInfo->lpszText = const_cast(ttt); } } break; } if (ttext) { SString localised = LocaliseString(ttext); strcpy(ttt, localised.c_str()); pDispInfo->lpszText = ttt; } break; } case SCN_CHARADDED: if ((notification->nmhdr.idFrom == IDM_RUNWIN) && executing && hWriteSubProcess) { char chToWrite = static_cast(notification->ch); if (chToWrite != '\r') { DWORD bytesWrote = 0; ::WriteFile(hWriteSubProcess, &chToWrite, 1, &bytesWrote, NULL); } } else { SciTEBase::Notify(notification); } break; default: // Scintilla notification, use default treatment SciTEBase::Notify(notification); break; } } void SciTEWin::ShowToolBar() { SizeSubWindows(); } void SciTEWin::ShowTabBar() { SizeSubWindows(); } void SciTEWin::ShowStatusBar() { SizeSubWindows(); } /** * Resize the content windows, embedding the editor and output windows. */ void SciTEWin::SizeContentWindows() { PRectangle rcInternal = wContent.GetClientPosition(); int w = rcInternal.Width(); int h = rcInternal.Height(); heightOutput = NormaliseSplit(heightOutput); if (splitVertical) { wEditor.SetPosition(PRectangle(0, 0, w - heightOutput - heightBar, h)); wOutput.SetPosition(PRectangle(w - heightOutput, 0, w, h)); } else { wEditor.SetPosition(PRectangle(0, 0, w, h - heightOutput - heightBar)); wOutput.SetPosition(PRectangle(0, h - heightOutput, w, h)); } wContent.InvalidateAll(); } /** * Resize the sub-windows, ie. the toolbar, tab bar, status bar. And call @a SizeContentWindows. */ void SciTEWin::SizeSubWindows() { PRectangle rcClient = wSciTE.GetClientPosition(); bool showTab = false; //::SendMessage(MainHWND(), WM_SETREDRAW, false, 0); // suppress flashing visHeightTools = tbVisible ? heightTools : 0; if (tabVisible) { // ? hide one tab only showTab = tabHideOne ? ::SendMessage(reinterpret_cast(wTabBar.GetID()), TCM_GETITEMCOUNT, 0, 0) > 1 : true; } if (showTab) { wTabBar.SetPosition(PRectangle( rcClient.left, rcClient.top + visHeightTools, rcClient.right, rcClient.top + heightTab + visHeightTools)); int tabNb = ::SendMessage(reinterpret_cast( wTabBar.GetID()), TCM_GETROWCOUNT, 0, 0); visHeightTab = ((tabNb - 1) * (heightTab - 6)) + heightTab; } else { visHeightTab = 0; } visHeightStatus = sbVisible ? heightStatus : 0; visHeightEditor = rcClient.Height() - visHeightTools - visHeightStatus - visHeightTab; if (visHeightEditor < 1) { visHeightTools = 1; visHeightStatus = 1; visHeightTab = 1; visHeightEditor = rcClient.Height() - visHeightTools - visHeightStatus - visHeightTab; } if (tbVisible) { wToolBar.SetPosition(PRectangle( rcClient.left, rcClient.top, rcClient.right, visHeightTools)); wToolBar.Show(true); } else { wToolBar.Show(false); wToolBar.SetPosition(PRectangle( rcClient.left, rcClient.top - 2, rcClient.Width(), 1)); } if (showTab) { wTabBar.SetPosition(PRectangle( rcClient.left, rcClient.top + visHeightTools, rcClient.right, rcClient.top + visHeightTab + visHeightTools)); wTabBar.Show(true); } else { wTabBar.Show(false); wTabBar.SetPosition(PRectangle( rcClient.left, rcClient.top - 2, rcClient.Width(), 1)); } if (sbVisible) { wStatusBar.SetPosition(PRectangle( rcClient.left, rcClient.top + visHeightTools + visHeightTab + visHeightEditor, rcClient.right, rcClient.top + visHeightTools + visHeightTab + visHeightEditor + visHeightStatus)); wStatusBar.Show(true); } else { wStatusBar.Show(false); wStatusBar.SetPosition(PRectangle( rcClient.left, rcClient.top - 2, rcClient.Width(), 1)); } wContent.SetPosition(PRectangle( rcClient.left, rcClient.top + visHeightTab + visHeightTools, rcClient.right, rcClient.top + visHeightTab + visHeightTools + visHeightEditor)); SizeContentWindows(); //::SendMessage(MainHWND(), WM_SETREDRAW, true, 0); //::RedrawWindow(MainHWND(), NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN); } // Keymod param is interpreted using the same notation (and much the same // code) as KeyMatch uses in SciTEWin.cxx. void SciTEWin::SetMenuItem(int menuNumber, int position, int itemID, const char *text, const char *mnemonic) { // On Windows the menu items are modified if they already exist or are created HMENU hmenuBar = ::GetMenu(MainHWND()); HMENU hmenu = ::GetSubMenu(hmenuBar, menuNumber); SString sTextMnemonic = text; long keycode; if (mnemonic && *mnemonic) { keycode = SciTEKeys::ParseKeyCode(mnemonic); if (keycode) { sTextMnemonic += "\t"; sTextMnemonic += LocaliseAccelerator(mnemonic, itemID); } // the keycode could be used to make a custom accelerator table // but for now, the menu's item data is used instead for command // tools, and for other menu entries it is just discarded. } else { keycode = 0; //I don't think this is needed in ANSI C++. } if (::GetMenuState(hmenu, itemID, MF_BYCOMMAND) == 0xffffffff) { if (text[0]) ::InsertMenu(hmenu, position, MF_BYPOSITION, itemID, sTextMnemonic.c_str()); else ::InsertMenu(hmenu, position, MF_BYPOSITION | MF_SEPARATOR, itemID, sTextMnemonic.c_str()); } else { ::ModifyMenu(hmenu, position, MF_BYCOMMAND, itemID, sTextMnemonic.c_str()); } if (itemID >= IDM_TOOLS && itemID < IDM_TOOLS + toolMax) { // Stow the keycode for later retrieval. // Do this even if 0, in case the menu already existed (e.g. ModifyMenu) MENUITEMINFO mii; mii.cbSize = sizeof(MENUITEMINFO); mii.fMask = MIIM_DATA; mii.dwItemData = reinterpret_cast(keycode); ::SetMenuItemInfo(hmenu, itemID, FALSE, &mii); } } void SciTEWin::DestroyMenuItem(int menuNumber, int itemID) { // On Windows menu items are destroyed as they can not be hidden and they can be recreated in any position HMENU hmenuBar = ::GetMenu(MainHWND()); if (itemID) { HMENU hmenu = ::GetSubMenu(hmenuBar, menuNumber); ::DeleteMenu(hmenu, itemID, MF_BYCOMMAND); } else { ::DeleteMenu(hmenuBar, menuNumber, MF_BYPOSITION); } } void SciTEWin::CheckAMenuItem(int wIDCheckItem, bool val) { if (val) CheckMenuItem(GetMenu(MainHWND()), wIDCheckItem, MF_CHECKED | MF_BYCOMMAND); else CheckMenuItem(GetMenu(MainHWND()), wIDCheckItem, MF_UNCHECKED | MF_BYCOMMAND); } void EnableButton(HWND wTools, int id, bool enable) { if (wTools) { ::SendMessage(wTools, TB_ENABLEBUTTON, id, Platform::LongFromTwoShorts(static_cast(enable ? TRUE : FALSE), 0)); } } void SciTEWin::EnableAMenuItem(int wIDCheckItem, bool val) { if (val) EnableMenuItem(::GetMenu(MainHWND()), wIDCheckItem, MF_ENABLED | MF_BYCOMMAND); else EnableMenuItem(::GetMenu(MainHWND()), wIDCheckItem, MF_DISABLED | MF_GRAYED | MF_BYCOMMAND); ::EnableButton(reinterpret_cast(wToolBar.GetID()), wIDCheckItem, val); } void SciTEWin::CheckMenus() { SciTEBase::CheckMenus(); CheckMenuRadioItem(GetMenu(MainHWND()), IDM_EOL_CRLF, IDM_EOL_LF, SendEditor(SCI_GETEOLMODE) - SC_EOL_CRLF + IDM_EOL_CRLF, 0); CheckMenuRadioItem(GetMenu(MainHWND()), IDM_ENCODING_DEFAULT, IDM_ENCODING_UCOOKIE, unicodeMode + IDM_ENCODING_DEFAULT, 0); } void SciTEWin::MakeAccelerator(SString sAccelerator, ACCEL &Accel) { SString s = sAccelerator; if (s.contains("null")) { Accel.key = 0; return ; } if (s.contains("Ctrl+")) { Accel.fVirt |= FCONTROL; s.remove("Ctrl+"); } if (s.contains("Shift+")) { Accel.fVirt |= FSHIFT; s.remove("Shift+"); } if (s.contains("Alt+")) { Accel.fVirt |= FALT; s.remove("Alt+"); } if (s.length() == 1) { Accel.key = s[0]; Accel.fVirt |= FVIRTKEY; } else if ((s.length() > 1) && (s[0] == 'F') && (isdigit(s[1]))) { s.remove("F"); int keyNum = s.value(); Accel.key = static_cast(keyNum + VK_F1 - 1); Accel.fVirt |= FVIRTKEY; } else if (s.contains("Del")) { Accel.key = VK_DELETE; Accel.fVirt |= FVIRTKEY; } else if (s.contains("Space")) { Accel.key = VK_SPACE; Accel.fVirt |= FVIRTKEY; } else if (s.contains("Enter")) { Accel.key = VK_RETURN; Accel.fVirt |= FVIRTKEY; } else if (s.contains("Back")) { Accel.key = VK_BACK; Accel.fVirt |= FVIRTKEY; } else if (s.contains("Tab")) { Accel.key = VK_TAB; Accel.fVirt |= FVIRTKEY; } else if (s.contains("Num")) { Accel.fVirt |= FVIRTKEY; s.remove("Num"); if (isdigit(s[0])) { int keyNum = s.value(); Accel.key = static_cast(keyNum + VK_NUMPAD0); } else { switch (s[0]) { case '*': Accel.key = VK_MULTIPLY; break; case '+': Accel.key = VK_ADD; break; case '-': Accel.key = VK_SUBTRACT; break; case '/': Accel.key = VK_DIVIDE; break; default: Accel.key = 0; break; } } } } //SString SciTEWin::LocaliseAccelerator(const char *pAccelerator, int cmd) { SString SciTEWin::LocaliseAccelerator(const char *pAccelerator, int) { #ifdef LOCALISE_ACCELERATORS_WORKED SString translation = LocaliseString(pAccelerator, true); int AccelCount = ::CopyAcceleratorTable(hAccTable, NULL, 0); ACCEL *AccelTable = new ACCEL[AccelCount]; ::CopyAcceleratorTable(hAccTable, AccelTable, AccelCount); for (int i = 0; i < AccelCount; i++) { if (AccelTable[i].cmd == cmd) { MakeAccelerator(translation, AccelTable[i]); } } ::DestroyAcceleratorTable(hAccTable); hAccTable = ::CreateAcceleratorTable(AccelTable, AccelCount); delete []AccelTable; if (translation.contains("null")) { translation.clear(); } return translation; #else return pAccelerator; #endif } void SciTEWin::LocaliseMenu(HMENU hmenu) { for (int i = 0; i <= ::GetMenuItemCount(hmenu); i++) { char buff[200]; buff[0] = '\0'; MENUITEMINFO mii; memset(&mii, 0, sizeof(mii)); // Explicitly use the struct size for NT 4 as otherwise // GetMenuItemInfo will fail on NT 4. //mii.cbSize = sizeof(mii); mii.cbSize = 44; mii.fMask = MIIM_CHECKMARKS | MIIM_DATA | MIIM_ID | MIIM_STATE | MIIM_SUBMENU | MIIM_TYPE; mii.dwTypeData = buff; mii.cch = sizeof(buff) - 1; if (::GetMenuItemInfo(hmenu, i, TRUE, &mii)) { if (mii.hSubMenu) { LocaliseMenu(mii.hSubMenu); } if (mii.fType == MFT_STRING) { if (mii.dwTypeData) { SString text(mii.dwTypeData); SString accel(mii.dwTypeData); size_t len = text.length(); int tab = text.search("\t"); if (tab != -1) { text.remove(tab, len - tab); accel.remove(0, tab + 1); } else { accel = ""; } text = LocaliseString(text.c_str(), true); if (text.length()) { if (accel != "") { text += "\t"; text += LocaliseAccelerator(accel.c_str(), mii.wID); } mii.dwTypeData = const_cast(text.c_str()); ::SetMenuItemInfo(hmenu, i, TRUE, &mii); } } } } } } void SciTEWin::LocaliseMenus() { LocaliseMenu(::GetMenu(MainHWND())); ::DrawMenuBar(MainHWND()); } void SciTEWin::LocaliseAccelerators() { LocaliseAccelerator("Alt+1", IDM_BUFFER + 0); LocaliseAccelerator("Alt+2", IDM_BUFFER + 1); LocaliseAccelerator("Alt+3", IDM_BUFFER + 2); LocaliseAccelerator("Alt+4", IDM_BUFFER + 3); LocaliseAccelerator("Alt+5", IDM_BUFFER + 4); LocaliseAccelerator("Alt+6", IDM_BUFFER + 5); LocaliseAccelerator("Alt+7", IDM_BUFFER + 6); LocaliseAccelerator("Alt+8", IDM_BUFFER + 7); LocaliseAccelerator("Alt+9", IDM_BUFFER + 8); LocaliseAccelerator("Alt+0", IDM_BUFFER + 9); // todo read keymap from cfg // AssignKey('Y', SCMOD_CTRL, SCI_LINECUT); } void SciTEWin::LocaliseControl(HWND w) { char wtext[200]; if (::GetWindowText(w, wtext, sizeof(wtext))) { SString text = LocaliseString(wtext, false); if (text.length()) ::SetWindowText(w, text.c_str()); } } void SciTEWin::LocaliseDialog(HWND wDialog) { LocaliseControl(wDialog); HWND wChild = ::GetWindow(wDialog, GW_CHILD); while (wChild) { LocaliseControl(wChild); wChild = ::GetWindow(wChild, GW_HWNDNEXT); } } // Mingw headers do not have this: #ifndef TBSTYLE_FLAT #define TBSTYLE_FLAT 0x0800 #endif #ifndef TB_LOADIMAGES #define TB_LOADIMAGES (WM_USER + 50) #endif #define ELEMENTS(a) (sizeof(a) / sizeof(a[0])) struct BarButton { int id; int cmd; }; static BarButton bbs[] = { { -1, 0 }, { STD_FILENEW, IDM_NEW }, { STD_FILEOPEN, IDM_OPEN }, { STD_FILESAVE, IDM_SAVE }, { 0, IDM_CLOSE }, { -1, 0 }, { STD_UNDO, IDM_UNDO }, { STD_REDOW, IDM_REDO }, { -1, 0 }, { STD_FIND, IDM_FIND }, { 0, IDM_FINDNEXT }, { STD_REPLACE, IDM_REPLACE }, { -1, 0 }, { 0, IDM_BOOKMARK_TOGGLE }, { 0, IDM_BOOKMARK_PREV }, { 0, IDM_BOOKMARK_NEXT }, { -1, 0 }, { 0, IDM_GO }, { 0, IDM_STOPEXECUTE }, }; /** * Create all the needed windows. */ void SciTEWin::Creation() { wContent = ::CreateWindowEx( WS_EX_CLIENTEDGE, classNameInternal, "Source", WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, 0, 0, 100, 100, MainHWND(), reinterpret_cast(2000), hInstance, reinterpret_cast(this)); wContent.Show(); wEditor = ::CreateWindowEx( 0, "Scintilla", "Source", WS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, 0, 0, 100, 100, reinterpret_cast(wContent.GetID()), reinterpret_cast(IDM_SRCWIN), hInstance, 0); if (!wEditor.Created()) exit(FALSE); fnEditor = reinterpret_cast(::SendMessage( reinterpret_cast(wEditor.GetID()), SCI_GETDIRECTFUNCTION, 0, 0)); ptrEditor = ::SendMessage(reinterpret_cast(wEditor.GetID()), SCI_GETDIRECTPOINTER, 0, 0); wEditor.Show(); SendEditor(SCI_USEPOPUP, 0); WindowSetFocus(wEditor); wOutput = ::CreateWindowEx( 0, "Scintilla", "Run", WS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, 0, 0, 100, 100, reinterpret_cast(wContent.GetID()), reinterpret_cast(IDM_RUNWIN), hInstance, 0); if (!wOutput.Created()) exit(FALSE); fnOutput = reinterpret_cast(::SendMessage( reinterpret_cast(wOutput.GetID()), SCI_GETDIRECTFUNCTION, 0, 0)); ptrOutput = ::SendMessage(reinterpret_cast(wOutput.GetID()), SCI_GETDIRECTPOINTER, 0, 0); wOutput.Show(); // No selection margin on output window SendOutput(SCI_SETMARGINWIDTHN, 1, 0); //SendOutput(SCI_SETCARETPERIOD, 0); SendOutput(SCI_USEPOPUP, 0); ::DragAcceptFiles(MainHWND(), true); HWND hwndToolBar = ::CreateToolbarEx( MainHWND(), WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | TBSTYLE_FLAT | TBSTYLE_TOOLTIPS| CCS_TOP | 0, WS_EX_TOOLWINDOW, IDB_STD_LARGE_COLOR, hInstance, 0, 0, 32,//15 32, 32, 32, 32, 0 ); /* HWND hwndToolBar = ::CreateWindowEx( WS_EX_TOOLWINDOW, TOOLBARCLASSNAME, "", WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | //TBSTYLE_FLAT | TBSTYLE_TOOLTIPS| CCS_TOP 0, 0, 0, 0, heightTools, MainHWND(), reinterpret_cast(IDM_TOOLWIN), hInstance, 0); */ wToolBar = hwndToolBar; ::SendMessage(hwndToolBar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON),0); ::SendMessage(hwndToolBar, TB_LOADIMAGES, IDB_STD_LARGE_COLOR, reinterpret_cast(HINST_COMMCTRL)); TBADDBITMAP addbmp_filenew = { hInstance, IDR_FILENEW }; ::SendMessage(hwndToolBar, TB_ADDBITMAP, 1, (LPARAM)&addbmp_filenew); TBADDBITMAP addbmp_fileopen = { hInstance, IDR_FILEOPEN }; ::SendMessage(hwndToolBar, TB_ADDBITMAP, 1, (LPARAM)&addbmp_fileopen); TBADDBITMAP addbmp_filesave = { hInstance, IDR_FILESAVE }; ::SendMessage(hwndToolBar, TB_ADDBITMAP, 1, (LPARAM)&addbmp_filesave); TBADDBITMAP addbmp_closefile = { hInstance, IDR_CLOSEFILE }; ::SendMessage(hwndToolBar, TB_ADDBITMAP, 1, (LPARAM)&addbmp_closefile); TBADDBITMAP addbmp_undo = { hInstance, IDR_UNDO }; ::SendMessage(hwndToolBar, TB_ADDBITMAP, 1, (LPARAM)&addbmp_undo); TBADDBITMAP addbmp_redo = { hInstance, IDR_REDO }; ::SendMessage(hwndToolBar, TB_ADDBITMAP, 1, (LPARAM)&addbmp_redo); TBADDBITMAP addbmp_find = { hInstance, IDR_FIND }; ::SendMessage(hwndToolBar, TB_ADDBITMAP, 1, (LPARAM)&addbmp_find); TBADDBITMAP addbmp_findnext = { hInstance, IDR_FINDNEXT }; ::SendMessage(hwndToolBar, TB_ADDBITMAP, 1, (LPARAM)&addbmp_findnext); TBADDBITMAP addbmp_replace = { hInstance, IDR_REPLACE }; ::SendMessage(hwndToolBar, TB_ADDBITMAP, 1, (LPARAM)&addbmp_replace); TBADDBITMAP addbmp_togglebookmark = { hInstance, IDR_BOOKMARK_TOGGLE }; ::SendMessage(hwndToolBar, TB_ADDBITMAP, 1, (LPARAM)&addbmp_togglebookmark); TBADDBITMAP addbmp_previousbookmark = { hInstance, IDR_BOOKMARK_PREV }; ::SendMessage(hwndToolBar, TB_ADDBITMAP, 1, (LPARAM)&addbmp_previousbookmark); TBADDBITMAP addbmp_nextbookmark = { hInstance, IDR_BOOKMARK_NEXT }; ::SendMessage(hwndToolBar, TB_ADDBITMAP, 1, (LPARAM)&addbmp_nextbookmark); TBADDBITMAP addbmp_go = { hInstance, IDR_GO }; ::SendMessage(hwndToolBar, TB_ADDBITMAP, 1, (LPARAM)&addbmp_go); TBADDBITMAP addbmp_stop = { hInstance, IDR_STOPEXECUTE }; ::SendMessage(hwndToolBar, TB_ADDBITMAP, 1, (LPARAM)&addbmp_stop); TBBUTTON tbb[ELEMENTS(bbs)]; for (unsigned int i = 0;i < ELEMENTS(bbs);i++) { switch(bbs[i].cmd){ case IDM_NEW: tbb[i].iBitmap = STD_PRINT +1 ; break; case IDM_OPEN: tbb[i].iBitmap = STD_PRINT +2 ; break; case IDM_SAVE: tbb[i].iBitmap = STD_PRINT +3 ; break; case IDM_CLOSE: tbb[i].iBitmap = STD_PRINT + 4; break; case IDM_UNDO: tbb[i].iBitmap = STD_PRINT + 5; break; case IDM_REDO: tbb[i].iBitmap = STD_PRINT + 6; break; case IDM_FIND: tbb[i].iBitmap = STD_PRINT + 7; break; case IDM_FINDNEXT: tbb[i].iBitmap = STD_PRINT + 8; break; case IDM_REPLACE: tbb[i].iBitmap = STD_PRINT + 9; break; case IDM_BOOKMARK_TOGGLE: tbb[i].iBitmap = STD_PRINT + 10; break; case IDM_BOOKMARK_PREV: tbb[i].iBitmap = STD_PRINT + 11; break; case IDM_BOOKMARK_NEXT: tbb[i].iBitmap = STD_PRINT + 12; break; case IDM_GO: tbb[i].iBitmap = STD_PRINT + 13; break; case IDM_STOPEXECUTE: tbb[i].iBitmap = STD_PRINT + 14; break; default: tbb[i].iBitmap = bbs[i].id; break; } tbb[i].idCommand = bbs[i].cmd; tbb[i].fsState = TBSTATE_ENABLED; if ( -1 == bbs[i].id) tbb[i].fsStyle = TBSTYLE_SEP; else tbb[i].fsStyle = TBSTYLE_BUTTON; tbb[i].dwData = 0; tbb[i].iString = 0; } ::SendMessage(hwndToolBar, TB_ADDBUTTONS, ELEMENTS(bbs), reinterpret_cast(tbb)); wToolBar.Show(); INITCOMMONCONTROLSEX icce; icce.dwSize = sizeof(icce); icce.dwICC = ICC_TAB_CLASSES; InitCommonControlsEx(&icce); wTabBar = ::CreateWindowEx( 0, WC_TABCONTROL, "Tab", WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | TCS_FOCUSNEVER | TCS_TOOLTIPS, 0, 0, 100, heightTab, MainHWND(), reinterpret_cast(IDM_TABWIN), hInstance, 0 ); if (!wTabBar.Created()) exit(FALSE); fontTabs = ::CreateFont( 8, 0, 0, 0, FW_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0, "Ms Sans Serif"); ::SendMessage(reinterpret_cast(wTabBar.GetID()), WM_SETFONT, reinterpret_cast(fontTabs), // handle to font 0); // redraw option wTabBar.Show(); wStatusBar = ::CreateWindowEx( 0, STATUSCLASSNAME, "", WS_CHILD | WS_CLIPSIBLINGS, 0, 0, 100, heightStatus, MainHWND(), reinterpret_cast(IDM_STATUSWIN), hInstance, 0); wStatusBar.Show(); int widths[] = { 4000 }; // Perhaps we can define a syntax to create more parts, // but it is probably an overkill for a marginal feature ::SendMessage(reinterpret_cast(wStatusBar.GetID()), SB_SETPARTS, 1, reinterpret_cast(widths)); #ifndef NO_LUA if (props.GetExpanded("ext.lua.startup.script").length() == 0) DestroyMenuItem(menuOptions,IDM_OPENLUAEXTERNALFILE); #else DestroyMenuItem(menuOptions,IDM_OPENLUAEXTERNALFILE); #endif } usr/src/sdlBasic/src/sdlBasic/win32/SciTERes.rc0000777000076500007660000005473610463136442016412 0ustar // Resource file for SciTE // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef __BORLANDC__ #include #endif #include "SciTE.h" #include "PlatformRes.h" SciTE ICON sdlBasic.ico 1 RT_MANIFEST SciTE.exe.manifest SciTE MENU BEGIN POPUP "&File" BEGIN MENUITEM "&New\tCtrl+N", IDM_NEW MENUITEM "&Open...\tCtrl+O", IDM_OPEN MENUITEM "Open Selected &Filename\tCtrl+Shift+O", IDM_OPENSELECTED MENUITEM "&Revert\tCtrl+R", IDM_REVERT MENUITEM "&Close\tCtrl+W", IDM_CLOSE MENUITEM "&Save\tCtrl+S", IDM_SAVE MENUITEM "Save &As...\tCtrl+Shift+S", IDM_SAVEAS MENUITEM "Save a Co&py...\tCtrl+Shift+P", IDM_SAVEACOPY POPUP "Encodin&g" BEGIN MENUITEM "&8 Bit", IDM_ENCODING_DEFAULT MENUITEM "UCS-2 &Big Endian", IDM_ENCODING_UCS2BE MENUITEM "UCS-2 &Little Endian", IDM_ENCODING_UCS2LE MENUITEM "&UTF-8", IDM_ENCODING_UTF8 MENUITEM "UTF-8 &Cookie", IDM_ENCODING_UCOOKIE END POPUP "&Export" BEGIN MENUITEM "As &HTML...", IDM_SAVEASHTML MENUITEM "As &RTF...", IDM_SAVEASRTF MENUITEM "As &PDF...", IDM_SAVEASPDF MENUITEM "As &LaTeX...", IDM_SAVEASTEX MENUITEM "As &XML...", IDM_SAVEASXML END MENUITEM SEPARATOR MENUITEM "Page Set&up...", IDM_PRINTSETUP MENUITEM "&Print...\tCtrl+P", IDM_PRINT MENUITEM SEPARATOR MENUITEM "&Load Session...", IDM_LOADSESSION MENUITEM "Sa&ve Session...", IDM_SAVESESSION MENUITEM SEPARATOR MENUITEM "E&xit", IDM_QUIT END POPUP "&Edit" BEGIN MENUITEM "&Undo\tCtrl+Z", IDM_UNDO MENUITEM "&Redo\tCtrl+Y", IDM_REDO MENUITEM SEPARATOR MENUITEM "Cu&t\tCtrl+X", IDM_CUT MENUITEM "&Copy\tCtrl+C", IDM_COPY MENUITEM "&Paste\tCtrl+V", IDM_PASTE MENUITEM "&Delete\tDel", IDM_CLEAR MENUITEM "Select &All\tCtrl+A", IDM_SELECTALL MENUITEM "Copy as RT&F", IDM_COPYASRTF MENUITEM SEPARATOR MENUITEM "Match &Brace\tCtrl+E", IDM_MATCHBRACE MENUITEM "Select t&o Brace\tCtrl+Shift+E", IDM_SELECTTOBRACE MENUITEM "S&how Calltip\tCtrl+T", IDM_SHOWCALLTIP MENUITEM SEPARATOR MENUITEM "Complete S&ymbol\tCtrl+I", IDM_COMPLETE MENUITEM "Complete &Word\tCtrl+Enter", IDM_COMPLETEWORD MENUITEM "&Expand Abbreviation\tCtrl+B", IDM_ABBREV MENUITEM SEPARATOR //MENUITEM "&Insert Abbreviation\tCtrl+Shift+R", IDM_INS_ABBREV MENUITEM "Block Co&mment or Uncomment\tCtrl+Q", IDM_BLOCK_COMMENT //MENUITEM "Bo&x Comment\tCtrl+Shift+B", IDM_BOX_COMMENT //MENUITEM "Stream Comme&nt\tCtrl+Shift+Q", IDM_STREAM_COMMENT MENUITEM "Make &Selection Uppercase\tCtrl+U", IDM_UPRCASE MENUITEM "Make Selection &Lowercase\tCtrl+L", IDM_LWRCASE //POPUP "Para&graph" //BEGIN // MENUITEM "&Join", IDM_JOIN // MENUITEM "&Split", IDM_SPLIT //END END // used: abcdefghlmnoprstuwxy POPUP "&Search" BEGIN MENUITEM "&Find...\tCtrl+F", IDM_FIND MENUITEM "Find &Next\tF3", IDM_FINDNEXT MENUITEM "Find Previou&s\tShift+F3", IDM_FINDNEXTBACK MENUITEM "F&ind in Files...\tCtrl+Shift+F", IDM_FINDINFILES MENUITEM "R&eplace...\tCtrl+H", IDM_REPLACE MENUITEM "Incrementa&l Search...\tCtrl+Alt+I", IDM_INCSEARCH MENUITEM SEPARATOR MENUITEM "&Go to...\tCtrl+G", IDM_GOTO MENUITEM "Next Book&mark\tF2", IDM_BOOKMARK_NEXT MENUITEM "Pre&vious Bookmark\tShift+F2", IDM_BOOKMARK_PREV MENUITEM "Toggle Bookmar&k\tCtrl+F2", IDM_BOOKMARK_TOGGLE MENUITEM "&Clear All Bookmarks", IDM_BOOKMARK_CLEARALL END POPUP "&View" BEGIN MENUITEM "Toggle ¤t fold", IDM_EXPAND MENUITEM "Toggle &all folds", IDM_TOGGLE_FOLDALL MENUITEM SEPARATOR MENUITEM "Full Scree&n\tF11", IDM_FULLSCREEN MENUITEM "&Tool Bar", IDM_VIEWTOOLBAR MENUITEM "Tab &Bar", IDM_VIEWTABBAR MENUITEM "&Status Bar", IDM_VIEWSTATUSBAR MENUITEM SEPARATOR MENUITEM "&Whitespace\tCtrl+Shift+8", IDM_VIEWSPACE MENUITEM "&End of Line\tCtrl+Shift+9", IDM_VIEWEOL MENUITEM "&Indentation Guides", IDM_VIEWGUIDES MENUITEM "&Line Numbers", IDM_LINENUMBERMARGIN MENUITEM "&Margin", IDM_SELMARGIN MENUITEM "&Fold Margin", IDM_FOLDMARGIN MENUITEM "&Output\tF8", IDM_TOGGLEOUTPUT //MENUITEM "&Parameters\tShift+F8", IDM_TOGGLEPARAMETERS END POPUP "&Tools" BEGIN MENUITEM "&Compile\tCtrl+F7", IDM_COMPILE MENUITEM "&Build\tF7", IDM_BUILD MENUITEM "&Go\tF5", IDM_GO MENUITEM "&Stop Executing\tCtrl+Break", IDM_STOPEXECUTE MENUITEM SEPARATOR //MENUITEM "&Next Message\tF4", IDM_NEXTMSG //MENUITEM "&Previous Message\tShift+F4", IDM_PREVMSG //MENUITEM "Clear &Output\tShift+F5", IDM_CLEAROUTPUT MENUITEM "&Switch Pane\tCtrl+F6", IDM_SWITCHPANE END POPUP "&Plugins" BEGIN MENUITEM "", IDM_TOOLS END POPUP "&Options" BEGIN MENUITEM "&Always On Top", IDM_ONTOP MENUITEM "Open Files &Here", IDM_OPENFILESHERE MENUITEM "Vertical &Split", IDM_SPLITVERTICAL MENUITEM "&Wrap", IDM_WRAP MENUITEM "Wrap Out&put", IDM_WRAPOUTPUT MENUITEM "&Read-Only", IDM_READONLY MENUITEM SEPARATOR POPUP "&Line End Characters" BEGIN MENUITEM "CR &+ LF", IDM_EOL_CRLF MENUITEM "&CR", IDM_EOL_CR MENUITEM "&LF", IDM_EOL_LF END MENUITEM "&Convert Line End Characters", IDM_EOL_CONVERT MENUITEM SEPARATOR MENUITEM "Change Inden&tation Settings...\tCtrl+Shift+I", IDM_TABSIZE MENUITEM "Use &Monospaced Font\tCtrl+F11", IDM_MONOFONT MENUITEM SEPARATOR MENUITEM "Open Local &Options File", IDM_OPENLOCALPROPERTIES MENUITEM "Open &User Options File", IDM_OPENUSERPROPERTIES MENUITEM "Open &Global Options File", IDM_OPENGLOBALPROPERTIES MENUITEM "Open A&bbreviations File", IDM_OPENABBREVPROPERTIES //MENUITEM "Open Lua Startup Scr&ipt", IDM_OPENLUAEXTERNALFILE MENUITEM SEPARATOR END // used: abcghlmoprstux //POPUP "&Language" //BEGIN // MENUITEM "", IDM_LANGUAGE //END POPUP "&Buffers" BEGIN MENUITEM "&Previous\tShift+F6", IDM_PREVFILE MENUITEM "&Next\tF6", IDM_NEXTFILE MENUITEM "&Close All", IDM_CLOSEALL MENUITEM "&Save All", IDM_SAVEALL END POPUP "&Help" BEGIN MENUITEM "&Quick Help\tF1", IDM_HELP MENUITEM "&sdlBasic Reference Guide", IDM_HELP_SCITE MENUITEM "&About sdlBasic IDE", IDM_ABOUT END END ABOUT DIALOG 26, 41, 350, 242 CAPTION "About sdlBasic IDE" STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Sans Serif" BEGIN CONTROL "", IDABOUTSCINTILLA, "Scintilla", WS_CHILD, 1, 1, 346, 218 ICON "SciTE", -1, 1, 221, 32, 32, WS_CHILD | WS_VISIBLE DEFPUSHBUTTON "OK", IDOK, 26, 222, 322, 20, WS_TABSTOP END GREP DIALOG 26, 41, 356, 61 CAPTION "Find in Files" STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Sans Serif" BEGIN LTEXT "Fi&nd what:", -1, 5, 7, 40, 8 COMBOBOX IDFINDWHAT, 50, 5, 245, 50, WS_TABSTOP | CBS_DROPDOWN | CBS_AUTOHSCROLL LTEXT "F&iles:", -1, 5, 25, 40, 8 COMBOBOX IDFILES, 50, 23, 245, 50, WS_TABSTOP | CBS_DROPDOWN | CBS_AUTOHSCROLL LTEXT "&Directory:", -1, 5, 43, 40, 8 COMBOBOX IDDIRECTORY, 50, 41, 230, 50, WS_TABSTOP | CBS_DROPDOWN | CBS_AUTOHSCROLL DEFPUSHBUTTON "&Find", IDOK, 301, 5, 50, 14, WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 301, 23, 50, 14, WS_TABSTOP PUSHBUTTON "..", IDDOTDOT, 285, 41, 10, 14, WS_TABSTOP PUSHBUTTON "&Browse...", IDBROWSE, 301, 41, 50, 14, WS_TABSTOP END GOLINE DIALOG 26, 41, 240, 50 CAPTION "Go To" STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Sans Serif" BEGIN LTEXT "&Destination Line:", -1, 5, 8, 70, 8 EDITTEXT IDGOLINE, 75, 6, 30, 12, WS_TABSTOP | ES_NUMBER LTEXT "&Column:", -1, 115, 8, 35, 8 EDITTEXT IDGOLINECHAR, 150, 6, 30, 12, WS_TABSTOP | ES_NUMBER LTEXT "Current Line:",-1,5,21,50,8,NOT WS_GROUP LTEXT "1234567",IDCURRLINE,75,21,30,8,NOT WS_GROUP LTEXT "Column:",-1,115,21,35,8,NOT WS_GROUP LTEXT "1234567",IDCURRLINECHAR,150,21,30,8,NOT WS_GROUP LTEXT "Last Line:",-1,5,34,50,8,NOT WS_GROUP LTEXT "1234567",IDLASTLINE,75,34,30,8,NOT WS_GROUP DEFPUSHBUTTON "&Go To", IDOK, 190, 6, 45, 14, WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 190, 26, 45, 14, WS_TABSTOP END INSABBREV DIALOG 26, 41, 181, 45 CAPTION "Insert Abbreviation" STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Sans Serif" BEGIN LTEXT "&Abbreviation:", -1, 5, 8, 65, 8 // EDITTEXT IDABBREV, 70, 6, 106, 12, WS_TABSTOP COMBOBOX IDABBREV, 70, 6, 106, 88, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_HASSTRINGS | CBS_SORT DEFPUSHBUTTON "&Insert", IDOK, 70, 26, 50, 14, WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 126, 26, 50, 14, WS_TABSTOP END TABSIZE DIALOG 26, 41, 155, 55 CAPTION "Indentation Settings" STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Sans Serif" BEGIN LTEXT "&Tab Size:", -1, 5, 8, 70, 8 EDITTEXT IDTABSIZE, 79, 6, 15, 12, WS_TABSTOP | ES_NUMBER LTEXT "&Indent Size:", -1, 5, 26, 70, 8 EDITTEXT IDINDENTSIZE, 79, 24, 15, 12, WS_TABSTOP | ES_NUMBER AUTOCHECKBOX "&Use tabs:", IDUSETABS,4,40,90,12, WS_GROUP | WS_TABSTOP | BS_LEFTTEXT DEFPUSHBUTTON "OK", IDOK, 100, 6, 50, 14, WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 100, 26, 50, 14, WS_TABSTOP END #ifdef ALL_PARAMS PARAMETERS DIALOG 26, 41, 130, 175 #endif PARAMETERS DIALOG 26, 41, 130, 100 CAPTION "Parameters" STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Sans Serif" BEGIN LTEXT "", IDCMD, 5, 5, 120, 8 LTEXT "&1:", -1, 5, 20, 8, 8 EDITTEXT IDPARAMSTART+0, 15, 18, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL LTEXT "&2:", -1, 5, 35, 8, 8 EDITTEXT IDPARAMSTART+1, 15, 33, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL LTEXT "&3:", -1, 5, 50, 8, 8 EDITTEXT IDPARAMSTART+2, 15, 48, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL LTEXT "&4:", -1, 5, 65, 8, 8 EDITTEXT IDPARAMSTART+3, 15, 63, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL #ifdef ALL_PARAMS LTEXT "&5:", -1, 5, 80, 8, 8 EDITTEXT IDPARAMSTART+4, 15, 78, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL LTEXT "&6:", -1, 5, 95, 8, 8 EDITTEXT IDPARAMSTART+5, 15, 93, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL LTEXT "&7:", -1, 5, 110, 8, 8 EDITTEXT IDPARAMSTART+6, 15, 108, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL LTEXT "&8:", -1, 5, 125, 8, 8 EDITTEXT IDPARAMSTART+7, 15, 123, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL LTEXT "&9:", -1, 5, 140, 8, 8 EDITTEXT IDPARAMSTART+8, 15, 138, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL DEFPUSHBUTTON "&Execute", IDOK, 6, 155, 55, 14, WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 70, 155, 55, 14, WS_TABSTOP #endif DEFPUSHBUTTON "&Execute", IDOK, 6, 80, 55, 14, WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 70, 80, 55, 14, WS_TABSTOP END #ifdef ALL_PARAMS PARAMETERSNONMODAL DIALOG 26, 41, 130, 160 #endif PARAMETERSNONMODAL DIALOG 26, 41, 130, 85 CAPTION "Parameters" STYLE DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Sans Serif" BEGIN LTEXT "&1:", -1, 5, 5, 8, 8 EDITTEXT IDPARAMSTART+0, 15, 3, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL LTEXT "&2:", -1, 5, 20, 8, 8 EDITTEXT IDPARAMSTART+1, 15, 18, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL LTEXT "&3:", -1, 5, 35, 8, 8 EDITTEXT IDPARAMSTART+2, 15, 33, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL LTEXT "&4:", -1, 5, 50, 8, 8 EDITTEXT IDPARAMSTART+3, 15, 48, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL #ifdef ALL_PARAMS LTEXT "&5:", -1, 5, 65, 8, 8 EDITTEXT IDPARAMSTART+4, 15, 63, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL LTEXT "&6:", -1, 5, 80, 8, 8 EDITTEXT IDPARAMSTART+5, 15, 78, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL LTEXT "&7:", -1, 5, 95, 8, 8 EDITTEXT IDPARAMSTART+6, 15, 93, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL LTEXT "&8:", -1, 5, 110, 8, 8 EDITTEXT IDPARAMSTART+7, 15, 108, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL LTEXT "&9:", -1, 5, 125, 8, 8 EDITTEXT IDPARAMSTART+8, 15, 123, 110, 12, WS_TABSTOP | ES_AUTOHSCROLL DEFPUSHBUTTON "&Set", IDOK, 6, 140, 55, 14, WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 70, 140, 55, 14, WS_TABSTOP #endif DEFPUSHBUTTON "&Set", IDOK, 6, 65, 55, 14, WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 70, 65, 55, 14, WS_TABSTOP END IDD_FIND DIALOG 30, 73, 275, 84 STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Find" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Fi&nd what:",-1,5,7,45,8 COMBOBOX IDFINDWHAT,50,5,145,50, WS_TABSTOP | CBS_DROPDOWN | CBS_AUTOHSCROLL AUTOCHECKBOX "Match &whole word only", IDWHOLEWORD,5,22,120,10, WS_GROUP | WS_TABSTOP AUTOCHECKBOX "Match &case", IDMATCHCASE,5,34,130,10, WS_TABSTOP AUTOCHECKBOX "Regular &expression", IDREGEXP,5,46,120,10, WS_TABSTOP AUTOCHECKBOX "Wrap aroun&d", IDWRAP,5,58,120,10, WS_TABSTOP AUTOCHECKBOX "Transform &backslash expressions", IDUNSLASH,5,70,160,10, WS_TABSTOP GROUPBOX "Direction", -1, 135,22,60,34,WS_GROUP AUTORADIOBUTTON "&Up",IDDIRECTIONUP,140,30,45,12, WS_GROUP AUTORADIOBUTTON "&Down",IDDIRECTIONDOWN,140,42,45,12 DEFPUSHBUTTON "&Find Next",IDOK,205,5,65,14,WS_GROUP PUSHBUTTON "&Mark All",IDMARKALL,205,23,65,14 PUSHBUTTON "Cancel",IDCANCEL,205,41,65,14 END IDD_FIND_ADV DIALOG 30, 73, 275, 96 STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Find" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Fi&nd what:",-1,5,7,45,8 COMBOBOX IDFINDWHAT,50,5,145,50, WS_TABSTOP | CBS_DROPDOWN | CBS_AUTOHSCROLL AUTOCHECKBOX "Match &whole word only", IDWHOLEWORD,5,22,120,10, WS_GROUP | WS_TABSTOP AUTOCHECKBOX "Match &case", IDMATCHCASE,5,34,130,10, WS_TABSTOP AUTOCHECKBOX "Regular &expression", IDREGEXP,5,46,120,10, WS_TABSTOP AUTOCHECKBOX "Wrap aroun&d", IDWRAP,5,58,120,10, WS_TABSTOP AUTOCHECKBOX "Transform &backslash expressions", IDUNSLASH,5,70,160,10, WS_TABSTOP AUTOCHECKBOX "Search only in &this style:", IDFINDINSTYLE,5,82,95,10, WS_TABSTOP EDITTEXT IDFINDSTYLE,100,81,30,12, WS_GROUP | WS_TABSTOP | ES_NUMBER GROUPBOX "Direction", -1, 135,22,60,34,WS_GROUP AUTORADIOBUTTON "&Up",IDDIRECTIONUP,140,30,45,12, WS_GROUP AUTORADIOBUTTON "&Down",IDDIRECTIONDOWN,140,42,45,12 DEFPUSHBUTTON "&Find Next",IDOK,205,5,65,14,WS_GROUP PUSHBUTTON "&Mark All",IDMARKALL,205,23,65,14 PUSHBUTTON "Cancel",IDCANCEL,205,41,65,14 END IDD_REPLACE DIALOG 36, 44, 285, 110 STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Replace" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Fi&nd what:",-1,5,7,55,8 COMBOBOX IDFINDWHAT,60,5,125,50,WS_TABSTOP | CBS_DROPDOWN | CBS_AUTOHSCROLL LTEXT "Re&place with:",-1,5,25,55,8 COMBOBOX IDREPLACEWITH,60,23,125,50,WS_TABSTOP | CBS_DROPDOWN | CBS_AUTOHSCROLL AUTOCHECKBOX "Match &whole word only", IDWHOLEWORD,5,42,130,10, WS_GROUP | WS_TABSTOP AUTOCHECKBOX "Match &case", IDMATCHCASE,5,54,130,10, WS_TABSTOP AUTOCHECKBOX "Regular &expression", IDREGEXP,5,66,120,10, WS_TABSTOP AUTOCHECKBOX "Wrap aroun&d", IDWRAP,5,78,120,10, WS_TABSTOP AUTOCHECKBOX "Transform &backslash expressions", IDUNSLASH,5,90,150,10, WS_TABSTOP DEFPUSHBUTTON "&Find Next",IDOK,190,5,90,14,WS_GROUP PUSHBUTTON "&Replace",IDREPLACE,190,23,90,14 PUSHBUTTON "Replace &All",IDREPLACEALL,190,41,90,14 PUSHBUTTON "Replace in &Selection",IDREPLACEINSEL,190,59,90,14 PUSHBUTTON "Close",IDCANCEL,190,77,90,14 LTEXT "Replacements:",-1,190,96,55,8 LTEXT "1234567",IDREPLDONE,250,96,30,8,NOT WS_GROUP END IDD_REPLACE_ADV DIALOG 36, 44, 285, 128 STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Replace" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Fi&nd what:",-1,5,7,55,8 COMBOBOX IDFINDWHAT,60,5,125,50,WS_TABSTOP | CBS_DROPDOWN | CBS_AUTOHSCROLL LTEXT "Re&place with:",-1,5,25,55,8 COMBOBOX IDREPLACEWITH,60,23,125,50,WS_TABSTOP | CBS_DROPDOWN | CBS_AUTOHSCROLL AUTOCHECKBOX "Match &whole word only", IDWHOLEWORD,5,42,130,10, WS_GROUP | WS_TABSTOP AUTOCHECKBOX "Match &case", IDMATCHCASE,5,54,130,10, WS_TABSTOP AUTOCHECKBOX "Regular &expression", IDREGEXP,5,66,120,10, WS_TABSTOP AUTOCHECKBOX "Wrap aroun&d", IDWRAP,5,78,120,10, WS_TABSTOP AUTOCHECKBOX "Transform &backslash expressions", IDUNSLASH,5,90,150,10, WS_TABSTOP AUTOCHECKBOX "Search only in &this style:", IDFINDINSTYLE,5,102,95,10, WS_TABSTOP EDITTEXT IDFINDSTYLE,100,101,30,12, WS_GROUP | WS_TABSTOP | ES_NUMBER DEFPUSHBUTTON "&Find Next",IDOK,190,5,90,14,WS_GROUP PUSHBUTTON "&Replace",IDREPLACE,190,23,90,14 PUSHBUTTON "Replace &All",IDREPLACEALL,190,41,90,14 PUSHBUTTON "Replace in &Selection",IDREPLACEINSEL,190,59,90,14 PUSHBUTTON "Replace in B&uffers",IDREPLACEINBUF,190,77,90,14 PUSHBUTTON "Close",IDCANCEL,190,95,90,14 LTEXT "Replacements:",-1,190,114,55,8 LTEXT "1234567",IDREPLDONE,250,114,30,8,NOT WS_GROUP END IDD_FIND2 DIALOGEX 0, 0, 243, 14 STYLE DS_SYSMODAL | DS_MODALFRAME | DS_CONTROL | WS_POPUP FONT 8, "MS Sans Serif" BEGIN LTEXT "Search for:",IDC_STATIC,4,2,40,8 EDITTEXT IDC_INCFINDTEXT,45,1,175,12,ES_AUTOHSCROLL | ES_WANTRETURN | NOT WS_BORDER,WS_EX_STATICEDGE DEFPUSHBUTTON ">",IDC_INCFINDBTNOK,223,0,16,14 END // 0xDD is VK_OEM_6, ']}' but not in mingw headers ACCELS ACCELERATORS BEGIN "N", IDM_NEW, VIRTKEY, CONTROL "O", IDM_OPEN, VIRTKEY, CONTROL "O", IDM_OPENSELECTED, VIRTKEY, CONTROL, SHIFT "R", IDM_REVERT, VIRTKEY, CONTROL "W", IDM_CLOSE, VIRTKEY, CONTROL "S", IDM_SAVE, VIRTKEY, CONTROL "S", IDM_SAVEAS, VIRTKEY, CONTROL, SHIFT "P", IDM_SAVEACOPY, VIRTKEY, CONTROL, SHIFT "P", IDM_PRINT, VIRTKEY, CONTROL "F", IDM_FIND, VIRTKEY, CONTROL "F", IDM_FINDINFILES, VIRTKEY, CONTROL, SHIFT "H", IDM_REPLACE, VIRTKEY, CONTROL "G", IDM_GOTO, VIRTKEY, CONTROL "E", IDM_MATCHBRACE, VIRTKEY, CONTROL "E", IDM_SELECTTOBRACE, VIRTKEY, CONTROL, SHIFT VK_SPACE, IDM_SHOWCALLTIP, VIRTKEY, CONTROL, SHIFT VK_SPACE, IDM_COMPLETE, VIRTKEY, CONTROL "B", IDM_ABBREV, VIRTKEY, CONTROL "R", IDM_INS_ABBREV, VIRTKEY, CONTROL, SHIFT "I", IDM_COMPLETE, VIRTKEY, CONTROL "J", IDM_PREVMATCHPPC, VIRTKEY, CONTROL "J", IDM_SELECTTOPREVMATCHPPC, VIRTKEY, CONTROL, SHIFT "K", IDM_NEXTMATCHPPC, VIRTKEY, CONTROL "K", IDM_SELECTTONEXTMATCHPPC, VIRTKEY, CONTROL, SHIFT "Q", IDM_BLOCK_COMMENT, VIRTKEY, CONTROL "Q", IDM_STREAM_COMMENT, VIRTKEY, CONTROL, SHIFT "B", IDM_BOX_COMMENT, VIRTKEY, CONTROL, SHIFT VK_RETURN, IDM_COMPLETEWORD, VIRTKEY, CONTROL // this does not work and gives RC warning: // ASCII character not equivalent to virtual key code //"*", IDM_EXPAND, VIRTKEY, CONTROL // this works for a german keyboard 187, IDM_EXPAND, VIRTKEY, CONTROL, SHIFT VK_MULTIPLY, IDM_EXPAND, VIRTKEY, CONTROL /* "0", IDM_TOOLS+0, VIRTKEY, CONTROL "1", IDM_TOOLS+1, VIRTKEY, CONTROL "2", IDM_TOOLS+2, VIRTKEY, CONTROL "3", IDM_TOOLS+3, VIRTKEY, CONTROL "4", IDM_TOOLS+4, VIRTKEY, CONTROL "5", IDM_TOOLS+5, VIRTKEY, CONTROL "6", IDM_TOOLS+6, VIRTKEY, CONTROL "7", IDM_TOOLS+7, VIRTKEY, CONTROL "8", IDM_TOOLS+8, VIRTKEY, CONTROL "9", IDM_TOOLS+9, VIRTKEY, CONTROL */ "1", IDM_BUFFER+0, VIRTKEY, ALT "2", IDM_BUFFER+1, VIRTKEY, ALT "3", IDM_BUFFER+2, VIRTKEY, ALT "4", IDM_BUFFER+3, VIRTKEY, ALT "5", IDM_BUFFER+4, VIRTKEY, ALT "6", IDM_BUFFER+5, VIRTKEY, ALT "7", IDM_BUFFER+6, VIRTKEY, ALT "8", IDM_BUFFER+7, VIRTKEY, ALT "9", IDM_BUFFER+8, VIRTKEY, ALT "0", IDM_BUFFER+9, VIRTKEY, ALT "U", IDM_UPRCASE, VIRTKEY, CONTROL, SHIFT "U", IDM_LWRCASE, VIRTKEY, CONTROL "8", IDM_VIEWSPACE, VIRTKEY, CONTROL, SHIFT "9", IDM_VIEWEOL, VIRTKEY, CONTROL, SHIFT "I", IDM_TABSIZE, VIRTKEY, CONTROL, SHIFT VK_F1, IDM_HELP, VIRTKEY VK_F2, IDM_BOOKMARK_NEXT, VIRTKEY VK_F2, IDM_BOOKMARK_PREV, VIRTKEY, SHIFT VK_F2, IDM_BOOKMARK_TOGGLE, VIRTKEY, CONTROL VK_F2, IDM_BOOKMARK_NEXT_SELECT, VIRTKEY, ALT VK_F2, IDM_BOOKMARK_PREV_SELECT, VIRTKEY, ALT, SHIFT VK_F3, IDM_FINDNEXT, VIRTKEY VK_F3, IDM_FINDNEXTBACK, VIRTKEY, SHIFT VK_F3, IDM_FINDNEXTSEL, VIRTKEY, CONTROL VK_F3, IDM_FINDNEXTBACKSEL, VIRTKEY, CONTROL, SHIFT VK_F4, IDM_NEXTMSG, VIRTKEY VK_F4, IDM_PREVMSG, VIRTKEY, SHIFT VK_F4, IDM_CLOSE, VIRTKEY, CONTROL VK_F5, IDM_GO, VIRTKEY VK_F5, IDM_CLEAROUTPUT, VIRTKEY, SHIFT VK_F6, IDM_PREVFILE, VIRTKEY, SHIFT VK_F6, IDM_SWITCHPANE, VIRTKEY, CONTROL VK_F6, IDM_NEXTFILE, VIRTKEY VK_F6, IDM_SWITCHPANE, VIRTKEY, CONTROL, SHIFT VK_F7, IDM_COMPILE, VIRTKEY, CONTROL VK_F7, IDM_BUILD, VIRTKEY VK_F8, IDM_TOGGLEOUTPUT, VIRTKEY VK_F8, IDM_TOGGLEPARAMETERS, VIRTKEY, SHIFT VK_F9, IDM_MACROLIST, VIRTKEY, SHIFT VK_F9, IDM_MACROPLAY, VIRTKEY VK_F9, IDM_MACRORECORD, VIRTKEY, CONTROL VK_F9, IDM_MACROSTOPRECORD, VIRTKEY, CONTROL, SHIFT VK_F11, IDM_FULLSCREEN, VIRTKEY VK_F11, IDM_MONOFONT, VIRTKEY, CONTROL VK_TAB, IDM_PREVFILE, VIRTKEY, CONTROL, SHIFT VK_TAB, IDM_NEXTFILE, VIRTKEY, CONTROL VK_BACK, IDM_UNDO, VIRTKEY, ALT VK_BACK, IDM_REDO, VIRTKEY, ALT, SHIFT VK_CANCEL, IDM_STOPEXECUTE, VIRTKEY, CONTROL // Workaround for the most common case where SciTE undo and // redo buttons don't enable/disable when you expect. "Z", IDM_UNDO, VIRTKEY, CONTROL "Y", IDM_REDO, VIRTKEY, CONTROL "X", IDM_CUT, VIRTKEY, CONTROL "C", IDM_COPY, VIRTKEY, CONTROL "I", IDM_INCSEARCH, VIRTKEY, CONTROL, ALT END IDR_FILENEW BITMAP "bmp/filenew.bmp" IDR_FILEOPEN BITMAP "bmp/fileopen.bmp" IDR_FILESAVE BITMAP "bmp/filesave.bmp" IDR_CLOSEFILE BITMAP "bmp/closefile.bmp" IDR_UNDO BITMAP "bmp/undo.bmp" IDR_REDO BITMAP "bmp/redo.bmp" IDR_FIND BITMAP "bmp/search.bmp" IDR_FINDNEXT BITMAP "bmp/findnext.bmp" IDR_REPLACE BITMAP "bmp/replace.bmp" IDR_BOOKMARK_TOGGLE BITMAP "bmp/togglebookmark.bmp" IDR_BOOKMARK_PREV BITMAP "bmp/previousbookmark.bmp" IDR_BOOKMARK_NEXT BITMAP "bmp/nextbookmark.bmp" IDR_GO BITMAP "bmp/go.bmp" IDR_STOPEXECUTE BITMAP "bmp/stop.bmp" VS_VERSION_INFO VERSIONINFO FILEVERSION 1, 6, 4, 0 PRODUCTVERSION 1, 6, 4, 0 FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 FILETYPE VFT_APP FILESUBTYPE VFT2_UNKNOWN BEGIN BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Neil Hodgson neilh@scintilla.org\0" VALUE "FileDescription", "SciTE - a Scintilla based Text Editor\0" VALUE "FileVersion", "1.64\0" VALUE "InternalName", "SciTE\0" VALUE "LegalCopyright", "Copyright 1998-2005 by Neil Hodgson\0" VALUE "OriginalFilename", "SciTE.EXE\0" VALUE "ProductName", "SciTE\0" VALUE "ProductVersion", "1.64\0" END END END usr/src/sdlBasic/src/sdlBasic/win32/SingleThreadExtension.cxx0000777000076500007660000001041010463136731021413 0ustar // SciTE - Scintilla based Text Editor /** @file SingleThreadExtension.cxx ** Extension that wraps another extension so that OnExecute calls ** are always funneled to the initial thread. **/ // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. // For the single case of LuaExtension where this is needed at present, // it might have been simpler (well, a little less tedious and very // slightly more efficient) to make this inherit from LuaExtension, and // only override Initialise, Finalise, and OnExecute. Or to do it with // an #ifdef in LuaExtension. But I did it this way so that other // extensions can leverage it without needing to do anything special. #include "SingleThreadExtension.h" // Is it true that only OnExecute needs to be protected / serialized? // Lua does not support macros, but does OnMacro also need it? Others? // For OnExecute and any other messages that needed to be dispatched, // WPARAM will point to the wrapped extension // LPARAM will hold the argument(s) // Return value is 0 for false (continue), 1 for true (handled / stop) enum { STE_WM_ONEXECUTE = 2001 }; LRESULT PASCAL SingleThreadExtension::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { if (uMsg == STE_WM_ONEXECUTE) { Extension *extension = reinterpret_cast(wParam); return extension->OnExecute(reinterpret_cast(lParam)); } WNDPROC lpPrevWndProc = reinterpret_cast(GetWindowLong(hwnd, GWL_USERDATA)); if (lpPrevWndProc) return ::CallWindowProc(lpPrevWndProc, hwnd, uMsg, wParam, lParam); return ::DefWindowProc(hwnd, uMsg, wParam, lParam); } bool SingleThreadExtension::Initialise(ExtensionAPI *host_) { hwndDispatcher = CreateWindow( "STATIC", "SciTE_SingleThreadExtension_Dispatcher", 0, 0, 0, 0, 0, 0, 0, GetModuleHandle(NULL), 0 ); LONG subclassedProc = SetWindowLong(hwndDispatcher, GWL_WNDPROC, reinterpret_cast(WndProc)); SetWindowLong(hwndDispatcher, GWL_USERDATA, subclassedProc); return ext->Initialise(host_); } bool SingleThreadExtension::Finalise() { ext->Finalise(); if (hwndDispatcher) { DestroyWindow(hwndDispatcher); hwndDispatcher = NULL; } return false; } bool SingleThreadExtension::Clear() { return ext->Clear(); } bool SingleThreadExtension::Load(const char *filename) { return ext->Load(filename); } bool SingleThreadExtension::InitBuffer(int index) { return ext->InitBuffer(index); } bool SingleThreadExtension::ActivateBuffer(int index) { return ext->ActivateBuffer(index); } bool SingleThreadExtension::RemoveBuffer(int index) { return ext->RemoveBuffer(index); } bool SingleThreadExtension::OnOpen(const char *filename) { return ext->OnOpen(filename); } bool SingleThreadExtension::OnSwitchFile(const char *filename) { return ext->OnSwitchFile(filename); } bool SingleThreadExtension::OnBeforeSave(const char *filename) { return ext->OnBeforeSave(filename); } bool SingleThreadExtension::OnSave(const char *filename) { return ext->OnSave(filename); } bool SingleThreadExtension::OnChar(char c) { return ext->OnChar(c); } bool SingleThreadExtension::OnExecute(const char *cmd) { return (SendMessage(hwndDispatcher, STE_WM_ONEXECUTE, reinterpret_cast(ext), reinterpret_cast(cmd)) != 0); } bool SingleThreadExtension::OnSavePointReached() { return ext->OnSavePointReached(); } bool SingleThreadExtension::OnSavePointLeft() { return ext->OnSavePointLeft(); } bool SingleThreadExtension::OnStyle(unsigned int p, int q, int r, Accessor *s) { return ext->OnStyle(p,q,r,s); } bool SingleThreadExtension::OnDoubleClick() { return ext->OnDoubleClick(); } bool SingleThreadExtension::OnUpdateUI() { return ext->OnUpdateUI(); } bool SingleThreadExtension::OnMarginClick() { return ext->OnMarginClick(); } bool SingleThreadExtension::OnMacro(const char *p, const char *q) { return ext->OnMacro(p,q); } bool SingleThreadExtension::OnUserListSelection(int listType, const char *selection) { return ext->OnUserListSelection(listType, selection); } bool SingleThreadExtension::SendProperty(const char *prop) { return ext->SendProperty(prop); } usr/src/sdlBasic/src/sdlBasic/win32/resource.h0000777000076500007660000000066710463136771016442 0ustar //{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by SciTERes.rc // // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif usr/src/sdlBasic/src/sdlBasic/win32/UniqueInstance.h0000777000076500007660000000312310463136771017534 0ustar // SciTE - Scintilla based Text Editor /** @file UniqueInstance.h ** Header of the class to ensure a unique instance of the editor. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. class SciTEWin; /** */ class UniqueInstance { private: SciTEWin *stw; ///< Access to SciTEWin interface UINT identityMessage; ///< Registered message to identify SciTE instances HANDLE mutex; ///< Mutex to avoid concurrent running SString mutexName; ///< Name of the above bool bAlreadyRunning; ///< true if another instance accepting files is found HWND hOtherWindow; ///< Handle of the window of the found other instance public: UniqueInstance(); ~UniqueInstance(); void Init(SciTEWin *stw_); ///< To set the access to the SciTEWin interface bool AcceptToOpenFiles(bool bAccept); ///< Set mutex and see if succeed void ToggleOpenFilesHere(); ///< Change the option to open files in this instance and ask other instance to give up this option LRESULT CopyData(COPYDATASTRUCT *pcds); ///< Send command line to existing instance LRESULT CheckMessage(UINT message, WPARAM wParam, LPARAM lParam); ///< Test if a given message is the identity message void CheckOtherInstance(); ///< Create mutex name and try to set it bool FindOtherInstance(); ///< Find another instance answering to the identity message void SendCommands(const char *cmdLine); ///< Send the command line to the other instance static BOOL CALLBACK SearchOtherInstance(HWND hWnd, LPARAM lParam); ///< Callback in the window enumeration }; usr/src/sdlBasic/src/sdlBasic/win32/compile.bat0000777000076500007660000000046010463136771016551 0ustar rem the installation path set prefix=%ProgramFiles%\sdlBasic rem WARNING!!! verify the correct path of mingGw set MINGWPATH=c:\devel\c-cpp\mingw @path %MINGWPATH%\bin;%PATH% mingw32-make rem backup devel bin directory copy ..\..\bin\sdlBasic.exe C:\devel\basic\sdlBasic\bin\win32\mingw usr/src/sdlBasic/src/sdlBasic/win32/bmp/0000777000000000000000000000000010645354715016751 5ustar rootrootusr/src/sdlBasic/src/sdlBasic/win32/bmp/filesave.bmp0000777000076500007660000000407010463136771017506 0ustar BM86(   ðóñµ/¸4«*°1ê5¸:ÅA¶6 ê?®;(·@¯<)µ;)è:éHÃFÂB%´A1·E)ÂJ!«F5ÀG-ÃL$«C?´F8·L3òOÂQ,ÀM6³L?ïS#9n6ÂW5ÀS>9m=5oB·VI9t?ÁZEÃ^=@tDõ`*¤ZWCxHÂcCÀ`Jíf4£]aÇ{2‚KOLJOLQúv(W€R1ˆSïnAõmAT„Qÿ‡øz0^†`[‹X÷€9ÿŒ"XŽ^îzOÔ…C£uuT‘[ë€Gþˆ3özRó€I÷…Alfh’dÿ’.d•añ…NôŠEÿŽ=âfî‰PôˆQì†Yg™eÒ‚kb™hòŽIÿ˜6þ”Cki÷ˆ_6¥nóŽV{—rÞ†rÿŸ?ñcíŸGZ¥sü—VÿœLò›TE«zþ—bÿ¦G€¤z[­v|§xÿ¢Rÿ¤Uïštþ¨W€ªƒY±„ÿªZÿ«[P·…ý¤lDº…ÿ±_²‡ô¥}ÿ®hV½Œ4‘ÿ·bÔ«Šœ³‘÷²r—³•ý±tÿµmNÅÿ·oþ°~ü·wZÉ™ÿº{xÄ™ÿ¾t­°®ÿ¼}Å®®ý¿}þ¾‡öº“Ö²³æ¼›ýĉʹ½yÒ«Ó¿°Í½¹‹Î°ÎÀ´Ù¼¹HÞ¯Ô½½Î½ÀXݲ°Ì´»Ê´ÒĹ×ÀÀÌÂÁÿÊŸÑÀÄæÇ°3ç´ŽÙ¶ãʶ×ɽ™Ö¼ÑÇÆ×ÈÄØÆÊìͶåÈÅSéºçκ1ï½ÕÍÄÛËÇðѺâËËäÑÁÞÎÊëÒ¾ØÎÍÞÌÏ•àâÞÅ/øÁ9õÄïÕÂõÖ¾éÕÅÇÛÈßÕÔÙÕ×5ýÆôÚÇ+ÿÉîÛËâØ×»ãÐÜØÛéÙÕ9þÏDþÎj÷ÎæÜÛíßÓÑãØãÞá‰÷ÖôåÙ÷ÛçâåâèÞÒëâêçâêåè úÚáìåòèçîéìÇõæÔôçëðçñìïëïíòðêÿñä®/ÿðìéôíüñññôòþöíøôöíö÷ÿöõôøöûöùþûöòûüëûÿùûÿûþüÿÿùüÿþ–-.%+0000000000+..((.E„ZªÒËËËËËËËËÒ±•©p[[q‡qsG’™¨¨™™™™™™™’}ŠNH<[(‡vvG¡±XXœÀººººÀ¢ryNAH[(‡vvP³À §ÒÊÊÊÊвdkNAA['‡v~P¾Ê²Ú××××Ú¾V^NRA['‡~~TÊÚ ¾æÞÞÞÞâÊCIRNRh!‡~{T×ábS×ëææææëÐ9:RNRc!‹~{`â÷ûûòòòòòòõÞ/*R\Nc!‹†‡UµÓÓÓÓÓÓÓÓÓ×¼R[Nc"‡‡gKUPPKKKKJJ@@6=\[\c‡‡‡‡‡{{~~vvvsslslch[cÇÍÍÍÆÆÆ¿¿····®®®®«qc ÜúüüüõÙÂàðìêêæåâ¹pc Øÿÿÿÿ䤎šÃçðóóïíï¯pp ‘Øÿÿÿö¤ouŒÖãèéìïñ¯qq ‘ÏÿÿÿÉ|WnxˆÅÕÖÛÝïñ¦ql‘‘Ïÿÿÿt]YfnˆÄÎÌÔÔïñ¦ql“”ÈÿÿùWOOBFzÄÎÌÌÌööžql“”ÈÿùùO?5,&_¸Ì¬ ¶öôžqs“”½üùùm;4, 8€¬£°Ñóôœqs“”·üùö¥M3)#$2j­äóöø›D1˜˜½üùù߃>7aaL…ÙýùÿÿžieT‹—ÆÇ»»»´´´´´´´´···‚pQ Áîîîîîîîîîî Ÿusr/src/sdlBasic/src/sdlBasic/win32/bmp/togglebookmark.bmp0000777000076500007660000000407010463137020020703 0ustar BM86(   ðóñ7:*=);2:&>=:E4,I:$*A&.D06H1:J:@QA>a'Le!T`(I^8Ei&7w ˆGb7,€aa2@r F_D‹EcJ’6%Š/Œ6ƒ— ?~+F(5ŠZd^¥>3‘0–;‰'zkM0&C‹$Y€3hdfOŠ'B‰0IŠ,,™UŠ/5›PŠ5%¦LŒ;qmoµ &±|^C˜=rus€xq~|w<ª7#¸)H¦D!‰=ªDZ£L„Žg‚§‡„?t¹5µ>F„g¢Xˆ‹‰FwÉ7¿At i=¼GDºMEºXŽ‘7ÉBCÂX¡}8ÉP•˜–'‚êRŠÌ0É]8ÔF>ˆáO‹ÕJŒ×8ÓRPŽÑ[ŽÎ=ÌhY’Ôž¡ŸHÏilšÆQ“ß=Æ„?“è*“ñ^—Ú+—îBÝ]¤§¥MÔm´’TÒtU›àGÖrIÙl[›àCÝhsŸÒ]šå¢Ë©¬ªƒÆ†pŸÚeŸãJØ}`¢àRØ{ƒ¤Ô ¿˜›ªÄFÛƒt©×j¨à^Ý~Já€G¨ó²µ³x¦è¡²ÆYÞŠÊ™[á„zªæ`Ü|®ä‚±ß¸»¹]âŽF±÷¦¶Ê ´ÑF³ôN³ó¦Ê¦Š±äSê‰eâ”–²álà™W¶ôW¹ñg䗯̭½Á¾Ž·ã¥¹×Oî\é—»àlºïËû•»ßpåV¾ø˜»ækç¢ºÏµÃÆÄxå£qÁð\ñ¡ÇÊÈ‚ç¬»ÆØ¤ÄæcÆú«Ååqì®ÀÔÁvÇöÅÒĸÆâ¬ÄëfÌùYÍý€ì²ÒÐËŒê³nðµÁÌ߈ì¸ÏÓÑ‚í»}ð¸·Ìêxóµ^ù³–ì»kõ»…Óõ‘í¾f÷¿zô¾ÂÓèðÕñÂdÿ¹‰ôÂwøÄkßú}öÇØÙßdüÅlûË`ÿ˸Üñ²ßï¬óÍ}äýØßè¢÷ÍÁáíxæÿiÿ×éü©÷Òzêýâãéãæäšü×óÿ‰ôÿ·ýÞ‹÷ÿ-:•üÿ—ÿüÇÿýB2²1<.;`7AÌVŠh7C?5„—“h9LW´¦¦©k3QJ4“¾¾ºº·k5XWÐ×Ú;º·u0ü][-©ëÚ©ÒÚÐËÃu0üjVîów8ZÃßÐËÃu*tv'´ú†/D›áÞËÎy'€%V÷,Æ&+kÕáÓØyˆ!¯•6TN¯äÜØz! š"UnG¸"6yØâÛz «YKý™PS¼çæz ¹­q@OþlMdžª:Žæè| ½ƒùðcö³þ‹‚ðùmI\Öñ| ÑÔìþò–¬þ…˜òþì–¡ >£ñ| Ñå~òþôrþrôþòƒåF$eàs Ñgòþøþøþò_”#E®s(ÇÀ{}ipøþÿþøpf}¬ÀíH)a=–ýþþþþþÿÿÿþþþþþý¶$$Ä–ÁÉÉÉÉùþÿþùÉÙêïéÝÈ¥Rœýýþýýœ‡¿õÝõ’ ýýÊþÊýý§‰ÏœýýŸ^þo»ýý§Ïbùý»xþ˜¨ýùƒÂµ±…þŒÅ‘˜þŒ¢ã–°usr/src/sdlBasic/src/sdlBasic/win32/bmp/redo.bmp0000777000076500007660000000407010463137020016625 0ustar BM86(   óóó…„v€u…Ž„I°BŒÒ‡£ÜŸ»æ¸¾ç»ÃéÀGUFJXIYfXÕðÓ~|`XTNFEB><20&% ‚ „ˆ ‹ Œ “$˜(›!+$/ (7¥0;¨5=©7?ª8 ! @«:B¬<D­=E®?&G¯A%J±DL²FN³HQµKS¶MW¸QY¹S[ºU\»W`½[b¾]fÀahÁcjÂelÃg+nÄipÅkrÆmtÇovÈqxÉszÊv|Ëx1ÌzƒÎ~…χЃ‰Ñ…ŽÓŠÔŒ$5#’ÕŽ•Ö‘—ד™Ø•œÙ˜žÚš->, Û¥Ý¢§Þ¤ªß§¬à©¯á¬;L:±â®;K:³ã±¶ä³¸å¶Àè¾ÅêÃÊìÈÍíËÚòÙÝóÜè÷ç" ÒïÑ/>/FRFR\Rgsg^f^iqilsl“›“u{u¢¨¢˜ž˜…öüö¿Ã¿–™–˜š˜ÎÐÎÝÞݤ¥¤ÿÿÿëëëåååâââßßßÙÙÙÖÖÖÓÓÓÑÑÑÎÎÎÊÊÊÇÇÇÅÅÅ¿¿¿³³³±µ°ÿýúø õ óðîëéæäá!ß#Ü&Ú(×+Õ-Ò0Ð2Í5 Ë7 È: Æ< Ã? ÁA ¾D ¼F ¹I ·K ´N ²P ¯S­UªX¨Z¥]£_ bžd›g™i–l”n‘qsŒvŠx‡{…}‚€€‚}…{‡xŠvŒsq‘n”l–i™g›džb _£]¥Z¨XªU­S¯P²N´K·I¹F¼D¾AÁ ?à <Æ!:È!7Ë!5Í"2Ð"0Ò#-Õ#+×#(Ú$&Ü$#ß%!á%ä%æ&é&ë'î'ð(ó( õ( ø)ú)ý*ÿ*„˜—˜€‹˜"vŽ˜;D”˜f„Š˜sHv‘3P-—![yc?Wt"-}“ ,.13;Zm;sr>?@K ;w–‹˜'.1356=PfmmmK?@AC_U‡Ž .1356799:<=>?@ACET -€’†418;?@BFHIJJJKJJHFJ1y•~q)HHIKLLNOPPRSTVVO]Pu—p/OPQRRTTVWYYZ[^]`ƒ pWWXYY[[]__``bddL\#[^___aabddfggh0p ˜M6gghii ji2|4 ?kkkllll^\‚| 4rXmmmn?p †˜s[oon$‰˜siM‚˜s^N †˜s"eM˜usr/src/sdlBasic/src/sdlBasic/win32/bmp/undo.bmp0000777000076500007660000000407010463137020016641 0ustar BM86(   ðóñRdPdMjdgdZa!!W}_$$Up$$Z((R‚†((W†‰**U• p##p&&nŒ11Z“77Z&&‚99],,}@@X==`²--Œ//‰CC[CC`33†##²66‰HH`GGeHHeKKbKKc55œ%%ÅRRc??“**Å>>œBB“TTjTTpWWn**ØZZk//Ø``pLLŸffjeewiiy44õllullvSS²77õYY¨==ëooyZZ²;;ÿttwwz>>ÿ@@ÿww€BBÿzz~DDÿff²FFÿJJÿKKÿ‰MMÿ‚‚…NNÿQQÿRRÿ††‰UUÿrr¼XXÿvv¼‹‹Ž\\ÿ]]ÿ‹‹•``ÿ’~~¼ssØ||ÅddÿeeÿÅggÿ””—~~Ï””kkÿ——™ppõnnÿooÿššqqÿssÿŸttÿuuÿwwÿŸŸ¢ŒŒÏxxÿzzÿ¢¢£{{ÿ||ÿ~~ÿ¥¥§€€ÿ¦¦©‚‚ÿƒƒÿ¨¨ª……ÿ‡‡ÿ««­ˆˆÿ™™ØššØŽŽõŠŠÿ‹‹ÿŒŒÿÿÿ±±´’’ÿ““ÿ””ÿžžë––ÿ——ÿ¶¶·˜˜ÿ¥¥â™™ÿššÿ››ÿÿžžÿŸŸÿ  ÿ­­â½½¿¢¢ÿ¿¿À¤¤ÿ¥¥ÿ¦¦ÿ³³â§§ÿ¨¨ÿÂÂÄ©©ÿ²²ë««ÿÅÅÆ­­ÿ¯¯ÿ°°ÿÈÈȱ±ÿ¶¶õ²²ÿÉÉʳ³ÿ´´ÿµµÿ¶¶ÿ··ÿ¸¸ÿ½½õ¹¹ÿººÿ¿¿õ»»ÿ¼¼ÿ½½ÿÑÑѾ¾ÿ¿¿ÿÀÀÿÔÔÕÂÂÿÃÃÿÄÄÿÖÖÖÅÅÿÆÆÿÇÇÿÈÈÿÙÙÙÉÉÿÊÊÿËËÿÌÌÿÍÍÿÜÜÝÎÎÿÝÝÝÓÓõÏÏÿÐÐÿÑÑÿÒÒÿàààÓÓÿâââ××ÿØØÿÙÙÿÚÚÿÛÛÿÜÜÿÝÝÿààÿååÿææÿNÿññÿüüÿÿÿÿT×y¥4BC1žY1QCJH….Rž¿R>Y{h°ÃTŒ2YGÁÛèmÙX? àæF3ˆ°ÿ§ŠP(<¹";#R¹s®SPc€Yä)R€ sÄ\SKÿ²îI –ÖRð²7 –Æ`VS6'½,/ϼ†|DŒ_+ÿLϳbZVSu„ LÞ ƒ|ÿ ;eÏÒ|^[ZVAÓU …Ò•‡ƒ|äääʪ‚da^[ZV]Ó0%»¸‹‡ƒ|xtqlifda^[Z9”CÚ¨’’•™š™™™“’‰~rjbM‘w sͦ¬´·³±­«©¤¡Ÿ›™“’z NpÇÂÍÉÇÄÀ¾¼ºµ³±®«ª¦£¡œ!4QvÚÙÖÔÑÐÍÊÈÆÂ¿¾¼º·´˜4ŽOßâßÞÜÚØÖÕÒÐÎËÉÇoEÅ2*ÌïíìêçåãâáÞÝ¢:}îQ—÷öõôóòñ¯g-Q×}YøúúùÞ=}Å$8éüüëRîE¶ýóRkÿnôR°5Wî@&Åusr/src/sdlBasic/src/sdlBasic/win32/bmp/closefile.bmp0000777000076500007660000000407010463136771017655 0ustar BM86(   ðóñ(L(“5c ÇÒ™ ¿!>^À­(Ô+?]!>c $ž);BV&C\'™2[,(¢ -™Ã3TD1G_(+š4[8ÀØ-]=/b3 ¿ ÊÚ .±3h1!<Þ3®)ÉCJr,E…$$Ì!<Ÿ(Ò-?–*C‘)*Ã$Þ#ã6»2¿'Ü4M9>ž"!à5Vs.9¯ DŸ4¿6Ç5Æ2OˆJIMiQ13Æ5ÔDqG/â.1Î)+ÝJHœ=L™*I§,)æCC«<Ó2zIHT$d{FG¨RUŠDyI76Ò5é)BÆ<=É5O©PvSAÞ\]‰FP¬PQ§7EÉWX™\u_;7æ@ê78è#=æYªKKÁFçfe…:?àvEIËt‰EAÝEðfwl3Aé[ƒY_€^MKÍ@Dã&GçA?îNèV„`HTÉHJÞOóm€lY„o[‡j\ŠfX^Ài{V[ÇL\ÊNx“BRäWó_‘_LLñuv‘TSâ-Vët†u \ñHRñYYÝx{1ˆ’]úORõ1žkg™egm½ut¬cšiH_ç%cðXXô3dï{}¨+jðcbïeeê"môŽHní,˜¥2š¡†˜‡6§‡]iô' ¦6wôˆŠ¶ŒŸqqòyÓiuözxþ|}ýs‚ù‚÷›˜Â££¯"¢’“Öi¶£†‚ÿ6Á¢¤¨®‰‹ôg»£Z“úl“öLÊ–*Ê£¤¥Â‹ÿ¬¬¸¹ª€•ø8Í¥’”÷AП€¿°––ÿ­°ÇCÛ¤™ ú%Ùµ ÿ:Ý©£ü*à­¢¢ý†ªù½¾Äº»Í’­ú¦¨ý¡®÷®«þ¶¹ç+æÃ,é¾ÅÄѽ½â³³ÿ®¸ùµ·ý2íÃËÎËÌÍÒÅÄé´Àû.õÅ¿¾üÈÉäÎÍÚÃÁþÔ×ÕÆÆýÁÇÿ+ÿÊÊÛ×ÊËÿÒÑÿÖÖüàãâÒÚûààíÛÝ÷ééöìíó¡ûÏÇÙè©tÄ»õþâÇÙùî™:7)A‚˜ôì½ÍèÈþÅ_@[¸ùîƒ>Z( YŠôôçÛÔÔÀõþÅ]WfL[¸ùîƒ=jqb( YìôЛ›Ôô콇QBaypL[¸ùÏ.=j~qbE( ÄìИ›Ôôç¬J0ccy‹}L[¾ùû\=z‰~qbUE(o¹Ì˜›Ôç¬;0Gccy‹‹QkÙßz‰~qbUEE& ,"88Kccy‹‹h”»üI3j~qbUE2&& ""88Kccy‹}X¨áìu¯„?3jqbUE2&& "88KccyfX§áôô˜Št€?4ZbUE2&& "88KccTX§àôôô˜˜˜˜?#EUEE&& "88KcTX§áôôôô˜˜˜˜˜?#-EE&& "88KFJ§áôôôôô˜˜˜˜˜˜6#-E& """88+,§àôôôôôô˜˜˜˜˜˜˜* 11s‘–žžž‹a8+gÒôôôôôôô˜˜˜˜˜˜˜‚6 -d«³³³³³³¢c+P¹ìôôôôôô˜˜˜˜˜˜‚9!x«´¼¼¼¼¼¼´¢l0%m¹ìôáôôô˜˜˜˜˜{(x²ÆÆÆÆÆÆÆÆÆ¶°wB.m¹ì$—Ö옘˜ŠDC޵ÎÎÎÎζ¶ÎÎÎÎδžB/m¹$N—˜ŠSC޵Ñ××××¶lw¶Ó×××Ó¶W/mñDDCŸÉÜÞÞÞÜ¿lw¿ÜÞÞÞÜ¿¢W/¥ñrZ¡ÉäæææäËwÿ }ËäæææäË¢nHŒÙº'Z­Õíðððíш!×íðððí×°v@“éê^Z­Ûòöööòш!ÞòöööòܰvRÇß4ÁóøøøöÝœ!$$+£æ÷øøøòÆ’_Úü†M¤Øøüøå¦-$$F£íüü÷×£i ûß:M¡Ûúë¦($$`$T°òøÜ£išïßeM¦Cè``è$$ T°¿¢išïß|=zC$$¾®Lf}išïã…rB/fbu a‘^r„sA‰|b’_T‹si‡tt†uc”`;•~¤2{¯D€Ÿ`•lf˜d-zµg™e`”rb™hJ™qF‚¡Az³3¢jAƒ£=‰Ÿ>~¹a j,ƒºK¢t]¢nG‡®AÀS›;‹®B‰±*~ÐZ¥sƒ•„=†¼>‚Ä/¬Y«tA…ÈQ¥†9ª‹‰œŠ{ ŽW±{'‚ꌟ0·„Y³}•¡“£‘4ºˆ?ŠãW·„;¶‘Q¸†.½ŒX–Ë@žÅT“Ö0¿ŽO”Ù›§™1À*“ñIº›KÂŒ+—î-ÛY» ]âl¹¦2Ƥh¼¤3É ;Æ£=Ëš,Ï™G¨Þ`¢áU²Æ:£îg ä5Ë£p½ªBªáJ©æ¬¸ªKÑžk©áŸ¯ÃEÔœ¬·°EÓ¢¯¹³GÕ¤J°ï{«çD¯ö{®äBÚ£F³ôG±ø~®êº¿µ5ß«,᯴æ/ã±0䲚¶æ%浟ÊÂn¼òV¾ø(è·©¾Û)鸓¿å7긪ÏÅsÃòcÆú­ÓÈ2ð¿ËÐÇeËø§ÇéµÓÎYÍýfÍú¶ÔϯÉê.÷À»Êæ-õƸÖаÈð0ùÂ%ûÅ1úÃÑÕÓ3ûÄÇØÔÓÖÔÆÑä4üÅ(ýÈÔ×Õ»ÐîÏÚÓ*þÉ+ÿÊkßúÙÜÚÖáÚÛÜâ}äýxæÿÚåÞàãáÚãä€éûzêýêüãæäåèæàéêçëéóÿˆóÿéìêèêï‰ôÿ‹÷ÿ.Y/”ûþ•üÿ–ýÿ—ÿüÇÿýûÿüüÿþãkYŠÁôÆs3bœŽ¹äØôÖ{60J€Ð¾WqÉôÖ{70JVV€ÕÅ‹j¤µ”’Ìñé‡70JVVVV€ÕÀy`¨ÛÔ¸œ’Ìð 39NVVVVV€ÕÀy`¨ÛááÔ¸œ’Ìðî¥A0NVVVV€ÕÀy`¨Ûáááá×¼‘ÌðÖs*JVVVV€ÕÀy`¨ÛááááááÔ¼”Äïw.JTVVVV€ÕÀy`¨ÛáááááááàÔ¼œ¥M@VVVVVV~ÎÀy`¨ÛáááááááááàÔ-*JVVVVVVj¡­u`¨ÛáááááááááááTJTVVVVVVXco``¨ÛáááááááááááVVVVVVVVVVVXX`¨ÛáááááááááááVVVVGgSVTNNTT`¦×áááááááááááVVVVaú^N<+4@J>•×ááááááááááá½Q?VVZüR&':!ˆÕáááááááÛ×àá›óçpNfüdLçó: Õááááááá¶³ÎÞæüíhKülPíüæ( Óááááááá– /nåUíüìŒüŒìüí1 \²ÎÜááááá– Hñ[íüòüòüíe ,|¶ÎàáááM±éÏÈB_‰òüýüò‰m)%" ,|µÎàá‘ߪùüüüüüýýýüüüüüù$ /|²Ó”è°ÃÇÇÇÇóüýüóÇ™O;E /|rêõÒ·£=¯úúüúú¯# tïñ£©úúÊüÊúú—ø 5§ïÚ«úú®vüiƒúúŸ2z 8§ï}óú†ü]žúó„éÖøD±éÍ»º˜ü‚øšÂªãDI±é¬ü¢´âª¿usr/src/sdlBasic/src/sdlBasic/win32/bmp/previousbookmark.bmp0000777000076500007660000000407010463137020021276 0ustar BM86(   ðóñ •˜.–#›*›5’9•3Ÿ-šA˜(2Ÿ5£; œ..ž2&£C—EŸ> <& 8:°HºT¨E%§L£E2ªE4§J,¤M/ÁZ©J9Â[ŽZ'¸^Yd5À_¯JPÇgZbE¬[?±TP[jHÈf*­UXÎm"VqMÁl0\rKÕuÉm4°`X¸eLµ\`½m?Îs-Ôr-³eS#™#WyP9;Z|SCˆD5‘8áFŒ?$™22–5>“7²feÝ|*ACÕy6.›2)Ÿ,Èy@ÂwIÛ€/a…TaƒZC˜=¶vW±Õ=ºnm½sjÉ~Q7¤<á†9ÀveÃ}XcŒ^=¢C@¦;è2iŒcOžJE¢JB§HÒˆQ@®<èŒBì‘9[¤MÃ|yb›bÑŒ^=´FÀ{õ›5é“J9¸BP¯MîšCÖ‘cl¨]A¶S|–ÉŠ|0ÂFÅŽ}ôŸKˆ w;ÃQïŸWÿ¥FÓ™pÏŽˆÄŒk´gü¦Td½cÿ¬L3ÍWÒž{‹¨‚‡­zAÇaÚ wË–’NÃkŒ¨Š{·tm¿k±•µxÔ™‘ߦt×¢Ι•þ¯\XÅsLÈr‹¹ÎžžIÎqæ­{Ö ö±qÑ£›ÿ·cð±xXÌ|ú·lΧœÿ·oÕ¥¦CÚx]тҩ¦êµŠäµfÔ‚ZÖˆrЋҮ®ö¾‚hÕ‹WÛ‡I߆oÔQ݌׷§¢Çœ_ÛŽ¼¹´¶¹·Þµ±šÎ™Â¸·Ô·´jß—£Ð Q啴˩ټ¹¯Î§ß»¼´Ê¯sàžãÄ­ÿÌ—†Ü¤ÞøÁÄÂßÿrå¦¼Ñ·ÝÆÆæªÈËÉûÒ©]ð©}é¯äÎÆ†éµfïµyì´ÞÎÊßÍÑýÙ´wðºÍÛÅÑÔÒãÓÏá×Öýß¿ÓàÒåÚÚçÝÜîÞÚÜàÞØãÜéßÞãßáêàßáæÝîåÝçãåëèãëæéúìàôêéóîñ”÷óõÿöíòóùõöüýûõ÷øþóúÿúþüöÿÿüÿþè»Í‘$(ºàOb?(»‘a£™B+¾è\ÀÀ£H+͸aÈØÒÏ©H1Íèh˜ØÈÈØÖ©=/ÓÅaȲQc­ÖÚ®E<Ót˜²Q{‰bÏÞ®@<àR"æÇhu¹Ù³DOà·îåååâââåÌæí’eœÕ¶DPèÌôìææåââëÛæïÅq|´J\àÌø•000#[ë׿ä‚p¨¨C`èÌù!%7ïÛæïÁl††;vÌù‹,'%Mï×êéxSjÌû”.3'Wï×ïí½„ÐæææææÎü983%Wñ×Ûææææ:ÌýGI8'dñá)Zóççççôù«ANI.kññáááÛêyÄçÿýúýöù«YYN2sñïñëëïì¥m úÿÝ¡¤Ÿ}g_YNTddL‡ë54ðwÿ÷¦~zzro_YN2.8×ù åÑÎÿò—…ƒzro_YN8Éøá°óÿã……ƒzro_G¬øöU-*ÿÿÔƒ…ƒzrfôþVðëiÿÿʃ…ƒn¢ôÿ–áÛ“ÿÿʃ~±ôÿ¼õ¿¿žÿÿÝÔúÿÆõ›°õ€ÿÿÿÿ§ŒÄ &¼Æ6ªåFõ-Üusr/src/sdlBasic/src/sdlBasic/win32/bmp/replace.bmp0000777000076500007660000000407010463137020017307 0ustar BM86(   ðóñC%^%…"Ž20h&…ADB25h=AM 0ƒ+/…119x#5HJK+5…. 7Š@8GLY6Dt:—:•/4›1µ;C€1C…"C‹7@‹ D” :®&I‡GAC“KEQ{2LF¥M™EF˜QUw>ÄNSƒFPCV†`^oVšPQ‘?V‘egfRWOY‹/N­AF· V¬X§4U£FJ³S¶LO­`a†(TµZbŠQÊc«TW«mwij…PÝZÆRfœTäuxvj¶n³¼|]mo” lÁ±|fmmcoŸiq{~}nÊxy”~~‰´†h€ƒ„€rÚÇp…ˆ†›‡€y{¦ƒÊr䊌‹SzÅc~¸ƒ‚¥"‚Í'…Æ€á†Û‰Š¦*}ã”’z¤vˆº‹è—ÕjÃ=‘Ñï¡s‰ó™›Ý¢zˆÿ”–¯á†"æð þœ©TžÂ=è4šÖ¶¡š¤Þ ¤¤œÃ¡ìœú4šë°¤«¥£¶§©«Üª–>šðjŸÛµ«ª’ª¹?§ÞZ§Úü³ˆO ïC¢ð§ý$¢þ®­º¬ü³í¯°µª²³°³±|«ØÂ³¯ï»™«Ï°®Âí³£³üÞºžð·ž­°ÇI´äÿ¾ÿ‰"À帺½Áôû¹8³ü€¼Ñ¯æIÇÔ¶¾¿ñ¾ªå½±ÁýξºõÅŸR¾ë¾½Êl´ú„ºéÿ͘[ÁíËûÁÄÂ/ÁÿÍÆÁw¾ó¯ÅÓÏþLÃÿÓüÆÇÌÅÅÑ=Çÿþ̯ÿÒ£Ôý¥ÇâWÏñÿ×¥AÍÿcÎñÅÎÏÿÖ¬)Ôÿ®ÌÞÌÍÒpÌ÷ÌÐÎÿ×¶cÐþôÓÄç×Ã?Øÿÿß²ÿܸ®Ïñß×ÑRÚÿKÝýÔÕÛ|×ü‚ÙövÚù§Ùë²×ëÖÚØÿâÁoßübáþÚÞÜzáúÜÞããÞáÿæËÙâãõçÚâãéãæäþìÔëçæÿëÛXûÿÿñäEÿ÷îÿý÷ÿüþöÇ—¹äðj*Vx¹äõC Šõ‰ü,Nx«õ=Fwt«ä>m„d:,‰õõ=Fw–݇>‰@Ãé»[GjÖõ;Iw–Éú>äN4 àº–|t['NÇð7I|–Éú”#äÇNR°º®†††h<,I|–Éú”#î—5cÂ×Å£•†oUL§çïâÔ¾ª~H4ÈYÇëëòëëßßßßßßëëòòÜD 9€Ñçìίq?jTäÙëßÓÓÓËËËËÓÓßßë÷¤/f¸æèÃAjTñÊÓÓ˼¼¼¼¼¼¼ËËÓßë·Z %"K‘ÕÍ“a ¡TñÊ˼¼¼¼ËÓÓÓ˼¼¼ËÞŸZƒx2:nk+QäYäÊ©¼¼ËÓßò÷òßÓ¼¼¼ÏvbØõ¡46 1Èu²Û©ËËÓëùýþýùßÓ˼¼XlÈe-1_¹Øbø’ËÓßòýþþÿýòßÓÏs^JYÖäbÒÛ’ëëùþþþþýùßÞ©PƒêêYö³’òûýÿþÿý÷ò¨MŠ3u¿]ó´{ÊûþþþûÙsPšJJ¿]Òá‹y¥³¢y\›3Yêll²ØÁ¶­«›]3œØu]]b]Wbœusr/src/sdlBasic/src/sdlBasic/win32/bmp/search.bmp0000777000076500007660000000407010463137020017141 0ustar BM86(   ðóñK r l l+-+| Š ”586 žy‡™BDC2W2KNLKMQDSJ+,¤BZBJTKRUS3m8.bPX[Y@n@=qALkKFtI`caabg.;ÇCxH^hb@|FfjbgihikpR‚Olom[|ZV~XN„TY‚TPÝqtrTçvyw_†gº|b±|fYí`‘]€€tn‰l{|]“c}€~d–b[™b´†h{zœŽ†„‡…›‡€Ê‰k_œm—Š~&¢|‰ˆ1§q‹ŽŒA¦|ƒ–„«•zŽ“´ŸgŠ’“×–q¢•ŠW­wœ•±¦mUªŠ²¥u—˜¾£{˜›™¯ªuÝ¢z°©}±¬wˆÿŠõŒÿ©¡™³¬€¹­|Í ‘8¾¶¡šº¬„>’毮†›¤¤©›Ý¦Œ²°‰³³ƒô­x~±¹²†®´ˆ¥¨¦4šë6ÁžGÅ‘>‘û¥¦¬NÅÄ´†8Ä›/Å>—ô½¶Š°µ‘f»£Ô²@œóº¹‘ÁºŽµ¹•§³¦C¢ð²½•­¯´i ë²¼›&¤ÿCÑ ±´²Å½™ï»¬·°¬µ¶â´¥¦±Ã±Á ¾µ´½Â´µºÅ¶²ÄÛç½/̼ۧ«ËÃŸíº¦’Ä·»ÃªåÅ—'µÿ¹ºÀìÄ›“ƹÄȤÁ¿¹¼¿½,á¯ÀÊ©àÇ¥¸Ã¼°Ï¨Óʦ$å´¹ÂÃùÉ£¾Î°ØÉ³²ÊÁÎÄÃÒÏ®ÆÎµÄȨÎÃ×ɽéȹÓζ³×³¾Õ³ÆÇÍÍÊÅ±ÏÆ>Èÿ?ËýÝÒ¶ÇÇÔ1ï½êÔ°Ýѽ'ñÁÊËÑËÎÌÅÎÏÙÕ¼äÑÁ¯á»>×þÏÎÛÑÔÒÞØÈ^×ù2ûij䯸×ÈàØÏùÚÂçÛÇ)þÈÕÖÜðÝÅãÝ̲ëÇ×ÛÙßÜ×ÔÞØáàÓúâÆÛàÖÛÜâƒäõ±ðÏãÞáéâßÚãäÑîÒáäâ¯õÖöéÕëíÓÆøØÒöÙWúÿõíäYýþaûÿÎøÞ½ôøùñèùöñýûõüÿþÔ¶äÔl3KVqÃíè(®9,;wwfvÃíè/_`:‡+7EwwŽË«|»è /_ÒuL,7EzzŽ×Ý×±}»Þ 1_Ä÷i.7=;SSŽ×ÝÝÝÈ§Þ 1aÄõˆ¥===7;>Ž×ÝÝ×Ë¡Ó 1aÄõˆÁ=7-#%f×Ý×±¡Ç 6_ÅõƒÍ)##IG‹Ö¤ÄøƒÍ--&BXZZZN:Z •ºéõ~ÔL#$J©¼ÊÐÊšbN:8©ìúxÔ’&tÂʸ¬¹¹´îòµTNã@" âï’™Ú°ŒŒ¢çç´ØðùæRX2üÌ tÚŸŒŒŒŒ¹¹–ÑêðóæF:âº*ÞŸ†Œ˜˜†††‰¿êêêô­H yÕ„˜¨¨˜€€€€–¯ÑáêòM:Á°˜¨››„jjjjns‰¯Ñî‚B*ÞŸ››…rc]]]]^cjo‰À¦A<0ë……rcWWWWWWWW[cj€³F**ëhcWUWWWWWWWWUW]n‘A2ÞhWWW]ccr…d]WUW{\H t²žO[]cÆÕàÜc]d{£?PtBãYccnÏûþþû¾­ÉpC2 ÎЂ›„ÕþÿÿýàÆßß³5kªª0|¾åýþþýöññ³4y JBí½ ÙûýþýöÛQ5Š2J0ηem””mD4g“' ªJ²Í·š—¥“B 2t 'i&$MB"EA%364…,+U RŽ ƒxˆ–-C/K&]%$u;=<6?:Zd `!’@CA'Q/0K9h7L?#Z-oHJIyKLQ?VBo$w‚ ~QTR2l7…L]L‚"VYW==œLbTŒ#\^_ˆ*.9»YdX…0[e_adb‘,*6gjhJ€H—2QNknl#—<PÝ!Ÿ<mxnhynf‚^*CtypTçuxvp†^/¤?{„e¼|]±|fz|{Yí2§C€€t}~ƒt…{ƒŒm´†h}ˆ{Æ…g>«O7«R…~‚…ƒ{zœ~Š}”‡{‡€›‡€Ü‡i†‰‡‚Œ†‰ˆE²VšŽ«•zH´b”š{Š’“K·e¢•Šâ‘{œ•ì—që”xU»g•–›–™—¦¢‡_½o• –ð{Ý¢zˆÿŠõ±¨…cÁsŒÿõ¨u¶¡š>’ædÂ|›¤¤4šëߦ•>‘û¥¦¬¥©§>—ôqÉÕ³Ž@œóü³ˆC¢ð­¯´i ë¶·£¯²°ª²³&¤ÿÏﻦ±Ã¾µ´Ð–ÿÀˆÅ¶²¯¸¹ÿ¾¶¹·¶·½ÑÁ¡ŠÔ–ÿÇŒ'µÿHÀ¾¸ÕŸÈ±影ñż¿½•ן¹ÁÂØÆ¯ÊÀÀºÂÃÿ̘þÇ¥çʪÿÌ¡šÛ«ÄÉ¿¢Ýªþ̯ÿÒ£>ÈÿáÏ·ÈËÉÇÉÎ?Ëý¥Þ³ÿÒ¬ÿ×¥þÕ¬ÅÎÏ®â³òÑÁÿÙ¯ûسÿ×·>×þ±ã½ÐÔÑêØÀ^×ùÒÓÙÞÔÓÿß²ÿܸ÷ÖÇÒÒßרÞþáÀØÜÚ¿êÈÿäÃõãËüäǃäõïáÕÝÞããÞáÞáßÉíÐäâÜÿéÅÙâãÿèÌàäáîãããäêÔðØýéÙþìÔÿïÎæêèWúÿíéëÿíÝYýþaûÿýñܽôøÿòæ!þ÷çÿöíÿýøúýûi HÜI-_")òI8Å‘8iåI8ÅŽ^:Ñ~cYcc\#8½y„ʉ%#±íX +2---2kÅV6sʨ2™íF‚z‘²­²²²ÅÅV,6oŲ2!±íF›Ï‹œ„GGV___>06>sÊ»-1Üã M›Àöˆ œ_%'006>BG}Ý‘hãM…›Àó• k%',06>BGV_­Ð-<ÚM…›Àó•Ñ k"+-06>BGVVsл"HÙU›Äó“Ô¨„>>BGGVGGVVo»æK ¥4—ÓªÀ÷“ܨŲ²»½ÅÅyVVy»æo$ž¼áóÜ^}}}}}­æ‰_}ÐÝk/LpXW¬ìùå5 G朑ÝÐ^C˜ß´vp™çb9ëëÜÜÜÑ.YKæææ¨EJ®øøüàtzTÚ@~Kîæ„?ZÁððððøàlXûëÑ@Ô|K­^A|Òêêêðððø¹j3=DŽâƒ*;O§àÛÛÛêêêêðñnXûÿ.ÃÛ§Qq¹××××××ÛÛàêñ’a±=ÚÎÛÍÍÈÈ¿¿¿¿ÈÈ××Ûð°`{DäÆÌÈ¿·······¿¿È×Û°d(a@亿····¿ÈÈ¿····¿Öe(m3Ú¾©··¿ÈÛïõêÍ¿···Ç€j ¥7³Ø¡¿¿ÈÛõþþýêÌ¿¿··[rûò¥aô”¿Ì×àýþþþõ×ÈÈdžfN&3ÉË”ÛÛêúþþþõÛ×Ö¡SŠÂÂ@ë«”êðúýýúïêè¤RŽ=@{T鯸ïüüüð¾wS–N{DÉÕŒuxxg]‡£=&Â7h¶Âµ¢Ÿ¦šam™==ThT7.husr/src/sdlBasic/src/sdlBasic/win32/bmp/fileopen.bmp0000777000076500007660000000407010463136771017511 0ustar BM86(   ðóñ<"Y$.%"7'H*,)+P-V.2+(n-v8‡:751n:957w<G ³FP>7B=@>°LœM’LCED©P ¾PHKIœV¥P$¦W¶U¼\3g/³X"QTRÅe Í_©c7l4Á`°Y3>l:Û]ÍfQf@½b!:n>1r?éaÌc':lKÐmv^S>sCmm>^`_†p2¼p 2zIÍj2u^Én0´iC¹hDehfÞr&Üj7I~KwwHÎ{"3ƒLÆx0×~‰{Dÿ†lom™|C‚gèÿ~Íw@uƒK€‚IP…U[„Ví}1³vVÑ}>׃1ÿ{3ò„'ª„Kÿ„,ÿŒ ŸˆLÿ€;ù<XŽ^ÿ#z{zoŽYÿˆ4ð-”uÛƒQ‰\ÿ’-gi~j–_ÿ›!Á„eþŽ<g˜eÿ—3Û’P…ˆ†¸“_¹‰të•Lýœ:¶šXÿ¢.Ö‘c ¥ÿ˜IÌžPÿŸ?Ž‘þ£Cè Tÿ¦HÁ•…Æ¡mé›q:³‚ï¦[äqè¤c—š˜þ¨Wÿ­M1¸…‹§‰æ©dÿ§d(¼å¤zÿ±^Ÿ¢ È£«”ϯ‚ü°s¤§¥‹²™à·sÿµmî¸qýºkÞ¹|賈JÃ¥· â¿xò¹~Û¾}ÒÂ|ﱓ®±¯Õº‘ÿ»€ìÁ~ÙÁ†ÖÆ~í·•ßÀ‰ÿÁ,Ö©ÿÃâÃŒÝÅŠÓʆîÀ‘Ú¼¤ÿ¼˜ßÆ”ìÆ“ÜÉ“¹¼ºÖ¼°ÿÈŠ)ݲÓÏ‘ÕÆ¢ÞÊÚÎÿʘíÌž¿ÃÁ¼Èº&çµÛúÔÕ›úË¡gݶ÷È®ëϦßѨÊÅÈÛÔ§ÿÑ¢ÆÉÇ¼Ð¾ÑØ§0í¼ßÖ±ýÔªäÑÁÿÔ´ÿØ®ÔÑÌûÚ¬õ×·ÏÒÐ/öÇÔà¶1úÃÌ×ÐþÙ½ÿÜ·õ߻ըÖ+ÿʺàÕéÙÔóâÂÿáÁÿàÈÜßÝmùØþæÊäâÜ’õØÿæÒâåãÿíÕÿëÛçêèÌóèþñÝÿòæ@!ÿûêúÖ—‚œ«¿ÉÖâêñ÷úúúú¿ $Bev‚—œ«¿Öââññ÷úúúÓ2, 9Mev‚—«¿Éâññ2[[a^^^^bWC% $9M‚¿÷XD[[[aa^gg_rllttl_\& ê »[[a^^gg_rlllttttpl3£„ŠŒnÉô)ÝaQ^^g_rlltttpppppz\R¹Œ’&9«÷Ì=ïQ^g_rltttpzzzC}§Y!ê˜jó­^g_rlttpzƒƒƒƒƒƒƒ-£Y?nÖqˆðÝ“Lrlttzƒƒ……ŽŽŽŽ…ƒƒz=)JB«@ªðÝÝ“_ltzƒƒŽŽŽ…hG#ÐðÝÝÞ­tzƒŽ––––––––Ž!'I%vú çðçÝÞÞÕ³ŸŽ––ŸŸŸŸŸŸ––…'GPþBô)öðçèèÞÞÞÞÕÇÁ³³¡­ ¨®¡Ÿ––ƒ;Jt À?ùðððèèÞÞÞÛÛÕÕν²¢·¸¯ž¦¡y#Zh%†jýöððïèèèÞÞÛÛȼ¼¶²¾Ã¢¢°°€)536X‹ýööðïïïèèèÞÑż¼¼¼ÆÍ²¢°¸{>¤ìíÌô*±ýùööóïïïèèèÞàż¼¼ÆÍ²²¸¸`OÂãòûÐÿüüýùóóïïèèáÅÅÅÅ¼ÆØ¼¯Ã°KiÂåëëò›ÁÇÕÞèïóøøøîéÒÒÅÅ¼ÆØ¼·Í°8~ËëëëëÇàÕdzÁyYu•š¬ÄÒÚÚÚÒÔÅ·Í©.”Ùëëëëq?•±ÎçÛ/eßܺSTKN]]w‡š¬Ää©4´ãëëëëÀqA# xñússsssofSF::k`‰ãëëëëësssssc7"7EHëëëëëëëëësssc7"""""Hëëëëëë”åsc7""(UE""<åëëëëë‰+m""(UssE"""1åëëëÏ÷¥UsssU0"""""1åëõ×ssU0"""""""""1õ×U0"""""""""""+‘÷÷‘0"""mV‘Ê""+‘÷÷‘0"™æ+‘÷usr/src/sdlBasic/src/sdlBasic/win32/bmp/go.bmp0000777000076500007660000000407010463137020016301 0ustar BM86(   ðððFIL F OTJZ^OcUjm$X$u/\/,_,€†2f23f34g42h4Œ3h5;e;Ž6i64m4’;j;9l9“:m:•9p8¢=¾j„j3”a\\g‹gÃ.ŸWD¦BF¥EÄÆb•bQ£OHªFY XvŒve˜ee™fc›cf™feše=·;#Ë 2¨`bŸbPžkTªS%Ì"'¸Kv•vb¤b]¨](Ï%*Ñ*-Ñ)‚”‚2Ï//Ò,J¿H0Ó-3Õ/OÁMR¿Q\ªw[«x7ÎB8×4… …œ[ÀY_Â]@Ú<RÍPFÖE(ÙLV¸…DÝEGÝDVÔSUÕR™¥™JÞGU×S“«“S¾‹œ¨œTÑfVÛR/ßZmËkhÐe3Ä‘TáPVàSWâT5ã`¥­¥^äZpÙlnÜj¢¶¢>æicå^fæaxÚsKçojçdpälIÒŸ±¶±mèhsæouéq3Ú§EÙ¦±Á±yêu0íŒ}ëy4_¼áŒ¼Á¼@ã¬Aâ¯8ñ•ÀÃÀ¼Ç¼Ší†?å²ÂÅÂ>ñžŽîŠÀËÀÅÈÅ3븒ïŽÈÊÈ—ï“ËÍË3ò¿8ô»ÎÐΣñ 6õÂ7öæò£3÷ÄÑÓÑÎÖÎ1üÃ2ýÂÔÖÔ2ýïó«×Ø×²ô¯3ÿ̵ô³ÙÛÙ¹õ¶ÝÞݼö»Àö½ÝáÝàáàÃ÷ÂãããÊøÈåæåÐùÏèèèÖùÕëëëÙú×ÛúÚÞûÝ@ãûâêüéìýìîýîòýñôþó÷þöøþøùþùÿîÝÌ»ª™ˆwfUD3"´Š³ºææ•»¨æ£æ=¢À¨æÓÓw X­Í¨æÄÄÄ¿>y³Ô¨æ¹¹¹¹¹Ÿ(æ+•¾Ú¨æ©©©©©©©q=­Ã¨æ¿œœœœœœœœG l³Í¨æµ‘‘Œzg°¸‹ž/…·Ö¨æ«~sh\\¶§u²šjæ+¢¾Ü¨æ o[\\\¶¡tÆÒά”IJ­Ã¨æ›mc]\\¶¡tÆÒÒÒ̪1 y³Í¨æƒ^\\\\±¡tÆÒÒÒÒÒË_R$æ•·Ú¨æaW\\\\‰€tÆÒÒÒÒÒÒSSS?æ4¢¾¨æ\\\\\\\ZtÆÒÒÒÒÒÒNNNNN6X­¨æ\\\\YLCTbÅÒÒÒÒÒÒNNNNNNN'­¨æ\\YL:!&;ÁÒÒÒÒ¦ÈNNNNNNdN/毨æYL:!3#7¼ÒÒÒÒ@ONNNNp†Bæf¨æF%3AY*KÈÒÒeERRk–iæ ʨæ’PDYL:KÈdnœŸ/ ¨¨æŸ{L:!`v£¹R x¨æ«Ž8.)9,H—Ç‚æM٨濿‡V2r„}5QØ«6 º¨æÇÇ¥¥˜U¥¤®ÝÕd ™¨æ×ݽ½½½½Ñáß“f¨æÝãÏÏÏÛåçÏ-æ<ʨæäéßäèéåG ¨¨æèìììê£ ˆ¨æëîíØ"æfÙ¨æïéGæ0ʨæ|¨Ê ˆusr/src/sdlBasic/src/sdlBasic/win32/bmp/stop.bmp0000777000076500007660000000407010463137020016661 0ustar BM86(   ðóñr™ÌÎÐÑÕÍ×ÌÙÑÌÝ Éß×Îá Ïç Ð Öî33öËÓÔÖ@@†@@Œ&&Ø--Ê--Ë//Í**Ú--Õ//Ò66Å..Û88Æ44Ð==¿66ÑAA¸@@»PP–AAºFF²44ÜFF³FFµ88ÖCC½CC¾HH³CCÁHH¶@@É77Þ;;ÕEE¾JJ´@@Ì;;Ø??ÏKKµ>>Ô<<Ú==ØBBÍ<<ÛMM¶;;àIIÊQQ¸@@áMMÉWW»HHäLLÛLLß[[½LLàVVÊLLäYYÆMMå^^ÊbbÁ``É``ÊeeÂggÃffÈiiÄllÈ]]ëooÇqqÈqqÉssÉvvÊ€€³ooñ€€ÏÏ{{à{{⼂‚䊊ә™²€€ö‘‘Ö‘‘ü¢¢Ý­­Æ§§ß¦¦â±±ã³³äÀÀƶ¶å¸¸é¾¾èÌÌÌÀÀéÀÀëÃÃêÓÓÓËËíÙÙÙÜÜÜãããààìðððððöfÿ ý ú ø ö ô ñ ï í ë è æ ä â ß "Ý $Û &Ù )Ö +Ô -Ò /Ð 2Í 4Ë 6É 8Ç ;Ä = ?À A¾ D» F¹ H· Jµ M² O° Q® S¬ V© X§ Z¥ ]¢ _  až cœ f™ h— j• l“ o qŽ sŒ uŠ x‡ z… |ƒ ~ ~ ƒ| …z ‡x Šu Œs Žq o “l •j —h ™f œc ža  _ ¢] ¥Z §X ©V ¬S ®Q °O ²M µJ ·H ¹F »D ¾A À? Â= Ä; Ç8 É6 Ë4 Í2 Ð/ Ò- Ô+ Ö) Ù& Û$ Ý" ß â ä æ è ë í ï ñ ô ö ø ú ý ÿ ‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹…‹‹‹‹1 }‡‹‹ps‡‹‹js‡‹‹js‡‹‹j  s‡‹‹js‡‹‹j ,[zq74 s‡‹‹j%Whh|yloC s‡‹‹j $chhh|wm„†ƒn? s‡‹‹jPghh|wm„†††ƒn?s‡‹‹j#hhhh{wm„†††††ƒs‡‹‹ja]hhhhurm„††††††s‡‹‹jhhhhhhhhm„††††††s‡‹‹jhhhhfb`ei‚††††††s‡‹‹jhhfbUE:KU€††††y„s‡‹‹jfbUEAQK:U~††††\Ys‡‹‹j;kkkkkkkkkkkkkkkkkkkkkkk>s‡‹‹jOtttttttttttttttttttttttOs‡‹‹jRvvvvvvvvvvvvvvvvvvvvvvvRsˆ‹‹px‹‹‹‹1!!!!!!!!!!!!!!!!!!!!!!!!!1Œ‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹usr/src/sdlBasic/src/sdlBasic/win32/bmp/nextbookmark.bmp0000777000076500007660000000407010463137020020400 0ustar BM86(   ðóñ •˜.–#›*›5’9•3Ÿ-šA˜(2Ÿ5£; œ..ž2&£C—EŸ> <& 8:°HºT¨E%§L£E2ªE4§J,¤M/ÁZ©J9Â[ŽZ'¸^Yd5À_¯JPÇgZbE¬[?±TP[jHÈf*­UXÎm"VqMÁl0\rKÕuÉm4°`X¸eLµ\`½m?Îs-Ôr-³eS#™#WyP9;Z|SCˆD5‘8áFŒ?$™22–5>“7²feÝ|*ACÕy6.›2)Ÿ,Èy@ÂwIÛ€/a…TaƒZC˜=¶vW±Õ=ºnm½sjÉ~Q7¤<á†9ÀveÃ}XcŒ^=¢C@¦;è2iŒcOžJE¢JB§HÒˆQ@®<èŒBì‘9[¤MÃ|yb›bÑŒ^=´FÀ{õ›5é“J9¸BP¯MîšCÖ‘cl¨]A¶S|–ÉŠ|0ÂFÅŽ}ôŸKˆ w;ÃQïŸWÿ¥FÓ™pÏŽˆÄŒk´gü¦Td½cÿ¬L3ÍWÒž{‹¨‚‡­zAÇaÚ wË–’NÃkŒ¨Š{·tm¿k±•µxÔ™‘ߦt×¢Ι•þ¯\XÅsLÈr‹¹ÎžžIÎqæ­{Ö ö±qÑ£›ÿ·cð±xXÌ|ú·lΧœÿ·oÕ¥¦CÚx]тҩ¦êµŠäµfÔ‚ZÖˆrЋҮ®ö¾‚hÕ‹WÛ‡I߆oÔQ݌׷§¢Çœ_ÛŽ¼¹´¶¹·Þµ±šÎ™Â¸·Ô·´jß—£Ð Q啴˩ټ¹¯Î§ß»¼´Ê¯sàžãÄ­ÿÌ—†Ü¤ÞøÁÄÂßÿrå¦¼Ñ·ÝÆÆæªÈËÉûÒ©]ð©}é¯äÎÆ†éµfïµyì´ÞÎÊßÍÑýÙ´wðºÍÛÅÑÔÒãÓÏá×Öýß¿ÓàÒåÚÚçÝÜîÞÚÜàÞØãÜéßÞãßáêàßáæÝîåÝçãåëèãëæéúìàôêéóîñ”÷óõÿöíòóùõöüýûõ÷øþóúÿúþüöÿÿüÿþåFõ-ÜÄ &¼Æ6ª°õ€ÿÿÿÿ§Œ¿žÿÿÝÔúÿÆõ›Û“ÿÿʃ~±ôÿ¼õ¿ëiÿÿʃ…ƒn¢ôÿ–á-*ÿÿÔƒ…ƒzrfôþV óÿã……ƒzro_G¬øöUÑÎÿò—…ƒzro_YN8Éøá°ðwÿ÷¦~zzro_YN2.8×ù åm úÿÝ¡¤Ÿ}g_YNTddL‡ë54Äçÿýúýöù«YYN2sñïñëëïì¥Zóççççôù«ANI.kññáááÛêy:ÌýGI8'dñá)æææææÎü983%Wñב¾æææÌû”.3'Wï×$(ºÌù‹,'%Mï× a?(»Ìù!%7ëÛ ˜™B+ºÌø•000#[ë× µÀ£H+ÍÌôìææåââëÛËÒÏ©H1Í·îåååâââåÌ ¯ÈØÖ©=/ÓR"Qc­ÖÚ®E>Ót˜²Q{‰bÏÞ®@<àÃ^Š]ˆÇhu¹Ù³DOàšKXŽí’eœÕ¶DPè߸Åq|´J\àä‚p¨¨C`èÁl††;véxSjí½„Ðusr/src/sdlBasic/src/sdlBasic/win32/SdlBasic.ico0000777000076500007660000001635610463136731016620 0ustar h6 ¨ž00¨F( @ªwˆD"U»Ýî3f™Ìÿ333f3™3Ì3ÿ3333f3™3Ì3ÿ333333f33™33Ì33ÿ33f3fff™fÌfÿf3f33ff3f™3fÌ3fÿ3f™3™f™™™Ì™ÿ™3™33™f3™™3™Ì3™ÿ3™Ì3ÌfÌ™ÌÌÌÿÌ3Ì33Ìf3Ì™3ÌÌ3Ìÿ3Ìÿ3ÿfÿ™ÿÌÿÿÿ3ÿ33ÿf3ÿ™3ÿÌ3ÿÿ3ÿf3fff™fÌfÿf™3™f™™™Ì™ÿ™f33f3ff3™f3Ìf3ÿf3™33™3f™3™™3Ì™3ÿ™3ff3fffff™ffÌffÿff™f3™ff™f™™fÌ™fÿ™ff™3f™ff™™f™Ìf™ÿf™™™3™™f™™™™™Ì™™ÿ™™fÌ3fÌffÌ™fÌÌfÌÿfÌ™Ì3™Ìf™Ì™™ÌÌ™Ìÿ™Ìfÿ3fÿffÿ™fÿÌfÿÿfÿ™ÿ3™ÿf™ÿ™™ÿÌ™ÿÿ™ÿÌ3ÌfÌ™ÌÌÌÿÌÿ3ÿfÿ™ÿÌÿÿÿÌ33Ì3fÌ3™Ì3ÌÌ3ÿÌ3ÿ33ÿ3fÿ3™ÿ3Ìÿ3ÿÿ3Ìf3ÌffÌf™ÌfÌÌfÿÌfÿf3ÿffÿf™ÿfÌÿfÿÿfÌ™3Ì™fÌ™™Ì™ÌÌ™ÿÌ™ÿ™3ÿ™fÿ™™ÿ™ªÿ™ÿÿ™ÌÌ3ÌÌfÌÌ™ÌÌÌÌÌÿÌÌÿÌ3ÿÌfÿÌ™ÿÌÌÿÌÿÿÌÌÿ3ÌÿfÌÿ™ÌÿÌÌÿÿÌÿÿÿ3ÿÿfÿÿ™ÿÿÌÿÿÿÿÿ"""DDDUUUwwwˆˆˆªªª»»»ÝÝÝîîî"DUwˆª»ÝîÝîªwˆD"U» Ñ rrÑÑÑ rrrrÑrÑÑÑ rrrrÑrÑÑÑÑÑ rrrrrÑrÑÑÑÑÑÑÑ rrrrrrÑrÑÑÑÑÑÑÑÑrrrrrrÑrÑÑÑÑÑÑÑÑrrrrrrrrÑÑÑÑÑÑÑÑrrrrr__rÑÑÑÑÑÑÑÑrrr_____ÑÑÑÑÑÑ_Ñr___rr___ÑÑÑÑÑ_ __rrrr_____ÑÑÑ rrr_________Ñ r___________ _____ ___ __ _ ýÿÿÿðÿÿÀÿÿÀÿÿ€ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ€ÿÿ€ÿÿÁÿÿóÿÿ( @€ªwˆD"U»Ýî3f™Ìÿ333f3™3Ì3ÿ3333f3™3Ì3ÿ333333f33™33Ì33ÿ33f3fff™fÌfÿf3f33ff3f™3fÌ3fÿ3f™3™f™™™Ì™ÿ™3™33™f3™™3™Ì3™ÿ3™Ì3ÌfÌ™ÌÌÌÿÌ3Ì33Ìf3Ì™3ÌÌ3Ìÿ3Ìÿ3ÿfÿ™ÿÌÿÿÿ3ÿ33ÿf3ÿ™3ÿÌ3ÿÿ3ÿf3fff™fÌfÿf™3™f™™™Ì™ÿ™f33f3ff3™f3Ìf3ÿf3™33™3f™3™™3Ì™3ÿ™3ff3fffff™ffÌffÿff™f3™ff™f™™fÌ™fÿ™ff™3f™ff™™f™Ìf™ÿf™™™3™™f™™™™™Ì™™ÿ™™fÌ3fÌffÌ™fÌÌfÌÿfÌ™Ì3™Ìf™Ì™™ÌÌ™Ìÿ™Ìfÿ3fÿffÿ™fÿÌfÿÿfÿ™ÿ3™ÿf™ÿ™™ÿÌ™ÿÿ™ÿÌ3ÌfÌ™ÌÌÌÿÌÿ3ÿfÿ™ÿÌÿÿÿÌ33Ì3fÌ3™Ì3ÌÌ3ÿÌ3ÿ33ÿ3fÿ3™ÿ3Ìÿ3ÿÿ3Ìf3ÌffÌf™ÌfÌÌfÿÌfÿf3ÿffÿf™ÿfÌÿfÿÿfÌ™3Ì™fÌ™™Ì™ÌÌ™ÿÌ™ÿ™3ÿ™fÿ™™ÿ™ªÿ™ÿÿ™ÌÌ3ÌÌfÌÌ™ÌÌÌÌÌÿÌÌÿÌ3ÿÌfÿÌ™ÿÌÌÿÌÿÿÌÌÿ3ÌÿfÌÿ™ÌÿÌÌÿÿÌÿÿÿ3ÿÿfÿÿ™ÿÿÌÿÿÿÿÿ"""DDDUUUwwwˆˆˆªªª»»»ÝÝÝîîî"DUwˆª»ÝîÝîªwˆD"U» ÑÑ rrÑÑÑÑ rrrrÑÑÑÑÑÑ rrrrrrÑÑrrrÑÑÑ rrrrrrrrÑÑrrrÑÑÑÑÑ rrrrrrrrrrÑÑrrrÑÑÑÑÑÑÑ rrrrrrrrÑÑrrrÑÑÑÑÑÑÑÑÑ rrrrrrrrÑÑrrrÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrÑÑrrrÑÑÑÑÑÑÑÑÑÑÑÑÑ r rrrrrrrrrrÑÑrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrÑÑrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrÑÑrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrÑÑrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrr_rrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrr_____r_ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrr_________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrr___________ÑÑÑÑÑÑÑÑÑÑÑ__ÑÑrrrr______rr_____ÑÑÑÑÑÑÑÑÑÑÑ____rr______rrrr______ÑÑÑÑÑÑÑÑÑÑ__ ______rrrrrr________ÑÑÑÑÑÑÑÑ ___rrrrrrrr__________ÑÑÑÑÑÑ rrrrrrrr______________ÑÑÑÑ rrrrrr__________________ÑÑ rrrr______________________ rr______________________ ______________________ ________ __ _____ ______ ___ ____ _ __ ÿóÿÿÿÀÿÿÿ?ÿüÿðÿÀÿð?ðÀ@€ÀÀÀÀ?Àÿð ƒÿüÿÿ¿ÿÿÏÿÿ(0`€ ªwˆD"U»Ýî3f™Ìÿ333f3™3Ì3ÿ3333f3™3Ì3ÿ333333f33™33Ì33ÿ33f3fff™fÌfÿf3f33ff3f™3fÌ3fÿ3f™3™f™™™Ì™ÿ™3™33™f3™™3™Ì3™ÿ3™Ì3ÌfÌ™ÌÌÌÿÌ3Ì33Ìf3Ì™3ÌÌ3Ìÿ3Ìÿ3ÿfÿ™ÿÌÿÿÿ3ÿ33ÿf3ÿ™3ÿÌ3ÿÿ3ÿf3fff™fÌfÿf™3™f™™™Ì™ÿ™f33f3ff3™f3Ìf3ÿf3™33™3f™3™™3Ì™3ÿ™3ff3fffff™ffÌffÿff™f3™ff™f™™fÌ™fÿ™ff™3f™ff™™f™Ìf™ÿf™™™3™™f™™™™™Ì™™ÿ™™fÌ3fÌffÌ™fÌÌfÌÿfÌ™Ì3™Ìf™Ì™™ÌÌ™Ìÿ™Ìfÿ3fÿffÿ™fÿÌfÿÿfÿ™ÿ3™ÿf™ÿ™™ÿÌ™ÿÿ™ÿÌ3ÌfÌ™ÌÌÌÿÌÿ3ÿfÿ™ÿÌÿÿÿÌ33Ì3fÌ3™Ì3ÌÌ3ÿÌ3ÿ33ÿ3fÿ3™ÿ3Ìÿ3ÿÿ3Ìf3ÌffÌf™ÌfÌÌfÿÌfÿf3ÿffÿf™ÿfÌÿfÿÿfÌ™3Ì™fÌ™™Ì™ÌÌ™ÿÌ™ÿ™3ÿ™fÿ™™ÿ™ªÿ™ÿÿ™ÌÌ3ÌÌfÌÌ™ÌÌÌÌÌÿÌÌÿÌ3ÿÌfÿÌ™ÿÌÌÿÌÿÿÌÌÿ3ÌÿfÌÿ™ÌÿÌÌÿÿÌÿÿÿ3ÿÿfÿÿ™ÿÿÌÿÿÿÿÿ"""DDDUUUwwwˆˆˆªªª»»»ÝÝÝîîî"DUwˆª»ÝîÝîªwˆD"U» ÑÑ rrÑÑÑÑ rrrrÑÑÑÑÑÑ rrrrrrÑÑÑÑÑÑÑÑÑÑ rrrrrrrrÑÑÑÑÑÑrrÑÑÑÑ rrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑ rrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑ rrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ rrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrr rrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrrÑÑÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrrrrÑÑrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrrrrrrrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrrrrrrrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrrrrrrrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrrrr__rrrrrrÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrrrr______rr__ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrrrr____________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrrrr______________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑrrrrrrrrrr________________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ__ÑÑÑÑrrrrrrrr__________________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ____ÑÑrrrrrr__________rr________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ______rrrr__________rrrr________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ____ rr__________rrrrrr__________ÑÑÑÑÑÑÑÑÑÑÑÑÑÑ__ __________rrrrrrrr____________ÑÑÑÑÑÑÑÑÑÑÑÑ ______rrrrrrrrrr______________ÑÑÑÑÑÑÑÑÑÑ __rrrrrrrrrrrr________________ÑÑÑÑÑÑÑÑ rrrrrrrrrrrr____________________ÑÑÑÑÑÑ rrrrrrrrrr________________________ÑÑÑÑ rrrrrrrr____________________________ÑÑ rrrrrr________________________________ rrrr________________________________ rr________________________________ ____________________ __________ ____________ __ ________ __________ ______ ________ ____ ______ __ ____ __ ÿÿÏÿÿÿÿÿÿÿÿÿÿÿÿÿüÿÿÿÿÿÿðÿÿÿÿÿÀÿÿÿÿÿÿÿÿÿü?ÿÿÿðÿÿÿÀÿÿÿðÿÿÿü?ÿÿÿÿÿüÿÿðÿÿðÿÿðÿÿ0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?ÿÿÀ?ÿÿð?ÿÿð?ÿÿð?ÿÿð?ÿÿð?ÿÿðÿÿÿðÿÿÿðÀÿÿÿü3À?ÿÿÿÿ?ÀÿÿÿÿÿÀ?Ãÿÿÿÿÿð?Ïÿÿÿÿÿü?ÿÿÿÿÿÿÿ?ÿÿÿÿÿusr/src/sdlBasic/src/sdlBasic/win32/SingleThreadExtension.h0000777000076500007660000000376010463136771021056 0ustar // SciTE - Scintilla based Text Editor /** @file SingleThreadExtension.h ** Extension that wraps another extension so that OnExecute calls are always ** seen by the wrapped extension as coming from the initial thread, despite ** the fact that SciTE calls it from a worker thread on Windows. **/ // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SINGLETHREADEXTENSION_H #define SINGLETHREADEXTENSION_H #include #include "Extender.h" class SingleThreadExtension: public Extension { public: SingleThreadExtension(Extension &ext_) : ext(&ext_), hwndDispatcher(NULL) {} virtual ~SingleThreadExtension() { Finalise(); } virtual bool Initialise(ExtensionAPI *host_); virtual bool Finalise(); virtual bool Clear(); virtual bool Load(const char *filename); virtual bool InitBuffer(int); virtual bool ActivateBuffer(int); virtual bool RemoveBuffer(int); virtual bool OnOpen(const char *); virtual bool OnSwitchFile(const char *); virtual bool OnBeforeSave(const char *); virtual bool OnSave(const char *); virtual bool OnChar(char); virtual bool OnExecute(const char *); virtual bool OnSavePointReached(); virtual bool OnSavePointLeft(); virtual bool OnStyle(unsigned int, int, int, Accessor *); virtual bool OnDoubleClick(); virtual bool OnUpdateUI(); virtual bool OnMarginClick(); virtual bool OnMacro(const char *, const char *); virtual bool OnUserListSelection(int, const char *); virtual bool SendProperty(const char *); protected: Extension *ext; // Since the number of extensions requiring this is never likely to be large, // each wrapped extension gets its own dispatcher window. HWND hwndDispatcher; static LRESULT PASCAL WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); private: // Copying is unsupported. SingleThreadExtension(const SingleThreadExtension & copy); SingleThreadExtension & operator=(const SingleThreadExtension & copy); }; #endif usr/src/sdlBasic/src/sdlBasic/win32/DirectorExtension.h0000777000076500007660000000256410463136442020254 0ustar // SciTE - Scintilla based Text Editor /** @file DirectorExtension.h ** Extension for communicating with a director program. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. class DirectorExtension : public Extension { private: DirectorExtension() {} // Singleton DirectorExtension(const DirectorExtension &); // Disable copy ctor void operator=(const DirectorExtension &); // Disable operator= public: static DirectorExtension &Instance(); // Implement the Extension interface virtual bool Initialise(ExtensionAPI *host_); virtual bool Finalise(); virtual bool Clear(); virtual bool Load(const char *filename); virtual bool OnOpen(const char *path); virtual bool OnSwitchFile(const char *path); virtual bool OnSave(const char *path); virtual bool OnChar(char ch); virtual bool OnExecute(const char *s); virtual bool OnSavePointReached(); virtual bool OnSavePointLeft(); virtual bool OnStyle(unsigned int startPos, int lengthDoc, int initStyle, Accessor *styler); virtual bool OnDoubleClick(); virtual bool OnUpdateUI(); virtual bool OnMarginClick(); virtual bool OnMacro(const char *command, const char *params); virtual bool SendProperty(const char *prop); // Allow messages through to extension void HandleStringMessage(const char *message); }; usr/src/sdlBasic/src/sdlBasic/win32/deps.mak0000777000076500007660000000767110463136771016071 0ustar DirectorExtension.o: DirectorExtension.cxx \ ../../scintilla/include/Platform.h ../../scintilla/include/PropSet.h \ ../../scintilla/include/SString.h ../../scintilla/include/Scintilla.h \ ../../scintilla/include/Accessor.h ../src/Extender.h \ DirectorExtension.h ../src/SciTE.h ../src/SciTEBase.h SciTEWin.o: SciTEWin.cxx SciTEWin.h ../../scintilla/include/Platform.h \ ../src/SciTE.h ../../scintilla/include/PropSet.h \ ../../scintilla/include/SString.h ../../scintilla/include/Accessor.h \ ../../scintilla/include/KeyWords.h ../../scintilla/include/Scintilla.h \ ../src/Extender.h ../src/SciTEBase.h ../src/SciTEKeys.h \ UniqueInstance.h ../src/MultiplexExtension.h SciTEWinBar.o: SciTEWinBar.cxx SciTEWin.h \ ../../scintilla/include/Platform.h ../src/SciTE.h \ ../../scintilla/include/PropSet.h ../../scintilla/include/SString.h \ ../../scintilla/include/Accessor.h ../../scintilla/include/KeyWords.h \ ../../scintilla/include/Scintilla.h ../src/Extender.h \ ../src/SciTEBase.h ../src/SciTEKeys.h UniqueInstance.h SciTEWinDlg.o: SciTEWinDlg.cxx SciTEWin.h \ ../../scintilla/include/Platform.h ../src/SciTE.h \ ../../scintilla/include/PropSet.h ../../scintilla/include/SString.h \ ../../scintilla/include/Accessor.h ../../scintilla/include/KeyWords.h \ ../../scintilla/include/Scintilla.h ../src/Extender.h \ ../src/SciTEBase.h ../src/SciTEKeys.h UniqueInstance.h SingleThreadExtension.o: SingleThreadExtension.cxx \ SingleThreadExtension.h ../src/Extender.h \ ../../scintilla/include/Scintilla.h UniqueInstance.o: UniqueInstance.cxx ../../scintilla/include/Platform.h \ SciTEWin.h ../src/SciTE.h ../../scintilla/include/PropSet.h \ ../../scintilla/include/SString.h ../../scintilla/include/Accessor.h \ ../../scintilla/include/KeyWords.h ../../scintilla/include/Scintilla.h \ ../src/Extender.h ../src/SciTEBase.h ../src/SciTEKeys.h \ UniqueInstance.h Exporters.o: ../src/Exporters.cxx ../../scintilla/include/Platform.h \ ../src/SciTE.h ../../scintilla/include/PropSet.h \ ../../scintilla/include/SString.h ../../scintilla/include/Accessor.h \ ../../scintilla/include/WindowAccessor.h \ ../../scintilla/include/Scintilla.h ../src/Extender.h \ ../src/SciTEBase.h IFaceTable.o: ../src/IFaceTable.cxx ../src/IFaceTable.h MultiplexExtension.o: ../src/MultiplexExtension.cxx \ ../src/MultiplexExtension.h ../src/Extender.h \ ../../scintilla/include/Scintilla.h SciTEBase.o: ../src/SciTEBase.cxx ../../scintilla/include/Platform.h \ ../src/SciTE.h ../../scintilla/include/PropSet.h \ ../../scintilla/include/SString.h ../../scintilla/include/Accessor.h \ ../../scintilla/include/WindowAccessor.h \ ../../scintilla/include/KeyWords.h ../../scintilla/include/Scintilla.h \ ../../scintilla/include/ScintillaWidget.h \ ../../scintilla/include/SciLexer.h ../src/Extender.h ../src/SciTEBase.h SciTEBuffers.o: ../src/SciTEBuffers.cxx \ ../../scintilla/include/Platform.h ../src/SciTE.h \ ../../scintilla/include/PropSet.h ../../scintilla/include/SString.h \ ../../scintilla/include/Accessor.h \ ../../scintilla/include/WindowAccessor.h \ ../../scintilla/include/KeyWords.h ../../scintilla/include/Scintilla.h \ ../../scintilla/include/SciLexer.h ../src/Extender.h ../src/SciTEBase.h SciTEIO.o: ../src/SciTEIO.cxx ../../scintilla/include/Platform.h \ ../src/SciTE.h ../../scintilla/include/PropSet.h \ ../../scintilla/include/SString.h ../../scintilla/include/Accessor.h \ ../../scintilla/include/WindowAccessor.h \ ../../scintilla/include/Scintilla.h ../src/Extender.h ../src/Utf8_16.h \ ../src/SciTEBase.h SciTEProps.o: ../src/SciTEProps.cxx ../../scintilla/include/Platform.h \ ../src/SciTE.h ../../scintilla/include/PropSet.h \ ../../scintilla/include/SString.h ../../scintilla/include/Accessor.h \ ../../scintilla/include/Scintilla.h ../../scintilla/include/SciLexer.h \ ../src/Extender.h ../src/SciTEBase.h Utf8_16.o: ../src/Utf8_16.cxx ../src/Utf8_16.h usr/src/sdlBasic/src/sdlBasic/win32/UniqueInstance.cxx0000777000076500007660000002124010463136771020107 0ustar // SciTE - Scintilla based Text Editor /** @file UniqueInstance.cxx ** Class to ensure a unique instance of the editor, if requested. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include "Platform.h" #include "SciTEWin.h" UniqueInstance::UniqueInstance() { stw = 0; identityMessage = ::RegisterWindowMessage("sdlBasicInstanceIdentifier"); mutex = 0; bAlreadyRunning = false; hOtherWindow = NULL; } UniqueInstance::~UniqueInstance() { if (mutex) { ::CloseHandle(mutex); } } void UniqueInstance::Init(SciTEWin *stw_) { stw = stw_; } /** * Try to create a mutex. * If succeed, it is the first/only instance. * Otherwise, there is already an instance holding this mutex. */ bool UniqueInstance::AcceptToOpenFiles(bool bAccept) { bool bError = false; stw->openFilesHere = bAccept; if (bAccept) { // We create a mutex because it is an atomic operation. // An operation like EnumWindows is long, so if we use it only, we can fall in a race condition. // Note from MSDN: "The system closes the handle automatically when the process terminates. // The mutex object is destroyed when its last handle has been closed." // If the mutex already exists, the new process get a handle on it, so even if the first // process exits, the mutex isn't destroyed, until all SciTE instances exit. mutex = ::CreateMutex(NULL, FALSE, mutexName.c_str()); // The call fails with ERROR_ACCESS_DENIED if the mutex was // created in a different user session because of passing // NULL for the SECURITY_ATTRIBUTES on mutex creation bError = (::GetLastError() == ERROR_ALREADY_EXISTS || ::GetLastError() == ERROR_ACCESS_DENIED); } else { ::CloseHandle(mutex); } return !bError; } /** * Toggle the open files here option. * If set, search if another instance have this option set. * If found, we ask it to yield this option, * so we are the only one to accept files. */ void UniqueInstance::ToggleOpenFilesHere() { // If the openFilesHere option is set, we unset it and remove the handle. // Else, we set the option and try to set the mutex. if (!AcceptToOpenFiles(!stw->openFilesHere)) { // Cannot set the mutex, search the previous instance holding it HWND hOtherWindow = NULL; ::EnumWindows(reinterpret_cast(SearchOtherInstance), reinterpret_cast(this)); if (hOtherWindow != NULL) { // Found, we indicate it to yield the acceptation of files ::SendMessage(hOtherWindow, identityMessage, 0, static_cast(1)); } } stw->CheckMenus(); } /** * Manage the received COPYDATA message with a command line from another instance. */ LRESULT UniqueInstance::CopyData(COPYDATASTRUCT *pcds) { if (pcds) { if (stw->props.GetInt("minimize.to.tray")) { stw->RestoreFromTray(); } const char *text = static_cast(pcds->lpData); if (text && strlen(text) > 0) { SString args = stw->ProcessArgs(text); stw->ProcessCommandLine(args, 0); stw->ProcessCommandLine(args, 1); } ::FlashWindow(stw->MainHWND(), FALSE); } return TRUE; } /** * If the given message is the identity message and we hold the * open files here option, we answer the message (so other instances know * we are the one holding the option). * If the message ask to yield this option, we do it nicely... */ LRESULT UniqueInstance::CheckMessage(UINT message, WPARAM wParam, LPARAM lParam) { if (message == identityMessage) { if (stw->openFilesHere || wParam != 0) { // We answer only if the menu item is checked to accept files, // or if the caller force answering by setting wParam to non null // which can be used to find all instances (not used yet). if (stw->openFilesHere && lParam != 0) { // An instance indicates it takes control of the Open Files Here // feature, so this one no longer accept them. AcceptToOpenFiles(false); stw->CheckMenus(); // Update the checkmark } return identityMessage; } } return 0; } /** * To be called only if check.if.already.open option is set to 1. * Create the mutex name, try to set the mutex. * If failed, renounce to the open files here option. */ void UniqueInstance::CheckOtherInstance() { // Use the method explained by Joseph M. Newcomer to avoid multiple instances of an application: // http://www.codeproject.com/cpp/avoidmultinstance.asp // I limit instances by desktop, it seems to make sense with a GUI application... mutexName = "sdlBasic-UniqueInstanceMutex-"; // I doubt I really need a GUID here... HDESK desktop = ::GetThreadDesktop(::GetCurrentThreadId()); DWORD len = 0; // Query the needed size for the buffer BOOL result = ::GetUserObjectInformation(desktop, UOI_NAME, NULL, 0, &len); if (result == 0 && GetLastError() == ERROR_INSUFFICIENT_BUFFER) { // WinNT / Win2000 char *info = new char[len]; ::GetUserObjectInformation(desktop, UOI_NAME, info, len, &len); mutexName += info; delete []info; } else { // Win9x: no multiple desktop, GetUserObjectInformation can be called // but is bogus... mutexName += "Win9x"; } // Try to set the mutex. If return false, it failed, there is already another instance. bAlreadyRunning = !AcceptToOpenFiles(true); if (bAlreadyRunning) { // Don't answer to requests from other starting instances stw->openFilesHere = false; } } /** * If we know there is another instance with open files here option, * we search it by enumerating windows. * @return true if found. */ bool UniqueInstance::FindOtherInstance() { if (bAlreadyRunning && identityMessage != 0) { ::EnumWindows(reinterpret_cast(SearchOtherInstance), reinterpret_cast(this)); if (hOtherWindow) { return true; } } return false; } /** * Send the COPYDATA messages to transmit the command line to * the instance holding the open files here option. * After that, the current instance will exit. */ void UniqueInstance::SendCommands(const char *cmdLine) { // On Win2k, windows can't get focus by themselves, // so it is the responsability of the new process to bring the window // to foreground. // Put the other SciTE uniconized and to forefront. if (::IsIconic(hOtherWindow)) { ::ShowWindow(hOtherWindow, SW_RESTORE); } ::SetForegroundWindow(hOtherWindow); COPYDATASTRUCT cds; cds.dwData = 0; // Send 2 messages - first the CWD, so paths relative to // the new instance can be resolved in the old instance, // then the real command line. // (Restoring the cwd could be done, // but keeping it to the last file opened can also // be useful) TCHAR cwdCmd[MAX_PATH + 7]; // 7 for "-cwd:" and 2x'"' strcpy(cwdCmd, "\"-cwd:"); getcwd(cwdCmd + strlen(cwdCmd), MAX_PATH); strcat(cwdCmd, "\""); // Defeat the "\" mangling - convert "\" to "/" for (char *temp = cwdCmd; *temp; temp++) { if (*temp == '\\') { *temp = '/'; } } cds.cbData = static_cast(strlen(cwdCmd) + 1); cds.lpData = static_cast(cwdCmd); ::SendMessage(hOtherWindow, WM_COPYDATA, 0, reinterpret_cast(&cds)); // Now the command line itself. cds.cbData = static_cast(strlen(cmdLine) + 1); cds.lpData = static_cast(const_cast(cmdLine)); ::SendMessage(hOtherWindow, WM_COPYDATA, 0, reinterpret_cast(&cds)); } /** * Function called by EnumWindows. * @a hWnd is the handle to the currently enumerated window. * @a lParam is seen as a pointer to the current UniqueInstance * so it can be used to access all members. * @return FALSE if found, to stop EnumWindows. */ BOOL CALLBACK UniqueInstance::SearchOtherInstance(HWND hWnd, LPARAM lParam) { BOOL bResult = TRUE; DWORD result; UniqueInstance *ui = reinterpret_cast(lParam); // First, avoid to send a message to ourself if (hWnd != reinterpret_cast(ui->stw->MainHWND())) { // Send a message to the given window, to see if it will answer with // the same message. If it does, it is a Gui window with // openFilesHere set. // We use a timeout to avoid being blocked by hung processes. LRESULT found = ::SendMessageTimeout(hWnd, ui->identityMessage, 0, 0, SMTO_BLOCK | SMTO_ABORTIFHUNG, 200, &result); if (found != 0 && result == static_cast(ui->identityMessage)) { // Another Gui window found! // We memorise its window handle ui->hOtherWindow = hWnd; // We stop the EnumWindows bResult = FALSE; } } return bResult; } usr/src/sdlBasic/src/sdlBasic/win32/DirectorExtension.cxx0000777000076500007660000001724710463136442020633 0ustar // SciTE - Scintilla based Text Editor /** @file DirectorExtension.cxx ** Extension for communicating with a director program. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #define _WIN32_WINNT 0x0400 #ifdef _MSC_VER // windows.h, et al, use a lot of nameless struct/unions - can't fix it, so allow it #pragma warning(disable: 4201) #endif #include #ifdef _MSC_VER // okay, that's done, don't allow it in our code #pragma warning(default: 4201) #endif #include #include "Platform.h" #include "PropSet.h" #include "Scintilla.h" #include "Accessor.h" #include "Extender.h" #include "DirectorExtension.h" #include "SciTE.h" #include "SciTEBase.h" static ExtensionAPI *host = 0; static HWND wDirector = 0; static HWND wCorrespondent = 0; static HWND wReceiver = 0; static bool startedByDirector = false; static bool shuttingDown = false; unsigned int SDI = 0; static void SendDirector(const char *verb, const char *arg = 0) { if ((wDirector != 0) || (wCorrespondent != 0)) { HWND wDestination = wCorrespondent; SString addressedMessage; if (wDestination) { addressedMessage += ":"; SString address(reinterpret_cast(wDestination)); addressedMessage += address; addressedMessage += ":"; } else { wDestination = wDirector; } addressedMessage += verb; addressedMessage += ":"; if (arg) addressedMessage += arg; char *slashedMessage = Slash(addressedMessage.c_str()); if (slashedMessage) { COPYDATASTRUCT cds; cds.dwData = 0; cds.cbData = static_cast(strlen(slashedMessage)); cds.lpData = reinterpret_cast( const_cast(slashedMessage)); ::SendMessage(wDestination, WM_COPYDATA, reinterpret_cast(wReceiver), reinterpret_cast(&cds)); delete []slashedMessage; } } } static void SendDirector(const char *verb, sptr_t arg) { SString s(arg); ::SendDirector(verb, s.c_str()); } static void CheckEnvironment(ExtensionAPI *host) { if (host && !shuttingDown) { if (!wDirector) { char *director = host->Property("director.hwnd"); if (director && *director) { startedByDirector = true; wDirector = reinterpret_cast(atoi(director)); // Director is just seen so identify this to it ::SendDirector("identity", reinterpret_cast(wReceiver)); } delete []director; } char number[32]; sprintf(number, "%0d", reinterpret_cast(wReceiver)); host->SetProperty("WindowID", number); } } static char DirectorExtension_ClassName[] = "DirectorExtension"; static LRESULT HandleCopyData(LPARAM lParam) { COPYDATASTRUCT *pcds = reinterpret_cast(lParam); // Copy into an temporary buffer to ensure \0 terminated if (pcds->lpData) { char *dataCopy = new char[pcds->cbData + 1]; if (dataCopy) { strncpy(dataCopy, reinterpret_cast(pcds->lpData), pcds->cbData); dataCopy[pcds->cbData] = '\0'; DirectorExtension::Instance().HandleStringMessage(dataCopy); delete []dataCopy; } } return 0; } LRESULT PASCAL DirectorExtension_WndProc( HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) { if (iMessage == WM_COPYDATA) { return HandleCopyData(lParam); } else if (iMessage == SDI) { return SDI; } return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } static void DirectorExtension_Register(HINSTANCE hInstance) { WNDCLASS wndclass; wndclass.style = 0; wndclass.lpfnWndProc = DirectorExtension_WndProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 0; wndclass.hInstance = hInstance; wndclass.hIcon = 0; wndclass.hCursor = NULL; wndclass.hbrBackground = NULL; wndclass.lpszMenuName = 0; wndclass.lpszClassName = DirectorExtension_ClassName; if (!::RegisterClass(&wndclass)) ::exit(FALSE); } DirectorExtension &DirectorExtension::Instance() { static DirectorExtension singleton; return singleton; } bool DirectorExtension::Initialise(ExtensionAPI *host_) { host = host_; SDI = ::RegisterWindowMessage("SciTEDirectorInterface"); HINSTANCE hInstance = reinterpret_cast( host->GetInstance()); DirectorExtension_Register(hInstance); wReceiver = ::CreateWindow( DirectorExtension_ClassName, DirectorExtension_ClassName, 0, 0, 0, 0, 0, 0, 0, hInstance, 0); if (!wReceiver) ::exit(FALSE); // Make the frame window handle available so the director can activate it. ::SetWindowLong(wReceiver, GWL_USERDATA, reinterpret_cast(((SciTEBase*)host)->GetID())); CheckEnvironment(host); return true; } bool DirectorExtension::Finalise() { ::SendDirector("closing"); if (wReceiver) ::DestroyWindow(wReceiver); wReceiver = 0; return true; } bool DirectorExtension::Clear() { return false; } bool DirectorExtension::Load(const char *) { return false; } bool DirectorExtension::OnOpen(const char *path) { CheckEnvironment(host); if (*path) { ::SendDirector("opened", path); } return false; } bool DirectorExtension::OnSwitchFile(const char *path) { CheckEnvironment(host); if (*path) { ::SendDirector("switched", path); } return false; } bool DirectorExtension::OnSave(const char *path) { CheckEnvironment(host); if (*path) { ::SendDirector("saved", path); } return false; } bool DirectorExtension::OnChar(char) { return false; } bool DirectorExtension::OnExecute(const char *cmd) { CheckEnvironment(host); ::SendDirector("macro:run", cmd); return false; } bool DirectorExtension::OnSavePointReached() { return false; } bool DirectorExtension::OnSavePointLeft() { return false; } bool DirectorExtension::OnStyle(unsigned int, int, int, Accessor *) { return false; } // These should probably have arguments bool DirectorExtension::OnDoubleClick() { return false; } bool DirectorExtension::OnUpdateUI() { return false; } bool DirectorExtension::OnMarginClick() { return false; } bool DirectorExtension::OnMacro(const char *command, const char *params) { SendDirector(command, params); return false; } bool DirectorExtension::SendProperty(const char *prop) { CheckEnvironment(host); if (*prop) { ::SendDirector("property", prop); } return false; } void DirectorExtension::HandleStringMessage(const char *message) { // Message may contain multiple commands separated by '\n' // Reentrance trouble - if this function is reentered, the wCorrespondent may // be set to zero before time. WordList wlMessage(true); wlMessage.Set(message); for (int i = 0; i < wlMessage.len; i++) { // Message format is [:return address:]command:argument char *cmd = wlMessage[i]; if (*cmd == ':') { // There is a return address char *colon = strchr(cmd + 1, ':'); if (colon) { *colon = '\0'; wCorrespondent = reinterpret_cast(atoi(cmd + 1)); cmd = colon + 1; } } if (isprefix(cmd, "identity:")) { char *arg = strchr(cmd, ':'); if (arg) wDirector = reinterpret_cast(atoi(arg + 1)); } else if (isprefix(cmd, "closing:")) { wDirector = 0; if (startedByDirector) { shuttingDown = true; host->ShutDown(); shuttingDown = false; } } else if (host) { host->Perform(cmd); } wCorrespondent = 0; } } #ifdef _MSC_VER // Unreferenced inline functions are OK #pragma warning(disable: 4514) #endif usr/src/sdlBasic/src/sdlBasic/win32/SciTEWin.h0000777000076500007660000001721210463136620016223 0ustar // SciTE - Scintilla based Text Editor // sdlbasic editor version // this version of scite was create as editor for sdlbasic language /** @file SciTEWin.h ** Header of main code for the Windows version of the editor. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #ifdef __MINGW_H #define _WIN32_IE 0x0400 #endif #define _WIN32_WINNT 0x0400 #ifdef _MSC_VER // windows.h, et al, use a lot of nameless struct/unions - can't fix it, so allow it #pragma warning(disable: 4201) #endif #include #ifdef _MSC_VER // okay, that's done, don't allow it in our code #pragma warning(default: 4201) #endif #include #include #include "Platform.h" #include #include #include #include #ifdef _MSC_VER #include #endif #ifdef __BORLANDC__ #include #endif #ifdef __DMC__ #include #endif #include "SciTE.h" #include "PropSet.h" #include "Accessor.h" #include "KeyWords.h" #include "Scintilla.h" #include "Extender.h" #include "SciTEBase.h" #include "SciTEKeys.h" #include "UniqueInstance.h" const int SCITE_TRAY = WM_APP + 0; /** Windows specific stuff. **/ class SciTEWin : public SciTEBase { protected: int cmdShow; static HINSTANCE hInstance; static char *className; static char *classNameInternal; static SciTEWin *app; WINDOWPLACEMENT winPlace; RECT rcWorkArea; FINDREPLACE fr; char openWhat[200]; bool modalParameters; int filterDefault; bool staticBuild; int menuSource; HANDLE hWriteSubProcess; DWORD subProcessGroupId; HACCEL hAccTable; PRectangle pagesetupMargin; HGLOBAL hDevMode; HGLOBAL hDevNames; UniqueInstance uniqueInstance; /// HTMLHelp module HMODULE hHH; /// Multimedia (sound) module HMODULE hMM; // Tab Bar TCITEM tie; HFONT fontTabs; /// Preserve focus during deactivation HWND wFocus; Window wFindInFiles; virtual void SizeContentWindows(); virtual void SizeSubWindows(); virtual void SetMenuItem(int menuNumber, int position, int itemID, const char *text, const char *mnemonic = 0); virtual void DestroyMenuItem(int menuNumber, int itemID); virtual void CheckAMenuItem(int wIDCheckItem, bool val); virtual void EnableAMenuItem(int wIDCheckItem, bool val); virtual void CheckMenus(); void LocaliseAccelerators(); SString LocaliseAccelerator(const char *Accelerator, int cmd); void LocaliseMenu(HMENU hmenu); void LocaliseMenus(); void LocaliseControl(HWND w); void LocaliseDialog(HWND wDialog); virtual void FixFilePath(); virtual void AbsolutePath(char *fullPath, const char *basePath, int size); int DoDialog(HINSTANCE hInst, const char *resName, HWND hWnd, DLGPROC lpProc); virtual bool OpenDialog(const char *filter=NULL); SString ChooseSaveName(const char *title, const char *filter=0, const char *ext=0); virtual bool SaveAsDialog(); virtual void SaveACopy(); virtual void SaveAsHTML(); virtual void SaveAsRTF(); virtual void SaveAsPDF(); virtual void SaveAsTEX(); virtual void SaveAsXML(); virtual void LoadSessionDialog(); virtual void SaveSessionDialog(); virtual bool PreOpenCheck(const char *file); /// Print the current buffer. virtual void Print(bool showDialog); /// Handle default print setup values and ask the user its preferences. virtual void PrintSetup(); BOOL HandleReplaceCommand(int cmd); virtual int WindowMessageBox(Window &w, const SString &msg, int style); virtual void AboutDialog(); void DropFiles(HDROP hdrop); void MinimizeToTray(); void RestoreFromTray(); SString ProcessArgs(const char *cmdLine); virtual void QuitProgram(); virtual void GetDefaultDirectory(char *directory, size_t size); virtual bool GetSciteDefaultHome(char *path, unsigned int lenPath); virtual bool GetSciteUserHome(char *path, unsigned int lenPath); virtual void SetFileProperties(PropSet &ps); virtual void SetStatusBarText(const char *s); /// Warn the user, by means defined in its properties. virtual void WarnUser(int warnID); virtual void Notify(SCNotification *notification); virtual void ShowToolBar(); virtual void ShowTabBar(); virtual void ShowStatusBar(); void ExecuteHelp(const char *cmd); void ExecuteOtherHelp(const char *cmd); void CopyAsRTF(); void FullScreenToggle(); void Command(WPARAM wParam, LPARAM lParam); HWND MainHWND(); BOOL FindMessage(HWND hDlg, UINT message, WPARAM wParam); static BOOL CALLBACK FindDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); BOOL ReplaceMessage(HWND hDlg, UINT message, WPARAM wParam); static BOOL CALLBACK ReplaceDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); void PerformGrep(); void FillCombos(HWND hDlg); BOOL GrepMessage(HWND hDlg, UINT message, WPARAM wParam); static BOOL CALLBACK GrepDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); BOOL IncrementFindMessage(HWND hDlg, UINT message, WPARAM wParam); static BOOL CALLBACK FindIncrementDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); virtual void FindIncrement(); virtual void Find(); virtual void FindInFiles(); virtual void Replace(); virtual void FindReplace(bool replace); virtual void DestroyFindReplace(); BOOL GoLineMessage(HWND hDlg, UINT message, WPARAM wParam); static BOOL CALLBACK GoLineDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); virtual void GoLineDialog(); BOOL AbbrevMessage(HWND hDlg, UINT message, WPARAM wParam); static BOOL CALLBACK AbbrevDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); virtual bool AbbrevDialog(); BOOL TabSizeMessage(HWND hDlg, UINT message, WPARAM wParam); static BOOL CALLBACK TabSizeDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); virtual void TabSizeDialog(); void ParamGrab(); virtual bool ParametersDialog(bool modal); BOOL ParametersMessage(HWND hDlg, UINT message, WPARAM wParam); static BOOL CALLBACK ParametersDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); BOOL AboutMessage(HWND hDlg, UINT message, WPARAM wParam); static BOOL CALLBACK AboutDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); void AboutDialogWithBuild(int staticBuild); void MakeAccelerator(SString sKey, ACCEL &Accel); public: SciTEWin(Extension *ext = 0); ~SciTEWin(); bool ModelessHandler(MSG *pmsg); void CreateUI(); /// Management of the command line parameters. void Run(const char *cmdLine); DWORD ExecuteOne(const Job &jobToRun, bool &seenOutput); void ProcessExecute(); void ShellExec(const SString &cmd, const SString &dir); virtual void Execute(); virtual void StopExecute(); virtual void AddCommand(const SString &cmd, const SString &dir, JobSubsystem jobType, const SString &input = "", int flags=0); void Paint(Surface *surfaceWindow, PRectangle rcPaint); void Creation(); LRESULT KeyDown(WPARAM wParam); LRESULT KeyUp(WPARAM wParam); virtual void AddToPopUp(const char *label, int cmd=0, bool enabled=true); LRESULT ContextMenuMessage(UINT iMessage, WPARAM wParam, LPARAM lParam); LRESULT WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam); LRESULT WndProcI(UINT iMessage, WPARAM wParam, LPARAM lParam); virtual SString EncodeString(const SString &s); virtual SString GetRangeInUIEncoding(Window &wCurrent, int selStart, int selEnd); HACCEL GetAcceleratorTable() { return hAccTable; } uptr_t GetInstance(); static void Register(HINSTANCE hInstance_); static LRESULT PASCAL TWndProc( HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam); static LRESULT PASCAL IWndProc( HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam); friend class UniqueInstance; }; usr/src/sdlBasic/src/sdlBasic/win32/SciTE.exe.manifest0000777000076500007660000000123610463136442017705 0ustar SciTE usr/src/sdlBasic/src/sdlBasic/win32/makefile0000777000076500007660000000732410463136771016137 0ustar # Make file for SciTE on Windows # Copyright 1998-2002 by Neil Hodgson # The License.txt file describes the conditions under which this software may be distributed. # This makefile assumes the mingw32 version of GCC 3.2 is used and changes will # be needed to use other compilers. ifdef TERM # Assume that any defined TERM implies cygwin. CYGWIN = 1 endif .SUFFIXES: .cxx CC = g++ DLLWRAP = dllwrap ifndef CYGWIN DEL = del /q COPY = copy else DEL = rm COPY = cp endif PROG = ../../../bin/sdlB.exe PROGSTATIC = ../../../bin/sdlBasic.exe ifndef NOTHUNKS gversion = $(word 1,$(subst ., ,$(shell g++ --version))) ifeq ($(gversion),2) THUNKFLAGS=-fvtable-thunks endif endif vpath %.h ../src ../scintilla/include ../scintilla/win32 vpath %.cxx ../src vpath %.o ../scintilla/win32 vpath %.a ../scintilla/win32 INCLUDEDIRS=-I ../scintilla/include -I ../scintilla/win32 -I ../src RCINCLUDEDIRS=--include-dir ../scintilla/win32 --include-dir ../src CBASEFLAGS = -W -Wall $(INCLUDEDIRS) -mno-cygwin ifdef DEBUG CFLAGS=-DDEBUG -g $(CBASEFLAGS) else CFLAGS=-DNDEBUG -Os $(CBASEFLAGS) STRIPFLAG="-Wl,-s" endif CXXFLAGS = $(CFLAGS) -pedantic -fno-exceptions $(THUNKFLAGS) -fno-rtti -mno-cygwin LDFLAGS=-mwindows -lcomctl32 -limm32 -lole32 -luuid -mno-cygwin .cxx.o: $(CC) $(CXXFLAGS) -c $< -o $@ .c.o: gcc $(CFLAGS) -c $< -o $@ OTHER_OBJS = SciTEBuffers.o SciTEIO.o Exporters.o SciTEProps.o \ SciTEWin.o SciTEWinBar.o SciTEWinDlg.o MultiplexExtension.o \ UniqueInstance.o WindowAccessor.o \ PropSet.o PlatWin.o UniConversion.o Utf8_16.o SciTERes.o \ DirectorExtension.o XPM.o OBJS = SciTEBase.o $(OTHER_OBJS) #++Autogenerated -- run scintilla/src/LexGen.py to regenerate #**1:LEXPROPS=\\\n\(..\\bin\\\* \) LEXPROPS=..\bin\others.properties ..\bin\vb.properties ..\bin\sdlbasic.properties #--Autogenerated -- end of automatically generated section PROPS=..\share\sdlBasic\SciTEGlobal.properties ..\share\sdlBasic\vb.properties ..\share\sdlBasic\sdlbasic.properties #$(PROG)$(DLLS) ALL: $(PROGSTATIC) $(PROPS) strip $(PROGSTATIC) clean: $(DEL) ..\..\..\bin\*.exe *.o *.obj *.dll *.res *.map deps: $(CC) -MM $(CXXFLAGS) *.cxx ../src/*.cxx >deps.mak $(PROG): $(OBJS) $(CC) $(STRIPFLAG) -Xlinker --subsystem -Xlinker windows -o $@ $^ $(LDFLAGS) OBJSSTATIC = Sc1.o SciTEWinBar.o SciTEWinDlg.o MultiplexExtension.o \ UniqueInstance.o SciTEBase.o SciTEBuffers.o \ SciTEIO.o Exporters.o SciTEProps.o Editor.o \ DocumentAccessor.o KeyWords.o ExternalLexer.o \ ContractionState.o CellBuffer.o CallTip.o Sc1Res.o PlatWin.o \ Utf8_16.o KeyMap.o Indicator.o LineMarker.o RESearch.o \ AutoComplete.o DirectorExtension.o MultiplexExtension.o \ Lexers.a Document.o DocumentAccessor.o ScintillaWinL.o ScintillaBaseL.o PropSet.o Style.o StyleContext.o UniConversion.o ViewStyle.o WindowAccessor.o XPM.o $(PROGSTATIC): $(OBJSSTATIC) $(CC) $(STRIPFLAG) -Xlinker --subsystem -Xlinker windows -o $@ $^ $(LDFLAGS) # Automatically generate dependencies for most files with "make deps" include deps.mak Sc1.o: SciTEWin.cxx SciTEWin.h SciTE.h Accessor.h WindowAccessor.h KeyWords.h PropSet.h \ SString.h Scintilla.h Extender.h SciTEBase.h $(CC) $(CXXFLAGS) -D STATIC_BUILD -c $< -o $@ SciTERes.o: SciTERes.rc SciTE.h PlatformRes.h windres $(RCINCLUDEDIRS) SciTERes.rc $@ # Also depends on ../src/Embedded.properties but may not want to build everywhere # so must explicitly ask to build it. Sc1Res.o: SciTERes.rc SciTE.h PlatformRes.h windres $(RCINCLUDEDIRS) SciTERes.rc --define STATIC_BUILD $@ # Make sure SciTEBase gets rebuilt (so its about box gets a new # date stamp) when any of the other objects are updated. SciTEBase.o: $(OTHER_OBJS) usr/src/sdlBasic/src/sdlBasic/win32/install.bat0000777000076500007660000000057110463136771016572 0ustar rem the installation path set prefix=%ProgramFiles%\sdlBasic rem direct install sdlBasic mkdir %prefix% mkdir %prefix%\bin mkdir %prefix%\share\sdlBasic mkdir %prefix%\share\sdlBasic\plugins copy ..\..\..\bin\sdlBasic.exe %prefix%\bin copy ..\..\..\share\sdlBasic\* %prefix%\share\sdlBasic copy ..\..\..\share\sdlBasic\plugins\* %prefix%\share\sdlBasic\plugins usr/src/sdlBasic/src/sdlBasic/win32/SciTEWin.cxx0000777000076500007660000016637110463136554016617 0ustar // SciTE - Scintilla based Text Editor // sdlbasic editor version // this version of scite was create as editor for sdlbasic language // /** @file SciTEWin.cxx ** Main code for the Windows version of the editor. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include "SciTEWin.h" #ifndef NO_EXTENSIONS #include "MultiplexExtension.h" #ifndef NO_FILER #include "DirectorExtension.h" #endif //#ifndef NO_LUA //#include "SingleThreadExtension.h" //#include "LuaExtension.h" //#endif #endif #ifdef STATIC_BUILD const char appName[] = "sdlBasic"; #else const char appName[] = "sdlB"; #endif long SciTEKeys::ParseKeyCode(const char *mnemonic) { int modsInKey = 0; int keyval = -1; if (mnemonic && *mnemonic) { SString sKey = mnemonic; if (sKey.contains("Ctrl+")) { modsInKey |= SCMOD_CTRL; sKey.remove("Ctrl+"); } if (sKey.contains("Shift+")) { modsInKey |= SCMOD_SHIFT; sKey.remove("Shift+"); } if (sKey.contains("Alt+")) { modsInKey |= SCMOD_ALT; sKey.remove("Alt+"); } if (sKey.length() == 1) { keyval = VkKeyScan(sKey[0]) & 0xFF; } else if (sKey.length() > 1) { if ((sKey[0] == 'F') && (isdigit(sKey[1]))) { sKey.remove("F"); int fkeyNum = sKey.value(); if (fkeyNum >= 1 && fkeyNum <= 12) keyval = fkeyNum - 1 + VK_F1; } else if ((sKey[0] == 'V') && (isdigit(sKey[1]))) { sKey.remove("V"); int vkey = sKey.value(); if (vkey > 0 && vkey <= 0x7FFF) keyval = vkey; } else if (sKey.search("Keypad") == 0) { sKey.remove("Keypad"); if (isdigit(sKey[0])) { int keyNum = sKey.value(); if (keyNum >= 0 && keyNum <= 9) keyval = keyNum + VK_NUMPAD0; } else if (sKey == "Plus") { keyval = VK_ADD; } else if (sKey == "Minus") { keyval = VK_SUBTRACT; } else if (sKey == "Decimal") { keyval = VK_DECIMAL; } else if (sKey == "Divide") { keyval = VK_DIVIDE; } else if (sKey == "Multiply") { keyval = VK_MULTIPLY; } } else if (sKey == "Left") { keyval = VK_LEFT; } else if (sKey == "Right") { keyval = VK_RIGHT; } else if (sKey == "Up") { keyval = VK_UP; } else if (sKey == "Down") { keyval = VK_DOWN; } else if (sKey == "Insert") { keyval = VK_INSERT; } else if (sKey == "End") { keyval = VK_END; } else if (sKey == "Home") { keyval = VK_HOME; } else if (sKey == "Enter") { keyval = VK_RETURN; } else if (sKey == "Space") { keyval = VK_SPACE; } else if (sKey == "Escape") { keyval = VK_ESCAPE; } else if (sKey == "Delete") { keyval = VK_DELETE; } else if (sKey == "PageUp") { keyval = VK_PRIOR; } else if (sKey == "PageDown") { keyval = VK_NEXT; } } } return (keyval > 0) ? (keyval | (modsInKey<<16)) : 0; } bool SciTEKeys::MatchKeyCode(long parsedKeyCode, int keyval, int modifiers) { // TODO: are the 0x11 and 0x10 special cases needed, or are they // just short-circuits? If not needed, this test could removed, // and perhaps the function moved to Platform.h as an inline. if (keyval == 0x11 || keyval == 0x10) return false; return parsedKeyCode && !(0xFFFF0000 & (keyval | modifiers)) && (parsedKeyCode == (keyval | (modifiers<<16))); } HINSTANCE SciTEWin::hInstance = 0; char *SciTEWin::className = NULL; char *SciTEWin::classNameInternal = NULL; SciTEWin *SciTEWin::app = NULL; SciTEWin::SciTEWin(Extension *ext) : SciTEBase(ext) { app = this; cmdShow = 0; heightBar = 7; fontTabs = 0; wFocus = 0; winPlace.length = 0; openWhat[0] = '\0'; memset(&fr, 0, sizeof(fr)); modalParameters = false; filterDefault = 1; menuSource = 0; hWriteSubProcess = NULL; // Read properties resource into propsEmbed // The embedded properties file is to allow distributions to be sure // that they have a sensible default configuration even if the properties // files are missing. Also allows a one file distribution of Sc1.EXE. propsEmbed.Clear(); // System type properties are also stored in the embedded properties. propsEmbed.Set("PLAT_WIN", "1"); OSVERSIONINFO osv = {sizeof(OSVERSIONINFO), 0, 0, 0, 0, ""}; ::GetVersionEx(&osv); if (osv.dwPlatformId == VER_PLATFORM_WIN32_NT) propsEmbed.Set("PLAT_WINNT", "1"); else if (osv.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) propsEmbed.Set("PLAT_WIN95", "1"); HRSRC handProps = ::FindResource(hInstance, "Embedded", "Properties"); if (handProps) { DWORD size = ::SizeofResource(hInstance, handProps); HGLOBAL hmem = ::LoadResource(hInstance, handProps); if (hmem) { const void *pv = ::LockResource(hmem); if (pv) { propsEmbed.ReadFromMemory( reinterpret_cast(pv), size, 0); } } ::FreeResource(handProps); } ReadGlobalPropFile(); /// Need to copy properties to variables before setting up window SetPropertiesInitial(); ReadAbbrevPropFile(); hDevMode = 0; hDevNames = 0; ::ZeroMemory(&pagesetupMargin, sizeof(pagesetupMargin)); hHH = 0; hMM = 0; uniqueInstance.Init(this); hAccTable = ::LoadAccelerators(hInstance, "ACCELS"); // md } SciTEWin::~SciTEWin() { if (hDevMode) ::GlobalFree(hDevMode); if (hDevNames) ::GlobalFree(hDevNames); if (hHH) ::FreeLibrary(hHH); if (hMM) ::FreeLibrary(hMM); if (fontTabs) ::DeleteObject(fontTabs); } uptr_t SciTEWin::GetInstance() { return reinterpret_cast(hInstance); } void SciTEWin::Register(HINSTANCE hInstance_) { const char resourceName[] = "SciTE"; hInstance = hInstance_; WNDCLASS wndclass; // Register the frame window className = "SciTEWindow"; wndclass.style = 0; wndclass.lpfnWndProc = SciTEWin::TWndProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = sizeof(SciTEWin*); wndclass.hInstance = hInstance; wndclass.hIcon = ::LoadIcon(hInstance, resourceName); wndclass.hCursor = NULL; wndclass.hbrBackground = NULL; wndclass.lpszMenuName = resourceName; wndclass.lpszClassName = className; if (!::RegisterClass(&wndclass)) exit(FALSE); // Register the window that holds the two Scintilla edit windows and the separator classNameInternal = "SciTEWindowContent"; wndclass.lpfnWndProc = SciTEWin::IWndProc; wndclass.lpszMenuName = 0; wndclass.lpszClassName = classNameInternal; if (!::RegisterClass(&wndclass)) exit(FALSE); } static void GetSciTEPath(char *path, unsigned int lenPath, char *home) { *path = '\0'; if (home) { strncpy(path, home, lenPath); } else { ::GetModuleFileName(0, path, lenPath); // Remove the SciTE.exe char *lastSlash = strrchr(path, pathSepChar); if (lastSlash) *lastSlash = '\0'; } path[lenPath - 1] = '\0'; ChopTerminalSlash(path); } void SciTEWin::GetDefaultDirectory(char *directory, size_t size) { //char *home = getenv("SciTE_HOME"); char *home=(char *)malloc(20); strcpy(home,"../share/sdlBasic/"); GetSciTEPath(directory, static_cast(size), home); directory=(char *) malloc(20); directory="../share/sdlBasic/\0"; } bool SciTEWin::GetSciteDefaultHome(char *path, unsigned int lenPath) { *path = '\0'; char *home = getenv("SciTE_HOME"); GetSciTEPath(path, lenPath, home); return true; } bool SciTEWin::GetSciteUserHome(char *path, unsigned int lenPath) { *path = '\0'; char *home = getenv("SciTE_HOME"); if (!home) home = getenv("USERPROFILE"); GetSciTEPath(path, lenPath, home); return true; } // Help command lines contain topic!path void SciTEWin::ExecuteOtherHelp(const char *cmd) { char *topic = StringDup(cmd); if (topic) { char *path = strchr(topic, '!'); if (path) { *path = '\0'; path++; // After the ! ::WinHelp(MainHWND(), path, HELP_KEY, reinterpret_cast(topic)); } } delete []topic; } // HH_AKLINK not in mingw headers struct XHH_AKLINK { long cbStruct; BOOL fReserved; const char *pszKeywords; char *pszUrl; char *pszMsgText; char *pszMsgTitle; char *pszWindow; BOOL fIndexOnFail; }; // Help command lines contain topic!path void SciTEWin::ExecuteHelp(const char *cmd) { if (!hHH) hHH = ::LoadLibrary("HHCTRL.OCX"); if (hHH) { char *topic = StringDup(cmd); char *path = strchr(topic, '!'); if (topic && path) { *path = '\0'; path++; // After the ! typedef HWND (WINAPI *HelpFn) (HWND, const char *, UINT, DWORD); HelpFn fnHHA = (HelpFn)::GetProcAddress(hHH, "HtmlHelpA"); if (fnHHA) { XHH_AKLINK ak; ak.cbStruct = sizeof(ak); ak.fReserved = FALSE; ak.pszKeywords = topic; ak.pszUrl = NULL; ak.pszMsgText = NULL; ak.pszMsgTitle = NULL; ak.pszWindow = NULL; ak.fIndexOnFail = TRUE; fnHHA(NULL, path, 0x000d, // HH_KEYWORD_LOOKUP reinterpret_cast(&ak) ); } } delete []topic; } } void SciTEWin::CopyAsRTF() { CharacterRange cr = GetSelection(); char *fileNameTemp = tmpnam(0); if (fileNameTemp) { SaveToRTF(fileNameTemp, cr.cpMin, cr.cpMax); FILE *fp = fopen(fileNameTemp, fileRead); if (fp) { fseek(fp, 0, SEEK_END); int len = ftell(fp); fseek(fp, 0, SEEK_SET); HGLOBAL hand = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, len + 1); if (hand) { ::OpenClipboard(MainHWND()); ::EmptyClipboard(); char *ptr = static_cast(::GlobalLock(hand)); fread(ptr, 1, len, fp); ptr[len] = '\0'; ::GlobalUnlock(hand); ::SetClipboardData(::RegisterClipboardFormat(CF_RTF), hand); ::CloseClipboard(); } fclose(fp); } unlink(fileNameTemp); } } void SciTEWin::FullScreenToggle() { HWND wTaskBar = FindWindow("Shell_TrayWnd", ""); fullScreen = !fullScreen; if (fullScreen) { ::SystemParametersInfo(SPI_GETWORKAREA, 0, &rcWorkArea, 0); ::SystemParametersInfo(SPI_SETWORKAREA, 0, 0, SPIF_SENDCHANGE); ::ShowWindow(wTaskBar, SW_HIDE); winPlace.length = sizeof(winPlace); ::GetWindowPlacement(MainHWND(), &winPlace); int topStuff = ::GetSystemMetrics(SM_CYCAPTION) + ::GetSystemMetrics(SM_CYEDGE); if (props.GetInt("full.screen.hides.menu")) topStuff += ::GetSystemMetrics(SM_CYMENU); ::SetWindowPos(MainHWND(), HWND_TOP, -::GetSystemMetrics(SM_CXSIZEFRAME) - 1, -topStuff - 2, ::GetSystemMetrics(SM_CXSCREEN) + 2 * ::GetSystemMetrics(SM_CXSIZEFRAME) + 2, ::GetSystemMetrics(SM_CYSCREEN) + topStuff + ::GetSystemMetrics(SM_CYSIZEFRAME) + 3, 0); } else { ::ShowWindow(wTaskBar, SW_SHOW); if (winPlace.length) { ::SystemParametersInfo(SPI_SETWORKAREA, 0, &rcWorkArea, 0); if (winPlace.showCmd == SW_SHOWMAXIMIZED) { ::ShowWindow(MainHWND(), SW_RESTORE); ::ShowWindow(MainHWND(), SW_SHOWMAXIMIZED); } else { ::SetWindowPlacement(MainHWND(), &winPlace); } } } ::SetForegroundWindow(MainHWND()); CheckMenus(); } HWND SciTEWin::MainHWND() { return reinterpret_cast(wSciTE.GetID()); } void SciTEWin::Command(WPARAM wParam, LPARAM lParam) { int cmdID = ControlIDOfCommand(wParam); if (wParam & 0x10000) { // From accelerator -> goes to focused pane. menuSource = 0; } switch (cmdID) { case IDM_SRCWIN: case IDM_RUNWIN: if (HIWORD(wParam) == SCEN_SETFOCUS) { wFocus = reinterpret_cast(lParam); CheckMenus(); } if (HIWORD(wParam) == SCEN_KILLFOCUS) { CheckMenus(); } break; case IDM_ACTIVATE: Activate(lParam); break; case IDM_FINISHEDEXECUTE: { executing = false; if (needReadProperties) ReadProperties(); CheckMenus(); for (int icmd = 0; icmd < commandMax; icmd++) { jobQueue[icmd].Clear(); } commandCurrent = 0; CheckReload(); } break; case IDM_ONTOP: topMost = (topMost ? false : true); ::SetWindowPos(MainHWND(), (topMost ? HWND_TOPMOST : HWND_NOTOPMOST ), 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE); CheckAMenuItem(IDM_ONTOP, topMost); break; case IDM_OPENFILESHERE: uniqueInstance.ToggleOpenFilesHere(); break; case IDM_FULLSCREEN: FullScreenToggle(); break; default: SciTEBase::MenuCommand(cmdID, menuSource); } } /** * Makes a long path from a given, possibly short path/file. * * The short path/file must exist, and if it is a file it must be fully specified * otherwise the function fails. * * sizeof @a longPath buffer must be a least _MAX_PATH * @returns true on success, and the long path in @a longPath buffer, * false on failure, and copies the @a shortPath arg to the @a longPath buffer. */ bool MakeLongPath(const char* shortPath, char* longPath) { // when we have pfnGetLong, we assume it never changes as kernel32 is always loaded static DWORD (STDAPICALLTYPE* pfnGetLong)(const char* lpszShortPath, char* lpszLongPath, DWORD cchBuffer) = NULL; static bool kernelTried = FALSE; bool ok = FALSE; if (!kernelTried) { HMODULE hModule; kernelTried = true; hModule = ::GetModuleHandleA("KERNEL32"); //assert(hModule != NULL); // must not call FreeLibrary on such handle // attempt to get GetLongPathName (implemented in Win98/2000 only!) (FARPROC&)pfnGetLong = ::GetProcAddress(hModule, "GetLongPathNameA"); } // the kernel GetLongPathName proc is faster and (hopefully) more reliable if (pfnGetLong != NULL) { // call kernel proc ok = (pfnGetLong)(shortPath, longPath, _MAX_PATH) != 0; } else { char short_path[_MAX_PATH]; // copy, so we can modify it char* tok; *longPath = '\0'; lstrcpyn(short_path, shortPath, _MAX_PATH); for (;;) { tok = strtok(short_path, "\\"); if (tok == NULL) break; if ((strlen(shortPath) > 3) && (shortPath[0] == '\\') && (shortPath[1] == '\\')) { // UNC, skip first seps strcat(longPath, "\\\\"); strcat(longPath, tok); strcat(longPath, "\\"); tok = strtok(NULL, "\\"); if (tok == NULL) break; } strcat(longPath, tok); bool isDir = false; for (;;) { WIN32_FIND_DATA fd; HANDLE hfind; char* tokend; tok = strtok(NULL, "\\"); if (tok == NULL) break; strcat(longPath, "\\"); tokend = longPath + strlen(longPath); // temporary add short component strcpy(tokend, tok); hfind = ::FindFirstFile(longPath, &fd); if (hfind == INVALID_HANDLE_VALUE) break; isDir = (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0; // finally add long component we got strcpy(tokend, fd.cFileName); ::FindClose(hfind); } ok = tok == NULL; if (ok && isDir) strcat(longPath, "\\"); break; } } if (!ok) { lstrcpyn(longPath, shortPath, _MAX_PATH); } return ok; } void SciTEWin::FixFilePath() { char longPath[_MAX_PATH]; // first try MakeLongPath which corrects the path and the case of filename too if (MakeLongPath(fullPath, longPath)) { strcpy(fullPath, longPath); char *cpDirEnd = strrchr(fullPath, pathSepChar); if (cpDirEnd) { strcpy(fileName, cpDirEnd + 1); strcpy(dirName, fullPath); dirName[cpDirEnd - fullPath] = '\0'; } } else { // On Windows file comparison is done case insensitively so the user can // enter scite.cxx and still open this file, SciTE.cxx. To ensure that the file // is saved with correct capitalisation FindFirstFile is used to find out the // real name of the file. WIN32_FIND_DATA FindFileData; HANDLE hFind = ::FindFirstFile(fullPath, &FindFileData); if (hFind != INVALID_HANDLE_VALUE) { // FindFirstFile found the file char *cpDirEnd = strrchr(fullPath, pathSepChar); if (cpDirEnd) { strcpy(fileName, FindFileData.cFileName); strcpy(dirName, fullPath); dirName[cpDirEnd - fullPath] = '\0'; strcpy(fullPath, dirName); strcat(fullPath, pathSepString); strcat(fullPath, fileName); } ::FindClose(hFind); } } } /** * Take a filename or relative path and put it at the end of the current path. * If the path is absolute, return the same path. */ void SciTEWin::AbsolutePath(char *absPath, const char *relativePath, int size) { // The runtime libraries for GCC and Visual C++ give different results for _fullpath // so use the OS. *absPath = '\0'; LPTSTR fileBit = 0; ::GetFullPathName(relativePath, size, absPath, &fileBit); //Platform::DebugPrintf("AbsolutePath: <%s> -> <%s>\n", relativePath, absPath); } /** * Run a command with redirected input and output streams * so the output can be put in a window. * It is based upon several usenet posts and a knowledge base article. */ DWORD SciTEWin::ExecuteOne(const Job &jobToRun, bool &seenOutput) { DWORD exitcode = 0; ElapsedTime commandTime; if (jobToRun.jobType == jobShell) { ShellExec(jobToRun.command, jobToRun.directory); return exitcode; } if (jobToRun.jobType == jobExtension) { if (extender) { // Problem: we are in the wrong thread! That is the cause of the cursed PC. // It could also lead to other problems. if (jobToRun.flags & jobGroupUndo) SendEditor(SCI_BEGINUNDOACTION); extender->OnExecute(jobToRun.command.c_str()); if (jobToRun.flags & jobGroupUndo) SendEditor(SCI_ENDUNDOACTION); Redraw(); // A Redraw "might" be needed, since Lua and Director // provide enough low-level capabilities to corrupt the // display. // (That might have been due to a race condition, and might now be // corrected by SingleThreadExtension. Should check it some time.) } return exitcode; } if (jobToRun.jobType == jobHelp) { ExecuteHelp(jobToRun.command.c_str()); return exitcode; } if (jobToRun.jobType == jobOtherHelp) { ExecuteOtherHelp(jobToRun.command.c_str()); return exitcode; } OSVERSIONINFO osv = {sizeof(OSVERSIONINFO), 0, 0, 0, 0, ""}; ::GetVersionEx(&osv); bool windows95 = osv.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS; SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), 0, 0}; char buffer[16384]; //Platform::DebugPrintf("Execute <%s>\n", command); OutputAppendStringSynchronised(">"); OutputAppendStringSynchronised(jobToRun.command.c_str()); OutputAppendStringSynchronised("\n"); sa.bInheritHandle = TRUE; sa.lpSecurityDescriptor = NULL; SECURITY_DESCRIPTOR sd; // If NT make a real security thing to allow inheriting handles if (!windows95) { ::InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION); ::SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE); sa.nLength = sizeof(SECURITY_ATTRIBUTES); sa.lpSecurityDescriptor = &sd; } HANDLE hPipeWrite = NULL; HANDLE hPipeRead = NULL; // Create pipe for output redirection // read handle, write handle, security attributes, number of bytes reserved for pipe - 0 default ::CreatePipe(&hPipeRead, &hPipeWrite, &sa, 0); //Platform::DebugPrintf("2Execute <%s>\n"); // Create pipe for input redirection. In this code, you do not // redirect the output of the child process, but you need a handle // to set the hStdInput field in the STARTUP_INFO struct. For safety, // you should not set the handles to an invalid handle. hWriteSubProcess = NULL; subProcessGroupId = 0; HANDLE hRead2 = NULL; // read handle, write handle, security attributes, number of bytes reserved for pipe - 0 default ::CreatePipe(&hRead2, &hWriteSubProcess, &sa, 0); ::SetHandleInformation(hPipeRead, HANDLE_FLAG_INHERIT, 0); ::SetHandleInformation(hWriteSubProcess, HANDLE_FLAG_INHERIT, 0); //Platform::DebugPrintf("3Execute <%s>\n"); // Make child process use hPipeWrite as standard out, and make // sure it does not show on screen. STARTUPINFO si = { sizeof(STARTUPINFO), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; si.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES; if (jobToRun.jobType == jobCLI) si.wShowWindow = SW_HIDE; else si.wShowWindow = SW_SHOW; si.hStdInput = hRead2; si.hStdOutput = hPipeWrite; si.hStdError = hPipeWrite; char startDirectory[_MAX_PATH]; startDirectory[0] = '\0'; AbsolutePath(startDirectory, jobToRun.directory.c_str(), _MAX_PATH); PROCESS_INFORMATION pi = {0, 0, 0, 0}; bool running = ::CreateProcess( NULL, const_cast(jobToRun.command.c_str()), NULL, NULL, TRUE, CREATE_NEW_PROCESS_GROUP, NULL, startDirectory[0] ? startDirectory : NULL, &si, &pi); if (running) { subProcessGroupId = pi.dwProcessId; bool cancelled = false; SString repSelBuf; DWORD timeDetectedDeath = 0; size_t totalBytesToWrite = 0; if (jobToRun.flags & jobHasInput) { totalBytesToWrite = jobToRun.input.length(); } if (totalBytesToWrite > 0 && !(jobToRun.flags & jobQuiet)) { SString input = jobToRun.input; input.substitute("\n", "\n>> "); OutputAppendStringSynchronised(">> "); OutputAppendStringSynchronised(input.c_str()); OutputAppendStringSynchronised("\n"); } unsigned writingPosition = 0; while (running) { if (writingPosition >= totalBytesToWrite) { ::Sleep(100L); } DWORD bytesRead = 0; DWORD bytesAvail = 0; if (!::PeekNamedPipe(hPipeRead, buffer, sizeof(buffer), &bytesRead, &bytesAvail, NULL)) { bytesAvail = 0; } if ((bytesAvail < 1000) && (hWriteSubProcess != INVALID_HANDLE_VALUE) && (writingPosition < totalBytesToWrite)) { // There is input to transmit to the process. Do it in small blocks, interleaved // with reads, so that our hRead buffer will not be overrun with results. size_t bytesToWrite = jobToRun.input.search("\n", writingPosition) + 1 - writingPosition; if ((bytesToWrite <= 0) || (writingPosition + bytesToWrite >= totalBytesToWrite)) { bytesToWrite = totalBytesToWrite - writingPosition; } if (bytesToWrite > 250) { bytesToWrite = 250; } DWORD bytesWrote = 0; int bTest = ::WriteFile(hWriteSubProcess, const_cast(jobToRun.input.c_str() + writingPosition), bytesToWrite, &bytesWrote, NULL); if (bTest) { if ((writingPosition + bytesToWrite) / 1024 > writingPosition / 1024) { // sleep occasionally, even when writing ::Sleep(100L); } writingPosition += bytesWrote; if (writingPosition >= totalBytesToWrite) { if (windows95) { // Write a Ctrl+Z to output to mark the end of the text char stop[] = "\032"; ::WriteFile(hWriteSubProcess, stop, static_cast(strlen(stop)), &bytesWrote, NULL); } ::CloseHandle(hWriteSubProcess); hWriteSubProcess = INVALID_HANDLE_VALUE; } } else { // Is this the right thing to do when writing to the pipe fails? ::CloseHandle(hWriteSubProcess); hWriteSubProcess = INVALID_HANDLE_VALUE; OutputAppendStringSynchronised("\n>Input pipe closed due to write failure.\n"); } } else if (bytesAvail > 0) { int bTest = ::ReadFile(hPipeRead, buffer, sizeof(buffer), &bytesRead, NULL); if (bTest && bytesRead) { if (jobToRun.flags & jobRepSelMask) { repSelBuf.append(buffer, bytesRead); } if (!(jobToRun.flags & jobQuiet)) { if (!seenOutput) { MakeOutputVisible(); seenOutput = true; } // Display the data OutputAppendStringSynchronised(buffer, bytesRead); } ::UpdateWindow(MainHWND()); } else { running = false; } } else { if (::GetExitCodeProcess(pi.hProcess, &exitcode)) { if (STILL_ACTIVE != exitcode) { if (windows95) { // Process is dead, but wait a second in case there is some output in transit if (timeDetectedDeath == 0) { timeDetectedDeath = ::GetTickCount(); } else { if ((::GetTickCount() - timeDetectedDeath) > static_cast(props.GetInt("win95.death.delay", 500))) { running = false; // It's a dead process } } } else { // NT, so dead already running = false; } } } } if (::InterlockedExchange(&cancelFlag, 0)) { if (WAIT_OBJECT_0 != ::WaitForSingleObject(pi.hProcess, 500)) { // We should use it only if the GUI process is stuck and // don't answer to a normal termination command. // This function is dangerous: dependant DLLs don't know the process // is terminated, and memory isn't released. OutputAppendStringSynchronised("\n>Process failed to respond; forcing abrupt termination...\n"); ::TerminateProcess(pi.hProcess, 1); } running = false; cancelled = true; } } if (WAIT_OBJECT_0 != ::WaitForSingleObject(pi.hProcess, 1000)) { OutputAppendStringSynchronised("\n>Process failed to respond; forcing abrupt termination..."); ::TerminateProcess(pi.hProcess, 2); } ::GetExitCodeProcess(pi.hProcess, &exitcode); SString sExitMessage(exitcode); sExitMessage.insert(0, ">Exit code: "); if (timeCommands) { sExitMessage += " Time: "; sExitMessage += SString(commandTime.Duration(), 3); } sExitMessage += "\n"; OutputAppendStringSynchronised(sExitMessage.c_str()); GoMessage(1); ::CloseHandle(pi.hProcess); ::CloseHandle(pi.hThread); if (!cancelled) { bool doRepSel = false; if (jobToRun.flags & jobRepSelYes) doRepSel = true; else if (jobToRun.flags & jobRepSelAuto) doRepSel = (0 == exitcode); if (doRepSel) { SendEditor(SCI_REPLACESEL,0,(sptr_t)(repSelBuf.c_str())); } } WarnUser(warnExecuteOK); } else { DWORD nRet = ::GetLastError(); LPTSTR lpMsgBuf = NULL; ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, nRet, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language reinterpret_cast(&lpMsgBuf), 0, NULL ); OutputAppendStringSynchronised(">"); OutputAppendStringSynchronised(lpMsgBuf); ::LocalFree(lpMsgBuf); WarnUser(warnExecuteKO); } ::CloseHandle(hPipeRead); ::CloseHandle(hPipeWrite); ::CloseHandle(hRead2); ::CloseHandle(hWriteSubProcess); hWriteSubProcess = NULL; subProcessGroupId = 0; return exitcode; } /** * Run the commands in the job queue, stopping if one fails. */ void SciTEWin::ProcessExecute() { DWORD exitcode = 0; if (scrollOutput) SendOutput(SCI_GOTOPOS, SendOutput(SCI_GETTEXTLENGTH)); int originalEnd = SendOutput(SCI_GETCURRENTPOS); bool seenOutput = false; for (int icmd = 0; icmd < commandCurrent && icmd < commandMax && exitcode == 0; icmd++) { exitcode = ExecuteOne(jobQueue[icmd], seenOutput); if (isBuilding) { // The build command is first command in a sequence so it is only built if // that command succeeds not if a second returns after document is modified. isBuilding = false; if (exitcode == 0) isBuilt = true; } } // Move selection back to beginning of this run so that F4 will go // to first error of this run. // scroll and return only if output.scroll equals // one in the properties file if (props.GetInt("output.scroll", 1) == 1 && returnOutputToCommand) SendOutputEx(SCI_GOTOPOS, originalEnd, 0, false); returnOutputToCommand = true; ::SendMessage(MainHWND(), WM_COMMAND, IDM_FINISHEDEXECUTE, 0); } void ExecThread(void *ptw) { SciTEWin *tw = reinterpret_cast(ptw); tw->ProcessExecute(); } struct ShellErr { DWORD code; const char *descr; }; void SciTEWin::ShellExec(const SString &cmd, const SString &dir) { char *mycmd; // guess if cmd is an executable, if this succeeds it can // contain spaces without enclosing it with " char *mycmdcopy = StringDup(cmd.c_str()); strlwr(mycmdcopy); char *mycmd_end = NULL; char *myparams = NULL; char *s = strstr(mycmdcopy, ".exe"); if (s == NULL) s = strstr(mycmdcopy, ".cmd"); if (s == NULL) s = strstr(mycmdcopy, ".bat"); if (s == NULL) s = strstr(mycmdcopy, ".com"); if ((s != NULL) && ((*(s + 4) == '\0') || (*(s + 4) == ' '))) { int len_mycmd = s - mycmdcopy + 4; delete []mycmdcopy; mycmdcopy = StringDup(cmd.c_str()); mycmd = mycmdcopy; mycmd_end = mycmdcopy + len_mycmd; } else { delete []mycmdcopy; mycmdcopy = StringDup(cmd.c_str()); if (*mycmdcopy != '"') { // get next space to separate cmd and parameters mycmd_end = strchr(mycmdcopy, ' '); mycmd = mycmdcopy; } else { // the cmd is surrounded by ", so it can contain spaces, but we must // strip the " for ShellExec mycmd = mycmdcopy + 1; char *s = strchr(mycmdcopy + 1, '"'); if (s != NULL) { *s = '\0'; mycmd_end = s + 1; } } } if ((mycmd_end != NULL) && (*mycmd_end != '\0')) { *mycmd_end = '\0'; // test for remaining params after cmd, they may be surrounded by " but // we give them as-is to ShellExec ++mycmd_end; while (*mycmd_end == ' ') ++mycmd_end; if (*mycmd_end != '\0') myparams = mycmd_end; } uptr_t rc = reinterpret_cast( ::ShellExecute( MainHWND(), // parent wnd for msgboxes during app start NULL, // cmd is open mycmd, // file to open myparams, // parameters dir.c_str(), // launch directory SW_SHOWNORMAL)); //default show cmd if (rc > 32) { // it worked! delete []mycmdcopy; return; } const int numErrcodes = 15; static const ShellErr field[numErrcodes] = { { 0, "The operating system is out of memory or resources." }, { ERROR_FILE_NOT_FOUND, "The specified file was not found." }, { ERROR_PATH_NOT_FOUND, "The specified path was not found." }, { ERROR_BAD_FORMAT, "The .exe file is invalid (non-Win32\256 .exe or error in .exe image)." }, { SE_ERR_ACCESSDENIED, "The operating system denied access to the specified file." }, { SE_ERR_ASSOCINCOMPLETE, "The file name association is incomplete or invalid." }, { SE_ERR_DDEBUSY, "The DDE transaction could not be completed because other DDE transactions were being processed." }, { SE_ERR_DDEFAIL, "The DDE transaction failed." }, { SE_ERR_DDETIMEOUT, "The DDE transaction could not be completed because the request timed out." }, { SE_ERR_DLLNOTFOUND, "The specified dynamic-link library was not found." }, { SE_ERR_FNF, "The specified file was not found." }, { SE_ERR_NOASSOC, "There is no application associated with the given file name extension." }, { SE_ERR_OOM, "There was not enough memory to complete the operation." }, { SE_ERR_PNF, "The specified path was not found." }, { SE_ERR_SHARE, "A sharing violation occurred." }, }; int i; for (i = 0; i < numErrcodes; ++i) { if (field[i].code == rc) break; } SString errormsg("Error while launching:\n\""); errormsg += mycmdcopy; if (myparams != NULL) { errormsg += "\" with Params:\n\""; errormsg += myparams; } errormsg += "\"\n"; if (i < numErrcodes) { errormsg += field[i].descr; } else { errormsg += "Unknown error code: "; errormsg += SString(rc); } WindowMessageBox(wSciTE, errormsg, MB_OK); delete []mycmdcopy; } void SciTEWin::Execute() { SciTEBase::Execute(); _beginthread(ExecThread, 1024 * 1024, reinterpret_cast(this)); } void SciTEWin::StopExecute() { if (hWriteSubProcess && (hWriteSubProcess != INVALID_HANDLE_VALUE)) { char stop[] = "\032"; DWORD bytesWrote = 0; ::WriteFile(hWriteSubProcess, stop, static_cast(strlen(stop)), &bytesWrote, NULL); Sleep(500L); } #ifdef USE_CONSOLE_EVENT if (subProcessGroupId) { // this also doesn't work OutputAppendStringSynchronised("\n>Attempting to cancel process..."); if (!GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, subProcessGroupId)) { LONG errCode = GetLastError(); OutputAppendStringSynchronised("\n>BREAK Failed "); OutputAppendStringSynchronised(SString(errCode).c_str()); OutputAppendStringSynchronised("\n"); } Sleep(100L); } #endif ::InterlockedExchange(&cancelFlag, 1L); } void SciTEWin::AddCommand(const SString &cmd, const SString &dir, JobSubsystem jobType, const SString &input, int flags) { if (cmd.length()) { if ((jobType == jobShell) && ((flags & jobForceQueue) == 0)) { SString pCmd = cmd; parameterisedCommand = ""; if (pCmd[0] == '*') { pCmd.remove(0); parameterisedCommand = pCmd; if (!ParametersDialog(true)) { return; } } else { ParamGrab(); } pCmd = props.Expand(pCmd.c_str()); ShellExec(pCmd, dir); } else { SciTEBase::AddCommand(cmd, dir, jobType, input, flags); } } } void SciTEWin::QuitProgram() { if (SaveIfUnsureAll() != IDCANCEL) { if (fullScreen) // Ensure tray visible on exit FullScreenToggle(); ::PostQuitMessage(0); wSciTE.Destroy(); } } void SciTEWin::CreateUI() { int left = props.GetInt("position.left", CW_USEDEFAULT); int top = props.GetInt("position.top", CW_USEDEFAULT); int width = props.GetInt("position.width", CW_USEDEFAULT); int height = props.GetInt("position.height", CW_USEDEFAULT); if (width == -1 || height == -1) { cmdShow = SW_MAXIMIZE; width = CW_USEDEFAULT; height = CW_USEDEFAULT; } if (props.GetInt("position.tile") && ::FindWindow("SciTEWindow", NULL) && (left != static_cast(CW_USEDEFAULT))) { left += width; } // Pass 'this' pointer in lpParam of CreateWindow(). wSciTE = ::CreateWindowEx( 0, className, windowName.c_str(), WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CLIPCHILDREN, left, top, width, height, NULL, NULL, hInstance, reinterpret_cast(this)); if (!wSciTE.Created()) exit(FALSE); LocaliseMenus(); LocaliseAccelerators(); SString pageSetup = props.Get("print.margins"); char val[32]; char *ps = StringDup(pageSetup.c_str()); const char *next = GetNextPropItem(ps, val, 32); pagesetupMargin.left = atol(val); next = GetNextPropItem(next, val, 32); pagesetupMargin.right = atol(val); next = GetNextPropItem(next, val, 32); pagesetupMargin.top = atol(val); GetNextPropItem(next, val, 32); pagesetupMargin.bottom = atol(val); delete []ps; UIAvailable(); } static bool IsASpace(int ch) { return (ch == ' ') || (ch == '\t'); } /** * Break up the command line into individual arguments and strip double quotes * from each argument. * @return A string with each argument separated by '\n'. */ SString SciTEWin::ProcessArgs(const char *cmdLine) { SString args; const char *startArg = cmdLine; while (*startArg) { while (IsASpace(*startArg)) { startArg++; } const char *endArg = startArg; if (*startArg == '"') { // Opening double-quote startArg++; endArg = startArg; while (*endArg && *endArg != '\"') { endArg++; } } else { // No double-quote, end of argument on first space while (*endArg && !IsASpace(*endArg)) { endArg++; } } SString arg(startArg, 0, endArg - startArg); args.appendwithseparator(arg.c_str(), '\n'); startArg = endArg; // On a space or a double-quote, or on the end of the command line if (*startArg) { startArg++; } } return args; } /** * Process the command line, check for other instance wanting to open files, * create the SciTE window, perform batch processing (print) or transmit command line * to other instance and exit or just show the window and open files. */ void SciTEWin::Run(const char *cmdLine) { // Break up the command line into individual arguments SString args = ProcessArgs(cmdLine); // Read the command line parameters: // In case the check.if.already.open property has been set or reset on the command line, // we still get a last chance to force checking or to open a separate instance; // Check if the user just want to print the file(s). // Don't process files yet. bool bBatchProcessing = ProcessCommandLine(args, 0); // No need to check for other instances when doing a batch job: // perform some tasks and exit immediately. if (!bBatchProcessing && props.GetInt("check.if.already.open") != 0) { uniqueInstance.CheckOtherInstance(); } // We create the window, so it can be found by EnumWindows below, // and the Scintilla control is thus created, allowing to print the file(s). // We don't show it yet, so if it is destroyed (duplicate instance), it will // not flash on the taskbar or on the display. CreateUI(); if (bBatchProcessing) { // Reprocess the command line and read the files ProcessCommandLine(args, 1); Print(false); // Don't ask user for print parameters // Done, we exit the program ::PostQuitMessage(0); wSciTE.Destroy(); return; } if (props.GetInt("check.if.already.open") != 0 && uniqueInstance.FindOtherInstance()) { uniqueInstance.SendCommands(cmdLine); // Kill itself, leaving room to the previous instance ::PostQuitMessage(0); wSciTE.Destroy(); return; // Don't do anything else } // OK, the instance will be displayed SizeSubWindows(); wSciTE.Show(); if (cmdShow) { // assume SW_MAXIMIZE only ::ShowWindow(MainHWND(), cmdShow); } // Open all files given on command line. // The filenames containing spaces must be enquoted. // In case of not using buffers they get closed immediately except // the last one, but they move to the MRU file list ProcessCommandLine(args, 1); Redraw(); } /** * Draw the split bar. */ void SciTEWin::Paint(Surface *surfaceWindow, PRectangle) { PRectangle rcInternal = GetClientRectangle(); //surfaceWindow->FillRectangle(rcInternal, Colour(0xff,0x80,0x80)); int heightClient = rcInternal.Height(); int widthClient = rcInternal.Width(); int heightEditor = heightClient - heightOutput - heightBar; int yBorder = heightEditor; int xBorder = widthClient - heightOutput - heightBar; for (int i = 0; i < heightBar; i++) { if (i == 1) surfaceWindow->PenColour(GetSysColor(COLOR_3DHIGHLIGHT)); else if (i == heightBar - 2) surfaceWindow->PenColour(GetSysColor(COLOR_3DSHADOW)); else if (i == heightBar - 1) surfaceWindow->PenColour(GetSysColor(COLOR_3DDKSHADOW)); else surfaceWindow->PenColour(GetSysColor(COLOR_3DFACE)); if (splitVertical) { surfaceWindow->MoveTo(xBorder + i, 0); surfaceWindow->LineTo(xBorder + i, heightClient); } else { surfaceWindow->MoveTo(0, yBorder + i); surfaceWindow->LineTo(widthClient, yBorder + i); } } } void SciTEWin::AboutDialog() { #ifdef STATIC_BUILD AboutDialogWithBuild(1); #else AboutDialogWithBuild(0); #endif } /** * Open files dropped on the SciTE window. */ void SciTEWin::DropFiles(HDROP hdrop) { // If drag'n'drop inside the SciTE window but outside // Scintilla, hdrop is null, and an exception is generated! if (hdrop) { int filesDropped = ::DragQueryFile(hdrop, 0xffffffff, NULL, 0); for (int i = 0; i < filesDropped; ++i) { char pathDropped[MAX_PATH]; ::DragQueryFile(hdrop, i, pathDropped, sizeof(pathDropped)); if (!Open(pathDropped)) { break; } } ::DragFinish(hdrop); // Put SciTE to forefront // May not work for Win2k, but OK for lower versions // Note: how to drop a file to an iconic window? // Actually, it is the Send To command that generates a drop. if (::IsIconic(MainHWND())) { ::ShowWindow(MainHWND(), SW_RESTORE); } ::SetForegroundWindow(MainHWND()); } } /** * Handle simple wild-card file patterns and directory requests. */ bool SciTEWin::PreOpenCheck(const char *arg) { bool isHandled = false; HANDLE hFFile; WIN32_FIND_DATA ffile; DWORD fileattributes = ::GetFileAttributes(arg); char filename[MAX_PATH]; int nbuffers = props.GetInt("buffers"); if (fileattributes != (DWORD) -1) { // arg is an existing directory or filename // if the command line argument is a directory, use OpenDialog() if (fileattributes & FILE_ATTRIBUTE_DIRECTORY) { strcpy(dirName, arg); OpenDialog(); isHandled = true; } } else if (nbuffers > 1 && (hFFile = ::FindFirstFile(arg, &ffile)) != INVALID_HANDLE_VALUE) { // If several buffers is accepted and the arg is a filename pattern matching at least an existing file isHandled = true; strcpy(filename, arg); char *lastslash; if (NULL == (lastslash = strrchr(filename, '\\'))) lastslash = filename; // No path else lastslash++; // Open files matching the given pattern until no more files or all available buffers are exhausted do { if (!(ffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { // Skip directories strcpy(lastslash, ffile.cFileName); Open(filename); --nbuffers; } } while (nbuffers > 0 && ::FindNextFile(hFFile, &ffile)); ::FindClose(hFFile); } else { const char *lastslash = strrchr(arg, '\\'); const char *lastdot = strrchr(arg, '.'); // if the filename is only an extension, open the dialog box with it as the extension filter if (lastslash && lastdot && lastslash == lastdot - 1 || !lastslash && lastdot == arg) { isHandled = true; if (lastslash) { // the arg contains a path, so copy that part to dirName strncpy(dirName, arg, lastslash - arg + 1); dirName[lastslash - arg + 1] = '\0'; } else { strcpy(dirName, ".\\"); } strcpy(filename, "*"); strcat(filename, lastdot); strcat(filename, "|"); strcat(filename, "*"); strcat(filename, lastdot); OpenDialog(filename); } else if (!lastdot || lastslash && lastdot < lastslash) { // if the filename has no extension, try to match a file with list of standard extensions SString extensions = props.GetExpanded("source.default.extensions"); if (extensions.length()) { strcpy(filename, arg); char *endfilename = filename + strlen(filename); extensions.substitute('|', '\0'); size_t start = 0; while (start < extensions.length()) { const char *filterName = extensions.c_str() + start; strcpy(endfilename, filterName); if (::GetFileAttributes(filename) != (DWORD) -1) { isHandled = true; Open(filename); break; // Found! } else { // Next extension start += strlen(extensions.c_str() + start) + 1; } } } } } return isHandled; } void SciTEWin::MinimizeToTray() { char n[64] = "sdlBasicSciTE"; NOTIFYICONDATA nid; memset(&nid, 0, sizeof(nid)); nid.cbSize = sizeof(nid); nid.hWnd = MainHWND(); nid.uID = 1; nid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP; nid.uCallbackMessage = SCITE_TRAY; nid.hIcon = static_cast( ::LoadImage(hInstance, "SCITE", IMAGE_ICON, 16, 16, LR_DEFAULTSIZE)); strcpy(nid.szTip, n); ::ShowWindow(MainHWND(), SW_MINIMIZE); if (::Shell_NotifyIcon(NIM_ADD, &nid)) { ::ShowWindow(MainHWND(), SW_HIDE); } } void SciTEWin::RestoreFromTray() { NOTIFYICONDATA nid; memset(&nid, 0, sizeof(nid)); nid.cbSize = sizeof(nid); nid.hWnd = MainHWND(); nid.uID = 1; ::ShowWindow(MainHWND(), SW_SHOW); ::Sleep(100); ::Shell_NotifyIcon(NIM_DELETE, &nid); } #ifndef VK_OEM_2 static const int VK_OEM_2=0xbf; static const int VK_OEM_3=0xc0; static const int VK_OEM_4=0xdb; static const int VK_OEM_5=0xdc; static const int VK_OEM_6=0xdd; #endif #ifndef VK_OEM_PLUS static const int VK_OEM_PLUS=0xbb; #endif inline bool KeyMatch(const SString &sKey, int keyval, int modifiers) { return SciTEKeys::MatchKeyCode( SciTEKeys::ParseKeyCode(sKey.c_str()), keyval, modifiers); } LRESULT SciTEWin::KeyDown(WPARAM wParam) { // Look through lexer menu int modifiers = (Platform::IsKeyDown(VK_SHIFT) ? SCMOD_SHIFT : 0) | (Platform::IsKeyDown(VK_CONTROL) ? SCMOD_CTRL : 0) | (Platform::IsKeyDown(VK_MENU) ? SCMOD_ALT : 0); for (int j = 0; j < languageItems; j++) { if (KeyMatch(languageMenu[j].menuKey, wParam, modifiers)) { SciTEBase::MenuCommand(IDM_LANGUAGE + j); return 1l; } } // loop through the Tools menu's active commands. HMENU hMenu = ::GetMenu(MainHWND()); HMENU hToolsMenu = ::GetSubMenu(hMenu, menuTools); for (int tool_i = 0; tool_i < toolMax; ++tool_i) { MENUITEMINFO mii; mii.cbSize = sizeof(MENUITEMINFO); mii.fMask = MIIM_DATA; if (::GetMenuItemInfo(hToolsMenu, IDM_TOOLS+tool_i, FALSE, &mii) && mii.dwItemData) { if (SciTEKeys::MatchKeyCode(reinterpret_cast(mii.dwItemData), wParam, modifiers)) { SciTEBase::MenuCommand(IDM_TOOLS+tool_i); return 1l; } } } // loop through the keyboard short cuts defined by user.. if found // exec it the command defined for (int cut_i = 0; cut_i < shortCutItems; cut_i++) { if (KeyMatch(shortCutItemList[cut_i].menuKey, wParam, modifiers)) { int commandNum = SciTEBase::GetMenuCommandAsInt(shortCutItemList[cut_i].menuCommand); if (commandNum != -1) { // its possible that the command is for scintilla directly // all scintilla commands are larger then 2000 if (commandNum < 2000) { SciTEBase::MenuCommand(commandNum); } else { SciTEBase::SendFocused(commandNum); } return 1l; } } } return 0l; } LRESULT SciTEWin::KeyUp(WPARAM) { return 0l; } void SciTEWin::AddToPopUp(const char *label, int cmd, bool enabled) { SString localised = LocaliseString(label); HMENU menu = reinterpret_cast(popup.GetID()); if (0 == localised.length()) ::AppendMenu(menu, MF_SEPARATOR, 0, ""); else if (enabled) ::AppendMenu(menu, MF_STRING, cmd, localised.c_str()); else ::AppendMenu(menu, MF_STRING | MF_DISABLED | MF_GRAYED, cmd, localised.c_str()); } LRESULT SciTEWin::ContextMenuMessage(UINT iMessage, WPARAM wParam, LPARAM lParam) { Window w = wEditor; Point pt = Point::FromLong(lParam); if ((pt.x == -1) && (pt.y == -1)) { // Caused by keyboard so display menu near caret if (wOutput.HasFocus()) w = wOutput; int position = SendFocused(SCI_GETCURRENTPOS); pt.x = SendFocused(SCI_POINTXFROMPOSITION, 0, position); pt.y = SendFocused(SCI_POINTYFROMPOSITION, 0, position); POINT spt = {pt.x, pt.y}; ::ClientToScreen(static_cast(w.GetID()), &spt); pt = Point(spt.x, spt.y); } else { PRectangle rcEditor = wEditor.GetPosition(); if (!rcEditor.Contains(pt)) { PRectangle rcOutput = wOutput.GetPosition(); if (rcOutput.Contains(pt)) { w = wOutput; } else { // In frame so use default. return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); } } } menuSource = ::GetDlgCtrlID(reinterpret_cast(w.GetID())); ContextMenu(w, pt, wSciTE); return 0; } LRESULT SciTEWin::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { //Platform::DebugPrintf("start wnd proc %x %x\n",iMessage, MainHWND()); LRESULT uim = uniqueInstance.CheckMessage(iMessage, wParam, lParam); if (uim != 0) { return uim; } switch (iMessage) { case WM_CREATE: Creation(); break; case WM_COMMAND: Command(wParam, lParam); break; case WM_CONTEXTMENU: return ContextMenuMessage(iMessage, wParam, lParam); case WM_ENTERMENULOOP: if (!wParam) menuSource = 0; break; case WM_SYSCOMMAND: if ((wParam == SC_MINIMIZE) && props.GetInt("minimize.to.tray")) { MinimizeToTray(); return 0; } return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); case SCITE_TRAY: if (lParam == WM_LBUTTONDBLCLK) { RestoreFromTray(); ::ShowWindow(MainHWND(), SW_RESTORE); ::FlashWindow(MainHWND(), FALSE); } break; case WM_NOTIFY: Notify(reinterpret_cast(lParam)); break; case WM_KEYDOWN: return KeyDown(wParam); case WM_KEYUP: return KeyUp(wParam); case WM_SIZE: //Platform::DebugPrintf("size %d %x %x\n",iMessage, wParam, lParam); if (wParam != 1) SizeSubWindows(); break; case WM_MOVE: SendEditor(SCI_CALLTIPCANCEL); break; case WM_GETMINMAXINFO: { MINMAXINFO *pmmi = reinterpret_cast(lParam); if (fullScreen) { // Last constants for both x and y are just fiddles - don't know why they are needed pmmi->ptMaxSize.x = ::GetSystemMetrics(SM_CXSCREEN) + 2 * ::GetSystemMetrics(SM_CXSIZEFRAME) + 2; pmmi->ptMaxSize.y = ::GetSystemMetrics(SM_CYSCREEN) + ::GetSystemMetrics(SM_CYCAPTION) + ::GetSystemMetrics(SM_CYMENU) + 2 * ::GetSystemMetrics(SM_CYSIZEFRAME) + 3; pmmi->ptMaxTrackSize.x = pmmi->ptMaxSize.x; pmmi->ptMaxTrackSize.y = pmmi->ptMaxSize.y; return 0; } else { return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); } } case WM_INITMENU: CheckMenus(); break; case WM_CLOSE: QuitProgram(); return 0; case WM_DESTROY: break; case WM_SETTINGCHANGE: //Platform::DebugPrintf("** Setting Changed\n"); SendEditor(WM_SETTINGCHANGE, wParam, lParam); SendOutput(WM_SETTINGCHANGE, wParam, lParam); break; case WM_SYSCOLORCHANGE: //Platform::DebugPrintf("** Color Changed\n"); SendEditor(WM_SYSCOLORCHANGE, wParam, lParam); SendOutput(WM_SYSCOLORCHANGE, wParam, lParam); break; case WM_PALETTECHANGED: //Platform::DebugPrintf("** Palette Changed\n"); if (wParam != reinterpret_cast(MainHWND())) { SendEditor(WM_PALETTECHANGED, wParam, lParam); //SendOutput(WM_PALETTECHANGED, wParam, lParam); } break; case WM_QUERYNEWPALETTE: //Platform::DebugPrintf("** Query palette\n"); SendEditor(WM_QUERYNEWPALETTE, wParam, lParam); //SendOutput(WM_QUERYNEWPALETTE, wParam, lParam); return TRUE; case WM_ACTIVATEAPP: SendEditor(SCI_HIDESELECTION, !wParam); // Do not want to display dialog yet as may be in middle of system mouse capture ::PostMessage(MainHWND(), WM_COMMAND, IDM_ACTIVATE, wParam); break; case WM_ACTIVATE: //Platform::DebugPrintf("Focus: w:%x l:%x %x e=%x o=%x\n", wParam, lParam, ::GetFocus(), wEditor.GetID(), wOutput.GetID()); if (wParam != WA_INACTIVE) { ::SetFocus(wFocus); } break; case WM_DROPFILES: DropFiles(reinterpret_cast(wParam)); break; case WM_COPYDATA: return uniqueInstance.CopyData(reinterpret_cast(lParam)); default: //Platform::DebugPrintf("default wnd proc %x %d %d\n",iMessage, wParam, lParam); return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); } //Platform::DebugPrintf("end wnd proc\n"); return 0l; } // Take care of 32/64 bit pointers #ifdef GetWindowLongPtr static void *PointerFromWindow(HWND hWnd) { return reinterpret_cast(::GetWindowLongPtr(hWnd, 0)); } static void SetWindowPointer(HWND hWnd, void *ptr) { ::SetWindowLongPtr(hWnd, 0, reinterpret_cast(ptr)); } #else static void *PointerFromWindow(HWND hWnd) { return reinterpret_cast(::GetWindowLong(hWnd, 0)); } static void SetWindowPointer(HWND hWnd, void *ptr) { ::SetWindowLong(hWnd, 0, reinterpret_cast(ptr)); } #endif LRESULT PASCAL SciTEWin::TWndProc( HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) { //Platform::DebugPrintf("W:%x M:%d WP:%x L:%x\n", hWnd, iMessage, wParam, lParam); // Find C++ object associated with window. SciTEWin *scite = reinterpret_cast(PointerFromWindow(hWnd)); // scite will be zero if WM_CREATE not seen yet if (scite == 0) { if (iMessage == WM_CREATE) { LPCREATESTRUCT cs = reinterpret_cast(lParam); scite = reinterpret_cast(cs->lpCreateParams); scite->wSciTE = hWnd; SetWindowPointer(hWnd, scite); return scite->WndProc(iMessage, wParam, lParam); } else return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } else return scite->WndProc(iMessage, wParam, lParam); } LRESULT SciTEWin::WndProcI(UINT iMessage, WPARAM wParam, LPARAM lParam) { switch (iMessage) { case WM_COMMAND: Command(wParam, lParam); break; case WM_NOTIFY: Notify(reinterpret_cast(lParam)); break; case WM_PAINT: { PAINTSTRUCT ps; ::BeginPaint(reinterpret_cast(wContent.GetID()), &ps); Surface *surfaceWindow = Surface::Allocate(); if (surfaceWindow) { surfaceWindow->Init(ps.hdc, wContent.GetID()); PRectangle rcPaint(ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom); Paint(surfaceWindow, rcPaint); surfaceWindow->Release(); delete surfaceWindow; } ::EndPaint(reinterpret_cast(wContent.GetID()), &ps); return 0; } case WM_LBUTTONDOWN: ptStartDrag = Point::FromLong(lParam); capturedMouse = true; heightOutputStartDrag = heightOutput; ::SetCapture(reinterpret_cast(wContent.GetID())); //Platform::DebugPrintf("Click %x %x\n", wParam, lParam); break; case WM_MOUSEMOVE: if (capturedMouse) { MoveSplit(Point::FromLong(lParam)); } break; case WM_LBUTTONUP: if (capturedMouse) { MoveSplit(Point::FromLong(lParam)); capturedMouse = false; ::ReleaseCapture(); } break; case WM_CAPTURECHANGED: capturedMouse = false; break; case WM_SETCURSOR: if (ControlIDOfCommand(lParam) == HTCLIENT) { Point ptCursor; ::GetCursorPos(reinterpret_cast(&ptCursor)); Point ptClient = ptCursor; ::ScreenToClient(MainHWND(), reinterpret_cast(&ptClient)); if ((ptClient.y > (visHeightTools + visHeightTab)) && (ptClient.y < visHeightTools + visHeightTab + visHeightEditor)) { PRectangle rcScintilla = wEditor.GetPosition(); PRectangle rcOutput = wOutput.GetPosition(); if (!rcScintilla.Contains(ptCursor) && !rcOutput.Contains(ptCursor)) { wSciTE.SetCursor(splitVertical ? Window::cursorHoriz : Window::cursorVert); return TRUE; } } } return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); default: //Platform::DebugPrintf("default wnd proc %x %d %d\n",iMessage, wParam, lParam); return ::DefWindowProc(reinterpret_cast(wContent.GetID()), iMessage, wParam, lParam); } //Platform::DebugPrintf("end wnd proc\n"); return 0l; } LRESULT PASCAL SciTEWin::IWndProc( HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) { //Platform::DebugPrintf("W:%x M:%d WP:%x L:%x\n", hWnd, iMessage, wParam, lParam); // Find C++ object associated with window. SciTEWin *scite = reinterpret_cast(::PointerFromWindow(hWnd)); // scite will be zero if WM_CREATE not seen yet if (scite == 0) { if (iMessage == WM_CREATE) { LPCREATESTRUCT cs = reinterpret_cast(lParam); scite = reinterpret_cast(cs->lpCreateParams); scite->wContent = hWnd; SetWindowPointer(hWnd, scite); return scite->WndProcI(iMessage, wParam, lParam); } else return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } else return scite->WndProcI(iMessage, wParam, lParam); } // IsNT() did not work on my machine... :-( // I found that Platform_Initialise() was never called bool IsWindowsNT() { OSVERSIONINFO osv = {sizeof(OSVERSIONINFO), 0, 0, 0, 0, ""}; ::GetVersionEx(&osv); return (osv.dwPlatformId == VER_PLATFORM_WIN32_NT); } // from ScintillaWin.cxx static UINT CodePageFromCharSet(DWORD characterSet, UINT documentCodePage) { CHARSETINFO ci = { 0, 0, { { 0, 0, 0, 0 }, { 0, 0 } } }; BOOL bci = ::TranslateCharsetInfo((DWORD*)characterSet, &ci, TCI_SRCCHARSET); UINT cp; if (bci) cp = ci.ciACP; else cp = documentCodePage; CPINFO cpi; if (!::IsValidCodePage(cp) && !::GetCPInfo(cp, &cpi)) cp = CP_ACP; return cp; } // On NT, convert String from UTF-8 to doc encoding SString SciTEWin::EncodeString(const SString &s) { //::MessageBox(GetFocus(),SString(s).c_str(),"EncodeString:in",0); if (IsWindowsNT()) { UINT codePage = SendEditor(SCI_GETCODEPAGE); if (codePage != SC_CP_UTF8) { DWORD charSet = props.GetInt("character.set", DEFAULT_CHARSET); codePage = CodePageFromCharSet(charSet, codePage); int cchWide = ::MultiByteToWideChar(CP_UTF8, 0, s.c_str(), s.length(), NULL, 0); wchar_t *pszWide = new wchar_t[cchWide + 1]; ::MultiByteToWideChar(CP_UTF8, 0, s.c_str(), s.length(), pszWide, cchWide + 1); int cchMulti = ::WideCharToMultiByte(codePage, 0, pszWide, cchWide, NULL, 0, NULL, NULL); char *pszMulti = new char[cchMulti + 1]; ::WideCharToMultiByte(codePage, 0, pszWide, cchWide, pszMulti, cchMulti + 1, NULL, NULL); pszMulti[cchMulti] = 0; SString result(pszMulti); delete []pszWide; delete []pszMulti; //::MessageBox(GetFocus(),result.c_str(),"EncodeString:out",0); return result; } } return SciTEBase::EncodeString(s); } // On NT, convert String from doc encoding to UTF-8 SString SciTEWin::GetRangeInUIEncoding(Window &win, int selStart, int selEnd) { SString s = SciTEBase::GetRangeInUIEncoding(win, selStart, selEnd); //::MessageBox(GetFocus(),s.c_str(),"GetRangeInUIEncoding:in",0); if (IsWindowsNT()) { UINT codePage = SendEditor(SCI_GETCODEPAGE); if (codePage != SC_CP_UTF8) { DWORD charSet = props.GetInt("character.set", DEFAULT_CHARSET); codePage = CodePageFromCharSet(charSet, codePage); int cchWide = ::MultiByteToWideChar(codePage, 0, s.c_str(), s.length(), NULL, 0); wchar_t *pszWide = new wchar_t[cchWide + 1]; ::MultiByteToWideChar(codePage, 0, s.c_str(), s.length(), pszWide, cchWide + 1); int cchMulti = ::WideCharToMultiByte(CP_UTF8, 0, pszWide, cchWide, NULL, 0, NULL, NULL); char *pszMulti = new char[cchMulti + 1]; ::WideCharToMultiByte(CP_UTF8, 0, pszWide, cchWide, pszMulti, cchMulti + 1, NULL, NULL); pszMulti[cchMulti] = 0; SString result(pszMulti); delete []pszWide; delete []pszMulti; //::MessageBox(GetFocus(),result.c_str(),"GetRangeInUIEncoding:out",0); return result; } } return s; } int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int) { #ifdef NO_EXTENSIONS Extension *extender = 0; #else MultiplexExtension multiExtender; Extension *extender = &multiExtender; //#ifndef NO_LUA // SingleThreadExtension luaAdapter(LuaExtension::Instance()); // multiExtender.RegisterExtension(luaAdapter); //#endif #ifndef NO_FILER multiExtender.RegisterExtension(DirectorExtension::Instance()); #endif #endif //Platform::DebugPrintf("Command line is \n%s\n<<", lpszCmdLine); SciTEWin::Register(hInstance); #ifdef STATIC_BUILD Scintilla_LinkLexers(); Scintilla_RegisterClasses(hInstance); #else HMODULE hmod = ::LoadLibrary("SciLexer.DLL"); if (hmod == NULL) ::MessageBox(NULL, "The Scintilla DLL could not be loaded. sdlBasicSciTE will now close", "Error loading Scintilla", MB_OK | MB_ICONERROR); #endif MSG msg; msg.wParam = 0; { SciTEWin MainWind(extender); MainWind.Run(lpszCmdLine); bool going = true; while (going) { going = ::GetMessage(&msg, NULL, 0, 0); if (going) { if (!MainWind.ModelessHandler(&msg)) { if (::TranslateAccelerator(reinterpret_cast(MainWind.GetID()), MainWind.GetAcceleratorTable(), &msg) == 0) { ::TranslateMessage(&msg); ::DispatchMessage(&msg); } } } } } #ifdef STATIC_BUILD Scintilla_ReleaseResources(); #else ::FreeLibrary(hmod); #endif return msg.wParam; } usr/src/sdlBasic/src/sdlBasic/win32/SciTEWinDlg.cxx0000777000076500007660000015503510463136731017236 0ustar // SciTE - Scintilla based Text Editor /** @file SciTEWinDlg.cxx ** Dialog code for the Windows version of the editor. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include "SciTEWin.h" // need this header for SHBrowseForFolder #include /** * Flash the given window for the asked @a duration to visually warn the user. */ static void FlashThisWindow( HWND hWnd, ///< Window to flash handle. int duration) { ///< Duration of the flash state. HDC hDC = ::GetDC(hWnd); if (hDC != NULL) { RECT rc; ::GetClientRect(hWnd, &rc); ::FillRect(hDC, &rc, (HBRUSH)GetStockObject(BLACK_BRUSH)); ::Sleep(duration); } ::ReleaseDC(hWnd, hDC); ::InvalidateRect(hWnd, NULL, true); } /** * Play the given sound, loading if needed the corresponding DLL function. */ static void PlayThisSound( const char *sound, ///< Path to a .wav file or string with a frequency value. int duration, ///< If @a sound is a frequency, gives the duration of the sound. HMODULE &hMM) { ///< Multimedia DLL handle. bool bPlayOK = false; int soundFreq; if (!sound || *sound == '\0') { soundFreq = -1; // No sound at all } else { soundFreq = atoi(sound); // May be a frequency, not a filename } if (soundFreq == 0) { // sound is probably a path if (!hMM) { // Load the DLL only if needed (may be slow on some systems) hMM = ::LoadLibrary("WINMM.DLL"); } if (hMM) { typedef BOOL (WINAPI *MMFn) (LPCSTR, HMODULE, DWORD); MMFn fnMM = (MMFn)::GetProcAddress(hMM, "PlaySoundA"); if (fnMM) { bPlayOK = fnMM(sound, NULL, SND_ASYNC | SND_FILENAME); } } } if (!bPlayOK && soundFreq >= 0) { // The sound could no be played, or user gave a frequency // Will use the speaker to generate a sound if (soundFreq < 37 || soundFreq > 32767) { soundFreq = 440; } if (duration < 50) { duration = 50; } if (duration > 5000) { // Don't play too long... duration = 5000; } // soundFreq and duration are not used on Win9x. // On those systems, PC will either use the default sound event or // emit a standard speaker sound. ::Beep(soundFreq, duration); } } // Handle Unicode controls (assume strings to be UTF-8 on Windows NT) // This is a reasonable buffer size for dialog box text conversions #define CTL_TEXT_BUF 512 SString GetDlgItemText2(HWND hDlg, int idItem) { SString result = ""; WCHAR wsz[CTL_TEXT_BUF]; char msz[CTL_TEXT_BUF]; if (::IsWindowUnicode(GetDlgItem(hDlg, idItem))) { if (::GetDlgItemTextW(hDlg, idItem, wsz, CTL_TEXT_BUF)) { if (::WideCharToMultiByte(CP_UTF8, 0, wsz, -1, msz, CTL_TEXT_BUF, NULL, NULL)) result = msz; } } else { if (::GetDlgItemTextA(hDlg, idItem, msz, CTL_TEXT_BUF)) result = msz; } //::MessageBox(GetFocus(),result.c_str(),"GetDlgItemText2():out",0); return result; } BOOL SetDlgItemText2(HWND hDlg, int idItem, LPCSTR pmsz) { BOOL bSuccess = FALSE; WCHAR wsz[CTL_TEXT_BUF]; if (!pmsz || *pmsz == 0) return ::SetDlgItemTextA(hDlg, idItem, ""); //::MessageBox(GetFocus(),pmsz,"SetDlgItemText2():in",0); if (::IsWindowUnicode(::GetDlgItem(hDlg, idItem))) { if (::MultiByteToWideChar(CP_UTF8, 0, pmsz, -1, wsz, CTL_TEXT_BUF)) { bSuccess = ::SetDlgItemTextW(hDlg, idItem, wsz); } } else { bSuccess = ::SetDlgItemTextA(hDlg, idItem, pmsz); } return bSuccess; } static SciTEWin *Caller(HWND hDlg, UINT message, LPARAM lParam) { if (message == WM_INITDIALOG) { SetWindowLong(hDlg, DWL_USER, lParam); } return reinterpret_cast(GetWindowLong(hDlg, DWL_USER)); } void SciTEWin::WarnUser(int warnID) { SString warning; char *warn; char flashDuration[10], sound[_MAX_PATH], soundDuration[10]; switch (warnID) { case warnFindWrapped: warning = props.Get("warning.findwrapped"); break; case warnNotFound: warning = props.Get("warning.notfound"); break; case warnWrongFile: warning = props.Get("warning.wrongfile"); break; case warnExecuteOK: warning = props.Get("warning.executeok"); break; case warnExecuteKO: warning = props.Get("warning.executeko"); break; case warnNoOtherBookmark: warning = props.Get("warning.nootherbookmark"); break; default: warning = ""; break; } warn = StringDup(warning.c_str()); const char *next = GetNextPropItem(warn, flashDuration, 10); next = GetNextPropItem(next, sound, _MAX_PATH); GetNextPropItem(next, soundDuration, 10); delete []warn; int flashLen = atoi(flashDuration); if (flashLen) { FlashThisWindow(reinterpret_cast(wEditor.GetID()), flashLen); } PlayThisSound(sound, atoi(soundDuration), hMM); } bool DialogHandled(WindowID id, MSG *pmsg) { if (id) { if (::IsDialogMessage(reinterpret_cast(id), pmsg)) return true; } return false; } bool SciTEWin::ModelessHandler(MSG *pmsg) { if (DialogHandled(wFindReplace.GetID(), pmsg)) { return true; } if (DialogHandled(wFindIncrement.GetID(), pmsg)) { return true; } if (DialogHandled(wFindInFiles.GetID(), pmsg)) { return true; } if (wParameters.GetID()) { bool menuKey = (pmsg->message == WM_KEYDOWN) && (pmsg->wParam != VK_TAB) && (pmsg->wParam != VK_ESCAPE) && (pmsg->wParam != VK_RETURN) && (Platform::IsKeyDown(VK_CONTROL) || !Platform::IsKeyDown(VK_MENU)); if (!menuKey && ::IsDialogMessage(reinterpret_cast(wParameters.GetID()), pmsg)) return true; } if (pmsg->message == WM_KEYDOWN || pmsg->message == WM_SYSKEYDOWN) { if (KeyDown(pmsg->wParam)) return true; } else if (pmsg->message == WM_KEYUP) { if (KeyUp(pmsg->wParam)) return true; } return false; } // DoDialog is a bit like something in PC Magazine May 28, 1991, page 357 int SciTEWin::DoDialog(HINSTANCE hInst, const char *resName, HWND hWnd, DLGPROC lpProc) { int result = ::DialogBoxParam(hInst, resName, hWnd, lpProc, reinterpret_cast(this)); if (result == -1) { SString errorNum(::GetLastError()); SString msg = LocaliseMessage("Failed to create dialog box: ^0.", errorNum.c_str()); ::MessageBox(hWnd, msg.c_str(), appName, MB_OK | MB_SETFOREGROUND); } return result; } bool SciTEWin::OpenDialog(const char *filter) { char openName[2048]; // maximum common dialog buffer size (says mfc..) *openName = '\0'; OPENFILENAME ofn = { sizeof(OPENFILENAME), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ofn.hwndOwner = MainHWND(); ofn.hInstance = hInstance; ofn.lpstrFile = openName; ofn.nMaxFile = sizeof(openName); SString openFilter; if (filter) openFilter = filter; else openFilter = props.GetExpanded("open.filter"); if (openFilter.length()) { openFilter.substitute('|', '\0'); size_t start = 0; while (start < openFilter.length()) { const char *filterName = openFilter.c_str() + start; if (*filterName == '#') { size_t next = start + strlen(openFilter.c_str() + start) + 1; next += strlen(openFilter.c_str() + next) + 1; openFilter.remove(start, next - start); } else { SString localised = LocaliseString(filterName, false); if (localised.length()) { openFilter.remove(start, strlen(filterName)); openFilter.insert(start, localised.c_str()); } start += strlen(openFilter.c_str() + start) + 1; start += strlen(openFilter.c_str() + start) + 1; } } } ofn.lpstrFilter = openFilter.c_str(); if (!openWhat[0]) { strcpy(openWhat, LocaliseString("Custom Filter").c_str()); openWhat[strlen(openWhat) + 1] = '\0'; } ofn.lpstrCustomFilter = openWhat; ofn.nMaxCustFilter = sizeof(openWhat); ofn.nFilterIndex = filterDefault; SString translatedTitle = LocaliseString("Open File"); ofn.lpstrTitle = translatedTitle.c_str(); if (props.GetInt("open.dialog.in.file.directory")) { ofn.lpstrInitialDir = dirName; } ofn.Flags = OFN_HIDEREADONLY; if (buffers.size > 1) { ofn.Flags |= OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_ALLOWMULTISELECT; } if (::GetOpenFileName(&ofn)) { filterDefault = ofn.nFilterIndex; //Platform::DebugPrintf("Open: <%s>\n", openName); // find char pos after first Delimiter char* p = openName; while (*p != '\0') ++p; ++p; // if single selection then have path+file if ((p - openName) > ofn.nFileOffset) { Open(openName); } else { SString path(openName); size_t len = path.length(); if ((len > 0) && (path[len - 1] != '\\')) path += "\\"; while (*p != '\0') { // make path+file, add it to the list SString file = path; file += p; Open(file.c_str()); // goto next char pos after \0 while (*p != '\0') ++p; ++p; } } } else { return false; } return true; } SString SciTEWin::ChooseSaveName(const char *title, const char *filter, const char *ext) { SString path; if (0 == dialogsOnScreen) { char saveName[MAX_PATH] = ""; strcpy(saveName, fileName); if (ext) { char *cpDot = strrchr(saveName, '.'); int keepExt = props.GetInt("export.keep.ext", 0); if (cpDot != NULL) { if (keepExt == 0) { strcpy(cpDot, ext); } else if (keepExt == 1) { strcat(saveName, ext); } else if (keepExt == 2) { *cpDot = '_'; strcat(saveName, ext); } } else { strcat(saveName, ext); } } OPENFILENAME ofn = { sizeof(OPENFILENAME), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ofn.hwndOwner = MainHWND(); ofn.hInstance = hInstance; ofn.lpstrFile = saveName; ofn.nMaxFile = sizeof(saveName); SString translatedTitle = LocaliseString(title); ofn.lpstrTitle = translatedTitle.c_str(); ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT; ofn.lpstrFilter = filter; ofn.lpstrInitialDir = dirName; dialogsOnScreen++; if (::GetSaveFileName(&ofn)) { path = saveName; } dialogsOnScreen--; } return path; } bool SciTEWin::SaveAsDialog() { SString path = ChooseSaveName("Save File"); if (path.length()) { //Platform::DebugPrintf("Save: <%s>\n", openName); SetFileName(path.c_str(), false); // don't fix case Save(); ReadProperties(); // In case extension was changed SendEditor(SCI_COLOURISE, 0, -1); wEditor.InvalidateAll(); if (extender) extender->OnSave(fullPath); return true; } return false; } void SciTEWin::SaveACopy() { SString path = ChooseSaveName("Save a Copy"); if (path.length()) { SaveBuffer(path.c_str()); } } void SciTEWin::SaveAsHTML() { SString path = ChooseSaveName("Export File As HTML", "Web (.html;.htm)\0*.html;*.htm\0", ".html"); if (path.length()) { SaveToHTML(path.c_str()); } } void SciTEWin::SaveAsRTF() { SString path = ChooseSaveName("Export File As RTF", "RTF (.rtf)\0*.rtf\0", ".rtf"); if (path.length()) { SaveToRTF(path.c_str()); } } void SciTEWin::SaveAsPDF() { SString path = ChooseSaveName("Export File As PDF", "PDF (.pdf)\0*.pdf\0", ".pdf"); if (path.length()) { SaveToPDF(path.c_str()); } } void SciTEWin::SaveAsTEX() { SString path = ChooseSaveName("Export File As TeX", "TeX (.tex)\0*.tex\0", ".tex"); if (path.length()) { SaveToTEX(path.c_str()); } } void SciTEWin::SaveAsXML() { SString path = ChooseSaveName("Export File As XML", "TeX (.xml)\0*.xml\0", ".xml"); if (path.length()) { SaveToXML(path.c_str()); } } void SciTEWin::LoadSessionDialog() { char openName[MAX_PATH] = "\0"; OPENFILENAME ofn = { sizeof(OPENFILENAME), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ofn.hwndOwner = MainHWND(); ofn.hInstance = hInstance; ofn.lpstrFile = openName; ofn.nMaxFile = sizeof(openName); ofn.lpstrFilter = "Session (.ses)\0*.ses\0"; SString translatedTitle = LocaliseString("Load Session"); ofn.lpstrTitle = translatedTitle.c_str(); ofn.Flags = OFN_HIDEREADONLY; if (::GetOpenFileName(&ofn)) LoadSession(openName); } void SciTEWin::SaveSessionDialog() { char saveName[MAX_PATH] = "\0"; strcpy(saveName, "SciTE.ses"); OPENFILENAME ofn = { sizeof(OPENFILENAME), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ofn.hwndOwner = MainHWND(); ofn.hInstance = hInstance; ofn.lpstrFile = saveName; ofn.nMaxFile = sizeof(saveName); SString translatedTitle = LocaliseString("Save Current Session"); ofn.lpstrTitle = translatedTitle.c_str(); ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT; ofn.lpstrFilter = "Session (.ses)\0*.ses\0"; if (::GetSaveFileName(&ofn)) { SaveSession(saveName); } } /** * Display the Print dialog (if @a showDialog asks it), * allowing it to choose what to print on which printer. * If OK, print the user choice, with optionally defined header and footer. */ void SciTEWin::Print( bool showDialog) { ///< false if must print silently (using default settings). PRINTDLG pdlg = { sizeof(PRINTDLG), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; pdlg.hwndOwner = MainHWND(); pdlg.hInstance = hInstance; pdlg.Flags = PD_USEDEVMODECOPIES | PD_ALLPAGES | PD_RETURNDC; pdlg.nFromPage = 1; pdlg.nToPage = 1; pdlg.nMinPage = 1; pdlg.nMaxPage = 0xffffU; // We do not know how many pages in the // document until the printer is selected and the paper size is known. pdlg.nCopies = 1; pdlg.hDC = 0; pdlg.hDevMode = hDevMode; pdlg.hDevNames = hDevNames; // See if a range has been selected CharacterRange crange = GetSelection(); int startPos = crange.cpMin; int endPos = crange.cpMax; if (startPos == endPos) { pdlg.Flags |= PD_NOSELECTION; } else { pdlg.Flags |= PD_SELECTION; } if (!showDialog) { // Don't display dialog box, just use the default printer and options pdlg.Flags |= PD_RETURNDEFAULT; } if (!::PrintDlg(&pdlg)) { return; } hDevMode = pdlg.hDevMode; hDevNames = pdlg.hDevNames; HDC hdc = pdlg.hDC; PRectangle rectMargins, rectPhysMargins; Point ptPage; Point ptDpi; // Get printer resolution ptDpi.x = GetDeviceCaps(hdc, LOGPIXELSX); // dpi in X direction ptDpi.y = GetDeviceCaps(hdc, LOGPIXELSY); // dpi in Y direction // Start by getting the physical page size (in device units). ptPage.x = GetDeviceCaps(hdc, PHYSICALWIDTH); // device units ptPage.y = GetDeviceCaps(hdc, PHYSICALHEIGHT); // device units // Get the dimensions of the unprintable // part of the page (in device units). rectPhysMargins.left = GetDeviceCaps(hdc, PHYSICALOFFSETX); rectPhysMargins.top = GetDeviceCaps(hdc, PHYSICALOFFSETY); // To get the right and lower unprintable area, // we take the entire width and height of the paper and // subtract everything else. rectPhysMargins.right = ptPage.x // total paper width - GetDeviceCaps(hdc, HORZRES) // printable width - rectPhysMargins.left; // left unprintable margin rectPhysMargins.bottom = ptPage.y // total paper height - GetDeviceCaps(hdc, VERTRES) // printable height - rectPhysMargins.top; // right unprintable margin // At this point, rectPhysMargins contains the widths of the // unprintable regions on all four sides of the page in device units. // Take in account the page setup given by the user (if one value is not null) if (pagesetupMargin.left != 0 || pagesetupMargin.right != 0 || pagesetupMargin.top != 0 || pagesetupMargin.bottom != 0) { PRectangle rectSetup; // Convert the hundredths of millimeters (HiMetric) or // thousandths of inches (HiEnglish) margin values // from the Page Setup dialog to device units. // (There are 2540 hundredths of a mm in an inch.) char localeInfo[3]; GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_IMEASURE, localeInfo, 3); if (localeInfo[0] == '0') { // Metric system. '1' is US System rectSetup.left = MulDiv (pagesetupMargin.left, ptDpi.x, 2540); rectSetup.top = MulDiv (pagesetupMargin.top, ptDpi.y, 2540); rectSetup.right = MulDiv(pagesetupMargin.right, ptDpi.x, 2540); rectSetup.bottom = MulDiv(pagesetupMargin.bottom, ptDpi.y, 2540); } else { rectSetup.left = MulDiv(pagesetupMargin.left, ptDpi.x, 1000); rectSetup.top = MulDiv(pagesetupMargin.top, ptDpi.y, 1000); rectSetup.right = MulDiv(pagesetupMargin.right, ptDpi.x, 1000); rectSetup.bottom = MulDiv(pagesetupMargin.bottom, ptDpi.y, 1000); } // Dont reduce margins below the minimum printable area rectMargins.left = Platform::Maximum(rectPhysMargins.left, rectSetup.left); rectMargins.top = Platform::Maximum(rectPhysMargins.top, rectSetup.top); rectMargins.right = Platform::Maximum(rectPhysMargins.right, rectSetup.right); rectMargins.bottom = Platform::Maximum(rectPhysMargins.bottom, rectSetup.bottom); } else { rectMargins.left = rectPhysMargins.left; rectMargins.top = rectPhysMargins.top; rectMargins.right = rectPhysMargins.right; rectMargins.bottom = rectPhysMargins.bottom; } // rectMargins now contains the values used to shrink the printable // area of the page. // Convert device coordinates into logical coordinates DPtoLP(hdc, (LPPOINT) &rectMargins, 2); DPtoLP(hdc, (LPPOINT)&rectPhysMargins, 2); // Convert page size to logical units and we're done! DPtoLP(hdc, (LPPOINT) &ptPage, 1); SString headerFormat = props.Get("print.header.format"); SString footerFormat = props.Get("print.footer.format"); TEXTMETRIC tm; SString headerOrFooter; // Usually the path, date and page number SString headerStyle = props.Get("print.header.style"); StyleDefinition sdHeader(headerStyle.c_str()); int headerLineHeight = ::MulDiv( (sdHeader.specified & StyleDefinition::sdSize) ? sdHeader.size : 9, ptDpi.y, 72); HFONT fontHeader = ::CreateFont(headerLineHeight, 0, 0, 0, sdHeader.bold ? FW_BOLD : FW_NORMAL, sdHeader.italics, sdHeader.underlined, 0, 0, 0, 0, 0, 0, (sdHeader.specified & StyleDefinition::sdFont) ? sdHeader.font.c_str() : "Arial"); ::SelectObject(hdc, fontHeader); ::GetTextMetrics(hdc, &tm); headerLineHeight = tm.tmHeight + tm.tmExternalLeading; SString footerStyle = props.Get("print.footer.style"); StyleDefinition sdFooter(footerStyle.c_str()); int footerLineHeight = ::MulDiv( (sdFooter.specified & StyleDefinition::sdSize) ? sdFooter.size : 9, ptDpi.y, 72); HFONT fontFooter = ::CreateFont(footerLineHeight, 0, 0, 0, sdFooter.bold ? FW_BOLD : FW_NORMAL, sdFooter.italics, sdFooter.underlined, 0, 0, 0, 0, 0, 0, (sdFooter.specified & StyleDefinition::sdFont) ? sdFooter.font.c_str() : "Arial"); ::SelectObject(hdc, fontFooter); ::GetTextMetrics(hdc, &tm); footerLineHeight = tm.tmHeight + tm.tmExternalLeading; DOCINFO di = {sizeof(DOCINFO), 0, 0, 0, 0}; di.lpszDocName = windowName.c_str(); di.lpszOutput = 0; di.lpszDatatype = 0; di.fwType = 0; if (::StartDoc(hdc, &di) < 0) { SString msg = LocaliseMessage("Can not start printer document."); WindowMessageBox(wSciTE, msg, MB_OK); return; } LONG lengthDoc = SendEditor(SCI_GETLENGTH); LONG lengthDocMax = lengthDoc; LONG lengthPrinted = 0; // Requested to print selection if (pdlg.Flags & PD_SELECTION) { if (startPos > endPos) { lengthPrinted = endPos; lengthDoc = startPos; } else { lengthPrinted = startPos; lengthDoc = endPos; } if (lengthPrinted < 0) lengthPrinted = 0; if (lengthDoc > lengthDocMax) lengthDoc = lengthDocMax; } // We must substract the physical margins from the printable area RangeToFormat frPrint; frPrint.hdc = hdc; frPrint.hdcTarget = hdc; frPrint.rc.left = rectMargins.left - rectPhysMargins.left; frPrint.rc.top = rectMargins.top - rectPhysMargins.top; frPrint.rc.right = ptPage.x - rectMargins.right - rectPhysMargins.left; frPrint.rc.bottom = ptPage.y - rectMargins.bottom - rectPhysMargins.top; frPrint.rcPage.left = 0; frPrint.rcPage.top = 0; frPrint.rcPage.right = ptPage.x - rectPhysMargins.left - rectPhysMargins.right - 1; frPrint.rcPage.bottom = ptPage.y - rectPhysMargins.top - rectPhysMargins.bottom - 1; if (headerFormat.size()) { frPrint.rc.top += headerLineHeight + headerLineHeight / 2; } if (footerFormat.size()) { frPrint.rc.bottom -= footerLineHeight + footerLineHeight / 2; } // Print each page int pageNum = 1; bool printPage; PropSet propsPrint; propsPrint.superPS = &props; SetFileProperties(propsPrint); while (lengthPrinted < lengthDoc) { printPage = (!(pdlg.Flags & PD_PAGENUMS) || (pageNum >= pdlg.nFromPage) && (pageNum <= pdlg.nToPage)); char pageString[32]; sprintf(pageString, "%0d", pageNum); propsPrint.Set("CurrentPage", pageString); if (printPage) { ::StartPage(hdc); if (headerFormat.size()) { SString sHeader = propsPrint.GetExpanded("print.header.format"); ::SetTextColor(hdc, sdHeader.ForeAsLong()); ::SetBkColor(hdc, sdHeader.BackAsLong()); ::SelectObject(hdc, fontHeader); UINT ta = ::SetTextAlign(hdc, TA_BOTTOM); RECT rcw = {frPrint.rc.left, frPrint.rc.top - headerLineHeight - headerLineHeight / 2, frPrint.rc.right, frPrint.rc.top - headerLineHeight / 2}; rcw.bottom = rcw.top + headerLineHeight; ::ExtTextOut(hdc, frPrint.rc.left + 5, frPrint.rc.top - headerLineHeight / 2, ETO_OPAQUE, &rcw, sHeader.c_str(), static_cast(sHeader.length()), NULL); ::SetTextAlign(hdc, ta); HPEN pen = ::CreatePen(0, 1, sdHeader.ForeAsLong()); HPEN penOld = static_cast(::SelectObject(hdc, pen)); ::MoveToEx(hdc, frPrint.rc.left, frPrint.rc.top - headerLineHeight / 4, NULL); ::LineTo(hdc, frPrint.rc.right, frPrint.rc.top - headerLineHeight / 4); ::SelectObject(hdc, penOld); ::DeleteObject(pen); } } frPrint.chrg.cpMin = lengthPrinted; frPrint.chrg.cpMax = lengthDoc; lengthPrinted = SendEditor(SCI_FORMATRANGE, printPage, reinterpret_cast(&frPrint)); if (printPage) { if (footerFormat.size()) { SString sFooter = propsPrint.GetExpanded("print.footer.format"); ::SetTextColor(hdc, sdFooter.ForeAsLong()); ::SetBkColor(hdc, sdFooter.BackAsLong()); ::SelectObject(hdc, fontFooter); UINT ta = ::SetTextAlign(hdc, TA_TOP); RECT rcw = {frPrint.rc.left, frPrint.rc.bottom + footerLineHeight / 2, frPrint.rc.right, frPrint.rc.bottom + footerLineHeight + footerLineHeight / 2}; ::ExtTextOut(hdc, frPrint.rc.left + 5, frPrint.rc.bottom + footerLineHeight / 2, ETO_OPAQUE, &rcw, sFooter.c_str(), static_cast(sFooter.length()), NULL); ::SetTextAlign(hdc, ta); HPEN pen = ::CreatePen(0, 1, sdFooter.ForeAsLong()); HPEN penOld = static_cast(::SelectObject(hdc, pen)); ::SetBkColor(hdc, sdFooter.ForeAsLong()); ::MoveToEx(hdc, frPrint.rc.left, frPrint.rc.bottom + footerLineHeight / 4, NULL); ::LineTo(hdc, frPrint.rc.right, frPrint.rc.bottom + footerLineHeight / 4); ::SelectObject(hdc, penOld); ::DeleteObject(pen); } ::EndPage(hdc); } pageNum++; if ((pdlg.Flags & PD_PAGENUMS) && (pageNum > pdlg.nToPage)) break; } SendEditor(SCI_FORMATRANGE, FALSE, 0); ::EndDoc(hdc); ::DeleteDC(hdc); if (fontHeader) { ::DeleteObject(fontHeader); } if (fontFooter) { ::DeleteObject(fontFooter); } } void SciTEWin::PrintSetup() { PAGESETUPDLG pdlg = { sizeof(PAGESETUPDLG), 0, 0, 0, 0, {0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, 0, 0, 0, 0, 0, 0 }; pdlg.hwndOwner = MainHWND(); pdlg.hInstance = hInstance; if (pagesetupMargin.left != 0 || pagesetupMargin.right != 0 || pagesetupMargin.top != 0 || pagesetupMargin.bottom != 0) { pdlg.Flags = PSD_MARGINS; pdlg.rtMargin.left = pagesetupMargin.left; pdlg.rtMargin.top = pagesetupMargin.top; pdlg.rtMargin.right = pagesetupMargin.right; pdlg.rtMargin.bottom = pagesetupMargin.bottom; } pdlg.hDevMode = hDevMode; pdlg.hDevNames = hDevNames; if (!PageSetupDlg(&pdlg)) return; pagesetupMargin.left = pdlg.rtMargin.left; pagesetupMargin.top = pdlg.rtMargin.top; pagesetupMargin.right = pdlg.rtMargin.right; pagesetupMargin.bottom = pdlg.rtMargin.bottom; hDevMode = pdlg.hDevMode; hDevNames = pdlg.hDevNames; } extern bool IsWindowsNT(); static void FillComboFromMemory(HWND combo, const ComboMemory &mem, bool useTop = false) { ::SendMessage(combo, CB_RESETCONTENT, 0, 0); if (::IsWindowUnicode(combo)) { for (int i = 0; i < mem.Length(); i++) { //Platform::DebugPrintf("Combo[%0d] = %s\n", i, mem.At(i).c_str()); WCHAR wszBuf[CTL_TEXT_BUF]; ::MultiByteToWideChar(CP_UTF8, 0, mem.At(i).c_str(), -1, wszBuf, CTL_TEXT_BUF); ::SendMessageW(combo, CB_ADDSTRING, 0, reinterpret_cast(wszBuf)); } } else { for (int i = 0; i < mem.Length(); i++) { //Platform::DebugPrintf("Combo[%0d] = %s\n", i, mem.At(i).c_str()); ::SendMessage(combo, CB_ADDSTRING, 0, reinterpret_cast(mem.At(i).c_str())); } } if (useTop) { ::SendMessage(combo, CB_SETCURSEL, 0, 0); } } static void FillComboFromProps(HWND combo, PropSet &props) { char *key; char *val; if (props.GetFirst(&key, &val)) { ::SendMessage(combo, CB_ADDSTRING, 0, reinterpret_cast(key)); while (props.GetNext(&key, &val)) { ::SendMessage(combo, CB_ADDSTRING, 0, reinterpret_cast(key)); } } } static SString GetItemText(HWND hDlg, int id) { HWND wT = ::GetDlgItem(hDlg, id); int len = ::GetWindowTextLength(wT); SBuffer itemText(len); if (len > 0) { ::GetDlgItemText(hDlg, id, itemText.ptr(), len + 1); } return SString(itemText); } BOOL SciTEWin::FindMessage(HWND hDlg, UINT message, WPARAM wParam) { // Avoid getting dialog items before set up or during tear down. if (WM_SETFONT == message || WM_NCDESTROY == message) return FALSE; HWND wFindWhat = ::GetDlgItem(hDlg, IDFINDWHAT); HWND wWholeWord = ::GetDlgItem(hDlg, IDWHOLEWORD); HWND wMatchCase = ::GetDlgItem(hDlg, IDMATCHCASE); HWND wRegExp = ::GetDlgItem(hDlg, IDREGEXP); HWND wWrap = ::GetDlgItem(hDlg, IDWRAP); HWND wUnSlash = ::GetDlgItem(hDlg, IDUNSLASH); HWND wFindInStyle = ::GetDlgItem(hDlg, IDFINDINSTYLE); HWND wFindStyle = ::GetDlgItem(hDlg, IDFINDSTYLE); HWND wUp = ::GetDlgItem(hDlg, IDDIRECTIONUP); HWND wDown = ::GetDlgItem(hDlg, IDDIRECTIONDOWN); switch (message) { case WM_INITDIALOG: LocaliseDialog(hDlg); FillComboFromMemory(wFindWhat, memFinds); SetDlgItemText2(hDlg, IDFINDWHAT, findWhat.c_str()); if (wholeWord) ::SendMessage(wWholeWord, BM_SETCHECK, BST_CHECKED, 0); if (matchCase) ::SendMessage(wMatchCase, BM_SETCHECK, BST_CHECKED, 0); if (regExp) ::SendMessage(wRegExp, BM_SETCHECK, BST_CHECKED, 0); if (wrapFind) ::SendMessage(wWrap, BM_SETCHECK, BST_CHECKED, 0); if (unSlash) ::SendMessage(wUnSlash, BM_SETCHECK, BST_CHECKED, 0); if (findInStyle) ::SendMessage(wFindInStyle, BM_SETCHECK, BST_CHECKED, 0); else ::EnableWindow(wFindStyle, false); ::SendMessage(wFindStyle, EM_LIMITTEXT, 3, 1); ::SetDlgItemInt(hDlg, IDFINDSTYLE, SendEditor(SCI_GETSTYLEAT, SendEditor(SCI_GETCURRENTPOS)), FALSE); if (reverseFind) { ::SendMessage(wUp, BM_SETCHECK, BST_CHECKED, 0); } else { ::SendMessage(wDown, BM_SETCHECK, BST_CHECKED, 0); } return TRUE; case WM_CLOSE: ::SendMessage(hDlg, WM_COMMAND, IDCANCEL, 0); break; case WM_COMMAND: if (ControlIDOfCommand(wParam) == IDCANCEL) { ::EndDialog(hDlg, IDCANCEL); wFindReplace.Destroy(); return FALSE; } else if ( (ControlIDOfCommand(wParam) == IDOK) || (ControlIDOfCommand(wParam) == IDMARKALL) ) { findWhat = GetDlgItemText2(hDlg, IDFINDWHAT); props.Set("find.what", findWhat.c_str()); memFinds.Insert(findWhat.c_str()); wholeWord = BST_CHECKED == ::SendMessage(wWholeWord, BM_GETCHECK, 0, 0); matchCase = BST_CHECKED == ::SendMessage(wMatchCase, BM_GETCHECK, 0, 0); regExp = BST_CHECKED == ::SendMessage(wRegExp, BM_GETCHECK, 0, 0); wrapFind = BST_CHECKED == ::SendMessage(wWrap, BM_GETCHECK, 0, 0); unSlash = BST_CHECKED == ::SendMessage(wUnSlash, BM_GETCHECK, 0, 0); findInStyle = BST_CHECKED == ::SendMessage(wFindInStyle, BM_GETCHECK, 0, 0); findStyle = atoi(GetDlgItemText2(hDlg, IDFINDSTYLE).c_str()); reverseFind = BST_CHECKED == ::SendMessage(wUp, BM_GETCHECK, 0, 0); ::EndDialog(hDlg, IDOK); wFindReplace.Destroy(); if (ControlIDOfCommand(wParam) == IDMARKALL){ MarkAll(); } FindNext(reverseFind); return TRUE; } else if (ControlIDOfCommand(wParam) == IDFINDINSTYLE) { ::EnableWindow(wFindStyle, BST_CHECKED == ::SendMessage(wFindInStyle, BM_GETCHECK, 0, 0)); return TRUE; } } return FALSE; } BOOL CALLBACK SciTEWin::FindDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { return Caller(hDlg, message, lParam)->FindMessage(hDlg, message, wParam); } BOOL SciTEWin::HandleReplaceCommand(int cmd) { if (!wFindReplace.GetID()) return TRUE; HWND hwndFR = reinterpret_cast(wFindReplace.GetID()); HWND wWholeWord = ::GetDlgItem(hwndFR, IDWHOLEWORD); HWND wMatchCase = ::GetDlgItem(hwndFR, IDMATCHCASE); HWND wRegExp = ::GetDlgItem(hwndFR, IDREGEXP); HWND wWrap = ::GetDlgItem(hwndFR, IDWRAP); HWND wUnSlash = ::GetDlgItem(hwndFR, IDUNSLASH); HWND wFindInStyle = ::GetDlgItem(hwndFR, IDFINDINSTYLE); if ((cmd == IDOK) || (cmd == IDREPLACE) || (cmd == IDREPLACEALL) || (cmd == IDREPLACEINSEL) || (cmd == IDREPLACEINBUF)) { findWhat = GetDlgItemText2(hwndFR, IDFINDWHAT); props.Set("find.what", findWhat.c_str()); memFinds.Insert(findWhat.c_str()); wholeWord = BST_CHECKED == ::SendMessage(wWholeWord, BM_GETCHECK, 0, 0); matchCase = BST_CHECKED == ::SendMessage(wMatchCase, BM_GETCHECK, 0, 0); regExp = BST_CHECKED == ::SendMessage(wRegExp, BM_GETCHECK, 0, 0); wrapFind = BST_CHECKED == ::SendMessage(wWrap, BM_GETCHECK, 0, 0); unSlash = BST_CHECKED == ::SendMessage(wUnSlash, BM_GETCHECK, 0, 0); findInStyle = BST_CHECKED == ::SendMessage(wFindInStyle, BM_GETCHECK, 0, 0); findStyle = atoi(GetDlgItemText2(hwndFR, IDFINDSTYLE).c_str()); } if ((cmd == IDREPLACE) || (cmd == IDREPLACEALL) || (cmd == IDREPLACEINSEL) || (cmd == IDREPLACEINBUF)) { replaceWhat = GetDlgItemText2(hwndFR, IDREPLACEWITH); memReplaces.Insert(replaceWhat.c_str()); } int replacements = 0; if (cmd == IDOK) { FindNext(reverseFind); // Find next } else if (cmd == IDREPLACE) { if (havefound) { ReplaceOnce(); } else { CharacterRange crange = GetSelection(); SetSelection(crange.cpMin, crange.cpMin); FindNext(reverseFind); if (havefound) { ReplaceOnce(); } } } else if ((cmd == IDREPLACEALL) || (cmd == IDREPLACEINSEL)) { replacements = ReplaceAll(cmd == IDREPLACEINSEL); } else if (cmd == IDREPLACEINBUF) { replacements = ReplaceInBuffers(); } char replDone[10]; sprintf(replDone, "%d", replacements); ::SetDlgItemText(hwndFR, IDREPLDONE, replDone); return TRUE; } BOOL SciTEWin::ReplaceMessage(HWND hDlg, UINT message, WPARAM wParam) { // Avoid getting dialog items before set up or during tear down. if (WM_SETFONT == message || WM_NCDESTROY == message) return FALSE; HWND wFindWhat = ::GetDlgItem(hDlg, IDFINDWHAT); HWND wReplaceWith = ::GetDlgItem(hDlg, IDREPLACEWITH); HWND wWholeWord = ::GetDlgItem(hDlg, IDWHOLEWORD); HWND wMatchCase = ::GetDlgItem(hDlg, IDMATCHCASE); HWND wRegExp = ::GetDlgItem(hDlg, IDREGEXP); HWND wWrap = ::GetDlgItem(hDlg, IDWRAP); HWND wUnSlash = ::GetDlgItem(hDlg, IDUNSLASH); HWND wFindInStyle = ::GetDlgItem(hDlg, IDFINDINSTYLE); HWND wFindStyle = ::GetDlgItem(hDlg, IDFINDSTYLE); switch (message) { case WM_INITDIALOG: LocaliseDialog(hDlg); FillComboFromMemory(wFindWhat, memFinds); SetDlgItemText2(hDlg, IDFINDWHAT, findWhat.c_str()); FillComboFromMemory(wReplaceWith, memReplaces); SetDlgItemText2(hDlg, IDREPLACEWITH, replaceWhat.c_str()); if (wholeWord) ::SendMessage(wWholeWord, BM_SETCHECK, BST_CHECKED, 0); if (matchCase) ::SendMessage(wMatchCase, BM_SETCHECK, BST_CHECKED, 0); if (regExp) ::SendMessage(wRegExp, BM_SETCHECK, BST_CHECKED, 0); if (wrapFind) ::SendMessage(wWrap, BM_SETCHECK, BST_CHECKED, 0); if (unSlash) ::SendMessage(wUnSlash, BM_SETCHECK, BST_CHECKED, 0); if (findInStyle) ::SendMessage(wFindInStyle, BM_SETCHECK, BST_CHECKED, 0); else ::EnableWindow(wFindStyle, false); ::SetDlgItemInt(hDlg, IDFINDSTYLE, SendEditor(SCI_GETSTYLEAT, SendEditor(SCI_GETCURRENTPOS)), FALSE); ::SetDlgItemText(hDlg, IDREPLDONE, "0"); if (findWhat.length() != 0 && props.GetInt("find.replacewith.focus", 1)) { ::SetFocus(wReplaceWith); return FALSE; } return TRUE; case WM_CLOSE: ::SendMessage(hDlg, WM_COMMAND, IDCANCEL, 0); break; case WM_COMMAND: if (ControlIDOfCommand(wParam) == IDCANCEL) { props.Set("Replacements", ""); UpdateStatusBar(false); ::EndDialog(hDlg, IDCANCEL); wFindReplace.Destroy(); return FALSE; } else if (ControlIDOfCommand(wParam) == IDFINDINSTYLE) { ::EnableWindow(wFindStyle, BST_CHECKED == ::SendMessage(wFindInStyle, BM_GETCHECK, 0, 0)); return TRUE; } else { return HandleReplaceCommand(ControlIDOfCommand(wParam)); } } return FALSE; } BOOL CALLBACK SciTEWin::ReplaceDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { return Caller(hDlg, message, lParam)->ReplaceMessage(hDlg, message, wParam); } BOOL SciTEWin::IncrementFindMessage(HWND hDlg, UINT message, WPARAM wParam) { // Prevent reentrance when setting text static bool entered = false; if (entered) return FALSE; // Avoid getting dialog items before set up or during tear down. if (WM_SETFONT == message || WM_NCDESTROY == message) return FALSE; HWND wFindWhat = ::GetDlgItem(hDlg, IDC_INCFINDTEXT); switch (message) { case WM_INITDIALOG:{ wFindIncrement = hDlg; LocaliseDialog(hDlg); SetWindowLong(hDlg, GWL_STYLE, WS_TABSTOP || GetWindowLong(hDlg, GWL_STYLE)); SetDlgItemText2(hDlg, IDC_INCFINDTEXT, ""); //findWhat.c_str() SetFocus(hDlg); PRectangle aRect = wFindIncrement.GetPosition(); PRectangle aTBRect = wStatusBar.GetPosition(); PRectangle aNewRect = aTBRect; aNewRect.top = aNewRect.bottom - (aRect.bottom - aRect.top); aNewRect.right = aNewRect.left + aRect.right - aRect.left; //~ RegisterHotKey(hDlg,1,0,VK_F3); //~ RegisterHotKey(hDlg,2,MOD_SHIFT,VK_F3); wFindIncrement.SetPosition(aNewRect); return TRUE; } case WM_SETFOCUS: return 0; case WM_HOTKEY: if (wParam == 1) FindNext(false,false); if (wParam == 2) FindNext(true,false); break; case WM_CLOSE: //~ UnregisterHotKey(hDlg,1); //~ UnregisterHotKey(hDlg,2); ::SendMessage(hDlg, WM_COMMAND, IDCANCEL, 0); break; case WM_COMMAND: if (ControlIDOfCommand(wParam) == IDCANCEL) { props.Set("Replacements", ""); UpdateStatusBar(false); ::EndDialog(hDlg, IDCANCEL); wFindIncrement.Destroy(); return FALSE; } else if (((ControlIDOfCommand(wParam) == IDC_INCFINDTEXT) && ((wParam >> 16) == 0x0300)) || (ControlIDOfCommand(wParam) == IDC_INCFINDBTNOK)) { SString ffLastWhat; ffLastWhat = findWhat; findWhat = GetDlgItemText2(hDlg, IDC_INCFINDTEXT); if (ControlIDOfCommand(wParam) != IDC_INCFINDBTNOK) { CharacterRange cr = GetSelection(); if (ffLastWhat.length()) { SetSelection(cr.cpMin - ffLastWhat.length(), cr.cpMin - ffLastWhat.length()); } } wholeWord = false; FindNext(false, false); if ((!havefound) && strncmp(findWhat.c_str(), ffLastWhat.c_str(), ffLastWhat.length()) == 0) { // Could not find string with added character so revert to previous value. findWhat = ffLastWhat; entered = true; SetDlgItemText2(hDlg, IDC_INCFINDTEXT, findWhat.c_str()); SendMessage(wFindWhat, EM_SETSEL, ffLastWhat.length(), ffLastWhat.length()); entered = false; } return FALSE; } } return FALSE; } BOOL CALLBACK SciTEWin::FindIncrementDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { return Caller(hDlg, message, lParam)->IncrementFindMessage(hDlg, message, wParam); } void SciTEWin::FindIncrement() { if (wFindIncrement.Created()) return; memset(&fr, 0, sizeof(fr)); fr.lStructSize = sizeof(fr); fr.hwndOwner = MainHWND(); fr.hInstance = hInstance; fr.Flags = 0; if (!reverseFind) fr.Flags |= FR_DOWN; findWhat.clear(); fr.lpstrFindWhat = const_cast(findWhat.c_str()); fr.wFindWhatLen = static_cast(findWhat.length() + 1); replacing = false; //DoDialog(hInstance, // MAKEINTRESOURCE(IDD_FIND2), // MainHWND(), // reinterpret_cast(FindIncrementDlg)); if (IsWindowsNT()) { ::DialogBoxParamW(hInstance, (LPCWSTR)MAKEINTRESOURCE(IDD_FIND2), MainHWND(), reinterpret_cast(FindIncrementDlg), reinterpret_cast(this)); } else { ::DialogBoxParamA(hInstance, MAKEINTRESOURCE(IDD_FIND2), MainHWND(), reinterpret_cast(FindIncrementDlg), reinterpret_cast(this)); } WindowSetFocus(wEditor); } void SciTEWin::Find() { if (wFindIncrement.Created()) return; if (wFindReplace.Created()) return; SelectionIntoFind(); memset(&fr, 0, sizeof(fr)); fr.lStructSize = sizeof(fr); fr.hwndOwner = MainHWND(); fr.hInstance = hInstance; fr.Flags = 0; if (!reverseFind) fr.Flags |= FR_DOWN; fr.lpstrFindWhat = const_cast(findWhat.c_str()); fr.wFindWhatLen = static_cast(findWhat.length() + 1); int dialog_id = (!props.GetInt("find.replace.advanced") ? IDD_FIND : IDD_FIND_ADV); if (IsWindowsNT()) { wFindReplace = ::CreateDialogParamW(hInstance, (LPCWSTR)MAKEINTRESOURCE(dialog_id), MainHWND(), reinterpret_cast(FindDlg), reinterpret_cast(this)); } else { wFindReplace = ::CreateDialogParamA(hInstance, MAKEINTRESOURCE(dialog_id), MainHWND(), reinterpret_cast(FindDlg), reinterpret_cast(this)); } wFindReplace.Show(); replacing = false; } // Set a call back with the handle after init to set the path. // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/callbackfunctions/browsecallbackproc.asp static int __stdcall BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM, LPARAM pData) { if (uMsg == BFFM_INITIALIZED) { SendMessage(hwnd, BFFM_SETSELECTION, TRUE, pData); } return 0; } void SciTEWin::PerformGrep() { SelectionIntoProperties(); SString findInput; long flags = 0; if (props.Get("find.input").length()) { findInput = props.GetNewExpand("find.input"); flags += jobHasInput; } AddCommand(props.GetNewExpand("find.command"), props.Get("find.directory"), jobCLI, findInput, flags); if (commandCurrent > 0) { Execute(); } } void SciTEWin::FillCombos(HWND hDlg) { FillComboFromMemory(::GetDlgItem(hDlg, IDFINDWHAT), memFinds, true); FillComboFromMemory(::GetDlgItem(hDlg, IDFILES), memFiles, true); FillComboFromMemory(::GetDlgItem(hDlg, IDDIRECTORY), memDirectory, true); } BOOL SciTEWin::GrepMessage(HWND hDlg, UINT message, WPARAM wParam) { switch (message) { case WM_INITDIALOG: LocaliseDialog(hDlg); FillCombos(hDlg); ::SetDlgItemText(hDlg, IDFINDWHAT, props.Get("find.what").c_str()); ::SetDlgItemText(hDlg, IDDIRECTORY, props.Get("find.directory").c_str()); return TRUE; case WM_CLOSE: ::SendMessage(hDlg, WM_COMMAND, IDCANCEL, 0); break; case WM_COMMAND: if (ControlIDOfCommand(wParam) == IDCANCEL) { ::EndDialog(hDlg, IDCANCEL); wFindInFiles.Destroy(); return FALSE; } else if (ControlIDOfCommand(wParam) == IDOK) { findWhat = GetItemText(hDlg, IDFINDWHAT); props.Set("find.what", findWhat.c_str()); memFinds.Insert(findWhat.c_str()); SString files = GetItemText(hDlg, IDFILES); props.Set("find.files", files.c_str()); memFiles.Insert(files.c_str()); SString directory = GetItemText(hDlg, IDDIRECTORY); props.Set("find.directory", directory.c_str()); memDirectory.Insert(directory.c_str()); FillCombos(hDlg); PerformGrep(); if (props.GetInt("find.in.files.close.on.find", 1)) { ::EndDialog(hDlg, IDOK); wFindInFiles.Destroy(); return TRUE; } else { return FALSE; } } else if (ControlIDOfCommand(wParam) == IDDOTDOT) { SString directory = GetItemText(hDlg, IDDIRECTORY); const char *lastSlash = strrchr(directory.c_str(), pathSepChar); if (lastSlash) { directory.remove(lastSlash - directory.c_str(), 0); ::SetDlgItemText(hDlg, IDDIRECTORY, directory.c_str()); } } else if (ControlIDOfCommand(wParam) == IDBROWSE) { // This code was copied and slightly modifed from: // http://www.bcbdev.com/faqs/faq62.htm // SHBrowseForFolder returns a PIDL. The memory for the PIDL is // allocated by the shell. Eventually, we will need to free this // memory, so we need to get a pointer to the shell malloc COM // object that will free the PIDL later on. LPMALLOC pShellMalloc = 0; if (::SHGetMalloc(&pShellMalloc) == NO_ERROR) { // If we were able to get the shell malloc object, // then proceed by initializing the BROWSEINFO stuct BROWSEINFO info; memset(&info, 0, sizeof(info)); info.hwndOwner = hDlg; info.pidlRoot = NULL; char szDisplayName[MAX_PATH]; info.pszDisplayName = szDisplayName; SString title = LocaliseString("Select a folder to search from"); info.lpszTitle = title.c_str(); info.ulFlags = 0; info.lpfn = BrowseCallbackProc; SString directory = GetItemText(hDlg, IDDIRECTORY); if (!directory.endswith(pathSepString)) { directory += pathSepString; } info.lParam = reinterpret_cast(directory.c_str()); // Execute the browsing dialog. LPITEMIDLIST pidl = ::SHBrowseForFolder(&info); // pidl will be null if they cancel the browse dialog. // pidl will be not null when they select a folder. if (pidl) { // Try to convert the pidl to a display string. // Return is true if success. char szDir[MAX_PATH]; if (::SHGetPathFromIDList(pidl, szDir)) { // Set edit control to the directory path. ::SetDlgItemText(hDlg, IDDIRECTORY, szDir); } pShellMalloc->Free(pidl); } pShellMalloc->Release(); } } } return FALSE; } BOOL CALLBACK SciTEWin::GrepDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { return Caller(hDlg, message, lParam)->GrepMessage(hDlg, message, wParam); } void SciTEWin::FindInFiles() { if (wFindInFiles.Created()) return; SelectionIntoFind(); props.Set("find.what", findWhat.c_str()); char findInDir[1024]; GetDocumentDirectory(findInDir, sizeof(findInDir)); props.Set("find.directory", findInDir); wFindInFiles = ::CreateDialogParam(hInstance, "Grep", MainHWND(), reinterpret_cast(GrepDlg), reinterpret_cast(this)); wFindInFiles.Show(); } void SciTEWin::Replace() { if (wFindReplace.Created()) return; SelectionIntoFind(false); // don't strip EOL at end of selection memset(&fr, 0, sizeof(fr)); fr.lStructSize = sizeof(fr); fr.hwndOwner = MainHWND(); fr.hInstance = hInstance; fr.Flags = FR_REPLACE; fr.lpstrFindWhat = const_cast(findWhat.c_str()); fr.lpstrReplaceWith = const_cast(replaceWhat.c_str()); fr.wFindWhatLen = static_cast(findWhat.length() + 1); fr.wReplaceWithLen = static_cast(replaceWhat.length() + 1); int dialog_id = (!props.GetInt("find.replace.advanced") ? IDD_REPLACE : IDD_REPLACE_ADV); if (IsWindowsNT()) { wFindReplace = ::CreateDialogParamW(hInstance, (LPCWSTR)MAKEINTRESOURCE(dialog_id), MainHWND(), reinterpret_cast(ReplaceDlg), reinterpret_cast(this)); } else { wFindReplace = ::CreateDialogParamA(hInstance, MAKEINTRESOURCE(dialog_id), MainHWND(), reinterpret_cast(ReplaceDlg), reinterpret_cast(this)); } wFindReplace.Show(); replacing = true; havefound = false; } void SciTEWin::FindReplace(bool replace) { replacing = replace; } void SciTEWin::DestroyFindReplace() { if (wFindReplace.Created()) { ::EndDialog(reinterpret_cast(wFindReplace.GetID()), IDCANCEL); wFindReplace.Destroy(); } } BOOL SciTEWin::GoLineMessage(HWND hDlg, UINT message, WPARAM wParam) { switch (message) { case WM_INITDIALOG: { int position = SendEditor(SCI_GETCURRENTPOS); int lineNumber = SendEditor(SCI_LINEFROMPOSITION, position) + 1; int lineStart = SendEditor(SCI_POSITIONFROMLINE, lineNumber - 1); int characterOnLine = 1; while (position > lineStart) { position = SendEditor(SCI_POSITIONBEFORE, position); characterOnLine++; } LocaliseDialog(hDlg); ::SendDlgItemMessage(hDlg, IDGOLINE, EM_LIMITTEXT, 10, 1); ::SendDlgItemMessage(hDlg, IDGOLINECHAR, EM_LIMITTEXT, 10, 1); ::SetDlgItemInt(hDlg, IDCURRLINE, lineNumber, FALSE); ::SetDlgItemInt(hDlg, IDCURRLINECHAR, characterOnLine, FALSE); ::SetDlgItemInt(hDlg, IDLASTLINE, SendEditor(SCI_GETLINECOUNT), FALSE); } return TRUE; case WM_CLOSE: ::SendMessage(hDlg, WM_COMMAND, IDCANCEL, 0); break; case WM_COMMAND: if (ControlIDOfCommand(wParam) == IDCANCEL) { ::EndDialog(hDlg, IDCANCEL); return FALSE; } else if (ControlIDOfCommand(wParam) == IDOK) { BOOL bHasLine; int lineNumber = static_cast( ::GetDlgItemInt(hDlg, IDGOLINE, &bHasLine, FALSE)); BOOL bHasChar; int characterOnLine = static_cast( ::GetDlgItemInt(hDlg, IDGOLINECHAR, &bHasChar, FALSE)); if (bHasLine || bHasChar) { if (!bHasLine) lineNumber = SendEditor(SCI_LINEFROMPOSITION, SendEditor(SCI_GETCURRENTPOS)) + 1; GotoLineEnsureVisible(lineNumber - 1); if (bHasChar && characterOnLine > 1 && lineNumber <= SendEditor(SCI_GETLINECOUNT)) { // Constrain to the requested line int lineStart = SendEditor(SCI_POSITIONFROMLINE, lineNumber - 1); int lineEnd = SendEditor(SCI_GETLINEENDPOSITION, lineNumber - 1); int position = lineStart; while (--characterOnLine && position < lineEnd) position = SendEditor(SCI_POSITIONAFTER, position); SendEditor(SCI_GOTOPOS, position); } } ::EndDialog(hDlg, IDOK); return TRUE; } } return FALSE; } BOOL CALLBACK SciTEWin::GoLineDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { return Caller(hDlg, message, lParam)->GoLineMessage(hDlg, message, wParam); } void SciTEWin::GoLineDialog() { DoDialog(hInstance, "GoLine", MainHWND(), reinterpret_cast(GoLineDlg)); WindowSetFocus(wEditor); } BOOL SciTEWin::AbbrevMessage(HWND hDlg, UINT message, WPARAM wParam) { HWND hAbbrev = ::GetDlgItem(hDlg, IDABBREV); switch (message) { case WM_INITDIALOG: LocaliseDialog(hDlg); FillComboFromProps(hAbbrev, propsAbbrev); return TRUE; case WM_CLOSE: ::SendMessage(hDlg, WM_COMMAND, IDCANCEL, 0); break; case WM_COMMAND: if (ControlIDOfCommand(wParam) == IDCANCEL) { ::EndDialog(hDlg, IDCANCEL); return FALSE; } else if (ControlIDOfCommand(wParam) == IDOK) { ::GetDlgItemText(hDlg, IDABBREV, abbrevInsert, sizeof(abbrevInsert)); ::EndDialog(hDlg, IDOK); return TRUE; } } return FALSE; } BOOL CALLBACK SciTEWin::AbbrevDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { return Caller(hDlg, message, lParam)->AbbrevMessage(hDlg, message, wParam); } bool SciTEWin::AbbrevDialog() { bool success = (DoDialog(hInstance, "InsAbbrev", MainHWND(), reinterpret_cast(AbbrevDlg)) == IDOK); WindowSetFocus(wEditor); return success; } BOOL SciTEWin::TabSizeMessage(HWND hDlg, UINT message, WPARAM wParam) { switch (message) { case WM_INITDIALOG: { LocaliseDialog(hDlg); ::SendDlgItemMessage(hDlg, IDTABSIZE, EM_LIMITTEXT, 2, 1); int tabSize = SendEditor(SCI_GETTABWIDTH); if (tabSize > 99) tabSize = 99; char tmp[3]; sprintf(tmp, "%d", tabSize); ::SetDlgItemText(hDlg, IDTABSIZE, tmp); ::SendDlgItemMessage(hDlg, IDINDENTSIZE, EM_LIMITTEXT, 2, 1); int indentSize = SendEditor(SCI_GETINDENT); if (indentSize > 99) indentSize = 99; sprintf(tmp, "%d", indentSize); ::SetDlgItemText(hDlg, IDINDENTSIZE, tmp); ::CheckDlgButton(hDlg, IDUSETABS, SendEditor(SCI_GETUSETABS)); return TRUE; } case WM_CLOSE: ::SendMessage(hDlg, WM_COMMAND, IDCANCEL, 0); break; case WM_COMMAND: if (ControlIDOfCommand(wParam) == IDCANCEL) { ::EndDialog(hDlg, IDCANCEL); return FALSE; } else if (ControlIDOfCommand(wParam) == IDOK) { BOOL bOK; int tabSize = static_cast(::GetDlgItemInt(hDlg, IDTABSIZE, &bOK, FALSE)); if (tabSize > 0) SendEditor(SCI_SETTABWIDTH, tabSize); int indentSize = static_cast(::GetDlgItemInt(hDlg, IDINDENTSIZE, &bOK, FALSE)); if (indentSize > 0) SendEditor(SCI_SETINDENT, indentSize); bool useTabs = static_cast(::IsDlgButtonChecked(hDlg, IDUSETABS)); SendEditor(SCI_SETUSETABS, useTabs); ::EndDialog(hDlg, IDOK); return TRUE; } } return FALSE; } BOOL CALLBACK SciTEWin::TabSizeDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { return Caller(hDlg, message, lParam)->TabSizeMessage(hDlg, message, wParam); } void SciTEWin::TabSizeDialog() { DoDialog(hInstance, "TabSize", MainHWND(), reinterpret_cast(TabSizeDlg)); WindowSetFocus(wEditor); } void SciTEWin::ParamGrab() { if (wParameters.Created()) { HWND hDlg = reinterpret_cast(wParameters.GetID()); for (int param = 0; param < maxParam; param++) { char paramVal[200]; ::GetDlgItemText(hDlg, IDPARAMSTART + param, paramVal, sizeof(paramVal)); SString paramText(param + 1); props.Set(paramText.c_str(), paramVal); } UpdateStatusBar(true); } } BOOL SciTEWin::ParametersMessage(HWND hDlg, UINT message, WPARAM wParam) { switch (message) { case WM_INITDIALOG: { LocaliseDialog(hDlg); wParameters = hDlg; if (modalParameters) { ::SetDlgItemText(hDlg, IDCMD, parameterisedCommand.c_str()); } for (int param = 0; param < maxParam; param++) { SString paramText(param + 1); SString paramTextVal = props.Get(paramText.c_str()); ::SetDlgItemText(hDlg, IDPARAMSTART + param, paramTextVal.c_str()); } } return TRUE; case WM_CLOSE: ::SendMessage(hDlg, WM_COMMAND, IDCANCEL, 0); break; case WM_COMMAND: if (ControlIDOfCommand(wParam) == IDCANCEL) { ::EndDialog(hDlg, IDCANCEL); if (!modalParameters) { wParameters.Destroy(); } return FALSE; } else if (ControlIDOfCommand(wParam) == IDOK) { ParamGrab(); ::EndDialog(hDlg, IDOK); if (!modalParameters) { wParameters.Destroy(); } return TRUE; } } return FALSE; } BOOL CALLBACK SciTEWin::ParametersDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { return Caller(hDlg, message, lParam)->ParametersMessage(hDlg, message, wParam); } bool SciTEWin::ParametersDialog(bool modal) { if (wParameters.Created()) { ParamGrab(); if (!modal) { wParameters.Destroy(); } return true; } bool success = false; modalParameters = modal; if (modal) { success = DoDialog(hInstance, "PARAMETERS", MainHWND(), reinterpret_cast(ParametersDlg)) == IDOK; wParameters = 0; WindowSetFocus(wEditor); } else { ::CreateDialogParam(hInstance, "PARAMETERSNONMODAL", MainHWND(), reinterpret_cast(ParametersDlg), reinterpret_cast(this)); wParameters.Show(); } return success; } int SciTEWin::WindowMessageBox(Window &w, const SString &msg, int style) { dialogsOnScreen++; int ret = ::MessageBox(reinterpret_cast(w.GetID()), msg.c_str(), appName, style | MB_SETFOREGROUND); dialogsOnScreen--; return ret; } BOOL SciTEWin::AboutMessage(HWND hDlg, UINT message, WPARAM wParam) { switch (message) { case WM_INITDIALOG: LocaliseDialog(hDlg); SetAboutMessage(::GetDlgItem(hDlg, IDABOUTSCINTILLA), staticBuild ? "sdlBasic " : "sdlBasic"); return TRUE; case WM_CLOSE: ::SendMessage(hDlg, WM_COMMAND, IDCANCEL, 0); break; case WM_COMMAND: if (ControlIDOfCommand(wParam) == IDOK) { ::EndDialog(hDlg, IDOK); return TRUE; } else if (ControlIDOfCommand(wParam) == IDCANCEL) { ::EndDialog(hDlg, IDCANCEL); return FALSE; } } return FALSE; } BOOL CALLBACK SciTEWin::AboutDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { return Caller(hDlg, message, lParam)->AboutMessage(hDlg, message, wParam); } void SciTEWin::AboutDialogWithBuild(int staticBuild_) { staticBuild = staticBuild_; DoDialog(hInstance, "About", MainHWND(), reinterpret_cast(AboutDlg)); WindowSetFocus(wEditor); } usr/src/sdlBasic/share/0000777000000000000000000000000010645354312014011 5ustar rootrootusr/src/sdlBasic/share/sdlBasic/0000777000000000000000000000000010645354615015543 5ustar rootrootusr/src/sdlBasic/share/sdlBasic/sdlBasic.api0000755000076500007660000011726310637402047016222 0ustar # sdlBasic un piccolo basic per fare semplici giochi in 2d # # Questo basic al momento funziona su # linux(versioni ragionevolmente nuove) # windows(sia 9x che Nt based) # MacOsX # FreeBSD # NetBSD # MorphOS # AmigaOS # # Questo basic e' una dimostrazione lampante della forza della licenza GPL # L'interprete basic e' il wxbasic di David Cuny ("http://wxbasic.sourceforge.net") distribuito sotto licenza lGPL # le librerie Grafiche SDL ("http://www.libsdl.org")sono distribuite sotto licenza lGPL # il motore grafico e' derivato dal mini gioco aliens ("http://www.libsdl.org/projects/aliens")scritto in c e # distribuito sotto licenza lGPL # le rutine putpixel getpixel sono derivate direttamente dal tutorial delle SDL e migliorate su suggerimento di Gigi Davassi # la rutine line e stata estratta e adattata direttamente dal sorgente di Alvyn Basic con l'autorizzazione dell'autore # # Ho usato anche i sorgenti della libreria sdldraw ("http://sdl-draw.sourceforge.net/") # # Il sottoscritto non ha fatto altro che tagliare incollare e adattare sorgenti altrui distribuiti tutti sotto licenza lGPL. # Questo prodotto e' ovviamente soggetto alla licenza lGPL ed e' gratuito come tutti i programmi # sopra citati. # #_______________________________________________________________________________________________ # # sdlBasic elenco comandi e sintassi # # suggerisco di scaricare wxbasic per le istruzioni specifiche # # sezioni: # Run time # Sub and function # Control structures # Operator # Array # Strings # Maths # Files # Dirs # Data function # console output # Date and time # Memory Bank # # Screen # Graphics # File graphics input output # Image manipulation # Blitting # Sprite system # Bob system # Text draw # Print screen # Sounds and music # CD support # Video Mpeg # Keyboard # Mouse # Joystick # SDLtime # Socket #_________________________________________________________________________________________________________________________ # # note: * non funziona ** non funziona e da testare ? non funziona bene ci sono bachi non risolti -> da eliminare #_________________________________________________________________________________________________________________________ # Run Time # argomenti di run da linea di comando # --nodefaults : disabilita i parametri di default del display # --nosound : disabilita il suono # --nosocket : disabilita il supporto socket # --debug : lancia sdlBasic in modo passo passo # --version : visualizza la versione (iso date) # --license : visualizza la licenza # --copyright : visualizza copyright ( ;-) assolutamente free software ) # --help : visualizza la lista delle opzioni di avvio # const : dichiarazione di costante numerica option explicit : dichiarazione variabile obligatoria option qbasic : permette di usare le rutine dichiarandole all'inizio del file include(filename) : inclusione file sorgente esterno argc : ritorna il numero di argomenti della riga di comando argv : ritorna gli argomenti della riga di comando command[param] : ritorna gli argomenti della riga di comando command$[param] : ritorna gli argomenti della riga di comando argument$(optional n) : ritorna gli argomenti mandatia una sub/function con n=0 o senza parametri ritorna il numero argomenti ?setenv(varname,value) : carica una variabile d'ambiente nel os corrente se esiste e' sovrascritta getenv(varname) : ritorna il valore di una variabile d'ambiente *run : esegue un commando in multitasking shell : esegue un commando, e attende il termine di questo comando per proseguire l'esecuzione end : termina il programma e esce stop : ferma l'esecuzione e avvia il debug os : restituisce il nome del sistema operativo (win32 linux osx o fbsd) isfbsd : restituisce 1 se il sistema operativo usato e' FreeBSD isosx : restituisce 1 se il sistema operativo usato e' MacOSX islinux : restituisce 1 se il sistema operativo usato e' linux iswin32 : restituisce 1 se il sistema operativo usato e' windows ismos : restituisce 1 se il sistema operativo usato e' MorphOS isnetbsd : restituisce 1 se il sistema operativo usato e' NetBSD isamigaos : restituisce 1 se il sistema operativo usato e' AmigaOS # debug viene avviato con l'opzione -debug all'avvio o quando premi ctrl+c durante l'esecuzione di un programma scritto in basic # se tu premi F5 sdlbasic ripredera' la normale esecuzione # con F6 il modo passo passo # con F4 puoi interrogare lo stato di una variabile. Pe interrogare lo stato di un array devi indicare il nome senza # le parentesi quadre e dare il valore degli indici quando richiesti. #_________________________________________________________________________________________________________________________ # Sub and function declare [sub | function][name] : dichiara una subrutine/function in modo qbasic sub[name](args...) : inizia una subrutine exit sub : interrompe una subrutine end sub : termina una subrutine function[name](args...) : inizia una funzione exit function : interrompe una function end function : termina una function return[value | variable] : setta il valore di ritorno di una function (come nomefunc=x) #_________________________________________________________________________________________________________________________ # Control structures while : inizia il ciclo while exit while : interrompe il ciclo while end while : termina il ciclo while wend : termina il ciclo while continue : finisce il ciclo while poi esce if [condition expression] : il controllo di flusso if in sdlBasic ha alcune particolarita: : then : then deve essere seguito o da un : o il coice deve passare alla linea successiva else : lo stesso discorso vale per else elseif : e' supportato elseif che tuttavia si comporta come if end if : deve essere sempre presente e deve essere separato da altri comandi da a capo o : select case [condition expression] : il controllo select case permette di fare una scelta multipla in base a una condizione case : viene usato per determinare una condizione case else : viene usato come condizione di default end select : deve essere inserito alla fine del ciclo select case for[var]=[val1]to[val2][step[vals]] : il classico ciclo for-next e' implementato molto bene for each [var] in [array] : supporta anche il meno classico for each x in array attenzione riporta l'indice dell'array non il valore continue : forza l'uscita da un ciclo for next (funziona solo con for each) exit for : forza l'uscita da un ciclo for next next : la fine del ciclo end for : la fine del ciclo do 1 : inizia un ciclo do-loop loop : termina un ciclo do-loop exit do : esce da un ciclo do-loop *repeat : il ciclo repeat non e' al momento supportato *until : non supportato or : espressione logica "or" usata come condizione di flusso and : espressione logica "and" usata come condizione di flusso xor : espressione logica "xor" usata come condizione di flusso not : espressione logica "not" usata come condizione di flusso #_________________________________________________________________________________________________________________________ # Operator [+] : operatore di addizione [-] : operatore di sottrazione [*] : operatore di moltiplicazione [/] : operatore di divisione [^] : operatore di elevazione a potenza mod : operatore di resto di una divisione shl : shift left slittamento dei bit a sinistra shr : shift right slittamento dei bit a destra #_________________________________________________________________________________________________________________________ # Array dim [name][[index of array]] : dichiara un array nota: gli array usano [] come parentesi *redim [name][[index of array]] : redichiarazione di un array shared [variable] : dichiara un variable esterna in una subrutine common [variable] : dichiara variable o un array globale lbound [array] : ritorna l'indirizzo piu' basso di un array *quicksort [array] : riordina un array ubound [array] : l'indirizzo piu' alto di un array erase [array] : libera un array #_________________________________________________________________________________________________________________________ # Strings asc(char) : ritorna il valore ascii del primo carattere nella stringa char chr(v) : ritorna la stringa corrispondente al valore ascii v chr$(v) : ritorna la stringa corrispondente al valore ascii v *format() : ritorna una stringa formattata con gli argomenti inclusi *format$() : ritorna una stringa formattata con gli argomenti inclusi insert(source$,target$,position) : inserisce la stringa source nella string target alla posizione index insert$(source$,target$,position) : inserisce la stringa source nella string target alla posizione index instr(optional start,source$,target$) : ritorna la posizione in source che ha la stringa target lcase(string$) : converte la stringa in minuscolo lcase$(string$) : converte la stringa in minuscolo left(string$,number) : ritorna i number caratteri piu a sinistra nella stringa left$(string$,number) : ritorna i number caratteri piu a sinistra nella stringa len(string$) : ritorna la lunghezza della stringa length(string$) : ritorna la lunghezza della stringa ltrim(string$) : ritorna la stringa senza gli spazzi a sinistra ltrim$(string$) : ritorna la stringa senza gli spazzi a sinistra mid(string$,start,optional end) : ritorna string with chars 1..n from source mid$(string$,start,optional end) : ritorna string with chars 1..n from source replace(opt index,source$,replace$) : replace string from source with replace starting at index replace$(opt index,source$,replace$) : replace string from source with replace starting at index replacesubstr(source$,rep$) : replace substring in source with withstring ritorna the new string replacesubstr$(source$,rep$) : replace substring in source with withstring ritorna the new string reverse(string$) : reverse a string ritorna the new string reverse$(string$) : reverse a string ritorna the new string right(string$,number) : ritorna rightmost chars in string right$(string$,number) : ritorna rightmost chars in string rinstr(optional start,source$,target$) : reverse Instr function, search from end to start rtrim(string$) : right trim string rtrim$(string$) : right trim string space(n) : ritorna string with n spaces in it space$(n) : ritorna string with n spaces in it str(value) : ritorna string representation of numeric expression str$(value) : ritorna string representation of numeric expression strf(value) : converts a floating point or number value to a string strf$(value) : converts a floating point or number value to a string string(n,string$) : ritorna string m chars wide with n in it string$(n,string$) : ritorna string m chars wide with n in it tally(src$,sub$) : ritorna number of occurances of matchstring trim(string$) : trim string trim$(string$) : trim string typeof(variable) : ritorna string with datatype typeof$(variable) : ritorna string with datatype ucase(string$) : convert string to upper case ucase$(string$) : convert string to upper case val(string$) : ritorna closest numeric representation of number #_________________________________________________________________________________________________________________________ # Maths abs(value) : ritorna absolute value of number acos(value) : ritorna arccos of number asin(value) : ritorna arcsin of number atan(value) : ritorna arctan of number bin(value) : ritorna la rappresentazione binaria del numero bin$(value) : ritorna la rappresentazione binaria del numero cos(value) : ritorna cos of number exp(value) : ritorna exponential function fix(value) : truncate fractional number, rounding down towards zero floor(value) : truncate fractional number, rounding down towards zero frac(value) : ritorna fractional portion of number hex(value) : ritorna hexidecimal representation of number hex$(value) : ritorna hexidecimal representation of number int(value) : convert to 32 bit integer, truncating decimals log(value) : ritorna natural log of expression randomize(value) : reseed the random number generator rnd(optional upper) : ritorna an random number round(value) : round to nearest integer sgn(value) : ritorna sign of numeric expression sin(value) : ritorna sine of given angle in radians sqr(value) : ritorna square root - make sure it's non-negative tan(value) : ritorna tanget of given angle in radians min(value1,value2) : ritorna min number of the operands max(value1,value2) : ritorna max number of the operands bitwiseand(value1,value2) : ritorna the logic and of the operands andbit(value1,value2) : ritorna the logic and of the operands bitwiseor(value1,value2) : ritorna the logic or of the operands orbit(value1,value2) : ritorna the logic or of the operands bitwisexor(value1,value2) : ritorna the logic xor of the operands xorbit(value1,value2) : ritorna the logic xor of the operands #_________________________________________________________________________________________________________________________ # Files open[filename]for{input|output|append}as[stream]: open file stream file input #[stream] : read a line from file stream input #[stream] : read a line from file stream file output #[stream] : print a line in file stream print #[stream] : print a line in file stream close [stream] : close file stream eof(stream) : ritorna nonzero if Eof fileexists(filename) : ritorna true if the file exists filecopy(source,dest) : copy a file filemove(source,dest) : move a file filerename(filename,newname) : rename a file freefile() : ritorna the handle of the next free file kill(filename) : delete filename. filename can be then path+filename loc(stream) : ritorna position in file lof(stream) : ritorna length of file readbyte(stream) : ritorna a byte from the file rename(filename,newname) : rename file seek(stream) : seek file position/ritorna current file position writebyte(stream,byte) : write a byte in the file #_________________________________________________________________________________________________________________________ # Dirs chdir(path) : cambia directory dir dir$ : ritorna current path direxists(path) : ritorna true if directory exists dirfirst(path) : ritorna first entry in path dir dirnext : ritorna next entry in path dir mkdir(path) : create a new directory rmdir(path) : remove directory #_________________________________________________________________________________________________________________________ # Data Function data(optional 0-255 param) : legge la data read(optional pointer) : senza parametri restituisce il valore della data corrente e sposta il puntatore alla successiva: con un valore sposta il puntatore #_________________________________________________________________________________________________________________________ # Console Output print [text|variable|number] : Stampa in standard output un espressione (lo uso per il debug output) #_________________________________________________________________________________________________________________________ # Date and Time date() : ritorna la data in formato MM-DD-YYYY date$() : ritorna la data in formato MM-DD-YYYY time() : ritorna l'ora in formato HH:MM:SS time$() : ritorna l'ora in formato HH:MM:SS ticks() : ritorna il tempo trascorso dall'avvio in millesimi di secondo #_________________________________________________________________________________________________________________________ # Memory Bank # in questa release il numero di banchi e' di 256 reservebank(bank,size) : crea un banco di memoria raw (da 0 a 255) baseimage(bank,image) : collega un banco di memoria alla bitmap di un immagine caricata baseimageCC(bank,image) : collega un banco di memoria alla bitmap di un immagine caricata con la trasparenza basescreen(bank,image) : collega un banco di memoria alla bitmap di uno screen aperto basesound(bank,sound) : collega un banco di memoria con un banco degli suoni caricati freebase(bank) : scollega un banco di memoria a una image o a uno screen freebank(bank) : dealloca un banco di memoria copybank(s,d) : copia il banco s in d loadbank(filename,optional bank) : carica un file nel banco di memoria bank (se omesso il corrente ) savebank(filename,optional bank) : salva un banco di memoria in un file setbank(optional bank) : setta il banco di memoria corrente (se omesso ritorna il corrente) currentbank(optional bank) : setta il banco di memoria corrente (se omesso ritorna il corrente) sizebank(optional bank) : ritorna la dimensione del banco di memoria (se omesso il corrente) banksize(optional bank) : ritorna la dimensione del banco di memoria (se omesso il corrente) poke(optional bank,address,value) : scrive un byte nel banco di memoria all'indirizzo doke(optional bank,address,value) : scrive un valore a 16 bit nel banco di memoria all'indirizzo loke(optional bank,address,value) : scrive un valore a 32 bit nel banco di memoria all'indirizzo peek(optional bank,address) : legge un byte nel banco di memoria all'indirizzo deek(optional bank,address) : legge un valore a 16 bit nel banco di memoria all'indirizzo leek(optional bank,address) : legge un valore a 32 bit nel banco di memoria all'indirizzo memcopy(sbank,s,dbank,d,size) : copia una parte della memoria dela banco s nel banco d #_________________________________________________________________________________________________________________________ # Screen setdisplay(w,h,bpp,m) : apre lo schermo/finestra in double buffer in modo 0=fullscreen|1=window|2=resize|3=fullscreen software (temporaneo) setcaption(title) : cambia il nome della finestra display setalphachannel(v) : attiva disattiva il canale alpha delle trasparenze caption() : riporta il nome corrente della finestra display displaymode : restituisce il modo video del display displaywidth : restituisce la larghezza del display displayheight : restituisce l'altezza del display displaybpp : restituisce la profondita di colore del display screen(n) : attiva lo schermo logico n senza parametri ritorna lo schermo corrente screenz(n,z) : setta lo zorder di uno schermo se z =-1 restituisce z position corrente lastscreen : restituisce l'ultimo screen aperto directscreen : apre direttamente il display come screen(piu veloce ma gli sprite e screen offset non funzionano correttamente) screenopen(n,w,h,dx,dy,dw,dh,flag) : apre lo schermo logico n di dimensione w,h nelle coordinate dx,dy,dw,dh, del display screenclose(n) : chiude lo schermo logico n screenclone(n,s,x,y,w,h,flag) : crea una nuova entrata nello schermo s screencopy(n,x,y,w,h,nd,xd,yd) : copia una porzione di schermo da n a nd screenfade(n,t) : sfuma lo screen n in t time lavora in multitasking senza parametri rende 0 se a terminato screenfadeout(n,t) : sfuma lo screen n in t time lavora in multitasking senza parametri rende 0 se a terminato screenfadein(n,i,t) : sfuma lo screen n verso l'immagine i in t time lavora in multitasking senza parametri rende 0 se a terminato screencrossfade(n,i,t) : sfuma lo screen n verso dall'imagine correntel'immagine i in t time lavora in multitasking senza parametri rende 0 se a terminato screenalpha(n,a) : setta il parametro alpha(trasparenza) allo screen n screenlock(n) : blocca lo screen n per l'accesso diretto dai comandi grafici screenunlock(n) : sblocca lo screen n per l'accesso diretto dai comandi grafici screenrect(x,y,w,h,flag) : modifica le coordinate di output sul display dello screen corrente screenviewport(x,y,w,h,flag) : modifica le coordinate di output sul display dello screen corrente xscreenrect : restituisce la coordinata x del rettangolo di output dello screen corrente screenviewportx : restituisce la coordinata x del rettangolo di output dello screen corrente yscreenrect : restituisce la coordinata y del rettangolo di output dello screen corrente screenviewporty : restituisce la coordinata y del rettangolo di output dello screen corrente wscreenrect : restituisce la coordinata w del rettangolo di output dello screen corrente screenviewportyw : restituisce la coordinata w del rettangolo di output dello screen corrente hscreenrect : restituisce la coordinata h del rettangolo di output dello screen corrente screenviewportyh : restituisce la coordinata h del rettangolo di output dello screen corrente flagscreenrect : restituisce lo stato del flag del rettangolo di output dello screen corrente screenviewportflag : restituisce lo stato del flag del rettangolo di output dello screen corrente screenwidth : restituisce la larghezza dello screen corrente screenheight : restituisce l'altezza dello screen corrente offset (x,y) : posiziona la posiziona di visione del display sullo schermo logico corrente screenoffset (x,y) : posiziona la posiziona di visione del display sullo schermo logico corrente xoffset : restituisce la coordinata x dell' offset dello screen corrente screenoffsetx : restituisce la coordinata x dell' offset dello screen corrente yoffset : restituisce la coordinata y dell' offset dello screen corrente screenoffsety : restituisce la coordinata y dell' offset dello screen corrente cls : cancella lo schermo logico corrente screenswap : scambia lo schermo logico con quello fisico e aggiorna il bob system autoback setautoback(m) : attiva / disattiva lo screenswap automatico m=0 disattivato m>0 attende m millisecondi e performa lo screenswap m<0 esegue il comando screen swap solo se chiamato e dopo m millisecondi dualplayfield(optional m) : attiva / disattiva l'aggiornamento degli screen sopra al piano dei bob waitvbl : attende lo screenswap automatico fps(optional n) : attiva/disattiva o restituisce frame rate corrente (0/1/none) #_________________________________________________________________________________________________________________________ # Graphics rgb(r,g,b) : restituisce il colore corrente in formato Uint32 enablepalette(optional state) : abilita disabilita e verifica il palettemode nel display a 256 colori color (c,optional v) : setta il colore della paletta c con il valore v se mancante restituisce il colore c palette(optional 0-255 param) : setta l'intera paletta colorcycling(s,e,d=0|1,optional delay ) : scorre la paletta dei colori un colore avanti o indietro. Lavora solo in modo 256 colori se si setta il delay funziona in multitasking senza parametri arresta il multitasking ink(c) : seleziona il colore corrente dal formato Uint32 point(x,y) : restituisce la componente colore alla coordinata x,y getpixel(x,y) : restituisce la componente colore alla coordinata x,y dot(x,y) : scrive un punto con il colore ink alla coordinata x,y setpixel(x,y) : scrive un punto con il colore ink alla coordinata x,y putpixel(x,y) : scrive un punto con il colore ink alla coordinata x,y plot(x,y,c) : scrive un punto con il colore c alla coordinata x,y line(x,y,x1,y1) : traccia una linea box(x,y,x1,y1) : traccia un rettangolo vuoto bar(x,y,x1,y1) : traccia un rettangolo pieno rectangle(x,y,w,h,mode) : disegna un rettangolo usando w come larghezza e h come altezza il mode=0 e' il bordo 1=riempimento circle(x,y,r) : traccia un cerchio fillcircle(x,y,r) : traccia un cerchio pieno ellipse(x,y,rx,ry) : traccia un ellisse fillellipse(x,y,rx,ry) : traccia un ellisse piena paint(x,y) : riempie un area chiusa triangle(xa,ya,xb,yb,xc,yc) : disegna una triangolo pieno polyline(xa,ya,xb,yb,xc,yc,.....) : disegna il perimetro di un poligono polygon(xa,ya,xb,yb,xc,yc,.....) : disegna un poligono pieno #_________________________________________________________________________________________________________________________ # File Graphics Input Output # il numero max di images e' di 65536 #il numero max di waves e' di 1024 loadimage(filename,optional n) : carica un imagine nel banco grafico n o uno libero. ritorna n loadzipimage(zipfile,filename,opt n) : carica un imagine nel banco grafico n o uno libero. ritorna n saveimage(filename,n) : salva il banco n nel file grafico (deve essere .bmp) loadsound(filename,n) : carica in un banco un file wav loadzipsound(zipfile,filename,opt n) : carica in un banco un file wav ?savesound(filename,n) : salva in un banco un file wav loadmusic(filename) : carica in un banco un file xm mod #_________________________________________________________________________________________________________________________ # Image Manipulation hotspot(n,x,y) : stabilisce il punto delle coordinate (n,0,0=alto sx | n,1,1=centro | n,2,2 =basso dx)n= image setcolorkey(c) : setta il colore trasparente con -1 (default) viene settato il colore dell'angolo sinistro in alto dell'immagine colorkey(c) : setta il colore trasparente con -1 (default) viene settato il colore dell'angolo sinistro in alto dell'immagine imageexists( n) : restituisce 1 se il banco n esiste 0 se vuoto imagewidth(n) : restituisce la larghezza dell'immagine n imageheight(n) : restituisce l'altezza dell'immagine n deleteimage(n) : cancella l'immagine n dalla memoria copyimage(s,d) : copia l'immagine s nel banco d setalpha(n,a) : setta la trasparenza nell' immagine imagealpha(n,a) : setta la trasparenza nell' immagine zoomimage(n,zoomx.zoomy) : zoomma l'immagine rotateimage(n,angle) : ruota l'immagine rotozoomimage(n,angle,zoom) : ruota e zoomma l'imagine mirrorimage(n,x,y) : riflette in verticale-orizontale l'immagine #_________________________________________________________________________________________________________________________ # Blitting blt(n,sx,sy,sw,sh,dx,dy) : copia un banco nello screen pastebob(x,y,n) : copia sullo schermo il banco n alle coordinate x,y ritagliando pasteicon(x,y,n) : copia sullo schermo il banco n alle coordinate x,y grab(n,x,y,w,h) : ritaglia dallo schermo corrente e copia nel banco #_________________________________________________________________________________________________________________________ # Sprite System #In questa implementazione ci sono 1024 sprite software che sono indipendenti degli screen spriteclip(x,y,w,h) : imposta il clipping degli sprite sprite(n,x,y,fr) : attiva o sposta il sprite n alla coordinata x,y con l'immagine fr deletesprite(n) : disattiva il sprite n xsprite(n) : restituisce la coordinata x del sprite n spritex(n) : restituisce la coordinata x del sprite n ysprite(n) : restituisce la coordinata y del sprite n spritey(n) : restituisce la coordinata y del sprite n spritewidth(n) : restituisce la larghezza del sprite n spriteheight(n) : restituisce l'altezza del sprite n frsprite(n) : restituisce il frame del sprite n spriteimage(n) : restituisce il frame del sprite n livesprite(n) : restituisce 1 se il sprite n e' "vivo" spriteexist(n) : restituisce 1 se il sprite n e' "vivo" spritehit(n, optional x) : restituisce 1 se il sprite n collide con il sprite x se -1 con tutti spritez(n,z) : cambia lo zorder dello sprite se z e' omesso o e'-1 restituisce la z position attuale lastsprite : restituisce l'ultimo sprite attivo autoupdatesprite(m) : attiva / disattiva l'aggiornamento automatico dei sprite allo screenswap updatesprite : attiva un aggiornamento manuale degli sprite allo screenswap #_________________________________________________________________________________________________________________________ # Bob System #In questa implementazione ci sono 1024 bob software che sono dipendenti degli screen e attuano #il background preserve setbob(n,scr) : assegna il bob n allo screen scr bob(n,x,y,fr) : attiva o sposta il bob n alla coordinata x,y con l'immagine fr deletebob(n) : disattiva il bob n xbob(n) : restituisce la coordinata x del bob n bobx(n) : restituisce la coordinata x del bob n ybob(n) : restituisce la coordinata y del bob n boby(n) : restituisce la coordinata y del bob n bobwidth(n) : restituisce la larghezza del bob n bobheight(n) : restituisce l'altezza del bob n frbob(n) : restituisce il frame del bob n bobimage(n) : restituisce il frame del bob n livebob(n) : restituisce 1 se il bob n e' "vivo" bobexist(n) : restituisce 1 se il bob n e' "vivo" bobhit(n,optional x) : restituisce 1 se il bob n collide con il bob x se -1 con tutti bobz(n,z) : setta lo zorder di un bob se z =-1 restituisce la z position corrente lastbob : restituisce l'ultimo bob attivo autoupdatebob(m) : attiva / disattiva l'aggiornamento automatico dei bob allo screenswap updatebob : attiva un aggiornamento manuale dei bob allo screenswap #_________________________________________________________________________________________________________________________ # Text Draw text(x,y,s,testo,optional type) : stampa il testo sul video con s size. Il tipo di render puo essere default=solid 1,Shaded 2=Blended setfont(path) : seleziona il font d'uso getfont() : restituisce il font corrente textrender(testo,s,optional n) : crea il bob n (se omesso restituisce usa e restituisce il primo libero) contenente il "testo" scritto con il font corrente con size s. Il tipo di render puo essere default=solid 1,Shaded 2=Blended #_________________________________________________________________________________________________________________________ # Print Screen pen(c) : setta il colore di print con -1 restituisce il colore corrente paper(c) : settail colore di sfondo del carattere con -1 restituisce il colore corrente fprints(testo) : stampa un testo monospace nella griglia senza il ritorna finale prints(testo) : stampa un testo monospace nella griglia locate(x,y) : muove il cursore di stampa alle coordinate x y atx : restituisce la coordinata x del cursore aty : restituisce la coordinata y del cursore curson : visualizza il cursore lampeggiante sul video alle coordinate (atx,aty) cursoff : spegne il cursore lampeggiante sul video inputs(prompt,defs) : raccoglie l'input da tastiera fino alla pressione di invio e lo restituisce zoneinputs(x,y,l,default) : raccoglie l'input da tastiera fino alla pressione nell'area specificata da x,y,l #_________________________________________________________________________________________________________________________ # Sounds and Music isenabledsound() : restituisce 1 se sdlsound e'abilitato soundenabled() : restituisce 1 se sdlsound e'abilitato soundexists( n) : restituisce 1 se il bancosonoro n esiste 0 se vuoto deletesound(n) : rimuove dalla memoria il suono n copysound(s,d) : copia il suono s in d musicexists() : restituisce 1 se la musica e' caricata 0 se vuoto playsound(n,c,optional l) : suona il suono n nel canale c l volte playfreqsound(n,c,pitch,optional l) : suona il suono n nel canale c con frequenza ricampionata a pitch l volte volumesound(c,optional v) : cambia il volume del canale c (-1 tutti) al valore v (0-128) soundvolume(c,optional v) : cambia il volume del canale c (-1 tutti) al valore v (0-128) stopsound(optional c) : ferma l'emissione del wav dal canale c (senza o -1 tutti) pausesound(optional c) : mette in pausa il canale c (senza o -1 tutti) resumesound(optional c) : sblocca dalla pausa il canale c (senza o -1 tutti) ?vumetersound(optional c) : restituisce lo stato corrente del canale c(senza o -1 tutti) sound3d(c,angle,dist) : posiziona il suono positionsound(c,angle,dist) : posiziona il suono soundChannels(n) : definisce dinamicamente il numero di canali playmusic(n) : suona il track xm,mod,ogg,mp3 n e' l numero di volte (-1 continua) positionmusic(p) : sposta l'esecuzione al secondo indicato stopmusic : termina la riproduzione del modulo musicale pausemusic : mette in pausa la musica in esecuzione resumemusic : riavvia la musica in pausa rewindmusic : riavvolge la musica corrente fademusic(t) : esegue la dissolvenza progressiva della musica volumemusic(optional v) : cambia il volume della musica al valore v (0-128) musicvolume(optional v) : cambia il volume della musica al valore v (0-128) speedmusic(v) : cambia la velocita di esecuzione della musica musicspeed(v) : cambia la velocita di esecuzione della musica #_________________________________________________________________________________________________________________________ # CD Support numdrivescd() : ritorna il numero di drive cd-rom nel sistema. countcddrives() : ritorna il numero di drive cd-rom nel sistema. namecd(drive) : ritorna un' etichetta identificatrice "human-readable", "system-dependent" del cd-rom. opencd(n,drive) : opre la connessione aun drive cd-rom per l'accesso. indrivecd(n) : ritorna 1 se il cd e' nel driver cdinserted(n) : ritorna 1 se il cd e' nel driver trackscd(n) : ritorna il numero di tracce del cd countcdtracks(n) : ritorna il numero di tracce del cd curtrackcd(n) : ritorna la traccia corrente del cd cdcurtrack(n) : ritorna la traccia corrente del cd curframecd(n) : ritorna il frame corrente del cd cdcurframe(n) : ritorna il frame corrente del cd playcd(n,s,l) : suona il cd dal frame s per l frames playtrackscd(n,trk1,fr1,ntrks,nfrs) : suona la traccia selezionata/e 0=tutte playtrackscd(n,trk1,ntrks) : suona tutta la/le traccia/e playtrackscd(n) : suona tutto il cd playcdtracks(n,trk1,fr1,ntrks,nfrs) : suona la traccia selezionata/e 0=tutte playcdtracks(n,trk1,ntrks) : suona tutta la/le traccia/e playcdtracks(n) : suona tutto il cd pausecd(n) : mette in pausa il cdrom resumecd(n) : fa riprendere il cdrom stopcd(n) : ferma il cdrom ejectcd(n) : espelle il cdrom closecd(n) : chiude la connessione al drive cd tracktypecd(n,t) : ritorna il tipo di traccia: SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...) cdtracktype(n,t) : ritorna il tipo di traccia: SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...) tracklengthcd(n,t) : ritorna la lunghezza della traccia t cdtracklength(n,t) : ritorna la lunghezza della traccia t trackoffsetcd(n,t) : ritorna l'offset dall'inizio della traccia t in frames cdtrackoffset(n,t) : ritorna l'offset dall'inizio della traccia t in frames #________________________________________________________________________________________________________________________ # Video Mpeg loadmpeg(fname,usesound) : collega il video mpeg plaympeg(optional loop) : lancia un video mpeg: Attenzione non lavora a fullscreen stopmpeg() : ferma un video in corso deletempeg() : scollega il video mpeg pausempeg() : ferma /riprende il video rewindmpeg() : riavvolge il video all'inizio seekmpeg(p) : sposta al 'bytes' lo scorrimento del video skipmpeg(s) : salta s secondi del video statusmpeg() : restituisce 1 se plaympeg lavora o altrimenti 0 #_________________________________________________________________________________________________________________________ # Keyboard key(keycode) : restitusce 1 se e' premuto il tasto keycode inkey : restituisce il codice ascii del tasto premuto waitkey(optional keycode) : attende la pressione di un tasto(0 qualsiasi) #_________________________________________________________________________________________________________________________ # Mouse xmouse : restituisce la coordinata x del mouse sul display ymouse : restituisce la coordinata y del mouse sul display mousex : restituisce la coordinata x del mouse sul display mousey : restituisce la coordinata y del mouse sul display xmousescreen(n) : restituisce la coordinata x del mouse sullo screen ymousescreen(n) : restituisce la coordinata y del mouse sullo screen mousescreenx(n) : restituisce la coordinata x del mouse sullo screen mousescreeny(n) : restituisce la coordinata y del mouse sullo screen bmouse : restituisce il pulsante premuto del mouse mousebutton : restituisce il pulsante premuto del mouse changemouse(optional n) : cambia il cursore di default oì0 con i cursoi emulati su sprite 0 image 0 (1,2,3) se n e' omesso ritorna il cursore corrente mousepointer(optional n) : cambia il cursore di default oì0 con i cursoi emulati su sprite 0 image 0 (1,2,3) se n e' omesso ritorna il cursore corrente locatemouse(x,y) : sposta il mouse alle coordinate xy placemouse(x,y) : sposta il mouse alle coordinate xy mouseshow : visualizza il cursore del mouse showmouse : visualizza il cursore del mouse mousehide : nasconde il cursore del mouse hidemouse : nasconde il cursore del mouse mousezone(x,y,w,h) : restituisce 1 se il mouse occupa questa parte dello screen #_________________________________________________________________________________________________________________________ # Joystick numjoysticks : retituisce il numero di joysticks presenti namejoystick(i) : retituisce la stringa identificativa del joystick numaxesjoystick(i) : retituisce il numero di assi del joystick numballsjoystick(i) : retituisce il numero di trackball del joystick numhatsjoystick(i) : retituisce il numero di pulsanti direzionali del joystick numbuttonsjoystick(i) : retituisce il numero di pulsanti del joysitck getaxisjoystick(i,a) : retituisce lo stato corrente di un asse gethatjoystick(i,a) : retituisce lo stato corrente di un hat getbuttonjoystick(i,a) : retituisce lo stato corrente di un pulsante xgetballjoystick(i,a) : retituisce la posizione relativa x della trackball ygetballjoystick(i,a) : retituisce la posizione relativa y della trackball joy(i) : retituisce la coordinata del joystick in formato booleano bjoy(i) : retituisce i pulsanti premuti del joystick in formato booleano joybuttons(i) : retituisce i pulsanti premuti del joystick in formato booleano fire(i) : retituisce i pulsanti premuti del joystick in formato booleano waitbjoy(optional i) : attende la pressione di un tasto del joystick #_________________________________________________________________________________________________________________________ # SDLtime wait(t) : attende il trascorrere di t millisecondi timer : restituisce il tick corrente #_________________________________________________________________________________________________________________________ # Socket isenabledsock() : ritorna 1 se sdlnet e' abilitata sock=getfreesock() : ritorna il primo sock libero nel banco sdlSocket sock=OpenSock(port) : apre una sock in ascolto su una porta. In sdlBasic ci sono 256 stream e la sintassi e' molto simile ai comandi file open close. clientsock=AcceptSock(serversock) : Accetta la connessione di un client IsServerReady(Sock) : ritorna True/False se il server manda dati     sock=ConnectSock(ServerName,port) : si connette a un server remoto *ConnectionReadySock(sock) : il server ha accettato la connessione IsClientReady(Sock) : ritorna True/False se il client manda dati CloseSock(sock) : Chiude la connessione del socket. Funziona per client e server *PeekSock(Sock, NumBytes) : legge un dato ricevuto dal socket, ma non lo cancella dal buffer ReadSock(Sock, NumBytes) : legge NumBytes bytes dal socket ReadByteSock(Sock) : legge un singolo byte       ReadLineSock(Sock) : legge una linea WriteSock(Sock, Message, NumBytes) : manda NumBytes della stringa Message al socket WriteByteSock(Sock, Byte) : manda un singolo byte WriteLineSock(Sock, Message) : manda la stringa Message getremoteip(sock) : ritorna l'indirizzo ip del client remoto connesso getremoteport(sock) : ritorna la porta di accesso del client remoto connesso ?getlocalip() : ritorna l'indirizzo ip locale(solo linux/mac) #_________________________________________________________________________________________________________________________ # # to do: # # # sprite editor # ide scritta in sdlBasic # # usr/src/sdlBasic/share/sdlBasic/Global.properties0000755000076500007660000002577110620032366017316 0ustar # Global initialisation file for SciTE # version for sdlBasic editor # For Linux, place in $prefix/share/scite # For Windows, place in same directory as SciTE.EXE (or Sc1.EXE) # Documentation at http://www.scintilla.org/SciTEDoc.html # Globals error.select.line=1 # Window sizes and visibility if PLAT_WIN position.left=0 position.top=0 if PLAT_GTK2 position.left=5 position.top=22 #was 576,640 but that was too narrow and required me to resize all the time position.width=1000 position.height=-1 position.tile=1 #full.screen.hides.menu=1 #minimize.to.tray=1 split.vertical=0 output.horizontal.size=200 output.vertical.size=60 #horizontal.scrollbar=0 horizontal.scroll.width=2200 #output.horizontal.scrollbar=0 #output.horizontal.scroll.width=10000 #output.scroll=0 #end.at.last.line=0 tabbar.visible=1 tabbar.hide.one=1 tabbar.multiline=1 toolbar.visible=1 #undo.redo.lazy=1 statusbar.visible=1 #fileselector.width=800 #fileselector.height=600 #magnification=-1 #output.magnification=-1 # Sizes and visibility in edit pane # Set line.numbers to 4 if you want to see them line.numbers=4 margin.width=0 line.margin.visible=1 #fold.margin.width=16 #fold.margin.colour=#FF0000 #fold.margin.highlight.colour=#0000FF #blank.margin.left=4 #blank.margin.right=4 buffered.draw=1 two.phase.draw=1 use.palette=0 # Element styles #view.eol=1 #control.char.symbol=. caret.period=500 view.whitespace=0 view.indentation.whitespace=1 view.indentation.guides=1 highlight.indentation.guides=1 caret.fore=#FF0000 caret.width=4 caret.line.back=#FFFED8 calltip.back=#FFF0FE edge.column=200 edge.mode=0 edge.colour=#C0DCC0 braces.check=1 braces.sloppy=1 #selection.fore=#006000 # DADADA used as background because it yields standard silver C0C0C0 # on low colour displays and a reasonable light grey on higher bit depths selection.back=#DADADA whitespace.fore=#FF0000 whitespace.back=#FFF0F0 error.marker.fore=#0000A0 error.marker.back=#DADAFF bookmark.fore=#000000 bookmark.back=#FFFF00 use.monospaced=1 # Checking are.you.sure=0 are.you.sure.for.build=0 #quit.on.close.last=1 load.on.activate=1 save.on.deactivate=1 are.you.sure.on.reload=0 #reload.preserves.undo=1 check.if.already.open=1 default.file.ext=.sdlbas title.full.path=1 title.show.buffers=1 save.recent=1 save.session=1 open.dialog.in.file.directory=1 strip.trailing.spaces=1 ensure.final.line.end=1 ensure.consistent.line.ends=1 #save.deletes.first=1 buffers=50 if PLAT_WIN api.*.sdlbas=$(SciteDefaultHome)\..\share\sdlBasic\sdlBasic.api if PLAT_GTK api.*.sdlbas=$(SciteDefaultHome)/sdlBasic.api #win95.death.delay=1000 #translation.missing=*** #read.only=1 # Indentation tabsize=4 indent.size=4 use.tabs=1 indent.automatic=1 indent.opening=0 indent.closing=0 #tab.indents=0 #backspace.unindents=0 #wrap=1 #cache.layout=3 output.wrap=1 #output.cache.layout=3 # Folding # enable folding, and show lines below when collapsed. fold=1 fold.compact=1 fold.flags=16 fold.symbols=1 #fold.on.open=1 # Find and Replace #escapes.in.find.replace=1 if PLAT_WIN find.command=findstr /P /R /S /N /G:/ $(find.files) find.input=$(find.what) # That only works on NT/2000/XP # If GNU grep is available, this works about the same as the GTK version # find.command=grep --line-number -f - $(find.files) # find.input=$(find.what) # If awk is available, this would work: # find.command=awk -v OFS=: -f - $(find.files) # find.input=/$(find.what)/ { print FILENAME, FNR, $0; } # (Similar for gawk, but then you may as well use GNU grep.) if PLAT_GTK find.command=grep --line-number "$(find.what)" $(find.files) find.files=*.*|*.c *.cpp *.cxx *.h|*.bas *.cls *.frm *.dsr #find.replace.matchcase=1 #find.replace.escapes=1 #find.replace.regexp=1 #find.replace.regexp.posix=1 #find.replace.wrap=0 #find.replacewith.focus=0 # Behaviour #eol.mode=LF #eol.auto=1 braces.check=1 braces.sloppy=1 clear.before.execute=1 vc.home.key=1 wrap.aware.home.end.keys=1 autocompleteword.automatic=1 #autocomplete.choose.single=1 autocomplete.*.ignorecase=1 calltip.*.ignorecase=1 caret.policy.xslop=1 caret.policy.width=20 caret.policy.xstrict=0 caret.policy.xeven=0 caret.policy.xjumps=0 caret.policy.yslop=1 caret.policy.lines=1 caret.policy.ystrict=1 caret.policy.yeven=1 caret.policy.yjumps=0 #visible.policy.strict=1 #visible.policy.slop=1 #visible.policy.lines=4 #time.commands=1 # Status Bar statusbar.number=2 statusbar.text.1= line $(LineNumber), column $(ColumnNumber) ($(OverType)) ($(EOLMode)) $(FileAttr) - $(SelLength) chars selected statusbar.text.2=\ $(FileNameExt) (Total size: $(BufferLength) chars, $(NbOfLines) lines) #statusbar.text.3=\ #$(FileNameExt) (modified $(FileDate) at $(FileTime)) $(FileAttr) if PLAT_WIN command.scite.help=explorer "$(SciteDefaultHome)\..\share\doc\sdlBasic\english\index.html" command.scite.help.subsystem=2 if PLAT_GTK BROWSER=firefox #command.print.*=a2ps $(FileNameExt) command.scite.help=$(BROWSER) "file:$(SciteDefaultHome)/../doc/sdlBasic/english/index.html" # Internationalisation # Japanese input code page 932 and ShiftJIS character set 128 #code.page=932 #character.set=128 # Unicode #code.page=65001 code.page=0 #character.set=204 # Required for Unicode to work on GTK+: #LC_CTYPE=en_US.UTF-8 # Export #export.keep.ext=1 export.html.wysiwyg=1 #export.html.tabs=1 #export.html.folding=1 export.html.styleused=1 #export.html.title.fullpath=1 export.rtf.wysiwyg=1 #export.rtf.tabs=1 #export.rtf.font.face=Arial #export.rtf.font.size=9 #export.rtf.tabsize=8 # Define values for use in the imported properties files chars.alpha=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ chars.numeric=0123456789 chars.accented=ŠšŒœŸÿÀàÁáÂâÃãÄäÅ寿ÇçÈèÉéÊêËëÌìÍíÎîÏïÐðÑñÒòÓóÔôÕõÖØøÙùÚúÛûÜüÝýÞþßö # This is a better set for Russian: #chars.accented=ÀàÁáÂâÃãÄäÅå¨¸ÆæÇçÈèÉéÊêËëÌìÍíÎîÏïÐðÑñÒòÓóÔôÕõÖö×÷ØøÙùÚúÛûÜüÝýÞþßÿ # The open.filter setting is only used on Windows where the file selector has a menu of filters to apply # to the types of files seen when opening. # There is a limit (possibly 256 characters) to the length of a filter, # so not all source extensions can be in this setting. source.files=*.asm;*.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hxx;*.hpp;\ *.idl;*.odl;*.rc;*.rc2;*.dlg;*.def;\ *.vb;*.vbs;*.bas;*.frm;*.cls;*.ctl;\ *.java;*.js;*.py;*.pl;*.rb;*.cgi;*.lua;*.conf;\ make*;*.mak;\ *.properties;*.html;*.php;*.phtml;*.xml;*.iface;*.bat;*.e;\ *.sdlbas;*.sdlblib;\ *.txt;*.api open.filter=\ sdlBasic (*.sdlbas)|*.sdlbas|\ sdlBlib (*.sdlblib)|*.sdlblib|\ All Files (*)|*| # Give symbolic names to the set of fonts used in the standard styles. # if PLAT_WIN font.base=font:Lucida Sans Unicode,size:10 font.small=font:Lucida Sans Unicode,size:8 font.comment=font:Comic Sans MS,size:9,italics font.code.comment.box=$(font.comment) font.code.comment.line=$(font.comment) font.code.comment.doc=$(font.comment) font.text=font:Arial,size:10 font.text.comment=font:Lucida Sans Unicode,size:10 font.embedded.base=font:Lucida Sans Unicode,size:10 font.embedded.comment=font:Comic Sans MS,size:8,italics font.monospace=font:Courier New,size:10 font.vbs=font:Lucida Sans Unicode,size:9 font.js=font:Courier New,size:9 font.string.literal=font:Courier New,size:11 # Give symbolic names to the set of colours used in the standard styles. colour.code.comment.box=fore:#007F00 colour.code.comment.line=fore:#007F00 colour.code.comment.doc=fore:#3F703F colour.text.comment=fore:#0000FF,back:#D0F0D0 colour.other.comment=fore:#007F00 colour.embedded.comment=back:#E0EEFF colour.embedded.js=back:#F0F0FF colour.notused=back:#FF0000 colour.number=fore:#007F7F colour.keyword=fore:#0000FF colour.string=fore:#7F007F colour.char=fore:#7F007F colour.operator=fore:#000000 colour.preproc=fore:#7F7F00 colour.constant=fore:#00AA00 colour.error=fore:#FFFF00,back:#FF0000 if PLAT_GTK font.base=font:helvetica,size:12 font.small=font:lucidatypewriter,size:10 font.comment=font:new century schoolbook,size:12 font.code.comment.box=$(font.comment) font.code.comment.line=$(font.comment) font.code.comment.doc=$(font.comment) font.text=font:times,size:14 font.text.comment=font:lucidatypewriter,size:10 font.embedded.base=font:lucidatypewriter,size:12 font.embedded.comment=font:lucidatypewriter,size:12 font.monospace=font:courier,size:12 font.vbs=font:new century schoolbook,size:12 font.js=font:courier,size:10 font.string.literal=font:courier,size:12 # Give symbolic names to the set of colours used in the standard styles. colour.code.comment.box=fore:#007F00 colour.code.comment.line=fore:#007F00 colour.code.comment.doc=fore:#3F703F colour.text.comment=fore:#0000FF,back:#D0F0D0 colour.other.comment=fore:#007F00 colour.embedded.comment=back:#E0EEFF colour.embedded.js=back:#F0F0FF colour.notused=back:#FF0000 colour.number=fore:#7F7F00 colour.keyword=fore:#FF0000 colour.string=fore:#7F007F colour.char=fore:#7F007F colour.operator=fore:#000000 colour.preproc=fore:#7F7F00 colour.constant=fore:#00AA00 colour.error=fore:#FFFF00,back:#FF0000 # Global default styles for all languages # Default style.*.32=$(font.base) # Line number style.*.33=back:#C0C0C0,$(font.base) if PLAT_WIN # Brace highlight style.*.34=fore:#0000FF,bold # Brace incomplete highlight style.*.35=fore:#FF0000,bold if PLAT_GTK # Brace highlight style.*.34=fore:#FF0000,bold # Brace incomplete highlight style.*.35=fore:#0000FF,bold # Control characters style.*.36= # Indentation guides style.*.37=fore:#C0C0C0,back:#FFFFFF # Printing - only works on Windows if PLAT_WIN #print.colour.mode=1 print.magnification=-1 # Setup: left, right, top, bottom margins, in local units: # hundredths of millimeters or thousandths of inches print.margins=1500,1000,1000,1500 # Header/footer: # && = &; &p = current page # &f = file name; &F = full path # &d = file date; &D = current date # &t = file time; &T = full time print.header.format=$(FileNameExt) — Printed on $(CurrentDate), $(CurrentTime) — Page $(CurrentPage) print.footer.format=$(FilePath) — File date: $(FileDate) — File time: $(FileTime) # Header/footer style print.header.style=font:Arial,size:12 print.footer.style=font:Arial Narrow,size:10,italics # Warnings - only works on Windows and needs to be pointed at files on machine #if PLAT_WIN # warning.findwrapped=100,E:\Windows\Media\SFX\Boing.wav # warning.notfound=0,Effect.wav # warning.wrongfile=0,Glass.wav # warning.executeok=0,Fanfare.wav # warning.executeko=100,GlassBreak.wav # warning.nootherbookmark=100,Boing2.wav # Define the Lexer menu, # Each item contains three parts: menu string | file extension | key # The only keys allowed currently are based on F-keys and alphabetic keys and look like # [Ctrl+][Shift+][Fn|a] such as F12 or Ctrl+Shift+D. # A '&' may be placed before a letter to be used as an accelerator. This does not work on GTK+. #~ menu.language=\ #~ Text|txt|Shift+F11|\ #~ &Properties|properties||\ #~ sdlBasic|sdlbas||\ #~ &VB|vb||\ # User defined key commands user.shortcuts=\ Ctrl+F12|IDM_WRAP|\ Ctrl+PageUp|IDM_PREVFILE|\ Ctrl+PageDown|IDM_NEXTFILE| #KeypadPlus|IDM_EXPAND|\ #KeypadMinus|IDM_BLOCK_COMMENT| # Import all the language specific properties files import others import sdlBasic import ../share/sdlBasic/others import ../share/sdlBasic/sdlBasic usr/src/sdlBasic/share/sdlBasic/lizard.mod0000777000076500007660000045441410463130160015766 0ustar lizardking's theme#lizardking/alcatraz#Ý@following synths wereè@used for this tune:@korg wavestation ex,'úroland alpha juno ii,ú@akai x7000. and{@`following machinesã@were used for the5@drums&percussion: Â@óÏakai xr10, roland r8,solton ms5 andü@ Üensoniq vfx-sd1./@please don't use thea@samples from thisæ@tune, but if youÎ@really like them,B@then write to me andÄ@ask for permission...if you want niceø@$Ômusic for your gameD@or demo you can alsoÚ@adress: @4×lizardking/alcatraz¯@&‰gustaf grefbergµ@¥duvhoksvagen 25q@p85651sundsvall,swedenU@or call:060-1014186@ Ö `note! no traders! @¸Õi won't send back anyŒ@®Þswappers disks.......K@KY   4 23!10"#"($%&')*! 23  4 +,-./ M.K.\ì                                                   :l     ¬´\ü ÖÀ ¬ .úÖü ¬Jh ¬LÖ  ¬0´ \ú Öü0 XJÖLÖÀ  ¬h .ú Öì ¬ ´ —üÖü ¬J¬JÖü0  ¬h \ú ÖÀ ¬ ´ .úÖ ¬ÖLÖü XJh \ü Öì0 Ð0h¼ ¬JÖÀ h h¼0þü/Öü €Jà°âú Ö  € ÖJÖü0 ¬\üÖÀ ¬ à¼.úÖì XJ¬JÖü  ¬0\ú Öü0 ¬Jà¼ÖJÖÀ  ¬.ü Ö ¬  ¼—úÖü  ¼ XJ ¼ ¬JÖì0  ¼0 ¬  °\üÖÀ ¬.ú Öü ¬JÖJÖ  ¬  ¼\ú Öü0 ÐJ¬JÖÀ  Ð0.üÖì €  ¼—ú Öü €JÖJÖü0  ¬ÖP\ü ÖÀ ¬ .úÖü ¬JÖ\¬LÖ ¬0 \ú Öü0 XJÖ\ÖLÖÀ  ¬.ú Öì ¬ Ö\—üÖü ¬J¬JÖü0  ¬\ú ÖÀ ¬ .úÖ ¬ ¼ÖLÖü XJ ¼ \ü Öì0 Ð0 °¬JÖÀ h þü/Öü €JÖLâú Ö ÖL €  ¼ÖJÖü0 ¬¾L \üÖÀ ¬ ¾L@.úÖì XJ}L¬JÖü  ¬0¾L0\ú Öü0 ¬J}LÖJÖÀ  ¬¾L .ü Ö ¬ ¾@—úÖü ¾L XJ¾L¬JÖì0 ¾L ¬ L0\üÖÀ ¬L0.ú Öü ¬J@ÖJÖ  ¬ \ú Öü0 ÐJL¬JÖÀ  Ð0L .üÖÜ € }L0—ú ¬Ü €J}@ÖJÖÜ0  €:Œâ0ÖÀ Ö3€ Öü€JÖ €0‘Öü0’€J“ÖÐ €€ â3ðÖü ð€JÖ3ðÖü0 ð€3ðÖÀð€ Ö€Öü €J:Öì0  €0 ÖÐ € : €J:Ö  € :Öü0 €hŒ‘ÖÀ ’€ : Öì €J Öü  €0: Öü0 €J ÖÐ  €: € :Öü €J:Öì0  € h0ÖÀ€Öü€JÖ € Öü0€JÖÐ €0€ }3ðÖü ð€J¬3ðÖü0 ðü:Œ.0ÖÀ 3ü ÖüüJÖ ü0Öü0üJÖÐ ‘ü‘’ü ’Öü “üJ“Öü0 “ü:ÖÀ ü Öü:Öü üJ Öì0 ü0:ÖÐ ü : üJ:Ö  ü Öü0 ü  ÖÀ  ü PÖì PüJ:Öü  ü0 Öü0üJ:ÖÐ  ü: ü :Öü üJ:Öì0  ü ÖÀüÖüüJÖ ü Öü0üJÖÐ ü0ü Öü üJÖü0 ¬h 0\ü ÖÀ ¬ .úÖü ¬JÐ  Ö  ¬0h \ú Öü0 XJà° ÖÐ  ¬€|.ú ¬ €zh Öü ¬Jà° Öü0 ’ ¬”\ú ÖÀ• ¬ •.úÖ• ¬• Öü –XJ€|\ü Öì0 Ð0༠ÖÐ h €|þð€Jàºâú Ö   € º Öü0  :à”üÖÀ : ’ÊúÖì“ :J” Öü  :0àš”ú Öü0  :J€Š ÖÐ  :”ü : €zÊúÖü  :Jàd‘ Öì0 ‘ : ‘”üÖÀ’ :“Êú Öü• :Jà` Ö  : àœ”ú Öü0 :Jàl ÖÐ  :0àz”ü  } àšÊú Öü  :Jàz Öü0   àŒ }ü ÖÀ  ¾úÖü Jàº Ö  0Ðp}ú Öü0 JàŒ ÖÐ  Ðj}ú   Ðt‘¾üÖü ‘J’ Öü0 ’ “}ú ÖÀ“  ”¾úÖ• àŠ Öü JÐ|}ü Öì0 0༠ÖÐ  Ð|}ðJàŠ¾ú Ö    Š Öü0  Å\°@üÖÀ Å ‘ úÖì’ ÅJ“ Öü  Å0.Š@ú Öü0  ÅJŠ ÖÐ   Å.Œ@ü ð Å \Š úÖü  ÅJ\º Öì0   Å @üÖÀ  Å  ú Öü  ÅJ  Ö   Å @ú ÖÜ  ÅJ  ÖÐ   Å0 @ü Å 0 ú ÖÜ 0 ÅJ @ ÖÜ0  @ ü:l ÖÀ  ü  Öü  üJ  Ö   ü0  Öü0  üJ  ÖÐ  üü Öü üJÖü0 üÖÀü ÖüÖü üJÖì0 ü0ÖÐü üJÖ ü Öü0üÖÀü ÖìüJÖü ü0Öü0üJÖÐ üü Öü üJÖì0 ü ÖÀüÖüüJÖ ü Öü0üJÖÐ ü0ü Öü üJÖü0 €:Œâ0ÖÀ Ö3€ Öü€JÖ €0“Öü0 €J ÖÐ  € i i€ 3ðÖü €JÖü0 €ðÖÀð€ Ö€Öü €J:Öì0  €0 ÖÐ € : €J:Ö  € :Öü0 } ‘ÖÀ ’} : Öì úJ Öü  }0: Öü0 úJ ÖÐ  }: } :Öü úJ:Öì0  } â0ÖÀ } Öü úJ Ö  P} PÖü0 púJþ3ðÖÐ }0} 0Öü þ3 úJ Öü0  :}œÖÀ : Öü‘:J‘Ö ’:0’Öü0’:J’ÖÐ :: Öü :JÖü0 :ÖÀ: Ö:Öü :JÖì0 :0ÖÐ: :JÖ : Öü0:}lÖÀ : Öì:JÖü :0Öü0:JÖÐ :: Öü :JÖì0 : ÖÀ:Öü:JÖ : Öü0:JÖÐ :0: ÖÜ:JÖÜ0 üSœSPÖÀ ü ÖüüJS\Ö ü0S| Öü0üJÖÐ üS| ü ¦\Öü üJÖü0 ü¦\ÖÀü h¼Ö ü Öü üJ Öì0  ü0ÖÐü üJÖ ü Öü0üSlþL ÖÀ ü þ@ÖìüJüLÖü ü0þLÖü0üJþ@ÖÐ üüLü þL Öü üJþL0Öì0 ü S@ÖÀü¦LÖüüJSL Ö ü SL0Öü0üJ¬@ÖÐ ü0¬Lü üL Öü üJü@Öü0 ¬:lÖÀ ¬ Öü ¬J Ö  ¬0 Öü0 XJ ÖÐ  ¬¬ Öü ¬JÖü0 ¬ÖÀ¬ Ö¬Öü XJ Öì0  ¬0 ÖÐ ¬   ¬J Ö  ¬ Öü0 ú ül#þ\0            þ\         þ\        àŒ }ü ÖÀ  ¾úÖü Jàº Ö  0Ðp}ú Öü0 Jà€ ÖÐ  Ðj}ú   Ðt‘¾üÖü ‘J’ Öü0 ’ “}ú ÖÀ•  •¾úÖ• àŠ Öü JÐ|}ü Öì0 0༠ÖÐ  Ð|}ðJàŠ¾ú Ö    Š Öü0  àà`SüÖÀ à ‘ªúÖì’ àJ“ Öü  à0àšSú Öü0  àJš ÖÐ   ààlSü ð à àjªúÖü  àJ€z Öì0 ‘ à ’SüÖÀ“ à”ªú Öü• àJ€p Ö  à @|Sú Öü0 àJ@¬ ÖÐ  @ à0Sü € à ªú Öü à àJ Öü0  à ¬}ŒÀÖÀ ¬ Öü ¬J ‘Ö  ‘¬0 ‘Öü0 ‘XJ ’ÖÐ  ’¬ ’’¬ ÖÊ Öü ¬J¾Ê Öü0  ¬ªÀÖÀ¬ Ö¬Öü ‘XJ‘Öì0 ‘¬0‘ÖБ¬ ‘‘¬J‘Ö ’¬ ’Öü0’¬’ÖÀ’¬ ’Öì’XJ“Öü “¬0“Öü0¬JÖÐ ¬¬ ÀÖü XJªÌÖì0 ¬ ªÀÖÀ¬Öü¬JÌÖ ¬  ÀÖü0¬JÖÐ ¬0ªÌ¬ ªÀÖü ¬J ÌÖü0 Å}lÀÖÀ Å Öü ÅJ Ö  Å0 Öü0 ‘ÅJ ‘ÖÐ  ‘ÅÅ ¾Ê Öü ÅJÖÊ Öü0  žÀÖÀÅ ÖÅÖü ‘ÅJ‘Öì0 ‘Å0‘ÖБŠ‘’ÅJ’Ö ’Å ’Öü0’Å’ÖÀ’Å “Öì“ÅJ“Öü “Å0“Öü0ÅJÖÐ ÅÅ ÀÖü ÅJ¾ÌÖì0 Å âÀÖÀÅÖüÅJÌÖ Å ÖÀÖü0ÅJâÌÖÐ Å0ÖÌÅ ¾ÀÖü ÅJÖÌÖü0 ü¬l ÀÖÀ ü Öü üJ Ö  ü0 ‘Öü0 ‘üJ ‘ÖÐ  üü ªÊÖü üJ ÊÖü0  üÖÀÖÀü ÖüÖü ‘üJ‘Öì0 ‘ü0‘ÖБü ‘‘üJ‘Ö ‘ü ’Öü0’ü’ÖÀ’ü ’Öì’üJ’Öü “ü0“Öü0“üJ“ÖÐ “üü Öü üJÖì0 ü þÀÖÀüÖÌÖüüJþÌÖ ü âÀÖü0üJÖÐ ü0þÌü ÖÀÖü üJâÌÖü0 hŒ ÀÖÀ  Öü J Ö  0 ‘Öü0 ‘J ‘ÖÐ   ªÊÖü J ÊÖü0  ÖÀÖÀ ÖÖü ‘J‘Öì0 ‘0‘ÖБ ‘‘J‘Ö  Öü0ÖÀ ÖìJÖü ‘0‘Öü0‘J‘ÖÐ ‘ Öü JÖì0   ÀÖÀÖü‘J‘Ö ‘ ‘Öü0‘J’ÖÐ ’0  Ê Öü  J @Ê Öü0   ::|ÀÖÀ : Öü :J ‘Ö  ‘:0 ‘Öü0 ‘:J ‘ÖÐ  :: ÖÀÖü :JÖü0 :ÖÀ‘: ‘Ö‘:‘Öü ‘:J‘Öì0 ‘:0‘ÖÐ’: ’’:J’Ö ’: ’Öü0’:’ÖÀ’: ’Öì’:J’Öü “:0“Öü0“:J“ÖÐ :: Öü :JÖì0 : ÀÖÀ:Öü:JÖ : ÖÀÖü0:JÌÖÐ  :0ÖÌ  : ÀÖü :J ÖÌÖü0  ::œ¾ÀÖÀ : Öü :J ‘Ö  ‘:0 ‘Öü0 ‘:J ‘ÖÐ  :: ÀÖü :JÖü0 :‘ÖÀ‘: ‘Ö‘:‘Öü ‘:J‘Öì0 ‘:0‘ÖБ: ’ ’:J ’Ö  ’: ’Öü0 ’:}œ’ÖÀ ’: ’Öì “:J “Öü  “:0 “Öü0 “:J ÖÐ  :: Öü :JÖì0 : }lÖÀÖÀ:Öü‘:J‘Ö : Öü0:JâÀÖÐ :0: ÖÀÖü :JÖü0 \ïà°ÀúŒ ‘‘} ‘‘’’’’} ÖÊ ¾Ê ªÜ ªÀ @ P 0 0‘ªÜ ‘ ‘ °‘‘ °‘‘°‘’’’Ö ’’¬ ’’““Ö “¬ ªÐÀ ªÌªÀªÜ ªÜ Ì ªÜ0 À (àh°ªÌªÀh¼ Ì€àh¿Àúl h¼‘‘‘h¼¾Ê ÖÊ  ü ¾À@ü000‘ ü‘‘@ü‘‘0‘0’  ’’@ ’’0’0’  ““@ “““€ü ` ` `à°À¾Ìà°âÀÌà¼ÖÀâÌÖ̾ÀÖÌÐàÖ_ ÀX| Ö\ ‘‘Ö\‘Ö ªÊ  Ê ÖÀÖ ‘‘‘‘‘‘‘h°‘‘h°’’à°’’’’’“} ““““ªÜ þÀ 0ÖÌ @ 0þÌ 0ªÜ âÀ à°þÌÖÀâÌúàh¿ Àм h¼‘‘‘h¼ªÊ  Ê ÖÀà°à° À‘‘‘༒’““Ê @Ê (àà°À:| ‘‘’’“ÖÀ‘‘‘‘‘‘‘‘’’’à°’’’’à°’ ’ ’’’“༓““ÀÖÀÌ ÖÌ ÀÖ̰¾À:œ ‘‘’’¼“À¼‘‘‘‘‘‘‘‘‘‘‘‘’’’’’}œ’ ’’’’’“ŰÖÀ}l‘‘żâÀÖÀ\ï°úŒ0 ‘‘‘‘‘ ’¼’’ ’  ¼  ÖÌ   ÖÌ    ÖÌÖÌ ÖÌ ÖÌ ÖÌ'   ¬oÖÌ@  @.ú Sü @óð\SŒ¾ÀÖÀ \ Öü \J ‘Ö  ‘\0 ‘Öü0 ’\J ’ÖÐ  \\ þÀÖü \JÖü0 \‘ÖÀ‘\ ‘Ö‘\‘Öü ‘\J‘Öì0 ‘\0‘ÖБ\ ’’\J’Ö ’\ ’Öü0’\’ÖÀ’\ ’Öì“\J“Öü “\0“Öü0“\JÖÐ \\ Öü \JÖì0 \ ÖÀ\Öü\JÖ \ Öü0\JÖÐ \0 \ þÊÖü  \J âÊÖü0   €¬lÖÀÖÀ € Öü €J ‘Ö  ‘€0 ‘Öü0 ‘€J ‘ÖÐ  €€ þÀÖü €JÖü0 €‘ÖÀ‘€ ‘Ö‘€‘Öü ‘€J‘Öì0 ‘€0‘ÖБ€ ’’€J’Ö ’€ ’Öü0’€’ÖÀ’€ ’Öì“€J“Öü “€0“Öü0“€JÖÐ €€ Öü €JÖì0 ú  ÀÖÀúÖüúJÖ ú Öü0úJÖÐ ú0 ú ªÊÖü  úJ  ÊÖü0   :}œ¾ÀÖÀ : Öü :J Ö  :0 Öü0 :J ÖÐ  :: ÀÖü :J Öü0 :ÀÖÀ: Ö:Öü :JÖì0 :0ÖÐ: :J ¾ÀÖ   : ÖÀÖü0  :}l¾ÀÖÀ : Öì :J Öü  :0 Öü0 :J ÖÐ  :: Öü :JÖì0 : ÖÀ:ÖÜ:J¬Ü : ÖÜ0:JÖÐ :0  : ÖÜ :J ÖÜ0  }SŒþÀÖÀ } Öü }J ‘Ö  ‘}0 ‘Öü0 ‘úJ ’ÖÐ  ’} ’’} ¾Ê Öü }JªÊ Öü0  }—ÀÖÀ} Ö}Öü ‘úJ‘Öì0 ‘}0‘ÖБ} ‘‘}J‘Ö ’} ’Öü0’}’ÖÀ’} ’Öì’úJ“Öü “}0“Öü0}JÖÐ }} þÀÖü úJ—ÌÖì0 } —ÀÖÀ}Öü}JþÌÖ } ÀÖü0}JÖÐ }0—Ì} —ÀÖü }JÌÖü0 ¬h 0}<0ÖÀ¬ Öü¬JÐ <Ö  ¬0h }<Öü0XJà°¾0ÖÐ ¬€|<¬ €zÖ:Öü  ¬Jà°¾0Öü0 ’‘¬”‘ÖÀ•’¬ •“Ö•“¬•4“Öü –“XJ€|}<Öì0 Ð0༠þ: ÖÐ h €|}<€Jàºð:Ö   € º0Öü0 þ3 :€` ÖÀ : ‘ Öì’“:J“: Öü  :0€j Öü0  :J@j:ÖÐ  :: : @j4‘Öü ’:J€d‘“Öì0 ’”: “ÖÀ”:”:Öü” :J@`:Ö  : €l:Öü0 :J@l0ÖÐ :0€j}< : jþ: Öü  :J@jð4’Öü0  ’àŒ ðÖÀ‘ ’Öü“Jàº Ö   0Ðp Öü0Jà€ÖÐ Ðj   Ðt‘ Öü ’ J“Öü0 ”‘”‘ÖÀ•’ •“Ö•“àŠ´: Öü  JÐ| Öì0 0༠¾: ÖÐ  Ð|ð3öðJàŠ3ÿÖ  ó Šð3Öü0 Ö3 àà` ÖÀ à ‘ Öì’’àJ“Öü  à0àš: Öü0  àJš: ÖÐ   ààl: ð‘à àj’Öü “àJ€z”Öì0 ‘”à ‘ÖÀ’à“: Öü” àJ€p: Ö  à @|: Öü0 àJ@¬ÖÐ  @à0}< €à 3ýÖü àýàJ ¾: Öü0  à àŒ þ0ÖÀ h<ÖüJàºð:Ö   0Ðp:Öü0 JàŒ ÖÐ  Ðj:   Ðt:Öü  J´0Öü0 ’ÖÀ ÖàŠ¾0Öü J€|h<Öì0 0༠ð3ðÖÐð €|h< JàŠÖ3ðÖ   Šþ0Öü0 ð3Å\°ÖÀÅ ÖìÅJÖü  Å0(ŠÖü0 ÅJšÖÐ  Å”Œ: ð Å (Š Öü  ÅJ\º:Öì0   Å :ÖÀ  Å :Öü  ÅJ  Ö   Å :Öü0  ÅJ :ÖÐ   Å0 < Å 0 0Öü 0 @ÅJ @ pÖü0  @ ð¬h 0}<0ÖÀ¬ Öü¬JÐ <Ö  ¬0h }<Öü0XJà°¾0ÖÐ ¬€|<¬ €zÖ:Öü  ¬Jà°¾0Öü0 ’‘¬”‘ÖÀ•’¬ •“Ö•“¬•4“Öü –“XJ€|}<Öì0 Ð0༠þ: ÖÐ h €|}<€Jàºð:Ö   € ºð0Öü0 Ö3 :€` ÖÀ : ‘ Öì’’:J“: Öü  :0€j Öü0  :J@j:ÖÐ  :: : @j4‘Öü ’:J€d‘“Öì0 ‘”: ’ÖÀ“:”:Öü” :J@`:Ö  : €l:Öü0 :J@l}0ÖÐ :0€jþ< : jð: Öü  :J@jþ4’Öü0  ’üìþ_}àl 0h“    þ\   ¾Ú ¾Ú ¾Ú  hœ¾Ú ð œ ´“ ¡¡¾Ú¢  ¾Ú hœ  hœ¾Ú ´¾Ú ð“¾Ú ¾ÐÐŒ  ¾Ú ‘ ‘¾Ú ‘¾Ú ‘¾Ú ’’’’¾Ú ““ “ “þ\0þ\þ\hœ&Ö“ðhœ¾Ú ʾڑ ’ ´“ðúìþ_Ð| 0 “    þ\   ¾Ú ¾Ú ¾Ú ‘‘’¾Ú “  ”‘¾Ú’   0¾Ú ¬œ %”“ð¬œ¾Ú (“ð”œ¾Ú :¾Ú “ €à¾Ð \¼    ¾Ú  ¾Ú ‘¾Ú ‘¾Ú ‘‘‘‘¾Ú ’’ ’ ’þ\0“““þ\“þ\ ¾Ú ‘’¾Ú“  ¬“ð”“ðüàþ_h0”Œ @3   þ\  ¾Ú ¾Ú ¾Ú ‘‘‘¾Ú ‘‘ ’ ’’’’’¾Ú“ “ ¾Ú ð3ð¾Ú ‘“¾Ú ¾Ú :à¾Ð”0¼ h3  ¾Ú  ¾Ú ¾Ú ¾Ú ‘‘‘¾Ú ‘’ ’ ’þ\0’““þ\““þ\ 3ð¾Ú ¾Ú‘ ‘ ’’úàþ_@0\¼ .3   þ\  ¾Ú ¾Ú ¾Ú ‘‘‘¾Ú ’’ ’ “““““¾Ú“ “ Ðà¾Ú ð3ð:Œ ¾Ú ‘“¾Ú þ<1¾Ú ð3ó¦à¾ÐÖ3ð€œ ð3ø Ö3ø ¾Ú  ¾Ú ¾Ú ¾Ú ‘‘‘¾Ú ‘’ ’ ’þ\0’€l ““þ\““þ\@3ð¾Ú ¾Ú‘ ‘ ’’üàþ_Ö0”Œ Ê3   þ\  ¾Ú ¾Ú ¾Ú ‘‘‘¾Ú ’’ ’ “““““¾Ú“ “ ¾Ú @3ð¾Ú ‘“¾Ú ¾Ú :à¾Ðð0¼ Ö3  ¾Ú  ¾Ú ¾Ú ¾Ú ‘‘‘¾Ú ‘’ ’ ’þ\0’““þ\““þ\ 3ð¾Ú ¾Ú‘ ‘ ’’úàþ_@0\¼ .3   þ\  ¾Ú ¾Ú ¾Ú ‘’“¾Ú Ê3ò ÐàÖ3ð:Œ ‘’¾Ú“ “ ¦à¾Ú ð3ð€l ¾Ú ‘“¾Ú Ö<1¾Ú @3óüà¾Ðð3ð(¼ ø ø ¾Ú  ¾Ú ¾Ú ¾Ú ‘‘‘¾Ú ‘’ ’ ’üàþ\0     þ\   þ\        ‘  ‘  ’’úìþ_Ð| 0 “    þ\   ¾Ú ¾Ú ¾Ú ‘’“¾Ú ”  ”‘¾Ú’   0¾Ú ¬œ %”“ð¬œ¾Ú (“ð”œ¾Ú :¾Ú “ €à¾Ð \¼    ¾Ú  ¾Ú ‘¾Ú ‘¾Ú ‘‘‘‘¾Ú ’š ’ ’þ\0“““þ\“þ\¾Ú ‘’¾Ú“  ðð\ã            Ð Ð \ Ð \||:\ :\:|:|:|( :\ ( :|( :\Ð ( :| Ð Ð  Ð  :|:|¬o\ú .ú Sü @óð”SlÀÖÀ ” Öü ”J Ö  ”0 Öü0 ‘(J ‘ÖÐ  ‘”” ªÊ Öü ”J¾Ê Öü0  ”ªÀÖÀ” Ö”Öü ‘(J‘Öì0 ‘”0‘ÖБ” ‘’”J’Ö ’” ’Öü0’”’ÖÀ’” “Öì“(J“Öü “”0“Öü0”JÖÐ ”” þÀÖü (JªÌÖì0 ” ÊÀÖÀ”Öü”JþÌÖ ” ¾ÀÖü0”JÊÌÖÐ ”0¾Ì” ªÀÖü ”J¾ÌÖü0 Å}lÀÖÀ Å Öü ÅJ Ö  Å0 ‘Öü0 ‘ÅJ ‘ÖÐ  ÅÅ —ÊÖü ÅJÊÖü0  žÀÖÀÅ ÖÅÖü ‘ÅJ‘Öì0 ‘Å0‘ÖБŠ‘‘ÅJ‘Ö ‘Å ’Öü0’Å’ÖÀ’Å ’Öì’ÅJ’Öü “Å0“Öü0“ÅJ“ÖÐ “ÅÅ Öü ÅJÖì0 Å âÀÖÀžÌÖüÅJâÌÖ Å ÊÀÖü0ÅJÖÐ Å0âÌÅ ¾ÀÖü ÅJÊÌÖü0 à@ŒÀÖÀ à Öü àJ Ö  à0 ‘Öü0 ‘àJ ‘ÖÐ  àà —ÊÖü àJÊÖü0  à¾ÀÖÀà ÖàÖü ‘àJ‘Öì0 ‘à0‘ÖÐ’à ’’àJ’Ö à Öü0àÖÀà ÖìàJÖü ‘à0‘Öü0‘àJ‘ÖÐ ‘àà Öü àJÖì0 à ðÀÖÀàÖü‘àJ‘Ö ‘à ‘Öü0‘àJ’ÖÐ ’à0 à þÊ Öü  àJ Ê Öü0   üü|þÀÖÀ ü Öü üJ ‘Ö  ‘ü0 ‘Öü0 ’üJ ’ÖÐ  üü ¾ÀÖü üJÖü0 üÖÀ‘ü ‘Ö‘ü‘Öü ‘üJ‘Öì0 ‘ü0‘ÖÐ’ü ’’üJ’Ö ’ü ’Öü0’ü’ÖÀ’ü ’Öì’üJ’Öü “ü0“Öü0“üJ“ÖÐ üü Öü üJÖì0 ü þÀÖÀüÖüüJÖ ü ¾ÀÖü0üJþÌÖÐ  ü0¾Ì  ü ÀÖü üJ ¾ÌÖü0  üüœªÀÖÀ ü Öü üJ ‘Ö  ‘ü0 ‘Öü0 ‘üJ ‘ÖÐ  üü þÀÖü üJÖü0 ü‘ÖÀ‘ü ‘Ö‘ü‘Öü ‘üJ‘Öì0 ‘ü0‘ÖБü ’ ’üJ ’Ö  ’ü ’Öü0 ’üSœ’ÖÀ ’ü ’Öì “üJ “Öü  “ü0 “Öü0 “üJ ÖÐ  üü Öü üJÖì0 ü Sl¾ÀÖÀüÖü‘üJ‘Ö ü Öü0üJÊÀÖÐ ü0ü ¾ÀÖü üJÖü0 üïð0þPüì    ì<þ\    ì<þ\  ì<  ì<´Ð´Ú ¬š ´Ú ”š àŒ þ0ÖÀ h<ÖüJàºð:Ö   0Ðp:Öü0 JàŒ ÖÐ  Ðj:   Ðt‘:Öü ‘ J’´0Öü0 ’“ÖÀ“ ”Ö•àŠ¾0Öü JÐ|h<Öì0 0༠ð3ðÖÐð Ð|h< JàŠÖ3ðÖ   Šþ0Öü0 ð3Å\°ÖÀÅ ‘Öì’ÅJ“Öü  Å0\ŠÖü0 ÅJŠÖÐ  Å.Œ: ð Å \Š Öü  ÅJ\º:Öì0   Å :ÖÀ  Å :Öü  ÅJ  Ö   Å/ :Öü0  ÅJ :ÖÐ   Å? < Å/ 0 0Öü  0 @ÅJ @ pÖü0  @ ð¬:P\ü ÖÀ ¬ .úÖü ¬J:\¬LÖ ¬0:| \ú Öü0 XJÖLÖÐ  ¬:|.ú  ¼ ¬  ¼—üÖü  ¼ ¬J ¼¬JÖü0  ¼ ¬ °\ú ÖÀ ¬ .úÖ ¬¼ ÖLÖü XJ ¼\ü Öì0 Ð0¬JÖÐ h ¼ þü/ €J ¼âú Ö  € ÖJÖü0 ¬:\ \üÖÀ ¬ :|.úÖì XJ:\0¬JÖü  ¬0:|\ú Öü0 ¬JÖJÖÐ  ¬:\.ü ¬ :|—úÖü h  XJh ¬JÖì0 h  ¬ h \üÖÀ ¬h .ú Öü ¬JÖJÖ  ¬ h \ú Öü0 ÐJh ¬JÖÐ  Ð0.ü € h —ú Öü €Jh ÖJÖü0  ¬:P\ü ÖÀ ¬ .úÖü ¬J:\¬LÖ ¬0:| \ú Öü0 XJÖLÖÐ  ¬:| .ú ¬ :\—üÖü ¬J¬JÖü0  ¬:\\ú ÖÀ ¬ :Œ.úÖ  ¬ ÖLÖü XJ \ü Öì0  Ð0¬JÖÐ h þü/ €Jâú Ö  € ÖJÖü0 ¬þL \üÖÀ ¬ þ@.úÖì XJüL¬JÖü  ¬0þL\ú Öü0 ¬Jþ@ÖJÖÐ  ¬üL.ü ¬ þL —úÖü XJþL0¬JÖì0  ¬ S@\üÖÀ ¬¦L.ú Öü ¬JSL ÖJÖ  ¬ SL0\ú Öü0 ÐJ¬@¬JÖÐ  Ð0¬L.ü € üL —ú Öü €Jü@ÖJÖü0  üÖPÖÀü ÖüüJÖ\Ö ü0Öü0üJÖ\ÖÐ üü Ö\Öü üJÖü0 üÖÀü Öü ¼Öü üJ ¼ Öì0 ü0 °ÖÐü üJÖLÖ ÖL ü  ¼Öü0ü¾L ÖÀü ¾L@ÖìüJ}LÖü ü0¾L0Öü0üJ}LÖÐ ü¾L ü ¾@Öü ¾LüJ¾LÖì0 ¾L ü L0ÖÀüL0ÖÜüJ@ÖÜ ü Öü0üJLÖÐ ü0L ÖÜ ü }L0ÖÜüJ}@ÖÜ0  ûæÔÆÈÕÝëûÿ5:&ì trrrC"# ìãäáçñõûøõîô÷øý $BD<-+24("&6:;<==8113. ôðìãÝÖȱ«¸½µ ˜š¨µ±¯¸¾ÉÑÖÞåìñ÷&/:O]PDGKOT]rsssssavssshT@$ þñàÈÀ¬ªœœ «¨™¤¥±Ã¶ì!  4,D^YGE;/#"!ó÷ûþøæú1"úñçà¿—¡Ÿ­ºÅÏËÛéîòþý  @o]BMHwrrr]WF*. þÿüþýý @fODA@;)/6-?KEGD3,*3/ øëÝÕÇ´©¦¡› Ÿ•‰€€‰–¤µÈÔçóÿ  (069>ABCFHFDDFEGFCNf`Jbrr_P@,ñëäÒÇŸµ³«­·µ·¹¾ËÕÝ÷%  ü )ANI5%"')"ýü40% øëàØÃ¡’š²¾ÉÍÒÚçîòø"$,HcfdqrrkUE;3' þûüû÷÷ûüúý 1LTE-#&0678<<5+%! íÚÏɺµ±®«ª¨–ƒ‹™­ÁÍÛçô #&%$%*27:;;<=>>===<:866>Q`glk^H4)"ôêâÕȽ¸¶·¹½ÅÅÁ¾ÄÐØÜáí"" *5::5(  ùøûýÿ $1/$õìèáÝÓó««³¾ÍÙæðöû !%0?RhrrrkR=1,($ þûø÷ùûÿ $3>@;2)&&*.1.)"  öè×ËÃÀ¾¾¿¿·ª §²ÀÒâîù $&&%$%(+.2455433444420.-/DGG?7445469;968Hhm\E70*# ((ûþÿõßÉ»·¶·¸¹¾Ðõ# üñäØÖÝèò  ùçÙÐÏÏÐÐÎÏ×ãú    +8FRRG:4223458:;;>NfndL7*''%  $ ùððñîàο¶¶¹½ÂÍã#ûçÚÔÔÜèòû  íÛÏÍÌÏÒÔÔÙãõ  (4ANOB51..02379;=AM^hgZF0#  ûìåâßÛÒÈ¿ºº¿ËÝö$üç×ÑÑÙæñú  óæØÑÍÍÏÔØáëù "*4?MPG6-*()+047: ùXG:>RE;+ óÛÄ»°½×ÌÙßÑÓÕêíêÚßé ! %!&*(*2L>72 þGX;38K>5ëÕÆ¹´´ÔÚÒæáßçñêëÞáð!!'"$')+*3H<'- +]T:1;C:.ñßÏÀ¼¸»ÌÕÓæîëðîìçàåö#&$%&%%')*66" 7YP;'3>4#ïÛÌÁ·µºÌÕÓäóòüþíôíãèú%,(&%%(*++/0!0SWM5%/5,þéÙË¿¸¶¹ÅÒÕÚíûòòîåç÷ ,+%%(*(&#$%!í&APKùýÑÉÔè "*ûÿ 10Ý '÷%MQ¼¾Öäòÿõß 278 :HS0èÜö àýÎ÷µõø 3/3ë :&ÛôÙñµÛç0BÝ*4õý !?ý%S( “ÖààÁ.Õ(/5ð(HQûÍòú%ý'è§åöÌ86ý-/7I?+îóÁýÊØéñ69é øç'Iè '5ô(@2󝨮Éü 0/ö"13 #>Eúò×ïü'((!¢ÙøüëÐA '*6ALù# ¯×ü¸éþ=â!à+9"û:/ /éëµ¥Îõ ,F*1÷ $.è÷äü&D¿ÀÿòÂâý . *7AA1²ÆûùÖIØ÷ñ A?ò.+'ÙÿµÊîÿ7;9ö<ø#öý Ùý&2OèÇæÖ¾áþ 2 "*5B>Iîÿ¹øÿö&þâüÃA?= ), #"ýúÝɰÂðù>4?- þù Ñ #;QKß´´ÐÛþ4 *4?TÿBêâúÖ$ôÿ æúÜÕç 7BQ-$,!&èÄÞã¾æ60:C& àää 3OXôŪËÚõ%&1PS^b4$ ´Å›Ãöý%)**6C[€Òó é!ú #ETïñáÀéõë-LCÝîòñ+:3!3Jàã€ÍÏÜæý71DRYcr ö¬Ã¡ÂÞþ)&?ó+(6GTÛ¶ß ä !N>äö'ãì ìòÿA$çñí&964ý!3I•šÁÏÜå344NXbjWêܯ˨ÀÔ&$9/'1DÞÐÚò#ýÖ %Kÿî4öû Þïý 2 äýüï $3:B -B 쀫×Üë/039Qanz¶èÁÙŠÂÙó'0M&5BèýÍì çñ-% ß !ä ÚýÜññü 40ѤËÖò $o6<:Æ 2:¾ùÔÁÝò-Ý17ckzL€±ÆÖîÜÑè/"÷*15Cõ)85ÏÈèïÿÿáó7.5-ü%> úÎÕì!%0;I/âÿ ,8 Üýì¢ÍÚë÷ 36dhz}·ÈÖçòÄð û+/8 #6?íÆØíúþç-+1ó&6$ÿǸÎó ì(3;FK ï &75éùâ•Ó×ç48YftC÷»±Òæò¸ì&ý3-4ð!7<îÂèõ ."ð'66ëã¯Ñéÿá2;E_÷"03÷±¬ÅÛç,ö -7Ydm, “ÐåïÇâ ï02þ 1<#¤êòÿ"ê '5Pêü Óé¹è¾ABb,&ñ 2*#°£±Ùì"Ì ;[\2=)—õ±á î"+î 2@&áÍèø#HÙ %6Và÷æýáßÚÕò/W_#)+é0; áð˜°Åäê BUWC',Îåï¬Þûü!ý 3D1òÔæôDË %CN éÞþíîµßóh[+1(?êó¼œÁÛçô AL*0@,KŸèÀÕò îÙ+Q.÷Þó=øà#EE+ÕÅû ¼ÆÛí0FV,'5@*#Äý€Åçù'Íø%9J5<. ,L"Ò«ÐîØçéõ%7L7ýæï4;I ÜþÊì Ù¹Üë :7Y34BI ×öžµâéïíÿ'*!$0;;ò:JPô“ÓìÓºðùþ IG-õõýëé37I!ßúÞÛòùúÃÓÞ15C00CQ4ãÝòÿì³Úìëèý %11;9÷9@SD©¸ä Ú¶Øþ1?F0ð .éÄ  47B@ÑþóÓÙÊ °ä.,5=$3CO5Åóæ½â¹÷ú.5;5 +6J[¬Ó ḭ̂ßç1>EPìü +› ** 6D6ÏýßÕ¹Âí× *)2;,7E>3÷ÕþêÜÐÕÛ÷ì/5=E*6DRýÅÿÎÓ¨ÙÛ "7BEÜ ù¿ô;D(#F1çùì°¦ÍïÒ &&086B#.$Þó ïàú×Íúþ×Þ'30AU"2AI'5èʺÝÃÍÞò&N<×þ÷Ô 87A*:Bæù‚´Æêý ý$$-<"4 ;ìø áÐÐæâÍå85@W$,>F ,0µ´Ü×ÇÚñ%7Y÷ô ìÿ þ(/7AO)AøêЀ¸Âñí1%,13ü !23ùì ÄÖܶØå59MS,,6N :%ìÆËâºáúþ!0Iï èèû%(+1@IXÙ²”°Áåö ,0-6(ýç.F < éù ,ÙÀ³µËèö'AZV)+2A$* ݹÞÂæñø#-4ÜýÛëý%@&,#7;=öå"Œ™°ÁÎì.:JS@,6Iàý%7 âËÛåîý1>ÛÀâñúVT%&1CZa˵«ÀêÿEb 75©æñ ,Y0=?2»/¢™±ÄÍß#5;UJ,7HÞþ;6ÍÛåíûD…¾ññû%NYW%,O¹áéô4(‰¯èóû+RPRH0>S7àÛ“¨Æïõü &NkMåÆáïý#J(0>G/åÐÃÜòÌð &9?M-< öÖü/C]FÏÑäõ%ú©Ýîý!JMSW*>U þ ú˜©Íçñùÿ$BW]ô­åïý #D, 0;HJÅþ´Üä¾Ïæ(>C 3;÷øã÷%K^yÍèØðýÜœªÒá #?OLWZ :#ýêÞ¢ÊÞôòþ+7V/ÈÜðû#A(/=BNÜߥßêóºàB;4Ñý0EOqïáæýÖñœ«Áæþ%=MLW_>/ô$îôàÉÄÜñôû /7MåÎíþ#9.;BGïï¯ÖåÿåÎü $G)êÖþ<=JtJöéòÿÔü¦Æëþ=HMS\dù ØÆåÏèõÿ3ÿ&4üáà9"86FPÝ&¸ÅÝ Ãô &:ïÿçù 68KaY*ôí¼èò“Åöúÿ!9DKT]c ùéÌä÷Üïü%&× 2/ö";Fû#ÉÌîýÆ(,ÂÖü,7A]W*.Ÿæò§±úø 7RLSZ655óþê¾æêíúÕ &.&è ,)ö:B ýøýÙ÷ ôó!+ìÕý Ð/5=cY0E$ÎØÙó·€Âñõÿ$NMRQ>B)ñ÷"ù­àò!Ýýþê+ô 7å *(% þò àüì$Ò¾õæ 15=W]?CAÒüÒí§€¾Ôýþ(@PR(#9JWäú ´ÓèÛ·$ø *ô)=ñæ%î"Öùò"þÙÅé ó#8:S^@6 ä δ¯Çïý"?II ,8GXó¬Ñå âÅû","<éíù *å  Ö. ÏêÇä÷ê 77[[?)(÷Ï€±ÄÛþ@;+5@YIø¢Ëè #¤Üõ&&/9 Ñ-þå05Ü­âñà'3:[^>ô"4ìÙ€®ºßç+14÷))5DRd#ɽáôÂ÷ÿ- *.&9øÜçû'þ  .*Íú/, QÛØC;ñ;‚h€i,-!Äà*šØ6½Nã:îTÍ%=Ø8Îæ"Be6 Ì·Q$)ß% ä¨ì,:]T¢œG/3*2 É»-é:ú3N"b€ô•jÄ%h uѬa)®`”yB™'wÂA—ì!©.ÙOuÁ:§ø$a7r¦`– %â;È:òn Á”gX,Tbþ¹þô5#44Ž­+ W-óñ ´ $9ÈåÆþQ^NÞùî9+09#ÈÇÀì$B_4ì÷ü<ó&"$Oüó¬Çä$6) ì A$;ç» 37%ðþ-%1,I4ûñ·à *-ìèØö/ $#,-/ è÷Ö +,éçñ2,"3ùúò+*ðæåò/-*ò1/' çûè ) 8 ú(*9 ÷ýôïú ù,,5 óÿ÷ ò+-*õ ýï'+( ú ,  ùùù!    ýø    ü    !                 þ                                                               ×¼Òÿ 649@J.!0¾ÕîôÓàû")+$ýùÉ  ×ýÿô éý%&1JR[J4¿¼«– Àñî LHHPZL+I*Ý"—Ëê÷ ø( 0?+ 33 , &ü¬¦Üìùþ'=a)-âèÈå(.P[ø÷îÒ»ôâò28EC,AS.ÝÞðÿÞéüãÜüûë''÷ -29XdpuáÇ̓ǜ£Èæ IHLSU,2LYÛ"¹Æ™ÔÜ û)Eø3=97*.$ûÔèÛ³Üôø FKfqêí¸ö*54öúð 4› ×èñú"*AD40CB$ÎÓúôàÏýíö ),ò,+4>MnGO •É—ÈÛáú-5QMTD"9J\MÞÌÅ¢¯Çç+=7 6.<2.ÞØ÷Ñóçóàù&>&,9BG%KU鶯©ÊÕÐØæ/3OSR,'>VhSѬÖ·Èîú 8>A$$7JS#ÎÈá¸Ïô ïô /`eX-íÇüøüÑÝþçû(3JFÆÔáïû+7>7ò%$ãæú&Ððøêì÷V91:.:S"òý€ºÊúæÑì01GWC5CT Rú¥­¼Éì '3;T&,9LZ"Õí×ÎۢΠ#ï @^b;=Ôý ,´Ûåîôì$2P}Ûäñÿ;1þ#ë!Ðþ .$Íù÷Ùðø]]4#5Kçø ŠÉÜü³43B_3&:28^1€ž¬½Ó÷ò33=VP@KRÂõÄØ£¾Í70ã)>ST3OïèÿðÿÃøÜú$3b`¦èö'îõ"ô#+ìáæàñý-Wc;Ö(4÷æØÂáÿðò#=DL6 &EgšŒ°Ääñë)-3I\`69UûéÊÉÔ®Ê×889=G>4C÷ÞäÕýÉñ #;o?4ÒÛ÷Ñäø#%ã"5$ñÈèö ?þ$1ÞÜ ÞÙýéFAæ %=WÖ·¸ÖèßÏ+7DZXX/ôñ¶§¯Ôß6;õ46A$,OçèýçŽëþ ë÷%?]Q H@ʶÙ߯ðé$'5A1 #òÏõ û$@0%ïíýìïû#)&1Þá"/LIº#ø±ÙäËÖ "ATRQ'Eü åï€ØÙè/E+(CA,õÖüäÇðûóäø'W_%:LAÅ»ÝÎÆçÑ-%'6CPîüý ݲ "=L,ûãöÿäû ) ú1E åÕôþ#';S#â!#ÌÖÕ¹ã $>a .6F@äüâÕÓ¾Û%PJ"E$îãðþ#,û þãùÍë&A\b A % ÀÚ¸Ýðç'&+6DPèä ßÅå !+\/ÿûÞÿôÙ'2@BßïàÇ"0HfÈ2®¾Íø '+'19IPãÝö¼êÃÛ %Pb.8çñüÈû '++ÿ Õî¿ä0R`Lø%*ú¢Âæð Ö!*/8HVüñô ÷Þà $6PJÚæîýÔè (S+> ×½Ûó #=g.Ó0ì•âÿ '+3BSGæä·áëâé =NjHÄÞúêËÿ(:TëéÃÎàT_aÞû,Dø°ËêÚó115FR. Ùÿ·ïøã%NR6êÖøöÇá"4LOÞ+»ÃÞï"fRüñ#9MÁ¸øùÁ84ES1LËÎÆßñÿ $GL'B¶÷øÌÚô.3FL à!›Øåý#A^Ý ,@Ìàôø»þ :APC?™ÉÚìú)B9'èÚ×íÛ&/÷#5;%ȸãó"5VQâí´Ñàï/C+4=öãéËç ÷.G+ íÉý ?(é/5>¿ÙÀÜû÷ )\i'8øé«Öå+27ì  þ1ÕÙò$E @Céò¾Ø×'ñ +I>R¸Çëð!&4TÕøù»êø!BJ6 4/ æ.½Õöóëþ@DOÝ ä !ê &4ì è±íóý1HH"6ù÷ ÑÜÙÖùCJLþýï)øÛ "14¤#õþØôý 8BLG"ñåþíÔõ- ý é&ýÛ%3;J-óþÄÐÍöå1DI3;JY("Í©ž½Ñùúá9MYQ6ò"2EɾÙêÖØÒ%Ba(û ÷÷&-#õã ï×÷ÿ-= 8"ÙÝôA$E-)ûð¹ÁÎòö 5J^9!7>2ÅÂØÒ¬çî >: %4>M[Pú)¼€®ÄÖîÓû#43WZb-6<:´ÀÝšÚë !&ú%39ÇD÷844DQeR Ò¶Ž¶ÆÖÈà7,2ELR^84H,9»®©¦¼Ê"218@8MýÜ"5'ϪÝÿÀ÷ÿ &Kc^'Êæõ æ,AÞð-õâ£ëòùAT[c.: Üä×ϬØñ!ì5:6;IVh׆¸ÍÝ¥ñ2/2NIQ[`*XN$€‡©³ÁÕþ"1D .66ý5H-éü'3ãǧëýãÑõ!:T[fIóðÕûîî+6Ëé !.N–Èçðý#=\dpQ÷Ìü¹èÕ¥ò '60ø9CL^ô&é»§¹Ñµè:)0CJHP_qEYkÇ€ƒ®¼Êçó#+[Y ,8þ$QRº'ÆÍê·üÀãê77ZZcPÒþÕýÔè÷!4B+OI€ÐÔûû 'J]go%´îÑËì"éÃ(, : !3P;'âÉÛ°Ñ¿áå74JGHS`rlV%€€§ÆÉõý4DSYB,÷+FM  ×·Ýðäðð¾ã (6IT\fI÷ýùëì¼ÐÑõ $BXLAã½ÁØõ#"EcV.äî¶Üí!ïýû &2.î%8$òÁåÂÚ´àë3DIINWetlô€‚’¨Çèï PNXU(0M)CØÛÌÉáùÔÍìû(;TOWW9B#í±µË¬Öÿ 9Ec]2½ð¢Øô&3G40=ý¾âò '÷ &D/ä$ð$þ êã”ÖÙú+PHKR\i_X.€¨ª€¦Ôð'GMZgç5E* ûé§Ôäü    þ    ù    û  ü þ  þÿ   øöø üþ $%  îðýýû%) îïþøø /' öæðø÷ú &5#'øüñåìöò2;,!öùÿòÞâóî(!)94*&çøþèÛâêî -% 0920)ÿåîíÞÝåçï ).6@A)$ééâÕÌèó.+8DJ5"ðåäáÕÎÝñ ,A=9GI9&êÓÖÙÎÒéò ,DIMSD)ï×ËÆÀÍë"2FMPWK0ìÝËÉÏÁÃâ 0FRRQWM1 êÑÀ¿Á½Ìë1FSZ\ZCøåÔÀ¹´´Õ"8ES[_[=ëÜ˽·¯°Ö2=JX^`[9ãÚÁ¯¬ª¸Ý5AR]abX1úßм®§¤ºè8IW`cbS)ï×È·¨ £¾ó(=MZaedNèÒÀ®£ž£Êþ+CT_efcA ã͹¨ ¥Õ2IYbffb3ýÛ¯¤žªì7N]ehgU#óÖº¨ ›¾ý&?UagihKëδ¦ŸžÑ )EYdiie; 鯮£Ÿ¦ä1J]fijc/úÚ»©¢ž¨ó!;Tbhji\òÒµ¦¡žºþ&AXdjkiMëʰ¥ ž Î ,I\gkjf; â­¤ ž©ã3O_hkj`4׸¨¢Ÿž³äYgmomX#õÓ¶ª¥£¢Ç'B[gmomMíÍ´©¤¢£Ô ,G^inoj; èDZ¨¤£«é6Pcloo_.Ú¼­§¤¢½í"AYgnpnV)ôÑ·«¦£¥Èû*F\iopjKëË´ª¥£¬Ý 1J_jope9ãı¨¥£µç6Sdlpn\1Ü¿¯¨¤£Æó >WfmplM$óÖ¼­§¤©Õý*CZhnphDê竦¤®Ý 3K`koo^6 äDz©¥¤Åí9QcmomR,üØ¿¯¨¥©Ò÷&CZgnpiH#ðÏ·«§¤®Ý-J^joob?éȳª¦¤»æ 1OblonV2 åŲ©¦¥Æñ8SempmO&üÞ¾¯¨¥ªÔÿ%>Xgmpf@öÖ¹­§¥²á+F^joo`<ë͵«¦¥»æ2LblolY2æÆ²ª¦¨Èï7QdmpjM'û౩¦¯Óý)>VgnofIòØ»®¨¦´Û/I^jolcBìË´«§«½æ 3NbloiW4åı©¦±Ìð;UemnaK,Ü¿¯¨¨ÁÖõ$C[hnkZI ÷Ò¸¬§¯Åß.J`jnfR>ëÊ´«§³Îç 6RclnbO7â°©§¼Öì=Xfmm^I3غ­¨«Çàò!F^inkW<,õζ«§®Ëéþ-MakmjS7êı©©±Òñ 8UellgK2àÀ¯©®¹Üô@YgljeH)þÖ»­¨²ºàÿ+H^ili_?îϸ¬«±Æç6NajkgX;åÊ´ª®¿Îì;Sdkj_S/áı©²ÃÒõ#@XfkgYJ'ùؽ®¨»ÉÙ-E[gjaWEðÒ¸¬­ÆÎá 1I^hjZO:ëζ«°ÌÒë8OaifVM3ãÆ²ª·ÎÙü#PYUDD7"ÝÉÀËÞÝèÿ AR[SA=/ûÛÉÁÍÞàñ ,HTXJ@:,ëÐÅÆÚäâò 1MWWE85)çÏÅÆÚåé÷8NWQ?62"ýàÎÄÒâçéý =PWK:51÷ÙËÇÖäæì+HRRF84/éÑÈÉÛçíð3IPM?6-%äÑÌÒÝåîó:JPH>4* ÞÐÍ×àçñü!>LN@;1(ô×ÌÑßäíõ(EOH96+"ðÓÌÓáéñù +JPB71) çÐÌÞèìðû5NK91-(áÍÕâìïô;ND5-+)÷ÜÌØçðñ÷ !?OC1)' öØÍÛëñïû+FL<*(*ïÒÍßðóñ.GH9*&'çÐÔæóïð3EE6'*#úáÒÓèôîù #;FB.$*ïßÕÒëòïü*:B<'$(êÜ×Ûñöô+8>7%"åÞÛæú÷ù/6;2"ûææÜê÷ûü!124)ñæçäòûû÷!123)íèìêñöúü)/--'ççððôýûþ10#&"ûäêùõøü-, $ùíñÿõøý-) öëõúüþ 0#òåúþ%. óêý #* þðð  &&  ùïö  $ ÷ðù  # þóó þ  $ ú÷ô þ"þøø÷   úûúÿ   úþþ   û   þý   ýý       ý     þ        ý  ûÿúþ ý÷üþýú  üûùúù÷  ýøúö÷õõ úø÷ööòø ýùôóôñóù  þôóöôðóóý! #ûóñøôðõó$#%ùòñùòíôö# #$ôðôúïìñö# '&þòëòöíîòû&#'#üòìòñéêó#'!!&'øîíòôêìø #&%%*#õïðñïèîþ#%'&*"ûïîîðìçð%%'%()ñîñññìêö$&#%**ýðëîòðêéú%*'#%)(ýéèïïìèé')$&(*&úæçðïíèí*)#$,- ñèêðïãåó".,$'-'ìçéñïâçõ%..$*1&êàèñçãëû+3-&.2'õäàéïæâî,2*(2. òâáêêßçò #/1*,2.ëßâéçåè÷'/0*-3.ùèãæìæÝçþ*0-(/5+ôãåèêâÜç+00-46) îãâæçÞÛé)242/86'çâáååÛÛî.451287ùáÜÞäãÜàø05515;2ðÜàâãÞÖã%996366+æØÛáâÙÛé /9715<8)ßÖÙâÝÙßî1<928:4 ôÜÔÝãÙ×äù!7>92:80ðÚÔÜâ×Ùå$6>75@9)êÙÒÞÝÔÚê (;=6:?;)åÕØÞÚÔØî0=;8A= úÞÕÙØÔÎØø5===>C6ôÙÔ××ÔÍÞ$9;;;?B0í×ÔÖÔÓÍç );<>>AC(ä×ÙØÕÌÊí1<=?@E@!ûÝÕÙØÒÊÒó8;=@@F:õÜÙÖÒÑÌß"7:AAAC/ìÛÛÓÑÍÌé ,6:?@D@(ãØÙ×ÕÍÓï4<;?AF; úÜÖØÔÐÍÜú8:=BFD4õÙÖÙÒÌÍã$<;;DG@/êÕÙØÑÌÒê /@<=CG?'äÓÖÖÑÍÜô1?=?EF8ýßÓØ×ÐÌÝû6?;@FC2öÝÓÚÔËÑè!:B=CG?( òØÏÖÑÎØð &>C>BC:!ìÖÑ×ÐÍÚ÷-?>;CE8÷åÖÔ×ÏÍà 1>>=DD1ñáÓÑÔÎÔê #3AACD<( íÜÔÕÒÏØð+8>?DD:!úäÛÕÖÑÐÛ÷08(éÛÙÙÓÑÚò-89<@B8þçÚÙØÓÓàû.9<:?7úåÙÖÖÚ×á 2;=;7<. ðߨØÔÙØë )897&åÙØ×ÕÜâò3@=>=61üßÕÚÙÔÞæý8A;?=5+ôÙÒÛרàî%>B;>:1" ï×ÑØÕÚæû,@?:>:,áÑÕÚÙÞêþ4C?<<4&÷ÞÒ×Ù×ßî!9D>=<2$ îØÐÕÕØãõ*@E@?9-üåÑÏØ×Úæþ4EC><6(óßÏÏÕ×Þî $7CB<;3 ìÚÐÐÙÙäõ+:CB;7.ýãØÑÔÙßéü/;BA;3)ôß×ÑÓ×áï$5>B>:0% ëÛÔÑÕÙçô +8BB=<0äÖÎÓØÙèû1=D@<:+úßÔÎÔÖÜì 7@C@@7% ïÚÒÑÕØáð &;DF?:1êÖÏÍÒÙçÿ.>CC@9,øâÓÐÍÔßë 3>BDA8% ðÜÔÐÎ×âò "8AEF?0îÛÒÎÍ×èü+;BFG<,ûæ×ÐÍÒÜì0?FHB7' óàÔÎÌÕÞñ %7@FG>5!îÜÓÉÈÖåü+9CJG<-æØÒÊËÜëþ0=FKG8'÷ßÖÎÈÑáó!9@GLB0 ìÜÔÍÉÔæü+:AHI>,ÿæÖÑÌÊØî2)öäÞÌÅÏÞõ $19IME8 îãÙËÆÐãû)5?KLB1ëâÕÇÅÔê-5BLL>*øéÞÐÄÄÛô /5DNM;% òâÞÌÃÆâý&3=JPH2ïáÕÈÂÎé+9DLPC)ýëÛÐÆÃÕó.íÞÓÇÁÃÚ.9EMPN8úçÞÎÅÁÅá #/;GNQH. öåÙÌÂÂÎì%2=IQOB%ïãÖÊÀÄÕø'5ALRM<ûêßÕȽÂÝ.:CMSK3ôèÚÏýÉè #/!ýêâÕ˾¿Ûý,6?JSO8õêÞÔǼÁá".8BMTL0 ñæÜÐÀ¹Êî%19EPUF&íãÜͽ¸Ðõ,5=GQU=üéßÕʾ½Û/9CLSQ4öæÚÎļÃå %2?GNTK. ïã×̼Ìë*3@IPTD'ëçÔȾ¼Òó-5DKQR=üëâÎŽÀÛ!+7GNUN4ðèÜÏÄ¼Çæ )2>JRVI,ëæØÊ¿»Ìí06AKSTC&èÞÓÆ¼¾×ù16CMTR<öâàÑŽ¿Þ&6;ENUN6ðäÚÏÁºÉæ.6=FPVI/éà×Ì¿¼Ðð/9AKTVA!ýæÝÕÈ»¼Ùû6=BLTS9øáØÐÅ»¿á%8AHOVK-ñàÓʺËî-:FKQWE%êÝÑÈÀ»Õö1;HNTV=ûæÞÍÆ¿½Ú%7@JMRR8óâÖÉ»Àå,6BKRVM,êâÕÊÁ¼Êï/9GNTVE#üåÞÑÇ¿»Ðú%7?HNTT@óá×ÌýÁÜ,7@JQVQ5 ëß×̼Áå2ELTTG'ùåÙÐż¿Óú#7@GOVR=óß×λÂÞ+GOUSF%üåÛÑľÁÓö5@IPTP?öâÚÍþÃÛ%5@JPTN6ðàÔËÿËç *8CKRUG. éÝÕÊÀÁÕð/:GNTQ?"úåÜÒȾÁÙú#6@HNTM8öáÔÍÄ¿Íä'8ELRSD.òáÓÊÁÂ×í +:EMRP='êÝÓÊÁÄÜõ0=FNRL8çØÐÇÁËãþ3CIPSD0øãÓÌÄÂÓê$;GKPO?' ñÞÒÊÃÅÛõ(;FLPK9ëÙÐÈÄÆàý-?INPG/éÕËÆÄÐè2AJNNB*öäÓÊÅÅÔì $4EMOL>$ ïàÐÇÅÆÚö(:INNJ7îÚÌÅÄÍãü-@LPMC.ëÙÊÄÆÖí.AMQK?(øæÕÇÅÉÚò "4DNMI:$ òáÏÅÅÍáö'9IPPF2îÝÍÅÅÑåú*=KPMC.êÖÊÅÇ×ë1CLPï13>Q1>L ÿëñŸ»ËÙôUù#!'2Þ Úÿ û!3: ôî ã#½íôü)=E,6<4ûúãØçÏÍí Ú(.8K+7FRæÍžÃËÚó "$'-;X]:% %ÚÖÔ¶¹Þë÷ AO(7D+#üß÷Ýþîíú+,)1 äî$.õÞõ .: ÿÄñõ *188þ,ùÕçÅìçåô;DKP27/%)ÅÍŸÄËÖë)H ",2<4DH$ÝÝáÛè»Å÷' !%+2&2L¸ÖÙäÂÉå ûö)'*:IQ\k>³¿æï²¨Ðâ,,27KM=I¦ÓýþÝð&$ ì üFÕø (7÷$åÜãý B8× Üú þ$50624-°¼âžÒù:DCHQZKò%9ß¾…ÇÈÑ.;I9/1þ.Oúô×ùïæ÷íúëü-2@VX3 ¾äõÐìÒôû$--7@Ubàöï¾äìôý)/6*!ÿ' èÝÍÞöþ(9ZQúöìúþØôø((2ø! 3AIËãÒÜã½ãî.,ACGNZd?˼³È¢Ò× 0+06JX >÷ÎÎøÿÿ&Úü?-+í#øÿùðèç06<$ãøÓçÿ !-16728üû»§ÇÓø/,AHMN#2 ùÁÄæÇôøý*KN !"û÷âæû ò¾îü2GIOU>1ÌÛ±Îô¼á'&*.5>XgøûñߨâÇ :()9ÜýÐý ù"< )/Úïí&!éþ)+íèüò#/3=A.è-Öš¶Æãò ,ICHLM*>QÜ»î÷©¤àú 4?R`æÜ× (#ÝæóþJU 5:5àù²ãíôåý-%,69:N2‹áèæÚð 07;7?Cäµàêîµ/.26)0:=Ì ÃÓÿîø-EJ»ó7-&.úä í´ÕÞëJELRT&ÿ#3Ü˸ÔëÈý(*,7D]gÎäûþݾíü!'$!=(Õî Óø/87 ø (ü¾ ö5#"-æØùþÇë,.7=FNæ"!ØÚšËßï,2=J0'9F6¾Óéöúçßñ!0\(èÞï ' û "ÙÐÞý 1OU +$6ØÙ¾åðÿÖ ,&,2937 íô‹Óôû /BO#=ê¼Ûéö $+ 'å!êÞ!î#)ÙùÐ 6<þ%G "×ÌÁÑàî EKM..1ïðéüçâáõ.?FG:*ÁÓâõ !7èñðú'47$áÊðü"1- $3+&øÍÐÖæþ09DYZêåùóÓïöâþ/1<2-þ¶õô#ù&!*äú í ,FNÔîð÷ËÛé$4QV"éö¯ëÕü13CJÿ °çõèö 4A. $ÀÝð7F<Þ âñ(:Ñ *4+Ú#µÒÞ 4?%;<àð ÊÐêþ5-4><åñúÝ$öß &CD©Ü÷ø12,/6×üêó %ï&þ!'àýÐã,2 ò .ÕÙçðù!9\_GÉèþøÓî4ø þÿ)3Èôï *@üï&úáß ô.>I:ÑåùÙÙ)?()ûûê# (Ò÷!0GøøüÃø"ü(0=-Ùõ)Ã÷ú A/àÜû0;ôàü & @ êÓÜòù $WO!-öÒ ú äø&& ùü Ù!ùü ù(Éèðú4@gU÷Ãñúñó!4õì ô(3%ß ÕA-þô þåòòÿ9>=ýâÿêù(3ìÿæø>;×öü"'A,õãõÞÿ%ô57<â$(ãéú ê,BüÞó '277'¾ò $þßÜöú'TL$ àõ'ìïÿÖ&*í# "ôúðû ð#/Âòø*J]î æý  #%Øíö 1õï@Eãûáç2Üäõþ =>3)8úï ñ íôôéø 6B^7àý3"ÓýãØ &".þ"6 !üî ôùæñ%6Eàñú%@AùýÕ÷) ý%ôÔÿ û8 è,A,ÒÛÜ-ÿäæü 2B31ýíùáýÕ"Þõÿ &9PA*,Ôø -+õÐÒÞüóÿ1=K!ýì÷ò(éûüÑï'0>/ å*3úðð ' ä-Þïû(õ):ûà$> àÎú%-ÝÕù$(1,%; êÉæöÝîîø;NX?%;áêϺáí " ý23D@éü%ðÅßé. &9ü/;EÞüç õýüðþ 4?EüØþüð ü"7A,Þÿýáö÷îêû *4A),- ÐÒæóùÿî"; +2:> ñ'(ߘÌßýéÿ'+4KU\>á ü»äÚÛâéþ-59;ú16*âñàÿ (òÜ÷$ùò!9!ñ ë !-íêðé <+1:J¾Óéú”Þå/;LODCDPbtYŽŠœ¬¾âø%:FTV* !)Õâ!ñÏë%%ù»çû!<[Jöü#08òÿ½ËÝå '/W\ï»ÌÞêþ*GQQ#ó (:!Ø€µÚàñ.C@CO\m1þÚÙöǪÜÞèó"5YX î(Dle$”ÎØêÿð¢Ýê =@AHOVf !žº°Áì-EKXbOè¾¾×éû0++÷ÿ '+ßÕó,'èû "=ahâú¾Ìãî#'/!äø'%±î"USR/àÁŒ¯ÏæïA>>@BHVeq'ü­€ž¯Óîïø=DKUIúù.:××ÙêËÛü $GMS>&ô$- «Ä¼Ýãû$=Q]K2¯µÕÝëú/DUÿ(&òíÛáÍÞ/3UZ^BúåÜßõæÌéþ/?ÿþ BJ^/+áû¿î⽯×ç 2=?@CIXidÞˆ«˜²Èí (/5FPN*4ëîòõ÷õ"òêðü)?'ù '38ÝìËÝí#4<ü:óþÍêü /9F-+!"0Óì£¶Ðæ -,ACJO[O$îÕµÓǾïð!)8S%($óþ%(ãæýìáüí!55 4:ìñ æÒÊüú=7?7 õúÞáð!40##ìßíçêõ(+0:bI%-çÖÇäïûîó.#ÿ01ù ;; !üÐÄÅüçÜù((+:IQ[%7 ò ò³ÀÆàãí4/6EA!'!÷-ãßâ òö$úì 4ñ3:ÿëçåýü #2Üö ë! ;B=ôÓÙý¯Ê)CLUX% $îÕäàá¶é&#.>H +ù÷ò &æäÏì ø!/7&0:GÏÓû üÝÊä;4€€~€ÁqnË8€€΀€”k€€€¤cÒàW€€Šù€€Èþ§£êÞ€ÖÅÁG$¥Å!é5'‹4#G_NÄ4~JíPl$V>î?àíÿ÷ÆÇÖ„¢¨ÅÊ€€Ž€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€Çˆ€ºÍÃøîëdmXrqq~txiZb'*VOH/ æÊÑÕÉâÛ¼¹±¨—„Œ¢›ˆƒ‰ŠŠž‹€€€ˆ€€€€€€€€†€ƒ—–‰‰Œ®±Ÿ³©°ÊßÍÊÜ×ßðåðøþ(0 6B8(4BLIVmS&(X{ozkABGYtTXXW{[Sa^ccdkVMRVF4IZS;>G7&-%"  þúõðüõèâÏÍÖÐÒØÆ¸ÃÀ¹Á®¨®°« š£¤œ›˜’œ•‘‘‘‹Š‹ˆ‡Š’Š‘œ™’‘–  ““Ÿ¦¥©°³®³µº¾ºÂËËÎÏÑÖÜÜÞÚÚéìïðíéø ##*11,2AADLPRPOZjhghgmpwqq|~~uu{qhmja`a[TSLIHC@9410/-+%$!  üôòôø÷öòêèèççâââÞ×ÓÒÓ×ÓÈÃÇÇÈÈÅ¿»¸·¸·³°¬««§££¥¢ŸžŸ™—™œ˜”—™••™™–•“•—•˜™™•˜ž¡¡Ÿ£££¥¥£¨«­¬«¯±¯²³¶½¿¾»»¿ÆÊÊËËËÍÒÙÛÚÙÝáããåèííïóõõùþÿÿ !"!"""#%%%#"#$&&!"'*)%%%''++(*..//./25567776:@BBCCCDHIHGEIKIKKIKNMLKIGGHHGGECCDCB@?><:87642/,++)'##" þýþÿýûú÷õöõóóòññïîñîíïîîïïïïîîññïññîîïïïññîîíîïòîíïñîîîîííîîìèèéèèéåâäåâÞÞÞÝÜÜÝÝÛØÙÙÕÕÔÏÍÍÏÏÏÍËÇÉÊÌÏÎÊÉÈÇÈÈÇÇÉÉÅÅÇÉÉÊÉÉÈÇÃÄÆÇÆÅÅÆÇÉÇÇÉÉÉÉËÌËËÌÌÌÎÏÏÒÓÒÒÔÔÓÔרØ×ØÙØÙÛÜßßßààáããääåèééêìíððñóõö÷úûýÿ !$(*.01468;<=@ADGJKLNOQQSUWWWYZ[[\]]^^_^^^\\^\[[ZWWYXVUSRQQNMLJIHEDCA@=<:874421.+*)'%#!  ÿþþûûúùùøõôôòñðîîíììëèèççæääãâààßÞÜÛÛÛÚÙØØØÖÖÕÕÔÒÒÑÑÑÐÐÏÍÍÏÍÌÌËËÉÉÉÉÉÈÈÈÉÉÉÈÈÈÈÇÈÊÉÈÈÈÈÈÉÉÉËËËËÌÌÌÎÎÏÏÐÐÑÐÒÒÔÔÕÕ××ÙÙÚÚÛÛÝÞßßàââãåææççèêëìííïïñóôôõööøùúûûýýÿ   ÿýýýýÿýýýÇ€€€€€€€€€€€€€ó€€Ó€v€_ù_€€€;+€€€€ €ä€€€²€€€€¡“¿€€¾€€€€€€€€€€€€€€€€€€€€€€€€€€€ƒ®ËyZ4 çø€±¦€ˆ€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€çÍ¥R!m\hB¡ w€ŠÑHl€‘é€ç­€€ô€€¨€€€€€Š€€€€€€€€€€€€€€€€€€€€²€€çÛ€€”ꀀû€€ÿ8€ÿZ€+¿;òU)ÒC7Úk^¥oŒFû}sóm§' §Ëÿ€Ü„ý°€¸€€€€€€€€€€€€€€€€€€€€€€€€€ç€€€€ˆ€€ç€€2€Ú ”˜?(¾eIw~Fw>s-øœ1€€…:€Á€€€Ò€€¸€€€Š€€€€€€€›€€‚€€€›€€Ò€€Â›€€Ú€¸'ž²¸€aù€JWýUßjLNwhl4 ‰>12<Ø€€Ö€ç☹€€Ý€€²´€€¡€€€€€¸·€Îº¥€”ÿ„€´-€”´¦I€€ÆàͶDÍ”Ûq€{€këйE"€Z¬SpéGcdsnu`åsrEx%nJmddp0C;7l $"÷ëZFÛé÷¸ùYìú$µV€€k…ò¬€U€©)¸€ç€€(¾€€Ò€¬»™€ˆ™€¸€¤ã€®Ë€  üë–ÙI˜*Ͷÿ2'üÞY,cRw>vJ_S3qF4w>ë,=ç6mÚLm&©üxîí›ÖP€™þœ€h’€_€€΀ÚÝ€†Ð‰Â¯€¸Ž™Á€Ú³Óƒ†Î€€›æ§ˆú€ Ÿ€lÚ¸æ}ÃÂiåÌzE«]):ñ3Né>FI"fTI}rý }mit=IñL;î!ù6íÑQÎ!ñÍ3š€:ɦ«ÔÙ´Þ€Õ€…ó²ØÑ€™ò€³ç€ÒÒª½«œåÁãü«æßèј$àÞáÏ ô4ôT¿x q+ é**=DMF@AUF`T´SmNAã_1-÷ö_VÕ/æ)ÆÈüMàøºõäæÝ#ïΰÛ릶¹9È„Äý¤Íä°º>€ú ’ì¸ÝÀ»ªØ¶–õæ€ÌΞÏÜͰ¤ÒùÄëð×õø)ôï1ÿîû8v@ö'),AAf÷0,410þ:dóæõóòô çÚßúáÕØìêÙ±Õúæ½æÔÐåîʰüËÈÙÆàÖëÁëþ¬ëÌùÒìþòßÈ(ÿßËãÚóúñûëþUþõAJ"&&G.),)<@èB)þ!ëüãÿ(Ýå'ú­"þùÿ ÓïÜîåìàùÆÜÂØÇõãÊ áµüßÑðäùÖéôÙÛú Ôßýóêñãöî;óú9ìïB ê+ÿé-ùñöøö! ôèú àÜ÷ ê8Çûö>ïþ úßë÷íñüå÷êàçëáýèè Çð õÕ# éýù.ùûê#äðÙ ùù÷ðÁì(ßëøÚñîçãîíÔúìùèëøÓ íèìøíøñèö úð óþúêýèü êòíìüèùÿçýýîå ý! ,â7 è í ø Ü øø÷ëõúïùÐñáàÞÿÞýîÖìóèå óáÇûöØæÿëÄ ñÛàêò òö÷ öþ üÿý#ý*ý1ó-êýúÿ Õ úðýøæîøî åûíóýîû÷áåèòÊîÊ ÝãîÍ÷ßñÚøñØïÛ÷ò×éþüúîûû þ'ô$ê!ôÛððÿý÷÷ üýüöôô ÷÷ýçö ùÛýòðÐòùêëòæ÷çèùÙÿóÓùÏæ èõöö íöþ þ  í ÿìóí ôùùéöúùèïüîüõîõîëøûíñö ç äöéåùÿåñùðíêïù æ÷ê åëüù÷÷úðöòûùêö÷öùäöêôöóÚ øóüôê,ý  ý& ü íúúúýöðøòöóúòëíâèßüíèðööàîþðóëíëøÓîöóúìèúòóôäìïô óÿý $õ' & þ  ú øèý õåè ÷þúçôýüèîðîçüâäïâóöáÝêííÓüüäïÞöôÖçñÔ ÿù #   /üþò ÿò ïúúøùöóóëîðóñçîðíÞñéñàñöðî÷íóáþùôúí÷úðêø÷êüÿ ñù öý ù÷èüíì úëÿíüôôùú÷çÿûç üçìúèöüöôô üñÿ øö øíýóêÏøïøú÷ùÿõö÷ùôôôüùéñüïôóóöôÞûäïýáðîø÷ëöýíõ ûð÷  $ú  ÿþ ÷þë õýò ÿáÿçèÿçýõóñùüìûöâñøíñóñðèôÖàíÞîçêô×òíüúüíü÷ á ûú ý ýù úýùøüüûú üÿý ÷ úðûçíïøüîò ýýöþÿ÷ÿöÿôüëáùåùôöîÞêëãæõíð×ýëàéçïôñçðííùìøõþö÷   "êòúûö÷÷ëèúýÞýîèêúïÞóäëèÙñÝãåÛàâãææíêèåãæõõäâîùïêùöýý  # # + úüüøôîøã÷ôíßóîäæßçáãåâãââããâßÝçæãâéæÜóòëëíí÷îíùôíûý îúúï  " #ý û ó ÷÷öôðþêòôñóéêúèííîÞúëííÔúííëêëãõìÞæØïçðíáìäôôóúëñðóÿýýøð ÿ ! % % 0   û úýúýðíýùööîúùïø÷ðóôíçè÷ìðÜðëêÞæïâÝàãàèåæíâéæííôéòóëýÿñý     ÷ ýú÷ðóëñóñóéêêëííêÖçãàèâåææîâæîëõéÿõìõúúüûüÿûüÿý    ûÿú ÷û ð ôþýýúúôú÷ùüâóüåùööôèò÷ìèîáïêôðèôðóð÷ôññêí÷üöðôüööö÷ù÷ôÿùýÿý÷ û ÿô    ý     ÷þðôðøìõéõìàùõãñíîçïîçëêúôÔÿøäóîöúìîñóóëôöùüüÿ÷þ      ý ùüýñö÷ú÷çùùêðóñîíîîí÷èíîñîëçîöúöîúóóúùù÷úùüþùÿúÉê, Ý$ûÀ`¡ýõ9ÙýÜüÖøõÓ&È6ý ã=ÓôA¶úä0Öôúïû> ÷9Ôç+ áêEóï áþêö òáäC¨ ûþïþÅ7ÙÎ/û5á ý Þ 9£32¦"Ðû1¿ûÞõç!èé.Êÿ+ßê÷ù&ÙþñïÚü æóù'ÙÝùô"ûô òùû Ó<ÌÚ5Êúâ'åÔ&åß&üýøÎKøðø ï0Óñ#çïýäE³ øñûíÖ'ôó ÓðëEÅõöïõõ÷ î'äùßê$÷íùûýûÿ â*Ç)É#ê þ åþ äÝÛ ï Ûæ ÿ÷ûú ÿ ôýã ïööþýýïþþîúþü ë'ùÚ ×$âôú ìð(Ó × ìðöõ8Íñöùúë ñùï öä(êë(ýù èøôç æðñ ù÷þññ"îô ûó$Þä$èï õ èø÷ý õäñóõõ ÝóßóÝ ÿïõñûÿóóí$ðÿÝûõøóþ÷ û ÷ÿú áùõ ùûõóóþæï ûðõíùù íêî üý õ þþ÷ ôý ãýñî ïù ùøþêóüíöõüô ïåñè üþò ï úïùÿøöùò ôõ þ ð éúöüú ë çÿþûüø õýÿÿ ÷íúëúúø ÿÿü÷îë ÷ýþú úü ò ûùúúýñûñýþþú î ÷üû ÿïûþ ÷ ö ö ó üÿÿ öóïú ùóö ûÿ ù ü þú ñô þõûýüõ ó óîúó¬½ÓR`U8«¿ÚîD``¨´ÎÜ`L-´/$݃Æü4u‹ÈÔ&tæ÷ÓW&/ íã¯ÎåôÐݲîUÝ O5ü 7¬Ý¯à¼ÔüíÖè5*!ñ &&ýîâî¢ðàæßüöÎ) ë å,)è úüà&¶##ºÜü&Ð üå÷ëíÿí!Öýåî ÿ÷ùàýóñ âüëôùà ãùöÿúöôùúÜ,×ÿ â&Öú èê Ýêåüüù Ù7ùóùñ#Üôë óýë4Å ú ôüñà÷öÝ ôð4Ó÷ù ó÷÷ùóë ú æðùñú üýüÿ ê ÔÖðÿë ÿ ëåã óã íÿù üü ÿ÷ý êóùùÿýý óÿ ÿóüÿý ðúã àê÷ü ñôÝàñô ù÷*Ùôùúüðôú óùëððýú îú ÷ííôô úùÿ ôôó÷ üöæëî ó÷î ú ùý÷ëô ö÷÷åö æöå ÿó÷ôüÿööñôÿ å ü÷ úö ÿù ü ùÿü è ú÷úü÷ööÿ í óüô÷ñúúñð óýý÷ÿÿù÷ý êýôó óúúú ÿð öýñù ÷ý ÷ó ëô îýÿ öóü ó úÿú ùúö ÷÷ÿ ô îüù ýü ðíÿÿüýú ÷ýÿÿùñüðüüúÿÿýùóðùýÿüüýö üúüüý ôüôýÿÿü ó ùýüÿóüÿ ÏÊý»ÊMí” Pت·%D»ÔSã€Ù_©§˜ƒ¡îßá6?^mNICBB?[Aõ.6(ý=aGJ@ÖÑÏÜþü·É /0úúj:°Å$%Xf7'CTO?MS]]þ áæ#Ѐ©„€–“Í “‡!¸Öö™‚³à-Ö€ÝJâú³˜»³ê¿„Ñü¾‰‰ˆÙ80S&æÇÚnìÖù-|?ôîdjxK'àÐÓB~'8;37 yAA|Cl#hBe!†€A@²• f€¯.*ö*>Í‚½‹€€ÄÑÔ£ƒ˜•µó×›”˜ï䊴€‘„€€ˆˆ‡¥ž™¿Ã¯¹Ñ€ˆ”˜¿¡…¶O¯ÓpÇ€Î^2oÀ‘[Bö_@Dðƒ€‡¿±ˆ–VZ~9ïìäÃ>'3ÈäÊË9àÐNR[1úI2²ôMèéëUa$Ӏл\P.ÔN7é@VQ ÎóP7t\Ö›„‡‡Œ þ³â}:_ôWsÜ [R`óWX@Õð1NPwn`;&ä³ ^x ‡€ ¢ÿI>"OV8 !×»–€ÝÃ’3tóåòè¹ìò«€Ã¦‹HA_L(£’ŠŸ†–!SN ¿÷ã°‘«ˆ‹›ؼì-WCI=Ñ¾Ô ègæÎ?L1_2$Îê>õMùň§¬4ry úØ€×8QúEWx<7Bb(N}zxùÿ¼ñ-E4 zõ[XekeBaP=Q_ 2tKD(:Fbþ¢€€€ßòý W>ÙÑÿµø9#ҸЀÈÖ˜€Q?FJ ëûA., ÁÜåGY&<Bí½Þ÷8øNs9;ØÈÃ)8ôñú8p%WÝø:QdleµM>1.WKe7÷Ñ£XQ ò)ìo]2/j<ကªü”¥øÀ N84IϬ¡´¹êtù)É͸âí íÆ'æ ø²Í!÷þÓ˜4(¼š×%.æ@-‰ŠØæ  ÷OJO<[}ma Ÿ€€¡Ä™Æ¡üÎèñààü%6íü©€ÔÃ37"òË%ϱÑÑç×ÒÂÙڵ÷¬mcfm" HD.& ñë–¥¹®°Ëï3çÍ3CG[O@@:øšºÉéFGWXfü ÉÑÆ¸ð•ÞèÀÒþ: ëVAOóõúß19vYl?5¯‘€Œƒ‡á?!b|3פ˥Ôû;êÛÚë×í³¾ qQ PNéÕŠ€ˆ r|R@=Þ½èÝÖãË0Ô¡Åë y;'L^ga#½þH´¶²Ù+ààç*n)û:Y?M5_-ü@@U6þî éÚ 8+GTá¾Çâ\cX29;Þð`óÇ6/»¦(_fW8ÕÇà7EF}ljQåÄØãßî~ZûÏ5k|YU> êÍBmMì-߀–"LjI_e3"éÔöã,BÞÕÁ€€Ì»ðK<Îõ'B)þâðþëùñœ„€½Ðú0û¢ºúáÇÀ€€žÿÜ ì¶Ôñ9Tê©€€´Ëí¦¼!?êØ°¥€òîßìUaæ²õo4!ãþÜÞ€€ÍéÖ7jbÁªÑÿè묀ª9C:ûïÏj}`'æ»ó/¿~CÿÉÒÞ!@z?ûþ<.ÓÛ Þ1GOÚÁãB-*J%ê÷@I&!³ÑT`ecoMìÚRaD³¥Ë(5ÞñSGᨂ‹“Îíë°½æâðb;ìÊŒ€ÌÁ*{Wç“°ÅÕ„ˆ…Þü9 ÞÁ¾Þí ý#ÏĤ®Ý Òâ2G"Ȱƒ†‰À5B"óìÉõÚÂî?VûÒ×ÂÖý|H%쥊¬À”¿(,'!ýºÓú9dBúƯÀ:B)FedOþÒÑ \M}S^r^pX84K|ýíåï‘ÂftB?Bp\Q{T$_|`# ÷ëPf`q^KZoÏ´œ"Oy#ëÁÙ€©ú V]Yü;%(^o³•Ðþ6æ%fYo'ú¿˜Æ¿€½ø=zWIF2\4.äó'¼€‚€Ãîä:wz ˜ºÆ€€€µîæÂïªåñüäÝO%€€€ÝÕK9g5½”‡¢ˆ€€ó@ã V+ëÀëE€€€¸]Jçžå €ÒF^>a× ÌÌtÞ€€¯ Ÿž%Ç€€€¾F:6Ïõ8 ¹€ÄB€€€ßB]24Qé‹ü–€‹Di5¢€á å´€‡€€€ÓBtp_È€Žò‚‡‹œû`_=î85ÏÑç*€€ˆ/wKՀ꿀âõNw;âÐ`i-´2ßšÐè_)±€áÒŸÙïY6:OS Öï&Ï€„–6»Îø¹¼ºþ)% ½4ueÄÿ%ß¶>y؆»ÁÖ×ûZVP\A;eo8êûVnýU.ß3HP5 LXthC[&MFý—Ëây[ó;`soJùìÖ¶­e~xô·Ô€½¬Ì ¼˜ó$Ó Ä¯ÇVeJuwF‚‡€€«¦Wâöö'! ì•€€€Û-D !hܱα³° à¸€·êíþ÷ÊÏëÞ&RMö ^\ù™€€€€€žX¸Ð;U-娀¬‘Þ,/ùòh7¸ÒÈ›¥Î 6묠ÚÚÒ µÌÑ¡µÃÿè,õ¦îïéÂÉ[{aIXdrqlþ5ÿLÞ÷¨˜M;zZ-9õuì Q\4û*eL)Õù59>Aðý#åJG4ýúeUÿñžç@W~x&1KQ;xyýtEC, Nak=)Ȳå*\<îºÑÙ³ {ZBÔkW0æÜóYO Ï‘ UY}Ö2 #y2ððkLôæÓ¦ì06Pè¯Áð BM°Æ¥Ïò_Lçð6}SúɳG1õúÛ˜ÉöP ÞêæÞ:#ÚÕêÑIýþù̹Øû³µÌ®ú4赫­ þœÏùS5êÆ˜‘ Ã´µÁªŽ›àÝïÆ€’°´¬á íÑžÑÕè(Ç»®ª¸µÞúõÑ¥±´ÃõÔ€†‡„Œã;²®é7g;ᤖÅü.&ùÊÖÛô÷É×Ü \w@ä%cF($ í÷,^M éíé:øÙã°·ÜIe-R^u% :YF4 6ÙÀÏ÷êù6]Pü;Yw=ñãöã¸Ó 6ZÕÖÉ Ü¶Å˶´àXiEéü ü.ÿÛëðÎ×1ë·­³ì㢼é ÓVT$ÒéjSùÿ! ÇÍþ ^Pîçß2 ÑÇÿóéÑ-JX!$>1t@EO XO>-!ö2jKFy~l,-:D~P8(J%$?coU) (UKþûþ#!DyD-G-/^&#jA 5jH(íì ùGZ,Ngp^.06 ÿü$"7>ììîüãå$8:%XY,'()]E 2<ýÒç"ê÷õÖÜöÝÜ3+ 2'3/ !ý ý!<(' ãÃÓòûI-#-&üüÿáû îæ7þñÓßÞ®Èëÿÿ1)#éîÄÞìËÎàìÚ¼×ÕæúóíïâÓËÞ¶Éö×Öîîûäܺ»ÖÄØÚêèÅÑÅâÒù÷È«™³±²ØÄé ö ÿâØåǽÞòÔÞÓêüþ5*'MLþïØ×é÷àý'2ÿû÷ëîëú&Td5,SôæÐùÏÎóø36?H+üù/5CC*EX&óù÷ÿÿï ñ÷øÎÝé'+')=U3 &$úÞ°É߬½ºÁïöþõùìëèõÿîìï5-ëéÆÚßîöÖìÿìÐôñØý 5?A44/QM>,5öÝÊôÏ×óø(>7/!#9/-??3420A, ú 1+&0FahaVLNQQY:17'×ûàòêõ*4*G6#$H4CKA6=D;-)- úÚÿ ,õù 0A>@GD=66G  þèáó1- #0'/@0#?E7*-3& #ÿú* *;*.GJXFILOH>F>! !äîö!,-%!,1*..3&5E& ùÙììóåèú $!,# ýóáÐÓåçãùïëööôéæ÷ôåÞÿÿò ø úãÑÔäø÷ôëêßæöû÷ï   ý÷÷òÒ¹¾ÄËÑßæô  üöåãýòøøìñ24)ùá×ÚßáÖÒÖûþëðððàê  üçàâî÷üôê  ýãå  ôâßì õöû÷ùõ&AB4% ûïäìììåÞàìñ  øüüþ üóàÕÝçðîãÝÛðöäãõ*9+ÿþöéêãéðûðöõé÷øÿßõûý#-þ ýÿïñùõñù#6 !88]VIS_]NQJDZkfJ ,88-)+7KScP!)NTXaaM(52'-0/44-146=MQO8,5&"3=+ *96ýúûý 0;90?8261  $ü&& *& ôîæç÷"2.ý÷û  670ÿ$,,! ôíêÿúò  úö.*)üÿê÷ñ±Ë]la>´ÓêLll˜¦ÅÔlU2ÿ€±>±Oàaã€êñ:«€¹½hö à ˜ߘÀ”€úˆí5Zk'X €€ñ‰¨€‘€€‰ˆî€€å€c!:fÜ€€C½úQ€‰”€€«Ôš£Dí!€Iê'ê€-¨‰€¹€'CI àÜ×Ó€Æ7€@L€7U¢¯aDÅ>ñàcê ÿ¼ú^ˆ×€¢€Æ·Æ ÷hwCcÂå¦Ð€€€ñ€ÿš ñöf!,07;IG]:¼ ‘ößî€÷€€¢€ÿŸDúl)-ñÎü€a¦¦¼Óš>îoúO$ó>ß•tf^,ÉÜŨ•Ü•êö¹ÐG'àÉ{€ÆÂ¹êî$L:Z-ñ,ã ÔQ½ööööÙ ”¬5ßÙQ-@QXC2¦,€è €÷€ÉßàßaGw$UíQ¯7Ôö”è÷ˆÎ´«íå) 7;]QIDIDóÀ·É€·Ô±÷ü$ >ñ 0ñ7ööö í Àó;ב ú£lè @@àÙú7€íÙ÷•5îOú;üñx€ó÷)ÎÜãú'öÙ íú-ãñÉ^ ããjú¹ÆÔí±ã«-'êZ 2->  !Óóß¼!±ñË ñåT½DÉTÓ2í $:)ÔÙÅÐíÂèñ«!ÿè,0)20 ê-˜!α)ã,¬óÓ>î í> óGêÙL×ñ úèàÿ)úö7 ú ÷ãîãóú ´$÷ ÷ öñÿüúúüàÙ$ÙóúÀ ü×ñLö^ Ó ¹ß¹åÿèîüí ÿ ñÿ ½,öÜ'Ó ËúíÔèãê Gí;óÿ@ÓüúöñÜ Ùíàã'É-ßÿÉü'îÜ êÐ÷êúî ñ÷2êêÿúàöÜ Ù; í ñêññ Å Å ÿÿ÷÷öîÿÿ ãúÅ,ã÷Àöê!$ öêÿÓ)Åö ßîöööíñ÷ñ, îÿñîíêíÜöíö ãú ãüÿ öíö ÐèüúóúÜüúíüú ñîñåöÿÿêú ã à÷ó ê üÿÙãêíåö îúúÿü!è Üîöúåúñü÷ÿó èêÔÿñüúó ñåú öåññöööñãíúÎîè÷  ú ÿÿüööèêüåã ö üö îÿüüñúî    ñîúü÷ÿ ú ÿú ñüú ü úñ÷ööñöóüóööñÿ  ÿüÿÿÿúöÿÿö üíüÿÿÿú úööîèüñ÷öúñÿ ö÷úú ÷ú  ÿÿèÿüñãíüÿ÷öÿÿÿñ ÿÿ÷ÿÿúöÿü'ü üÿÿüööúÿ î÷ÿÿÿ í     öööóÿúööúÿ  üÿ÷üöíöÿ÷ ü üÿüüÿ öüúöööúüúÿú ÿüüöêúÿ÷ÿü!/+:kpfW42.9-$K2 öË´·¹½·ÍÍÒÒþ×åøú3+Sgod]23*=4#)N7 åÒ´µµ½·ÍÎÓåöýûÕÝøõ/5.<9)BG)ñÑѵ³·º·ÆÉÓïìôìÒåêø.kiilbK>:.=7.S=%êÇγ³·¹µÆÄÑøêóäËêâõBukoldD>93B43b/!×Ã̳³¹´·ÇÃÚõæóÓÑîáû#Mxll}leCB7.L2?`/ÖÁdz²º´´ËÁáóâôÎÍëáö#.Vupilg>D:-K:GX5 ßÁ¾µ°µ³´ÆÁâôÛëÎÌÝæøGWntpkgB>=4FCVP=öäÁº´°³´´ÆÄçîÜÝÉÍÒêX]gupibC<<CP_eM.þìÕǹ·®°²³¾ÖçâÕǼÂÒô*GRX]p}o[B9=FNigN)þîÛǽ´°®°³½ÖêáÓ÷ºÎö7BMU\g{s[>5=FNvlP!ýóß˵®®°²¼ÝëáÒ½³¹Ñ 5=IPXf~u[:4S$äßÛ⫨¨­ßøå­µâ*/-!iyC <+&!úñìÝ·ÃÇÖÕåóóýÿ9BK9//SF<9.*! ýôñä¹ÕÒÖÛúõøþþû54>2&4S:74+*$ ýóóë¾âÜÖå ïþÿø2$=!FK+93%)# ïõîÂïåÜ ôþÿýö *7M=!7+$* ôøîËößâ%úÿÿýÿúô/M&5$#) öúáåúâý.þýþöõ$I3% ÿøøäóûå- þúõöû%> 2$ ÿûõßøô)/  õôúæú23 .ûþþôáñ /2ÿ !ÿ ñôûå  ö9/  úøñôú!7.$ óóóæÿ/ *  þõûç%52 %  ôôåëÿ&!  þõôê%+23# õñÛá    øõóå+4+-7$  óëáß ý   þóóôÜF3)//!#ñÛåß ÿ   þìîîøS<)+*.ÿæÖÜç þ   ýêêê\b_M$ $:<5)  ôåÚËÒó#%öìçïþóññýøö CW_`R% $5:9.ÿóçÜÎÍå%!ûñêëýôîìõGU[_W4 3792þôýìëâ×Ë×#%þõìçó øîêìýLNSX]D.357-øîóêëæáÒÁ*$úúôìæþ$ úñêâê.%PNNPX\-.252çåçææçâ·+ýûöñçì#øóìâú%7RPMISX -+-2#ç׿ääëÕÚ!ûúøøñêõõñåDURPGNR-++)óÕåâáåÑä) úøöúõá úôïó$ LVSRLRP--. ÒââááÂï4ôøôöóçúóî2 SXRRMXP /./ýÑßâââ·û?óöõõïÚ ûïë) ÿ\[RNL_S3/$ÍÚääÒµûBïõõõïÒþîø/ UdSMIiLþ*3ÓÍâåÂÎB!ëñöõêÛú æ3 NeXLPiCý&+ÛÆÝáº×?óëôõäÛõø&+G_`MWfBú!ÿäÆÓ×¹ä9$ÿçëôäÚó .$CVeWWk=#ö ëÍÃÉ·ïú<$óÝëâÍï55$&ûçþ ûẲÎêý.!öæÄ½á DX=%!-*4F[l?+ôëúþ å·²Îçõ+ ýëɼÝ!>V9*.5**?]f>*ûóúúÿá·´Îæô ï̽î%9N2+#=#øÿûõþ Ò¹ÃÓçï óÒÃ)3?-&*KC4&<`iN9!ÿõõý ˺ÕÝêó  óÒÜ*+5&#.NG:-=`_C-öîúõƼååëô úýóÕô!-+*#&UL>2C_[9$ ýëôåÂÄììîñôõûôÕ &.*$2NMF3G_U*úêñþÖ½Íîôìúôôõóï//**:GMG7M\P êïóѺÚîõçö ûôóýì2/$%óìÝËÃçëøñì ïûóô+.!$LG?FCMM2 þôëÉÍÓîëøöëïþõõ-*-MG?BFUD$ öôáÄÉÜïìôøôþñúö#-& /KFC=LS=# ôñÑËÉêìñôóõýôøú!-$9LDC>PI5 ôçÇÌËïìóôñóøôø)$-!=MC=DSB3 ñÝÄËÕôìñõóîúóø&!.=LD:FS=2 ïÓÁÎÖûêôôïïþôø2%/DL<9KN:2 ñÂÆÍêýäõôîñúó5$/CM95VF9)! ýæ¾ÄÍóûäóôìîúõ*5-&CD<=SD9# öÖ¾ÄÓöúçïôìëø24!& &C<7=?FG: å¾Ááûììïñçþ75.#! =<4>BIF> ܽÁÁîýïêìñç:7+7<4:CKD=  ͽ½Áöþóæêîë+97.7:75DLF:  ûý¼Ëþÿöççìý5:5. 5754GKG7  ö¼¼Ëÿøëæê 9:5+ $7422GKG< 徺¼Õÿÿìåñ5<7/ þ.73#4GLI> Õùºáþþìä7<>+ ö<5-33& úô:+)9RUB9:# êļÄÓÉëïýÿþ2?4+.5% þöñþ=*&:UWF5:$ ßÁºÁÖßåîý >C5./7) ïøïý 4-)9W[I9-% þι¹¾×ïäêû4??9-ý/4& öìóøû-.+F[]K>% îǼ·½Ýôæçú DG=5* +2# ççìýþ&*2M[_M>ÚÁ¹¹¼×þçêú#PL>2+ ./æáæö#&5R_`NFÒ½µ½½ßâëû3VND/&22þÜáäï!$5XfbMGû÷µµ½æßê G[PK5%74ôÖÜäëÿ$#9]kiPFîÁµ´µÁñÝåL_RL+2>I[le9 %ìóÚ·´Ë &UMKfpgK<ÑÍÕ¹³°ººÓ*::DDVf`45äëÒºµÒ%UPPel]?=ÕÎÛµ²³Ä½î%44MGS`X27åá˺µæ!MNMkkN<9 ÜÎܳ°µÌËÿ$32LMSXU$ <ê×͹µö &INGgoK4&þßËÜ·°¼Ëê%2*IMPWN 4îÑÒ¹µø *FNG`iG2ûÝÉÕ¼²¼Óû%5%?NGNU#+ïÍÓ·þ -BRKVeF*ûæÇÆÂ³Éê :%9NCFR!+ äÎÍËËû.GF=õçÛļå/:4B\[N+óîê͵ºË 22+57BK= ìâá̽î/:9>W\N#øïïæÎ´µÜ 27+779C?ÿþêáÜÓÁó#:99>S_Pëëïêδ´þ2<*7:7== þóåßÝÕÄï)B=7:R_Pëææë͵³ -:299577ôêÝÜÝÚÖñ4B?=9K[KñêçâäεÎ)95<:43*çåÝÚÚÚêö:B>?=FV=ëçåßßɺï%4:<<7/ åáÚÛÖÖôý :B>B?DP%êêæßÛÄÂ$5<=<72ýÝä×ÚÖÖý ?9FGêêäá×Ãþ/?7:943 áÝä×Û×ß ?>>?7D7úëæââÓÖ 3B9:93.ÛÛâÛÚÖî =>B>5?$øëåßâÑñ 4B=993+úÕÕáÚÛÖñ&:>B=4<õêæßâÒ) 4FC553$úÍÎäßÚ×ý*<>?:43ëçæßßì3  7KG242äÇËáÜÚÖ .BB>93!âæêäÜ4 $ ÒúÝÝÒø!&/3GL3) ñÜÎæ <4úú :MPG! Í·ßÜÑû!/53IK9%öåÕÉç#!<7!þøó 9NV>Í´åáÕ7<3KK=ûýâÛÇø&479'ÿøì 2MV=Ò¾´ÛßÖ=<:GGB úõÜÛÄ%B55%öë-IPBýÖÁ´Öâß===FCB øõÖÛÒ L=/& ûìú&BDG ûÚÆ´Õßå<=<ýôÍÕç #UD+%ýôñ &=9I úÕ͵Õäç:9ôÕÄ·ßçú )3)4I> ìÑôýþ5=D:$öÿ)3<úñÖúæñ&2%.B.ïâõ79>>& öÿ$/<öëÓĹäõ)*$&<ïý óú35=?)øõ!&.:#ïåÌÁ¼ê/#!4 ï ôì-2:C)úö+/7ïÓǽ¹ì $*4#  óâ*29B2øø/39ñÌÁº·ì.37!! øß */:?3 þøñþ459ô˽··ë$59:&  ./óß$/<=9) úöæø3<7&ôÄ·¹µæ.B>:&þøK/ ñæ->:?.úñáî7C3+¾µµµê5LK<*çô#V3%æú )==D7ößâê5L3/½´³´ê9VN=&Ýñø>P5-äÿ !9DC:!ûÒáå7I2ýÖ×Üô&?C:Á²²³ñ7_VD/û×ëìB?:.! þ BIC5ÜÚ׿5F=$Ƴ²³3[VC.ýßïô%:.4/$#4DF/æÝÒá+C>!Í´²²2NS?ÿêö%3)/%.&þ %5&  ))úâÝâ+3%Õµ³¼>>9õ9F3 )95. !%&ëäÒ*/!Ò´³Ä)LB2ÿëõMK=&.22%õ!- êåÎ +.˳³Ó-UK.ïæëLI> %#)+/*ëÿ!. ëßÚ /3̲²Ü:VL)ìæï-FC9 &#%43ìö#-îÖ×39̲²Ü5VIîë/>:/)!49ûîï %2öÌÒú+<ײ²á2RBöï!3<-*$. 3:)ýëê#9&ÇÇì%<ݲ³ä4I4ø43>%! $7. 3=#æâõ<2ÎÂå9â²¾ï/F!ô::<))F. *<&îßì57ÚÄå .â´Ãú2>ýý#7=>*þ +L: -+áä+5êËá&Û·Ìú.:û&2:D4ö.M?)% ëâû4îÑá ß·Úú//!!%5G:ìø+GD!&öáû+ñ×ÝÿáÂÝú&/+ICúö+9=*)ûþ#ëõ!øááû ÿßÍîú 7<%?B++--.ûø ôø úçåúõÚäýýKB59 .%#&/ý ýý ýïîûûåÚõøø#LC%/- %3$#)  ýñõþúÚÌõû/C<+%2& /4)#   ýÿúïõýÎÆõ 9:5)&5-93))   þöêô ËÎ æø+:54&%5) 4++2  þøáî þÌÚ ×þ=447)4&/!-4   úúâçýÆÝ& Ò C./9./#&2.2  ñóçåÁä.É2?*+4//<.2*  ýñïìÛ ºó/óÒ3B-&/25F&4 úøîý ïÒ ½ó/çô.>2&+/!9 D!+ û þïõ óÑúÂô&=3&.29B!%!  óî ýÓýûÌ$:3%*43<$%   úýæþÚööâì*$54%%454-*#!   ñêõáîæó.$24-2#2û>2   ñöóìýêõÚþ+ *-//!*)* =#)  þôýûîõæúÖ# %/*2%$&%=%  þøôûóôçóäû!$4*++&5)  úýýõôóñììë2-&*!$--$  þöúøõóìóçç!..)&##2- ÿûööóôêîìô&-+*%$4% úûöõóñîêê#.**$#$4$ ûøöôôîîìë $-+)%!*/ ûûøöôóïìëë!-*)$!/+ ýúööõñîîëý$-*&#!3$ ûúöõôñîìì $+*%#$2$ ÿûøöõóïîìô!#-*%#)-# ýúøöôóïîê$*)%!2) úúöõóñïîì $*&$!.*ýøöõññîê!%*&$!#*& úýøöôóïîê$&*%#$.$ûúøöóóîê #%)%#).úúöõóóîç )&$!+-øûöôóóêóö# &&$!! <* þøúõôóñä ó-2$$! G úúúôôóëëõ7 -%# $B öýøóôñåþö4 *)!$.>! óýøñõìç ï:&+=< ÿ óýöñõçó#æ<   &3P3!!ïÿõïñæ$þì%:#  *3 M/&!  ûóýöîîîóô.:$ *:4I%)$   öõúõêë! êþññ !#öÖÓê.=2âÕæ)M>%ôþ åÒi{g Úá BG$ôå)ú×Éî:?4Û×ç3U>!ýóúëßgvk ÜÚBK.ÿÜó*ýáÇ5?<ý×Îå BWB!ñîý úîâennâ×õ:I<äêïÜ*<7úÚËßNX?îëï ûôä3eifçÜö4C>çåñø /&ÿÝÎåS`Dçáç úê4bfXåáñ.<=îåçåÚç R`FçÓâþ þö5[`[ ìäñ&99&öáäöû4ûýîëó LWI!ëËÛõ :S\Nñçç47+ýäåäô27%áóîôIK?*ëÍÖå :LUDöìì.23þçåÚý754$ôååêû)IC3åÖÚÛþ2DIK3ûóó&.+ëåÒ 34:%ïåÚâþ=MB*áÛÜÝý =KNG# ýúû!&# öêá */:$ñäÕÛýIUD& Ú×Üåý ?NSGõø!! þæû!+4öâÚ×ýPXI&øÑÑÛê #>PSCîóþ#ýß%/ æßÚöS[M%øÍÇÕë7>KR> ëï!öõ$&þÿìáåûNUN!ñÎÃÍëI?MM/ ñï! õ  &þûìáï%LR?öÒÃÌæ%RILP$ôô  #þûìäö+IN/ûÑÄÒâý%WLRR%øþóî ) ýýñçû3GK*öÑÆÚâø+VLR[$öúôå! &füÕØ²Óïô)(g`<•e”'Ögš””Ô®””SšŸÝ¦¨PV•EiIdWi]ûfjffffe-@jhKI7$ ª¡Ê•¢––—————————–£——›²É'-jighhhiiiijijijZU¦ÍáÂÞ̳ìǵª™•«ä°§œœ·Á•û¾²ÅÚ5+Jh`jiihihiiiid'Üú ¶–àõŸ•§¢XÏ•»¹âÕ–³Ü¶ùZò; )QAii^HÞÌRk_?/OFiN%>*çÊÊ••š—–——–—˜ªãñáÒ×öñéùêêí* >D?iSZ^i\iiif2$6ìΰìγÇʾž¹¿»±™¦ž–œ¹Ù©°Í´Ùò53$)*XeCidii^giiWig94/üåɱ––©åÞÂËÍš´¨—®¿­•¾©áÒåäûôïÿò'++.N<[iggghghhghhSKS:ãåçݺ·¦˜˜˜˜˜˜—˜—˜—¤½Üí67 /4'9ø3$?;jihghhgWSNVYV!î÷òïÄ«¼¸›˜˜—˜—˜—˜—˜¯Ð¤¸Ñ´ÕÝöó$ 3>SFLPfhgghhhhhhihiibTúìÝѰ«œ˜™˜™™™˜˜˜—˜œ ¨­µÁËòûè÷55BUiihiiihifciiYC).*'æáðûÙ½§–——˜—™¤š™¢ÄÌÅÊÏøøÿþ÷îûöêÿ#)661$>IMOXOTR?;FH6,æÚÏËȼº°¼ÁÁ¿ÀÇÈ¿¿¾¼ÁÃÊËÉÇØëòòöý #/2DOTVWd_a[XSMLF<2' êßÓÏÅ×ÒÎÄÁÇȽÁ»ÄÃÏ×ßÝÜÔÕâìêò÷÷ÿ  %&-5226>@AF=>;8,-#þíäåîÙμ®°°ª¢¡¥§ÀÆÒÖÝëêöû !&)(/+/252-# ) ýñãÖÕÍÇÉÈÅÇĺ¶º¼¸¹ÄÏÞêó &7;?=:<@<4,& ùòóõøôéíïíéêîïäàâÞÞÞÜØÜàãÞàåíëðôöú  !/665831,'!ùïîáÝÔÓÞÚÒÑÍÎÖØåäèçêóóõøþþöõþü  &&&"+("  ûóíòîëçãàåàåäâéõñôïßÝëô÷ýøüüýòôð÷úüýøüø÷þ ($*9;603..1,!ïæããèëãÛÜãßÝØÓÚÞäëîìðöëåÝÜßìøÿþÿþ !(-.0'#')$%( þøòà×ÕÍǾ·¾¼½À½ÃÍÖâëêìù "$# &#&$  øüúööñïðìäèåçåâÝàèäÚÚÞâäèëïòøüùû "$$'$#"  üêàâèìæÝáîñíìèíõôó÷øûùôøúö÷ýûþ      ý÷øùöôïëëïòôíîêèãäéðìêöùõù   þ " ùùñææâØÓØÛàð÷õðõúúý  ý÷úÿýþùúý )'" ÿóéìïæãâåãßßæñõû  ùù÷ùúýþÿþ÷öü þý     þýùøòèäëíëîëìôööøûýûýýþþýýý  þþ  þõðîíñöòìéæçëîøýõöý÷ùûÿÿ     ýõôõ÷ûÿûóéëîëéêëëæçñúÿ þúûøùøúýCíÎÞÐØÑËüÆÅšŽÝ®‚§Î´›¯²Å¬®±ÆÅÈÈÞÒþµ;¡óCÀñã_+«ìã- `>E9K-zvAD`wz`YjgmxvmlxpgrurruqjrrolrrqkhklllkkhegdddKdQ[VV>O?5"ù'ÿööíñÜÖãÂËȼ˶°´šÆ¬€€€“°•„µ‚€€«€¥€ˆ€Ž€€š…–€¡°µ€œ€£ …°„›©©Šž›¡À«Žª™º¡ž¯Ì´Ì»ÃζÙÒÐÝáÝÙ×Ùøùæ áýé5:ú4]5K8OL8O_6j@C9P0;TWbT\[pWU\bKhWbjOWddeeWgeh_]`VgRCkPlmlWbKjl_q_eeW][b]]QN6OZ_NOeeR\[bUJLfQK?COaNTT?L_/fURRJQ]aZ4UWN\g>0F?YNeK\WQgPWaD]EU:F2N=W9NYRRD=\=?>>/ ò.éî ùè ËéöÇà÷±ÝÎ×±â«Í¯Ò¿±ÀœÙМѶ»«ªÌ˜Òž©Ã“Á «”·›¯¤€µ¼€®ž¡À„´¿•К·ŸÝ¥›é¹Ò›²ÜŽ¶àž·€ã©ÊÑËÃÕŸÍÍÎÒÊóÒ¹çËøËÁóÑ ôÁÎáïÖÝíúÊùàãùãèÛòæÍüƤÿ±ä˺äÛÝÿªäìæÛÙöîî¼úÕÑôÀéÜÖÎÌż½Ëù·ü¡µñýÅØöîô ñáÛþøíä÷ø÷ãùüìþÛé4Ü öÿ=Õ  ÷902%E*2AR)>GW4@C9D0A>*=:C(W3]J=KIUCZF;FNKDQ\+_fJ8._AL8?;W$Y LOP.=Ca4;?`(;E6L[5:%j-u0u'YN sòpëwC"C$UèDýeþ -"I0 @: 0`$*$b=:?;.92-GR"ò`Ü#:ÿ;)86=öWÑ2éGÓ% $ù: E-ó0%Óþøöü-Å?Û)Þ)+¼  çñæóñ¦%Ñüá)´ôÝô*¦YËØ·ÿëóÇ*©Ó%óì"ì;+)ì:*%Î:ï#ï5éã ìÒ=à=×÷ Ã6ç-ÿì6Ç0Í-óÿ ñÓ%ìÞ ñÕ éÀ ÇÙíÛ#ºùÌçéÓìÍäíÅ÷îâãñòæïöèÒÿÜØ.€-·îç×öâó¡ÙàÆý²þй3À›6Í÷µ%ÕúéüÑ2Õ%ÜIï5µ@ÿ Å3é"¦'èÐèþ ã#Ö ÑAÎY²`ì=  "ÿ= ýÿ Û*à4ã/ÈE¼/ö )ýúý)'ùÿ#ô0Ü$ô#ü ù?âú;ÜAç'ö#>ã6ÿLÈgPþ629ë="A3ôdøGøNúD##ùpÎGé0ô:þK×°hãO;DÿC>% $/2EÿGük." I=A:=*9 U04I9DrRùT'A;D\Q#P@ÿh=93;3[ìw=E34="g-ZþR)\Uø] ***3)ø_×O CÛCâFÑ 2ã3ÿ2ÿ8ÜAý42Ó_îbè 8ìTë4ò î*÷"Ý0ò÷TñópÐ4 6ô0"Õ/Þ.Êñæñ Û5ÎìãFÌîÆ2ÿì ÕAôæ)ùëþÆCÞ0ø÷èR£4àô4Û .Ü *Ý øøý ýRÇVï ú  ÂUä)âAþ ñDÌ*æñ÷#×"â5üÐ ˜DÐ×ÿóÛóù±æ(¡ ÛãÈïÜèë-Ãëþ°%ëÊæ+ÕùøíëÜ$Æ(í ã#îÙ*öä  ( ;ö4C%ñNí($"'05ÿ)÷ -î@ï=ôCý- Zó0'ö'$ùÿñ2Õ5ãë8 Üã÷KÁ#ÿIä -áöL¿ çó6ò/3ñAôJñ*"Û j±_ÌYì%þI¼ÇféI÷?$'ü4>×p ý.#'3F)*"6;+3.*aòIýC+;×YùZä*ó6ïD)Gø$*)%+*è2G 69ôGý? 5J='Zï]ô;="*Dú4%ïhñ@JúFøU "-Q½zä2*ôQK÷66"4WÛ@4 Eþa híW'6A3öNëQÿ2JëPÒd %# 5*+) /"*é?=ä@ ÷D ý-ù/ËCìù ý ÷úñ ò ô ã(þîæôïñÈ%àýñþçÿüÛþØ%áóÜÙôüç+úâ6é ôùñ'ö8ïúþ*ó$ïTÒ>$ +4ãLèö)ó ú=ó95íUü46ËRò -.ÝRÊ'ö0Ü(ãC·4ëè3Ý+ ýÜGþÆLä ô ×*ã %Õà ö óà(+í(éññ/ÃAç"à'îéFÌ/øø ÷CØ) 0íKäYý.ÿA "2ÞOü ( :áRÿ.*ì6çKØ0þ3 % -$ó-ä6üü4ç-ÊWö"$þýýúÖ2çñ ÷ó%ñôé$ç ñ+Û$/ùý îÒ@ü 4â3#'þ-%Kó/$ 85 '0 3#%EY3 ":óC=/ÿG ;?ïE;ÿO>"=4ö;Eò4:+C + 9 " ô) +Æ.0ÛTâ.ý $ù8ü %  0àFË`ö'ý# 44*P2Uö G*:ôJàRú305@$'(æA>ä.-# '+)8ú%üIì)ç8 ë[Ý4/ ") Þ:ú##òQÕ05ü*ó$ ùCöóEÕ>ÖCÁ]þçEé %éQüN×)0íLï:.ø3þ3ÿ# þ 5ÿ%ú.'Ý0 0 "óäJî$ ö2ÜjÑ) "ø+ñ9Ý5÷ø'ñî÷Ó=Á9óü$ó-áþüÊï.Å?Ö%:æò" þ $Ñ#ü=Í#  æ2øù ùòÑþ6ú÷æ(ï 'ë2ùô$æüó@áEæ-ñ% =Ý$ö5ä ùãIè 5ö9ô  ÎJ)ãNÞK2 Q(ì* ÿ2;(08Ý3+CëV89Þ_ø?+:6þ:Ílì* $ $ïaã>ùDèPÛ0ôKç@éUæ>÷'$  (î3ï% Jò0 0äIã' .ý 2'÷0-"$D 2?æ;;ý8þ?E×= .%Lç2Cò-ý%/*'ü8.ø;-2ÿ5 .ý;$ý= ((#0"ù0# ;ø4à= ' 4  *þ2: . 5á)þ3 ïGè3ÖZ Cã6  øQã 2àVÕGä?îF0ä2 5üýAÕ-8ë6ç3ñ20ö- %@×#*ÜCÃ8ñ"ö ú ò% ø?ç÷ î ÿò ú$ë=Í`Ã( Cù.ñ-%#÷/)(òDö''Fç: '6ú/÷>ç+.#-5 ü æ"ç6+ïú$æ3èá4ü"ù *æ/ë%øúú2ñü>ô ý. 8** 6333ï$$ú9 -ù@þ62-ñ?- ++AàU×8ü4ÿ=ù"úô5"Ü% $ ?Ø-/íYÌ9úú+ (Ý.- .ï;.+2 ( 3%" " E6( @ü3.+"-:4''E-('*ø:ò+ùWÝ6%);ýú )ó52üà Dù  0-#ï`î. Cù*òWç--ÿ' ?î)%-/ÿ+*ÿ "4IçPÞ8ÿ): .ø"5ï?ó#ö/$úî" þ4ý à5.ù  ÷ DÓ-×?ô Ê)ýè2ã/ý4ý 8þ;é8ýVÜ#ô##ù 'þ"%  *þ.   (:Cè2:ç'þ*#?.Eµbù ;ö  '0ú"þ#ü46ö@Ù0ÿ%5ì5ô -ó9Ò/ë?Û+ 6ÛKã3 üýDÐ/ëDØ4ü.ø0ó 'Ø;#ú>ô3ÿ0â9:þ%:Û`ÐIæDú/) (þ%÷ 6ú/ö:ü2 8ã;$÷=ó 08:ç *  öë=ö$ù=ÛçDÙ8 (é% ÿ4ÖUú"6ú %÷= 0.0äIÙ5%08'ÄÖåééî79B Ìçïø9#ñ #ÏÅÜèÿ 957¢§ÁÌåð!60128CS;¸¼Ûò®ã2=),=  ûôA þ³áú!1Püõüû"! " -1ÝÎÏìáË.(>PS]?G•¬‘¦Øè&8BINRJ\í±Æ×ä×å&$&@ûÕý&3$åî¶ñ 9/íý ó4Eõ-ÍËÎé× +%0EU`iPЮ´½’ÑåIKPR/BO'ŽåÐãÊí)ò&Q%Ê÷%:[ÖÙÝ'ðýî+AA'ù&Çߺçû)ì)&-7OcoHÖ«¤Ç»·ì 8MMW<9*ààñÔÄä'ý#IWàúÒó(?UFãàú Õøûâ:CK#ûæúæâ«àþ+#")0>crIø››ÅØ­æü*INWE%*ôò×ÔÔú 'õ&?/%é×ïù PTeÐòåÿÓîéì!0 8@L25ÖØöåá¸Ò"0.'-7O[M5™–ÀØÀõ&8X]Pû "á ÏÄú&*æD &%¹î÷6Mk#Çæÿ¿êåèþ(; -9Kk*3±ÊèÖâÏÇ÷ *F.,:LTRĺÛ÷ÿÇ 4DeOõü 8ëü)Ý)9·ìþ!BuEÔæùñëÖùÅC-0D\q!ƵäÒÞìºé#&BZ&$<$H^∸Ùí îõ4;W.ò#åBAù£ä÷.ü ×(0½0f\ÒüõáõÊÇ.&4.=O{*Ö¾ÛÔ¿ÿ¶ê">VR:÷3]µ§×à Û*=:#ù!ß:S2ÁØî*Ëå &4ò &NU*ôî½âÆÄ÷ <õ(0:M{>ÝêÇÆ¶÷Ñáû:J_a÷ÿ3BËÏ»Ùú)ë5! ô,NVÓæäú)í1ú8ÿ"LI#ï´Ý-÷(ð./K G>ø¼µãÐÐù)@_C+ô$DÍîóÀà$5 Óü (ß)ó>A%1âñ º¾ß&379X!èëý¹þåê 4= A7âœÞÍ­÷(6[3:æ*7@²íýãÖ %+CÚë#ñ3E4.ÆÙ·Ê$&+9/ ;O1–øýÜå *óÆüø3?ô%>6D#ŸÕѲÏ.9/86 C8³Æüåþ#'çû&ÿü.?1Zšá¼¿ö&"(1A;O&¤Ñ ÐÎ#Ù ù9CHXÆÆÜ³Ôù#%ù,)8GD1ĵê î í%!ä ì)>%O.Խ˹å+õ%+9J>=þ«×î í öØ8AüGCÑÐ¥Îè/ÿ-1B];A̸Ù÷ áÿ!ô'ÿûñ#?2E(Ьã #é!,:Ij0™Ñá æ) àí!2;%:7(Å¥»ò×4/C?7DÙªßð>;Õ 13ÄÆïø,Y26ì.@ø‡Ô°Þö-VUi|ÿ˜Çâ÷é'PRÆðà÷ ECç4EØÅòÛé5= HNÛ¨Öú1Qóé +@æ«ì÷n)02LùÜÚäøÌ ,CM8AË×ÇòÞû;FHúðç#Jã×øíà#6 ? 'ýí ÄÌë)CJf85ÌÏ¢µáLX-;IàýÈÊûÑÿ8:F9=MªÀíèÃÿ2EOûùö 2ûÖö%Þ ù%@ò4úìû ³ó>Fc<'³ÈèžÝ5R@8LæÅÀíïê,26@)ASüŠØ½Ôé ,?jð!ô'ööï$ç!,ó0 ûðä2Ê "KW21¤Êáñ©õ 1=T!-DJÊïÝÅßñã*16D2.RI¼¤½Õàý'9º°äúÃì @?NGOÜݪËÙè9F<þ,B  êõ#û":*øê¶Û ü7AJß -Dîö婨ç 2 04AWLSœ´ÖñýØ '?I-D-åÒ¶Ñí(G" ñ*F‘ã÷@,ø-C×®Ûíô3/@Cé**ÜÑÊÎç*0 '0>Pk&ŒÃØíË7O?9Ö×Äê!*8í(=÷ð«øý4Tù *=Aë¾±Ôèø5/:JH *öåìÕÛÌð &56*6Oc+­»×çúÄ 'IYÇ(Ðß)4+áÕù,O;â '<>ð´¾Ñãõ(-4BVGòõÕâÙÒÉõ!-EG5I82ôšÖäÿ ð"8`Ú ãö-øê!)üü*ìÆäñ!KTå$7ýÔßú9(1;MiEÄøßÞÜ»Èü$<[+-D9 ‰Ôßü'þ 48Ùö)G âú öþüå&ô AO÷#4öôû±ÄÝû&&.9GnaØëëËÐÊÉîAUa1ùë % 2ðÍø(Hó$ùì Ô Ø !*þ/INú $ûôöß¿ßý(*9Gg6)ôåÊÏß©ãþ9Q]aÑ'ÖÁîûú' øüâó'AE/)çÿ¹Ýþ ·(<"4=LÞùôÍòÈü!+3CW)HäÇãήÌ÷2S]; ý-ÿñß×å(+× ñðâ ;DM7æþ„Þî Ñ22@7A*ñò â¸ý Ù 15C7EI¶ëÉúá(PW@ú!ýÙúóô#7!Ï úÅ9?VR2ùÐ’ÈðÑ1*5;#/B)#Ôî ÔùÊû÷ù";88DUéÈÄÕ¨Ê)N($:Gøæóûÿþ 1é÷$÷Ïö2;QbG(â·«¹ÚÇ',4=`?;÷üèæÎ÷ó.5;T:ªàÌð-G-4DCóóýóþøóüèæà )5Hio9ÎÅÅªÒæä(*-8W`!<´ øîøÄóþ ÷;òñ8J^%'ݹ»µïôÛ3'2=Lb÷âíþó Úú "H ÒÝñÿ=M`iAÔЙÉìºâ"*-3HdnÕÜùÕÔæô/IðÒ÷ÿ0@O\/>þùš°åðÕèB&2;RY"ôßþ!ÁÎðøAFÆÔï÷ =Fb\(9Öï—¾ï½Ë1*5J]O=©õ »ìðû "a'¶çóÿGZc(@àÎ’áí¢å',3;bF67Âú!éôÑï÷5z¶Êéõ/G]0:;ôŵÚÔ½ð.07EWIÔ=åÌæî÷TX£åðý E^ZE ù¦ÓÁ¸Ù 42EWUIóà  ¥ìêôÿ 7b¬áïIP>K åÎÓ·¾ç97E@"C8ðô'ÉÑîø6!öÊîù9^U%8,ñå·Œ¾Ï :WORB õöÐÇôô9T6ÏØìÿ0'* /;D ø#å½ðø#&%%&&'*,/57í¤ÃËÚèÿü338:@=Ùôöü-G>*ÄÙÞäëù #ÒåÍû !$97BRZ0ü¼ÙÓ·ÎÕ¿¹Ò,*,9CABJPYc_éó对•»Éßý!EMD!>Aü»ÊÖïû'-NXP0ðëåø÷¿ëúæÅÝ !0LQ92 $1$ø Ï·ÐØæîûè/ö ,*/MOX]Hú1$Ä˶—©ÑÝåú 31HLUZ_*ÉîëÍØäóû)FE&)å *3€·ÏÛã:AACJP[c%FñîÙº’ºÄÖäèñô1NOL)ý .KMòúåÝñêö¾Øàè*?JSV2 þ %,ì ×%ÿõ Æý "/3ÿÿÏÚÉÙãì1>ACKLO[N>RĪ€”¢°¼Ëè.C>@CHOVJ#ûíõß ÚýÜÑúý"+èéó (ú (?ABDKY^gS­Ú¬¿ÏÜ©â÷ $7;FTùøëï½àç-FQëôàì÷Ëâü"óä*Ìôù 9EO<$3"ÿõ¦µ¶Ýßèó )E>?DFNW\=7 ‚»ÅÖúøãø '/>B ËðûÖÿ0/:29A#¨ÍÜåÔÍá!03=Aý?ø õ ñÂÜíùïý×Öîþ1-LLN5*9BL ×ÒêÀÜÛ˹çûü(&+,6<=9 %ºÈßì--39>ü)îÚÞÀØåê¾åå/'(-6DRWQ*Dúåñ½èùóáÀÙà %#ÿ 1ç1*7@äÿ ,ýØÏ¥Ýéù-:ñ/4 Çðòö+?LJôäßìò 2!@èÔíòÕ%0? àïû" ìþ%!ò0Ãäìôú J]H!òëÞòû$#ý÷ #Ûõ ð"#$ þì äñû !8V`ö®áãíõþ ;;Ö ø "" Ùöÿ C+æÝöþ!æ 4=D8öãäï÷ý5 "ùÝéó9< èçôþ(0Q?òÌéïø 'î&=<3Éîÿúéþò(6* ìèú !09 äü #(!ø*ÖÕêñùþ0P]'3õÎåðú !îßý%&>ýâü #ôæÿ!!*öÝïîú 1=N[Àßçðù*1Þò!õÿ ö î#KCÚÝëô éôþ$*>JMôÕíòûü !Þû24::þÜðý 4:Öáßéñ÷þ%.>ü67@Ýôïâðûß#DB Ñí"+Úìú!#,I îöÚíõþ,ø)::Óîû#,"Çðþ"+' Çþ "# % #ôôÙìÕóøý 9WXadÜÌàîúÚâù* 25îê$!Âåò  (ê#8KÜÓäïù  ý /Aöâ×õô"E$ÖÕãðø ìà27@COøü !ÜýìÝ õñ ßòø00:>3Î %2:®ºâêïøý 38EJFôñèúøÐïïÛñ $2:;C< ë %Ãë ïÔôã#83:5Ñìó þ ûôèÒð "( !7BGØûÏóðÆØöÿ#*E0+3 ùäÿëã±ã (=4 $,6@òóíÑÃÔÝõû 6;M-6DGªØìöÿíÛ!- ôü  âþ'ø$;9÷Öòþ ä &$ø·íò4ú +07')&¾Üؼ²Øà08FMP\eYôÌöûÉÓ¯Õëü þ **.76÷'Èðüö ô #/ $%²÷û÷êøâþ9=$ $=Èçð $'÷Ü÷ýôÚþßÙðþ)*/8QRWV!ø"æÂåì¿âîìÍ)&(/8@EB÷ ¦Þåëìäù#,29>Lùé¾ÝäØ×äì "//6@ZXhÌ þçþò ëÂßñ÷ý'*ú î %@EA ýÿáûú Ķøéôü;8;97=$ê­ÄÚâþ/26#6:#âü³´ÂÞç/MJKKú.3@3!ÓØà’¢¾çå *19MPE!5#×ãèÕò÷ÿ'ß$*öÊôú '=+'+ !)3ñ÷ëáðýøú$53ë ñöäáù 25J"'+9J? 1±«²ÀËÓæ0*A?BDLUem6!­Ë›¹ÊÖñüëú --4;Dâûûöí#û 8=ìí $âÀÝãý$=JLR#-?OW-žž€›«·ÔÚï.0-C>ABDN[hZ$ಢÀÐèóÍö>9C!øã$ ¾ï "'+6#:>¹ÁÖãìú@üØòù)09&ù !1ÿ)7;E7«ÅÛçôûÁʽêüú$,E?AGMS^g<&ä°´É˧¿åø1).9?ZaF7´±ÎÙãí*B#,,2 àËêüÝݺßê*6LOVN,.× ÁÆÉÕÛäî3 >ß 05GZY)8þôð êÆÆžÐ×àë03ARQL-)äýêÓåô /ð%6/òýͽãàð(7DCEKRY`aÞ*ߣ¶‡¶ÀÌäì0FLO#,3".)üéóüåà ûõä×ü$:8H!*%0õ&1 Üìûøßïø'!ìðìúÊçûÿ--4DNSXK'GJÎÃÞ¦‘ž®ºØ =@?@CHOS*5F.ëîäÌàåÒÖôôÿ!!ø##øååû!:FR@óê¤ÑÝð íà!!ðÂó÷ü&)ÿôø 00>QYãÿñäùØøüÝÛë1+0UVbN:‥µÄÛì.A'6CL%!úã- ÝüîÔ èîý %.=.;Ýàò# -1 >BõÜøÒ÷¬Öàô$=R3-4CUa úì·­æéÃÐé **&-1?U6Aýìýøßí¿îòü'Mù!&.áÚïù+8^Vï!)øõÒßÒ×ú þÚ.;O%!0:CC7 È£­ÃÕþßð(RY"+LU%ƽÞï> âçõ:CQ &•üþÝü;A67ó"$ צÃÒàù#&-:C4%5.0Õž²Ìã þ URbW0(Ä’ÜÞî%? þñ -CÙÃíõ')77'çî$*êâ÷ØÉãñ4 ).18L^@9ÌÌíË«¼Îô+19< 6BT'ëîö¹ý#õÓ '51Þ áöBþ @HU-éºÜÌÕ¯ßèõOIOXO51÷ó½áéâæø !ö,3AIR*ù×­ØñÓì,+:M5ììÖ¹ï&+D-:%58ÚÁø­Ôèü4#/908: "/ á娷òÔÞ 65T]k1þ üŸ§Ùßü2>A/!ç +íãðÐý"AOëÒ%'5<ùܹäéÈ3,4MUZCU°á¾µÒîÉø!-18Bõ%Eú*ùêÝñú*,ó-.²íø$7  × -ãÜ 57AQ_2²¹•¾Ìî#JMR\W' çÊñ Êû ì÷èîþ3BW(<@ýæìËöÊÞì"+'#+5@?ñùˆ×âü&? #,4=$6óëäåü¬÷õþ&,$#ý', ýõôƾÖä./5<[n% $á…´Æíÿ,@DT ×èËì ê+CHõÌñý-;:#úùóÌî·âëJÛ ÌÀËÛìÿ2HT +3<1æ¿ã§Øü)=)0?UãÎ ù ßî-:Øú ü2ý(4&Êè¾ÎÞò1)05>H/EYÃßÄžÅè!2Ahf1±ï«Öçú4ð:<9#–ññÿ (B=7 ù‹ÑÚèõ]RS3)1&¸êè·ÿ*5ú +4EQüæÓâ ;ëí/<Ýâó-%4 àæüÄßè/+07@HMSÝÉÖ¾Àå HinH»×³Öã*.é49=ý¼àòþ +5:;2÷×¹ÌÚèò QRX2( /ÜÊäèËî/6õ æýáöæÒõ0/5;;6&ý²ÜËÍö)@jp;óžÆÓá+$&?!ÞÔàø*6:C; ÊÀÇÔäú;XG*;÷ïÐè÷Ø 45ý/D# ÐÉãó-ÿ'ëÛ)Gì÷ #6FåÿÄê½Þÿ:2:<"A2ÙÛÊìñ$7Qkí€ÔØî00,:B$ëï±ùþ ý,,6êï§Ûà 1bY^DèÚûþÄôì.æ .N2ÕÆô'*?,ß é Üöæÿ +5)áÿåõ77@'Ê×ö×ö%FZ"K5Å§Ðøü,=='ÊüÚë'úõ$47EOOóøë¾Îé A,0 Ý Øó$"þ843û" %äÍáóï)3ßû &î"H. û&2ò6ûÿ®Åòôÿ;<++ë+)û/øáäù%31 óàÃåöþ A`/4#!ÖÎÞü%(ý&ø%ÛäÉø÷#@^Z-A³ë÷ îð, ãçé .ç&õâî!/Za ÿËûïîãæö "+$9Få êÿ*<ôúÚýÉØü5Kÿ.?õ-âÏëòDL3 åõ Û êý4:CII#à¬÷öüÖøú(4þ ?DOÏðèýäØÞù'>E×êù2! *ÿÿ&ß!(4¸Åäðþ"8 %ì %3*0>ää (%õÝüÔàåõýM]`ý÷ ..×ôÙïù'þÜ"+ëïåô'H9<óìô $ ÅÑ!Ü ä -3Dhb#¡íó2è½Éà÷ÿ"#ù(7@Fî#ü åðÿËõ5òï)?$ë!*CûÕñ0OS¿³Öè,ãÛð#@Bö:=C?øÐô ÛêîÓñø93/6 ,G,ñéá' ñ³ßø :Gùãü'Q(Ò%7Ð$2ÿÇÇìÿ ûÒ$4d//A#Ëû"ØûÞ§âú'èíú?VH ,IJÁ¹ð÷ÿËâú#-O×ü$ ùA3ÿù»ð ×Éð G+ù5[Wï#1ÜßæöþêÛ!ý#ë%þÿïBB!ü(Nöâç·ßí:2ÊÊì9õ+08AUkØåûÒ¼Þ¤âöJT%09( &!*ÎÕ+Ë·çú ò@A-Êï,7)%ô´ÝôîíÆ#YSb 9E@êûâÖ¤ÀÒ+Ûÿ%@+!27 7EKÂŧÚðõDCRêúÇ&-S!6:öÛÿß êüóÊí:9.ô0/:? EH0Ô & ÁÕ¡ËïøÐ51GT[hþ!&ï»êúüÕ÷!ü-'Ì×ü '@G)#;ÿ&ÞðíÿëØ ÷âÝ #Ö-/5C_dl=Ìöø¦°Œ»Þèõ=8WO"*&0ù(øºìÝäšßù!EIOXK#@RVœå›©Êâé  0*ö$3#è"Úß/K@ú&3 ±¾€»ßð !IMMNNI?<2"$D_jz~~~~~~~~~~~~~l[PHA4(" ý÷ôý ÿëÒ¶˜ˆ€†¢ÂÈÂÎñúñþþãǺ¹ÀÊÖÞêò )16657AIRTSI>5(&&*276Aay~|aDNg{~~~~v_RF=<4+% ÿþ3?6îÆ¹¸¶±¯ ‡€€€€€€…”¨¼ÈÚïü !-4<7 #R{oSFQv~~~~~~~~~x: 27107JWH$ ýãÜÓÂ¥’‡€€”Ëú  êá9eoO()@3þâø"EF:."öæÚ×ÔÚãðý $9SVO8)8S_T==Pckc`[fv~~~ynd[J;:CS_W/ñÀÄì,S8Ð¦šŠ€†•—”€€€‹•Œ–Ú7,,K`fe_Lôô4B[w}yy~{_3*JizjJ34;. â´››Éÿ üØ¢’²ð3$ùÏÁÛï @a[C?U_GIo~}T( )+*=QUDë¹¶â?=.èÝõ øóôøôñí @ZVD- 'T~~d,7>ÜÂò*KUJ+éäô8K?( öäÞÜ̶®½Úéâʰž¯Ý3RfUF]}~~~~~nI76CU_behq]C.ù " ÷ëëüøÕ¾¸ºÂÎ×Ë£Š”ÁæîêèêñúÿðÔ½¹Öü#-.ø8i~sH#,Uz~~~~~}jJ:>; ÷ü#KI"÷û +;>' ðÛÔâúüåÀž–¶Úò1SK9*-;MSXi}~~~~~~~~k@%$3ESS?ïàÞéïô÷úùèÐÕò÷ëëüÿÛÏä%60øëåãÞäôûýôäÜÜæüùçÝßåö-9859EMQI4,4A@5%,=MS`~~~~~~~~~{kVC3*.7=90 öèäàØÊÄÄÀÀÊÕ×̹«§­´¥™”•ž®½Ðàßåçíïìæ÷7>1)2?KVa]RMTesrqt|~~~yuul^OLHC5*-;ME0  ÿîÏ­«»Óñ ÿæÓÚò  ûôòáÞéôñêÛÏÊÆÊÞùúòóû ýóûUz~~~vl[J*& úæÖÏÕâìîêÚÌ¿¿Öó #.4, ñÞÝé ûçÖÏÏÓéÿ*,., þøý#!)//#üîßÒËËÑë>XZSD6+ #4GZinutiXLKQY_[J2#$)'ÿöíèéðü! þþ  õô (9FLLF=1+.:?IUiz~~~~pL1"$*ðÞÖáïÿ øðîéë÷ õÜȾ¼¼±©¤§­®§Ÿ «ÂÛìíäÛÎÅÅÍØÙÓʾº´²¼Íáôû  ->KQU^dfggf^TNLOPY]ZOHEIPOMHCADNW\[SHDFMMR\fmlg`XNOVev|whXOE:- &.8?GPWVM=+ûùôñçÞØÒÑÓØÖÑÌÌ×ÜÛÔ̾µ°¶¿ËÒÙÜåòþüðéêïñôú÷îãßçïö÷óíïú þÿ !070÷öþ "*//,&$'1@OXWQOLIFDDFFFD<31:HV\\]_][SJ9& øôôô-:2"þõóôû %8L[^Q?49HY]WTOOJ>& 'CU\[TE1  &,0+%" ôêéêéáнªŸ˜˜šš›Ÿ¤¥¦¡•Ž•œ§­­¯°±¸¿ÅÐÙÞÞÓÈÂÂÏàó"'#&0DVj~~~~~~~~~~|{~~~~~~~~~~~~~~xreYOCA=BDEDCDDD??BEEB6-&&(+.22-%#(,166+ ÿøöùù ùéÜØÕÔн©™’«½ÍÞìôñâÕÍÎÒØÞàäçéîîéãéìïîìèÞÓÈÂÄËÙèö  &(' üó÷þ&,-.-(()+/6:ER^a\ZYZXXYZ[^[YWUQH<66660-( ÿùòëäÞæòý&''&(->KUXUST\jqlaVOKHD?:=CQbhi_N;)"  ÿùüÿ øëèäÝÛÓÈÉÊÒÝßÞÙ˸¥™™›£°½ÈÐÔÙÚÝÝÞæðôõõóéããæéõûþþ   $,9GLHB>>AGMNOXev~~~~~~~~~~~|ri\QE5)(--2455247@JV`gmoicajry{wuqqm`N;%ÿùúþöíèÜι¶¸ÁÈÇľ¹³«¢™˜™ ¦ª¥ ž˜•𦰲µ¾ÇÑ×ÙÞßààãçêðôôù +;@B=?GOQQRXZZRA515<>;2-.;GQTQMNUbcZLA>><3('08>@=/ !"! öãÜÞçóöü&0=A;1.19=CMZev~|zwpmigggd]RMKHIG<'úôôöý  ûðåÜÍÈÉÓÚÞÞÙ××ÞåãÛÔÍÉÇÁÁÏàïöôëÖµµ»ÂÆÆÆÉÐÔÞßÚÏÁ½¾ÇÏÛëÿ  .;A><>N[dhnuzwhXLLO\epok`W^ddVMGC@>>>;."!#8HV\bgosy|~zri[NEACF?=82'*641$ ûîàÐÊÎÔÑÆ¶¥ž“‘’™ ªº¾¹²®²²¸·¹´¦•ˆ€€‰–Ÿ¤¨¦¦©°¼Ïäòÿ #0;BHQ[ab`VMMU]a[RHFMU\XQME:3051..;KW^]]\YWX\goqodWJ>2$üðíòôõóóôòñóöüþþ (0:AGFFLS^b]\XXWX[bccc^XVTRRKB6# õäÚÒÆÀ½ÂÊÎɽ½ÀÌßëññðíçßÒÉ¿´¦ ¡©¯¹ÆÏÖßìû ÿþþþõïîíëêèìô ! &$(-,,3AIU[bky~~~~vg_TMQVVL:*!!!3DQX[^]VPSZa_SLFBEGFGJLLPZ\UJD@<;800/' ÿùõøÿ  úôôòëà×Ⱦ³¤™—’’•¥¯¼ÃÒÜÚÒ¿·²²³°ª©«¯´ÀÃÁ½½½¿¾¾ÇØì"++*&(07=<867770 (5=IQPIFQ`qxxxxqcZ[]aee[PMYhw~~~~taMB6( üìäìù  ")01*$!!  !$),37<>=84+)),9A@;540,3:=6/.-,"ûåÒÇÇÒÛÛÔÉÅÁÁ¾½»¸¸ÀÇÎÏÔ×ÙÓÐÌźµ¸ÂÐàô ÿóìñ þõîíðñø +9GQV]ginpsuxutuz~~~~~~zni^VI@4/07:94149>@AA?@EELRQNB4)#!"&*0025661(%%&&&!! þ÷òêßÔÎÊÊÌÔÜâääçéâÙÓÇÆÃ¿¾³§ž››Ÿ §´Âļ«ž›§½ÚñúöíàÖÖÝäééã×ÍÊÒè)6?DIMIB;53354*+=EEB??JYedWOWdpwrcTMNUVRLGA<;ACDDC?;3,'$###*+266960&+2320.('$!!%-9FOTTMB@CFB7,  úûûýÿýòæßßãäÝÕȽ±¬¬±´·ÀÍ×Ýßßæñùþÿþø÷ûÿýõðóúþ÷õúûðìîïìäáâãæêø'.*$1CT`e`TD<9?CCDDD@@IRPIGDIDEGOUUYaghiif_TRYbe_ZULHIN^llf^SG7/+/242/% ÿûôðêàÓô´ºÇÎÑÍÌËÍÏÐÔÖÛÜÚÛÔǾ¸¶¶¶¶´µ²¬¡ £±ÃÕâæèëðôû /6;73*"&./" üóçåçï÷ '/555/("&5Obqxo_L<2.29:6+&*+++*.5?@GOajlcNB:5:???>>?D;/+.5@B5ÿÿ#)&"1ALRUUPB3&  þòíéêêìðõúÿ ûõéááãîñìãÜÖÖÖÖÕÑËÌÑÖÖÑÒÛèñöú õêâÜØÖÔØäóÿþüûùøöôôøþ !*.41,**158@GIJJG?:9;>>>:99:=DOU\fjidbkrlaOA54;>>==::;<5.")23+"þþ "ýõôôùÿÿù÷ú ìáÜÙÛááãäãÞϾ­§§³ÆÖáìôÿüöøÿþûõõöûþþÿÿúíäááçï÷úúû!-9JZdf]VRQPSX]c]VNHHHH=,%18?BC=7+ %0489;6+'/43/-$!$'$ '5=>9,$$+.-..1/++(#*)  þöêÝÕÑÑ×ÝÜÙ×ÕÑÍÌÕÜåðõùûöõòéæÚÞæñ   þôçæêúýûýÿ "  )/321342236=>;78?LRRRQQQSY[`aZURQWVVVOE=93331333,(%#$.440&#"$$  þû÷òîîíïñõøúüý %+.+(  ü÷÷øü   #%)++%#  ÷æÝÛàèïø    #%%%# ## ýúúüþ    #%(+)    %÷òòô÷ü  #%%%%%%%  % úâÛÛàëôü    %)++./226;:25N]OúÀœ–™©¿×î (+++)%   #)/2422/2:FR8ÕÃÅÛý.Wd>ýÑÃÆÕãïø    (+2;KT@üèÎÊÛü/`m`Ò¼·ÈÛéòü  ###(/@QQ6ýű±Ò÷>Zjo:ìÌÀÂËÕÝèô   %+2:IR;îÕÆÌã Idml2ëÎÂÂÌÕÛæô #())%  %)2AI6øâÌÅÑé%Odom8ïοºÂÎÝëø %%%#  (2>;%öÛËÌÝúA`owWè·££²Ëàï  %.22(  #(+2=D>+%Ë«¥¹à)AWlwoé ©Å׿ñý  (/2/%   %.6COW%öýüκµÎ÷A[mx]æ²  ºÕæñú #+5=:. #)/26AQ[D2Û¬œ Åö ;NfuxË«£©Ëàéïö %+55.   #+25:G[RØ´¥©Ìö>Odsz@Ûµ©©Â×âèïý #+584(  )/46FW]+à·¥¦Æî8K]oxgþȯ©µÌÝéñú (/54.   +26:GW[%㽩©Åé 2GWguzQë¿©¦µÎÛæï %+485+  %/4:DRZ+÷Øý=N]mwzC溦£´ËÛèø  #(.462% #+/5=IUFüéò±Ìì .IUdrzrÈ«£¥ÀÕãô%)2:;2#  )26=DOU2úÊ®¦·Ûþ @O`mx{8Û²£ ²ÊÛèø #)/8;6) %.5;CN[Fί¥«Ñ÷8KWgs{døÂ© ©ÃÕãò (.6=:/  #+4:AL[QÒ±£¦Ìö6IWgs{q查ÀÕãïþ#+/8>=2# )4;AL][/ ά ¥Î÷4FTdqz{+ر£ ®ÆÛéø +/4;;5(  %2;CO`R ή£¦Ìô+AQ`ox}Wœ£½Òãò )25:=8.%/;AN]W+ Õ¯£¥Æñ)=KWfrz{/Û±£œ¦Ã×éú %.48;;4% +8AL]W% 﫦½æ5FRamx{]ôÀ©Ÿ£·Îãö#+/48:6+  %2;DR]>ò르Ûþ/AN[gszz/ر œ¥À×ìþ )/46882 #/:COZ@Ò²¥©Îô+>KWdox{W뺣œ ºÑæø %.258:5)  +5@L[R( Õ²£¥Åì+;FR]hs{wÊ©œœ¬ÆÝñ )246:6.  %2=IWU+ã¹¥£Àæ %:CLWdmw{Lâ² š ¼Õéü (/45884% #.8DU]/뽩£¹à 5AIU`js{h÷½£šœ±Ìãö%+25885+  +5AR]8ý©£²Û4@FQ[fqzxÌ©œ™£ÃÛñ +25686.  (4@Q]8Ȭ£±Òú/>DNWdmwzL౟™ŸºÕëþ)/45662  %2=N]:ί¥©Ìò+;CKU]hszgö¼£šš¯Ìã÷%.24664%  .;L[8 ຩ©Æë (8CGQ[dqxwÌ©œ™£ÅÝò%+24565+  +:IZ6 ÷Å®©¿â 5@GOWaluzIݯŸ™œº×ì +/2455/  (6FW;Ì´«ºØý2>DLU]hrzfòº£™™±Îæø (.22452%  %4DW; ݽ¯±Òö.;CKR[doxwȦœ˜£Åàô%+22242( 2AR= þôÅ´±Ëì %6@GOWaluz:Ý®œ˜œº×î +/2244+ .>Q@ôÛ¿´Àà2=DLU]grxdñº£™™¯Îæü (+2224/#  +=L@ïüü̺·Õö+8@IRZdmwuÊ¦š˜£Æàö%+./222( (:L@èñâ¹Ëë %4=DOW`jsx8௜˜œ¼Ûï (+//22+  %6IA éë øÎ¼Ãà/:AKT[doxdôº£™™±Ñéý %+./22/% 5FA èæ(à¼×÷)6>GQWalus˦š˜£Èã÷#)+./22)  2C@èâ÷ +ýÑ¿Ìë 2:CLU]grxI௜˜Ÿ½Ûñ%+..22+#  .@FîØî4ãÃÃàý+6>IRZdmwfö¼£™š±Òëý %(+./2/((=FñØè2.úÎÀÕñ #2;DNU]hsuΦœ˜¦Èã÷ %++./2+   %;Dï×ãý%AâÅÌæ+6@IRZdqwIⱜ˜Ÿ¿Ûñ#(++/2/%  :C ïÕà÷A5úÎÂØô%2=FOU]luf÷½£™œ´Òëý  %)+.22+  6A ïÕÝò8GæÊÑè+8ALRZfruΩœ™«Êã÷#()+/2/%  4@ ïÕØï +G:þÕÊÛö%2=GOUaowC㱟™ ÂÝñ %().22) 2@ ñÒÕì#ALæËÒé+8CLR[hsgú¿£™œ·Õëý #%(+24.   .=#ñÒÒé8L>ÕËÝ÷%4=GOWdquΩœš®Ìæ÷ #%+242( +=%ñÑÎæ/DQ#ëÎÕé+6ALR]mwOæ² š£ÅÝñ  %(/44+ ):#òÎÊàý+>OAØÊÝ÷%2;FOZhslýÀ£š ½Õéú #%+452% %:%ïÎÅÝø(6GU(ìÎÕé+4@KUdru Ñ«œœ²Îãö %)264)#8%ïÎÃÛô%2@QIÛËÛô .8DQ`mwRè´ œ¬Èàïþ  (266.  8%ñËÂ×ñ #/;KW+ïÎÒè(2>K[humÃ¥œ£À×éø %.582% 6(ñËÀÕî .8CRL àËÛö )6DUdrw%Õ¬Ÿ ·Òæô #+485+ 6)ñȽÑë.5>KW2òÒÒè />O`mwWé·£Ÿ¯Ëàîü (286/# 6)òÈ¼Ìæ+4;DTL àËÝö (6FZjumŦŸ¥ÃÛéö %.682( 6.òÈ·Èæ)4:@LW2öÕÕèý.@Tdrw)×® £¼Õæñþ #+485+# 6/÷ƵÅàþ%28>DQRæÎÛî%8L]mwZ ´Îãîø (2862(#62úŲ¿Ûü%/8=AIU=ÛÎâô/CWgur È© ©Èàëö  %.584+ #84ȱº×÷#.6;>DNR ìÒ×èü%;Qdqw2Û±££¿Øèñý%+486/%%68ʯµÒô +5;>@FR>ÝÎÛî4I]mw[ñ½¥£µÒæïø#)2662+#%6:̯¯Îî +4:=>AKR(òÕÒàö)@TfssË« ©Êàìö  (.485/%%6; Ò±¯Èé+48;==ANKâÌÕæ6N`qx5Ý´£¥ÀÛëôý %+2662+(5@Õ²¯Ãã)28;===DQ2úÕÈØï +CWjw]ô¿¦£µÕèòú %)/585/+6@Ø´¯Ààý%28:;;:=IRèËÌàý8Qdssά£©Ëãñø #(+2662.6Aݵ¯½Øø#/6;:::6@O@ׯÒì +G]ow>ൣ¥¿Ûî÷þ %+268528A â¹±¼Õô .5;::858GR éÊÈàþ =WjudøÂ©£´Òéöü %(.5864:C%溯¼Õñ+5;;8854>NA×ÅÒï2Ndrsή£©Êãòú %(+2886;C%é½±¼Ñì(2;;86525DQ)ìÊÃÝ A[mw@æµ¥¥½Ûïø  %)26:8=D+îÀ±¼Ñë%2:=85522:KGÝÆÑî2Rgudú©£²Ñë÷ %(.5::>F/òÅ´¼Îéþ .6;:542/2@N4÷ÎÆà D]qsÑ®£©Æâôþ%%+48:=F8ýÊ´´Ëãü )4;;642/.4FLæËÑì4Wlu=âµ¥£¼Ûïý %)28:=F=Ñ·´Êâú %28;842/++8KAÛÈÝþ Ldr]øÂ©£±Îéú %(/6:>FC Ò¹µÈà÷ .6;842.+).AN%îÎÒî:[osÑ®£¦Åàô  #%+5:>FFÕ¹µÈÝô +5::52/+((4I@àËà(RhsCà´££ºØîþ  %+4:>GIغµÈÝô)26862/+%#(=N/öÕÕòDdrdøÀ© ±Îèø %)28@GLÛ¼µÆÝò%/5862/+% +FKæÎæ+Wmrά£¦Ãàô# #(/6>GO Û¼µÅÝñ%.46522+% #6O=ÛÛôLgs:ಣ£º×î#%#%+5>GO%ཱུÅÛñ%+24522.%(AQ)ô׿5]q]ô½¥ ¯Ìæü #%%%+2=GR.æ½µÃØñ #+/2422.(2NKèàöRjqË© ¥Âàô#((%)2;FQ2ë¿´ÀØï  +/222//) %@R8ãë;dq4Û¯  ·Õï ))().8CR8ïÀ´¿Õî  )//22/.+ /IR(÷éø ZmZœ®Ìéü (++++6CQ=øÃ´½Õì (.////.+#%;QKñï Ggl Å¥œ£Àà÷%++..4@OCýÆ´ºÑëþ %.//..++% /FU:ôý)]m)Õ«œœµ×ò +///2>NFʵ´Îèý%+//..+)% (6NU(÷RhOæ´Ÿš«Îë+2222;LK ε´Êæú#+//.++)%  .ATKþ6dd¿£™ Ââú %2444;ILÕ¹´Èâø )./.++(% )8NW6 [j Î©šš´Øô .455;INغµÅÝö (+//++(# #/CUR# GgF௜˜©Îì+468=INཷÃÛò %+./.+(#  +6N[C+a]ö¹Ÿ˜œÂãü %26:=IOãÀ¹ÂØñ %++..+)# %2AU]4WgÆ£™˜±Øö#26:>KR æÃ¼ÂÕìþ )+...+#  +6N]U%@g2Õ©™– Ìî+5:@KR#ëȽÃÕéü %+...+%  (2AWdG)aO汜”š½æý )4:@LU+ïËÀÅÕèú%+../.%  #.8L]d8(U`ýºœ–”®×÷%28@LW/ôÎÂÆÕæö  (+./.)  )4@WdW4Df Ê£–“œÊî /6>LZ4÷ÑÃÊÕãô %++/.+   %/:L`gN@dDØ©˜“˜¼àü +5=KZ8þÕÆÌ×ãòþ#(+//+#   +5@WffL][““«Òò)2;IZ@ÛÈÎØæòý  %+./+% (2;K`ha]g¿Ÿ”‘šÅé#2:GWDàËÑÛæñü #(+/.(  %/6AWdlflCÑ£–‘”µÛø .8DWI ãÎÕÝèñú %+/.(   +4;K]hlma謙“¥Ìî+5CUNæÒØàëòú #)./)   (/8CUdloo¼œ”˜½ãþ(2@TQéÕÝãìôø  %+/+#  %+4=L]gorQÑ£–‘®Õô 2=QU òÛàæîôøþ %+.+% #+28DUalrlñ¬š“™Æé+:NW(öÛâëò÷øý  (++(    (.4>N[gqs+ÀŸ”“µÝü(6KW+øÝãïøüüý %++( %+2:GTalsdঘ‘£Îï 4GW/úÝãòýþ  )+(# %+/4@NZfqs²œ“”½æ/CW5àãô %)(#  ).2:GT`lsWΣ–‘©×ø+>T8àâô  #((# (+/5ANWgrsö®š“–Ãì%:Q;âàô  %%% %+.2;IR`mu4ß–‘±à6L=ãàñ  %#   )+/5CNZhrmæ©™“šÑö2G@æàï   %+.2=IRaou·œ”‘‘¼è+C@ æàì%     #)+/6CLZjs]Õ¥˜“©Ø%== éàì(%   (+.2=FRdqs²œ”‘–Æò8; éàë++%    %)+/8AK[lsTΣ˜“‘®à25 èàë+2+    (++4;CTgrm÷±œ”‘˜Ì.2æàëþ)22%  %)+/6>L`os8Ê£˜“‘¹î%+æÝéþ)24.     %)+4;DWjsW쮜”‘šÛ%àÛèþ(252(  %(+28@Qfrg㘓“ÅúÛÕæý(266/     %).6=I`or5㮜”“¯ò ô×Ìàú(48:5)  #%+4;DWlsI÷ã™”šÛþéÎÆÛ÷%4:=:/     %)/:AQfr]×±œ˜–ÆìÝÅÀÕñ%4;>=5(   %+6@Laqràæš–µÛʹµÎì %4=AA:.    %)4>GZluCéÌ·£™¥Ê¼©¬Èè 4=CD>4%    %.;FThu`øÎ¿®Ÿ£¿à2=CGC8+  ###  #+8DQdrs×Â¦œš±Øý/;CIG=/#   ##%%  %2AL]ox=ãÂÆ¿·½«œ™ Îö+8AIKC4% þþ #%%%# #.=KWjw`÷ȺÕÌŬŸššÀì(5>GLG8+  ýý %%(%  (8GTdsuÕ·ÎæÝ² š˜®à 2;FLL>/#þúþ #%(% %2AO]ox>ã¼´ò÷½£š˜œÑþ/8AKNC4%  úü  %((% +=KWjw`øÅ±Ý Õ¥š˜˜¿ï+5>ING8) úø #%(% %6FTfssÕ²Æ ô¬œ˜–©à#2;DNK>/ ýøý  %%%  2@O]owD溱ô ¿ ™–šËü.6@KNC4% úú  #%%#);KWhuaøÆ±Õ⩜˜–·é%4=FLG:) üúþ %%%%5DRdruÕ´Æì빟™˜£×/:CKK>/#þúý  #%% #2@L[mwAæ¼µÕØÎ©œ™œÆò+6@GKC4% ýý #%%  +:GUhudøÈ¹Ê¿Ã¹£œ™·ã 2=DIF:+  þ ##%# #(5DOaruؿõ¯¿¬ š¥Ñö+:AGG>2%  ####  #(2@KZmwLèÆÀ±£¦Å© ¥Ãæ#6@FGA6(  ####  #(.;FTgufÒ¯ŸœÆÂ©©ºÛú/=CGD:+  #%##  #(+8COarw(ãʱ ™´ØÃ²²Îì %6>DD>2#  %##  #(+5>IZmwQöα ™œØæÈ½Åàþ.:@C@6(   %#  #(+2;DRgulà·£™˜ÂöëÎÅÕî #4;@@8+    ## #%+2:AL`rw;ì¼£™–«îëÒÎâý+6=>:/  ## #%+/6>GWlw[Æ¥š–šÒ ëÕØî28;:2#   #  ().4;CQfsr#Õ©œ––½(æÕâø%4882%  # %)+28@K]owL欜–”¬è (âÝë+582(   %)+/5=FWjug÷±œ˜”œÒ 4#øàâò 262(    )+/4;CQfssº ˜”˜Åø+;ñÝæø%22)   (+.2:AN`qw=È£™”“¹é8;ëàì+2)   %+.28AKZlu`ئ™”“ªÛ+C/àâò +) #+.25AIWgsq쬜–“šÑø:Iöàæü%%   (+/4>ITdrw µœ–“–Åî /FD èàì# ##  %+/2;IR`ow2À ˜““µâ ;Q2ýÝâö  #%%  #+.28FQ]lu[×¥™”‘©×ú2IQîÛèþ #(%#  (+26CO[jsr쬚”“šÌñ %;T@ãàñ  ()%  %+/5@NZgrw´œ–“”¿æ2GW)öÛãö  (+)#  )/4=KWfqw/㘓‘²Ûü+;RQéÝéø %++(  (+2;IWdou[Û©™“‘©Òô 4FZ8ààì÷üýý #+.+% #+28DTamsoö¯œ”“™Èé.;OW òÛàëò÷úý  )..(   )/6@R`lrsÀ ˜“”ºàý(5CWI æÕàèïöú  %+/+#  %+5>N]jqsQÕ¦™”“¯×ö /;L[2úÛ×Ýæïöü%+/.(   )2;I]goqjﯜ”‘œÊì+5ATUìÕÕÛæï÷ #)./+%  %/8DZgmmo¿ ˜“˜¿ãý%2:G[AÝÌÒÛæñú (+/.(  #+6@WflgmFئ™”“±Û÷ +5>Q[%ñÑÊÒÝéöþ %+//+#  )4=Rdl]ddò²œ–“¥Ìï%2:DWL àÊÊÒàìú  %+./.(  %2:LahWRhÆ£˜“™Âæ.5>L[2÷ÎÃÊÕãòþ#)+..+   #.6G]hR@aO૚””´Ýø (28CTTàÆÂË×éú #(+..+(   +4D[fR4Qa¼Ÿ–“©Ññ /6=GW>ÒÂÃÌàò %++..)   (2>WdQ+;f8Ò¦™”šÅé+4:AOTãŽÃÕéú%)+..+% %/=TaO%(]Zñµœ––¹àú%26=FT=þÑ¿½Êàô #)++.+(   #+8Q`Q LgÊ£™”©Õñ.5:>IT%ëżÀÒéü (++.++%  )6L[O 6dG௜–œÆèþ (46:>NI Õ¼·ÅÛò %)+.++(   (2IWN ]g£˜™¹à÷#/568AQ2öÅ··Îæü (+..++%  %2FUKQh/Õ©š–¬Ñï+2558FQݼ´ÀÛò %++.++)%  /CRK@fWî¹ ˜ŸÅæü (/224=NAþʵ´Êæú )+.+++(#  +@QIþþ+]l˦šš¹Ûö#+/225CR+æ½²½×ï %+..+++(  )=QIúøUjI௜™¬Îì)..//:KO ε²Êãú )..+.++% (;OIñòLgfýÀ£š Ãâø%++++4AR6ïÀ²¼Õì %+....++##6NIïî:do)Õ«œŸ¹Øñ )))+/:IU×·²Æàö +.//2.+( 5LKëèý)[oÿE11%1 8àÞëë¹ÿÏâô×íåõæÖÑÜ¿êíʶÚõ üîìôúéüøõ üóò &  .#"ë ý.M;O]WV3:;::3ûáîõäâëÚÜÕÉÑÖÛÙééÞÏßêèïííæéþøØÅ¸»ÊÌÈÆ¿±£¤±¶´¨ÅÐßñëõùøèäü/>4(43:R]\OJSSM7*4=43)$÷íÛåùõîíõ"! ÿöÜȽ¸»´£§¤±Æ»­–›°¦·©­É÷øñð÷ø+$$H+ #1I('$7 ìõòÎÒH4R5 -"J+Ð ÿôåéæãÂÎß³ßâìËÎÍ·«ôÐͺÉÿÎÝÐáÀ¹ðèÞõÞý ýòåëÿúèã ö!&(A-3-4FM;='ý5"  ò÷úäóùéØÙ×ËÜ×Úéæã÷ì×ïÍêýþé×ÑØéÕÙÒãüýëéèÖßíü ø.õ+ ÷ý ùñ ùììÚìþ íøøÝçÜæ÷ëÿ  # þ þ#ù#îøâËðÓÒëÚØöèÔàÐÍêãïíüâèÿÛôð þ÷ÿýîòû÷! ü óD ?'ÿ7êÝý õúðò ÷þýúëâÔéÑÅÐÛòÍØ×ÐËàÖ½èÔϾèüë5!à'-8ø$,18>.'a? +?ô&:1)F Ë#ÿ ,,ê#5 ïòß ÿóðëçþ¸åÞÜ»Éýâ¡ÖØÑÏßÚÒØÍïÍûÆÖþïäñîõþê üûç ìÞ -00!D/!þ üÿ øåÙÔçöóãõÑäßééæÜÞÂëëÚØïûÞõæó ïêöòùü ýè  òèöóÈ õÿÿÙ仸ñçôóù ø-üôA ( C)"C2'ý î èó×çñòùøØðôóðÿçõùâéøï÷ÓØÒãìè¿ðãîäÚâû×øðóðóõÿÓ=ò ä- #=ù# ù-2ý üVúÿ!ú û ùÜøÌÚáåÜóËîÊØÙùÍÌÈà¼Ý¹½ÊÆÛ×áßÓæíéâÜ÷êõõú ö52" 2..B*1 .`T9@943B=""&û óô þ üèÎáêÞßß¼ãÎõßÚÙÜÂù²ÞÄÞ×®¹ØÈðÔÚáåÎäŸÅéÊÑàæöÚâûú#+'61 ,$:)F*+IB6(+$20* G!-%ÿþýúãõõõáééÐËÁÙÊÆÊË»ÄÆ«Á´ÍÔÐÒÒÈÞìÞØÒèÎëëû0-å. +  0'&)&&&$ (ûüþ.î ÷D1õ* ÷ÿ- 'þýóøòñãÖ¶çâÕÐèÝ×ÓÎåÏûÊî¿ÝéÕ×øóðîÚüäüûßìù þñ  ( 7ü 7$ ú  þ ùéØûêöúòòòòùñëàïààðÑâßîáêáçíäíí ÿ û úñý  ë Úùàðôëôõÿõøõÿúûôûÿÿ(ã"' !, ùüüõ íóßéöæø×ýÿÎÑÜùôñÝìèæéæúâéÙËø ÿìöóûû÷' =";K2##:0%èôõÜýíîçþèîØæóòòëûíòÿðßððÿçÐâìÙÑØöèÐáêãÝòÙöüúúÔÛÿüÿ! GD #"<ó 6 ôæ êîí ðê ýÖúüºÏÚÚïÆâþãèæÔ×úÙåîë×âãõúÿú þ î/ üà  ü !óýûüïöþ çûú÷ñò ìÿÒ ýìòãõÑñééâ÷ÙðãõþýÝâáãòòÿéÿçíî ó ö÷ë" !ú &ü îòáôîûî õçýûä ôøüüö÷þüöêîäèâó÷øßÿøõîéïõóãøøþéùÿÿ ð÷ñÿ ÿÿ þ ýúìóý(èûîíîóÿëôõî ÷Éöãç âá íÝ)õô÷ðóçÙçæçèèïôõ ñÿ ïû# )  ,0 õ/øôõ òýíäüõÿêòõòùú÷úýõßñçðü÷íéÕàæÕÎßÜîéÝåöòëÛøûïýîóùÿúü  !.2(& 8öû'÷ þï÷  ùõøÿôìäããæÔÝîÑðÕæÙÚçÎÔàïàÜßîáúëþÿÿ ìø #öAG: #õ þöÿùÿÿóÿúõýÿðîéïÞÜ÷äùñÝìë ÿøúüÖþýýÿõäþ÷ÿüíúéâðùúêððÿíú þøú -/  ù úÿù ûÞìíùþéç÷ïðüïìôþëíðòëäèïõúÑèæüæ ó÷ÿúúÿ  ï &!$   õ å÷äøûüûüì ð úúýõÿýíðíãäóõàâòíÛîòáæøäñðáòüøÿéýðôþ # ! '' üä ùÿðñåïððÜòíîÞãããóíãíÜçàøñãñèðÿø çç   #ÿøú ÿ ûÿüûñýøúëðÝåÛîóØôõùðþëúñçñúü öýöûíòûýÿñôðô ï õÿÿüü ùûð÷çóòþë÷÷ðïóìíùøêöòìÛëð÷óëñúéçü÷èýôÿúóùúîö÷þÿÿÿ ÿÿ #  þýêúíüýóþðù÷ø÷þÿîù÷ýøûôðóìðóÝóåþéôäæðëõóõãøïôøþÿúÿ "-þüóÿãýôõùóìôûú÷ðö÷øþôìçÿáñæñòóóëôþëýûüú÷øÿøøû    !  ìÿüÿ ÿõûýùý úúýÿóððýæëÿÜéøøíòðéíæèêèèøÐóôìýðòó ú!& ö ùüÿýñ üé øúöúýýø÷óþæíÿåõóôñìøþüíòòòùðîõéôëàûûÿõÿ(   ú ûÿêýúäúþôòéëìöæïíôëíôòòóýó÷êüôýîòðù òúÿ % !üþý öúãúòóóùíÖàÞêèëòæëÜðÜäÜíëÜûßããêéð÷éæ÷ìðú÷þÿø   þ üôôÿýîùþôôðòûðù÷íþûüÿìûþíóòùñãïåæÔÝòîíîðííæüçñ ÿÿþÿ÷ÿ$ þ$$ ÿþ   üÿï õþýý ó÷øøõ÷íéèâãêÕÜÞíâêæ×àáääîþïòóòþóûøý    "úÿ üùþ ù þÿÿàìýäéêõäæÜÞîöäæõìîëèð÷æïðýÿÿø÷õýý üÿüÿôð÷ó÷÷õøõóòõ÷÷ñõøøúýÿøêúø÷÷óóòóõôøÿñÿ ø ýýýýû ÿü     ûøüæïáûþîðóóùñúïìðäÿ ûÿëôñùúøûúýÿëöÿõìýúäúøðó÷ñëüéçÿëóþýýÿ ýú #  ÿ"($!úþòøõþîòðéïëòîîíçëäèèèèÙíâãæÔÚÒÒÜ×Ú×ÔÜÙááßñîîôòõ÷û &!"1603333$5%+û þ÷õÝîëìòú÷èñóìðáýûóüúøÿñùÿÿÿíëíãíùÎçêïîëáêöØìæÔàøüíüüöþÿ  !"& #*  ùûÿûúû ý öñ ÿÿøüýúüíõóòõóýðùõòåìúÞúæäöú÷ðöéîõòëöêùþéÿçôîûÿ ùú&    ùûþ ëïòòîîííîæßòð÷áâäêðûÝéæçýôøýúúóÿ üÿ ûíúÿùôûúßùÿýüêÝúõüøÿöìÿýðó÷øëôðî îøñõáõúýüü üý" * *.ö úøüúèîùõßóõïóùíôèðæðêòòóðîâæãóåìäãÖùæëëëäððÿíöõñ %+#+  ûïýøøúøøñýððóùýüüÝÿÿÿøïù÷þõñáîîôãøòõóùðÜ÷ìùÛúîòõó÷õ÷øÿíø '# þ   þöþù÷øÿñóëùîëùÙá÷íýäéâîéæõåúëõìøóÿéì òÿÿûùÿ ÿý ô ÿ ÿýöýòûõò÷÷þìëýøõ÷ðóõ÷ð÷ñðÿëíôñõðÿýéóÿýý ÿ ü ùûûÿú÷õþòóù êÿý ûýâûüýñøÛúóùñý ýúþ úýúÿýÿ   ÿý ûîõÿÿüöøùöÿíù÷ ùöþíûþúýõðüþúïùòòóýúýÿýõîîõïóýý ý þú û úýÿøüÿþú÷þ ý ýúüñóõÿôò÷þõ ûýöúýðÿÿüýÿøøûõþÿøýöýýÿýýÿóðþöþîùÿóî÷óùú  ýþýÿýÿøÿ ÿÿóùüøîðúõòõÿÿþýüôý û óú÷øÿñùõ÷üýñÿ ûøøñùþ"%##0DOSYhtqjjfbdWROSY[VOKBFUQJSbdZMIWYD/( ÷éÛÔ×ââØÐÈÈÇÆÀ·ºº³¶¼º»ÆÆÇàòìæêæñ '78/)" $("  òêöÿÿùööúûêÞÝàæáÔÓÙ×Ûäæèþ+=BHOY[SQ[`]OIJKF/' ùèáÞ×ÛàÙÑÍËþ¸¼¾¶®¯¸¾ÆÉËØìñåÝàèó )4<80)/,   $" ÿöùýÿþý÷ú  ìØÕÙÜá;ÃÑäéàåú %7Q]cowyncd[]WN@@ISVKB@FR_RHIZ^[ZRMRE<90/+ùñìá×ר×ÓÕÐ˸±ºÂ¸ª«³ÇÕÐÐÞéæÜ×áéù",07>8/-(,)     ÷úûóóú ûæÈÌ×Ñ¿¶¿ÔæâÛéý  3DO^llkodWZb`UFAFJFADJMHHUOFIRZ[]]VNFE>95/ ýöêâÜÛàÛÕÔÙÔ¾¯µ¼³­²¿ÓÓÐØÞáâÛ×äñ"'+7=>9))///#   ÿ  $  ý þîñúÿýûêË¿ÃÀ¼¼¿ÓáÞâéùû+@OURWkh`V[__]UIFF=9BJF=@HHIMQQSYcd]QND9997 ùíäêöïÝÙÙØÝ×À»»µ·»ºÄÓÔÓÓÜåæÞÜèû"('',7=<79999>MNJMU[_df[QQD49>1ïì÷ýûïâàåæÛÌËÑÆ¸¶»ÃÆÆÉÐÝìêäâåï # $)3A@4,,00" úÿ  ' "$ ùù  þ ÷ñóúöíèæåÑ»±³ÄÏÈÉàòýýþÿ'157ADIWb`__b[RNI0)00),39EJDHWcjcbcWMQI715( öóííöòäÛ×ÙÔÉÇÀ¾ºº¾Óäìîèæèêý'$(4<784/)$+þûûÿÿ %)#""úõý  ÿñåîûóèáæÝÐÌĺµ¼ÍÜìùÿûþþ  175>N]]Zck^SQB5,-+ '4>FIHMZfhkfYKIKA303+  õéõóáÝÝÕÑÐɺº¼ËÜìõíäèïöû $-790(141#ÿù÷÷ýÿ $(%# ÿþþýóû  óèéóõóâÙâàÕÐÌÈÄÉÏÜïóò÷îñ (5HV^YQWjdM55<:+'7>FIFO]fkjdV@=AB703- þõöÿêÞÛÓÔÛØÍÄÆÐâõóæåíòù ")-0/)'/4+#ïïöþþ'(" þþûöÿ  ÷ñíéìñæØØÞÜÞáÝÔÑÛéñ÷óêáäêò3FMNQVURQHD>>:3$$3DIBHS_ff^UHJE<>>84% îÛ×áèæÜÕÑ×âèäåäí÷úû  ()),%" ('%(( ùùõù"  ÿùþ÷ñééâàÝÛáíïêèäáèíêÜÜÝÞéï÷ÿ"05:EQJDABFFDA=1--'+77FEEOWWVWSIHHEJA+$$ úóâàñöéàâêèéØÍÝò÷û %31 --$ öùÿûú    ÿ  îíúùúþ öåâÝááâêùþ÷îéêèàÙÕÏÏàòõõ$+5>:9:57BHA943A>45@<51$4<8//@QYVOJQUNA90   ýõò÷óó÷ÿýõîììíéòú $"$+( (0)$"óõýÿû÷ù  ûïõúîèò÷ñïöÿïÜÕâîò÷þý÷èà忨Ôâííù '5<70(/>@89F=/39+(87/1=JU^WHMSI853  (' õòñöÿþþûóï÷þþ )++$ (+#$+  þùöùïìò ÿÿ÷÷úìäíîìñþýûýþùèÙ×åùþ÷æåõùèÝÝé÷ÿý  ',07830315>897-"#)0+,4@OVSKHKIA>3( # ûîèîý   ù÷ú  %++)-31)"##%#ýöêéóú úùþýûïêäâæò÷öúúõú÷ìÝÛÓâþöö ïèêìïîò/>B>0(,5018<(#'%$+%$5EHENQDDKKH5)"ïéíõ  #þ#,37:=9, % þ÷ñêïóóúþùùúùíêèÞÜâñþýûòîïéØÛâäí ý ûöîåáìû  +9@@5,/0)'('###'($#34+0BOIHD@HQJ:,#  ÿõñùÿþ %) )3:@@=8,$ þùóìéóûùöòöóìíîåÛÔâúÿñäÕØÞØàïöùý òéåéúýý (057<70)$$+'+31((07>OOE>DNB:9, öïïòóý ## "#/9879DE<+ý ÿïêíó÷úþòêîö÷ñòòåØ×Ýìùý÷æàäÜÓØâæõ ÷óíó $)%#5>:/" ")133)$/>INND@>@B>4" úýéèí÷#% #$#01##+:@:87BF@5)ýý ùö÷þúæåþ'$" '300::3135AIH<0-+   þñêïý÷óõõóýõÝäñöòîèÔÆÇÍ×ÞÞÕÙäïõòàæ÷ úþ  %5>7($ #$#++4>9797:NUF8==7)÷èíúùêïóùúòþ$ '5708=>:9=>>BHA488,$%  ýñèèúýòòñõþùìåííéáØÆ·»ÉÑÞÙÔÞïöþûñú ý  +($-113-  '7EB9538AKNH:0-+" ñæäíûõâæîòû  #")9BB:><7AMI>A<>EE=+##úïæéúþ÷÷ñòö÷ïêä×ÓÏɾ·¾ÌÔÔÓäñö÷þÿûþ " %11)#0:4(  )=D97><84>JF@8+ òàäùöæÛèòñóù +,('/9EMH>9:=ESH48@A>7#ööîéèáÜæóíéóûþ  '051138BIOF93>OKKQONMIB7+"ùöõóó÷óöùóûýúúïÛÍÏÐÑÉ¾ÂÆÃÍÙÞäïéæñ÷óú  ýý  %$" -8@@4#)-+" )1AD=77>:8<1" #  ýöéâìäÜääâí÷ö÷ #0:<7:>ADADFF:9NYQHNWN7+%õíïùÿ÷óõùÿùïàÐÍÔÙÏÉÌÏÉÆÌÜááèâØáñõîÿ  #  " 0A:30-,%" "(7B@88<:0,-##ÿÿùåéêàØØÕáòñêö  -9B>8@FD@MOA8@JOW^SI@0(%$òìïûýýþûûþòîåÏÉÓÜÜÛÔÔÕÔÓÐÙâåÛÌÑäïñú " )3>=731' #1=95>:))-$%'ýòõñâÝâÛÉÉØæîý (349BDFNMJE@DHEMOQVN>7,01'ÿÿýþõùûòòìÞØÑÕÛæíåÛÔ×ÜÜÕÌØÝÍÄ×íþþ    #$"#-,0AB:0($# #531443-#$ "3)ûõ÷òéàää˼Ëéúùõöý  " 0:=HQQIBIJKKIBAEDHMI=0/( ÿþûöíî÷÷ïáÞâäØÞòúìÙÕÞàÕÈÈØÙÌÃØùþûõý %$#'$"189@F=)#"#" "$,75-% #-'ý÷öïåâåäÔÂ×ò÷ïáæõ ")4@KYWE:87BIIB3(370-// ïóñèåìñíèîûþöïöúåÜÔÌÈÃÇÏÕØÜêóèåõûõöú " $ #+'$/89=EH5#%0,$$  "(''+47/$÷óóêØÓÜîêæïòåäêíáÝåêï)-)-3,0H@(++"  (++7<7+ ûóéÜÓÛêîòêâêêéñóáÓÔÞèó '/1-3404>IJ9)+3KA)#"/007951  ûïáàâÝâìòèÓÞñóíîäÕÌ×è÷)4415:BE:( )>JJDEKMJJFDA=3"',    ÿýõìòïÝÔÑØÙÔÜâæÜËÔîñéáàÜâó $-/0,%## þù÷ý7EF=>:3)5@A=+$))-+/798-òèêïéÞâåâ×ÌÝñòîéâÑËÙêõ'3=<88<1"$:JMMMOMJNOD3$$# ûóõñéÝØÝåàÛÞâÞÐÇÑáâääáÛÙé $'(1<8 ÿÿ1EJD=89984-(   11/-/3035+" ýóöùùîáÞâØËÄÓæéìïâÑÈÓêý '5<3/3+$"#"4HQWVRW[M:,(' ",'" ÿõâÝâæåââäâÕÏÉÈÓÓÜêéÝÝêý"('#)3=5%   9FIIF@4,)% ,750473,'%( ÿþÿþñæáÔÈÈÈÇØååéâÓÍØì "'(,0,%#$%%$#%(9MWcgUE:1)$$#'+3/  þîèåèäÞâèÝ×ÓȾÃÑÔÝâåìöû"+140)(-'  (BOUR@3'%  "),+)4=5+$"ÿñéÜ˾ÂËÕää×ÌÑÞæèö $+%$%$ +-,$ %/>R`cZB71/"#)( 5<)   öæææÝÛרÜÔÉÄ¿ÆÌÓÏâý$,-//,($ $%  0MWWI8-# 3/0:7)# "  õâÔÇÃÀ¾ÈÔàÝÓÇÓäèæï$ 11$',(#$((1EV[[VE1(($#(,'$11 $ïæèäÓÇÓÝàÔȾÀÃÇÔâõ  " #)7:0/3 #-8IWWM0  %$ $(,//-,$ýâÏÓÌÆ¿ÄÉÔÜØ×ÛÝæææö   )<5 ()#"/17BZc`R>/% $,-+ $%$%+$ öèæÞÑÌ×ääÕ˾ÂËÜéñÿ"$+5=4)+,)"  %'3@RUOB(  '-()041+"ûöìåâÝÔÑþÈÓ×ÝèâÞäèåèîþ  /3+'#$$)1:EUgcWM9(%#$%%$#%,0,('" ìØÍÓâéååØÇÈÈÈÔáæñþÿþÿ (%',374057, %),4@FIIF9   %5=3)#'("ýêÝÝéêÜÓÓÈÉÏÕâäââåæâÝâõÿ "'," '(,:M[WRVWQH4"#"$+3/3<5' ýêÓÈÑâïìéæÓÄËØâÞáîùùöóý "+5303/-/11   (-48998=DJE1ÿÿ 8<1('$ éÙÛáääâáÑÇÐÞâÞÛàåÝØÝéñõóû #$$3DONJMOMMMJ:$"1<88<=3'õêÙËÑâéîòñÝÌ×âåâÞéïêèò-897/+-))$+=A@5)3:>=FE7ý÷ùþ ##%,0/-$ óâÜàáéñîÔËÜæâÜÔÙØÑÔÝïòìõýÿ    ,'"3=ADFJJMKEDJJ>) (:EB:5144)÷è×ÌÕäîíóñÞÓèòìâÝâàáïû  159700/"#)AK>740/3@AA0 ýó #(+/(ÿõâÞîîèîñáÑÞéäÙÏÇÇÌÕâîòòöÿÿÿþûþóö  ,9-,4043-1/' óèÞÔÓáóñéêêâêòîêÛÓÜéóû +7<7++(  "++(@H>884,0:=-"%1,ùõòìíõòééîâ×ÞåÜǾÈÌÐÞïóõööûÿ÷îíìæîÿ'-4:905DE=99@AEHH@949MUKB<0,3-)-)ïêåÝáíêäåòïæêîÜÓØêóó÷$/74+''("  $$,0%#5HE=98/$'+# $ " úöõûõåèóêÜØÕÏÇÃÈÌÔÜåúöïöþûîèíñìåèñóï //-073(3BIIB>979BJIJDDIMOA91//(ÿõêàäæææìêâàÜÜÜâîõúþ+(",10'  "#'+'(=EBA:1$')#þ÷òõöñáØÐÑÏÈÇÐØÝÛÝñýóêîòäÝåíóõìåêî '-,%$%)=MQHA<78:EWYK@>MNJE<4)" õæáï÷ò×ÂÔäåâåïö÷ý'-# %-57,$" "#"#)=F@981"$'#$% ýõûþùØÃÌÙØÈÈÕàÞÕÙìúòÞØäâÞáï÷÷îíöûþÿ (/0=IMHDEABIKKJIBIQQH=:0 "  ýöõùúé˼Ëääàéò÷õû)3" $#-344135# #$(0:BA0,-#"$#    þþí×ÄÍÝØÌÕÜÜ×ÔÛåíæÛÕÑØÞìòòûùõþýÿÿ'10,7>NVQOMEHD@EJMNFDB943( ýîæØÉÉÛâÝâñõòý'%$-)):>59=1# '137=>3) " úñïäÑÌÛåâÙÐÓÔÕÔÔÛÜÜÓÉÏåîòþûûþýýûïìò$%(0@IS^WOJ@8AOM@DF@8>B9-  öêñòáÕØØàêéåùÿÿ##-,0:<88@B7(" "%,-03:A0 "  #  ÿîõñáØâèááÜÌÆÉÏÌÉÏÙÔÍÐàïùÿùõó÷ÿùïíõ%+7NWNHQYN9:FFDADA>:7<:0# ÷ö÷íâääÜäìâéöý  # "1<8:>77=DA1) "+-)#4@@8- "$%  ýý  úó÷ñæéïäÞÙÍÃÆÂ¾ÉÑÐÏÍÛïúúýûóùöó÷óóõöù"+7BIMNOQKKO>39FOIB831150'  þûóéíóæÜáèéîöö#7>A@84>D34BE5# %(/71/:@' þ""" ÿýýþÿùîïöèÓÏÐË¿¾¿ÄÍÍÆÕéóÿýõúùñû÷ìèñùýù')0HME9/'(,+ ùóñòèÛæöùäàò +8@FJ>48<>79D=)  (4:0#)11% " þûÿþ÷öñäÓÔÔ̾·¾ÉÏÓ×äêï÷öòñ÷÷þúéæïú##+=EE>IMA7<>:BB9)"#  ûòîæâõûíäæñ "+-0:HNKA8359BE7'  -311-$(+  ý úñûþöïÞÔÙÞÑÉ»·ÆØáéííåìùþõñòòýúèèñý  %$,884AHB>>=9:>=8075' $þòúùóïêùúíè÷)7==8FUN:7979>4++#$# $(7>5%  þú ÷æàòõïäÙÕÞÞ×ÍÇÆÔèîòöñäÝõýóõõó÷ýïêñþ   +-0RUE:90'59)%(' %3750,"  ÿúïÿ"úîáÜÝééåÛÝäíéÜÓÑÜîòöùîääòÿûúóæñûóù 1BB<8:@:+##10#$# %#÷íèéýú "4>B@>@DNNI>/$)331)" "/:>5#%)$ óíó÷ õæâØÓÜäàæ÷ýùìÝרåòòñ÷öîêòþú÷óíêïÿ ý+EOO>70((13+'+$$)07<750( ýýúéåéò ýùöïàØÞØÕäñÿúâÔÛåîíìóöòöùûóéìóùþ $,8=@@:3) )% þÿùñõÿ  #,:JQH@DHIOB0+43#$('###'(')0/,5@@9+  ûìáåîöû ý íäâÛØéïîòûýþñâÜÞèêíùúùùþúóóïêñ÷þ % ,9=:73,#þ#  õíéï")5HKKDDQNEHE5$%+$%'#(<8105,(0>B>/òîïìêèï ööþâÓÛÝì÷úõúúö÷òæâäêïûýþùú úóéêöý#%##")13-)++%  ú÷ù   ýîèîû # (3>AIKHKSVO@4,+0)#"-798>51303870,'  ýÿ÷éÝÝèùõåæ÷þùå×Ùèùþýûýþñìîíäìú÷÷ÿÿ òìïùöùþ  +$#+( $++) þþ÷ïóûþþÿöñòõ '(  358ISMHW^UJ=1/78(+93/=F98@>/(07<5' ùííâÔØæåàè÷ýþ÷òîâÕÜïÿöïñ÷òèîúõïû  ù÷ûÿýõó"$)0( (+$"$ úòéíììîõýÿ÷óó÷òõý   09ANUQJOVYQ@//8<4$15<@54>A>93/395+(/' ÿööêÑÇ×ÜÝéêì÷þ÷÷õîÛÑÜï÷î÷ýþùêéöý û ûóò÷ÿ$$'%'$#)) ú ýìæàÙÝåïöú÷ññïîïò##0ANWOAJZZYNA7AIA,((8D<349AHB75:9:>5+$õõòàÏÏÕÙàèêéî÷þùêâááÝâåö þúùúíî  ÿ    úûÿùö $-- 13% û÷òÝÍØéèêâàéöñàâóú $$+AJEHHISWVWWOEEF77+'--1=ADFFBADJQE:50"ÿ÷ïéÞÝÜÜêíèáäèêïíáÛÝàâééñ÷þùÿ  "ùõùù ((%'( "%,))(  ûú÷íäåäèâ×ÑÕÜæèá×Ûî %48>>>DHQRUVQNMF3òêäáêó÷ñéÛÑÔÝáÞÜÞØØæñìéíñ÷  ÿ, 2Pcb:+7AE=K_orpU.þðîéÜÑÖ×ÑÝö 1,!Rhad^B-:PWXN.=fj^9Áèîí¼§¤ §ÍèÔÁ½¶°¹¾Ëßíñö÷á¾ÀÆÇÊÍËÌÐÔÓåëâÕÐßêÞÌ¿ÉÜçâ×ÔÙçöòÑÔò úàÖíüþ(+ û9cqojoqqqqqqqqpbK744+!ýùâÒÎÛðôçæìôûùèÐÈØÑÐÏè/9>BF*CTXZP4'#AZK9&°¥ÒŰ¯²¼ÓïÝÄ·²²¸ÄÓåöñïõðÛÈÆÔæðéØÞÝßáäçççìñûéÖÏÔÛëõöóàÜø òú #( ø93/+1>Tlqkgpqqqlmog]RF==65-ûòöêêõüòîöëÞå÷þöçñ)%,46*$=WYWG; ,4+-HJ6(&í´ÌâÆ®¬½ÕçÙÇÄÆÇÆ½ÍáíîïõôçÙÍÚéêãÙÖÛæïìæíìòôäÐËÒÚáùýûïÙé!!øîü ;R@,%*9QmqqqqqqiQPQYSIB930) ûùøùþ  ðóöèø/9:6+6GGKSL0#-"2TUG@@%×·½Àº¸ÍðúâÆ½ÃÂÀÄÒèùýùîëÝÒÓßíôóêÚâìîëäâêúüßÎÓØàèíòúðèõò$)"AG3*4CQkqqqqqqqbSUWTK>1&&2*ûøÿõþ ú*6.%)LRLKQ@#)'0N_M415-Ô¸¹ËØØçàÉ¿ÀÆÊÎÓÕâññìçÞ×ÙâéêóîãÙÙáéëçßðüðÓÁÀÇØçêóÿþéÒàýü +TK:67:DYmpqqqqgLA;7456("$'ùü   ü ÷òõ$)" .E937=5!"")HI:37>A'講¥ÆæòÞž¾ºÀÀÁÉÚèíîæÑËÒÙàâãâÞÚרâáÜÚàåÕº·ÈØäææéñ÷ñÖÒï  úëðþ =I3$$)3MbqqqnnaD5:9320)   û÷÷  ûö üïïþý *98:@B4 >WN>7/4=0Ť¦ÁçîÖõ±´»ÄÎ×àÞäáÖËÈÒàéêâàÝÖÔÕ×ÙÜâåàÑÀ»¹½ÌÝäçëûÿóØ×ñ ûÿ   B@3128@K\hhglq]D<:3+%!   úþóò'==979<. #%4NO@2/4@NK%ç°¥²ËÕÓÑÎÉú»ÇÔÞäæåÝÕÒ×çíëæàÜÜÞßÚßãèèÕ¿º¼¾ÂÔçíîñóóåusr/src/sdlBasic/share/sdlBasic/favicon.ico0000777000000000000000000000100510500620751017646 0ustar rootroot/* GIMP icon image format -- S. Kimball, P. Mattis */ /* Image name: gicon */ #define gicon_width 16 #define gicon_height 16 static char *gicon_bits [] = { "aaaabcaaaaaaaaaa", "aabcccaabcbaaaaa", "acccccccccccbaaa", "acedccccccccdeaa", "acdeedccccdeggaa", "dcccdeccdeggggba", "eedcccccegggggde", "eeeedccdeggggggg", "eeeeeeeeeggggggg", "eeeeeeeeeggggggg", "ddeeeefeeggggggg", "aceeeegeeggggggf", "aadeeegeeggggfca", "adeeeegeeggfcaaa", "aabdeegfefcaaaaa", "aaaabdfcaaaaaaaa" }; usr/src/sdlBasic/share/sdlBasic/sdlBasic.png0000777000076500007660000002366210463130234016231 0ustar ‰PNG  IHDR{C­sRGB®ÎégAMA± üa cHRMz&€„ú€èu0ê`:˜pœºQ< pHYsÄÄ•+'IDATx^íY–,7ŽDµ'íI{ê=õžº³*ÞÉÊÈð ƒà­£OÃ%`þ4Ô_ñ?løûŸ¿¿þÚºÊ%@èIà!ý@Ï×£j@[ž¥ØBÈ%@ݼJ?Ðí ©€ÀM露 ’ã€ú¸–~  ÏKR) e+Ò,ãä  Ö¥èðžÔ@`À]éÇ r€@m{ÒÔ~Uªƒ pIÀ"ýÃ@ %»ôc-ž¢!“ xI?pòÑ; ÐŒ€¯ôcÍžŸr!3 DH?pæ,Ñ5 І@œôcm†€B!ÓDK?ð5Q_N›+ú…JÈ‘~ àap(½ sdJ?Â÷lÐ8gËèåäK?’÷j0)·ÙTÒØ½3ÈÌÞ8ºƒ@ ZéGæ® >%–„" 0@éGàV Jó¶Ž #PGú‘¶u€•laH ªI?¢v× 6cé©jJ?r¶gpK]’A /ÊÒY z}·’Ê!N ¾ô#av€aø"‘½t‘~ÄËË ÙkC©!zI?²åkð Y*‚B >ŽÒ`ETëo+BÀ@_éGªâ ¶n F Ô$Ð]ú©h€pÍÍ¥*˜Ì~ä)ÇàlZ6.C IÒ0e´ël1•@à6yÒ$åÌo/  %0Uú#•@^»Ñd‡ÀÙÒ i þKKÈ!ä8Aú  À+äo7!ð–À9ÒôÔ1ÞI‚€˜ÀiÒèT3^D,¤?“À™ÒÜÔ4ÞåL¢k“¥¡©l¼Ž@Hy¤‰©o¼Ñ9ŠD§IþgIЫ¦i4 URšh´íi¥6yº¨2Ó8{%ŠA\ &àµ~óâ ~ô•Öš>èJkœþjºáie>"iœ#þv´++7/æá34àAAÚ‡ÀO¶:­…ç'st¢Ãß‘ö!ðÑk6/þás3ìAMÚ?—À°MNkç܉ùoçiœ3þ¦´ÌÕš—ë¬YyévÞƒ~wtøËÒþ|ƒ·7­µ¸)yn!.‹1rgU"#®C "Õ:ÍËñºï(Eä2Æœ÷ ¿vd¤ÄuT!pÈÆ¦µéû®+eûf4F[)xÌ#+®C@I`Ì–jÄëEï6å•×çnÙΉqÙl]ÙìoiiÍžÝÁR|ë»Fn\‡@Ö;Ö¢xË+z5h©Áx׫…¦qŒô¸(M7ª]Ù{ïÑæ^%Æ[´‹idÈuxh·?­ ¾ûrÑÍÞ­Çx>ºFñ$¹+FÛ2¦Ôõ7Ëly½*ãÉ̦Zä2òä:v´Ø‘E®¼–ªñ•ÚŒgT­Ïk¤Êu¬(¾ ãË»~§ í¯NÒÖ¹ –­a‹(— °F ìÜUØ»·ªam¦nŸªÖfÁzn3åêÿ®,¸i’’^_JRÆbR÷ÍZÌË1wò<‘‹TÀóV«í]=ޛӥå"u:’'ÔYŠL0eü ð˜ÂŽX\ö§cãòš]Èäòy¥€ÁŒ[4˜LtkFò\ŸO z‰í] ‘À6y.N&`œ*®C`ƒÀÆFmdáÊ+ ò\™I€õ€€–À­½Ò–:,û-òžF`Ø4ÓNk‹ÛպǚÅ/’çØ5‘ª ðqÇ@Dà#yL 4=„…€#‹MsÌB(þÞÀM¿ÕÃ?ÿóÏ×_Œ>êøu°ë—= Â[’ÂáN€ ØÒCZø±]‡t]¡ÍNºF­‹ž ¨°fÔ°Bà{¼WsÆ‘À¢°p¬WÀ·…P¡¾v,4>Áßè¡nTù‘À;ÀX~@àšÀGyá@u×€ €6P]Ç·ë[1l €°m™­{qݰ$ÀêªùFew @ l`Cl+^Ù3l €°Šš~«&‹`H € Ü’ÜZ‡í€ €6PKÙ«ñ2l €°Eá­rÌ×°$ÀªèûÇ:" @ là£üêÄ6€@Ø€^å/*ˆ6l €°¢6cØ`ål Ó°$À Ù@¾`H € ”°•`H € ˆm@kØ`2¨`Ø`¨cØ`©6PͰ$À’l ¦`H € „Û@eÀ@´ú€ €À+ÿý¿¿¿þ ÇBw1l €Ò88T/ÀœLàYú1€C 8YèýL¯ÒmØÀ™B@×§x'ýð6pšÐï9®¥Àþ6pŽ(Ðé V¤ÀþeØÀ Ò@³ ¬K?€übØÀl »©îJ?€¼5l`ªLÐ×<{Ò` ˜'t4‰€Eú1 `ɰI’A/3Ø¥Àn60C8è¢;/éÇ0€Û€ t—êïKÀWú1 `Ó°¾"Bå DH?€˜ è(%ÔÜ‹@œôc€ƒ`½…j»ˆ–~ p3l ‹¬Pg}9Ò`΀ Ô*¬L Sú1 İÊCm5 äK?€6PSh¨ª•ôc@¸`Õä†zêÐJ?€$6PGt¨¤ Ò`©€ TjШ#ý 0l@+@dW¨&ý 3l@%CäÍ'PSú1 @lØ@¾‘1“@eéÇ0€€ dJ¹rÔ—~ (dØ@Ž0‘%š@éÇ0€r€ DËñãô’~ (jØ@œH9‚@GéÇ0€Ò€ DH1} ô•~ h`Ø€¯`Í‹@wéÇ0€6€ xÉqìfH?€43lÀ.^D°˜$ýÐÒ°‹„qwÀ<éÇ’ à1pÙâ/_{ËÌ-¬˜*ý@¸¼™¯ü¯u!ãä]³¥4€ëQC¸#Ü]oÎCà¤1€õ¥ŠAb®óç$^ œ#ý€³ì­’A`ï-¸u2Ó¤p3ûÚDˆ 1íïB„œ)ý€ƒø®’AÀ÷ˆ6‰ÀÉÒ˜ n "D˜qïEäŽ~ `ÓrÆÉŽ óvd©Lé&°)‚g^Ëë$fþ;’±¤ÿ•À™J~»kíø"Ù´oJöLHÿ;·¥ð´ ™cz+B‰Yç}©$‚ÒMà4=¿ÑoÄ8Úc"Ù¾ì/B„šþ7ñœ£5ú¹*_<9Zý·¦Â»V„3üS@¿8ÚÝQÓž?Y¸½z×¾ Ù} ëw œó³þC§¾ƒ˜ÍK ÏŒ“ùRäŠ#pWø8ÏÀKˆÊÌÈgÊ·½ëÌ7"W¤ÜBàè/€ˆqÔÆ´ âi´ïEv ‹ðq÷è/ËØÕ¿{šˆ[ú­ÿšTøJùö"pÜÀ9ëd‘Åsîž33:õ>â÷0cîvqŽ”ïuz—'çUìG|¨F¶NÞ=q<áV7¢’w"„˜G|°TÏNô»=2!• ÓÑÆ~Tkmmw%röyí[_ýÑÜ ˆ¥Z!0[Ö×»[aÅ™LZA<-û¨/€Ì1‘k](§žœñŽ3º8M|+ô;Äf,€ª‹©â¾Ò—Š9yŸ TÂ3kho,’¹œwÆ‹qöœ)»uºnoIÚ>n½˜'ñ×1*uDðäJ¯ßØž×[5ÊóòžcóÞ®~G' nµÞŸ§¥¥ ¼JUýèRá 6Ðå-fÔYMþ¨çu®šÙÀ;‘š±0º˜mŸPR[“À»Ùkcü oŽ|Lµz'g©)|Tõ p=™ l`E˜N^?ßÞWh÷:ãˇhÏÙúV&¶´ ¬ËÍJ«œY!°Î¼þÉ•~9s—@}á£Â•/€‹ø®ÄÜeο#p—|Íó¼¯/„µ»¯_îk`OVî¶Íù©6ÀËzè%|T{÷  è×Àžð¯y­ý#Žå´w}9œ 1íKÀ2±%¾ìòaAÀÝgö·ÈÀ Zô>*·|úð’ Ëp·¯ ðv{Ðö^ÿõ–ìkÀËøC!¯Qèõ‡B¾]Ÿm†ðÑ…×€økÀ×°_ ‹xߘ¾ýÎŽ†hÎ#1±©_¾rð-Í™1ãÞÈù̹Ûõ<ᣣˆ/Á×€]øIÜ•ƒ½óÑ/µ¯—sn!”³ DOrø×ÀÞÚß½éœøwÉGŸ?‡üÝNg ÝE$} D (tW8VÎg¾_x+/ò|q<‡ÀÝÙ°œùÈ— î>Ȼ׌¼ÒŽÜ¿vš?ÿÎ6 ‘|pS3ª^â é?Yú3ÿèU»Ülù˜a ªwœAÏÒ"x2ËäØï:Ø€J8ø{öçÿš]4Šy²öÑû ³j²|Éx—±Ê5d¾é bÛ] ‚‡Øž÷‹›6)+¹Ü¹p…¶ý̱x.´_mþoÛ€]""TÃÚ·žˆ×áï¾ç<œ@Me¸aÑa‰_nǪ,¯À¿pñâ‡ËíWVƒ%ˆ“¯È•÷ªÍëEøà é×þc ëÊóÁ"D!"æzܼ&àû:‡ÓF'ÐeþßÚ€¯DGë‚»~^/U¿ÓÐ —?Ú.÷à¿Ø€—dÆqçrl@û«‹Ž õ/òïÜÝÁÙ€]Tî¶Íùw,/x8UDðp}çÿ X–¿ÂݾP­ò½×¬ÖEr=‡Ëí'Ï›{º¿öÖ¾Ú-w.Ǽû²Ç‚â€Pÿ¦ô<ºC à![‡‹‘cûë6à˜´c(Dðp݇v”`¾ã¸b¾ÛE;\þh¿×ľ¾×@À|‡’ø‚' x8ß]‹‹öî™Æ6à;LïlÀ7K»h‡ËíןØë7n؀ڀoüvÑPÀà TžØ•§9°ß1å¿ôÍseÇ83˜€ïfyE[~`^ãõˆÏ/ë›ÆÉ‘|wÊí.äã Ù²ø¸+4SÏ×Ù…=‡6Pgp[W²·uÜC ÂôZ`mØ@…ñm]ƒe÷¸;€€vzí1€ÿü+Äü[ÄÚ9î›Ý¾DhM@5º^Ð0€?€ ¨F¹u^¯=$NSùÓë ø—`ùÝ:£ï6­Ì逃übØ@æX·Î±“ÄlD gzã€`o ÈîÖYâ6“È-DOo4 àƒ`Ñ#Þ:~ô~¿8¸éÍiX2l nÐ[GÎÙR²”%1½™Íb7 ˆ÷Ö13w•\ øNo~ƒÀmÀ|‡¾u´ü%c)^Ó«j Ø4lÀkô[ÇQí-y‹°O¯¶ ÀdØ€}ZGÐn/Ùå,Ó+/þ« ÀÁ°Ë´¾[a‡©AH`oz…ÿH¸6°· ­oÕÙd*‘¸;½’"/’b΀ Ü]‰Öç«í3õ$XŸÞäÂÓa!€ ¬/Fë“‹kƱ©V¦·rï@ `+ëÑúLåݦ¶×Ó›P€1nØ@k‰ï¾áFàú5wãÑ…dØÀHè²çÔDàuªƒ…ÅR fAkIØ.žç¹KÍÏubÀÆØ@ǧfGIv ˜ 60À’וtð%€ˆ hm¾ÛH4$ÀJ6ÐÔ’וtð%€2l  øn#Ñ L(gØ@#H^WÒAÀ—PÔ°6à»Dƒ@2  ´`Åm y]I_@ÀÊÚ€ï6 É0€6€ ´äu%| `Í (e¾ÛH4$ÀZ6PÄ’וtð%€46l@n¾ÛH4$ÀÚÀÉ6 ï=y]I_ÀKaòñG¿Ï%Ðý?é«#DkJe'ØÀ«ô m éÚS60€0Õ®¥_bèZÀÆÀ$X—þdh½ü `¸t·=éO³­ `G@G°K‚ ´^~Їpt±_éµ­ `Ç@eˆ“þ h½ü àP¨f9Òïn(ZÀŽ6€ 6/ýŽ6Ðzù)ð‡@þ¿I«•~@A К€þƒ u¤ßh­—Ÿâ!€`¿ˆû¨)ýÛ6€‚@ 5 xKÀ×êKÿ† ´^~Ї€| `·^ÒËP´&€`Köl ¯ô/Ú@ëå§x`Kò7CÈì]¬Û€=Wµ¿öŽ‚@ 5 ¸MàÚª ·o=?zo½ü à¶üù Jßh¯6з—»•÷Ž‚@ 5 Ø'ð­ƒwtÆù¯ö[/?ÅCØ—¿*F(ZÀ0ìh½ü `ù-¿¹;ƒ Ö0 ûZ/?ÅCØ_þ¿aéÂB@k}­—Ÿâ!€ì/¿å—#wg@A К€@`Ÿ@ëå§x`ûË?ã7,]X  hMÀ °O õòS<0€ýå·üräî (ZÀ0ìh½ü `ùgü†¥ ­ `ö ´^~Ї°¿ü–_ŽÜA@k}­—Ÿâ!€ì/ÿŒß°ta!€‚@ 5 €À>ÖËOñÀö—ßòË‘»3  hMÀ °O õòS<0€ýåŸñ–.,P´&€`Ø'Ðzù)Àþò[~9rw­ `ö ´^~Ї°¿ü3~ÃÒ…… Ö0 ûZ/?ÅCØ_~Ë/GîÎ €‚@ 5 €À>ÖËOñÀö—ÆoXº°@A К€@`Ÿ@ëå§x`ûËoùåÈÝP´&€`Ø'Ðzù)ÀþòÏø K(ZÀ0ìh½ü `ù-¿¹;ƒ Ö0 ûZ/?ÅCØ_þ¿aéÂB@k}­—Ÿâ!€ì/¿å—#wg@A К€@`Ÿ@ëå§x`ûË?ã7,]X  hMÀ °O õòS<0€ýå·üräî (ZÀ0ìh½ü `ùgü†¥ ­ `ö ´^~Ї°¿ü–_ŽÜA@k}­—Ÿâ!€ì/ÿŒß°ta!€‚@ 5 €À>ÖËOñÀö—ßòË‘»3  hMÀ °O õòS<0€ýåŸñ–.,P´&€`Ø'Ðzù)Àþò[~9rw­ `ö ´^~Ї°¿ü3~Ã6íⱺòâQ´&€`Í<ïÐZ}(^Nh&rÉðº-Âb©å L°À0€Þ8`Y~îBh r™p½¢ÂÂø@=À0€¢V¶ X¡Ä¼#€•?¹´ X_Wa‘|¬?'ËÀ0€Bîî p—ç!ðL($r9°·–‚ùØ{2n•"€`b–}À,ô¸  @,r `_?añ|ØŸr à5÷€IâœIÈŸ\¶„ø®™°¾|Ÿ’h2øë¿ÿ“/0¤ˆ˜ï´âß%ŠhŠ˜H# à‡ôcrñJ+ nšÓZÀâ‘ÈB©ð,ý€\¼ ˆžì„®SD7H|„H2€WéÇäâZ@èÔ~ma%xN›d@px'ýÀоt<4©¿†•óÉl–\p'h×ÒÈÅ˽÷éüн…»?VÈT&b+ÒÜÕšÊçU#.g¢jœ¼p!àlëÒÈÅË¥—)ÜâÒ‚%Èvå\„@npWú1‹îÔ¹«b9mûd‡€‘€ƒìI? /—Œóg¼îÒ‚%ˆ±~®C@KÀdéÇ,ºSç®v|å´í“F›`—~ @.^.çÏxÝ¥Kcý\‡€–Àmð’~ À¢;uîjÇWÎAÛ>Ù!`$pÃ|¥‹—KÆù3^wiÁÄX?×! %°dÒXt§Î]íøÊ9hÛ';Œ>@œôcrñr)À8Æë.-X‚ëç:´Þ@´ôcÝ©sW;¾rÚöÉ#_ Gú1¹x¹`œ?ãu—,AŒõsZÿ2€LéÇ,ºSç®v|å´í“F _ú1¹x¹`œ?ãu—,AŒõsZ*åÿ“ײ{Ü­@@;¾rÚöÉ# ่´.À8ÆërtÆú¹- 0ÐŽ/ åOöî0“üÉH^€vo_ Ÿì`€‰€v0-²w'€˜äO.@ò´ pxûZød@ÀL´;€hù“½; À$r’ ]€ÃÛ×Â'û`" Ý @ËŸìÝ `&ù“ ¼íÞ¾>ÙÀ0í`ZþdïN0ÉŸ\€ähàðöµðÉ>€€˜hwÐò'{w€Iþä$/@»‡·¯…Oö0 ÀD@»€–?Ù»ÀLò' yÚ8¼}-|² €`&ÚÀ´üÉÞ`’?¹É Ð.Àáíká“} 0Ðî åOöî0“üÉH^€vo_ Ÿì­ ˆ¥ŸÿSx¹x¹ Ý—,A´í“JH?`Ñ:w7æÏñŠœƒc/„‚@4BÒÿ]Š|‡)ÀB zd¯ã[*w¹«mŸìX$PQúŸkrÙF‚äXœ¿ cùýþÈÔa!àE ºôcr³à5¦{q,•»ÜÝ+›[H ÐIú±=Ê’0Ç)òûå @ûâd_!ÐUú±¹¢Ý-`eãÎÜ­Öý|\kD†À Ò ¸ëT\Àu¼××bdÇ^ iÒ ,jö˜edíwµ½e··@ L–~l@®q×g×x]ÇX?×!`!pŠôcr¥{W€e|íwåXì-N”~l@®w¯lÌ®ã9Ç^§K?6 W½çVF6îŒE\kD†ÀHÿïä*prÚ-•“×¶OöC ýŸ ȵàÌ´(g®mŸìã |>Nð‡BBÔn °ñGjmûdLaß' ×…s Ðn œ³¶}²$°/|Üäk Yµ˜ÜlµJ Ÿìîpr˜]€ûÜ (g{«ZCàá#"_ ú¨]é„+ÿ‹ÐZødw!€Pçëż\v`;ˆœçvå\„@žð‘‰¯ ­Ô®qPSëaµí“½)YO`}É9yA@»ò§Ñ¶OövôÂG| 8ê¦vÙ ¥mŸì ¼µì-<·~Ðn ü9´í“½ZÂG5rÕ˜T€vå$µí“½8͹^Ì+@»ržÚöÉ^–@-᣹RL-@»rªÚöÉ^b[‹€\#f Ý@9[mûd/E –ðQ\N(@»rÂÚöÉ^„b[‹€\Î)@»rÎÚöÉ.'PKø¨F®§ Ý@9mmûd@lkkÁ™7ð+µœ¹¶}²KÔ>ª‘«ÀÉH6ð;©œ¼¶}²'@lkï?$oàtrþÚöÉžF –ðQ|ó)àA mM$mûdO €ØÖ" ßy x&°)äo¡mŸì¡j ÕÈ·^ „nàÇàòùX!:@lkï9¼# ]où»hÛ'»;ZÂG5ò §€kîx+ üunUËáÊÛZä»M+´+½Raèmûdw!PKø¨&tc îKÀe·ƒøö²m»r.V €ØÖ"°±\ÑЮ±¶wù?«…ß:{-á£ù&SÀ­ ìÕìxKÛ>Ù7 ¶µ8n#¡ò ll ã•ü~dtì…PÑj ÕÈ·—좗ö:¾½~cmûd_$€ØÖ"`Ü:®×!°¸AÇä‚ú"¬ZÂG5ò¥_^‹ºÇ·—h{es+b[‹ÀÆvq¥>„M¾H!ç£mŸì¿¨%|T#ßR ˆ# Õ ¸¾#kÛ'ûˆm-‹[ı¾´$ç¦mŸìßj ÕÈ7“rh5(§Ç‹,ÚöÉþE±­E@¾“I@«A™þšKÛþáÙk ÕÈ·‘ò h5(¿ßµí›±­E@¾‡ " Õ U×ßyµí˜½–ðQ|)@K@«AÚÞ¿²kÛ?*;b[—€|)@E@«Aª®ùÈ|÷ºÂGeÏäÛHù2…à5W~¿ü=€ÌG`ûï$dÈ” @K;3{?á£b¾2•·H®LQÀ´´s²#¤s)ʈ## ï²ÄõµYÛþ°ìs„NøXTîÇ´$§§mLvs>ù®R@­Ett+¦¶ýÙç ò5pKSzÖjœ•¶ýÖÙÆs È÷–¼h5È«‹í8Úö›f?Wøèœ¯m­©yQ«Ar&ÚöÛeG!ð“€|‡)ÀB@«A–Ê]îjÛo”áƒÀ—m$H>­å÷û#£¶ýÙ>¬ï3Ü% Õ »ÕºŸ×¶_<ûêÚsü½wmÊ ¨Õ œ/²hÛ/›Aƒ€•€|·)`…€VƒV* =£m¿`vëÚs| „j–op­ùö²MÛ~©ì¢ll&Wrh5(§Gþèú•£Öž¸àk@®q×`ZÚì² ÄÓÊÓ œ¶¶}aöìµ'øëÝkB úJ-¢m_’!‚@òý§‰}'•ó×¶Ÿœ½ÊÚSøkߣ€d ú‘NAÛ~ZvÕ ÈµàÌÒ4è×DræÚö²W_{êƒÀ7¹X@‚]¤×¶ša@KrQ8ª€P ú\Žúc…´\{Іc _µ—ßïŒÚöݳ£!E@.ã p× [åxoU[ù𨵧ð5#ŽZQËéñ"‹¶}—ìhŽ ‹‘¸hÐv9ÒíÊ+\ØÖ —‹Ë‹>àÒEf£×žæ!À×€¯&fŠ×k.ß^6¢iÛ¿•݇~!°±ö\ù&pKƒÜ˽£ˆ€¬= ð€\Jš!Xë1åÐÖK•œdí!ä‚Ò®‰®}'•ãÒ¶‘ýÆÐsàï 쉩V÷jv¼¥mÿ×ìì2 à@ÀQ&‡Ò* ¬¶ýÙ†ž€_ëªUÀõ:ƒNjÛÿÎÎÎB‚äc@X­ÊjÛÿÊ8ô„†ø¸Y¹~ ´aûì& ”›‚©… ø#µޤ}ÁГàkàUd% x‘4Ù’Ûg!B’å¦`ºd\L—j±û±BCO)€_‘µK[\„ˆ+žÂ‘@' rS0E‚S„B3Öv}½ÓôS+ ðE Tn U@ÇàAè+|Å*A ÉMÁ°A Ö {‡žÒ!ÓþÞ€»&t´ÇjÙ@` G¹)ÊQ“C¹Àt©yàÐÓ pÂ×€‹ ƒmÀX9;DÀ(7¯°Èõm°Ûõ4ô´ LýØVÀ‚7l`£ v€À`tC ^Ù¶ç[½0ô€þE`ãWg©+·°àáwã¸y±#†€À[‹rSðØ¢<¶2Žìk% g ´üC¡ XðÀÝQ»°‹îîfá< f6PP߃DùWø5C @ÀDàã>9ÐÅLñtùöí{e! _õ bŒ¾mà»ýˆ,Ä„ PÚ*@ôè<þ€@Q¨iŒ  ŠüÑÿëŸq‚ONK€ž Ô±"ºÏŰ €ÀY*Ø@8ëÕé€À7­ h €1€ Ùß"VO@ÿ"ÿ5o<9 ¼%i™À“C€ÀÈ1€¥†9@Ï¢m ÚxM@0ˆ³805Ìe@ˆþˆ0^ €Bø~ ø@HÃ… ˆ¯/àu @ •€ýkÀn© “ €¼¾,À+@€@ {_{P¢aŠ€ Ë×À]€6 ”&°þ5°n¥¦8@¸û5°bP… –®¿®  eà @+_ï z€ 0ŠÀë×À«Œj˜f @àÝ×À³@ €Ž ðøxÀ Ó$Æø…Ku7¥CÊ4IEND®B`‚usr/src/sdlBasic/share/sdlBasic/others.properties0000777000076500007660000001252310463130160017411 0ustar # Define SciTE settings for other simple files. # version for sdlBasic editor file.patterns.props=*.properties;*.ini;*.inf;*.reg;*.url;*.cfg;*.cnf;*.aut file.patterns.text=*.txt;*.log;*.lst;*.doc;*.diz;*.nfo file.patterns.batch=*.bat;*.cmd;*.nt;*.sh file.patterns.diff=*.diff;*.patch file.patterns.make=makefile;Makefile;*.mak;configure* filter.properties=Properties (ini inf reg url cfg cnf)|$(file.patterns.props)| filter.text=Text (txt log lst doc diz nfo)|$(file.patterns.text);make*| filter.batch=Batch (bat cmd nt)|$(file.patterns.batch)| filter.diff=Difference (diff patch)|$(file.patterns.diff)| lexer.$(file.patterns.props)=props lexer.$(file.patterns.batch)=batch lexer.*.err=errorlist lexer.$(file.patterns.make)=makefile lexer.*.iface=makefile lexer.$(file.patterns.diff)=diff word.characters.$(file.patterns.text)=$(chars.alpha)$(chars.numeric)$(chars.accented)-' colour.other.operator=fore:#B06000 # Properties styles # Default style.props.0= # Comment style.props.1=fore:#007F7F,$(font.comment) # Section style.props.2=$(colour.string),back:#E0F0F0,eolfilled # Assignment operator style.props.3=$(colour.other.operator) # Default value (@) style.props.4=$(colour.preproc) # Matched Operators style.props.34=fore:#0000FF,notbold style.props.35=fore:#FF0000,notbold comment.block.props=#~ preprocessor.symbol.$(file.patterns.make)=! preprocessor.start.$(file.patterns.make)=IF IFDEF IFNDEF preprocessor.middle.$(file.patterns.make)=ELSE ELSEIF ELSEIFDEF ELSEIFNDEF preprocessor.end.$(file.patterns.make)=ENDIF # Batch styles # List from http://www.easydos.com/dosindex.html # I limit here the commands to those built in command.com, ie. I don't list external Dos commands # if [no] (test) (command) -- test is EXIST (filename) | (string1)==(string2) | ERRORLEVEL (number) # for %%(variable) IN (set) DO (command) -- variable is [a-zA-Z] -- eg for %%X in (*.txt) do type %%X keywordclass.batch=rem set if exist errorlevel for in do \ break call chcp cd chdir choice cls country ctty date del erase dir echo \ exit goto loadfix loadhigh mkdir md move path pause prompt rename ren \ rmdir rd shift time type ver verify vol \ com con lpt nul keywords.$(file.patterns.batch)=$(keywordclass.batch) # Default style.batch.0=fore:#000000 # Comment (rem or ::) style.batch.1=fore:#007F00,$(font.comment) # Keywords style.batch.2=$(colour.keyword) # Label (line beginning with ':') style.batch.3=$(colour.string),back:#606060,fore:#FFFF00,eolfilled # Hide command character ('@') style.batch.4=$(colour.preproc) # External commands style.batch.5=$(colour.keyword),$(font.monospace),bold # Variable: %%x (x is almost whatever, except space and %), %n (n in [0-9]), %EnvironmentVar% style.batch.6=back:#FFFFE0 # Operator: * ? < > | style.batch.7=$(colour.other.operator) comment.block.batch=REM ~ # Makefile styles # Default style.makefile.0=fore:#000000 # Comment: # style.makefile.1=$(colour.other.comment),$(font.code.comment.box) # Pre-processor or other comment: ! style.makefile.2=$(colour.preproc) # Variable: $(x) style.makefile.3=fore:#000080 # Operator style.makefile.4=$(colour.other.operator) # Target style.makefile.5=fore:#A00000 # Error style.makefile.9=$(colour.error),eolfilled # Matched Operators style.makefile.34=fore:#0000FF,notbold style.makefile.35=fore:#FF0000,notbold comment.block.makefile=#~ # Error list styles style.errorlist.32=fore:#B06000,$(font.small) # Default style.errorlist.0=fore:#000000 # python Error style.errorlist.1=fore:#FF0000 # gcc Error style.errorlist.2=fore:#800080 # Microsoft Error style.errorlist.3=fore:#808000 # command or return status style.errorlist.4=fore:#0000FF # Borland error and warning messages style.errorlist.5=fore:#B06000 # perl error and warning messages style.errorlist.6=fore:#FF0000 # .NET tracebacks style.errorlist.7=fore:#FF0000 # Lua error and warning messages style.errorlist.8=fore:#FF0000 # ctags style.errorlist.9=fore:#FF00FF # diff changed ! style.errorlist.10=fore:#007F00 # diff addition + style.errorlist.11=fore:#00007F # diff deletion - style.errorlist.12=fore:#007F7F # diff message --- style.errorlist.13=fore:#7F0000 # PHP error style.errorlist.14=fore:#FF0000 # Essential Lahey Fortran 90 error style.errorlist.15=fore:#FF0000 # Intel Fortran Compiler error style.errorlist.16=fore:#FF0000 # Intel Fortran Compiler v8.0 error/warning style.errorlist.17=fore:#FF0000 # Absoft Pro Fortran 90/95 v8.2 error or warning style.errorlist.18=fore:#FF0000 # Ensures that spacing is not affected by line number styles style.errorlist.33=$(font.small) # Difference styles # Default style.diff.0=fore:#000000 # Comment (part before "diff ..." or "--- ..." and , Only in ..., Binary file...) style.diff.1=fore:#007F00 # Command (diff ...) style.diff.2=fore:#7F7F00 # Source file (--- ...) and Destination file (+++ ...) style.diff.3=fore:#7F0000 # Position setting (@@ ...) style.diff.4=fore:#7F007F # Line removal (-...) style.diff.5=fore:#007F7F # Line addition (+...) style.diff.6=fore:#00007F command.build.makefile=make command.build.*.mak=make if PLAT_WIN command.go.*.bat=$(FileNameExt) command.name.0.*.bat=Execute Selection command.0.*.bat=$(CurrentSelection) command.name.1.*.mak=nmake command.1.*.mak=nmake -f $(FileNameExt) if PLAT_GTK command.go.*.sh=./$(FileNameExt) usr/src/sdlBasic/share/sdlBasic/sdlnow.gif0000777000076500007660000000626310463130234015772 0ustar GIF89aX2÷ ‡†~ÒÆ¤Æ¢„HFBɧ„öè“ãGž‚lí¦JèÖ¤í·Qêˆ8ê—9ú÷¸çh#çx+ª§œli^å-"ïÇbåYá׳èæÔò§m溔ñ˜^õȈ('"ñˆ]§‰nîxQZVJçp'å`861öÚ¬ùï¨ö·~ywoòшôߊî°R¹¶¨öéÌñ cäQþú߯ºœö§z\M<ñ]¦š„è*î¿Zì Cê9¸¨”˜†ã<ìpHöé­òÐwê`8êX8ö°€âȨêh@î€SQOIò×zþþÑåÞÄH<2öÀ|ýðÇ·˜|7-%x`û ï¨WkXEðá¸öÑ‹÷Ù—òÀvþÈ¢çH1€jTùðæî¸^ï°^ö êQ8Ý·”óp×±ŽýøËñÇqö˜yúð¸÷àœþà´¡†líˆJí˜M±®ŸòîÐê€9åB UH=êx8çØµêp8í`Iô؇öè ±©“çX(ðÈ¡10+ò‰lc_TB?9þþæî P¸Ÿ†’‰ÎÎÌò±oÂÂÀuqg„€t q^LoV¦ ¬t ¸±¤Ñ®Œ–fÖ¤¢ŸáÑ©â5̨–Ž„\RHFB;ðêä翜沔fWFzfTŒr\ˆtò¸wëѨùϤ<2+ÀºªÒºœÙѺú°ò€dæâÜúÀ›îâÅñçÊ€xh²–týè·ÀŸ€¿°žâ¾–í‘F®ª¬ŽŠˆð¹”Ϫ‹0("?80À¦ŒwbN' ’tÞÖÀðx^YYVæ`'ú¸”æP'ø¨‡îpXëYEàѸÚȰNJDîŠ&îhPæB-bRDQB4òòäþþûþØ®bNDN>4–zd⺔ްþî¼úÖŒúé£öʤò¢Tš€dæÒ«þÒ«þ°ŒþÀœêb,þ¸“þª„æÒ´¾š|"ÓʯíªJÿÿÿ,X2ÿH° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹û”Û鱂 =rÄH’aÇGRªÃRŒƒ–bTÊ<²¤\É’'SŠiÕêÌs@Íe¥¨¢ è™óy¦;žÌZ1ìÏM‰å4z<²Óœ=|õê•*,ª²có6Ö¬={G‹~ÅÔfKZÙ¼ºp#Jvæ¬Ô{ ŒaÃ]ºäÖŒžÇzÀp#Ó%YTgc8Žü¤ž•¦Kžò5èw«ƒVƒ ÓAM.‚¸ÀÓ ™›5±r«Q£aÆŒ`º”bÜâv,5-0±·4tOU£s6G*Íi¸PéaFZ(üÿÑ€GZ‰ïfÌP¡R JS’5ì2ã®D+3S‚³¢´)OsfÜ”ÕV¨Ñc =V[”ñ‚\øCÅ ÓPóÁ\”±Ñ>TBä”1F¾˜B„flô `°_RJ™ÓP-RVgÅ0z¨ÑC9bÜ Œ08¸³àÃÀ/¤ÁrÜÀ¤7×€3G)¼P;jøBÆ~9Æø(æT$ÆGKPfu¨tA„ Z–Ñ@8á Q4j€„b”ó‚7?Ä6>hY@xÁ备/] c˜A‚ÇD/¨æšV´IZù6@h Hàü°…–/@ñ8àÜÿ±€–bpá±ôYÎr˜2Œ¤kDtfGœìºé‡†~¦ 0?|@ 8„jÉs\ œYm! \°ÊÅ`”rÔ²ÂîÆCÇŠ±é²Ö Ó…úņ pÌ‘*ulÔĘBŒª¬zƒ…0ù: 1`€ÉnŽêÔÒЀGÌK¯=<“ Zª8sxCM/ø GÁà rV\¸ñ@ŠåôÐ1d˜PÔ¤ì‚ÒH ‘³•²ëŒfD@©B!; ¤0 ôÙÇCãËp0 dßÔ á tÈáåeGñ¼¦¥û|¡PVG0S´&-ðPÌ8˜¡e ÿ9†–w{p!ׂ7„ìMÕÁA–=fŸý… i‘•¼oLP˜ÂÅx¡Í äl4†0w¤°Qm3ÇpС" {Cë @¬AJèÇ_Ñx0ÁBÈ&û¶Ž¥pÃ=Ä:^‡«MÖ)ðÅȱEŸ`‡0²—ÃF^ÌñÁÒTƒº‘‡ùN-éd²˜gnEòÛ÷1w'PÓ8Fâ²âƒmü€U`C´å…%mÄI@€ƒ?ê°„-äl]Åœ`±‚ Y­8ò”׃>,PàB–à 9¨!|/¨ƒ7Æ`1¼ÀÎÀÁx †—‰o jÅ ÿz2áwEƒ`U,¡m"DÐÑf#ô  Ò†*̰8¤¡fPÅwz@‚ôPa PhÃL1<`ŒÜéŽ;z0 tAbÄ„a´B D;(ì±9ßø6²™LÑãäæ8»‰Å½ôÀÄ´ jÀA, Ü`73ïڷ&L(BA‚S)ÈÌá0`˜ÁdóJ=tÀ1Ì,ÇB‹RÄ€ ¹%dL„Ë.èìx»@* ‰¨œ”ôêT0†³Ç•-ÃÆZÚ‚£H3›Ã'L”QB®h È€<–I0%ŠÅ;0c–n¢Â›ôÄÌ=‹òÿŽEŸÁØE)4†#8@_‚¦@†MˆÃ ˆ=X)Hi^³½4KQ0“ÑzÒ“,½æ4»` Hm ézGÑÞ1€qdÁ ŸÂ;ÌÑŽ(²µŒÌf¸Á–Rt!§’ILc C™Ÿ‚ Hƒ)À8z8æ²jŠ4„âQfŵÀ7ð> ?Ø x Òà-lÁ=%šT°€øâDPPÃÔ`5xáI"¦PŸE! ‰)¾ RZ!‚(aÐhäj˜ÃüQ‚>ˆ¡„=С ‘1ìéLt؆êØPdEà °Ø…ÿØb ‰F¡Ðx¢‚ DX€FJ08 +~ÀBúôÔ¡tpö‚|á€0Tç, hƒ¯,P ¶Pˆ*H1u ¥h þ[³-@ å8*`?Ù@!`n*p\„àýíCÜ`„FU€åðÁ¸ …~áWÀ­zÃà/¼·gÁÐÃ\Ž:<€©Ãš ÞL€ÅGA †{€<÷!pAgU ôÁ¦èÂ9Ë‹‰," aC-†Æ.ë~¦€Àqû°I`·ÿõÆ`å”à®°$è[mH¹ÐƤÐ=¨‹ÿ]À†!ØÉ$ Ø»vä‹8õÀïpðdW.–Ðà>Ü@R؈ܰ§ ƒ[¸ÁÒEÞM¡¡†xCDRÁ lìÎÑŽ>pe# Ï- 0árT°àݯ PEP u¨Â6pÜ#ø°a²”+J燨"›@@-va¶ë¤Au}PA8n°‘#Ô!“Ç5 ­alcÊ=ð„?œZ‡10\ð (<)y†¡0„†'rR8a¼T= n”à=HÃp@ÚøcCXšÊà€:øààqà8,j²Þ˜NÔYiE*žÿ`Eö°ˆ}W :8Dx±Ž]¨Ô ´èü r[' DPk" ô£²Æj ‚/<†› jð7¸Q •¾CûÈ‚- ±ò’X@«ˆBXÑLà´`Ì021œ.T²§Ã CaÞN‹`d"nªÜ»0 ³ô211*ÜÅ‹Ml= ./I¿ Q‰C ÀÈ-º9O}î Šì¡ÏNuþ —fÖá DÁW°DâGCŠfTB›@ƒ+jñj…gI‘ç;ÌvûxV§:xÀD#ö†\„b-zWPˆ"¼áNPÄì¿›ß>÷¤¼ý;‚ÿ…Z¸Bœ8D˜(tqd¬^ùÑ d$AYH‡˜àŠÔbaø‚:öÏÿ/|¡?ã Làéš ¨× p~è×°€ #À|p o  ¹° Y€ È NÀ›pQð#ж°` À€ HưÍ@  ÈÀ¡ yƒ#p « vЂDX„Fx„£;usr/src/sdlBasic/share/sdlBasic/plugins/0000777000000000000000000000000010645354620017220 5ustar rootrootusr/src/sdlBasic/share/sdlBasic/plugins/autoindent.sdlbas0000777000076500007660000000430310463130277021022 0ustar ------------------------------------------------------------------------------------------------------------ -- autoindentation utility -- author: zoiba ------------------------------------------------------------------------------------------------------------ --paper(0xaaaaaa) : cls tab=0 --prints("indent:" & command$(3)) rename(command$(3), command$(3)&"_tmp" ) open command$(3)& "_tmp" for input as 1 open command$(3) for output as 2 while not eof( 1 ) ' read a line from the file and print it file input #1, l$ ll$= ltrim$(lcase$( l$ )) if left$(ll$,4)="next" then : tab=tab-1 :end if if left$(ll$,4)="wend" then : tab=tab-1 :end if if left$(ll$,6)="end if" then : tab=tab-1 :end if if left$(ll$,4)="else" then : tab=tab-1 :end if if left$(ll$,7)="end for" then : tab=tab-1 :end if if left$(ll$,9)="end while" then : tab=tab-1 :end if if left$(ll$,4)="loop" then : tab=tab-1 :end if if left$(ll$,10)="end select" then : tab=tab-1 :end if if left$(ll$,7)="end sub" then : tab=tab-1 :end if if left$(ll$,12)="end function" then : tab=tab-1 :end if tabs$="" for n=1 to tab tabs$=tabs$+chr$(9) next --fprints( tabs$ + ll$) file output #2, tabs$ +ll$ if left$(ll$,4)="sub " then : tab=tab+1 :end if if left$(ll$,9)="function " then : tab=tab+1 :end if if left$(ll$,4)="for " and instr(ll$,"end for")=0 then : tab=tab+1 :end if if left$(ll$,6)="while " and instr(ll$,"end while")=0 then : tab=tab+1 :end if if left$(ll$,3)="if " and instr(ll$,"end if")=0 then : tab=tab+1 :end if if left$(ll$,5)="else " and instr(ll$,"end if")=0 then : tab=tab+1 :end if if left$(ll$,4)="else" then : tab=tab+1 :end if if left$(ll$,3)="do " and instr(ll$,"loop")=0 or left$(ll$,2)="do" then : tab=tab+1 :end if if left$(ll$,12)="select case " and instr(ll$,"end select")=0 then : tab=tab+1 :end if if left$(ll$,4)="sub(" then : tab=tab+1 :end if if left$(ll$,9)="function(" then : tab=tab+1 :end if if left$(ll$,4)="for(" and instr(ll$,"end for")=0 then : tab=tab+1 :end if if left$(ll$,6)="while(" and instr(ll$,"end while")=0 then : tab=tab+1 :end if if left$(ll$,3)="if(" and instr(ll$,"end if")=0 then : tab=tab+1 :end if end while close 2 close 1 wait(25) kill( command$(3)&"_tmp" ) --waitkey usr/src/sdlBasic/share/sdlBasic/plugins/bind.sdlbas0000777000076500007660000000300310463130234017551 0ustar // bind.sdlbas // bind a source file to sdlbasic executable // (c) 2002 david cuny >for sdlbasic make from __vroby__ // // usage: bind binfile = command(3) source = command(4) dest = left$(source,len(source)-7) if iswin32 then dest = dest+".exe" end if if dest = "" then print "usage:" print "bind " else print "binding "; source filecopy (binfile,dest+"_tmp") // open the source file outfile = freefile() open dest for output as #outfile // first, copy wxbasic executable print "copying "; binfile; "..." wxfile = freefile() open dest+"_tmp" for input as #wxfile sizeof = lof( wxfile ) // add the file for i = 1 to lof( wxfile ) writebyte( outfile, readbyte( wxfile ) ) if i % 10000 = 0 then print "."; end if end for close #wxfile kill(dest+"_tmp") print // next, copy destination file print "copying "; source infile = freefile() open source for input as #infile for i = 1 to lof( infile ) writebyte( outfile, readbyte( infile ) ) end for close# infile print "attaching tag..." // convert to string sizeof = "" & sizeof // pad with zeros while len( sizeof ) < 8 sizeof = "0" & sizeof end while // write additional information print #outfile, "\n//"; sizeof; " bind" close# outfile if islinux then shell("chmod +x "+dest) end if print "created "; dest print "offset:";sizeof end end if usr/src/sdlBasic/share/sdlBasic/plugins/unindent.sdlbas0000777000076500007660000000125610463130277020500 0ustar ------------------------------------------------------------------------------------------------------------ -- unindentation utility -- author: zoiba & vroby ------------------------------------------------------------------------------------------------------------ --paper(0Xaaaaaa) : cls --prints("unindent:" & command$(3)) rename(command$(3), command$(3)&"_tmp" ) open command$(3)& "_tmp" for input as 1 open command$(3) for output as 2 while not eof( 1 ) ' read a line from the file and print it file input #1, l$ ll$= lTrim$(lCase$( l$ )) 'fprintS( ll$) file output #2, ll$ end while close 2 close 1 kill (command$(3)& "_tmp") --waitkey usr/src/sdlBasic/share/sdlBasic/clickme.sdlbas0000777000076500007660000002012110463127676016603 0ustar ' ' sdlBasic presentation: clickme ' ' Name: clickme.sdlbas ' Purpose: Official welcome to sdlBasic world ' Author: __vroby__ ' Licence: LGPL ' ' Bugs: ' ' Todo: ' ' all contributed are welcome !!! ' please parsimonius of space (to reduce the download size) ' ' '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- declare sub updatestelle setdisplay(640,480,32,1) setalphachannel(0) 'directscreen autoback(-15) loadmusic("lizard.mod") playmusic(-1) setcolorkey(-1) loadimage("sdlBasic.png",100) 'loadimage("sdlnow.gif",100) hotspot (100,1,1) loadimage("sdlnow.gif",101) hotspot(101,1,1) common numstars=200 common x[numstars] common y[numstars] common s[numstars] '__________________________________________________________________________________________________________________ sub updatestelle screen(0) cls screenlock(0) for st= 1 to numstars x[st]=x[st]-s[st] if x[st]<0 then x[st]=x[st]+800 end if 'ink(rgb(s[st]*32,s[st]*32,255)) dot(x[st],y[st]) next screenunlock(0) x[0]=x[0]-0.5 if x[0]<-100 then x[0]=900 end if sprite(10,x[0],340,101) end sub '__________________________________________________________________________________________________________________ sub italiano for i=320 to -320 step -5 updatestelle zoomimage(100,0.9,0.9) sprite(1,320,220,100) sprite(3,i,180,11) sprite(4,640-i,220,2) sprite(5,i,260,3) sprite(6,640-i,300,4) screenswap next deletesprite(2) screenopen(2,540,400,60,480,540,400,2) prints( "ben venuti in sdlBasic!!") prints( "") prints( "questo basic e' gratuito e distribuito come software libero") prints( "tu puoi usarlo studiarlo modificarlo e farne copie ") prints( "per i tuoi amici. Questo software non vuole soldi") prints( "ma regala emozioni istruzione e divertimento") prints( "Collabora con noi allo sviluppo!! ") prints( "visita sdlbasic.sourceforge.net") prints( "") prints( "premi un tasto per uscire") for i=480 to 50 step -1 updatestelle screen(2) screenrect(60,i,540,400,2) screenswap next while inkey=0 updatestelle screenswap end while screenfade(0,3) screenfade(2,2) deletesprite(10) for i =255 to 0 step -5 volumemusic(i/2) wait(100) screenswap next end end sub '__________________________________________________________________________________________________________________ sub english for i=320 to -320 step -5 updatestelle zoomimage(100,0.9,0.9) sprite(1,320,220,100) sprite(3,i,180,1) sprite(4,640-i,220,12) sprite(5,i,260,3) sprite(6,640-i,300,4) screenswap next deletesprite(2) screenopen(2,540,400,60,480,540,400,2) prints( "Welcome to sdlBasic!") prints( "") prints( "This basic is free and distributed as free software.") prints( "You may study and modify it and give copies") prints( "to your friends. This software doesn't want your money") prints( "but present emotions instructions and amusement.") prints( "All contributions are welcome!!!") prints( "visit sdlbasic.sourceforge.net") prints( "") prints( "Press any key to exit") for i=480 to 50 step -1 updatestelle screen(2) screenrect(60,i,540,400,2) screenswap next while inkey=0 updatestelle screenswap end while screenfade(0,2) screenfade(2,3) deletesprite(10) for i =255 to 0 step -5 volumemusic(i/2) wait(100) screenswap next end end sub '__________________________________________________________________________________________________________________ sub portugues for i=320 to -320 step -5 updatestelle zoomimage(100,0.9,0.9) sprite(1,320,220,100) sprite(3,i,180,1) sprite(4,640-i,220,2) sprite(5,i,260,13) sprite(6,640-i,300,4) screenswap next deletesprite(2) screenopen(2,540,400,60,480,540,400,2) prints( "Bem vindo ao sdlBasic!!") prints( "") prints( "Este basic é livre, e distribuido como software livre.") prints( "Tu podes usá-lo, estudá-lo, modificá-lo, e fazer cópias para os teus amigos. ") prints( "Este software não pede dinheiro, mas regala emoções, instruções e divertimento") prints( "Colabora conosco no desenvolvimento!!") prints( "visita sdlbasic.sourceforge.net") prints( "") prints( "Aperta uma tecla para sair") for i=480 to 50 step -1 updatestelle screen(2) screenrect(60,i,540,400,2) screenswap next while inkey=0 updatestelle screenswap end while screenfade(0,3) screenfade(2,2) deletesprite(10) for i =255 to 0 step -5 volumemusic(i/2) wait(100) screenswap next end end sub '__________________________________________________________________________________________________________________ sub deutsch for i=320 to -320 step -5 updatestelle zoomimage(100,0.9,0.9) sprite(1,320,220,100) sprite(3,i,180,1) sprite(4,640-i,220,2) sprite(5,i,260,3) sprite(6,640-i,300,14) screenswap next deletesprite(2) screenopen(2,540,400,60,480,540,400,2) prints( "Willkommen bei sdlBasic!!") prints( "") prints( "Dieses Basic ist kostenlos und wird als freie Software vertrieben.") prints( "Sie können es sich ansehen und verändern und Kopien") prints( "an Ihre Freunde weiter geben. Diese Software kostet Sie") prints( "kein Geld, sondern bietet Ihnen Anleitung und Unterhaltung.") prints( "Alle Beiträge sind willkommen!!!") prints( "Besuchen Sie sdlbasic.sourceforge.net") prints( "") prints( "Drücken Sie eine beliebige Taste, um zu beenden.") for i=480 to 50 step -1 updatestelle screen(2) screenrect(60,i,540,400,2) screenswap next while inkey=0 updatestelle screenswap end while screenfade(0,3) screenfade(2,2) deletesprite(10) for i =255 to 0 step -5 volumemusic(i/2) wait(100) screenswap next end end sub '------------------------------------------------------------------------------------------------------------------- sub main for i =0 to numstars x[i]=rnd(800) y[i]=rnd(600) s[i]=rnd(4)+1 next x[0]=900 screenopen (1,640,480,0,0,640,480,2) cls ink(rgb(255,255,255)) textrender("1 - Italiano",32,1) hotspot(1,1,1) textrender("2 - English",32,2) hotspot(2,1,1) textrender("3 - Portugues",32,3) hotspot(3,1,1) textrender ("4 - Deutsch",32,4) hotspot(4,1,1) ink(rgb(255,255,0)) textrender("1 - Italiano",32,11) hotspot(11,1,1) textrender("2 - English",32,12) hotspot(12,1,1) textrender("3 - Portugues",32,13) hotspot(13,1,1) textrender ("4 - Deutsch",32,14) hotspot(14,1,1) ink(color(15)) for i=0 to 320 step 1 updatestelle sprite(1,320,i-80,100) sprite(3,i,180,1) sprite(4,640-i,220,2) sprite(5,i,260,3) sprite(6,640-i,300,4) screenswap next while 0=0 screen(1) a=inkey if a<>0 then if a=asc("1") then italiano end if if a=asc("2") then english end if if a=asc("3") then portugues end if if a=asc("4") then deutsch end if if a=27 then exit while end if end if if bmouse=1 then if mousezone(240,160,180,40) then italiano end if if mousezone(240,200,180,40) then english end if if mousezone(240,240,180,40) then portugues end if if mousezone(240,300,180,40) then deutsch end if end if updatestelle screenswap end while end sub '__________________________________________________________________________________________________________________ main usr/src/sdlBasic/share/sdlBasic/sdlBasic.properties0000755000076500007660000002030510637423423017634 0ustar # Define SciTE settings for sdlBasic files. # version for sdlBasic editor filter.sdlBasic=(sdlbas sdlblib)|*.sdlbas;*.sdlblib| file.patterns.sdlBasic=*.sdlbas;*.sdlblib lexer.$(file.patterns.sdlBasic)=sdlb # Keyword keywordsclass.sdlBasic= \ const \ option explicit \ option qbasic \ include \ argc \ argv \ command \ command$ \ argument \ argument$ \ getenv \ shell \ end \ stop \ os \ isfbsd \ isosx \ islinux \ iswin32 \ ismos \ isnetbsd \ isamigaos \ debug \ declare \ sub \ exit sub \ end sub \ function \ exit function \ end function \ return \ while \ wend \ end while \ exit while \ continue \ if \ then \ else \ elseif \ end if \ select case \ case \ case else \ end select \ for \ for each \ continue \ exit for \ next \ end for \ do \ loop \ exit do \ or \ and \ xor \ not \ mod \ shl \ shr \ dim \ shared \ common \ lbound \ ubound \ erase \ asc \ chr \ chr$ \ insert \ insert$ \ instr \ lcase \ lcase$ \ left \ left$ \ len \ length \ ltrim \ ltrim$ \ mid \ mid$ \ replace \ replace$ \ replacesubstr \ replacesubstr$ \ reverse \ reverse$ \ right \ right$ \ rinstr \ rtrim \ rtrim$ \ space \ space$ \ str \ str$ \ strf \ strf$ \ string \ string$ \ tally \ trim \ trim$ \ typeof \ typeof$ \ ucase \ ucase$ \ val \ abs \ acos \ asin \ atan \ bin \ bin$ \ cos \ exp \ fix \ floor \ frac \ hex \ hex$ \ int \ log \ randomize \ rnd \ round \ sgn \ sin \ sqr \ tan \ min \ max \ bitwiseand \ andbit \ bitwiseor \ orbit \ bitwisexor \ xorbit \ open \ file input \ input \ file output \ print \ close \ eof \ fileexists \ filecopy \ filemove \ filerename \ freefile \ kill \ filedelete \ loc \ lof \ readbyte \ rename \ seek \ writebyte \ chdir \ dir dir$ \ direxists \ dirfirst \ dirnext \ mkdir \ rmdir \ data \ read \ print \ date \ date$ \ time \ time$ \ ticks \ reservebank \ baseimage \ baseimageCC \ basescreen \ basesound \ freebase \ freebank \ copybank \ loadbank \ savebank \ setbank \ currentbank \ sizebank \ banksize \ poke \ doke \ loke \ peek \ deek \ leek \ memcopy \ setdefaults \ setdisplay \ setalphachannel \ setcaption \ caption \ displaywidth \ displayheight \ displaybpp \ screen \ screenz \ lastscreen \ directscreen \ screenopen \ screenclose \ screenclone \ screencopy \ screenfade \ screenfadeout \ screenfadein \ screencrossfade \ screenalpha \ screenlock \ screenunlock \ screenrect \ screenviewport \ xscreenrect \ screenviewportx \ yscreenrect \ screenviewporty \ wscreenrect \ screenviewportw \ hscreenrect \ screenviewporth \ flagscreenrect \ screenviewportflag \ screenwidth \ screenheight \ offset \ screenoffset \ xoffset \ screenoffsetx \ yoffset \ screenoffsety \ cls \ screenswap \ autoback \ setautoback \ dualplayfield \ waitvbl \ fps \ rgb \ enablepalette \ color \ palette \ colorcycling \ colorcycling \ ink \ point \ getpixel \ dot \ setpixel \ putpixel \ plot \ line \ box \ bar \ circle \ fillcircle \ ellipse \ fillellipse \ paint \ triangle \ polyline \ polygon \ loadimage \ loadzipimage \ saveimage \ loadsound \ loadzipsound \ loadmusic \ hotspot \ setcolorkey \ colorkey \ imageexists \ imagewidth \ imageheight \ deleteimage \ copyimage \ setalpha \ imagealpha \ zoomimage \ rotateimage \ rotozoomimage \ mirrorimage \ blt \ pastebob \ pasteicon \ grab \ spriteclip \ sprite \ deletesprite \ xsprite \ spritex \ ysprite \ spritey \ spritewidth \ spriteheight \ frsprite \ spriteimage \ livesprite \ spriteexist \ spritehit \ spritez \ lastsprite \ autoupdatesprite \ updatesprite \ setbob \ bob \ deletebob \ xbob \ bobx \ ybob \ boby \ bobwidth \ bobheight \ frbob \ bobimage \ livebob \ bobexist \ bobhit \ bobz \ lastbob \ autoupdatebob \ updatebob \ text \ setfont \ getfont \ textrender \ pen \ paper \ fprints \ prints \ locate \ atx \ aty \ curson \ cursoff \ inputs \ zoneinputs \ isenabledsound \ soundenabled \ soundexists \ deletesound \ copysound \ musicexists \ playsound \ playfreqsound \ volumesound \ soundvolume \ stopsound \ pausesound \ resumesound \ sound3d \ positionsound \ soundchannels \ playmusic \ positionmusic \ stopmusic \ pausemusic \ resumemusic \ rewindmusic \ fademusic \ volumemusic \ musicvolume \ speedmusic \ musicspeed \ numdrivescd \ countcddrives \ namecd \ cdname \ opencd \ indrivecd \ cdinserted \ trackscd \ countcdtracks \ curtrackcd \ cdcurtrack \ curframecd \ cdcurframe \ playcd \ playtrackscd \ playtrackscd \ playtrackscd \ playcdtracks \ playcdtracks \ playcdtracks \ pausecd \ resumecd \ stopcd \ ejectcd \ closecd \ tracktypecd \ cdtracktype \ tracklengthcd \ cdtracklength \ trackoffsetcd \ cdtrackoffset \ loadmpeg \ plaympeg \ stopmpeg \ deletempeg \ pausempeg \ rewindmpeg \ seekmpeg \ skipmpeg \ statusmpeg \ key \ inkey \ waitkey \ xmouse \ ymouse \ mousex \ mousey \ xmousescreen \ ymousescreen \ mousescreenx \ mousescreeny \ bmouse \ mousebutton \ changemouse \ mousepointer \ locatemouse \ placemouse \ mouseshow \ howmouse \ mousehide \ hidemouse \ mousezone \ numjoysticks \ namejoystick \ numaxesjoystick \ numballsjoystick \ numhatsjoystick \ numbuttonsjoystick \ getaxisjoystick \ gethatjoystick \ getbuttonjoystick \ xgetballjoystick \ ygetballjoystick \ joy \ bjoy \ joybuttons \ fire \ waitbjoy \ wait \ timer \ isenabledsock \ getfreesock \ OpenSock \ AcceptSock \ IsServerReady \ ConnectSock \ IsClientReady \ CloseSock \ ReadSock \ ReadByteSock \ ReadLineSock \ WriteSock \ WriteByteSock \ WriteLineSock \ getremoteip \ getremoteport keywords.$(file.patterns.sdlBasic)=$(keywordsclass.sdlBasic) # constants constantsclass.sdlBasic= \ dcbasic_version \ dcbasic_date \ true \ false \ null \ num_screens \ num_images \ num_sprites \ num_bobs \ num_waves \ num_socks \ num_membank \ dual_playfields \ screen_colorkey \ k_backspace \ k_tab \ k_clear \ k_return \ k_pause \ k_escape \ k_esc \ k_space \ k_exclaim \ k_quotedbl \ k_hash \ k_dollar \ k_ampersand \ k_quote \ k_leftparen \ k_rightparent \ k_asterisk \ k_plus \ k_comma \ k_minus \ k_period \ k_slash \ k_colon \ k_semicolon \ k_less \ k_equals \ k_greater \ k_question \ k_at \ k_leftbracket \ k_backslash \ k_rightbracket \ k_caret \ k_underscore \ k_backquote \ k_delete \ k_1 \ k_2 \ k_3 \ k_4 \ k_5 \ k_6 \ k_7 \ k_8 \ k_9 \ k_0 \ k_kp0 \ k_kp1 \ k_kp2 \ k_kp3 \ k_kp4 \ k_kp5 \ k_kp6 \ k_kp7 \ k_kp8 \ k_kp9 \ k_kp_period \ k_kp_divide \ k_kp_multiply \ k_kp_minus \ k_kp_plus \ k_kp_enter \ k_kp_equals \ k_up \ k_down \ k_right \ k_left \ k_insert \ k_home \ k_end \ k_pageup \ k_pagedown \ k_f1 \ k_f2 \ k_f3 \ k_f4 \ k_f5 \ k_f6 \ k_f7 \ k_f8 \ k_f9 \ k_f10 \ k_f11 \ k_f12 \ k_f13 \ k_f14 \ k_f15 \ k_numlock \ k_capslock \ k_scrollock \ k_rshift \ k_lshift \ k_rctrl \ k_lctrl \ k_ralt \ k_lalt \ k_rmeta \ k_lmeta \ k_lsuper \ k_rsuper \ k_mode \ k_compose \ k_help \ k_print \ k_sysreq \ k_break \ k_menu \ k_power \ k_euro \ k_undo keywords2.$(file.patterns.sdlBasic)=$(constantsclass.sdlBasic) # Comments comment.block.sdlb=-- # VB styles # White space style.sdlb.0=fore:#000000,$(font.vbs) # Comment style.sdlb.1=$(colour.code.comment.line), $(font.small) # Number style.sdlb.2=$(colour.number) # Keyword style.sdlb.3=$(colour.keyword) # String style.sdlb.4=$(colour.string) # Preprocessor style.sdlb.5=$(colour.preproc) # Operator style.sdlb.6=$(colour.operator) # Identifier style.sdlb.7= # Date style.sdlb.8=$(colour.number) # user1 style.sdlb.10=$(colour.constant) braces.sdlbas.style=4 if PLAT_WIN BASEDIR=$(SciteDefaultHome)\.. SDLBRT="$(BASEDIR)\bin\sdlBrt.exe" command.go.*.sdlbas=$(SDLBRT) "$(FilePath)" command.help.*.sdlbas=explorer $(BASEDIR)\share\doc\sdlBasic\english\QuickHelp.html if PLAT_GTK BASEDIR=$(SciteDefaultHome)/../.. # uncomment this if you use kde and have problems with audio #ARTSDSP=artsdsp -m SDLBRT=$(ARTSDSP) $(BASEDIR)/bin/sdlBrt BROWSER=firefox command.go.*.sdlbas=$(SDLBRT) "$(FilePath)" command.help.*.sdlbas=$(BROWSER) "file:$(BASEDIR)/share/doc/sdlBasic/english/QuickHelp.html" command.name.1.*.sdlbas=Autoindent command.1.*.sdlbas=$(SDLBRT) --nodefaults $(BASEDIR)/share/sdlBasic/plugins/autoindent.sdlbas "$(FilePath)" command.is.filter.1.*.sdlbas=1 command.name.2.*.sdlbas=Unindent command.2.*.sdlbas=$(SDLBRT) --nodefaults $(BASEDIR)/share/sdlBasic/plugins/unindent.sdlbas "$(FilePath)" command.is.filter.2.*.sdlbas=1 command.name.3.*.sdlbas=make executable command.3.*.sdlbas=$(SDLBRT) --nodefaults $(BASEDIR)/share/sdlBasic/plugins/bind.sdlbas $(SDLBRT) "$(FilePath)" command.is.filter.3.*.sdlbas=1 usr/src/sdlBasic/share/fonts/0000777000000000000000000000000010645354604015146 5ustar rootrootusr/src/sdlBasic/share/fonts/ttf/0000777000000000000000000000000010645354606015745 5ustar rootrootusr/src/sdlBasic/share/fonts/ttf/dejavu/0000777000000000000000000000000010645354610017216 5ustar rootrootusr/src/sdlBasic/share/fonts/ttf/dejavu/DejaVuSansMono-Roman.ttf0000777000076500007660000012554010463127631022111 0ustar GDEF+/*¤LbGSUBüsù>¥°.OS/2ŒÚÿ˜VcmapgR*ßl²cvt é— È0featÀ®¦à?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a†‡‰‹“˜ž£¢¤¦¥§©«ª¬­¯®°±³µ´¶¸·¼»½¾rdeix¡pkvjˆšsgwl|¨ºcnm}b‚…—¹Áy„ŒƒŠ‘Ž•–”œ›qz¶, °%Id°@QX ÈY!-,°%Id°@QX ÈY!-,  °P° y ¸ÿÿPXY°°%°%#á °P° y ¸ÿÿPXY°°%á-,KPX ¸EDY!-,°%E`D-,KSX°%°%EDY!!-,ED-¹€²”]A–€þþþþšþ ²ëGA% } % 2 – þþ%þ%þ@Yþþþý}üþûþú2ù»ø}÷öŒ÷þ÷ÀöõYöŒö€õô&õYõ@ô&óò/óúò/ñþðþï2îí–ìëGìþì¸ÿÑ@ÿëGêédê–édèþçæçþæåþäkãþâ»áàáúàß–ÞþÝþÜÛÜþÛÚ–ÙØÙþØ Ø×}Ö:Õ Õ:ÔþÓÒ ÓþÒ ÑþÐþÏŠÏÎÍþÌ–Ë‹%ËþÊþÉ}ÈþÇþÆþÅš ÄþÃþÂþÁþÀ À¿ ¾½»¾þ½¼]½»½€¼»%¼]¼@»%ºþ¹–¸A·þ¶A¶úµš ´þ³d²d±°¯þ®þ@ý­þ¬þ«ªþ©¨©2¨§¦§(¦¥¤-¥}¤-£þ¢þ¡þ Ÿ dŸžŸž œþ›š ›þš ™˜.™þ˜.—A—––•»–þ•”]•»•€”%”]”@“þ’þ‘%‘»%‹%AŽ Ž Œ‹%Œd‹Š‹%Љþˆþ‡þ†…†þ…„þƒþ‚B‚Sþ€x~}þ~}}|þ{zþwþvþut uu¸@Út tÀss@rþqþpþonSo–nm(nSm(lþk2jþi2húg»fþeþdþcbcþbbaþ`þ_þ^Z ^]d\È[Z [Z YþXWþVþUU2TþSþRþQ}PþONþM-MþL»K(JIJ7ICIHEHþGCGdFEF»EDCD7CBCC¸@@ BABB¸@ A@AA¸À@ @? @@¸€@ ? ? ?¸@@d>þ=-=ú<þ;(:þ9B9d818K7þ6-6þ5K404K303þ2B2þ1-10/-/. .»-,--¸€@ ,,,¸@@–+*%+þ* *%):)þ(þ'þ&%B%E$#þ""þ! -!} -KBþþþþþþBF-B-Bþ-B¸@  ¸À@   ¸€@    ¸@´  ¸@7 þ  þ þ-þ:ú-:-¸d…++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++¸Ë¸Ëª‘¸f¸‡¸ÃË˸¸Ë‰ºË¦ü˃ò Ç7ƒ¾X!Ëœçu¼ÓÉÛuç9ºËÓ!߸‰¾‰Ã¾{¾Xm¤®{¸o{¸RÍÑ͇‡“¤oÍ˸ƒ‘Ý´‹ô˜éZ´ºÅ!þÕöª=f‹ÅššƒÕs þáÕ+¤´œbœÕ˜‡ÕÕð¤¸#Ӹ˦¼1NÓ {T\qÛ…#wé`jÏÕ#fy```{{w`ªébø{!Åœ{´RNNÑfœœfœfœÍúƒ‘þHF?{L˜¢'oo5jo{ªª-–{öª3=œf‹öÍoD7fî…´}sÕ%%%%KmËJÍz‘½é6b•ªÄ‡² i§õP~çAbŒ²Ó÷jô \ ° õ / \ ƒ Ô ÿ * _ Æ â B Ï  \ Â@a¨ânð3mŽªËí*Ÿç+sÇeÑ Š¶P‡Ã UœK‚ÈmâWšÿ}½½äF„©:{y³Ï噯ê y á!!`!!¥!Ù" "S""Ÿ"¯"¿#9#E#Q#]#i#u$$j$u$$$™$¥$±$½$É$Õ%#%/%;%G%S%_%k%¤&&&2&>&J&V&b&¢''')'4'?'J'U'ý(((()(4(?(J(U(`(ê(õ)) ))!),)Y)Ú)å)ð)û***Z*e*q*}*‰*”* *«*·*Ã+ +,+8+D+O+[+f+r+™+¥+±+½+É+Õ+á,,a,m,x,„,,Û-f-r-~-Š-•-¡-¬-·-Â-Î-Ù-å-ñ-ý....+.6.B.N.Y.e.p.|.‡//2/`/–/¾00A0Ì11a1§1³1¾1Ê1Õ1á1ì1ø222,2I2f2„2±2ß33;3|3œ3È4p4‘4´5<5–5ó606S6Š6 6º6Ò77e7º838u8¤8Ò8ü9K999Ø::±:ô;4;{;–;Í;÷< hþ–h¤¼¶ƒ/ÄÔì1ÔìÔì0!%!!hüsüåþ–øòr)ÏÕ @‡†ˆ Ô<ì2991/äüì03#3#Ë¡ËËÕýqþ›eý¸þRªÕ@‰ˆÔìÜì1ô<ì20###®Ñ®ÕýÕ+ýÕ+;J@0Œ Œ    ÔÌ91/<Ô<<ü<<Ô<<Ä2ì220333!3!###!5!!5!#3¬hõi iôþçTúþßh iöiŸhþþ)Tþö/hõTö¾þaŸþašþ²™þbžþbž™NšŸýÇþ²¾þÓZ /d@9($)%/%‹$Ž(‹Ž!$, ( 0Ô<ì2ü<ìüäî1/Æ2ÄîöîîÆöî99990>54&'#.'5.546753.'´n|pÞhumÔdfÉbdËcÈÊÓ¿dO¢TU¡PÎØé¼DþNtd]gÑp^VdûÀ-.)´>Bʶ–»ëë­+/þQššÎ !°˜ *9V@/7(" ’"’7“(’.‘“’+  % 4  + :ÄÔìüìîþî99991/îîöîþîî9999032654&#"4632#"&'%32654&#"4632#"&¸iNMklLNi‡¸†@s..2º‡ˆ¶þH#)üiOMllMMk‡¸‡@u--1º†‡¸?NjkMMljO‡¹0./t?…º·`¢`åOikMMkjN‡¹0--uA†¹¸9ÿãÅð*7³@b  -,.+2345617B7 1 +"1—"!%—–™ (! 7+!(!(! .8ÜìÄüÄÆîî99999991/ÆäöîÖÎî9990KSXí9í9íí9Y" >54/3#'#"5467.54632.#"3267>7# '&¤JKªÕNSºjØþ抋20Ç­AƒF;}Eap:6\[È›*\,#‹ýÑ1–h F'¡óXåmFD ̉êdHŠG–®·'%[M;ÏI£\—Ç ª¾Õ·ˆÔì1ôÄ0#¾®ÕýÕ+ªþòu @œ›  Ôì2ì991üì0#&547u…ƒƒ… —””—äþ;æåþ:æîÃàßÄì\þò' @œ›  Ôüì2991üì03#654\ —””— …ƒƒìþ<ßáþ<ìèÆã䯦J+ðN@,   –    Ô<ì2Ü<ì2991ôÔ<ì2Äì2990 %#'-73%+þšf9þ°sþ°9fþš9PsPßÂÃbËþ‡yËbÃÂcËyþ‡ËXqy“ '@¡  ¡   Ô<ìü<ì1Ô<ìü<ì0!!#!5!¼½þC¨þD¼“þDªþD¼ª¼“þáò/@ £¢ÔìÔÌ1üì03#öüÅšc/Ïþdßmƒ¶ ÔÄ1Ôì0!!d ý÷ƒ¤éå1¶¢Ôì1/ì03#éüü1þÏfÿB7Õ@ ˆÔìÔì1ôÄ03#y¾üî¿Õùm…ÿãLð # @¥ — —–™$!"!$üììÔìî1äôìîÔî0@Ö////////// / / ?????????? ? ? OOOO O ____ _ ŸŸŸŸŸŸŸŸŸŸ Ÿ Ÿ ¯¯¯¯¯¯¯¯¯¯ ¯ ¯ ¿¿¿¿¿¿¿¿¿¿ ¿ ¿ F////////// / / __________ _ _ ¿¿¿¿¿¿¿¿¿¿ ¿ ¿ $]]4632#"&"32'2#"ãM68PO98K…‹‹Ž‹‹Žïõõïïôôî7PP78NLœþÐþÉþÊþÐ0670 þxþþ‚þxˆ~ˆöFÕ &@——ˆ— ## ÔìÄüì1/ì2ôìÔì0%!5%3!!:þ®PÊ6üȪuL¸JúÕª˜#ðQ@)%%B§ —–—  "$üÄüìÀÀ91/ì2ôìôÌ0KSXí9í2Y"%!!567>54&#"5>32u®üu»5dF“€[ÈpgÇaÛ Yd8ÕªªªÅ.>z—O}ŽBCÌ12é½`ÀtAæ‰ÿã7ð(G@)— ‹ ¦ —‹ ¦—#–™©)&" )üÄÄüìÔì91ìäôìôìîöîî90#"&'532654&+532654&#"5>32“œþëõgÖgfÆb¦²²˜šš‹œ‘†Y¾hy½IÚ‰'Ç•Îë&$É54–‚™¦zms{((º Ûµ{¤foÕ B@   B —ˆ   $üüÔ<ì291/äÔ<ì290KSXÉÉY" !33##!5ßþ)×!êÇÇÉý‡üëÍü3¤þœd¿ÿã-Õ=@"—‹Ž— —ˆ ™ª "üÄüÄìî1ääôìîöîþÄ90!!>32#"&'532654&#"ÏôýÄ+W,èþã÷wÅN\ºa§µ»§QšFÕªþ‘þîêìþð Í21°¢ ²%%…ÿãLð$=@#— — «‹Ž—–™%"& "%üììüäì1äôìôìåîî90.#">32# !2"32654&ß?ŽMÀÆ0ªnØíôÝþüò#J”þÝ””†ˆˆ´º%'þßþçdkþ÷óòþöu‘zýlº¤¤º±­®°‹7Õ5@%%B—ˆ"üìÄ991/ôì0KSXííY"!#!‹¬ýêÓý5ÕVú+ƒÿãNð #/C@% —'—-—–™'©0 $*$ "!0üÄìüÄìîî991ìäôìîî990"32654&%.54632#"$54632654&#"h‡“•…ˆ“•þÊ‘òÐÑò‘–ŸþþääþÿŸM€yz€{y€Å—ŠŠ™—Œ‰˜T!´²ÑѲ´!!ÈŸÊäãÉ Ébx~~xz€ÿãFð $;@"—« ‹ Ž—"—–"™%"  &%üäìüìì1äôìîöîõî902654&#"532#"543 !"&T““†ˆ‡á?ŽMÀÅ/ªnØíóÞòþÝþëI”–º¤¤º±­®°ý‰º%'!dk ôñ þŠþoþ‡þséå'@ ¢¬¢Ô<ì21/ìôì03#3#éüüüü'þÑþ9þÏ“þáò' %@¢£¢¬  ÔüÔüÔÌ1äüìî03#3#öüÅšc üü/ÏþÇþÑXyw!@®­('üì291ôì90 5yü®Rûß!ÁþÀþ÷¢¦¢X`y¢@   Ô<Ä21ÔìÔì0!!!!X!ûß!ûß ¬BªXyw!@®­('ü<ì91ôì9055X!ûßRÁ¶þ^¦þ^·=ôð"{@B  %%B‹ —–†!    ) #ÔìÄÔÔìî99991/îöþôîÍ9990KSXí9í9Y"#546?>54&#"5>323#¬¾=TZ>/ƒmN²b^¿hºÝC^XE&ÅËË‘šb‰RY;X1YnED¼98À¡Lƒ\VBT=/þòþþÁšs 4p@1(+$ 4¯ ¯ '$¯+¯1+5' ( + . !+ -.5ÜìüÄþ<Äî991ÄÔüÄþÄÕÄîî999990@ €€€€€€]4&#"326#5#"&5463254&#"!267# !2€kkkk€Œ%ƒR¡ÓÓ¡P†$°‘öþÝJ6l90?{:þ›þ]x<Ñú!››‚››þèo?Dò¼¼òF=?œ¾þþ¹þ·þz‡ÒŒ†Îþöà%¬Õ ˜@A%%%% % % %  % B—°ˆ   / Üì91/<äüì90KSXííííííííY"²]@    †‰]]!3#!#hÕªþ±õÉÑnýõlÑ#ý®ú+…þ{¦qÕ =@#— —ˆ— ± 21 0!üì2üìÔì9991/ììôìî9032654&#32654&#%!2)qï°–ž¨ïë’ƒ”þJºåøƒƒ“§þöþùþFÉýÝ{’‰fþ>p}qd¦Æµ‰žÏ ËÏ‹ÿã1ð.@³²— ³ ²— –™2 10üì2ì1äôìôìîöî0%# !2.#"32671M¢[þáþÃ?[¢MJªVÅÄÄÅX©I5))–pn™))Ï=@þÐþÍþÎþÐ@=‰RÕ(@— ˆ— 2 10üìüì99991/ìôì0% 6&!# )´ÿÊÉÿ`dVDþ¼þªþѦûHKûûw/þ”þ€þ‚þ•ÕÅNÕ )@——ˆ—±  13 üì2üÄÄ1/ììôìî0!!!!!!ÅvýTŽýr¿üwÕªþFªýãªéXÕ $@——ˆ±14 üì2üÄ1/ìôìî0!!!!#éoý\eý›ËÕªþHªý7fÿãPð<@!—— ³ ²— –™ 625üìüÄüÄ1äôìôìþÔî990%# !2.#"3267#5!PQËvþäþÄ@^¬PQª_ÅÅ¿ÆCe)Ùš{KM—on™56ÏMIþÏþÎþÉþÕ!‘¦‰HÕ &@—±ˆ 1 0 üì2üì21/<ä2üì03!3#!#‰Ë)ËËý×ËÕýœdú+Çý9ÉÕ %@ —ˆ—77 Ôì2üì21/ì2ôì20!!!!5!!É=þÇ9üÃ9þÇÕªûªªmÿã¼Õ,@ ²—— ˆ™  5üÔüÄ1äôìîöÎ990753265!5!#"&m[ÂhqþƒGÓ÷`¾=ìQQ•ËDªüþæê,‰ÉÕ —@!% %B´  0 üì2À91/<ì290KSXííY"²]@L&&6FUWX dzy{ ',+&:IGG[WXXWkzx]]33 ##‰Ëwíý»VôþšËÕýh˜ýžüì¤ý¸×sÕ@ —ˆ14üìì1/äì03!!×ËÑüdÕúÕªVyÕ …@,  B ´   / 0 üìüì91/<ì2Ä90KSXÉÉÉÉY"² ]@$  &)&) 6968  ]]! !###V»þö™þõºÕýøú+'üíúÙ‹FÕ m@B´10 üìüì991/<ì2990KSXÉÉY"²]@&)&8Wdjuz &)FIWgh]]!3!#‹øÃÿþÃÕû3Íú+Íû3uÿã\ð #@ ——–™2 625üìüì1äôìî0#"32#"32‰‡š™‡‡™š‡Ó÷ýýö÷üý÷éIþæþ·þ¸þæIþzþ€~ˆ‡€þ€ÅuÕ+@—— ˆ 2 8 3üì2üì91/ôìÔì032654&#%!2+#ꌜþL´úþÿûêÊ/ýÏ”……“¦ãÛÝâý¨uþò\ð=@ —— –™ 2 625üìüì99991Ääôìî9990"#"32#"32ú÷÷üý÷‰‹È—‡š™‡‡™š‡€†‡€þ€þyþÚþ™H¾d÷Iþæþ·þ¸þæÑÕj@8  %%B— — ˆ    21  0üì2üÄì99991/<ôìÔì9990KSXíí9Y"#.+#!232654&#øNnRËÙ²M{cÁË ö¡ýÐÝ‘Ž—Áo¦þhy¡]ý‰ÕÞÒ”»Yý‰‹ÿãJð'„@=  %  %B ³§—³§—%–™( &919"0(üìÄüìä99991äôìôìîöî90KSXí9í9Y"²]@ ]].#"#"&'532654&/.54$32ô\¹^¦m•jÒÀþøüiÔksÍh™ªu‘lм ßV¾¢Í;<…qch#1ÒµÕà--×ID‰{pv /¾ Èñ'/¢Õ@—ˆ::Ôìüì1/ôì20!!#!/sþ-Ëþ+ÕªúÕ+“ÿã=Õ,@ —™ˆ10üìüì1ä2ôì999033267>=3#"&'.“Ë  yVWx! Ê9FBªjiªCE:=˜ü m];<<;\l^˜ühåÁ?;::;>Å9˜ÕL@)%%%%B´/0üì91/ì290KSXííííY"%3#3h_ÑþKõþKѪ+ú+ÕÑÕ á@D    %%% % B ´   /Ì91/<ü<Ä90KSXííííÉÉÉÉY"² ]@^ //+ ??8 ZZ  &*%*(+ % & 5:5:;: 4 6 TTZXWV[[RW X ] gh yvy v #]]333# #ŪӬÅß¿ËÊ¿ÕûD"üܾú+wü‰¾Õ Æ@K % % % %%%% % B ´  ;/; 0 üäüä91/<ì290KSXííííííííY"²7]@8  '()& X xyw !%+% 5UYX es]]3 3 # #VÙHNÙþAßÙþ’þuÚôÕýÍ3ýBüéƒý}%¬ÕY@.%%%%B´<< Ôìüì9991/ì290KSXííííY"3 3#%×lkÙþ!ËÕým“üÉýbžœ‘Õ E@%%B—ˆ—/0 üÄüÄ991/ìôì0KSXííY"²]²]!!!5!²Éüô"ü ÷ýÕšûoªš‘Ïþòw@¶·¶µ=ÔüÄ21üìôì0!#3!ϨððþXùüfÿB7Õ@ ˆÔìÔì1ôÄ0 #%¾üíÕùm“Zþò@¶·¶µ=ÔÄ2ì1üìôì0!53#5þXððøÞH¨‰Õ@ ˆÔÌ91ôÌ290 # #ÁȲþ‘þ’²ÈÕýÓ‹þu-þþmµ¸/Ì1Ôì0!5üþmPPîöf1@ º¹<Ôì1ôì0K° TK°T[X½ÿÀ@878Y #Ýšþ»fþˆx…ÿã#{ )n@*  ¶Œ!‹ ¿Œ$¾™   D >*ôìÄüì22991/Ääôüôìîî99990@00 0!0"       ¢    ]#"326757#5#"&546;5.#"5>32¾=¡£zl˜®¹¹;³€«Ìûó÷†“^À[f»X‹Å=& 3qpepÓº)Lý¦d_Á¢»Â†y64¸''RR2“ÁÿãX 0@ Œ Œ™¾›G Fôì22üì1/ìäôìî9904&#"326>32#"&'#3–ˆ…†ŠŠ†…ˆýã,›fÊèéËd™.¸¸/ÖÚÛÕÔÜÚxRXþÉþïþëþÅWSÃÿã%{/@ ‹ À‹ÀŒŒ ¾™ FôÄ2ì1äôìþôîõî0%# !2.#"3267%JRþüþÛ%QšNI“]­º»¬`˜A9++88*,ÁA:àÐÏá;>{ÿã0@ŒŒ™¾›G Hôìüì221/ìäôìî9903#5#"3232654&#"Z¸¸.™dËéêÊešþˆ……‹‹……ˆÑCùìSW;7Wþ ÖÚÜÔÕÛÚ{ÿãX{E@& ‹ ¶Œ ÁŒ¾ ™ IHôìüìÄ991äôìäîîôî990!3267# 32.#"Xüã¿®XÀmiÃ[þûþÚ ðÖ÷¸‘ˆ…¬^Z·È89·++9 @þÞÅ¢©°œÃ'4@ ¶Œ›    Ô<Äü<Ä2991/ä2üìî2990#"!!#!5!5463'ÑcMþ¸þÕ+©³™Qgcü/ÑN¸®{þH{ )H@' ' ‹ ŒŒŒ$¾Ã(Â*' G!H*ôÄìüì221ääÄôìîîÕî999904&#"326#"&'5326=#"3253Z‡‡Žˆ‡¸îçL¦Sb C•ˆ,˜mÄêêÄl–/¸9Ï××ÏÏÙÚþÝüþü¶.,¢°}^\::VZ‘Ã,@ Œ¾ › J  Fôì2üì1/<ìôì990#4&#"#3>32¹jq‹¸¸1¨s«©¶ýJ¶—Ž·«ý‡ý¤`cá²D .@¶ Ä ›Â¶L LK Ô<äìü<ì1/ì2äüìî0!!!5!!3#×münmþḸ`ü/BCéºþV 8@ Œ¶Ä›Âà  Ô<ì2ÄÄ991ääüìîî990!5!+53263#XþÃõ³¥þêZZ¸¸åûŒÃÓœ}¥éì² Å@:  B›  DE ôìì291/<ìä90KSXííííííY"²]@R546Ffuv ('(;;797JIYYkiiiyxyy]]33 ##ì¾ãàþGþáþb‰¾ü{ÑþZýFBþ?   &@  ¶ Ŷ L ÔìüÌ991/ìüì990;#"&5!5![Y×饵þÙß–|~œÔÂùmo{"Ì@'  Œ ¾ÂMNMNME#ôü<üìüì91/<<äô<ì299990@G000000 0 0 ?????????€€€€€€€ € € #]K° TK°T[K°T[X½#@##ÿÀ878YK°TX½#ÿÀ##@878Y>32#4&#"#4&#"#3>32¤"iJ‡o¨5FP;¨9JI9§§!c?LeîHEÑþßýwís{åýðp{åý``32¹jq‹¸¸1¨s«©¶ýJ¶—Ž·«ý‡`¨`cá‰ÿãH{ #@ŒŒ ¾™ D>ôìüì1äôìî0"32654&'2#"hŒŒé÷öêéöößÚÖÕÛÛÕÖÚœþÒþâþáþÓ-.¾þVT{3@ŒŒ¾™Ã GFôì22üì1äääôìî990%#3>32#"&4&#"326w¹¹.™dËçèÊf™ð‡…†ŠŠ†…‡ýÉ SWþÆþêþïþÉWõÖÚÛÕÔÜÚ‰þRw 3@ Œ Œ¾™Ã G>ôìüì221äääôìî99032654&#"#"3253#L‡……‰‰……‡-™eÉéèÊd™.¹¹+ÖÚÛÕÕÛÚýŠSY7:WSùöjƒ{O@ —¾  ÔÄì21/äôìÔÌ990@%  0030@@C@PPPP].#"#3>32ƒ;zI¬¶¹¹.¿ƒDv6y.*ØÌýÓ`Ûw"$Õÿã{'u@@    B ‹À‹ÀŒŒ%¾™( OI"E(ôÄìüìä99991äôìþõîõî990KSXí9í9Y".#"#"&'532654/.54632ÍO S}{\·J‰ìÒS¶jg¼Tz†õEŸ’ÚÊZ¦9´..QSKJ#œ}¦»##¾55cY€1“¡¯!ƒž1@¶Â¶  Ô<Äü<Ä2991/ìô<Äì2990!!;#"&5!5!f¢þ^^uÏáϪþÕ+žþÂý |b“¦Ë`>Ãÿã^,@ Œ™   JFôìüì21/ä2ôì990332653#5#"&økp‚й¹1©q¬¨¨¶ýJ—Ž·«yû¢¨adádm`e@)BÂIEôì91/ä290KSXííííY"²']@%]]3 3#d¿EF¿þrí`üT¬û Ñ` @E      B    /Ì91/<ô<Ä90KSXííííÉÉÉÉY"² ]@Œ      &&)&))#, 96993< EI F J VX W Y fifij e vzx| r -   ++>>< H Y jih {yz|  ]]333# #¶Ã ¢Ã¶þú°³²°`üwBý¾‰û fýšL…` ©@H      B  IE ôÄüÄ91/<ä290KSXííííííííY"² ]@ fivy  :4 ZV ]] # # 3 ^þo¸Õþ¸þ¹Õ¸þoÌ)'`ýèý¸Áþ?Hþk•hþV` @E       B  ŒÃ IEôìÄ91ä2ôì9990KSXííííí9íY"²8]@v  &&8IIY ]]+532673 3Z.Gc".Š\”mQ\GþOÃLGÃhu¿þø:NNš^ÄNü”lËb X@B¶Â¶IE ôÄì2991/ìôì0KSXííY"²8]@68EJWXejuz ]!!!5!ã-ý}ƒü»ƒý•b¨üÜ–ª%Ýþ²ô$f@5 %   ! ¶ ¶Æ Ƕµ% $  = %Ô<Äü<Ä299999991üìäôìî99999990#"&=4&+5326=46;#"3ô@ù©kŒ>>j©ù@FŒU[noZUŒ¾”Ýï—tr–ðÝ“WŽøŽŽœøVþ¾·µÔì1üÌ0#¾¬øÝþ²ô$j@7%   ¶¶#ÆÇ¶µ%#= %Ô<Ä2ü<Ä99999991üìäôìî99999990326=467.=4&+532;#"+ÝDVZon[VD>ù¨k@@k¨ù>¾XøœŽŽøX“Ýð–rt—ïÝ”Xìy &@    'üÄ1Ôü<Ôì2990#"'&'.#"5>32326yKOZq Mg3OIN’S5dJ t]F‰ ®;73 !;?®<6 7=ÏÕ @†ˆ Ô<ì2991/ôüÌ0533ËË¡×þþû)eþ›ýqÕþÇ%˜!N@*‹ ‹Ë ˾ ™ " E"ôìÔ<Ô<<ì221Ää2ô<Äìþôîõî990.'>7#&5473%C‚??ƒBI‚9gáþüÞg9‚þÞ„  5¬(,üš-(¬"þâ9ûú=þá"ü+` 츸ë‹Xð>@  ¶ ‹§—– — Ô<ÄÄü<ÄÔÄ1/ì2ôìôìÔ<î2990.#"!!!!53#5354632D>C†sþü3ìÇÇÛßA‰¶¸,,³ÀÙþ/ªªÑîþúÍÃLB /@ (-  * -'! ÿ¸@'ÿ) -0)$ !'$* xyx( $0ÔÄ2ìüÄ2ì9999999991ÔÄ2ìüÄ2ì99999999904&#"3267'#"&''7.5467'7>32d|[Z}}Z[|¦Z¦¨^¦.[20`0¤\¦¨^¦.[3.^ƒZ{{Z\}~t¦]¦1]02[-¦^§£Z¦3].2]-¦_¨%¬Õ@D% % %%B ç çˆ< e e<Ô<ìì2ü<ì2ì99991/ä2Ô<ì2Ô<ì290KSXííííY"3 33!!!#!5!5'!53%×lkÙþ¶üþÅV‘þoËþqZþËóÕým“ýÏo—#oýô o#—oþ¢¾˜!¼·Ô<ì21ÔìÔì0##¾¬¬¬˜ý öüý öÇÿ= ð2>j@<#$93 $*ÎÏÎÏ0–?#54&¨S9akÍÔ‚[]=:Ì­I›WW”9fqÝÖ€][<;ȧH™þ>=÷><¶¤''PGZswšeZŒ54m@ލ¤''TLf{x™f[1,pE‚ŸýÕ-Z/L‡…-Z/Lˆ?F‘\@ÞÝaaÔüÔì1ô<ì20K° TK° T[K°T[X½@ÿÀ878YK° TK°T[X½ÿÀ@878Y3#%3#?ËˈÊÊÊÊÊ}ÑN1ID@' Ú ÚÜ&Ô>ÚÚÙÔ>Ó2ÑJ\ ^,8 8YD/æþÅþå2î1ôìüôìÔìþýîÖî0.#"3267#"&54632'"3267>54&'.'2#"&'.5467>`:o:u‡Œ‚8g24r=´Ïг=rÄjµKKMMKLµijµLLKLKKµkÚZZ\[[[Ú~}Ú[[[\ZZÚ/l•€„ŽhȬ­Ê¡JKK¸jh·KLLLLLµij¸KKJgZZ[Ü~}Ú[[[[[[Ú}~Ü[ZZÕÁð %)d@6  (ó&í&ñí  ïîíð#–*& (' j kji*üìÄüì22ÀÀ9991ôäüôìÄîíÖîî99990"326=7#5#"&546;54&#"5>32!!¬|WHiƒ1ƒR–»¬¶wu3}CD‡?¸¬ýkœýdPDN@Ms=þ@pABˆtŒZ\#!¬ý {w# /@  ü¬  v vÔü<Ôì2991ô<ì2990 5 5LþÓ-þ+›þÓ-þ+#¿þôþô¿¢R¢¿þôþô¿¢RXsy^@  'üÔì1ÔÄì0!#!X!¨ü‡^þ?dßmƒ¶ ÔÄ1Ôì0!!d ý÷ƒ¤}ÑN4L…@I  ] ] B  ×× ÖAÔ)Õ5Ô)ÓÑM  \\ [G#X;#Y//æþåþõÄîî299991ôìüäþí2îÖî9990KSXíí9Y"2#'.+##32654&2#"&'.5467>"3267>54&'.X“XP:&rk1=-7‚èffZJJDÚZZ\[[[Ú~}Ú[[[\ZZÚ~jµKKMMKLµijµLLKLKKµLbeG]C;º®P*þضTè6?>5VZZ[Ü~}Ú[[[[[[Ú}~Ü[ZZgJKK¸jh·KLLLLLµij¸KKJ=b“ö¶¶ÔÌ1Ôì0!!=Výªö”+u¦ð @Ì ÍÌ–STS Ôìüì1ôìüì02#"&546"32654&hAu,-/º†‡´¸…OomOPqpð1.-rB„·´‡†ºoPPlnNOpXy“.@ ã  ã    Ô<ì2ü<ì21/ìÔ<ìü<ì07!!!!#!5!X!ûßd½þC¨þD¼ªª“þ·ªþ´LªIBœ}ða@WWBA     @–ÔÄÔÄì9991ôìäÔìî990KSXí9íY"!!57>54&#"5>32ãšýÅçeQdR1q?Ay;ެJwrnâaz3=L$$}…k9wuFœð(\A          @#–) & )ÔÄÄÔìÔì991ôìäôìîÆöîî90#"&'532654&+532654&#"5>32Û^c¾±:r;Eq-evnmBJ]b`W,p;Eu2‘¨X`lP|†yQDJLl?<8?yvcG]Ûîºf1@ º¹<Ôì1ôì0K°TK° T[X½ÿÀ@878Y3#ôÆþ»šfþˆÃþTž` L@* Œ‹™Ã Â!   JF!ôìüìÄ9991ä2äô<ìüÄ9903326533267#"&'#"&'øxo¹ ! &D">K .…Y\,þT ýHŽ—ª¦ü ;8 ”OOPNLPýÕjÿ;Õ #@ˆWW1 ÜüüÔì91Ä2ôÄÌ0!###.54$FÀ¿×ìÕùfùáNݸ¾èé/å`¹µÔì1Ôì03#éüü`þÏ‹þu)'³  º@ |ÔìÔÌÄ1/öþÅ90!#"&'532654&'¼85xv-W,"K/:=,,>i0Y[ ƒ0.W=Xœ“ß 9A      @ – aW}a Ôììüì1ôìäÔìî2035733!jÍßåŠÌý× c)t'ý+nôÕÝð 3@óñíðí –  jkjiüìüì991ôìôìüì0"32654&'2#"&546!!hfssfeusgªËÊ«ªÊË«¤ý\{œ‹‹šˆ‹œu༻ßß»¼àü`{Á\# /@  ü¬ vv Ô<üÔ<ì991ô<ì2990 5 %5 ‡Õþ+-þÓþ:Õþ+-þÓ#þ^Rþ^¿  ¿þ^Rþ^¿  ÿÿþòZ{'{þþœ&67¸üVÿÿþòZ{'{þþœ&6tÉüVÿÿþòZŒ'uÿœ&67¸üVÁÿåÝÕ!%‚@G  %%B!‹ "†$ —™$ˆ&# # )"#&ÔüÄÔìÖî99991äôìþÍôî9990KSXí9í9Y"33267#"&546?>54565#53%¾=TZ>/ƒmN²b^¿hºÝC^XC&ÄÊÊDšb‰RY;X1YnED¼98À¡Lƒ\V@T?þÿÿ%¬k&$3uÿÿ%¬k&$1uÿÿ%¬m&$4uÿÿ%¬^&$2uÿÿ%¬N&$0u%¬m !Á@W % %%% %!%! %!! % !B  — È É  !  PPK/K!"Üäüäî2î299999991/<ææÖîî9990KSXííííííííY"²€]@… ŠŠ… € €€]]4&#"326!.54632#!#Y?@WX??Y˜Õªþ”:A rr¡@;¬ÑnýõlÑZ?YWA?XXüýP!yIr¡¡rIv$ú‰…þ{œÕg@7 % %%%B— ——ˆ—°±   c /Ô<î2ÖÄÄ91/<îîîôî2îî0KSXííííY"!!!!!!#!‰þ®3þÍeýáþ e¸šxÊ5ÕªþFªýãªþÕªüüÿÿ‹þu1ð&&zdÿÿÅNk&(3uÿÿÅNk&(1uÿÿÅNm&(4uÿÿÅNN&(0uÿÿÉk&,3uÿÿÉk&,1uÿÿÉm&,4uÿÿÉN&,0uNÕ ;@!¶ —ˆ —  21 0 0ü<ì2ìüìÄ91/Æ2îöîî20 )#53 6&!#!!´VDþ»þ«þÑ}}/ÿÊÉÿ`þøÕþ”þ€þ‚þ•Å•{úÑûHKûþ+•ýáÿÿ‹F^&12ÿîuÿÿuÿã\k&23uÿÿuÿã\k&21uÿÿuÿã\m&24uÿÿuÿã\^&22uÿÿuÿã\N&20u–®;T .@     Ô<Ì91Ô<Ì290 7   –^þ¢t^_tþ¢\tþ£þ¤%\^uþ¢^uþ¢þ¤w^þ¢ÿº° +k@:+)&  *&——&–™, #* #)+262#5,üìüìÀ999999991/äôìîÀÀ9999990324&' .#"#"&''7&5327sƒTš‡ ýÝøsVƒ»)+÷ýy´=g² %÷üs­9‹d/NZInˆ-ýËÏQUþÜþ†PeæQþþ£þzþ€QQËFüIž‡€RPÉJÿÿ“ÿã=k&83uÿÿ“ÿã=k&81uÿÿ“ÿã=m&84uÿÿ“ÿã=N&80uÿÿ%¬k&<1uÉÕ4µ—— ¸@ ˆ 28  3üì22üì99991/ôüìÔì032654&#33 !##“êžžþLÊþøøþüþÊ!ý󄃃ƒ´þòÒÚÛÑþ‘¼ÿã}/V@1-'!  *‹Œ*Œ›™.  !' $'$-DF0ôìüÌÆîÔîî99991/äþîþÕî9904632#"&'532654&/.5467.#"#¼ÒØÌÒ›¨7C:—oàÄE‡BL…;l€AxC\[¢œyqyr»qÕÎÝØ|d1M*%]¤tš²¤aQG_J'8…O€«#krƒ‹û“ÿÿ…ÿã#f&DCÿÿ…ÿã#f&Dvÿÿ…ÿã#f&Dûÿÿ…ÿã#7&Dÿÿ…ÿã#&Djÿÿ…ÿã#&Dÿ)ÿã°{ C@I=70 6 %C ‹Œ"7‹6¿. ¶Á3Œ@:¾("™D%=/.M/u MCM6+sDôÄìüìÄüÄì29991ä2ô<ì2ô<ì2ôîþ<ôî999990@ 05060708]5#"32654&#"!3267#"&'#"&546;54&#"5>32>321©xYS\JíMWWLëþepO27„Gn• '…aœ£È¿uc^8„>M„<[|%!„Y®‘ºHZqYa…4—…ˆ+#"¡33¬)+RNPP¬¤«³Xx€+'¨#!?@=BíþÎÿÿÃþu%{&Fzhÿÿ{ÿãXf&HCÿÿ{ÿãXf&Hvÿÿ{ÿãXf&Hûÿÿ{ÿãX&Hjÿÿ²Df&ÒCÿÿ²Df&Òvÿÿ²Df&Òûÿÿ²D&Òj‰ÿãH)‹@O BŒ $Œ™ ›*'! !'D! >*ôìüì9999991ìÌôìî99990KSXííí9íY"#"32.''7'3%.#"32654&ÍŶûåäûûà"#!H&þéí¶Û!!®#R-’™”ˆ‰”:/Ôþ„ÈþôþØ(  (-Y,\bPÈ‘^bþ ÒÇÄÔÔÄnËÿÿÃ7&Qÿÿ‰ÿãHf&RCÿÿ‰ÿãHf&Rvÿÿ‰ÿãHf&Rûÿÿ‰ÿãH7&Rÿÿ‰ÿãH&RjX–yo '@þþ  w Ô<Äü<Ä1ÔÄüÔìî03#3#!!îõõõõþj!ûß‹õÙö¢ª/ÿ –¼ +s@>+,&  )&  *&Œ& Œ¾&™,+,* # )#D>,ôìüìÀ999999991äôìîÀÀ99999990 32654&'.#".5327#"&''mþ1$eA H#cC‹•‹')öédž<“]¤*,öêg9 \ ýÑ//ÛÕ4o¯0.ÖÊ0tG GÃq.78°MÃBÁzþáþÓ;<ºLÿÿÃÿãf&XCÿÿÃÿãf&XvÿÿÃÿãf&XûÿÿÃÿã&XjÿÿhþVf&\v¾þVT3@ŒŒ™¾ÃÅ GFôì22üì1ìääôìî990%#3>32#"&4&#"326w¹¹.™dËçèÊf™ð‡…†ŠŠ†…‡ýÉÉý²SWþÆþêþïþÉWõÖÚÛÕÔÜÚÿÿhþV&\jÿÿ%þuàÕ'Ç$ÿÿ…þur{'YDÿÿ‹ÿã1k&&1ZuÿÿÃÿã%f&FvZÿÿ‹ÿã1m&&5ZuÿÿÃÿã%f&FüZÿÿ‰Rg&'5ÿ²oÿÿ{ÿã '/:ÿ¯G{ÿãÑ$H@ "ç ¸ @"ŒŒ™¾›   GH%ôìü<Äü<Ä1/ìäôìîý<î2990!5!533##5#"3232654&#"ZþÏ1¸¿¿¸.™dËéêÊešþˆ……‹‹……ˆÑ5y••yúúSW;7Wþ ÖÚÜÔÕÛÚÿÿÅþuNÕ'1(ÿÿ{þuX{'öHÿÿÅNg&(5$oÿÿ{ÿãXa&Hü#ûÿÿfÿãPm&*8uÿÿ{þHH&JýÿÿÉP&,9u²D` "@¶Â¶LLK Ôäìüì1/ì2ôì0!!!5!!×münmþá`ü/BÿÿÈsl'1þív/ÿÿ  l'1ÿ¡vOÿÿ×sÕ'/®ÿm/ÿÿ †'/ ÿ¹Oÿÿ×sÕ'y`…/ÿÿ ¼'y×OÿösÕ 7@ —ˆ  1 4ü<ìì2.9991/äì903%!!'7×Ë;NþwÑüd‘PáÕý˜Ûoþîýãª;jnžL >@!  ¶Å¶  Ô<Ìü<Ì2999991/ìüì9990;#"&5'!5!%[Y×饵þÕP{þÙß;Pþu–|~œÔÂ$Ño/ý¾Ûnþíÿÿ‹Fk'1!u1ÿÿÃm&vQÿÿ‹Fm&15*uÿÿÃf&QüôHÁÕ;@—  —ˆ— ±  -ÜìüÄÄÔì299991/ìì2ôì2î0%! )!!!";Áý£þÙõô(RþšHþ¸þþ±‹‹±=ªªMœ¡KªþFªýãæþ¤þ¦åÿãº{ 8i@92/ & 8 ‹ ¶ Œ#ÁŒ5/¾)#™92& MuMCM,s9ôìüìÄüì29991ä2ô<ì2äî2îôî9999904654&#"265&#"!3267#"&'#"32>32PVWMþ¦fRPhgPP¬þcpPƒ/;}Jb“04€T½ªª½Y€/%‚W¯‘ & ‘‡‰ž+ýê¨ï#®§þóþó§‡T£53¬+)CBDA88>A>AíþÎÿÿÑk'1ÿµu5ÿÿj‰m'vÎUÿÿÑg&55ÿÄoÿÿjƒf&UüZÿÿ‹ÿãJk'1u6ÿÿÕÿãm&vVÿÿ‹þuJð&6zÿÿÕþu{&Vzÿÿ‹ÿãJm&65uÿÿÕÿãf&Vüÿÿ/¢m&75uÿÿƒ~&W/ÿÿ“ÿã=U&8ÿ OÿÿÃÿãÙ&XÿÓÿÿÑâ'û|:ÿÿÑm&ûZÿÿ%¬â'û|<ÿÿhþVm&û \ÿÿ%¬N&<0uÿÿœ‘k'1u=ÿÿËm&vV]ÿÿœ‘P'þ(@=ÿÿË&þ]ÿÿœ‘m&=5uÿÿËf&]üþV°#ˆ@N   B   ¶ú¶ú¶!›$  /Ì91Ä2Äüìôìîöîî299990KSXíí9í9íY".#"!!#"&'53267#5!>32°$R,fs-/þ¸d+Ǻ9f.1d0`yuü1Æ”1cð¤|‚þÉý…þöæ¤!–—¯J±É)î¨f7@ º¹ Ôì91ôì290K° TK°T[X½ÿÀ@878Y3#'#“ö‹µ´‹fþˆõõ)î¨f7@ º¹ Ôì91ô<ì90K° TK°T[X½ÿÀ@878Y373ö‹´µ‹öîxõõþˆ/)¢H 8¹ @ ¹PPÔìÜì1ô<Ôì0K° TX½ÿÀ@878Y332673#"&/w `WU`w ž‘žHLJJLDÏ6@ ÞÝaÔì1ôì0K° TK° T[K°T[X½@ÿÀ878Y3#ÍÍÌVá{ W²È ¸@ È P{PÔìôì1Ôìôì0K° TK° T[X½ÿÀ@878YK° TX½@ÿÀ878Y#"&546324&#"326{ŸtsŸŸstŸ{X@@WW@@Xôs  ssŸŸs?XW@AWX¤þu"³  ¸@  |ÔìÄÔÌ1/ÔüÄ90!33267#"&546w-+76 >&Dzs5=X..… W]0i²7»@!  ÌÌ PPÔìÔì99991Ô<üÔ<ì99990K° TK° T[X½ÿÀ@878YK°TX½@ÿÀ878Y@?       ]'.#"#>3232673#"&d9!&$|f['@%9! '$}f['@Z7JQ†”!7JQ†”XîfZ@º¹ÔÜÔÌ991ô<ì20K° TK°T[X½ÿÀ@878YK° TX½@ÿÀ878Y3#3#ªà‰ ³ø‡fþˆxþˆJ‡´>@#ø÷ùqqro prol ôìäôìäää991/<î2öî0353&5323!5654#"Jõ{n ðò!o{øþ1x†´šš³†x¬† ¼7oþ’þȼþß…¬¬LIÞæ þ÷æÞþ·L¬PÿÙžL?@!  êêèì hggfôìÔìäÄ91/äôì22î99990!#3267#"&5!##P117,#J%q\þT´L”ý@H?… ƒ°¬üH¸ÿÿÑâ'CÿÀ|:ÿÿÑm&CÀZÿÿÑâ'v@|:ÿÿÑm&v@ZÿÿÑ4'j$:ÿÿÑ¿&j¯Zÿÿ%¬â'CÿÀ|<ÿÿhþVm&CÌ\ìÑy¶¶ý/Æ1üì0!!Ñû/yìÑyµ¶/Ä1Ôì0!!Ñû/yÏÇ-@ £µÔüÔÌ1üì0#53ËüÄšbÇÏ~þ‚ÏÇ-@ £µÔìÔÌ1üì03#1üÅ™bÎþ“þáò/²£¸¶ÔìÔÌ1üì03#öüÅšc/ÏþÓÇþ %@£ µ  ÔÌÔìÔüÔÌ1ü<ì20#53#53œüÄšbþ5þÇ™bÇÏ~þ‚ÏÏ~þ‚ÓÇü '@ £µ  ÔìÔìÔÌÔÎ1ü<ì203#%3#üÅ™bþ5üÄšbÎþÎÎþÓþáü/ *´ £¸@  ÔìÔìÔÌÔÎ1ü<ì203#%3#üÅ™bþ5üÄšb/ÏþÏÏþ¢ÿ;/Õ '@Ë ˆÊ RQ R Ô<ìü<ì1äôÔ<ì203!!#!5!±nþ’±þ’nÕþ\™û£]™¢ÿ;/Õ<@ËË Ê ˆR Q R Ô<<ì2ü<<ì21äôÄ2Ô<î2î20%!#!5!!5!3!!!/þ’±þ’nþ’n±nþ’nßþ\¤š™¤þ\™ýá?Ñ‘! · Ð V Ôì1Ôä04632#"&?¬}|­®}|«ú|«¬{|­«P1 #@¢   ÔüÔìÔì1/<<ì2203#3#3#Püü3üüþfüü1þÏ1þÏ1þÏј'3?Kt@%1= ÈÈ1¸µ%È+‘C¸@&7ÈIF:4(:PFz4P@ PzP"P.zP@(/ÄìÄôìîöîîöî99991/<î2î2öîþîî299990'32654&#"4632#"&32654&#"4632#"&32654&#"4632#"&H%'üH_EDbcCE_y¥xx¦§wy¤LaEEacCEay¦yx¦¦xy¦ aEF`bDEay¦yx§§xy¦7aŸ`ýJGacECcaEy¥¦xy¨¦ÓEaaECcaEx§§xy¨§ý"GaaGCcaEx¦¦xy¨§Z/#@ ü¬vÔì291ôì90 5/þÓ-þ+#¿þôþô¿¢R¤y#@ ü¬vÔ<ì91ôì90 5 ¤Õþ+-þÓ#þ^Rþ^¿  %ÿã%ð3p@< ç1&ç³ ²—(#³² —–#™43('1)-&- 2'-4ÔÄÄ2ìÄ2Ä99999999991äôìôìÆ2îöîî2Õ<î2032.#"!!!!3267#"#73&'&54767#7Ó0ßT“JBŸN’®á1þFi1þÓ®“OCH”Uâþí,®1u¦1´!(*Ï=DÐÌl-.&nËÑC>Ï*( n -/ l“fÕh@6    B  × ˆ  ` `_`_/üþìÕîÖî91ô<<ì2Ô<<Ä90KSXÉÉÉÉY"###5!3###¶¢r¢´‰}¬rœ7¦qÕ^þä^ÿý¾âþÓ-þB¾ÿç-):@'! '!¸ @ * $$*ÔÌÜÌ9991äÌÜÌÎÎ990>54&#"#"&54632#"&54324&#"32JIH7$$0e´ÖþßÕ˜ËÝ¢e‚ WOmVPmmW£Kƒt,>bþÊþùþ±þFØ£Æ[àt}þþÏt{ÿúÙO@*iiiiBùûÔÌ91/äì90KSXííííY"#3 !ÑýþáúqÃûé˜þL9î¹@ €€ÔìÔì1Ä2Ôì0!#!˜¡›ý•þL¢ø^øâþL=î 7´  ¿ @  Ô<Ä91äôìî990!!5 5!!LñüR%ýÛšý# þÕ‰\—P_ŒüÝX-y×¶ ÔÄ1Ôì0!!X!ûßתfÿB7Õ@ ˆÔìÔì1ôÄ03#y¾üî¿Õùmé/å`¹µÔì1Ôì03#éüü`þÏ;ÿÙ   /@     ÔÄ991ÔÄÀÀ90'%3##d)#ÛÓ”/þöÝ}bý%¿ƒù¼9)ú¨ð /7@$ á'!â á-ß0 $dd*0ÔìÔì99991ü<ì2ü<ì299032654&#".#"326>32#"&'#"&54632¶9[=G[TFBiË8\=G[SDCj~/“[w¬£~S€NA„U}¦„^ˆsˆd†lk€ut†c…jmvÿuÛ §Ôdƒ|kÖ¥­ÎsþL%1¹ ² ½@ & ‚&Ôìüì1üìÜäÞä026732#"&'.#" #"&54632‰j ¾ÊPd@7*9  k½ÄOeD=!0 þú°l9¼TA6?&#Hý•Ánþ!þbSA8?TX1yÃ7K@&' 10+5    *  5' .810*8Ô<Ä2991Ô<ìÔì2Ü<üÔ<ì99990#"'&'.#"5>32326#"'&'.#"5>323326yKOZq Mg3OIN’S5dK t]F‰JKOZq Sc1NJO’R`‚ t]DŠï;73 ";@®<7  6<þа;83 $77 7=X%yÝ<@       Ô<Ä291Ô<Ä2ü<Äþ<Ä990!3!!!'7#5!7!X‡ö}¤Ëþ²¸ýyø}¤ÉJ¸ýþ¢;fÕªì¬þÅhÓ¬ìVw? (@åä ( ' ü<ì2291/ìôì905!5wûß!üß!ûß¶¶L¨K¸çþ ªªXy? (@åä  (' ü<<ì291/ìôì90-5!!X#üÝ!ûß!ûß¶êç¸þµ¨þ´Vªuþ#\u"@ÔÌ91ÔÌ990 hþþôþ þ üÏüÇ9%ûÛûÓ-#7N@* ¶ ŒÄ››      JEEô<äì2ü<Äî2991/<æìþîîî299903#'#"!#!##535463¸¸w´cM“¸þ%¸ÉÉ©³éë™Qgeû¢Ñü/ÑN¸®#7B@# ¶Œ›   JE Eô<äìü<Äî991/<æþîî29990#!"!!##5354637¸þÕcM%þÛ¸ÉÉ©³ùì{Qgeü/ÑN¸®Ûîæf3# Æqšfþˆ?‘ÙQ@ ÞaaÔüÔì1Ô<ì20K°TX½@ÿÀ878YK°TK° T[X½ÿÀ@878Y3#%3#?ËˈÊÊÙËËËÛîZökµÔÄ1ÔÄ0K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@&  //// //]]3# ºåšöþø²éÑ@ Ì Ì ÔÄÔÄ99991Ô<üÔ<ì990K°TK°T[X½@ÿÀ878Y@t        !      ]]'.#"#4632326=3#"&d9 #(}gU$=19#(}fT"<9! 2-ev 3)dwyîööiµÔÄ1ÔÄ0K° TX½ÿÀ@878YK°TX½@ÿÀ878YK°TX½@ÿÀ878Y@ //]#1Åšãöþø7îšø]@ ÔÄ91Ô<Ä90K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@ //, ]3#'# ½ÓŒ¦¥Œøþö²²7îšøi@ ÔÄ91ÔÄ290K°TX½@ÿÀ878YK° TX½ÿÀ@878Y@ //*//]373 ÓŒ¥¦ŒÓî ²²þöøZj@ ÔÄ991ÔÜÔÌ0'3$øll œß 5³ ¸ ²º @  W ÔÔ<Äì291ôôÔ<ì29033##5!5 !w¢ttŠþ}ƒþîßýæoººy“þc/¢ø ²¸@ PPÔìÔì1ÔüÄ20332673#"&/w dRSaw Ÿžø6978w{zÏÛ·ÞaÔì1Ôì03#ÍÍÛÍ=âÚ J }  Â2õ(C`‚ 0B þmÜl‰±ä)m0ä3 t ÿ   ¾ÚaÈ( — ÈórÛ: ¡! …òZ«.—r ´ÒD«„ Ú  J  }     2õ (C `‚  0B þCopyright (c) 2003 by Bitstream, Inc. All Rights Reserved. DejaVu changes by Stepan Roh are in public domain Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. DejaVu changes by Stepan Roh are in public domain DejaVu Sans MonoDejaVu Sans MonoRomanRomanDejaVu Sans MonoDejaVu Sans MonoDejaVu Sans MonoDejaVu Sans MonoRelease 1.10 (DejaVu 1.4)Release 1.10 (DejaVu 1.4)DejaVuSansMono-RomanDejaVuSansMono-RomanBitstream Vera is a trademark of Bitstream, Inc.Bitstream Vera is a trademark of Bitstream, Inc.Bitstream Inc.Bitstream Inc.http://www.bitstream.comhttp://www.bitstream.comCopyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the wCopyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the wLigaturesLigaturesLigaturenLegatureLigaturenFractionsFractionsBreukenAll Typographic FeaturesFonctions typographiquesAlle typografischen MšglichkeitenFunzioni TipograficheAlle typografische kenmerkenCommon LigaturesLigatures UsuellesNormale LigaturenLegature pi ComuniGemeenschappelijke LigaturenDiagonal FractionsFractions en DiagonaleDiagonaler BruchFrazioni DiagonaliDiagonale breukenAll Type FeaturesToutes fonctions typographiquesAlle AuszeichnungsartenTutte le FunzioniAlle typekenmerkenÿ+:  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a¬£„…½–膎‹©¤ŠÚƒ“òó—ˆÃÞñžªõôö¢­ÉÇ®bcdËeÈÊÏÌÍÎéfÓÐѯgð‘ÖÔÕhëí‰jikmln oqprsutvwêxzy{}|¸¡~€ìîºýþÿ  øùú×   âã°±ûüäå !"»#$%&æç¦ØáÛÜÝàÙߟ›'()*+,-.²³¶·Ä´µÅ‚‡«Æ¾¿/Œ˜¨š™ï¼Ã¥’œ§”•¹ÀÁ0123456789: sfthyphenAogonekaogonekDcarondcaronEogonekeogonekEcaronecaronLacutelacuteLcaronlcaronLdotldotNacutenacuteNcaronncaronRacuteracuteRcaronrcaronSacutesacuteTcarontcaronUringuring Wcircumflex wcircumflex Ycircumflex ycircumflexZacutezacute Zdotaccent zdotaccentWgravewgraveWacutewacute Wdieresis wdieresisYgraveygraveEuro dlLtcaronc6459c6460c6461c6468c6470c6472c6477c6478c6475c6476 Z7ijjkpqqruvvwyzz{}~€‚‡ˆˆ‰‘’’“˜™š›Ÿ ¡¢§¨¨©±²²³¸¹º»¿ÀÀÁÁÂÃÄÉÊÌÍÑÒÒÓØÙÜÝÞßàáäåæçîïòóóô÷øùúüý())*,-./9 2XDFLTlatnÿÿÿÿfracligaliga Tl8$.×y0Øy/7O .O-LIJ 4 "#~#~€#€0 4À8<ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿ ÿÿÿýÿÿÿÿÿÿÿÿt `ä H\ 0/677:II<LL>OO@yyBÿÿÿÿ  €€€€     ?ÿÿ‡¿ÿÿÒ?ÿÿÒ¿ÿÿÌ?ÿÿ¸¿ÿÿ¼?ÿÿ·¿ÿÿ¾?ÿÿ¿ÿÿº×-.ؘ6^v‚ˆÿÿÿÿ€€ ?ÿÿï?ÿÿð¿ÿÿñÀ Lì:‚¦ $&##.ÿÿÿÿ     €€€€     €€   ?ÿÿë?ÿþÞ¿ÿÿî?ÿÿì?ÿþá¿ÿÿñ?ÿÿñ?ÿÿõ¿ÿÿô?ÿÿò?ÿÿø¿ÿÿ÷?ÿÿõ?ÿþê¿ÿÿø?ÿÿø?ÿÿþ¿ÿÿû~~€€usr/src/sdlBasic/share/fonts/ttf/dejavu/DejaVuSans.ttf0000777000076500007660000023216010463127565020211 0ustar 0GDEF.G-ù ¤bGPOSà{²8 ¶GSUBþÛùK.OS/2Œûã¸Vcmapl‹2[x²cvt ÿÓ9 üfeatÀ®/ð?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a†‡‰‹“˜ž£¢¤¦¥§©«ª¬­¯®°±³µ´¶¸·¼»½¾rdeix¡pkvjˆšsgwl|¨ºcnm}b‚…—¹Áy„ŒƒŠ‘Ž•–”œ›qz¶, °%Id°@QX ÈY!-,°%Id°@QX ÈY!-,  °P° y ¸ÿÿPXY°°%°%#á °P° y ¸ÿÿPXY°°%á-,KPX °ýEDY!-,°%E`D-,KSX°%°%EDY!!-,ED-¸€@ÿûþúù%ø2÷–öõþôþó%òñ–ð%ïŠAïþî–í–ìúëúêþé:èBçþæ2åäSå–äŠAäSãâ/ãúâ/áþàþß2ÞÝ–ÜþÛÚ}Ù»ØþÖŠAÖ}ÕÔGÕ}ÔGÓÒÓþÒÑþÐþÏþÎþÍ–ÌËÌþËÊ2ÉþÆ…ÆÅÄþÃþÂþÁþÀþ¿þ¾þ½þ¼þ»þº¹†%¹þ¸·»¸þ·¶]·»·€¶µ%¶]@ÿ¶@µ%´þ³–²þ±þ°þ¯þ®d­¬«%¬d«ª«%ª©ŠA©ú¨þ§þ¦þ¥¤þ£¢£2¢¡d ŠA –Ÿþž žþ œ›œd›š›š™ ˜þ—– —þ– •ŠA•–”“”(“’ú‘»‘þ]»€Ž%]@Ž%þŒ‹.Œþ‹.І%ŠA‰ˆ ‰ˆ ‡†%‡d†…†%…„þƒ‚ƒþ‚þ€þþ@ÿ~}}~þ}}|d{T{%zþyþxw v uþtúsúrúqúpþoþnþl!kþjBjSiþh}gBfþeþdþcþbþa:`ú^ ]þ[þZþYX YúX WW2VþUTUBTSSRQJQþP OþNMNþMLþKJKþJIJI IH GþF–E–DþC-CúB»AK@þ?þ>=>=<=<; <@ÿ; :þ9þ878ú76765 65 43 21 2þ1 0/ 0 / .- .- ,2+*%+d*)*%)('%(A'%&% &% $þ#þ"!! dú d BþúBBþdþþþþBþ-B}dþ  þ   þ  þ-þdþ@-þ-þ¸d…++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++5¸ËËÁªœ¦¸fqË ²…u¸Ãˉ-˦ðÓª‡ËªJ3ËÙôT´œ99N´R¸çÍ7sÍ`s3¢V¦V9Åɸßsºé3¼Dßͪåªˤ{¸o{RÇÍššoËÍžÓðºƒÕ˜HžÕÁËöƒT3fÓǤ͚sÕ þ+¤´œbœ-ÕÕÕð{T¤¸#Ӹ˦Ãì“ Ó\qÛ…#¨H99`Õš#fy```{œw`ªé`b{Å{´RÍf¼fwÍ;…‰{ÍJ/œœ}oo5jo{®²-–{öƒT7öœáföÍD)fîs""""X“ÿ¶Oƒ²ö!n˜´ÊÞE‚~áL·üeÏî  R s ®  ß X ° û : i “ æ  = z /¬E…ëuñ)pཊëP‹±á@Ö"m¹#{ßC€øw³S¢ÙˆÅž»ˆxé \ s ô!6!6!~!ã">"Ê#[#~$"$~%%}%â%þ&&º&ß''Q' 'þ(%(~(¬(Á(ñ))a)È)Ø)è)ø*t*€*Œ*˜*¤*°+P+»+Ç+Ó+ß+ë+÷,,,,',Œ,˜,¤,°,¼,È,Ô-8-Ô-à-ì-ø...S.æ.ñ.ü////(0000)050A0M0Y0e0q1I1U1`1k1v11Œ1º2t22Š2•2 2«2ú3333)353A3M3Y3d3–3ô44 44$404<4H4e4q4}4‰4•4¡4­4ê525>5I5U5`5¯6C6O6Z6f6q6}6ˆ6”6Ÿ6«6¶6Â6Î6Ú6å6ñ6ý7 77 7,777C7N7Z7e7ä88?8„8§8ý9-9Œ9Â::¹:Å:Ñ;;;P;;ª;¶;Ï<<>T>`>{>™>·>Ï? ??F?v?‰?ª@@@5@`@x@”@Á@òAAPA’AÌBB~BÝBîC CCC‰CÊCãCîDD'DCD[DD¢DÖEEE6EEŸE¶EæEþFFXF™FÓGG?G|GˆG”GÍGØHHIH[HgH†HÇHûI*I5IAILIcIoI{I‡I“IŸI«I·IÂI×IëJJ%JAJoJJËJ÷K9KYKƒLHL€LºM”MÙNJN|NžNéNÿO#O8OgP-P}PöQ;Q‚QÈQòRhRÎRÜSASŽSöTIT–TìUrUÁUÖfþ–f¤@ ûû/ÄÔì1ÔìÔì0!%!!füsüåþ–øòr)5Õ @@ƒ ü<ì2991/äüÌ0K° TX½ @ ÿÀ878Y¶ P ]%3#3#5ËËË¢þþÕýqþ›eŪéÕM@„üüÜì1ô<ì20K°TK°T[X½@ÿÀ878Y@0 @ P ` p   ¿ ]#!#oª$ªÕýÕ+ýÕ+ž¾`@1 ‡  ‡   üÌ91/<Ô<<ü<<Ô<<Ä2ì220@   ]!! !3!!!!#!#!5!!5!þÝT%Dh$i g8þ¡R>þ›h gþÛg¡hþÅ`Tþ¾if…þ²‡þaŸþašþ²™þbžþbž™NšŸªþÓm!(/Õ@U" '&( /)/))/B" ) *!††#Љ*Љ- ) " & 0ü<ìô<ü<ôäì1/äìÄÔäì2Äîî99990KSXíí9í9íY"K° TX½0@00ÿÀ878YK° TK°T[K°T[X½0ÿÀ00@878Y#.'5.546753.'>54&´diÒjfÑoÝÉÚÌd]®SS¯\ãÖãÖdtzqá{þÓ---´@AÈ$¬–£¼ëè¯*.þU#´œ©Ãš jXV`ÕþOnZXhqÿã)ð #'3•@6$%&%&'$'B’ ’.’$’ &Œ($‘4'!%   ! + 1 4üÄìôìîöî991ä2ô<äìîöîî0KSXííY"K° TK° T[K° T[K°T[K°T[K° T[X½4@44ÿÀ878Y"32654&'2#"&546"32654&%3#2#"&546ÑWccWUccUžº» º»ü—VcbWWcd1 üZ ž¼»ŸŸ¹º‘”„‚••‚ƒ•Ü»»ÛÛ»¼Ûa•‚„””„–ùó Û»½ÚÛ¼ºÜÿãþð 0Í@–  † †  † †††  !         B  (('•+•'”$‘Œ .  .'.'!!1üìÄÔÔìÆî99999991/ÆäöæîîÆ9990KSXíí9í9í9í9í9íí9í9ííí9Y"²2]@² " ) **&:4D ^YZ UZZY0g{›š™—• “••"™-  ' (   2'') #**(/2; 49?2J LKFO2VZ Y UY\_2j i`2uy z““—•œœŸš › š 2 2°29]]3267 >73#'#"5467.54632.#"ò[UÔ _¦Iþ{ü;Bº h]ühäƒñþΆ†02Þ¸S¥UWžDiƒ;#Q¡X’Â?@ýøYËr„þþ~þã“YW×€ác?}<¢Å$$¶/1oX3gŪoÕB@ „üì1ôì0K°TK°T[X½@ÿÀ878Y@ @P`p ]#oªÕýÕ+°þò{ O@˜—  Üä2ì991üì0K°TX½@ÿÀ878YK°TX½ÿÀ@878Y#&547{†‚ƒ… –•”—æþ>ççþ;åëÆàßÄì¤þòo @˜— Ü<ôì991üì03#654¤ –••– …ƒƒìþ<ßàþ:ëåÅççÂ=JÃðN@,  ™ ™ ‘    Ô<ä2Ü<ä2991ôÔ<ì2Äì2990 %#'-73%Ãþ™g:þ°rþ°:gþ™:PrPßÂÃbËþ‡yËbÃÂcËyþ‡ËÙÛ #@ œ  Üü<ü<ì1/Ô<ü<Ä0!!#!5!®-ýÓ¨ýÓ-ýÓªýÓ-ª-žÿÃþ@ žƒüìÔÌ1üì073#ðÓ¤Rþ¬þÀ@d߃¶œÜÌ1Ôì0!!dý僤ۮþ·ƒüì1/ì073#ÛÓÓþþÿB²Õ-@BŸ/Ä991ôì0KSXííY"3#ªýøªÕùm‡ÿãð #@   ‘Œ üìôì1äôìî0"32'2#"‹œœû þ÷ûûþ÷ PþÍþÌþÍþÍ3343 þsþ†þ‡þsyzáZÕ K@B     ÔìÄüì1/ì2ôìÔì0KSXY"K°TX½ ÿÀ @878Y´]7!5%3!!þJþ™eÊJü¤ªsH¸HúÕª–Jð¥@'B¡”  ‘   üÄÔìÀÀ91/ì2ôìôì0KSXíí9Y"K°TK°T[K°T[X½@ÿÀ878Y@2UVVzzv‡tvust‚†‚‚‚¨¨]]%!!567>54&#"5>32‰ÁüLs3aM§†_ÓxzÔXèE[þôªªªw‘:m—Iw–BCÌ12èÂ\¥pþëœÿãsð({@. † †     “  “#‘Œ£)&  )üÄÄÔìôì991ìäôäìæîîîî90K°TK°T[X½)@))ÿÀ878Y@ daa d!]!"&'532654&+532654&#"5>32?‘£þÐþè^ÇjTÈm¾Ç¹¥®¶•ž£˜S¾rsÉYæ Ž%ÄÝò%%Ã12–„•¦wps{$&´ Ѳ|«d¤Õ Œ@   B     ÜÔ<Äì291/äÔ<ì290KSXÉÉY"K° TK° T[X½@ÿÀ878Y@* *HYiwŠ+&+6NO O Vfuz… ]] !33##!5þþ5þÕÕÉý^%üãÍü3¨þ `ÞÿãdÕu@#†  ‰   Œ¤  üÄÔìÄî1ääôìæîþÄî90K°TK°T[X½@ÿÀ878YK°TX½ÿÀ@878Y!!>32!"&'532654&#"Ýý ,X,ú$þÔþï^ÃhZÀk­ÊÊ­Q¡TÕªþ’þîêñþõ Ë10¶œœ¶$&ÿã–ð $X@$ †   ¥  ‰"‘Œ% " !%üììôìä1äôäüäîîî90@ËËÍÍÍËˤ²]]"32654&.#">32# !2¤ˆŸŸˆˆŸŸ L›LÈÓ;²káþðâþýþîPL›;º¢¡»»¡¢ºy¸$&þòþïW]þïëæþêyb¥¨hÕc@B üÌÄ991/ôì0KSXííY"K°TX½@ÿÀ878Y@X9Hg°°]]!#!¨ÀýâÓþý3ÕVú+‹ÿã‹ð #/C@%  ' - ‘Œ'£0 $*$ !0üÄìôÄìîî991ìäôìîî990"32654&%.54$32#"$54632654&#"‹¥¥¦¥þ¥‚‘ÿÞßþ‘’£þ÷÷÷þ÷¤H‘ƒ‚““‚ƒ‘Åš‡‡š›†‡šV ²€³Ðг€² "ÆÙèèÙÆat‚‚tt‚‚ÿã‡ð$X@#†  ¥ ‰ ‘Œ%!"" %üìäôìì1äôìæþõîî90@ÄÂÀÀÀÂμé]]7532#"543 !"&2654&#"áLœKÈÓ:²làþûâþ±þåLœ>ˆŸŸˆˆŸŸ¸$& V\ëæþsþ†þŸþ[—º¢¡»»¡¢ºðÃ#@ƒ¦ƒü<ì21/ìôì073#3#ðÓÓÓÓþþ#þžÿÃ# %@ƒžƒ¦  ü<ì2ÔÌ1äüìî03#3#ðÓÓÓ¤R#þýÙ¬þÀ@Ù^Û¦M@*œœœœB¨§$#üì291ôì90KSXííííY" 5Ûûøúþðþ‘þ“¶ѦÑÙ`Û¢@ œœ#ü<Ä21ÔìÔì0!!!!Ùúþúþ¢¨ðªÙ^Û¦O@+œœœœB¨§$#ü<ì91ôì90KSXííííY"55Ùúþð¶þ/¦þ/¶m“°ð$p@+$  †ˆ•‘ƒ   &%ÜÄüìÔìî99991/îöþôîÍ9990K° TX½%@%%ÿÀ878Y¶y z z ]%3##546?>54&#"5>32‡ËËÅ¿8ZZ93ƒlO³a^Ág¸ßHZX/'þþ‘še‚VY5^1YnFC¼98ŸL‰VV/5<4‡þœq¢ L•@2  ©©L43¬0©7¬$©7CM34( (+(I+*(I,=MÜìüìþýþ<Æî991ÔÄüìþíÔÆÅî2Äî990K° TK° T[K°T[K°T[K°T[X½MÿÀMM@878Y@ NN/N?N]32654&#"#"&5463253>54&'&$#"3267#"$'&5476$32úŽ|{zy!<›g¬×Ø«gœ;’¥?@hþÕ°{â`±smiùhZ}þÙ˜¹þ¸€€†ˆ~R½Ôk{KOþÂþè£¤ŽŒ¥¤þHMIùÈÈúKLƒý ß±k¼Pƒ‹A@fþµÁŸþêjhmWQoagƒ}}I½¶J}‡® bæ{þùþÐhÕ º@A       B•    ÔÄ91/<äÔì90KSXííííííííY"² ]@:XvpŒ VXP ghxv|rwx‡ˆ€ ˜™–]] !3#!#¼þî%þ{å9Òˆý_ˆÕý®ú+þÉìÕ C@#• •• ­ . !üì2üìÔì9991/ììôìî90²"]!2654&#!2654&#%!2#!“D££þ¼+”‘‘”þ çú€|•¥þðûýèÉý݇‹Œ…fþ>orqp¦À±‰¢ ˘ÈÚsÿã'ð6@ ¡® •¡®•‘Œ 0üì2ì1äôìôìîöî0´].# !267# !2'fç‚ÿþð‚çfjí„þ­þz†S†íbÕ_^þÇþØþÙþÇ^_ÓHHŸghŸGɰÕ.@• •  2 üìôì99991/ìôì0²`]3 !%! )“ô5þáþËþBŸ²–þhþPþa/ûw.,¦þ—þ€þ~þ–É‹Õ .@•••­   üì2ÔÄÄ1/ììôìî0² ]!!!!!!ɰýÇý9øü>ÕªþFªýãªÉ#Õ )@••­ üì2ÔÄ1/ìôìî0² ]!!!!#ÉZýpPý°ÊÕªþHªý7sÿã‹ð9@ ••¡®•‘Œ43 üìüäüÄ1äôìôìþÔî990%!5!# !2.# !26Ãþ¶uþæ þ¢þu‹^’opü‹þîþík¨Õ‘¦ýSU™mn™HF×_`þÎþÑþÒþÎ%É;Õ ,@•­ 8  üì2üì21/<ä2üì0²P ]3!3#!#ÉÊÞÊÊý"ÊÕýœdú+Çý9É“Õ9·¯üì1/ì0K°TX½ÿÀ@878Y@ 0@P`Ÿ]3#ÉÊÊÕú+ÿ–þf“Õ M@ •° 9 üìä991äüì990K°TX½ ÿÀ @878Y@ 0 @ P ` Ÿ ]3+53265ÉÊÍãM?†nÕú“þòôª–ÂÉjÕ ï@(B¯  üì2ÔÄ91/<ì290KSXííííY"²]@’ ((764GFCUgvwƒˆ”›ç    (+*66650 A@E@@@ b`hgwp ‹‹Ž š¶µÅÅ×Öèéèê÷øù,]q]q3! !#ÉÊžýþöý3ÊÕý‰wýHüãÏý1ÉjÕ%@ •:üìì1/äì0@ 0P€€]3!!ÉÊ×ü_ÕúÕªÉÕ ¿@4  B ¯   >  üìüì91/<Äì290KSXííííY"²p]@V   && & 45 i|{y €‚‚  #,'( 4<VY ej vy •›]]! !###É-}-ÅþËþÄÕüøú+üúáÉ3Õ y@B¯6 üìüì991/<ì2990KSXííY"² ]@068HGif€ FIWXeiy…Š•šŸ ]]!3!#É–ÄþðýjÄÕûáú+áûsÿãÙð #@•• ‘Œ 3üìüì1äôìî0"32' ! 'ÜþýÜÜþÿÜ:xþˆþÆþÅþ‡yLþ¸þåþæþ¸HH¤þ[þžþŸþ[¤bb¥ÉÕ:@••   ? üì2üì91/ôìÔì0@ ?_¯]32654&#%!2+#“þššþ8ÈûþÿûþÊ/ýÏ’‡†’¦ãÛÝâý¨sþøÙð R@*  B ••‘Œ    3üìüì9991Ääôìî990KSXíí9Y""32#'# ! 'ÜþýÜÜþÿ? ôÝ!#þÅþ‡y;:xÑLþ¸þåþæþ¸HHúÏþÝï¥ab¥þ[þžþüþŽÉTÕ±@5  B• •   ?  üì2üÄì99991/<ôìÔì9990KSXíí9Y"²@]@Bz%%%&'&&& 66FFhuuwˆˆ˜˜]]#.+#! 32654&#A{>ÍÙ¿J‹xÜÊÈüƒý‰þ’••’¼~þh–bý‰ÕÖØºOýƒ…‡ÿã¢ð'~@<    B ¡”••”%‘Œ( "-"(ÜÄìüìä99991äôäìîöîÆ90KSXí9í9Y"²)]¶)/)O)].#"!"&'532654&/.54$32HsÌ_¥³w¦zâ×þÝþçjï€{ìr­¼‡š{âÊõiÚ¤Å76€vce+Ù¶Ùà0/ÐEFˆ~n|-À«Æä&ÿúéÕJ@•@@Ôäüä1/ôì20K° TX½@ÿÀ878Y@  @ p Ÿ ]!!#!ïýîËýîÕªúÕ+²ÿã)ÕK@ •Œ  8Aüìüì1ä2ôì99990K°TX½@ÿÀ878Y¶Ÿ]332653! ²Ë®Ã®ËþßþæþåþßÕüuðÓÓð‹ü\þÜþÖ*$hÕ·@'B¯ÔÄ91/ì290KSXííííY"²P]@b*GGZ}ƒ *&&))% 833<<7HEEIIGYVfiizvvyyu€˜—)]]!3 3JýÆÓÙÚÒýÇÕûéú+D¦Õ {@I      B ¯    ÔÌ91/<ì2290KSXííííííííY"²]@ò  ($ >>4 0 LMB @ Yjkg ` {|€ –•     !   # $ %  <:5306 9 ? 0FFJ@E@BBB@@ D M @@XVY Pfgab```d d d wv{xwtyywpx  †‡ˆ‰… Š —Ÿ¯[]]3 3 3# #DÌ:9ã:9Íþ‰þþÅþÂþÕûîûîú+úð=;Õ ]@F      B ¯   ÔÄÜÄ91/<ì290KSXííííííííY"K° TK° T[K°T[X½ ÿÀ @878Y@¸ '' 486 KX[fkww †€‡‹… ”—–     &()&(' ) 54<;:;4 4 8 ? H O X _ eejjhiil l xyyx}  x €€ƒˆ…„ƒ ”——•“ Ÿ ¯ @]]3 3 # #ÙsuÙþ Ùþ\þYÚÕýÕ+ý3üø{ý…ÿüçÕ”@(B¯@@ Ôäüä91/ì290KSXííííY"² ]@<5000F@@@QQQe„“ &)78@ ghxp Ÿ ]]3 3#Ùž›ÙýðËÕýšfüòý9Ç\Õ ›@B••B ÜÄÔä991/ìôì0KSXííY"K° TK° T[X½ @ ÿÀ878Y@@ )&8HGH    / 59? GJO UYfio wx Ÿ ]]!!!5!s•üPÇû=°ügÕšûoªš‘°þòXS@©²©±CÜüÌ21üìôì0K° TX½ÿÀ@878YK°TK°T[X½@ÿÀ878Y!#3!°¨ððþXùüÿB²Õ-@BŸ/Ä991ôì0KSXííY"#ªªýøÕùm“Çþòo<@©²©±Cü<Üì1üìôì0K°TK°T[X½ÿÀ@878Y!53#5oþXïïøÞÙ¨ÛÕ@ ÜÌ91ôÌ290 # #¼ÉþHþHÉÕýÓ‹þu-ÿìþþ¬µ©ÄÄ1Ôì0!5ûØþ¬ªð‰f1@ ´³DÜì1ôì0K° TK°T[X½ÿÀ@878Y #o™þºfþŠv{ÿã-{ %¼@'  ©¹ †º¹#¸Œ   E&üìÌÔì22991/ÄäôüôìÆîî9990@n0000 0!0"?'@@@@ @!@"PPPP P!P"P'p'…‡‡‡ ‡!…"' 'ð'000 0!@@@ @!PPP P!``` `!ppp p!€€€ €!]]"326=7#5#"&5463!54&#"5>32¾ß¬o™¹¸¸?¼ˆ¬Ëýû§—`¶Te¾Zóð3f{bsÙ´)LýªfaÁ¢½À‹..ª''üºÿ㤠8@¹  ¹Œ¸—G Füì22ôì1/ìäôÄìÆî0¶`€ ]4&#"326>32#"&'#3å§’’§§’’§ýŽ:±{ÌÿÿÌ{±:¹¹/ËççËËççRdaþ¼þøþøþ¼ad¨qÿãç{?@†ˆ† ˆ ¹¹¸Œ HEüä2ì1äôìþôîõî0@ € ].#"3267#"!2çNP³ÆÆ³PNM¥]ýþÖ-U¢5¬++ãÍÍã++ª$$>:#qÿãZ8@¹¹Œ¸—G Eüìôì221/ìäôÄìÄî0¶`€ ]3#5#"3232654&#"¢¸¸:±|ËÿÿË|±ýǧ’’¨¨’’§¶^ùì¨daDDaþËççËËççqÿã{p@$ †ˆ©¹ »¹¸ ŒKEüìôìÄ91äôìäîîôî90@)?p Ðð?????,// , ooooo ]q]!3267# 32.#"ü² Í·jÇbcÐkþôþÇ)ü⸥ˆš¹^Z¾Ç44®*,8 CþÝÄ—´®ž/øp@ ©‡—¼    Lü<Äü<ÄÄ991/ä2üìî2990K° TX½ÿÀ@878YK°TX½@ÿÀ878Y¶@P ]#"!!##535463ø°cM/þѹ°°®½™Phcü/ÑN»«qþVZ{ (J@#  †¹¹&#¸'¼ ¹½& G E)üÄìôì221/ÄäìäôÄìþÕî990¶`*€* *]4&#"326!"&'5326=#"3253¢¥•”¥¥”•¥¸þþúa¬QQžRµ´9²|ÎüüÎ|²9¸=ÈÜÜÈÇÜÜëþâþé³,*½¿[cb::bcªºd4@ ‡¸ — N  Füì2ôì1/<ìôÄì90²`]#4&#"#3>32d¸||•¬¹¹B³uÁƤý\žŸž¾¤ý‡ýžedïÁy+@¾±¼Fü<ì21/äüì0@  @ P ` p ]3#3#Á¸¸¸¸`û éÿÛþVy D@ ¾ ‡½¼ ±O  Fü<ì2ä991ìäôìî990@ @P`p]3+532653#Á¸£µF1iL¸¸`ûŒÖÀœa™(麜 ¼@)B¼— F üì2ÔÄ91/<ìä90KSXííííY"² ]@_ ')+Vfgsw‚‰Ž“–—£    ('(++@ h` ‰…‰š—ª§¶ÅÖ÷ð÷ð]q]33 ##º¹%ëý®kðýǹüiãýôý¬#ýÝÁy"·—Füì1/ì0@ @P`pð]3#Á¸¸ùìº{"Z@&  ‡ ¸¼PPF#üì2üüüì91/<<äô<Äì290@0$P$p$$ $ $¿$ß$ÿ$ ]>32#4&#"#4&#"#3>32)EÀ‚¯¾¹ru¦¹rw¦¹¹?°yz«‰|võâý\ž¡œ¾¤ý‡ž¢›¿£ý‡`®gb|ºd{6@ ‡¸ ¼ N  Füì2ôì1/<äôÄì90´`Ï]#4&#"#3>32d¸||•¬¹¹B³uÁƤý\žŸž¾¤ý‡`®edïqÿãu{ J@¹¹ ¸Œ QEüìôì1äôìî0@#?{{   {  { ð]"32654&'2#"s”¬«•“¬¬“ðþîðñþïßçÉÉçèÈÇéœþÈþìþíþÇ98ºþV¤{>@¹¹¸Œ½¼ GFüì22ôì1äääôÄìÄî0@ `€ à]%#3>32#"&4&#"326s¹¹:±{ÌÿÿÌ{±8§’’§§’’§¨ý® ªdaþ¼þøþøþ¼aëËççËËççqþVZ{ >@¹  ¹¸Œ½¼ GEüìôì221äääôÄìÆî0@ `€ à]32654&#"#"3253#/§’’¨¨’’§s:±|ËÿÿË|±:¸¸/ËççËËççý®daDDadªùöºJ{0@  ‡¸ ¼ FüÄì21/äôìÄÔÌ90´PŸ].#"#3>32JI,œ§¹¹:º….´˾ý²`®fcoÿãÇ{'ç@<  S  SB †‰†‰¹¹%¸Œ( R"E(üÄìÔìä99991äôìþõîõî90KSXí9í9Y"²']@m   . , , , ; ; ; ; $( ( *//*(() )!$'† † † †      '/)?)_))€)) )ð)]]q.#"#"&'532654&/.54632‹N¨Z‰‰b”?Ä¥÷ØZÃlfÆa‚Œe«@«˜àÎf´?®((TT@I!*™‰œ¶##¾55YQKP%$•‚ž¬7òž8@©¼‡  Fü<Äü<Ä2991/ìô<Äì2990²¯]!!;#"&5#53w{þ…Ks½½Õ¢‡‡žþÂý ‰NšŸÒ`>®ÿãX`6@ ‡Œ ¼  NFüìôì21/ä2ôÄì90´`Ï]332653#5#"&®¸||•­¸¸C±uÁȺ¦ýaŸŸ¾¤{û ¬fcð=`@'B¿ÔÄ91/ì290KSXííííY"K° TX½ÿÀ@878YK°TK°T[X½@ÿÀ878Y@ŽHj{†€‘¤  &&)) 55::0FFIIFH@VVYYPffiigh`ut{{uz……‰‰‰†––—š˜˜—¨§°Àßÿ>]]3 3#=Ã^^Ãþ\ú`üT¬û V5` @IU U U U   B ¿    ÔÌ91/<ì2290KSXííííííííY"K° TK°T[K°T[K°T[K° T[X½ ÿÀ @878YK° TK° T[K°T[X½ @ ÿÀ878Y@ÿ" 5 IIF @ [[U P nnf yy‡™˜” ¼¼ÎÇÏ         %%#'!%""%' $ ! # 9669 0FHF@B@@@D D D @@VVVPQRRPS T U cdejejjjn a g ouuy}x}zzxy  { v } ‡ˆ——”“œ›˜˜™@/– Ÿ¦¦¤¤««©©«¤ ¯µ±½»¸ ¿ÄÃÌÊy]]333# #V¸æåÙæå¸þÛÙñòÙ`ü–jü–jû –üj;y` Z@F      B ¿  ÔÄÔÄ91/<ì290KSXííííííííY"K° TK°T[K°T[K°T[X½ ÿÀ @878YK°TX½ @ ÿÀ878Y@˜   & =1 UWX f vzvt ‚ ™Ÿ—’ ¦©¯¥£       )&% * :9746 9 0 IFE J @ YVYYWVYVV Y P o x ›”«¤° Ï ß ÿ /]] # # 3 dþkªÙþºþºÙ³þrÙ))`ýßýÁ¸þHJþq=þV`¢@C        B  ‡½ ¼  ÔÄÄ91ä2ôì9990KSXíííííí2Y"K° TK°T[X½ÿÀ@878YK°TX½@ÿÀ878Y@ð     # 5 I O N Z Z j ‡ € “        '$$  )( % $ $ ' ** 755008 6 6 8 990A@@@@@@@@B E G II@TQQUPPVUVW W U U YYPffh ii`{xx‰Š … … ‰ ‰‰™ • • šš¤ ¤ ««°Ïßÿe]]+5326?3 3“N”|“lLT3!þ;Ã^^ÃhÈzšH†TNü”lXÛ` ´@B©¼© ÜÄ2Ä991/ìôì0KSXííY"K° TK° T[X½ @ ÿÀ878YK°TX½ ÿÀ @878Y@B&GI  + 690 @@E@@CWY_ ``f``b € ¯ ]]!!!5!qjýL´ü}´ýe`¨üÛ“¨%þ²$‚@4 %   ! © ©À ©±% $  C %Ô<Äü<Ä299999991üìÄôìî99999990K° TX½%ÿÀ%%@878Y²&]#"&=4&+5326=46;#"3>ù©lŽ==k©ù>DV[noZV¾”Ýï—ts•ðÝ“XøŽŽœøXþ®·±Ôì1üÌ0#®ªøþ²$ž@6%   ©©#À©±%#C %Ô<Ä2ü<Ä99999991üìÄôìî99999990K° TX½%@%%ÿÀ878YK°TX½%ÿÀ%%@878Y²&]326=467.=4&+532;#"+FŒUZooZUŒF?ù§lŽ>>Žl§ù?¾VøœŽŽøŽW“Ýð•st—ïÝ”ÙÓÛ1#@ œœ ÔÄ1ÔüÔìÀ990#"'&'&'&#"5>32326Ûi³an’ ›^X¬bi³an“ ›^V©1²OD;>MS²OE<>L5Õ b@ƒ ü<ì2991/ôüÌ0K° TX½ @ ÿÀ878YK°TK°T[K°T[X½ ÿÀ @878Y¶ P ]#53#3ËËË¢×þú+eþ›¬þÇ#˜!Q@+  †ˆ †ˆ ¹ ¹¸Œ"  "ÜìÔ<Ô<<ì221äô<ÄìÄþôîõî9990%.'>7#&73¦“¤¤JˆDF‰HA‰Mfñþ÷ ñfI‰ƒX⸹⡬)*ü *'ª#þä 32þá!bð`@!† ©  ”‘   Ü<ÌÌü<ÄÔÄ1/ì2ôäìÔ<î2î990K° TX½ÿÀ@878Y´66].#"!!!!53#535632NLˆ=”t‡þy-üìÇÇÖè=—´¶))›Ô×þ/ªªÑîó^R¼²#/ƒ@I -'! - -¹ëì'¹ë!0 *$0* $ $(st*(s0Üäìôäì9999999991ÔäìôäìÀ9999999907'#"&''7.5467'7>324&#"326{ÏrÎ%$&(ÑrÏ;t=:x=ÏqÏ%%&&ÏsÏ7t@?s9ÏqÏ(&%%ÏsÎ>v:@t8ÎsÏ'%$þ|pššprœRÃÕÆ@F  B Ó Ó   fe f eÔ<ì2ìüì2ì99991/ä2Ô<ì2Ô<ì290KSXííííY"K° TX½ÿÀ@878Y@(†¦ µ' ' ')((79‡ ˆ¦ ¥ª©]]!#!5!5'!5!3 3!!!þcÉþ` Tþ´þþ{y¿þÂþµTŸÇþ9Ç{3›{JýD¼ý¶{›3þ¢®˜@ õõÜ<ì21ÔìÔì0##®ªªª˜ý öý ö\ÿ=¢ð >‘@54&.#"#"&'532654/.5467.54632{?>‹ú?>ÌS8alÎÓƒ\]>9Ì­IšXW”:fqÝÖ€][;;ȦI™¨.Z.L…‡-[.Kˆ“¤''PGZswšeZŒ54m@ލ¤''TLf{x™f[1,pE‚Ÿ×F)’@ÎÍddÜüÔì1ü<ì20K° TK° T[X½@ÿÀ878YK° TK° T[K°T[K°T[X½ÿÀ@878YK°TK°T[X½@ÿÀ878Y@````pppp]3#%3#^ËËþyËËÊÊÊåÍ/IC@&=Ë>:ÌAÊ$1Ë04ÌGÊÉÈ$É 7aD=0^* D^ JÜÌüìþí2î1/îöþýîÖîýîÖî02#"$'&5476$"3267>54&'..#"3267#"&54632˜mmllmmþù˜˜þùmmllmm˜ƒâ^^``^^⃄ã^]]^\^ã§B‚B•§«›@zBC‰FØûûØIˆÍnmmþúš˜þûmmnnmm˜šmmng^^^å‚ã^^__^]⃅ã]^^õ! ¯Ÿ®"ôÐÑòsÕ;ð)_@3(%ãÝá%Ý ßÞÝ à‘* "(kl"k *ÜìÌüì22ÀÀ9991ôäüôìÄîíÖîî99990!!#5#"&546;54&#"5>32"326=‹°ýP®•,]€˜¿¼¶uu>ˆDI‘E·³þì¡~bRh‚P{¸þ@p?D‡q‡Š[[""°ðCO@Mrž%# †@Ièèèè è è è  è B  ç¦ o o nüü<Ôì2991ô<ì2990KSXííííííííY" 5 5%þÓ-þ+#þÓ-þ+#¿þôþô¿¢R¢¿þôþô¿¢RÙÛ^@ œÜÔì1ÔÄì0!#!Ù¨û¦^ýÁ•d߃¶œÜÌ1Ôì0!!dý僤åÍ/8L`@6EBC?2ÉH0É9JCÊ 9ÊÉÈ É$HE301B54&'.'2#"$'&5476$#32654&'2#'.+#ƒâ^^``^^⃄ã^]]^\^ㄘmmllmmþù˜˜þùmmllmm}{{nWXf°®i`C.‰¬;I6B›f^^^å‚ã^^__^]⃅ã]^^gnmmþúš˜þûmmnnmm˜šmmnþbþì>KL?gwyVpMIßÑ`3þœDÕb+ö/·ïîÔÌ1üì0K° TK°T[X½ÿÀ@878Y!!ÕVýªö”Ãu=ð  @ÃÄà ‘ Z[ZÜìüì1ôìüì0"32654&'2#"&546PnnPPnoO@v+..¹†‡´¸ooPOmmOOp1.-rB„·´‡†ºÙÛ .@МР œ   Ô<ì2ü<ì21/ìÔ<ìü<ì0!!#!5!!!®-ýÓ¨ýÓ-ýÓúþþ}ªþ}ƒªƒû¦ª^œ´ðJ@$}}BÝÝ÷ Ý‘~ÜÄÔÄì91ôÄìüìî90KSXí2íY"!!56754&#"5>32 ¨ýª"?XhU4zHM…9‘®þµ8rn81^BQ##{„l‹þä0bÍð(H@' Ý Ý Ý Ý ø÷Ý ø#‘)~&~ )ÜÄÄÔìÔì9991ôäìüäìÔìîî90#"&'532654&+532654&#"5>32 \e¾±9}F4wCmxolV^^ad_(fQI€7©Z`mR|†yOFJLl?<:=svcE`sîRf1@ ´³DÔì1ôì0K° TK°T[X½ÿÀ@878Y3#‹Çþº™fþˆ®þVå` M@% ‡Œ ¼½!   NF!üì2ôìÄ91ää2ô<ìÜÄ990¶"`"Ï"]3326533267#"&'#"&'®¸Š‡”•¸#% )I#ER2‘bf*þV ýH‘”¨¨ü¢<9 ”NPOONNýמÿ;9Õ %@Á]] ÔÔüÜì91Ä2ôì90!###.54$yÀ¾Ž×ëÕùfùáNݸ¾èÛH®F·ƒÔì1Ôì03#ÛÓÓFþ#þuÁ@  ó' ÜÔìÔÌ1/ÔüÄ90!#"&'532654&'T76xv.W+"J/;<+->i0Y[ ƒ0.W=‰œÅß ,@Ý ÝÝ ÷‘ |]|| Üôäüä1ôììÔìî2035733!œÌßæ‰Íý× c)t'ý+n`Õdð.@ãáÝ àÝ‘ klk Üìüì991ôìôìüì0!!2#"&546"32654&‹°ýPX³Îγ³Ðгi~hi}|P{Ý¿¿Ûܾ¿Ýs¡ˆ…  …‰ ÁH# †@I è è è è èèèèB  ç¦ o opü<üÔ<ì991ô<ì2990KSXííííííííY"5 %5 ÁÕþ+-þÓ²Õþ+-þÓ#þ^Rþ^¿  ¿þ^Rþ^¿  ÿÿ‰ÿãð&{'„5—‹ýdÿÿ‰ÿã?ð&{'„5t‹ýdÿÿbÿãð&u'„5—‹ýdÿã¬Õ $†@/ †ˆ !ƒ# •Œ#%" " "!& %ÜìÔüìÔì99991äôìþÍôî9990K°TK°T[K°T[X½%ÿÀ%%@878Y@ ttttv]33267#"&546?>7>5#53ô¾7ZZ:3ƒmN´`^Àg¸àIYX0&ÄÊÊDœe‚WX5^1YnFC¼98ŸL‰VV/5<6þÿÿhk&$”¼uÿÿhk&$’¼uÿÿhm&$•¼uÿÿh^&$“¼uÿÿhN&$‘¼uhm !Ë@T   !!  ! !!!B  Á • Ž  !  VV!"ÔÄÔì2Ôî299999991/<æÖîÔî9990KSXííííííííY"² #]@  s › P#f iu {yyv v!€# ]]4&#"326!.54632#!#TY?@WX??Y˜þð!þX=>Ÿsr¡?<Òˆý_ˆÕZ?YWA?XXþóýN)sIs ¡rFv)ú‹þHÕ‡@9  B• ••••­    ÔÔ<ì2ÔÄÄ91/<ììÄôììîî0KSXííííY"²€]@gww† …– ¿ ]!!!!!!#!5ýÇý9øü=ýð Íq‹þ¶ËÕªþFªýãªþÕžüðÿÿsþu'ð&&z-ÿÿÉ‹k&(”žuÿÿÉ‹k&(’žuÿÿÉ‹m&(•žuÿÿÉ‹N&(‘žuÿÿ;ºk&,”ÿ/uÿÿ¢k&,’ÿ/uÿÿÿþ`m&,•ÿ/uÿÿXN&,‘ÿ/u ºÕ g@  © ••  2  yô<ì2ÄôìÄ91/Æ2îöîî20@( °Ÿ Ÿ Ÿ Ÿ ŸŸŸŸ¿ ¿ ¿ ¿ ¿¿¿¿]]! )#53!!3 !Ó ±–þiþPþ`ÉÉËPþ°ó5þáþËÕþ—þ€þ~þ–¼ãþýê.,ÿÿÉ3^&1“þuÿÿsÿãÙk&2”'uÿÿsÿãÙk&2’'uÿÿsÿãÙm&2•'uÿÿsÿãÙ^&2“'uÿÿsÿãÙN&2‘'u?œÅ …@M œ  œœœœœ œ œ B   Ô<Ì291Ô<Ì290KSXííííííííY"  ' 7 œþ7Éwþ5þ5vÈþ8vËËLþ5þ7yËþ5yÉËyþ5Ëfÿºå +ž@< +,  )&  *&•& •‘&Œ,+,* # )#3,üìüìÀ999999991äôìîÀÀ99999990@*WZWU!je!{vu! FYVjddj(|svz( ]] 324&'.#"&5!27!"&''¶ý3>¡_Ü'y=¡_Üþý''†NOy;‚ÝW¢fªNPþˆþÆ€Ý[¢gXü²@CHp¸¸@Cþ¸þåp¼Džf b¥MK¿YÆgþöžþŸþ[KK¿Xÿÿ²ÿã)k&8”îuÿÿ²ÿã)k&8’îuÿÿ²ÿã)m&8•îuÿÿ²ÿã)N&8‘îuÿÿÿüçk&<’suÉÕ =@• •ö  ? üì22üì91/ôüìÔì0@ ?_]332+#32654&#ÉÊþûþÿûþÊÊþš™ŽÕþøáÜÜâþ®'ýÑ’††‘ºÿã¬/š@0-'!  *†¹*¹—Œ.  !' $'$-F0üÄüÌÆîÔîî99991/äþîþÕî990@@'(Š Š     ! "&  : :!MM I!I"jj ¥¥¦ ]]4632#"&'532654&/.5467.#"#ºïÚÐÛ—¨:A9¦`áÓ@ˆIPŒAtx;e\`W§—ƒq‚ˆ»qÈÛèàs`/Q*%jŽd¬·¤_[?T>7;‡[¬gp‹ƒû“ÿÿ{ÿã-f&DCRÿÿ{ÿã-f&DvRÿÿ{ÿã-f&DüRÿÿ{ÿã-7&DRÿÿ{ÿã-&DjRÿÿ{ÿã-&DR{ÿão{3>@C'-%= 4©%†ˆ©:¹.†-º*¹»1 ¸Œ%?47&%7& =&-7"E?üìÌÔü<ÔìÄ999991Ää2ô<Ääü<ôìÄî2îôîî9990@0+0,0-0.0/00@+@,@-@.@/@0P+P,P-P.P/P0…+…0€@@ @°@À@Ð@à@à@ð@??? ??0,0-0.0/@,@-@.@/P,P-P.P/ooo oo`,`-`.`/p,p-p.p/€,€-€.€/]q].#">32!3267#"&'#"&5463!54&#"5>32"326=¶¥‰™¹DJÔ„âü² Ì·hÈddÐj§øMIؽÒýû§—`¶Te¾ZŽÕï߬o™¹”—´®ž0Z^þÝúZ¿È55®*,ywxx»¨½À‹..ª''`þf{bsÙ´)ÿÿqþuç{&Fzÿÿqÿãf&HC‹ÿÿqÿãf&Hv‹ÿÿqÿãf&Hü‹ÿÿqÿã&Hj‹ÿÿÿǦf&ÓCÿÿÿof&ÓvÿÿÿÿÞ\f&ÓüÿÿÿÿôF&Ójÿqÿãu('@^%{&%#${##{#({'(#&'('%$%(('"#" ! B('&%"! ##¹ ¹Œ#±)&' ! (%#" QE)üìôì99999991ìÄôìî9990KSXÉÉÉÉííííY"²?*]@v%+("/#/$)%-&-'*(6%F%X X!` `!f"u u!u"%#%$&&&''(6$6%F$E%Z Z!b b!z{     {zzv v!x" *ð*']].#"32654&#"432''%'3%F2X)§¹®’‘®6 ~rþäæçþåÝ4*ŸþÁ!µäM!þÙ“ØÃ¼ÞÞ¼z¼&þà­ÿþÉ7ÿú7´kc\Ì‘oabÿÿºd7&Q˜ÿÿqÿãuf&RCsÿÿqÿãuf&Rvsÿÿqÿãuf&Rüsÿÿqÿãu7&Rsÿÿqÿãu&RjsÙ–Ûo )@êêœ r ÜÔ<ü<Ä1ÔÄüÄîî03#3#!!ßööööýúúþoöþõAªHÿ¢œ¼ +ä@<+,&  )&  *&¹& ¹¸&Œ,+,* # #Q)E,üì2ôì2À9999991äôìîÀÀ99999990@p(?-YVUV jf!{    { z{ {!"#$%{&›•%¨ -ð-&YVUZ(ifej(ztvz(‰•š$¢­$]] 32654&'.#".5327#"&''‰þ)gA“¬\*g>—©}66ñ]ŸC‹_’56þîð`¡?‹`!ý°*(èÈOuš))ëÓHn.—MÅw834¨O³MÆxþíþÇ43¨Nÿÿ®ÿãXf&XC{ÿÿ®ÿãXf&Xv{ÿÿ®ÿãXf&Xü{ÿÿ®ÿãX&Xj{ÿÿ=þVf&\v^ºþV¤>@¹¹Œ¸½— GFüì22ôì1ìääôÄìÆî0@ `€ à]%#3>32#"&4&#"326s¹¹:±{ÌÿÿÌ{±8§’’§§’’§¨ý®¾ý¢daþ¼þøþøþ¼aëËççËËççÿÿ=þV&\j^ÿÿþu¥Õ'ä$ÿÿ{þu€{'¿Dÿÿsÿã'k&&’-uÿÿqÿãçf&Fv‰ÿÿsÿã'm&&–-uÿÿqÿãçf&Fý‰ÿÿɰ&'–ì‰ÿÿqÿãÛ&G ºÕ ! )#53!!3 !Ó ±–þiþPþ`ÉÉËPþ°ó5þáþËÕþ—þ€þ~þ–¼ãþýê.,qÿãô$J@$Ó ù"¹¹ Œ¸—   GE%üìô<Äü<Ä1/ìäôÄìÄîý<î20¶`&€& &]!5!533##5#"3232654&#"¢þºF¸šš¸:±|ËÿÿË|±ýǧ’’¨¨’’§¶N}““}úü¨daDDaþËççËËççÿÿÉþuÕ'Ì(ÿÿqþu{'xHÿÿÉ‹g&(–¦oÿÿqÿãa&Hý”ÿûÿÿsÿã‹m&*˜uÿÿqþVZH&Jþ‹ÿÿÉ•P&,™ÿ/uÁy` ·¿Füì1/ì0@ @P`p]3#Á¸¸`û ÿÿÉjl'’ÿnv/ÿÿÁJl'’ÿZvOÿÿÉjÕ'ý‹ÿÃ/ÿÿÁ'ý%OÿÿÉjÕ'y1w/ÿÿÁ„'yÖsOÿòuÕ ?@ •  : yô<ìÄü<Ä991/äì90´0P]3%!!'7ÓË9Pþw×ü^”MáÕý˜Ûoþîýãª;jnžH ^@ — z z Ô<äü<ä991/ì90K°TX½ @ ÿÀ878Y@ @ P ` sz p à ð ]37#'7Ǹ}Lɸ{JÅý¦ZjüãšXjÿÿÉ3l'’Åv1ÿÿºdm&vBQÿÿÉ3_&1–×gÿÿºdf&Qýs Õ;@•••­   üìÔÄÄÔì299991/ìì2ôì2î0!!!!! !# !3úýÇý9øû×þOþA¿±gþ¿þÀ@AÕªþFªýãª|pm|ªþáþàþßþßqÿãÃ{'3„@1†ˆ ©. ¹(¹»"%¸Œ4"1 K1 Q+E4üìôüôìÄ9991ä2ô<Ääì2Äî2îôî90@%?5_5p5Ÿ5Ï5Ð5ð5????? ooooo ]q].#"!3267#"&'#"32>32%"32654& ¤‰™¹Hü² Ì·jÈbdÐj òQGÑŒñþïñŒÓBNèâú°”¬«•“¬¬”˜³®ž5Z¾Ç44®*,nmnm98olkpþ݇çÉÉçèÈÇéÿÿÉTl'’•v5ÿÿº•m&vBUÿÿÉT_&5–}gÿÿºZf&Uýÿÿ‡ÿã¢l'’•v6ÿÿoÿãÇm&vBVÿÿ‡þu¢ð&6z‹ÿÿoþuÇ{&Vzÿÿ‡ÿã¢m&6–‹uÿÿoÿãÇf&Výÿÿÿúé_&7–}gÿÿ7þ‚&Wý#pÿÿ²ÿã)K&8ðEÿÿ®ÿãXÊ&X|ÄÿÿD¦â'üõ|:ÿÿV5m'üEZÿÿÿüçâ'üq|<ÿÿ=þVm&ü^\ÿÿÿüçN&<‘suÿÿ\l'’•v=ÿÿXÛm&vB]ÿÿ\<'ÿ¨,=ÿÿXÛ&ÿ]ÿÿ\m&=–¾uÿÿXÛf&]ýþV#Š@@   B   ©Šæ©Šæ©!—$  $ÔÌ91Ä2Äüìôìîöîî299990KSXí2í9Y"K° TX½$ÿÀ$$@878Y.#"!!#"&'53267#5!>32&P,`r<þÃ:¼º:d/4a/am"‰ø?$Æ—5dð¤z„þÉý…þãÓ¦!!‰¦­J·ÃÁî?f7@ ´³uÜì91ôì290K° TK°T[X½ÿÀ@878Y3#'#¶”õ‹´´‹fþˆõõÁî?f7@ ´³uÜì91ô<ì90K° TK°T[X½ÿÀ@878Y373¶õ‹´´‹õîxõõþˆÇ)9H W@ ð³VVÜìÔì1ô<Ôì0K° TX½ÿÀ@878YK°TK°T[K°T[X½@ÿÀ878Y332673#"&Çv aWV` v ž‘‘žHKKJLšDf,@ ÎÍdÔì1üì0K° TX½ÿÀ@878Y3#šÌÌÌîá _@Áò ÁñV xVÔìôì1ôìôì0K° TK° T[X½ÿÀ@878YK° TK° T[K° T[X½ÿÀ@878Y4&#"3267#"&54632˜X@AWWA@XzŸssŸŸssŸô?XW@AWX@s  ssŸŸLþuÁ @  óô 'ÔìÄÔÌ1/üüÄ90!33267#"&546¸w-+76 >&Dzs5=X..… W]0i¶J7c@$  Ãà íVwVvôìüì99991ü<üÔ<ì99990K° TK° T[X½ÿÀ@878Y'.#"#>3232673#"&ü9! &$}f[&@%9! &$}f[&@Z7IR‡“!7IR‡“ðî®fB@´³ÔÜÔÌ991ô<ì20K° TK°T[X½ÿÀ@878Y3#3#ü²ø‡ªß‰fþˆxþˆNÏç@@" å‘å  mm  ÔììÔììÀÀ9991/<ì2ôì0%!5654#"!5!&5! Ïý¨±ÆþøØØþ÷Dzý¨?ž‘1/Ž¡²²²aLÊð"þÝïÊþ´a²²‹*¸>ŠþwþËÂþØÿáÿðª/#Ë@1 ÚÙ"ØÕ $ #" #h#$ÔÔÔì9999991/<äôì22î9990K° TX½$ÿÀ$$@878Y@V             ##(]]#3267#"&5467!##"#>3!‡¶i/7.%7vy"PþºÂµÃ)6<  ¥y‘þJ\:1fd.¡xüo‘@E¦}ÿÿÉ‹k&”îuÿÿÉ‹N&‘åuÿœþh;Õ'4'&'&#!#!5!!!232+532765o@'“-'þnÈþÕëþb “{J!dfjäN@„8:w£L3ýL+ªªþ?0'vùþíþò{yªJP¾ÿÿÉ#k&’®usÿã'ð763 5&! ! 75! &'!5L îl’ÿÁÓþøþ¦Â½ÂÂUÕÇþøþ®|7 ¼PVq3°ÕŽÔÎþ›þ—ÎÏÓ½t¡ª‡ÿã¢ð12&'&#"#"%5327654'&'&/&'&5476“Ê븕()îK;>¤z2[,þÏr™ÎþõyywpóR$ƒ%4&{ðbZ¸†ðLÅZ~3Ee049¶VuþÄ["_ÐE##€8N—A0h_¡êoQÉ“Õ3#ÉÊÊÕú+ÿÿXN& ‘ÿ/uÿ–þf“Õ 3+532765ÉÊfjàM?†68Õú“þò{yªJMÁÿîÿòžÕ032767656'&'&/&#!!#532765! !VBER!=I;þõý_þOM?†685ÿ’!e^€þòÇýß- F|H9$7ý9+üÉýþªIOÀáýžFP³()ÇlfÉÿþÕ*32767674'&/ !%!#3!3;B|DOT>C96Be\ƒþöþüý"ÊÊÞÊÇýß+D~xI6ªEP³()Åm fÇý9Õýœdÿœ;Õ!5!!!232#4'&'&#!#ÇþÕëþb “{J!dÌ@'“-'þnÈ+ªªþ?0'v÷þy¡L3ýLÿÿÉjk& ’îuÿÿÉ3k&”åuÿÿ{=i&)þá!Éÿ;Õ 33!3!#5ÉÊÞÊþ%¼ÕúÕ+ú+ððhÕ !3#!#¼þî%þ{å9Òˆý_ˆÕý®ú+þÉìÕ 6'&'&#!!2767#!!!!2FY þ¼D}[cÚaxÏ03ýè¤ý&+½s':¸VOcýÝDKmƒoŒÕ¦þ>E4DdÉìÕ (4'&#!! 764'&#!! 76#!! Ò1=þ¼D"4é þÕ+ ÝF\AKýè xIü¼O/¸à( ýÝÒ¸Êþ>¾ýfþüe! Õ’X‡þî-(’VÉ#Õ#!“ÊZ+úÕÕªÿË% #33#5!#²þ`þeÑüãüºûy»œhû˜/úÑþjðð–É‹Õ !!!!!!ɰýÇý9øü>ÕªþFªýãªqáÕ)!3323&'6767#+##"'#36;DÊV*xÊþX  [ËþÍ-PÊP-þÍË[  þXÊx*VÇýW”ýºdýœFýlý©œÿãsð1#"'53 7654'&+5327654'&#"567232P«2µO0áØ»Ô¬Ý2B˜Rt®¶å;°=NœÍ â•ù‡rmÅ\ 'ŠSoþïtJJÃcº0;¯E%¦†+6­0B´<xeÉ3Õ !#!33þðýjÄ–ÄÕûáú+áûÿÿÉ3i&þá!ÉjÕ 3! !#ÉÊžýþöý3ÊÕý‰wýHüãÏý1ÿîÿòVÕ!#!!#53276!5Éý_þOM?†68ôáú++üÉýþªIOÉÕ ! !###É-}-ÅþËþÄÕüøú+üúáÉ;Õ 3!3#!#ÉÊÞÊÊý"ÊÕýœdú+Çý9sÿãÙð!%276'&#" '&&576! 'ò€kƒÙô€k„Úþ̺³¼¾:;»¼¼»‡À¢¤¤Á¡þÿþ壤¤Æ¾A !aÓÓÓÓþŸþ ÓÓÉ;Õ#!#;Êý"ÊÕú++úÕÕÉÕ 4'&+32767+#! ¸AYþþÃD Õþ€:BþÊȹ: ¹Aýφ=Vþ}4ý¨Õþ®2sÿã'ð &'&# 3 7! '&76LÓ»ñþ¬|@Ü{¹ÇÕþúþ©ÂÀÀÁðŽÕ± þóŠÊþƒ’Q½ÓÑÎghÎÑÿúéÕ!!#!ïýîËýîÕªúÕ+{=Õ 3 3#5327¬ýÏß´Pßýd ´2;'L‰ýD¼ú‰B§QsÿßÛ (3"376%53 ##5 '&'&'&'&#276F¶‚'c³34ý-½ÀVÆ6½­­þÖ'(Æþú¶3(¼—Œ€¼ôŠ€Lb%¤þåþå£{ beÏÒëë¼·þÊ.0þµÏÏÓÓ$,Ö_¦kû;²¤=;Õ 3 3 # #ÙsuÙþ Ùþ\þYÚÕýÕ+ý3üø{ý…Éÿ/Õ 33!33#5ÉÊÞÊô¼ÕúÕ+úÕþfðÇ;Ù!3#!"'&#"'&'&53áÊÊþá_ “{L!bÌ>'2foú+°0)wö;þË P0É9Õ %!3!3!3f ÊùÊ ʪ+ú+ÕúÕÝÉÿ-Õ!3##!#!#q¼ôÊý÷Êý÷Êðš+úÕÝû#+ú+sÕ +32%&+!!! 6ª‹A[þþ¿F"Õþ€:BþýîGɹ: ¾·B1‚?Xƒ4X¦úÑR2ÉÕ +32%&+#! 63#¸AYþþÃD Õþ€:BþÊȹ: ¬Ë˾¹A1†=Vƒ4Xú+R2Qú+ÉÕ +32%&+#! 6¸AYþþÃD Õþ€:BþÊȹ: ¾¹A1†=Vƒ4Xú+R2sÿã'ð'&# 56! ! '5! 67!5M ôiŽþ÷ÆÓZ½Â*½þÐþúÕÆ R|7 ýCP[o0½ÕŽÔÎþ›þ—Î)¦Ó½t¡ªÉÿã¨ð&%276'&#"76! ! '&##3öò€kƒÙó€l„þ)¤¾:;»¼¼»þÅþ̺¯±ÊʇÀ¢¤¤À¡þþþ壤½#¶ÓÓÔþ þ¡ÔÓÆº7ýfÕýo‘Õ"3676;3! 476;#"'&XÆ?@?<ÍÙ¿HGHwÛËþ7þ ÕÕ&,þþþ$'ø] JLzþh“41ý‰Õþg Þ$ýîÉ{ÿã-{ +%276=#" #5#"'&5%63!54'&'"56#¯\G·àUVn7rµ*¸síÃeO¡*-—EbƤÆ}‡hž)35y‡4þþa,1ýª» x\Z ¯>\ªNÿÿ‘E&/&'&3676763 '"'&454767&'&567676%23!!"ÏqGddXnaM^sXyý×dS$z[þèd†âŒŽH>c .~ `þ¬£DA ALòp3Yq·„iZ{ þ¥iˆþRu*œÞx0BIxR4i )0Eºâ` /=#!!2'&'&+36767676&'+32767654ÉZ<$`, 4:-:0=þf¢q`F<22;7|®J9 =k&¦¶T-"Nm#Z^CA `>RK M> 1¬Kô"þÆ5þ¤7FQºž`!#!žýÕ¹ä¨üX`Vÿ5åV% !3#5!#3!ºþäþãòr®üÍ®sC#­ïýþˆÁÁx©qÿã{2!327# '&76"!4'&–üƒjü²ÚG[ÊÉÉÕþöž•’É\3 fP{­ãZþßKh®Vœ ž¢œNn¨\Hyÿþú`'!723&'6767##'#"'#36;Þ·=#>¹þš %ºþý&8·7' þüº% þš¹>#=þ@ðþLÌþ4´þýÀÿžÿìÃw,#"'5327654'&'#5327654'&#"5632¦e5E„E3×mšœ«‡ºÛ=…BM•Ú‹.C®·”ÜmO\|L)bH]ØP)5 H[*?‹1 zx 5–-cHq` ##353·ýǸ¸9¹^^ý\û b¨üöÿÿqH&þX>š{f 33 ##š¸%ëý®kðýǸfþãýôý¬#ýÝÿúÿîX`!3!+32765š¸ü‰'%j1HåJ)ªüV`ý#œ-1›¢Z™ºç^ %##3 3#œžþu¹ÇËÕÆ¸¨yüß^ýëû¢!ºd` !#3!3#¬ýǹ¹9¸¸´¬û ýì`qÿãu{4/&#"32762#"'&76²jKm³T9oQ€´S8þÁò‡‰‰ˆñò‡‰‰†/át?¢m¡ésT£m윛ýÖ›œœ›*›œºd`3!3¬¸üV¹¨üX`û ¨ºþV¤{ "'#3632'27654'&#"Ùöp¹¹tòÕ~xøºP/mO}¶P3pNÅý® ªÅ©¡þþþû¥¢š±j—êtT«kœðrPqÿãç{2&#"327# '&76¤¦¡šà_:œY„ž“¼þ󔆗•{F¬V¬hœþ÷j=VªH­žºÅ`!#!5!Åþ×¹þ× ¨üX¨¸FþV‰`+53276?3 3œMKI|“mJ**5 þ:Ä^]ÄhÆ?=š$!‰TNü”lqÿÝT%0+#5#"'&76;533 4/&+3276%;#"Ý¥'|ºZ¸Vò‡‰‰†óV¸Z‡dÂjMmZZ³T9üoQ€VV³T9/þÊ› [ÓÓœ›*›œÙÙÈ–îßv@ü ¢m¡ésT`¢m;y` # # 3 dþkªÙþºþºÙ³þrÙ))`ýßýÁ¸þHJþqºÿF3` %#!3##s¹ŴϺ¸¨û ºr¨üXºd^537676=3#"'&'&º¹EBpW]bººII2C7–t” qíç„YU 4 AÞÂû¢+''^wÕº` %!#!#!# þi¹Zºþi¹¸¨û `üXsºÿFã`33#5!3!3!ZºÏ´ú‹¹—¹—`üXþŽº`üXsüÄ`%#!5!32&'&+32767654Õi9N4 3=j¦¶U-"Nž"KgvmL B!Á¢þTÙ5þ¤6GRº`(3##!332&'+32767654f¹¹þŒh9N1 4:-:0=þf¹®‰==k&¦¶T-"N`û ž"KexmJA `þTÙ5þ¤7FQºà`$#!332&'+32767654òh9N1 4:-:0=þf¹®‰==k&¦¶T-"Nž"KexmJA `þTÙ5þ¤7FQqÿãç{"632!!#"'3 76'&´¦¡šæ\" þ4Ô žUxž“½ ”‡—”{F¬V´AWô^3VªH¬žºÿãZ{%4/&#"3276%67632 '&'##3˜jMm³S9oQ³T9üÂr†ó󆉉‡þ‡xå¹¹/ßv@¢m¡êsS¢mûÔ‚œœ›ýÖ›œœ‰áþ`þ)qß`&;#"&'&74567676763!##"'#²=j¦¶U-"N?,N2 4:Lˆ™¸® 0êÎ…5\6GRâ8gvoJ A"û ¬þQÿÿqÿãf&;Cáÿÿqÿã&;jÿîýÏd%+532765# ##5353!!676Ýy`QâkV—&3øþ¿¹Ì̹lþ”U‡C! þRýÃr`›2B†à=þžýáœjjœþJ†.ÿÿºžf&9v qÿãç{2&#"!!327# '&76¤¦¡šæ\" Ìþ, žUxž“¼þ󔆗•{F¬V´AWô^3VªH­žoÿãÇ{+2&# #"'52327654'&/&'&5476%Ô’š¶þî1.—?ÅPT¬u®®Ûï À935¨@ÂH9È`{<®P¨?%##+INнX=F¾c\",L'*#)YGrØM%Áy3#3#Á¸¸¸¸`û éÿÿÿôF&ÓjÿÿÛþVy 3+5327653#Á¸zPŽF1h(%¸¸`ûŒÿ[;œ13–(éÿî;` )6/&+3276%+532765!32#š4/8NNaCÿÿFþV‰H&þXIºÿd` %#!35!#s¹y¹xº¸¨û ðð`üXÿÿD¦à'C¸z:ÿÿV5k'C ZÿÿD¦â'v5|:ÿÿV5m'v†ZÿÿD¦4'jõ$:ÿÿV5¿'jEÿ¯Zÿÿÿüçà'C5z<ÿÿ=þVk&C!\éy¶©é/Æ1üì0!!üyéyµ©/Ì1Ôì0!!øy®éÓÕ@ žÜüÔÌ1ôì0#53Ó¤Ré­?þÁ²þ×Õ@ žqÜìÔÌ1ôì03#Ó¤RÕ˜þÁ?®ÿÓþ@ žƒÔìÔÌ1üì0%3#Ó¤Rþ¬þÀ@®émÕ '@ž   ÜüÌÔÌþÔÎ1ô<ì20#53#53Ó¤RšÓ¤Ré­?þÁ­­?þÁ®émÕ '@ ž  ÜìÔÌÜîÔÎ1ô<ì203#%3#Ó¤RšÓ¤RÕ¬þÀ@¬¬þÀ@®ÿmþ '@ žƒ   ÜìÔÌÜîÔÎ1ü<ì20%3#%3#šÓ¤RþfÓ¤Rþ¬þÀ@¬¬þÀ@9ÿ;ÇÕ '@¹  YW Y Ô<ìü<ì1äôÔ<ì203!!#!5!¨°oþ‘°þ‘oÕþ\™û£]™9ÿ;ÇÕ>@ ¹¹  ÂY W Y Ô<<ì2ü<<ì21äôÄ2Ä2î2î20%!#!5!!5!3!!!Çþ‘°þ‘oþ‘o°oþ‘oßþ\¤š™¤þ\™ýá3Ñ…! · Ç \ Ôì1Ôì04632#"&3­~|«¬}}¬ú|««|}¬¬ìþ #@ƒ   ÔüÔìÔì1/<<ì220%3#%3#%3#–ÔÔ©ÕÕú­ÕÕþþþþþþqÿã Lð #'3?K®@D$%&%&'$'B@’ .’(’F’4 :&Œ$‘L%IC'1+C =  1 =I 7+ ! LüäìÔÄìäîîöîî991ä2ô<<ä2ì2îöîî20KSXííY"K°TK° T[K° T[K° T[K° T[K°T[X½L@LLÿÀ878Y"32654&'2#"&5462#"&546!3#"32654&2#"&546"32654&ôWddWUccUžº» º»ùtž¼»ŸŸ¹º% üZ VcbWWcd²žº» º»ŸWccWUcc‘”„‚••‚ƒ•Ü»»ÛÛ»¼ÛàÛ»½ÚÛ¼ºÜùóŽ•‚„””„–ýŸÜ»»ÛÛ»¼Û”„‚••‚ƒ•žs#G@%èèèèBç¦onüì291ôì90KSXííííY" 5sþÓ-þ+#¿þôþô¿¢RÁ–#I@&èèèèBç¦opü<ì91ôì90KSXííííY"5 ÁÕþ+-þÓ#þ^Rþ^¿  ÿãð1@: Ó"+Ó ¡®•¡®•/‘Œ) 2+"!)#&  , & &*!/<ÔÄ2üÄÄ99999999991Ä2äôìôìîöîî2Ý<î20K° TK° T[K° T[K°T[K°T[K°T[X½2ÿÀ22@878Y@z  1Ti lnooooiko o!o"o#n$l%i'i-ŸŸŸ Ÿ Ÿ Ÿ Ÿ ŸŸŸŸŸŸ–Ÿ Ÿ!Ÿ"Ÿ#Ÿ$Ÿ%Ÿ&Ÿ'Ÿ(Ÿ)Ÿ*Ÿ+Ÿ,-2   USjg ]].#"!!!!3267#"#734&5465#7332[©fÊ A7ýæ¾8þŠ Êf©[Y¹`íþË(Ó7‹Â7œ(6ìb¹bÕiZÈ»{.# .{»ÊZiÓHH"{/ #/{"G'“FÕ >@!  É  b b cbcÔäüäÔìÔì91ô<<ì2Ô<<Ä903#######5J®¤ªqÃ7ËrqËrÉÕÿý¾äþÑ/þB^þä^hÿçÁ-)b@'! '!Õ* $$*ÔÌÜÌ9991äÌÜÌÎÎ990K° TK° T[K°T[K°T[K°T[X½*@**ÿÀ878Y>54&#"#"&54632#"&54324&#"32ôIH7$$0e´ÖþßÕ˜ËÝ¢e‚ WOmVPmmW£Kƒt,>bþÊþùþ±þFØ£Æ[àt}þþÏt{ÿú`Á8@ÔÌ91/ÄÌ90@cmpxyvn]] !3!¬þ^DýïàCúšîûÄú?œþwqÁ@×Ö¯ggÔìÔì1üìì20!#!#œÕðý ïÁø¶}ùƒþw;Á ]@    ÔÄ91ÄÔÌÎ990@0QVPZ spvupz €€ Z pp{ t €€ ]]!! !!5 7êüA ýJïúÞÕýIÁÁý3ýÀ•!ãÙ-Û×¶œÔÄ1Ôì0!!Ùúþתþ‰ÿãÍð+@BŒ‘ÔÌ1ää0KSXííY"3#- ü\ ðùóÛH®F·ƒÔì1Ôì03#ÛÓÓFþ=ÿ×} *@    ÔÌ91ÔÌÄ903##'%\½sý®BþÁ}}`ùºs-Pbý;ÝÝÏî /ÿ@- !$'!!0 $*0ÔÄÔÄ99991ÔÄÔÄÀ9990@¾     $$$   $$ $ ***///***55500055 5 :::???:::EEE@@@EE E JJJOOOJJJV´° °!°"°&°'°(´)]]32654&#".#"326#"&54632>32#"&“1†Te€vYR…Ä1…UfvYR†F^ˆº§†_™HDža†¼§†^•/XZ‡ie†‡7XX„je†ˆ‡ߦ¯Ø~ŠŠƒá§¯Öw/þú%&@ Û Ûܱ& iji&Üìüì1üìÜäÞä026732#"&'.#" #"&546327j ¾ÊPd@7*8  k½ÄOeD=!0 þú°l9¼TA6?&#Hý•Ánþ!þbSA8?SÙÛô;?@.9*-" *œ19œ"œ œ<-<Ô<Ä21ÔìÔìÜüÔìÀ9999990#"'&'&'&#"5>32326#"'&'&'&#"5>32326Ûi³an’ ›^X¬bi³an“ ›^V©gi³an’ ›^X¬bi³an“ ›^V©o³NE;=LT³NE;=KÚ²OE;=LS²NE;=KÙ'ÛÝ>@" Ïœ Ï œ  Ü<Ä291Ô<Ì2ü<ìþ<ì990!!!!!'7!5!7!Ù}®/þHÃ{üúþþ}®þÕ¶Ãý‡¢;fÕ¨ðªþÇfÓªðÙÛ¨ T@.œœœœBѧœ $# ü<ì2291/ìôì90KSXííííY" 5 !!Ûü@Àúþúþúþøþëþî²pªoüªÙÛ¨ V@/œœœœBѧœ$ # ü<<ì291/ìôì90KSXííííY"55 !5ÙúþÁAúþø°þ‘ªþ²ýǪªþ#îu"@ÔÌ91ÔÌ990 úþþôþ þ üÏüÇ9%ûÛûÓ-/J›@( ©‡¾±— ¼ Lü<Ä2Äü<Äî2991/<æ2îþîîî2990K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@0P€€€ Ðï]]#!##53546;#"3#J¹þ¹°°­³¹°cMù¹¹`û Ñü/ÑN·¯™Phc²é/J„@! © ‡— ¼   Lü<ÄÄü<Äî991/<æ2þîî2990K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@0P€ € € Ðï]!#!"!!##53546J¹þ·cM/þѹ°°®ùì{Phcü/ÑN»«ÍšÛ3#Çu™þˆ×)Ù¥@ ÎddÔüÜì1Ô<ì20K°TK°T[X½@ÿÀ878YK°TK° T[K°T[X½ÿÀ@878YK°TK°T[X½@ÿÀ878YK°TX½ÿÀ@878Y@````pppp]3#%3#^ËËþyËËÙËËËsîðö@BúÄÀ1ôÌ0KSXÉÉY"K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@ %%6FVjg //]]3#7¹ä™öþø¶Jéu@!  ÃÃúVV ÔìÔì99991ô<ìÔì2990K° TX½ÿÀ@878YK°TX½@ÿÀ878Y´ ]'.#"#4632326=3#"&ü9 $(}gV$=09" (}gT";9! 2-ev 3)dw î‹ö‰@BúÄÀ1ôÌ0KSXÉÉY"K° TX½ÿÀ@878YK°TX½@ÿÀ878Y@*$$5CUUŸŸ¯¯//]]#ÇÄ™æöþøÏî1øw@ úÔÄ91ô<Ä90K° TX½ÿÀ@878YK°TX½@ÿÀ878YK°TX½ÿÀ@878Y@ //- ]3#'#¢¼Ó‹¦¦‹øþö²²Ïî1ø†@ úÔÄ91ôÄ290K° TK° T[K° T[K° T[X½ÿÀ@878YK°TX½@ÿÀ878YK°TX½ÿÀ@878Y@ "  ]373¢Ó‹¦¦‹Óî ²²þö?œôß Ô@ Ý ÷‘ ] ÜÔ<Äì291ôüÔ<ì290K°TK°T[K°T[K°T[K° T[K° T[X½@ÿÀ878YK°TK°T[X½ÿÀ@878Y@T /9IFYi‹«»       "5GK S[ e„¥µ]] !33##5!5ÝþË5¦‡‡þbfþ]ýämººyÇ9ø j@à úVVÔìÔì1ôüÄ20K° TX½ÿÀ@878YK°TX½@ÿÀ878YK°TK°T[X½ÿÀ@878Y332673#"&Çv cSRav  Ÿø6978w{zšfÛ¶úÔÌ1ôÌ03#šÌÌÛÍ-ž˜ $ÿÓ%ÿ·*K-r294K7ÿD9ÿˆ:ÿ­;ÿš<ÿ R&YÿÉ\ÿÜ‚ÿÓƒÿÓ„ÿÓ…ÿÓ†ÿÓ”9•9–9—9˜9Ÿÿ ´&µ&¶&·&¸&¿ÿÜÁÿÜÐKìÿDôÿ $ÿÓ$ÿÜ$ÿÜ$$9$&ÿÜ$*ÿÜ$2ÿÜ$4ÿÜ$7ÿa$9ÿ}$:ÿ$<ÿa$FÿÜ$GÿÜ$HÿÜ$Iÿ·$RÿÜ$TÿÜ$WÿÜ$Yÿˆ$Zÿ­$\ÿu$mÿ·$‚9$ƒ9$„9$…9$†9$‰ÿÜ$”ÿÜ$•ÿÜ$–ÿÜ$—ÿÜ$˜ÿÜ$Ÿÿa$©ÿÜ$ªÿÜ$«ÿÜ$¬ÿÜ$­ÿÜ$´ÿÜ$µÿÜ$¶ÿÜ$·ÿÜ$¸ÿÜ$¿ÿu$Áÿu$ÄÿÜ$ÅÿÜ$ÆÿÜ$ÇÿÜ$ÉÿÜ$ÏÿÜ$ÐÿÜ$ìÿa$íÿÜ$ôÿa$sþø$tÿ$u/%&ÿÜ%*ÿÜ%2ÿÜ%6ÿÜ%9ÿÁ%:ÿ·%<ÿ%mÿÁ%}ÿÜ%‰ÿÜ%”ÿÜ%•ÿÜ%–ÿÜ%—ÿÜ%˜ÿÜ%Ÿÿ%ÄÿÜ%ÆÿÜ%ÐÿÜ%èÿÜ%êÿÜ%ôÿ%sÿ%tÿ%uÿ­&<ÿÜ&mÿÜ&}ÿÜ&ŸÿÜ&ôÿÜ&t&'$ÿÜ'9ÿÜ'<ÿ'mÿÜ'}ÿÜ'‚ÿÜ'ƒÿÜ'„ÿÜ'…ÿÜ'†ÿÜ'Ÿÿ'ôÿ'sÿÓ'tÿÉ'uÿD)þ·)ÿa)$ÿD)6ÿÜ)7ÿÜ)DÿD)Hÿ)Lÿk)Rÿ·)Uÿk)Xÿ)\ÿD)‚ÿD)ƒÿD)„ÿD)…ÿD)†ÿD)¢ÿD)£ÿD)¤ÿD)¥ÿD)¦ÿD)§ÿD)ªÿ)«ÿ)¬ÿ)­ÿ)´ÿ·)µÿ·)¶ÿ·)·ÿ·)¸ÿ·)»ÿ)¼ÿ)½ÿ)¾ÿ)¿ÿD)ÁÿD)Ïÿ)ãÿk)åÿk)èÿÜ)êÿÜ)ìÿÜ)ïÿ)sÿÓ)uþˆ*7ÿ·*<ÿš*mÿÜ*}ÿÜ*Ÿÿš*ìÿ·*ôÿš*sÿÓ*tÿÓ*uÿÉ+ÿÜ+sÿ·+tÿÁ+uÿ·-ÿ·-$ÿÜ-mÿÜ-}ÿÜ-‚ÿÜ-ƒÿÜ-„ÿÜ-…ÿÜ-†ÿÜ-sÿ·-tÿÁ-uÿ.ÿ).$ÿÜ.&ÿ.2ÿ.7ÿa.8ÿÉ.:ÿ·.<ÿ·.DÿÜ.Hÿš.Rÿš.Xÿš.\ÿk.mÿ}.‚ÿÜ.ƒÿÜ.„ÿÜ.…ÿÜ.†ÿÜ.‰ÿ.”ÿ.•ÿ.–ÿ.—ÿ.˜ÿ.›ÿÉ.œÿÉ.ÿÉ.žÿÉ.Ÿÿ·.¢ÿÜ.£ÿÜ.¤ÿÜ.¥ÿÜ.¦ÿÜ.§ÿÜ.ªÿš.«ÿš.¬ÿš.­ÿš.´ÿš.µÿš.¶ÿš.·ÿš.¸ÿš.»ÿš.¼ÿš.½ÿš.¾ÿš.¿ÿk.Áÿk.Äÿ.Æÿ.Ïÿš.ìÿa.îÿÉ.ïÿš.ôÿ·.sÿÁ.tÿÁ/ÿÜ/$//2ÿ·/7þæ/8ÿš/9ÿ/:ÿD/<þð/HÿÜ/RÿÜ/XÿÜ/\ÿD/‚//ƒ//„//…//†//”ÿ·/•ÿ·/–ÿ·/—ÿ·/˜ÿ·/›ÿš/œÿš/ÿš/žÿš/Ÿþð/ªÿÜ/«ÿÜ/¬ÿÜ/­ÿÜ/´ÿÜ/µÿÜ/¶ÿÜ/·ÿÜ/¸ÿÜ/»ÿÜ/¼ÿÜ/½ÿÜ/¾ÿÜ/¿ÿD/ÁÿD/ÏÿÜ/ìþæ/îÿš/ïÿÜ/ôþð/sþa/týæ292ÿ­2ÿÜ2$ÿÜ29ÿÜ2;ÿ}2<ÿ2mÿÜ2‚ÿÜ2ƒÿÜ2„ÿÜ2…ÿÜ2†ÿÜ2Ÿÿ2ôÿ2sÿÓ2tÿÜ2uÿD3ÿÓ3þÁ3$ÿ}3<ÿÓ3Dÿ¤3Hÿ·3LÿÓ3QÿÜ3Rÿ·3UÿÜ3VÿÜ3XÿÜ3mÿÜ3‚ÿ}3ƒÿ}3„ÿ}3…ÿ}3†ÿ}3ŸÿÓ3¢ÿ¤3£ÿ¤3¤ÿ¤3¥ÿ¤3¦ÿ¤3§ÿ¤3ªÿ·3«ÿ·3¬ÿ·3­ÿ·3³ÿÜ3´ÿ·3µÿ·3¶ÿ·3·ÿ·3¸ÿ·3»ÿÜ3¼ÿÜ3½ÿÜ3¾ÿÜ3Ïÿ·3ßÿÜ3ãÿÜ3åÿÜ3éÿÜ3ëÿÜ3ïÿÜ3ôÿÓ3s&3t&3uþ·494sÿÓ4tÿÜ4uÿ}5ÿ­5ÿ·5ÿÁ5$ÿ­5&ÿš57ÿk59ÿ5:ÿ­5<ÿ}5DÿÓ5Hÿ¤5Rÿ¤5Xÿ¤5\ÿ5mÿ5}ÿÜ5‚ÿ­5ƒÿ­5„ÿ­5…ÿ­5†ÿ­5‰ÿš5Ÿÿ}5¢ÿÓ5£ÿÓ5¤ÿÓ5¥ÿÓ5¦ÿÓ5§ÿÓ5ªÿ¤5«ÿ¤5¬ÿ¤5­ÿ¤5´ÿ¤5µÿ¤5¶ÿ¤5·ÿ¤5¸ÿ¤5»ÿ¤5¼ÿ¤5½ÿ¤5¾ÿ¤5¿ÿ5Áÿ5Äÿš5Æÿš5Ïÿ¤5ìÿk5ïÿ¤5ôÿ}5sÿk5tÿ}5uÿÜ6$&6‚&6ƒ&6„&6…&6†&7ÿD7ÿ 7ÿ7$ÿa7&ÿˆ77ÿÜ7Dþ­7Fþ¤7Hþ¤7LÿÁ7Rþ¤7UþÓ7Vþ­7XþÉ7Zþ­7\þÁ7mÿD7}ÿ7‚ÿa7ƒÿa7„ÿa7…ÿa7†ÿa7‰ÿˆ7¢þ­7£þ­7¤þ­7¥þ­7¦þ­7§þ­7©þ¤7ªþ¤7«þ¤7¬þ¤7­þ¤7´þ¤7µþ¤7¶þ¤7·þ¤7¸þ¤7»þÉ7¼þÉ7½þÉ7¾þÉ7¿þÁ7ÁþÁ7Äÿˆ7Åþ¤7Æÿˆ7Çþ¤7Ïþ¤7ãþÓ7åþÓ7éþ­7ëþ­7ìÿÜ7ïþÉ7tÿÓ7uþø8=ÿÜ8ùÿÜ9ÿˆ9þø9ÿY9$ÿ}92ÿÜ9Dÿa9Hÿa9LÿÓ9Rÿa9Xÿu9\ÿÉ9mÿN9}ÿ9‚ÿ}9ƒÿ}9„ÿ}9…ÿ}9†ÿ}9”ÿÜ9•ÿÜ9–ÿÜ9—ÿÜ9˜ÿÜ9¢ÿa9£ÿa9¤ÿa9¥ÿa9¦ÿa9§ÿa9ªÿa9«ÿa9¬ÿa9­ÿa9´ÿa9µÿa9¶ÿa9·ÿa9¸ÿa9»ÿu9¼ÿu9½ÿu9¾ÿu9¿ÿÉ9ÁÿÉ9Ïÿa9ïÿu9uþæ:ÿ­:ÿ:ÿˆ:$ÿ:Dÿ}:Hÿˆ:LÿÓ:Rÿˆ:Uÿ¤:Xÿ·:\ÿÜ:mÿ:}ÿÜ:‚ÿ:ƒÿ:„ÿ:…ÿ:†ÿ:¢ÿ}:£ÿ}:¤ÿ}:¥ÿ}:¦ÿ}:§ÿ}:ªÿˆ:«ÿˆ:¬ÿˆ:­ÿˆ:´ÿˆ:µÿˆ:¶ÿˆ:·ÿˆ:¸ÿˆ:»ÿ·:¼ÿ·:½ÿ·:¾ÿ·:¿ÿÜ:ÁÿÜ:Ïÿˆ:ãÿ¤:åÿ¤:ïÿ·:sÿÜ:uþø;ÿš;&ÿk;2ÿ};7ÿÜ;Hÿ¤;mÿ;‰ÿk;”ÿ};•ÿ};–ÿ};—ÿ};˜ÿ};ªÿ¤;«ÿ¤;¬ÿ¤;­ÿ¤;Äÿk;Æÿk;Ïÿ¤;ìÿÜ;sÿa;tÿ­;uÿÓ<ÿ <þa<þð<$ÿa<&ÿ<2ÿ<Dþæ<Hþð<Lÿ·<Rþð<Xÿ<mÿ<}ÿk<‚ÿa<ƒÿa<„ÿa<…ÿa<†ÿa<‰ÿ<”ÿ<•ÿ<–ÿ<—ÿ<˜ÿ<¢þæ<£þæ<¤þæ<¥þæ<¦þæ<§þæ<ªþð<«þð<¬þð<­þð<´þð<µþð<¶þð<·þð<¸þð<»ÿ<¼ÿ<½ÿ<¾ÿ<Äÿ<Æÿ<Ïþð<ïÿ<sÿ<tÿÜ<uþø=ÿÜ=sÿÜ=tÿÜ=uÿÜH[ÿÜIÿIÿkIÿ·IWÿÜIZÿÜI\ÿÜImÿ·I}ÿÜI¿ÿÜIÁÿÜIíÿÜIsAIuÿNDÿÜNHÿ·NRÿ·NXÿÁN\ÿ·N¢ÿÜN£ÿÜN¤ÿÜN¥ÿÜN¦ÿÜN§ÿÜNªÿ·N«ÿ·N¬ÿ·N­ÿ·N´ÿ·Nµÿ·N¶ÿ·N·ÿ·N¸ÿ·N»ÿÁN¼ÿÁN½ÿÁN¾ÿÁN¿ÿ·NÁÿ·NÏÿ·NïÿÁQsÿkQtÿQuÿ¤R&RÿÜR[ÿÁRsÿkRtÿ·Ruÿ}Uÿ}UÿDUÿÜUFÿÓUGÿÜUHÿÓUJÿÜUKÿÜUPÿÜUQÿÜURÿÓUTÿÜUUÿÜU[ÿÉUmÿ·U©ÿÓUªÿÓU«ÿÓU¬ÿÓU­ÿÓU³ÿÜU´ÿÓUµÿÓU¶ÿÓU·ÿÓU¸ÿÓUÅÿÓUÇÿÓUÉHUÏÿÓUÑÿÜUßÿÜUãÿÜUåÿÜUtVUuþÉYÿÉYÿaYÿYmÿÜY}ÿÜYtÿÜYuþðZÿDZÿZmÿÜZ}ÿÜZuÿ)[FÿÜ[HÿÁ[RÿÁ[©ÿÜ[ªÿÁ[«ÿÁ[¬ÿÁ[­ÿÁ[´ÿÁ[µÿÁ[¶ÿÁ[·ÿÁ[¸ÿÁ[ÅÿÜ[ÇÿÜ[ÏÿÁ\ÿÜ\þÜ\ÿk\mÿÜ\}ÿÜ\uþÓm%ÿÜm&ÿÜm'ÿÜm*ÿÜm-ÿÜm7ÿm9ÿm:ÿÜm<ÿkmYÿÜmZÿÜm\ÿÜmˆ—m‰ÿÜmŸÿkm¿ÿÜmÁÿÜmÄÿÜmÆÿÜmÈÿÜmÐÿÜmìÿmôÿk}$ÿ·}%ÿ·}&ÿÜ}'ÿÜ}-ÿÜ}2ÿÜ}7ÿD}9ÿN}:ÿ};ÿ}<ÿ}YÿÜ}ZÿÜ}\ÿÜ}‚ÿ·}ƒÿ·}„ÿ·}…ÿ·}†ÿ·}‰ÿÜ}”ÿÜ}•ÿÜ}–ÿÜ}—ÿÜ}˜ÿÜ}Ÿÿ}¿ÿÜ}ÁÿÜ}ÄÿÜ}ÆÿÜ}ÈÿÜ}ìÿD}ôÿ‚ÿÓ‚ÿÜ‚ÿÜ‚$9‚&ÿÜ‚*ÿÜ‚2ÿÜ‚4ÿÜ‚7ÿa‚9ÿ}‚:ÿ‚<ÿa‚FÿÜ‚GÿÜ‚HÿÜ‚Iÿ·‚RÿÜ‚TÿÜ‚WÿÜ‚Yÿˆ‚Zÿ­‚\ÿu‚mÿ·‚‚9‚ƒ9‚„9‚…9‚†9‚‰ÿÜ‚”ÿÜ‚•ÿÜ‚–ÿÜ‚—ÿÜ‚˜ÿÜ‚Ÿÿa‚©ÿÜ‚ªÿÜ‚«ÿÜ‚¬ÿÜ‚­ÿÜ‚´ÿÜ‚µÿÜ‚¶ÿÜ‚·ÿÜ‚¸ÿÜ‚¿ÿu‚Áÿu‚ÄÿÜ‚ÅÿÜ‚ÆÿÜ‚ÇÿÜ‚ÉÿÜ‚ÏÿÜ‚ÐÿÜ‚ìÿa‚íÿÜ‚ôÿa‚sþø‚tÿ‚u/ƒÿÓƒÿ܃ÿ܃$9ƒ&ÿ܃*ÿ܃2ÿ܃4ÿ܃7ÿaƒ9ÿ}ƒ:ÿƒ<ÿaƒFÿ܃Gÿ܃Hÿ܃Iÿ·ƒRÿ܃Tÿ܃Wÿ܃YÿˆƒZÿ­ƒ\ÿuƒmÿ·ƒ‚9ƒƒ9ƒ„9ƒ…9ƒ†9ƒ‰ÿ܃”ÿ܃•ÿ܃–ÿ܃—ÿ܃˜ÿ܃Ÿÿaƒ©ÿ܃ªÿ܃«ÿ܃¬ÿ܃­ÿ܃´ÿ܃µÿ܃¶ÿ܃·ÿ܃¸ÿ܃¿ÿuƒÁÿuƒÄÿ܃Åÿ܃Æÿ܃Çÿ܃Éÿ܃Ïÿ܃Ðÿ܃ìÿaƒíÿ܃ôÿaƒsþøƒtÿƒu/„ÿÓ„ÿÜ„ÿÜ„$9„&ÿÜ„*ÿÜ„2ÿÜ„4ÿÜ„7ÿa„9ÿ}„:ÿ„<ÿa„FÿÜ„GÿÜ„HÿÜ„Iÿ·„RÿÜ„TÿÜ„WÿÜ„Yÿˆ„Zÿ­„\ÿu„mÿ·„‚9„ƒ9„„9„…9„†9„‰ÿÜ„”ÿÜ„•ÿÜ„–ÿÜ„—ÿÜ„˜ÿÜ„Ÿÿa„©ÿÜ„ªÿÜ„«ÿÜ„¬ÿÜ„­ÿÜ„´ÿÜ„µÿÜ„¶ÿÜ„·ÿÜ„¸ÿÜ„¿ÿu„Áÿu„ÄÿÜ„ÅÿÜ„ÆÿÜ„ÇÿÜ„ÉÿÜ„ÏÿÜ„ÐÿÜ„ìÿa„íÿÜ„ôÿa„sþø„tÿ„u/…ÿÓ…ÿÜ…ÿÜ…$9…&ÿÜ…*ÿÜ…2ÿÜ…4ÿÜ…7ÿa…9ÿ}…:ÿ…<ÿa…FÿÜ…GÿÜ…HÿÜ…Iÿ·…RÿÜ…TÿÜ…WÿÜ…Yÿˆ…Zÿ­…\ÿu…mÿ·…‚9…ƒ9…„9……9…†9…‰ÿÜ…”ÿÜ…•ÿÜ…–ÿÜ…—ÿÜ…˜ÿÜ…Ÿÿa…©ÿÜ…ªÿÜ…«ÿÜ…¬ÿÜ…­ÿÜ…´ÿÜ…µÿÜ…¶ÿÜ…·ÿÜ…¸ÿÜ…¿ÿu…Áÿu…ÄÿÜ…ÅÿÜ…ÆÿÜ…ÇÿÜ…ÉÿÜ…ÏÿÜ…ÐÿÜ…ìÿa…íÿÜ…ôÿa…sþø…tÿ…u/†ÿÓ†ÿ܆ÿ܆$9†&ÿ܆*ÿ܆2ÿ܆4ÿ܆7ÿa†9ÿ}†:ÿ†<ÿa†Fÿ܆Gÿ܆Hÿ܆Iÿ·†Rÿ܆Tÿ܆Wÿ܆Yÿˆ†Zÿ­†\ÿu†mÿ·†‚9†ƒ9†„9†…9††9†‰ÿ܆”ÿ܆•ÿ܆–ÿ܆—ÿ܆˜ÿ܆Ÿÿa†©ÿ܆ªÿ܆«ÿ܆¬ÿ܆­ÿ܆´ÿ܆µÿ܆¶ÿ܆·ÿ܆¸ÿ܆¿ÿu†Áÿu†Äÿ܆Åÿ܆Æÿ܆Çÿ܆Éÿ܆Ïÿ܆Ðÿ܆ìÿa†íÿ܆ôÿa†sþø†tÿ†u/ˆsÿ­ˆtÿ¤ˆuÿ‰<ÿ܉mÿ܉}ÿ܉Ÿÿ܉ôÿ܉t&”9”ÿ­”ÿÜ”$ÿÜ”9ÿÜ”;ÿ}”<ÿ”mÿÜ”‚ÿÜ”ƒÿÜ”„ÿÜ”…ÿÜ”†ÿÜ”Ÿÿ”ôÿ”sÿÓ”tÿÜ”uÿD•9•ÿ­•ÿÜ•$ÿÜ•9ÿÜ•;ÿ}•<ÿ•mÿÜ•‚ÿÜ•ƒÿÜ•„ÿÜ•…ÿÜ•†ÿÜ•Ÿÿ•ôÿ•sÿÓ•tÿÜ•uÿD–9–ÿ­–ÿÜ–$ÿÜ–9ÿÜ–;ÿ}–<ÿ–mÿÜ–‚ÿÜ–ƒÿÜ–„ÿÜ–…ÿÜ–†ÿÜ–Ÿÿ–ôÿ–sÿÓ–tÿÜ–uÿD—9—ÿ­—ÿÜ—$ÿÜ—9ÿÜ—;ÿ}—<ÿ—mÿÜ—‚ÿÜ—ƒÿÜ—„ÿÜ—…ÿÜ—†ÿÜ—Ÿÿ—ôÿ—sÿÓ—tÿÜ—uÿD˜9˜ÿ­˜ÿܘ$ÿܘ9ÿܘ;ÿ}˜<ÿ˜mÿܘ‚ÿܘƒÿܘ„ÿܘ…ÿܘ†ÿܘŸÿ˜ôÿ˜sÿÓ˜tÿܘuÿD›=ÿÜ›ùÿÜœ=ÿÜœùÿÜ=ÿÜùÿÜž=ÿÜžùÿÜŸÿ ŸþaŸþðŸ$ÿaŸ&ÿŸ2ÿŸDþæŸHþðŸLÿ·ŸRþðŸXÿŸmÿŸ}ÿkŸ‚ÿaŸƒÿaŸ„ÿaŸ…ÿaŸ†ÿaŸ‰ÿŸ”ÿŸ•ÿŸ–ÿŸ—ÿŸ˜ÿŸ¢þ柣þ柤þ查þ柦þ柧þ柪þðŸ«þðŸ¬þðŸ­þðŸ´þðŸµþðŸ¶þðŸ·þðŸ¸þðŸ»ÿŸ¼ÿŸ½ÿŸ¾ÿŸÄÿŸÆÿŸÏþðŸïÿŸsÿŸtÿÜŸuþø ÿk ÿ· sÿÜ uÿD¡&¡sÿ¡tÿ¡uÿ­ª[ÿÜ«[ÿܬ[ÿÜ­[ÿܲsÿ¤²tÿ²uÿ·³sÿk³tÿ³uÿ¤´&´ÿÜ´[ÿÁ´sÿk´tÿ·´uÿ}µ&µÿܵ[ÿÁµsÿkµtÿ·µuÿ}¶&¶ÿܶ[ÿÁ¶sÿk¶tÿ·¶uÿ}·&·ÿÜ·[ÿÁ·sÿk·tÿ··uÿ}¸&¸ÿܸ[ÿÁ¸sÿk¸tÿ·¸uÿ}¿ÿÜ¿þÜ¿ÿk¿mÿÜ¿}ÿÜ¿uþÓÁÿÜÁþÜÁÿkÁmÿÜÁ}ÿÜÁuþÓÄ<ÿÜÄmÿÜÄ}ÿÜÄŸÿÜÄôÿÜÄt&Æ<ÿÜÆmÿÜÆ}ÿÜÆŸÿÜÆôÿÜÆt&È$ÿÜÈ9ÿÜÈ<ÿÈmÿÜÈ}ÿÜÈ‚ÿÜȃÿÜÈ„ÿÜÈ…ÿÜȆÿÜÈŸÿÈôÿÈsÿÓÈtÿÉÈuÿDÏ[ÿÜÐ7ÿ·Ð<ÿšÐmÿÜÐ}ÿÜПÿšÐìÿ·ÐôÿšÐsÿÓÐtÿÓÐuÿÉÔÿÜÔ$/Ô2ÿ·Ô7þæÔ8ÿšÔ9ÿÔ:ÿDÔ<þðÔHÿÜÔRÿÜÔXÿÜÔ\ÿDÔ‚/Ôƒ/Ô„/Ô…/Ô†/Ô”ÿ·Ô•ÿ·Ô–ÿ·Ô—ÿ·Ô˜ÿ·Ô›ÿšÔœÿšÔÿšÔžÿšÔŸþðÔªÿÜÔ«ÿÜÔ¬ÿÜÔ­ÿÜÔ´ÿÜÔµÿÜÔ¶ÿÜÔ·ÿÜÔ¸ÿÜÔ»ÿÜÔ¼ÿÜÔ½ÿÜÔ¾ÿÜÔ¿ÿDÔÁÿDÔÏÿÜÔìþæÔîÿšÔïÿÜÔôþðÔsþaÔtýæÖÿÜÖ$/Ö2ÿ·Ö7þæÖ8ÿšÖ9ÿÖ:ÿDÖ<þðÖHÿÜÖRÿÜÖXÿÜÖ\ÿDÖ‚/Öƒ/Ö„/Ö…/Ö†/Ö”ÿ·Ö•ÿ·Ö–ÿ·Ö—ÿ·Ö˜ÿ·Ö›ÿšÖœÿšÖÿšÖžÿšÖŸþðÖªÿÜÖ«ÿÜÖ¬ÿÜÖ­ÿÜÖ´ÿÜÖµÿÜÖ¶ÿÜÖ·ÿÜÖ¸ÿÜÖ»ÿÜÖ¼ÿÜÖ½ÿÜÖ¾ÿÜÖ¿ÿDÖÁÿDÖÏÿÜÖìþæÖîÿšÖïÿÜÖôþðÖsþaÖtýæÙOÿ?ßsÿkßtÿßuÿ¤âÿ­âÿ·âÿÁâ$ÿ­â&ÿšâ7ÿkâ9ÿâ:ÿ­â<ÿ}âDÿÓâHÿ¤âRÿ¤âXÿ¤â\ÿâmÿâ}ÿÜâ‚ÿ­âƒÿ­â„ÿ­â…ÿ­â†ÿ­â‰ÿšâŸÿ}â¢ÿÓâ£ÿÓâ¤ÿÓâ¥ÿÓâ¦ÿÓâ§ÿÓâªÿ¤â«ÿ¤â¬ÿ¤â­ÿ¤â´ÿ¤âµÿ¤â¶ÿ¤â·ÿ¤â¸ÿ¤â»ÿ¤â¼ÿ¤â½ÿ¤â¾ÿ¤â¿ÿâÁÿâÄÿšâÆÿšâÏÿ¤âìÿkâïÿ¤âôÿ}âsÿkâtÿ}âuÿÜãÿ}ãÿDãÿÜãFÿÓãGÿÜãHÿÓãJÿÜãKÿÜãPÿÜãQÿÜãRÿÓãTÿÜãUÿÜã[ÿÉãmÿ·ã©ÿÓãªÿÓã«ÿÓã¬ÿÓã­ÿÓã³ÿÜã´ÿÓãµÿÓã¶ÿÓã·ÿÓã¸ÿÓãÅÿÓãÇÿÓãÉHãÏÿÓãÑÿÜãßÿÜããÿÜãåÿÜãtVãuþÉäÿ­äÿ·äÿÁä$ÿ­ä&ÿšä7ÿkä9ÿä:ÿ­ä<ÿ}äDÿÓäHÿ¤äRÿ¤äXÿ¤ä\ÿämÿä}ÿÜä‚ÿ­äƒÿ­ä„ÿ­ä…ÿ­ä†ÿ­ä‰ÿšäŸÿ}ä¢ÿÓä£ÿÓä¤ÿÓä¥ÿÓä¦ÿÓä§ÿÓäªÿ¤ä«ÿ¤ä¬ÿ¤ä­ÿ¤ä´ÿ¤äµÿ¤ä¶ÿ¤ä·ÿ¤ä¸ÿ¤ä»ÿ¤ä¼ÿ¤ä½ÿ¤ä¾ÿ¤ä¿ÿäÁÿäÄÿšäÆÿšäÏÿ¤äìÿkäïÿ¤äôÿ}äsÿkätÿ}äuÿÜåÿ}åÿDåÿÜåFÿÓåGÿÜåHÿÓåJÿÜåKÿÜåPÿÜåQÿÜåRÿÓåTÿÜåUÿÜå[ÿÉåmÿ·å©ÿÓåªÿÓå«ÿÓå¬ÿÓå­ÿÓå³ÿÜå´ÿÓåµÿÓå¶ÿÓå·ÿÓå¸ÿÓåÅÿÓåÇÿÓåÉÿÜåÏÿÓåÑÿÜåßÿÜåãÿÜååÿÜåtVåuþÉè$&è‚&èƒ&è„&è…&è†&ê$&ê‚&êƒ&ê„&ê…&ê†&ìÿDìÿ ìÿì$ÿaì&ÿˆì7ÿÜìDþ­ìFþ¤ìHþ¤ìLÿÁìRþ¤ìUþÓìVþ­ìXþÉìZþ­ì\þÁìmÿDì}ÿì‚ÿaìƒÿaì„ÿaì…ÿaì†ÿaì‰ÿˆì¢þ­ì£þ­ì¤þ­ì¥þ­ì¦þ­ì§þ­ì©þ¤ìªþ¤ì«þ¤ì¬þ¤ì­þ¤ì´þ¤ìµþ¤ì¶þ¤ì·þ¤ì¸þ¤ì»þÉì¼þÉì½þÉì¾þÉì¿þÁìÁþÁìÄÿˆìÅþ¤ìÆÿˆìÇþ¤ìÏþ¤ìãþÓìåþÓìéþ­ìëþ­ììÿÜìïþÉìtÿÓìuþøî=ÿÜîùÿÜôÿ ôþaôþðô$ÿaô&ÿô2ÿôDþæôHþðôLÿ·ôRþðôXÿômÿô}ÿkô‚ÿaôƒÿaô„ÿaô…ÿaô†ÿaô‰ÿô”ÿô•ÿô–ÿô—ÿô˜ÿô¢þæô£þæô¤þæô¥þæô¦þæô§þæôªþðô«þðô¬þðô­þðô´þðôµþðô¶þðô·þðô¸þðô»ÿô¼ÿô½ÿô¾ÿôÄÿôÆÿôÏþðôïÿôsÿôtÿÜôuþøùÿÜùsÿÜùtÿÜùuÿÜs$þøs%ÿÁs&ÿ·s'ÿÁs)ÿÁs*ÿ·s+ÿÁs-ÿÁs.ÿÁs/ÿÁs2ÿ·s3ÿÁs4ÿ·s5ÿÁs;ÿˆs=ÿÜsIÿ·sQÿsRÿksUÿsYÿ·sZÿ·s\ÿ·s‚þøsƒþøs„þøs…þøs†þøsˆþ}s‰ÿ·s”ÿ·s•ÿ·s–ÿ·s—ÿ·s˜ÿ·s ÿÁs¡ÿÁs²ÿ·s³ÿs´ÿksµÿks¶ÿks·ÿks¸ÿks¿ÿ·sÁÿ·sÄÿ·sÆÿ·sÈÿÁsÐÿ·sÔÿÁsÖÿÁsßÿsâÿÁsãÿsäÿÁsåÿsùÿÜu$&u%ÿ·u&ÿu'ÿ·u)ÿ·u*ÿ·u+ÿ·u-/u.ÿ·u/ÿ·u2ÿu3ÿ·u4ÿu5ÿ·u7þæu9þˆu:ÿu;ÿ·u<þˆuIÿÜuQÿ·uRÿ·uUÿ·uYÿuZÿ<u\ÿu‚&uƒ&u„&u…&u†&uˆ&u‰ÿu”ÿu•ÿu–ÿu—ÿu˜ÿuŸþˆu ÿ·u¡ÿ·u²ÿ·u³ÿ·u´ÿ·uµÿ·u¶ÿ·u·ÿ·u¸ÿ·u¿ÿuÁÿuÄÿuÆÿuÈÿ·uÐÿ·uÔÿ·uÖÿ·ußÿ·uâÿ·uãÿ·uäÿ·uåÿ·uìþæuôþˆ=âÚJn}¡BÅ+`Lß 0 þWmÜ bx • ¹!  A0®ý > ÿ W W ˆ¤+’ò a ’½<¥ k!ÖO¼$uøaÍ< ~œuàN Ú J n } ¡ BÅ + `L ß 0  þWCopyright (c) 2003 by Bitstream, Inc. All Rights Reserved. DejaVu changes by Stepan Roh are in public domain Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. DejaVu changes by Stepan Roh are in public domain DejaVu SansDejaVu SansBookBookDejaVu SansDejaVu SansDejaVu SansDejaVu SansVersion Release 1.10 (DejaVu 1.4)Version Release 1.10 (DejaVu 1.4)DejaVuSansDejaVuSansBitstream Vera is a trademark of Bitstream, Inc.Bitstream Vera is a trademark of Bitstream, Inc.Bitstream Inc.Bitstream Inc.http://www.bitstream.comhttp://www.bitstream.comCopyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the wCopyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the wLigaturesLigaturesLigaturenLegatureLigaturenFractionsFractionsBreukenAll Typographic FeaturesFonctions typographiquesAlle typografischen MšglichkeitenFunzioni TipograficheAlle typografische kenmerkenCommon LigaturesLigatures UsuellesNormale LigaturenLegature pi ComuniGemeenschappelijke LigaturenDiagonal FractionsFractions en DiagonaleDiagonaler BruchFrazioni DiagonaliDiagonale breukenAll Type FeaturesToutes fonctions typographiquesAlle AuszeichnungsartenTutte le FunzioniAlle typekenmerkenÿ+š  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a¬£„…½–膎‹©¤ŠÚƒ“òó—ˆÃÞñžªõôö¢­ÉÇ®bcdËeÈÊÏÌÍÎéfÓÐѯgð‘ÖÔÕhëí‰jikmln oqprsutvwêxzy{}|¸¡~€ìîºýþÿ   øùú×  âã°±ûüäå !"#»$%&'æç¦ØáÛÜÝàÙߟ›()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ²³¶·Ä´µÅ‚‡«Æ¾¿Œ˜¨š™ï¼Ã¥’œ§”•¹ÀÁ‘’“”•–—˜™š sfthyphenAogonekaogonekDcarondcaronDcroatEogonekeogonekEcaronecaronLacutelacuteLcaronlcaronLdotldotNacutenacuteNcaronncaronRacuteracuteRcaronrcaronSacutesacuteTcarontcaronUringuring Wcircumflex wcircumflex Ycircumflex ycircumflexZacutezacute Zdotaccent zdotaccentuni0400 afii10023 afii10051 afii10052 afii10053 afii10054 afii10055 afii10056 afii10057 afii10058 afii10059 afii10060 afii10061uni040D afii10062 afii10145 afii10017 afii10018 afii10019 afii10020 afii10021 afii10022 afii10024 afii10025 afii10026 afii10027 afii10028 afii10029 afii10030 afii10031 afii10032 afii10033 afii10034 afii10035 afii10036 afii10037 afii10038 afii10039 afii10040 afii10041 afii10042 afii10043 afii10044 afii10045 afii10046 afii10047 afii10048 afii10049 afii10065 afii10066 afii10067 afii10068 afii10069 afii10070 afii10072 afii10073 afii10074 afii10075 afii10076 afii10077 afii10078 afii10079 afii10080 afii10081 afii10082 afii10083 afii10084 afii10085 afii10086 afii10087 afii10088 afii10089 afii10090 afii10091 afii10092 afii10093 afii10094 afii10095 afii10096 afii10097uni0450 afii10071 afii10099 afii10100 afii10101 afii10102 afii10103 afii10104 afii10105 afii10106 afii10107 afii10108 afii10109uni045D afii10110 afii10193WgravewgraveWacutewacute Wdieresis wdieresisYgraveygraveEuro dlLtcaronc6459c6460c6461c6462c6463c6466c6467c6468c6469 Z7ijjkpqqruvvwyzz{}~€‚‡ˆˆ‰‘’’“˜™š›Ÿ ¡¢§¨¨©±²²³¸¹º»¿ÀÀÁÁÂÃÄÉÊÍÎÒÓÓÔÙÚÝÞßàáâåæçèïðóôôõøùúûýþxyyz}~~‰ŠŠ‹Ž™ 2XDFLTlatnÿÿÿÿfracligaliga 8l  y~072 (Øy OŽLÙy/IOJ 4 "„~„~€„€ ,latnÿÿkernÊXºH: ºø¶àò$Ü&ðØòàê ¨ ^ ¼ † ˜ ž Ô F T n  4 v îtfXJ<.<V ê4~ÈÒÜæðºÌÞäêðö,F`z”®Èâü:@j0öü àrHÚôüÐâÌ#$ÿÓ%ÿ·*K-r294K7ÿD9ÿˆ:ÿ­;ÿš<ÿ R&YÿÉ\ÿÜ‚ÿÓƒÿÓ„ÿÓ…ÿÓ†ÿÓ”9•9–9—9˜9Ÿÿ ´&µ&¶&·&¸&¿ÿÜÁÿÜÐKìÿDôÿ <ÿÓÿÜÿÜ$9&ÿÜ*ÿÜ2ÿÜ4ÿÜ7ÿa9ÿ}:ÿ<ÿaFÿÜGÿÜHÿÜIÿ·RÿÜTÿÜWÿÜYÿˆZÿ­\ÿumÿ·‚9ƒ9„9…9†9‰ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿa©ÿܪÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ¿ÿuÁÿuÄÿÜÅÿÜÆÿÜÇÿÜÉÿÜÏÿÜÐÿÜìÿaíÿÜôÿasþøtÿu/&ÿÜ*ÿÜ2ÿÜ6ÿÜ9ÿÁ:ÿ·<ÿmÿÁ}ÿ܉ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿÄÿÜÆÿÜÐÿÜèÿÜêÿÜôÿsÿtÿuÿ­<ÿÜmÿÜ}ÿÜŸÿÜôÿÜt&$ÿÜ9ÿÜ<ÿmÿÜ}ÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÉuÿD/þ·ÿa$ÿD6ÿÜ7ÿÜDÿDHÿLÿkRÿ·UÿkXÿ\ÿD‚ÿDƒÿD„ÿD…ÿD†ÿD¢ÿD£ÿD¤ÿD¥ÿD¦ÿD§ÿDªÿ«ÿ¬ÿ­ÿ´ÿ·µÿ·¶ÿ··ÿ·¸ÿ·»ÿ¼ÿ½ÿ¾ÿ¿ÿDÁÿDÏÿãÿkåÿkèÿÜêÿÜìÿÜïÿsÿÓuþˆ 7ÿ·<ÿšmÿÜ}ÿÜŸÿšìÿ·ôÿšsÿÓtÿÓuÿÉÿÜsÿ·tÿÁuÿ· ÿ·$ÿÜmÿÜ}ÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜsÿ·tÿÁuÿ<ÿ)$ÿÜ&ÿ2ÿ7ÿa8ÿÉ:ÿ·<ÿ·DÿÜHÿšRÿšXÿš\ÿkmÿ}‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿ܉ÿ”ÿ•ÿ–ÿ—ÿ˜ÿ›ÿÉœÿÉÿÉžÿÉŸÿ·¢ÿÜ£ÿܤÿÜ¥ÿܦÿܧÿܪÿš«ÿš¬ÿš­ÿš´ÿšµÿš¶ÿš·ÿš¸ÿš»ÿš¼ÿš½ÿš¾ÿš¿ÿkÁÿkÄÿÆÿÏÿšìÿaîÿÉïÿšôÿ·sÿÁtÿÁ1ÿÜ$/2ÿ·7þæ8ÿš9ÿ:ÿD<þðHÿÜRÿÜXÿÜ\ÿD‚/ƒ/„/…/†/”ÿ·•ÿ·–ÿ·—ÿ·˜ÿ·›ÿšœÿšÿšžÿšŸþðªÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ»ÿܼÿܽÿܾÿÜ¿ÿDÁÿDÏÿÜìþæîÿšïÿÜôþðsþatýæ9ÿ­ÿÜ$ÿÜ9ÿÜ;ÿ}<ÿmÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÜuÿD2ÿÓþÁ$ÿ}<ÿÓDÿ¤Hÿ·LÿÓQÿÜRÿ·UÿÜVÿÜXÿÜmÿÜ‚ÿ}ƒÿ}„ÿ}…ÿ}†ÿ}ŸÿÓ¢ÿ¤£ÿ¤¤ÿ¤¥ÿ¤¦ÿ¤§ÿ¤ªÿ·«ÿ·¬ÿ·­ÿ·³ÿÜ´ÿ·µÿ·¶ÿ··ÿ·¸ÿ·»ÿܼÿܽÿܾÿÜÏÿ·ßÿÜãÿÜåÿÜéÿÜëÿÜïÿÜôÿÓs&t&uþ·9sÿÓtÿÜuÿ}5ÿ­ÿ·ÿÁ$ÿ­&ÿš7ÿk9ÿ:ÿ­<ÿ}DÿÓHÿ¤Rÿ¤Xÿ¤\ÿmÿ}ÿÜ‚ÿ­ƒÿ­„ÿ­…ÿ­†ÿ­‰ÿšŸÿ}¢ÿÓ£ÿÓ¤ÿÓ¥ÿÓ¦ÿÓ§ÿÓªÿ¤«ÿ¤¬ÿ¤­ÿ¤´ÿ¤µÿ¤¶ÿ¤·ÿ¤¸ÿ¤»ÿ¤¼ÿ¤½ÿ¤¾ÿ¤¿ÿÁÿÄÿšÆÿšÏÿ¤ìÿkïÿ¤ôÿ}sÿktÿ}uÿÜ$&‚&ƒ&„&…&†&;ÿDÿ ÿ$ÿa&ÿˆ7ÿÜDþ­Fþ¤Hþ¤LÿÁRþ¤UþÓVþ­XþÉZþ­\þÁmÿD}ÿ‚ÿaƒÿa„ÿa…ÿa†ÿa‰ÿˆ¢þ­£þ­¤þ­¥þ­¦þ­§þ­©þ¤ªþ¤«þ¤¬þ¤­þ¤´þ¤µþ¤¶þ¤·þ¤¸þ¤»þɼþɽþɾþÉ¿þÁÁþÁÄÿˆÅþ¤ÆÿˆÇþ¤Ïþ¤ãþÓåþÓéþ­ëþ­ìÿÜïþÉtÿÓuþø=ÿÜùÿÜ/ÿˆþøÿY$ÿ}2ÿÜDÿaHÿaLÿÓRÿaXÿu\ÿÉmÿN}ÿ‚ÿ}ƒÿ}„ÿ}…ÿ}†ÿ}”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜ¢ÿa£ÿa¤ÿa¥ÿa¦ÿa§ÿaªÿa«ÿa¬ÿa­ÿa´ÿaµÿa¶ÿa·ÿa¸ÿa»ÿu¼ÿu½ÿu¾ÿu¿ÿÉÁÿÉÏÿaïÿuuþæ-ÿ­ÿÿˆ$ÿDÿ}HÿˆLÿÓRÿˆUÿ¤Xÿ·\ÿÜmÿ}ÿÜ‚ÿƒÿ„ÿ…ÿ†ÿ¢ÿ}£ÿ}¤ÿ}¥ÿ}¦ÿ}§ÿ}ªÿˆ«ÿˆ¬ÿˆ­ÿˆ´ÿˆµÿˆ¶ÿˆ·ÿˆ¸ÿˆ»ÿ·¼ÿ·½ÿ·¾ÿ·¿ÿÜÁÿÜÏÿˆãÿ¤åÿ¤ïÿ·sÿÜuþøÿš&ÿk2ÿ}7ÿÜHÿ¤mÿ‰ÿk”ÿ}•ÿ}–ÿ}—ÿ}˜ÿ}ªÿ¤«ÿ¤¬ÿ¤­ÿ¤ÄÿkÆÿkÏÿ¤ìÿÜsÿatÿ­uÿÓ2ÿ þaþð$ÿa&ÿ2ÿDþæHþðLÿ·RþðXÿmÿ}ÿk‚ÿaƒÿa„ÿa…ÿa†ÿa‰ÿ”ÿ•ÿ–ÿ—ÿ˜ÿ¢þæ£þæ¤þæ¥þæ¦þæ§þæªþð«þð¬þð­þð´þðµþð¶þð·þð¸þð»ÿ¼ÿ½ÿ¾ÿÄÿÆÿÏþðïÿsÿtÿÜuþøÿÜsÿÜtÿÜuÿÜ[ÿÜ ÿÿkÿ·WÿÜZÿÜ\ÿÜmÿ·}ÿÜ¿ÿÜÁÿÜíÿÜsAuÿDÿÜHÿ·Rÿ·XÿÁ\ÿ·¢ÿÜ£ÿܤÿÜ¥ÿܦÿܧÿܪÿ·«ÿ·¬ÿ·­ÿ·´ÿ·µÿ·¶ÿ··ÿ·¸ÿ·»ÿÁ¼ÿÁ½ÿÁ¾ÿÁ¿ÿ·Áÿ·Ïÿ·ïÿÁsÿktÿuÿ¤&ÿÜ[ÿÁsÿktÿ·uÿ}$ÿ}ÿDÿÜFÿÓGÿÜHÿÓJÿÜKÿÜPÿÜQÿÜRÿÓTÿÜUÿÜ[ÿÉmÿ·©ÿÓªÿÓ«ÿÓ¬ÿÓ­ÿÓ³ÿÜ´ÿÓµÿÓ¶ÿÓ·ÿÓ¸ÿÓÅÿÓÇÿÓÉHÏÿÓÑÿÜßÿÜãÿÜåÿÜtVuþÉÿÉÿaÿmÿÜ}ÿÜtÿÜuþðÿDÿmÿÜ}ÿÜuÿ)FÿÜHÿÁRÿÁ©ÿܪÿÁ«ÿÁ¬ÿÁ­ÿÁ´ÿÁµÿÁ¶ÿÁ·ÿÁ¸ÿÁÅÿÜÇÿÜÏÿÁÿÜþÜÿkmÿÜ}ÿÜuþÓ%ÿÜ&ÿÜ'ÿÜ*ÿÜ-ÿÜ7ÿ9ÿ:ÿÜ<ÿkYÿÜZÿÜ\ÿ܈—‰ÿÜŸÿk¿ÿÜÁÿÜÄÿÜÆÿÜÈÿÜÐÿÜìÿôÿk!$ÿ·%ÿ·&ÿÜ'ÿÜ-ÿÜ2ÿÜ7ÿD9ÿN:ÿ;ÿ<ÿYÿÜZÿÜ\ÿÜ‚ÿ·ƒÿ·„ÿ·…ÿ·†ÿ·‰ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿ¿ÿÜÁÿÜÄÿÜÆÿÜÈÿÜìÿDôÿ<ÿÓÿÜÿÜ$9&ÿÜ*ÿÜ2ÿÜ4ÿÜ7ÿa9ÿ}:ÿ<ÿaFÿÜGÿÜHÿÜIÿ·RÿÜTÿÜWÿÜYÿˆZÿ­\ÿumÿ·‚9ƒ9„9…9†9‰ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿa©ÿܪÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ¿ÿuÁÿuÄÿÜÅÿÜÆÿÜÇÿÜÉÿÜÏÿÜÐÿÜìÿaíÿÜôÿasþøtÿu/<ÿÓÿÜÿÜ$9&ÿÜ*ÿÜ2ÿÜ4ÿÜ7ÿa9ÿ}:ÿ<ÿaFÿÜGÿÜHÿÜIÿ·RÿÜTÿÜWÿÜYÿˆZÿ­\ÿumÿ·‚9ƒ9„9…9†9‰ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿa©ÿܪÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ¿ÿuÁÿuÄÿÜÅÿÜÆÿÜÇÿÜÉÿÜÏÿÜÐÿÜìÿaíÿÜôÿasþøtÿu/<ÿÓÿÜÿÜ$9&ÿÜ*ÿÜ2ÿÜ4ÿÜ7ÿa9ÿ}:ÿ<ÿaFÿÜGÿÜHÿÜIÿ·RÿÜTÿÜWÿÜYÿˆZÿ­\ÿumÿ·‚9ƒ9„9…9†9‰ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿa©ÿܪÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ¿ÿuÁÿuÄÿÜÅÿÜÆÿÜÇÿÜÉÿÜÏÿÜÐÿÜìÿaíÿÜôÿasþøtÿu/<ÿÓÿÜÿÜ$9&ÿÜ*ÿÜ2ÿÜ4ÿÜ7ÿa9ÿ}:ÿ<ÿaFÿÜGÿÜHÿÜIÿ·RÿÜTÿÜWÿÜYÿˆZÿ­\ÿumÿ·‚9ƒ9„9…9†9‰ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿa©ÿܪÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ¿ÿuÁÿuÄÿÜÅÿÜÆÿÜÇÿÜÉÿÜÏÿÜÐÿÜìÿaíÿÜôÿasþøtÿu/<ÿÓÿÜÿÜ$9&ÿÜ*ÿÜ2ÿÜ4ÿÜ7ÿa9ÿ}:ÿ<ÿaFÿÜGÿÜHÿÜIÿ·RÿÜTÿÜWÿÜYÿˆZÿ­\ÿumÿ·‚9ƒ9„9…9†9‰ÿÜ”ÿÜ•ÿÜ–ÿÜ—ÿܘÿÜŸÿa©ÿܪÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ¿ÿuÁÿuÄÿÜÅÿÜÆÿÜÇÿÜÉÿÜÏÿÜÐÿÜìÿaíÿÜôÿasþøtÿu/sÿ­tÿ¤uÿ<ÿÜmÿÜ}ÿÜŸÿÜôÿÜt&9ÿ­ÿÜ$ÿÜ9ÿÜ;ÿ}<ÿmÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÜuÿD9ÿ­ÿÜ$ÿÜ9ÿÜ;ÿ}<ÿmÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÜuÿD9ÿ­ÿÜ$ÿÜ9ÿÜ;ÿ}<ÿmÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÜuÿD9ÿ­ÿÜ$ÿÜ9ÿÜ;ÿ}<ÿmÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÜuÿD9ÿ­ÿÜ$ÿÜ9ÿÜ;ÿ}<ÿmÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÜuÿD=ÿÜùÿÜ=ÿÜùÿÜ=ÿÜùÿÜ=ÿÜùÿÜ2ÿ þaþð$ÿa&ÿ2ÿDþæHþðLÿ·RþðXÿmÿ}ÿk‚ÿaƒÿa„ÿa…ÿa†ÿa‰ÿ”ÿ•ÿ–ÿ—ÿ˜ÿ¢þæ£þæ¤þæ¥þæ¦þæ§þæªþð«þð¬þð­þð´þðµþð¶þð·þð¸þð»ÿ¼ÿ½ÿ¾ÿÄÿÆÿÏþðïÿsÿtÿÜuþøÿkÿ·sÿÜuÿD&sÿtÿuÿ­[ÿÜ[ÿÜ[ÿÜ[ÿÜsÿ¤tÿuÿ·sÿktÿuÿ¤&ÿÜ[ÿÁsÿktÿ·uÿ}&ÿÜ[ÿÁsÿktÿ·uÿ}&ÿÜ[ÿÁsÿktÿ·uÿ}&ÿÜ[ÿÁsÿktÿ·uÿ}&ÿÜ[ÿÁsÿktÿ·uÿ}ÿÜþÜÿkmÿÜ}ÿÜuþÓÿÜþÜÿkmÿÜ}ÿÜuþÓ<ÿÜmÿÜ}ÿÜŸÿÜôÿÜt&<ÿÜmÿÜ}ÿÜŸÿÜôÿÜt&$ÿÜ9ÿÜ<ÿmÿÜ}ÿÜ‚ÿ܃ÿÜ„ÿÜ…ÿ܆ÿÜŸÿôÿsÿÓtÿÉuÿD[ÿÜ 7ÿ·<ÿšmÿÜ}ÿÜŸÿšìÿ·ôÿšsÿÓtÿÓuÿÉ1ÿÜ$/2ÿ·7þæ8ÿš9ÿ:ÿD<þðHÿÜRÿÜXÿÜ\ÿD‚/ƒ/„/…/†/”ÿ·•ÿ·–ÿ·—ÿ·˜ÿ·›ÿšœÿšÿšžÿšŸþðªÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ»ÿܼÿܽÿܾÿÜ¿ÿDÁÿDÏÿÜìþæîÿšïÿÜôþðsþatýæ1ÿÜ$/2ÿ·7þæ8ÿš9ÿ:ÿD<þðHÿÜRÿÜXÿÜ\ÿD‚/ƒ/„/…/†/”ÿ·•ÿ·–ÿ·—ÿ·˜ÿ·›ÿšœÿšÿšžÿšŸþðªÿÜ«ÿܬÿÜ­ÿÜ´ÿܵÿܶÿÜ·ÿܸÿÜ»ÿܼÿܽÿܾÿÜ¿ÿDÁÿDÏÿÜìþæîÿšïÿÜôþðsþatýæOÿ?sÿktÿuÿ¤5ÿ­ÿ·ÿÁ$ÿ­&ÿš7ÿk9ÿ:ÿ­<ÿ}DÿÓHÿ¤Rÿ¤Xÿ¤\ÿmÿ}ÿÜ‚ÿ­ƒÿ­„ÿ­…ÿ­†ÿ­‰ÿšŸÿ}¢ÿÓ£ÿÓ¤ÿÓ¥ÿÓ¦ÿÓ§ÿÓªÿ¤«ÿ¤¬ÿ¤­ÿ¤´ÿ¤µÿ¤¶ÿ¤·ÿ¤¸ÿ¤»ÿ¤¼ÿ¤½ÿ¤¾ÿ¤¿ÿÁÿÄÿšÆÿšÏÿ¤ìÿkïÿ¤ôÿ}sÿktÿ}uÿÜ$ÿ}ÿDÿÜFÿÓGÿÜHÿÓJÿÜKÿÜPÿÜQÿÜRÿÓTÿÜUÿÜ[ÿÉmÿ·©ÿÓªÿÓ«ÿÓ¬ÿÓ­ÿÓ³ÿÜ´ÿÓµÿÓ¶ÿÓ·ÿÓ¸ÿÓÅÿÓÇÿÓÉHÏÿÓÑÿÜßÿÜãÿÜåÿÜtVuþÉ5ÿ­ÿ·ÿÁ$ÿ­&ÿš7ÿk9ÿ:ÿ­<ÿ}DÿÓHÿ¤Rÿ¤Xÿ¤\ÿmÿ}ÿÜ‚ÿ­ƒÿ­„ÿ­…ÿ­†ÿ­‰ÿšŸÿ}¢ÿÓ£ÿÓ¤ÿÓ¥ÿÓ¦ÿÓ§ÿÓªÿ¤«ÿ¤¬ÿ¤­ÿ¤´ÿ¤µÿ¤¶ÿ¤·ÿ¤¸ÿ¤»ÿ¤¼ÿ¤½ÿ¤¾ÿ¤¿ÿÁÿÄÿšÆÿšÏÿ¤ìÿkïÿ¤ôÿ}sÿktÿ}uÿÜ$ÿ}ÿDÿÜFÿÓGÿÜHÿÓJÿÜKÿÜPÿÜQÿÜRÿÓTÿÜUÿÜ[ÿÉmÿ·©ÿÓªÿÓ«ÿÓ¬ÿÓ­ÿÓ³ÿÜ´ÿÓµÿÓ¶ÿÓ·ÿÓ¸ÿÓÅÿÓÇÿÓÉÿÜÏÿÓÑÿÜßÿÜãÿÜåÿÜtVuþÉ$&‚&ƒ&„&…&†&$&‚&ƒ&„&…&†&;ÿDÿ ÿ$ÿa&ÿˆ7ÿÜDþ­Fþ¤Hþ¤LÿÁRþ¤UþÓVþ­XþÉZþ­\þÁmÿD}ÿ‚ÿaƒÿa„ÿa…ÿa†ÿa‰ÿˆ¢þ­£þ­¤þ­¥þ­¦þ­§þ­©þ¤ªþ¤«þ¤¬þ¤­þ¤´þ¤µþ¤¶þ¤·þ¤¸þ¤»þɼþɽþɾþÉ¿þÁÁþÁÄÿˆÅþ¤ÆÿˆÇþ¤Ïþ¤ãþÓåþÓéþ­ëþ­ìÿÜïþÉtÿÓuþø=ÿÜùÿÜ2ÿ þaþð$ÿa&ÿ2ÿDþæHþðLÿ·RþðXÿmÿ}ÿk‚ÿaƒÿa„ÿa…ÿa†ÿa‰ÿ”ÿ•ÿ–ÿ—ÿ˜ÿ¢þæ£þæ¤þæ¥þæ¦þæ§þæªþð«þð¬þð­þð´þðµþð¶þð·þð¸þð»ÿ¼ÿ½ÿ¾ÿÄÿÆÿÏþðïÿsÿtÿÜuþøÿÜsÿÜtÿÜuÿÜ:$þø%ÿÁ&ÿ·'ÿÁ)ÿÁ*ÿ·+ÿÁ-ÿÁ.ÿÁ/ÿÁ2ÿ·3ÿÁ4ÿ·5ÿÁ;ÿˆ=ÿÜIÿ·QÿRÿkUÿYÿ·Zÿ·\ÿ·‚þøƒþø„þø…þø†þøˆþ}‰ÿ·”ÿ·•ÿ·–ÿ·—ÿ·˜ÿ· ÿÁ¡ÿÁ²ÿ·³ÿ´ÿkµÿk¶ÿk·ÿk¸ÿk¿ÿ·Áÿ·Äÿ·Æÿ·ÈÿÁÐÿ·ÔÿÁÖÿÁßÿâÿÁãÿäÿÁåÿùÿÜ?$&%ÿ·&ÿ'ÿ·)ÿ·*ÿ·+ÿ·-/.ÿ·/ÿ·2ÿ3ÿ·4ÿ5ÿ·7þæ9þˆ:ÿ;ÿ·<þˆIÿÜQÿ·Rÿ·Uÿ·YÿZÿ<\ÿ‚&ƒ&„&…&†&ˆ&‰ÿ”ÿ•ÿ–ÿ—ÿ˜ÿŸþˆ ÿ·¡ÿ·²ÿ·³ÿ·´ÿ·µÿ·¶ÿ··ÿ·¸ÿ·¿ÿÁÿÄÿÆÿÈÿ·Ðÿ·Ôÿ·Öÿ·ßÿ·âÿ·ãÿ·äÿ·åÿ·ìþæôþˆX$%&')*+-./23456789:;<=HINQRUYZ[\m}‚ƒ„…†ˆ‰”•–—˜›œžŸ ¡ª«¬­²³´µ¶·¸¿ÁÄÆÈÏÐÔÖÙßâãäåèêìîôùsu0 4À8<ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿ ÿÿÿýÿÿÿÿÿÿÿÿt `ä H\ 0/677:II<LL>OO@yyBÿÿÿÿ  €€€€     ?ÿÿ‡¿ÿÿÒ?ÿÿÒ¿ÿÿÌ?ÿÿ¸¿ÿÿ¼?ÿÿ·¿ÿÿ¾?ÿÿ¿ÿÿºØ~ŽÙ˜6^v‚ˆÿÿÿÿ€€ ?ÿÿï?ÿÿð¿ÿÿñyÀ Lì:‚¦ $&„„.ÿÿÿÿ     €€€€     €€   ?ÿÿë?ÿþ}¿ÿÿî?ÿÿì?ÿþ€¿ÿÿñ?ÿÿñ?ÿÿõ¿ÿÿô?ÿÿò?ÿÿø¿ÿÿ÷?ÿÿõ?ÿþ‰¿ÿÿø?ÿÿø?ÿÿþ¿ÿÿû~~€€usr/src/sdlBasic/share/doc/0000777000000000000000000000000010645354314014560 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/0000777000000000000000000000000010645354316016306 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/italiano/0000777000000000000000000000000010645354576020116 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/italiano/logo.jpg0000777000076500007660000002414110463127340020003 0ustar ÿØÿàJFIFGGÿÛC  !"$"$ÿÛCÿÀ>"ÿÄÿÄR !1AQRa‘"Uq“¡2Bb”Ñ#5CTV’±Á$3E²á4DFrtƒ¢ÂÒð'Ss‚•ñÿÄÿÄ3!1AQR‘"a2q¡±ÑBðá#bÁñÿÚ ?õæAÌÀÈ;ã™WÚøÀȲm›ãpÛÚ)!J VÔ¥à'%¿ʂ@ˆÖäodù!“rJt&éÔrÝñ0¬´ºåKIQP;ÈÒÆßátP Œ[ûGÇ â`¥HL6X_kã­.v¾1Ïx {G»Fù˜DwÄr¬û¸\Ç=; ªQV¤û#k?´“ AâcªR3eR¹¾"vŽª¾0a0±ôþ1ƒM´$œ°*A+Ì.t}¡L©æbÉÙ”ºCz€‹ûN¿áã™é‚´ €csbóÌ÷ ;â¥.3B*,›È òÜ‘®øE¡K( …øreëݵðÔ^•¯hVUeZÄ^ð\¤“¨9 .VŽøæÑ¾f#Ù³…Aoä°¸ï†Á×3”ç½»áȼÅíÊL8óM´§HJA'Ø#3œ­b:ÄÃÓ’uEÓdŠXm …ÄÞ-u—òTÊBËdoˆü?MmtYe6‹›ØGn ¨Rä\𜸆wô®’3bêƒUµP± ûU¯V& ÍÜcHl¡cCæ.ÂOTXjbD†çeÕvÎìÔ)J­V$ÚK59 ”¸ ’. J+ÔÇÌGóªÙÅæ…‘<Ìs*y˜ª',òiÏvc§/õi¿tc—eS¶_j½%¤„& TÄÅX×ÖͦýÑ‚šÚÏù´ß»1¶U;`ÚŽ’Ò\lq0Ró|ÌUh\mû@›]h C¤Ì)báÍ|MÃ'Ä"í‡I=·o™…ZJžA[{„UŸ-¬6œî¸w%&ÕR«.•6Ü“Ö;ÁPŠS¥Q…À…j‹ê$âævKô½$ñæ!Àq². ŠØ\û’á÷eÔ„©YlV ¿²õTz"“4@Ðb­AòƒmˆB9KVds™â¬*uoTMøˆ2ÕˆfÒË •J·­Å\§ì‰Š/Ïïi~ Œq ËŠMϸ.§©e<Ï|Rªu¼YCJgÕ\\óM(mš[I #Ú^ehI4¤ —_tÝ畽F"±-)µE–UgQÉ&=&’Yl áÄŠ¤æ'\Æ3S’4ö(d53<ŒêqBû!ÇNqR¬âÊ3}|WW<Ó*ÆÜe!$}‚+ý)ÉÉÊeTÁø‚cFÅ4Àœ7RVMÒÎßTè¥H„°?ý“ªj·¨?‡kÒõz\¼ã`§jJo¸ñ$&›²‰Ð¦÷ãÊ2Nˆç机œë[`¥Yˆ)Qß¾/¨e>ЉôN úÿ„yÏH`ÐÎõ¨r‚Dž3MŽpS6ß|G%§¬òÉ]¯¿‡8`ö¾1Ì×ѳ·HôηÈÀë­÷ÃWeP–â_ºŽñÊ ÓÛ ß߆óÂ=mžq‰ñ3ò¢H–3î úGÐls1&eˆú_®R%DÅf¨á¹t($žîÂ:0ª‰~N£½¬$<ÔÖ-rêw†™.À)0عŠÏúY7÷t~r]5AZÀJR.IÜ"•9ްª0̔ɨLKº–”ÔºJ”¥oG¸òMG<÷Z ê~¦iŠÿk&þbÉÎÆ"ë EöÂ"ä:KÂîTU!Rfv–èp¶2É$|á¤hRò Ì2—˜R\mbéRMÁÂüJ<Tc£}ä-+ÎJÌ"SÈuu(Ù3 › ûyEŪ» )0"àƒ¾ êXy‰ù5Ë>ECCmRyˆˆ¦Ñ±lJ'¥SóNk(â¯I^ž‡¤î¦ÕF‡Yuò“}“Êmò1\LûÍ$ÊlÓ ÜUkˆtó9Mvf]À H׺8Í:‹k‰LíVñTû³K§áùd8ò?­}ߘßâbfc¬ÝXÆÖw¥™tå1aÃÔä+e½v¤©j¶¤÷Çjé¤SÝŸ¨¾Ü¼»I̵¬Øªléú@ú^rU[[ʶÓþÖMýÝ„ ø¯ö²oîèü"¼ÿK˜uO©ê=^¢ÐÜó,Y'Ù{@*ÈôN½î“øÅõìå»÷¬°çŵ“wGá>+ý¬›ûº?¯|ªHþÉ×½Ê*´áªð­y)âv Ûã^ÁàMzOÖ[”Þ#K ­8ÆmÅ®ùG£ð†ÊÄx¾‰ý"baš¤¢å‘•`sÒàŒIBÅ-8i3 6,ã£+ˆöƒÓ4d=.ãKEÒ´”›Žq6t—Qà p*0̇ïV5“VUY„Ý>Š ×?/ª½;Œ^g­y}L:àΙt2’”ŽöŠ–úÅ=d© T D(ïÊ¢ŸåòiIÊ›'@ˆ‰Bâ×ןHîjÕƒ"ð&4r§.¹:šB'åÎUÛ@¾ûEµ•ºñŸb +P–¬"µFFeþ™­Å]ñ+!VZP”ÍÈÍ´åµQLj¥™óRàyt4š [4· Öù0œo¾+žU`%ç=ÉŽ£\%ç=шljô´2Ì&›ïމ†Ï*#„¼çº0<ª?W›÷FʯlÛSÒZ¶íó1ݪ2•ka¼Åb^¦Û®†‰u¥ÁÄ”Þçt‹ Žñs¬)M›HE_i'??/'$ôÛ¤äiF3‡ª˜¦§š}uÓYpþE†Ú !<É1`ÅEÐfZ :¢Ûûã´jyz“(âÅÉi?Â;ð… ‘}m9«³Ô6]$FÅÕ-=A¯<x Í?`’¡ÈˆÐ›˜iB÷ŒW…ÓºS¦z É•žòoçêTóŽ6ŒK”8*-qQ‚YùI Wˆ07+!/Ögßþ­»è3Ý)©¼\íÔõ}«?£–`>Ór™œY2¥§2ƒ#"¹û1*ºbR’¥ ©&:id¦£MN½dêš•5YUi™Ép¡‹§‹¹Ò%‘`-¾ö†»LWûY7÷t~ZßHX‘0¹YŠÓN<“•M° мŽùUÀ¬Ï}ÉÏÂ:Aÿ ð?”³ro¼“ÏŠÿk&þîÂ|WûY7÷t~ò«?Xžû“Ÿ„•\ úÌ÷Üœü ÜöñïÝ÷’Yñ_ídßÝÑø@ÏŠøbÉ¿»£ðˆß•L úÌ÷Üœü |ª`NßrsðsØ<Ä×~ï¼›ÃØÂ³L®7I¯º™¶ßþ¥ð•}± µTicŒ`-×ÅøæRv›$ü½2I$!ÇP§I"äZF½JB–u|cÍÇ…WEµØj• k,Šž@#ÒÌm`nD¼‹c¦øŽ,­ ­h>šS™ ©¡5"d^躲•n']§|sªf§;t’½y¾F_o¾!•,9•+¶©H°Ùµ4òHBT”ÚÃBc lZÐÜÇ]y¾F^o‘„*2 ¨^Úëê©í–·šíëæÍék[„‰·¥{ÂT[U\v‡ŒbO ®ÑЛlóƒ¥ôpÑ2«(RÒA ߬¤æ½•b7ëÕkÃsÌI¸ƒÎ2žpÉWkã ¥+í|c^8>ÑÐJO ¼[mh»€)FÁ‹«ÙßH]Ǧ<`«—K“ *Ä©7úD àÜóÔ¢}cÛYp¬Ýa²¢P$‘¼gQ %¤<¡’$[FÍ[Eé¢JŽãèqoª-쇉C Üó†p£„Ãå;™}Ÿ„g± ¯ÝÎ9Ç#¼?ÌMÜÊF[i§Mj_gá3§‘‚,¤‚,uùÆ®-a‚›( ÂjR»?P!QUÖ£ºæµø )3L¥å­¥æ(B. ôÆüae¦T´%n ·Q×wàwó‡./[ë¦îèIÇÔVTI½‡ÀC­b¢Ñ â©Fa¢mÝkA‘*·• ¹††eW¾°¬­El:TïÀÄ…‰€2_Y×¥ÜhœÈÔGÆd…$\è3³nÌ©k&ÂæÃp‚É=fïª´Ššcgšc–úpœ,(}„¶¤éa¡µ¡ÖØ ð‚-ih•„ÄÝhR¹ƒÜ ÈI½Ï¤mkÚ8·ŠU™$‚ Ä7SêÌTIÌu0Cœ„^! Glí¥–Ý¾p#tUðž#”¤Ï9‡+NõGBÉ•qÓdº“Àc”OµwÅÒéõ¹U1?(‡Ðx)7Šá뢂ÀÄ-¨*u—ÖËN$)%I;ˆPƒØv‡Œ`s8†ŽYZa†ø!ºƒÉHî+HIx!iJ k•Åf(½§üq|ÔOúK-f<‡Ÿõ=³•$„©wôx@eÆ{Þ<üŠF)ÃÊò…T›ô”ÌËÊy·àB®| l7.¹‡åçÞobò†WQš¡¡åK¡¸Œµµ³ KEGr*õÏ­®wÄò™M¢ÎW$•9J˜`h²‚Pm¹\#?ÃuMÓB´ÎB;*Ä}†ñ 9:6jô¸ÀpMmÓç첟zÞõqU§™,z‰ Ž¥ÇÊz“"ܬ¢ R «”¢5…f%ñÌ»ææ 5—¼»WV¹ðŒ¦f•Œc†«rŒÍV&jôÇÖq¹ ã`ét¨ñéªlæ ­—ŠÍ×f`lÌ4ëºo×>´O)–Ú$u³ˆ|nÙó:±þÄï÷L>ëŸZ!ñ¬åð…_Òÿ2wû¦æ*:d3-èi%SôÐÿÈcfÄ2nMPgåšMÜv]hHæJLb]MÏPÿAÿ!Ç®}h¥Ps_ûÆ*ÊA˜ïEϽ!O——ùŽ´ÞÍW‚ó:R`™pœ£x7´';E£MM•0Yt›©Mf<ÈŽ¢˜Ûi³î'ýqp#ž¥2ìX^kh1¦@ÐnÒ Ö".nyTéÀÄáÌÚ¾k hbAµ6â’nâ#š¥6N2Fý`8pO²ÐtL­) ÀwATßVœáZ£0±1nG8äL¬D6ÂÍ•TêJ¶ò“ü`…v|#…§”j"ûŠñŽŒ-Èoï8Èã0¼ïKÕz=¬7K*&\€S¼¥o²ñ’t}NÙ&Ù§þK@I Ôž~ÞøÞŒàP AÐƒÆ ÝÃÔ%Ì™„²¦u!¥X_Ù%²eá,BÍyH™Ãó²ÊDĺ\ Ý;᮫Nt{5Ôê%çðêÏ¢»*PÿŸÂ4¡M§dBÞÍ{EZ}ÆRr—<¯ó¯¤è4³  ê:~$ª(¸ ë,”Ìi„jVX‚žñ<鸉Ùweæž]öÝO4,È«8ƒQ9ݥˬóÙˆ€8fw͵TÓS2eµ‚©t8KN)(½µæ )¥PÙIÞ6Ñ×RžSY’R¡™'x1šÔæÕIÄÕ 9Pȶí¨«ÿ‹Ô•D¿&ËÊ%ÆÂˆ<./Iså)Ü(þkG÷ÕMN ÃV¢œ¶šÆ Fl9*¡ÄïÏ?ñK¨JÑY!J¦u‚fR7)@z ÷oð‹¦¾‘%[мbbeÖ&˜S-¡æ•½*5Ùjú™áÚ+*e¦Ð–en€œ£òið‹CtkÌÓ lvRæé2Ä‹×ûñÌhÜÞð›u”ÿ ¤~ˆxAWDEÚM½‘qT¥-$•_yÎàÈ–¥Ü¨Nô¤9©wcÔÁoyGÃ\§JÔäQ²SWKªE ï5"Ö†2û,## ¥±ÆÐeNi¾*s‘”ÓYçÊcn®r¶ÓD…ùJ`¤ò!ÅZ5ü Œ)µ‰$I̾‰j£!ùwU•WE÷ƒÎ2Ü‘5Z¬ß[T¦‹Š‹ukÓkM!É™`]@ôO¢´û5õ*¨¨ÉSÌç¦*²ôš "á@ý±ÛÐñŒ"g£×[U›«×xQ{þ¸np$ÈžkŸý‹ßõÄïK»é.û~¿êoæÀ\«NqÐ’EÁŒ²Œö)¤¹$Êëm9H—Jƒ©™MÖSþ¾ûŽûƃ!>•É´´®éRsÌv¥e¸1…`MŒ’È®ø :ïÖ×;âyLm¢È.’P¹jªh*QiRÏÔ½†ÿ²¡Ï‰¹fסºD7éfsÿ-ëÖV½MÂ)ø"¨ê¤¥[A*ZÀ ðj¡jkÖò ๷´Ñ*‡¥‹]Nh/M“T­>^]Z©¶Ò“á $D¢·Ô˜#^I‡=vûÕTªå«‘xñ™K²/3)5¤õuÊ-«}  «xE›°ÂH±¸‰ú«RuIC+:Ú]lê/½'˜Š¢‹Øb¢Ü»Žm%¡WÔm¥3T¢%^NQØËŠ^ýóŸK¨'£ÚÁ¦f=\„”ï‰ð¼#H¨1[ùUº_ùˆ±®i+B»)$Xƒ¸ˆ¦ ©ö …JÏ;`ì1"Ô›HjY²@•–äž$˜¹Ëá¦òèèýؼ/ ÐŒÁ}¦—.£ô[U“á ù%¤6®­8æq¸/tEѯš«ûL¤y´ßêèýÈï›H·ù2?r,íO¡™ž«<‹·°'r¢a¤4¡tds¸¨†ÄÄ׬ Œ2Ž2ÉýÈèÃ-þ¬Ü M\sU"e¾É€Äƒ¡‡^²™O¢ìÈÐO±1c’C$ ¿³@àc¤7MIŠoÖ&—œI¸»£©˜Z@ @ÐXß[ěВ2)Gå=šÄb€K©·cD- 1™Jó…ërøG6ŽÞùùÚìÇ#)·á¿¶=b!ɃÀøA‚¦á ÀÁ•0ØE“›i~ëZ ¡cañ4)Ԫñ˾b`‹êA;ùÔ̷ÈÁÄÃD‚AÓt0#-£:ÆÄM‹äI ï£ º•)YHÌwm“2Ñç ÚàÓ–8QÖ&„º>Â4ÚVÉR‰Î7}EƶÝ>*&]bÇ‚¸AEÚò€…÷‰¥O´2¥€nµ‰ Ëìü!¬£%.íž±]¬wwœr0ÕH$2üç.®ÏÂeö~6ž²œ¶ßÎ9œoæwÐú±Â[ÊD ƒ™„ßmÅ$¥µ$%BÆñ€¹‡^‘BPý"”«K@ &äØZðE2;àA¯H‘Z{eÒ^S»,*¶½°ŠÛöÀ2fðR¹bðZå BnáAË~×]q« …[»t&ïmŸ-¸Ž1m•”“ÂMˆ<?W¿f“ ÀöGs¨p1Í¢»ã[)¸‹aRŠMÿ.@P±Kˆp†P‘a”B_AD¨…ɶø(udn1J•À- À‡˜SÉp¥J”gÿåc§Àp„ÒãªVU! l‹©Y,wÜ· ;àq™@nàë±”mlâM²ÛR!ÅEµ­ ï ¤»,&X¿f …©I½Œ:‡ì,ldøÂ*U)IRŠ@䘅ò“s/)º|›“)I±wD£ÄÃÌLë£Ïlж*°Èɤqå1º{rÓUäÔÈʦ֬ºóCƒZÈ\‹Úqâ±+B×IZæïùµ²÷“Mì¶ýòc:8ïõÙ_x yù‡=})ïDvn)Û÷üÎAúšŽ_ß@™jnx^j^FZÞšöJ#‡LMÊI²™iA•¤qíqšw†Îúì§¼Ôcœ6¥¥"¹)rl?(!× ”X¯ú‘mÓ|¨ž×ƪ$XÞ)ÏW𲦥e©ø†VuÇФ¶»”Q 3°ì¼Ë²îÖåãK(RKƒB ŒDxéÆiNÕP«hxƇf‚hµG¯¢'Ü'ÙQ3_éƒ)LuÉZ“SO¨¶Û*Ì¢®Ó¢Ú$Ìæ˜¨RU:µ,鸒MüL ¡hÓÌÝD¶«Ösò›>²Óò,ºÚó!H² 1MŸ]Ÿn & ¬ê“hÂ…ô¸îŒñª½SÍmb]ç$/ù'’/1-ãÌ6¶Ò³Z•Mø)v>C‡æºƒ qM¬ÃQ-´Ú<ܾT*¥$¤vÊ}/–’•¦I?Ö^˜3³ ù¾’˜Ï|ûÃ^½“÷‚ÇxhÿnÉûÁP8Çõ3È §š &ù yPv£0óï zöOÞ}á¯^ÉûÁ »ÉoÆiþSOj"qH+ US›|£ƒþo>ðϯdýàŠÎ<ÇÒÓ’ ¢Ðë³sc![z¥ ;Íá–†³olþ‘ÎHôS8¡þ_Ý1²yQ=¯Œa-S*¸z“K©Ë4¥ªUu6àwü"Ç)hK¥ÇªMK/r›uYT“SW:ê5ûÎŒN!©=ŒÔü¨žÔ*'µÇxkײ~ð@óó úöOÞ Ï¿¤ÎÍKNK©‰ÄwˆŽ§ùRœ²$fXš—àÓ¦ÊGóó zöOÞ}á¯^ÉûÁáî,c§êfšŠ½\¤J•¿ûH€juR?6JýäFgçÞõ쟼<úÃ~¼“÷‚'¹'oßóüù|M"B½.ýCÉó¬‰I“óA ¥^Ãt)ôµZ«£6‰x‰Œ²w3ZÆ4©j3«™ 9wœ@ômqax•Ä59¬5‰ß™mÅSçe-"ùO?‰†L*#å^,8|Œ£bYèíàf±åDö yQ=¨Ì|úÙA5¹DÜ^ÅbñÏ>ðÐþÝ“÷‚wœ»ñš•ÚˆêËRUd£¬)m¸ßÌqÇøEÏÌ3ëÙ?x y÷†½{'ïaBÜ&â%úIòÍ„7W–u#ÿY½@‡™E<—ê3ýl§T´Ú2¤Î|ûÃ^½“÷‚;çÞõ쟼»·?ü–ÿ(zM=UT•\z#€#dzèšé5òÚ‚¶TÐÜn£¬ô—‡¤Y;á:ñƒlzDŸ² 0T…V¹5UÄ3ÒêmÙÆÔ–wk‘i!f‡­RµA¦‚lX¤…$ ‰‰:Ž ”§É¹98úZa¤æZÔt2l1‹©òÔÓêsh“zX”ÙÓk‹ïYÅÕÉŒuUfƒGR×NB¯0è8y{"‡’Ü$—îùŒ»ÍtàËÓ}á¯^ÉûÁX›¤ŠD¥9b›:‰éÇKM²¬Ú÷ò…{Éï¬xGÔY—©×}a(î’Oúêb•[™™— –¥,µmâ‚ö^0 •B•…ÅVyµ­Ç¦ƒÎ‹^à’Oñ‹¹Çô7›Bœ¬°Ð¶ˆRìSÝh™Â­VgëiÞøÓ‡EFãi§9P'Z[Gýò`†vsÕ-{äÆeçÞõ쯽çæõô§½¹/O¿æGü··÷ÄЖ3Î¥ê®ÂZ]³t°Ú‚”£ßMM±d¶2  $„f>}á¾5Ù?x#ž}á¯^ÉûÁ{i$ÿ©á4ÿ*'µʉíFaçæõ쟼<ûÃ^½“÷‚ÂO~2ÙÒ¤úÑå`BŠ¥Wt‹ÜECT:´Õ ›¸‚Hö_ðŠ×H˜ÞB¡HU4™Ù™Ë ì½ ”÷‰ÊUFK S'¥P²üŠARG#¬fERŠÜÉûN¬=guwlꪂI*Ô÷Ç<¨žÔer8ö†ì²W5QjUÑ¢ÛuYH0©Çxho®ÉûÁáˆ6"rïÆiþTO?ŒR:_­¸ÅD2æR¹æÒ£Ä§]"ϼ5ëÙ?x"‘Z­/bÙ)*fw)Òkηm¢ÕÝÜ ­ ž£ÀG§‰z¬f³†ªcι›«tªå‹o•ÚøÆE‰EKÕY®Ë´ã²ª@CÉO!ÿä=kaÕ´•®±.Ñ#æ­V#Ú!©M]xZS‰jUH3Pò¢{P<¨žÔf}á¯^ÉûÁϼ5ëÙ?x îòñš5AéIövS"ý•œ˜BDÔ¤Ò+U–q¾a&â(mô†Ð•¤W$HXÖîA<ûÃ^½“÷‚1ÃÜXÊ/ê%fžÔýmjDÝ)J;€JŒsÕÄ(¡S4À¡À¡WŠÇ4a=·’ªJL8פP}"}ŠÉÄ•§XR2´^MÉ=ت‹NªxÜ맚ɺN(Jê~L©6ÛSæ)?5qe ii ë{œÄ>VéY‰ZQ/KȨ¥çSóJ¸‹ñ¶±³Ó_qÄsG:’Ñq—˜XzÍQI#œ–ZÜA¶LÝãXU´¥×él6”¥ïsΤ¯’¡B\JŠT•7ƒÞ ¬¸&IY»i–ðD§;¥jB-¸ZßKŽ)A)J‰;„H=…­?´x¦[=˜MÖZB3-H@V‰$€/ Öêм‹J’¡ÀÁ^Ö½2l•\'5Šˆð‚€f¦Ì:EJ ²œe'5”J†‡—ýò€I‚>Ý!¹`fIshBÎk ×7þ&(¨,€J…ô#ˆ†p z`þ!ƒ qp”§RGÙqµ¡„»˜Ü8ˆ Œé Ö)ñ­nQvȰ$$_„.‚Ÿ«!¿l+²:X®ºîÄÇ‹¥Iú°pP{0šYðr„¿…õ0D ¼7¡õ`zVÖW/cÈ9˜$Zg2¯µñ•}¯Œs9ä g<„·¹WÚøÀÊ¾×Æ9œò3žB4×) ±Öÿl „-Ç”r­¶å_|/œò3žB&Ò&e‰úPS*yüalçœò¶‚Ëõ3ÌxÀêG˜ñ‡Ï! XQ$‚ámѬ&²Æê‘}¶Rï0ç9ä g<„kM•#n¥ÞFðï«ñ1Ôt9‡ÐâVŠj’n Ά6Ý’y&É<“ ¼Uî>aØÒí™7ÉSKŽIRå}ÄdS¡Û»‘Šó½a÷][®Sµ­EJQQ¹'y·džI³O!âjŸÜfÙRé1™ˆ0ü³éuºka@érbùFÃH–BR”%)Àk ¤ptú;€‰»³üFñ‚S^WªØ^J£,Y›—iärX¼Pªá‡\Rü–ÕÏ"c`Îy"€<ªé¢’ 4éž"aêèg ƒ¥1& zþ¬oÄÆà[O!Ù§‡Þ*÷0l©vÌ<ô3‡}Z߉ò1‡}X†É<“džÊ`o{™¶TºL?äcz±&%h=R)o‡e$m|÷Ú5Íšyp½F,|Â)Ò+RX]£(´¸)µŠUÆ*•nŠ0¼ûÎ8º[[KëbcMyvV”ßx1ÙvvaEV*Q¹åŒi­Õ­ò’›DÅ^èc fҖ߉„þF0ß«ñ1¸Òx4ò7нÇÌÛ*]³ùÞ¬oÄÀùÃû1¿~É<“džI¼Uî>fÙR혈èoú±¿ áßV#ÄÆÛ²Oe1Ýšy;ÍnãæmÙ˜a®ŽéÔuæ’“m£Ìo‹<Þ”Ÿ’2Ó¬!æÏE¤ a¸D‹±lÄëJvµ¦CRès ¸²¡Jnç¼ÄZºÃwüØ‚€<fžB+¼Öî>bŠ4Gí˜ÈÆõb?xÀùÃ~¬GïÛöiä l“É1·Š½ÇÌ;*]&":ÃWÖ˜€8êaGú¡Â§¥ÄðQ¸¼m[$öS,¡;‘ìF&¥µcæm•.Ñ1êoDô)GÙ¦2x¼])8]éJR„¤ n ¤pt鸋»>¬o*gõîŒpåUåLMÓZqÕo7"ð•£úm&è”m”öß1Uøå‡! Õ]—)ch:@Ü d%>„–’7D‡“–ÚCв79ä"ve•,O‚)5¶²T$ÚzÛ‰ßãiÞ†p¾c–”ßïÙŠÉÞI€Š­jˆ,¬@ùÄ4©r&zÃWüÖé}P$¦RûÖÂÆânccÙ§ð€Hà œES¡cæ!ÊT¥°¬»’ª—˜e4¡b… ŠýK¢<*ñRü’Öc¼æ1¨'Nµà!R«Óø‰š7ø…æ(÷C˜l¨Ú–߉„C˜sÕˆñ1¶–ÒxæÍ<„>ó[¸ùƒcG¶b'¡¼;êÆüLpô5‡öbâœòSy‰¹9Œk»„VVð!R«ÓøIµ:mÄL=Ά0Ýô¥·ûÆ ò1‡=XßïÜ iä#›4òûÅ^ãæ •.Ù‡üŒaÏV7â`éè_ l”³ ÊJmè’ncmÙ'’`«—md$\AŠ—Õ™*]³¦ôSG§Í&jJL2êw)*1aV˜Tªåv(q9W²J‡´FŠHú)ðŽìÓÈ@8нÇÌ"1ÊfØkÈÒzœ²*>’·“öÅÞB•³@1&”ÀA”æDXh"$—7:˜B ¿Qï1ÄÈ/9ZÜÌw^ç<„ çŒ …¦Ê‘·Rï1ÅʸØÎѺ’n,aÖsÈ@ÎyC –Guwæ^ Z‚ ÔUÆu#ÏãsžBrd—R„‹«}Šù €‚Ê8Îu#{ß…·Àêg˜ñ‡Ï!9ä"v†Ë*EüÖKˆ(äoi¤6¦ÙBÂ÷uœòÀBTTNòø¦{‹,£„àd¥ñƒ(qøÀÎyÏ!éÊ¾×Æ ã;Aeëö˜îsÈ@Îy Û„Þ˜ÙJBRláxîUö¾1Ìçœò¦ôÏÿÙusr/src/sdlBasic/share/doc/sdlBasic/italiano/pattern.png0000777000076500007660000000020510463127340020517 0ustar ‰PNG  IHDR PXê pHYs  šœtIMEÔ  ®F¬Í$IDAT×c|û÷nÀÄ€fùöïÍ 'd7Í ×ø(ŠY­IEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/italiano/sdlBasic.txt0000755000076500007660000011726310637401711020632 0ustar # sdlBasic un piccolo basic per fare semplici giochi in 2d # # Questo basic al momento funziona su # linux(versioni ragionevolmente nuove) # windows(sia 9x che Nt based) # MacOsX # FreeBSD # NetBSD # MorphOS # AmigaOS # # Questo basic e' una dimostrazione lampante della forza della licenza GPL # L'interprete basic e' il wxbasic di David Cuny ("http://wxbasic.sourceforge.net") distribuito sotto licenza lGPL # le librerie Grafiche SDL ("http://www.libsdl.org")sono distribuite sotto licenza lGPL # il motore grafico e' derivato dal mini gioco aliens ("http://www.libsdl.org/projects/aliens")scritto in c e # distribuito sotto licenza lGPL # le rutine putpixel getpixel sono derivate direttamente dal tutorial delle SDL e migliorate su suggerimento di Gigi Davassi # la rutine line e stata estratta e adattata direttamente dal sorgente di Alvyn Basic con l'autorizzazione dell'autore # # Ho usato anche i sorgenti della libreria sdldraw ("http://sdl-draw.sourceforge.net/") # # Il sottoscritto non ha fatto altro che tagliare incollare e adattare sorgenti altrui distribuiti tutti sotto licenza lGPL. # Questo prodotto e' ovviamente soggetto alla licenza lGPL ed e' gratuito come tutti i programmi # sopra citati. # #_______________________________________________________________________________________________ # # sdlBasic elenco comandi e sintassi # # suggerisco di scaricare wxbasic per le istruzioni specifiche # # sezioni: # Run time # Sub and function # Control structures # Operator # Array # Strings # Maths # Files # Dirs # Data function # console output # Date and time # Memory Bank # # Screen # Graphics # File graphics input output # Image manipulation # Blitting # Sprite system # Bob system # Text draw # Print screen # Sounds and music # CD support # Video Mpeg # Keyboard # Mouse # Joystick # SDLtime # Socket #_________________________________________________________________________________________________________________________ # # note: * non funziona ** non funziona e da testare ? non funziona bene ci sono bachi non risolti -> da eliminare #_________________________________________________________________________________________________________________________ # Run Time # argomenti di run da linea di comando # --nodefaults : disabilita i parametri di default del display # --nosound : disabilita il suono # --nosocket : disabilita il supporto socket # --debug : lancia sdlBasic in modo passo passo # --version : visualizza la versione (iso date) # --license : visualizza la licenza # --copyright : visualizza copyright ( ;-) assolutamente free software ) # --help : visualizza la lista delle opzioni di avvio # const : dichiarazione di costante numerica option explicit : dichiarazione variabile obligatoria option qbasic : permette di usare le rutine dichiarandole all'inizio del file include(filename) : inclusione file sorgente esterno argc : ritorna il numero di argomenti della riga di comando argv : ritorna gli argomenti della riga di comando command[param] : ritorna gli argomenti della riga di comando command$[param] : ritorna gli argomenti della riga di comando argument$(optional n) : ritorna gli argomenti mandatia una sub/function con n=0 o senza parametri ritorna il numero argomenti ?setenv(varname,value) : carica una variabile d'ambiente nel os corrente se esiste e' sovrascritta getenv(varname) : ritorna il valore di una variabile d'ambiente *run : esegue un commando in multitasking shell : esegue un commando, e attende il termine di questo comando per proseguire l'esecuzione end : termina il programma e esce stop : ferma l'esecuzione e avvia il debug os : restituisce il nome del sistema operativo (win32 linux osx o fbsd) isfbsd : restituisce 1 se il sistema operativo usato e' FreeBSD isosx : restituisce 1 se il sistema operativo usato e' MacOSX islinux : restituisce 1 se il sistema operativo usato e' linux iswin32 : restituisce 1 se il sistema operativo usato e' windows ismos : restituisce 1 se il sistema operativo usato e' MorphOS isnetbsd : restituisce 1 se il sistema operativo usato e' NetBSD isamigaos : restituisce 1 se il sistema operativo usato e' AmigaOS # debug viene avviato con l'opzione -debug all'avvio o quando premi ctrl+c durante l'esecuzione di un programma scritto in basic # se tu premi F5 sdlbasic ripredera' la normale esecuzione # con F6 il modo passo passo # con F4 puoi interrogare lo stato di una variabile. Pe interrogare lo stato di un array devi indicare il nome senza # le parentesi quadre e dare il valore degli indici quando richiesti. #_________________________________________________________________________________________________________________________ # Sub and function declare [sub | function][name] : dichiara una subrutine/function in modo qbasic sub[name](args...) : inizia una subrutine exit sub : interrompe una subrutine end sub : termina una subrutine function[name](args...) : inizia una funzione exit function : interrompe una function end function : termina una function return[value | variable] : setta il valore di ritorno di una function (come nomefunc=x) #_________________________________________________________________________________________________________________________ # Control structures while : inizia il ciclo while exit while : interrompe il ciclo while end while : termina il ciclo while wend : termina il ciclo while continue : finisce il ciclo while poi esce if [condition expression] : il controllo di flusso if in sdlBasic ha alcune particolarita: : then : then deve essere seguito o da un : o il coice deve passare alla linea successiva else : lo stesso discorso vale per else elseif : e' supportato elseif che tuttavia si comporta come if end if : deve essere sempre presente e deve essere separato da altri comandi da a capo o : select case [condition expression] : il controllo select case permette di fare una scelta multipla in base a una condizione case : viene usato per determinare una condizione case else : viene usato come condizione di default end select : deve essere inserito alla fine del ciclo select case for[var]=[val1]to[val2][step[vals]] : il classico ciclo for-next e' implementato molto bene for each [var] in [array] : supporta anche il meno classico for each x in array attenzione riporta l'indice dell'array non il valore continue : forza l'uscita da un ciclo for next (funziona solo con for each) exit for : forza l'uscita da un ciclo for next next : la fine del ciclo end for : la fine del ciclo do 1 : inizia un ciclo do-loop loop : termina un ciclo do-loop exit do : esce da un ciclo do-loop *repeat : il ciclo repeat non e' al momento supportato *until : non supportato or : espressione logica "or" usata come condizione di flusso and : espressione logica "and" usata come condizione di flusso xor : espressione logica "xor" usata come condizione di flusso not : espressione logica "not" usata come condizione di flusso #_________________________________________________________________________________________________________________________ # Operator [+] : operatore di addizione [-] : operatore di sottrazione [*] : operatore di moltiplicazione [/] : operatore di divisione [^] : operatore di elevazione a potenza mod : operatore di resto di una divisione shl : shift left slittamento dei bit a sinistra shr : shift right slittamento dei bit a destra #_________________________________________________________________________________________________________________________ # Array dim [name][[index of array]] : dichiara un array nota: gli array usano [] come parentesi *redim [name][[index of array]] : redichiarazione di un array shared [variable] : dichiara un variable esterna in una subrutine common [variable] : dichiara variable o un array globale lbound [array] : ritorna l'indirizzo piu' basso di un array *quicksort [array] : riordina un array ubound [array] : l'indirizzo piu' alto di un array erase [array] : libera un array #_________________________________________________________________________________________________________________________ # Strings asc(char) : ritorna il valore ascii del primo carattere nella stringa char chr(v) : ritorna la stringa corrispondente al valore ascii v chr$(v) : ritorna la stringa corrispondente al valore ascii v *format() : ritorna una stringa formattata con gli argomenti inclusi *format$() : ritorna una stringa formattata con gli argomenti inclusi insert(source$,target$,position) : inserisce la stringa source nella string target alla posizione index insert$(source$,target$,position) : inserisce la stringa source nella string target alla posizione index instr(optional start,source$,target$) : ritorna la posizione in source che ha la stringa target lcase(string$) : converte la stringa in minuscolo lcase$(string$) : converte la stringa in minuscolo left(string$,number) : ritorna i number caratteri piu a sinistra nella stringa left$(string$,number) : ritorna i number caratteri piu a sinistra nella stringa len(string$) : ritorna la lunghezza della stringa length(string$) : ritorna la lunghezza della stringa ltrim(string$) : ritorna la stringa senza gli spazzi a sinistra ltrim$(string$) : ritorna la stringa senza gli spazzi a sinistra mid(string$,start,optional end) : ritorna string with chars 1..n from source mid$(string$,start,optional end) : ritorna string with chars 1..n from source replace(opt index,source$,replace$) : replace string from source with replace starting at index replace$(opt index,source$,replace$) : replace string from source with replace starting at index replacesubstr(source$,rep$) : replace substring in source with withstring ritorna the new string replacesubstr$(source$,rep$) : replace substring in source with withstring ritorna the new string reverse(string$) : reverse a string ritorna the new string reverse$(string$) : reverse a string ritorna the new string right(string$,number) : ritorna rightmost chars in string right$(string$,number) : ritorna rightmost chars in string rinstr(optional start,source$,target$) : reverse Instr function, search from end to start rtrim(string$) : right trim string rtrim$(string$) : right trim string space(n) : ritorna string with n spaces in it space$(n) : ritorna string with n spaces in it str(value) : ritorna string representation of numeric expression str$(value) : ritorna string representation of numeric expression strf(value) : converts a floating point or number value to a string strf$(value) : converts a floating point or number value to a string string(n,string$) : ritorna string m chars wide with n in it string$(n,string$) : ritorna string m chars wide with n in it tally(src$,sub$) : ritorna number of occurances of matchstring trim(string$) : trim string trim$(string$) : trim string typeof(variable) : ritorna string with datatype typeof$(variable) : ritorna string with datatype ucase(string$) : convert string to upper case ucase$(string$) : convert string to upper case val(string$) : ritorna closest numeric representation of number #_________________________________________________________________________________________________________________________ # Maths abs(value) : ritorna absolute value of number acos(value) : ritorna arccos of number asin(value) : ritorna arcsin of number atan(value) : ritorna arctan of number bin(value) : ritorna la rappresentazione binaria del numero bin$(value) : ritorna la rappresentazione binaria del numero cos(value) : ritorna cos of number exp(value) : ritorna exponential function fix(value) : truncate fractional number, rounding down towards zero floor(value) : truncate fractional number, rounding down towards zero frac(value) : ritorna fractional portion of number hex(value) : ritorna hexidecimal representation of number hex$(value) : ritorna hexidecimal representation of number int(value) : convert to 32 bit integer, truncating decimals log(value) : ritorna natural log of expression randomize(value) : reseed the random number generator rnd(optional upper) : ritorna an random number round(value) : round to nearest integer sgn(value) : ritorna sign of numeric expression sin(value) : ritorna sine of given angle in radians sqr(value) : ritorna square root - make sure it's non-negative tan(value) : ritorna tanget of given angle in radians min(value1,value2) : ritorna min number of the operands max(value1,value2) : ritorna max number of the operands bitwiseand(value1,value2) : ritorna the logic and of the operands andbit(value1,value2) : ritorna the logic and of the operands bitwiseor(value1,value2) : ritorna the logic or of the operands orbit(value1,value2) : ritorna the logic or of the operands bitwisexor(value1,value2) : ritorna the logic xor of the operands xorbit(value1,value2) : ritorna the logic xor of the operands #_________________________________________________________________________________________________________________________ # Files open[filename]for{input|output|append}as[stream]: open file stream file input #[stream] : read a line from file stream input #[stream] : read a line from file stream file output #[stream] : print a line in file stream print #[stream] : print a line in file stream close [stream] : close file stream eof(stream) : ritorna nonzero if Eof fileexists(filename) : ritorna true if the file exists filecopy(source,dest) : copy a file filemove(source,dest) : move a file filerename(filename,newname) : rename a file freefile() : ritorna the handle of the next free file kill(filename) : delete filename. filename can be then path+filename loc(stream) : ritorna position in file lof(stream) : ritorna length of file readbyte(stream) : ritorna a byte from the file rename(filename,newname) : rename file seek(stream) : seek file position/ritorna current file position writebyte(stream,byte) : write a byte in the file #_________________________________________________________________________________________________________________________ # Dirs chdir(path) : cambia directory dir dir$ : ritorna current path direxists(path) : ritorna true if directory exists dirfirst(path) : ritorna first entry in path dir dirnext : ritorna next entry in path dir mkdir(path) : create a new directory rmdir(path) : remove directory #_________________________________________________________________________________________________________________________ # Data Function data(optional 0-255 param) : legge la data read(optional pointer) : senza parametri restituisce il valore della data corrente e sposta il puntatore alla successiva: con un valore sposta il puntatore #_________________________________________________________________________________________________________________________ # Console Output print [text|variable|number] : Stampa in standard output un espressione (lo uso per il debug output) #_________________________________________________________________________________________________________________________ # Date and Time date() : ritorna la data in formato MM-DD-YYYY date$() : ritorna la data in formato MM-DD-YYYY time() : ritorna l'ora in formato HH:MM:SS time$() : ritorna l'ora in formato HH:MM:SS ticks() : ritorna il tempo trascorso dall'avvio in millesimi di secondo #_________________________________________________________________________________________________________________________ # Memory Bank # in questa release il numero di banchi e' di 256 reservebank(bank,size) : crea un banco di memoria raw (da 0 a 255) baseimage(bank,image) : collega un banco di memoria alla bitmap di un immagine caricata baseimageCC(bank,image) : collega un banco di memoria alla bitmap di un immagine caricata con la trasparenza basescreen(bank,image) : collega un banco di memoria alla bitmap di uno screen aperto basesound(bank,sound) : collega un banco di memoria con un banco degli suoni caricati freebase(bank) : scollega un banco di memoria a una image o a uno screen freebank(bank) : dealloca un banco di memoria copybank(s,d) : copia il banco s in d loadbank(filename,optional bank) : carica un file nel banco di memoria bank (se omesso il corrente ) savebank(filename,optional bank) : salva un banco di memoria in un file setbank(optional bank) : setta il banco di memoria corrente (se omesso ritorna il corrente) currentbank(optional bank) : setta il banco di memoria corrente (se omesso ritorna il corrente) sizebank(optional bank) : ritorna la dimensione del banco di memoria (se omesso il corrente) banksize(optional bank) : ritorna la dimensione del banco di memoria (se omesso il corrente) poke(optional bank,address,value) : scrive un byte nel banco di memoria all'indirizzo doke(optional bank,address,value) : scrive un valore a 16 bit nel banco di memoria all'indirizzo loke(optional bank,address,value) : scrive un valore a 32 bit nel banco di memoria all'indirizzo peek(optional bank,address) : legge un byte nel banco di memoria all'indirizzo deek(optional bank,address) : legge un valore a 16 bit nel banco di memoria all'indirizzo leek(optional bank,address) : legge un valore a 32 bit nel banco di memoria all'indirizzo memcopy(sbank,s,dbank,d,size) : copia una parte della memoria dela banco s nel banco d #_________________________________________________________________________________________________________________________ # Screen setdisplay(w,h,bpp,m) : apre lo schermo/finestra in double buffer in modo 0=fullscreen|1=window|2=resize|3=fullscreen software (temporaneo) setcaption(title) : cambia il nome della finestra display setalphachannel(v) : attiva disattiva il canale alpha delle trasparenze caption() : riporta il nome corrente della finestra display displaymode : restituisce il modo video del display displaywidth : restituisce la larghezza del display displayheight : restituisce l'altezza del display displaybpp : restituisce la profondita di colore del display screen(n) : attiva lo schermo logico n senza parametri ritorna lo schermo corrente screenz(n,z) : setta lo zorder di uno schermo se z =-1 restituisce z position corrente lastscreen : restituisce l'ultimo screen aperto directscreen : apre direttamente il display come screen(piu veloce ma gli sprite e screen offset non funzionano correttamente) screenopen(n,w,h,dx,dy,dw,dh,flag) : apre lo schermo logico n di dimensione w,h nelle coordinate dx,dy,dw,dh, del display screenclose(n) : chiude lo schermo logico n screenclone(n,s,x,y,w,h,flag) : crea una nuova entrata nello schermo s screencopy(n,x,y,w,h,nd,xd,yd) : copia una porzione di schermo da n a nd screenfade(n,t) : sfuma lo screen n in t time lavora in multitasking senza parametri rende 0 se a terminato screenfadeout(n,t) : sfuma lo screen n in t time lavora in multitasking senza parametri rende 0 se a terminato screenfadein(n,i,t) : sfuma lo screen n verso l'immagine i in t time lavora in multitasking senza parametri rende 0 se a terminato screencrossfade(n,i,t) : sfuma lo screen n verso dall'imagine correntel'immagine i in t time lavora in multitasking senza parametri rende 0 se a terminato screenalpha(n,a) : setta il parametro alpha(trasparenza) allo screen n screenlock(n) : blocca lo screen n per l'accesso diretto dai comandi grafici screenunlock(n) : sblocca lo screen n per l'accesso diretto dai comandi grafici screenrect(x,y,w,h,flag) : modifica le coordinate di output sul display dello screen corrente screenviewport(x,y,w,h,flag) : modifica le coordinate di output sul display dello screen corrente xscreenrect : restituisce la coordinata x del rettangolo di output dello screen corrente screenviewportx : restituisce la coordinata x del rettangolo di output dello screen corrente yscreenrect : restituisce la coordinata y del rettangolo di output dello screen corrente screenviewporty : restituisce la coordinata y del rettangolo di output dello screen corrente wscreenrect : restituisce la coordinata w del rettangolo di output dello screen corrente screenviewportyw : restituisce la coordinata w del rettangolo di output dello screen corrente hscreenrect : restituisce la coordinata h del rettangolo di output dello screen corrente screenviewportyh : restituisce la coordinata h del rettangolo di output dello screen corrente flagscreenrect : restituisce lo stato del flag del rettangolo di output dello screen corrente screenviewportflag : restituisce lo stato del flag del rettangolo di output dello screen corrente screenwidth : restituisce la larghezza dello screen corrente screenheight : restituisce l'altezza dello screen corrente offset (x,y) : posiziona la posiziona di visione del display sullo schermo logico corrente screenoffset (x,y) : posiziona la posiziona di visione del display sullo schermo logico corrente xoffset : restituisce la coordinata x dell' offset dello screen corrente screenoffsetx : restituisce la coordinata x dell' offset dello screen corrente yoffset : restituisce la coordinata y dell' offset dello screen corrente screenoffsety : restituisce la coordinata y dell' offset dello screen corrente cls : cancella lo schermo logico corrente screenswap : scambia lo schermo logico con quello fisico e aggiorna il bob system autoback setautoback(m) : attiva / disattiva lo screenswap automatico m=0 disattivato m>0 attende m millisecondi e performa lo screenswap m<0 esegue il comando screen swap solo se chiamato e dopo m millisecondi dualplayfield(optional m) : attiva / disattiva l'aggiornamento degli screen sopra al piano dei bob waitvbl : attende lo screenswap automatico fps(optional n) : attiva/disattiva o restituisce frame rate corrente (0/1/none) #_________________________________________________________________________________________________________________________ # Graphics rgb(r,g,b) : restituisce il colore corrente in formato Uint32 enablepalette(optional state) : abilita disabilita e verifica il palettemode nel display a 256 colori color (c,optional v) : setta il colore della paletta c con il valore v se mancante restituisce il colore c palette(optional 0-255 param) : setta l'intera paletta colorcycling(s,e,d=0|1,optional delay ) : scorre la paletta dei colori un colore avanti o indietro. Lavora solo in modo 256 colori se si setta il delay funziona in multitasking senza parametri arresta il multitasking ink(c) : seleziona il colore corrente dal formato Uint32 point(x,y) : restituisce la componente colore alla coordinata x,y getpixel(x,y) : restituisce la componente colore alla coordinata x,y dot(x,y) : scrive un punto con il colore ink alla coordinata x,y setpixel(x,y) : scrive un punto con il colore ink alla coordinata x,y putpixel(x,y) : scrive un punto con il colore ink alla coordinata x,y plot(x,y,c) : scrive un punto con il colore c alla coordinata x,y line(x,y,x1,y1) : traccia una linea box(x,y,x1,y1) : traccia un rettangolo vuoto bar(x,y,x1,y1) : traccia un rettangolo pieno rectangle(x,y,w,h,mode) : disegna un rettangolo usando w come larghezza e h come altezza il mode=0 e' il bordo 1=riempimento circle(x,y,r) : traccia un cerchio fillcircle(x,y,r) : traccia un cerchio pieno ellipse(x,y,rx,ry) : traccia un ellisse fillellipse(x,y,rx,ry) : traccia un ellisse piena paint(x,y) : riempie un area chiusa triangle(xa,ya,xb,yb,xc,yc) : disegna una triangolo pieno polyline(xa,ya,xb,yb,xc,yc,.....) : disegna il perimetro di un poligono polygon(xa,ya,xb,yb,xc,yc,.....) : disegna un poligono pieno #_________________________________________________________________________________________________________________________ # File Graphics Input Output # il numero max di images e' di 65536 #il numero max di waves e' di 1024 loadimage(filename,optional n) : carica un imagine nel banco grafico n o uno libero. ritorna n loadzipimage(zipfile,filename,opt n) : carica un imagine nel banco grafico n o uno libero. ritorna n saveimage(filename,n) : salva il banco n nel file grafico (deve essere .bmp) loadsound(filename,n) : carica in un banco un file wav loadzipsound(zipfile,filename,opt n) : carica in un banco un file wav ?savesound(filename,n) : salva in un banco un file wav loadmusic(filename) : carica in un banco un file xm mod #_________________________________________________________________________________________________________________________ # Image Manipulation hotspot(n,x,y) : stabilisce il punto delle coordinate (n,0,0=alto sx | n,1,1=centro | n,2,2 =basso dx)n= image setcolorkey(c) : setta il colore trasparente con -1 (default) viene settato il colore dell'angolo sinistro in alto dell'immagine colorkey(c) : setta il colore trasparente con -1 (default) viene settato il colore dell'angolo sinistro in alto dell'immagine imageexists( n) : restituisce 1 se il banco n esiste 0 se vuoto imagewidth(n) : restituisce la larghezza dell'immagine n imageheight(n) : restituisce l'altezza dell'immagine n deleteimage(n) : cancella l'immagine n dalla memoria copyimage(s,d) : copia l'immagine s nel banco d setalpha(n,a) : setta la trasparenza nell' immagine imagealpha(n,a) : setta la trasparenza nell' immagine zoomimage(n,zoomx.zoomy) : zoomma l'immagine rotateimage(n,angle) : ruota l'immagine rotozoomimage(n,angle,zoom) : ruota e zoomma l'imagine mirrorimage(n,x,y) : riflette in verticale-orizontale l'immagine #_________________________________________________________________________________________________________________________ # Blitting blt(n,sx,sy,sw,sh,dx,dy) : copia un banco nello screen pastebob(x,y,n) : copia sullo schermo il banco n alle coordinate x,y ritagliando pasteicon(x,y,n) : copia sullo schermo il banco n alle coordinate x,y grab(n,x,y,w,h) : ritaglia dallo schermo corrente e copia nel banco #_________________________________________________________________________________________________________________________ # Sprite System #In questa implementazione ci sono 1024 sprite software che sono indipendenti degli screen spriteclip(x,y,w,h) : imposta il clipping degli sprite sprite(n,x,y,fr) : attiva o sposta il sprite n alla coordinata x,y con l'immagine fr deletesprite(n) : disattiva il sprite n xsprite(n) : restituisce la coordinata x del sprite n spritex(n) : restituisce la coordinata x del sprite n ysprite(n) : restituisce la coordinata y del sprite n spritey(n) : restituisce la coordinata y del sprite n spritewidth(n) : restituisce la larghezza del sprite n spriteheight(n) : restituisce l'altezza del sprite n frsprite(n) : restituisce il frame del sprite n spriteimage(n) : restituisce il frame del sprite n livesprite(n) : restituisce 1 se il sprite n e' "vivo" spriteexist(n) : restituisce 1 se il sprite n e' "vivo" spritehit(n, optional x) : restituisce 1 se il sprite n collide con il sprite x se -1 con tutti spritez(n,z) : cambia lo zorder dello sprite se z e' omesso o e'-1 restituisce la z position attuale lastsprite : restituisce l'ultimo sprite attivo autoupdatesprite(m) : attiva / disattiva l'aggiornamento automatico dei sprite allo screenswap updatesprite : attiva un aggiornamento manuale degli sprite allo screenswap #_________________________________________________________________________________________________________________________ # Bob System #In questa implementazione ci sono 1024 bob software che sono dipendenti degli screen e attuano #il background preserve setbob(n,scr) : assegna il bob n allo screen scr bob(n,x,y,fr) : attiva o sposta il bob n alla coordinata x,y con l'immagine fr deletebob(n) : disattiva il bob n xbob(n) : restituisce la coordinata x del bob n bobx(n) : restituisce la coordinata x del bob n ybob(n) : restituisce la coordinata y del bob n boby(n) : restituisce la coordinata y del bob n bobwidth(n) : restituisce la larghezza del bob n bobheight(n) : restituisce l'altezza del bob n frbob(n) : restituisce il frame del bob n bobimage(n) : restituisce il frame del bob n livebob(n) : restituisce 1 se il bob n e' "vivo" bobexist(n) : restituisce 1 se il bob n e' "vivo" bobhit(n,optional x) : restituisce 1 se il bob n collide con il bob x se -1 con tutti bobz(n,z) : setta lo zorder di un bob se z =-1 restituisce la z position corrente lastbob : restituisce l'ultimo bob attivo autoupdatebob(m) : attiva / disattiva l'aggiornamento automatico dei bob allo screenswap updatebob : attiva un aggiornamento manuale dei bob allo screenswap #_________________________________________________________________________________________________________________________ # Text Draw text(x,y,s,testo,optional type) : stampa il testo sul video con s size. Il tipo di render puo essere default=solid 1,Shaded 2=Blended setfont(path) : seleziona il font d'uso getfont() : restituisce il font corrente textrender(testo,s,optional n) : crea il bob n (se omesso restituisce usa e restituisce il primo libero) contenente il "testo" scritto con il font corrente con size s. Il tipo di render puo essere default=solid 1,Shaded 2=Blended #_________________________________________________________________________________________________________________________ # Print Screen pen(c) : setta il colore di print con -1 restituisce il colore corrente paper(c) : settail colore di sfondo del carattere con -1 restituisce il colore corrente fprints(testo) : stampa un testo monospace nella griglia senza il ritorna finale prints(testo) : stampa un testo monospace nella griglia locate(x,y) : muove il cursore di stampa alle coordinate x y atx : restituisce la coordinata x del cursore aty : restituisce la coordinata y del cursore curson : visualizza il cursore lampeggiante sul video alle coordinate (atx,aty) cursoff : spegne il cursore lampeggiante sul video inputs(prompt,defs) : raccoglie l'input da tastiera fino alla pressione di invio e lo restituisce zoneinputs(x,y,l,default) : raccoglie l'input da tastiera fino alla pressione nell'area specificata da x,y,l #_________________________________________________________________________________________________________________________ # Sounds and Music isenabledsound() : restituisce 1 se sdlsound e'abilitato soundenabled() : restituisce 1 se sdlsound e'abilitato soundexists( n) : restituisce 1 se il bancosonoro n esiste 0 se vuoto deletesound(n) : rimuove dalla memoria il suono n copysound(s,d) : copia il suono s in d musicexists() : restituisce 1 se la musica e' caricata 0 se vuoto playsound(n,c,optional l) : suona il suono n nel canale c l volte playfreqsound(n,c,pitch,optional l) : suona il suono n nel canale c con frequenza ricampionata a pitch l volte volumesound(c,optional v) : cambia il volume del canale c (-1 tutti) al valore v (0-128) soundvolume(c,optional v) : cambia il volume del canale c (-1 tutti) al valore v (0-128) stopsound(optional c) : ferma l'emissione del wav dal canale c (senza o -1 tutti) pausesound(optional c) : mette in pausa il canale c (senza o -1 tutti) resumesound(optional c) : sblocca dalla pausa il canale c (senza o -1 tutti) ?vumetersound(optional c) : restituisce lo stato corrente del canale c(senza o -1 tutti) sound3d(c,angle,dist) : posiziona il suono positionsound(c,angle,dist) : posiziona il suono soundChannels(n) : definisce dinamicamente il numero di canali playmusic(n) : suona il track xm,mod,ogg,mp3 n e' l numero di volte (-1 continua) positionmusic(p) : sposta l'esecuzione al secondo indicato stopmusic : termina la riproduzione del modulo musicale pausemusic : mette in pausa la musica in esecuzione resumemusic : riavvia la musica in pausa rewindmusic : riavvolge la musica corrente fademusic(t) : esegue la dissolvenza progressiva della musica volumemusic(optional v) : cambia il volume della musica al valore v (0-128) musicvolume(optional v) : cambia il volume della musica al valore v (0-128) speedmusic(v) : cambia la velocita di esecuzione della musica musicspeed(v) : cambia la velocita di esecuzione della musica #_________________________________________________________________________________________________________________________ # CD Support numdrivescd() : ritorna il numero di drive cd-rom nel sistema. countcddrives() : ritorna il numero di drive cd-rom nel sistema. namecd(drive) : ritorna un' etichetta identificatrice "human-readable", "system-dependent" del cd-rom. opencd(n,drive) : opre la connessione aun drive cd-rom per l'accesso. indrivecd(n) : ritorna 1 se il cd e' nel driver cdinserted(n) : ritorna 1 se il cd e' nel driver trackscd(n) : ritorna il numero di tracce del cd countcdtracks(n) : ritorna il numero di tracce del cd curtrackcd(n) : ritorna la traccia corrente del cd cdcurtrack(n) : ritorna la traccia corrente del cd curframecd(n) : ritorna il frame corrente del cd cdcurframe(n) : ritorna il frame corrente del cd playcd(n,s,l) : suona il cd dal frame s per l frames playtrackscd(n,trk1,fr1,ntrks,nfrs) : suona la traccia selezionata/e 0=tutte playtrackscd(n,trk1,ntrks) : suona tutta la/le traccia/e playtrackscd(n) : suona tutto il cd playcdtracks(n,trk1,fr1,ntrks,nfrs) : suona la traccia selezionata/e 0=tutte playcdtracks(n,trk1,ntrks) : suona tutta la/le traccia/e playcdtracks(n) : suona tutto il cd pausecd(n) : mette in pausa il cdrom resumecd(n) : fa riprendere il cdrom stopcd(n) : ferma il cdrom ejectcd(n) : espelle il cdrom closecd(n) : chiude la connessione al drive cd tracktypecd(n,t) : ritorna il tipo di traccia: SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...) cdtracktype(n,t) : ritorna il tipo di traccia: SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...) tracklengthcd(n,t) : ritorna la lunghezza della traccia t cdtracklength(n,t) : ritorna la lunghezza della traccia t trackoffsetcd(n,t) : ritorna l'offset dall'inizio della traccia t in frames cdtrackoffset(n,t) : ritorna l'offset dall'inizio della traccia t in frames #________________________________________________________________________________________________________________________ # Video Mpeg loadmpeg(fname,usesound) : collega il video mpeg plaympeg(optional loop) : lancia un video mpeg: Attenzione non lavora a fullscreen stopmpeg() : ferma un video in corso deletempeg() : scollega il video mpeg pausempeg() : ferma /riprende il video rewindmpeg() : riavvolge il video all'inizio seekmpeg(p) : sposta al 'bytes' lo scorrimento del video skipmpeg(s) : salta s secondi del video statusmpeg() : restituisce 1 se plaympeg lavora o altrimenti 0 #_________________________________________________________________________________________________________________________ # Keyboard key(keycode) : restitusce 1 se e' premuto il tasto keycode inkey : restituisce il codice ascii del tasto premuto waitkey(optional keycode) : attende la pressione di un tasto(0 qualsiasi) #_________________________________________________________________________________________________________________________ # Mouse xmouse : restituisce la coordinata x del mouse sul display ymouse : restituisce la coordinata y del mouse sul display mousex : restituisce la coordinata x del mouse sul display mousey : restituisce la coordinata y del mouse sul display xmousescreen(n) : restituisce la coordinata x del mouse sullo screen ymousescreen(n) : restituisce la coordinata y del mouse sullo screen mousescreenx(n) : restituisce la coordinata x del mouse sullo screen mousescreeny(n) : restituisce la coordinata y del mouse sullo screen bmouse : restituisce il pulsante premuto del mouse mousebutton : restituisce il pulsante premuto del mouse changemouse(optional n) : cambia il cursore di default oì0 con i cursoi emulati su sprite 0 image 0 (1,2,3) se n e' omesso ritorna il cursore corrente mousepointer(optional n) : cambia il cursore di default oì0 con i cursoi emulati su sprite 0 image 0 (1,2,3) se n e' omesso ritorna il cursore corrente locatemouse(x,y) : sposta il mouse alle coordinate xy placemouse(x,y) : sposta il mouse alle coordinate xy mouseshow : visualizza il cursore del mouse showmouse : visualizza il cursore del mouse mousehide : nasconde il cursore del mouse hidemouse : nasconde il cursore del mouse mousezone(x,y,w,h) : restituisce 1 se il mouse occupa questa parte dello screen #_________________________________________________________________________________________________________________________ # Joystick numjoysticks : retituisce il numero di joysticks presenti namejoystick(i) : retituisce la stringa identificativa del joystick numaxesjoystick(i) : retituisce il numero di assi del joystick numballsjoystick(i) : retituisce il numero di trackball del joystick numhatsjoystick(i) : retituisce il numero di pulsanti direzionali del joystick numbuttonsjoystick(i) : retituisce il numero di pulsanti del joysitck getaxisjoystick(i,a) : retituisce lo stato corrente di un asse gethatjoystick(i,a) : retituisce lo stato corrente di un hat getbuttonjoystick(i,a) : retituisce lo stato corrente di un pulsante xgetballjoystick(i,a) : retituisce la posizione relativa x della trackball ygetballjoystick(i,a) : retituisce la posizione relativa y della trackball joy(i) : retituisce la coordinata del joystick in formato booleano bjoy(i) : retituisce i pulsanti premuti del joystick in formato booleano joybuttons(i) : retituisce i pulsanti premuti del joystick in formato booleano fire(i) : retituisce i pulsanti premuti del joystick in formato booleano waitbjoy(optional i) : attende la pressione di un tasto del joystick #_________________________________________________________________________________________________________________________ # SDLtime wait(t) : attende il trascorrere di t millisecondi timer : restituisce il tick corrente #_________________________________________________________________________________________________________________________ # Socket isenabledsock() : ritorna 1 se sdlnet e' abilitata sock=getfreesock() : ritorna il primo sock libero nel banco sdlSocket sock=OpenSock(port) : apre una sock in ascolto su una porta. In sdlBasic ci sono 256 stream e la sintassi e' molto simile ai comandi file open close. clientsock=AcceptSock(serversock) : Accetta la connessione di un client IsServerReady(Sock) : ritorna True/False se il server manda dati     sock=ConnectSock(ServerName,port) : si connette a un server remoto *ConnectionReadySock(sock) : il server ha accettato la connessione IsClientReady(Sock) : ritorna True/False se il client manda dati CloseSock(sock) : Chiude la connessione del socket. Funziona per client e server *PeekSock(Sock, NumBytes) : legge un dato ricevuto dal socket, ma non lo cancella dal buffer ReadSock(Sock, NumBytes) : legge NumBytes bytes dal socket ReadByteSock(Sock) : legge un singolo byte       ReadLineSock(Sock) : legge una linea WriteSock(Sock, Message, NumBytes) : manda NumBytes della stringa Message al socket WriteByteSock(Sock, Byte) : manda un singolo byte WriteLineSock(Sock, Message) : manda la stringa Message getremoteip(sock) : ritorna l'indirizzo ip del client remoto connesso getremoteport(sock) : ritorna la porta di accesso del client remoto connesso ?getlocalip() : ritorna l'indirizzo ip locale(solo linux/mac) #_________________________________________________________________________________________________________________________ # # to do: # # # sprite editor # ide scritta in sdlBasic # # usr/src/sdlBasic/share/doc/sdlBasic/italiano/motd.png0000777000076500007660000001440010463127340020007 0ustar ‰PNG  IHDR‚€ðAÄýPLTE™ºŒ!" *,*%95741PDEC m&*_&m/ o9k'w1j4 w+q|.s(#l0ÇZr.y%3#n=RTQ+m7.m1,p-'t)„A"rHCh%‡7zL|!„K5m8‰3„//t75pA€,Ž72u>.{0á[,}+;s>DlK‘D>rI:z3)†+LmU”W–QŒ6>yI3„1bda5…+X9|SDzP(2žPÁ7n2Œ1žZä/U9Ž,=Œ2LO/ŽP¤\ã-pDŠ1I€\Tƒ.L€V/•8T~^molœ],“e7—3jsnªb?•2G“4lupLˆdZ2S‰^V‡b²htvs=ž9F›8UŠmN™7Kž3L”qcŒi¾k·gbp]n|~{I¦„†ƒQ­@f™wéT…\­:s–{mš|g­A[´AôgHŒd´Aìe{yŸ„x¤s“•’c¼Hj´e‹œ•nºGék o¼B~§ŒlÂFœž›vÂHó}o†®•‹¬–’©—úU’²v“·]yÈM™´n€ÌI„ÉOÿ@§©¦’¶Ÿî…¬Κ­‡ÒOô–’ÎVÒR¯±®›¾©¡»ªþ¢L“ØV«Çqµ·´ŒßN™ÕcûŸ€ØX—×r«ÅŸÞm§ÆµŸàP¢Ûc²ÕY¼¾»§Øq¦Þ^²Ê®¸Ôp¼Ök¸ÈÁ°Ï¿ªèNÿ¼a÷³ª¾àU¹Ï¿ÇÈÅ®ëZÿ¼}¶æjõ¶ËÁèT¹ØÈÀÖÈÆÖÍèÅÐÐÒÏÿÊ~ÄëtÉéxÂàÐÿËžÈÞÐÕØÔÿ˰Ðï|ÏàÙÏûRÉç×Õú]ÖûVÒäÝÐæØÍçÞÙãÞÙúfÙúnàâßÿܳÝùvÜù}ÔíÞá÷‹âù~áù…þã¬ÔîåÜîæûãÙéëçüåèÞõæÿèÔÿìÍãõîþñ×áûòòôñèúóÿôçìþöúú÷ýÿü©fÌ1tRNS@æØfbKGDˆH¤IDAT×Å›\Zç¹Çó¯I¼ÖD+Ôô[+%ÕpóÇP±#ƒ.›Ñ¹œ,+Uj£r¶µS;$®Ww½¨ ²ba^æ¿:·kWæ¨íâ²+·Ù´ci*ë–,d-míºPêêôàgÏ{ÿb"¦¤Ï'=È9ïû=Ïû<¿÷yßs²fMÌŒ$É5Ÿª‘þ‘B=<úTPÈiëñÛã+©¾=Ç{=ä§Px;}Ë–*ªç‰øøü¾iò–lAVEúa\ñ[¶Äç[o9=RúOÜ’X5^U5á¿Ç[n/¹E1AŒ=˜xGâ©pxû‰‘x8ˆøÂ1‚¸ùÛÀs¶%~ õ(âß "ÿ³ŸÝìóŽ;æIŸ\$nÂîÝÛ·o¿s‘… î,ÿÁTÌ£!ìÞ½g ‚¸³¬ëŸLß"€È¹gÖ‚ ,xë­X#þÑÔíÛÁ‘=GäܳÙ=;Åùà[`±ö9qÂÿÎ;·ïÙ}äÈsvìAÀ›o"@ˆ©:xîÝʃœ=á¡BAÝ/._Fï¼óÎOŒÅR¢®}vONpÜï¹'!ܶ㾸r»Ïß{׉Wc7O>xðàÁœ @î»ï×þˬáö{ïj]Ef1u)h“SÄr‡Ž=Håø?bya»{ñÞ{¿øÝNF p©W)Ý—F£Œ-VèF.N^[ 2ùàQd}(A…ðæ,¿ûòû/OFëó®¼rµºE£Ñ(j°¤¤¤ 1—Î`W˜G®!ï E;ææ9áoo¼öþûÑ"þz¦Âh4´jœ—„á"¡ˆÇÃd2ŒÇ¡±¥;Ó¬³±uíÁ2ðBNÎ=  ÿ÷ÁÝü/åjDÇÊJfÄeÐib\„çå >—ÎÅÊqYGWÚÄ<Ôù)0Ê99Ø“³á½÷Þ‹ôHÅZœ–\\¼wo|!O[έ8†óÙ×<}Ê"WÛÅé[ˆpêT˜BóàýÿM! vŽòäòºcñÉ¢± S¤(Ò=¨JŸö虜 ÏEð8Ø,Ã#7‡@NŽðìQÒu˜Æâ2^†ñÕ<¡bgHêýÖyEaáñÇà A7¼r‚]nÄÙã$ĤÇÚ(Hã&e$e`BžFÜIß©y…ãûQ„#q‘ÁV§I«4-)#E¤ÀöM¥iáq áTó¬æ3¬4)‰‘4¸ˆ9…Ð1øøin+Y92á”åÏ?EóÕ1üm…Aù¾01Ù[™ÊVºWÖRá+OŽ}eÞ@¼py 0€ýjE„5Sm8& +›)ÆË“O—ØüôÈ^ .D„Ù9"ÌðîŠü}»ÔqQx1èo¤—k»5L=IºôÖeKò±£ÎF#…p$Œš*â嬠tò›wµÄ³ºä£¥ûüùa3Æ·f”Õ5 ÈE Ž!a2ž #$s#M¡€…wR®Æ£%%‹qœ—ÂÍÊp­&Ý=ÂH<« ¸LŽÐ"ð€F£—h„rúRa ¯H¹0ÇÉrXýc µ,%IB s2w¦§7FŸk¬q€P È”* `Íee¼§üKEUpL+âò Še˜ˆ—’‘‘’•ÇLOTèG¯ø]ã«Ñ¨Þ8DP&§À †ÊäÉÒ%|H3`¹½ºªü»R·‚1RÙùR¥Þz…¼™§e½É0”š©x0à”¤[¹ô†È nÀÓ¨?ÿ´ljý›TgN.(()£BÁ` ¦Š†¬2¡`b©GÉ Z |òÃtÉ{ Jäum†îþÁ~*„¬²æòcÄÒUh¸>ù'ºÄ½eòm÷Ðy˜¡$ÑèPÇÕdŽ‹h #Vt)Ï<` C0C]€bAË´>Eß+oSgöN-!LÆâ©‹9ŒðÆ{€`1Š•”bÖZv™çŸËŒÁ+Bè -°°%¡¶L §5쉈 F›ìã Ž h . u«Ó¨Õ,éÊO„";Od€Š@mDÙ›ýõéTÖÞb„ec¿†ZË’%½¬Y˯D7NŽgAQ¬M“d~"BÐv÷k9zÿlU¤‹/iÖ¢Mr4Mm<+´“°5F¢¡ÍØÝmørã¼jÑ?¶ÄR×(Db¬ÈéÑô$ 0=hót âtr[Œ'÷¥A$JcĤ97§hS$²JäÍ?Üq’žÛ{˜_àêZW5 Ä”T|Z,˜Š˜ãU™"X8 ³ãïÒ¹üºÔ8V±¼¹ A` ‚ïd¬f± Ñ ¾q°#Ý) ªè@^œEßz‚ꎼY%uÚ®AÊ‚›y1n:t±Bç ¦—Œ21X¼ÃRº¬ è€ð,àüˆ¶ŽAÊÒ‰ÕNä„4Ëãq™4¶Ô¼HMHÿHS†¶ºbˆåÂ^ЫJñ)%0iöDºòêj*2Ò¯Oñèl©~Üã'Œæ'ãʬäÔªÿ’HÒ¥LMæÉC™JWÔ¤«ˆ/£KÇýK+J¸Å|&®EP¼õ¸õZd7C™ ² ;ú‡;ŽE AöecÂÏY#5NŒ<ÂÁµ(ãóͯ—çĵ‘ª­É% PKöwœÌT^ŒB¦tLYž ¢cÙ²6!è_wã& â’¹ˆ.”k»û»5"±Ba˜jåÔp*#WVSÙ c‹žßºÒ·~ˆ©1e6§¼ÅÐmQ‹2i½´’ë3GÁ\NǦ25Æ!½jdå:“HïñÌ•‰víèE½ÑŒÇdïÃàA£¡†»¹˜`†²D‹¾5¿ªUg6›u•l:_”.]0]‘ãRƾñÑlŽX(âq9éi v‘´B©ll¬ÈfòDBæÃÑ¼Ë µWä‡Ñ¨àg×Ox¤Ç Y‰ôT+ô½!àkNî»2éÊÆÔx¶u¼¯µ2—Áäòy"¬ÃD<>79!!.)«ùrU4û…°lÍ΃Ù_-¦±ÅÚf^\<ÔX Ôz§¢[<+Kþ?ýél:¬YLƒ-8|8—ÉLNÊȉx)I)¼r…Ö"c¿ú§èìU}.ÆCƒk›‹ãØ}ó¿’õX·8¼LžÝ¯R=ÀDQÂò@?1L†ã¸—a<‘¨¦EkжÔÈ’ÿ]½}íŒG[YÜ¢‹¿†6I˜xX–ü£‡83pž={¶¯¹€Á œÀC»ÿ5.âƒsrõ¾™ëØ?Þ~û£#}á=ÃæfÑëýÖøõkhl'˜‚}ðþõì™ÊÜ4z&ƒ_&ä2ÓØ‡ëÏ8¼¾@`qÛ¾›™w&ðÇç^yûŸÿóŸöd6‡—:ÃÝÓÔÔ>à´ŸùÆ7LÔ>¯iÀP󞙹Z‹–É ÛOO‚‰L† ù\zZ®´±ïÕ¿úËݸ»Z"é±ÛjmÿÁ³¼MÉ€M%©¶f|¦R•Óë¨.u¸k%¥=v{O­7 êÙ¿ß>3óÕ…)îbóñL$ãq“˜é´ÏÕŸésü5’ã8Ã$‘¸¡[Û¾ý›Y×ÔJ¼3^èÑ0Iª)g8Kpf)œèñΘìÕµŽ%„«þÜ\6LŸ<ð3}6“i Çð˜Ð­ØLNð¸ÍÍœ==vøÆfp‡f~ÿçÀ¥0.í‰Ý^*±ÿdsÎôP3àQŸÏ‹üúÕÅüÏšàöœ¦ÀŒ£gÆ¡rÀ‰í&Ÿjß Ùª½^[µ{f 8ܵN›Äçó9a„Ýÿûyn‚[Àp8TÁ^ƒž "ø¼³§-FXÛŽ¼æ­¶Úc— +¼çŒy´Ö䬥ڴ;íªå‚ûó÷8otÓQ*i‡@)óMÁn_K¥p „Lð¢jÛB„jSSSè¦(„ *U­ä3_š0 ‚(5Ü¥’ê™yU“Jr#_»DåœiR£Ð^jš‡àöö¨Üµ¦Ðõv‰Óé졜Ÿc!‚Éí¬…@/Pöööv“¼àôùL7B€ÐƒüQEB(í1•Ú}Õí³ ¦pFÌü÷üX˜QÁ@H$í(+PK>ˆ‹ž@p ¼î! P«5…b`á@øLÕîZU Œ€ÚžEøíý?ž'¥T8–R7G8#Þë#8¡Qgµ³ÚAyDerSí‡cÁWm2Ûôºƒáè #Ì|çÛÌ&D74µÏG@×:l×G°AßÎö€M… §É¨5ù^Ľ…s逪Öx{!€~ûT‰ 9æÃï}/Ä€TVÚ $l ëÀé@gš|>G­ýúIi7 ˜LÈ ç&xUµM&'ü35 ÀÇžvÇ@mS»Éë65DµÛ Ešš¨F?üßg_GsÔÇvøK» uS“Íg«­VÕ–ªzÜԙȜ×G¸)ûÇ민ý÷"ú2çÇaEæS¹?m„öõÎ&elͱaÝ-AÀTàõÎNõбccç:G 4ÛÇaÿ¶ë{|µ×m ÊlÀ¶óÆÍ wë:;;7oÛ¶ßkgmg§j㶦ýk;÷£,]ß30­Ûè´·ïï\[ †/æ±à\×¹¶M£kA «×RM·wnÀ[ 3ÞõÕh¼½:U3Žuë½!.û„X$åÇo¿þú Õšw# 4u®+E&Ùãc„_9wî¹ïÿ&°açgÈ|1F¼rîï?÷ìÓ¿]„°­sÃ\½[„ž;÷ÑGxîéï,ñÂ:GD„O>?xöÜþpîÙo}i‚ 2ô!|øô³Ï=÷ìÓ_÷ºY„jôc½;¤(MíáÉ3ÿñ­§ŸþÖîÿT>k;©ºÕ½¡s|Z߹ю4r³}Æjåv«Úc¤ ¿½Ùw>œ©Ý¼víz¨Òš¶­]»Vvø¼­tÛ6©@íÚÎõ–h•ó&Íñ?ŸÿÌg>ÿ{§³2›Óúí´7I6ïWÙ¨“šöoS9¨ó— \ý¯[mgoÅÿ·ŽÂþòÁ!Ò~_IEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/italiano/lgpl.txt0000777000076500007660000006126710463127340020052 0ustar GNU LIBRARY GENERAL PUBLIC LICENSE ================================== Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! usr/src/sdlBasic/share/doc/sdlBasic/italiano/keywords.txt0000755000076500007660000001200610637402051020740 0ustar const \ option explicit \ option qbasic \ include \ argc \ argv \ command \ command$ \ argument$ \ getenv \ shell \ end \ stop \ os \ isfbsd \ isosx \ islinux \ iswin32 \ ismos \ isnetbsd \ isamigaos \ declare \ sub \ exit sub \ end sub \ function \ exit function \ end function \ return \ while \ exit while \ end while \ wend \ continue \ if \ then \ else \ elseif \ end if \ select case \ case \ case else \ end select \ for \ for each \ continue \ exit for \ next \ end for \ do 1 \ loop \ exit do \ or \ and \ xor \ not \ \ \ \ \ \ mod \ shl \ shr \ dim \ shared \ common \ lbound \ ubound \ erase \ asc \ chr \ chr$ \ insert \ insert$ \ instr \ lcase \ lcase$ \ left \ left$ \ len \ length \ ltrim \ ltrim$ \ mid \ mid$ \ replace \ replace$ \ replacesubstr \ replacesubstr$ \ reverse \ reverse$ \ right \ right$ \ rinstr \ rtrim \ rtrim$ \ space \ space$ \ str \ str$ \ strf \ strf$ \ string \ string$ \ tally \ trim \ trim$ \ typeof \ typeof$ \ ucase \ ucase$ \ val \ abs \ acos \ asin \ atan \ bin \ bin$ \ cos \ exp \ fix \ floor \ frac \ hex \ hex$ \ int \ log \ randomize \ rnd \ round \ sgn \ sin \ sqr \ tan \ min \ max \ bitwiseand \ andbit \ bitwiseor \ orbit \ bitwisexor \ xorbit \ open \ file input \ input \ file output \ print \ close \ eof \ fileexists \ filecopy \ filemove \ filerename \ freefile \ kill \ loc \ lof \ readbyte \ rename \ seek \ writebyte \ chdir \ dir dir$ \ direxists \ dirfirst \ dirnext \ mkdir \ rmdir \ data \ read \ print \ date \ date$ \ time \ time$ \ ticks \ reservebank \ baseimage \ baseimageCC \ basescreen \ basesound \ freebase \ freebank \ copybank \ loadbank \ savebank \ setbank \ currentbank \ sizebank \ banksize \ poke \ doke \ loke \ peek \ deek \ leek \ memcopy \ setdisplay \ setcaption \ setalphachannel \ caption \ displaymode \ displaywidth \ displayheight \ displaybpp \ screen \ screenz \ lastscreen \ directscreen \ screenopen \ screenclose \ screenclone \ screencopy \ screenfade \ screenfadeout \ screenfadein \ screencrossfade \ screenalpha \ screenlock \ screenunlock \ screenrect \ screenviewport \ xscreenrect \ screenviewportx \ yscreenrect \ screenviewporty \ wscreenrect \ screenviewportyw \ hscreenrect \ screenviewportyh \ flagscreenrect \ screenviewportflag \ screenwidth \ screenheight \ offset \ screenoffset \ xoffset \ screenoffsetx \ yoffset \ screenoffsety \ cls \ screenswap \ autoback setautoback \ dualplayfield \ waitvbl \ fps \ rgb \ enablepalette \ color \ palette \ colorcycling \ ink \ point \ getpixel \ dot \ setpixel \ putpixel \ plot \ line \ box \ bar \ rectangle \ circle \ fillcircle \ ellipse \ fillellipse \ paint \ triangle \ polyline \ polygon \ loadimage \ loadzipimage \ saveimage \ loadsound \ loadzipsound \ loadmusic \ hotspot \ setcolorkey \ colorkey \ imageexists \ imagewidth \ imageheight \ deleteimage \ copyimage \ setalpha \ imagealpha \ zoomimage \ rotateimage \ rotozoomimage \ mirrorimage \ blt \ pastebob \ pasteicon \ grab \ spriteclip \ sprite \ deletesprite \ xsprite \ spritex \ ysprite \ spritey \ spritewidth \ spriteheight \ frsprite \ spriteimage \ livesprite \ spriteexist \ spritehit \ spritez \ lastsprite \ autoupdatesprite \ updatesprite \ setbob \ bob \ deletebob \ xbob \ bobx \ ybob \ boby \ bobwidth \ bobheight \ frbob \ bobimage \ livebob \ bobexist \ bobhit \ bobz \ lastbob \ autoupdatebob \ updatebob \ text \ setfont \ getfont \ textrender \ pen \ paper \ fprints \ prints \ locate \ atx \ aty \ curson \ cursoff \ inputs \ zoneinputs \ isenabledsound \ soundenabled \ soundexists \ deletesound \ copysound \ musicexists \ playsound \ playfreqsound \ volumesound \ soundvolume \ stopsound \ pausesound \ resumesound \ sound3d \ positionsound \ soundChannels \ playmusic \ positionmusic \ stopmusic \ pausemusic \ resumemusic \ rewindmusic \ fademusic \ volumemusic \ musicvolume \ speedmusic \ musicspeed \ numdrivescd \ countcddrives \ namecd \ opencd \ indrivecd \ cdinserted \ trackscd \ countcdtracks \ curtrackcd \ cdcurtrack \ curframecd \ cdcurframe \ playcd \ playtrackscd \ playtrackscd \ playtrackscd \ playcdtracks \ playcdtracks \ playcdtracks \ pausecd \ resumecd \ stopcd \ ejectcd \ closecd \ tracktypecd \ cdtracktype \ tracklengthcd \ cdtracklength \ trackoffsetcd \ cdtrackoffset \ loadmpeg \ plaympeg \ stopmpeg \ deletempeg \ pausempeg \ rewindmpeg \ seekmpeg \ skipmpeg \ statusmpeg \ key \ inkey \ waitkey \ xmouse \ ymouse \ mousex \ mousey \ xmousescreen \ ymousescreen \ mousescreenx \ mousescreeny \ bmouse \ mousebutton \ changemouse \ mousepointer \ locatemouse \ placemouse \ mouseshow \ showmouse \ mousehide \ hidemouse \ mousezone \ numjoysticks \ namejoystick \ numaxesjoystick \ numballsjoystick \ numhatsjoystick \ numbuttonsjoystick \ getaxisjoystick \ gethatjoystick \ getbuttonjoystick \ xgetballjoystick \ ygetballjoystick \ joy \ bjoy \ joybuttons \ fire \ waitbjoy \ wait \ timer \ isenabledsock \ sock=getfreesock \ sock=OpenSock \ clientsock=AcceptSock \ IsServerReady \ sock=ConnectSock \ IsClientReady \ CloseSock \ ReadSock \ ReadByteSock \ ReadLineSock \ WriteSock \ WriteByteSock \ WriteLineSock \ getremoteip \ getremoteport \ usr/src/sdlBasic/share/doc/sdlBasic/italiano/style.css0000777000076500007660000000507310463127451020221 0ustar FONT {FONT-FAMILY: Helvetica; FONT-SIZE: 12px} TD {FONT-FAMILY: Helvetica; FONT-SIZE: 12px; COLOR: #000000;} BODY {FONT-FAMILY: Helvetica; FONT-SIZE: 12px} P {FONT-FAMILY: Helvetica; FONT-SIZE: 12px} DIV {FONT-FAMILY: Helvetica; FONT-SIZE: 12px} INPUT {BORDER-TOP-COLOR: #000000; BORDER-LEFT-COLOR: #000000; BORDER-RIGHT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-WIDTH: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE: 10px; BORDER-BOTTOM-WIDTH: 1px; FONT-FAMILY: Helvetica; BORDER-RIGHT-WIDTH: 1px} TEXTAREA {BORDER-TOP-COLOR: #000000; BORDER-LEFT-COLOR: #000000; BORDER-RIGHT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-WIDTH: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE: 10px; BORDER-BOTTOM-WIDTH: 1px; FONT-FAMILY: Helvetica; BORDER-RIGHT-WIDTH: 1px} SELECT {BORDER-TOP-COLOR: #000000; BORDER-LEFT-COLOR: #000000; BORDER-RIGHT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-WIDTH: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE: 10px; BORDER-BOTTOM-WIDTH: 1px; FONT-FAMILY: Helvetica; BORDER-RIGHT-WIDTH: 1px} FORM {FONT-FAMILY: Helvetica; FONT-SIZE: 10px} A:link {BACKGROUND: none; COLOR: #672F10; FONT-SIZE: 12px; FONT-FAMILY: Helvetica; TEXT-DECORATION: underline} A:active {BACKGROUND: none; COLOR: #672F10; FONT-SIZE: 12px; FONT-FAMILY: Helvetica; TEXT-DECORATION: underline} A:visited {BACKGROUND: none; COLOR: #672F10; FONT-SIZE: 12px; FONT-FAMILY: Helvetica; TEXT-DECORATION: underline} A:hover {BACKGROUND: none; COLOR: #672F10; FONT-SIZE: 12px; FONT-FAMILY: Helvetica; TEXT-DECORATION: underline} .title {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 16px; FONT-WEIGHT: bold; FONT-FAMILY: Helvetica; TEXT-DECORATION: none} .content {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 12px; FONT-FAMILY: Helvetica} .block-title {BACKGROUND: none; COLOR: #FFFFFF; FONT-SIZE: 12px; FONT-FAMILY: Helvetica} .storytitle {BACKGROUND: none; COLOR: #363636; FONT-SIZE: 14px; FONT-WEIGHT: bold; FONT-FAMILY: Helvetica; TEXT-DECORATION: none} .storycat {BACKGROUND: none; COLOR: #363636; FONT-SIZE: 16px; FONT-WEIGHT: bold; FONT-FAMILY: Helvetica; TEXT-DECORATION: underline} .boxtitle {BACKGROUND: none; COLOR: #363636; FONT-SIZE: 14px; FONT-WEIGHT: bold; FONT-FAMILY: Helvetica; TEXT-DECORATION: none} .boxcontent {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 12px; FONT-FAMILY: Helvetica} .option {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: Helvetica; TEXT-DECORATION: none} .tiny {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 10px; FONT-WEIGHT: normal; FONT-FAMILY: Helvetica; TEXT-DECORATION: none} usr/src/sdlBasic/share/doc/sdlBasic/italiano/sdlBasic_IDE_License.txt0000777000076500007660000000167110463127451022757 0ustar License for Scintilla and sdlBasic Editor Copyright 1998-2003 by Neil Hodgson Copyright 2005 by sdlBasic team http://sdlBasic.sf.net All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. usr/src/sdlBasic/share/doc/sdlBasic/italiano/keycode.txt0000777000076500007660000000407210463127270020530 0ustar key code string "k_backspace" = 8 "k_tab" = 9 "k_clear" = 12 "k_return" = 13 "k_pauseE" = 19 "k_escape" = 27 "k_esc" = 27 "k_space" = 32 "k_exclaim" = 33 "k_quotedbl" = 34 "k_hash" = 35 "k_dollar" = 36 "k_ampersand" = 38 "k_quote" = 39 "k_leftparen" = 40 "K_RIGHTPAREN" = 41 "k_asterisk" = 42 "k_plus" = 43 "k_comma" = 44 "k_minus" = 45 "k_period" = 46 "k_slash" = 47 "k_colon" = 58 "k_semicolon" = 59 "k_less" = 60 "k_equals" = 61 "k_greater" = 62 "k_question" = 63 "k_at" = 64 "k_leftbracket" = 91 "k_backslash" = 92 "k_rightbracket" = 93 "k_caret" = 94 "k_underscore" = 95 "k_backquote" = 96 "k_delete" = 127 "k_1" = 49 "k_2" = 50 "k_3" = 51 "k_4" = 52 "k_5" = 53 "k_6" = 54 "k_7" = 55 "k_8" = 56 "k_9" = 57 "k_0" = 48 "k_kp0" = 256 "k_kp1" = 257 "k_kp2" = 258 "k_kp3" = 259 "k_kp4" = 260 "k_kp5" = 261 "k_kp6" = 262 "k_kp7" = 263 "k_kp8" = 264 "k_kp9" = 265 "k_kp_period" = 266 "k_kp_divide" = 267 "k_kp_multiply" = 268 "k_kp_minus" = 269 "k_kp_plus" = 270 "k_kp_enter" = 271 "k_kp_equals" = 272 "k_up" = 273 "k_down" = 274 "k_right" = 275 "k_left" = 276 "k_insert" = 277 "k_home" = 278 "k_end" = 279 "k_pageup" = 280 "k_pagedown" = 281 "k_f1" = 282 "k_f2" = 283 "k_f3" = 284 "k_f4" = 285 "k_f5" = 286 "k_f6" = 287 "k_f7" = 288 "k_f8" = 289 "k_f9" = 290 "k_f10" = 291 "k_f11" = 292 "k_f12" = 293 "k_f13" = 294 "k_f14" = 295 "k_f15" = 296 "k_numlock" = 300 "k_capslock" = 301 "k_scrollock" = 302 "k_rshift" = 303 "k_lshift" = 304 "k_rctrl" = 305 "k_lctrl" = 306 "k_ralt" = 307 "k_lalt" = 308 "k_rmeta" = 309 "k_lmeta" = 310 "k_lsuper" = 311 /* Left "Windows" key */ "k_rsuper" = 312 /* Right "Windows" key */ "k_mode" = 313 /* "Alt Gr" key */ "k_compose" = 314 /* Multi-key compose key */ "k_help" = 315 "k_print" = 316 "k_sysreq" = 317 "k_break" = 318 "k_menu" = 319 "k_power" = 320 /* Power Macintosh power key */ "k_euro" = 321 /* Some european keyboards */ "k_undo" = 322 /* Atari keyboard has Undo */ usr/src/sdlBasic/share/doc/sdlBasic/italiano/htmlconvert.sdlbas0000777000076500007660000001131110463127270022075 0ustar ' ' sdlbasic doc: html converter ' ' name: htmlconverter.sdlbas ' purpose: generate a manual html page of sdlbasic for send at sourceforge site ' author: __vroby__ ' licence: lgpl ' ' bugs: ' ' todo: ' '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- makeexamples=0 cleanapi=false apiFile="../../../sdlBasic/sdlBasic.api" base$="../../../../../../../share/sdlBasic/sdlbasicsoftware/examples" mkdir(base$) inputfile$="sdlBasic.txt" outputfile$="QuickHelp.html" keywordlist$="keywords.txt" open inputfile$ for input as 1 open outputfile$ for output as 2 open keywordlist$ for output as 3 print #2,"" print #2,"" print #2,"" print #2,"" print #2,"" print #2,"" print #2,"" print #2,"" print #2,"" print #2,"" print #2,"" print #2,"sdlbasic quickhelp" print #2,"" print #2,"" print #2,"" print #2,"[sourceforge]" print #2,"[sdlbasic]" print #2,"

sdlbasic quick help

" print #2,"
" l=1:c=0 while eof(1)=0 a$="" file input #1,a$ a$=replacesubstr(a$,"#","" ) 'start section if c=1 then: t$=trim(left$(a$,len(a$))): mkdir(base$+"/"+t$): a$=""+a$+"": c=0: end if if left$(a$,5)="_____" then: a$="
": c=1: end if if left$(trim$(a$),1)="*" and left$(trim$(a$),2)<>"**" then a$="
"+a$+"
" end if if left$(trim$(a$),2)="**" then a$="
"+a$+"
" end if if left$(trim$(a$),1)="?" then a$="
"+a$+"
" end if if left$(trim$(a$),2)="->" then a$="
"+a$+"
" end if s=instr(a$,": ") if s<>0 then b$=left$(a$,s) c$=mid$(a$,s+1) a$=""+b$+""+c$ com$=rtrim$(left$(b$,len(b$)-1)) if instr(com$,"[")then: com$=left$(com$,instr(com$,"[")-1):end if if instr(com$,"(")then: com$=left$(com$,instr(com$,"(")-1):end if com$=rtrim(com$) com$=replacesubstr(com$,chr$(9),"") com$=replacesubstr(com$,"?","") com$=replacesubstr(com$,"--","<") if left$(trim$(com$),1)<>"<" then print #3,com$ &" \\" end if if makeexamples<>0 then if not fileexists(base$+"/"+t$+"/"+replacesubstr$(com$,"*","")+".sdlbas") and left$(trim$(com$),1)<>"<" then open (base$+"/"+t$+"/"+replacesubstr$(com$,"*","")+".sdlbas") for output as 3 print base$+"/"+t$+"/"+replacesubstr$(com$,"*","")+".sdlbas" print #3,"'" print #3,"' sdlbasic example "+t$+":"+com$ print #3,"'" print #3,"' name: "+com$+".sdlbas" print #3,"' purpose: "+c$ print #3,"' author: __vroby__ ( __vroby__@libero.it )" print #3,"' licence: lgpl" print #3,"'" print #3,"'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------" close 3 end if end if end if print #2,a$+"
" locate(0,0) prints("line"+str$(l)+" ") l=l+1 'waitvbl end while print #2,"
" print #2,"

" print #2,"generated with sdlbasic
" print #2,"graphics zoiba
" print #2,"

" print #2,"" print #2,"" close 2 close 1 -------------------------------------------------- making api file for ide if cleanapi=false then filecopy("sdlBasic.txt",apiFile) else ------------------ cleanup sdlbasic.api while copying it outputfile$=apiFile open inputfile$ for input as 1 open outputfile$ for output as 2 while eof(1)=0 file input #1,a$ for n = 1 to 10 if instr( a$, chr(09) )<>0 then a$=replacesubstr( a$,chr(09),"" ) end if next if left$( a$, 1 )<>"#" then file output #2,a$ end if wend close 2 close 1 end if waitkey usr/src/sdlBasic/share/doc/sdlBasic/italiano/QuickHelp.html0000755000076500007660000013355610637402047021126 0ustar sdlbasic quickhelp [sourceforge] [sdlbasic]

sdlbasic quick help


sdlBasic un piccolo basic per fare semplici giochi in 2d

Questo basic al momento funziona su
linux(versioni ragionevolmente nuove)
windows(sia 9x che Nt based)
MacOsX
FreeBSD
NetBSD
MorphOS
AmigaOS

Questo basic e' una dimostrazione lampante della forza della licenza GPL
L'interprete basic e' il wxbasic di David Cuny ("http://wxbasic.sourceforge.net") distribuito sotto licenza lGPL
le librerie Grafiche SDL ("http://www.libsdl.org")sono distribuite sotto licenza lGPL
il motore grafico e' derivato dal mini gioco aliens ("http://www.libsdl.org/projects/aliens")scritto in c e
distribuito sotto licenza lGPL
le rutine putpixel getpixel sono derivate direttamente dal tutorial delle SDL e migliorate su suggerimento di Gigi Davassi
la rutine line e stata estratta e adattata direttamente dal sorgente di Alvyn Basic con l'autorizzazione dell'autore

Ho usato anche i sorgenti della libreria sdldraw ("http://sdl-draw.sourceforge.net/")

Il sottoscritto non ha fatto altro che tagliare incollare e adattare sorgenti altrui distribuiti tutti sotto licenza lGPL.
Questo prodotto e' ovviamente soggetto alla licenza lGPL ed e' gratuito come tutti i programmi
sopra citati.




sdlBasic elenco comandi e sintassi

suggerisco di scaricare wxbasic per le istruzioni specifiche

sezioni:
Run time
Sub and function
Control structures
Operator
Array
Strings
Maths
Files
Dirs
Data function
console output
Date and time
Memory Bank

Screen
Graphics
File graphics input output
Image manipulation
Blitting
Sprite system
Bob system
Text draw
Print screen
Sounds and music
CD support
Video Mpeg
Keyboard
Mouse
Joystick
SDLtime
Socket



note:
* non funziona

** non funziona e da testare

? non funziona bene ci sono bachi non risolti

-> da eliminare




Run Time

argomenti di run da linea di comando
--nodefaults : disabilita i parametri di default del display
--nosound : disabilita il suono
--nosocket : disabilita il supporto socket
--debug : lancia sdlBasic in modo passo passo
--version : visualizza la versione (iso date)
--license : visualizza la licenza
--copyright : visualizza copyright ( ;-) assolutamente free software )
--help : visualizza la lista delle opzioni di avvio


const : dichiarazione di costante numerica
option explicit : dichiarazione variabile obligatoria
option qbasic : permette di usare le rutine dichiarandole all'inizio del file
include(filename) : inclusione file sorgente esterno
argc : ritorna il numero di argomenti della riga di comando
argv : ritorna gli argomenti della riga di comando
command[param] : ritorna gli argomenti della riga di comando
command$[param] : ritorna gli argomenti della riga di comando
argument$(optional n) : ritorna gli argomenti mandatia una sub/function con n=0 o senza parametri ritorna il numero argomenti
?setenv(varname,value) : carica una variabile d'ambiente nel os corrente se esiste e' sovrascritta

getenv(varname) : ritorna il valore di una variabile d'ambiente
*run : esegue un commando in multitasking

shell : esegue un commando, e attende il termine di questo comando per proseguire l'esecuzione
end : termina il programma e esce
stop : ferma l'esecuzione e avvia il debug

os : restituisce il nome del sistema operativo (win32 linux osx o fbsd)
isfbsd : restituisce 1 se il sistema operativo usato e' FreeBSD
isosx : restituisce 1 se il sistema operativo usato e' MacOSX
islinux : restituisce 1 se il sistema operativo usato e' linux
iswin32 : restituisce 1 se il sistema operativo usato e' windows
ismos : restituisce 1 se il sistema operativo usato e' MorphOS
isnetbsd : restituisce 1 se il sistema operativo usato e' NetBSD
isamigaos : restituisce 1 se il sistema operativo usato e' AmigaOS

debug viene avviato con l'opzione -debug all'avvio o quando premi ctrl+c durante l'esecuzione di un programma scritto in basic
se tu premi F5 sdlbasic ripredera' la normale esecuzione
con F6 il modo passo passo
con F4 puoi interrogare lo stato di una variabile. Pe interrogare lo stato di un array devi indicare il nome senza
le parentesi quadre e dare il valore degli indici quando richiesti.



Sub and function

declare [sub | function][name] : dichiara una subrutine/function in modo qbasic
sub[name](args...) : inizia una subrutine
exit sub : interrompe una subrutine
end sub : termina una subrutine
function[name](args...) : inizia una funzione
exit function : interrompe una function
end function : termina una function
return[value | variable] : setta il valore di ritorno di una function (come nomefunc=x)



Control structures

while : inizia il ciclo while
exit while : interrompe il ciclo while
end while : termina il ciclo while
wend : termina il ciclo while
continue : finisce il ciclo while poi esce

if [condition expression] : il controllo di flusso if in sdlBasic ha alcune particolarita: :
then : then deve essere seguito o da un : o il coice deve passare alla linea successiva
else : lo stesso discorso vale per else
elseif : e' supportato elseif che tuttavia si comporta come if
end if : deve essere sempre presente e deve essere separato da altri comandi da a capo o :

select case [condition expression] : il controllo select case permette di fare una scelta multipla in base a una condizione
case : viene usato per determinare una condizione
case else : viene usato come condizione di default
end select : deve essere inserito alla fine del ciclo select case

for[var]=[val1]to[val2][step[vals]] : il classico ciclo for-next e' implementato molto bene
for each [var] in [array] : supporta anche il meno classico for each x in array attenzione riporta l'indice dell'array non il valore
continue : forza l'uscita da un ciclo for next (funziona solo con for each)
exit for : forza l'uscita da un ciclo for next
next : la fine del ciclo
end for : la fine del ciclo


do 1 : inizia un ciclo do-loop
loop : termina un ciclo do-loop
exit do : esce da un ciclo do-loop

*repeat : il ciclo repeat non e' al momento supportato

*until : non supportato


or : espressione logica "or" usata come condizione di flusso
and : espressione logica "and" usata come condizione di flusso
xor : espressione logica "xor" usata come condizione di flusso
not : espressione logica "not" usata come condizione di flusso



Operator

[+] : operatore di addizione
[-] : operatore di sottrazione
[*] : operatore di moltiplicazione
[/] : operatore di divisione
[^] : operatore di elevazione a potenza
mod : operatore di resto di una divisione
shl : shift left slittamento dei bit a sinistra
shr : shift right slittamento dei bit a destra



Array

dim [name][[index of array]] : dichiara un array nota: gli array usano [] come parentesi
*redim [name][[index of array]] : redichiarazione di un array

shared [variable] : dichiara un variable esterna in una subrutine
common [variable] : dichiara variable o un array globale
lbound [array] : ritorna l'indirizzo piu' basso di un array
*quicksort [array] : riordina un array

ubound [array] : l'indirizzo piu' alto di un array
erase [array] : libera un array



Strings

asc(char) : ritorna il valore ascii del primo carattere nella stringa char
chr(v) : ritorna la stringa corrispondente al valore ascii v
chr$(v) : ritorna la stringa corrispondente al valore ascii v
*format() : ritorna una stringa formattata con gli argomenti inclusi

*format$() : ritorna una stringa formattata con gli argomenti inclusi

insert(source$,target$,position) : inserisce la stringa source nella string target alla posizione index
insert$(source$,target$,position) : inserisce la stringa source nella string target alla posizione index
instr(optional start,source$,target$) : ritorna la posizione in source che ha la stringa target
lcase(string$) : converte la stringa in minuscolo
lcase$(string$) : converte la stringa in minuscolo
left(string$,number) : ritorna i number caratteri piu a sinistra nella stringa
left$(string$,number) : ritorna i number caratteri piu a sinistra nella stringa
len(string$) : ritorna la lunghezza della stringa
length(string$) : ritorna la lunghezza della stringa
ltrim(string$) : ritorna la stringa senza gli spazzi a sinistra
ltrim$(string$) : ritorna la stringa senza gli spazzi a sinistra
mid(string$,start,optional end) : ritorna string with chars 1..n from source
mid$(string$,start,optional end) : ritorna string with chars 1..n from source
replace(opt index,source$,replace$) : replace string from source with replace starting at index
replace$(opt index,source$,replace$) : replace string from source with replace starting at index
replacesubstr(source$,rep$) : replace substring in source with withstring ritorna the new string
replacesubstr$(source$,rep$) : replace substring in source with withstring ritorna the new string
reverse(string$) : reverse a string ritorna the new string
reverse$(string$) : reverse a string ritorna the new string
right(string$,number) : ritorna rightmost chars in string
right$(string$,number) : ritorna rightmost chars in string
rinstr(optional start,source$,target$) : reverse Instr function, search from end to start
rtrim(string$) : right trim string
rtrim$(string$) : right trim string
space(n) : ritorna string with n spaces in it
space$(n) : ritorna string with n spaces in it
str(value) : ritorna string representation of numeric expression
str$(value) : ritorna string representation of numeric expression
strf(value) : converts a floating point or number value to a string
strf$(value) : converts a floating point or number value to a string
string(n,string$) : ritorna string m chars wide with n in it
string$(n,string$) : ritorna string m chars wide with n in it
tally(src$,sub$) : ritorna number of occurances of matchstring
trim(string$) : trim string
trim$(string$) : trim string
typeof(variable) : ritorna string with datatype
typeof$(variable) : ritorna string with datatype
ucase(string$) : convert string to upper case
ucase$(string$) : convert string to upper case
val(string$) : ritorna closest numeric representation of number



Maths

abs(value) : ritorna absolute value of number
acos(value) : ritorna arccos of number
asin(value) : ritorna arcsin of number
atan(value) : ritorna arctan of number
bin(value) : ritorna la rappresentazione binaria del numero
bin$(value) : ritorna la rappresentazione binaria del numero
cos(value) : ritorna cos of number
exp(value) : ritorna exponential function
fix(value) : truncate fractional number, rounding down towards zero
floor(value) : truncate fractional number, rounding down towards zero
frac(value) : ritorna fractional portion of number
hex(value) : ritorna hexidecimal representation of number
hex$(value) : ritorna hexidecimal representation of number
int(value) : convert to 32 bit integer, truncating decimals
log(value) : ritorna natural log of expression
randomize(value) : reseed the random number generator
rnd(optional upper) : ritorna an random number
round(value) : round to nearest integer
sgn(value) : ritorna sign of numeric expression
sin(value) : ritorna sine of given angle in radians
sqr(value) : ritorna square root - make sure it's non-negative
tan(value) : ritorna tanget of given angle in radians
min(value1,value2) : ritorna min number of the operands
max(value1,value2) : ritorna max number of the operands
bitwiseand(value1,value2) : ritorna the logic and of the operands
andbit(value1,value2) : ritorna the logic and of the operands
bitwiseor(value1,value2) : ritorna the logic or of the operands
orbit(value1,value2) : ritorna the logic or of the operands
bitwisexor(value1,value2) : ritorna the logic xor of the operands
xorbit(value1,value2) : ritorna the logic xor of the operands



Files

open[filename]for{input|output|append}as[stream]: open file stream
file input [stream] : read a line from file stream
input [stream] : read a line from file stream
file output [stream] : print a line in file stream
print [stream] : print a line in file stream
close [stream] : close file stream

eof(stream) : ritorna nonzero if Eof
fileexists(filename) : ritorna true if the file exists
filecopy(source,dest) : copy a file
filemove(source,dest) : move a file
filerename(filename,newname) : rename a file
freefile() : ritorna the handle of the next free file
kill(filename) : delete filename. filename can be then path+filename
loc(stream) : ritorna position in file
lof(stream) : ritorna length of file
readbyte(stream) : ritorna a byte from the file
rename(filename,newname) : rename file
seek(stream) : seek file position/ritorna current file position
writebyte(stream,byte) : write a byte in the file



Dirs

chdir(path) : cambia directory
dir dir$ : ritorna current path
direxists(path) : ritorna true if directory exists
dirfirst(path) : ritorna first entry in path dir
dirnext : ritorna next entry in path dir
mkdir(path) : create a new directory
rmdir(path) : remove directory



Data Function

data(optional 0-255 param) : legge la data
read(optional pointer) : senza parametri restituisce il valore della data corrente e sposta il puntatore alla successiva: con un valore sposta il puntatore



Console Output

print [text|variable|number] : Stampa in standard output un espressione (lo uso per il debug output)



Date and Time

date() : ritorna la data in formato MM-DD-YYYY
date$() : ritorna la data in formato MM-DD-YYYY
time() : ritorna l'ora in formato HH:MM:SS
time$() : ritorna l'ora in formato HH:MM:SS
ticks() : ritorna il tempo trascorso dall'avvio in millesimi di secondo



Memory Bank
in questa release il numero di banchi e' di 256

reservebank(bank,size) : crea un banco di memoria raw (da 0 a 255)
baseimage(bank,image) : collega un banco di memoria alla bitmap di un immagine caricata
baseimageCC(bank,image) : collega un banco di memoria alla bitmap di un immagine caricata con la trasparenza
basescreen(bank,image) : collega un banco di memoria alla bitmap di uno screen aperto
basesound(bank,sound) : collega un banco di memoria con un banco degli suoni caricati

freebase(bank) : scollega un banco di memoria a una image o a uno screen
freebank(bank) : dealloca un banco di memoria

copybank(s,d) : copia il banco s in d

loadbank(filename,optional bank) : carica un file nel banco di memoria bank (se omesso il corrente )
savebank(filename,optional bank) : salva un banco di memoria in un file

setbank(optional bank) : setta il banco di memoria corrente (se omesso ritorna il corrente)
currentbank(optional bank) : setta il banco di memoria corrente (se omesso ritorna il corrente)
sizebank(optional bank) : ritorna la dimensione del banco di memoria (se omesso il corrente)
banksize(optional bank) : ritorna la dimensione del banco di memoria (se omesso il corrente)


poke(optional bank,address,value) : scrive un byte nel banco di memoria all'indirizzo
doke(optional bank,address,value) : scrive un valore a 16 bit nel banco di memoria all'indirizzo
loke(optional bank,address,value) : scrive un valore a 32 bit nel banco di memoria all'indirizzo

peek(optional bank,address) : legge un byte nel banco di memoria all'indirizzo
deek(optional bank,address) : legge un valore a 16 bit nel banco di memoria all'indirizzo
leek(optional bank,address) : legge un valore a 32 bit nel banco di memoria all'indirizzo

memcopy(sbank,s,dbank,d,size) : copia una parte della memoria dela banco s nel banco d



Screen

setdisplay(w,h,bpp,m) : apre lo schermo/finestra in double buffer in modo 0=fullscreen|1=window|2=resize|3=fullscreen software (temporaneo)
setcaption(title) : cambia il nome della finestra display
setalphachannel(v) : attiva disattiva il canale alpha delle trasparenze
caption() : riporta il nome corrente della finestra display
displaymode : restituisce il modo video del display
displaywidth : restituisce la larghezza del display
displayheight : restituisce l'altezza del display
displaybpp : restituisce la profondita di colore del display

screen(n) : attiva lo schermo logico n senza parametri ritorna lo schermo corrente
screenz(n,z) : setta lo zorder di uno schermo se z =-1 restituisce z position corrente
lastscreen : restituisce l'ultimo screen aperto
directscreen : apre direttamente il display come screen(piu veloce ma gli sprite e screen offset non funzionano correttamente)
screenopen(n,w,h,dx,dy,dw,dh,flag) : apre lo schermo logico n di dimensione w,h nelle coordinate dx,dy,dw,dh, del display
screenclose(n) : chiude lo schermo logico n

screenclone(n,s,x,y,w,h,flag) : crea una nuova entrata nello schermo s
screencopy(n,x,y,w,h,nd,xd,yd) : copia una porzione di schermo da n a nd
screenfade(n,t) : sfuma lo screen n in t time lavora in multitasking senza parametri rende 0 se a terminato
screenfadeout(n,t) : sfuma lo screen n in t time lavora in multitasking senza parametri rende 0 se a terminato
screenfadein(n,i,t) : sfuma lo screen n verso l'immagine i in t time lavora in multitasking senza parametri rende 0 se a terminato
screencrossfade(n,i,t) : sfuma lo screen n verso dall'imagine correntel'immagine i in t time lavora in multitasking senza parametri rende 0 se a terminato
screenalpha(n,a) : setta il parametro alpha(trasparenza) allo screen n
screenlock(n) : blocca lo screen n per l'accesso diretto dai comandi grafici
screenunlock(n) : sblocca lo screen n per l'accesso diretto dai comandi grafici

screenrect(x,y,w,h,flag) : modifica le coordinate di output sul display dello screen corrente
screenviewport(x,y,w,h,flag) : modifica le coordinate di output sul display dello screen corrente
xscreenrect : restituisce la coordinata x del rettangolo di output dello screen corrente
screenviewportx : restituisce la coordinata x del rettangolo di output dello screen corrente
yscreenrect : restituisce la coordinata y del rettangolo di output dello screen corrente
screenviewporty : restituisce la coordinata y del rettangolo di output dello screen corrente
wscreenrect : restituisce la coordinata w del rettangolo di output dello screen corrente
screenviewportyw : restituisce la coordinata w del rettangolo di output dello screen corrente
hscreenrect : restituisce la coordinata h del rettangolo di output dello screen corrente
screenviewportyh : restituisce la coordinata h del rettangolo di output dello screen corrente
flagscreenrect : restituisce lo stato del flag del rettangolo di output dello screen corrente
screenviewportflag : restituisce lo stato del flag del rettangolo di output dello screen corrente

screenwidth : restituisce la larghezza dello screen corrente
screenheight : restituisce l'altezza dello screen corrente

offset (x,y) : posiziona la posiziona di visione del display sullo schermo logico corrente
screenoffset (x,y) : posiziona la posiziona di visione del display sullo schermo logico corrente
xoffset : restituisce la coordinata x dell' offset dello screen corrente
screenoffsetx : restituisce la coordinata x dell' offset dello screen corrente
yoffset : restituisce la coordinata y dell' offset dello screen corrente
screenoffsety : restituisce la coordinata y dell' offset dello screen corrente

cls : cancella lo schermo logico corrente

screenswap : scambia lo schermo logico con quello fisico e aggiorna il bob system
autoback setautoback(m) : attiva / disattiva lo screenswap automatico m=0 disattivato m>0 attende m millisecondi e performa lo screenswap m<0 esegue il comando screen swap solo se chiamato e dopo m millisecondi
dualplayfield(optional m) : attiva / disattiva l'aggiornamento degli screen sopra al piano dei bob
waitvbl : attende lo screenswap automatico
fps(optional n) : attiva/disattiva o restituisce frame rate corrente (0/1/none)



Graphics

rgb(r,g,b) : restituisce il colore corrente in formato Uint32
enablepalette(optional state) : abilita disabilita e verifica il palettemode nel display a 256 colori
color (c,optional v) : setta il colore della paletta c con il valore v se mancante restituisce il colore c
palette(optional 0-255 param) : setta l'intera paletta
colorcycling(s,e,d=0|1,optional delay ) : scorre la paletta dei colori un colore avanti o indietro. Lavora solo in modo 256 colori
se si setta il delay funziona in multitasking senza parametri arresta il multitasking
ink(c) : seleziona il colore corrente dal formato Uint32

point(x,y) : restituisce la componente colore alla coordinata x,y
getpixel(x,y) : restituisce la componente colore alla coordinata x,y
dot(x,y) : scrive un punto con il colore ink alla coordinata x,y
setpixel(x,y) : scrive un punto con il colore ink alla coordinata x,y
putpixel(x,y) : scrive un punto con il colore ink alla coordinata x,y
plot(x,y,c) : scrive un punto con il colore c alla coordinata x,y
line(x,y,x1,y1) : traccia una linea
box(x,y,x1,y1) : traccia un rettangolo vuoto
bar(x,y,x1,y1) : traccia un rettangolo pieno
rectangle(x,y,w,h,mode) : disegna un rettangolo usando w come larghezza e h come altezza il mode=0 e' il bordo 1=riempimento
circle(x,y,r) : traccia un cerchio
fillcircle(x,y,r) : traccia un cerchio pieno
ellipse(x,y,rx,ry) : traccia un ellisse
fillellipse(x,y,rx,ry) : traccia un ellisse piena
paint(x,y) : riempie un area chiusa
triangle(xa,ya,xb,yb,xc,yc) : disegna una triangolo pieno
polyline(xa,ya,xb,yb,xc,yc,.....) : disegna il perimetro di un poligono
polygon(xa,ya,xb,yb,xc,yc,.....) : disegna un poligono pieno



File Graphics Input Output
il numero max di images e' di 65536
il numero max di waves e' di 1024

loadimage(filename,optional n) : carica un imagine nel banco grafico n o uno libero. ritorna n
loadzipimage(zipfile,filename,opt n) : carica un imagine nel banco grafico n o uno libero. ritorna n
saveimage(filename,n) : salva il banco n nel file grafico (deve essere .bmp)
loadsound(filename,n) : carica in un banco un file wav
loadzipsound(zipfile,filename,opt n) : carica in un banco un file wav
?savesound(filename,n) : salva in un banco un file wav

loadmusic(filename) : carica in un banco un file xm mod



Image Manipulation

hotspot(n,x,y) : stabilisce il punto delle coordinate (n,0,0=alto sx | n,1,1=centro | n,2,2 =basso dx)n= image
setcolorkey(c) : setta il colore trasparente con -1 (default) viene settato il colore dell'angolo sinistro in alto dell'immagine
colorkey(c) : setta il colore trasparente con -1 (default) viene settato il colore dell'angolo sinistro in alto dell'immagine
imageexists( n) : restituisce 1 se il banco n esiste 0 se vuoto
imagewidth(n) : restituisce la larghezza dell'immagine n
imageheight(n) : restituisce l'altezza dell'immagine n
deleteimage(n) : cancella l'immagine n dalla memoria
copyimage(s,d) : copia l'immagine s nel banco d
setalpha(n,a) : setta la trasparenza nell' immagine
imagealpha(n,a) : setta la trasparenza nell' immagine
zoomimage(n,zoomx.zoomy) : zoomma l'immagine
rotateimage(n,angle) : ruota l'immagine
rotozoomimage(n,angle,zoom) : ruota e zoomma l'imagine
mirrorimage(n,x,y) : riflette in verticale-orizontale l'immagine




Blitting

blt(n,sx,sy,sw,sh,dx,dy) : copia un banco nello screen
pastebob(x,y,n) : copia sullo schermo il banco n alle coordinate x,y ritagliando
pasteicon(x,y,n) : copia sullo schermo il banco n alle coordinate x,y
grab(n,x,y,w,h) : ritaglia dallo schermo corrente e copia nel banco



Sprite System

In questa implementazione ci sono 1024 sprite software che sono indipendenti degli screen

spriteclip(x,y,w,h) : imposta il clipping degli sprite
sprite(n,x,y,fr) : attiva o sposta il sprite n alla coordinata x,y con l'immagine fr
deletesprite(n) : disattiva il sprite n
xsprite(n) : restituisce la coordinata x del sprite n
spritex(n) : restituisce la coordinata x del sprite n
ysprite(n) : restituisce la coordinata y del sprite n
spritey(n) : restituisce la coordinata y del sprite n
spritewidth(n) : restituisce la larghezza del sprite n
spriteheight(n) : restituisce l'altezza del sprite n
frsprite(n) : restituisce il frame del sprite n
spriteimage(n) : restituisce il frame del sprite n
livesprite(n) : restituisce 1 se il sprite n e' "vivo"
spriteexist(n) : restituisce 1 se il sprite n e' "vivo"
spritehit(n, optional x) : restituisce 1 se il sprite n collide con il sprite x se -1 con tutti
spritez(n,z) : cambia lo zorder dello sprite se z e' omesso o e'-1 restituisce la z position attuale
lastsprite : restituisce l'ultimo sprite attivo
autoupdatesprite(m) : attiva / disattiva l'aggiornamento automatico dei sprite allo screenswap
updatesprite : attiva un aggiornamento manuale degli sprite allo screenswap



Bob System

In questa implementazione ci sono 1024 bob software che sono dipendenti degli screen e attuano
il background preserve

setbob(n,scr) : assegna il bob n allo screen scr
bob(n,x,y,fr) : attiva o sposta il bob n alla coordinata x,y con l'immagine fr
deletebob(n) : disattiva il bob n
xbob(n) : restituisce la coordinata x del bob n
bobx(n) : restituisce la coordinata x del bob n
ybob(n) : restituisce la coordinata y del bob n
boby(n) : restituisce la coordinata y del bob n
bobwidth(n) : restituisce la larghezza del bob n
bobheight(n) : restituisce l'altezza del bob n
frbob(n) : restituisce il frame del bob n
bobimage(n) : restituisce il frame del bob n
livebob(n) : restituisce 1 se il bob n e' "vivo"
bobexist(n) : restituisce 1 se il bob n e' "vivo"
bobhit(n,optional x) : restituisce 1 se il bob n collide con il bob x se -1 con tutti
bobz(n,z) : setta lo zorder di un bob se z =-1 restituisce la z position corrente
lastbob : restituisce l'ultimo bob attivo
autoupdatebob(m) : attiva / disattiva l'aggiornamento automatico dei bob allo screenswap
updatebob : attiva un aggiornamento manuale dei bob allo screenswap



Text Draw

text(x,y,s,testo,optional type) : stampa il testo sul video con s size. Il tipo di render puo essere default=solid 1,Shaded 2=Blended
setfont(path) : seleziona il font d'uso
getfont() : restituisce il font corrente
textrender(testo,s,optional n) : crea il bob n (se omesso restituisce usa e restituisce il primo libero) contenente il "testo" scritto con il font corrente con size s. Il tipo di render puo essere default=solid 1,Shaded 2=Blended



Print Screen

pen(c) : setta il colore di print con -1 restituisce il colore corrente
paper(c) : settail colore di sfondo del carattere con -1 restituisce il colore corrente
fprints(testo) : stampa un testo monospace nella griglia senza il ritorna finale
prints(testo) : stampa un testo monospace nella griglia
locate(x,y) : muove il cursore di stampa alle coordinate x y
atx : restituisce la coordinata x del cursore
aty : restituisce la coordinata y del cursore
curson : visualizza il cursore lampeggiante sul video alle coordinate (atx,aty)
cursoff : spegne il cursore lampeggiante sul video
inputs(prompt,defs) : raccoglie l'input da tastiera fino alla pressione di invio e lo restituisce
zoneinputs(x,y,l,default) : raccoglie l'input da tastiera fino alla pressione nell'area specificata da x,y,l


Sounds and Music

isenabledsound() : restituisce 1 se sdlsound e'abilitato
soundenabled() : restituisce 1 se sdlsound e'abilitato

soundexists( n) : restituisce 1 se il bancosonoro n esiste 0 se vuoto
deletesound(n) : rimuove dalla memoria il suono n
copysound(s,d) : copia il suono s in d

musicexists() : restituisce 1 se la musica e' caricata 0 se vuoto

playsound(n,c,optional l) : suona il suono n nel canale c l volte
playfreqsound(n,c,pitch,optional l) : suona il suono n nel canale c con frequenza ricampionata a pitch l volte
volumesound(c,optional v) : cambia il volume del canale c (-1 tutti) al valore v (0-128)
soundvolume(c,optional v) : cambia il volume del canale c (-1 tutti) al valore v (0-128)
stopsound(optional c) : ferma l'emissione del wav dal canale c (senza o -1 tutti)
pausesound(optional c) : mette in pausa il canale c (senza o -1 tutti)
resumesound(optional c) : sblocca dalla pausa il canale c (senza o -1 tutti)
?vumetersound(optional c) : restituisce lo stato corrente del canale c(senza o -1 tutti)

sound3d(c,angle,dist) : posiziona il suono
positionsound(c,angle,dist) : posiziona il suono
soundChannels(n) : definisce dinamicamente il numero di canali

playmusic(n) : suona il track xm,mod,ogg,mp3 n e' l numero di volte (-1 continua)
positionmusic(p) : sposta l'esecuzione al secondo indicato
stopmusic : termina la riproduzione del modulo musicale
pausemusic : mette in pausa la musica in esecuzione
resumemusic : riavvia la musica in pausa
rewindmusic : riavvolge la musica corrente
fademusic(t) : esegue la dissolvenza progressiva della musica
volumemusic(optional v) : cambia il volume della musica al valore v (0-128)
musicvolume(optional v) : cambia il volume della musica al valore v (0-128)
speedmusic(v) : cambia la velocita di esecuzione della musica
musicspeed(v) : cambia la velocita di esecuzione della musica



CD Support

numdrivescd() : ritorna il numero di drive cd-rom nel sistema.
countcddrives() : ritorna il numero di drive cd-rom nel sistema.
namecd(drive) : ritorna un' etichetta identificatrice "human-readable", "system-dependent" del cd-rom.
opencd(n,drive) : opre la connessione aun drive cd-rom per l'accesso.
indrivecd(n) : ritorna 1 se il cd e' nel driver
cdinserted(n) : ritorna 1 se il cd e' nel driver
trackscd(n) : ritorna il numero di tracce del cd
countcdtracks(n) : ritorna il numero di tracce del cd
curtrackcd(n) : ritorna la traccia corrente del cd
cdcurtrack(n) : ritorna la traccia corrente del cd
curframecd(n) : ritorna il frame corrente del cd
cdcurframe(n) : ritorna il frame corrente del cd
playcd(n,s,l) : suona il cd dal frame s per l frames
playtrackscd(n,trk1,fr1,ntrks,nfrs) : suona la traccia selezionata/e 0=tutte
playtrackscd(n,trk1,ntrks) : suona tutta la/le traccia/e
playtrackscd(n) : suona tutto il cd
playcdtracks(n,trk1,fr1,ntrks,nfrs) : suona la traccia selezionata/e 0=tutte
playcdtracks(n,trk1,ntrks) : suona tutta la/le traccia/e
playcdtracks(n) : suona tutto il cd
pausecd(n) : mette in pausa il cdrom
resumecd(n) : fa riprendere il cdrom
stopcd(n) : ferma il cdrom
ejectcd(n) : espelle il cdrom
closecd(n) : chiude la connessione al drive cd
tracktypecd(n,t) : ritorna il tipo di traccia: SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...)
cdtracktype(n,t) : ritorna il tipo di traccia: SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...)
tracklengthcd(n,t) : ritorna la lunghezza della traccia t
cdtracklength(n,t) : ritorna la lunghezza della traccia t
trackoffsetcd(n,t) : ritorna l'offset dall'inizio della traccia t in frames
cdtrackoffset(n,t) : ritorna l'offset dall'inizio della traccia t in frames



Video Mpeg

loadmpeg(fname,usesound) : collega il video mpeg
plaympeg(optional loop) : lancia un video mpeg: Attenzione non lavora a fullscreen
stopmpeg() : ferma un video in corso
deletempeg() : scollega il video mpeg
pausempeg() : ferma /riprende il video
rewindmpeg() : riavvolge il video all'inizio
seekmpeg(p) : sposta al 'bytes' lo scorrimento del video
skipmpeg(s) : salta s secondi del video
statusmpeg() : restituisce 1 se plaympeg lavora o altrimenti 0



Keyboard

key(keycode) : restitusce 1 se e' premuto il tasto keycode
inkey : restituisce il codice ascii del tasto premuto
waitkey(optional keycode) : attende la pressione di un tasto(0 qualsiasi)



Mouse

xmouse : restituisce la coordinata x del mouse sul display
ymouse : restituisce la coordinata y del mouse sul display
mousex : restituisce la coordinata x del mouse sul display
mousey : restituisce la coordinata y del mouse sul display
xmousescreen(n) : restituisce la coordinata x del mouse sullo screen
ymousescreen(n) : restituisce la coordinata y del mouse sullo screen
mousescreenx(n) : restituisce la coordinata x del mouse sullo screen
mousescreeny(n) : restituisce la coordinata y del mouse sullo screen
bmouse : restituisce il pulsante premuto del mouse
mousebutton : restituisce il pulsante premuto del mouse
changemouse(optional n) : cambia il cursore di default oì0 con i cursoi emulati su sprite 0 image 0 (1,2,3) se n e' omesso ritorna il cursore corrente
mousepointer(optional n) : cambia il cursore di default oì0 con i cursoi emulati su sprite 0 image 0 (1,2,3) se n e' omesso ritorna il cursore corrente
locatemouse(x,y) : sposta il mouse alle coordinate xy
placemouse(x,y) : sposta il mouse alle coordinate xy
mouseshow : visualizza il cursore del mouse
showmouse : visualizza il cursore del mouse
mousehide : nasconde il cursore del mouse
hidemouse : nasconde il cursore del mouse
mousezone(x,y,w,h) : restituisce 1 se il mouse occupa questa parte dello screen



Joystick

numjoysticks : retituisce il numero di joysticks presenti
namejoystick(i) : retituisce la stringa identificativa del joystick
numaxesjoystick(i) : retituisce il numero di assi del joystick
numballsjoystick(i) : retituisce il numero di trackball del joystick
numhatsjoystick(i) : retituisce il numero di pulsanti direzionali del joystick
numbuttonsjoystick(i) : retituisce il numero di pulsanti del joysitck
getaxisjoystick(i,a) : retituisce lo stato corrente di un asse
gethatjoystick(i,a) : retituisce lo stato corrente di un hat
getbuttonjoystick(i,a) : retituisce lo stato corrente di un pulsante
xgetballjoystick(i,a) : retituisce la posizione relativa x della trackball
ygetballjoystick(i,a) : retituisce la posizione relativa y della trackball
joy(i) : retituisce la coordinata del joystick in formato booleano
bjoy(i) : retituisce i pulsanti premuti del joystick in formato booleano
joybuttons(i) : retituisce i pulsanti premuti del joystick in formato booleano
fire(i) : retituisce i pulsanti premuti del joystick in formato booleano
waitbjoy(optional i) : attende la pressione di un tasto del joystick


SDLtime

wait(t) : attende il trascorrere di t millisecondi
timer : restituisce il tick corrente



Socket

isenabledsock() : ritorna 1 se sdlnet e' abilitata

sock=getfreesock() : ritorna il primo sock libero nel banco sdlSocket
sock=OpenSock(port) : apre una sock in ascolto su una porta. In sdlBasic ci sono 256 stream e la
sintassi e' molto simile ai comandi file open close.
clientsock=AcceptSock(serversock) : Accetta la connessione di un client
IsServerReady(Sock) : ritorna True/False se il server manda dati    
sock=ConnectSock(ServerName,port) : si connette a un server remoto
*ConnectionReadySock(sock) : il server ha accettato la connessione

IsClientReady(Sock) : ritorna True/False se il client manda dati
CloseSock(sock) : Chiude la connessione del socket. Funziona per client e server
*PeekSock(Sock, NumBytes) : legge un dato ricevuto dal socket, ma non lo cancella dal buffer

ReadSock(Sock, NumBytes) : legge NumBytes bytes dal socket
ReadByteSock(Sock) : legge un singolo byte      
ReadLineSock(Sock) : legge una linea
WriteSock(Sock, Message, NumBytes) : manda NumBytes della stringa Message al socket
WriteByteSock(Sock, Byte) : manda un singolo byte
WriteLineSock(Sock, Message) : manda la stringa Message
getremoteip(sock) : ritorna l'indirizzo ip del client remoto connesso
getremoteport(sock) : ritorna la porta di accesso del client remoto connesso
?getlocalip() : ritorna l'indirizzo ip locale(solo linux/mac)





to do:


sprite editor
ide scritta in sdlBasic



generated with sdlbasic
graphics zoiba

usr/src/sdlBasic/share/doc/sdlBasic/italiano/font-license0000777000076500007660000000471410463127270020660 0ustar Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. Bitstream Vera Fonts Copyright ------------------------------ Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera". This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names. The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org. $Id: font-license,v 1.1.1.1 2005/09/24 20:02:06 vroby Exp $ usr/src/sdlBasic/share/doc/sdlBasic/english/0000777000000000000000000000000010645354321017733 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/logo.jpg0000777000076500007660000002414110463122026017630 0ustar ÿØÿàJFIFGGÿÛC  !"$"$ÿÛCÿÀ>"ÿÄÿÄR !1AQRa‘"Uq“¡2Bb”Ñ#5CTV’±Á$3E²á4DFrtƒ¢ÂÒð'Ss‚•ñÿÄÿÄ3!1AQR‘"a2q¡±ÑBðá#bÁñÿÚ ?õæAÌÀÈ;ã™WÚøÀȲm›ãpÛÚ)!J VÔ¥à'%¿ʂ@ˆÖäodù!“rJt&éÔrÝñ0¬´ºåKIQP;ÈÒÆßátP Œ[ûGÇ â`¥HL6X_kã­.v¾1Ïx {G»Fù˜DwÄr¬û¸\Ç=; ªQV¤û#k?´“ AâcªR3eR¹¾"vŽª¾0a0±ôþ1ƒM´$œ°*A+Ì.t}¡L©æbÉÙ”ºCz€‹ûN¿áã™é‚´ €csbóÌ÷ ;â¥.3B*,›È òÜ‘®øE¡K( …øreëݵðÔ^•¯hVUeZÄ^ð\¤“¨9 .VŽøæÑ¾f#Ù³…Aoä°¸ï†Á×3”ç½»áȼÅíÊL8óM´§HJA'Ø#3œ­b:ÄÃÓ’uEÓdŠXm …ÄÞ-u—òTÊBËdoˆü?MmtYe6‹›ØGn ¨Rä\𜸆wô®’3bêƒUµP± ûU¯V& ÍÜcHl¡cCæ.ÂOTXjbD†çeÕvÎìÔ)J­V$ÚK59 ”¸ ’. J+ÔÇÌGóªÙÅæ…‘<Ìs*y˜ª',òiÏvc§/õi¿tc—eS¶_j½%¤„& TÄÅX×ÖͦýÑ‚šÚÏù´ß»1¶U;`ÚŽ’Ò\lq0Ró|ÌUh\mû@›]h C¤Ì)báÍ|MÃ'Ä"í‡I=·o™…ZJžA[{„UŸ-¬6œî¸w%&ÕR«.•6Ü“Ö;ÁPŠS¥Q…À…j‹ê$âævKô½$ñæ!Àq². ŠØ\û’á÷eÔ„©YlV ¿²õTz"“4@Ðb­AòƒmˆB9KVds™â¬*uoTMøˆ2ÕˆfÒË •J·­Å\§ì‰Š/Ïïi~ Œq ËŠMϸ.§©e<Ï|Rªu¼YCJgÕ\\óM(mš[I #Ú^ehI4¤ —_tÝ畽F"±-)µE–UgQÉ&=&’Yl áÄŠ¤æ'\Æ3S’4ö(d53<ŒêqBû!ÇNqR¬âÊ3}|WW<Ó*ÆÜe!$}‚+ý)ÉÉÊeTÁø‚cFÅ4Àœ7RVMÒÎßTè¥H„°?ý“ªj·¨?‡kÒõz\¼ã`§jJo¸ñ$&›²‰Ð¦÷ãÊ2Nˆç机œë[`¥Yˆ)Qß¾/¨e>ЉôN úÿ„yÏH`ÐÎõ¨r‚Dž3MŽpS6ß|G%§¬òÉ]¯¿‡8`ö¾1Ì×ѳ·HôηÈÀë­÷ÃWeP–â_ºŽñÊ ÓÛ ß߆óÂ=mžq‰ñ3ò¢H–3î úGÐls1&eˆú_®R%DÅf¨á¹t($žîÂ:0ª‰~N£½¬$<ÔÖ-rêw†™.À)0عŠÏúY7÷t~r]5AZÀJR.IÜ"•9ްª0̔ɨLKº–”ÔºJ”¥oG¸òMG<÷Z ê~¦iŠÿk&þbÉÎÆ"ë EöÂ"ä:KÂîTU!Rfv–èp¶2É$|á¤hRò Ì2—˜R\mbéRMÁÂüJ<Tc£}ä-+ÎJÌ"SÈuu(Ù3 › ûyEŪ» )0"àƒ¾ êXy‰ù5Ë>ECCmRyˆˆ¦Ñ±lJ'¥SóNk(â¯I^ž‡¤î¦ÕF‡Yuò“}“Êmò1\LûÍ$ÊlÓ ÜUkˆtó9Mvf]À H׺8Í:‹k‰LíVñTû³K§áùd8ò?­}ߘßâbfc¬ÝXÆÖw¥™tå1aÃÔä+e½v¤©j¶¤÷Çjé¤SÝŸ¨¾Ü¼»I̵¬Øªléú@ú^rU[[ʶÓþÖMýÝ„ ø¯ö²oîèü"¼ÿK˜uO©ê=^¢ÐÜó,Y'Ù{@*ÈôN½î“øÅõìå»÷¬°çŵ“wGá>+ý¬›ûº?¯|ªHþÉ×½Ê*´áªð­y)âv Ûã^ÁàMzOÖ[”Þ#K ­8ÆmÅ®ùG£ð†ÊÄx¾‰ý"baš¤¢å‘•`sÒàŒIBÅ-8i3 6,ã£+ˆöƒÓ4d=.ãKEÒ´”›Žq6t—Qà p*0̇ïV5“VUY„Ý>Š ×?/ª½;Œ^g­y}L:àΙt2’”ŽöŠ–úÅ=d© T D(ïÊ¢ŸåòiIÊ›'@ˆ‰Bâ×ןHîjÕƒ"ð&4r§.¹:šB'åÎUÛ@¾ûEµ•ºñŸb +P–¬"µFFeþ™­Å]ñ+!VZP”ÍÈÍ´åµQLj¥™óRàyt4š [4· Öù0œo¾+žU`%ç=ÉŽ£\%ç=шljô´2Ì&›ïމ†Ï*#„¼çº0<ª?W›÷FʯlÛSÒZ¶íó1ݪ2•ka¼Åb^¦Û®†‰u¥ÁÄ”Þçt‹ Žñs¬)M›HE_i'??/'$ôÛ¤äiF3‡ª˜¦§š}uÓYpþE†Ú !<É1`ÅEÐfZ :¢Ûûã´jyz“(âÅÉi?Â;ð… ‘}m9«³Ô6]$FÅÕ-=A¯<x Í?`’¡ÈˆÐ›˜iB÷ŒW…ÓºS¦z É•žòoçêTóŽ6ŒK”8*-qQ‚YùI Wˆ07+!/Ögßþ­»è3Ý)©¼\íÔõ}«?£–`>Ór™œY2¥§2ƒ#"¹û1*ºbR’¥ ©&:id¦£MN½dêš•5YUi™Ép¡‹§‹¹Ò%‘`-¾ö†»LWûY7÷t~ZßHX‘0¹YŠÓN<“•M° мŽùUÀ¬Ï}ÉÏÂ:Aÿ ð?”³ro¼“ÏŠÿk&þîÂ|WûY7÷t~ò«?Xžû“Ÿ„•\ úÌ÷Üœü ÜöñïÝ÷’Yñ_ídßÝÑø@ÏŠøbÉ¿»£ðˆß•L úÌ÷Üœü |ª`NßrsðsØ<Ä×~ï¼›ÃØÂ³L®7I¯º™¶ßþ¥ð•}± µTicŒ`-×ÅøæRv›$ü½2I$!ÇP§I"äZF½JB–u|cÍÇ…WEµØj• k,Šž@#ÒÌm`nD¼‹c¦øŽ,­ ­h>šS™ ©¡5"d^躲•n']§|sªf§;t’½y¾F_o¾!•,9•+¶©H°Ùµ4òHBT”ÚÃBc lZÐÜÇ]y¾F^o‘„*2 ¨^Úëê©í–·šíëæÍék[„‰·¥{ÂT[U\v‡ŒbO ®ÑЛlóƒ¥ôpÑ2«(RÒA ߬¤æ½•b7ëÕkÃsÌI¸ƒÎ2žpÉWkã ¥+í|c^8>ÑÐJO ¼[mh»€)FÁ‹«ÙßH]Ǧ<`«—K“ *Ä©7úD àÜóÔ¢}cÛYp¬Ýa²¢P$‘¼gQ %¤<¡’$[FÍ[Eé¢JŽãèqoª-쇉C Üó†p£„Ãå;™}Ÿ„g± ¯ÝÎ9Ç#¼?ÌMÜÊF[i§Mj_gá3§‘‚,¤‚,uùÆ®-a‚›( ÂjR»?P!QUÖ£ºæµø )3L¥å­¥æ(B. ôÆüae¦T´%n ·Q×wàwó‡./[ë¦îèIÇÔVTI½‡ÀC­b¢Ñ â©Fa¢mÝkA‘*·• ¹††eW¾°¬­El:TïÀÄ…‰€2_Y×¥ÜhœÈÔGÆd…$\è3³nÌ©k&ÂæÃp‚É=fïª´Ššcgšc–úpœ,(}„¶¤éa¡µ¡ÖØ ð‚-ih•„ÄÝhR¹ƒÜ ÈI½Ï¤mkÚ8·ŠU™$‚ Ä7SêÌTIÌu0Cœ„^! Glí¥–Ý¾p#tUðž#”¤Ï9‡+NõGBÉ•qÓdº“Àc”OµwÅÒéõ¹U1?(‡Ðx)7Šá뢂ÀÄ-¨*u—ÖËN$)%I;ˆPƒØv‡Œ`s8†ŽYZa†ø!ºƒÉHî+HIx!iJ k•Åf(½§üq|ÔOúK-f<‡Ÿõ=³•$„©wôx@eÆ{Þ<üŠF)ÃÊò…T›ô”ÌËÊy·àB®| l7.¹‡åçÞobò†WQš¡¡åK¡¸Œµµ³ KEGr*õÏ­®wÄò™M¢ÎW$•9J˜`h²‚Pm¹\#?ÃuMÓB´ÎB;*Ä}†ñ 9:6jô¸ÀpMmÓç첟zÞõqU§™,z‰ Ž¥ÇÊz“"ܬ¢ R «”¢5…f%ñÌ»ææ 5—¼»WV¹ðŒ¦f•Œc†«rŒÍV&jôÇÖq¹ ã`ét¨ñéªlæ ­—ŠÍ×f`lÌ4ëºo×>´O)–Ú$u³ˆ|nÙó:±þÄï÷L>ëŸZ!ñ¬åð…_Òÿ2wû¦æ*:d3-èi%SôÐÿÈcfÄ2nMPgåšMÜv]hHæJLb]MÏPÿAÿ!Ç®}h¥Ps_ûÆ*ÊA˜ïEϽ!O——ùŽ´ÞÍW‚ó:R`™pœ£x7´';E£MM•0Yt›©Mf<ÈŽ¢˜Ûi³î'ýqp#ž¥2ìX^kh1¦@ÐnÒ Ö".nyTéÀÄáÌÚ¾k hbAµ6â’nâ#š¥6N2Fý`8pO²ÐtL­) ÀwATßVœáZ£0±1nG8äL¬D6ÂÍ•TêJ¶ò“ü`…v|#…§”j"ûŠñŽŒ-Èoï8Èã0¼ïKÕz=¬7K*&\€S¼¥o²ñ’t}NÙ&Ù§þK@I Ôž~ÞøÞŒàP AÐƒÆ ÝÃÔ%Ì™„²¦u!¥X_Ù%²eá,BÍyH™Ãó²ÊDĺ\ Ý;᮫Nt{5Ôê%çðêÏ¢»*PÿŸÂ4¡M§dBÞÍ{EZ}ÆRr—<¯ó¯¤è4³  ê:~$ª(¸ ë,”Ìi„jVX‚žñ<鸉Ùweæž]öÝO4,È«8ƒQ9ݥˬóÙˆ€8fw͵TÓS2eµ‚©t8KN)(½µæ )¥PÙIÞ6Ñ×RžSY’R¡™'x1šÔæÕIÄÕ 9Pȶí¨«ÿ‹Ô•D¿&ËÊ%ÆÂˆ<./Iså)Ü(þkG÷ÕMN ÃV¢œ¶šÆ Fl9*¡ÄïÏ?ñK¨JÑY!J¦u‚fR7)@z ÷oð‹¦¾‘%[мbbeÖ&˜S-¡æ•½*5Ùjú™áÚ+*e¦Ð–en€œ£òið‹CtkÌÓ lvRæé2Ä‹×ûñÌhÜÞð›u”ÿ ¤~ˆxAWDEÚM½‘qT¥-$•_yÎàÈ–¥Ü¨Nô¤9©wcÔÁoyGÃ\§JÔäQ²SWKªE ï5"Ö†2û,## ¥±ÆÐeNi¾*s‘”ÓYçÊcn®r¶ÓD…ùJ`¤ò!ÅZ5ü Œ)µ‰$I̾‰j£!ùwU•WE÷ƒÎ2Ü‘5Z¬ß[T¦‹Š‹ukÓkM!É™`]@ôO¢´û5õ*¨¨ÉSÌç¦*²ôš "á@ý±ÛÐñŒ"g£×[U›«×xQ{þ¸np$ÈžkŸý‹ßõÄïK»é.û~¿êoæÀ\«NqÐ’EÁŒ²Œö)¤¹$Êëm9H—Jƒ©™MÖSþ¾ûŽûƃ!>•É´´®éRsÌv¥e¸1…`MŒ’È®ø :ïÖ×;âyLm¢È.’P¹jªh*QiRÏÔ½†ÿ²¡Ï‰¹fסºD7éfsÿ-ëÖV½MÂ)ø"¨ê¤¥[A*ZÀ ðj¡jkÖò ๷´Ñ*‡¥‹]Nh/M“T­>^]Z©¶Ò“á $D¢·Ô˜#^I‡=vûÕTªå«‘xñ™K²/3)5¤õuÊ-«}  «xE›°ÂH±¸‰ú«RuIC+:Ú]lê/½'˜Š¢‹Øb¢Ü»Žm%¡WÔm¥3T¢%^NQØËŠ^ýóŸK¨'£ÚÁ¦f=\„”ï‰ð¼#H¨1[ùUº_ùˆ±®i+B»)$Xƒ¸ˆ¦ ©ö …JÏ;`ì1"Ô›HjY²@•–äž$˜¹Ëá¦òèèýؼ/ ÐŒÁ}¦—.£ô[U“á ù%¤6®­8æq¸/tEѯš«ûL¤y´ßêèýÈï›H·ù2?r,íO¡™ž«<‹·°'r¢a¤4¡tds¸¨†ÄÄ׬ Œ2Ž2ÉýÈèÃ-þ¬Ü M\sU"e¾É€Äƒ¡‡^²™O¢ìÈÐO±1c’C$ ¿³@àc¤7MIŠoÖ&—œI¸»£©˜Z@ @ÐXß[ěВ2)Gå=šÄb€K©·cD- 1™Jó…ërøG6ŽÞùùÚìÇ#)·á¿¶=b!ɃÀøA‚¦á ÀÁ•0ØE“›i~ëZ ¡cañ4)Ԫñ˾b`‹êA;ùÔ̷ÈÁÄÃD‚AÓt0#-£:ÆÄM‹äI ï£ º•)YHÌwm“2Ñç ÚàÓ–8QÖ&„º>Â4ÚVÉR‰Î7}EƶÝ>*&]bÇ‚¸AEÚò€…÷‰¥O´2¥€nµ‰ Ëìü!¬£%.íž±]¬wwœr0ÕH$2üç.®ÏÂeö~6ž²œ¶ßÎ9œoæwÐú±Â[ÊD ƒ™„ßmÅ$¥µ$%BÆñ€¹‡^‘BPý"”«K@ &äØZðE2;àA¯H‘Z{eÒ^S»,*¶½°ŠÛöÀ2fðR¹bðZå BnáAË~×]q« …[»t&ïmŸ-¸Ž1m•”“ÂMˆ<?W¿f“ ÀöGs¨p1Í¢»ã[)¸‹aRŠMÿ.@P±Kˆp†P‘a”B_AD¨…ɶø(udn1J•À- À‡˜SÉp¥J”gÿåc§Àp„ÒãªVU! l‹©Y,wÜ· ;àq™@nàë±”mlâM²ÛR!ÅEµ­ ï ¤»,&X¿f …©I½Œ:‡ì,ldøÂ*U)IRŠ@䘅ò“s/)º|›“)I±wD£ÄÃÌLë£Ïlж*°Èɤqå1º{rÓUäÔÈʦ֬ºóCƒZÈ\‹Úqâ±+B×IZæïùµ²÷“Mì¶ýòc:8ïõÙ_x yù‡=})ïDvn)Û÷üÎAúšŽ_ß@™jnx^j^FZÞšöJ#‡LMÊI²™iA•¤qíqšw†Îúì§¼Ôcœ6¥¥"¹)rl?(!× ”X¯ú‘mÓ|¨ž×ƪ$XÞ)ÏW𲦥e©ø†VuÇФ¶»”Q 3°ì¼Ë²îÖåãK(RKƒB ŒDxéÆiNÕP«hxƇf‚hµG¯¢'Ü'ÙQ3_éƒ)LuÉZ“SO¨¶Û*Ì¢®Ó¢Ú$Ìæ˜¨RU:µ,鸒MüL ¡hÓÌÝD¶«Ösò›>²Óò,ºÚó!H² 1MŸ]Ÿn & ¬ê“hÂ…ô¸îŒñª½SÍmb]ç$/ù'’/1-ãÌ6¶Ò³Z•Mø)v>C‡æºƒ qM¬ÃQ-´Ú<ܾT*¥$¤vÊ}/–’•¦I?Ö^˜3³ ù¾’˜Ï|ûÃ^½“÷‚ÇxhÿnÉûÁP8Çõ3È §š &ù yPv£0óï zöOÞ}á¯^ÉûÁ »ÉoÆiþSOj"qH+ US›|£ƒþo>ðϯdýàŠÎ<ÇÒÓ’ ¢Ðë³sc![z¥ ;Íá–†³olþ‘ÎHôS8¡þ_Ý1²yQ=¯Œa-S*¸z“K©Ë4¥ªUu6àwü"Ç)hK¥ÇªMK/r›uYT“SW:ê5ûÎŒN!©=ŒÔü¨žÔ*'µÇxkײ~ð@óó úöOÞ Ï¿¤ÎÍKNK©‰ÄwˆŽ§ùRœ²$fXš—àÓ¦ÊGóó zöOÞ}á¯^ÉûÁáî,c§êfšŠ½\¤J•¿ûH€juR?6JýäFgçÞõ쟼<úÃ~¼“÷‚'¹'oßóüù|M"B½.ýCÉó¬‰I“óA ¥^Ãt)ôµZ«£6‰x‰Œ²w3ZÆ4©j3«™ 9wœ@ômqax•Ä59¬5‰ß™mÅSçe-"ùO?‰†L*#å^,8|Œ£bYèíàf±åDö yQ=¨Ì|úÙA5¹DÜ^ÅbñÏ>ðÐþÝ“÷‚wœ»ñš•ÚˆêËRUd£¬)m¸ßÌqÇøEÏÌ3ëÙ?x y÷†½{'ïaBÜ&â%úIòÍ„7W–u#ÿY½@‡™E<—ê3ýl§T´Ú2¤Î|ûÃ^½“÷‚;çÞõ쟼»·?ü–ÿ(zM=UT•\z#€#dzèšé5òÚ‚¶TÐÜn£¬ô—‡¤Y;á:ñƒlzDŸ² 0T…V¹5UÄ3ÒêmÙÆÔ–wk‘i!f‡­RµA¦‚lX¤…$ ‰‰:Ž ”§É¹98úZa¤æZÔt2l1‹©òÔÓêsh“zX”ÙÓk‹ïYÅÕÉŒuUfƒGR×NB¯0è8y{"‡’Ü$—îùŒ»ÍtàËÓ}á¯^ÉûÁX›¤ŠD¥9b›:‰éÇKM²¬Ú÷ò…{Éï¬xGÔY—©×}a(î’Oúêb•[™™— –¥,µmâ‚ö^0 •B•…ÅVyµ­Ç¦ƒÎ‹^à’Oñ‹¹Çô7›Bœ¬°Ð¶ˆRìSÝh™Â­VgëiÞøÓ‡EFãi§9P'Z[Gýò`†vsÕ-{äÆeçÞõ쯽çæõô§½¹/O¿æGü··÷ÄЖ3Î¥ê®ÂZ]³t°Ú‚”£ßMM±d¶2  $„f>}á¾5Ù?x#ž}á¯^ÉûÁ{i$ÿ©á4ÿ*'µʉíFaçæõ쟼<ûÃ^½“÷‚ÂO~2ÙÒ¤úÑå`BŠ¥Wt‹ÜECT:´Õ ›¸‚Hö_ðŠ×H˜ÞB¡HU4™Ù™Ë ì½ ”÷‰ÊUFK S'¥P²üŠARG#¬fERŠÜÉûN¬=guwlꪂI*Ô÷Ç<¨žÔer8ö†ì²W5QjUÑ¢ÛuYH0©Çxho®ÉûÁáˆ6"rïÆiþTO?ŒR:_­¸ÅD2æR¹æÒ£Ä§]"ϼ5ëÙ?x"‘Z­/bÙ)*fw)Òkηm¢ÕÝÜ ­ ž£ÀG§‰z¬f³†ªcι›«tªå‹o•ÚøÆE‰EKÕY®Ë´ã²ª@CÉO!ÿä=kaÕ´•®±.Ñ#æ­V#Ú!©M]xZS‰jUH3Pò¢{P<¨žÔf}á¯^ÉûÁϼ5ëÙ?x îòñš5AéIövS"ý•œ˜BDÔ¤Ò+U–q¾a&â(mô†Ð•¤W$HXÖîA<ûÃ^½“÷‚1ÃÜXÊ/ê%fžÔýmjDÝ)J;€JŒsÕÄ(¡S4À¡À¡WŠÇ4a=·’ªJL8פP}"}ŠÉÄ•§XR2´^MÉ=ت‹NªxÜ맚ɺN(Jê~L©6ÛSæ)?5qe ii ë{œÄ>VéY‰ZQ/KȨ¥çSóJ¸‹ñ¶±³Ó_qÄsG:’Ñq—˜XzÍQI#œ–ZÜA¶LÝãXU´¥×él6”¥ïsΤ¯’¡B\JŠT•7ƒÞ ¬¸&IY»i–ðD§;¥jB-¸ZßKŽ)A)J‰;„H=…­?´x¦[=˜MÖZB3-H@V‰$€/ Öêм‹J’¡ÀÁ^Ö½2l•\'5Šˆð‚€f¦Ì:EJ ²œe'5”J†‡—ýò€I‚>Ý!¹`fIshBÎk ×7þ&(¨,€J…ô#ˆ†p z`þ!ƒ qp”§RGÙqµ¡„»˜Ü8ˆ Œé Ö)ñ­nQvȰ$$_„.‚Ÿ«!¿l+²:X®ºîÄÇ‹¥Iú°pP{0šYðr„¿…õ0D ¼7¡õ`zVÖW/cÈ9˜$Zg2¯µñ•}¯Œs9ä g<„·¹WÚøÀÊ¾×Æ9œò3žB4×) ±Öÿl „-Ç”r­¶å_|/œò3žB&Ò&e‰úPS*yüalçœò¶‚Ëõ3ÌxÀêG˜ñ‡Ï! XQ$‚ámѬ&²Æê‘}¶Rï0ç9ä g<„kM•#n¥ÞFðï«ñ1Ôt9‡ÐâVŠj’n Ά6Ý’y&É<“ ¼Uî>aØÒí™7ÉSKŽIRå}ÄdS¡Û»‘Šó½a÷][®Sµ­EJQQ¹'y·džI³O!âjŸÜfÙRé1™ˆ0ü³éuºka@érbùFÃH–BR”%)Àk ¤ptú;€‰»³üFñ‚S^WªØ^J£,Y›—iärX¼Pªá‡\Rü–ÕÏ"c`Îy"€<ªé¢’ 4éž"aêèg ƒ¥1& zþ¬oÄÆà[O!Ù§‡Þ*÷0l©vÌ<ô3‡}Z߉ò1‡}X†É<“džÊ`o{™¶TºL?äcz±&%h=R)o‡e$m|÷Ú5Íšyp½F,|Â)Ò+RX]£(´¸)µŠUÆ*•nŠ0¼ûÎ8º[[KëbcMyvV”ßx1ÙvvaEV*Q¹åŒi­Õ­ò’›DÅ^èc fҖ߉„þF0ß«ñ1¸Òx4ò7нÇÌÛ*]³ùÞ¬oÄÀùÃû1¿~É<“džI¼Uî>fÙR혈èoú±¿ áßV#ÄÆÛ²Oe1Ýšy;ÍnãæmÙ˜a®ŽéÔuæ’“m£Ìo‹<Þ”Ÿ’2Ó¬!æÏE¤ a¸D‹±lÄëJvµ¦CRès ¸²¡Jnç¼ÄZºÃwüØ‚€<fžB+¼Öî>bŠ4Gí˜ÈÆõb?xÀùÃ~¬GïÛöiä l“É1·Š½ÇÌ;*]&":ÃWÖ˜€8êaGú¡Â§¥ÄðQ¸¼m[$öS,¡;‘ìF&¥µcæm•.Ñ1êoDô)GÙ¦2x¼])8]éJR„¤ n ¤pt鸋»>¬o*gõîŒpåUåLMÓZqÕo7"ð•£úm&è”m”öß1Uøå‡! Õ]—)ch:@Ü d%>„–’7D‡“–ÚCв79ä"ve•,O‚)5¶²T$ÚzÛ‰ßãiÞ†p¾c–”ßïÙŠÉÞI€Š­jˆ,¬@ùÄ4©r&zÃWüÖé}P$¦RûÖÂÆânccÙ§ð€Hà œES¡cæ!ÊT¥°¬»’ª—˜e4¡b… ŠýK¢<*ñRü’Öc¼æ1¨'Nµà!R«Óø‰š7ø…æ(÷C˜l¨Ú–߉„C˜sÕˆñ1¶–ÒxæÍ<„>ó[¸ùƒcG¶b'¡¼;êÆüLpô5‡öbâœòSy‰¹9Œk»„VVð!R«ÓøIµ:mÄL=Ά0Ýô¥·ûÆ ò1‡=XßïÜ iä#›4òûÅ^ãæ •.Ù‡üŒaÏV7â`éè_ l”³ ÊJmè’ncmÙ'’`«—md$\AŠ—Õ™*]³¦ôSG§Í&jJL2êw)*1aV˜Tªåv(q9W²J‡´FŠHú)ðŽìÓÈ@8нÇÌ"1ÊfØkÈÒzœ²*>’·“öÅÞB•³@1&”ÀA”æDXh"$—7:˜B ¿Qï1ÄÈ/9ZÜÌw^ç<„ çŒ …¦Ê‘·Rï1ÅʸØÎѺ’n,aÖsÈ@ÎyC –Guwæ^ Z‚ ÔUÆu#ÏãsžBrd—R„‹«}Šù €‚Ê8Îu#{ß…·Àêg˜ñ‡Ï!9ä"v†Ë*EüÖKˆ(äoi¤6¦ÙBÂ÷uœòÀBTTNòø¦{‹,£„àd¥ñƒ(qøÀÎyÏ!éÊ¾×Æ ã;Aeëö˜îsÈ@Îy Û„Þ˜ÙJBRláxîUö¾1Ìçœò¦ôÏÿÙusr/src/sdlBasic/share/doc/sdlBasic/english/pattern.png0000777000076500007660000000020510463122070020343 0ustar ‰PNG  IHDR PXê pHYs  šœtIMEÔ  ®F¬Í$IDAT×c|û÷nÀÄ€fùöïÍ 'd7Í ×ø(ŠY­IEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/0000777000000000000000000000000010645354324021565 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/splash.html0000755000000000000000000000157610644532445023756 0ustar rootroot splash


reference guide
Actarus version

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/0000777000000000000000000000000010645354557023443 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/lineBreaks.html0000777000076500007660000000314210463126213024630 0ustar Line Breaks
Line Breaks

Each line can contain one or more statements separated by colons.

' several statements on a line
a = 12 : b = 34 : c = 56

Statements can be split into multiple lines following an operator.

' a line split into several lines
print a + b /
c + 12

 
 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/bindingPrograms.html0000777000076500007660000000524410463126151025704 0ustar Binding programs
Binding programs

sdlBasic provide two way to bind your programs with runtime executable.

Autoexec

You can copy the sdlBrt.exe executable into the folder containing you program and rename it as the same name of your program. For example you have a program named myprog.sdlbas, you can rename 
sdlBrt.exe executable as myprog.exe in Windows or myprog in Linux. Doing so, you can now start program simply by typing:

myprog
 
or  double-clicking on it's icon on Windows or KDE



Embedded code

You can create executables that embed your program code from inside sdlBasic Editor. To do so, load your program into sdlBasic Editor and choose create executable from plugins menu, your program will be embedded into executable and saved into the folder where you program lies. On Linux machines you have to assign executable rights to newly created file in order to execute it, on windows this in not required. You can now start your program by double-clicking on it or calling it from command line or shell. Be aware that your embedded code is not protected in any way, anyone can easly extract it using a common text editor: embedded code is only a convenient way to distribute your projects.

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/variables.html0000777000076500007660000001351310463126213024524 0ustar Variables
Variables

You can imagine variables as containener of number or text (strings). You can assig values to variables, that are stored in computer memory, and later recall that values by simply type the variables names.

For example:
' create variables
a = 2
b = 5
' use the previuosly created variables
c = a + b

Variable names can be any sequence of uppercase and lowercase letters and numbers.
There are only a few rules. Variable names must:
  • begin with a letter;
  • be different from reserved words like commands and internal constants;
  • do not contain any embedded space, if a space is required use underscore ( _ ) character instead;
Example:
1st_player = 1
is wrong because it starts with a number. Following examples are correct:
player_1st = 1
player1 = 1

Example:
bin =  "some text"
is wrong because bin is a command name. Following examples are correct:
bin2 = "some text"
binary = "some text"

Example:
alien x = 1oo
is wrong because variable name is not continuous and contain a space. Following examples are correct:
alien_x = 100
alienX = 100

There are no types in sdlBasic; all variables and arrays are variants. This means that they
can hold either numeric or string values. In general, sdlBasic will attempt to automatically cast a variable to the correct type.

For example:
' create variables
a = "123"
b = 456
 
' variable a is automatically converted to a number
Print a + b

this means you can compare strings to numbers as the following example:

a = "123"
b = 123
if a=b then : print “they match” : end if

Comparing stings to numbers may be particularly useful when you use dynamic array feature because its indexes are stored as strings.
 
 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/overviewIndex.html0000777000076500007660000000453310463126213025414 0ustar overviewIndex
sdlBasic language overview 

Installation Files path Case Sensitivity Comments Variables Scope Of Variables Line Breaks Arrays Dynamic Arrays Block Structures Functions Pass By Reference Graphic and Sound Running Programs
Debugging Binding programs Distributing programs usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/scopeOfVariables.html0000777000076500007660000001572310463126213026010 0ustar Scope Of Variables
Scope of Variables

When a variable is created, it is scoped to the current context. That mean it is visible to anything in the current scope or greater. The widest scope is the module:

Dim newVar = 12

The next scope is the routine:

Function myRoutine()
    Dim newVar = 12
End Function

When sdlBasic encounters a variable in a routine, it checks to see if there is a variable scoped to the routine of the same name and use that.

Dim myVar = "module variable"     ' This is declared at the module level
Function myRoutine()
   Dim myVar = "routine variable" ' This is declared at the routine level
   myVar = "new value"           ' Use the local routine version of myVar
   return myVar
End Function
print myRoutine()
print myVar

If not, it checks to see if there is a module variable and uses that.
 
Dim myVar = "module variable" ' This is declared at the module level
Function myRoutine()
   myVar = "new value"   ' use the module version of myVar
   return myVar
End Function
print myRoutine()
print myVar
 
If there is no routine or module version of the variable, one will be created in the current scope.

Function myRoutine()
   myVar = "new value"      ' create a variable scoped to the routine
End Function
 
Variables scoped to routines are only visible within the routines that they are scoped to:

Function myRoutine()
   myVar = 12
   print myVar   ' myVar is visible here
End Function

myRoutine()
print myVar  ' myVar is invisible here

You can prevent sdlBasic from creating variables with the Option Explicit statement.
 
With Option Explicit you will need to declare your variables before use:

Option Explicit
Dim newVar = "create me"
 
If you use Option Explicit your module level variables will be hidden from your routines unless you specifically declare them visible with the Shared keyword or if they are declared as Common ( or Global ):

Option Explicit
Dim myVar = "module variable"
 
Function myFunction()
   Shared myVar
   myVar = "new value"
End Function
 
or:

Option Explicit
Dim Common myVar = "module variable"
 
Function myFunction()
   myVar = "new value"
End Function
 
 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/distributingPrograms.html0000777000076500007660000000137110463126151026776 0ustar Distributing your programs
Distributing your programs

to be written

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/runningPrograms.html0000777000076500007660000001132010463126213025741 0ustar Running sdlBasic Programs
Running sdlBasic Programs

sdlBasic programs are written as plain text files. You can use any sort of editor, as long as you save in plain text (.TXT) format. To run a program written in sdlBasic, you only have to have the sdlBasic executable, sdlbasic.exe (in Linux, sdlBasic) in the current directory, or somewhere in your path. If there are any includefiles, they must be in the same directory as the source file.

Running sdlBasic from the Command Line
If you use the Windows command line or Linux shell, you can simply type:

sdlbasic filename

where filename is the name of the file you want to run. For example, to run a program
called myprog.sdlbas, you would write:

sdlbasic myprog.sdlbas

There are some switch you can pass to the interpreter before it starts the program execution. They are:

--nosound : prevents the starting of the SDL sound system
--nosocket : prevents the starting of the SDL socket
--debug : activate the debug mode
--nodefaults : prevents the creation of default display when program starts
--version : prints the sdlBasic release number
--help : prints sdlBrt parameters list
--copyright : prints copyright stuff
--license : prints license stuff

so your command line would become:

sdlbasic myprog.sdlbas --nosound

on some Linux machines you may experience trouble with sound device if other applications are using sound card capables. Try starting program as shown here below to fix the problem.

artsdsp -m sdlbasic myprog.sdlbas

Running sdlBasic programs from Windows or KDE

The simplest method is just to associate an extension, such as .sdlbas with the sdlBrt.exe executable. Then you can just double-click files with that extension, and Windows or KDE will automatically launch the sdlBasic interpreter.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/blockStructures.html0000777000076500007660000000261310463126151025752 0ustar Block Structures
Block Structures

In addition to the standard BASIC structures:

For ... Next
While ... Wend

you can use the Algol inspired forms:

For ... End For
While ... End While
 
 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/FilesPath.html0000777000076500007660000000267010463126151024436 0ustar Files path
Files path

The program path will be the current folder. Practically, to load a file lying in the same directory of program, you have simply to write the file name without any refer to the directory. On an opposite side, if the file is located on a subdirectory (for example "media") you have to write the name of the directory followed by the slash symbol ( / ) and then the file name (media/myfile.txt). Be aware of the use of the / symbol on Windows platform too. This make possible port programs from Windows to Linux (and vice versa) without any modifications. On Windows is possible to use the backslash ( \ ) symbol too but this is discouraged.

 
 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/debugging.html0000777000076500007660000000413110463126151024504 0ustar debugging
Debugging

debug screen work with option --debug at start or when you press ctrl+c key during basic program execution or when invoked by stop command from inside basic program lines.
  • F5 key allow sdlBasic interpreter to continue the normal execution.
  • F6 key force sdlBasic to execute the program line by line one step at time.
  • F4 key allow you typing a variable name to watch it's value.  If variable is an array then you must enter the name of the array without the square bracket and, when you prompted to, you must enter the indexes of wanted  record.
  • Ctrl + c keys close sdlBasic  window.

debug


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/graphicAndSound.html0000777000076500007660000001627310463126151025634 0ustar Graphic Commands
Graphic and Sound

sdlBasic syntax follows the Amos/darkBasic philosophy. There are some data banks (slots), called by number, where sounds and images are stored. Multimedia files are loaded from disk to slots by a specific set of commands, sdlBasic can handle different file formats for images, sound and music. Can be loaded and stored up to 32768 images and up to 1024 sounds files. Naturally is possible to change parameters values by writing on sources but, for ordinary use, current values should be quite enough.

Specific commands allow you to play sounds stored in sound slots using computer sound card. Sounds can be played through different sound channels so several sounds may be played at the same time. You can dynamically change the
maximum number of channels managed by sdlBasic for playing sounds.

sdlBasic offer two set of instructions for displaying images, that are stored in image slots, on computer monitor: they are called Sprites and Bobs. You can use up to 1024 sprites and 1024 bobs simultaneously on display. Bob and Sprites can be moved around without destroying any existing graphics on background, so they are perfect for the moving objects required by video games. Sprites and Bobs are "refreshed" (re-painted on computer monitor) each time a "screen swap" is performed. By apposite commands is possible to check collisions between sprites or between a bobs.
Sprites are completely independent from screens. If needed, they can be clipped by specific command within desired coordinates.
Bobs are very similar to sprites but, unlike them, they are relative to screens, that means that bob can't exist outside screen surface and that the bobs coordinate system is relative to its screen, so, if screen scrolls screen's bobs follow. You can decide on what screen a particular bob must operate. Bobs are perfect in program using large scrolling screens.


Display is where the graphical output is shown on computer monitor, it could be a window or the full screen. By default sdlBasic open a windows (640 x 480 pixels) with the desktop color depth. With the command setDisplay() you can change display parameters. Graphical output doesn't happen directly on display but it is executed into some virtual screens. sdlBasic allow 8 (0-7) virtual screens. A virtual screen is a sort of digital canvas where all graphic operations are executed . Screen 0 is opened by default with the display dimensions, that way it cover all the display surface. Naturally it's possible to change this parameters and to open and to close more screens. In video games it's common pratice to have a big screen for the game area and a smaller one for scores, lives etc.

Example:
screenOpen(0,640,400,0,0,640,400,0)
screenOpen(1,640,80,0,400,640,80,0)

This way screen 0 will have the size of 640x400 pixels and it will be in the upper side of display, at the same time screen 1, that will be 640x80 pixels, will be shown in the lower side of display, under screen 0.
It's possible to open screens bigger than it's visible size by writing:

Example:
screenOpen(0,6400,400,0,0,640,400,0)

The above example open a  viewport on display of 640x400 pixels but the screen is ten times wider and it contine outside the visible portion.
We can make it scroll by writing following command: 

Example:
offset(640,0)
so the screen will move at the x coordinate 640. Therefore, with the following routine
 for i= 0 to 6400-640
   offset(i,0)
   screenSwap
 next

This way we have a simple and efficient scrolling routine.
To switch from a screen to another, we will use the command screen(n), where n is the screen number 
All graphical commands operate on the current screen, that, if not specified, is last opened.
If, for performance reasons, you want to remove support to screens, you can use command directScreen(). Naturally this choice may bring some unwanted side effects but it will speed up programs considerably, especially on older and slower PC.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/installation.html0000777000076500007660000000422010463126151025251 0ustar installation
Installation

During setup operation the interpreter (sdlBrt.exe or sdlBrt) is installed in a folder on system path (typically "c:\windows\programs" or "/opt/sdlBasic/bin"), moreover, two free fonts are installed into "c:\windows\fonts" or "/opt/sdlBasic/share/fonts/ttf" to be sure that default fonts can be available.
Last version of sdlBasic no more need defaults font to be installed to start, fonts are needed only when you will use text drawing commands.

Windows setup will install some dll containing SDL libraries, on GNU/Linux instead, it's expected that SDL library are already installed. That way the interpreter becomes a system command.

To launch a program you can invoke it by typing on console something like:

$ sdlBasic program.sdlbas

and the program will be executed.

You can comfortably execute your basic programs from within sdlBasic IDE with the apposite button on tool bar.
 
 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/dynamicArrays.html0000777000076500007660000000446610463126151025372 0ustar Dynamic Arrays
Dynamic Arrays

In addition to the standard declared arrays, sdlBasic supports dynamic arrays. If you declare an array without listing the indexes:

Dim myArray[]
 
sdlBasic will treat it as a dynamic array. Dynamic arrays use strings as their indexes:

myArray["cat"] = "Chester"
 
You can use numeric values for indexes, but they will be stored internally as strings. So the following declarations are equivalent:

myArray[1,2,3] = 23
myArray["1,2,3"] = 23
 
You can use the  For Each  construct to iterate through dynamic arrays:

For Each key In myArray
    Print key, myArray[key]
Next

 
 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/passByReference.html0000777000076500007660000000274410463126213025640 0ustar Pass By Reference
Pass By Reference

All types are passed by reference, which means changing a parameter passed to a routine effects the value in the caller:

Example:
Function swap( a, b )
    tmp = a
    a = b
    b = tmp
End Function
v1=10
v2=20
print v1, v2
swap( v1, v2 )
print v1, v2
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/arrays.html0000777000076500007660000000704610463126151024062 0ustar Arrays
Arrays

You can imagine an array as a list of variables combined together in a unique entity. Arrays are created using the dim command by specifying its name and the number of elements (variables) the array will contain.

For example:
dim list[4]

The above example create an array entity of five empty elements: (0, 0, 0, 0, 0) with index from 0 to 4 because by default, sdlBasic arrays begin with index 0 and not 1.
Note that sdlBasic use square brackets [ ] instead of round brackets ( ) in arrays definition.

In order to access an element in the array you must type the array name followed by the index number  between square brackets.

For example:
list[2]=10
print list[3]

Arrays can be mono-dimensional, like the above examples, or multidimensional. Imagine this kind of array as an array of arrays. Multidimensional array are defined by a series of indexes separated by commas.

For example:
dim list[2, 3]

The above example create 
bi-dimensional array entity of three arrays containing four empty elements:
((0, 0, 0, 0),
(0, 0, 0, 0),(0, 0, 0, 0),(0, 0, 0, 0))

In order to access a specific value in multidimensional array, you simply type it's name followed by the list of indexes
separated by commas and between square brackets.

For example:
list[2, 3]=10
print list[1, 2]


 
 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/comments.html0000777000076500007660000000402610463126151024401 0ustar Comments
Comments

sdlBasic allow several options for comment lines.
You may chose to use the accent character to start comment lines like shown in the following example:

' this is a comment

or you may want to use C++ style comment lines:

// this is a comment

or the Macromedia Director style comment lines:

-- this is a comment

NOTE
sdlBasic allow the using # (pounds) character as comment line but this is only valid for the very first line on code.

# first line commenet
 
 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/functions.html0000777000076500007660000001037710463126151024572 0ustar Functions
Functions

While writing programs you may need to repeat the same sequence of instructions in several parts of the program. sdlBasic offers you the chance of write the instruction sequence one time and then recall it from every part of the program may needs it.
Variables used inside the function are local variables, that means they will not influence other variables that happens to use the same variable name in your main program or in any other function. This is valid for arrays too.
See Global Shared Dim Commons statements for more details.
You can pass to the function a list of parameters containing the informations to be processed from the function itself. Functions that do not require input parameters can be called from your main program without using brackets. Functions can optionally return values,specified by the Return statement.
sdlBasic borrows the return statement from C. In addition to the standard method of returning values from functions:

function add( a, b )
    add = a + b
end function

you can also write:

function add( a, b )
    Return a + b
end function

sdlBasic exits the function at the point the return statement is executed.

You can simply call the function by the following statement:

newSumm= add( 3, 4)

in this example, variable newSumm will be set to 7 as returned buy function.
You can choose to simply ignore the result of a function, and treat it like a subroutine:

' Ignore the return value of Len()
len("123")

the returned value will be lost.

Function name can't be the same of variables or arrays used in the program with the same scope. This mean you can't use the following code:

myVariable = 1
function myVariable()
    ...
end function

but you are allowed to use this:

function myFuntion()
    myVariable=1
end function

function myVariable()
    ...
end function
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/overview/CaseSensitivity.html0000777000076500007660000000230410463126151025677 0ustar Case Sensitivity
Case Sensitivity

sdlBasic is not sensitive to case, so the the variable Foo is not different from FOO and foo
This is valid with built-in constants too;

Print True
Print TRUE

refers to the same built-in constant.

 
 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/img/0000777000000000000000000000000010645354546022347 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/img/minus.gif0000777000076500007660000000006710463126107022420 0ustar GIF89a€ÿÿÿ!ù , Œ©Ëí ¢Œh·³Î;usr/src/sdlBasic/share/doc/sdlBasic/english/sections/img/plus.gif0000777000076500007660000000007510463126107022247 0ustar GIF89a€ÿÿÿ!ù , Œ© °×ži«Y‹î]M†æ5Þ(;usr/src/sdlBasic/share/doc/sdlBasic/english/sections/img/splashFrog.jpg0000777000076500007660000002000010463126107023375 0ustar ÿØÿàJFIFHHÿáExifMM*ÿÛC   %# , #&')*)-0-(0%()(ÿÛC   (((((((((((((((((((((((((((((((((((((((((((((((((((ÿÂú+"ÿÄÿÄÿÚ ú "Ñ–TZi%••”H  13(‚J1™œ—Y3iÒnnï5›¹ „"ªÌÌ!“Q¬çŽ©È{¬èZïv·?!ï>wŸM—Ÿ/%:WYå÷lóh7žÿ~Y¥ºnC@!"³VP‰—9N<õZÏGœó½W£ÓcÑêžÝ¸îk°åsð5ôØåçϺχ7Âý/—måôýEíK}æ¶»Y«1Y‰–Ÿn™æ¶^^7ÏÇÙ’Þß#GÒjº^ƒ}¡ß{ûãùïÑt{òq›ŸCãòl3Ï«Éö1å>¢f³Ñ{R×V €E-I˜‰†@j6é>k±Ôn>O“ÓçcÖ½=—‡Ýô»«N>:f£.]g«…Ùêö¯7§¿`[Z–[ÌMØ( Z^“1 €*|Ϫáw¿;ÉÐjº žžÛ søwc¦fÖ©io@˜‘jÙo5µØ( Z^“1 €Öì´YÏ=¼ÁÔðçÄW¹ñ§eÏùNÁƒ?§°˜jÙmjÚì­2QšÄÄÈo¤åùsõïuÛh7¦‹{ÎòÆãÕ']€‘h²ÚbnÁ@"·«4‹Vfå:ºã:ý–“]œõ»¦ÜßIÍóÏH:ìJI´ZîC@…ã]±¹­mV#9cS­œ÷^ž UçÇwãå}9ÇÐt8=ýzn²üó_'Ôð|³eE¿#Ôõë–p`Ý÷[YSsm/±¿pÏ@m5©ÅÛÍÒx´ùSݵå¥2Fœó³Ùò÷ºÛy¼˜·7tÓÂì3x±Ëé×ÎiŸ?«sž‚šl{é¹ÅâÅ[݇%¿Ç]¸Ç`!"$+&:å„ÄÉ4‹ŠM‰U…W--iXZn¡%‰ˆ±+„ªÂ«X± ÿÄ,@ !$0134"#2PpÿÚÿSaŠÅºÀw²¶ ‡Ÿô3ô°ÖØ!ÜIW¬­…ú‹OÔl¬”\ÃÉm剞«Ç#XÀÕ‘87kN AF¯m•â&c#béWJ’Ä!iú U˜˜ò-Z–Éi‚Hf›i16 F\úvÒIÅd®}Ùœ%íœgöóÓ*]OÍ‚°UkB"åŸN i¼ "õUöi&'xÍU s£6ÞmW$BþßHúxº8Ó¦¹c­EUÙ²æ×àª÷{ +FeNÃ(µÙî+îë_U}¸È"í.xÒ–ôò­jS 8bÚ\æDãßÔ7=Cr«ûÑòÊ9 KGÈ)ž!ði]®Y¸å±“¹tI&•L(1ˇWìÂ1m)42%ÁL"}*rê–RÊXµZÙndY QlhC5Qè‰H¦>[yvɶb{¯ÎíŒXJ ÝÝ~Bì5’ׯw]ÛE6ççuø ²¼M6˜‘Y^maÇ-±Þ~,ÀX@”ØvXNw_Çæ-íüͳhÍ£¦Ù¶m›fÙ·M³oglÛ6é·M£6ôoÿÄ*1 !0Q2@A"BabrÿÚ?÷r¥O<ékìšàërNEí ¸Õ!ux’ijn! Õd×d8NSVÁ9­²k`ÊuÖÈÅ%0½ÂSl  q‘(¸°B¯é6ˬÀv+~•‚îÓÛì…³Îd‚’vLJ/è<æ5 *dHUí²kcHÖsu“ÝvâɲÛCYÏÒ›°ÉöÔ8œÙ ¢.”ûjÁÈåX]ØUø Il®÷áwgá5Ò§xU€šðvëð ©ÞgÂÿê«>gÂ.#áO¤ü[¦Ê²>ÔÇÉ·(Óð¡G¼ÿÄ)!102Qa @P"#AÿÚ?ýˆ7뚨1y¸¾` Æ3ˆÞ¬/l¦Ú”¡%ð¼F¸ˆ–:¦‘Ì0éÆ/3Ñ›±é‘qhY©‹Õ 0¹6S)vÃ*îC(ú9|Jt–ŸoP‹ÇÄPÕ1)®…´©P ›†`¨Þ:ÄÚ¦Ø+tænÜc˜‰lžzìl%žgÓÛ(mšfì?¹²LiP=«v~DÖ-5•î€ß‰W·ªE½­øs7ˆæNTB׌ÃQ—•‚©nVÕ-‹Í#ïÓ,<Í3efÒŽ%¾e‡˜,Øi©›Y¸i¤y–ùŒ>{ÿÄ>!1Q"Aq#23@BRarb‘¡Áá P¢±Ñð04ps$‚²ÿÚ?ÿ)Ô÷·2™ÑÅs2¨è,ª—ÎT»ð"§åȈEâ+‰8Íš Æowz ´äzÑkdc{.l!ÿuxµËh9«¥Íe6Ü&²pÄ«éŽé ‚”&†£.ÉïnVë¯Gœ¦;\?t–·9[‚v­­x7²ÔƇ"Ü*—Ñ8¿i®—µY«vm²¤:ó$¨\Õ´7†ƒ°æzƪÚ7ÑLÝç…¦÷sBpûQe»—+h2¨f™ ñZ<ÅLh‡«lí¢A6¹L¦ðë<•ÛÚnj—Z#»}å<^p …á¸× ÍY“Ûz³ÍDç<Òw'D¢$SÚ|¬ŒÁmMðÏA/ 5ǪŸÎ*µ7†‹õ‚ø2¯{w9G.“D¤qÉÎÉ 1@ÉSXÆà#¡²) ËŽ™ÃØwÁ2¶ìÔ6† ´¸4Œ÷¡V]n|؃Zã'0ÊaYímé´Ñ“±5ðc[!^2êI(”QCÓã r_}#¿ ÙWšžÐw‡èäCäíî#¹32x<ÞWA„D d Ïó TÛ7ª!±O ÂM¥11~“d“±;ÀÍ^ͨ"n*Ù ’}(l™k²RFÉxlÁM¨bý¸ ¡˜.Iû“º6gm—ê}D´‘¸²D·;†õœfGAè&'ú,²ÆáK!S¡_Q»1Æ£Eh¶öI«×aš»¸Râ-(7‹i>G†,ÃZnÈ&ž #‰å䌑ct‰Uf–Ghâq,R/Œ²Ì 0üºfW:6mÐ]h¢ç «Ø™nr<%>‚‘•`âÕÔDòJ¤ðë¶ó £ö$Ž ìwEŠê1leµ³dào+ëøîÄ#x~,R!xÌääää§‘±¾’V°Yéä)¢ho]‘LØæaÀ‚Š’ã'1E .Ñçä95Ñ*Η°¹mAˆuRk(j­i!"ÀääääBŠà¢Š(¢Ôû³ÕlÓïÈE½¦èd¥Ù4óDäǬ i%Kí¢„RÉ-Xñ!§Â:j‡€ c_½R"O:å-4Êu#<±CqQE â±’‰EQBµíÝÌ“ ²¹" 5EÃÎd³c¼S(NLS`:q:´DáC'yÖÊ"^íØwvcoîåÆÃAIQL¾ÐE`AE(¼Gø‰ØààààÉgßVpm/¥/^ƒ-šëwßݹ*SÔrBn4˜úßÓë L ¸ùKº°„/ŽK,²Ë2DK‡ Y ´£RN¹–‚OcÁ\xæºò S^™Mõ'ê7L}ïèõQ!Ye–Ye–Yb‘xñÏã““‘‹·N®½ÅFª±–ú1‘?¶ŒJ¨ìb‰t³s,%°—¸¹UPrrrrrrrrrrr!xŒd"Eþ’ŸbåÝoéAèFy•Ž“YtèÉ4 ¥DÛ,v'U P ‚ ‚!!xŒpQEQ3N~Eb%d/Dùl¢Š(~…¼W¦QEQEP P/þ88884Ëþ‹:Å:ÛÜàààà©Ó¾×ÁE!ÁÁÁÁÁÁÁÁÀ…ã2Ë,²ÆÌÀe“¿’¬7ä²Ë,¾Ç­…H²Ë,²Ë,± ÇrYe–1¸ñD¦[FxÚÿžd>_ÐéØd§ô«RË,·¥æYe–Ye–)¼vˆ#r7#qÂM· ªc„ø ’òŒT¦‡zŒOëÁ§9”ù{ ÌجR F˜$]Ærr+W4“Åð/ªÌg$nFän$$/WÉ$%dt%j‰Z¢ m<Ç6œ²K1õÌ´H 7Wj7ZX*ã„mM:û¥(ÛÿIÜAkÿ‚M—:^Õ†c–ºÔ²oë™g·÷ ™ÎPЯ5€¬mÒ—5Û;RDÓ$„X”’в”‚ë4NuLÇÒgØeSëÄò@®0²Fx‚"JSBIHuÿ!ÜÍB’oÈIÁ$cÖ ÙG<3‘µµ[Á|È„¤LSa/‘(Ä*Mï°´Q¿pA_*(s4!–¬iÌ”-ÒÈŸ3·Màg}œµ=È1’Ÿ6J%‰é¸†Ë˜Ò…°-æ×²p!’Û‰ç['Pˆƒo£äúëämP§Ý¢öz.ÓØÁ×A÷—ÉdÝa« ¡ù‹ä•Ë—‘ZÂ(Hpâ5Xد·ò(¡/$$“m€Äø¼<š,Õ „’›R¶CóWÉô×É(BEµlj·ÀE™KU"KV”}eò"KÎLx/£ÈÚFÒ ŽˆŽˆ¦{І§$GDGDGâ'„£‹dˆè„º"š"56‘´„£Ô‚ ‚ ‚ Û‚ ‚ ‚?‚ùÿÿÚ óÏ<óÏ<óÏ<óÏ<óÏ<óÏ<óö”9óÏ<óÏ<óÏ!áxƒM?°ÓÏ<óÏ<ó‡À‘øÓÏ<óÏ-ôÿü ¨ÖþðóÏ<óÇR#Ÿ;Š+Û ñtóÏ<å}‚  n»ÁYý|óÏ)Yp‚Ú‡Xˆ ‚ùÏ<óÊVK- n2Ë)ºóÏ<òÕN‚ ‚ -ÝóÏ<óY¢JRÖ$†Í<óÏ<‡[ÛnZ‚¢Ï<óÊüäÖÁM»ñ»»óÏ<óË 'îN}¯rÃ<óÏ<óÏ<±ÅLõK|óÏ<óÏ<óÏ<óÏ<óÏ<óÏ<ÿÄ&!1 0AQ‘@aq±¡ÁÑÿÚ?ú«à._Rã -–ˬ±ö÷PKW¤±‹›F Þ ¤•­“dÓ)ÙþßìQÔ].)v=âšûG²â M tø"Xmš# «ƒšÆPItøe‹¹ª4žÖ¡` {ïÃ=Ï0Ž„U„Pä½@¦Y–¦¼a¼/h6z(tŠ19&c¹›ÞC¢tÙŒ¢Õ¹gÞï çä=VPÒz)0r’>˜)Øà 9œCnhŒÕ±ûŽWS!™cÊ”=Éz˜ÿs“¨ ý(8·ÄOOâ*emʱcÄt/â[‘boøˆK_‰[’8–ªÏ‰Š¹ã£Qô*T¨€ê×¾«ÿÄ(!10AQa¡±ÁÑPq‘áð ÿÚ?ûˆiuÆRÙAã@ÂÓÑVo”gv‡[«™ö>cEs\ºw”¶²±hfo[.‰º-‡—ùsŠËZOŽ²ì¹…n «ôŒèyÿ T8€)€3èÍc– ½#éüØÎ¯÷œ3ÅQlD±›ë()µËçñ2RÖß÷.=ËÚb[µˆv—”I·Ìƒ|{ì¡ôÙáë pVÍ3ޤjÉÊîzñâªeA:˜G›¦bKñ÷"Ƕ¼qR™…Œ~&ëöýÁ>obÍÁ½4ßú7;’U†)ÔýËU[¾¬6)Ê9HÍ2 ¡]ïÖtJ¿Ô¤¼¾ûÿÄ*!1AQaq¡0‘Ñ@Áð±áñ `ÿÚ?ÿæî\¹råÂ._ï.\zO n%¸–â[‰n!Ò ?¸¸±X¬^’úKé/¤¾’úAé¤ µX½Åyó3Å1LSÊSÀî›=³8øˆjë½{…Åù™PÖZ—P¾bî Ù¬S˜§1®g”®_2¹J9”s(çæW/˜ïDûG„ ª¼&Q·©tÐ69‹Å¯Â{`õU !vh¼D©²Ü=Ù,¤ ðÒ‘Á9ƒûˆŒ\ßí ^ÛÝ i¬k7oØI³°ØKAa«Úã@ú¡M=pŸ)Tébx¾¡Y+óU7Xi~e,oqÃF–´uý4ÀkGzW9±¨ûޝ¸y•fÐ_-ñÜ&‚±2$ˆ?]bΈôg“ôܦ”Û¦Ã}§2¿øžãí†Áê/¨J*µÀô/àf`”…ËvðmJŒÖÊ ê6[zÊG¥í¡ =†2²ä—«À`ÁŽ¢ Œ^58uÊ'ô|¤›6Š8õ•ct'C: Ãë,OxKàEJ-WdÒé&¹ÙßÀa. (ƒØ|êÃsr„j­†ï­Xn„Èæ–…}¬µ¥/aJwî"ƵJÖ1nÚ@"kE‰ÈËàM±ù·\@B¶+¤[q­|kW}göÜ~Äx&Äp‰ƒõYincØ•Ê)°*Ç«¯¶ˆ­Yæ ï4«n^¤¹ðj› ß–fÕ˜•# ȤÔea «(ûLï×ì€ G4 «ZÄã€ýÁa±pŽ7ˆYƒÌ®P.}F^Y¯2Ñþô˜ø„_ÒØŒÑV>«Ñ 9NÉnAõå+´¨®Ð‰CtÏá;hïÉ©'«\ê¡o1±ç^‘–"@7á–¼ðщC&ÃÜÙh3²Ì½i5ÁCe¥›º®ÑhR9™ï8Ú{Ùê\”Ã}½ÔyФv½oCxMØMbu+´®Ð;@Üòú†5úiQQQPSádMðE¾Z¢Y”š$h¤û?‰²|µ~ü„¬2ó|ê—Uþ ‰Í5Å¢¡™Þ©ANc\¼^å%`-sÙÓb³ jõµZér·„|Š;…•v‰r¢ ƒ¿èRMˆˆâ<àø—Ãâ_‰|>%ðøŒ†'n%.7R×L'¥ 4‡´Ó Ø%¡F˜Ð4—Ãâæ´ÿ+±¼ÒvH^P<4,йÌæOJ¬‹ay¨Q²xãtÌ=e¡òº§à aÀS4¢‚óH‰ŠÅê[ÅïF-ËW/‡Äx|EÂ3ˆ¡§ÒbxŠñ-‹bض-‹‰´ ˆ]³7‚Ü ý/î,.ÕÝ™;ö6cLg,a?«¿n»~Juð‡ Áy%7Ê»«•ˆZÄ"€àT¶-‹bض â'ˆ¡ô™ià›´„ôž“Òp[p°­ÁN‹Pyj­‹Šú±GúÛX=¢ƒ€ÿúƒ(WAØxd Ò™À¯‘ƒ\H“QΡ~ôm€Ê»«ºê³ÒzOIé='¤ôžð‡„ðKCé0<Äy”ææSÅ1JoOæ3!á•Q8°=Í@r™=›='‰»÷S•”û2±©ÍÑoÙhâ0‹Æn¸]X•®[`Ú¯»Ýu½å1LSÅ1LSÅ0 æáô˜gdì”æS™NaçÔÈ#¨|>>ô§2œÁ¯bV¼ºQ³g@¤öCËÁÒòèÐYˆ Ø/œÊs)̧2œÊs)̧0äʘ!ô™OÐaÿÀø I Ö]ü€ ãïR‚|×è ýeHiô˜ø‹¨½E‹‹‹‚e«jKùĵˆ:Ü\\\\\#[_Ðĸ¸¸¸¸¸¸]O}F[ˆô—ÂxKá/„+Z »/œßÔn­€4žx¹|%ð—Â_‘ÖiûâXÁ‰|%ð—Â_ |%ð— ð–âZQˆÁÊ'"'"W"yŒDÞ¹¿¥Aïí)Õ|Ap˜ÛËAãÝO"yùUý¨g‘<‰äO"W"y¹99ræ}T‘í<‘‡’:f-V€‚Á°<þv¸µ«Há%ü€»Ñ¯ºŽ!°Ö—ö_ö HCAí\&GÌX$i¡*®Ä¥Ï²zeEvˆ(;L¼/©ºM˜evžH@‡dìƒê ¥†õš6ÆÎê÷—þh¯ä”¬•ú4îÕ’Ebó~ ¡TB,V@³&jã0ऑ¡Gqá`\ïƒÅ·öƒ«µñØD Vê(ö+Ê.x‚¯Bä 'efÖ”±]&çwðáöÌR;ÖSÔÿ f—ašj–€L}|Y«T3˦m’ÿ™TmUºMœÀÏ`†…Z.j-`Ò]9ðÌÆ•n›Ñ¤óþPËùJÚtîM>ÿPØ –6¹£²”©”xâ)Ô5!áÈKDÔvhæ;ËÑŸLM­Ce#©„,¨‡T£/cù.'þÞªiûGZuf> £±WA*Ú0†µêûÀA³¥Üˆ$ºç—ÌC­yÕ»ØÇé =Š%ãÄFôé]e 2bÈ÷L<`Õš¤'Úz‹–0"iØØ ]LŽ%lèîÊjR‡oE§ÆeGXB€,“oÄ9ýÆòûv†X‡‰¿h¡GÔØûÃZ1n47®wTn QEû̬lïl'âZž4?™ÿrUiH­Kr`ê<²8‰1£w!²›2C7Kx‹Ž06”ÄGep4³m/½ÂUœ kÁn¥o0„òƒl4!ã1&ûĶȈê"°Uµ‹ÌÐSÝÝ å§8V¢ñœé»`¨â•‹-Ñsˆè­!ò)L\E‡eÊ þ¹‹·-¹¬ÃîßU,†€~)Jª*+ø£þº@A[[Ôÿ•8ûR–Sõ"Ñ@T0Þd"rY‡ú©þ… ”…A¶}¨”Àgü)ÿ À?d‘#Ú+™neù—æ[™~e¹–æ ˜.`¹‡h?oR¿R’²¼Êó+̬ ~î¥J”Jý*T¯þoÿÙusr/src/sdlBasic/share/doc/sdlBasic/english/sections/appendix/0000777000000000000000000000000010645525426023400 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/appendix/pictures/0000755000000000000000000000000010645525433025230 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/appendix/pictures/gp2x.jpg0000644000000000000000000005526710643534363026631 0ustar rootrootÿØÿàJFIFddÿìDucky<ÿîAdobedÀÿÛ„       ÿÀ+ÂÿÄÒ  !1AQaq±Ñ"2Ò‘¡BRr’3“³TÁá²#SÓDtU•6b‚Csƒ4”%5u&ðÂâc£$d„´Ee…'7ñ¢Ã¤F!1AQaqR‘"3ð¡ÁÑ2±áBbr#ñ‚’s4²CÿÚ ?õJ Wwv¶vÒÝ]ÌË{hZ_,Ò85hÚ\ã€Aò åôÒ`¸}®ëiSëÒ2 ÝxQ[×ö4käpåÊÊ-™Ìþ½iöÔ·Ž»36åäz…‹.kåôëwí‡ µ¸?þ‰À1¥ô€ëÃØhVã‹ýNsÿèœ úBuÿ\7~ÞŸˆÏ÷ÔòÅqzCuþׂíÚ·•¼-èW õĪpH®óÒ¯·J×[îä5Ѱº1g<™_O Â2|¹þ}!!DG-„¿}O.@õûé ù!þá/ßSË”Rzûô‰¦a¡Äø„Ÿ}O.UIëãÒ,œ4xÇûƒ¾¬‰Á(>¾‘ß’#üÞï¾'ª|úzG~Ió{¾øœ€ëÓÒ?ò; þ®Ô‘<¹6ž}}#ÿ#0ÿÛŸ÷ÄòäT:öô¡®ˆÒxÑϧÊ'—"<ûzGþCgæçýõ<¹T޽½#¿!³ó|Ÿ|O.SjG^¾‘ÿÙù¾O¾'—"¡×¿¤]? £?öù~øœmHëçÒ'tûO›êHžY´óÿé 6îì›î>øž\›SúÁzAÿÎGù¾çï‰åɵ¬7_ãníÅü‚çïŠyrÒ+¯Á·v¡þAuå«Á&ÐzGõîßv =›ÁÜzpIµq¾’Ýwu-Ïû•÷ÔzpIµXôœëœxÛ£lÜïüµ8$ÚJ.·Ûãn¿òM@Œœ»Tþµ]j7ÆÝoˆ¿õ|¹6Ÿ­YƒÆÝjþ÷z?ÅO.R²ŸÖÓ¬a·tm½KÑþ"yrVUKþ>è[öØîƧ®ÕÁé}½ÍøMÏŠœ’Üì*pIµq¾˜zðñ÷=«™Gvá6·¥ÌL–;ýÖ¸Žò®6ñÛÌÇ1‘—»;ädyOƒ†8R²Ã>™PæÃtgËÁ[¦ÖŸœµ^Ó/Ký×tïîn#=Ö58%*¾ÏLÚýÓvµö$€÷HN Z²­ý17ä ômRÆ û’à”«q¦úXuMw3c¸–÷Où¶9dÆdNZ¾£»ÛÑ»ÛÇ`/ô-F JÌþënðð€Å§¬H–Í@@@@@@@@@@@AL’28Ý$Ž €¹ïq  ’J)õÅÖ´›Ëy$,”Å»V¯¥­°¨é åÆÍû›8%Xò·oÞ§ƒgQ°x¦Vó‡ÞÔ0z‹d]0ˆó‘½C÷kqþîÄâ‘#¬½ìºÛÿ'bqHyÎÞïºÛÿ'N)9Ûß÷{äñ«Å"YÛáO‡·þMqJQs·ÇçÿÉ£N)TyÏߊô˜ã6Ñ'¥ùÖÞÁøm¯ÄBœR©kïwÏm~"â”<ëïÏm~"â•¢|ëoÏm~"┢<ëï‡Ïm¾"¬”<ëo‡Ïm±ÿg…+!ç_|>{müž¬‰óµ¾#ðÛ_ˆ…+%;{ãóÛ_ˆ…+%:Üß> ëZþ/ µó¹¾=µ?îñ)R‰ó¹¾<µþOT¢|îï—Îíû¼IYJ$u»¾#mÍ¥‹¾­dOžò„Yÿ'¾¥eR:ãßœÙ'g”•‘#®Mòาø†ùJÖEC®]òûµÄ-JÊQ#®mñ¯bÿ-++DùèÞñ´ØŸàß²”T:êÞßkcñoûâqV:îÞÑì,}äŸ|JȑזöacêJ?ýR²ªÇ^»Ø?r±=¹¾ú•óë½|6öDögûâq ¼úo9ÛgbyŸï‰Å%=ûÅçYŸÛOå§¢G]ú÷äË:û¹ü¤â•GžÍwòeŸÆOå'¢<õk’í>2~úqJ£Ï>¯Ã¤ÚülßV©Å"|óêœ:E·ji|•x¤¢‰úß¼ž3º=¹c¶ŽyçÖsSˆ7g}§ë꛽4š² k9©†Ü’Æ)Í>ÕÀ#U&k¼—¯z«ë*Ó}ôC+ØËmfÏ+5+68–‚ïX‰ÄÅ%Zâ Zq \Å%Û"ˆ>o×Öò¿HÜwÚÂâÉõyE¥A¡å/š‡•ËÛH5ÞçÜ_::ý®³7²?QgHÑïu{Ãki͵ÍóM4ïlPÅb¯’YƒZѵemµI–Âïrî-­%ºv¯¥>(Ø_FO).`ma“ÁŽ+.Ôâ^_j¹¾•Ói†"K§mÇØÛ•|¾Ó‰,êïVéW6“_Ù[Ü[9™ã=*RæK’9[ÌA'€ö» Ôw"œg‹ýÆ—LmÎ¥©Á—upm$¾Ž+Ÿ´Èc/a|SÇݧ„æW(ZòÄÛmb*DÖXwµu¤G5ο·Hè-lëáÝÌÊf1¸~ÀAt¼5¸œ9£<_H³m~îþÞÆÎohëSS·“git±ow^FZGªêÂgºÓ-›-£nÙblŽ~\Æ7×ÁP­v#$õµ½ù«Íi_šìü…+"<íoÜô¾ÇÑ–žBT<ìÓ?6Úy ÔGñ8SMüÛi_°R¡ç[{Ïù¶ÓÈV¢<êoo tßͶžBVDyÒÞÃìtßͶžBVDùÒÞ¿i¦þn´ò²‡ëöšhÿ¶Úy YTùÒÞÊ×.›ùº×ÈV²tw³Úé¿›­|„¨yÐÞ¾i¿›m<„ª#ÎnôS´ÏͶžBV@õ—¼¿qÒÿ6Yù Yç/y6s_æÛO!+"|æo7 :_æÛ\?ú%dGœ­ä§ÀiŸ›­|”¬­O9{ËJs:ggèëo%J¡ç/yîgæëo%*¨ó“¼$ãk¥þo¶òQ9:ÿÍ4¯ÍöþJTGœ}w†ÏJ?öëo%+!ç]ù–‘ù¶ÛÉN)8úïÌtͶÞJVCÎ>·ó ÿÛ­ü”¨ÉÓ·ê÷PÔ-,/´­"k;¹£‚v6ÆœY#ÃM$`iÀ…*UÏëöQiúæ£a&K© Œ»nXÞCjxè¬Â°*¢%U¢¡PÅAP>¨D}K©}þ¸ÝíïÓu ^y‡H,õ!ZÛÌ@.w¸4dr¤íîƒ!Ľ&´ÝV}3HÔ!…ÏÓ,]0¼˜Hß9‘fmkŽ"ªÀò]á&îsþqÝÕ” ÍßÔ/¬¯Ÿ%­´w¬–!¼±œE5¼‚’1ùK\ÂÒ8…•³).²]ùÞ^…-¦Œø˜èM³[%ýõÜLìæÀèóJèœOƒ˜P`VÊÝÔ×Hiï÷—¬ Nöæý—÷öñÏ#ˆ‚¹[tÛ`/Ø2¬~)eHeèÛ;mŒ–2iãPkîtfšâæ)¹ÙÖ¿œ’ÞxŒ˜5¾=rð+ñQ&!gTÕõ}BâÒ[ Õ“Û=϶Í=ÄÙ¤ ­Û™æc)˜· +† –MÑMËlÄKâãXŸB½‡Y¶’õåÆöÇP–P&¶•ä:rA©|S3Æ :„p­KÃt]oþ:ãó޶|nmmFëF4Ðw“ñHþP«Ð9’ »egu}y •«—¸¶6”;OajÍšÜvÍ×n†VY7M#{£Yo±Ç 3ã›Þ^o®iºþçWÐeêO›öùƒ>9½äõÍ7_ÜŸC“©f^¯w¾ Kì˜Ûöæ÷–QÎtóÓ>ât9:˜ÎÜíålÛñ­Ú¶G4Ã×÷1ú’õCp7ÐÿʤõO’ž±§ñ/Ò^¨u{¾ÇþS'ª|•=gOâ>Žðõy¾ã¢_ɉòSÖtþ#é/<ßo¿ä—ûאָ¬iüIô™7Ûïù"O}õ“Ö4þ#é/Aêÿ}‡ü¢O}õ“Ö4Þ#é/êAÜ-õ&OWë+êúô—©;‡¾_’¤õ~²z¶ŸÄ}-è;¾?’¤õ~²z¶ŸÄ}-èþÄoä¹=_¬¯ªàñ'ÒÞ¤îV÷ º\ž¯ÖOUÁâ>šóû½»~‹“ßò¾©ƒÄ}5çö+{&?ß=Sˆú[×¢êÿ}%f˜OfVéXO7ÓÇñ,i2u"çpwÊÖÞK‰ôÜ‘DÒùÏFh*vlæú{¦".Û=‰:[â+0çÃÃaŽØ^“C7Cu5½8ðt¨>QªHÎßMíÖÿ¸ùB²¸iêTTDãÅÚEB"F­ž’÷7ž-Û‘ÙÊå`~†nãïw[G¼y%÷VÒ¼»ngÄÒkÛ+ZÃj€€€€€€€€€€ƒå‘;Å¥Zî\šÒ¸jZ™Ž[8ƒC™oƾ—^×ÊÝ­‘Åóѱ6Hjð9×¹†BÆx44¥>¾ 8åX'|ÝÁFØÛ3Ñ7è»ùU;¶Ò²³6ŸdŽŽgŒ4c¥kœc ÆL)‡9F«w(Ã1[nêÙX­)YŸdÌA™®Øû§}w{¶¡úU¹éÔÏ ©å$e§†¡go%Ã1_3§³íV?U>›2„ÀÍ+ 4Êà9ÚDdpa Ä9´Aì¥üŸ³1Å1Jo§Å²fiîí[u7M6Fß»m6¬ºÚÑ·SµÒÈËx`l®sž %Á‡ ­;üZcEÏn‡å›ff,·]ZÇM;;YÎKøb‘›©ûR4Ò%¯’FÂÌ’Ö¾\À9ÙA49[S‡an·“Ù7ÝY˜ÇHᕺ±Y÷EXΣdlŠÎþÅ °³%™¦”ÅšfÉ9!­—nWP<ŠŒkE¾ÎQ‚±[®¥n‰‘æÆu7ÒvGFο“Þ÷ô=R \1¦ ÍÅŠ,Ôðøo§ÞÛ–êã¯gàó,GíL÷-î/Ñ_>ÌÒœ­`Ú`ùF¨Ke¾¥úاá÷(VR4À¨%ƒë U§ :î«¥¶‹~t9n‹m¡jéŸ)6°I‰yv5RwÐH¤ŠXÙ$Nkâ{C£{--" ‚0 ¬UR=zPç³\ü¤iǘ®ÿŒÍîÝÝ+4XAÀø »Ü‚{ˆ$‡RÇÆZêwR‹MG"@ª Α_ w ¶±|¡N̪ ®éJbÞ}6AìdwØÅÌb¸.‡F“æCîÍ×^Z`(¾t曆ºC®8ŠW:L°îo)&¸ì¢Ûf:0ºæVíŸçˆkH¦.á -¥Ol¬u1ý¹ö0²ëšñ‡ò橵t<ÔQJ¬I‡8©BŠóÕJ$B ðHâõT¡EÈe¤™b(Ð\XZk´·a›-ŸŠÞ(ï£홓EÑs§ƒ^‚ p2¿µˆ ¦ÜÚxŸ•_÷Ïä×Á“Å÷!—|Û­jö$x•Ã=xrÓÁ5XÆL1lož)Ûì&Ëë3Å÷$\iô¢“á1£‡±Â‹/3O³ûsÿ?Üœ9ù‘„¸ñ º €Éò¹Í ·ÅrÖˆ/gd¸¿Çû Áß_¶‚œÎk²?Æ8µÃc‚ mô“üż?ŠÇò©Ð9ŽÝ?ÏÖ<4{; +]ònoÒüÈzFÃGÓ§Û‡ZÅ+Ýù%h{œç4I=À¿:Ëžþ9¤Ìm}5˜í¥eqÚf—‰m¾~ÖÑõ1žþ¹YÅlt Ó´Ñ²Ò 8ãoy_:þ¹a8ã©‘ ½´ ˆbŽ óWólkkM• X]}Ó¾fVÛ" ¦Ád¬v×ë(.²¼#hQgjA‡gÕRˆ«0¯q(©®(v5ÛÄ @J¥aꪅj6ðâùBº”­{x  œA‹TnVíP@@@@@@@@@AçJü÷ ö[ƒþ–4æ;Ÿ‡”þÍÝÕœ#âZa\\*Oìxojƒw¤nÛ9–]j Îé ©$41Þ+å§…á{ £‚Î"‰-³n_r@çFÖø¬ˆó E”úë*±c\ß:å¦+²Û˜ÆØîÀcí%ÂfÃ’vŽfú[LL%΀¸†çñš}«¾¡áXLQ’Kˆ¹ºÑÛce‘b×íi÷x~Q¨÷X¦úïL’µí+#@Ð^ñ_#¼XØ œj(.º'Âì·¾'Ÿ9ZæÛ€õÐ\³‘®¢8†¸8º ൜†»„–G7# iå¡á§yd1§0°/qÛÄ8ò•ŒªÓ+1-c]$ÚÒóOÙeÕPSQR6´샊+k ãpþVŸ±r±½Œ¿A7×q÷xÿÓlþA‹\3oPyÛÒ€ÿx4þÇpÓF<Çwð’ò½ÃÕ%f‹:M´WšÔ1MŒËæqÆ ˆí†Ñ[wŽÂâyçxï9Þ?dá\;aTk¤–µ<hõ(ª1%8á´ÕQ¯¾`|N.W•¸´©#Wm1k;0X2dŠ ™ÚþMË‹_òeÓ¤ùôú_ßÙn…»l¡´¸“Q¸±Óo=næ]2žj69 ‚1 ãù.8»QuÓ3ðÖvw½ŽetùvÛÅ-.íîúî}ýÌúEÆìÁ|ç:7\º ™^Ö“G27HVšpm^ænk¥¿eÓs‚ÍhŠÄFÖ$Zï:óµøë‹èó\2>sÌ  ó¶ö¼ÕaE¶Þk§¾–E×mØÂí["f›Î´w¾ãqŸ¼‘îÃî \íGY¸" î—#LžZfÔvÕÏ#Áv]·oèmŽa’Û"‘í}"Fóeƒnh¢{ˆÙY#keËäõ8¢Ì“l=¼7q[€àãõ×;e¡ŠiedQ0É,¤1»\OÊË&éሬË®ˆŠÎètöÛ—©Gnu½ôN‚AmÌúŠv‚úm7øîkcŽo‹2FØÎ^>NkŠg†"n²wÏîdïì]ßꎼ´–²V7œ“)‡`<]œß“_¨ÍæY6ÅmŠÖza£CÌ,Å‚ø»dÍ69íWBÔô±®Z×E.ͳ°¹k@¾s[Êói©7ÄpÏLnzÚmf<Û-½»Øpìð/9ÕB¤Š”o÷L°+JÚ€щ!}øöü¿õ¼®g²qÿ[km&£¾;wÖ[+v˜ä- ,¹d ™²àõò`š–ÎÛ,­šgäáÅ|j3Vce×nìˆÜ£CtÚ¦œÑtþrKŽ‘k,„ç1­avÌÅŽØV<«%Úœ?ÜšÍÓu³=qNžã[laÉðÅ"Ú]Onß{G¼Pº 7H€»3¡dñ—R•Ë-+Û^O6ÃåiðãßÃ7ÇÞïÑ_Ç“%ÔßÃ?sBòí‹ÀztPç>J«QÜÃzl·NÆ´=ÐÚµÌÇ×’¥~‡¢ÏäòûroᲿ{åóbó5Sg]ËPîì72}Bæyo¥h‘÷ ³#œÕ†SlŒ™®¾r]Ù4‹kÕ ²k¸'‡¶Å‘³vþõý âéÝ.Îê^vâÂnhÜýÑŽnf—~ÉuòÜ×ñ_ŠùâœszâwWµ§YŽØá¾Ø¤_£äÛÐãô%÷ïrý‹—Âaïÿ¿ñ}&o—ìülŒý©žäwý òËö˜^[ñ ¢û0’:-û—£õ«ÎvA¨™a¥¤ªKxœÙ\͵> ¸vÇv(j³–‡Ÿg…Jx¾áâA‡tA•­áchîÉ5¢ÆV!`¨¬1á·OŒštˆIÀf¨p²ÕczK.,3Fa˜ ր㳒+{ƒ[SWx#â1ÛŽÞ4éÏkîî^ÜZkCÆ"ªt²~€îè.îÿVZ|ƒ¹[w7Ê(€€€€€€€€€ƒÎ>”ûÏ¡ö¾]‰Íã#ù\îéY£fAØG‚ãÊ\'B¹¾FÓv?Hl}ÔŸ&åůù7:t2xëæ ]ÐÒ®&ÌØ`Õô©¥sZ\ám.yÊÜM_)È¢¹²GòÏízüÓdcžÕÛÞ´z¹–òy¬HY$sOBºØã_h°»ê&fb#ÞÛo4ÅÅVGZ=^°H~–‘Çš‘­Êçæ8âq•»OÈõä¶é¥"zÚ3óWYtGL8¦êÛÍæ1ºEÆìÝÉc,nŸ¬ÚÎæ8ÆX®fqd£ƒBÂË5˜mŒvð_l~›¦i1½Í—N›$ñO³;â"¾éféV °¶K0šâg™¯.@Ìò88šíÐi|˜™ºî,—ÍnŸ·D9µ9¼ÙŠE-‘ŽoAÍ¡ßcàórâ6l+àpüÿ÷~/©ÏÛö~7Çðl÷#¸¿B|¢ý§ñËߣû0’:±?NõïÇÜ 5½ü°Æ"{ð·5ĵÌMp®„+D¢·Þ¹íw3 cpÄ—;;€ã'E‹kwN÷<Ç Ûf¦gr´®<»"¤Ë%ö¶€QŒ˜Wc%Ol†«HJ±n-Ýš´ø¯Ž8RaY Ôd— \ûk]‘ç‹5A§E2ß½ís"g2Ç 8×3È<°vqehÞ<¾çê ~‚õ~k¸»»ý[iò XÊÆæýEyÃÒƒô§CüBo—b@óL¿ÿt{«4Y{+ˆ¥iJ„q Æ0Ÿb*%§Æáƃ!š…û(Ñpæ³e]G†ûàR¥.%¼¹m%™ò àͧ RŠjØÆyˆcx¸O` ¬ÖB nXÙâ3ê”ÑßMݽäMÎržŽúk+“yèöÂR"ž[AÎÊÞA€_c‹§%-šLÝø¾¶þ.·Åb!DûçL¿•Ú‹ù>6Ë,ÀÙs°=¬‚˜Èî Ðk±z±¢ÕìÛú»ww¼ùÔii3EÇïtL|Œv¹–'¶)£ç›™{s¸ ”öGÅ%a:}dx™[všz—sxÙÜ÷HöÌ0sªkë/:ëÎ×lc·†”Ø£95.Ä“RµÎÖTV×€4Z*ÍÇNTJ2§^°DÞo4’73`ÁÒ†Ó0.¸´S×:l¶Äoø·DNßwCLeÇ3=3»Þ¤Ú_sbN(ˆå£ò¾‡1£iÙàXyYiZ]Ojñã­+êØ¶ö>'º9#,{M×Û®+Uö]K«ÅÚÎÙ‰ŠÆävp,V†c³¥ @${Nvœ®ɤƒë,íºmšÄÒXͱ1IgOc¬Ã>ã/5àÂG$g8ßkµz7áÕ[gÍÜ4➘«–ÛðÝ<;+ÝÕ4Rl5ÜAlÁä¶‘—¸8æ­ 3`<‰HÁ«þ~êÏIæ`þ_s[3æÎD„—´‘á8º”à©%q䛦~)™˜öºmˆ¦ÍË$ñ®Œ¨¶ça+µeQ—§éº€q·Éƒ²ÑÄ‚HncJ `8Ïavé493ÄðS]ÙõcýKQé¤ m³$´Q­¨¼biN]‰óu8f¬§QŠ"µ†,ö÷0²7Ï £l¢±—  ¾®+NL9,ˆ›¢b%²Ëíº±F“yÈúò¿r“ìJÙ¤ù‘Þש‚^sàÙîGq~ŒùûOãvÿ¿GöaIX£ûû¯Ž+Çý‹UåÒC„bÚ øHm h¥Dyãyƒë4”NÆ2–[Jx. ¸~Èx¾úŠªÔ¤ôyN"Ž”8q¨Cõ$öx{¥bÉFÓEl—ÜýB?@º»ýÝ¿êË?jÁaТˆ<áéAúS¢rXËòíHi›áîuf-”E.í¦Ä–»ç¶An?ºØ ¤DÐìÞ3½³±(*A7:`þêï1ÿ5j?Ó¤îW.¢6›¯_í fO“rã×ü™uhþd==k1‰–ò0Ñìdda†  ók¿T÷¾ÊÛknÝÔ`G¢è‘ÙÁg ³à†Ö7ÃoÌJèÜØät®‘ ºt‰ì6p/ZÎsž&³Iû~çü£·@ÝøØèà³tq¼ÜR–ß n @y†S‹Ø\kÁE²yæ~Ï·O{W¥c«c$œãÝ#¶»›; Ⱥk5z1oBAmy%4·‡b”(ª ª¥Þ㺋)l0|¥®Ì÷5y9°!¼Tªõqó\–Sá·Š:vÖi‡ú néº^ÚÞME·vólx%ͤ´fkJÅOWÍÅÅüO²”Û,»¹.î4¾3¨2‚âZ(.$Ó²W§Qvkæû·º±bŒv۵VŒ8x—="H§/ ±’Ò)¶»B´J3ݯêD:FÉÁÑÈÆ¹´­i—²½(晩I¤ÛÕMŽO¡ÇZÅb{Ô?^¿ ‡:2Ò×·›ikÚòKšá qÁe<×<ÏG»}w‘¡Ç«ïÝÜÖ¹Íq&€W€  pà8—3Y«ª›9ͨªD-:–ÞZ;J”W¡sm•É•­MJ`^Q›Žƒ€®œ:œ˜â–ÏLO¹ªüß¶c¢‹×/›le#h‰µ§íMýÌŸhxG ßo2ÍÙ³wGWtôµÎŠÉ™™¯^þž¶5Ö¡=Ìmd¥¡¬9€kCj졵u6œ­°´çÕ_’".¥#«Ýû66bÁm“Xû}¥ Þg7è+Êaö™0ý¡Yi>e½ðÇS¼éy¶{–÷è¯dZõ»~·GöaI'Yûÿ¼Ž;ìZ²‘Î (…eYÜÃ]ÅD.q|r^mÇÆØ»ÖV$–[£„2¢xŒd×0‘´î¬‘…uLStÝm±ÜÛiÅÚ_>ö1›ô=¾hm:_;L$dËõW¡:M,gò¼«G}®8Ôjgdó.Û “ÞXt×èúF§idË'^‰9Ø£'/±x\Ë´øò㳂n™Šw= Ùc.LwÝÇÃM®h‘ß^Õ[~-#„Šv8Xv¶¾>—¨êè¶àéÐÄ×µ‡4§µ£{«ë´Z=ø¯º1[\vGV×Íê0g³%¶y“ñÝ>Ʀþ=*MÔ¿¼°„5†ù¢æŽq€±¤ÆqÊH “%˜nÒeÉŽÚ|VÓ³dV;x®Ë›,¾‚kÛ·{e™»0XÍ« "v“5›-ßnw¶æ•¨q©' q®í>KüÚÛåùt»úºû%Ç~§QuþU'Ì‹ëÓù>Y¼Î#B¼o3'ØózHþìw½ÝOË—Ÿ"ø&{‘Ü_ ¾)“cõ°ÿ=Ù…$tÝeÿìáüuÿbÕœ’æÛJãNUU¢•Ø8ÐØA TÔT ¨áV€8N(iË®¶5>g Í–|íimÿõý〥oãÛN ¼ý¢è™¥bçÑs{gȶb+Ãu³ìn¬´­zÓKfœß äccç¤9¤5á&˜œW«ƒKŸ>3Û/?>«ù8ø³GdFÆŒn¦7ÖSlø÷—‡7]ž÷tó¬^ÿ⿽QÇe»Ú&–ûˆ¦º·2:a ³4\j;4[ù¦8ťŊf&ø™ÜÓËnœšŒ™"&,˜îa„l¦ ç¥îQpœj$ÂýÈ·¾·¸©o3,o$bh×}e³ü7ÛwTĵæÇÅdÇ\K¨×·z-GW¹Ô-5kotá#“ep«@ €ú-,œù§&;ìẛåâèõÞV(²û/â·fËX#så¯ô¶™Oßþ²ãô<ž<òuz­ž ŸñfoSíàݽNpÝ\Ú— z;óŠe ^˜®®iGÝ_Ñ·­ÏË¢oÔäÉÃ6ÛttÅ•iÇ‚ùǹD޵(D:}É·–î-nÚši¬²DÂ@$—mì¯{Ù7]’Øß6àÊâæ?&]š›PiÖs_ÏmgQ,ÌkZ_ZTG›vùö,3—$Ynù—Ûß–1ããÑ ÖšÍÛ®›7–Ö™¤s^Ö¾µñjÞÜk±tâå÷äºè¶cáïÚÕ—Ye‘lÝ_‹»b#ÝíQïhèNhvZ¹Á´ð¸;@Ä´x@p,mÐfŸá–7k1E~/·Ûسsg-•Ãí¦`dŒ&­ã 4ÛáR¢¼ N|7bºm»{f,±’غ'b–¸bJÕ,è®»0X¥rß^Ei IÊ]Z .;*N¿O‚ì·Å–ï–¬Ùc“tî…ÆèzŒ„ºq,F¥“U¬¡¡¦rÓÀƒVèåÙf~x£¯ýX}f8ßu'«ýïjbavÆCF`Ü Õí ‡Pø9†c°+<·4M"Úîûú=)Üt¬ÝMÿoÉKô-Y–üó­ Ê_ÏU™GjӱƱôüñáÙ×±cYŠfœ[ZâáÁÚ+•ÓE9ë´8yR‰EÈ(•œÓŒr¹Ás\[ã»E0Yãºè»ášK–Å>-°Ú 3^|fXîœæ ÝláϸöÉÍà ©ÙEëÆŸW13Î˸TïÜóç6ž&“l~ž/ÓU[v—¯–½ÑÎù2¸6œûš\Ih¹œ1«À¦Ô6¯m.™§óOgæyÚ}•¶"¿Ëßù5"äHÉyµ®ûc‹œñ™»I¥AؼüþecÌ­iÒíÇÒx)NÆ;œ)‡d­-´X‘Ü\+((¿‘wumöàLéetL‰ —Uƒ1/4ÈÁLFcŠìŤ¾û8­ÛY¥>ß‹›&¦Ë.›nÙH¯útû 5ì²28ÞræÒ0<ÉÍ€XNÜÞ²Ûô©Õíí£¬ÅÑ5övWz jÇÛ‚ÓSŸ;ðEq©ÁÄbq+NÍ»„úÜ]ngyÝ]ð†'ÐþЭzO™ìµ_.{ŸàÙîGq~‚øf^™ý'eøÌ*ÔÃ¥ë äãþ°›ê+#›" Ž0‚ü7ìGÑIÎBÜs(ZæƒQZø§”\Æ‹RI$¯“0cŠÑÄ>©X̪žUP\Xb’7><Åѽ„fÚ pV% éá•­ø8Á¨mxIáqãRdB+k¡ÞÏqÉß}]þ€îçõeŸÈ1`C¡Ey¯Ò€ÿ|tqŦ¼ú·XnxðÙ=Õ¡`ˆ„D€PB þ“ú½¾âÇåÊNåqåDnw*>szôö{c(ÿFW3š`º{ܺ+ž×¥í.¦µ–+ˆlÑ´Ô)¨;pªüÿ[±ßÛ¾%÷ã‹í›nÝ,‹MfþܼÁ#ckÈ!€¶2ÓPbi¨Œ‚k‡ é³_–É™Šm÷Gtt4åÑc¾"µüûúÙLÞ]¥¥²´8Èϵ2­•Õ”aðއ;iYÇ5Ï×{ºzûÚg—âêŸ|îêîc]]\^Jg¹“œ˜Š:BqÄк›vú‹“>¢ü·q_¶[ña·pÛ²†Q´×­,áQ¦cË¡ –·RÚÎÙàpl(ðZàZp5nÁšìwEöï†qEöðݹ—ð^E¡É âÉ–ÌQ䈗‡—5´á-Ç—Ûšd¶&Ú[1ÑÙ=.k´]5­ÕéÛ¶{í¯Ÿ?HB L¥Œ/!ÔÌ È­A›ŽŠú¶¢µ¬W»í¼ôü[©³ª³öر.©}-«md”:ÆØh@Æ6ZÒxrå+EÚü·YÁ3ðÒžÆËtÖEÜqk_k œ?ÃÈéRyFÍ¡Pi¡®- Šm5¯iZ¤ÆÆtÚþ§#ËÝ+v‡e04=¯ç S>sRåèO2Í=^îõïíqƇuûý”îìY~µ|ç3Û$n§8ÂÖ·0ii­@¨ucm1OQË;é1ÝÝ÷ìÞËè¬Û'ý~í»˜W÷²Þ^Ïw1iät Sp@0ZuîË|ßvùmÊ1Ù[º!`¸Rµí­ ‹#¾VPQrßV¿²c™m(ˆ8Õôc xö¯$æãâœ^ ^LQK&•ìûlhÍ¥³$Öø¯à k­7 *ca4ç${âÞ%œkrv{½¿èŸIfúO¿²Ÿê»i¼Wöý#>YÛpÒ×Ç& $´71 ¦o QnÃ̲[33ñU«&†Ë©O†Žkyht ÀÈ_öhÒüË{Ùê«åÏsà1ü=Èî/¿|3/Kþ”±üj•jJºn±Çþ@ÞOëû¡e(æè  Qˆ&ˆ$m ¤ºæœ±r@÷ÏW£.ánàâÓ,þA‹ !Ð"ˆ<Óé<êoÆŽÓ±ú[À싂鶴£Î·±ówS3Ú¼Ó°q (åE©n"ˆ€òjvPUÈŸ¤?liÀ¥@„ØAA¿ÒðÜìåm‡üBNåq¥Dm÷CP´Ó÷šÂòòA´FNrCZ Ì z님ãºü7[lVeÙ Ém™¢éݳ»­Ë 9DH ¯„?Å_é ¾¾9®ŸÄ©hîHÛ©EÉ‹»Éé “Ípx¡_MÉó(mÕî)èú µú¦*kîOå‡`žòz>£Ã)êx£Ã'©àñB“Öžä× J!ÉSÞV9F£Ã'©àñB<éîWå(}ñï+é ž¥ƒÅ ›Ö†ãšWS„Wòž“¨ðÉêX£‡ÅzÀÝc·Pˆ~Ù_LÍá“Ôpø¡sû}ºy¤a¯ºSÓsxdõ>(kõ­ùÝ›&ꯢtícC±$´­ú~]–ÛâfÙÞѨ×b›&"è|Š:ól9Gq}‹äYšH®­`8î­þU©#¦ëôÿxðÛ¨Ü}’ÊG8T `$€ÒPC¤·h©”î\~¢‚§6†•ˆŽ#Š¢T ÞŽÎkHÔ®Ïoc.B;¯V7zî¦ãîðâÓ,þA‹Z·¨<Çé^]öîüÍÚ,¤§.Y§®²·xøV¹&;¸ñŽ@ãö'ÔÁQ©!jQ54æ´ð— Š «žx¶Ž'²Ê$.}Ñ.{ñ2“’ƒm@ªŠ¢²¹çšsÚaˆ&¾º¢¦jD™Ki†Pk^A…A¥~ƒonÆÃþ%'r¸²¢*Ìî4 ÎãA9ÝÆ™Üj†gq œÇ3¸Ð391ÿ f?à3 ” Ÿðp5¯ž6<åcœ€ 'Š –Å`á.i{žÇUÍðCG‚íœ(+t¢ÌüÜãÚÇZÐÑ‘¤º€q’‚hq”mt|/cpñ³mApÚéÎs‰‘´%Ô!Í@mF* y#³Èö²íle.¨sL”àªpÚ˜Z\Xd«Ä•xnZx¹E1ª¢è‡Lð‹yº·!ðœ9³ x8¨-7è÷5™˜Ö±åä8’×6¹6ñ ÄfhÂºÎøÝ¿Ë5$tb~žïÿ¨Ü}™YH稢 ׳Ȋ†:g`cнƒõJ ÞÙr‚ÖGž˜ÔŒ½¡T\‰{" ÂnWVœ<(*¦&›8H38Ñ´“€C¬éú,kOÛ^Ó,är}w÷Q°{ÇrZY¹š NÖéÖ€ö bÔ°Ý ó·¥½ƒ¿»:ˆñº¶qåpŽFýVÑçûYc’'ZN+ðooƒ¼³›Ë9me1¿œc‡AŒB rA„M„¢Ãndm0AZ¡@A»Ý­_L´mÃ4Ú&ªÆGz-ˆ 1;ê›çú÷ò{núPSôwTÿ>׿“Ûª”íôwU_>׿“ÛyINÑO곂ó]ø‹núPG@껂ï\ø›núS´OÑýW“üo[ìm»éNÑGõ^7Zçc™·ï«AǪþpÿn¥Ùua÷}sâ­ûè ÙõaO…×+Ë¿}¢õa÷Mo”ä·ï¥¢õeOZ¯¸·JèÝYÓÇÖkî-Ð:7V|z×½·J@§£õkÿZõ JGXƒVÜ ÖÏj z¸¯‹¬öù„¤u‹ö3õwgyoxËm^y-¤dÑÃ# k\èÜÐâ1¡)W­j“êúÍö«pÀÉïç’æV3´Èâ좼JÌŒ,h š ¥ìÌÒ×l;B }Ú‚õ8Ð)DíÂ+HN±VE­´~ÉÄìp„ìoª¬EF¾Y.uMB„V{·¶&0lBÆAPd~ŠéÖ¢ÒÂÚÔ`-âd@r1¡¿QkVB™úDnÌšçVWÒ@Âû­!ìÔbh%°ÔJðNr:›A¨Ú9BÌd²æ)¢æn†fð<íÿç•Ε+<(O;ÙOwûH0\Ò ÊGÀ Š""ˆB(D•*T ¨PFT ¨TNU*UDåT–ª…?ø@Ê e@ËÛ@Ê‚2” ¥)@Ê‚CFT(‚i±p”-í.n]–Þ'HxÀðGdœn#Ó´í-¹Õ¤l’íŠÕ¸Ôö=—qX©Õ5{Rpù|c¯35 ‡”ò¥GsÔ>ë¿xºÏÑmË3[XËô…Ù" Gká´u.@±™Gº–,„ÍsDø¥h|R4²F;ZáBå<1Ö†ã\nNùÞhÏa{ɸÒe5£íd>Ž3à;±Ê²‰!Q1É#£{ê©ô–™óWzï¢RÒÆ&Ôúï¨$j_ÍO¨;è'§é_5w½õD‹ý(þ ê{‘ßA=;I‚»ÞŽúéúGÍ]ïG”Óô~Wc³ÁR éú1üþôyI°:v‹_â¯÷¿å ž›¢üÙþ÷ü¤Ø7Dƒ;Þÿ”Ó´O›¿Þÿ”‚zv‡ówûßò•Ø÷Cù³ýéò“`Ýâ²{Óå(÷C?‚ÉïO”›‹½æ²{Óå*3Bƒ?ÞŸ)MÓt›IïO”›¦èðwûÓå&Á=7Aù³ýéò“`tÝæ¯÷§ÊMÓ´ø+ýCå&ÀéúÍ^j|¤Ø#é ßù«½ïùI°>Ýÿš?Þÿ”›éßù£½èò“`}% ÀÝïG”› ŸKhð{Ñå&§ӺDxŧÔñ¸0ws&«WÏ©ÊÜ5–ÌàÊ3;Õ8Q*5N/‘î’WÈãW=Ä’{$ ¬M´ìE¾¯$ÐwN]俈ǩkᮎtvL©ˆrs„—žJ-s+·"ˆ8n·:±²ßíÜ6™›o¬Y“6•záPÉ¡ôÄÇ ÁޮЃŚΑªhڥƗª[>ÓQ´w7qo&Öž²k†-pÀ…Fb€\h‚ÛñA¬¹u%pDYÌP ŠÌPT{H"áä´pŠžÇ páP\É6\Õ4ãR¬ü¹¥]&‘»úkôèîõ)ndš{k‹øí­_\Ý«‹+Ÿ#dÎ÷9®Éf. ÏÔjòEóm”ˆ‰‹k5šÝvèÙOlýÌ­²)YUâë·ú¥Ýž+oc‚ÞØ%‘âKotÐè|óš„Jðì]Zló’ÚÌRè™‰ŽØØÆûi)]ïsÚ$·0\Û:TW-0 !%Æ”£º6°ck›¡¼Z-¿¼|FØ\ºÉÆ)Kœ&`ð›•Á§ {Ô(4üÞÝÞª »[MJæ.v'Žo8Ž®}<#êà+Šm&WF•¬@ææág9á m$qŠ´”@Òõb|µÇiË%i-©xT9R’2,ô-JæòÂמÞܶмáÜFÞ<­9Š+qVûÊé¤k§„ÄÆ¹ñ>)9×JÇ4˜$cIÞÜ$íÛ€PW/V{Â!„Á{m<ò73˜ÙrÆ  k)Áîqp‚œ¸"5zæèï‰iÒïßGh5+qÀÓrÉ>Ê%k#W7£Þ€çn¯ëîáûÚm£Î‡Áu{Û1ñh¤ú=hüWŸè¼”Ú-»ÑçJົõ"ï ´}ìx/.½ì]äÚ)ý^-½íϽ‹¼¦Ñ'Ñö. ɾ..òµý_Ûó¹{qF•}[ó¹¾-ô¬ˆý_Yó¹¾-ô¬ˆ>ƒ‚òo‹g”•‘Iô{ì¸Ûå%dSú½Íóé>)¾RVDþ¯Rüú_‹g}+"W¹>}/ų¾•‘?«äŸ>—âÙßJÈŸÕõü7ÒüS|¤¬¢£ãé…ôµå¾RVCõ|w ì¿ÞúVU?«ã¾y/Å·¾•@z>»ç’S÷¶÷Ò²ª‡£÷ÜŸÞúVDþ¯ãçrüS;éY=ÇÎäø¦wÒ²Š‡P-…Éñ1÷ÐV:„hü)ÿVU>`á>5̇±cê&ÐódvÜOÚlcê%d?WÝ8íººís}䬢¡è÷¥ðÝÞ¢òR²QS}´Ž»ÞÑ‹ÉJÈ­¾Z|+»ãÛ‡ÈJÉEÖz=îÐñî5Ø|#üD¬ªû=w2ÇbAR {˃yYðŽÙÉʃLmÉ$œIÄ”ÈÑyGFH)6¼ˆ#¢Ž$Š8:/"EHÔq tND‰È‚¶ÃFж´ iÚ3ÍI˜¸x$á‡زˆ sSV¹ŽC¡‘ÂŽ5iÊ‚ž‰È‚E±:;:;HÀƒÂÓQÙAW7.8Ö¨³1¥8B _ q¨âAODäA_75kSTÍËdzp ¤Ã#œ H5A<Ñö¡QAµ$“MªDä@蜈'¢Ž$Š8:/"Eä@輈q t^D‹ÈÑyeØJûgÐü¼aÅʃr EFÄh*ƒF—¼¸ð §™Ê29– Že¨ËP9– že¼H#™o æ[ÄÌ·‰™o2Þ$e¼HËx9–ñ s-â@æ[ÄÌ·‰™o2Þ$e¼HË89–q s,â@æ[Ä̳‰™g2Î$eœHË89–q s,â@æ[Ä̳‰™g2Î$e¨ÃP:8àAÊ2ƒ.Øœ™ΠÈ!þ-8ÐZÈ‘"69° d@ d@ d@ d@ d@ d@ d@ d@ d@”p d%£ª‚ê("ˆ@¢(D Qˆ@ @ @ @ @ @ @ @ @¢(((((((((D Qˆ@¢(D Qˆ@¢(D Qˆ@¢(D Qˆ@¢(D Qˆ@¢(D Qˆ@¢(D Qˆ@¢ÿÙusr/src/sdlBasic/share/doc/sdlBasic/english/sections/appendix/KnownBugs.html0000777000076500007660000000320110463122141024420 0ustar bugs
Known bugs

Below there is the list of known bugs that are waiting for fixing.
 

command name bug description
right$(string$, position) may be it's not really a bug but the way it works: position is not relative from right string position. workaround: right$( a$, len(a$)-position)

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/appendix/virtualJoystick.html0000755000000000000000000000324710643534206027473 0ustar rootroot Virtual Joystick
Virtual Joystick

When sdlBasic don't detect a real joystick attached to your pc a virtual joystick is emulated by using the keyboard.

Keys

Virtual joystick ergonomy is based upon the GP2X handheld device.
Here a picture of the device.
GP2X handheld device
direction are emulated by arrow keys or, in alternative, the keys on numeric pad.
left and right shift keys emulates the two front buttons
Keys A S D F emulate buttons A B X Y
Page Up and Down are used to emulate volume buttons
Select and Start are emulated using Keys ? ?


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/appendix/keyboardKeycodes.html0000777000076500007660000000651610463122206026010 0ustar a)Keyboard keycodes
Keyboard keycodes

Below there is the table of mnemonic codes referring to keyboard keys. You can use them as argument of key() command to check if a particular key has been pressed from users instead of type in the ASCII code.

k_backspace
k_tab
k_clear
k_return
k_pause
k_escape
k_esc
k_space
k_exclaim
k_quotedbl
k_hash
k_dollar
k_ampersand
k_quote
k_leftparen
k_rightparen
k_asterisk
k_plus
k_comma
k_minus
k_period
k_slash
k_colon
k_semicolon
k_less
k_equals
k_greater
k_question
k_at
k_leftbracket
k_backslash
k_rightbracket
k_caret
k_underscore
k_backquote
k_delete

Numbers:
k_1
k_2
k_3
k_4
k_5
k_6
k_7
k_8
k_9
k_0

Arrows
k_up
k_down
k_right
k_left

k_insert
k_home
k_end
k_pageup
k_pagedown

Keypad:
k_kp0
k_kp1
k_kp2
k_kp3
k_kp4
k_kp5
k_kp6
k_kp7
k_kp8
k_kp9
k_kp_period
k_kp_divide
k_kp_multiply
k_kp_minus
k_kp_plus
k_kp_enter
k_kp_equals

Function Keys
k_f1
k_f2
k_f3
k_f4
k_f5
k_f6
k_f7
k_f8
k_f9
k_f10
k_f11
k_f12
k_f13
k_f14
k_f15

k_numlock
k_capslock
k_scrollock
k_rshift
k_lshift
k_rctrl
k_lctrl
k_ralt
k_lalt
k_rmeta
k_lmeta
k_lsuper        Left "Windows" key
k_rsuper        Right "Windows" key
k_mode        "Alt Gr" key
k_compose    Multi-key compose key
k_help
k_print
k_sysreq
k_break
k_menu
k_powe        Power Macintosh power key
k_euro        Some European keyboards
k_undo        Atari keyboard has Undo
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/appendix/sourceDirectoryContents.html0000777000076500007660000000161710463122206027421 0ustar b)Source Directory Contents
Source Directory Contents


due to the heavy code reorganization this chapter should be rewritten.

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/appendix/appendixIndex.html0000755000000000000000000000162710644532445027071 0ustar rootroot appendix Index
Appendix

Keyboard keycodes
Virtual Joystick
Source Directory Content Known bugs
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/license/0000777000000000000000000000000010645354554023214 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/license/editor.html0000777000076500007660000000625010463127105023617 0ustar sdlBasic Editor License
sdlBasic Editor License

sdlBasic Editor is based upon SciTE and Scintilla editing component, it inherit from them both the powerful features and the license.

Copyright 1998-2005 by Neil Hodgson and sdlBasic team.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

License for Scintilla and sdlBasic Editor

Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>

All Rights Reserved

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.

NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

  usr/src/sdlBasic/share/doc/sdlBasic/english/sections/license/documentation.html0000777000076500007660000005504110463127105025204 0ustar sdlBasic Documentation License
sdlBasic Documentation License

Copyright (c)  2005 sdlBasic Team.

This documentation is distributed on an "As Is" basis, without any kind of warranty.  In the preparation of this guide every precaution has been taken, however, the authors shall not have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections Texts.
A copy of the license is included here below.

GNU Free Documentation License

 

Version 1.2, November 2002


Copyright (C) 2000,2001,2002  Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.


 0. PREAMBLE


The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.


This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.


We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.


1. APPLICABILITY AND DEFINITIONS


This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.


A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.


A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.


The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.


The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.


A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque".


Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.


The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text.


A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition.


The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.


2. VERBATIM COPYING


You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.


You may also lend copies, under the same conditions stated above, and you may publicly display copies.


3. COPYING IN QUANTITY


If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.


If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.


If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.


It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.


4. MODIFICATIONS


You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:


A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement.
C. State on the Title page the name of the publisher of the Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.
K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.
M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version.
N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section.
O. Preserve any Warranty Disclaimers.

If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles.


You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.


You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.


The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.


5. COMBINING DOCUMENTS


You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.


The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.


In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements."


6. COLLECTIONS OF DOCUMENTS


You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.


You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.


7. AGGREGATION WITH INDEPENDENT WORKS


A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.


If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.


8. TRANSLATION


Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.


If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.


9. TERMINATION


You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.


10. FUTURE REVISIONS OF THIS LICENSE


The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/.


Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. 

  usr/src/sdlBasic/share/doc/sdlBasic/english/sections/license/runtime.html0000777000076500007660000012562010463127153024022 0ustar sdlBasic runtime License
sdlBasic Runtime License

Copyright (C) 2001-2005  David Cuny and sdlBasic team
.

sdlBasic runtime is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public License here below for more details.


GNU LIBRARY GENERAL PUBLIC LICENSE
==================================
Version 2, June 1991

 Copyright (C) 1991 Free Software Foundation, Inc.
                    675 Mass Ave, Cambridge, MA 02139, USA
 Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

[This is the first released version of the library GPL.  It is numbered 2 because it goes with version 2 of the ordinary GPL.]

Preamble

The licenses for most software are designed to take away your freedom to share and change it.  By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.

This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it.  You can use it for your libraries, too.

When we speak of free software, we are referring to freedom, not price.  Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it.

For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you.  You must make sure that they, too, receive or can get the source code.  If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it.  And you must show them these terms so they know their rights.

Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library.

Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library.  If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations.
 
Finally, any free program is threatened constantly by software patents.  We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software.  To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.

Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs.  This license, the GNU Library General Public License, applies to certain designated libraries.  This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license.

The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it.  Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program.  However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such.

Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries.  We concluded that weaker conditions might promote sharing better.

However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves.  This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them.  (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.)  The hope is that this will lead to faster development of free libraries.

The precise terms and conditions for copying, distribution and modification follow.  Pay close attention to the difference between a "work based on the library" and a "work that uses the library".  The former contains code derived from the library, while the latter only works together with the library.

Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one.

GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License").  Each licensee is addressed as "you".

A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.

The "Library", below, refers to any such software library or work which has been distributed under these terms.  A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language.  (Hereinafter, translation is included without limitation in the term "modification".)

"Source code" for a work means the preferred form of the work for making modifications to it.  For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope.  The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it).  Whether that is true depends on what the Library does and what the program that uses the Library does.
 
1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
 
2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

a) The modified work must itself be a software library.

b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.

c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.

d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.

(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application.  Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)

These requirements apply to the modified work as a whole.  If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as
separate works.  But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote
it.

Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.

In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library.  To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License.  (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.)  Do not make any other change in these notices.
 
Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.

This option is useful when you wish to copy part of the code of the Library into a program that is not a library.

4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.

If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.

5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library".  Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.

However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library".  The executable is therefore covered by this License. Section 6 states terms for distribution
of such executables.

When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library.  The threshold for this to be true is not precisely defined by law.

If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work.  (Executables containing this object code plus portions of the Library will still fall under Section 6.)

Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
 
6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.

You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License.  You must supply a copy of this License.  If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License.  Also, you must do one of these things:

a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library.  (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)

b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.

c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.

d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.

For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it.  However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system.  Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
 
7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:

a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities.  This must be distributed under the terms of the Sections above.

b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.

8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License.  Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

9. You are not required to accept this License, since you have not signed it.  However, nothing else grants you permission to modify or distribute the Library or its derivative works.  These actions are prohibited by law if you do not accept this License.  Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.

10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions.  You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
 
11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License.  If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all.  For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices.  Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded.  In such case, this License incorporates the limitation as if written in the body of this License.

13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number.  If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation.  If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.

14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission.  For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this.  Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

NO WARRANTY

  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

  Appendix: How to Apply These Terms to Your New Libraries

If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change.  You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).

To apply these terms, attach the following notices to the library.  It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.

<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year>  <name of author>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Also add information on how to contact you by electronic and paper mail.

You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker.

  <signature of Ty Coon>, 1 April 1990
  Ty Coon, President of Vice

That's all there is to it!





 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/license/index.html0000777000076500007660000000140110463127105023431 0ustar license Index
License

sdlBasic Runtime
sdlBasic Editor
Documentation usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sectionsIndexName.html0000777000076500007660000000716410463122141024327 0ustar sectionsIndexName Introduction Commands by feature sdlBasic IDE
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/style.css0000777000076500007660000000346410463122141021672 0ustar /* Generated by CaScadeS, a stylesheet editor for Mozilla Composer */ .link { font-family: Arial,Helvetica,sans-serif; font-style: normal; text-transform: none; text-align: left; color: rgb(0, 0, 0) ! important; font-weight: normal; font-size: small; line-height: 160%; } .subLinks { font-style: normal; text-align: center; opacity: 1; font-family: Arial,Helvetica,sans-serif; padding-top: 0pt; margin-left: 15px; top: 0pt; text-transform: none; font-weight: normal; color: rgb(51, 51, 51) ! important; font-size: small; line-height: 150%; } .text { font-family: Arial,Helvetica,sans-serif; font-weight: inherit; font-size: medium; } .title { font-weight: bold; color: rgb(255, 255, 255); font-family: Arial,Helvetica,sans-serif; line-height: 200%; font-size: xx-large; background-color: transparent; } .code { font-family: Arial,Helvetica,sans-serif; font-size: small; line-height: 130%; font-weight: inherit; margin-left: 30px; background-position: center; background-attachment: fixed; opacity: 1; background-color: rgb(255, 255, 204); } .smallTitle { font-family: Arial,Helvetica,sans-serif; font-size: small; font-style: italic; line-height: 200%; text-transform: none; font-weight: normal; color: rgb(102, 102, 102); } .subTitle { font-family: Arial,Helvetica,sans-serif; line-height: 200%; font-weight: bold; font-size: x-large; } .syntax { font-family: Arial,Helvetica,sans-serif; font-size: medium; font-style: italic; color: rgb(0, 153, 0); font-weight: bold; } .syntax2 { font-family: Arial,Helvetica,sans-serif; font-size: medium; font-weight: bold; font-style: normal; } usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/0000777000000000000000000000000010645354334023367 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/TextDraw/0000777000000000000000000000000010645354530025127 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/TextDraw/textRender().html0000777000076500007660000001117210463125663026525 0ustar textRender()
textRender()

Render given text into an image slot. It use current font at given size. If image slot number is omitted, it store rendered text into first free slot and return it's index number. You can specify render style option: 0(default) = solid, 1 = shaded and 2 = blended. Text color depend by current ink color. See ink() command.

Syntax:
variable = textRender( text , size )

In this case image slot is automatically assigned by sdlBasic and its number returned into variable

Syntax:
textRender( text , size , slot )
textRender( text , size , slot , style )

text
is the text to be written.
size is text size and is expressed in points.
slot is image slot number where generated image will be stored.
style parameter can be: 0(default)= solid, 1= shaded, 2 = blended.

Example:
a$=" sdlBasic "
ink(rgb(255,128,0))
textrender( a$, 16, 1 )
pastebob(100,200,1)
prints("press any key to exit")
while inkey=0
    bob(1,xmouse,20,1)
    sprite(1,20,ymouse,1)
end while
waitkey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/TextDraw/getFont().html0000777000076500007660000000266110463125663026012 0ustar getFont()
getFont()

Returns current font used by text() command.

Syntax:
variable = get Font()

Example:
printS( getfont() )
waitKey


See also setFont() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/TextDraw/index.txt0000777000076500007660000000014510463125663025240 0ustar CVS getFont().html index.html index.txt sectionName.txt setFont().html text().html textRender().html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/TextDraw/index.html0000777000076500007660000000144110463125663025365 0ustar index
Text drawing

getFont()
setFont()
text()
textRender()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/TextDraw/text().html0000777000076500007660000000721310463125663025366 0ustar text()
text()

Prints text on current screen with given size. text() command use current font. See setFont() command. Text color depend by current ink color. See ink() command.

Syntax:
text( x , y , size , text )
text( x , y , size , text , style )

x, y
are screen coordinates where text is printed.
size is text size and is expressed in points.
style parameter can be: 0(default)= solid, 1= shaded, 2 = blended.

Example:
a$=" ciao "
text( 100,100,16,a$ )
text( 100,120,32,"hello" )
ink(rgb(255,128,0))
text(102,202,32,"sdlBasic" ) 
waitkey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/TextDraw/setFont().html0000777000076500007660000000276510463125663026033 0ustar setFont()
setFont()

Set current font. Selected font will be used by text() command.

Syntax:
setFont( path )

Example:
text(100,120,32,"hello")
setfont( " c:/Windows/Fonts/impact.ttf " )
text(100,160,32,"hello")
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/TextDraw/sectionName.txt0000777000076500007660000000001610463125663026373 0ustar Text drawing usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/0000777000000000000000000000000010645354431026770 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/rotateImage().html0000777000076500007660000000206510463123245030476 0ustar rotateImage()
rotateImage()

Rotate given slot image of given degrees.

Syntax:
rotateImage( slot , angle )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/imageHeight().html0000777000076500007660000000337110463123245030451 0ustar imageHeight()
imageHeight()

Returns the height of image contained into given image slot. If image slot is empty, it raise error and halt program execution.

Syntax:
variable = imageWidth( slot )

Example:
loadimage("sprites.png",1)
prints( imageHeight( 1 ) )
waitkey

Example:
imageproperties.sdlbas
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/colorKey().html0000777000076500007660000000233710463123245030026 0ustar colorKey()
colorKey()

Set the colorkey for bitmap transparency. If color is set to -1 (default value) will be used the image upper-left pixel color.

Syntax:
colorKey( color )

old setColorKey() command syntax is still valid.
 

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/zoomImage().html0000777000076500007660000000214410463123245030162 0ustar zoomImage()
zoomImage()

Stretch given slot image.

Syntax:
zoomImage( slot , zoomx , zoomy )

Example:


././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/rotoZoomImage().htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/rotoZoomImage().html0000777000076500007660000000232510463123245031027 0ustar rotoZoomImage()
rotoZoomImage()

Combine image scale and rotation operations in one unique command.

Syntax:
rotoZoomImage( slot , angle, zoom )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/index.txt0000777000076500007660000000041410463123245027072 0ustar colorKey().html copyImage().html CVS deleteImage().html _examples hotSpot().html imageAlpha().html imageExists().html imageHeight().html imageWidth().html index.html index.txt mirrorImage().html rotateImage().html rotoZoomImage().html sectionName.txt zoomImage().html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/imageAlpha().html0000777000076500007660000000242110463123245030261 0ustar imageAlpha()
imageAlpha()

Set alpha channel value of image stored into given slot image.

Syntax:
imageAlpha( slot , alpha )

Old setAlpha() command syntax is still valid.

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/mirrorImage().html0000777000076500007660000000716510463123245030520 0ustar mirrorImage()
mirrorImage()

mirrorImage allow you to mirror the image contained into determined slots vertically and/or horizontally.

Syntax:
mirrorImage( slot , x , y )

slot
is the slot number where the image is loaded
x and y can be true or false (0 or 1) and they indicates if the image is to be flipped horizontally and/or vertically.

Example:
loadimage("sprites.png",1)
pasteIcon( 10, 10, 1 ) 
mirrorImage( 1, 1, 0 ) 
pasteIcon( 100, 10, 1 ) 
mirrorImage( 1, 0, 1 ) 
pasteIcon( 10, 100, 1 ) 
mirrorImage( 1, 1, 1 ) 
pasteIcon( 100, 100, 1 ) 
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/index.html0000777000076500007660000000270210463123245027221 0ustar index
Image manipulation

colorKey()
copyImage()
deleteImage()
hotSpot()
imageAlpha()
imageExists()
imageHeight()
imageWidth()
mirrorImage()
rotateImage()
rotoZoomImage()
zoomImage()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/hotSpot().html0000777000076500007660000000302610463123245027673 0ustar hotSpot()
hotSpot()

Set coordinates origin point in images stored in image slots.

Syntax:
hotSpot( slot , x , y )

0,0 means origin = image upper left corner (default values)
1,1means origin = image center
2,2 means origin = image lower right corner

Example:
hotspot.dlbas

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/imageExists().html0000777000076500007660000000360610463123245030521 0ustar imageExists()
imageExists()

Returns true if given image slot is occupied, false if not.

Syntax:
variable = imageExists( slot )

Example:
prints( imageExists( 1 ) )
loadimage( "sprites.png", 1 )
prints( imageExists( 1 ) )
waitkey

Example:
imageproperties.sdlbas
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/copyImage().html0000777000076500007660000000226010463123245030147 0ustar copyImage()
copyImage()

Copy image from a slot to another one.

Syntax:
copyImage( sourceslot , destinationslot )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/imageWidth().html0000777000076500007660000000341710463123245030321 0ustar imageWidth()
imageWidth()

Returns the width of image contained into given image slot. If image slot is empty, it raise error and halt program execution.

Syntax:
variable = imageWidth( slot )

Example:
loadimage("sprites.png",1)
prints( imageWidth( 1 ) )
waitkey

Example:
imageproperties.sdlbas
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/_examples/0000777000000000000000000000000010645354434030750 5ustar rootroot././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/_examples/imageproperties.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/_examples/imageprope0000777000076500007660000000067310463123245031261 0ustar ------------------------------------------------------------------------------------------ -- Name: imageproperies.sdlbas -- Author: __vroby__ , Zoiba -- Licence: LGPL ------------------------------------------------------------------------------------------ loadimage("sprites.png",1) prints("image exist="+str$(imageExists(1))) prints("image width="+str$(imagewidth(1))) prints("image height="+str$(imageheight(1))) waitkey ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/_examples/sprites.pngusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/_examples/sprites.pn0000777000076500007660000000220010463123245031222 0ustar ‰PNG  IHDR@ •C޶gAMA± üaPLTE0`0`Ÿ`Ïÿ0ÿÿÿŒvO½¨f33ßp+IDAT×½•Û DC üÿ' å’d ˆ/fF­Nö ín %¬ÇTгˆ¢St êòoë$¼ßsn?Š|ìI¨÷—^éúz)ò"¬ZA5œ¸W.Õ®DnK`•[@'„Èy*à„ ÷ !©øæÃ3D0ßJóŠ`ž°=a.šÀ˜5ÀÚž0C&žõÆ\Ã$'öOÖ€R@[—hå¶o Á¶lOhJ|À~š  êÛ0;Â`ƒ\\Ö,ê\XíæK”•)ÿ¬Ó¤sâo€s€wÎ]'nÓè ôÀ,3Л$ Àͤçñâëj€ÜMk³g7jãl²G£¤Ø_®bÜv;7À÷í ÁÔÍ«<Æn¥¢¥íŒ˜IEND®B`‚././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/_examples/hotspot.sdlbas_tmpusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/_examples/hotspot.sd0000777000076500007660000000046310463123245031233 0ustar 'hotspot ink(rgb(255,0,0)) line(0,2,4,2) line(2,0,2,4) grab(1,0,0,5,5) cls loadimage("bidone.bmp",0) while not key(K_esc) cls x=rnd(4)-1 y=rnd(4)-1 text(10,10,15,"hotspot(0,"&x&","&y&")") hotspot(0,x,y) bob( 1,100,100,0) bob(2,100,100,1) screenswap while(inkey=0):end while while(inkey<>0):end while wend ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/_examples/hotspot.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/_examples/hotspot.sd0000777000076500007660000000056510463123245031236 0ustar 'hotspot ink(rgb(255,0,0)) line(0,2,4,2) line(2,0,2,4) grab(1,0,0,5,5) ink(rgb(255,255,255)) loadimage("bidone.bmp",0) while not key(K_esc) cls x=rnd(4)-1 y=rnd(4)-1 text(10,10,15,"hotspot(0,"&x&","&y&") press any key to change hot spot") hotspot(0,x,y) bob( 1,100,100,0) bob(2,100,100,1) screenswap while(inkey=0):end while while(inkey<>0):end while wend ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/_examples/bidone.bmpusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/_examples/bidone.bmp0000777000076500007660000000406610463123245031146 0ustar BM66( ? 0000@@@?TTT7dddttt„„„#”””¨¨¨¸¸¸?ÈÈÈØØØ2èèè?üüü(?H?l ´Ø&ü, ü@ü?`ü?€ü ü?8´ü?pÈü7¨Üü àðü(<&Tl2„?œ ´?Ì?ä.ü? ü0@ü``ü„üÀ°üØ$Üüð)(H9h>Œ¬?Ð>ü ü0 üdü” üÈüüüü81üüp$üü¨üüà85446LL dd|| ˜˜°°ÈÈàà1üü"$üü&Hüü=lüü3üü8´üü Üüü  44!LLdd||3˜˜0°°&ÈÈ=àà:üü8ü$üüHüüpüü”ü,ü¸üüàü:(((<<PP?dh:x|8 ¤¤ ¸¼ ÌÐàäøüøü,+øü\%øüŒ)øü¼5 5,:$@0T deleteImage()
deleteImage()

Erase the image from given image slot number.

Syntax:
deleteImage( slot )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ImageManipulation/sectionName.txt0000777000076500007660000000002410463123245030225 0ustar Image manipulation usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/0000777000000000000000000000000010645354347024260 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/index.txt0000777000076500007660000000035210463122321024347 0ustar autoUpdateBob().html bobExist().html bobHeight().html bobHit().html bob().html bobImage().html bobWidth().html bobX().html bobY().html bobz().html CVS deleteBob().html index.html index.txt sectionName.txt setBob().html updateBob.html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/bobExist().html0000777000076500007660000000244110463122256025275 0ustar bobExist()
bobExist()

Check if given bob is used.
Old liveBob() syntax is still valid.

Syntax:
variable = bobExist( bob )

Return 1 if bob channel is used otherwise returns 0

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/deleteBob().html0000777000076500007660000000172110463122321025374 0ustar deleteBob()
deleteBob()

Disable given bob.

Syntax:
deleteBob( bob )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/bobX().html0000777000076500007660000000231510463122256024410 0ustar bobX()
bobX()

Returns given bob X coordinate.
Old Xbob() syntax is still valid.

Syntax:
variable = bobX( bob )
 
Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/updateBob.html0000777000076500007660000000164410463122321025277 0ustar updateBob
updateBob

Force a manual bob update at screen swap time.

Syntax:
updateBob

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/autoUpdateBob().html0000777000076500007660000000261210463122256026254 0ustar autoUpdateBob()
autoUpdateBob()

Activate or deactivate automatic bob updating system at screen swap time. B y default is set to 1 (active).

Syntax:
autoUpdateBob( switch )

switch = 1 means automatic update activated.
switch = 0 means automatic update deactivated.

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/index.html0000777000076500007660000000266110463122321024501 0ustar index
Bobs

autoUpdateBob()
bobExist()
bobHeight()
bobHit()
bob()
bobImage()
bobWidth()
bobX()
bobY()
bobZ()
deleteBob()
setBob()
updateBob
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/bobWidth().html0000777000076500007660000000203510463122256025257 0ustar bobWidth()
bobWidth()

Returns given bob width.

Syntax:
variable = bobWidth( bob )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/bobImage().html0000777000076500007660000000232010463122256025217 0ustar bobImage()
bobImage()

Returns image slot associated with given bob.
Old frBob() syntax is still valid.

Syntax:
variable = bobImage( bob )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/bobHeight().html0000777000076500007660000000204110463122256025405 0ustar bobHeight()
bobHeight()

Returns given bob height.

Syntax:
variable = bobHeight( bob )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/bobz().html0000777000076500007660000000324010463122321024441 0ustar bobZ()
bobZ()

Sets the bob order in which sprites are refreshed on screen by sdlBasic. If z parameter is omitted, it returns the current bob z position. Think about z position as the bob deep on screen. Bobs having greater z position will be displayed behind those bobs having smaller values.

Syntax:
variable = bobZ( bob )
bobZ( bob , z )

z may range from 0 to the maximum bob number (1024).

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/bob().html0000777000076500007660000000226510463122256024264 0ustar bob()
bob()

Place given slot image on screen at desired coordinates as bob.

Syntax:
bob( bob , x , y , slot )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/bobHit().html0000777000076500007660000000347110463122256024731 0ustar bobHit()
bobHit()

Check collision between bobs. It allow two different syntaxes with different meanings.

Syntax:
variable = bobHit( bobA , bobB )

Returns 1 if sprite
bobA collide with sprite bobB

Syntax:
variable = bobHit( bob )

Returns 1 if bob collide any other bob.

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/setBob().html0000777000076500007660000000203210463122321024721 0ustar setBob()
setBob()

Assigne bob to given screen.

Syntax:
setBob( bob , screen )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/bobY().html0000777000076500007660000000234210463122321024402 0ustar bobY()
bobY()

Returns given bob Y coordinate.
Old Ybob() syntax is still valid.

Syntax:
variable = bobY( bob )

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Bobs/sectionName.txt0000777000076500007660000000000510463122321025500 0ustar Bobs usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/VideoMpeg/0000777000000000000000000000000010645354534025250 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/VideoMpeg/loadMpeg().html0000777000076500007660000000205210463125663026243 0ustar loadMpeg()
loadMpeg()

Open a mpeg video stream for playing.

Syntax:
loadMpeg( file , usesound )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/VideoMpeg/stopMpeg.html0000777000076500007660000000160310463125663026171 0ustar stopMpeg
stopMpeg

Stop video stream.

Syntax:
stopMpeg

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/VideoMpeg/playMpeg().html0000777000076500007660000000220610463125663026272 0ustar playMpeg()
playMpeg()

Play previously opened video. Video files must be coded in mpeg1 format.

Syntax:
playMpeg( repeats )
playMpeg()

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/VideoMpeg/index.txt0000777000076500007660000000027010463125663025354 0ustar CVS deleteMpeg.html index.html index.txt loadMpeg().html pauseMpeg.html playMpeg().html rewindMpeg.html sectionName.txt seekMpeg().html skipMpeg().html statusmpeg().html stopMpeg.html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/VideoMpeg/statusmpeg().html0000777000076500007660000000200410463125663026704 0ustar statusmpeg()
statusMpeg()

Return True if opened mpeg video stream is playing or 0 if not.

Syntax:
variable = statusMpeg

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/VideoMpeg/index.html0000777000076500007660000000224110463125663025501 0ustar index
Video mpeg

deleteMpeg
loadMpeg()
pauseMpeg
playMpeg()
rewindMpeg
seekMpeg()
skipMpeg()
statusMpeg()
stopMpeg
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/VideoMpeg/pauseMpeg.html0000777000076500007660000000164210463125663026324 0ustar pauseMpeg
pauseMpeg

Pause or resume playback of mpeg video stream.

Syntax:
pauseMpeg

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/VideoMpeg/skipMpeg().html0000777000076500007660000000176610463125663026305 0ustar skipMpeg()
skipMpeg()

Skip given number of seconds in mpeg video stream play.

Syntax:
skipMpeg( seconds )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/VideoMpeg/seekMpeg().html0000777000076500007660000000174610463125663026264 0ustar seekMpeg()
seekMpeg()

Seek mpeg video stream play position.

Syntax:
seekMpeg( position )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/VideoMpeg/deleteMpeg.html0000777000076500007660000000162010463125663026445 0ustar deleteMpeg
deleteMpeg

Close mpeg video stream.

Syntax:
deleteMpeg

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/VideoMpeg/rewindMpeg.html0000777000076500007660000000164610463125663026503 0ustar rewindMpeg
rewindMpeg

Rewind the play position of mpeg video stream.

Syntax:
rewindMpeg

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/VideoMpeg/sectionName.txt0000777000076500007660000000001310463125663026505 0ustar Video mpeg usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/indexCreator.sdlbas0000777000076500007660000002152610463122206025443 0ustar # /opt/sdlBasic/bin/sdlBrt Function returnNextTag(fileStream) stringStart=0 stringa="" count=1 seek(fileStream,loc(fileStream)-1) while eof(fileStream)=0 b=chr$(readbyte(fileStream)) if count>1 then if b=">"then exit while else count = count+1 stringa=stringa&b end if else if b="<" then stringStart=loc(fileStream) count = count+1 end if end if end while --print count if count>1 then if stringa="" then seek(fileStream,loc(fileStream)-1) return -1 else seek(fileStream,loc(fileStream)-1) return stringa end if end if end function Function returnNextIntraTag(fileStream) stringStart=0 stringa="" count=1 seek(1,loc(fileStream)-1) while eof(fileStream)=0 b=chr$(readbyte(fileStream)) if count>1 then if b="<"then exit while else count = count+1 stringa=stringa&b end if else if b=">" then stringStart=loc(fileStream) count = count+1 end if end if end while --print count if count>1 then if stringa="" then seek(fileStream,loc(fileStream)-1) return -1 else return stringa end if end if end function function createHeader(stream,title) file output #stream, "" file output #stream, "" file output #stream, "" file output #stream, "" file output #stream, " " file output #stream, " index" file output #stream, " " file output #stream, "" file output #stream, "" file output #stream, "" file output #stream, "" --file output #stream, "
"& findDir() &"
" file output #stream, "
"& title &"
" file output #stream, "
" file output #stream, "
" end function function findDir() curDir$=dir$ pos=rinStr ( curDir$, "/" ) return right$( curDir$, len(curDir$)-pos) end function function createFooter(stream) file output #stream, "" file output #stream, "" end function function formatName(title) formattedName="" flag=0 for n = 1 to len(title) c$=mid(title,n,1) if c$<>" " then if flag then formattedName=formattedName+uCase(c$) flag=0 else formattedName=formattedName+c$ end if else flag=1 end if next return formattedName end function function findTag(tag, fileStream) while eof(fileStream)=0 rtag=returnNextTag(fileStream) if tag=rtag then : exit while : end if wend --print loc(fileStream) return loc(fileStream) end function ------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------- -- MAIN ------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------- setDisplay( 640, 300, 32, 1 ) txtFile="index.txt" fileFlag2=0 openTextFlag=0 openFlagSpan=0 ------------------------------------------------------------------------------------------------- ------------------------------------------ creating indexes of commands sorted by functionality ------------------------------------------------------------------------------------------------- originalDir$=dir$ if isLinux then : shell("ls > dirs.txt") : end if open "dirs.txt" for input as 5 while not eof( 5 ) file input #5, directory$ locate (1,4) : prints("working on "&directory$&" ") if directory$<>"dirs.txt" and directory$<>"index.html" and directory$<>"CVS" and directory$<>"indexCreator.sdlbas" and directory$<>"alphabetical"then chDir(originalDir$&"/"&directory$) if isLinux then : shell("ls > index.txt") : end if open txtFile for input as 1 open "index.html" for output as 2 ------------------------------------------------ writing header open "sectionName.txt" for input as 6 file input #6, sectionName$ close 6 createHeader(2,sectionName$) while not eof( 1 ) ' read a line from the file and print it file input #1, path$ if path$<>"index.txt" and path$<>"index.html" and path$<>"CVS" and path$<>"sectionName.txt" then if left$( path$, 1 )<>"_" then --link$=left$(path$, length(path$)-5) ------------------------------------------ searching link title loc1=loc(1) --------- seek bug? store actual stram 1 loc --print loc(1) --print path$ open path$ for input as 3 findTag("span class="&chr$(34)&"subTitle"&chr$(34), 3) link$=returnNextIntraTag(3) --print link$ close 3 seek(1,loc1) ------------------- restore original stream 1 loc ------------------------------------------ if inStr( path$, "!" )<>0 then file output #2, "
" file output #2, ""&link$&"
" file output #2, "
" else file output #2, ""&link$&"
" end if end if end if end while createFooter(2) close 1 close 2 end if end while ------------------------------------------------------------------------------------------------- ------------------------------------------ creating indexes of commands sorted alphabetically ------------------------------------------------------------------------------------------------- chDir(originalDir$) seek(5,1) ------reset dir.txt open "alphabetical/index.txt" for output as 2 --createHeader(2,"index") while not eof( 5 ) file input #5, directory$ locate (1,4) : prints("working on "&directory$&" ") if directory$<>"dirs.txt" and directory$<>"alphabetical" and directory$<>"CVS" and directory$<>"sortedIndex.txt" and directory$<>"indexCreator.sdlbas" then chDir(originalDir$&"/"&directory$) open txtFile for input as 1 while not eof( 1 ) ' read a line from the file and print it file input #1, path$ if path$<>"index.txt" and path$<>"index.html" and path$<>"CVS " and path$<>"indexCreator.sdlbas" and path$<>"sectionName.txt" then if left$( path$, 1 )<>"_" then -------------------------------------- searching link title loc1=loc(1) --------- seek bug? store actual stram 1 loc --print loc(1) --print path$ open path$ for input as 3 findTag("span class="&chr$(34)&"subTitle"&chr$(34), 3) link$=returnNextIntraTag(3) --print asc(left$(link$,1)) if left$(link$,1)=chr(10) then link$=right$(link$,len(link$)-1) end if --print link$ close 3 seek(1,loc1) ------------------- restore original stream 1 loc -------------------------------------- file output #2, link$&":"&directory$&"/"&path$ end if end if end while close 1 end if end while close 2 close 5 chDir(originalDir$&"/alphabetical") if isLinux then : shell("sort index.txt --output=sortedIndex.txt") : end if data( "a - b", "c","d","e - f","g - i", "j - l", "m - n", "o - q", "r", "s", "t - z") chunk$=read() open "sortedIndex.txt" for input as 1 open chunk$&".html" for output as 2 createHeader(2,chunk$) while not eof( 1 ) file input #1, lin$ n= inStr( lin$, ":" ) link$=left$(lin$, n-1) path$=right$(lin$,len(lin$)-n) locate (1,4) : prints("working on "&link$&" ") if left$( link$, 1 )>right(chunk$,1) then createFooter(2) close 2 chunk$=read() open chunk$&".html" for output as 2 createHeader(2,chunk$) end if if inStr( path$, "!" )<>0 then file output #2, "
" file output #2, ""&link$&"
" file output #2, "
" else file output #2, ""&link$&"
" end if end while createFooter(2) close 1 close 2 usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/dirs.txt0000777000076500007660000000053110463122206023315 0ustar alphabetical Array Blitting Bobs CDSupport ConsoleOutput ControlStructures CVS DataFunctions DateAndTime Dirs dirs.txt DisplayAndScreen Files Graphic ImageManipulation indexCreator.sdlb Joystick Keyboard Maths MemoryBanks Mouse MultimediaFiles Operators PrintScreen Runtime Socket SoundAndMusic Sprites Strings SubAndFunction TextDraw VideoMpeg usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/0000777000000000000000000000000010645354521025016 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/typeOf$().html0000777000076500007660000000450210463125036025573 0ustar typeOf$()
typeOf$()

Returns string datatype.  This command let you check if a variable contains a string or a number. You can omit the dollar character writing command.

Syntax:
string = typeOf$( variable )
string = typeOf( variable )

Returned values may be "string" or "number".

Example:
a=10
b="foo"
print typeOf( a )
print typeOf( b )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/asc().html0000777000076500007660000000273510463124706025040 0ustar asc()
asc()

Return the ASCII code of the first character in string. Empty strings will return a value of zero.

Syntax:
variable = asc( string )

Example:
' set n to 65
n = asc("A")

See also chr$() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/str$().html0000777000076500007660000000541510463124762025146 0ustar str$()
str$()

Returns string representation of numeric expression. Numeric expression may be floating point or a integer value.You can omit the dollar character so you can alternatively write it as
str() .

Syntax
string = str$( value )
string = str( value )

Alternatively you can use commands strF$() or strF().

Syntax
string = strF$( value )
string = strF( value )

Example
' Set s to "123"
s = str$( 123 )

See also val() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/rTrim().html0000777000076500007660000000452710463124762025372 0ustar rTrim(string$)
rTrim()

Right trim string. Return string without right spaces. You can omit the dollar character so you can alternatively write it as rTrim()
.

Syntax:
string = rTrim$( string )
string = rTrim( string )

Example:
a$ = "test string "
b$= rTrim( a$ )
print a$ & "|---"
print b$ & "|---"

See also trim$() and lTrim$() commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/replace$().html0000777000076500007660000000572710463124762025757 0ustar replace$([index], source$, replace$)
replace$()

Replace string from
source with replace starting at index and returns a string as result. You can omit the dollar character so you can alternatively write it as replace() .

Syntax:
string = replace$( position , source , replace )
string = replace( position , source , replace )

Example:
a$="ciao ciao"
print("string: "+a$)
print( replace( a$,"bye bye" ) )
print( replace( 5, a$,"bye bye" ) )

See also replaceSubstr$() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/index.txt0000777000076500007660000000055110463124706025125 0ustar asc().html chr$().html CVS index.html index.txt insert$().html inStr().html lCase$().html left$().html length().html lTrim$().html mid$().html replace$().html replaceSubstr$().html reverse$().html right$().html rinStr().html rTrim().html sectionName.txt space$().html str$().html string$().html tally().html trim$().html typeOf$().html uCase$().html val().html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/replaceSubstr$().html0000777000076500007660000000567310463124762027162 0ustar replaceSubstr$(source$, orig$, repl$)
replaceSubstr$()

Substitute
target substring with replacing substring inside source string and returns a string as result. You can omit the dollar character so you can alternatively write it as replaceSubstr() .

Syntax:
string = replaceSubstr$( source , target , replacing )
string = replaceSubstr( source , target , replacing )

Example:
a$="ciao ciao vroby"
prints("string:"+a$)
prints( replaceSubstr( a$,"ciao","bye" ) )
waitKey

See also replace$() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/left$().html0000777000076500007660000000527710463124762025276 0ustar left$()
left$()

Return leftmost number of character in string. You can omit the dollar character so you can alternatively write it as left() .


System:
string = left$( string , number )
string = left( string , number )

Example:
a$="hello world"
'next line will print "hel"
print( left$( a$,3 ) )
'next line will print "hello w"
print( left$( a$,7 ) )

See also right$() and mid$() commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/insert$().html0000777000076500007660000000432510463124706025637 0ustar insert$()
insert$()

Inserts source string into destination string at desired position. You can omit the dollar character so you can alternatively write it as insert() .


Syntax:
insert$( source$ , target$ , position )
insert( source$ , target$ , position )

Example:
a$="Hi how are you?"
b$="Roby, "
prints( insert( a$,b$,3 ) )
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/string$().html0000777000076500007660000000420410463124762025637 0ustar string$()
string$()

Returns string length count made up of char. You can omit the dollar symbol and type string() .

Syntax
string = string$( count , char )
string = string( count , char )

char
can also be a numeric ASCII code

Example
' Set s to "---" (three dashes)
s = string$( 3, "-" )

See also space$() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/tally().html0000777000076500007660000000507510463125036025414 0ustar tally(src$,sub$)
tally()

Returns the number of existing occurrences of substring into string.

Syntax:
variable = tally( string , substring )
variable = tally( start , string , substring )

start is an optional start value specifies where in the string to begin the search.

Example:
a$="ciao ciao ciao ciao"
prints("string: "+a$)
prints( tally( a$, "ciao" ) )
prints( tally( 5, a$, "ciao" ) )
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/trim$().html0000777000076500007660000000436510463125036025307 0ustar trim$()
trim$()

Trim string. Return string without right and left spaces. You can omit the dollar character so you can alternatively write it as trim() .

Syntax:
string = trim$( string )
string = trim( string )

Example:
a$ = " test string "
b$= trim( a$ )
print a$ & "|---"
print b$ & "|---"

See also ltrim$() and rTrim$() commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/rinStr().html0000777000076500007660000000504210463124762025547 0ustar rinStr(optional start,source$,target$)
rinStr()

Reverse inStr() . Returns position of substring in string. If no match, returns zero.
Reverse Instr function, search from end to start.

Syntax:
position = rinStr( string , substring )
position = rinStr( start , string , substring )

start
is an optional start value specifies where in the string to begin the search.

Example;
a$ = "picture.png"
n = rinStr( a$, "." )
print mid( a$, 1, n-1)

See also inStr() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/val().html0000777000076500007660000000266310463125036025051 0ustar val(string$)
val()

Return closest numeric representation of a string.

Syntax:
variable = val( string )

Example:
'set n to 18
n = val( "18xx" )

See also str$() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/index.html0000777000076500007660000000412410463124706025252 0ustar index
Strings

asc()
chr$()
insert$()
inStr()
lCase$()
left$()
length()
lTrim$()
mid$()
replace$()
replaceSubstr$()
reverse$()
right$()
rinStr()
rTrim()
space$()
str$()
string$()
tally()
trim$()
typeOf$()
uCase$()
val()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/lTrim$().html0000777000076500007660000000437010463124762025424 0ustar lTrim$()
lTrim$()

Left trim string. Return string without left spaces. You can omit the dollar character so you can alternatively write it as lTrim() .


Syntax:
string = lTrim$( string )
string = lTrim( string )

Example:
a$ = " test string"
b$= lTrim( a$ )
print a$
print b$

See also trim$() and rTrim$() commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/inStr().html0000777000076500007660000000427410463124706025371 0ustar inStr()
inStr()

Returns position of substring in string. If no match, returns zero.

Syntax:
position = inStr( string , substring )
position = inStr( start , string , substring )

start
is an optional start value specifies where in the string to begin the search.

Example;
' sets n to 4
n = inStr( "sdlBasic", "Basic" )

See also rinStr() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/chr$().html0000777000076500007660000000366610463124706025116 0ustar chr$()
chr$()

Returns a 1 character string with ASCII code character number. You can omit the dollar character so you can alternatively write it as chr() .


Syntax:
string = chr$( number )
string = chr( number )

Example:
' s = "A"
s = chr$( 65 )

See also asc() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/uCase$().html0000777000076500007660000000410010463125036025357 0ustar uCase()
uCase$()

Converts all string's character to upperercase. You can omit the dollar character so you can alternatively write it as uCase() .


Syntax:
string = uCase$( string )
string = uCase( string )

Example:
a$ = "test string"
b$ = uCase( a$ )
print(b$)

See also lCase$() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/length().html0000777000076500007660000000361710463124762025555 0ustar length()
length()

Return length of string. You can abbreviate it by writing len() .


Syntax:
variable = length( string )
variable = len( string )

Example:
a$="hi there"
'next line will print 8
print( len( a$ ) )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/reverse$().html0000777000076500007660000000333510463124762026010 0ustar reverse$(string$)
reverse$()

Return reversed string.
You can omit the dollar character so you can alternatively write it as reverse() .

Syntax:
string = reverse$( string )
string = reverse( string )

Example:
print( reverse( "bye bye vroby" ) )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/space$().html0000777000076500007660000000364010463124762025427 0ustar space$(n)
space$()

Returns string built of a number of spaces. You can omit the dollar character so you can alternatively write it as space()
.

Syntax
string = space$( number )
string = space( number )

Example
' Set s to " " (three spaces)
s = space$( 5 )

See also string$() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/lCase$().html0000777000076500007660000000407410463124706025363 0ustar lCase$()
lCase$()

Converts all string's character to lowercase. You can omit the dollar character so you can alternatively write it as lCase() .


Syntax:
string = lCase$( string )
string = lCase( string )

Example:
a$ = "TEST STRING"
b$ = lCase( a$ )
print(b$)

See also uCase$() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/right$().html0000777000076500007660000000535010463124762025451 0ustar right$()
right$()

Return rightmost number of character in string. You can omit the dollar character so you can alternatively write it as right()
.

Syntax:
string = right$( string , number )
string = right( string , number )

Example:
a$="hello world"
'next line will print "rld"
print( right$( a$,3 )
'next line will print "o world"
print( right$( a$,7 )

See also left$() and mid$() commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/sectionName.txt0000777000076500007660000000001010463124762026253 0ustar Strings usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Strings/mid$().html0000777000076500007660000000472310463124762025110 0ustar mid$()
mid$()

Return string with chars 1..n from source. You can omit the dollar character so you can alternatively write it as mid() .


Syntax:
string = mid$( string , start , {end} )
string = mid( string , start , {end} )

Example:
a$="| hello |"
print( mid$( a$,4,4 ) )
print( mid$( a$,4 ) )

See also left$() and right$() commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/0000777000000000000000000000000010645354353025253 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/playCD().html0000777000076500007660000000262710463122321025667 0ustar playCD()
playCD()

Play a cd.

Syntax:
variable = playCD( n , start , length )

Play cd from
start frame for length frames.

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/ejectCD().html0000777000076500007660000000170610463122321026011 0ustar ejectCD()
ejectCD()

Ejects a cdrom.

Syntax:
ejectCD( n )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/resumeCD().html0000777000076500007660000000217210463122321026215 0ustar resumeCD()
resumeCD()

Resumes a previously paused cdrom.

Syntax:
resumeCD( n )

Example:

See also pauseCD() command.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/closeCD(n).html0000777000076500007660000000171310463122321026200 0ustar closeCD(n)
closeCD(n)

Closes a cd handle.

Syntax:
closeCD( n )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/index.txt0000777000076500007660000000051610463122321025347 0ustar cdCurFrame().html cdCurTrack().html cdInserted().html cdName().html cdTrackLength().html cdTrackOffset().html cdTrackType().html closeCD(n).html countCdDrives.html countCdTracks().html CVS ejectCD().html index.html index.txt openCD().html pauseCD().html playCD().html playTracksCD().html resumeCD().html sectionName.txt stopCD().html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/cdCurTrack().html0000777000076500007660000000247010463122321026534 0ustar cdCurTrack()
cdCurTrack()

Returns current track in cd.
Old curTrackCD() syntax is still valid but is discouraged.

Syntax:
variable = cdCurTrack( n )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/cdName().html0000777000076500007660000000247410463122321025702 0ustar cdName()
cdName()

Returns a human-readable, system-dependent identifier for the cd-rom.
Old nameCD() syntax is still valid but is discouraged.

Syntax:
variable = cdName( drive )

Example:




usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/pauseCD().html0000777000076500007660000000171110463122321026030 0ustar pauseCD()
pauseCD()

Pause given cdrom.

Syntax:
pauseCD( n )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/cdCurFrame().html0000777000076500007660000000252310463122321026521 0ustar cdCurFrame()
cdCurFrame()

Returns current frame in cd.
Old curFrameCD() syntax is still valid but is discouraged.

Syntax:
variable = cdCurFrame( n )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/index.html0000777000076500007660000000346010463122321025475 0ustar index
CD-ROM support

cdCurFrame()
cdCurTrack()
cdInserted()
cdName()
cdTrackLength()
cdTrackOffset()
cdTrackType()
closeCD(n)
countCdDrives
countCdTracks()
ejectCD()
openCD()
pauseCD()
playCD()
playTracksCD()
resumeCD()
stopCD()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/cdTrackLength().html0000777000076500007660000000251310463122321027222 0ustar cdTrackLength()
cdTrackLength()

Return the length of track.
Old trackLengthCD() syntax is still valid but is discouraged.

Syntax:
variable = cdTrackLength( n , track )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/cdTrackOffset().html0000777000076500007660000000252210463122321027227 0ustar cdTrackOffset()
cdTrackOffset()

Return the offset to the beginning of this track in frames.
Old trackOffsetCD() syntax is still valid but is discouraged.

Syntax:
variable = cdTrackOffset( n , track )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/playTracksCD().html0000777000076500007660000000266510463122321027041 0ustar playTracksCD()
playTracksCD()

Play a given number of tracks.

Syntax:
variable = playTracksCD( n , trk1 , fr1 , ntrks , nfrs )

Play the given cd track(s) from frame fr1 of track trk1 for ntrks/nfrs. 0=all

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/stopCD().html0000777000076500007660000000170210463122321025700 0ustar stopCD()
stopCD()

Stop a cd-rom.

Syntax:
stopCD( n )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/cdInserted().html0000777000076500007660000000251010463122321026566 0ustar cdInserted()
cdInserted()

Return True if compact disc is inserted into cd-rom drive.
Old inDriveCD() syntax is still valid but is discouraged.

Syntax:
variable = cdInserted( n )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/cdTrackType().html0000777000076500007660000000266310463122321026730 0ustar cdTrackType()
cdTrackType()

Return track type.
Old trackTypeCD() syntax is still valid but is discouraged.

Syntax:
variable = cdTrackType( n , track )

SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...)

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/openCD().html0000777000076500007660000000214310463122321025654 0ustar openCD()
openCD()

Opens a cd-rom drive for access.

Syntax:
variable = openCD( n , drive )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/countCdTracks().html0000777000076500007660000000233310463122321027254 0ustar countCdTracks()
countCdTracks()

Returns cd track number.
Old tracksCD() syntax is still valid but is discouraged.

Syntax:
variable = countCdTracks( n )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/sectionName.txt0000777000076500007660000000001710463122321026501 0ustar CD-ROM support usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/CDSupport/countCdDrives.html0000777000076500007660000000270710463122321027145 0ustar countCdDrives
countCdDrives

Returns the number of cd-rom drives on the system.
Old numDrivesCD syntax is still valid but is discouraged.

Syntax:
variable = countCdDrives

Example:
print countCdDrives

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/0000777000000000000000000000000010645354441025165 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/bJoy().html0000777000076500007660000000207710463123312025332 0ustar bJoy()
bJoy()

Returns joystick buttons boolean state.

Syntax:
variable = bJoy( index )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/nameJoystick().html0000777000076500007660000000211310463123312027056 0ustar nameJoystick()
nameJoystick()

Returns joystick name.

Syntax:
variable = nameJoystick( index )

Example:



usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/joy().html0000777000076500007660000000210410463123312025217 0ustar joy()
joy()

Returns joystick boolean stick coordinates.

Syntax:
variable = joy( index )

Example:



usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/index.txt0000755000000000000000000000051410644532452027033 0ustar rootrootbJoy().html CVS getAxisJoystick().html getButtonJoystick().html getHatJoystick().html index.html index.txt joy().html nameJoystick().html numAxesJoystick().html numBallsJoystick().html numButtonsJoystick().html numHatsJoystick().html numJoysticks.html sectionName.txt waitBjoy().html XgetBallJoystick().html YgetBallJoystick().html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/numBallsJoystick().html0000777000076500007660000000215310463123312027717 0ustar numBallsJoystick()
numBallsJoystick()

Returns the number of joystick trackballs.

Syntax:
variable = numBallsJoystick( index )

Example:



usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/numHatsJoystick().html0000777000076500007660000000214110463123312027556 0ustar numHatsJoystick()
numHatsJoystick()

Returns the number of joystick hats.

Syntax:
variable = numHatsJoystick( index )

Example:



usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/numAxesJoystick().html0000777000076500007660000000217710463123312027570 0ustar numAxesJoystick()
numAxesJoystick()

Returns the number of joystick axes.

Syntax:
variable = numAxesJoystick( index )

Example:



usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/getAxisJoystick().html0000777000076500007660000000225010463123312027544 0ustar getAxisJoystick()
getAxisJoystick()

Returns the current state of an axis.

Syntax:
variable = getAxisJoystick( index , axis )

Example:



usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/index.html0000755000000000000000000000324310644532452027162 0ustar rootroot index
Joystick

bJoy()
getAxisJoystick()
getButtonJoystick()
getHatJoystick()
joy()
nameJoystick()
numAxesJoystick()
numBallsJoystick()
numButtonsJoystick()
numHatsJoystick()
numJoysticks
waitBjoy()
XgetBallJoystick()
YgetBallJoystick()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/YgetBallJoystick().html0000777000076500007660000000225110463123312027644 0ustar YgetBallJoystick()
YgetBallJoystick()

Returns relative y trackball motion.

Syntax:
variable = YgetBallJoystick( index , ball )

Example:



usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/numButtonsJoystick().html0000777000076500007660000000215610463123312030323 0ustar numButtonsJoystick()
numButtonsJoystick()

Returns the number of joysitck buttons.

Syntax:
variable = numButtonsJoystick( index )

Example:



usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/getButtonJoystick().html0000777000076500007660000000231210463123312030112 0ustar getButtonJoystick()
getButtonJoystick()

Returns the current state of a given button on a given joystick.

Syntax:
variable = getButtonJoystick( index , button )

Example:



usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/waitBjoy().html0000755000000000000000000000321010643535344027760 0ustar rootroot waitBjoy()
waitBjoy()

Halts the program execution and wait for the pression of joystick button by the user.

Syntax:
waitBjoy(  value )
waitBjoy

value = joystick button to be pressed to continue program execution
if no value is specify, then, any joystick button is taken in count.

Example:



usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/numJoysticks.html0000777000076500007660000000200510463123312026777 0ustar numJoysticks
numJoysticks

Returns available joysticks.

Syntax:
variable = numJoysticks

Example:



usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/getHatJoystick().html0000777000076500007660000000225310463123312027357 0ustar getHatJoystick()
getHatJoystick()

Returns the current state of a joystick hat.

Syntax:
variable = getHatJoystick( index , hat )

Example:



usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/XgetBallJoystick().html0000777000076500007660000000225210463123312027644 0ustar XgetBallJoystick()
XgetBallJoystick()

Returns relative x trackball motion.

Syntax:
variable = XgetBallJoystick( index , ball )

Example:



usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Joystick/sectionName.txt0000777000076500007660000000001110463123312026410 0ustar Joystick usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/0000777000000000000000000000000010645354506024620 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/writeLineSock().html0000777000076500007660000000205710463124322026642 0ustar writeLineSock()
writeLineSock()

Sends strings to the socket.

Syntax:
writeLineSock( sock , string )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/readLineSock().html0000777000076500007660000000207210463124322026420 0ustar readLineSock()
readLineSock()

Read a complete line from given socket.

Syntax:
variable = readLineSock( sock )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/!peekSock().html0000777000076500007660000000226010463124322025661 0ustar *peekSock()
*peekSock()

Peek information coming from socket.

Syntax:
variable = peekSock( sock , numBytes )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/index.txt0000777000076500007660000000062710463124322024722 0ustar acceptSock().html closeSock().html !connectionReadySock().html connectSock().html CVS getFreeSock.html getLocalIP().html getRemoteIP().html getRemotePort().html index.html index.txt isClientReady().html isEnabledSock.html IsServerReady().html openSock().html !peekSock().html readByteSock().html readLineSock().html readSock().html sectionName.txt writeByteSock().html writeLineSock().html writeSock().html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/openSock().html0000777000076500007660000000216310463124322025637 0ustar openSock(port)
openSock(port)
Open a sock in listening mode on given port number. sdlBasic allow 256 sock streams, conceptually sock handling is similar to sdlBasic file handling.
Syntax:
sock = openSock( port )
Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/writeByteSock().html0000777000076500007660000000206310463124322026653 0ustar writeByteSock()
writeByteSock()

Sends a single byte to the socket.

Syntax:
writeByteSock( sock , byte )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/getFreeSock.html0000777000076500007660000000176210463124322026142 0ustar getFreeSock
getFreeSock

return the first free sock in sdlSocket array.

Syntax:
variable = getFreeSock

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/getRemotePort().html0000777000076500007660000000217710463124322026663 0ustar getRemotePort()
getRemotePort()

Return remote port address of connected client.

Syntax:
variable = getRemotePort( sock )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/getLocalIP().html0000777000076500007660000000200510463124322026034 0ustar getLocalIP()
getLocalIP()

Return the local ip address (don't works on windows).

Syntax:
variable = getLocalIP()

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/writeSock().html0000777000076500007660000000221010463124322026021 0ustar writeSock()
writeSock()

Sends given number of bytes to the socket from a string.

Syntax:
writeSock( sock , string , numBytes )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/isEnabledSock.html0000777000076500007660000000175110463124322026445 0ustar isEnabledSock
isEnabledSock

Return 1 if sdlnet was enabled.

Syntax:
variable = isEnabledSock

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/!connectionReadySock().html0000777000076500007660000000225010463124322030060 0ustar *connectionReadySock()
*connectionReadySock()

Return True if the server accepted connection.

Syntax:
variable = connectionReadySock( sock )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/acceptSock().html0000777000076500007660000000210510463124322026131 0ustar acceptSock()
acceptSock()

Accept client connection and returns client sock.

Syntax:
clientSock = acceptSock( serverSock )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/IsServerReady().html0000777000076500007660000000177610463124322026616 0ustar IsServerReady()
IsServerReady()

Returns True if server is sending data.

Syntax:
variable = IsServerReady( Sock )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/readByteSock().html0000777000076500007660000000207410463124322026436 0ustar readByteSock()
readByteSock()

Read a single byte from specified socket.

Syntax:
variable = readByteSock( sock )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/index.html0000777000076500007660000000424710463124322025051 0ustar index
Sockets

acceptSock()
closeSock()
connectSock()
getFreeSock
getLocalIP()
getRemoteIP()
getRemotePort()
isClientReady()
isEnabledSock
IsServerReady()
openSock(port)
readByteSock()
readLineSock()
readSock()
writeByteSock()
writeLineSock()
writeSock()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/closeSock().html0000777000076500007660000000210310463124322025775 0ustar closeSock()
closeSock()

Close given socket connection. Works for booth client and server sides.

Syntax:
closeSock( sock )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/readSock().html0000777000076500007660000000220010463124322025601 0ustar readSock()
readSock()

Read given Number of bytes from specified socket.

Syntax:
variable = readSock( sock , numBytes )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/connectSock().html0000777000076500007660000000225710463124322026333 0ustar connectSock()
connectSock()

Client side socket connection.

Syntax:
sock = connectSock( ServerName , port )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/getRemoteIP().html0000777000076500007660000000207410463124322026243 0ustar getRemoteIP()
getRemoteIP()

Return tremote ip address of connected client.

Syntax:
variable = getRemoteIP( sock )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/isClientReady().html0000777000076500007660000000207410463124322026616 0ustar isClientReady()
isClientReady()

Returns True if client is sending data.

Syntax:
variable = isClientReady( sock )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Socket/sectionName.txt0000777000076500007660000000001010463124322026042 0ustar Sockets usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/0000777000000000000000000000000010645354515025021 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/spriteExist().html0000777000076500007660000000250610463124706026611 0ustar spriteExist()
spriteExist()

Check if given sprite channel is used.
Old liveSprite() syntax is still valid.

Syntax:
variable = spriteExist( sprite )

Return 1 if sprite channel is used otherwise returns 0


Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/spriteWidth().html0000777000076500007660000000205410463124706026572 0ustar spriteWidth()
spriteWidth()

Returns given sprite width.

Syntax:
variable = spriteWidth( sprite )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/index.txt0000777000076500007660000000042210463124706025122 0ustar autoUpdateSprite().html CVS deleteSprite().html index.html index.txt sectionName.txt spriteClip().html spriteExist().html spriteHeight().html spriteHit().html sprite().html spriteImage().html spriteWidth().html spriteX().html spriteY().html spriteZ().html updateSprite.html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/autoUpdateSprite().html0000777000076500007660000000256110463124706027571 0ustar autoUpdateSprite()
autoUpdateSprite()

Activate or deactivate automatic sprite updating system at screen swap time. By default is set to 1 (active)
.

Syntax:
autoUpdateSprite( switch )

switch = 1 means automatic update activated.
switch = 0 means automatic update deactivated.

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/spriteClip().html0000777000076500007660000000222510463124706026402 0ustar spriteClip()
spriteClip()

Set the visible area of sprite.

Syntax:
grab( x , y , w , h )

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/spriteX().html0000777000076500007660000000230410463124706025720 0ustar spriteX()
spriteX()

Returns given sprite X coordinate.
Old Xsprite() syntax is still valid.

Syntax:
variable = spriteX( sprite )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/spriteImage().html0000777000076500007660000000236210463124706026537 0ustar spriteImage()
spriteImage()

Returns image slot associated to given sprite.
Old frSprite() syntax is still valid.

Syntax:
variable = spriteImage( sprite )

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/sprite().html0000777000076500007660000000230410463124706025570 0ustar sprite()
sprite()

Place given slot image on screen as sprite at desired coordinates.

Syntax:
sprite( sprite , x , y , slot )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/spriteHeight().html0000777000076500007660000000206010463124706026720 0ustar spriteHeight()
spriteHeight()

Returns given sprite height.

Syntax:
variable = spriteHeight( sprite )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/updateSprite.html0000777000076500007660000000165610463124706026623 0ustar updateSprite
updateSprite

Force a manual sprite update at screen swap time.

Syntax:
updateSprite

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/index.html0000777000076500007660000000300210463124706025244 0ustar index
Sprites

autoUpdateSprite()
deleteSprite()
spriteClip()
spriteExist()
spriteHeight()
spriteHit()
sprite()
spriteImage()
spriteWidth()
spriteX()
spriteY()
spriteZ()
updateSprite
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/deleteSprite().html0000777000076500007660000000172610463124706026722 0ustar deleteSprite()
deleteSprite()

Disable given sprite.

Syntax:
deleteSprite( sprite )

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/spriteHit().html0000777000076500007660000000362410463124706026243 0ustar spriteHit()
spriteHit()

Check collision between sprites. It allow two different syntaxes.

Syntax:
variable = spriteHit( sprite A , sprite B )

Returns 1 if sprite
spriteA collide with sprite spriteB

Syntax:
variable = spriteHit( sprite )

Returns 1 if
sprite collide any other sprite.

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/spriteZ().html0000777000076500007660000000334510463124706025730 0ustar spriteZ()
spriteZ()

Sets the sprite order in which sprites are refreshed on display by sdlBasic. If z parameter is omitted, it returns the current sprite z position. Think about z position as the sprite deep on display. Sprites having greater z position will be displayed behind those who have smaller values.

Syntax:
variable = spriteY( sprite )
spriteY( sprite , z )

z may range from 0 to the maximum sprite number (1024)

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/spriteY().html0000777000076500007660000000234410463124706025725 0ustar spriteY()
spriteY()

Returns given sprite Y coordinate.
Old Ysprite() syntax is still valid.

Syntax:
variable = spriteY( sprite )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Sprites/sectionName.txt0000777000076500007660000000001010463124706026251 0ustar Sprites usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Keyboard/0000777000000000000000000000000010645354444025131 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Keyboard/key().html0000777000076500007660000000367310463123312025163 0ustar key()
key()

Returns True (1) if given keycode corresponding key is pressed.

Syntax:
variable = key( keycode )

A list of mnemonic keycodes is available for your convenience in appendix: Keyboard keycodes.

Example:
prints("press ESC key to exit.")
while not key( k_esc )
    wait(100)
wend
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Keyboard/index.txt0000777000076500007660000000011610463123312025221 0ustar CVS index.html index.txt inKey.html key().html sectionName.txt waitKey().html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Keyboard/index.html0000777000076500007660000000130310463123312025345 0ustar index
Keyboard

inKey
key()
waitKey()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Keyboard/inKey.html0000777000076500007660000000404710463123312025325 0ustar inKey
inKey

Returns ASCII code of currently pressed key.

Syntax:
variable = inKey

Example:
while not key(k_esc)
    prints("press a key.")
    locate( 0,10)
    prints("ASCII code of pressed key is: " & inKey )
    waitVBL
    cls
wend
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Keyboard/waitKey().html0000777000076500007660000000345110463123312026002 0ustar waitKey()
waitKey()

Suspend program execution and wait for given key pressure. If no keycode is passed, it wait for any key.

Syntax:
waitKey( keycode )
waitKey

Example:
prints("press any key to contunue.")
waitKey
prints("press ESC key to exit.")
waitKey( k_esc )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Keyboard/sectionName.txt0000777000076500007660000000001110463123312026351 0ustar Keyboard usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/0000777000000000000000000000000010645354454025621 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/doke().html0000777000076500007660000000304610463123452026003 0ustar doke()
doke()

Writes a double byte (16 bits) in memory bank at given address. If bank number is omitted, will be used current one.

Syntax:
doke( bank , address , value )
doke( address , value )

Example:

See also deek() command.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/11saveBank().html0000777000076500007660000000310310463123452026747 0ustar saveBank()
saveBank()

Save memory bank to file. If bank number is omitted, will be used current one.

Syntax:
saveBank( filename , {bank} )

Example:
savebank("test.raw",1)

Example:
memoryBankTest.sdlbas

See also loadBank() command.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/40baseimage().html0000777000076500007660000000311710463123452027141 0ustar baseimage()
baseimage()

Links given bitmap slot to given memory bank. Bank size is automatically calculated.

Syntax:
baseimage( bank , image )

Example:
baseimage( 0, 1 )

See also baseimageCC() and freeBase() commands.  usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/loke().html0000777000076500007660000000310410463123452026006 0ustar loke(optional bank,address,value)
loke()

Writes a quadruple byte (32 bits) in memory bank at given address. If bank number is omitted, will be used current one.

Syntax:
loke( bank , address , value )
loke( address , value )

Example:

See also Leek() command.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/index.txt0000777000076500007660000000053610463123452025723 0ustar 10loadBank().html 11saveBank().html 20reserveBank().html 21freeBank().html 40baseimage().html 41baseimageCC().html 42baseScreen().html 43freeBase().html 50bankSize().html 51currentBank().html 54copyBank().html 56memCopy().html CVS deek().html doke().html _examples index.html index.txt leek().html loke().html peek().html poke().html sectionName.txt usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/leek().html0000777000076500007660000000264410463123452026004 0ustar leek()
leek()

Reads a quadruple byte value (32 bits) from memory bank at given address. If bank number is omitted, will be used current one.

Syntax:
leek( bank , address )
leek( address )

Example:

See also Loke() command.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/42baseScreen().html0000777000076500007660000000301210463123452027272 0ustar baseScreen()
baseScreen()

Links given screen bitmap to given memory bank. Bank size is automatically calculated.

Syntax:
baseScreen( bank , image )

Example:
baseScreen( 0, 1 )

See also freeBase() command. 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/poke().html0000777000076500007660000000460610463123534026023 0ustar poke()
poke()

Writes a byte in memory bank at given address. If bank number is omitted, will be used current one.

Syntax:
poke( bank , address , value )
poke( address , value )

Example:
for i =0 to 40
    poke( 1 ,i, 0 )
    x=peek(1,i)
next
Example:
basescreen.sdlbas
Example:
memoryBankTest.sdlbas

See also peek() command.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/43freeBase().html0000777000076500007660000000270510463123452026745 0ustar freeBase()
freeBase()

Unlink given memory bank from image or screen.

Syntax:
freeBase( bank )

Example:
freeBase( 0 )

See also baseImage() , baseImageCC() , baseScreen()  commands.

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/56memCopy().html0000777000076500007660000000504110463123452026642 0ustar memCopy()
memCopy()

Copy portion of memory bank from one to another.

Syntax:
memCopy( sbank , saddess , dbank , daddress , size )

sbank
is the source bank.
saddress is where source memory data start to be copied.
dbank is the destination bank.
daddress is where destination memory data start to be pasted.
size is the size of copied memory data.

Example:
memcopy( 2, 4, 3, 0, 20 )
Example:
memoryBankTest.sdlbas

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/index.html0000777000076500007660000000351410463123452026047 0ustar index
Memory banks

loadBank()
saveBank()
reserveBank()
freeBank()
baseimage()
baseimageCC()
baseScreen()
freeBase()
bankSize()
currentBank()
copyBank()
memCopy()
deek()
doke()
leek()
loke()
peek()
poke()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/21freeBank().html0000777000076500007660000000327110463123452026741 0ustar freeBank()
freeBank()

Deallocate a previously created memory bank.

Syntax:
freeBank( bank )

Example:
freeBank( 0 )
Example:
memoryBankTest.sdlbas

See also reserveBank() and loadBank() commands.

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/54copyBank().html0000777000076500007660000000213110463123452026772 0ustar copyBank()
copyBank()

Copy entire memory bank's informations from one bank to another.

Syntax:
copyBank( source , destination )

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/10loadBank().html0000777000076500007660000000331210463123452026731 0ustar loadBank()
loadBank()

Loads file in memory bank. If bank number is omitted, will be used current one.

Syntax:
loadBank( filename , {bank} )

Example:
loadBank( "test.raw", 2 )
Example:
memoryBankTest.sdlbas

See also saveBank() command.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/50bankSize().html0000777000076500007660000000325710463123452027000 0ustar bankSize()
bankSize()

Return memory bank size, If bank number is omitted, will returned current bank size. Alternatively you can also use sizeBank()  syntax instead.

Syntax:
bankSize( {bank} )
sizeBank( {bank} )

Example:
prints ( "bank "+str$( setbank() )+" size = "+str$( bankSize() ) )

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/20reserveBank().html0000777000076500007660000000346310463123452027475 0ustar reserveBank()
reserveBank()

Create a new raw memory bank of given size.

Syntax:
reserveBank( bank , size )

bank
is the referral number use to handle it, it range from 0 to 255
size is the bank dimension expressed in bytes

Example:
reserveBank( 1, 512 )

Example:
memoryBankTest.sdlbas
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/deek().html0000777000076500007660000000277110463123452025775 0ustar deek()
deek()

Reads a double byte value (16 bits) from memory bank at given address. If bank number is omitted, will be used current one.

Syntax:
deek( bank , address )
deek( address )

Example:

See also doke() command.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/41baseimageCC().html0000777000076500007660000000326010463123452027347 0ustar baseimageCC()
baseimageCC()

Links given bitmap slot to given memory bank. Unlike baseimage() command, it handle image transparencies too. Bank size is automatically calculated.

Syntax:
baseimageCC( bank , image )

Example:
baseimageCC( 0, 1 )

See also baseimage() and freeBase() commands.  usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/peek().html0000777000076500007660000000262010463123534026003 0ustar peek()
peek()

Reads a byte value from memory bank at given address. If bank number is omitted, will be used current one.

Syntax:
peek( bank , address )
peek( address )

Example:

See also poke() command.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/_examples/0000777000000000000000000000000010645354457027601 5ustar rootroot././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/_examples/memoryBankTest.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/_examples/memoryBankTest.s0000777000076500007660000000055710463123534031164 0ustar 'memorybank reservebank(1,400) prints ("bank "+str$(setbank())+" size = "+str$(sizebank())) for i =0 to 40 poke(1,i,0) x=peek(1,i) next for i = 0 to 36 step 4 doke(1,i,i*100) prints(i*100) next savebank("test.raw",1) freebank(2) loadbank("test.raw",2) reservebank(3,40) memcopy(2,4,3,0,20) for i =0 to 36 step 4 prints(deek(3,i)) next waitkey ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/_examples/basescreen.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/_examples/basescreen.sdlba0000777000076500007660000000073110463123534031147 0ustar ------------------------------------------------------------------------------------------------------------ -- baseScreen.sdlbas -- author: zoiba ------------------------------------------------------------------------------------------------------------ setDisplay(320,240,16,1) baseScreen(1,0) print sizebank(1) while not key(k_esc) for i = 0 to (sizeBank(1)-1)step 4 loke(1,i,rgb(rnd(255),rnd(255),rnd(255))) next waitVBL wend freeBase(1) waitKey usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/51currentBank().html0000777000076500007660000000324310463123452027504 0ustar currentBank()
currentBank()

Set current active memory bank. If bank number is omitted it returns current one. You can also use setBank() syntax instead.


Syntax:
currentBank( {bank} )
setBank( {bank} )

Example:
prints ("bank "+str$( currentBank() )+" size = "+str$(sizebank()))
Example:
memoryBankTest.sdlbas
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MemoryBanks/sectionName.txt0000777000076500007660000000001510463123534027052 0ustar Memory banks usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Dirs/0000777000000000000000000000000010645354377024277 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Dirs/index.txt0000777000076500007660000000021010463122501024354 0ustar chDir().html CVS dirExists().html dirFirst().html dir$.html dirNext.html index.html index.txt mkDir().html rmDir().html sectionName.txt usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Dirs/dir$.html0000777000076500007660000000301310463122501024220 0ustar dir$
dir$

Returns string containing current path. Optionally you can use dir() .

Syntax:
variable = dir$
variable = dir

Example:
prints( dir$ )

See also chDir() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Dirs/mkDir().html0000777000076500007660000000334110463122501024571 0ustar mkDir()
mkDir()

Create a new directory on given path.

Syntax:
variable = mkDir( path )

Example:
mkdir( "test" )
if direxists("test") then
    prints("dir test created")
else
    prints("dir test not created")
end if
waitKey

See also rmDir() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Dirs/dirNext.html0000777000076500007660000000364210463122501025023 0ustar dirNext
dirNext

Returns next entry in path directory.

Syntax:
variable = dirNext

Example:
a$= dirfirst( "./" )
while a$<>""
    prints(a$)
    a$= dirNext
end while
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Dirs/index.html0000777000076500007660000000174710463122501024521 0ustar index
Directories

chDir()
dirExists()
dirFirst()
dir$
dirNext
mkDir()
rmDir()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Dirs/dirFirst().html0000777000076500007660000000373510463122501025320 0ustar dirFirst()
dirFirst()

Returns first entry in path directory.

Syntax:
variable = dirFirst( path )

Example:
a$= dirfirst( "./" )
while a$<>""
    prints(a$)
    a$=dirnext
end while
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Dirs/chDir().html0000777000076500007660000000363010463122501024555 0ustar chDir()
chDir()

Change directory.

Syntax:
chDir( path )

Example:
if os="unix" then
    chDir( "/" )
else
    chDir( "c:/" )
end if

See also dir$() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Dirs/dirExists().html0000777000076500007660000000374110463122501025505 0ustar dirExists()
dirExists()

Returns true if directory exists.

Syntax:
variable = dirExists( path )

Example:
if dirExists( "../../examples" ) then
    prints("ok")
else
    prints("error")
end if
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Dirs/rmDir().html0000777000076500007660000000333710463122501024605 0ustar rmDir()
rmDir()

Remove specified directory.

Syntax:
variable = rmDir( dirpath )

Example:
rmDir( "test" )
if not dirExists("test") then
    prints("dir test removed")
else
    prints("can't remove dir test")
end if
waitKey

See also mkDir() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Dirs/sectionName.txt0000777000076500007660000000001510463122501025515 0ustar Directories usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/0000777000000000000000000000000010645354414024430 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/01lof().html0000777000076500007660000000355610463122676024632 0ustar lof()
lof()

Returns length of file expressed in bytes.

Syntax:
lof( stream )

stream is a file previously opened by the open command.

Example:
open "myfile.txt" for input as 1
prints( "the lenght of file \"myfile.txt\" is:"+str$( lof( 1 ) ) ) 
close 1
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/fileMove().html0000777000076500007660000000335010463122757025447 0ustar fileMove()
fileMove()

Move a file

Syntax:
fileMove( source , destination )

source
is the file + path you want to move.
destination is the destination path of file you want to move.
You must specify full or relative path if files don't lies on program directory.

Example:
fileMove( "myfile.txt", "mydir/myfile.txt" )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/index.txt0000777000076500007660000000046210463122757024543 0ustar 00open...For...As.html 01close().html 01eof().html 01lof().html 02loc().html 02seek().html 03readByte().html 03writeByte().html 04fileInput.html 04fileOutput.html 06freeFile.html CVS fileCopy().html fileDelete().html fileExists().html fileMove().html fileRename().html index.html index.txt sectionName.txt usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/fileCopy().html0000777000076500007660000000343410463122757025456 0ustar fileCopy()
fileCopy()

Copy a file.

Syntax:
fileCopy( source , destination )

source
is the file you want to copy.
destination is the file that will be created duplicating source file
You must specify full or relative path if files don't lies on program directory.

Example:
fileCopy( "myfile.txt", "myfile.bk" )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/06freeFile.html0000777000076500007660000000256410463122757025455 0ustar freeFile
freeFile

Returns the handle of the next free file stream available.

Syntax:
variable = freeFile

Example:
newStream = freeFile
open "myfile.txt" for input as newStream
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/03readByte().html0000777000076500007660000000443310463122757025606 0ustar readByte()
readByte()

Return a byte from the file.

Syntax:
readByte( stream )

stream is a file previously opened by the open command.

Example:
open "myfile.txt" for input as 1
while eof(1)=0
a= readbyte( 1 )
prints(str$(a)+" "+chr$(a))
end while
close 1
waitKey

See also writeByte() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/fileRename().html0000777000076500007660000000411310463122757025746 0ustar fileRename()
fileRename()

Rename a file. Filename can be then path+filename.

Syntax:
fileRename( filename , newname )

filename
is the file you want to rename.
newname is the new name you want to give to it.
You must specify full or relative path if files don't lies on program directory.
You can still use old rename() command instead.

Example:
fileRename( "myfile.txt", "renamedfile.txt" )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/03writeByte().html0000777000076500007660000000600110463122757026016 0ustar writeByte()
writeByte()

Write a byte in the file.

Syntax:
writeByte( stream , position )

stream is a file previously opened by the open command.
position represent the position where the byte will be wrote to, this position is measured in number of byte from file beginning.

Example:
open "myfile.txt" for output as 1
writebyte( 1,asc("s") )
writebyte( 1,asc("d") )
writebyte( 1,asc("l") )
writebyte( 1,asc("B") )
writebyte( 1,asc("a") )
writebyte( 1,asc("s") )
writebyte( 1,asc("i") )
writebyte( 1,asc("c") )
writebyte( 1,13 )
close 1

See also readByte() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/index.html0000777000076500007660000000326010463122757024667 0ustar index
Files

open ... for ... as
close()
eof()
lof()
loc()
seek()
readByte()
writeByte()
file input #
file output #
freeFile
fileCopy()
fileDelete()
fileExists()
fileMove()
fileRename()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/01eof().html0000777000076500007660000000463710463122676024624 0ustar eof()
eof()

Returns true if the end of file stream has been reached.

Syntax:
variable = Eof( stream )

stream is a file previously opened by the open command.

Example:
' Read until the end of file
open "myfile.txt" for input as #1
while not eof( 1 )
line input #1, text
print text
wend
close #1
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/00open...For...As.html0000777000076500007660000000514010463122676026237 0ustar open ... for ... as
open ... for ... as

Open a file stream.

Syntax:
open filename for mode as stream

filename
is the file to be opened.
mode tell the computer what kind of operation you require on file.
stream is represented by a number you assign to the opened file. You will pass that number to other command in order to refer to the file.
Files can be opened in one of the following modes: input , output , append

Example:
' open a text file
open  "myfile.txt" for  input as  1 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/04fileOutput.html0000777000076500007660000000576410463122757026077 0ustar file output
file output #

Write a line in file stream.

Syntax:
file output # stream, expression {,...}

stream is a file previously opened by the open command.
You can still use old command syntax print #

Example:
' open a text file
open "myfile.txt" for output as 1

' write some text
file output  #1, "Line1" 
file output  #1, "Line", "2" 
file output  #1, "Line", (2+4)/2 

' close the file
close( 1 )

See also file input # command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/04fileInput.html0000777000076500007660000000676210463122757025675 0ustar file input
file input #

Read a line from a file
stream, it reads string from the file referenced stream and returns it into data variable. The line feed is automatically removed.

Syntax:
file Input #stream , data

stream is a file previously opened by the open command.
data is the variable where string is saved to.

Example:
' open a text file
open "myfile.txt" for input as 1

' read until end of file
while not eof( 1 )
' read a line from the file and print it
file input  #1, data$ 
print data$
end while

' close the file
close( 1 )

See also file output # command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/fileExists().html0000777000076500007660000000363610463122757026027 0ustar fileExists()
fileExists()

Returns true if the file filename exists, otherwise returns false. It does not open the file, although the process of testing for the file's existence will internally open and close it.

Syntax:
variable = fileExists( filename )

Example:
' check if the file exists
if not fileExists( "myfile.txt" ) then 
print "The file \"myfile.txt\" does not exist."
end if
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/02seek().html0000777000076500007660000000441110463122757024771 0ustar seek()
seek()

Seek file position: move read/write cursor position in file at given position.

Syntax:
seek( stream , position )

stream is a file previously opened by the open command.
position is where read/write cursor will be moved to, this position is measured in number of byte from file beginning.

Example:
open "myfile.txt" for input as 1
seek( 1,2 )
while eof(1)=0
fprints("loc:"+str$(loc(1))+" - ")
file input #1,a$
fprints(a$)
end while
close 1
waitKey

See also loc() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/01close().html0000777000076500007660000000330410463122676025146 0ustar close()
close()

Close a file stream, If no stream is specified, all file streams are closed.

Syntax:
close stream
close

stream is a file previously opened by the open command.

Example:

print "Hello, sdlBasic" to the file "temp"
open "temp" for output as 1
Print 1, "Hello, sdlBasic"
close #1

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/02loc().html0000777000076500007660000000504210463122757024620 0ustar loc()
loc()

Returns read/write cursor position in file.

Syntax:
loc( stream )

stream is a file previously opened by the open command.

Example:
open "myfile.txt" for input as 1
while eof(1)=0
position = loc( 1 )
fprints("loc:"+str$(position)+" - ")
file input #1,a$
prints(a$)
end while
close 1
waitKey

See also seek() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/fileDelete().html0000777000076500007660000000320410463122757025741 0ustar fileDelete()
fileDelete()

Delete filename. Filename can be then path+filename.

Syntax:
fileDelete ( filename )

You can still use old kill() command instead.


Example:
fileDelete( "deletableFile.txt" )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Files/sectionName.txt0000777000076500007660000000000610463122757025673 0ustar Files usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Array/0000777000000000000000000000000010645354337024450 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Array/!quickSort().html0000777000076500007660000000152410463122206025730 0ustar quickSort
quickSort()

Not implemented yet
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Array/shared.html0000777000076500007660000000640610463122256025041 0ustar shared
shared

Extend the scope of externally created variable or array from inside a subroutine or function.

Syntax;
shared variable
shared array[]

Example:
dim a$
dim b$[10]
sub sharearray
shared a$
shared b$[]
a$="shared"
b$[2]="array shared"
end sub
sharearray
prints(a$)
prints(b$[2])
waitKey

See also common command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Array/index.txt0000777000076500007660000000025010463122256024544 0ustar common.html CVS dim.html erase.html indexes().html index.html index.txt in.html lBound().html !quickSort().html !reDim().html sectionName.txt shared.html uBound().html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Array/indexes().html0000777000076500007660000000510110463122256025342 0ustar indexes
indexes()

Return the number of indexes in array.

Syntax:
count = indexes( array[] )

Example:
-- Display information about array's indexes
dim a[5,2]
count = indexes( a[] )
Print "There are "; count; " indexes in the array"
for i = 1 To count
    bottom = lBound( a[], i )
    top = uBound( a[], i )
    print "Index "; i; " is from "; bottom; " to "; top
next
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Array/erase.html0000777000076500007660000001222710463122206024663 0ustar erase
erase

Erase arrays and their content.

Syntax:
erase array[]
erase array[ ... ]

If no indexes are specified, erases all the array. For static arrays, this means resetting all the values to zero. For dynamic arrays, this means deleting all the keys and and values. For example:

dim a[10] '<------------ Create a static array

' Initialize it
for i = 1 to 10
    a[i] = i
end for

erase a[] '<------------- Reset it to zeros

If indexes are given, only the specified index will be reset. For static arrays, this is the same as setting the value to zero:

dim a[10] '<------------ Create a static array

' Initialize it
for i = 1 to 10
    a[i] = i
end for
erase a[3] '<------------- Same as a[3] = 0

On the other hand, if the array is dynamic, the key and value are actually removed, so the array shrinks:

Dim a[] '<------------- Create a dynamic array

' Initialize it
for i = 1 to 10
    a[i] = i
end for

erase a[3] '<------------- Remove element from array

See also dim command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Array/common.html0000777000076500007660000000623010463122206025051 0ustar common
common

Create a global array or variable named name.

Syntax:
common variable
common array[]
common name[ maxValue ] [[...]] [, ... ]
common name[ minValue To maxValue ][[...]] [, ...]
common name = expression { , ... }

These are globally accessible, and do not need to be declared as Shared when used in a Sub or Function. You can use global statement to obtain the same result. Common can only be used outside of Sub and Function. Inside of Sub or Function, use Dim. See Dim for further details.


Example:
' Create an array
common myGlobalArray[3 To 10, 5]

' Create a global variable and assign it
common myGlobalVar = 100

See also shared command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Array/lBound().html0000777000076500007660000000372310463122256025136 0ustar lBound
lBound()

Returns the lower bound of an array's index.


Syntax:
variable = lBound( array[] , index )

Example:
dim a$[10 to 20,15]
prints ( lBound( a$[], 1 ) )
prints ( lBound( a$[], 2 ) )
waitKey

See also uBound() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Array/dim.html0000777000076500007660000001534210463122206024336 0ustar dim
dim

Create an array or variable named name . Arrays can have up to 5 indexes, and are initialized to zeros. Variables can optionally be assigned by Dim statements.


Syntax
dim {Common|Shared} name []
dim {Common|Shared} name = expression
dim {Common|Shared} name [ maxValue {,...} ]
dim {Common|Shared} name [ minValue To maxValue {,...} ]

Common declares variables and arrays as global. These do not need to be declared as Shared when used in a Sub or Function . Common can only be used outside of Sub and Function .

Shared declares variables and arrays defined outside the routine that has not been declared as Common . Shared can only be used inside a Sub or Function .
You can write multiple variable and array declaration by separating them by commas.

Example:
dim a[1] , b[3,5] , counter , x , y
If no indexes are specified, a dynamic array will be created. Indexes can be any value ( numeric or strings ) but they will be stored internally as strings. For example:
a[1] = "one"
and
a["1"] = "one"
are identical. You can have as many indexes as you wish, but the result is simply combined into a single string. For example:
a["this",22] = "some value"
is the same as writing:
a["this,22"] = "some value"
If you request an index from a dynamic array that has not been assigned, it will return an empty string "".
Dynamic arrays also differ from static arrays in that that elements can only be passed by value, not by reference.

Example:
' Create an array
dim a[3 To 10, 5]

' Create a variable and assign it
dim myVar = 100

Example:
dim array$[100]
for i = 0 to 100
array$[i]="record"+str$(i)
next
for i = 0 to 100
print(array$[i])
next
dim array$[10 to 110]
for i = 10 to 110
array$[i]="record"+str$(110-i)
next
for i = 10 to 110
print(array$[i])
next

See also erase command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Array/in.html0000777000076500007660000000547510463122206024201 0ustar in
in

Returns True if expression is a key in the dynamic array. Can't be used with a static array otherwise it will result in an error.

Syntax:
expression In array[]
expression is the keyword to find in array array[]

Example:
-- Check if key is an index in array a[]
dim a[]
a[1]="one"
a[2]="two"
a[3]="three"
keyword="3"
if keyword in a[] then
    Print keyword; " is a valid index in a[]"
End If
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Array/index.html0000777000076500007660000000245510463122256024702 0ustar index
Array

common
dim
erase
indexes()
in
lBound()
shared
uBound()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Array/!reDim().html0000777000076500007660000000151410463122206025003 0ustar reDim
reDim

Not implemented yet
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Array/uBound().html0000777000076500007660000000376110463122256025151 0ustar uBound
uBound()

Returns the upper bound of an array's index.


Syntax:
variable = uBound( array[] , index )

Example:
dim a$[10 to 20,15]
prints ( uBound( a$[], 1 ) )
prints ( uBound( a$[], 2 ) )
waitKey

See also lBound() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Array/sectionName.txt0000777000076500007660000000000710463122256025702 0ustar Array usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/0000777000000000000000000000000010645354363027115 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/83xor.html0000777000076500007660000000370210463122440027213 0ustar xor
logical xor

Logical expression "xor" used as flow control condition.

Example:
a=1 :b=0
if a=0 xor b=0 then
    print("ok")
else
    print("no")
end if

See also and, or and not commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/41exitFor.html0000777000076500007660000000546610463122374030034 0ustar exit for
exit for

Exit for ... next loop continuing program execution from the command below the next | end for statement, therefore skipping commands between statements exit for and next | end for.

Syntax:
exit for

sdlBasic will continue program execution from the line below the next  statement.

Example:
' Print numbers from 1 to 10
for i = 1 to 20
    print i
    if i = 10 then : exit for : end if
next
print "done " & i & " iterations"

See also for ... next commands usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/80and.html0000777000076500007660000000413410463122440027142 0ustar and
logiacal and

Logical expression "and" used as flow control condition.

Example:
x=10:y=5
if x=10 and y=0 then
    print("and function don't work!!")
end if
if x=10 and y=5 then
    print("and function work!!")
end if

See also or, not and xor commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/index.txt0000777000076500007660000000046610463122440027216 0ustar 10if-then-endIf.html 11else.html 12elseIf.html 20selectCase...EndSelect.html 30while...Wend.html 31exitWhile.html 40for...Next.html 41exitFor.html 42step.html 44forEach...Next.html 50continue.html 60do-loop.html 60exitDo.html 80and.html 81or.html 82not.html 83xor.html CVS index.html index.txt sectionName.txt usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/81or.html0000777000076500007660000000411310463122440027016 0ustar or
logical or

Logical expression "or" used as flow control condition.

Example:
a=1
b=0
if a<>0 or b<>0 then
    print("ok")
else
    print("none")
end if

See also and, not and xor commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/11else.html0000777000076500007660000000567710463122374027345 0ustar else
else

Used in conjunction with if ... then ... end if commands it defines the block of commands to be executed if all previous conditions reveals to be false.

Syntax:
if condition expression then
        commands to be executed if condition is true
else
        commands to be executed if condition is false
end if

Example:
setautoback(50)
prints("press a number key")
waitKey
x$=chr$(inkey)
if x$="1" then
    prints("press 1")
elseif x$="2" then
    prints("press 2")
else
    prints("press other key")
end if
if x$="4" then :prints("good bye"):end if
prints("press esc to exit")
waitKey (27)

See also if ... then ... end if and elseif commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/index.html0000777000076500007660000000342410463122440027340 0ustar index
Control structures

if ... then ... end if
else
elseIf
select case ... end select
while ... wend
exit while
for ... next
exit for
step
for each ... next
continue
do ... loop
exit do
logiacal and
logical or
logical not
logical xor
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/42step.html0000777000076500007660000000504410463122440027352 0ustar step
step

For ... next variable increment/decrement value.

Syntax:
step value
value can be a number either positive, negative, integer or floating.

Example:
for i=0 to 10 step 2
    prints(i)
next

Example:
for i=10 to 0 step  -1
    prints(i)
next

See also for - next command for further informations. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/12elseIf.html0000777000076500007660000000775610463122374027625 0ustar elseIf
elseIf

Allows you to queue a series of if statements for testing in a consecutive manner several expressions, this way program can verify the occur of determinate condition and so execute the associated block of commands.

Syntax:
if condition expression then
        commands to be executed if condition is true
elseIf alternativeCondition expression then
        commands to be executed if condition is false and alternative condition is true
{ elseIf ... then }
        {....}
end if


Example:
setautoback(50)
prints("press a number key")
waitKey
x$=chr$(inkey)
if x$="1" then
    prints("press 1")
elseif x$="2" then
    prints("press 2")
else
    prints("press other key")
end if
if x$="4" then :prints("good bye"):end if
prints("press esc to exit")
waitKey (27)

As you can see syntax is similar to if ... then statement.
See also if ... then ... end if and else commands.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/30while...Wend.html0000777000076500007660000000532110463122374030540 0ustar while ... wend
while ... wend

Execute a block of commands while expression remains true.

Syntax:
while
        commands
        {exit while}
wend

while statement define the start of the block of command to be looped.
wend statement define te end of block, alternatively you can use end while statement instead.


Example:
setautoback(50)
i=0
while inkey <> k_esc ------------------------ will loop until esc key is pressed
    i=i+1
    prints(i)
wend ----------------------------------------------- you can use indifferently wend or end while

See also exit while command. ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/20selectCase...EndSelect.htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/20selectCase...EndSe0000777000076500007660000001374110463122374030645 0ustar select case ... end select
select case ... end select

Conditionally execute code, depending on if expression matches tests.

Syntax:
select case condition expression
        case value1
                statements to be executed if value1 match
        case value2
                statements to be executed if value2 match
        {case valueN }
                {statements to be executed if valueN match}
        {case else}
                {statements to be executed if none of previous cases match}
end select

condition expression may be a variable or any expression.
select case statement compare expression with a set of values and execute blocks of commands if match. This command permit to test many possible values without use a long list of if...else instructions, this way, it makes your programs more efficient an readable.

Tests can be strung together with commas:

Case 4, 5, 6

and the forms are:

is = expression        in this case you can omit is=
is<> expression
is> expression
is< expression
is<= expression
is>= expression

Example:
' Print the name of a number
select case n
    case is = 1
        print "one"
    case 2 ' omitted is= here
        print "two"
    case 3 ' omitted is= here
        print "three"
    case 4, 5, 6 ' omitted is= here
        print "four, five or six"
    case is < 10
        print "less than 10"
    case else
        print "too big!"
end select
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/82not.html0000777000076500007660000000440210463122440027200 0ustar not
logical not

Logical expression "not" used as flow control condition.

Example:
-- if you set n<>0 not statement will return false in if branch
n=2
if not n then
    print("n=not")
else
    print("n<>not")
end if

See also and, or, and xor commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/60exitDo.html0000777000076500007660000000625710463122440027642 0ustar exit do
exit do

Exit do ... loop cycle continuing program execution from the command below the loop statement, therefore skipping commands between statements exit do and loop.
 
Syntax:
exit do

sdlBasic will continue program execution from the line below the loop statement.


Example:
n=0
do
    n=n+1
    printS( n)
    for m = 1 to 10
    printS("    "&m)
    next
    wait(100)
    if n>10 then
            exit do    ' -----------------> jumps  down to the end of the loop...
    end if
loop 
waitKey    '    <------------------------ ...here

See also do ... loop commands

././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/44forEach...Next.htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/44forEach...Next.htm0000777000076500007660000000745310463122440030653 0ustar for each ... next
for each ... next

Iterate through array, sequentially assigning the key from each array index to variable.

Syntax:
for each variable In array
        commands
        [exit for]
        [continue]
next

The commands between for each statement and next statement are executed each iteration through the loop. In optional way you can use the end for statement in place of next statement.

Example:

' Create a dynamic arrays
dim number[]

' Fill it with values
number[1] = "one"
number[2] = "two"
number[3] = "three"
number["four"] = 4
number["five"] = 5
number["six"] = 6
' Display the keys and values
for each k in number
    print k, number[k]
end for ------------------- you can use indifferently next or end for

See also exit for and continue commands.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/40for...Next.html0000777000076500007660000000723010463122374030241 0ustar for ... next
for ... next

Repeat a block of commands the requested number of times. Iteration is controlled through a specific variable value.

Syntax:
for variable = start to finish {step increment }
        commands
        {exit for}
        {continue}
next

Iterate variable from start through finish , incrementing by increment . If step value is omitted, the variable will be incremented by one each cycle. The commands between for statement and next statement are executed each iteration through the loop. In optional way you can use the end for statement in place of next statement.

Example:

' Print the numbers from 1 to 10
for i = 1 to 10
    print i 
next

See also exit for, continue and step commands
././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/10if-then-endIf.htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/10if-then-endIf.html0000777000076500007660000000663210463122374030761 0ustar if
if ... then ... end if

Conditionally execute code.

Syntax:
if condition expression then
        commands to be executed if condition is true
end if

The if statement allow the execution of certain operations only if determinate conditions are true, this allow your program to make decisions.
To make decision the if statement evaluate the condition expression that is any expression that results in either true or false , for example: 5>1=true or 10<3=false
If the expression is true the commands between statement then and statement end if will be executed otherwise, if the expression is false, it will be skipped.

Example:
for n = 1 to 20
    a=rnd(10)
    print a
    if a>5 then
        print "random number is greater than five"
    end if
next

See also else, elseif, and, or, not and xor commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/60do-loop.html0000777000076500007660000000554010463122440027751 0ustar do ... loop
do ... loop

Repeat a block of commands forever.

Syntax:
do
        commands
        {exit do}
loop

The commands between do statement and loop statement are executed each iteration through the loop.

Example:
-- this portion of code will be executed forever. press ctrl+c to terminate it.
n=0
do
    n=n+1
    PrintS( n )
    waitVBL
loop

See also exit do commands.


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/50continue.html0000777000076500007660000000542310463122440030223 0ustar continue
continue

Jump back to the top of the loop. This works only for for...next and while...wend loops.

Syntax:
Continue

In the example below the continue command will jump to the top of the loop so the ' print i ' statment will not executed when variable ' i ' will assume values greater then five.
Example:
'Don't process numbers greater than 5
For i = 1 to 10 ' <----
    If i > 5 Then '       |
                Continue ' -----     this jump to the top of the loop 
            End If

    Print i
End For

See also for...next and while...wend commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/31exitWhile.html0000777000076500007660000000545710463122374030355 0ustar exit while
exit while

Exit while ... wend loop continuing program execution from the command below the wend | end while statement, therefore skipping commands between statements exit while and wend | end while .

Syntax:
exit while

Example:
i=0
while i<100
    i+=1
    if i>50 then : exit while : end if  ' -------->     jumps down to the end of the loop...
    prints(i)
end while
waitKey        '   <----------------------------------- ...here

See also while ... wend command for further informations. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ControlStructures/sectionName.txt0000777000076500007660000000002410463122440030342 0ustar Control structures usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SubAndFunction/0000777000000000000000000000000010645354525026253 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SubAndFunction/exitSub.html0000777000076500007660000000432510463125036027017 0ustar exit sub
exit sub

Stops subroutine execution.

Syntax:
exit sub

sdlBasic will continue program execution from the line below the calling instruction.

Example:
sub mySub(a)
    if a>5 then: exit sub : end if    
    print(a)
end sub
for a = 1 to 10
    mySub(a)
next

See also sub command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SubAndFunction/_argC.html0000777000076500007660000000227510463125036026411 0ustar argC
argC

Returns the number of arguments passed to the program by the shell or the command line.

Syntax:
variable = argC

This is and outdated command. Use argument() command instead

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SubAndFunction/index.txt0000777000076500007660000000023610463125663026361 0ustar _argC.html argument().html _argV.html CVS declare.html exitFunction.html exitSub.html function.html index.html index.txt return.html sectionName.txt sub.html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SubAndFunction/function.html0000777000076500007660000001613110463125036027217 0ustar function
function ... end function 

Create a user-defined function. A function is a sequence of instructions that is often used in several parts of your program.

Syntax:
function name ( parmlist {...} )
    shared variable {, ..}
    dim variable {, ...}
    commands
    {exit function}
    {return function}
    { functionName = expression }
end function

name is the user-defined function name, it's an alphanumeric string who must starts with a non numeric character. For example: 1printString is incorrect while printString1 is correct.
args represent the variables used to pass argument to the function.
{,...} indicates the the function can take a variable number of arguments.

Variables used inside the function are local variables, that means they will not influence other variables that happens to use the same variable name in your main program or in any other function. This is valid for arrays too. See common statements for more details.
You can pass to the function a list of parameters containing the informations to be processed from the function itself. Functions that do not require input parameters can be called from your main program without using brackets.
Functions can optionally return values,specified by the return statement. Returning values can be ignored by the calling instruction, in this case functions behave like subroutines.

Example:
function myFunction(a,b)
    return a*b
end function
print myFunction(10,4)
print myFunction(3,5)
print myFunction(7,8)

You can mix required with optional args. The total number of arguments can be found by calling function argument() , and the function argument(n) returns a particular argument passed to the caller.


Example:
' sum the args passed
function sumNumbers( a )
    total = 0
    for i = 1 to argument()    
        total = total + argument( i )
    end for
    return sum
end function

See also shared , dim , exit function and return commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SubAndFunction/sub.html0000777000076500007660000000755610463125663026204 0ustar sub
sub ... end sub

Subroutine definition.

Syntax:
sub name ( parmlist {...} )
    block of instructions
end sub

name is the subroutine name, it's an alphanumeric string who must starts with a non numeric character. For example: 1printString is incorrect while printString1 is correct.
parmlist are one or more variables used to pass argument to the subroutine.
While writing programs may happen you need to repeat the same sequence of instructions in several parts of the program. sdlBasic offer you the chance of write the instruction sequence one time and then recall it from every part of the program may needs it. Variables used inside the subroutine are local variables, that means they will not influence other variables that happens to use the same variable name in your main program or in any other subroutine. This is valid for arrays too. See Commons, Shared and Dim statements.
You can pass a list of parameters to your subroutine, but, unlike Function, you can't return any results. Subroutine that do not require input parameters can be used in your main program without brackets.

Example:
Sub  printString(a$)
    prints(a$)
end Sub
printString("yo!!!")

See also Commons, Shared and Dim commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SubAndFunction/declare.html0000777000076500007660000000606510463125036026776 0ustar declare [sub | function][name]as[type]
declare

Create a forward reference to functionName or subName. This allows the routine to be
referenced in code before it is actually defined with Function or Sub .

Syntax:
declare function functionName ( args ... )
declare sub subName ( args ... )

You still can't actually execute the routine until it is actually declared. If you encounter problems with forward references that Declare won't fix, try adding Option QBasic .

Example:
option qBasic
declare function mySub()
' option qBasic causes these statements to be deferred
mySub()
end

function mySub()
    print "This is my function"
end function

See also option qbasic command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SubAndFunction/argument().html0000777000076500007660000000610710463125036027337 0ustar argument$()
argument$()

Return arguments passed to a subroutine or a function by the caller line. Used with subroutines or functions that take variable numbers of parameters. This command replaces outdated argC and argV commands

Syntax:
numberOfArguments = argument$()
argument = argument$( n )

It return the total number of arguments passed from the caller command if called without parameter or returns argument number n if called with parameter n , first argument starts at n = 1
You can omit the dollar symbol and type it as argument()

Example: 
sub mySub(...)
for i= 1 to argument
prints( argument( i ) )
next
end sub
mySub("test1")
mySub("test2","more arguments",1,9)
waitkey

See also sub and function commands usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SubAndFunction/index.html0000777000076500007660000000202610463125663026505 0ustar index
Subroutines & functions

argument$()
declare
exit function
exit sub
function ... end function 
return
sub ... end sub
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SubAndFunction/return.html0000777000076500007660000000645210463125663026724 0ustar return
return

Sets the function returning value.

Syntax:
return expression

expression can be a numeric value, a sting, a variable or an array.

Example:
function subtract(a,b)
    return a-b
end sub
print subtract(10,4)

Alternatively you can return function result by assigning it to a variable named as the function.
Example:
function subtract(a,b)
    subtract = a-b
end sub
print subtract(10,4)

See also function command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SubAndFunction/exitFunction.html0000777000076500007660000000450510463125036030053 0ustar exit function
exit function

Stops function execution.

Syntax:
exit function

sdlBasic will continue program execution from the line below the calling statement.

Example:
function myFunction(a)
    if a>5 then: exit function : end if
    print(a)
end function
for a = 1 to 10
    myFunction(a)    
next

See also function command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SubAndFunction/_argV.html0000777000076500007660000000265010463125036026431 0ustar argV
argV

Return the value of parameter n passed to the program by the shell or the command line.

Syntax:
variable = argV( n )

First parameter start at n = 0

This is and outdated command. Use argument() command instead
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SubAndFunction/sectionName.txt0000777000076500007660000000003010463125663027507 0ustar Subroutines & functions usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Blitting/0000777000000000000000000000000010645354343025143 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Blitting/blt().html0000777000076500007660000000534510463122256025174 0ustar blt()
blt()

copy a part of slot image onto screen.

Syntax:
blt( slot , sx , sy , sw , sh , dx , dy )

slot  is the slot number where source image reside
sx is the source X coordinate
sy is the source Y coordinate
sw  is the source image part width
sh is the source image part height
dx  is the destination screen X coordinate
dy  is the destination screen Y coordinate

Example:

See also grab() command.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Blitting/index.txt0000777000076500007660000000014110463122256025241 0ustar blt().html CVS grab().html index.html index.txt pasteBob().html pasteIcon().html sectionName.txt usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Blitting/index.html0000777000076500007660000000143710463122256025377 0ustar index
Blitting

blt()
grab()
pasteBob(x,y,n)
pasteIcon(x,y,n)
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Blitting/grab().html0000777000076500007660000000444210463122256025323 0ustar grab()
grab()

Grab a stated rectangle area and copy it into given image slot.

Syntax:
grab( slot , x , y , w , h )

slot  is the slot number where grabbed image will be stored
x is the source rectangle upper-left X coordinate
y is the source rectangle upper-left Y coordinate
w  is the source rectangle area width
h is the source rectangle area height

Example:

See also blt() command.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Blitting/pasteBob().html0000777000076500007660000000352310463122256026146 0ustar pasteBob(x,y,n)
pasteBob(x,y,n)

Paste given slot image on screen at desired coordinates performing screen clipping.

Syntax:
pasteBob( x , y , slot )

x is the destination X coordinate
y is the destination Y coordinate
slot is the slot number where the image reside

Example:

See also pasteIcon() command.


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Blitting/pasteIcon().html0000777000076500007660000000337710463122256026343 0ustar pasteIcon(x,y,n)
pasteIcon(x,y,n)

Paste given slot image on screen at desired coordinates without take into account colorkey transparency.

Syntax:
pasteIcon( x , y , slot )

x is the destination X coordinate
y is the destination Y coordinate
slot is the slot number where the image reside

Example:

See also pasteBob() command.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Blitting/sectionName.txt0000777000076500007660000000001110463122256026373 0ustar Blitting usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/0000777000000000000000000000000010645354512026101 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/sound3d().html0000777000076500007660000000256410463124366026736 0ustar sound3d()
sound3d()

Position sound in 3d space.
Old positionSound() command syntax is still valid but its use is discouraged.

Syntax:
sound3d( channel , angle , distance )

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/copySound().html0000777000076500007660000000177010463124366027340 0ustar copySound()
copySound()

copy given slot sound to another.

Syntax:
copySound( sourceSlot, destinationSlot )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/index.txt0000777000076500007660000000071510463124366026214 0ustar copySound().html CVS deleteSound(n).html fadeMusic().html index.html index.txt musicExists().html musicSpeed().html musicVolume().html pauseMusic.html pauseSound().html playFreqSound().html playMusic().html playSound().html positionMusic(p).html resumeMusic.html resumeSound().html rewindMusic.html sectionName.txt sound3d().html soundChannels().html soundEnabled().html soundExists().html soundVolume().html stopMusic.html stopSound().html vumeterSound().html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/stopMusic.html0000777000076500007660000000160710463124366027221 0ustar stopMusic
stopMusic

Stops music track.

Syntax:
stopMusic

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/soundEnabled().html0000777000076500007660000000221010463124366027746 0ustar soundEnabled()
soundEnabled()

Return 1 (true) if sdlsound is enabled.
Old isEnabledSound() command syntax is still valid.

Syntax:
variable = soundEnabled()


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/soundChannels().html0000777000076500007660000000201610463124366030153 0ustar soundChannels()
soundChannels()

Dynamically change the number of maximum channels managed by sdlBasic.

Syntax:
soundChannels( channelMax )

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/fadeMusic().html0000777000076500007660000000220710463124366027251 0ustar fadeMusic()
fadeMusic()

Progressively fade music volume in given time.

Syntax:
fadeMusic( time )

time
is expressed in seconds.

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/pauseMusic.html0000777000076500007660000000161210463124366027345 0ustar pauseMusic
pauseMusic

Pause music track.

Syntax:
pausemusic

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/stopSound().html0000777000076500007660000000223310463124366027346 0ustar stopSound()
stopSound()

Stop wave playing at given channel.

Syntax:
stopSound( channel )

if you omit sound
channel , all channels will be stopped.

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/musicVolume().html0000777000076500007660000000310210463124366027654 0ustar musicVolume()
musicVolume()

Change music track volume. If voume is omitted it returns current music track volume.
Old volumeMusic() syntax is still valid even if its use is discouraged.

Syntax:
musicVolume( volume )
variable = musicVolume()

volume
ranges from 0 to 128.

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/musicExists().html0000777000076500007660000000200510463124366027665 0ustar musicExists()
musicExists()

Returns 1 if music is loaded otherwise it returns 0 if not.

Syntax:
variable = musicExists()

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/playMusic().html0000777000076500007660000000250710463124366027322 0ustar playMusic()
playMusic()

Play previously loaded music track. See loadMusic()
command for more informations.

Syntax:
playMusic( repetitions )

repetitions
is the number of time the music must perform, a value of -1 means forever.

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/vumeterSound().html0000777000076500007660000000225310463124366030052 0ustar vumeterSound()
vumeterSound()

Returns the state of given sound channel.

Syntax:
vumetersound( channel )

if you omit sound
channel , all channels will be taken in count.

Example:

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/resumeMusic.html0000777000076500007660000000164010463124366027531 0ustar resumeMusic
resumeMusic

Resume previously paused music track.

Syntax:
resumeMusic

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/positionMusic(p).html0000777000076500007660000000205110463124366030373 0ustar positionMusic()
positionMusic()

Move the music execution at given track position. Track position is expressed in seconds.

Syntax:
positionMusic( position )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/index.html0000777000076500007660000000447010463124366026343 0ustar index
Sound and music

copySound()
deleteSound(n)
fadeMusic()
musicExists()
musicSpeed()
musicVolume()
pauseMusic
pauseSound()
playFreqSound()
playMusic()
playSound()
positionMusic()
resumeMusic
resumeSound()
rewindMusic
sound3d()
soundChannels()
soundEnabled()
soundExists()
soundVolume()
stopMusic
stopSound()
vumeterSound()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/soundVolume().html0000777000076500007660000000405010463124366027667 0ustar soundVolume()
soundVolume()

Change the volume of sound channel, if volume value parameter is omitted (or set to -1) it returns given sound channel volume.
Old volumeSound() command syntax is still valid. 

Syntax:
soundVolume( channel , volume )
variable = soundVolume( channel )

channel
if set to -1 it refers to all channels.
volume ranges from 0 to 128

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/resumeSound().html0000777000076500007660000000223610463124366027664 0ustar resumeSound()
resumeSound()

Resume paused sound channels.

Syntax:
resumeSound( channel )

if you omit sound
channel , all channels will be resumed.

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/musicSpeed().html0000777000076500007660000000234110463124366027451 0ustar musicSpeed()
musicSpeed()

Change music track speed.
Old speedMusic() syntax is still valid even if its use is discouraged.

Syntax:
musicSpeed( speed )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/deleteSound(n).html0000777000076500007660000000175410463124366030010 0ustar deleteSound(n)
deleteSound(n)

Delete given sound slot from memory.

Syntax:
deleteSound( slot )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/pauseSound().html0000777000076500007660000000224110463124366027475 0ustar pauseSound()
pauseSound()

Pause wave playing at given channel.

Syntax:
pauseSound( channel )

if you omit sound
channel , all channels will be paused.

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/rewindMusic.html0000777000076500007660000000164610463124366027527 0ustar rewindMusic
rewindMusic

Rewind music track to its starting position.

Syntax:
rewindMusic

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/playSound().html0000777000076500007660000000316610463124366027334 0ustar playSound()
playSound()

Play given slot sound in requested channel. You can set optional loop parameter.

Syntax:
playSound( slot , channel )
playSound( slot , channel , loops )

loops
determine how many time s sound is repeated. If omitted means one time.

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/playFreqSound().html0000777000076500007660000000336210463124366030150 0ustar playFreqSound()
playFreqSound()

Play sound in given channel with requested pitch frequency. You can set optional loop parameter.

playFreqSound( slot , channel , pitch )
playFreqSound( slot , channel , pitch , loops )

loops
determine how many time s sound is repeated. If omitted means one time.

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/soundExists().html0000777000076500007660000000213010463124366027674 0ustar soundExists()
soundExists()

Returns 1 if given sound slot exist otherwise it returns 0 if it's empty.

Syntax:
variable = soundExists( slot )

Example:


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/SoundAndMusic/sectionName.txt0000777000076500007660000000002110463124366027340 0ustar Sound and music usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Mouse/0000777000000000000000000000000010645354464024463 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Mouse/mouseScreenX().html0000777000076500007660000000723210463123534026344 0ustar mouseScreenX()
mouseScreenX()

Returns X mouse coordinate relative to given screen.
Old XmouseScreen syntax is still valid but discouraged.

Syntax:
variable = mouseScreenX( screen )

Example:
screenOpen(1,100,100,150,150,100,100,0)
ink(rgb(255,0,0))
bar(0,0,100,100)
screen( 0)
while not key(k_esc)
    locate(0,0)
    prints( "Screen 1 X mouse coordinate: " & mouseScreenX( 1 )
    prints( "Screen 1 Y mouse coordinate: " & mouseScreenY( 1) )
    prints( "Current X mouse coordinate: " & mouseX )
    prints( "Current Y mouse coordinate: " & mouseY )
    waitVBL
    cls
wend

See also mouseScreenY(), mouseX and mouseY commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Mouse/mouseButton.html0000777000076500007660000000440710463123534026130 0ustar mouseButton
mouseButton

Return mouse button state.
Old bMouse syntax is still valid but discouraged.

Syntax:
variable = mouseButton

1 = left button
2 = middle button
3 = right button

Example:
autoback(25)
while not key(k_esc)
    locate(35,15)
    prints( mouseButton )
    waitVBL
wend
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Mouse/index.txt0000777000076500007660000000031710463123534024562 0ustar CVS hideMouse.html index.html index.txt mouseButton.html mousePointer().html mouseScreenX().html mouseScreenY().html mouseX.html mouseY.html mouseZone().html placeMouse().html sectionName.txt showMouse.html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Mouse/mouseX.html0000777000076500007660000000522510463123534025063 0ustar mouseX
mouseX

Returns absolute X mouse coordinate on display.
Old Xmouse syntax is still valid but discouraged.

Syntax:
variable = mouseX

Example:
while not key(k_esc)
    locate(0,0)
    prints( "Current X mouse coordinate is: " & mouseX )
    prints( "Current Y mouse coordinate is: " & mouseY )
    waitVBL
    cls
wend

See also mouseScreenX(), mouseScreenY() and mouseY commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Mouse/mousePointer().html0000777000076500007660000000530710463123534026416 0ustar mousePointer()
mousePointer()

Change mouse pointer. Alternate mouse pointer are emulated with sprite 0 and slot image 0.
If pointer number is omitted, it returns current one. Old changeMouse() syntax is still valid but discouraged.
 

Syntax:
mousePointer( pointer )
variable = mousePointer()

Example:
printS("press 0,1,2 or 3 keys")
while not key(k_esc)
    k=chr(inkey)
    if k <> "" then
        mousePointer( k )
    end if
wend
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Mouse/index.html0000777000076500007660000000236210463123534024711 0ustar index
Mouse

hideMouse
mouseButton
mousePointer()
mouseScreenX()
mouseScreenY()
mouseX
mouseY
mouseZone()
placeMouse()
showMouse
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Mouse/mouseZone().html0000777000076500007660000000507610463123534025714 0ustar mouseZone()
mouseZone()

Check if mouse pointer is within given rectangle.

Syntax:
variable = mouseZone( x , y , width , hight )

Returns True (1) if mouse intersect area.

Example:
bar(100,100,100+200,100+150)
while not key(k_esc)
    if mouseZone( 100, 100, 200, 150 ) then
        ink(rnd(rgb(255,255,255)))
        bar(100,100,100+200,100+150)
    end if
wend
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Mouse/mouseScreenY().html0000777000076500007660000000714510463123534026350 0ustar mouseScreenY()
mouseScreenY()

Returns Y mouse coordinate relative to given screen. Old YmouseScreen syntax is still valid but discouraged.

Syntax:
variable = mouseScreenY( screen )

Example:
screenOpen(1,100,100,150,150,100,100,0)
ink(rgb(255,0,0))
bar(0,0,100,100)
screen( 0)
while not key(k_esc)
    locate(0,0)
    prints( "Screen 1 X mouse coordinate: " & mouseScreenX( 1 ) )
    prints( "Screen 1 Y mouse coordinate: " & mouseScreenY( 1 )
    prints( "Current X mouse coordinate: " & mouseX )
    prints( "Current Y mouse coordinate: " & mouseY )
    waitVBL
    cls
wend

See also mouseScreenX(), mouseX and mouseY commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Mouse/hideMouse.html0000777000076500007660000000476710463123534025537 0ustar hideMouse
hideMouse

Hide the mouse pointer.
Old mouseHide syntax is still valid but discouraged.

Syntax:
hideMouse

Example:
while not key(k_esc)
    printS("press 1 to hide mouse")
    waitKey(k_1)
    hideMouse
    printS("press 2 to hide mouse")
    waitKey(k_2)
    showMouse
wend

See also showMouse command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Mouse/placeMouse().html0000777000076500007660000000373510463123534026025 0ustar placeMouse()
placeMouse()

Move mouse pointer at given coordinates.
Old locateMouse() syntax is still valid but discouraged.

Syntax:
placeMouse( x , y )

Example:
while not key(k_esc)
    placeMouse( rnd(640), rnd(480) )
    wait(200)
wend
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Mouse/showMouse.html0000777000076500007660000000463210463123615025575 0ustar showMouse
showMouse

Show the mouse pointer.
Old mouseShow syntax is still valid but discouraged.

Syntax:
showMouse

Example:
while not key(k_esc)
    printS("press 1 to hide mouse")
    waitKey(k_1)
    mouseHide
    printS("press 2 to hide mouse")
    waitKey(k_2)
    mouseShow
wend

See also hideMouse command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Mouse/mouseY.html0000777000076500007660000000525610463123534025070 0ustar mouseY
mouseY

Returns absolute Y mouse coordinate on display.
Old Ymouse syntax is still valid but discouraged.

Syntax:
variable = mouseY

Example:
while not key(k_esc)
    locate(0,0)
    prints( "Current X mouse coordinate is: " & mouseX )
    prints( "Current Y mouse coordinate is: " & mouseY )
    waitVBL
    cls
wend

See also mouseScreenX(), mouseScreenY() and mouseX commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Mouse/sectionName.txt0000777000076500007660000000000710463123534025714 0ustar Mouse usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/0000777000000000000000000000000010645354540025777 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/sdlBasic.err0000777000076500007660000000027510463126042026471 0ustar Runtime error on line number 249 of /home/zoiba/Lavoro/sdlBasic/docs/html/sections/commands/indexCreator.sdlbas pripts has not been defined yet locate (1,10) : pripts("working on "&link$) usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/g - i.html0000755000000000000000000000750410644532460027444 0ustar rootroot index
g - i

getAxisJoystick()
getButtonJoystick()
getEnv
getFont()
getFreeSock
getHatJoystick()
getLocalIP()
getPixel()
getRemoteIP()
getRemotePort()
grab()
hex$()
hideMouse
hotSpot()
if ... then ... end if
imageAlpha()
imageExists()
imageHeight()
imageWidth()
in
include
indexes()
inKey
ink()
inputS()
insert$()
inStr()
integer division
int()
isClientReady()
isEnabledSock
isFBSD
isLinux
isMOS
isNetBSD
isOpenBSD
isOsx
IsServerReady()
isWin32
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/a - b.html0000755000000000000000000001205710644532454027431 0ustar rootroot index
a - b

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-1
abs()
acceptSock()
aCos()
addition
andBit()
argument$()
asc()
aSin()
aTan()
atX
atY
autoback()
autoUpdateBob()
autoUpdateSprite()
bankSize()
bar()
baseimageCC()
baseimage()
baseScreen()
bin()
bJoy()
blt()
bob()
bobExist()
bobHeight()
bobHit()
bobImage()
bobWidth()
bobX()
bobY()
bobZ()
box()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/index.txt0000755000000000000000000003545210644532461027656 0ustar rootrootcommon:Array/common.html 0:Array/CVS dim:Array/dim.html erase:Array/erase.html indexes():Array/indexes().html in:Array/in.html lBound():Array/lBound().html quickSort():Array/!quickSort().html reDim:Array/!reDim().html shared:Array/shared.html uBound():Array/uBound().html blt():Blitting/blt().html 0:Blitting/CVS grab():Blitting/grab().html pasteBob(x,y,n):Blitting/pasteBob().html pasteIcon(x,y,n):Blitting/pasteIcon().html autoUpdateBob() :Bobs/autoUpdateBob().html bobExist():Bobs/bobExist().html bobHeight():Bobs/bobHeight().html bobHit():Bobs/bobHit().html bob():Bobs/bob().html bobImage():Bobs/bobImage().html bobWidth():Bobs/bobWidth().html bobX():Bobs/bobX().html bobY():Bobs/bobY().html bobZ():Bobs/bobz().html 0:Bobs/CVS deleteBob():Bobs/deleteBob().html setBob():Bobs/setBob().html updateBob :Bobs/updateBob.html cdCurFrame():CDSupport/cdCurFrame().html cdCurTrack():CDSupport/cdCurTrack().html cdInserted():CDSupport/cdInserted().html cdName():CDSupport/cdName().html cdTrackLength():CDSupport/cdTrackLength().html cdTrackOffset():CDSupport/cdTrackOffset().html cdTrackType():CDSupport/cdTrackType().html closeCD(n):CDSupport/closeCD(n).html countCdDrives:CDSupport/countCdDrives.html countCdTracks():CDSupport/countCdTracks().html 0:CDSupport/CVS ejectCD():CDSupport/ejectCD().html openCD():CDSupport/openCD().html pauseCD():CDSupport/pauseCD().html playCD():CDSupport/playCD().html playTracksCD():CDSupport/playTracksCD().html resumeCD():CDSupport/resumeCD().html stopCD():CDSupport/stopCD().html 0:ConsoleOutput/CVS print:ConsoleOutput/print.html if ... then ... end if:ControlStructures/10if-then-endIf.html else:ControlStructures/11else.html elseIf:ControlStructures/12elseIf.html select case ... end select:ControlStructures/20selectCase...EndSelect.html while ... wend:ControlStructures/30while...Wend.html exit while:ControlStructures/31exitWhile.html for ... next:ControlStructures/40for...Next.html exit for :ControlStructures/41exitFor.html step:ControlStructures/42step.html for each ... next:ControlStructures/44forEach...Next.html continue:ControlStructures/50continue.html do ... loop:ControlStructures/60do-loop.html exit do:ControlStructures/60exitDo.html logiacal and:ControlStructures/80and.html logical or:ControlStructures/81or.html logical not:ControlStructures/82not.html logical xor:ControlStructures/83xor.html 0:ControlStructures/CVS 0:DataFunctions/CVS data():DataFunctions/data().html read():DataFunctions/read().html 0:DateAndTime/CVS date$:DateAndTime/date$.html ticks():DateAndTime/ticks().html time$:DateAndTime/time$.html timer:DateAndTime/timer.html wait():DateAndTime/wait().html chDir():Dirs/chDir().html 0:Dirs/CVS dirExists():Dirs/dirExists().html dirFirst():Dirs/dirFirst().html dir$:Dirs/dir$.html dirNext:Dirs/dirNext.html mkDir():Dirs/mkDir().html rmDir():Dirs/rmDir().html setDefaults():DisplayAndScreen/00setDefaults().html setDisplay():DisplayAndScreen/00setDisplay().html directScreen :DisplayAndScreen/01directScreen.html setAlphachannel():DisplayAndScreen/01setAlphachannel().html autoback():DisplayAndScreen/02autoback.html dualPlayfield() :DisplayAndScreen/03dualPlayfield().html displayBpp:DisplayAndScreen/10displayBpp.html displayHeight:DisplayAndScreen/10displayHeight.html displayWidth:DisplayAndScreen/10displayWidth.html caption:DisplayAndScreen/21caption.html setCaption():DisplayAndScreen/21setCaption().html cls :DisplayAndScreen/30cls.html fps():DisplayAndScreen/30fps().html screenOpen():DisplayAndScreen/50screen0pen().html screenClose():DisplayAndScreen/50screenClose().html screenSwap:DisplayAndScreen/50screenSwap.html waitVBL:DisplayAndScreen/50waitVBL.html screenHeight:DisplayAndScreen/51screenHeight.html screenWidth:DisplayAndScreen/51screenWidth.html screenZ():DisplayAndScreen/51screenZ().html screen():DisplayAndScreen/60screen().html screenOffset():DisplayAndScreen/61screenOffset().html screenOffsetX:DisplayAndScreen/62screenOffsetX.html screenOffsetY:DisplayAndScreen/62screenOffsetY.html screenLock():DisplayAndScreen/70screenLock().html screenUnlock():DisplayAndScreen/70screenUnlock().html screenViewport():DisplayAndScreen/71screenViewport().html screenViewportFlag:DisplayAndScreen/72screenViewportFlag.html screenViewportH:DisplayAndScreen/72screenViewportH.html screenViewportW:DisplayAndScreen/72screenViewportW.html screenViewportX:DisplayAndScreen/72screenViewportX.html screenViewportY:DisplayAndScreen/72screenViewportY.html screenAlpha():DisplayAndScreen/80screenAlpha().html screenClone():DisplayAndScreen/90screenClone().html screenCopy():DisplayAndScreen/90screenCopy().html screenCrossFade():DisplayAndScreen/95screenCrossFade().html screenFadein():DisplayAndScreen/95screenFadein().html screenFadeOut():DisplayAndScreen/95screenFadeOut().html 0:DisplayAndScreen/CVS open ... for ... as:Files/00open...For...As.html close():Files/01close().html eof():Files/01eof().html lof():Files/01lof().html loc():Files/02loc().html seek():Files/02seek().html readByte():Files/03readByte().html writeByte():Files/03writeByte().html file input #:Files/04fileInput.html file output #:Files/04fileOutput.html freeFile:Files/06freeFile.html 0:Files/CVS fileCopy():Files/fileCopy().html fileDelete():Files/fileDelete().html fileExists():Files/fileExists().html fileMove():Files/fileMove().html fileRename():Files/fileRename().html bar():Graphic/bar().html box():Graphic/box().html circle():Graphic/circle().html colorCycling():Graphic/colorCycling().html color ():Graphic/color().html 0:Graphic/CVS ellipse():Graphic/ellipse().html enablePalette():Graphic/enablePalette().html fillCircle():Graphic/fillCircle().html fillEllipse():Graphic/fillEllipse().html getPixel():Graphic/getPixel().html ink():Graphic/ink().html line():Graphic/line().html paint():Graphic/paint().html palette():Graphic/palette().html plot():Graphic/plot().html polygon():Graphic/polygon().html polyline():Graphic/polyline().html rectangle():Graphic/rectangle().html rgb():Graphic/rgb().html setPixel():Graphic/setPixel().html triangle():Graphic/triangle().html colorKey():ImageManipulation/colorKey().html copyImage():ImageManipulation/copyImage().html 0:ImageManipulation/CVS deleteImage():ImageManipulation/deleteImage().html hotSpot():ImageManipulation/hotSpot().html imageAlpha():ImageManipulation/imageAlpha().html imageExists():ImageManipulation/imageExists().html imageHeight():ImageManipulation/imageHeight().html imageWidth():ImageManipulation/imageWidth().html mirrorImage():ImageManipulation/mirrorImage().html rotateImage():ImageManipulation/rotateImage().html rotoZoomImage():ImageManipulation/rotoZoomImage().html zoomImage():ImageManipulation/zoomImage().html bJoy():Joystick/bJoy().html 0:Joystick/CVS getAxisJoystick():Joystick/getAxisJoystick().html getButtonJoystick():Joystick/getButtonJoystick().html getHatJoystick():Joystick/getHatJoystick().html joy():Joystick/joy().html nameJoystick():Joystick/nameJoystick().html numAxesJoystick():Joystick/numAxesJoystick().html numBallsJoystick():Joystick/numBallsJoystick().html numButtonsJoystick():Joystick/numButtonsJoystick().html numHatsJoystick():Joystick/numHatsJoystick().html numJoysticks:Joystick/numJoysticks.html waitBjoy():Joystick/waitBjoy().html XgetBallJoystick():Joystick/XgetBallJoystick().html YgetBallJoystick():Joystick/YgetBallJoystick().html 0:Keyboard/CVS inKey:Keyboard/inKey.html key():Keyboard/key().html waitKey():Keyboard/waitKey().html abs():Maths/abs().html aCos():Maths/aCos().html andBit():Maths/andBit().html aSin():Maths/aSin().html aTan():Maths/aTan().html bin():Maths/bin().html cos():Maths/cos().html 0:Maths/CVS exp() :Maths/exp().html frac():Maths/frac().html hex$():Maths/hex$().html int() :Maths/int().html log():Maths/log().html max():Maths/max().html min():Maths/min().html orBit():Maths/orBit().html randomize():Maths/randomize().html rnd():Maths/rnd().html round():Maths/round().html sgn():Maths/sgn().html sin():Maths/sin().html sqr():Maths/sqr().html tan():Maths/tan().html xorBit():Maths/xorBit().html loadBank():MemoryBanks/10loadBank().html saveBank():MemoryBanks/11saveBank().html reserveBank():MemoryBanks/20reserveBank().html freeBank():MemoryBanks/21freeBank().html baseimage():MemoryBanks/40baseimage().html baseimageCC():MemoryBanks/41baseimageCC().html baseScreen():MemoryBanks/42baseScreen().html freeBase():MemoryBanks/43freeBase().html bankSize():MemoryBanks/50bankSize().html currentBank():MemoryBanks/51currentBank().html copyBank():MemoryBanks/54copyBank().html memCopy():MemoryBanks/56memCopy().html 0:MemoryBanks/CVS deek():MemoryBanks/deek().html doke():MemoryBanks/doke().html leek():MemoryBanks/leek().html loke():MemoryBanks/loke().html peek():MemoryBanks/peek().html poke():MemoryBanks/poke().html 0:Mouse/CVS hideMouse:Mouse/hideMouse.html mouseButton :Mouse/mouseButton.html mousePointer():Mouse/mousePointer().html mouseScreenX():Mouse/mouseScreenX().html mouseScreenY():Mouse/mouseScreenY().html mouseX:Mouse/mouseX.html mouseY:Mouse/mouseY.html mouseZone():Mouse/mouseZone().html placeMouse():Mouse/placeMouse().html showMouse:Mouse/showMouse.html 0:MultimediaFiles/CVS loadImage():MultimediaFiles/loadImage().html loadMusic():MultimediaFiles/loadMusic().html loadSound():MultimediaFiles/loadSound().html loadZipImage():MultimediaFiles/loadZipImage().html loadZipMusic():MultimediaFiles/loadZipMusic().html loadZipSound():MultimediaFiles/loadZipSound().html saveImage():MultimediaFiles/saveImage().html saveSound():MultimediaFiles/saveSound().html addition:Operators/addition.html 0:Operators/CVS division:Operators/division.html equality:Operators/equality.html integer division:Operators/integerDivision.html modulo:Operators/modulo.html multiplication:Operators/multiplication.html power:Operators/power.html self addition:Operators/selfAddition.html self subtraction:Operators/selfSubtraction.html shl:Operators/shl.html shr:Operators/shr.html string concatenation:Operators/stringConcatenation.html subtraction:Operators/subtraction.html atX:PrintScreen/atX.html atY:PrintScreen/atY.html cursOff:PrintScreen/cursOff.html cursOn:PrintScreen/cursOn.html 0:PrintScreen/CVS fPrintS():PrintScreen/fPrintS().html inputS():PrintScreen/inputS().html locate():PrintScreen/locate().html paper():PrintScreen/paper().html pen():PrintScreen/pen().html printS():PrintScreen/printS().html zoneInputS():PrintScreen/zoneInputS().html command$():Runtime/command().html const:Runtime/const.html 0:Runtime/CVS dcbasic_date:Runtime/dcbasic_date.html dcbasic_version:Runtime/dcbasic_version.html end:Runtime/end.html -1:Runtime/EnvVar.html getEnv:Runtime/getEnv().html include:Runtime/include.html isFBSD:Runtime/isFBSD.html isLinux:Runtime/isLinux.html isMOS:Runtime/isMOS.html isNetBSD:Runtime/isNetBSD.html isOpenBSD:Runtime/isOpenBSD.html isOsx:Runtime/isOsx.html isWin32:Runtime/isWin32.html num_bobs:Runtime/num_bobs.html num_images:Runtime/num_images.html num_membank:Runtime/num_membank.html num_numsocks:Runtime/num_numsocks.html num_screens:Runtime/num_screens.html num_sprites:Runtime/num_sprites.html num_waves:Runtime/num_waves.html option explicit:Runtime/optionExplicit.html option qbasic:Runtime/optionQbasic.html os:Runtime/os.html run:Runtime/!run.html setEnv:Runtime/setEnv().html shell:Runtime/shell().html stop:Runtime/stop.html acceptSock():Socket/acceptSock().html closeSock():Socket/closeSock().html *connectionReadySock():Socket/!connectionReadySock().html connectSock():Socket/connectSock().html 0:Socket/CVS getFreeSock:Socket/getFreeSock.html getLocalIP():Socket/getLocalIP().html getRemoteIP():Socket/getRemoteIP().html getRemotePort():Socket/getRemotePort().html isClientReady():Socket/isClientReady().html isEnabledSock:Socket/isEnabledSock.html IsServerReady():Socket/IsServerReady().html openSock(port):Socket/openSock().html *peekSock():Socket/!peekSock().html readByteSock():Socket/readByteSock().html readLineSock():Socket/readLineSock().html readSock():Socket/readSock().html writeByteSock():Socket/writeByteSock().html writeLineSock():Socket/writeLineSock().html writeSock():Socket/writeSock().html copySound():SoundAndMusic/copySound().html 0:SoundAndMusic/CVS deleteSound(n):SoundAndMusic/deleteSound(n).html fadeMusic():SoundAndMusic/fadeMusic().html musicExists():SoundAndMusic/musicExists().html musicSpeed():SoundAndMusic/musicSpeed().html musicVolume():SoundAndMusic/musicVolume().html pauseMusic:SoundAndMusic/pauseMusic.html pauseSound():SoundAndMusic/pauseSound().html playFreqSound():SoundAndMusic/playFreqSound().html playMusic():SoundAndMusic/playMusic().html playSound():SoundAndMusic/playSound().html positionMusic():SoundAndMusic/positionMusic(p).html resumeMusic:SoundAndMusic/resumeMusic.html resumeSound():SoundAndMusic/resumeSound().html rewindMusic:SoundAndMusic/rewindMusic.html sound3d():SoundAndMusic/sound3d().html soundChannels():SoundAndMusic/soundChannels().html soundEnabled():SoundAndMusic/soundEnabled().html soundExists():SoundAndMusic/soundExists().html soundVolume():SoundAndMusic/soundVolume().html stopMusic:SoundAndMusic/stopMusic.html stopSound():SoundAndMusic/stopSound().html vumeterSound():SoundAndMusic/vumeterSound().html autoUpdateSprite():Sprites/autoUpdateSprite().html 0:Sprites/CVS deleteSprite():Sprites/deleteSprite().html spriteClip():Sprites/spriteClip().html spriteExist():Sprites/spriteExist().html spriteHeight():Sprites/spriteHeight().html spriteHit():Sprites/spriteHit().html sprite():Sprites/sprite().html spriteImage():Sprites/spriteImage().html spriteWidth():Sprites/spriteWidth().html spriteX():Sprites/spriteX().html spriteY():Sprites/spriteY().html spriteZ():Sprites/spriteZ().html updateSprite:Sprites/updateSprite.html asc():Strings/asc().html chr$():Strings/chr$().html 0:Strings/CVS insert$():Strings/insert$().html inStr():Strings/inStr().html lCase$():Strings/lCase$().html left$():Strings/left$().html length():Strings/length().html lTrim$():Strings/lTrim$().html mid$():Strings/mid$().html replace$():Strings/replace$().html replaceSubstr$():Strings/replaceSubstr$().html reverse$():Strings/reverse$().html right$():Strings/right$().html rinStr():Strings/rinStr().html rTrim():Strings/rTrim().html space$():Strings/space$().html str$():Strings/str$().html string$():Strings/string$().html tally():Strings/tally().html trim$():Strings/trim$().html typeOf$():Strings/typeOf$().html uCase$():Strings/uCase$().html val():Strings/val().html argument$():SubAndFunction/argument().html 0:SubAndFunction/CVS declare:SubAndFunction/declare.html exit function:SubAndFunction/exitFunction.html exit sub :SubAndFunction/exitSub.html function ... end function :SubAndFunction/function.html return:SubAndFunction/return.html sub ... end sub:SubAndFunction/sub.html 0:TextDraw/CVS getFont():TextDraw/getFont().html setFont():TextDraw/setFont().html text():TextDraw/text().html textRender():TextDraw/textRender().html 0:VideoMpeg/CVS deleteMpeg:VideoMpeg/deleteMpeg.html loadMpeg():VideoMpeg/loadMpeg().html pauseMpeg:VideoMpeg/pauseMpeg.html playMpeg():VideoMpeg/playMpeg().html rewindMpeg:VideoMpeg/rewindMpeg.html seekMpeg():VideoMpeg/seekMpeg().html skipMpeg():VideoMpeg/skipMpeg().html statusMpeg():VideoMpeg/statusmpeg().html stopMpeg:VideoMpeg/stopMpeg.html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/m - n.html0000755000000000000000000000630210644532461027453 0ustar rootroot index
m - n

max()
memCopy()
mid$()
min()
mirrorImage()
mkDir()
modulo
mouseButton
mousePointer()
mouseScreenX()
mouseScreenY()
mouseX
mouseY
mouseZone()
multiplication
musicExists()
musicSpeed()
musicVolume()
nameJoystick()
numAxesJoystick()
numBallsJoystick()
num_bobs
numButtonsJoystick()
numHatsJoystick()
num_images
numJoysticks
num_membank
num_numsocks
num_screens
num_sprites
num_waves
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/j - l.html0000777000076500007660000000530110463126042025676 0ustar index
j - l

joy()
key()
lBound()
lCase$()
leek()
left$()
length()
line()
loadBank()
loadImage()
loadMpeg()
loadMusic()
loadSound()
loadZipImage()
loadZipMusic()
loadZipSound()
locate()
loc()
lof()
logiacal and
logical not
logical or
logical xor
log()
loke()
lTrim$()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/sortedIndex.txt0000755000000000000000000003545210644532467031045 0ustar rootroot0:Array/CVS 0:Blitting/CVS 0:Bobs/CVS 0:CDSupport/CVS 0:ConsoleOutput/CVS 0:ControlStructures/CVS 0:DataFunctions/CVS 0:DateAndTime/CVS 0:Dirs/CVS 0:DisplayAndScreen/CVS 0:Files/CVS 0:Graphic/CVS 0:ImageManipulation/CVS 0:Joystick/CVS 0:Keyboard/CVS 0:Maths/CVS 0:MemoryBanks/CVS 0:Mouse/CVS 0:MultimediaFiles/CVS 0:Operators/CVS 0:PrintScreen/CVS 0:Runtime/CVS 0:Socket/CVS 0:SoundAndMusic/CVS 0:Sprites/CVS 0:Strings/CVS 0:SubAndFunction/CVS 0:TextDraw/CVS 0:VideoMpeg/CVS -1:Runtime/EnvVar.html abs():Maths/abs().html acceptSock():Socket/acceptSock().html aCos():Maths/aCos().html addition:Operators/addition.html andBit():Maths/andBit().html argument$():SubAndFunction/argument().html asc():Strings/asc().html aSin():Maths/aSin().html aTan():Maths/aTan().html atX:PrintScreen/atX.html atY:PrintScreen/atY.html autoback():DisplayAndScreen/02autoback.html autoUpdateBob() :Bobs/autoUpdateBob().html autoUpdateSprite():Sprites/autoUpdateSprite().html bankSize():MemoryBanks/50bankSize().html bar():Graphic/bar().html baseimageCC():MemoryBanks/41baseimageCC().html baseimage():MemoryBanks/40baseimage().html baseScreen():MemoryBanks/42baseScreen().html bin():Maths/bin().html bJoy():Joystick/bJoy().html blt():Blitting/blt().html bob():Bobs/bob().html bobExist():Bobs/bobExist().html bobHeight():Bobs/bobHeight().html bobHit():Bobs/bobHit().html bobImage():Bobs/bobImage().html bobWidth():Bobs/bobWidth().html bobX():Bobs/bobX().html bobY():Bobs/bobY().html bobZ():Bobs/bobz().html box():Graphic/box().html caption:DisplayAndScreen/21caption.html cdCurFrame():CDSupport/cdCurFrame().html cdCurTrack():CDSupport/cdCurTrack().html cdInserted():CDSupport/cdInserted().html cdName():CDSupport/cdName().html cdTrackLength():CDSupport/cdTrackLength().html cdTrackOffset():CDSupport/cdTrackOffset().html cdTrackType():CDSupport/cdTrackType().html chDir():Dirs/chDir().html chr$():Strings/chr$().html circle():Graphic/circle().html closeCD(n):CDSupport/closeCD(n).html close():Files/01close().html closeSock():Socket/closeSock().html cls :DisplayAndScreen/30cls.html colorCycling():Graphic/colorCycling().html color ():Graphic/color().html colorKey():ImageManipulation/colorKey().html command$():Runtime/command().html common:Array/common.html *connectionReadySock():Socket/!connectionReadySock().html connectSock():Socket/connectSock().html const:Runtime/const.html continue:ControlStructures/50continue.html copyBank():MemoryBanks/54copyBank().html copyImage():ImageManipulation/copyImage().html copySound():SoundAndMusic/copySound().html cos():Maths/cos().html countCdDrives:CDSupport/countCdDrives.html countCdTracks():CDSupport/countCdTracks().html currentBank():MemoryBanks/51currentBank().html cursOff:PrintScreen/cursOff.html cursOn:PrintScreen/cursOn.html data():DataFunctions/data().html date$:DateAndTime/date$.html dcbasic_date:Runtime/dcbasic_date.html dcbasic_version:Runtime/dcbasic_version.html declare:SubAndFunction/declare.html deek():MemoryBanks/deek().html deleteBob():Bobs/deleteBob().html deleteImage():ImageManipulation/deleteImage().html deleteMpeg:VideoMpeg/deleteMpeg.html deleteSound(n):SoundAndMusic/deleteSound(n).html deleteSprite():Sprites/deleteSprite().html dim:Array/dim.html dir$:Dirs/dir$.html directScreen :DisplayAndScreen/01directScreen.html dirExists():Dirs/dirExists().html dirFirst():Dirs/dirFirst().html dirNext:Dirs/dirNext.html displayBpp:DisplayAndScreen/10displayBpp.html displayHeight:DisplayAndScreen/10displayHeight.html displayWidth:DisplayAndScreen/10displayWidth.html division:Operators/division.html doke():MemoryBanks/doke().html do ... loop:ControlStructures/60do-loop.html dualPlayfield() :DisplayAndScreen/03dualPlayfield().html ejectCD():CDSupport/ejectCD().html ellipse():Graphic/ellipse().html else:ControlStructures/11else.html elseIf:ControlStructures/12elseIf.html enablePalette():Graphic/enablePalette().html end:Runtime/end.html eof():Files/01eof().html equality:Operators/equality.html erase:Array/erase.html exit do:ControlStructures/60exitDo.html exit for :ControlStructures/41exitFor.html exit function:SubAndFunction/exitFunction.html exit sub :SubAndFunction/exitSub.html exit while:ControlStructures/31exitWhile.html exp() :Maths/exp().html fadeMusic():SoundAndMusic/fadeMusic().html fileCopy():Files/fileCopy().html fileDelete():Files/fileDelete().html fileExists():Files/fileExists().html file input #:Files/04fileInput.html fileMove():Files/fileMove().html file output #:Files/04fileOutput.html fileRename():Files/fileRename().html fillCircle():Graphic/fillCircle().html fillEllipse():Graphic/fillEllipse().html for each ... next:ControlStructures/44forEach...Next.html for ... next:ControlStructures/40for...Next.html fPrintS():PrintScreen/fPrintS().html fps():DisplayAndScreen/30fps().html frac():Maths/frac().html freeBank():MemoryBanks/21freeBank().html freeBase():MemoryBanks/43freeBase().html freeFile:Files/06freeFile.html function ... end function :SubAndFunction/function.html getAxisJoystick():Joystick/getAxisJoystick().html getButtonJoystick():Joystick/getButtonJoystick().html getEnv:Runtime/getEnv().html getFont():TextDraw/getFont().html getFreeSock:Socket/getFreeSock.html getHatJoystick():Joystick/getHatJoystick().html getLocalIP():Socket/getLocalIP().html getPixel():Graphic/getPixel().html getRemoteIP():Socket/getRemoteIP().html getRemotePort():Socket/getRemotePort().html grab():Blitting/grab().html hex$():Maths/hex$().html hideMouse:Mouse/hideMouse.html hotSpot():ImageManipulation/hotSpot().html if ... then ... end if:ControlStructures/10if-then-endIf.html imageAlpha():ImageManipulation/imageAlpha().html imageExists():ImageManipulation/imageExists().html imageHeight():ImageManipulation/imageHeight().html imageWidth():ImageManipulation/imageWidth().html in:Array/in.html include:Runtime/include.html indexes():Array/indexes().html inKey:Keyboard/inKey.html ink():Graphic/ink().html inputS():PrintScreen/inputS().html insert$():Strings/insert$().html inStr():Strings/inStr().html integer division:Operators/integerDivision.html int() :Maths/int().html isClientReady():Socket/isClientReady().html isEnabledSock:Socket/isEnabledSock.html isFBSD:Runtime/isFBSD.html isLinux:Runtime/isLinux.html isMOS:Runtime/isMOS.html isNetBSD:Runtime/isNetBSD.html isOpenBSD:Runtime/isOpenBSD.html isOsx:Runtime/isOsx.html IsServerReady():Socket/IsServerReady().html isWin32:Runtime/isWin32.html joy():Joystick/joy().html key():Keyboard/key().html lBound():Array/lBound().html lCase$():Strings/lCase$().html leek():MemoryBanks/leek().html left$():Strings/left$().html length():Strings/length().html line():Graphic/line().html loadBank():MemoryBanks/10loadBank().html loadImage():MultimediaFiles/loadImage().html loadMpeg():VideoMpeg/loadMpeg().html loadMusic():MultimediaFiles/loadMusic().html loadSound():MultimediaFiles/loadSound().html loadZipImage():MultimediaFiles/loadZipImage().html loadZipMusic():MultimediaFiles/loadZipMusic().html loadZipSound():MultimediaFiles/loadZipSound().html locate():PrintScreen/locate().html loc():Files/02loc().html lof():Files/01lof().html logiacal and:ControlStructures/80and.html logical not:ControlStructures/82not.html logical or:ControlStructures/81or.html logical xor:ControlStructures/83xor.html log():Maths/log().html loke():MemoryBanks/loke().html lTrim$():Strings/lTrim$().html max():Maths/max().html memCopy():MemoryBanks/56memCopy().html mid$():Strings/mid$().html min():Maths/min().html mirrorImage():ImageManipulation/mirrorImage().html mkDir():Dirs/mkDir().html modulo:Operators/modulo.html mouseButton :Mouse/mouseButton.html mousePointer():Mouse/mousePointer().html mouseScreenX():Mouse/mouseScreenX().html mouseScreenY():Mouse/mouseScreenY().html mouseX:Mouse/mouseX.html mouseY:Mouse/mouseY.html mouseZone():Mouse/mouseZone().html multiplication:Operators/multiplication.html musicExists():SoundAndMusic/musicExists().html musicSpeed():SoundAndMusic/musicSpeed().html musicVolume():SoundAndMusic/musicVolume().html nameJoystick():Joystick/nameJoystick().html numAxesJoystick():Joystick/numAxesJoystick().html numBallsJoystick():Joystick/numBallsJoystick().html num_bobs:Runtime/num_bobs.html numButtonsJoystick():Joystick/numButtonsJoystick().html numHatsJoystick():Joystick/numHatsJoystick().html num_images:Runtime/num_images.html numJoysticks:Joystick/numJoysticks.html num_membank:Runtime/num_membank.html num_numsocks:Runtime/num_numsocks.html num_screens:Runtime/num_screens.html num_sprites:Runtime/num_sprites.html num_waves:Runtime/num_waves.html openCD():CDSupport/openCD().html open ... for ... as:Files/00open...For...As.html openSock(port):Socket/openSock().html option explicit:Runtime/optionExplicit.html option qbasic:Runtime/optionQbasic.html orBit():Maths/orBit().html os:Runtime/os.html paint():Graphic/paint().html palette():Graphic/palette().html paper():PrintScreen/paper().html pasteBob(x,y,n):Blitting/pasteBob().html pasteIcon(x,y,n):Blitting/pasteIcon().html pauseCD():CDSupport/pauseCD().html pauseMpeg:VideoMpeg/pauseMpeg.html pauseMusic:SoundAndMusic/pauseMusic.html pauseSound():SoundAndMusic/pauseSound().html peek():MemoryBanks/peek().html *peekSock():Socket/!peekSock().html pen():PrintScreen/pen().html placeMouse():Mouse/placeMouse().html playCD():CDSupport/playCD().html playFreqSound():SoundAndMusic/playFreqSound().html playMpeg():VideoMpeg/playMpeg().html playMusic():SoundAndMusic/playMusic().html playSound():SoundAndMusic/playSound().html playTracksCD():CDSupport/playTracksCD().html plot():Graphic/plot().html poke():MemoryBanks/poke().html polygon():Graphic/polygon().html polyline():Graphic/polyline().html positionMusic():SoundAndMusic/positionMusic(p).html power:Operators/power.html print:ConsoleOutput/print.html printS():PrintScreen/printS().html quickSort():Array/!quickSort().html randomize():Maths/randomize().html readByte():Files/03readByte().html readByteSock():Socket/readByteSock().html read():DataFunctions/read().html readLineSock():Socket/readLineSock().html readSock():Socket/readSock().html rectangle():Graphic/rectangle().html reDim:Array/!reDim().html replace$():Strings/replace$().html replaceSubstr$():Strings/replaceSubstr$().html reserveBank():MemoryBanks/20reserveBank().html resumeCD():CDSupport/resumeCD().html resumeMusic:SoundAndMusic/resumeMusic.html resumeSound():SoundAndMusic/resumeSound().html return:SubAndFunction/return.html reverse$():Strings/reverse$().html rewindMpeg:VideoMpeg/rewindMpeg.html rewindMusic:SoundAndMusic/rewindMusic.html rgb():Graphic/rgb().html right$():Strings/right$().html rinStr():Strings/rinStr().html rmDir():Dirs/rmDir().html rnd():Maths/rnd().html rotateImage():ImageManipulation/rotateImage().html rotoZoomImage():ImageManipulation/rotoZoomImage().html round():Maths/round().html rTrim():Strings/rTrim().html run:Runtime/!run.html saveBank():MemoryBanks/11saveBank().html saveImage():MultimediaFiles/saveImage().html saveSound():MultimediaFiles/saveSound().html screenAlpha():DisplayAndScreen/80screenAlpha().html screenClone():DisplayAndScreen/90screenClone().html screenClose():DisplayAndScreen/50screenClose().html screenCopy():DisplayAndScreen/90screenCopy().html screenCrossFade():DisplayAndScreen/95screenCrossFade().html screen():DisplayAndScreen/60screen().html screenFadein():DisplayAndScreen/95screenFadein().html screenFadeOut():DisplayAndScreen/95screenFadeOut().html screenHeight:DisplayAndScreen/51screenHeight.html screenLock():DisplayAndScreen/70screenLock().html screenOffset():DisplayAndScreen/61screenOffset().html screenOffsetX:DisplayAndScreen/62screenOffsetX.html screenOffsetY:DisplayAndScreen/62screenOffsetY.html screenOpen():DisplayAndScreen/50screen0pen().html screenSwap:DisplayAndScreen/50screenSwap.html screenUnlock():DisplayAndScreen/70screenUnlock().html screenViewport():DisplayAndScreen/71screenViewport().html screenViewportFlag:DisplayAndScreen/72screenViewportFlag.html screenViewportH:DisplayAndScreen/72screenViewportH.html screenViewportW:DisplayAndScreen/72screenViewportW.html screenViewportX:DisplayAndScreen/72screenViewportX.html screenViewportY:DisplayAndScreen/72screenViewportY.html screenWidth:DisplayAndScreen/51screenWidth.html screenZ():DisplayAndScreen/51screenZ().html seek():Files/02seek().html seekMpeg():VideoMpeg/seekMpeg().html select case ... end select:ControlStructures/20selectCase...EndSelect.html self addition:Operators/selfAddition.html self subtraction:Operators/selfSubtraction.html setAlphachannel():DisplayAndScreen/01setAlphachannel().html setBob():Bobs/setBob().html setCaption():DisplayAndScreen/21setCaption().html setDefaults():DisplayAndScreen/00setDefaults().html setDisplay():DisplayAndScreen/00setDisplay().html setEnv:Runtime/setEnv().html setFont():TextDraw/setFont().html setPixel():Graphic/setPixel().html sgn():Maths/sgn().html shared:Array/shared.html shell:Runtime/shell().html shl:Operators/shl.html showMouse:Mouse/showMouse.html shr:Operators/shr.html sin():Maths/sin().html skipMpeg():VideoMpeg/skipMpeg().html sound3d():SoundAndMusic/sound3d().html soundChannels():SoundAndMusic/soundChannels().html soundEnabled():SoundAndMusic/soundEnabled().html soundExists():SoundAndMusic/soundExists().html soundVolume():SoundAndMusic/soundVolume().html space$():Strings/space$().html spriteClip():Sprites/spriteClip().html spriteExist():Sprites/spriteExist().html spriteHeight():Sprites/spriteHeight().html spriteHit():Sprites/spriteHit().html spriteImage():Sprites/spriteImage().html sprite():Sprites/sprite().html spriteWidth():Sprites/spriteWidth().html spriteX():Sprites/spriteX().html spriteY():Sprites/spriteY().html spriteZ():Sprites/spriteZ().html sqr():Maths/sqr().html statusMpeg():VideoMpeg/statusmpeg().html step:ControlStructures/42step.html stopCD():CDSupport/stopCD().html stopMpeg:VideoMpeg/stopMpeg.html stopMusic:SoundAndMusic/stopMusic.html stop:Runtime/stop.html stopSound():SoundAndMusic/stopSound().html string concatenation:Operators/stringConcatenation.html string$():Strings/string$().html str$():Strings/str$().html sub ... end sub:SubAndFunction/sub.html subtraction:Operators/subtraction.html tally():Strings/tally().html tan():Maths/tan().html textRender():TextDraw/textRender().html text():TextDraw/text().html ticks():DateAndTime/ticks().html time$:DateAndTime/time$.html timer:DateAndTime/timer.html triangle():Graphic/triangle().html trim$():Strings/trim$().html typeOf$():Strings/typeOf$().html uBound():Array/uBound().html uCase$():Strings/uCase$().html updateBob :Bobs/updateBob.html updateSprite:Sprites/updateSprite.html val():Strings/val().html vumeterSound():SoundAndMusic/vumeterSound().html waitBjoy():Joystick/waitBjoy().html wait():DateAndTime/wait().html waitKey():Keyboard/waitKey().html waitVBL:DisplayAndScreen/50waitVBL.html while ... wend:ControlStructures/30while...Wend.html writeByte():Files/03writeByte().html writeByteSock():Socket/writeByteSock().html writeLineSock():Socket/writeLineSock().html writeSock():Socket/writeSock().html XgetBallJoystick():Joystick/XgetBallJoystick().html xorBit():Maths/xorBit().html YgetBallJoystick():Joystick/YgetBallJoystick().html zoneInputS():PrintScreen/zoneInputS().html zoomImage():ImageManipulation/zoomImage().html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/c.html0000755000000000000000000000665410644532455027123 0ustar rootroot index
c

caption
cdCurFrame()
cdCurTrack()
cdInserted()
cdName()
cdTrackLength()
cdTrackOffset()
cdTrackType()
chDir()
chr$()
circle()
closeCD(n)
close()
closeSock()
cls
colorCycling()
color ()
colorKey()
command$()
common
connectSock()
const
continue
copyBank()
copyImage()
copySound()
cos()
countCdDrives
countCdTracks()
currentBank()
cursOff
cursOn
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/s.html0000755000000000000000000001701610644532464027135 0ustar rootroot index
s

saveBank()
saveImage()
saveSound()
screenAlpha()
screenClone()
screenClose()
screenCopy()
screenCrossFade()
screen()
screenFadein()
screenFadeOut()
screenHeight
screenLock()
screenOffset()
screenOffsetX
screenOffsetY
screenOpen()
screenSwap
screenUnlock()
screenViewport()
screenViewportFlag
screenViewportH
screenViewportW
screenViewportX
screenViewportY
screenWidth
screenZ()
seek()
seekMpeg()
select case ... end select
self addition
self subtraction
setAlphachannel()
setBob()
setCaption()
setDefaults()
setDisplay()
setEnv
setFont()
setPixel()
sgn()
shared
shell
shl
showMouse
shr
sin()
skipMpeg()
sound3d()
soundChannels()
soundEnabled()
soundExists()
soundVolume()
space$()
spriteClip()
spriteExist()
spriteHeight()
spriteHit()
spriteImage()
sprite()
spriteWidth()
spriteX()
spriteY()
spriteZ()
sqr()
statusMpeg()
step
stopCD()
stopMpeg
stopMusic
stop
stopSound()
string concatenation
string$()
str$()
sub ... end sub
subtraction
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/o - q.html0000755000000000000000000000717210644532462027467 0ustar rootroot index
o - q

openCD()
open ... for ... as
openSock(port)
option explicit
option qbasic
orBit()
os
paint()
palette()
paper()
pasteBob(x,y,n)
pasteIcon(x,y,n)
pauseCD()
pauseMpeg
pauseMusic
pauseSound()
peek()
pen()
placeMouse()
playCD()
playFreqSound()
playMpeg()
playMusic()
playSound()
playTracksCD()
plot()
poke()
polygon()
polyline()
positionMusic()
power
print
printS()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/d.html0000755000000000000000000000512110644532455027110 0ustar rootroot index
d

data()
date$
dcbasic_date
dcbasic_version
declare
deek()
deleteBob()
deleteImage()
deleteMpeg
deleteSound(n)
deleteSprite()
dim
dir$
directScreen
dirExists()
dirFirst()
dirNext
displayBpp
displayHeight
displayWidth
division
doke()
do ... loop
dualPlayfield()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/r.html0000755000000000000000000000600510644532463027127 0ustar rootroot index
r

randomize()
readByte()
readByteSock()
read()
readLineSock()
readSock()
rectangle()
replace$()
replaceSubstr$()
reserveBank()
resumeCD()
resumeMusic
resumeSound()
return
reverse$()
rewindMpeg
rewindMusic
rgb()
right$()
rinStr()
rmDir()
rnd()
rotateImage()
rotoZoomImage()
round()
rTrim()
run
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/e - f.html0000777000076500007660000000667010463125762025705 0ustar index
e - f

ejectCD()
ellipse()
else
elseIf
enablePalette()
end
eof()
equality
erase
exit do
exit for
exit function
exit sub
exit while
exp()
fadeMusic()
fileCopy()
fileDelete()
fileExists()
file input #
fileMove()
file output #
fileRename()
fillCircle()
fillEllipse()
for each ... next
for ... next
fPrintS()
fps()
frac()
freeBank()
freeBase()
freeFile
function ... end function 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/alphabetical/t - z.html0000755000000000000000000000605610644532472027506 0ustar rootroot index
t - z

tally()
tan()
textRender()
text()
ticks()
time$
timer
triangle()
trim$()
typeOf$()
uBound()
uCase$()
updateBob
updateSprite
val()
vumeterSound()
waitBjoy()
wait()
waitKey()
waitVBL
while ... wend
writeByte()
writeByteSock()
writeLineSock()
writeSock()
XgetBallJoystick()
xorBit()
YgetBallJoystick()
zoneInputS()
zoomImage()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DateAndTime/0000777000000000000000000000000010645354374025512 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DateAndTime/index.txt0000777000076500007660000000014310463122501025577 0ustar CVS date$.html index.html index.txt sectionName.txt ticks().html time$.html timer.html wait().html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DateAndTime/date$.html0000777000076500007660000000314410463122501025602 0ustar date$
date$

Returns date string in MM:DD:YYYY format. You can also use date() syntax.


Syntax
string = date$
string = date

Example
' s holds the current date
s = date$
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DateAndTime/index.html0000777000076500007660000000151010463122501025723 0ustar index
Date and time

date$
ticks()
time$
timer
wait()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DateAndTime/timer.html0000777000076500007660000000360510463122501025743 0ustar timer
timer

Returns current time from program execution start. Returned time is expressed in milliseconds.

Syntax:
variable = timer

Example:
startTime = timer
for n = 1 to 1000000
next
endTime = timer
prints( endTime-startTime & " milliseconds are passed while for...next loop have executed " & n & " iterations")
waitkey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DateAndTime/time$.html0000777000076500007660000000334610463122501025627 0ustar Time$
time$

Returns current time string in HH:MM:SS format. Optionally you can also use time() statement instead.

Syntax
string = time$
string = time

Example
' s holds the current time
s = time$
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DateAndTime/wait().html0000777000076500007660000000174510463122501025713 0ustar wait()
wait()

Suspend program execution for the given number of milliseconds.

Syntax:
wait( time )

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DateAndTime/ticks().html0000777000076500007660000000376610463122501026071 0ustar ticks()
ticks()

Returns number of ticks since beginning of program. Ticks are operating system dependent.

Syntax
variable = Ticks

Example
' Set n to number of ticks to perform loop
startTicks = ticks()
for i = 1 to 1000000
            ' do nothing
next
n = ticks() - startTicks 
print n
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DateAndTime/sectionName.txt0000777000076500007660000000001610463122501026734 0ustar Date and time usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/0000777000000000000000000000000010645354420024740 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/bar().html0000777000076500007660000000606210463122757024763 0ustar bar()
bar()

Draws a filled rectangle with current ink color on current screen.

Syntax:
bar( sx , sy , dx , dy )

sx
and sy are upper left rectangle point coordinates while dx and dy are lower right rectangle point coordinates. dx , dy must be greaten than sx , sy.

Example:
while not key(k_esc)
    cls
    bar( 100, 100, Xmouse, Ymouse )
    waitVBL
wend
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/palette().html0000777000076500007660000000174010463123157025646 0ustar palette()
palette()

Sets entire palette.

Syntax:
palette( Uint32value {,...} )

You can pass as parameters till 256 color values. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/rectangle().html0000777000076500007660000000542710463123157026162 0ustar rectangle()
rectangle()

Draws a filled rectangle with current ink color on current screen.

Syntax:
rectangle( x, y, w, h, mode )

x
and y are upper left rectangle point coordinates while w and h are the rectangle width and height.
mode
parameter sets the filling mode.
mode = 0 outline
mode  = 1 filled

Example:
while not key(k_esc)
    cls    
    bar( 100, 100, Xmouse, Ymouse )
    waitVBL
wend


usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/circle().html0000777000076500007660000000376510463123157025462 0ustar circle()
circle()

Draw an empty circle with current ink color at given coordinates with given radius. Radius mus be positive number.

Syntax:
circle( x , y , radius )

Example:
for n = 1 to 100
    ink(rnd(16000000))
    circle( rnd(640), rnd(480), rnd(200) )
next
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/ellipse().html0000777000076500007660000000414610463123157025650 0ustar ellipse()
ellipse()

Draw an empty ellipse with current ink color at given coordinates with given radius couple. Radius must be positive numbers.

Syntax:
ellipse( x , y , radiusx , radiusy )

Example:
for n = 1 to 100
    ink(rnd(16000000))
    ellipse( rnd(640), rnd(480), rnd(200), rnd(200) )
    next
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/plot().html0000777000076500007660000000367010463123157025172 0ustar plot()
plot()

Write a dot on current screen at given coordinates with given color. Color must provided in Uint32 format.

Syntax:
plot( x , y, color )

Example:
for n = 1 to 10000
    col= rnd(16000000)
    plot( rnd(640), rnd(480), col ) 
    next
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/index.txt0000755000000000000000000000055310644532450026612 0ustar rootrootbar().html box().html circle().html colorCycling().html color().html CVS ellipse().html enablePalette().html _examples fillCircle().html fillEllipse().html getPixel().html index.html index.txt ink().html line().html paint().html palette().html plot().html polygon().html polyline().html rectangle().html rgb().html sectionName.txt setPixel().html triangle().html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/rgb().html0000777000076500007660000000263510463123245024764 0ustar rgb()
rgb()

Returns given RGB color in Uint32 format.

Syntax:
variable = rgb( red , green , blue )

Example:
print rgb( 100, 100, 255 )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/colorCycling().html0000777000076500007660000000543510463123157026644 0ustar colorCycling()
colorCycling()

Cycle color palette by shifting color palette colors through palette indexes forward or backward. It only works in 256 colors mode.

Syntax:
ColorCycling( startindex , endindex , direction , delay )
ColorCycling( startindex , endindex , direction )
ColorCycling()

startindex is first color palette index in cycle.
endindex is last color palette index in cycle.
direction is cycle direction and can be 0 or 1
delay is optional delay time value between colors shifting. If you set any delay value, colorCycling() will be executed in asynchronous mode otherwise, if you omit delay, it will halt program execution when called.
By calling colorCycling() without arguments you stop asynchronous color cycle.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/fillCircle().html0000777000076500007660000000403010463123157026253 0ustar fillCircle()
fillCircle()

Draw a filled circle with current ink color at given coordinates with given radius. Radius must be positive number.

Syntax:
fillCircle( x , y , radius )

Example:
for n = 1 to 100
    ink(rnd(16000000))
    fillCircle( rnd(640), rnd(480), rnd(200) )
    next
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/ink().html0000777000076500007660000000246310463123157024774 0ustar ink()
ink()

Select current color. Current color is used by next called graphic commands. Color value must be in Uint32 format.

Syntax:
Ink( Uint32color )

Example:
ink( rgb(0,120,255) )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/line().html0000777000076500007660000000473710463123157025150 0ustar line()
line()

Draws a line on current screen with ink current color.

Syntax:
line( sx , sy , dx , dy )

sx
and sy are starting line point coordinates while dx and dy are ending line point coordinates.

Example:
for n = 1 to 100
    ink(rnd(16000000))
    line( rnd(640), rnd(480), rnd(640), rnd(480) )
    next
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/index.html0000755000000000000000000000377410644532450026747 0ustar rootroot index
Graphic

bar()
box()
circle()
colorCycling()
color ()
ellipse()
enablePalette()
fillCircle()
fillEllipse()
getPixel()
ink()
line()
paint()
palette()
plot()
polygon()
polyline()
rectangle()
rgb()
setPixel()
triangle()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/fillEllipse().html0000777000076500007660000000414610463123157026457 0ustar fillEllipse()
fillEllipse()

Draw a filled ellipse with current ink color at given coordinates with given radius couple. Radius must be positive numbers.

Syntax:
fillEllipse( x , y , radiusx , radiusy )

Example:
for n = 1 to 100
    ink(rnd(16000000))
    fillEllipse( rnd(640), rnd(480), rnd(200), rnd(200) )
next
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/getPixel().html0000777000076500007660000000416710463123157025777 0ustar getPixel()
getPixel()

Gets color value at given coordinates on current screen. Returned color is in Uint32 format. Alternatively you can use the point() command syntax.

Syntax:
variable = getPixel ( x , y )
variable = point( x , y )

Example:
print point( 100,100 )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/enablePalette().html0000777000076500007660000000223110463123157026751 0ustar enablePalette()
enablePalette()

Enable, disable and verify the palettemode in 256 color display.

Syntax:
enablePalette( state )
variable = enablePalette()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/paint().html0000777000076500007660000000507110463123157025324 0ustar paint()
paint()

Fills a closed area
with current ink color set by the ink() command.

Syntax:
paint( x , y )

Example:
circle( 320, 240, 200 )
paint( 320, 240 )
waitkey
wait(500)
cls
circle( 320, 240, 200 )
paint( 0, 0 )
waitkey

Example:
paint.sdlbas

See also ink() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/polygon().html0000755000000000000000000000301710643535110027431 0ustar rootroot polygon()
polygon()

Draw a filled poligon with current ink color at given coordinates.

Syntax:
polygon( xa , ya xb , yb xc , yc , ... )

Example: 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/color().html0000777000076500007660000000243010463123157025323 0ustar color ()
color ()

Sets given color palette index to given Uint32 color value. If color value is omitted it return current color of given index.

Syntax:
color ( colorindex , Uint32value )
variable = color ( colorindex )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/setPixel().html0000777000076500007660000000560110463123245026003 0ustar setPixel()
setPixel()

Write a dot, with current ink color, on current screen at given coordinates.
Alternatively you can use the dot() or putpixel() commands syntax.

Syntax:
setPixel( x , y )
putPixel ( x , y )
dot( x , y )

Example:
for n = 1 to 10000
ink( rgb(rnd(255),rnd(255),rnd(255)) )
dot( rnd(640), rnd(480) )
next
waitKey

Example:
3d_stars.sdlbas

See also ink() command.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/polyline().html0000755000000000000000000000276610643535110027607 0ustar rootroot polyline()
polyline()

Draw empty poligon with current ink color at given coordinates.

Syntax:
polyline( xa , ya xb , yb xc , yc , ... )

Example: 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/_examples/0000777000000000000000000000000010645354423026720 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/_examples/3d_stars.sdlbas0000777000076500007660000000163010463123245030066 0ustar '|------------------------------------------------------------------------------------------------------------ '| sdlbasic test 3d stars.sdlbas '| date 1/01/2004 '| '| description: '| create a 3d field of stars '| '| '| keys : esc to exit '| '| '| bugfix: '| '| '| bug: '| '| '|------------------------------------------------------------------------------------------------------------ fps(1) setDisplay(1024,768,32,0) setAutoback(0) directScreen mouseHide numstars=1500 dim x[numstars] dim y[numstars] dim s[numstars] for i =0 to numstars x[i]=rnd(1024)-512 y[i]=rnd(768)-368 s[i]=rnd(4)+1 next while inkey=0 cls screenLock(0) for i= 0 to numstars x[i]=x[i]*1.02 y[i]=y[i]*1.02 if abs(x[i])>512 or abs(y[i])>368 then x[i]=rnd(512)-256 y[i]=rnd(368)-184 end if ink(rgb(s[i]*32,s[i]*32,255)) setPixel(512+x[i],368+y[i]) next screenunLock(0) locate(1,1):printS(fps()) screenSwap end while usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/_examples/paint.sdlbas0000777000076500007660000000071310463123245027460 0ustar 'paint test setautoback(1) prints("esc to exit | leftmouse to write |right mouse to fill a close area") xnew=0 ynew=0 while(inkey()=0) if bmouse()=1 then ink(rgb(255,255,255)) xold=xnew:yold=ynew xnew=xmouse:ynew=ymouse if xold=0 then xold=xnew:yold=ynew end if line(xold,yold,xnew,ynew) 'screenswap elseif bmouse()>1 then ink(rgb(rnd(255),rnd(255),rnd(255))) paint(xmouse,ymouse) ' screenswap xnew=0 ynew=0 end if end while usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/triangle().html0000755000000000000000000000447010643535110027553 0ustar rootroot triangle()
triangle()

Draw a filled triangle with current ink color at given coordinates.

Syntax:
triangle( xa , ya xb , yb xc , yc )

Example:
for n = 1 to 100
    ink(rnd(16000000))
    triangle( rnd(640), rnd(480), rnd(640), rnd(480), rnd(640), rnd(480)  )
next
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/box().html0000777000076500007660000000513010463123157024775 0ustar box()
box()

Draws an empty rectangle with current ink color on current screen.

Syntax:
box( sx , sy , dx , dy )

sx
and sy are upper left rectangle point coordinates while dx and dy are lower right rectangle point coordinates.

Example:
while not key(k_esc)
    cls
    box( 100, 100, Xmouse, Ymouse )
    waitVBL
wend
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Graphic/sectionName.txt0000777000076500007660000000001110463123245026173 0ustar Graphic usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/0000777000000000000000000000000010645354477025633 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/atY.html0000777000076500007660000000360610463123665025512 0ustar atY
atY

Returns Y coordinate of text cursor.

Syntax:
variable = atY

Example:
locate(1,1) : prints( "atx="+str$( atx ) )
locate(15,3) : prints( "atx="+str$( atx ) )
locate(5,8) : prints( "atx="+str$( atx ) )
locate(7,5) : prints( "atx="+str$( atx ) )
waitkey

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/index.txt0000777000076500007660000000026710463123665025737 0ustar atX.html atY.html cursOff.html cursOn.html CVS fPrintS().html index.html index.txt inputS().html locate().html paper().html pen().html printS().html sectionName.txt zoneInputS().html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/printS().html0000777000076500007660000000506510463124122026343 0ustar printS()
printS()

Prints monospace text on screen.

Syntax:
printS( expression )

expression can be a string or a number.

Example:
printS( 1234 )
a = 5678
printS( a )
printS( "this is a direct string" )
a$ = "this is a variable string"
printS( a$ )
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/atX.html0000777000076500007660000000360610463123665025511 0ustar atX
atX

Returns X coordinate of text cursor.

Syntax:
variable = atY

Example:
locate(1,1) : prints( "aty="+str$( aty ) )
locate(15,3) : prints( "aty="+str$( aty ) )
locate(5,8) : prints( "aty="+str$( aty ) )
locate(7,5) : prints( "aty="+str$( aty ) )
waitkey

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/fPrintS().html0000777000076500007660000000435710463123665026467 0ustar fPrintS()
fPrintS()

Like printS(), it prints monospace text on screen but without the carriage return at the end of text line.

Syntax:
fPrintS( expression )

Example:
' let's compare printS with fPrintS
for n = 1 to 20
    printS( "line " & n )
next
for n = 1 to 20
    fPrintS( "line " & n )
next
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/locate().html0000777000076500007660000000410710463123665026342 0ustar locate()
locate()

Move text cursor at x, y grid coordinates.

Syntax:
locate( x , y )

Example:
for y = 1 to 20
    x= rnd(50)
    locate( x, y )
    printS( "current coordinate are x=" & x & " y=" & y )
next
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/index.html0000777000076500007660000000237710463123665026070 0ustar index
Writing on screen

atX
atY
cursOff
cursOn
fPrintS()
inputS()
locate()
paper()
pen()
printS()
zoneInputS()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/inputS().html0000777000076500007660000000443310463123665026357 0ustar inputS()
inputS()

Prompts the user for input and receive data from keyboard until return key is pressed.

Syntax:
variable = inputS( promptString , defaultText )

promptString is what the command print on screen as prompt. 
defaultText is the default answer. If you don't want any default text set this parameter to an empty string (""). 
Example:
a$ = ""
while(a$<>"yes")
    a$ = inputS( "do you want to quit?", "no" )
wend
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/cursOn.html0000777000076500007660000000351010463123665026220 0ustar cursOn
cursOn

Show blinking text cursor on display.

Syntax:
cursOn

Example:
printS("press any key to show cursor")
waitkey
cursOn
locate(0,3)
printS("press esc to quit")
fprints("do you see cursor blinking? ")
waitkey(k_esc)

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/zoneInputS().html0000777000076500007660000000607610463124122027205 0ustar zoneInputS()
zoneInputS()

Prompts the user for input and receive data from keyboard until return key is pressed. Text is printed inside the area wide length characters at the x , y coordinates .
 

Syntax:
variable = zoneInputS( x , y , length , defaultText )

x and y are the coordinates where is located the input area.
Length is the length of the input area measured in characters. Text exceeding area size, will be scrolled horizontally. 
defaultText is the default answer suggested to the user.

Example:
a$ = zoneInputS( 20, 20, 5, "" )
cls
fPrintS("you typed : ")
printS( a$ )
wait(500)
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/pen().html0000777000076500007660000000667710463124122025660 0ustar pen()
pen()

Set the text color or returns current text color if
color is omitted.

Syntax:
pen( color )
variable = pen()

colorcan be expressed in Uint32, hexadecimal format or converted from RGB values by rgb()  command. Returned color is expressed in Uint32 format.

Example:
pen( 16711680 )
printS("this is a red text")
printS( "text color = Uint32 " & pen() )
pen( 0x0000ff ) 
printS("this is a blu text")
printS( "text color = Uint32 " & pen() )
pen( rgb(0,255,0) ) 
printS("this is a green text")
printS( "text color = Uint32 " & pen() )
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/paper().html0000777000076500007660000000723010463124122026167 0ustar paper()
paper()

Set the text background color or returns current text background color if
color is omitted.

Syntax:
paper( color )
variable = paper()

color can be expressed in Uint32, hexadecimal format or converted from RGB values by rgb() command. Returned color is expressed in Uint32 format.

Example:
paper( 16711680 )
printS("this is a red background")
printS( "background color = Uint32 " & paper() )
paper( 0x0000ff ) 
printS("this is a blu background")
printS( "background color = Uint32 " & paper() )
paper( rgb(0,255,0) )
printS("this is a green background")
printS( "background color = Uint32 " & paper() )
waitKey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/cursOff.html0000777000076500007660000000342510463123665026363 0ustar cursOff
cursOff

Hide blinking text cursor.

Syntax:
cursOff

Example:
cursOn
fprints("press any key to hide cursor")
waitkey
cursOff
locate(0,3)
prints("press esc to quit ")
waitkey(k_esc)

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/PrintScreen/sectionName.txt0000777000076500007660000000002310463124122027050 0ustar Writing on screen usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ConsoleOutput/0000777000000000000000000000000010645354357026217 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ConsoleOutput/index.txt0000777000076500007660000000006410463122374026315 0ustar CVS index.html index.txt print.html sectionName.txt usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ConsoleOutput/print.html0000777000076500007660000000345110463122374026472 0ustar print
print

Print given expression in standard output. Generally used for debug purpose.

Syntax
print expression

expression can be text, number or variable.

Example
print "hello"
print 123
a = 314
print a
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ConsoleOutput/index.html0000777000076500007660000000107510463122374026445 0ustar index
Console output

print
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/ConsoleOutput/sectionName.txt0000777000076500007660000000001710463122374027451 0ustar Console output usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DataFunctions/0000777000000000000000000000000010645354367026137 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DataFunctions/index.txt0000777000076500007660000000010110463122440026216 0ustar CVS data().html index.html index.txt read().html sectionName.txt usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DataFunctions/read().html0000777000076500007660000000541610463122440026306 0ustar read()
read()

Read data values, at given pointer position, from inline data structure.

Syntax:
read( {pointer} )

If you don't pass pointer, read command reads current data values and move pointer position to next data value.

Example:
data(1,2,3,4,5,6,7,8)
for i = 0 to 7
    fprints( read()& " - " ) 
next
prints(chr(13))
for i =0 to 20
    n=rnd(7)
    prints( read( n ) )
next
waitKey

See also data() command.

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DataFunctions/data().html0000777000076500007660000000245410463122440026303 0ustar data()
data()

Inline data structure.

Syntax:
data( expression {,...} )

Data command allow a maximum of 256 parameters.

Example:
data(1,2,3,4,5,6,7,8)

See also read() command. 

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DataFunctions/index.html0000777000076500007660000000120310463122440026347 0ustar index
Data functions

data()
read()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DataFunctions/sectionName.txt0000777000076500007660000000001710463122440027362 0ustar Data functions usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/0000777000000000000000000000000010645354403026554 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/21caption.html0000777000076500007660000000372310463122553027504 0ustar caption
caption

Return the caption of display window.

Syntax:
variable = caption

Example:
setdisplay(640,480,32,1)
setcaption("sdlBasic rocks")
prints( caption )
waitKey

Example:
caption.sdlbas

see also setCaption() command usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/60screen().html0000777000076500007660000000341510463122553027450 0ustar screen()
screen()

Activate given logical screen, if called without parameter it return current screen.

Syntax:
screen( number )
variable = screen()

Example:
screen( 2 )
print screen()

Example:
screen.sdlbas usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/90screenClone().html0000777000076500007660000000544310463122622030434 0ustar screenClone()
screenClone()

Create new viewport to given logical screen.

Syntax:
screenClone( viewport , screen , vpx , vpy , vpw , vph flag )

viewport is viewport number and it can range from 0 to 7.
screen is logical screen number and it can range from 0 to 7.
vpx is viewport x coordinate on display.
vpy is viewport y coordinate on display.
vpw is viewport width.
vph is viewport height.
flag enable the screen transparency.

Example:
screenclone.sdlbas
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/00setDefaults().html0000777000076500007660000000661110463122501030440 0ustar setDefaults()
setDefaults()

Change display parameters, initialize fonts and cursor, sets default screens parameters.
This command is useful in conjunction with --nodefaults command line parameter, it avoid the creation of default display window when starting a .sdlbas program. This way you can open custom display without flashing windows at the beginning of the program . If you launch sdlBrt with --nodefaults option you must invoke setDefaults() command before accessing any sprites, bobs, graphic commands and all the commands involving screens and display.

Syntax:
setDefaults( width , height , depth , mode )

width
is the display width.
height is the display height.
depth is display color depth. Commonly used values are:
8 = 256 mapped colors
16 = 65000 colors
32 = full colors
mode determine how display is opened. Possible values are:
0 = full screen
1 = fixed window
2 = re-sizable window

Example:
setDefault( 800, 600, 16, 1 )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/30fps().html0000777000076500007660000000267210463122553026762 0ustar fps()
fps()

Enable or disable frame per seconds counter.
Without parameter it returns current frame rate.

Syntax:
fps( value )
variable = fps

value
= 0 means frame rate disabled
value = 1 means frame rate enabled.
././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/03dualPlayfield().htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/03dualPlayfield().htm0000777000076500007660000000733410463122553030575 0ustar dualPlayfield(optional m)
dualPlayfield()

Enable or disable screen overlay over sprite layer. dualPlayfield command allows you to show foreground graphics over background and sprites layers. By moving foreground layer faster than background, you can achieve interesting parallax effects. This command work in conjunction with transparent screens. See screenOpen() command on how to set screen transparency.

Syntax:
dualPlayfield( value )
value = 0 means dualPlayfield disabled
value = 1 means dualPlayfield enabled
by default value is set to 0

Example:
dualplayfield( 1 )
screenopen(0,1280,480,0,0,640,480,0) 'background screen
for i = 0 to 50
    ink(rgb(rnd(255),rnd(255),rnd(255)))
    line(rnd(1280),rnd(480),rnd(1280),rnd(480))
next
screenopen(1,2560-640,480,0,0,640,480,3):'foreground screen
for i = 0 to 50
    ink(rgb(rnd(255),rnd(255),rnd(255)))
    text(rnd(2560-320),rnd(480),rnd(64),"foreground screen")
next
x1=0:x2=0
while x1<640
    x1+=1
    x2+=2
    screen(0):offset(x1,0)
    screen(1):offset(x2,0)
    waitvbl
end while

Example:
dualplayfield.sdlbas

See also screenOpen() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/10displayWidth.html0000777000076500007660000000224710463122553030512 0ustar displayWidth
displayWidth

Returns the display width.

Syntax:
variable = displayWidth

Example:
print displayWidth
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/50screen0pen().html0000777000076500007660000000645610463122553030242 0ustar screenOpen()
screenOpen()

Opens a new logical screen.

Syntax:
screenOpen( num , width , hight , vpx , vpy , vpw , vph flag )

num is screen number and it can range from 0 to 7.
width is the screen width.
hight is screen height.
vpx is viewport x coordinate on display.
vpy is viewport y coordinate on display.
vpw is viewport width.
vph is viewport height.
flag enable the screen transparency
0 = opaque
2 = transparent when doubleplayfield is not active
3 = transparent when doubleplayfield is active

Example:
screenOpen( 2, 1280, 480, 0, 0, 640, 480, 0 )

Example:
screenOpen.sdlbas usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/index.txt0000755000000000000000000000146410644532447030435 0ustar rootroot00setDefaults().html 00setDisplay().html 01directScreen.html 01setAlphachannel().html 02autoback.html 03dualPlayfield().html 10displayBpp.html 10displayHeight.html 10displayWidth.html 21caption.html 21setCaption().html 30cls.html 30fps().html 50screen0pen().html 50screenClose().html 50screenSwap.html 50waitVBL.html 51screenHeight.html 51screenWidth.html 51screenZ().html 60screen().html 61screenOffset().html 62screenOffsetX.html 62screenOffsetY.html 70screenLock().html 70screenUnlock().html 71screenViewport().html 72screenViewportFlag.html 72screenViewportH.html 72screenViewportW.html 72screenViewportX.html 72screenViewportY.html 80screenAlpha().html 90screenClone().html 90screenCopy().html 95screenCrossFade().html 95screenFadein().html 95screenFadeOut().html CVS _examples index.html index.txt sectionName.txt usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/50screenSwap.html0000777000076500007660000000170210463122553030156 0ustar screenSwap
screenSwap

Swap logical screen with physical screen and update bob system.

Syntax:
screenSwap

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/50waitVBL.html0000777000076500007660000000154310463122553027357 0ustar waitVBL
waitVBL

Wait for automatic screen swap.

Syntax:
waitVBL
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/21setCaption().html0000777000076500007660000000371410463122553030301 0ustar setCaption()
setCaption()

Change the caption of display window.

Syntax:
setCaption( string )

Example:
setdisplay(640,480,32,1)
setCaption( "sdlBasic rocks" )
prints( caption )
waitKey

Example:
setCaption.sdlbas

see also caption() command ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/72screenViewportW.htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/72screenViewportW.htm0000777000076500007660000000251010463122622031035 0ustar screenViewportW
screenViewportW

Returns current screen viewport width.

Syntax:
variable = screenViewportW

Old WscreenRect command is still valid.

Example:
screenViewportW.sdlbas
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/50screenClose().html0000777000076500007660000000253710463122553030441 0ustar screenClose()
screenClose()

Close the logical screen n.

Syntax:
screenClose( number )

Example:
screenClose( 2 )

See also screenOpen() command. ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/61screenOffset().htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/61screenOffset().html0000777000076500007660000000712510463122553030622 0ustar screenOffset()
screenOffset()

Move display viewport position on current logical screen. screenOffset may be useful for scrolling background in platform games.
You can still use old offset() command instead. 

Syntax:
screenOffset ( x , y )
offset ( x , y )

Example:
screenopen(0,1280,480,0,0,640,480,0)
for i = 0 to 100
    ink(rgb(rnd(255),rnd(255),rnd(255)))
    line(rnd(1280),rnd(480),rnd(1280),rnd(480))
next
x=0
while x<640
    x+=2
    screenOffset( x , 0 )
    waitvbl
end while


Example:
screenOffset.sdlbas

See also screenOffsetX and screenOffsetY commands. ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/70screenUnlock().htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/70screenUnlock().html0000777000076500007660000000227610463122622030626 0ustar screenUnlock()
screenUnlock()

Unlock given screen. 


Syntax:
screenUnlock( screen )

Example:

See also screenLock() command.
././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/72screenViewportH.htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/72screenViewportH.htm0000777000076500007660000000251410463122622031022 0ustar screenViewportH
screenViewportH

Returns current screen viewport height.

Syntax:
variable = screenViewportH

Old HscreenRect command is still valid.

Example:
screenViewportH.sdlbas
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/80screenAlpha().html0000777000076500007660000000545310463122622030421 0ustar screenAlpha()
screenAlpha()

Set screen alpha value.

Syntax:
screenAlpha( screen , alpha )

alpha value range from 0 = transparent to 255 = opaque.

Example:
circle(320,240,200)
screenopen(1,640,280,0,200,640,280,0)
screenopen(1,640,280,0,200,640,280,0) screenAlpha(1,0)
circle(200,200,200): circle(400,400,200)
for n = 0 to 255
    screenAlpha( 1,n )
    waitVBL
next

Example:
screenalpha.sdlbas

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/index.html0000755000000000000000000000706610644532447030566 0ustar rootroot index
Display and screens

setDefaults()
setDisplay()
directScreen
setAlphachannel()
autoback()
dualPlayfield()
displayBpp
displayHeight
displayWidth
caption
setCaption()
cls
fps()
screenOpen()
screenClose()
screenSwap
waitVBL
screenHeight
screenWidth
screenZ()
screen()
screenOffset()
screenOffsetX
screenOffsetY
screenLock()
screenUnlock()
screenViewport()
screenViewportFlag
screenViewportH
screenViewportW
screenViewportX
screenViewportY
screenAlpha()
screenClone()
screenCopy()
screenCrossFade()
screenFadein()
screenFadeOut()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/10displayBpp.html0000777000076500007660000000224010463122553030145 0ustar displayBpp
displayBpp

Returns display color depth

Syntax:
variable = displayBpp

Example:
print displayBpp
././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/95screenFadein().htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/95screenFadein().html0000777000076500007660000000660310463122676030577 0ustar screenFadein()
screenFadein()

Fade screen from black to a given image slot. This command works in asynchronous mode that is it don't halt program execution while fade occurs.

Syntax:
screenFadein( screen , imageslot , time )
variable = screenFadein( screen )

If called without time parameter it return fade status
1 if still running
0 if finished
Time is expressed in seconds.

Example:
circle(320,240,200)
grab(1,0,0,640, 480)
cls
screenfadein(0,1,4)
while screenfade( 0 ) =1
    wait(40)
wend
prints( "done! press any key to quit")
waitKey

See also wait(), screenFadeOut() and screenCrossFade() commands. ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/72screenViewportY.htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/72screenViewportY.htm0000777000076500007660000000251710463122622031046 0ustar screenViewportY
screenViewportY

Returns current screen viewport y coordinate.

Syntax:
variable = screenViewportY

Old YscreenRect command is still valid.

Example:
screenViewportY.sdlbas
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/62screenOffsetX.html0000777000076500007660000000257610463122622030634 0ustar screenOffsetX
screenOffsetX

Returns current screen x offset coordinate.

Syntax:
variable = screenOffsetX

Old Xoffset statement is still valid. 


Example:


See also screenOffset() and screenOffsetY commands.
././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/71screenViewport().htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/71screenViewport().ht0000777000076500007660000000311310463122622030651 0ustar screenViewport()
screenViewport()

Modify current screen viewport coordinates.

Syntax:
screenViewport( x , y , width , height , flag )

Old screenRect() command is still valid.

Example:
screenViewport.sdlbas
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/51screenWidth.html0000777000076500007660000000265510463122553030334 0ustar screenWidth
screenWidth

Returns current screen width.

Syntax:
variable = screenWidth

Example:
print screenWidth

See also screenHeight command.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/51screenZ().html0000777000076500007660000000326210463122553027602 0ustar screenZ()
screenZ()

Sets the screen order in which screens are refreshed on display by sdlBasic. If z parameter is omitted, it returns the current screen z position. Think about z position as the screen deep on display. Screens having greater z position will be displayed behind those screens having smaller values.

Syntax:
variable = screenZ( bob )
screenZ( bob , z )

z may range from 0 to the maximum screen number (7)

Example:
././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/72screenViewportX.htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/72screenViewportX.htm0000777000076500007660000000251610463122622031044 0ustar screenViewportX
screenViewportX

Returns current screen viewport x coordinate.

Syntax:
variable = screenViewportX

Old XscreenRect command is still valid.

Example:
screenViewportX.sdlbas
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/30cls.html0000777000076500007660000000202610463122553026623 0ustar cls
cls

Cleans current logical screen.

Syntax:
cls

Example:
cls.sdlbas
././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/95screenCrossFade().htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/95screenCrossFade().h0000777000076500007660000000712610463122622030535 0ustar screenCrossFade()
screenCrossFade()

Fade screen from current image to a given image slot. This command works in asynchronous mode that is it don't halt program execution while fade occurs.

Syntax:
screenCrossFade( screen , imageslot , time )
variable = screenCrossFade( screen )

If called without time parameter it return fade status:
1 if still running
0 if finished
Time is expressed in seconds.

Example:
circle(320,240,200)
grab(1,0,0,640,480)
cls
circle(200,200,200): circle(400,400,200)
screencCrossFade(0,1,2)
while screenCrossFade( 0 ) =1
    wait(40)
wend
prints( "done! press any key to quit")
waitKey

See also wait(), screenFadeIn() and screenFadeOut() commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/62screenOffsetY.html0000777000076500007660000000260710463122622030630 0ustar screenOffsetY
screenOffsetY

Returns current screen y offset coordinate.

Syntax:
variable = screenOffsetY

Old Yoffset statement is still valid. 


Example:

See also screenOffset() and screenOffsetX commands.

././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/95screenFadeOut().htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/95screenFadeOut().htm0000777000076500007660000000715310463122622030554 0ustar screenFadeOut()
screenFadeOut()

Fade given screen to black in determined time. This command works in asynchronous mode that is it don't halt program execution while fade occurs.
You can still use old screenFade() command instead.

Syntax:
screenFadeOut( screen , time )
variable = screenFadeOut( screen )

If called without time parameter it return fade status:
1 if still running
0 if finished.
Time is expressed in seconds.

Example:
circle(320,240,200)
screenFadeOut( 0, 4 ) ' set up the fade
while screenFadeOut( 0 ) = 1 ' check if fade is still running 
    wait(40)
wend
prints( "done! press any key to quit")
waitKey

See also wait(), screenFadeIn() and screenCrossFade() commands.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/70screenLock().html0000777000076500007660000000225210463122622030255 0ustar screenLock()
screenLock()

Lock given screen to prevent access from graphic commands.

Syntax:
screenLock( screen )

Example:

See also screenUnlock() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/90screenCopy().html0000777000076500007660000000617210463122622030306 0ustar screenCopy()
screenCopy()

Copy a portion of source screen in destination screen.

Syntax:
screenCopy( srcscr , srcx , srcy , srcw , srch , destscr , destx , desty )

srcscr
is source screen number.
srcx is source area x coordinate to be copied.
srcy is source area y coordinate to be copied.
srcw is source area width to be copied.
srch is source area height to be copied.
destscr is destination screen number.
destx is copy destination area x coordinate.
desty is copy destination area y coordinate.

Example:
screenCopy.sdlbas
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/51screenHeight.html0000777000076500007660000000254410463122553030462 0ustar screenHeight
screenHeight

Returns current screen height.

Syntax:
variable = screenHeight

Example:
print screenHeight

See also screenWidth command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/10displayHeight.html0000777000076500007660000000225410463122553030641 0ustar displayHeight
displayHeight

Returns the display height.

Syntax:
variable = displayHeight

Example:
print displayHeight
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/01directScreen.html0000777000076500007660000000207510463122501030447 0ustar directScreen
directScreen

Open display as screen for direct output, this means graphic commands operates directly on display gaining speed. Sprites and screen offset doesn't work because directScreen don't use virtual screens.

Syntax:
directScreen

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/00setDisplay().html0000777000076500007660000000545410463122501030302 0ustar setDisplay()
setDisplay()

Change display parameters. sdlBasic open a default display that you can modify with this command.

Syntax:
setDisplay( width , height , depth , mode )

width
is the display width.
height is the display height.
depth is display color depth. Commonly used values are:
8 = 256 mapped colors
16 = 65000 colors
32 = full colors
mode determine how display is opened. Possible values are:
0 = full screen
1 = fixed window
2 = re-sizable window

Example:
setDisplay( 800, 600, 16, 1 )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/02autoback.html0000777000076500007660000000406210463122553027634 0ustar autoback
autoback()

Enable or disable automatic screenswap. Optionally you can use setAutoback() command.


Syntax:
autoback( value )
setAutoback( value )

value
= 0 means autoback disabled
value > 0 perform screen swap every given number of milliseconds.
value <0 waits given number of milliseconds and perform screen swap only if is explicitly called by screenSwap command.

Example:
autoback( 15 )
././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/01setAlphachannel().htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/01setAlphachannel().h0000755000000000000000000000426210643536526032312 0ustar rootroot setDisplay()
setAlphachannel()

Activates or deactivates the alpha channel present in images.  If you are using images featuring alpha channel, activating alpha channel you will get smoother border around pictures. Deactivating alpha channel your pictures back to be jigsawed. setAlpachannel is enable by default except the screen is set to full-screen, mode 0 under Windows operative system.


Syntax:
setAlphachannel( bolean )

bolean activate or deactivate alpha channel. Possible values are:
0 = false (alpha channel disabled)
1 = true (alpha channel enabled)

Example:
setAlphachannel( 1 )
././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/72screenViewportFlag.htmlusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/72screenViewportFlag.0000777000076500007660000000225310463122622030773 0ustar screenViewportFlag
screenViewportFlag

Returns current screen viewport flag status.

Syntax:
variable = screenViewportFlag

Old flagScreenRect  command is still valid.

Example:
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/0000777000000000000000000000000010645354406030534 5ustar rootroot././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenOpen.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenOpen.0000777000076500007660000000146710463122676031106 0ustar ------------------------------------------------------------------------------------------ -- screenOpen.sdlbas -- author: Zoiba ------------------------------------------------------------------------------------------ function drawlines(x,y) for i = 0 to 100 ink(rgb(rnd(255),rnd(255),rnd(255))) line(rnd(x),rnd(y),rnd(x),rnd(y)) next end function setdisplay (640,480,32,1) dualplayfield(0) fps(1) autoback( 0 ) -- opens lower screen and draw lines screenopen(0,640,480,0,0,640,480,0):'lo schermo sotto drawlines(640,480) screenopen(1,1280,480,0,0,640,480,2):'lo schermo sotto drawlines(1280,480) screenopen(2,1280,480,0,0,640,480,2):'lo schermo sotto drawlines(1280,480) autoback( 1 ) for x=1 to 300 screen(1):offset(x,0) screen(2):offset(x*2,0) screen(0): locate(0,0):prints(fps) waitVBL next usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/cls.sdlbas0000777000076500007660000000071310463122676030750 0ustar ----------------------------------------------------------------------------------------------------------- -- cls.sdlbas -- author: nitrofurano ------------------------------------------------------------------------------------------------------------ setdisplay(400,120,32,1):paper(0xFFFFFF):ink(0x000000):pen(0x000001):cls prints("pressing any key will clear this screen") circle(40,60,20) box(80,30,125,60) ellipse(120,90,50,10) waitkey cls wait(2000) ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/caption.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/caption.sdl0000777000076500007660000000071310463122676031136 0ustar ----------------------------------------------------------------------------------------------------------- -- caption.sdlbas -- author: nitrofurano ------------------------------------------------------------------------------------------------------------ setdisplay(320,200,32,1) a$="sdlbasic - setcaption example - " while key(27)=0 a$=right$(a$,len(a$)-1)+left$(a$,1) setcaption(a$) b$=caption:locate(1,5):prints(b$) for i=0 to 3:waitvbl:next wend ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenOffset.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenOffse0000777000076500007660000000031410463122676031157 0ustar screenopen(0,1280,480,0,0,640,480,0) for i = 0 to 100 ink(rgb(rnd(255),rnd(255),rnd(255))) line(rnd(1280),rnd(480),rnd(1280),rnd(480)) next x=0 while x<640 x+=2 screenoffset(x,0) waitvbl end while ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screen.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screen.sdlb0000777000076500007660000000131010463122676031114 0ustar ----------------------------------------------------------------------------------------------------------- -- screen.sdlbas -- author: nitrofurano ------------------------------------------------------------------------------------------------------------ setdisplay(320,200,32,1):paper(0xFFFFFF):ink(0x000000):pen(0x000001):cls screenopen(1,160,100,160,100,160,100,0):paper(0x77FFFF):ink(0x000000):pen(0x000001):cls screenopen(2,160,100,0,100,160,100,0):paper(0xFF77FF):ink(0x000000):pen(0x000001):cls screenopen(3,320,100,0,0,320,100,0):paper(0xFFFF77):ink(0x000000):pen(0x000001):cls paper(0xFFFF00):a=1 while key(27)=0 b=int(rnd(4)):screen(b) prints("text line "+str$(a)):a=a+1 waitvbl:wait(250) wend ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenclone.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenclone0000777000076500007660000000206410463122676031221 0ustar -- screen clone setdisplay(800,600,16,1) cls() screenopen(1,1000,1000,0,0,800,300,0) screenclone(2,1,0,310,800,300,0) screenswap() x=0 y=0 dx=5 dy=3 sx=0 sy=0 for i=0 to 1000 step 50 line(0,i,1000,i) line(i,0,i,1000) next x=0 y=0 ink (rgb(255,0,0)) textrender("o",20,0) ink(rgb(255,255,255)) text (0,0,20,"upper left corner") text (0,500,20,"center - left") text (0,960,20,"lower left corner") text (500,0,20,"upper - center") text (500,500,20,"center") text (500,960,20,"lower - center") text (850,0,20,"upper right corner") text (850,500,20,"center right") text (850,960,20,"lower right corner") screenswap grab(1,0,0,1000,1000) while(key(k_esc)=0) screen(1) x=x+dx y=y+dy if x>1000 or x <1 then : dx=-dx :end if if y>1000 or y <1 then : dy=-dy : end if offset(x - 400,y - 150) screen(2) sx=xoffset sy=yoffset if key(k_up) then : sy=sy-5:end if if key(k_down) then : sy=sy+5:end if if key(k_left) then : sx=sx-5:end if if key(k_right) then : sx=sx+5:end if offset(sx,sy) screen(2) grab (1,x,y,32,32) bob(1,x,y,0) screenswap ink (0) wend ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenalpha.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenalpha0000777000076500007660000000142710463122676031210 0ustar ------------------------------------------------------------------------------------------------------------ -- screenalpha.sdlbas -- date 21/12/2003 -- show a screen subject to screenalpha -- author: vroby ------------------------------------------------------------------------------------------------------------ setdisplay(640,480,32,1) for i = 0 to 1000 ink(rgb(rnd(255),rnd(255),rnd(255))) line(rnd(640),rnd(480),rnd(640),rnd(480)) next screenopen(1,640,200,0,280,640,200,0) paper(rgb(255,0,0)) cls prints("test of screenalpha") while inkey=0 for i= 255 to 0 step -1 screenalpha(1,i) locate(0,0):prints(i) if key(27) then:end:end if waitvbl next for i= 0 to 255 step 1 screenalpha(1,i) locate(0,0):prints(i) if key(27) then:end:end if waitvbl next end while ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenViewportY.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenViewp0000777000076500007660000000141710463122676031214 0ustar ----------------------------------------------------------------------------------------------------------- -- screenViewportY.sdlbas -- author: nitrofurano ------------------------------------------------------------------------------------------------------------ setdisplay(320,200,32,1):paper(0xFFFFFF):ink(0x000000):pen(0x000001):cls screenopen(1,104,128, 0,0,104,128,0):paper(0x77FFFF):ink(0x000000):pen(0x000001):cls screenopen(2,104,128,104,0,104,128,0):paper(0xFF77FF):ink(0x000000):pen(0x000001):cls screenopen(3,104,128,208,0,104,128,0):paper(0xFFFF77):ink(0x000000):pen(0x000001):cls paper(0xFFFFFF) while key(27)=0 b=int(rnd(4)):screen(b) screenviewport((b-1)*104,rnd(192),104,128,0) locate(1,1):prints(str$(screenviewporty)+" ") waitvbl:wait(250) wend ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenCopy.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenCopy.0000777000076500007660000000027610463122676031114 0ustar '*************** '* bmp display * '*************** loadImage("sdlBasic.png",1) pasteIcon(0,0,1) for i =401 to 0 step -1 screenCopy(0,0,0,200,200,0,200+i,0) screenSwap() next waitKey(27) ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenViewportH.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenViewp0000777000076500007660000000141510463122676031212 0ustar ----------------------------------------------------------------------------------------------------------- -- screenViewportH.sdlbas -- author: nitrofurano ------------------------------------------------------------------------------------------------------------ setDisplay(320,200,32,1):paper(0xFFFFFF):ink(0x000000):pen(0x000001):cls screenOpen(1,104,128, 0,0,104,128,0):paper(0x77FFFF):ink(0x000000):pen(0x000001):cls screenOpen(2,104,128,104,0,104,128,0):paper(0xFF77FF):ink(0x000000):pen(0x000001):cls screenOpen(3,104,128,208,0,104,128,0):paper(0xFFFF77):ink(0x000000):pen(0x000001):cls paper(0xFFFFFF) while key(27)=0 b=int(rnd(4)):screen(b) screenViewport((b-1)*104,0,104,rnd(128),0) locate(1,1):prints(str$(screenViewportH)+" ") waitVBL:wait(250) wend ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/sdlBasic.pngusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/sdlBasic.pn0000777000076500007660000000310710463122676031060 0ustar ‰PNG  IHDR€€L\öœbKGDÿÿÿ ½§“ pHYsÄÄ•+tIMEÔ  ,;ôýÔIDAT8ËíÝ?hÜVÀñgKy¢ƒŒ‰ÔEƒÀD] %¹Rèd%824“§fëÔ-‹·Líäɲuho <Õ“¡å²T`*h‘‹áAA¡‚”^®öî¤{z¿Õ±tù~lý»g!e&ˆ‚x#ËÆU$=Iö1²o\Ho)¤—Ðiú°yAS r¾êñ8ì‡$!ùe®ƒkLúÿ1øÚ0¸†¥×ŽÁ52½F ®Áéµ`pO¯8ƒkIze\«Ò+Èàj‘>쇡ì<3ÁU?}“Ò”Æàj‘~zï†1¸º¤7•aM÷Óì-†è0ò‰Ïkã¬`]3,€hp…3aà €Á©ÿðÞÇ{ûŸìÇã²,Uð$¤ç÷°ïy÷87ê9áÆf´9fã’–BHDvöv666677µ`à^¿k†Åd— „ÇÑ…¡Óáΰ,À» ¼šw†6ÀÀ‘a}ÕÛŒÃ0Œã8dñT·oÇß4^XÆçqtÅ@ÉóœRj!ÀÁ::BA€OŸË°™á¿ô-?ÿ[’ö0¬˜¾+¸¤ïÀTŽéE˜ÄÀ=½8Ý:J/@G†NÓ7 ”ú¾1¶„A@úe(¥yž3ÆBABÌf–¾šºwÄæ½É—¡Ƙt.é?Z»ä°Ì›À1ŒF#­¿ê›¸-ÒOM”Rî%³8uí–>tÁ`Iú÷«¯:Ñ‹A‘ôïú_ö VpÙ–ú ÒW+ÆDqÄ÷ DMa_õMWÕ¹]«Ã þ€Óhq£Ûém‘\¹Çú%\w§âÔ9Í.dp…=$ð¿žHHoê!h@A ?ð!½„s@z‘Þÿë~ús*%}¿Ÿ #ãëÏþH/Ò‡><=;=GçÉa"øõû™ ÝgL§—õ‚¬ªÿ@…ôvŽ é%œŸCz¸Ñ3<£ Ed¿fÛ»Û$"‹{úÓyž±ô:|9$ypôø¦Ÿû(âîäiž¿ÌoúÀÐEúÆÀÀ7}K€i†p?ìÑdžÐ-Ò¯€J“øÓê·NßÒsIßÒsLß ÒsO¿,¤ï(ýbHßiú:H/ ýl¸´–~6@öKöúŸ×p—+ ýÜC‹ãßg”zŒÍxñÑ.õ}63ýWŸ_ýø-þ+õíèðÝÜê õÕA9á.€²é;Xa€i†‚¾Í®ðd/ÓŠ§çvunÈ3vú"žQ„Э½(x¬Ÿ7kbv³<Ãññe£ô·öòÙcçûo¯´H/`y†z€yéõ5ñ»¬g˜`^ziõ wLM/`Ã4€Ù镸ËPØ^¹‰¢ÁÉà‡ßãÃgý©™)ë±oà…Ô{IEND®B`‚././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/setcaption.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/setcaption.0000777000076500007660000000073310463122676031151 0ustar ----------------------------------------------------------------------------------------------------------- -- caption.sdlbas -- author: nitrofurano ------------------------------------------------------------------------------------------------------------ setDisplay(320,200,32,1) paper(0xffffff) ink(0x000001) pen(0x000001) cls a$="sdlbasic - setcaption example - " while key(27)=0 a$=right$(a$,len(a$)-1)+left$(a$,1) setCaption(a$) for i=0 to 3 waitVBL next wend ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenViewportW.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenViewp0000777000076500007660000000140610463122676031212 0ustar ----------------------------------------------------------------------------------------------------------- -- screenViewportW.sdlbas -- author: nitrofurano ------------------------------------------------------------------------------------------------------------ setdisplay(320,200,32,1):paper(0xFFFFFF):ink(0x000000):pen(0x000001):cls screenopen(1,256,64,0, 0,256,64,0):paper(0x77FFFF):ink(0x000000):pen(0x000001):cls screenopen(2,256,64,0, 64,256,64,0):paper(0xFF77FF):ink(0x000000):pen(0x000001):cls screenopen(3,256,64,0,128,256,64,0):paper(0xFFFF77):ink(0x000000):pen(0x000001):cls paper(0xFFFFFF) while key(27)=0 b=int(rnd(4)):screen(b) screenviewport(0,(b-1)*64,rnd(256),64,0) locate(1,1):prints(str$(screenviewportw)+" ") waitvbl:wait(250) wend ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/dualplayfield.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/dualplayfie0000777000076500007660000000270110463122676031216 0ustar ------------------------------------------------------------------------------------------ -- dualplayfield in actions ------------------------------------------------------------------------------------------ -- use cursor keys to move screen ------------------------------------------------------------------------------------------ loadimage("sdlBasic.png",1) hotspot(1,1,1) setdisplay (640,480,32,1) mousehide dualplayfield(1) -- opens lower screen and draw lines screenopen(0,1280,960,0,0,640,480,0):'lo schermo sotto for i = 0 to 100 ink(rgb(rnd(255),rnd(255),rnd(255))) line(rnd(1280),rnd(960),rnd(1280),rnd(960)) next x1=320:y1=240 offset(x1,y1) -- opens upper screen and prints words screenopen(1,2560-640,1920-480,0,0,640,480,3):-- upper screen for i = 0 to 100 n=rnd(0xf0)+0xf ink(rgb(n,n,n)) text(rnd(2560-320),rnd(1920-240),rnd(64),"upper screen: use cursor keys") next x2=640:y2=480 offset (x2,y2) sprite(1,320,240,1) v=3 while key(27)=0 if key(k_up) then y1-=v*1 y2-=v*2 screen(0):offset(x1,y1) screen(1):offset(x2,y2) end if if key(k_down) then y1+=v*1 y2+=v*2 screen(0):offset(x1,y1) screen(1):offset(x2,y2) end if if key(k_left) then x1-=v*1 x2-=v*2 screen(0):offset(x1,y1) screen(1):offset(x2,y2) end if if key(k_right) then x1+=v*1 x2+=v*2 screen(0):offset(x1,y1) screen(1):offset(x2,y2) end if waitvbl end while ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenViewport.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenViewp0000777000076500007660000000146210463122676031214 0ustar ----------------------------------------------------------------------------------------------------------- -- screenViewport.sdlbas -- author: nitrofurano ------------------------------------------------------------------------------------------------------------ setdisplay(320,200,32,1):paper(0xFFFFFF):ink(0x000000):pen(0x000001):cls screenopen(1,160,100,160,100,160,100,0):paper(0x77FFFF):ink(0x000000):pen(0x000001):cls locate(1,1):prints("screen 1") screenopen(2,160,100,0,100,160,100,0):paper(0xFF77FF):ink(0x000000):pen(0x000001):cls locate(1,1):prints("screen 2") screenopen(3,320,100,0,0,320,100,0):paper(0xFFFF77):ink(0x000000):pen(0x000001):cls locate(1,1):prints("screen 3") while key(27)=0 b=int(rnd(4)):screen(b) screenViewport(rnd(320),rnd(200),rnd(160),rnd(100),0) waitvbl:wait(250) wend ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenViewportX.sdlbasusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenViewp0000777000076500007660000000141310463122676031210 0ustar ----------------------------------------------------------------------------------------------------------- -- screenViewportX.sdlbas -- author: nitrofurano ------------------------------------------------------------------------------------------------------------ setdisplay(320,200,32,1):paper(0xFFFFFF):ink(0x000000):pen(0x000001):cls screenopen(1,256,64,0, 0,256,64,0):paper(0x77FFFF):ink(0x000000):pen(0x000001):cls screenopen(2,256,64,0, 64,256,64,0):paper(0xFF77FF):ink(0x000000):pen(0x000001):cls screenopen(3,256,64,0,128,256,64,0):paper(0xFFFF77):ink(0x000000):pen(0x000001):cls paper(0xFFFFFF) while key(27)=0 b=int(rnd(4)):screen(b) screenviewport(rnd(256),(b-1)*64,256,64,0) locate(1,1):prints(str$(screenviewportx)+" ") waitvbl:wait(250) wend ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenOpen.sdlbas_tmpusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/_examples/screenOpen.0000777000076500007660000000301410463122676031074 0ustar ------------------------------------------------------------------------------------------ -- dualplayfield in actions ------------------------------------------------------------------------------------------ -- use cursor keys to move screen ------------------------------------------------------------------------------------------ function drawlines() for i = 0 to 100 ink(rgb(rnd(255),rnd(255),rnd(255))) line(rnd(1280),rnd(960),rnd(1280),rnd(960)) next end function setdisplay (640,480,32,1) -- opens lower screen and draw lines screenopen(0,1280,960,0,0,640,480,0):'lo schermo sotto for i = 0 to 100 ink(rgb(rnd(255),rnd(255),rnd(255))) line(rnd(1280),rnd(960),rnd(1280),rnd(960)) next x1=320:y1=240 offset(x1,y1) -- opens upper screen and prints words screenopen(1,2560-640,1920-480,0,0,640,480,3):-- upper screen for i = 0 to 100 n=rnd(0xf0)+0xf ink(rgb(n,n,n)) text(rnd(2560-320),rnd(1920-240),rnd(64),"upper screen: use cursor keys") next x2=640:y2=480 offset (x2,y2) sprite(1,320,240,1) v=3 while key(27)=0 if key(k_up) then y1-=v*1 y2-=v*2 screen(0):offset(x1,y1) screen(1):offset(x2,y2) end if if key(k_down) then y1+=v*1 y2+=v*2 screen(0):offset(x1,y1) screen(1):offset(x2,y2) end if if key(k_left) then x1-=v*1 x2-=v*2 screen(0):offset(x1,y1) screen(1):offset(x2,y2) end if if key(k_right) then x1+=v*1 x2+=v*2 screen(0):offset(x1,y1) screen(1):offset(x2,y2) end if waitvbl end while usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/DisplayAndScreen/sectionName.txt0000777000076500007660000000002510463122676030022 0ustar Display and screens usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MultimediaFiles/0000777000000000000000000000000010645354470026445 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MultimediaFiles/saveImage().html0000777000076500007660000000331010463123615027603 0ustar saveImage()
saveImage()

Saves given image slot on disk. Image is saved in bmp format.

Syntax:
saveImage( filename , slot )

Example:
loadimage( "testimage.jpg", 1 )
saveImage( "testimage.bmp", 1 )

See also loadImage() and loadZipImage() commands. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MultimediaFiles/loadImage().html0000777000076500007660000000424210463123615027571 0ustar loadImage()
loadImage()

Loads image from disk and store it in to given image slot. If image slot is omitted, image will be stored in first free slot, in this case it returns automatic assigned image slot. sdlBasic allow 65536 image slots. LoadImage() command accepts following file formats: bmp, gif, iff, jpg, pbm, pcx, png, tga, xpm.
 

Syntax:
loadImage( filename , slot )
slot = loadImage( filename )

Example:
s = loadimage( "testimage.png" ) 
pasteicon(0,0,s)
waitkey

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MultimediaFiles/index.txt0000777000076500007660000000027210463123615026547 0ustar CVS index.html index.txt loadImage().html loadMusic().html loadSound().html loadZipImage().html loadZipMusic().html loadZipSound().html saveImage().html saveSound().html sectionName.txt usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MultimediaFiles/loadZipSound().html0000777000076500007660000000436510463123615030330 0ustar loadZipSound()
loadZipSound()

Loads sound file from zip compressed file and store it into given sound slot. Sound file must be in wav sound format. sdlBasic allow 1024 sound slots. If sound slot is omitted, sound will be stored in first free slot, in this case command returns automatic assigned image slot.

Syntax:
loadZipSound( zipfile , filename , slot )
slot = loadZipSound( zipfile , filename )

Example:
s = loadZipSound( "zipfile.zip", "testSound.wav" )
playSound( s, 1 )
waitkey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MultimediaFiles/index.html0000777000076500007660000000217610463123615026701 0ustar index
Multimedia files

loadImage()
loadMusic()
loadSound()
loadZipImage()
loadZipMusic()
loadZipSound()
saveImage()
saveSound()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MultimediaFiles/saveSound().html0000777000076500007660000000246310463123615027661 0ustar saveSound()
saveSound()

Save a wave file from given sound slot. Sounds are saved in low quality.

Syntax:
saveSound( filename , slot )

Example:

See also loadSound() and loadZipSound() commands.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MultimediaFiles/loadSound().html0000777000076500007660000000345110463123615027640 0ustar loadSound()
loadSound()

Loads sound file from disk and store it into given sound slot. Sound file must be in wav sound format. sdlBasic allow 1024 sound slots. If sound slot is omitted, sound will be stored in first free slot, in this case command returns automatic assigned image slot.

Syntax:
loadSound( filename , slot )

Example:
s = loadSound( "testSound.wav" )
playSound( s, 1 )
waitkey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MultimediaFiles/loadZipImage().html0000777000076500007660000000466410463123615030264 0ustar loadZipImage()
loadZipImage()

Loads image from zip compressed file and store it in to given image slot. If image slot is omitted, image will be stored in first free slot, in this case command returns automatic assigned image slot. sdlBasic allow 65536 image slots. loadZipImage() command accepts following file formats: bmp, gif, iff, jpg, pbm, pcx, png, tga, xpm.
 

Syntax:
loadZipImage( zipfile , filename , slot )
slot = loadZipImage( zipfile, filename )

Example:
s = loadZipImage( "zipfile.zip", "testimage.png" )
pasteicon(0,0,s)
waitkey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MultimediaFiles/loadZipMusic().html0000777000076500007660000000335510463123615030316 0ustar loadZipMusic()
loadZipMusic()

Load a music module from zip compressed file, it can be in any of following file formats: wav, mod family (like xm), ogg files, midi and, only for Linux systems, mp3 music files.

Syntax:
loadZipMusic( zipfile , filename )

Example:
loadZipMusic( "zipfile.zip", "testmusic.mod" )
playmusic(-1)
waitkey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MultimediaFiles/loadMusic().html0000777000076500007660000000316110463123615027626 0ustar loadMusic()
loadMusic()

Load a music module file, it can be in any of following file formats: wav, mod family (like xm), ogg files, midi and, only for Linux systems, mp3 music files.

Syntax:
loadMusic( filename )

Example:
loadMusic( "testmusic.mod" )
playmusic(-1)
waitkey
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/MultimediaFiles/sectionName.txt0000777000076500007660000000002210463123615027676 0ustar Multimedia files usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/0000777000000000000000000000000010645354503025010 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/include.html0000777000076500007660000000250010463124122025544 0ustar include
include

Insert external text into the source code.

Syntax:
include filename

This statement cannot be placed in a structure.


Example:
include "defs.sdllib"

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/os.html0000777000076500007660000000606210463124214024553 0ustar os
os

Returns a string containing operative system name on which sdlBasic is running.

Syntax:
variable = os

Possible returned values are:
windows if running on window 95, windows 98, windows me/2000, or windowsXP operative system.
unix if running on Linux operative system.
osx if running on Apple OSX machine
fbsd if running on FreeBSD operative system.
netbsd if running on NetBSD operative system.
openbsd if running on OpenBSD operative system.
morphos if running on MorphOS operative system.

Example:
print( os )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/!run.html0000777000076500007660000000174710463124122025002 0ustar run
run

Launch a shell command who wiil be executed in multitasking.

Run is not implemented yet

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/optionExplicit.html0000777000076500007660000000311310463124214027136 0ustar option explicit
option explicit

Prevent the automatic creation of variables.

Syntax:
option explicit

sdlBasic will create things for you without them having to be explicitly declared. For example, the statement:
a = 100
will automatically create the variable a if one does not exist. You can prevent the automatic creation of variables with the statement:
option explicit
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/index.txt0000777000076500007660000000066610463124122025116 0ustar command().html const.html CVS dcbasic_date.html dcbasic_version.html end.html getEnv().html include.html index.html index.txt isFBSD.html isLinux.html isMOS.html isNetBSD.html isOpenBSD.html isOsx.html isWin32.html num_bobs.html num_images.html num_membank.html num_numsocks.html num_screens.html num_sprites.html num_waves.html optionExplicit.html optionQbasic.html os.html !run.html sectionName.txt setEnv().html shell().html stop.html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/isLinux.html0000777000076500007660000000356310463124122025566 0ustar isLinux
isLinux

Returns 1 (true) if operative system in use is GNU/LInux.

Syntax:
variable = isLinux

Example:
if isLinux then
    print("Wow, I'm running on a Linux box!!!")
else
    print("Hey folks, this is not a Tux PC")
end if
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/setEnv().html0000777000076500007660000000403310463124214025513 0ustar setEnv
setEnv

Set the value of the specified environment variable in current OS. If variable exists it will be replaced.

Syntax:
setEnv( environmentVariable , value )

environmentVariable : see Environment Variables section for more details.

Example:
setEnv( "MYENVVAR", "true" )
printS( getEnv( "MYENVVAR" ) )
waitKey()


see also the getEnv() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/end.html0000777000076500007660000000267310463124122024702 0ustar end
end

Terminates program execution.

Syntax:
end

Example:
if key(32) then
    end
end if
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/stop.html0000777000076500007660000000405610463124214025120 0ustar stop
stop

Suspends program execution end show debug window on sdlBasic display.

Syntax:
stop

Example:
for i=0 to 10
    prints(i)
    stop
next

See also debugging section.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/optionQbasic.html0000777000076500007660000000405310463124214026563 0ustar option qbasic
option qbasic

Create a forward reference to functions or subroutines.

Syntax:
option qbasic

This allow the routine to be referenced in code before it is actually defined with function or sub statements.

Example:
option qbasic
mysub()
end
sub mysub()
    print "this is my sub"
end sub
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/num_images.html0000777000076500007660000000267310463124214026262 0ustar num_images
num_images

Returns a string containing the number of maximum image slots allowed.

Syntax:
variable = num_images

Example:
print( num_images )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/num_membank.html0000777000076500007660000000270010463124214026416 0ustar num_membank
num_membank

Returns a string containing the number of maximum memory banks allowed.

Syntax:
variable = num_membank

Example:
print( num_membank )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/isOsx.html0000777000076500007660000000373610463124214025244 0ustar isOsx
isOsx

Returns 1 (true) if operative system in use is MacOSX.

Syntax:
variable = isOsx

Example:
if isOsx then
    print("Wow, I'm running on OSX!!!")
else
    print("Hey, this is not a Mac")
end if
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/dcbasic_date.html0000777000076500007660000000233710463124122026516 0ustar dcbasic_date
dcbasic_date

Returns a string containing the creation date of current sdlBasic executable version.

Syntax:
variable = dcbasic_date

Example:
print( dcbasic_date )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/isNetBSD.html0000777000076500007660000000315110463124214025541 0ustar isNetBSD
isNetBSD

Returns 1 (true) if operative system in use is NetBSD.

Syntax:
variable = isNetBSD

Example:
if isNetBSD then
    print("Wow, I'm running on a NetBSD!!!")
end if
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/isOpenBSD.html0000777000076500007660000000337310463124214025722 0ustar isOpenBSD
isOpenBSD

Returns 1 (true) if operative system in use is NetBSD.

Syntax:
variable = isOpenBSD

Example:
if isOpenBSD then
    print("Wow, I'm running on a OpenBSD!!!")
end if
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/index.html0000777000076500007660000000503210463124122025233 0ustar index
Runtime

command$()
const
dcbasic_date
dcbasic_version
end
getEnv
include
isFBSD
isLinux
isMOS
isNetBSD
isOpenBSD
isOsx
isWin32
num_bobs
num_images
num_membank
num_numsocks
num_screens
num_sprites
num_waves
option explicit
option qbasic
os
run
setEnv
shell
stop
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/num_numsocks.html0000777000076500007660000000267710463124214026663 0ustar num_numsocks
num_numsocks

Returns a string containing the number of maximum sockets allowed.

Syntax:
variable = num_numsocks

Example:
print( num_numsocks )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/num_waves.html0000777000076500007660000000266610463124214026144 0ustar num_waves
num_waves

Returns a string containing the number of maximum wave slots allowed.

Syntax:
variable = num_waves

Example:
print( num_waves )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/num_sprites.html0000777000076500007660000000267310463124214026506 0ustar num_sprites
num_sprites

Returns a string containing the number of maximum sprites allowed.

Syntax:
variable = num_sprites

Example:
print( num_sprites )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/isFBSD.html0000777000076500007660000000277510463124122025211 0ustar isFBSD
isFBSD

Returns 1 (true) if operative system in use is FreeBSD.

Syntax:
variable = isFBSD

Example:
if isFBSD then
    print("Wow, I'm running on a freeBSD!!!")
end if
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/dcbasic_version.html0000777000076500007660000000242610463124122027265 0ustar dcbasic_version
dcbasic_version

Returns a string containing current sdlBasic executable version number.

Syntax:
variable = dcbasic_version

Example:
print( dcbasic_version )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/command().html0000777000076500007660000000476210463124122025674 0ustar command
command$()

Return argument s passed to program from command line. Used with programs that take variable numbers of parameters.

Syntax:
numberOfArguments = command $ ()
argument = command $ ( n )

It return the total number of arguments passed from command line if called without parameter or returns argument number n if called with parameter n , first argument starts at n = 1
You can omit the dollar symbol and type it as command()

Example:
print( command())
for i =1 to command()
print( command( i ) )
next
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/num_screens.html0000777000076500007660000000267210463124214026456 0ustar num_screens
num_screens

Returns a string containing the number of maximum screen allowed.

Syntax:
variable = num_screens

Example:
print( num_screens )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/num_bobs.html0000777000076500007660000000266710463124214025745 0ustar num_bobs
num_bobs

Returns a string containing the number of maximum bobs allowed by sdlBasic.

Syntax:
variable = num_bobs

Example:
print( num_bobs )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/const.html0000777000076500007660000000330110463124122025247 0ustar const
const

Creates constant name with value of expression .

Syntax:
const name = expression {, ... }

Multiple constants can be declared on the same line. Constants are global and do not have to be declared with a shared statement.

Example:
'create a constant for PI
const PI = 3.14159271

see also common and shared commands usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/isWin32.html0000777000076500007660000000377410463124214025377 0ustar isWin32
isWin32

Returns 1 (true) if operative system in use is Windows.

Syntax:
variable = isWin32

Example:
if isWin32 then
    print("Wow, I'm running on a Windows machine!!!")
else
    print("This is not a Windows machine")
end if
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/getEnv().html0000777000076500007660000000357110463124122025503 0ustar getEnv
getEnv

Return the value of given current OS environment variable.

Syntax:
variable = getEnv( environmentVariable )

environmentVariable : see Environment Variables section for more details.

Example:

printS( getEnv( "PATH" ) )
waitKey()

see also the setEnv() command. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/EnvVar.html0000777000076500007660000002121010463124322025323 0ustar EnvVar
Environment Variables


Environment variables for windows 2000/XP

Here below a list of useful windows environment variables:
ALLUSERSPROFILE Returns the location of the All Users Profile.
APPDATA Returns the location where applications store data by default.
CD Returns the current directory string.
COMPUTERNAME Returns the name of the computer.
COMSPEC Returns the exact path to the command shell executable.
DATE Returns the current date. 
HOMEDRIVE Returns which local workstation drive letter is connected to the user's home directory.
HOMEPATH Returns the full path of the user's home directory.
HOMESHARE Returns the network path to the user's shared home directory.
NUMBER_OF_PROCESSORS Specifies the number of processors installed on the computer.
OS Returns the OS name. Windows XP and Windows 2000 display the OS as Windows_NT.
PATH Specifies the search path for executable files.
PATHEXT Returns a list of the file extensions that the OS considers to be executable.
PROCESSOR_ARCHITECTURE Returns the processor's chip architecture. Values: x86, IA64.
PROCESSOR_IDENTIFIER Returns a description of the processor.
PROCESSOR_LEVEL Returns the model number of the computer's processor.
PROCESSOR_REVISION Returns the revision number of the processor.
ProgramFiles Returns the location of the default install directory for applications.
SYSTEMDRIVE Returns the drive containing the Windows root directory (i.e., the system root).
SYSTEMROOT Returns the location of the Windows root directory.
TEMP Return the default temporary directories.
TMP Return the default temporary directories.
TIME Returns the current time.
USERDOMAIN Returns the name of the domain that contains the user's account.
USERNAME Returns the name of the user currently logged on.
USERPROFILE Returns the location of the profile for the current user.
WINDIR Returns the location of the OS directory



Environment variables for GNU/Linux

To know all the current environment variables in your system, invoke the printenv program.
Here below a list of some of them:
PATH System specifies the search path for executable files.
USER Returns the name of the user currently logged on.
HOME Returns the full path of the user's home directory.
DISPLAY Returns the name and display number of the X Window server on which programs will appear.
LANGUAGE Return set language.
TMP Return the default temporary directories.
BROWSER Return the default browser.
DESKTOP Return desktop currently running.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/shell().html0000777000076500007660000000312710463124214025361 0ustar shell
shell

Starts an external executable and waits for its termination to continue program execution.

Syntax:
shell( { ...pa th/ } executableName )

If executable is not in your system path or in the same folder of your program you must write executable full path otherwise sdlBasic will not be able to find it.

Example:
' next line will start Kwrite on Linux
shell ("kwrite")
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/isMOS.html0000777000076500007660000000313310463124214025120 0ustar isMOS
isMOS

Returns 1 (true) if operative system in use is MorphOS.

Syntax:
variable = isMOS

Example:
if isMOS then
    print("Wow, I'm running on a MorphOS machine!!!")
end if
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Runtime/sectionName.txt0000777000076500007660000000001110463124214026236 0ustar Runtime usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/0000777000000000000000000000000010645354450024442 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/sin().html0000777000076500007660000000253010463123361024473 0ustar sin()
sin()

Return the sine of angle where angle is expressed in radians.

Syntax:
variable = sin( angle )

Example:
print sin( 1 )
will print value 0.841471
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/bin().html0000777000076500007660000000407010463123361024453 0ustar bin()
bin()

Returns binary representation of a number.

Syntax:
variable = bin( number )
variable = bin$( number )

Example:
print bin( 3 )
print bin( 7 )
print bin( 9)
will print on console 11, 111, 1001
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/sqr().html0000777000076500007660000000257610463123361024521 0ustar sqr()
sqr()

Returns square root of number where number must be a positive number.

Syntax:
variable = sqr( number )

Example:
print sqr( 9 )
will print value 3 on console
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/aTan().html0000777000076500007660000000360610463123312024566 0ustar aTan()
aTan()

Return an angle with tangent equal to number. A value between -PI/2 and PI/2 (radians) will be returned.

Syntax:
variable = aTan( number )

Example:
print aTan( 1 )
print aTan( 0 )
print aTan( -1 )
will print on console 0.785398, 0, - 0.785398
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/index.txt0000777000076500007660000000047310463123361024547 0ustar abs().html aCos().html andBit().html aSin().html aTan().html bin().html cos().html CVS exp().html frac().html hex$().html index.html index.txt int().html log().html max().html min().html orBit().html randomize().html rnd().html round().html sectionName.txt sgn().html sin().html sqr().html tan().html xorBit().html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/andBit().html0000777000076500007660000000255710463123361025114 0ustar andBit()
andBit()

Returns the logic and of the operands. Alternatively you can use the bitwiseAnd() command.

Syntax:
variable = andBit( numberA , numberB )
variable = bitwiseAnd( numberA , numberB )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/min().html0000777000076500007660000000310610463123361024465 0ustar min()
min()

Returns the number having the lower value between the two operands.

Syntax:
lower = min( numberA , numberB )

Example:
print min( 13, 24 )
will print value 13 because is the smaller value between the two numbers.

see also max() command usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/cos().html0000777000076500007660000000275010463123361024472 0ustar cos()
cos()

Return the cosine of angle. Angle is expressed in radians.

Syntax:
variable = cos( angle )

Example:
print cos( 1 )
will print value 0.540302 on console
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/tan().html0000777000076500007660000000255110463123452024470 0ustar tan()
tan()

Returns tangent of given angle . Angle must be expressed in radians.

Syntax:
variable = tan( angle )

Example:
print tan( 0 )
will print value 0.557408
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/index.html0000777000076500007660000000377610463123361024705 0ustar index
Math

abs()
aCos()
andBit()
aSin()
aTan()
bin()
cos()
exp()
frac()
hex$()
int()
log()
max()
min()
orBit()
randomize()
rnd()
round()
sgn()
sin()
sqr()
tan()
xorBit()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/max().html0000777000076500007660000000307510463123361024474 0ustar max()
max()

Returns the number having the higher value between the two operands.

Syntax:
lower = max( numberA , numberB )

Example:
print min( 13, 24 )
will print value 25 because is the bigger value between the two numbers.

see also min() command
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/frac().html0000777000076500007660000000246010463123361024617 0ustar frac()
frac()

Return non-integer portion of number.

Syntax:
integer = frac( number )

Example:
print frac( 3.1415927 )
will print the number 0.1415927
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/exp().html0000777000076500007660000000275210463123361024504 0ustar exp()
exp()

Returns exponential function of number.

Syntax:
variable = exp ( number )

Example:
print exp( 1 )
will print value 2.718282 on console
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/round().html0000777000076500007660000000324310463123361025033 0ustar round()
round()

Returns the number rounded down to nearest integer value.

Syntax:
variable = round( number )

Example:
print round( 2.78 )
print round( 2.35 )
will print on console value 2 and 3
Note that value 2.78 is rounded to 3 while value 2.35 is rounded to 2.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/randomize().html0000777000076500007660000000313110463123361025670 0ustar randomize()
randomize()

Seeds pseudo-random number generator with number.
If number is not given, it will use the current time as seed.

Syntax:
randomize( { number } )

Example:
randomize( 10 )

see also rnd() command usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/hex$().html0000777000076500007660000000356110463123361024537 0ustar hex$()
hex$()

Return the hexadecimal representation of value. The dollar character in command name is optional so you can write it as hex() if you like.

Syntax:
variable = hex$( value )
variable = hex( value )

Example:
print hex$( 255 )
will print on console hexadecimal value: ff
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/xorBit().html0000777000076500007660000000261010463123452025151 0ustar xorBit()
xorBit()

Returns the logic xor of the operands. Alternatively you can use the bitwiseXor() command.

Syntax:
variable = xorBit( numberA , numberB )
variable = bitwiseXor( numberA , numberB )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/log().html0000777000076500007660000000262010463123361024463 0ustar log()
log()

Return natural log of number.

Syntax:
variable = log( value )

Example:
print log( 10 )
will print on console value 2.302585
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/orBit().html0000777000076500007660000000273310463123361024766 0ustar orBit()
orBit()

Returns the logic or of the operands. Alternatively you can use the bitwiseOr() command.

Syntax:
variable = orBit( numberA , numberB )
variable = bitwiseOr( numberA , numberB )
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/rnd().html0000777000076500007660000000354510463123361024474 0ustar rnd()
rnd()

Returns pseudo-random number.

Syntax:
variable = rnd( { number } )

Random number range between 1 and
number .
If number is not given, the maximum value may be returned is 999999999

Example:
while not key(27) ' loops until ESC key is pressed
print rnd( 100 )
wend

see also randomize() command usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/abs().html0000777000076500007660000000341310463123312024444 0ustar abs()
abs()

Returns the absolute value (positive value) of number.

Syntax:
variable = abs( number )

Example
print abs( -256 )
or
n=-256
print abs( n )
will print on console the number 256 (note that the number is turned into positive value) usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/aSin().html0000777000076500007660000000343710463123312024577 0ustar aSin()
aSin()

Return an angle with sine equal to the number. The argument must be in the range -1 to +1 inclusive. Returned angle is expressed in radians.

Syntax:
variable = aSin( number )

Example:
print aSin( 1 )
print aSin( 0 )
print aSin( -1 )
will print on console 1.570796, 0, -1.570796
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/aCos().html0000777000076500007660000000323510463123312024566 0ustar aCos()
aCos()

Return an angle with cosine equal to the number. The argument must be in the range -1 to +1 inclusive. Returned angle is expressed in radians.

Syntax:
variable = aCos( number )

Example:
print aCos( 1 )
print aCos( 0 )
print aCos( -1 )
will print on console 0, 1.570796, 3.141593 usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/int().html0000777000076500007660000000455310463123361024503 0ustar int()
int()

Return integer portion number. Alternatively you can use commands fix() and floor() .

Syntax:
integer = int( number )
integer = fix( number )
integer = floor( number )

Example:
print int( 3.1415927 )
print int( 3.6666666 )
note that will be outputted number 3 for either lines: decimals are simply truncated and the integer part returned.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/sgn().html0000777000076500007660000000372110463123361024474 0ustar sgn()
sgn()

Returns the sign of a numeric expression.

Syntax:
variable = sgn( number )

Returns 1 if
number is positive, -1 if it's negative and 0 if it's zero.

Example:
print sgn( 8.21 )
print sgn( -5 )
print sgn( 0 )
it will print on console 1, -1, 0
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Maths/sectionName.txt0000777000076500007660000000000610463123361025675 0ustar Math usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/0000777000000000000000000000000010645354473025351 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/integerDivision.html0000777000076500007660000000332110463123615027626 0ustar integer division
integer division

Integer division is obtained by using back slash symbol( \ ) between two numbers.
Integer division return integer part of division operation between operands,  omitting floatting part.

Syntax:
result = expressionA \ expressionB

Example:
prints 20 \ 3

will print 6 that is the integer part of the division.
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/modulo.html0000777000076500007660000000331010463123615025761 0ustar modulo
modulo

Returns number modulo

Syntax:
result = expression mod value

Example:
for n=1 to 30
    print n mod 5
next

will print series of numbers ranging from 0 to 4 usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/selfAddition.html0000777000076500007660000000425010463123665027100 0ustar self addition
self addition

Self addition is a short way to write the equivalent line of code:
variable = variable + expression

Syntax:
variable += expression

Example:
n=0
while not key(k_esc)
    n += 2
    prints (n)
wend
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/addition.html0000777000076500007660000000347510463123615026271 0ustar addition
addition

Addition is obtained by using plus symbol ( + ) between two numbers.

Syntax:
result = expressionA + expressionB

Example:
print 5 + 8

will print number 13 on console usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/index.txt0000777000076500007660000000036610463123615025454 0ustar addition.html CVS division.html equality.html index.html index.txt integerDivision.html modulo.html multiplication.html power.html sectionName.txt selfAddition.html selfSubtraction.html shl.html shr.html stringConcatenation.html subtraction.html usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/multiplication.html0000777000076500007660000000322410463123615027523 0ustar multiplication
multiplication

Division is obtained by using asterix ( * ) symbol between two numbers

Syntax:
result = expressionA * expressionB

Example:
print 5 * 5

will print number 25 on console usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/division.html0000777000076500007660000000335210463123615026314 0ustar division
division

Division is obtained by using slash symbol ( / ) between two numbers.

Syntax:
result = expressionA / expressionB

Example:
prints 20 / 3

will print 6.666667
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/equality.html0000777000076500007660000000341310463123615026323 0ustar equality
equality

Equality is used to assign values to variables or to check their values.

Syntax:
expressionA = expressionB
variable
= expression

Example below assign values to variables.

Example:
a = 10

Example below check a variable values.

Example:
if a = 10 then
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/index.html0000777000076500007660000000271310463123615025577 0ustar index
Operators

addition
division
equality
integer division
modulo
multiplication
power
self addition
self subtraction
shl
shr
string concatenation
subtraction
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/power.html0000777000076500007660000000326110463123665025630 0ustar Power
power

Power is handled by sdlBasic with the symbol ( ^ ) between two numbers.

Syntax:
result = expressionA ^ expressionB

Example:
print 2 ^ 8
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/selfSubtraction.html0000777000076500007660000000450010463123665027640 0ustar self subtraction
self subtraction

Self subtraction is a short way to write the equivalent line of code:
variable = variable - expression

Syntax:
variable - = expression

Example:
n=10000
while not key(k_esc)
    n - = 10
    prints (n)
wend
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/subtraction.html0000777000076500007660000000346110463123665027033 0ustar subtraction
subtraction

Subtraction is obtained by using minus symbol ( - ) between two numbers.

Syntax:
result = expressionA - expressionB

Example:
print 10 -  5

will print number 5 on console. usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/shl.html0000777000076500007660000000431610463123665025264 0ustar shl
shl

Binary left shift, this command work on the binary representation of number , it shift bits by the indicated amount

Syntax:
result = number shl amount

Example:
for n=1 to 8
    print 1 shl n
next
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/stringConcatenation.html0000777000076500007660000000571210463123665030513 0ustar string concatenation
string concatenation

String can be linked together with addition operator + or, like happen in php syntax, with the & operator

Syntax:
result = stringA & stringB
result = stringA + stringB

Example:
print "sdl" & "basic"
print "numbers" + 123456
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/shr.html0000777000076500007660000000437710463123665025301 0ustar shr
shr

Binary right shift, this command work on the binary representation of number , it shift bits by the indicated amount

Syntax:
result = number shr amount

Example:
for n=1 to 8
    print 256 shr n
next
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/commands/Operators/sectionName.txt0000777000076500007660000000001210463123665026603 0ustar Operators usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sectionsIndexFeature.html0000777000076500007660000001446110463122141025040 0ustar sectionsIndexFeature Introduction Commands by feature Sound and music usr/src/sdlBasic/share/doc/sdlBasic/english/sections/introduction/0000777000000000000000000000000010645354551024310 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/introduction/whatsnew.html0000755000000000000000000000634510644532472027044 0ustar rootroot what's new
What's new in last release

Changes in current release : Actarus
Changes in current stable release version 20051016
 
 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/introduction/changes.html0000755000000000000000000000703510644532472026611 0ustar rootroot changes
Documentation Changes

changes from previous versions:

Actarus
documented command: setAlphachannel()
documented command: triangle()
documented command: polyline()
documented command: polygon()
documented command: waitBjo()

version 20051016
documented embedded code added license section changed kind of numeration for documentation version to align it to sdlBasic style added debugging section added stop command page documented new features of version 20051001 ported all the documentation from pdf to html documented command: argument$() documented command: spriteZ() documented command: bobZ() documented command: screenZ() documented constant: dcbasic_date documented constant: dcbasic_version documented constant: num_screens documented constant: num_images documented constant: num_sprites documented constant: num_bobs documented constant: num_waves documented constant: num_membank documented constant: num_numsocks documented constant: isOpenBSD documented constant: isMOS documented constant: isFBSD documented constant: isNetBSD documented function: self subtraction documented function: self addition fixed description for flag value in screenOpen() command documented command: loadZipImage documented command: loadZipSound() documented command: loadZipMusic() documented command: getFont()
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/introduction/note.html0000777000076500007660000000335410463126107024400 0ustar note
Note

This is the first alpha version of sdlBasic reference guide, it's still incomplete, it lack many examples and some parts need more explanations.

Some section comes from wxBasic documentation because sdlBasic share the same core routines, I've adapted it to merge into this guide. WxBasic and its documentation are written by David Cunny. Most command description came from original sdlBasic quickHelp written by __vroby__.
As you can evince from reading next pages, I'm not native English speaker, so, I wish to invite all sdlBasic users to read and debug all spelling errors, all wrong (or simply inelegant) sentences, etc... and report me at the following e-mail address: zoiba@libero.it

Many thanks goes to Matt (and his wife) who sent me a detailed e-mail containing all correction to errors he found on previous version of this document. Thank you very much Matt.

zoiba  
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/introduction/introduction.html0000777000076500007660000000553010463126107026152 0ustar introduction
Introduction

sdlBasic is a basic interpreter to write 2d game, it combines the simplicity of Basic language with the power of SDL libraries.


sdlBasic is a cross-platform software; at this stage of development it run on Linux (on reasonable recent versions), Windows (9x and NT-XP based) and macOSX.

This basic is the evidence of GPL license power.
Basic interpreter is from wxBasic by David Cuny (http://wxbasic.sourceforge.net) distributed under lGPL license, SDL graphic libraries too (http://www.libsdl.org) are released under lGPL license, the graphic engine was initially derived from the game "aliens" (http://www.libsdl.org/projects/aliens) written in C and distributed under GPL license and then rewritten entirely from scratch, putpixel and getpixel routines are directly derived from  SDL tutorial and then improved on suggestion from Gigi Davassi, line routine was extracted and adapted from Alvyn Basic source code (http://alvyn.sourceforge.net) with the permission from the author. I also used the source codes of sdldraw library (http://sdl-draw.sourceforge.net/)

sdlBasic is obviously 100% open source, as all other software named before, and released under the lGPL license.  This means anyone is welcome to download sdlBasic at no charge, in addition   the source code is available too if you need to make special changes.

This documentation is covered by the GNU Free Documentation License (http://www.gnu.org/copyleft/fdl.html)

Developers are welcomed in getting involved to help us in make sdlBasic better and better.





 The sdlBasic Staff   
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/introduction/introductionIndex.html0000777000076500007660000000174010463126107027141 0ustar introduction
Introduction

What's new Introduction The future of sdlBasic Documentation Changes Note
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/introduction/future.html0000777000076500007660000000410710463126107024742 0ustar note
The future of this software

Unique real risk for this software are laws. Excluding radical changes to current software laws, this program will endure for much time. In proprietary software programs life is rigorous controlled to sell newest version and to continue to make money. In free software a program die only when nobody use it anymore. Look at Emacs or vi, they are twenty years old software: how many proprietary software are still in use since that time? Therefore sdlBasic, who can survive without me, is destinate to live for a long time. So, what new laws may prevent its survive? My fear is laws on software warranties. I can't guaranty sdlBasic functionality. Well understood, if you point me out some code malfunction I will make what is in my possibilities to fix it but a warranty imply a refund so,  I will have to pay an insurance company, a cost I couldn't afford because I don't earn money from sdlBasic. One more obstacle may be palladium, that is a particular hardware configuration who disallow uncertified software. Certification process would probably cost much money and I, of course,  couldn't afford such expense.
In conclusion, must say I fear software patents too: if someone will patent parts of code or algorithms I'm using in sdlBasic, I may be forced to remove such parts who may prevent sdlBasic from working.

__vroby__   
 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sectionsIndex.html0000777000076500007660000000325310463122141023521 0ustar sectionsIndex Introduction Commands by feature sdlBasic IDE
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/0000777000000000000000000000000010645354562023737 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/buffers.html0000777000076500007660000000276510463126213024517 0ustar Buffers
Buffers

sdlBasic editor may use up to 50 buffers each containing a project file. Simply click tabs to switch buffers. When you work with many opened files the Buffers menu can be used to switch between buffers, either by selecting the file name or using the Previous (F6) and Next (Shift+F6) commands.



When all the buffers contain files, then opening a new file causes a buffer to be reused which may require a file to be saved. In this case an alert is displayed to ensure the user wants the file saved. 
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/toolBar.html0000777000076500007660000000772710463126332024472 0ustar toolbar
Toolbar

Here below you'll find a brief description of the Toolbar commands.

new New: create a new empty project in a new buffers. See buffers section for more details
open Open: Open, a previously saved program, from disk to a new buffer.
save Save: program in current buffer to disk.
close Close: close current buffer, be aware that unsaved programs will be lost.
undo Undo: Unmake changes made on text
redo Redo: Restore changes made on text
find Find: Open search window dialog.
find next Find next: find next occurrence of previously searched text.
replace Replace: Open find and replace window dialog.
toggle bookmark Toggle bookmark: Set a bookmark on current line.
previous bookmark Previous bookmark: Jump to previous bookmark.
next bookmark Next bookmark: Jump to next bookmark.
go Go: Save current buffer program and run it.
stop Stop: Terminate current program execution (if any).

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/keyboardShortcuts.html0000777000076500007660000001776010463126264026611 0ustar Keyboard shortcut
Keyboard shortcut

sdlBasic editor, as SciTE, uses the default key bindings defined in Scintilla, so keyboard commands mostly follow common Windows and GTK+ conventions. All move keys (arrows, page up/down, home and end) allows to extend or reduce the stream selection when holding the Shift key, and the rectangular selection when holding the Shift and Alt keys. Some keys may not be available with some national keyboards or because they are taken by the system such as by a window manager on GTK+. The user.shortcuts setting may be used to assign a key to a function. Note that Home key behaviour is changed by the vc.home.key option. Keyboard equivalents of menu commands are listed in the menus. Some less common commands with no menu equivalent are:

Magnify text size. Ctrl+Keypad+
Reduce text size. Ctrl+Keypad-
Restore text size to normal. Ctrl+Keypad/
Cycle through recent files. Ctrl+Tab
Indent block. Tab
Dedent block. Shift+Tab
Delete to start of word. Ctrl+BackSpace
Delete to end of word. Ctrl+Delete
Delete to start of line. Ctrl+Shift+BackSpace
Delete to end of line. Ctrl+Shift+Delete
Go to start of document. Ctrl+Home
Extend selection to start of document. Ctrl+Shift+Home
Go to start of display line. Alt+Home
Extend selection to start of display line. Alt+Shift+Home
Go to end of document. Ctrl+End
Extend selection to end of document. Ctrl+Shift+End
Go to end of display line. Alt+End
Extend selection to end of display line. Alt+Shift+End
Expand or contract a fold point. Ctrl+Keypad*
Create or delete a bookmark. Ctrl+F2
Go to next bookmark. F2
Select to next bookmark. Alt+F2
Find selection. Ctrl+F3
Find selection backwards. Ctrl+Shift+F3
Scroll up. Ctrl+Up
Scroll down. Ctrl+Down
Line cut. Ctrl+L
Line copy. Ctrl+Shift+T
Line delete. Ctrl+Shift+L
Line transpose with previous. Ctrl+T
Line duplicate. Ctrl+D
Previous paragraph. Shift extends selection. Ctrl+[
Next paragraph. Shift extends selection. Ctrl+]
Previous word. Shift extends selection. Ctrl+Left
Next word. Shift extends selection. Ctrl+Right
Previous word part. Shift extends selection Ctrl+/
Next word part. Shift extends selection. Ctrl+\

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/0000777000000000000000000000000010645354565024516 5ustar rootrootusr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/filesave.png0000777000076500007660000000267210463126333025255 0ustar ‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ ,1>½ž=GIDAT(Ïí—MŒGǯª¿ffwÇ;ëµGql%Ä1±XHd„±&À K¹"å‚Ä-ˆ8pâ–Nˆ#\AbO pàPaR,dpŒìdíýÞǡ{¼³ÛŒ‘ÀZju©?ªõÿ÷ª þ<åC¼qõêMýÖwþÌõmƒ(hðOõèË:¾£íú‘‚ݦãûß[áÕWÏËc.~ég:wù+¯ç¥øï&8"BÐú„ ŠªZw0Ý6Ïû7·øíà“Ü[²ûów¸öÞkGþ=pm#åÍKˤ /¶<Ï/$Ây¸³q‡w®¾ÍﯽÇ(ñ±îY¼z£/Ÿý_øô%ž;yŽØÄˆT0Åþ]þð÷–—7Ò¬®®ê•+Wä‘Idpe%MP¡t/à=\¿}ƒ÷oý…½|›þAŸµ¿ÞÁϱEOgtƒ[½¬Í|Ú%‰",ž@Ľõ56û»Ä¶úï$„yÀ%(k ÖÖ€1ð»ï²±¿Ž¢DIDPÇÉnÁåËžÏ^Üaý‘ëwÅÛ¿®ú ÞÑ=sž?õ9P?eÂh 2R*`>Ú»M’Æ8_B McNŸ†•Çü\`së}~Љ3Bø2+X[÷ýo¬ŒmÖH}Ï€"Z­Y–±°ÐÂÇòr4ÝÂØÀÒ’C;ˆ@È«0cªxŒÌ`¤R Ô ŒÅ8Õ9ÅÖÁ&£bD§ãIS¥ÙŒ@±6 TòËxu8¬™ Îc;¡™_}ù+¼{ý7|°~“FÃÑh¸JÖ`1º@ìÏûçM:02£µ*ýâl÷,k»kìöˆ¢ÒDÉ¢„gh—ÈÊÏ þ ^Æ!C€™=  ÈáWíV› Ï_ ‰>”,ÎÇt^¢Ë dzk:xÀKõCU‹µæp@O¢€i hÁT1Vey®ÍsK§(d‘ã óœž[!+—±D„ÐCƒÖ'”ÁÈì LzàŸû);C‡  JЀªÂŽEß ì)ÛSTu‰¿£ ž’%T„˜= oÿ#E%­d Ü/.AÁO´ƒN<¯'!À•Õ;âlÖ,0•.Thí¶c¸#vׇ_ÛÂþÐb¬Ð~&†H¾*d3)`«”®FgÀïùî÷8ÖI*Y'gf9:­F¶v¯¿•Òw óÇ#L,•Z3{ 6¡×jJbåô³ KK ë@`˜Û‡..¢HH³K!qLšð$u 6¡œWF#ÇöNŸ·~í¹’¢|À yQ2×jˆ¡/‡ è¤@-áhäPšiLáEî¥; à­çŽVKÈ"¹0ΙëiæƒRä%Š0Èä¥!ÏKò¼œpV(Š’¹hbX+k€qe•'HCª)8¥?(h¨áõËëø h€ƒ~1åk„Ѱ`®)HC`ç¨ ãY@ÁÎ×õÀ);Û=±Œ×>ï`X66 ¦á…ƒAA«%D-CØJ_”²‡Ä``8 -G´3¼‚k[Nœhqâä·Ǯñ­5llõXnÆdmÃâ>¸¸ý³ ʇÞâÇ|ûóüàG¿ í.VæüðO÷ˆãjV{ì&C (•^¼‰"dl››û\|e4 êluuUÿ›;¢G®ŠŸúÖì¡ÂäÆä©ÿöàÑÁVš IEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/togglebookmark.png0000777000076500007660000000347010463127015026461 0ustar ‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ /¹,4¾ÅIDAT(Ͻ—{PTçÆçpYd]E¹n¼ DÀ ­A°Ū)b QSk­¶bÌ/Ó‹M&ã˜ÄXüQccê-xÍxC›–H¨Š" \”EÙì²ìŽœÝ¯lª5 ¥}fÎ|;û½gžgžy¿÷{ŽÔÖÖÆã`¯Ü%’çKü ÿ燢ӦãÂ߀ýóÍ6»ª*]Áí2à;x$naî´çq»{E€ï}²ë§Åç^®pœc×K¦bz!àäKBŽI¢½ÁŸì•R¯9`?ÿ'Tiiôˆªú VoQ@°—üËÑwÎ,G‡á¶µörLù5¶²“h&Åø÷…¢îKü›Î¢ªÞ(úfOÀrú"îg_î]‘ R•Ï|¬%Çœ>ƒàœ4‚3"ÑdÄyÉËÊ©´N!0zX¯œ Y8mx®Ÿ®ŠÂßGær¹[ñà—4øf`+>B“~$µ±à´ ÑZ#„ÃúTÇAjÙ»^GßßoúQò>ªaq ’€*°¶ã¨©GñEQ'!ä@p;pZUȉO솯G8QKy à!$=XÕU¨Æ¦  Ùû·¢ ;%!G$ö˜ðÃÚÅoªG‡S#5\(þ.=öš˜}‚‘-:´òú/|48`ÖcÚ¹›&g<„Ä_P4DŽÅWÔ­vÅ΂³ D…«’¬¤‘T462jÏh|ÕCS½g>. ¿?MÍK¹^r«ÔUÞU3M^.Î.3}µ¤( ¾]ºÖn‰×*V£̆´©TÚhûÊD¨_èͳQ8>[%žÍG‰§­ÓÎݘvîÆÓÖ‚<(’ä…£p–üV8,¦n›Oñ(ä—ýDT­aFÆH¶üà9ªÛ |º¿’Ii./| @mm&bz rX$ž»-Ü9«`‰[ì˜Êr ÏÝä°H§á_ùñcÉ5œ#?I7¯óûY“Y?:‰½ ìØWEÚ™D¶lØBdd¤t_€³êrH]3Ww~…kÂÏqÊ}¼î„â—ñ+©®ÄŒG׌‚³õò#É—”®K/¼FÆÄhÞ›6‘œÐp¶Ü¸ÎGû/3æó!l{kaaaÒCw9:‹Ú¿ŤŽçÕ~÷¸ö·)l´Æñ³ì\ô÷‚sÖJeœ+‡âž‡ú[ħ›Î‹'Ö¢ÒzX5+…éÑøÉÞ¯«gWQ ñÇ#ØþÖV¢¢¢¤N—Ñ ä,‰ä,×þ¼SŒ{.’~ÇjÁ£6ð>IÊê=]vü«%ëÅaÝqÒÓÂx99xu·•¿Ößb÷¡z´%Alßð±±±R·×±ÆŒ¯Yâf¶–w7mfÙ¡s´»âV•Hß>Cœsœcñ̬?žXU8ÅÎÞ›·ùôP¡GUl{ó}¤åu“–s±ÒHÐÁØã§øâîº}üâ6ãúó£Ä$ÂýžÁªÜÃ%¬(’‰3ºZŠJ;péyû—o0uêT©Ç‘¬+¼˜ôCöTîçÂðr&ÈbZt&Cƒ¯ í£E%i0::Ppà–:(×Õr¤Ôƽ"XòzÈ» ¥K³ó$¥±/§kê¹ãªGqKÄŒÀ­øbt°¹­Üó)×]§´Ô…µHÏ› ^!''GúΉ¨+ø0mhW/*\i¯Æê6apè1¹ŒX]l#_´ÖQV*0}ÖÆës“››+=Q${–Ïš'ÙkûòzF¥³ËŒÅeÆê1pñî N÷ÁP¤§`ö<òóó¿s0éV@H¿ ÒÃÇPwч–F,Jf·KúFΕ`(2°lÚL-ZôD©HîIÑŠ9s±]Õp­ÉL‡h¥ÆØÂ?Oôçë"# 23Y¶lé“G²žÅFEHÃÕqâÖ%þAmÔŸz†¯šÈ›˜ÊÊ•O•Žåž¾2o6ÎË¡ÔÇc(²’“2‚ÂÂÂÞû2êc†‘2Ãb°¹ÃäD-ëÖ­‘dY~ZþÇOÂÿþ ºþÎ8ðʧIEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/snapshotFolding.png0000777000076500007660000006031610463126513026620 0ustar ‰PNG  IHDRÀ½‚™¦lbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ  µþN¾ IDAThÞìwœõùÇßSv¶ÝÞ^oÜppÀÇ]@@¥ˆJ šhÄ€1D£!ö£FSŒ%F=¢¢‰½a¡Št¤sp…ë½ííîìî”ß³w€ Ið“ß}^¯ym››{æ;ßù~¾Ÿçy¾ÏSþÑ|õÄÅÅñÚk¯Ñƒô =èÁÿȇ˜7o^O‹ô =èAþÿ`kkkO‹ô =èAþ_@ìi‚ô =èAö =èAzÐC€=èAzЃô`zЃô =؃ô =èAö =èAzÐC€=èAzЃüw@î΃¶<‡kÄ¥ÿS ÔhçµÕ¯ñϵÿ$ péÔK¹tšuŽ%µ%\óè5Ì?‡ &]€×ííéQÿ&Ê*ËxáÍX¹{%Ëÿ´ü¨ß«j«è•ÖëêœÛÚÚøÝÍ7ÓT]ÍÏ￟ÜþkÏåœKfSQUÁ#÷>Âäq“þkÏãwÞáã?Æn·“ššŒËé RUUC}Cýû÷ç¶ÛnûÖÙ½zõjÞ~ûm4M#==OŒ_‡ŸŠòJü£FâŠ+®èhþ„ÃK¡}“…ðÁµ#yHu=¸§]ÿ_ß0jËV.ë"¾NŒÌIG°ƒ¼ì<Æ ÃÍOÝ €Cqpþ¸ó¹pò…=Dx ,ÏIÆéëÅ“¦ð®QO[¬hùèþŽÚÿòÛ.§Wr/®øÞ¤§¦ñÛ '"IšÆâ5kþ+ÎÛ–-üyñbÎv»©.-E[´ˆë–,ù¯¼–+×­bÎåsðü<ßš¸{ÉÝ\µð§ÿUç°eËžzê)FŽ(dÌèBœ./m~ðù50Ã8$-ìã‹{yó­w8ãŒ3¸á†N¹ÝûöíãÑG%è`Æõ•voÛ¾›wÞý€ .¸€ ô @'Zê‘&ä>ƒÑ7ìúŸh˜¢º"Ö•­ÃÍ#¾ß¼³Õ+÷ñƺ7º¾WÃ*/¯|™7ֽѣ¿<[ÍM$7×AR²ƒöÆ;VÓ79‘"§Õvl/|M[ eá2VÝ³Š±Ùc9»p"ÎÒjšŸ}–‰ññÄÆÆRÔÖÆcgœÁ•+V|#ûvïÞÍøñãOX%¤Ÿ|’÷ÝÇO®ºŠ)—\ÂÎ<“f]ÿ¯¿®~ç!öžQÄ­—ßÆÚ kùÓ½ŸÐíÿ§»¯ÏOÿ|ý]¦OŸÎ‡~xÊÚû•W^açÎ\íO©¬ü*mØd›]B Fhóùõz†e9¹ã¶þñÏw¸è¢‹Xºté)³ûàÁƒlݺ•úúzÀD!Ñ…"¸cb8p 'N<évíÞ½ûøPÛ÷)žÀK„µ ôÑwXßu4}¨o¬gÁusiŽ4óñÙ^l9# TÇàœ~= M <öÒcL?¼þyÄÆÄ~;¥1ñññÄÇÇÓÒÒBMM Á`ðˆ}LÓˆ~ɳóó°÷vƒ €(É ¤¹4~ÿ«¡Œ•Öíí¸ë²yô`#spoì…Sq—3bÅ ŒúfŠz{)>XÌ#/>Àâ‹Ó¯w¿®¿—œ_”­£}Í*¦vØéõ’=nJz:ÎmÛÊËylêT®üè£o]jkkã±{î!´|9xæ²f΄ââÿ™‰nÜZxSß?“³nœÆóÎ乇Ÿ¥phá·Öæ'Ÿ|UU¹îgW²§ÊEÏÁèÓôI“ð8 ¬›´«YT7Á`sñAfÎ8›øø8N?ýtÖœ¯Ã²e˨®®æ†%?cÃ~ËÜäy˜2U É’aZiì«ÈeÕúz6¯ÛȬ™3ø|ýzÎ;ï<Þ|óÍ“jsCCË—/GLò‡¤`ØP:ªŽi„± jgçî¼÷Þ{œ{7îÛ¯ý«ÿDÒ•³°;œ´¯½cØÍ¨íM–2jª§EháóRIœw>¨A*·nÄÕÖB(bWé.j5¬Ý½–qƒÆ1ãôäõË#Öóí"²š2êëëIJJ:‚«ªª…BGíÓ§Ãg€ÝvP»×¦koÜBÌÔIÌ/Lb­Ži 2†aF70L3JÌ&B1ù^@DgGIkùÔÕ¹îŽ÷XýN÷àÊïL¦¾›ìa¹¸¦\Ž4l:¶Ú224‰+>Á¬nÁ®úÍ4¯Ýr}þñr'&¤[m¬5úÖF8½Q£Ðá"sÜ8Ü燔”„œœÌ°+ÊËùÓ´i\½|ù·¦ÿì/*â‘k¯eŒ¢pÙ[oáÊο¾4‰úoFĈÐi'Ï;ˆìeü3gpæ…gq÷/îæ'—.B–åo•½[·n¥ººš%?_Ì•1Ôúu’’*q9㈱§ãˆz#tÓÀ0"Ä{à‡ßíÏ΃xõÕÌ.( ®¾… òôÓOŸ4»8ÀöíÛ¹ù†Ÿ³ªÈK©/–93ebàA4¬<¢ƒ`@v:|oN vŸÃ«Üe÷Í7ß̽÷Þ{RlÞ±s'«W­âœg!:RY»KÀ´“–ìÀí”ðù5J«Úñ5W“—ᤰ`0o¾õ›6mbñâÅ'­m¥œá3î¼ðìBªúïØ‘Ä¡Ø6?‹màìÙqŸü±t1“Æ£}ò!Ó ÓöýïPõú‡Ü¼²Žö ÙQ²URÑm:%õ%¬Ý²–²ò2dQ&%)›l;å7Ê-ÏßÂ?Wý“öövššš§Ó‰ËåBÓ5:|GßìÙð£ÁÀÐyÏW”9ð˜£p(Žî³ëÏÕ\ôÓáÄ)ùÞ6&M$;ÅIf¢IhdýÞ×yoÝ“lÜýmíEW­egñ‡8l Äðþ™ Ȉ¥_F 9é1´ÔW±³ÁÝ­²w—ʰ´=ôéÓ§{Üž9ñôKi¦Ïð\“ 9ÑáAr' '¦#·7ன@nRñË6|.šMD”EÕF°CÕÉ©R_f¬-†ì±c‰=÷\lÙÙŠ‚¢($øýá0Kœ —þ窻¡¡¬¬¬»ÿÿ+ücÙ2žþñùÁäÉÌàlD"CSë^y…ÍÛ¶ñŶm4‡Bä ò_Ax/¼ú÷=r??õ0!=ÄôKféîEÈabòãá—Ñršo{€Š² ƇÓéì%Ñ×çÎ;ïäš«Q£&°¥ª›£‚_+ɱ‰¤Åy±Ë"¢ Ñ Ê¨ii#¤ $ʼnÄ÷êÇÇ«K˜::•¾ñ………dddœœñè–[øÙÕ?¡FÍb[“—Ó†KºEzqksØ@!æ øTHH[RëÖígêèTž{þE&OžLBB µwçάûì3æÿàvV'óÉ^/C¥0c‚‡‘ƒœ êmgp'CóâˆMËbCiÛw×2cBoÊÊJY½f-§Ÿ~úIQ¨ÇE€RLÛ*Ľc`.¶°ÇšHé½IŠÓè{ötKE½úW¾\L© *[*Ù±=€ H²„ h’ÆÁƃ|¾ýsöí߇")¤%§!K§nöøá¾ñz½D"ÀD¨ë:&%Á]wI|øô³*~÷ì›6?ù½Gv‹]½Pɨ©¹`@¦½ƒ^IN4SBÓaóþM¬Þõ ¾:Ú;Z)­-¦º¹”°X‰3¾ o<8¥>˜¦ Ã1tâÊ&–ï PYWM¸ÎààÁƒÝB‚ÍOÝOîp7îüiHƒÏCPb4 A×câ°Å§bkoÆU]‰Ü¬Ò„Ï%£Ù$kÂÔé[`\…ÊhÉIï1cðΞ’•…`‘¢Ûâóáìè`_{;£~ðƒS6À¶µµñøþÀ¾äÖ»ïfüüù`ñunã/½” £G“P´l¾ï>ÊZ[Éî×Oì·/$pïC¿á’Åóy}ÇTM©gîóøë¡—;UW‰BFUW›6†‰NâׯÝÃ'/}̈üᤥ¤r|ÿý÷qǸR0š×¶”¢É Ôºa’›@|L ’( ›à éì«®bM9>!o øl¹´ÜN¿¬žxò)æÏŸÂÛ~ݺu˜¦ÁÄÉÓygŸ‡Þ}$Lt$ºÀ¥õð@{š‚à€?®h%_ÅôÏNà•e¯2wîÜfocc#o¾ù& /½ˆÕûã8àK`Öd'9©^»e³$‚&ØìÐ/×MÈ=€ÖV3iX ÛwìÀçó1xðàN€ÿËD‚¥5Õ ˜vÖ|XË™ÒÛ¸fÍÆV`ùnmãÀ„À»o󷫈Ä؉‘…õ ‚„(Z®QAC4PM•u?cÝœS}&ߟyN»ë”Ýôn·›þýûã÷û©©©¡­­ŠŠŠ#ö±Û­íXˆ‰Y³U Îx‚?î›DÑÄ0Á$ID¬˜Þº¢U4´×cb"+2ÁŸô´§Ÿ9ýZPÙ[O’'“ÜäéV Q×HËÎ'Þ&°~ýªnm¿ mõ*Žš"lÕ»‘2 A’±¢« dôÇ;ýB UÇX¿ó` ÅÙ1&ô­0®"ÀS!kÌp¼Ó¦¡¤¥!î~ŽD0*+ Õ×SçóѤª§¬¿ì/*â‰;î M ¼ø"®”Ëåiš šæï³23ÉÊÈ`Êœ94îÝËÏ<Ã=¯¿Î”_þ’¹\ð­ ¾•ëV±ø–ÅT¸«˜þÀL°2=%A¤5Ü}/u} }=}øä¯1ýÉs8ÿGs¸gÉÝ\òÝKNé¹¼ñÆ\}åål©h¡Qm#A±Ak†NiCCÇc·áP¨š@m{­ÍP©mmÃíô’–ÖE™ é壪ªê¤ØýÊ+¯pùÂK(nv¡9dta°IÐ![„ç²YŸh[äŒ@H·â‚}û{ØYbÙýâKˈD"Øl'ÆÓöÎ;ï0çÜhJ 8àaÜ‘ˆjD‡•{Ö«$BDƒöäö}ú>üðL=s"O>ý'N$55õ„¶ïD€¡Õ%.£w²LÀå#­©‡Úî8 Ä/ÀߊÔ+‹™sâ÷7ÓÒpHûKj)1nxYq8 +K"/O%â_MD[xJ ðëˆÐãñàp8Å&,::gœq؇n ûˆbt (‚)€dBu[ŠÝ†¦G0 »ÝFV ªá‰1hl*ÃÏ2D›Ã˜Žˆ’€$X³1±›K"œ¶¯…gõcئͤ…@®"e C¬ë/öŒâ¦-¤3lÃFÌ’&UG4 kê½Æ×I~‡œ©ëèåå·l¡¨¸˜åuul©¯?5ƒ÷ÞãÛoçûcÆpîwZùeò3Œ¯|Ÿ”–Æ~ùKNÿôS¿ãŠ6näÆßþö”öûGŸú3·þþVnH㯳žÀ!Ùi‹’€M´u %?I#Ä·/{{òîgñ’kX»ñ3»ÿϧì|$I$==ƒÛªPì j Gïƒ Ôµ6c“%dIBì´«~Bº¥´4CC4¨Ÿ•‹ZWDVV/Þ{ï=fΜyBí¤§g°¹Í†Ó!PD°E»Xdg—¡-5>hU-â ë C—Ýi©)lÙ²…±cÇv»­ååå€Ij¯þ|°ÉMß¾"¾ 6ˆ‘!l€#ze_P³®EGR’!>EeK3j8Ë–-ãꫯ>êÿTîßâp’•ur Ð0CØG<Úßùu¾º¿À>b$ãGÀøÎŸ5[~þ(%¡#t‡23aØ0ÈÍ…ôt‘âÍ‘¯$–ãŧ›ëùðó:öU(o #£i&Œ–¸j^?âââ$é+ÿ^QbIIKÄá„PÈM‹Ï°ó»EÚ LöÏò¡8DQ817±Ð™ÆB—ú“0Ed·ÛÃá 6Ö(j$'û°Û›%ƒÄD 3¡A#duBQ1LÝèN“kêjxü©h‘ø«‚Œl!EÕp bë• :Ò2IœrfØDß´[q "¹‚LæØÑ$N†#9ùHòÓ4"ååø¿ØFqy×7ñIm-¯í:ùKp¼çªž{Ž%W\AáôéV¬O×Mxÿb8b÷ôêÅoï»_TWóû^8%dqå ?å¥^â¬Çfpþ€Ùµ !=ÔEtù <›(¡m¢ Q¹nôb&¼|÷]÷vž¿“Õo¬:%甘˜ˆds¡‹±‘f  ™ÑMBš† hVÿ2]žL+¶¦H`j>RÓ’h«HNJbÇŽ'œl."‚D¢ËRu!Ý"U³Ô^£DÁú®#l“iZ6»làQè²;%9™½{÷ž\¿~=£†ç¥V1¡YgTu+2„4hðC³j)× v´Z}û½Ž ÀŠ={ØñÑrê7¯C%0pÊTú ~rPÏ>“ú ÷~ÈŠ½e¤; Ʀ´à½ô"ð|%Á/À×HÛsKÙޒĺúF‚Nƒ!±]µhÉ_§22`øp4ÈŠ§ÙíÖo¦`Òáï ÖÒ-æúGw°«ÎÎô±9 é$)Þ7ÖNGÄইÖàzæy¾3ï»ñRÞ¢¡9‘PØADsaš.l²—݃Çí"='oŒX·‚'V&£—Æ–Òk_{šþýB¤÷±ãpž£îÎNh§ç_¡WB/š:QÃ* :v»‰ËeCÀD’dDL¬ñVè$Ñèø,u£¼æ/×И¡T@«ib¬¶“tÕÀÌWQ2†"Dc¼àHÍ qòt UGÞ¸A’É3ŠÄÉ“-ò;Ìíijአ:¶o§¸ªœur ›¼.fÍ¿ö” ¬[^z‰-¢pÌhj²ft‡ aùù«~‹¾º…;o¸?=ô¿¸ä’“N‚÷>ô^úè%Nÿ활ž=žÖP+¢ v‘Ÿ(H]d' "’ !F~¢ bm¨zIÑMƒÜ¸þ,}~)Íû>K_YÊE^tÒ¯“bW0Lðx\Ä E†"„#ºi‘F×ìR°jY´T¢M›hÅÚbÝ2ͦ€M¶áóùN¸Ý²,c˜`W¬xYH·ˆ/¬f€ª[›`ZÞ ‹ø ²µy·Ûvâì®®®bʧ¥Vut“h|ÕR«jТZ¤:†ZÕµ¥¥¥¤$'Sºy3›—½D¤ªœœXÔWppÛZvïA¼î:úæçŸxŒÉm Z¹ÓøëÆ9ܤØð\0$Æ¥¥ (V§Å£]?´þùKû\6w.¿}æ~{çüòÎ;Oʹ¼õÁ[üî™ßQxÏFöA[¨-Jhò(‹rWÌOeDAŠªÁCDÒõ ½=YTvTqÇõ·S“OVF§ÁP-Âãt!ˆ.»`X# †…"hÆa‹eë~¢¨Ø ÆYé.š[Bf°ƒÄÄÄnw @‹„p)`WL„ Š,É6šnIË‘;ãj¶¨bU¢c Ëîöß ³[×õ¯U«Á°¥ø¬Ø«õ]@³ÆŸc©U‡ÝNÑŽTÚ)ýôŸxÌ6²gL¡oJGÉG$¯=ÈÆ-Ÿ°ãõ¾xSRH8Žxáq¥Zªí-ÜœØÎÌÅóS20ªñ½úÞ+ÓöÜR<ßµ¾?óÊ ,ºçyžP=芌Í#FÀ¤IšzhŒ8j w ¬Ø¿‚U;60aÈ0n½âþotaLA`KµI¦.à” Á}b!FQ³qλ—íPŒ­¥#†°.ÒÜÞDH·Ü ššŠ#‚Ã&ØîB3¬™˜)iÏ ­i+‘ÙµÐ¼Û 0jŸa‚$ùú§õ§¦µ†ö@²Ü]1qÈ N²ñFFàˆŒFÐ3ÀPÐ…N¨pˆÅî´SÄårѧOÂÔÇ—³b› £ªŽ±»÷’Ôñ QQRû#F—½X$˜Fꔩ¢ˆ’`‘_” M#T]MëΔÖÕð¹ÓOË•œY JƒÉ&±/´–ÇW¯âWßýô¤ ¬sðâRSyð¦›(Ú¼™7Þ»vAMMgðÉj\A84RY£Å!Òë-ú>¬[9’θ4Ú›!61u·9‘u>ŠÞ¯Û ‰uCb†Á°˜V2M’c¼ôIìEXˆ')ÖCVÌP‘d$d Çi˜Ñ "††MÔ¡Ûà±&4ÎÔ˜6’½c·í¥ð@1ªNÜ 0Ž”>ˆ_‘€dhÁÚZZö졸¡mñ!ZFëô=ÇNÎ'®‰;î°ýžJdggóÇ¥Kyè¾ûøåOÊ5×^Ká„ °q#´·¹óÂ…‡I“¨¬´È²¬ì¨ãŽOKcÍ_ð×dѵ'&ιrÝ*^zë%úß}ìuW^G,ƒ“ò(LÆ ïÀ®ïÿ¶÷j:jØwBÆ8"†Fþ¼aôkë˯ÃGžž~J¯ÏÂ… yõÕWÉ/N¢;…vņ,Û0°I‡–r²A¯tHN›Í"‡Ô›­{B(¾ƒì:P̨Q£NŠÝ ,à‰'ž`H~è*)ùLXÄÛ»þÁ‹«÷pfÕ|ÆŒ™N\\¢¥ª:l” ذ«¶Ëî)S¦œ0[ívG—Z5% —-*0¢Þ³¥VC£­ª‚o?ƒãÀÇÌ©3bÚzâHH£»o7ºšK‘HÃð‹ÍöVÄãLb8¾RhÙÓùÇÝwSb&°¿wDÀÞaM»ÛU´´4žhoG½ùe¼1!Þ Å‘˜€iú„п<~jªÕùdAüÆØ?C¡¸:€hÆaêÑ̯à °“Ø:‰P7ñQÖ—Ê<¤ú$Ó*7Ñ£éÇ‹P]ñIt‰jú«\MD¦† Cú¨xcº§Ìá1ÀƒívZ‚–»É4L ÓÀ4M #›8ùr">“ým&¦i`h‰´Î}L0u"$b ‚¥X…“p7ǺðÊ¥ÌÁ½«å` BH‡<GbÆQqSÓ0Ö×Óºg5ÍÍìP4ótúÏvt‘œzò;?»ñFÞ4ˆûïœvß»æØ´É"¹(þpþù¬îþ:» IDATWU¼ŠBA^y……Œ;÷\\†o¾ %%GóüÌLnûûß™1w.ÙÙÙÝnó_žû Œ–Hò$}‰ø¼Lë3…3Ó'qóº;¸ãŸwÁ ö žýa—+4Ñ™À¬Þ3ydÛŸyíê—™;v‹o]L¿~ýðx<§üº 8¶¶6¶nÝÌÈÑ“XWB ×chLÀ!ˤE y·š‰qk8ë¾PÄ›‡°oíÓ˜VV®ZͧŸ|rRìîÝ»7&°uëfbt?‚(2!ã,F¥Žç…”'xmÓ]Ô¼µŸYSç“Ñ«¢(t)A»Õ­ûÖ¾…heÝçëYµrå ³µÿþ”””0$#Ë×n¹‘;ÇN3êåéœÄ®VH˜ê­ëØùú߈)^ÎèÓläŸ1ŽÄÜ!Øœ2bd/fp;®HÉÒvÚC9°W§¦LÆU8cÆž<L>…öY=ìCCtFHñdãñxx71I’p:d¦Àí®C¾ÞG%IÖÖ]ÚÏÃŽÚ ¢³‘ÃÈ/b">Ýè$BÉ–€¤Ë„õvtÃ8¤ u0£äÖA鼸b|v>«JF`&Ä º› 4&„žà©‡nì6ëÿ¾[lÇì–[3êŽ5¢¯úaïw×ÑØ¤n€±ö †Avtoè׺D#:MÇ%šÈh„›kéØ¿ƒHS¢l·üɦ€iá0jS‘æfl¦IŒ r¤¦*8ÝßÞg9Ÿ;gý ௷ßÎÁŸýŒ«ï¿WZlÞl¹7äyó˜8y2%ÅÅ<½r%yöYæMŸÎ¹‹᪪‚üʽ^•—óÙêÕdG¥›¯CéÁRÞ[ù}ïxÄ÷ã²Nã‡~À¢®âŠ‹‘Jaîðs(˜R@Ãðþ´ôÑ®} S 8#}"§ÿí,ŒGU–\|=sgÏeРAßšk¢†Tλà<^zþ%â¼^Fä e_»ƒ_9ãpÐ'ÙÊ:Ôv šŸ{Sß0Uo¿L†[£¬Ð4–«ê ­½H$ÒõùŠ+~ÂíwÜÎÀ‚¾¡ÒUtSçÒü+èŸ8€§V?NÓ›•Ì=ãÇäåâ°ÛlPÙ¨²êí׺ìvØl¨Á ±±±Ç,äÿM1fÌ^xáò ªQ\1¦„]êÁ)ÛfOkü5Mµ¥™ŠÍk(yû1’ƒ[9;•œ Ĥ÷E}êfPwcFÐCáÊÍŸ7P»/øQsÁô>θf·Õ[îèGÇ^d£;I’p»Ý¸\®¨Ü¢ñ »½ pÔÓ N †åÆóî[í¨K¹u)À/ v˜Ú3M Y‰Ç.Æ µÖÚ ëZ$*Ù¿ƒ@ÈF›šLG8€™5…Ø¡°yR°Ç'ppÕ*ª÷­º‰E«Õ4ÃJy®©Ð6‡¤Cî…c½z/Д%o† dC·TíÉP€JS©›_}~Ž .ÁÄPý´ïÀØ»="bD@B”mH²Œh³!Úlx…|ÝFÑ.“ÖOL\±î é[K‚yƒsçßþÆŸÿ{~vñÅüâÎ;8cDÝÏŒY³ð-X@Iq1Ï?òuî»p!<ñD ÎHJ≗_æûÝL€K_ †Š¤Ä&w}wáàïâ’] \4„Ôí‰,ùÎõÌ™5‡¤¤$RRRX¹nZú(ФpNß™x/Wޤ_qo–Üô &Œ›@ffæ·êzlܱ‘§ß}š*½Š¼ó&3§¨ôÉî?e(‘4­Š–zLÓ@±+x\ÉhÁLŠŠ)ÞúwÜ‘vÒûårÖ¬Ùô7 ×þˆ{÷×qùʤt3^w×bÊZ ÑÀ¤áp„­+בù}#ÂêÊå"~&eMãžsÿÈŸ×ýžçWÜËwüW08ÿt*+*)Þºæ(»^v!7†¸vù‡Ý®ÌÈé×­[73l´›)›$·åæL«fi¼Ã¿„ ´5êŠv³ç¥v½CÿŒ&†ŸŸGZ~No<‚v[1#¥èÁvʽ6¶­³SÓšEîì )˜1‹äoÐ׺ۼ‰¼Ï¡ôZA8|)€Ùõ( '$Còë0$'žæ–"|Ak66ŽvvšÒÀ-'¤jÒ$t#݈ÅÐÛqˆÍ 'ãW ™2íÖñl.Cm'ÔTŽi ¢›Žo‘˜Ô}þ9ÉZÒg©;ôÖ ·œÕF\‚b¹59¬¹kcËÑÔªñÃûìø5O’Œhº_O4ùùHÛ¸Ÿüû(·ã²™a0115 =¬¡‡Àz„„¤ØAQDdIH‘$ÄV‰¢·uªD^çƒ;ýÛK‚^¯—›~ýk^>œ›oº‰sæpî¢EðÚkGìçñx((,¤àoãõüƒ»~õ+®Z¸ñ—_ù ø|&$àß½›/¶m£ °û7ôÞ'ïÁ‡†ä_Dc°‘;¾wÓ‡Neñý‹¿²0ñµWóø®'yl៘ž?•Å·/>)EŒ{J÷ 94’û%³¯máåaFæ '''·'Ñ•€„A”‡Uöon¤¹æ#ÔÖ:|M¬\½†1“&átÅ0å§?'éæéŒ|ê.n5Š­[G¯^½ºÍÖu-1ñ¢±dÄfZ! ® °H^Z>vÉAƒ¿–/*7Ñè¯cfÿ¹Ü8ùnT~ÍŸß¹•1«¦Ð'%_k++V­fìäÉGØ=ñ©»¸~Ì®ÿì3âã㻵gŸs?ü0q^/©9:­BoÜ"öhBŽÐ94…‚ÔlÛÄöWG©]ɸÑNr'Ž#!g6Å@mƒÐvL­-¢µVfÿ™Û¼H½g0ö»ß!{X±qqßÈÞã&@Ã004Q»j{ §3‚ÓÁïW0Má”tþ¯ƒ°ªÒìÅn©ÀH4™E,¢+mò6«œ‰u.(UD¢%’â …â1ÌC£%‡ÅŽls ©AláÍ-ØÖÓwt÷e\u&Á覕0¨ØL²2(’CÇ&Y°;$&(šUƒU7¹JO¤Tš;HßXDþýä9|¸E‹üŒ®ÉÒ|ý5.à( 6ÛØýf„ ²æ¸Ó¾½îP€9sç’››ËŸ—,áà/I ú—û>¼hã/¸žz —,3\X¿n]·`éÁRvîßɠˬ>::sdù]yÎO¸ä»—|mAâÙ/Ï¥âWÅ,¹ìÌ™5ç„/þ&X½c5!GǃËíâ`óA*7UÒwo_úeõ%9) ÙfÃ0 Âá0¿Ÿ¦¦&vìÚMyy9W^y%Õ¿¹yÄ J+’X…ýŠ4î–‡sËi§qÙgŸ‘•Õ=kÍXiy³ÉˆÉ¢)X(ˆ(’Y´amhÝMk°5¢²·v'þpgåÌâçãïäüŠO_^†ç³TDCâg×^ˆo8ÊîßÊ:KÆãúµkIèæu_|1Ï=÷…ªJzv+MqÙÄÄ%Za- |Íl|÷-ö¿÷,)ò^FŸ›Eï1…¸’Ó‘iÿ6íÈ´ò›Ô•ÙÙ±ÎÆ¾)ÄÉØïÍ'¥woìŽož[qܨ֪8’ˆÊ± 'Ä! 8öìI¦¥ÅyJ:¿$I¸lõ-az¥)D:SrØVk* Qµ*¸là”­÷Ñjc˜Q¥ØIq6-š ÖÁAtxÑõ˜z} ÉöÖn}dJgŒn€!XÉ:ªªÑÜâç¾gU‚!%—È$%¸Ðuó( 5\.Ñ´ªÈèú!—owÇÃ0á@˜ zmØGAÙ~ÆúñÈÊïØ¤gðõd( "i²‚èSØõŽJ™çALÆ·›‡äçóë¿ÿ'ÿðêœNÎüš˜Åü|®xôQ¼ðB²~˜¬I“àÓOêpðþ–-ÝfÓÚk!UÀãˆÁëô25ëLÎÿá¦úµä7yÜ$¦O˜NÝ‹µÜò«Ç7vÜ IÎéN8Ò˜!“ööv$IBÓ4"ñÄŽÝFHÿŒ¥ï¤¡ 2ºÂémÄ¡æqå•Wv=¤õí‡&¯u5qT”í 1×ûòkYä–ñãùáÊ•äää|sc 0Lƒeïóáö·1L§Ý…ÝfG–dì6С<ŠŠæ2޼Ƭóøùø;¹¥õjŠŸ©æáÛþÂØQcií•yL»ï—E–ŒÇu«×t«7))‰ °lÙ2*+«ÈÉɡÓHCSu¥Ÿ¾…qà#òk ™\HZÞPN;‚ºüÛ!\ÒÑ*R¶Kaój¨Õ2ø¼ù 9c )Ýè^?nœ{Ú\Öì\Cc¤Y9öaâãU h¢½ÝŽ(þç1?Ã4º ¾~SôЍj’™®XÄeÀ;»`Cˆ6°)Ö~zTÕuMÕS)$¤›ÔT´ÒPÓAj¢á’ÈÎJëÖjæ] áèz>à ¶ ôÜZ}?9ß7&B8ò%”Bá1n'Š â)@³›` :ÀˆÞ#hi,"fçz†Wîg`b16«éWAC ÙfC@$«H÷1IÈPìÈA…(G%ë<ð|ËI0!1‘_Þ{/555Ø¿n!,P8bo½•n¿?>ó |þ9bcy©¸˜úúún°vîÝ yV+/Ì¿”K^^H6”[¯½õ_ª¹—ÿú5558N⾡ꤴ}Rº®ã÷ûñù|Øl6œN™^½BŒïböüvtÝ ±ÑÄßnà©û1ãò|‚Ũ'žàý™S˜=;BBA dF@‰Y˜ÍÝ’À-“'±`ÅJrú}ó¥Oš¡¶½Šê] `€ämBp€âQ;»ãˆ‡4øêø`ÿë$ä'±`üOY¼fï/±£ÆræÃóÊÔÉ\<Íw”Ý¿•–œ>kW­&-­ûˆÀO~òÖ®]ˆ Pl2J$BígËÉVÊ59™§ÃÛ«’áGhZþݘáªNK­¢m6¶n ‡DBƒ§L'¥›—Ó7Ž)Ciu)µUµDä’M:Ê*&¢h"ÿù¦¡™´6™4–Û8à›Ÿhÿ^N*êœ&xÑMø`'¬+±J³ :D„Cg`œ,Z±7Q8´~Ñ“Ö&†26ÿX†¦Ï"-'§½{ž=¸o/Þ†¦Ã¦ G¬ÌH¬b(Gª%ÓRXš}z±p¤‹°³~¦ CÑÖÎj'ât£KÍ( ÜÌ€´xRRRº5˪sDçºÃ0ñÂ8M‘N©G7L:üá£b€’( Ãĸ§-G&ÁغÙ{—ý’‰õ€î*ô¥Y¹•‰[ýnjFÆLè‹çD“tÊßoB(6èõ5U²\n̈Bë®,æ\ùûÿ©»pļ§ÆÇ¯¿Î¹Ã†‘³c5ÕÕÝvüÑýGQã¯Á½ÞÎ_ð­å/†& eGíÄEŒ ßaaƒHØ µA§±ÜÅ×W«ÛĬ,f­]ÏÒ c¹Ðð“9¦¾kuwÜ÷ûp{s!‹.ä¹;¾‘ÍRÓ2½ Ã4°Û(²E¶b5%µhikÂ4­'½ôKÀÔœs)nÝÇßÞz”Ób¦qþì9G/&1‘ùë6ðäø±,4Z²ûîf•«ô#ž\½º[Û¾t÷n¾Xþéiiô5G¸áàç˜í»1-hh¬w°{/*b0²F“,e˜´“ŒH3”È xæ÷æ"¹’ç/[Ȭ'ÿFB7TÀ8n\¿c=o¯Í©áô8›µˆNKƒAC¹Ù?–Áéç“Þ·ûˆ¯Ëšé¡¹­Šæ6¨j[Ôíy«un¢E0Ztë,-Äa.PQ††²fØ›)(èϦª0…ƒâÙs@%|àcúŽîKjj*n·»ûNÂŒ Õèò M3iiöaÄ9˜7QG‚a‘††ð1ÈS #ÆíÝ"F‹`Å/£ñPG7¯ƒ°÷ÊFÊ¿rÉ‹€•DT£)ìIqÒ6Å…wT"± ‰Øìq#½ˆ)AÊþB(Èâ«c‚"`j÷ïÿŸ¼§_|1.Y¹÷ß÷¹ç¨jlüÆÇ\¹nˆ0,-Ÿ;þyÓ‡OîÖTþor³sÙ]³#b€SÄfÓ£õÈ ÂªN{­NS¹9X@¿Ä³Èëûõ%Ãzõbî†-©ÑkªAm'©ªu°u·BQK©§Ïdì¼ï‘š‘ÁŽ+a߸’ôÑõ]¯÷¢>\"UóÜ¢qöŸ#õÆ-›G ESk‹6âû±ÇÙQåßþûˆfÐR¯ÓxÐ…(dpÚydôÒíÄ×¥HbƒAªêA Šûå“ë¬×Ó¹ V¶¨]À"V jÕ§*/åœy9|V!Æ.ÖBMµ$ªÅdgÏ!%%…˜ÎâÎÝ`{DÅï°²P½))nRRcÑô¯wAK’HC“d— ‡W$¾4›¥þ2cMªªj‰N ºµƒ+jØ+‚ó‡ PVؤx‰œe#s®‡ˆ+†²v‚`âH°‘zž“JQ ø…0b…A¶iE‚†iÒ¨ª|ÞÚÊžææÿÉÁ{¤I<+Ël+.&+1‘ªnóK œ•9™‡–>ÀÜ%s»5aëÛ†oÉîdêZëe MÓ1"Zë5´8p†G08e&é}‡àqÿ{Ê".%…‹7ná™1£¸Xï w‚@àm'®eü•KŽÛVG}O½ù8‡=šhš&¦hpZÁx.,ø!º¡ár¹™4ä,æžOYë|ý7Ä®êËÍ×ÝÎè‘£¿òøN‡ŸnØÄC§á2½¾ËîÇ®eÖ ¿ëÖv?°í v®YC¿‚\ìé hŸ=3˜M ²•Ême.ê}ðÝó1ýl2¢1èáO<ÅÆŸ\NáúOR«6—ð÷àG¿ýí©!@¯ÇË…3.dì°±¬Ú¼ŠíeÛñ‰>œ^çQY¡Š¢ãõik³¡ëMµ:M]ÈÁa N?—¬þ(6× ½A`\.üõŸ%ؽ9è‡çÛG‰O¾ü7Gª>S-l¢…ýÔìÙG¨¡Œßþi7js¦¿‚ 8Â% ÈM!==½[$úáøÅ5y<ô—÷±§Å[™ Ám®ÃfùW•Ÿ­I– „ÁaXõÆÆvN/T»•³ü„ílÀ¬ØEnJça]BÓ¡6hc“˶œ^LŸ¤O“Šª#û+Q&s¶“ Š_Ö+tz›fW§5€æp˜Ï}>>¨©á±ÿgðÁ³f±mÅ  ‰ø»éq©Ïí~‘T%…ü!ù]•›þ1:4©‰©lرÍÖÒT¦+%oÌ€ìad¥ #6æ?×{“’¸lóVþ2f4™ÛZÙVïÃñÃ˹óºëŽÛÖ[æÿšêÚJŒèM- †nòñÚålµoâ;ù“›šÇ°Ì‘œÕ÷V–|Àóo¬ ¥ç1þ¢K6a1±‡ÝãaôO±îÊEhŸ/?J­ªÀ©sv¢wFoæģ¼ºœ•›WòEéød®X†a¢ë&šDò·"·ÄR³Ãƒœ˜K^¯Yô4 I²Ÿ´›àî dæ’µ‘8“ºb›E¦u0t0ŒF¤]m%ÒQG¸µ‚HËA´–ƒ˜*Dµ —é'Énãÿ¯½ûµä¬ 8þ›Ý»{ïîv{wK KÿìÞ])…%†²ÐÚJÚ{ÓÕñ_ ò‚j×H¢$ÅzÞ˜‰[5(¨Ä¨}!$Mê5Bî Bmð"‚ÖÒRiië¶lw[èøb;÷Îyöù73ÏóÌ<3ßOrrï9sæÏ9sÎüÎïyfžŸ\zéÙÿÊý²¼¼,ûöÝ,×\s\{íµÁO&¸õÖ«åÖ[¯–SsÚ6͘Ÿ5¥A·õºÕÛäºÕÛäÁwý’|õ¿þY_vV–¶]¸lä‘ï.ȿɲ|îðUrþõåÈõËÒîmÚ3†.)äüU»åÌõWÊéò)¾õ˜^\”¥²”ÇÏŸ—ûŸ}V>úïÈŸŽ8ø‰ˆÜpË-rï=÷ÈmÇËÓ¡šz_^ÈGÿãcróuÇ‚2D¯<(¯<(oð{ýÜÙ³òå”ÿ¾ï>Ùvîœ<þŸɧÿ¶|í’]Rn_”Å}¯}7¾I~ðÕ×É+_óZ9j¨­¸¸gÜüÁ¿’O½ëò¿þãf¶úá»Î˽oÖ¬¸n¿òv¹éôMò‰>!_úæ—ä™KÏË׿Pˆüßkäõ—¿E~ìµ7Èsçž•+¯8"Û·ïHþØ·oŸüÝ{®•·¿÷ä‘s¿,Eù¼œ?û˜|ÿüc"gyî›R<÷-Ùþü²óÅ3²¸ýyÙ³¸MìÙ%ËË˲ÿÕûeyù*Y^>*{÷î•¥¥%Ù½{·ìÚµksìÓ¥¥¥ ÏÝ¿?lóg¦ÞôþÉ=×\./¾j¯Xú®äfÐ=+ß xŒˆÈ3ÿô”¼ùø›'õY=|Í9’߆Å…: "²ñ¿È߯ÿ|ïS{ä]«¿-ïxÛí²|éò`6õüsÏÉ?,{vï–#GŽÈËŽ–k~àUr`eE^±²"ûž#ç,îÞ-·üÙä_Þýòé»î•Gwì•×ýîûäM7Þ8œX¹öе²wÏ^yác/ÈÓçî—óOï—×]ñ3rí5·ÊBÂlOûbäðáùÛÙÊ{~ï×åñÇ•Ëv-‡jü€¦ÓÚ9øÅÖ-ݲc®¯óæR(Û7+fsÕÇmB='–Xë6½g!÷ €ÀµµµÍ›N›àwúôé­”¥8‹âMHQŠhòžôj6»8ÐUû… ôk!ÅJÖÖÖd}}Ýx?HØ— ˜Y9ãÓ1ø˜`X§¿  ;%27‘¶™f{¼þWý¿ÉúšÌ§ÉþlAÌÌfÅLÛ<ª{ÜgºiZ½Y±É|^G™Oׄiš®ÝÇ{f ~³YéøíDŒ>ô5,ŠùL­~¿é45ó3±²ÜšVý_ÿÛt}¶ùBe,Ålë`_ÿ¿¼8€èæÑušé¾éÝýV¯á¥ÿ7ƒÝKÿû¬¿]öGÓ3@|I½ï/dع4Ff}™êòÜdšº‰3ÆúŒ™m= –³Þ_;€ ÀA÷¦n†j»¾ 5—õy6)`R½e€¶fÇXÁÏg}ºÇ9á‚Ïu€CÍÚš¨ú}ú÷,ÛÓ×ɱ¯Ã«ßR†Øöº>ÛÉJF’®¯¯÷ÛX?!EͤtÓª¤;‘%TÓ­Ï–åÙ^C„@ã}Ò‰æÄÝ´¶Ëlš ¦ž@¾Šã'î,ï>y‡lllôº!+++ ƒ¦Ëò:º*+!Ëp¿¶A¯Í{Ì~†a0M Ñ¯Ì)èù6ƒ:“MF‚‰­Í{Ì~†a׿uDåS™:¤É $sË©¡Ù4ÿj^™R‡áÉ|–$Û³¬ÇgضXû@zÉÃV©g‚v> Ô64Ù…>Å>Äð`CãõÕîVí.ƒ&Õ`§ ˆTƒ@’@—(ˆ«ƒaû Ž `„ÐGô‘`l×ÐùNó™G7èµÏ Ú¦õùÎç™ýÙ*\Ôô§ ‚mºVÎö¸z m}¦im¯çÓ½Ûv_G‹j~¿J²@`JP7hô j^Ã6´izÈŠ¾Ëô} º€f*w4ö&^KzŒ)øuÉü ÿB3­A Õ úÝÎ.ðeö×%¤Dœl-÷&AÊ)p¡IJÄÌ«A¤ V¦k7ûòoªAd€P ¢ßj¦³'}²Æ¡T‘húܨA}V¯0 TƒôÞ¡D× ; R  v˜[Ð ”åMñ›úDž6ï1 Î!ø… zSÇÙ«|Q @$ Äçd™PÏ´’ô:ÀŠîz@ú£ €êEðº‹â'üèë€^£°j*T®3Ìõ¹o›×V„·Ë<¦A¶cý2À´‚T„oSÁÆö<×2MU|ªHè‚qäj@Œ`}}=~ ­CN@̶Ð5üX.U$á:@Ÿ ¨Ž ª›–"ãK½> Æ7ˆ °K†:;s-l:O +sò©¡>O—ñù,³K†gÚ–ÈÕ €1FËM'ÀøžÓfÛtõqÝó|æõY úÀ>1 € @Hj`ÌàG5ÀÐ ö‰ R/#Á„Ì ‚€ÁÀ*VtÁàH‰>@0Wó' µiTƒ h zd€€¾Ð ö‰ @H l™…ßc- —UÅæmŒR½®Pï#û/ïý 2š.yX[[Û¼M5,ËRʲœÔ,ô®Ï÷ýÇ{ˆq z¨-ø ¢_¼¨Áì?`’ .¨5$,Š­›ïãõ¿êÿš_úæ×}ׯë&ËTÿ6ý•^ ºe˜š§LÓmMZê<º×d›7tsû/ïý 6ìü‚d€E1ŸáÕ¿tÕã¦~Á²ÜšVý¯ü".ŠbîWrȃrµ\u®yªm¨þwÍëzŽk[tÕŸ¯Ë*LëÔ½ŸM߇¶ï3û/¿ý :쪷>Àúµå—¶~0kúåos ¨Ïò@ãZ5ö@Aî×úþŠÂ6å€hÊÂRog}ß y²ÿ2ÀAžª6k 9V·¾·µ¾-º¦¹¡l'ûý`>`ä/œîd€êã ?…HøÍÂq2SÊ žý ÓxªAèNd ükW=i!ö¯ëÐëS—¡;IÂ4-Äë¨/×ÖLæÚNößôöE4 š¤„ë„õ1Óó _XÓÉ ¦3ëL°úAÄ6Ÿn¶m°d}.@¶M1oÓÇ}2 õ=öÙjï»lö_øý¤D`"¦¾’Xë°õÏäÌõšÚ¼^Ÿƒ2û/ŸïÐ[ØÕ ú?0ñÚy   €H :™ÄvM#dÛ?2@@¶ÐV §R Ëh p>•"ÈYÀ®È“ €d€2@2@  € 0ÌØölP2@  `* @Hˆl|õëÅM©‘HMã~ÖÃÖMo›ÎÁ¢dЛ͊Úÿæí+Š¢saSÛºÚNóbûc¼6ˆMÔ ¨ ’cíœÍй²z?ÕºÚNËá}Ìaû O’j>ƒa»‚œ³°jú,Š­Û|z¢\7¯!»±ÝïªZ^Q›7uºîq{ÐêÛQß–¶Û¯Î׿µìôšú9[ð«šÖ¬`Yš›@ÕÇuÏkÙ|j;h7i,ËÒØ„¨>»©ÑöZMëí²ýõû}½6ÀèL™¢oóf´fЖÝ¡¬sì kòV¯ÏôÚhþ0Èhk&5e~j¦¥f‚)ÒUv¢f,C Ž1ûª×Þæõ…j26õûü4•ì:@WUx]ß^Y–›ÙúÿCº°Ú.ÝmŒê¯¯IP‹ýÞü 2º‚Ÿ.4·>ϵõsÁ_›l°Þ´KðäXtüÄåÝ'ïhÁNwy„úœÕÕU祮´] ßà˜6°I¿œ©‰Ñ·é1æu€jà2ðÒdû}–éÚF]p$ HÛZYYüu€d¼§Æƒ±@¨ã1б@S'!ï)à 2ÀC‡Ñ„hŒz€`¶±«[È 0:šç`”¨ ìü|ÄYð¢LÍVñÁT%ÂtßUa@«D£ °~A»éÝ}[… Ð7CŒ‘^T©©z#Ø0´ÞûmÍ—?˜œéŒS–ó758VA@L)éY ê‰.U@$Àd$i]__OÓhËþlÕ bÍ ˜N4 Ú¦`§`\÷›< £C5°OŒ $’ ~Œî"wÝ Ùês¢ž @Ìhªá ~€”z©¡C ËèüL’ eìš%’FmÈ£ €®>B2@  `* uì­d€dÉd€d€2@2@@xIªATWtÓû¬1›µÿK>@lü|‚¢.HöüêAO½§ÑTƒ(Šbóoõ?Ñ3À.Á/TX…”e9÷¿-VÏ£X__OÒ¨ h9@o°Ï>@2@€Îè¯,ËÒx{Çu€€”FÕØÆlVr û&‡ÊÕ&Í&Mœ=˜ÆûD € ÙÂP6$TX¿îKÉ2@Û€ØÕ-VX Öæ:¿ú™ 2À`Áo¨Õ ~@Ø9ø ©„oEÊ`'}Wƒ¨*?¨MŸ®±@ ~@ŒF &dèjåD@oPÍuÁj€”¨ ÆâjþŒ™ 3ùj`°`×äñ`—fM΀ia,P°O4ÈÉd€2@ŸaÑtÏ)Š­[KM†eò:`l¢ †­žô’åY ÕI5-ƒ‹nh6‘ùÁ·›œ|cš¯Z‡i}€ˆÐVñaèÕ æ‚]dêàÛ¾ƒq· ¬ ´ë`ØúMšú¸®9³K3§eÞ>²±j@p@ °«``Qè³¹úãõÿÛ6sªë1­×{qŒY Yf€umjš‚›îo«³@D³2ÏÛÆÕ?]VT–¥9¬²°ŽÙX£,0Ø¢È Û °KUx]fgʆ.ÊÕ —*–åü ¦»?]X7ÝßAŽ£dp}œÂeà/Úu€"[g†Ž²D•eÖï{˜ÍÊV×¶`HŽŸ¸³¼ûä²±±Ñ놬¬¬Œr,Ð* Œ™™¥XŒ cFOã÷ãÑW@ªAÈ© x b„}ñ m1$«QM7]*‘ÝY Uð˨ïÍ÷,R.§@lülÔK$F“F*QMæ%©ás‘¼+È ®°jš45ÚšFÕy YX…n«õ™Öï³]ê2`Ô`ÛàèÊ«©:hï m¸5ŸJŽæÓz‘[W  ™9V#ØèæW·5•֧Ѥ `Ô`ÓŒÏ'ôy^¶„!JÀ0¹ 0V5ˆúh'\/2À„ÁÏ”ÙÕ³k5ˆ‰¢‚ ƪá“)ÐT’jm2Àú_]æ7è Ø²RDLMªI¨¥œêY¸îq˜tô v¶çdy -´¦ F!ƒ`×õúlú%€!b,P`Ÿºd€\l È6v ”&6@STƒveª¡[=!&Ëj1dVa&mÕ Ô`§ ˆ?@JIªAøÈî,PWE[•Ó}W… Àð2À¶™bÖ`½¹Òô¿î¾‰­Â`˜ O‹Q¾WmU}”‚Œ' U "û>@[ó%™Œ+´?W`ÝH0e9Sƒ£:^( Ï£ÄhÎUOt©"Az“E5ˆì‚`—j¬$@ W°sMÏ.ø©Éu¿ÉózÕ À>1 € @H/I5×´. AÐk´Uƒ°M#ôj`ŸÈ)E)‡¤6q®¯¯ÓwÔõïÑšdÕ \èd©ÈI’jôF'W 5ÆûD $’£€Ø5øQ  ªA€}"¤ÔK5ˆ A0ˆhTí$ô‰j`¬àçjþ$¤F5° ªArÂX `ŸÈd€d€2Àg€EaŸVÝšÎdÓ )¬£õr"¿¾AìãØËÕ=Çõ¹Êñ=ìò=Z¢DÌ/|Yö¸úBJÍúg³¢ö©}\^-Ǵ̾_ëäöqµÎ)„©~¶Wœl5ˆŒ¾œ³YqQЫî×7ÄÉêsOåàOC¨Ñå—©©Y¦z¬iÓú<ÓüŽûæì¯ÛA¦,Ë‹›B}^«ëq×2™náÛ”Øô½ìº}›¾MÛÕ¶ÙÏsÞ`ï]Óýû{¤Î»Ê.´5C•eó¦õù®û 3Eçû`Û¶ú4Óÿ®û]_{Û÷2ä>6=×ô:Û6s†þÜ´ÝOºç¥ø}Àª¯¯iF8é‘`zø’›‚\£à³iËs¾²ëûV?Èöq°íñà^†X7Á À-¦~¿Ñe€!ƒ_ÓiÚÁƒ\Œ×žr]±ƒ_êú}¥é#Åu€}+Ë­ƒ£iZu‹˜ùõ#¼¾V모ÐëT›5SÁÐïkÊýä}*>z,}…[¦Ú“U8ãe=f­®QTOtQÔ˜X^Oç÷Ž ™ :¶éZ?ªA´ÈÔƒqÀ pþ~n»›lk¤×—t])_C_ÛÔvyõùÆøÃãø}xüÄåÝ'ï^7dee…±@›þªvŒª_÷]³¶PË€!¡0×àçõ#¼ ´B-†„ësD02@²€Tƒˆ±iaªAtY߬˜ÍýõešÏöš‚¼^NÖ€m¬­­mÞLÓ'“ÖÏæì¡É²ºd!Uß]Ûõ5 ŒÕ:tÎ6@@•¤„+øeÒ×ZÓàƒÌmÞù ‹F5‰^ Âk»}§{®oVÎæþÖƒŸú˜Ï|õlÏ”é9³Àž+XYØ68f›æX ¢KÅ…ÀCxÙ‚_’}7ô ò €!«AT«©Ñ1huû†"r # €¡ªA\8îêOt D‡j®er0o¿¿de°×VÁN½©ÁrÙFªj®3SëÓ8ÐÛ÷•`%F5ˆêqõ/Õ ¤U5ˆXÛ|}^±Ü|âMÔªdƒÀh$©Ñ&¤D„&IÝ2MµðÔõ­‰tè,ä}‚žmúè®ô= ÚëpVf=++mˬ×ÂkûZmëshz6¨m×ïzÿ}î7}€Á`,Ð%®áÿ[ þúlë j€Þ2À.¨ ëEÌ-@@–PÔ\瞦‚]š59æ1( ûD € @H8Çv}_Qlݬ‹ص‚\³ñ­Ñu¡®×à»i¡ÄX2À¢ð*”ëª(ѦâD}°mëÉ6žÛˆ­÷µËÉK½îë ¿ v ~TƒH â¹M– ¤|»{`R ûºÿïƉj¹d€¶&œê1G3­¢D—ZƒÞÛïó:l«ÓÔe:ø…Çs|Ÿb¾™Ÿi}ìkëëo»}š.|7@ì}€¿nM­êñê9†ç™*JÔ§™jÇumcÕLU–ó©úãê4Û|³³²,µAÄôèækË—÷µ.µÙ‡ê|¿˜¦¤Õ lÓè¦dcж]ç|e‡çùÌëzŽDê÷»¼Ç!÷O×e•‘÷!0ø ÐV Â6 p˜Qm¢çæ« qÐò¨ûš&HL!¶Eàp3ÀÞ«MÔ›¯zS©¸õuö¼¨ÐU Â… Þ™D‡ìf¬zVÛÒf{ÉA’j®J]2@úû5›•þ׆©'9ødmæÉ Óý¾±ëó:É ˜û]uüÄåÝ'ï^7dee…ëÉÐHÀ>Ñ $’ÎaÄû€oe1–ÂÎä3•ÿç´‡c[и¶¶¶y³=‡ 0Ò‡‹ë¬²=ˆy ~ÍÁ•ÏTèÏT.3Ò±-èu€ÕH/¦Ñ^l‘ ÐS¢à6…_²C¹a4*ð™ÊàØ%º*>èJ ‘6ü¸„ë‹ìSeÀ4ëÏU§7­¶`€ÚözLÓmC|Ùª(øÌÛtø0ïÊ­¦Ág*âgJ^0ÂjIú]Á Ðó×Q€ï›T-°Á¦•ªyª/œï¼õué†årmK}zýu•-*f¨ÛbªÑdø°F“Ûöñ«ið™êø™jÛ9¢jÑ«Aø¿. #ÁÄm¢©¾”>åt|×›²‚AßMR¶rÐmy5 >Sq>SÁÆyÍTð¨ |jßáó½P®gúÁÇ´ƒèê¹?7Ù>S£ý eMÑüÈ ~¾¿R‡sØÎ!ýBâØ§|¦¦“åÙ$©áƒ>Àq¿)œEšåk̸šŸ©8ëk¼ÎUóHR Âàp!7™§ú259™¡ÉAwÂBèLÃÖôdZŸk;ƒý ŸX5 >SȤG\̓j2@†C‹û‹×õ…T3#øL!;ŒJØû/ü)T[Ÿ)èD›Àg d€d€€†²!¹e€VŸtÀLgê.‘PÏÍí,P«*è1z?Œ?ª¸«÷Ç6( oɪA¸äÖ¸™áµ¡¼>Ÿn`YŠÚ@> O†h –Ùe€ÕHç¦û¾ó…X& ÿ¨VƒÐ<Ýx ¦à¦ûK3(`p°i$Sx!º¸°,Ëá¿6Í”®a…hú€${`ìt#9 ¦°^¤±IS¥­¸dÛeú €¶j>•"L'¸èþ²ù3FæF6Ñ$©áS)"»ëÛŽ®Ëøº.Ð_46Ÿi¦ pð׺”nz›yÁ1(€Ø'F‚’È©XWÅæ Ð^’j®i]2À¾‚`õ‹¢°ìtMי͊Úÿœ€€Ø*ø™ªA¸*Eäš©(n›Œp6+悞zƬ—j!3À¾¤~U€Ó5¶Éü€8ôÚUN®>M4M7˜º$Õ ê‡Î§ÔØ6h@S¿}€éÙ2=‚#€©ã:À‘g€¦ñ©ø`C ¥âø‰;Ë»OÞ!Aƒ`Ó>ÀÕÕU†Csí,®€`¨Ñ!LÝ ê nmš6 z¦Š>À–rèdé’ÈG~ŒkTÛô¢ØºIR Bw‰„zRLn#Á "pr=ôml—DL>t!È@½TƒÐɲ"¼© ²ºojžôiº´=G]>M Ð_Ø6SÌ6T› m÷Mÿ׃™)óÓM/Kš@`hÐT Âüºd€ƒm%8À´ ©„K–Á¦GÈV²Ë \1Ë>À²œ¿¦§V "H6H ½ Öº¾¾î¬ø`“]`u"Jý~ÓùÔeò €® 7¶jÖ §>n»ï œ¾ë4ÂX `Ÿ @H $„—¤„kZ— è5ÚªAئ‘ú@5°Od€€”’Tƒð%†>@@ÖP×ïG `h¸@ìbòÕ YIR ‚>@Àh )°ùL#¤F €Ø'2@  € pà`QاU·¦óÙ´BŠÈëp­oVÌæþú2Íg{MA^oÂ÷ @¿¨30–e«/¤L¸þ6ë«·Yé «uèÖg›6´ý`Dp²Õ 8ˆ¶2+fsAO½±eQ Â6½× ÏÔ¼Y=æj5ÍçZ‡ã¾5rm·ïtÏõUAM n®`gš¯ží™š;mÓ¼÷OÃ÷à¢e˜NØ•-øUØAe€Õ_w°+ËæMlêó]÷ÛmÓ2]ËS“¡kÿ˜Þ—&ûˆ&V`zЧ„oØåyYIu°l»ŽÈÛ7¸æÏ¶¯•€L;šúýÔ>@WXe~[Çàâ¥cL9¾à×tZ=ƒi“iÚ–™ø`ž]ßÍ›Àh ö:À*ØU}KõÿGu`Y^|ÔiÕ-T¦iZ^}Z‚}–'¾„Þ'ò€¶&NŸJ¾'¸Œv$WÐQ§Y²?çI ·­Íúº?Û‰7É.!²–E5]æ7ê ¨ËÂBÐuˬ7¥ªÏuÍ œ»Ÿ2lózzj&0ðh l>ÓlÁ-Ûë}¨¶Ç:œ•YÏÊJÛ2«ûm·×µ>Sðkìlëh²~¯÷ßç~Óç ÆÍ‘gÓ[½ß4Íoøë³­#õë@D— °˜j_ }Pì2(¿ú“Ì™œ`¢ôê.{X[[Û¼…̉kÄ`z )ø¶€ PØDü*EdW B¤yµÝ|¾ ÃÌMÁÏWvÕ ÚVkð­BÐd™€~ oðÓUаe€¾™"½f€® hª¡Ë«Ìo+`5ˆ6Í”®á´hú€| ÌÚ4‡Ú®ïS7\QÜ.ó©Íœ4y@I†B›D5ˆ™Ù ;ôÉGW ¢me[Õª @Þ°Í¥Y^è P>ÕšNA5`Ÿ¨˜d¤ ¥Á4Nv,PWöj›Î°i0¬ P7øµJ=)¦K8I “à €¦kþFyh 9ˆ"I5Yžj«èPŸî;ŸïsÔåÓ ýe€®àçº>» ÐU¹¡~ßô=˜™2?Ýôê‚y²Cè7º‚ŸÏX¡£ë$8Àt2À&A1û Ж½¦cUƒ|$Ë€l ºDVÍŸm²A2HÈ;ôÉ»Tƒdl[¹¡}í)ú7IDAT>Ÿº @ÞpòÕ ÔÇm÷ÛV‡ ù:¡€Ø'F‚’ÈÉáý?úÙÑØî‡íIEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/close.png0000777000076500007660000000520610463126333024560 0ustar ‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ +Ôö½‘ IDAT(Ï—[l×yÇgÎ\vv—»Ë›x_Q+ÙuI‰•QÉñEVàHr.HRš6AlHÒ<¶­ûÐÇ¢H‚&m_Š´vâ$ˆÄq";;Ö…–dÓ"Å«x_rÉ]rïsÙ™é%›Ô =ÀÁ óÿÿûŸÿœïÁ]ã?A“’a¹ËòÅzÞª}|zèÚú˯¿Ì;Ãï0øÊ ¸;æã‘ƒý=ûïyþýÎÎÅ0Šq‚àæ•‰‰™w ¶ùq7¸*åãu1ñmÓGO,Mž|ªÿ ?C>æ£h ü×[bú¾Õ§tëÝ^Gs/~õEöîÙ+þ.™l‹èú_·†B%¥lX­ÕÞ͹î¿/Œ]|¼{üŒzɉzå{]©Ðg›šCV+ æU.472¶=ŽÖîG@U£f›6^Õc 9ÀéÃ'0o-’ûéO'öÕ×§b±˜ËçKWK¥óËŽóƒë##¾£„z'ó:ÉÉsOþ®nù=:÷nÇ8ü4‘éIz/\ÀÏä@ƶǼ>üèg?à;_û/üøõiJ>œ~ŸÂ»âé’A_<¾+yü8z[æõëQ9;{êJ±(öõôÀmòŸ@o‘<=qðÍmåA¶ØEäÔ7Ñû jÇ#•5" ShY‡¢/øŸëo°DŽŒ•áµw_£'ÑóËÅeÐA¯ÖH¥]Ndjô«&É'ˆ>÷ú¡C¦)…‚®9N׺絘‰Ä\xeeQ~vÅüÃÎm¹=ÝGR„O~ußi”P2Ò€ÚØ†ZX!’žCÍZ”UbX£¦)(ªÂªµ „,Ô‚Åci‡-Jr`€ØÙ³hÉ$B×QêëÑu]4”ËšpœíË®]3Íå×tŽ%ùÖ#G"ñÈSȽçzQ«!<%š@«oA+ä/Σæ,JHŠa•š&B`V=vÌW8>gqTšl?vŒø™3è]]ßG¸.‰ ‹Â,•ÔÑB¡n2ŸÿHur¶Åb>cu…Òch‹ÃÈöà U@ ½}ñg¾‚oyø—.̬!L&£ˆvÌU8>W¡7Ðé:v„ø©Sè­­ÛþÔ­®‹??ɰ\,úY˪,U*š<»ŠRŒ&žä§1í#Ž0Ï×Ex2š@mhAÖ0gçÐò65G°mÕáè\‰Ã® ³¿†gŸÅèìDx¸.¸.eáMMQ½|™±ñqÿ|:~oyù#¹ÜÛò‡7‡íß™ö³×f§1r6ñÂ"ºAÑê6ˆl"¡F¢hõͨ¥"Æì"¡œMrݦÇ$¥éôiBííßÿ¼ZÅœ¤4x…ñ© Þ^ÎÌ¿N¿q=›ýùšã|,GµÑ—fœEr•5K f,⥠!k¡EFü“l„ç!ôxj±ˆ9»@s èìë§é©§0ïîLMQºz•‰™[üYÉrQ3ãOþíßôÿú·o~(ªÝvcY™L†I©à!¨-gp†i·j°ßAoÛPÔ #fKÍ'ŸDø BÕh:y³©éÓ=ÏÞŸ§84ÄDz÷õííÙw¶ï¥-ÕI´¨‰ÒÙLÁ—¸ yÂk+h•uTÍDjá-ß<ýj•êü'#…B«ª£unüÖbŽç ÚþiÞJe±ÂÁøAvVbt]¥o~œ}%ÑñÕkršNNÓ¶v™w“ÚuƒCÕúB̾îS\ô·6¥ÿ ÝÕ³'o=²|•žúpÏPó!]ÓÙf’*L¼¿‘ØJ#š!IôÅQ¶U™~ÅFÜt=D Є–ÆÇg×§]-ØÜTÚ÷ Ì¥ÙÝábj÷9>,::ƒz÷IÎ/ÖᆣL4„5h´œ3™W“/;(s>É ¸‡„¬ZVpq}½<’Ëݘ)—”óN~ý†Cû¹9§S*Alr»KUAãú®:¾TG÷!“Px«ÐáF•Î3&æó“)˜<ÜM ùÀŠãïe³¥ßÏÏ_\Yùå\¹<¬¼ Þ¿~þKjækÖ£g™X Sªlp=X(«\"ε؇’¤‡1#E "Øj´¨ÀîS8¼›™Î.f]×s€ X±íàýl¶ôûtúÊå••W&òù·€% 0 A#,ÙC#¿©ý°EJ¯ÆrIrщqµ»“êán¢<ö—™Û½ƒ‡ªú,/™¤Ry K²CAoòïyùûÿÒ¼–-N9B$ Um´A|P*•ϯ®^¾´²ò³ÑBá<°øŸèxû‡ñj­äý[i¼Réòñœ'ÊéGz×ZUâÍuhƆA*%ŸÙ ÕîåPïiÆ/³ý™ÿ•ý{âÃOx&Æ«–ïûiÏ{Ei»eY7¯­­ýj´X|û8÷;I¿ Ò…î¢dÎCýá… ¿Ð£&o]y‹áÌ0gÎŽ¢äçÈŽçyt瑇–…Ä›¢Ñƒå èX±¬ÕŒçKlúÒÿëIxÞT¼IEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/replace.png0000777000076500007660000000436010463126333025066 0ustar ‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ .(hàT}IDAT(Ïå–YlT×Çw™Õc¼Åž± ¶Ç+¶ñ^’(–Ô*ÍBÚ&©Rõ¡ym%¤<ô!‰ÄC¥ª J!Å•@5&¤Á`ÀàÛØÆ+öxÆû:ãYïÓ‡ëFE4ióÔéèH÷Jçÿû¶ó}ðÿ¾¤ÇýèêêÌÎÎE†XL#‰‘àpPRRÂáÇ¥¯`ppP477#K‚Š-%Ø’ %ab"H,²Jo߯=:tˆƒJ_ ÀÕ–Ñrõ*Ïíßlurýž„?dÁ•n%Á¦à_Óó®â_ôQšµDN†Æ_/ü §+“cÇŽIÿ@KK‹hmmåûGž§mÈN×d [ÙZ$‘lÐåôLÀG×g LÞæ@M„›·no¿ýöW††††Ä•+W8ú½¸6”Â}:‡ŸÝ@E¡„à f TÙ8m*ä¹àÅÔízŽ¿ÜI¢ºªŠ¹¹YNœ8!þ#€K—.ñíCû^He$˜LÃV•˜áÈHëvIF2j°„"7l}võZÙûôΞ=ËÀÀÀW‚ïÞ½+@àÌ.ä¦7·[Æ‚µ(D4ˆÆáŸ7 QB„5XYƒŒtH©x†AoŒúÚššš)ÔÓÖ&îwwN½uëµ5Œ,ÚѬ*º€`°(Íl¸É¬@sk°†`̉êà.L¤wt#åÙ~.~xù!îÖVÑs¹™Ë¿<†"+œùÅÏEÉž½ÔîÞ-¨>Ÿ—=»¶Ó¾bÂf‡@Ì2èqÐ…±ý°¨FH惰†@":(¤9 eSá™At-FGG‡ÈHOg¬½+¿þ1ïùü0ëa¼ë:s}ýt\½*¶îÜ)©º®£˜ìÄ$…4»qiD7\Ö 5,–mý[Pƒ¸³v$šÁéz‚•I «ÅÂ`O“ÁUÆ>9G¢X!gÿÜA¬£—I¿>ÎíŽ+ôœw320 T0.³˜Ád1ÄÃD5CЃ€f„ $&Å·ªÆN4Æ•ù˜Ž´ ÷üYRר\¨S°c;¦¢§0EØ” ‚«¬¬.ÐýÑxQ…h±v3X-`ÕÁª@Ôšn„@ˆ‡«À$æu‡bV‡{Iòö±Ñ¦±mG:îÆZlËðen. ¿½š¤ 8s#Èí3LŽ¢Z,VV—IÌЊ‚Ýdx!7âP×!L Hq¯‡á‹Â:ü1¶él}¦˜ìêj¬©NˆOañ÷¡‡‹˜‰§1G%kò"qË2²"£2::JyV)Sñ$’, *†°¾^‚òz ŒwA–3‹âë¼Aïù÷pŒ4S÷¤‰Š]O‘VTŽÉ¦"Ç¡nì±9Ò•nVƒ[Йz b¯n¤¸¾µ¾¾žÓ§OSQåÃlw e]\› &#˜á!â„—ñ´_côâoHu²í[Nò«pdºQd?R¸Â}ˆØz$Nt2ÈâÍ9¦ï»H©m¤þ…¨Þ¾ÝxãN>-IPY·“%[O$I' H¶BŠÕHÈù¬„4fûè¿t–à½Kd-Pót!®Š*lI)HÚ8„;±1ô¨ŸÐªÄ䀉®6¦– ÉÝù"UûR\Q!=ÔŒÞzë-Q·­gþ¢rIM±HF†'š €¹åwè~ÿ·˜§?¥ºÎFÑŽ*Ró‹1™ãH‘~ˆt#´)´h„åi•¡6•ž®$”Üý”îý9•UäºÝÒçºáÐÐ8yò$ÕUdæBrŽä4RlF­ûç¹ýÁ†>ü3êu»6‘[_==•uAä>ñØ2‘5ÁÌ=7LÜÎ eË^:JFn.®ÌLé±óÀÈȈhjjÂfµŸŸ%1 Éì`Áçeì“ Ä‡/SQ¦QþÍ\¥[°Ú,H‘aX놨="°,óàž‰ö˜ÖË({î(å»öP²îò/5’]¼xQ´µµa6©˜c1¦[›É1? ¶1âí•$eç¡Ä×=°Ö‡ˆÎ ë,M›ì2ÑÙ-X F6räÌ6—•I_y&¸pîœøûé?½ÒÍîC9¸*±'¥¡D&a¥“¸„x$@8$1å1ÓÓ©Ò?$H+Lb×›Õ¸ºü4·°ïw¿'ï_âþP7ü"€DYÆe–©k¨Å]™O‚MAžï†¥»°æ#ˆ²ºbb|ÂÂXž‰PY®PÛh!?êky±x8óÚ«Œ ÷#  Ðqýºh9{†L— wm1Ö¨iü&bµxp -ó³Vúú-Üõ8ˆoªÃ£Ré%+¶£*(‰Gs9¢Nrê‡?`ddDHÿ`ðÞ=ñቄ§&(}ù yNâžqô)„W …d¼ÓV:ûÌ .¥âÜ~€†ç_™•Eϯc¹ý)™u³ŸM1IGòxEñqòõ1Ðß/6—–J_0Üu—Þk×(¨*Â’™ŠfUñ[2¡‚“ËLNit=°3kuSüÝÃl}vå55ÀôÄ„¸ýãW©¾õ ëg?{Ó_ÎãÅÅQÎ?þÅ!ìëï?ÎèÔ«®²ïtâNPXóxYºaÁce6jFË,åG^¡²±‘M¹¹ŸYäÊÉ‘¦''Å7^G»ÙLÞ“ë$Ù„bÓ ƒ¯Ÿ×+Ú?þ˜s#gj }ƒƒ’ŒdœB±`IN%9kÅ%dn.¥q}¬zÔšözŵŸþ„Êø%Š Jɼw*Bé»ä™}û‚H(ļÇC‚ÝN~~>iùn6âÊËÙ—GŠËEieå—šý]ÙÙÒŒÏ'®¾ù3ZO]ÆgJ¤üØ»‰Î333Â7:Êâô4Ž”’ÓÓ))/—ø_^ÿÙÉÑ×Ç¢IEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/search.png0000777000076500007660000000406210463126333024717 0ustar ‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ .5 æ8¦¿IDAT(Ïí—ml•åÇÏëyÎ[KÏK_¾Ù–h ¥;˜Åè Æ™L’˜‰Ó…š·%~˜.sÎe3j4[²„eÍd!{? p Ã0ð€´Eèá¥RhéiÏ)§=oÏsÎó<÷>´Ó ¢G³OË®äþr%÷}ÿò¿®ûºîK¢ Û¶m›Ø·o‡šš(>¯A>_`tô2““´¶¶òâ‹/J| ûÌMûöí[·n¥{ù2V®X†×WÉt29DC1±‹N œæ»Y»v-Ï>û¬ô_xî¹çD"‘àþw‘-¼{ÚFRÌ«ô£È©tá‹)Ì|šîV‡†j›¿½þ&±cÇ9zôhÙê§9ŸþyQ(øþc}œõ‘Ȭè5hªUPt3f=c)ر÷,±sXÿõÛ¨ªšG>Ÿ'Ož, Bù¸ã­·Þ±XŒGy˜þÑ c9A(hpËM7ÇÙ»w¯øB lß¾]ø>–,]Á_Ž c«“äÍ<Ž+ˆT„¨ Pd G@ÆråÌå’Ù yË¡2­+úi©ñÛ—·266ötÙ9°cǾÛ÷Ç.^!iNÒg%²]‡áÉIJ®CУaè¦-1>“%7±]“ñô4~o%µµ- Æ°äº £££P* @Qdêêæ³ÿ½Qt˜6¨(.$'I¤§ÐTUQ%3fËÇÛµ1K)mªêÛ0qêë¯ã…^(nܸQ* £h>٥±lÛ[@ÉX¶$Ù‘ÇàPeÐv†šÚÓ—$¢‘å?CÝ£ã }PÉ[% V‰bÉų ügI³áQåY•44|:TøU¦„„¦jd2™ò V»dôúd ŸG£P´É›–UÂvÅìås%L–@™Ð5ø ¾ÎÇÔ I”Ȳ„Ãáò&Ṳ̌§¨4*™)æð{dtMÇo¨ds ¦‰˜æTü>̓h•a†ÏM  “±±]]]åƒAΟ?OÃòÕ¼óAž°_CS4tEFØ2’ó‘²>/TUA¨ ðhà: LìE¶ LLLrçwªe¢M›6ñοŽRéä û«ÉæòÍ.L]àÒ»—h>ÝLK}3ÑHUÓp]—b±H>—#•J1pò}FFFèëëcì?G]þ†/éDxÏæZ~¦vñdo/ýýý¢³³Sº&€Qk ,ÁÌÌ Š¢`Û6¥ª,7¼‡å¼Ãöݵ讎‚ŠãZx+“æ"úúúذaƒ´yóf^[¼X,JdÞB½ÿ„CønæUæÉU«ˆÅb¢»»[úÔ/Ùƒ¿~P8ŽC.—#“É`Y^¯`Ý:‹U«Jh8ŽK2)È͸³aÍ£WqêÐ!qdý:n¿½DhiÔB[t5ùÝEž|ìì?@wOô $$TU¥¢¢¿ßëÚ†K08$¥?ì˜Ñ(¼`N~2©­^-Åc1ñ盾Æ7œ<5r„!ÞßÈ3ªÄÖ®áðáâ··Wº ›Ìâ zÐ ]W…Šhšƒ®ôZ. °Ýk×—…ÝÝÒÙþ~ñ§¿Ê7EŽºs›•÷5ñŒ²Š'n»…={öˆ«:" Œ WËè:ÌŸ?ÛÉd„¸¸”Š.éI‡äˆ…¾ºkB´vvJçÅöÕ7p›cÁʉ9%`Þ½MüxjßÙ´éê´5´ñþå÷qK.xe4ÍÁq˜ÍzÓafÜ!5âG-,¥%|3z×]úg™–ŽixhH¼vC÷¹9šzgU`ž†âu(YÖÕ¡ÊQ”D:ª*ضƒ[*‘ž°9{ÅÀ[\ÎâêõÔ5/¡aAKYßîæövéƒ3gÄ«+{Øèdi[-‘ßåðò¯ÆYÕ÷øÇ“§OÜsÂ92p„ØÙCÔ4_¤B©¢Ê³˜… ÔWwÒX¿ðK`#çϋ߬\Áš÷&$Œo=Ä/·l¹ÆYO!ë‰ý‡wŠøù~q÷?9?üßþgìߟ^ ö´L”IEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/snapshotBuffers.png0000777000076500007660000010473310463126376026643 0ustar ‰PNG  IHDRÅÃAKbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ  +w IDATXÃìwxÕúÇ?3³5mÓI€Ð{5H'„. H(**—K±ñCl€]AE½ ˆ*Š ^•+VP©騈 ½$^¶ÎÌïM–$$ ô|žgŸræÌ{ÞsæÌwß9sVšóío:@ Á?CXT]ºÕ÷ómØp °ROP2ï²ùúc;¿ãí‰I vÔzš¶ãº¸þÔmÚæœy AU`ФëY1{›p„@ \ÃH‹É))Ö±z²)<²“Ôc‡((,DUUtMCVtdEAÓ4dIBÓudIIÆd6ãç@Dt þ5šQ Ø©Ü¯_ñ>?ó!i §Kttº©©YìØ±ƒˆä§èxãâý[Ô’@ ¨’ÌYÔÓ·<á®5gm/¹M U\/Üxº”(6kœþõ{Üù™$''“ŸŸ&±$33]×  aÃFülDµˆ§À~Vº _~ÀWx¨×ûî¼£%uê‘Þ}Ÿ„Cá㥿rpõ÷Ü6È@ÜÀ‰šU†Õ›ï'99ù‚Óß7r•pš@ Tq n—»Ô†Â¤µ¤?„Óé`âÄI4hPEQ.(3UUIJJæwa4fbPdŒMn*•æhÒ~Yù1­^ä†Z§aÎé3iá†ZòÑéÓl]ù5ê5§VÖ¢¶A• ((ˆ¶mÛ’››{AâØzy'¿Ž‚ª,Š]nOé-Žlrss¸÷ÞûhÔ¨áy£Ã%Q…F2zôÞzk>¨NÊæÿç®Íüú××­‹Õ§N•Ÿ—ÕuêÔakú#4Ùµ™êušŠÚU‚ääd4hp^qüÐCд¨ëÚxÌsÎ<7~ù>ŽÂ<Úßp³îéÅôO÷\µòÛÒ{øýu\Anï½p/÷¿ü_r³Òÿr9ª’/*ËG¹Yé¼<®//,ÛYÊ7¹YéL½£Qu£éšêaÐÝOÓ¬}¯¿l[Éz¸Üþ.[–ËU_çò_Um#U¹Î‹í+¶ãßO½IDÍú¼3u,'&£ŒØÂþðK„G×¹([V¼ýÉ»7£k*“ç—~Jöß×çXò\N;£™¡ÿ÷<õZ´gß¶õ|ñöóäe¥_Õº<+Rœž’BÓfͰÛí>|³Ù„$I躎$Ihš†®ëȲ\ê»X<;N iÞ¢ zÒùܳ™êµãÑu?ö9QEQJ‰oUU}ŸÈÈHÿö>ˆ!àê³}ߓ俿²cÇbcc ªP ³äó†ü´Â|÷ü´Š›ïzË®CÙ¾ùJRlËÅÚ`²pïôp»Ü—TŽ«í MS‘e¥R}äq¹¡¨,%Ëåq¹±øñÐëÞ' ~ý™Ïæ>IÃ6Ýþ²ý%ëárû»lY.W}ËWûz¹ë¼Ø¾’v¸]nÚõ¹•Æmã‘e…ŸW.åãW&1îÅ¥œ§½ —-ßÿ—ç>Þá˳$7} £ÉÀï[~dé«“xô­ÕÔoÕ™{^XÂìñý®j]\®ÒÑ ·ÛMTdv»'Nàç燦iFt]Çãñ Ë2š¦y30Î8ØãÁét¢ë:Õ#ª“œ”DÙü÷;R38›-§Ó‰ÉdB–eŸ(.>‡Óé$$$˜‚‚’’ž•@ \ ÊF‡‹Åq1FãÙ‚¸˜Èú·pô³o0N{Yé)„DÖ%/;ÐùfñK$ïÚHa^6CÍ;rh/ÿ›÷$›Ààpn{øUümaäe§óÆC7Ò®÷mìß³ Ga>Cþo:û¶­åào?cÏÏaèý3©Ó¬™'²üͧ(ÌËÂ`4q˃³©V£^)[^0Àg£Ëa'ã䦞t^žZüKÑSBÿ-xžƒ¿nÆh¶rç£ó0Y¬¼?ýnìy9ÈŠ‚P(ƒÿo!5*ôEÙþßiϯ0µŸÎÃírÐ÷ΉœN9ÄÓïá‘y?œÓî×@Ë.8±ÿWºÜ4Šjµ”›¶¬.—‡µŸ½ÉöÕŸañ @1šùÄümaœ8ðŸ¾> “ņmº¢.—Ç盲Ëù9Ù8 |ëç*+Pî¹5]óÕ@~öi¾Zô<§Ž%£(láQŒ|òí‹n{嵋`…e©Èße© ÿ]l;«èœʵ\ç¾kºŒõ[wÃãÑ1MÚ±ö³·ÊÕ_ÕíÜÉ·à(ÌãÕ ¸ÿ•/Ë“¥ÊZÝ·^ž=W>Rì.­È&3¡¡¡„……áïï‡ÅbñEruÝûN^ÉeÀ'’5MÃétRPP€ªªFÊæo Æßߛ͆ÅbÂd³d $ 4MÂå6ãtšq:=dffb°•@ T%q `µZñxìå¦_°Àû}`ÏÙ}ÙÛÖR¿UÜn7·‡Â¼l¢ë·¢û-Ø»å{V}ø cŸÿ€ÏÞx”ø¡ÿG³}X÷Ù›|ûþ,ÆM÷W£akzÜöû¶­añ´±ÜöÈëôºýaöm[ÃÊ%/ûòùôÉÜ8öYªÇ4âÏíkùjáóüë©…¥l¹wæçÞ€‡ÛŇ/ÞC›î ¸ÝîsÚP\)¶§vÓvô1™õËßbå’—xÏóÜúðð ðž{ÑsÜ>y^¹¾(ί$º¤T˜G‹.7²ø¹Qt¿e’$±mõç´ìzÓyí¶ççP§YŒ~€ù.7mYöÖ~:GnÄl @×½÷B·ÛÍòyOÐûމ4nÛõËß]?«\·GAsˆ¦ªäf¢yÇ~8dY9gY+:·+/»”ß–½ú0 ¯‹c؃¯P˜—íÛw1m¯¼63xü‹¥ÊRò¼ù»ìÂKõßŶ³sóB¸ÖëÜȬàú*fã—ïÒ´Cßr÷WT·#ŸZÄ[ áÞ™Ÿ—{\a^6LC~N²¬0öù|éÎgÏ•ÅeÂÔ¶PÜn7Øl6l6ÛEe˜““ƒ,Ëœ‚bq\Œ¢hÀÎ Ó—×—íÛº†ÖÝáv¹q»ÝÍVê¶èŒÛå&²Ns²ÒŽãvyØé”Ã4lÛå¦iû¾,=¾Üã"j5FV ÔnÚÁ·^œËQÈñý{X>÷1¯ÈÔu$IÆír—²Å»Oãó#¼F}:M~Nö9mÐuÝ·¬LÔ+²§Éõ½Y:{<šªs,iW¼Ó^ºŽÓžï;_Y_çW–Šòð·EÅþÝ?Q§i;ölüŠ/<¯Ý£Ù·ï\~.k£¬˜ˆªÛŒ¥³ n³öÔjtµÇbÏÏ&ýÄ¡RåÿeÕÇåúÉìÀØ>ñù{Ó—‹øæiôû÷“ç,kEç.™¿ËQȱä]Ü>y¾Ï~£Ù¿BWÔö*l3eÊR¼|>ú‚j•à¿‹mgSS/Lg\ëuîë‹Îq}mûñRþÎO,S=® óhÖq»7|‰Ç£R¿àH\ö‚sÚm4[p¹Õ¢.—±¬Ã]È©#ûH=ôk?›Gpµô¼mâÅû©ˆ&°tæ]ô¼ýÑó–µ¼sÇ ï˳øew—˃$˹íUÔf r2Ê-˹|X–Jóß¶³ŠÎÙoÔ³¥ìzÿ¹;°…G“0~öå±ù ×yéèå__¿nú’k>cøäè%†;œ9î<}€~aC šv¼‘e/ßëK[‘=W6R\&LÝ­gŽíÛÂŒ3_ø|è¬8€zmâÙ°|..§&íû]´ïΕ¶¬ªÇMan&a5V£!á5³jñs¾`ØÃóPLÖr‡2œ÷Z¢ü!Ž‚\4Õƒ_Ѱ}[$¼FƒÒíM¿ÊÃ'Îú…pL£mË.œ8™É—_Í[o½œK|汉Tê ’Œ¤(DEÕ ¼6JDvq ê¥§tsDó¯ú›øp·BxµëhÔ¬ÖÒÃ'dRSaÇÎ=Œ¨·§¹ ®‚Bq3WÿÂcYrÖv“IýK‘âäë‰iÖ¥Âh‰7òrf½çO²fé‹ü´bÖ úŽœZnô©ìqe×ûŒœÂÚe/±ý‡¥¨nµ›âVÊ–Ÿ¾\€-¼&KgŽñÙ{ë£ï] n—ŠÅ߯¡ßæ§/ Lô¿kºdäúFñá´‘ø…Ó´ƒÏ®ò|á,Ìcáã7ûÎ]¿}þ=µÂ<¼?\ÌÔhË=‰t»eòEûî\iËÚè²òÍ¢§q9 ‘$ Å`$n˜7ªÞ}øc¬þp?}õ6ÑõÛøl,ë'§=§ygXÒT•€àjt»uRQ$®bUtî²åé5â?}•_¿ðNµRwϼè¶W^›é’p…Њ|è(ÈaÕ»Ï0h•⿋mgç:ç]Ã×pŸ/R¼jñsøÙÂYþƃXümÜ<þ?gùàœ×’^~´7/;“Uï=‹¦©èšJpD ñ·N¬R‘béî—לõ7ÏfDhDLT0Áþ(ŠŒªj IH€,KEWTÜ*äºHË*ä`J6‡O’ïÐÐ+ø‹ç¶ª‘½=ŸìKddõêûáÆiipè “”” ‰XIpƒx¶'¥‹;±@ ¨RHAËJ­ßsÏvÞ~»-Š¢1vìÙcŠÌ~¹Ü|>›=†›ïŸƒÉâÕËtµm©J¾¸–mü'–Epñæeòùì1üë¹/„=Åýú¨«ô«qâöM«S'0…¿µ&õT:yùH’D°-ˆjá!ÜÛbsøåS¢å ‚*…)ìó³¶U$Šç¾8C8L T99¬xã>¬ÁÄßþ¶ðšWÍ–ÉÛØöÝ"tM%á¡…WOß1õýj¼n”5ƒ©U͛ջ-#ÏCJ–“Çs8”š#Z­@ ¨²D­(%Š?ú¨%‡±cwòêsÏ  Á5„ájN}‘tä4IGN‹Z×$YG¼nRû[ŽïM`ÖS7âå`@ ¸–: }Rn@ ü£E±^ò¯é@ ‚ €ììlá @ Á?Y¸@ @ðOÇ \ þéÄÞºúo[¶ÿí%*X „(‚ èI8A „(‚6FƒÅ@ D±@ üÓ;B)q/.ÿtŒB Á?ž ž}"%%…°°0âââ|Ÿ… Ò¿ßþÚµk_Vc˳aàÀ¦­_¿>ééé>;óòòxíµ×*ÅžÕ«WÓµkW®¿þzz÷îÍ AƒÐ4íŠWâåðý°aÃxï½÷JmÓu6mÚ°iÓ¦R>½š·ƒŽ;^ªmT?–×v;vìHŸ>}Ø»wo¥œój׿yóèÔ©qqqÄÇÇóõ×__Ðqe¯Å«YƒA*÷]Ý_>»™¥¯öà“×zðù½ˆoYaú²ŸIc[ò¿¹½YújrׯÄçbÛ|ɾój^3@pÅï“8 €ÄÄÄRÛî¾ûî+jpy6œjÕªñÝwßùnÄsçÎåᇾ$;œN'cÆŒaùòå´mÛ€ÌÌL$©ò#Nªª¢(Êõóˆ#˜7o£GömÛ¸q#²,Ó¹sg$IòùôjRÜRRRˆ‹‹»è¶qµÚî¢E‹˜8q"ï¼óÎ%ç[²}_iæÏŸÏ7ß|ÃÊ•+±Ùl;vŒ›o¾›ÍvÞ&e¯Å«YŽŠ"ÅìvcžXÀõ-ª1ù®Vü²;í¼yÚM êCÿ»W¢ª:áÁæRë–e Mÿµ$—‹Kš§ø\Q‚ŒŒ ÆŽK×®]騱#·Þz+©©©—µ0Û·o§]»vôìÙ“… –kç!CÈÉÉùËÑÄbìv;………DGGû¶…††–ÅçòAvv6ýúõ£C‡tíÚ•„„>\ÊÞÇœž={òþûïpêÔ)FŽé;æÎ;ï,eÓŒ3èÙ³'­[·fýúõ—äËpðàA’’’|Û>úè#î¼óN$I:«îÏUÖ÷Þ{I“&ùê($$„íÛ·0iÒ¤J†eÙ³gñññtêÔ‰Aƒ‘––vAûJ2{ölÚ´iC\\=zô 99¹ÒìëÞ½;‡:çõT6b·}ûvÚ·oOÏž=™:uªo_É㊗§NJ÷îÝÏj •]¦9sæðÒK/a³Ù¨U«O<ñsçÎ-eϤI“èÒ¥ ½{÷öµ‹²×bÙòWTO—£ŒFƒTáÎ,ÛøYßzt„••‹ú—Zÿæí0$æ=Û³IáéÝX<3þ¬u£A"<ÄÌs´åýYñ|ørwf?Ö¨jÖRy?<ª‹¦wcpŸÚ £‡6⿯÷bñÌxÞ™ÑúµÏcÿ¥q¡}ù¹êZ þv¢8??¿Ôã錌Œ ÓÞ}÷Ý >œ7òóÏ?3dÈ|ðÁK6¸¬ %‡OÜÿýL™2…5kÖ`2™Ê=~ùòåØl6/)ªÌøñãi×®ƒ âé§Ÿæ‡~ ä¿fŸË~~~,Y²„-[¶°qãFÆŽËäÉ“}ÇæææÒ¾}{Ö¬YØ1c3f ±±±¾cæÌ™S*}ll,kÖ¬aÊ”)<ÿüó—äg“ÉÄ-·ÜÂG}äóû7ß|Ãí·ß~Ñõφ ذaíÚµó‰˜ 6_é ûÞ{ïå‘GaóæÍ´oßžgžyæ‚ö“ͬY³X¿~=‰‰‰¬Y³†˜˜˜J³oÅŠ4nÜø¢Ž?~<Ï>û,kÖ¬Áßß¿Ât¹¹¹tìØ‘uëÖ•j •]¦ÌÌL233iÑ¢E©ímÛ¶å÷ß/eO÷îÝÙ´i}ûöeÊ”)t-ž«ž*»ŒE*÷£È~V…EÓ»ñÞ‹ñLÛŠM;Na2ʾýH”J_œß¯üB~¡›qS7%ñ¬uƒ"ñÌÿŲfó î{6‘»ŸÞÀ†­©LÛÊ——¿Ÿ}³™ðüF¾]w”à ÿ܈ñS72nJ"žßÈé,{…ö_È „eûÔ!C†üå¾¼¢º‚kK>‘’’Rnº¼¼<6lØ@zzºïfUYcm+>‘Íþýû0`€/ µhÑ¢Ë꼩S§2nÜ8~úé'öìÙÃ<ÀàÁƒ™1cÆy}`2™Ø½{7³gÏ&77MÓÈÊÊ:¹2IHH(u³Ù¶m_|ñE©Èt1f³™~ýúЮ];Ž=zÉå1bC‡åÙgŸeùòåtèСTdüBë»^½zØívRRRX¿~=Ï>û,/¿ü2·ß~;4hРRë%++‹ýû÷û~0 6ŒaÆw_Il6×]w#GޤGtìØ‘:TÊ:—ËE­ZµxõÕW/ªLðµïAƒñÖ[o•›¶¢¶p9ÊtAŒÁà³;!!¡C‡^R^Ž2V4”Á¨H:T&<·I’1¨!ü«ó>üÍw\Éo©è»ärÙ}~Vmš†dbì°Æ¾ü)q¼GÕùiûIß1.§‡äCÙL™Ð–¿ŸfïþLöîϺ¤Ëë׋Ÿ¢]l_þWêZ ®IQ|¡¨ªŠ,ˬ^½ºÂˆíß…êÕ«3xð`ÌÀ1b3fÌ8¯£FbÕªU4oÞœ¤¤¤R/Y­Vdùì@~Ec–Íf³oYQ”JùÒ¢E ¢¢¢øñÇùè£7nÜ_®ïnݺ±jÕ*ÒÒÒèÚµ+“&MbåÊ•—%J\H’ÄÊ•+Ùµk;vìà…^ &&†ùóçW꺒?,eYFUÕRmä¯PQ[¨ì2…††Êo¿ýV*Z¼}ûö³¢Ç•Me—±¢ÒƒWÈ–Ü¿ak /<ÜžË$dùÌ mV‹’w]1H¾åâ¼J®›Œ2º“fmÆãÑβG1H¸\*Þ× ÎœÿñÙ[hP;ˆ†u‚ù÷ƤeØùÏâ=ˆ¾\ . ùrdL«V­xã7|Ûrss/kA‚ƒƒ©_¿>ß~û-ÿûßÿÊMgµZ±Ûí¥ÄÇ_!//ÄÄÄRÃ%víÚE:u.È.— —ËEµjÕøàƒÎy¾   ÚµkWêæž™™yÙȈ#˜9sf©(å_©ïøøx^{í5:vì@§Nxíµ×èÞ½{¥ÛBƒ |maùòåtîÜù¼ûJât:IMM%66–»îº‹)S¦ðóÏ?_V_‡……¡ëºo ìòåËK•©^½z¬\¹€¯¾úê¢ó¿eš0a=ö˜¯¾;Æ‹/¾Èøñã}i<Ïß+V¬ S§Nç½/´ž*«ŒÅ‘Ù³>²tÖþv-«‘šVè"ÛÝHÔ‰À¨Hto}&}Ùcˬ;Ëå–êù¶ÙŒç<·ŸE!2ÌÂác¹üx”¿L¢YƒŠí¿Ä©æ.¶/¯¨®àZà²ÍSüî»ïòàƒ²dÉ"""hÚ´i©Žõ¯Rüºd§],æÍ›Ç}÷ÝÇìÙ³+|dBBBíÛ·ÇÏÏï/+ÖuyóæñÈ#`6›QU•ºuëòæ›o^‚‚‚˜ëúÿ«}Á©S§9r¤/ÿ;ï¼³RÊôöÛo3yòd$I V­Zצ(.ÜñÁß®ÁåæòÞª÷¸ùÙ›éýXo>øáLž<ÈMÏÜÄ¢ï‘S#®Î‹¶Õ_a IDATàðñÃL{s}îïSîþ'OüíÊœ““ÃÓãÇ3nð`’“’®é²Ü8â&ZõhÍúÍ®ér|óÍ7<òÈ#<ñÄWüÜ+V¬ qãÆÞ~&7—öíÛ³fÍÆŒÀÝwßÍðáÃÙ¸q#?ÿü3C† áÁ`øðá|þùçx<>ûì3úõ뇿¿ÿYç¹÷Þ{yä‘Gؼy3íÛ·ç™gž9¯mÙÙÙÌš5‹õëד˜˜Èš5kˆ‰‰—@PŸí¶Ûøä“O(,,dË–-ôèÑ÷ÏÏÏ%K–°eË6nÜÈØ±c™¼]ÖKmßž¼€?ÿÉŠÍ+|Û.Ÿ¬ÿ„›WÐ9[ºÝ"ÄqñÐ0Œ† -„W³{ºü_©[-Œ$« ‡±|Qœš“Êa×a6Lß@‡˜ÜÐ&ë¡2ߟ¸‚‚‚HÊÉa~÷îŒ[·î’ìÛ»w/;w¾lÿèøñ¢E¬›9“{ǧ׈¼Ò£™ªzÍ×ë¼Á¯³¯{Oßõ ›~ÙÄÜs ­ôóTvý,\¸S§N1ù‘ûÉwYضσd †õòû¬¼›@JJ V«µÔÍLUUdYfõêÕ˜L¦róºãŽ;Xºt)µk×&;;›.]º\”-²,£–h‡‡Ã·,I+W®d×®]ìØ±ƒ^x˜˜æÏŸ/:4 Š1bÄî¸ãvìØQj»Ãá`Ô¨Q¬ZµŠæÍ›“””TîËu¥/˜5k–o¹÷ý¢~®xLqyc‡Ë#,, ›Íæ³3!!E‹]qŸ^”(öü¹–ÀÂe¸<Ѩí¦x·å§uH;ƨ‡‡éÎdõ 6ŒõÚR˜€µïDÒ3Ò™¿ÌÛ©öíÜ—¦ šT%™„DHH!!!dee‘ššŠÝn/•F×õ³irà ]Fa€ ›>²Rm:p ‹‰íd_¦Œ¤ƒ®•VelÑ‹·è%–‹íIY1€$éçaös-¸þúÈJ÷ãïc†R»‘‘šÍjcnÓÿÈ]·--$‰¤Ú69Àœ½]&Ü1úµÏŒeR¬ »o&wãzç›ik³Ó©¦¨(¬»v¡=ÊüÞ½÷ãU® åää0útœ?üÀ+‹S«(çeƒkU×xºÍcô^Ùƒž÷¡ûÐ|ðÆû´iѦÊÚ¼hÑ"?8Ž?Nøq*ÏB»ŽêD*l^]u~ÐÓªU+Þxã &Mšx‡Xé/È“O>Éܹs>|x¹7§4hÀ·ß~ËM7ÝÄòåËéܹ³ïæ£ë:ÉÉÉ4lØåË—ûŽs:œ>}šØØXbcciÕª÷Þ{¯PA¤_¿~dffúDh1.— —ËEµjÕøàƒ*¢ÛÑ®];æÏŸÏ„ ï» %£ÅY–‰‹‹cëÖ­´k׎ÄÄDß0³*+Š ç>nf‹•ÜM3ÐZ=‰#7€?3ÒÈ’²Xqsu†‡ã;·â—“…Óåä÷C¿“Z˜Ê¦½›èÔ¤ýºö£iý¦V-q|8õ0iii„‡‡—Ç'NœÀét–‚¾}¡{w0›Áì•kÓCï  w7þÕ&œ&ÆS4Ž4áÁ€¦éEÐt½H¬ëH>±\zY–@Få׃l,lÉ©4;OùŽÄo*W¯Ou/1­â×ë.”V}1ž²,c2™xíµ×„ú®!‚‚‚˜úЮu;¬fëUoHO-yŠ-¿mñ5–ÈÈHÂÃÑe™”ÔRSR+ÃŤïï@S룕:„¢n÷L~ó&Ì:´ó?A·VÕÑ$ާç»mßòóo?áp:¨ÙUW)täѺAsz´íFê0ÊF¼%ïÖíäƒýuq*6-ù“·Ì(u1\ ‰õB¨×ÒHL›ºXºŒFi1É/<Üö½ümNü´™m…‰1a¬ˆÃêQºæk[œ*uO8è”ꦣ)˜N° ‚±^=Pô¼<<;v·y3ÛfÃéÓLþ ãÊ~<¿üÓOùæé§•ÀÀ'Ÿ„âÇߺGòʰalÔ4êtéB˾}rË-×DûágòíêïØ´}¹ö\æüð&}kôòíW$…ç¶NgÉ]ï1¼÷p¦?>­R†STVýÜ{ï½<õøDräšü|8[ÐiÅ6p~nÂXc3-ÚalÝ t8üÙ ÆrˆÁ~èG·°ãàüo~õs¦¿Q%†S¬\¹’¶×Çb gåÏÉü °gy0òòžËnCHHH…û.öå@ \>.L»íh‡~Á™‘Ф›ÙøýIz(_{EqëN^ÁS$ˆ ¿ýšw¾?;ÀL€A"Lr’fMR|/”Ȳ 2h²†Cw°ùÈO$ŸÚÍ)=Þ á+#QìL|›àè£øW3pW[oØÒ‘þÁ@kwCA6JZôOÆœI®ÓƒE‘H>x’ƒºñì“d,¨UK¡iSî‚DÜžÑWUŸKb±Xå ¼õlºw/±RIÃHe¹H[‰bY]E‡”œc˜ÌF<ªMÓ0›Ôª-Zx Ð8q˜>E6Zд¾H€¬H((EyW&ÿÌb]Ïú´Ú¶H'˜®s D·BR¼õ/æèz÷†Ç©Òê—­è309TdM¢ÍÉBÚ¨ 5:´&¸X—½ºª¢=Š}Ç’à‡S§Øqÿâs9øþ»ïXñì³ oßžS§zYVkZ…Ëá‘‘Œ}ôQº®]Ë[S¦´u+¿ôÒUm÷óÞ}“§g?Mèc‘¼=`!ÅLŽëÌ\ÜFÙèÅr‘ V$¹„HþzÌLo:‹ “`ÓÖŸ˜?ëÍ«VE‘‰ŠŠfÝ®˜Ìàð€¡èÚ9r:SÙ™4÷@ \¨(Öt'æëÛB¹/д>óí¿sl[:ÇBçâÝO=2ƒÎÒ"Ïbš5¡U+hØ¢¢dlwW(6ÿ*k·§ñýϧøóx!G³Ý¨ðxtni§0~h}‚ƒƒÏùת&S‘aX¬àtú“•gA)4óòdr CéÖêâzæa²HȲtynìRñ«rø¢ÄŠº ŠÁ€¿¿?‹…  dÙCµjy˜ÍÈŠFX˜=4IÍ饲,£é:ª.Q™&§žJå­w_%Ë`¥à„îD8ø€É÷ÝG›¾}½C%Tµ||žOãØX¦×¨ÁK3g2)%…Ù~xU:ƒqýË~\FÏùýÔè&ì;NÕé¿^Al/%‚²Á'’‹ÓÈ’ÌÃí&Ð哎Ì|øE~ô‰+®ÎŸ}„……¡ýPe ‹ŒÓ£áÑÀ£ƒ[Õqz<`7@ \ (VczöK:ö}ß³nßa¢¬"²°¼w ãÝwšœ–²'+œÍi§)”TÒ5…=#ÈÞéÀ¬VˆŽ†ë®ƒ&M¼ãsÍfï>]ÒÉ/È'È?¢R 7qÞ¯ü~ÊLßõhÞÖJxˆ[™|·Æ¯oÄoñ†GO;IÏ Ãé²àöø¡ë~ ø™ ô÷#ª^¶3Aþ&ƒ D×ð°ã›MŸ¿GƒúN¢ê˜±X/(–‹†JŸ hN E†¡5ÈÈ?Ãå 4TÅlÖñó3MÓ¤£(dLèx5˜T,¬‹4›R‰‘â<@¡§½q’ð¤fÐÁóQ ½¥St $ÅpFW&,¾/šCŰu’b ºýõ„ÅÇ{q‰!ºÇƒëØ1ò÷ìáÀ‰£l6d±ÍæÇ€=tU.œË–ñø=÷Ц}{ÈÈðþÊ+)Š5­ôzEûоýL&¦>ös_I#F\qa<ãõYöã2º¾Ôƒ®1Évf#K²OË’âÀ²$£H †‚X–dŒ²‡êD‘dT]£ap–.YÊíC‡³ô¿K¹ýÖÛ¯x=™Ì&4ýÀ@¡ÓÝéÆåÖPu¯8à‚Eq@Ãv^!Ó°ooMà “‘À[†B`8œÿÝÞïÀpoŠëÍM|æ¶¢zT$ï<`X­ÞÈpëÖЬ„…ÃÅØ5'ïñ>=Û¨”éÚVlqðŸgâ ƒÌ|HsÂÁ °˜Ŷâã ©lþ´ˆÑá~Ä6½•@6V‹“AB’AÕÁéMRÉµËØU´B—l"×Y“GOZ݈Ù"U8¡õ%‹b¼ÂX)1ÞAúµ¾ û9”v«ÕƒÕêñ‰Ðd=£Ú£ZI÷Н(–½"Y§R#ÅuÕÁáp––ÆEFEÂs*ƒ®½D;<ÐÂ…)ª1’ì'Y¬Õ£¨Ö­'’&#Œ„wë†5<üŒ ÖutUÅyü8y¿þÊþÔl6åÕÚÎÞßí$oþˆÃ¹ÇËý¼ËIÂã³hæLPïü¯‡yg›0›½Bʈ^Tõ̧äz™4c† á¥Å‹yiêT:õŠ”å«U_ñòâ—i3½=mkÄ’ãÌ)¹†R¢Ø |cˆ ²YRŠ¢ÆgijSua÷Ø©X‹ãù'˜2ñYZ´¤Vt­«ÒÁÙvà‡Nèsà —µ™Y™ÜÿÌä1lÖ ögÀb°àg´b d&ÅT$‚ψ_Àðh<š‹ÁB¿˜¾LÛü"ë[ÍÈ#¸kÄ]´lÙòªtpé'O“›‰Íb#×U€¿YÆd4áo1_`Çîp€*n@ ¸HQìWp”þã«G£¥¥ðÕ{?qÜÆx`[v0©sWsÇø^ÈÕ£óØäLÿˆ¥j(ƒ7JUñ¬ Å¢*( "ª9ð«³å’ gÒ éí¤{ Ù…^}¢iÞ¨¯S· 9…EÂWUÆáràPeTUÃS$DuÉ»¬jÞïBH ˜k‘›åÁíÒд"‘©ƒ¿§k¥U’"™Ä@‘e(!Llþ6bëÆb2šH)th$2¨ ‘ÔÇ¢7B‘CQµÈ~]WPùŒÈ¾<#>0™LD7®‡34”-G?|œöIÉD9u‚š:0GÔ+%Œ-E¿¼ÎŒ!ÖÜn©©dÿñÓN²=ÈNn{ n4Q/ÖŠÿr…ØXïËÑÑ \Ù‹§gïÞ4hÔˆ×{Œƒ÷ÝÇ3fn³AR’Wìz<^Áëñ”þ”ÝVr]U ·ZÅ+S§^vQüÔ̧ɭ[@ç¦ÞöZè*Äéq’çÌóF‹‹Æ dY’|¹ìwýàzÜP³-_ʼn‘çîšBÿ>ýiذáUëà9xð 1±]øép!aþFŒŠ“"£{d$!Š@pñ¢Ø±óSäÛš¢¥cÛ»?óuXÚ9¼Ó eɼ‘–ôún¿?9,ŒúFÕwÃQ”óGQ#" _?™zõ "B»ä†‹ ÔH9íÀî²PèôŠU·î¢oUóð”X–d fs¹i¨šæÂEbØS´ìR½ïU)2Xƒ#ÉÍ·KGWuüõ8Bÿ¤֯´J*9û„Ùè.мê[ÑuªبV—BxP µZ`qWCÁ€¦å¡kzÑÜš£¬R¥GŠËû‘c­ }Ú²okò®}´Ù€h‡Jp–ˆ:ȼä¨y<ØOž$ë?8žÎ®'YíTêÞh¦^¬¿…)S 4ôê^@111¼¶t)¯ÏœÉ£ÿ÷<ðÐC´éÒ¶n…²ó'}f9=Ž÷ èÇÏÊ·sd$wïæíÿü‡{º<ã¦×oÞÀ²¯–Ñ`Z³r÷Û,A4 oJ›ðV4±ù»Íwö-&5ÿd©´]¢;áÖ<´ÚŠú9uynÚTb¯‹%*êêþcÜèÑ£ùì³ÏhÙú:Âü#È/8ÙdÄ`0¢ aTÄM@ AÄôeù´iÔCI®Ý0ç{Ãs¹•ÈÈHææâxòlN¾uŠ® IÎóæ_½:T«æäB’äKÅ ¢MH)DÖƒÑÕ¢7ÎKŠâb±[,ŽU<ûi®|ïnýLtXÑAÒ¼Ñe»Ì¯Èö '?I¦0µ>A¦ûq;š³-ÝNó:l–Ê—%ÆÉ5“e÷>ªÖ5M×ÐuM‹!Øpî<ä]×е¢¿.N£ƒ®â& ]’¼‘mé ´² ? ®oÈá<7þ¿'a:rÉ©BSKXôYã°uMÞ–Föš™É¯&§›ª4¸ÉâÄpõqI|üq¾jÒ„™Ï?ÏàŽ¹í`Û6¯ð-â•AƒØâp`3™hÝ´)MÛ´¡ÓÀøi|ù%uzÑ#ªOnžÂ”ÿ==°Oî|ÿß¾aaÖPÔîÏœ]oòùýŸ0¤Cžž@ýúõ ¼êõÒ¸qcrrrعs;mÛucsŠ+ ÍãF,ྫྷ6¤¤¤Ð¼ysFŽÉ믿îÛÇ.)ï¼¼<-ZÄÃ?,îf Ê“’’BË–-iÖìL0füøñ >MÓ˜9s&ßÿ=yyyÔ¬Y“+VT]Qq]/V%_j[´~4²ÕMD` |†¢(X­V¢% ]/Äßÿ’tîçÛŠâýT-êòëÉ|4¼"ØSB»õ3bXՊű„b EQ ¸Ô\TM;AVA/Ä.LEÇér8«~Ćƒ±è¡Èþ™Ø =tq.äÝׯ4Q Þó~{ÀŒ.™½C"ІrhEßj‰å’C=´¢±Îª·7ÝKåÎ>q.Ln‹GÅOÖ1àÁ•y’üä_qgd ÌÞ±(º„®ih.ŽŒ Ü™™uIÆi‘¨^Ý„Õ_®²ûÀ„4jÄÛÏ>Ë‘äþY³ð‹Œ„íÛ½C#€jC‡ÏÁxoýz¼ÿ>Cûöeà=÷àwâ,_î_ 4¶Ùhrô(?%&sç•jë¡#‡ønýwÔ}¾q©íjuäßîäžÇsßí÷PÝÁën¤u¯Ö¤_—ÎÜ¥ó|iÛD´¦{T]ßé‰6ÏÁä;&2ä¦!4iÒ¤ÊÔ‰Ãéàæ[nfÙ’eÛlÄÖkÁŸ¹òóŽ¢ äØ/»V«•U«V±ÿ~4hPiùæåå1wî\!ŠÁ5C@@‰‰‰gmíµ×HOOgíÚµH’tÖ§U9Q\?Xê“ÿÊÇlõoˆ¢(øûûãççýóâ É$c6ç…н"´j·_åâp{#¼¾HqQì)Öuƒ)³„Ý™‹Ë“‹KÕð¸Á(ƒÑâ¡°ÀB¡ÓHŽ£ù®BôZ½jÑc`æPŽlØ@ÊŸëJŲ×kÍû§©Ç<Ø3HJ±ÍåŸY–ȵ+ÈŠ„-Ú MõF¿¯D¤Ø”‘Oõmûi™r„ú;~’Žæ( ÷À¯hûö¢ºe4·(È#ŠÁ€l4"ØL&ZªF’~×É^£ã¤á]uŸy7mÖŒ©ï¼Ã›³góàw0iêT÷ëëÖB¿¼‚fÔ(8À’9sø±8íèѰp¡O÷ gá'Ÿ0¼’EñÒ/–A ™ˆ j¾m·6†ŸÁÆ÷4§úž0&žH€ÂÃɈˆ`ýæ Ì]:“bâÆºý±™l´×–új3ù‰ItéÔ…š5kV©úØúëVÞûö=N¨'XþÍ—ôïå NL "ZïÎÇãɹ"vFzè!¦M›ÆâÅ‹ÏÚŸ‘‘Á£>ÊŸþ‰Çã!&&†×_¨¨(’““IHH`åʕԪU‹Y³fñǰxñb† BNNqqqåÞhàZàí·ßö b€Zµ®ü¬E—,Šsla¬$Ì·.I%§%Ó}ÛdYº,33œ‹æõBÈÌJ"Ïî’º´³‡O›äô@Ë;ã„ÃN‚ª… jAhj.9Ôj8Âpêró½ùýd4G.ÎŒ£èº„&û“ÿëW„…WÞ³}Å;å°7 ,ƒšm穞9‡š¼C"(áîëð9! IDAT>–ƒÙþ=ÓLÇD`¸Ù(ù~È—9ðjÊÈ#rk2-÷'ÓØ‹ŸQGsŽŽîñ º<¨NP ŠÉ &’,ƒÁ€"ID(ÿÏÞ½ÇEUæÿÌ0 7¹*$^ð†[hÞ(TBɼæJjJ7×Km¶¥n&eƒÔ¼ì¢mfi›Ù¬µ­Š­‰VÊOS+K)µ‹mj+”$ fæ÷Î hf`¸߯׼tΜóœç<çaæ;ßyÎsœPëœøö}ÕºNÀ–{{{óäòåì2„§ž|’Y±±Lúãaûöjëyzz2hð`½þ:;wì`ÙsÏñðìÙ »ÿ~xõU(*b°ŸWNŸæä‰ <ØauÜ“¾FþúçÏ€»ø¥äf,eÌ£™¿f>#FX¾XôσaÓ©Ílœ½1F3ÿYëë6·3?œ¡Âµÿ>þ|Sð úôÜ2„Þ½{ãáÙµ»:šæŽˆsæÌaãÆ|ñÅ\wÝuÕ^{àx衇¸í¶ÛxçwX¸p!ï¾û.}ûöåÙgŸeΜ9<ùä“üûßÿ&==€;v%Á°¢Õ(..V¾È›ßÇœœœ(((`ÕªU|úé§ôèуµk×6y¢¥ÎA±ÑhÄXaD­Q£¶Q™ps+ÇÍ­œ+W´˜Lªfix?oWô¥¥äÖ¥2[\~í‚9•ª2øý!.@AYe&V­­Óµ‡4NN¨U¾”•ùb4ý:S…ÞPùPi]Ð8»RQZ‚³¾˜«yù8ç£WØ@‡‡ùB;ƒ©r¢­³‰îÝ´tìè†Ö©TPRf9HÔhT¸¸^¥£Ÿ m…Ô׆U?Oñoâ¼b?ý–g¿#ĵue@lT¾@U‹á­¿90ÎsæôÊù#ÝcUxtV·è?üØ)SèÛ·/¯ÄÇsþñǹZVVëºëÿøG†Ýy'lÙ‚»FÕŠcGŽ8,(þáü|õÝWÜ0§²†u»I ˆšø ÷N»·Úx¯šnÿ×~|î{âç,&vB¬Íu›[Æ—”¹–áé鉻‡;çóÎó¿ÏþG¯¯{ѧ{/ü;u·c§&©‹V«å‰'ž`ùòålذAY^TTÄ¡C‡ÈÍÍeÙ²eÊûlU3fÌààÁƒÜsÏ=ìÙ³///„¢5²4|"77—²²2&L˜ÀK/½DRR>ú(ÿþ÷¿[vP\úS)FŒ¸vrE­µ”xz–Ñ¿.®®åœ9ãO~¾[³4¼““îÎ\Ê×Óµ³–rCe`iRÁ‰‹ù#üR .pw7Måÿ¯ÝIÓµŒ²9p4Û­¸vÁÞF ¨]½©¸z “¡œ+—þ‹¿‹Ž.]º8.(¾v¡ÁFU奥äå_aõ›¥””©ˆ¿WC'?w Óo‚â’’ ÜÝ5¨M•wÃ3~.âè1Åú«zôWõøa¤ë'ß0èÜw\ïuO9Cl96b;@vR©é¬Ñ¢.Òrjw)?RA·ßC‡.-;0î?`ËÿùO6¯]ËÏnnŒêßßæºó^~™¿MŸN÷õëé~Ë-ðÿÇ®®ìýüs‡Õéð§‡á:ž®ðvóft÷QLþC,cnm3 ŽŽ¼…1ÃÇðóÖŸxú¹Dl” ɵ³+¦2………899QQQA¹o1^COPfø˜·wwæOÓn²úÄÅű~ýújƒµZÍþýûÑj-ßsZ¯×óõ×_ãííMnn®|ª !Ú”Ž;âííÍøñã+E±±lÞ¼¹ÉëQçˆbJÄ:wèLEy…Õu|}KùÝï.ããS†Z]÷1ÄF“‘ ƒÑ!ØÕKÅÅÜTª_3¼ï„Ÿ€Ÿ mõ×Ê**3È%UWË+%•Ú•^[§B 9?êÈÍ)ÆPzTÎèÿ›AP÷οùy´A'É|ó£9ËkD¯/§¤DÏ[¸òÚ.w ‹Ê)×—SZZãQRN™¾œ*¼<Õ ú5Slrp¦øjöUz¤ÏU/ºò 7ýï;úw,ƧƒÉæÐ™ Tä9kÉsv¦ÂV` tѺ0¨Ä 퇮\ø‘¢lc‹ÿc÷ëØ‘ÇW®dñ_ÿʰáÃm®;84”¨gžaݳÏÂØ±àæÆï¼¼Ð}ÿ=—.9ægþ¯¾þ B*Y˜=`&÷þk6ƒ*nä™??SkÖ÷_‡·7½ÍØÛƶø€À¯“;w¦S§Nh4œñöî@׮ΌsgÍ;…Mû†«V³téRV®\©,óññaàÀ¬_¿^YVXc:¿gŸ}–Áƒ³sçN}ôQ²³³Ê øJJJ0d²e!Dë¥V«‰ŠŠâÓO?*¯¸þúë[~P>(œ®~]©(® ¼¬ü7?ó¨T&Ôj*UÝb£ÉHE¹¼Ÿœ=îì îêÆ?_­œ}Á|G¾­ œ®ÝÄ£ìÚ£ÔðkÐ[R~íQñk@lþWo‚¼ü2òÏž¥{7_JŠK0š\ û ={ö$ Àq'©j¦øÚ¬¥¥”•VàîbÂÝ͈¾¬¢rY™å‡‡‡ //•›Ërä˜â—þü³ï˜M`ÖiBs¾£_§b¼:TŸŸÚd! þÙYË)/ON{{’«uÆ`#‚V«TtÖº0 Ô—ý\Øe¢8Lj¾¬åÇøÙ1Ü}³fq¥o_v%'Ct4ÝÝÝ)½x‘üü|‡ÔãËo¾‚>jzúõä[Ýw%]&þÁxzöìi÷qøøø´Š7Z*4 ^^^tîÜ™îݻҭ[<==šü³‰'þæýaË–->|˜AƒqÛm·ñÌ3Ï(¯íÞ½›ÌÌLV­ZÅ 7ÜÀO<Áܹs©¨¨À××—ØØXÂÃëÑBˆÖfõêÕ,_¾œ¡C‡’’’ÂÚµk›¼u>ááæÁ˜ac0d8ñ¿6‡QÔEE¹Ýe—~pC{5Œ¾þ19Àzv ó\1NNðmûÜœ+§X«ú{}y•iÌ*Ô QW-PW÷j¾5²ÁT9.ù»ÏN³pb>8þ Ÿ_r¡üJ1Þ†‹të¿¿¿CƒbªL¹f0šÐ—•cBÅÕ27ÊÊÕ”••SVVNyEõ°³ÂI…^_N0iÕä”ÿz£S#ÜÑn_g_‡w¢çuÅxºUÞg¤fö×\Ãrà’FÃ×:ð™\\Ñüò3N?–HefØb§U©éªÕ¢Òk9y@Ãy…øÜp!£ÚΛÃÝññücÎnݸ÷ýûñÓëùáûïòÍùãÏ>¦C´·õ¼•?>û 3nÐ"æv´â_ŠqñtÁÙÕ­Ö ??=ÎδڦvÓ¥KΟ?_mÙG}TíyPP©©©Vƒè‰'þú¥é¾û¸ï¾û”篼òŠ|š !ZKï‡f]»vå?ÿùO³Ö¯ÎAqñ•b¾=÷-r/€Ô ”ZQnBwÙ@î9Wœ¯ åÆÀ tî‚›‹c.$éס- ÂŸCyåŒ ÔŠáZЩ® ŠÔ•£ºF–Óh•¾ýâ¿L¼Ñ…r7 Nyhý~GÉùãü®³/øúú:.(Vÿš)6©Áh4qåª7“š?Üz ƒQ…ÉÅWô¿Sì¤VQZ¢§ƒ» •› ò«_hçìàØÀ§ôéô ^ž`Ô[¾ƒ®êÚ—K8ó]rnò¡Ä¯7*œ \Ø{Õ÷FºÚè N*ÝÝ=0•kÑêNìCImêcph(Þìß¹“IÒûË/ɹö“¹#„ßLΕ<޹pçú;[ÅPˆú¸±Ó|ùÓ—¨ÔhµÐ¥KѯS&Fÿ†ÚÞ õ €Bˆ&Š}yŒ÷½O…[nžnõŠ+Ê äçÉ½à†æÊPúN&°—ã‚a³ànžä\$¯.æþ:d¢Z¤k~¨+ƒÎŠk•êÚø’k±Éj äžËãw.y Ìgõ ¾Á—3gKÑŸÝO¯°^\wÝuxxx8î L•U®0\›¯¸ÂD~^FW¦FP%z5¹¹z µŠâ«z<d ý'Ñ=xZg÷F=@•JEd_ø{êqñî¡êÜ_ׂa•SÍm¨–6U@…ÞD…þ 9g¾¡,÷ÙpšÒ¼‹˜®ü%¹¸êÿËïúØ}1U],^‹¯îÅ¥³oå˜â’26ÿgg5&SmÇúrEοà¤ÑpU®FpÒÀ/¿2bp©Cƒâ Y’õB.¦OÑ7@[•.Qa€ŸJœùÌÉ‹½»2fj =¹ñãÅêýƽ£†n·»ñ#*¾ÿ—õz˜LJg5yz=G‹Šø '‡×®Vm‹úM˜À‰è8x0åW®8¦ÐëT¼uz+×iЀrʶ(l@×u¼ŽO¾ü„ãgsùœ/§ŽøºôãwAé0OeÉ'BˆúßÑ®G—Ü×å>.d_ààñƒœüá$Eš"ܽÜ1M &*JKpº¢C“ïEΗžh:ö%¤ëzÝp3NNM—ŸY1÷zÆÇFUîCÇN~Ê(BÓµYL0Àh,ÇX^Œ¡TGyñÏèu?RžžŠüó˜®^D]zwÓ:¹˜èàªÁËËß@_¼½½ññ‰¤{÷îôíÛ×á,ÝrK7n¹¥¬²´®™õb+Ë[×ë£c¸>:†Ï¹Ÿ³_ï¡—ßU\Õ•3|\¼¢áÞ|Ñ«+eƒ‚è=øG\ÝÕg*ÑtPQÖÕÂÁ]8o*G•ó½\\p5™È-+ã“âb>¼|™õm8 ‹Šb_j*1·ÞŠÎQÃDT|øåGD^êбï-UP— ‚ºqS¿P ¯fÓ% þ¾ÝB!WýÀ¹¯Ë}Dœ ýÓtÎüï E^eüð• n`P§±L £¤´˜.þ½qrrnòƒôññá­Çû÷äZ.–þ•IOÙÕŸ0”ýW/BÉÿP•äà¤ÿ­±'=.j:{¸áííïï|ñöw?<==quuÅÝÝ777<<gÏžeÒµ©÷¦M›Æ´iÓðööfÈ!Ìœ9“Q£FÁСC)**âСCäææ²lÙ2ŒFÛ·~ONNfÆŒLœ8‘Å‹“““C`` œ!„ÅB!‡ŸŸ~~~|óÍ7\ýõõ*C¥R±wï^Nœ8ÁçŸÎòåË bÕªU¨ÕjöïßV«­µ½^϶mÛÐjµlݺUY¶uëV{ì19YBˆvM†O!D#›?>O<ñ………”••ñÆoT[Ç××—àà`eŒïŽ;6l˜²~NN¡¡¡Üÿý$$$pôèQ|||8p ëׯWÊ1ïÃ’´´4‚ƒƒ9}ú4YYYdee‘ššªÈBÑži ržN!„㡇B¥R1vìXœœœ0ÊЈª^}õUæÏŸÏóÏ?O@@¯½ö%%%Ìž=›ââbÔj5Z­–^x€-[¶°páB’““  $$¤Z\UJJ Ó§O¯¶,,, £ÑÈáÇéÕ«—œ,!D«äˆXV•ŸŸo’¦lz>>>Òµ›)ˆ¦z#•›w!DëäÈ›wȘâf ˆåؾ`Å\ˆæäëëkóõüü|i$!„h$(–€¸ÅºõÖ[%0­ž½BÑJƒb_ܸ¦N*POÒ7[Þ—!„¢MÅ’•-9 –¾)çD!„hô Øü÷õ×_K«4¢ˆˆi„z_Ò7[–®]»J`,„¢ÍyŠ…B!„ÅÒB!„B‚â:ºté·ÝvPyUõ¼yóê´MKréÒ%Æ÷›:6u}³³³éÑ£Gƒ·mH9öì§OŸ>MºÏ†ôÍö¦¥ôe!„¢ÝÅUùúú²iÓ&iE!„BѪY§ø—_~aíÚµœ;wFC—.]X³fMµu.]ºÄ=÷ÜÃG}d÷6ååå,_¾???îºë.î½÷^¦M›Æ±cÇ(,,äÉ'ŸäèÑ£?~œ‚‚ž~úiBCCÊ;œ­[·Ž~øƒÁ@`` K–,Áßßÿ7õã7xÿý÷ñððÀÉɉÄÄDzôèÁéÓ§yî¹çððð ,,Ìfã¼øâ‹|öÙghµZV¯^¿¿?EEE,^¼˜ÂÂB4 >>>,Y²„®]»Úܯ=V®\ɾ}û¸|ù2ëׯ'::€Ë—/óøãóÍ7ßPQQAPP/¾ø"6ËËÊÊbþüùèõzå–±¿Y/))‰””<==Ñh4üýï§oß¾?~œyóæáéé©ÔÅš§Ÿ~šƒâêêJrr2èt:âââÈÏÏÇÙÙ™N:ñ·¿ýž={Úܯ-æ>7vìXNœ8‹‹‹rnª²užÒÓÓÙ½{7k×®Uúä”)Sؼy3*•Š{î¹Ç®>Y[]jë¯UûâM7ÝÄ®]»Ø»wo›èË¢ºýû÷“@ii)>>>xxxššŠZÝô#Øt:7Üp³fÍbõêÕÊòììl"##9þ|µÿ !D{aõyéÒ¥ôë×·ß~›äädžzê©Z «m›ââb}ôQBBBøóŸÿŒJ¥¢¸¸˜¶lÙÂÃ?ÌâÅ‹i«.µõ×+V(}ÑÍÍÍⱶƾ,ª+++cΜ9Ê“}ûöñÆo R©š¥>Û¶m#&&†ÔÔTôz½œ !„°•)...æÔ©S¼ôÒKÊ2ooïZ[Û”——óÇ?þ‘Ù³gWã¨Õj‰ŠŠ $$•JÅðáÕçæÀåÊ•+|öÙgäçç+C6ŒF£ÅºtèО|òIÂÂÂ4h¤¨¨ˆóçÏ+û=z4Û·o·X†“““²^LL þóŸpvvæë¯¿æÿøÅÅŘL& mî×...ʘа°0.\¸ '‡"77W ”­wUùùùœ={–I“&0mÚ4¦M›ö›õ¼½½2d3gÎdÔ¨QDDD0tèPt:gÏže„ J&Õb'Òh”õbcc•”hµZNžê¬ÏÓO?Íßÿþw‚ƒƒ9wîœPYÛï³Ï>kWP\5ˆ1PƒµZÍþýûmfkëK¥R±wï^Nœ8ÁçŸÎòåË bÕªU .»´´”Y³fñÁп¾ýö[Æos¿7ntXvÎÚy˜}ú(Û§¦¦ZÝWEE…²Þ{ï½Gdd¤Òz½^ù°ë­·jݯ=¬›ªl's»†……±téÒÝzÛZ]jë¯^^^tïÞÌÌL8Ðæûr{–˜˜ÈñãÇ™5kÎÎÎ,X°€§Ÿ~ZùvòäIÆǰaÃxþùç•¶îÖ­!!!Êu[·nåî»ï~ýiÙ²eDEEÅK/½ÄÅ‹­Ö#99™3f0qâD>ÿüsrrrä !62ÅË–-ã¯ý+»víB«ÕÒ¥K‹ãwë²J¥bÑ¢E¼òÊ+ÄÇÇóØcÕ©²+V¬`ÕªUìÚµ ???z÷î­Œ[ÎÏÏçÉ'ŸdÓ¦M”••ñÌ3ÏpõêUÔj5ÎÎÎ<ñÄ<óÌ3<÷Üs¼ñÆ6îС_|ñ›7oÆÙÙY¹`°C‡Ìž=›?üáøûû^-г¶ß†Ø²e .$99™€€BBBªÉÖ¼úê«ÌŸ?ŸçŸ^¹Ð 77—™3g²gÏJJJ˜={6ÅÅÅJVô…^àå—_fÞ¼y$%%ÙÚàååÅáÇY½z5...J èååE||<ÑÑÑ2jÔ(e[û­µsSskçÉì÷¿ÿ=éééÊÐú°U[ý*/N\¾|9ÿøÇ?0`€’‘nË}¹=»îºë¸ãŽ;¸ãŽ;˜4i÷Þ{/+W®´ù‹õø}ÿ IDAT ÀÝwßÍÛo¿M=ÐétÊPžºþФ×ëÙ¶mZ­–­[·*˶nÝZç÷b!„h‹Tùùù&s¦In¥Ûø"""ÐétÒv2g@Í}³æŒ' ñæ›oréÒ%å⿺jh] *• µZÍ¿þõ/>ùäåB·ÖââÅ‹­þ6Ïû÷ïgêÔ©öwYTTĉ'1b„2,gË–-lÛ¶´´4 櫯¾" €gžy†·ß~›ï¿ÿ^ù9`ÀÆŒCPPK–,QÊ=z4ãÆcñâÅ@å¯H^^^ë±sçN6mÚTm†“O?ý”yóæqüøq™}BÑ*åääpúôi‡|i¤9E{tï½÷¢R©ìÎN7†ââbeJ4ggçj3Žˆ¶Ãd2ñòË/³hÑ"\\\0 ôêÕ‹W^y°ý‹ €››&L %%…/¾ø¢Úkuù)%%…éÓ§W[†ÑhäðáÃôêÕKN–¢]“Lq“LqÝÔÌ‹–E2ÅB!š“dŠ…¢•ðõõµùºyšB!„ÍK‚b!„hDô !Dë –&B!„íÆÇÇ@™«5""BZ¥ɸź¹õÖ[1÷Qé›B!„°Ä+4((–@MÈ !„B´÷XA†O!„BˆvO‚b!„BÑîÉìBaÅç'>—FBˆ"tp¨ÅBÑbFÆH#!D ÑØ×IP,„Íô,„¢å1ÅB!„B‚bi!„B!A±B!„ !„B!A±B!„ !„B!A±B!„ !„hLï¾û.K—.%;;›=z´¨:ÕUnn.ãÇhðñ´ÄvqT{eggÓ§OŸß´Svv6;v$**ŠáÇ·~Ø ºU='Ž:–ªu¶·ü–zm‹–ÞïZNGçÎY²d‰Õó^TTÄ /¼Pç²ï¼óN‚ƒƒ•óÔ4ï¼óŽœe!D»åììÜ$ûÙ½{7=ôP‹:öúÖÉßߟ={ö´™v1 8995i];tè@FFàÑGe̘1õ.¯®ç¤®ÇâÈs.Z¯mÛ¶Cjj*Ë–-C«Õþf¢¢"6lØÀ£>jñËITTßÿýo^{衇èܹ3“&MªWÝöîÝÛð 800°Y8::šóçÏÓ£G:ÿ«RýZÎ×Fé¬BˆºûjÇöFßGYYYYY„‡‡óÓO?°råJöíÛÇåË—Y¿~=ÑÑÑdee1þ|ôz=¼öÚkMdd$<ðéééèt:^|ñEöïßÏ¡C‡ÈËËcÆ Œ1€Ë—/óøãóÍ7ßPQQAPP/¾ø"æ÷üªuŠŠŠRêzõêUþûßÿ’ŸŸ_k]Ο?¯l÷ôÓOsðàA\]]INN&00NG\\ùùù8;;Ó©S'þö·¿Ñ³gO«íR“­2’’’ÈËËcåÊ•äååqóÍ7óå—_âááQkýïºë.>ùäî½÷^æÌ™cuýšuHJJ"%%OOO4 ÿûßéÛ·/ÇgÞ¼yxzz*ç´6………\¹rÅ®c¶¶ojçäçŸ&>>žo¾ùgggzôèÁ?ÿùO‹ÇbkݪÁŒ½åWí÷?ü0þþþ<üðà >Üaý·*Gœ‹úô_kûmËRRRX½z5ëÖ­#--ØØØß¬3eÊ ”÷ó—¿ÚÄÄÄ]ïº ™×àãköáõ ˆ[‚Ô*nP«$ªh ·Õ‰ÕþuDyæG]^k mT[›IŸl™<Ȉ#P«ÕJJzz: ,[¶LY÷ÁdÑ¢E9r„ðððj?q2dÈÒÓÓILLdÆŒDFF’žžÎ²eËHLüµ?<ðÀÄÅÅ‘™™ÉÑ£G™2e .´X§ŒŒ 222Ø·o]ºtQöi«.5ƒºÈÈH2333f ¸»»“œœÌ±cÇÈÌÌdîܹÄÇÇ[mKl•ÇöíÛ©¨¨P²XãÆÃÃÃî¶ '==9sæÔº~Õºêt:Ö¬YÃÁƒÉÈÈ ==   yäHOO·˜E3+..&**ŠÈÈH,XÀí·ßŽÁ`¨õ˜mí»ª9s檔ñÒK/Ymw[ëZSÛ6Üyç 2„U«V¡V«Ú«~h蹨Oÿµ÷<´%§N¢  €ˆˆâââHII±¸ÞŽ;ðööVÞWZMSìdäÈ‘8pÀâkõ ˆ›"0¾^­â£Éf@üµ•×ß~NÅ] &‹ËÍj¾nëµZ¦&Ú_Õm,mÛc°ÞeL´úÜó:–_[¯µæ>i«Ц—––ÆÄ‰•ç...Œ7€°°0.\¸@~~>gÏžU~>œ6mÓ¦M«¶Ý„ *³"C† R©;v¬òÜœÅ+**âСCäææ*·Ñh´Y'£Ñȼyó aÑ¢EµÖ¥Ú‰F£Ô+66–©S§ Õj9yò$IIIb4ÉÏÏ·ZKl•Ñ­[7BBBøè£?~<[·neÅŠvµ¥³³sµ,WmëW­«··7C† aæÌ™Œ5Šˆˆ†ŠN§ãìÙ³J[L™2…Í›7[<®ªÃ'ŒF#«V­">>žuëÖÙÉ“'³nÝ:›Çlmß–²ø*•Ê®somÝÚXÛÆÙÙ™ˆˆÒÒÒøýïF£qhÿ­YGž {ûžµýnܸ±M¾éõz¶mÛ†V«eë֭ʲ­[·òØcÕº½9ð5)n©äF>a+CÜÐL±¥Ì®ùaïrkÏÍÿ·¶­µ,\S‚m%ð4goíÉ×Ì$;z(D]Ë´¶^Õåµ ç¨ºŽ½u©­Í¾6šdE qüøqú÷ï_-°Æ××—àà`ÒÒҀʟ!‡ Vç}úøø0pà@Ö¯__-»g­Nk×®åÌ™3lÚ´I ëR—ŠŠ e½÷Þ{ÈÈHåCS¯×ãïïÀ[o½Uçv±UÀ¤I“øøãÙ°aqqqJÐU×¶´µ~ͺ–••‘““Chh(÷ß? =zúô飔‘ššj÷9Û¿?ÁÁÁµ³µ}WåååEXXXµ-//Ïâ±ØZךڶQ©T¼ð tìØ‘Y³f¡×ëÚ«rŨOÿµç<´%iiisúôi²²²ÈÊÊ"55U k~á,))Q†µ&š)®- ÇeŠ- u¨9¢¶!U˲w]{²¨L6C@ìè! ^ë3´¢1Ë´´¾=eÚ»hvïÞ­ü4kW_}•ùóçóüóÏ+{ÕÇ–-[X¸p!ÉÉÉ¢5ë´bÅ z÷îÍèÑ£«evì­‹——‡fõêÕ¸¸¸(c ½¼¼ˆ'::šÀÀ@Fe³]ŠŠŠèׯŸò¼wïÞ¼ÿþûVË0O˜0””¾øâ‹µ¥µõkÖµ¤¤„Ù³gS\\ŒZ­F«Õ*SP½üòËÌ›7¤¤$›?§›ÇCåOÊ]»vUέv³µïª^ýu{ì1’““qqq¡gÏž$''[lwkëÚRÛ6*•Š5kÖðÜsÏq÷Ýw³f͇õßÜÜ\fΜɞ={r.êÓí=mEJJ Ó§O¯¶,,, £ÑÈáÇéÕ«Wµ/˜±±±„‡‡ãîînwV¸_¿~ t:ò>púôé&=NÕ=²±•1nÌÙ'j ŠÍÏ-À¶‚âÚÆkZÊà6Öp†æØ_c–Y[¶ê˜àú› `m•céÿµ•imŽúe\±}¾Ú±©S§¢Óé¥üÈÈHvïÞ]ë8ͦÔêÔÛ¥-Ôµ=‹999œ>}š§LmpYšæ>˜ÆS|½Ÿë›MÇV¶´%eO­ÁB9rDêÔJÚ¥-Ôµ=‹ŽÖìAqcÏ>a+ൕ)­+`nÎ:T „%0B!Z§v5OqÍ‹ḛ́90¶Ws\ÄÔÔóÏZÚŸµ™.ZÂ1´å1·õ96:!„BÔM›ÉW j­»uÉ7d[KîJ0Y½HÍÖk-iM} 6ëb¬>+ƒ#2³-©ÌªÛÕ,C!„Ž×$ÚÙÒ³gÏzÄÍ}›gsÖ³±3rMµŸÆÜ_SC{%í\w}¡BˆÆÓ¦.´k©w´³GSMà4Æþ$H£Mö!„¢­hWcŠ…B!„°¤UgŠM’B4ÐWÒBÑê]ï€ëøÛÎ<ÅUK´,„B!ê Ñ‡OŒ9RyXRßLñob“é×G —˜¨R¶¨T*‡í¯®õ°·ŽBû¼ûî»,]º”ììì3Ì\§ºÊÍÍeüøñ >ž–Ø.Žj¯ììlúôéó›vÊÎΦcÇŽDEE1|øpÂÃÃùðÃT·ªç¤©Ú½æ15Öù³ÕŽ2œ²iét::wîÌ’%K¬ö…¢¢¢zÝòúž{îáæ›o&""‚ &ðÝwßµ­ Ø|{góÃR`ÜÞÆWš¦*U£ï¯®õhê: ÑÚøúú*{íÞ½›‰'¶¨ã¨oüýýÙ³gO³ÖÁ‘ C“×µC‡dddpøðaþò—¿ðÄO4¨¼ºž“–ØEË·mÛ6bbbHMME¯×[\§¨¨ˆ 6Ôú§¦™3grìØ1Ž=ÊwÞÉ#<Ò¶‚âÔºNƒ3ÅælªJõë£*kË-m‹¥UTÊ¿ŽÊÜÚ£æ~kîÛÚrK¯±±­ç–”••‘••Exx¸²låÊ•ÄÄÄ0hÐ <¨,ÏÊÊ"::šÈÈH&OžÌ¥K—ªebV¬XALL ¡¡¡ddd˜˜HLL ƒ&33S)çòåËÌ;—#FÁôéÓÉÉɱX§¨¨(åqÓM7)ÇT[]ªzúé§1b£GVö£Óé7nC‡eĈÄÆÆrîÜ9›íb)3e­Œ¤¤$žzê)eݼ¼ºté¢ìÓV]ju‘‘‘dff2fÌpww'99™cÇŽ‘™™Éܹs‰·Ú.–Ø*#..ŽíÛ·SQQ¡d±Æ‡‡‡‡]mNzz:sæÌ©uýªuÕét¬Y³†ƒ’‘‘Azz:AAA<òÈ#$$$žžŽV«µz\ÅÅÅDEEÉ‚ ¸ýöÛ•Œµ­c¶µïªæÌ™Chh¨RÆK/½T¯þX[?²Æž¾ãˆv¬Oß³· Eu§N¢  €ˆˆâââHII±¸ÞŽ;ðööVÞWêcãÆÜqÇM~ŒMv¡y(…£2ÅBaÇdS-ë˜äÂ>!„ iiiÕ~ªvqqaܸq„……qáÂòóó9{ö,“&M`Ú´iL›6­Úv&L`È!¨T*ÆŽ«<7ÿŠVTTÄ¡C‡ÈÍÍU£Ñh³NF£‘yóæ¢E‹j­KµF©Wll,S§VN¢¯Õj9yò$IIIb4ÉÏÏ·ZKl•Ñ­[7BBBøè£?~<[·neÅŠvµ¥³³3±±±ÊóÚÖ¯ZWooo† ÂÌ™35j :NÇÙ³g•¶˜2e ›7o¶x\æáæ¶_µjñññ¬[·Îæ1[ÛwÍ@ñ³Ï>cçÎÊ2??¿:÷G{ú‘%ööG´c}úž=m(~+99™3f0qâD/^LNNµnkΗ——+Yd³šó«¯¾Ê©S§ØµkWÛ Š­ÄÉ·¶2Â0 ѶäççW2Q5ȳÄh4rèÐ!V¯^]-1srr²+Ð0og~¿qrrÂÕÕÕb9ƒµZÍþýû-fÙ,ÕÉ|áLÕe UZZʬY³øàƒèß¿?ß~û­r1˜¥:Ôµ €»ï¾›·ß~›=z Óé>|¸]usss³™¡¶Õ^*•н{÷râÄ >ÿüs–/_NPP«V­ªW;©Õj¦OŸÎäÉ“Y·nÍc¶¶oK™XKŸMuéµõ#G|v:²íí7Öö»qãFyƒ³B¯×³mÛ6´Z-[·nU–mݺ•Ç{¬ÖíÍovv6QQQV3Èÿüç?INNf×®]ÕÞßšJ“Ì>akl±CfŸhfU‡2Ô|!Úf`l~Ôæøñãôïßß®7x___‚ƒƒ•±z;vì`ذau®ŸdýúõʲÂÂB«uZ»v-gΜaÓ¦MJ X—ºTTT(ë½÷Þ{DFF*šz½Þzë­:·‹­2&MšÄÇ̆ ˆ‹‹SÁº¶¥­õkÖµ¬¬ŒœœBCC¹ÿþûIHHàèÑ£øøøÐ§O¥ŒÔÔT»ÏÙþýû ®õ˜­í»*///ªyyyyuîµõ£†öcG´c}úž=m(ªKKK#88˜Ó§O“••EVV©©©J€\ó gII‰Ý°šmß¾õë׳cÇŽ:]ÄìHš)®- ¹£¢mÛ½{·òó®=^}õUæÏŸÏóÏ?O@@€ÝkÕ´eË.\Hrr2„„„(ÁMÍ:­X±‚Þ½{3zôèj™{ëâååÅáÇY½z5...ÊXC///âã㉎Ž&00Q£FÙl—¢¢"úõë§<ïÝ»7ï¿ÿ¾Õ2ÌÀ&L %%…/¾ø¢Amimýšu-))aöìÙ£V«ÑjµÊT/¿ü2óæÍ#))ÉæOòæ1ÅPù“r×®]•óc«Ýlí»ª×_Ç{Œääd\\\èÙ³'ÉÉÉuî¶úQ}Ú277—™3g²gχ´c}úž½m(~•’’ÂôéÓ«- Ãh4røðazõêUíKQll,ááḻ»Û=®xÞ¼ytîÜYãããÓäC(Th´t¦¥)ØjÉÑÑÑ ŒÍËY(n͙⦾õsK—¨J¬ö¯#Ê3?êòZkh£ÚÚLú–BÑ´ýæUg h´;ÚÙ1‹D="^»nýìЀ©‰f‰¨º¥m=óD¢*‘DS¢ÕçV·3Y²m½Ö˜ûVcô3!„B4qP\sžbKó˘b몥@¹ês[¯Õ¾?S÷'„B!Aq=Ôvãp@¦Øü³µùˆm-·ö¼–2­eïÌËÍ?{Û›á3žÖãVØ›³·vd«mW%Û[×mU¦µìuÕå¶Ê4¯§ ‡¨‘¯o›™û“d‹…BˆVÛ£Á™b“ÉúP[¯-¶Ê¬EÕÆÞ`¦92±-åæõZјeZZßž2íÝN!„-O“\h7räH«·|n¶Ù'Ìo]‚e»Šmù½Ê¬tÕGãg¨[ë…qu:FS¢¼£«Þ}÷]–.]Jvvv‹f®S]åææ2~üx€OKlGµWvv6}úôùM;eggÓ±cG¢¢¢>|8ááá|øá‡ ª[Õsâ¨ci 礱Ø:wíyZXNGçÎY²d‰Õ¾RTTT¯Ûfß{l9’ððp¢¢¢ì¾=t« Š8À,Þö¹ÑÇ«T¿>¬ÆòÓt“ŒæGK˜kƒÂQvïÞÍĉÛDüýýÙ³gO›iƒÁÐäuíС>|˜¿üå/<ñÄ *¯®ç¤%öGÑòmÛ¶˜˜RSSÑëõ×)**bÆ µ~Ù¨éµ×^ãÀ|òÉ'<þøã,X° mŶ4z¦Ødªþ¨0WÍ‹f˜›+Ûj„«ŽñuÄP!ÊÊÊÈÊÊ"<<\Y¶råJbbb4hT–geeMdd$“'OæÒ¥KÕ21+V¬ &&†ÐÐP222HLL$&&†Áƒ“™™©”sùòeæÎˈ#ˆˆˆ`úôéäääX¬STT”ò¸é¦›ðõõµ«.U=ýôÓŒ1‚Ñ£G+ûÑétŒ7Ž¡C‡2bÄbcc9wîœÍv±”™²VFRRO=õ”²n^^½{÷æÊ•+vÕÉ’%ÄÄÄðæ›oÚ\ßR]“’’¼Úù³÷<ìܹ“éÓ§W+ÿ†nàâÅ‹uê·µÕ¥¶>}üøqÂÃɉ‰!11ÑjðåˆsWŸþnm¿­IJJ ,`РA¤¥¥Y\gÊ”)(ï)örssSþ_PP@·nÝÚVPl)3\S“Î>Q5ø­š!®c`\õbººW¡i矵´¿†—hÌchÓÃ+êqlr‘]ÛpðàAFŒZ­V‚ ÐÐPÒÓÓIHH`Ù²eʺ>ø ‹-âÈ‘#„‡‡Wû‰»°°!C†žžNbb"3fÌ 22’ôôt–-[Fbâ¯}ì ..ŽÌÌLŽ=Ê”)SX¸p¡Å:edd‘‘Á¾}ûèÒ¥‹²O[u©ÔEFF’™™É˜1cHHHÀÝÝäädŽ;Fff&sçÎ%>>Þj»Xb«Œ¸¸8¶oßNEE…’Å7nvµexx8éééÌ™3§Öõ«ÖU§Ó±fÍ\íüÙ{n¿ývΜ9£$¬vîÜIXX]»v­s¿µU—ÚúôÃ?̳Ï>KzzºÒ,÷ =wõéïöž·–ìÔ©SA\\)))×Û±cÞÞÞÊûнrss‰ŠŠâúë¯gõêÕlÚ´©É±ÑgŸh’yŠkµÖ‚ݺ ÙÖ‘T1¿Õ§K3ÕsžbÇ—ÙÐ mÕçm©Ìš3RȰŒö)--­ÚOÕ...Œ7€°°0.\¸@~~>gÏžeÒ¤IL›6iÓ¦UÛn„ 2•JÅØ±c•çæ ¤¨¨ˆC‡‘››«ÜF£ÑfŒF#óæÍ#$$„E‹ÕZ—j$R¯ØØX¦N €V«åäÉ“$%%QXXˆÑh$??ßj,±UF·nÝ á£>büøñlݺ•+VØÕ–ÎÎÎÄÆÆ*Ïk[¿j]½½½2d3gÎdÔ¨QDDD0tèPt:gÏžUÚbÊ”)lÞ¼Ùâq™‡O˜Û~ÕªUÄÇdznÝ:›Çlmß5ƒ¶Ï>ûŒ;w*Ëüüü¬¶»µógïyÐh4Ìž=›7ÞxƒÄÄD6oÞÌ3ϯmª6ës›l¸¶²ŒÖö×eÚ ëò¼¶ííy­>pCêiïköÖ«>í,Z&£ÑÈ¡C‡X½zuµ ÁÌÉÉé7«5...JßprrÂÕÕÕb9ƒµZÍþýû-f¼,ÕÉ|áLÕe UZZʬY³øàƒèß¿?ß~û­r1˜¥:Ôµ €»ï¾›·ß~›=z Óé>|¸]usss³™¡¶Õ^*•н{÷râÄ >ÿüs–/_NPP«V­ªW;©Õj¦OŸÎäÉ“Y·nÍc¶¶oKY|K¿èÙÛîu=øÃ¸å–[?~<DGG×¹ßÚR[Ÿ¶—£Ï½mdm¿7nlïcz½žmÛ¶¡ÕjÙºu«²lëÖ­<öØcµno|³³³k½ˆN­Vs×]w)_P›RÛS܈L&S‚–º®ßÔõk‰ÇÐ^I;·Ç§ÿþÕk|}} % #± 8IDATVÆêíØ±ƒaÆÕyŸ>>> 8õë×WËZ«ÓÚµk9sæ ›6mRźԥ¢¢BYï½÷Þ#22RùÐÔëõøûûðÖ[oÕ¹]l•0iÒ$>þøc6lØ@\\œ|Õµ-m­_³®eeeäääÊý÷ßOBBGÅÇLJ>}ú(e¤¦¦Ú}ÎöïßOppp­ÇlmßUyyyV-àÊË˳ÚîÖÎ_]ÎCÇŽ9r$sæÌáþûï¯÷ß‹µºÔÖ§}}}éÝ»7{÷î`×®]ËwĹ«O·ç¼µdiiisúôi²²²ÈÊÊ"55U k~á,))±ûV€K—.¡Óé”ç»víbÀ€M~œ­žb!„hÁvïÞ­üÔjW_}•ùóçóüóÏ`÷ÅZ5mÙ²…… ’œœL@@!!!J@Q³N+V¬ wïÞŒ=ºZfÇÞºxyyqøðaV¯^‹‹‹2ÖÐËË‹øøx¢££ dÔ¨Q6Û¥¨¨ˆ~ýú)Ï{÷îÍûï¿oµ óð„ HIIá‹/¾hP[Z[¿f]KJJ˜={6ÅÅŨÕj´Z­2ÕË/¿Ì¼yóHJJ²ùó¸yL1Tþ¤ÜµkWåüØj7[û®êõ×_ç±Ç#99zöìIrr²Åv·vþj®cë<Ìœ9“÷Þ{»îº«Þ/¶êb«O›Ûþ¡‡"))‰ððpå™ÜÜ\fΜɞ={rîêÓßí=o-UJJJµ‹)¡rè—ÑhäðáÃôêÕ«Ú”ØØXÂÃÃqww·k\ñ?þ¨Ì6Q^^Î 7ÜPíÜ6Õš5-±¢Ùlß¾©S§VËR8Rdd$»wï®6¦³¹µ„:µÄvi u­ë±dggé_`×­[ÇÅ‹Y»vm½¶oh]***P«Õ¨Õj6nÜÈÿýßÿñî»ïÊ›\—““ÃéÓ§-Ž…¯+É !D#:räˆÔ©•´K[¨ksËðáÃQ©Tlß¾½ÙŽ­°°3f ÓéÐjµ¼þúëò$ZfPìè;Ú5z`,7õBÑÆuéÒÅ!YâÇ7{]üüüøè£ä¤Šzk²Û<[#™b!„BÑæƒbkb³Ï>ažrÆÚ­œ­ÝæÙÖóšeÊï„B!Ú´F>Q[@ ÊWê`íÿ–ž[c¾q‡ ŸB!„ ¸±bpàíêªjà+°íÚ™3g¤„B‚âÆSs,±¥@¹ÑÇÛú ±8}ú´4‚B´sM6O±µÌqƒç)¶5D¢¶€×V¦X‚e!„Bˆv£Ùoóܤ³OÔ¼˜Îôšc!„B!Aqshð춘ƒ]ó£.™ßšÛ !„Bˆ6«ÙoóܳgO™§X!„B4«¶)B!„¢5ÅrG;!„BÑîƒbÉ !„BˆvK¦X!„B4·&½y𛹊rG;!„B!ZjPl)®Ib!„BÑÜdL±B!„h÷=S\u…¥¬±dŠ…B!D›ŠkÁ#GŽ”1ÅB!„¢Å‘Ù'„B!„ÅÍ]S,„B!ÚtPliJ¶š$S,„B!š[£)®íB;S,„B!ÚtPl-®Jb!„BÑÜdL±B!„ ¸¹+ ™b!„BÑîƒbÉ !„Bˆæ¦iî 8,S¬Rýú“IάB!„h9Aq“Ì>¡Rµª@81QUåÿÖë­R©09à¸U÷c«öÖQ!„B‚b;⪰¥Û<··1Å5TkkcàöÖ£©ë(„BÑÜštL±#3Å ó° •ê×GUÖ–[ÚK«¨”UVÖi 5÷[sßÖ–Û |…B!„e­L±Éd}øDÍå–Ö³cèEÕa –†4Ø Lë;üÁd2Y>Qs¹µõ$ B!„h!Aq‹¿£Akm­I.ìB!„ Ø–ö0¦¸12ÅB!„¢éÈ<Å`2™¬>„B!„ŵ’;Ú !„Bˆæ¦:pà@£¦3kSݸóÛº©G/²³ô¼>ê2pÕ¡5ëai¹µýÉ<ÅB!„ÍצgÏž’)B!„ÍJÆ !„B Š›»2¦X!„B´û X2ÅB!„¢ÝÅ’)B!„Í­QoÞQuæ ³š3P4ûí¬pÄ,B!„B‚âßÀ–‚dÉ !„BˆæÖêÇ›çëU©To·l^^ó5[Ïk–ië6ÎB!„¢õÓ4ÕŽFŽiñæŽÈWê`íÿ–ž[c2™dø„B!D;Ò$™bk18fö‰ú¯æÀ·.Á²B!„h›4Í]ÆSlkèƒd„…B!4A¦ØV–žb“ÉTíQ3`®š1B!„7‹¦œ}¢æÅtæ Yc!„B Š›UcfŠÍÁ®ùQ—a5·B!„m—êÀÍ: ¶gÏž2O±B!„hVm:S,„B!D«ŠåŽvB!„¢ÝÅ’)B!„í>(–L±B!„h÷A±dŠ…B!D»Š%S,„B!Ú}P,™b!„BÑîƒbÉ !„BˆvK¦X!„B´û X2ÅB!„¢ÝÅ’)B!„í>(–L±B!„h÷A±dŠ…B!D»Š%S,„B!Ú}P,™b!„BÑîƒbÉ !„BˆvK¦X!„B´û X2ÅB!„¢ÝÅ’)B!„í>(–L±ÿߎÓ0óïz2vЪ ù(vŠÈG±S @>ŠbòQìb§€|;Å䣨) ÅN1ù(vŠÈG±S @>ŠbòQìb§€|;Å䣨) ÅN1ù(vŠÈG±S @>ŠbòQìb§€|;Å䣨) ÅN1ù(vŠÈG±S @>ŠbòQìb§€|;ż Œ]Q ‰zÞÝIEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/snapshotFind.png0000777000076500007660000003347410463126513026123 0ustar ‰PNG  IHDR¹øq'˜U IDATX…íÝ{\Tuþ?ð×ÌÀŒ(Œ„9fb¢~#[Q’›rWM“E¾jZ†bëö­~n®lv/YëJQ^¾f©´ÝL²ÌÛ·…ä–¸«¦Vh‚æeVIÀA„`æ÷͉9ƒÃëùxðpæsÎù|ÞçÃxÞ|ÎùÌ9£Ñˆæ6íÿ¡e!Q7ö䔑’æe’¦InÓþŒ^ê»ìÚh„oo³÷¹çn ¯:}ßæíÇécy¸X ðQçÀï¾pŒ Ÿ‚»üF·Y‘£ÍX6Ÿ§utD×ê±½þ{€Ë½¢í­Õ5âlc]gG´^×µÒŸÌ’ä6íÿÁøû°‘øÇ™ëp«¯Ä͋ߢôòO¨¾y 0 Êd0©LƒÁ©DƒÑ©DH¤+èÝÇýFŸ;îAµÌ@‹Ä Èùü=î}W‡¯E@@TÁhJK+püøqô/~!<ŒÈÚÚ×Dnã¶áõS‹²[”7-#êILÇöÓaÿÄ=Þ8p ŒF#JKKQt¼ ~ùA¢í¦ºþXþ#ƘÕõíñãx³ßµ¨kâÝJ|–ÿƒè$F£QHpûO]ƒÂP_¾û?ÔÝ(Gqq1nܸ!l,‘XNX&F£îîî>|\z{@}o$ª]ok±^îéøäóz 8óæþCîæh\öÁ€ŸÎ|øÎgýfÏpAøôGDu.QgË:ü$Š‹‹E¯ÿÇù;1¢î%÷‹t|røE(&UcÞÜÜu×]X&YH5>ƒóçÏãƒwA÷>˜úR›ÇöÜ/Ò!Ùø"bGÄœyó€»îüuý/2€óçñÑààÿŸy]SFy ‰Î¥i¥uú:Ü<û5ÊþýtºZüùÏË0l˜/d2™¨lhhÀÙ³ÅØ¾}\]Ëá"“Âõîifë\:{ ÿ<ðÜG½‚É“wwàÚ/ÀÆ_~[§o_`òäßáï¿ü‚xw ‰;‡ÿNT DI©Tâ¾ûîƒV«•ìzõ›Œªÿ|Ù‘9–騮‹¨Æƒ÷GÁÝÝ¿üò –#IX§oß¾˜|vþrÿ:ða«ÇvS]ÿãí‚É“'îîÀ/¿;ÒФ2Lž<×~ù;þ·º\6íÿÁØ óÀ§‡ÿÝXR[ ­ö:/þ#FŒnuôÖ”L&Èñ`ÁB¼ùæ A}]½Ù:?ž8Œû-ÅØ»î‚[/àÊËu¹õ† ‚•-ÅÝ'ãö!~¢ã ê,ÅÅÅ6l˜Õd÷§?~¿~dó/×·XÚŠ2¬œõÿÊXð |îƒwÖ,Æ“ë?±)6mEÖ?~?Ö|ô­MÛÙÃ'ãG¿£Pßå777\iåàîææ†C\qºìŸ­Û‘08}F™L™Lf–L„ŸàÂ÷ïaÜTž²$Ç:væ9hµZ?~¥Ri¶NÓäf’±+s¦ïlQ_½¾½ú(ñ§7ZŽô¯ý»ÙÿK1êõu€6oGdçO‚ðë±ý´Õc;ŽZ<¶Ÿ?uÔ^u¶^×ínÞï[Ö%“. ×ÿö—f]]ÔÔ¨©©ÁÏ?ÿŒÞ½{Ã`0ÀÕÕF£õõõJ¥0 —ßÎxÖ××C§ÓÁh4âöþ·£øìY³º D7ƒ<=áá¡„N§ƒ\.‡T*‚7µ¡Óé Ry¢ººg‹§·¨‡¨«5½™’‰«kËg2À÷¿qéô‡feg9Œ->ÛU•eØð§ðü»ÿ^DÇãü÷GPsã:f>ù î øùÜ÷ØùÆ2È{õÆðÑa0ü¿BQ¢üÜ=ߎí)$RKÇvª«¯álßZü¼ÿ/xS™×ÕjžP¡ººÁ§ZÖÕËí×$WW÷Û_~®rúõë///ôéÓ½zõ2¨i&fÓׄ¤g0 ÓéP]]††¸ººšÕ 5}=ѧOoxxx W/9är@¡¤@"  ôu èt ètõ(//G»G‹zˆÅÒ©J777Ô××X\ëÖÆÏ2ÿ ××Õ£¶º —NÊ[û1ê=Å_WW‡úºzܬªÄà»ÇbâÜ?£èÈÿáàû¯"iõß™›ŸÅĹÆÝ…œÌ7£‘ÿWÈ!j”Zx÷‘ÂCé^½zA.—C¡PÉÉ`0@¯×C§ÓA§Ó¡¼¼¿ô½nñóz[½}ú ú5Oˆ«Ë«þb˺„$×äôF_~¨««Cß¾îððð€‡‡‡M;zýúuH¥Rüç?WàÖ»O‹S'wÜ9R©}ûÊáÞ§1Á¹º6+À`êê¸Qí™L†Awâ)êvLÉÎD&3hýzXóÏp]]½Ý‘´æc¡¬ñó_£Ñˆ:}êêêàªpÃ]÷ŽC¾†ŒDÅÕ£N_]M5Ê~þ C]v÷؉øçÁø…ÂåN¤Rúöí www( ¸ºº  êêê ÓépãÆ Èd2¸Ü©°øyè3ð×w@Ó¢.—–§+k´7ñÕ?¾‚¿ÿ(¸»»Û¼£îîîÐëõ8p`?ÆELÀ7Ẇ¿ð5²jf¢—ððlLp..€TŠ_ƒ…¾ñ_N‡ßȆ^?ÝBkD·Žæ§Rêô VËëô pq• ëÔ×a4~]VÿÛö êêcËÓŸD]áÒeH¯Y…^½zÁÓÓ®®®pqqô׃»Á`@CCôz= ÓÕãqéó?¯g§-Àm9™Õ%m–(ŒfuépvZ"ä-êriyº2"f .Ÿ9‚—_~¿ÿ}<""ÂmÚÑ‚‚o™¹ #üîE¹¡_‹áãw…þH-*+¸c Eãh®)½¾1ù]ºèjkpÇïÆBÃS0ähRËʼn‰'ð-/l¢ùÿ…ºú:m—7_§®¾Æ_뒸ȡº}0~<~CG…á‡ÂýÂ2¢®vçÝc¡ÿÉ•••4h äÍîuz=\]]qñâEèj\qÇËÇö;¯ÞGee%î4¨1IÈÍë’Ôé¡puEÕÅ‹¸©«k¥®^-Grß]6à¾ßÇÏÿ)Ç_~‰7ß|Ào×â˜Í¦l|-$RHd2¨ÕwÀý6ÈúƉ‹µh0š¡Ö} ñ-Àû'e¸Í{ FŒÜÜÌOWJ¥@i)püÛSxxèaè㡯¾ "GrÁ#¨ï•Ñ¢\.oµ}{GrMשÓ7ÆßÞGÍyYï¿„oö¼…¾£Í–u¥Z÷XÞ÷UüíäŸàííá#FÀÍÍÍìcTÚx·’oOã÷סS ´xl¯uˆË-ËÇoÀÛÛý‡[H5RT––âø·ßâÒœÿI+uI6îûÞxꇫMŠŒP¸=]pÏ`%«=áÙ·d2) €D é¯3fêëP×hoêqµâ&Îk*qáÊMܨ5ÀØÊ-½îáÊ’|úŸû1`€C}û ÿÆø¯^~:¯ƒFó3âû€ç°H;[Ö¡Î'²'‰ò#³÷øÃ1¼õÖ}É HJjyMnkêú® È¡LÇö †e¸]}|}}áÝ¿?d2Ê®^ÅùóçQúóU<‰¿Y=¶›ê±g?|}}ÑÏ»1Q\/k¬ërépæÄVë5²c’;vâçÎÜo‹‚ünǾUxû{”^)CÕjH$xz(á}› ‹ï=…óZwüót+ß'r¹×®e­%¹M¯¼Ü•¡u ¦cûê+ÿÍÕ ¨ª®†Dx*=Ðß물ýMÑÇvS]Êô ¸¦¹Œ›U×!‘HÐ׳<úÀGÿÔf]÷¾£åéÊ®’ògü¬öÀƒÃ/áÎq½ááÖ8ÉåZ•šŠ‹È+~*íúäKÔ}é €»ús³ò>}ô¨­müÎèk«VÿZÊÓ†Ôó˜Ží‹}ˆ;‡÷†‡[cùµªzh*tÈ+¹.úØnªkØìÜéÝ›Ôu¶B‡s"êjñ‚®töâ/8{ñë+u3§T>ûÿ.Ь{~Nü žÍžÇöŽÖ%™° ÍxSËk^DDä\z+½Grû¶%;:"""»JXúnkßü!""ºõ1É‘Ób’#""§Å$GDDN‹IŽˆˆœ“9-&9""rZLrDD䴘䈈Èi¹8:€[Iii©£C ""~~~¨¬¬´º“œŠŠŠQççç'j=&¹v˜9s¦£C "êvvíÚ…©S§vz;ûöí½.“ÙÑhttf˜äˆˆÈn ƒ£C0Ã$GDDvÃ$GDDN‹IŽˆˆœVwKr¢¾ ®Ñhàåå…ððpágãÆ˜2eŠÍ j4øúúÚ¼]Óí}||lÞ®ªª iiiín—ˆˆ¬3V¼¼¼Zý³½-DäÜÝÝ‘——gVöÔSOÙÔ˜#UUUaÓ¦Mxúé§ ‘Ó3’»zõj‡¶·E»oëÕtDez½råJDEEÁßß999ºǎC`` bbbðöÛo·Zç;#eË– Û¨T*;v °lÙ2lß¾]X÷å—_FLLŒY[•••ˆEpp0‡ .âããqýúua$JDDög0:ýÇ¢“Ü7ÌNW–••™-×jµ Á¡C‡’’‚Õ«W Ëž|òI¤¤¤ ;;r¹¼Õ6"##‘›› ÈÍÍE`` Àrss)´€ììl³¶z÷ 9rùùùHJJBrr2 33ÈËËC^^ÊÊÊÚuº•ˆˆZ'&I 0 Õ{'¹vŸ®Ôh4fË bcc¸t逯ÑUII‰ð-øøøxlÛ¶ÍbC‡EMM 4 rrr°bÅ ¬_¿=ôª««1lØ0h4šVÛ’Ëå8yò$RSS¡Õja0PQQa±-oooìß¿_ìî‘b’пÿýo 4Èby·9]ÙœB¡^Ëd²vƒâêÕ« Õ+WpàÀa×V[µµµHLLÄ«¯¾Šo¾ùéé騯¯oç‘­ÄL1¸|ù²Ùv—/_½­-:ýQ;žžžðõõî5öÙgŸµ¹~dd$ÒÒÒ EZZ¢¢¢¬¶¥×ë¡×ëáíí HOO–¹¹¹¡¦¦ íÜ""²Æ–kk/^\¼xÑñ×ä:bóæÍXµj¢¢¢Z=}hË—/#""Ââû¶(•J$''#22111f#>•J…¸¸8 ×yMŽˆÈ¾lDòÓO?uêÄÉ„iÆO_K윽u2¥¥¥(**âSˆˆ,صkÆŒÓéí|ûí·˜9s¦ÕçÉ%,}—wP”ˆˆº ‡]“Óh4P©THJJ2+ …¯¯¯Õí«ªª––&º-ŸvÅiÏú쇽i4Q}okÝyŸ‰È¹9tâ‰R©DII‰pjóèÑ£P*•¢¶­ªªÂ¦M›:3<§ÖÐÐà興:ÃgW&$$`ç΀ŒŒ <üðòÊÊJÄÆÆ"88aaaˆ‹‹Ã… ñññ¸~ý:ÂÃørå æÏŸ/¬?oÞ<³¶^~ùeÄÄÄÀßß999ãyçw°lÙ2À±cÇ R©pìØ1À²e˰}ûv«õ:u ‘‘‘ ÅŒ3põêU‹m]»v III CHHfÍšÕê$±qµÖ¶iDµ|ùrÄÄÄà½÷Þê DLL Þ~ûm‹m[Û/SÝ+W®DTTT«ý»{÷nÌš5Kx¯Óép÷ÝwãçŸn³]"¢örx’›={6>þøcܼyGŽAtt´°¬wïÞÈÈÈÀ‘#GŸŸ¤¤$$''233ááá¼¼<äåå.\ˆ€€aý7 uiµZ ;;)))X½zµÅx"##‘›› ÈÍÍE`` pÀÎÍÍEdd¤Õú/^Œ¥K—âðáà ‹/¾h±­Ç{ sæÌA~~> %K–t(®¶ÚÖjµ Bvv6.\xòÉ'‘’’‚ììlÈår‹m‹Ù/­V‹:t¨Õþ6mNŸ>‹/hLz¸ãŽ;Úl—ˆ¨½žäú÷ï`Íš5˜>}:¤ÒßB’Ëå8yò$bcc1nÜ8¬]»§N²XV«ÅÑ£GñÄOeýúõ^+ ÄÆÆqéÒ%‹õ :555Ðh4ÈÉÉÁŠ+““ƒÒÒRTWWcذamÖWQQ’’LŸ>@ãHõ›o¾iÑNUUrss±zõja4ºqãÆVG5bâ²Ö¶««+âââ„÷•••())ÁÔ©S4ŽŽ[c­n1ýëââ‚ àwÞlÛ¶ ‹-jµM"¢Ž²ivegyøá‡1wî\?~ܬ¼¶¶‰‰‰8xð Fމ³gÏbÊ”)mÖ%‘H,–+ áµL&ƒÁ`hµŽˆˆ§UÇ×b=OOOŒ5 6lÊ´Zm‡âÛvÓ|}}…õ?ûì³ï—5^^^ˆŠŠÂÂ… 9Š#¢N×-’\k”J%’““‰˜˜³Ñ‚J¥B\\‚‚‚„‰'Û·oÇ‘#G„²Ö®oYË—/#""Ââ{k¶nÝŠõë×#44………X³fÅõvìØ‚‚øûûcÒ¤Ixá…:—ضM6oÞŒU«V!** vÙ/kæÏŸëׯ㡇j×öDDbI&,H3~úZb›+•––¢¨¨Ó¦MU©B¡àO¨U¯½ö~þùg¼ú꫎…ˆœXÂÒwÅ_“s·rN*•ªÍåÖF€M?‰»víêhXDDV‰Jrjµš#³Ì–$fMAAÝê""²¦[_“#""ê&9""rZLrDD䴘䈈Èi1É‘Ób’#""§Å$GDDN‹IŽˆˆœ“9-Qw±W7‘Orýû÷Ç€°fÍLŸ>RéoƒK¹\Ž“'O"55Z­ƒ¡ÕxjµZ=z»wïÊúõë'¼V(ˆâÒ¥K6×ÓV<3f æÏŸèèh„„„ 88UUUÈÍÍEYYV¯^ 0 íé*""²‘Ó<üðØ;w.Ž?nV^[[‹ÄÄDú(’““»:QLOw–¶½½½±ÿþ×ÑuwÉ5†‹/ ï¯]»†¤¤$„……!$$³fÍ2›sìØ1!&&+W®„¯¯/€–£5F#,kª²²±±±FXXâââpá³:–/_Ž˜˜¼÷Þ{cn+ÆââbŒ9—/_¬[·‰‰‰fõ/[¶ ãÇÇĉ…íZkÛZ¤¦¦bôèÑGtt4Š‹‹[-oÞG§NBdd$BCC1cÆ \½zÕ,–•+W"** þþþÈÉɶãHŽˆº;‡ŽäšúòË/qï½÷ ï{ì1Ì™3ùùù(,,D||<–,Y",â‰'°bÅ dgg£OŸ>6ÇÑ»wodddàÈ‘#ÈÏÏGRR’ÙHR«Õ"((ÙÙÙX¸p¡Å:ÚŠqøðáX±b.\ˆììlìܹ6l0«?** ¸ÿþû‘’’ÒfÛmµUYY‰uëÖ!''yyyÈÎÎÆàÁƒ[-onñâÅXºt)>Œ   ¼øâ‹f±„„„àСCHIIÁêÕ«…eÉQwgÓÄ{hz`¼qãÂÃÃqíÚ5TWW £„ªª*äææ¢¬¬L8¨ ³:Î;‡©S§f̘7ß|Ó¦8är9Nž<‰ÔÔThµZ ³Ø\]]×êöÖb€Ù³g#''óæÍÃþýû¡T*…e...Büqqqf“zš·m­-Œ3óçÏGtt4BBB ¹\n±¼©ŠŠ ”””`úô逄„$$$Ë bcc¸té’°Œ“ˆˆ¨»ëò$×ôÀhº&g0°jÕ*¼þúëxýõ×ÑÐЩTЬ¬,Èår›ê—J¥f×±jkk-®W[[‹ÄÄD OOOŒ5ªÅé=•J…¡C‡âÀ€={ö˼¼¼`4…kR™™™ãÐëõÐëõðöö¤§§Û´Öb€+V`ôèÑØ½{7ž~úih4aY}}=öíÛøüóÏÚî¶t:JKK€E‹!%%………­–7¥R©0lØ0!–ÌÌLŒ7NTðšuwÉ5%—ËñÔSOaÅŠعs'vìØ%K– ##ýû÷‡ŸŸŸÙA~óæÍxüñÇ‘ššŠ   aÄáêꊗ^z qqq0`"##-Æ¡T*‘œœŒÈÈH¨ÕjDGGÛ¼/mŸwï^äçç#++ …Ï<ó ’’’„„¬T*QPP€¿þõ¯P(xÿý÷ÛÝVMM ,X€7n@*•B.—#--­Õòæ¶nÝŠ§žz k×®EÿþýñöÛo‹ÚŽäˆ¨»uïÊÒÒRaÚ´i¢*U(­ÞñÄ^êëë!•J!•J±eË|ýõ×øä“O:µM{Ñh4 5›Mz+â59"êÎDß»w·1ìu`Ôjµ˜={6*++!—¸ù™3÷IDAT˱}ûv;DgbNã5„r«b‚#¢îNT’S«Õv™ÙëÀد_?|õÕWv©ËÞzÊÁŸ#9"êîºÍ÷äèÖÃGDÝCfW:úAŸü—N%¢žM%""§”°ôÝ®Éu&9""rZLrDD䴘䈈Èi1É‘Ób’#""§%êŽ'MŸ@-–Z­¶y"""{}ïÊ¢¢"ѕΜ9³ÓoÐLDDdMÚs“fN×î`ˆˆˆìÉækrcÇŽÅØ±c­–YóÒK/aéÒ¥ÂûƒB¥RáÌ™3BÙìÙ³ñÎ;ïØâ-O£ÑÀ×××ÑaÝòÚ=ñÄ”ÔlMn&áááÈÏÏÞ`ìØ±BYCC ÖbÛ†††vµÙQŽj—ˆˆÚÇæ$wôèQáuÓ×´\Œàà`\ºt W¯^И䒓“…$wêÔ)¸¹¹aøðáÐh4ðññÁòå˃÷Þ{•••ˆEpp0‡ .€°þ²eË0~üxLœ8±ÕÉ3bêiÚ®)¶ÈÈH„††bÆŒÂ>˜Ö7i:"3-[¹r%¢¢¢àïaÝcÇŽ!00111¢ŸÌMDDmk×H®yB³5Á@¯^½€üü|ܸqÕÕÕ˜0a¾ûî;@~~¾Ù(N«Õ"((ÙÙÙX¸p!z÷ 9rùùùHJJBrr²ÙúQQQ(((Àý÷ß””‹qˆ©§i»°xñb,]º‡FPP^|ñEQû¬Õj‚C‡!%%«W¯–=ùä“HIIAvv6är¹øŽ$"¢VÙ4ñÄÄÒ5¹ö$º°°0äççC©T"442™ C‡Å™3gŸŸ©S§ 뺺º"..Nx/—ËqòäI¤¦¦B«ÕÂ`0˜=ßÌÅÅEØ>..®ÕI3ÖêiÞnEEJJJ0}út@BBDí¯B¡@ll, 00—.]Ð8š,))âǶmÛDÕIDD­k×Ä“ÖN]Šeº.WPP€ñãÇÆœœœ×ãÜÜÜ •þnmm-ñꫯâ›o¾Azz:êëëmŽÁZ=ÍÛm‹T*5»nW[[k¶\¡P¯e2 ƒÍñ‘xížxbJpíÁ™áÒ¥Køâ‹/„„6nÜ8¼ýöÛèÓ§O›3 õz=ôz=¼½½éééfËëëë±oß>À矎ÐÐÐvÕÓœJ¥Â°aĺ3331nÜ8€——ŒF#Š‹‹…ebxzzÂ××W¨ó³Ï>µµ­]O,]“kO²S(ÂpÀ€€1cÆ@£ÑXœUÙ”R©Drr2"##c6J2-/((@XX8€U«Vµ«K¶nÝŠõë×#44………X³f €ÆS›/½ôâââ0aÂܼyÓj]&›7oƪU«evº”ˆˆÚOÔ“ÁKKKQTT„iÓ¦‰ªT¡P8ôŽ'¡¡¡¸xñ¢Ãb ""ÇJXú®ø‰'bîvb •JeÓúÝ‘­D%9µZm÷‘Yg&­rGDD|Ô9/&9""rZLrDD䴘䈈Èi1É‘Ób’#""§Å$GDDN‹IŽˆˆœ“9-Qw%%%ððð€Ñh„^¯ÇµkׄöLBCC±|ùr̘1k׮ťK—°uëV‹ñ˜ÊÞÿ}<ðÀøâ‹/ðÇ?þï¼ó&OžŒ/¾ø6lÀ?þñ‹û:räHddd`Ú´iøÛßþ†’’¼õÖ[mî'<ðÀ˜4iþô§?ÊËËѯ_?á)è§NÂ#<‚É“'ã‰'žhsÿMOMo«Í¶¶o­Ï-‰Çã?ŽI“&>úè#dffâ“O>|üñÇØ¶mž}öYüå/Avv6”Je›}eé÷b­­Öö§¦¦Æj?‰ùŒØòT(¢þoQÇØôdð®âêꊸ¸8á½\.ÇÉ“'‘šš ­V ƒÁ`öÀU…BØØX@`` .]ºðððÀ˜1c0þ|DGG#$$ÁÁÁ-Ú«¨¨@II ¦OŸHHH@BBB«ñ˜Úœ:u*`̘1H$˜YâêêŠìÛ·>ø \\\Dí[m¶µ}k}Þ\CC¤R)²²² —Ë-®£×ëqæÌxxx ¬¬Lt5ÿ½Xk«µýÙ²eK‡?'¶~·lÙ"ºn"ê˜nuMν^½^/œRKOOµN§Cii)°hÑ"¤¤¤ °°°Åz*• Æ þ}û™™™7nœýv ™úúz¡­Ï?ÿ¡¡¡ÚÞO¥R‰ÀÀ@³ƒcyy¹ðZ"‘ -- ^^^HLL„^¯µÿmµ)¶ÿÚâéé‰Q£FaÆ B™V«5[gÅŠ=z4vïÞ§Ÿ~Æj_µ§­ÖöGÌ~¶÷3b>$¢Žév#¹æ”J%’““ µZèèhQÛÕÔÔ`Á‚¸qã¤R)är9ÒÒÒ,®»uëV<õÔSX»v-ú÷ï·ß~Ûž»`F©T¢  ýë_¡P(ðþûï åmíçöíÛñç?ÿP(2d222„å‰ë֭êU«0wî\lÚ´Éêþ·Õ¦-ý×–;v`É’%ÈÈÈ@ÿþýáçç'$¢½{÷"??YYYP(xæ™g””„={ö´ÙWíi«µý»ŸíùŒØ«‰¨ýlšx2mÚ4Q•Ú2ñ„ÈÓ„š¶®oµÅ¦‰'bfVÚB¥Rµ¹¼éä""¢ö•äÔjµÝGfLbÔ–rGDÖí'žµ“9-&9""rZLrDD䴘䈈Èi1É‘Ób’#""§Å$GDDN‹IŽˆˆœ–¨;ž4}º²XjµÚæmˆˆˆìIô½+‹ŠŠDW:sæLÞ ™ˆˆΦG툹I³N§kw0DDDöä°kr^^^GHHbbbðÝwß9*œN¡Ñhàëë (++kñ¤o{©ªª2{NYg¶EDt+qèÄwwwäåå¡°°>ú(’““»<††††.iÇÛÛû÷ïªª°iÓ&Qmõ$ÝfveXX˜Ù£U®]»†¤¤$„……!$$³fÍ&À¤¦¦â¹çžÖ-//ÇСCQ]]mu[F,_¾111xï½÷„:GððpDGG£¸¸Øj]–;v ˆ‰‰1{z´©Ý¶b°ÖÖ•+W0þ|#,, óæÍÄÇÇãúõëGxx¸Y[pêÔ)DFF"443fÌÀÕ«WÍâX¹r%¢¢¢àï›~oDDÝY·Ir_~ù%î½÷^áýc=†9sæ ??………ˆÇ’%KsæÌÁ®]»P__øôÓO‹>}úXÝ´Z-‚‚‚… ¢²²ëÖ­CNNòòòÁƒ‹ª«¹'Ÿ|)))ÈÎΆ\.ou½æ1ˆikáÂ…À‘#GŸŸ7233ááá¼¼<äååµhkñâÅXºt)>Œ   ¼øâ‹fq„„„àСCHIIÁêÕ«[™ˆèVcÓÄ{»qãÂÃÃqíÚ5TWW £ˆªª*äææ¢¬¬L8è a»AƒÁÏÏ_}õ¦L™‚>ø/½ô’¨mÀÕÕqqqÂ{Œ3óçÏGtt4BBB,ª®¦*++QRR‚©S§hamÛ¶ÍâºÍc°Ö–V«ÅÑ£G±{÷n¡¬_¿~­ÆbRQQ’’LŸ>€„„a¹B¡@ll, 00—.]²Z'ѭ¡IÎtMÎ`0`ÕªUxýõ×ñú믣¡¡R©YYY­Ž†æÎ‹?ü>>>¨¬¬Äøñã@Ô¶nnnJÄJ$8p'NœÀñãDZfÍ <¯¼òŠÕºÚ«y bâ6ÅjO …Bx-“ÉÚLâDD·šnqºR*•âùçŸÇ×_Ó§OÃÓÓ£F† „u´Z­Ù6Ó§OÇ7ß|ƒM›6aΜ9ÂÁ_̶Íét:”––" ‹-BJJ m®ËÓÓ¾¾¾Ø·oà³Ï>ÝÖÚR*• Ä–-[„²òòr ³¦¦Æâ•J…aÆ 1effbܸq¢ã""º•u‹$r¹O=õV¬Xرc àïïI“&á…^0[ßÍÍ S§NÅG}„‡zÈl™µm›«©©Á‚ 0nÜ8„……aùòå”|[ëÚ¼y3V­Z…¨¨(TTTØÔÖÚÚ¾};Ž9‚   „‡‡ ×ëT*âââ„òæ¶nÝŠõë×#44………X³fMqݪ$¤?}-±Í•JKKQTT„iÓ¦‰ªT¡PðŽ'DDäP KßMNÌÝNº‚J¥²ºŽ­#(""rN¢’œZ­î6#3&0""«Û\“#""²7&9""rZLrDD䴘䈈Èi1É‘Ój1»Ò–'€u'÷ÜsÙûIŽ·|""¢[U󯻵HrÝåûpDDDÅkrDD䴘䈈Èi1É‘Ób’#""§Å$GDDNKô£vˆÈ¹”––ò©6R©TP«ÕŽƒlÀ$GÔ™ÜáÇÊ-'))ÉÑ! ˜äˆz˜¦ .)) YYYŽé–0aÂ@VV–ðº£Ø÷ât¤¿™äˆz˜æ næÌ™Žé–°k×.L˜03gÎ^wû^¼Žô7“Qe:Èêt:G‡rK˜0a²²²Zܱ=Ø÷¶iÚ÷¶^e’#êá ƒ£C¸¥Øs²ûÞ6LrDd£Ñèèz,ö}çc’#êá8špö}çc’#êáx uö}çc’#êáx uö}çc’#êáºê@«Ñhàïïo6;ñ‘GÁgŸ}†½{÷Ú\Wdd$Š‹‹íf«¤RûßÑÞ}¿uëV¤§§C&“¡¡¡¿ÿýï±lÙ2»¶!†F£ÁøñãñÓO?Ù¥¾Žô=“Q×U“ŒF#ÜÝÝqèÐ!³ò¤¤$›c0­«Oܰgü[¶lÁÁƒ±wï^xxx@¯×ãƒ>pHu§ß“Q×U#9S;MÛÓh4ˆˆˆ@II‰ðzþüùÈÍÍEEE^ýu„‡‡Ž?Ž'žx}ûöEDDŒFc—žî“Édv¯ÓžñoÞ¼;wîDß¾}a0àââ‚ùó磼¼?ü0*++áââ///¼öÚkðññ±ÚçW®\ÁòåËQ\\  <ééé€òòr<ûì³øñÇÑÐЀ;O¾ú*ÔjµÅßuGt¤ï™äˆz¸®JF£7nÜ@tt´P¶aÃ!£Ñ­V‹   ¼ð øüóϱfÍ8p°dÉ<ÿüó˜:u*Ö¯_ߥ±w{Å_QQŠŠ >¼Ennnرcn»í6ÀÞ½{ñÌ3Ï£¼¶úü±ÇÃĉ±}ûv¡Sý‹/ÆþðáN$Ÿ|ò –.]Š¿ÿýï®;ü~˜äˆz¸®ɹ»»ã«¯¾ÊJKK…eƒ …'N„Á`À˜1cpùòe \¿~çÎÃý÷߃Á€éÓ§cÇŽÝâ ÚöŠ¿­‘“L&É'ðÆo ªª ƒ•••Vû\«ÕâØ±cøøã…z=<<`0PUU…üü|”••aíÚµ`–Øì=’ë&9¢®+“\óSŒMË är¹°\"‘åÍšÝé ÚöŠßÃÃ*• gΜÁˆ#Ì–ÕÖÖbñâÅØ½{7üüüP\\Œøøx«}ÞôºZó8ëëë!‘H°wï^¸ºº¶Ø'K¿kGáCS‰z8£ÑØe?–ÚkZÖ|¹é½R©Ä]wÝ…ƒÂh4bÏž=‰½;÷ýâÅ‹±bÅ hµZFèt:¤§§C¯×C§Óá¶ÛnƒÑhÄ| ªÏÝÝÝqß}÷aÛ¶m²òòrá÷qï½÷âÿ÷…e¦vÛú];¢ï9’#êá9ñ¤i™µÑZjj*ž~úi¼ñÆ;vl—ÆÞYìÿÂ… qqqÉd0 xðÁѧO,Y²±±±¸ýöÛ!´m­Ï7n܈^x~ø!är9Œ·Þz @ãD—gžy~ø!¼½½1bÄüío³X#I&,H3~úZ¢£ã ¢.RTT„ÇcÈ!˜9s&.\¸àèn žžžÈÊÊ‚Z­Fiii‡µcz û^œ¦}oËS –¾Ë‘QO稿¶}}}ÍÞŸ;wÎ!q8’=ú¾y?ZÒûÖ„Iލ‡sT’k~·’îpj««ÙcŸÅÜõ¥'ö­ “Q×Y“*È:ö}çc’#êázò_ùŽÆ¾ï|LrD=´ŽÃ¾ï|LrD=Ô„ °k×®ÍìIL³ûT*•p§–öbßÛ¦ißÛŠIލ‡iz ˜0a²²²Í­ÃtõóóCQQQ‡ëcß‹gê{µZmó¶LrD=ŒZ­FRR’ð]­{«Û3%8{ŽÀØ÷â´7ÁLrD=–锉SZZŠ¢¢"»žbT«Õí>x“8LrD=¯ ‘³ã š‰ˆÈi1É‘Ób’#""§Å$GDDN‹IŽˆˆœ“9-&9""rZLrDD䴘䈈Èi1É‘Ób’#""§Å$GDDN‹IŽˆˆœ–d‚4££ƒ ""ê ÿâCp‰Ž`ZgIEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/stop.png0000777000076500007660000000161310463127015024434 0ustar ‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ / ¤›$ÚIDAT(Ïå—MkW†Ÿ¹sG#K–×±ð"2ùp> ü‚Hü„¬ú£º*Yeh!-Þ²PBv©“nšB]ŒÙ3š;Ò̽· KîÈKªìEßÝ\ÎÜóÜ÷œ93ÿw9?À7ÀOÀ…3ÈÙžýûr°ølžnžAö°÷_=¸P?|Èú£G K¾óú5­f“}¸4€ße6@Ç1ý¯_ ã8{éfKp É"”[èïí#@Óït&nÒ7†]cX‚’kI­¥ Ĭ%0J‘œà@t¤d_J"!XŠc¬1hÇá/ß§¬5+iJÁÚÌ©Èéhy™½j•Ðqp\Ø-%~’ \—P:@E)ªQDAëÙÐJ嘵5 W¯R>8 ît0Z/-–DJ!p€¾ëÒö}ä˜wï»»³÷€IÓ‘ ¨(ÂC¹VïVéµÛ‡£ÔubW66øöúu.Þ¹ÃîÇôŽÆÛ{ À¦éXP÷Þ=BÏÃ~ù‚_©àW«”k5’("œ(›Ø-ˆK%@æØ~"@žüÛ·qã˜ÞÀþ^àW*GN•VWÙxò„âÚÚÈ}a£W«Á‹ó8Bà•JÈbñÈþa¸žw8ҧΪþàåK—øc^€“@¬1Èb×÷qrf@õÊ•Sí+gfC¡¼ry¤gÕT8ý>¬®Ž¬Wêut¯GšóhÍ¢©óÓ}ù§Õ[¯4”Ö×'ÞkÂp~œv‚ÛhÀåË0°Û™0ûMÒ}ó†îÖÖP)±››Øz}j­³‰ÕÛ·3Ž'ˆ¼š¤)öÓ'´èk× ^ÿ7ÞóÀZL·‹j6Q[[ăÄy'3Ó\ ‡Çðáf{›äæMú·n¡ƒïóg Í&á«W$ïßƒÖø“^åÓ$Pœä—RÐjA«…yþ”²ßWSdæ˜S§rÀ_ €µœP(ö ÕëõtttdÅŠ•ihëÌ‚ó.OOãìCë苟Ê?~¡?g\¹:¯yõùYº,yõüÁ¿»ñ±ä¡MÉ7ý ›¾þ/ù•_lÈ¥Wÿª=‡)eýÛ¾“Ë óRêjÍfþ[žýÚ«ÓÜÚ–b±4|žJ_%;~ûþܳp]žÿö_Jsk{J 6œ «_üTv~ù]yÑ•=yõ«Ÿ—Ë–%³þ~ÿ¡û¯fç¦M¹é¦µùê×Û3óÅï9ì<ø/~*…½+/:wa^ùš×$Ë–%¿°ÿü_üûdÓ¦|öÆóÕ{MýMŽuÕ³†£ aä ÕJ5½oÏö?”ry_Þò–·æÌ3—§T*ë dãÆòñ,;ÓP*¦ñ¬Ÿ?à´ã©óL›–¬^}~>³cG¾û•?È¢3ÎÍi+η1e̹vQ¾\Ï+Þ}n ïìÍ-_½5\þsi똞B¡˜$yì#›Òÿä2ý•3²ã±G2kÞâ4µxY NvCóà+.èÉ W¯LGGGúwìHv\5bœ–®^™;6æ¿rÓ˜óàÐX¿=§!«W¯N::’;’O|à€IuõêÕybÇgòׇ«áúÛî©”:sóÚþd_wvïÞ•7¾ñ7³råŠ#® ŒT*•²råŠ\{íË 7üM2PN¥ÚÀyî¿kmîŸy].^¶,­-ɶm£ÕÚ’,]º4ßÝ~]κkmæ-=Û^Ä”Ñ1¯#ßXq_–ýéô¼ìUÏΆ?ÿaž¿!§?ãÂ4µ´å±;¶dÉתùú/oÉܶ3R«Ò_KrÐãm¼v?¹=ö[/Ìv}v?¹=úW佟ÛÝOnϽúÙY°ô©Õk© ôçýsÎs®8æÛÖ³ûÉüß?~c~çÏþÑÍ”tÿ]kó‚yßËÒeIkKk¶1¶¶´æô¥É ¶¯Ë}c̃÷ßµ6¿üÀ÷²ô9¦µµ5ûÆ«µ5§/]š_þîºü`ÄX7¯ýqRêÌõ·ÝSoZ²ýÑGsö9礯¯/?¼9ÍÍM) ©×ë) ©Õj©×ë)‹ü(öí+§··7çžw^6=ø`æ-­p¥6mX›y§_žz½ž{ï+§T*¥T*ÃÿÍŸ??ßýwyÞ‹½lÀÔQO1‹žuz>ñÐúÌÿZGÞ|É/å7nzO¦ýÖ¼+mYù÷Mù§ŸùBæ/>'­]i협ZíÀÇòÑè¯T“úà¿ï¯TSqº¥}zÞüWÿœ$yðßÉÍ׿#+.¼ì˜o[SKGÞøÞÏóu…Sݦ ksá™I½žÜ{ß½G˜“ùó“µwgÔypÓ†µ¹bÁ¬Á9õÞ{8§Î›?;·Ž2V©”4$I¥òÔQEµZÍ‚ù Ò××—Gy$mmm©ÕjillL½^OŠÅbjµÚàCÃS¯:ô÷÷§\.§^¯gÞÜyy`ãÆÆN’–¯Îâ®®tvNO¹\NSSSŠÅâ𕺌r¹œ3ºÒÓÓ“\}È80ÙJM™õ¢ÓòןZ—·Íy~ÞÕùyûÍϪîäksîÈÌ‹V¤ÔÔ–Öi³“bcªÕQǹýæ¿Î÷¿~sZÚ:RjlÊëþàoÓÞ9+÷WoMSK[V\xIêûŸ WõꇜN’½»ºSîíþs¹ooþž¾=»R,•Ò>}f®ùí÷eÆÜEc^v­^Ëßü’¼ó“ëÇìÞ‘[?ö¿³mË)•Ò9{A^÷ŽØ˜´VÔ¾›Î®¤³3)—+ijjc¬dÆŒ¤§'Y1°nÔyð¹w7]gÎHggç8æÔéééÉs7:VKëþ ¨VŸ*õƦæÌœ93³fÍJ{{[ZZZ†kcè #O'„Z­–r¹œžžž ¤±±ñ€±“¤oZWÚÛÛÒÙÙ™––¦45%ÍÍI± I­VH¥Úœr¹9årvîÜ™¾ŽÎCÆ© ©¥-O\Ý’úìeI­+ÏÝ{I-Ý—}W4§¹Ô˜öÎÙ)5¶¤¿ É¡APîëÉíŸûpÞöÑo¥¹µ#õúàã´Z­æóþƒ\ùê·äÏZ•;>CR¯§Z­¦ÿËC§÷õìɇ®»:µì~r[Îýé¥\Þ—b±”z¡”WüÞ_¦}úÌÁåËïßž[?öî¼ê÷?<æeWötgäóÎgßÿ{YñÌKóòßý‹$Iïžnw&µ™»ÓÞžtv6§¥¥%MMMinjžÈkµZ*ÕJÊårÊårvîìËŒö]£>.f÷ïN{ûâýsêþ±š«2r¬™Õ¿ùб†ƒ`ÄÒݴΙ©V«™6­#éìì<ªºk×®‹Å<öض´¶µ²,¸è´Å)‹™6­)íƒ1ÐØ8¸\‘dpÙ³š”ËÉÞž†”J¥,>m±åE¦¬RšSë,åÛOnÉë^ðì|➇Ó_©¤¹­3Íí¨e` 6ê¿-–š²`Ù9¹éÏß”eç<'§­|fN{ÆEéÛÛí<”3Î{^ª•jκøÊ¬ûê©Vª©V«©×ëç›Û:òßÿøömÔòí/~,_úø{ò¢×¿#I²eã†|ë I¹¯'©×SîÛ›j¥:æe¿²¯7[¸+¯úý¿~Œ76·{¼3©-ZÒœb±?Ó:¦¥££#ÍÍÍill~ÿP´—ËåìÝ»7¥R_-iNy”ÇÅÂÓîŸSÇ;V) O_”G«áЗ úv÷æ_¿ö¯ù©Ÿº G}C;::R©Tò•¯Ü–ç]vEþ}ÛË×Ì¿=_ïû¥´4']ƒ1ÐЋOÁÀ@Ò\ü¹\Î5óÿ-•ÊÕö"¦œj-+ïêÈ÷Š·gÇœjæ­|AÞ±âÚ¼þóÿ+Õ%©TRªþå´W¾í£Ù¶ù¾l}èîÜ~ó‡Ó5gQ~öWÞ’áÇ~¡0ørC}ð¥je`øïFžrÖs_œ›þä×ò³¯z[ú+ùü‡ß–×¼ý™½hyžÜö£Üô§¿6|þÑ.ûÒkþÇð˜Co:®TúSz€InϬ·fVß»ÓÒÒ’®®®466¦¡¡!ÅýZ­–T*• ¤\Nž˜õÖ4ò’ÁÆŸ¿6³ïøìcšTëŒUÎÆŸÃ(c5ú’Áe?{U¶Ü÷yßûÞ—k®yY.»ìÒ£º¡ßþö¿çóŸÿYyöyÙY›yȲÄig]œÊìKww=‹ÒÜ<¸J0R¥2 ?Úœ”÷õeÑùçQKˆLA-ªi)ìË#§õ¦©µ=¾ï?òö_’¿|ÅÛóº/½3+®ü¹´uÌs2详w÷ÎÌZ´"³­ÈìÅÏÈW?ùîš2cÞ’ÜçšœqÁ%¹ç;·¥¾ÿ¹ Ú¿ÿM…òÀúo¤kÞ’Á¿/ïK­¿š¦¶é©V«YûÍÃãŒuÙ#Ç,³àŒó³î_>“‹®xe’d_Ï®´´wºó™´N;ëâ컳1ÝÝÝY¼xqš››Ó|ÐDX©TÒØØ˜Í›7§o_c]8ú=¥¹æ®Íû2P?ðc‹û:æW—;ŸþÏRfÏyfV®LZ[|É XL¶nMî\¿!¯=cmÊÍÏO¥§×^Ä”R~¸7WÏZžwo½> —¤­snÖ—·æ¶û6檫Îλw½)ô½æŒ‹.MSkÇðï'8àI¥¯7_úئ²¯7…B!¥†Æ\úòëR©ôgÕ+ÿg¾þé÷äßoýH.¿0©gÔ‚rßž|ú=ƒïH® ¤£kN.{Å[÷¯.4æâÕoȧßóº´MŸ™%g?wxœ±.ûàU‡+^û®|ósïϾyKJ é˜1//þõ?±0iíëX˜ú’¿È]ÿùæÌ™³-+W®LÃAa±XÌÖ­[sçú]é9í/Sh^8ê<¸¯ca¶¼êwÓð•9sædîŠQ&Õ¾bº·nÍë×çG¯|Ó˜c>ôå»ëîy|ÄêinHv5äœ%Ó³dAWº¦µ§T*¾NY(¤¤XœèûûRHv÷Vòø“½ÙôhwÞÖ›½ûj©ñk‹ŸµrNºxGn~ì…™?AÎXÞž¹s¯ÿã'm*çÑGÉËæ~%]g^žïoÜnbJéÛ^ÎkÛÏÎû×}0¥óÒ:mf¦Í\b©”]íÈ_¼ô%YúÓ3òÁwÞšÛ*ÿ•ùgœŸÆ¦–Áwæ'½¡ypÖ¿—…ó²|ùòÌ;7¥R)?þx6mÚ”?ZÏö8â<84ÖÊ[?‘Eóæfùòå™9gpRݵ}p¬-[Ë}/yØc]pîÜÁ øþ]œðñœ³çeé´=ùèÝ?•­Û¶gÏÞž …tuNÏœÙ3òÆó6dÓ»w›=‡)§c]_öÔïË#]Õ4·MÏ´™ ÒÜ6=…$ÕJ_jvç.83å-Åüí7oÌÂ+ŸöÎ9)–l<8E ̓ý÷¿,;¶íNïÞj …dZgcºfMKÓY·Œ{kú§>˜'Ý’Þ=»R(2­kf:çÎÏÞ׿ù°c=ëÂEƒA°vÝæ§ec,[Й3wå´9mélüÙ{úóè“å<øã]yhë.{ SRµÜ›žîÇ3Ð_IÛôÙiiïLaÿ÷ÔëõTúödï“e_OwŠ¥†´wÎM[çœ446Ûxp ™ÈyðxÆú™çœ>ßøÖÝ+p© ô§¿º/IÒÐÔzÀ—%I½6þj9ý夞”šÒÐÔ2 Gã²KÎLáŠk?PïÝí5z˜ªÚ¦Ïü”Á—?öûéêê²E`ŠéîîÎ˯ûdü&@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@‚€  A@Ø€  A@‚€  A@‚€  A@‚€  A@‚8‚†¡«V­²5`йå–[’X!2b…`Íš5¶VŒ§zëŽ2ZHŒç<§úƒåxnÓx·Ï‰ÞŽÇ{»NÕí<ò¼'Ë퟈Û>‘·e"Æ;šýþX/käeLÖƒœñlŸ“í±Ì$ ‚ñ>ÐìŒÇ·}N¶ j²ngNìçOúþ2áÚ§9©‚àéx"ëÁpp VƧêŠÅD\Ï£]Ñ9Ü÷‘޾NÕí<´Ïë$2Ö>w,ûá±ÜÇz¬<·}"´'겎t_3‡ÛƳªè ‚G³cNÄÎ8Ñcœ ËiGûà>žë{¤;ò‰h¼Ë¸c÷TÛÎ'ò:Ž'Žå¾8Uöù£9ºï>{"Bq¢Çë~ùóÃ=¶®G³ aB‚àh¬vÌcB›¨í8‘Ol“q;ŸÈIÄ›µ¦¦ñÞïž/9å‚€SoBœˆ›Éü&­ãyBïË £)òôßß'bÿ6És*ð{¦Xpèvúo¢¶Ó±¼6í(ùÄßç£Ýÿ'ÃuŠLª‚ùf¦Éú:øv¨aµ’0Úv>ÞÈötD×áöÇ£ÙW÷¾8÷çñî±¢u¼cLÔvÏ8¿àHoJÏmó¦BŽVáŠk?P¿ùýoHWW—­1G€¶‹íì¾åT¾¿™:n¹å–¼üºOzÉð‚câHéÄlÛÙ>àòõÇ€@‚€  A@‚€ Ô0ÚG~÷ùÉð-ˆkÖ¬9îë1‘·i"®ÏD]ß“í¾`’­¬Zµê¤™`&jgä$z²Ïö?o§À ÁÈ eèôh“ÒxŽJžœŽeRÿIý®Zµê˜'ΉÜ>?‰€LHŒ<Ò<ÜD?òïwÞã tä;ÖÏÇ{ÝçúLÄö™('â2˜BApª9ÚIp²Nšb€)G»BL 8Þ÷%L&Þ?À ‚ƒß¼ö“<ï›øžŽë<Öõ™¨Ë:ø¶6Ή¼/˜Ü W\ûúÍïC^úÒ—Ú0ÅÜrË-yùuŸô› ¿º€ Áh&êã{'rœ#ÇGGéTüèžp¼Nõ0Þ/Q:Òù&ê ›Æó»Žæ:OÄWý¾áÀ¤ ‚ƒ'Ãcý²¥ñ~…ð‘.k<_€4QGõ¾ö€‰â%ƒ§‰I+SÜÁGö–òxºY!8 žn“b…à'ñeB1açM…Çs?‰ë € ˜ÔGÚG:ϱŒq¬oï¤}¤OŒwŸ0àH¼dœúA0Ù|'òã‰0iƒ€ 8:kÜß €Ñú_ntПWá<‰è¨H|ý´œleÀïgâĉ¬\¹RâG´Ü´wï^±víZòÆæRT8‘÷0zÀ7`€ãR‚a_~u˜¶ncÞ¼y,]ºTúYÖ¯_/jkkY´àdW;BË Mu 9‚^ŸÕìd\š—ôDƒÿ½ó'N¶PQQ!ý$€^xAœ:uŠÅ‹æ³¿ÞMMs$ùžhÆeK$Dƒ"CØ„³~¨kª}Új¸æÊ{÷íc×§{¨®®–~@MMظq#-¿ŸªcÃ8î‹¡t’JŒ Ü2Dj É0àlüèÀþÃPóñÇ\;¶ƒm;>ÂétQ^^~IùÛ Ï>û,‹Χ¡;ŽF,“'¨u…À©@Œ¢œöèPÀo?ŒÊ„ ³g²½ÖÅÕ3¦RYYIMM¸€òÍÉÖ­[…SKfóA]4#2„¦.âÝàvœw[_º0 Ã@ÜQà%_ËA²ÓãØôæ[Ô×ׯ²6mÚÄ´âÉ4ö¸1\*¦ü:ôë¶Á½®C_Ø6Ðíô 3;š+•Ô_ çСCtvvþ ÔoN?ǧðy¯F„úCàA³À²ßÑÁ©BoNûÀ´dØE‚ø(¸,mÁŽc$'%òÅ_0d€¸¸8Í.)Ä»!dÚ=lAа¿öÌÈ’½ÖC€öypk퀤äz[%/¿œ£G@UU,NhNÛxЀ°†AÓî’!Ùñs(vw©vv@L¤JÐ4 ŸÏ7t¿ß¡‡p;ÀéH ª¢bi†iÇ^ FT’l=ÐäAˆA€('`…„N_¿øøø¡x½½ôy{ˆN4i>uŒªO^#!1“+'Î%66ë;ÔAM„Q¡·§U9}º1cÆ  --¦¦&<É9œh9Fu×+8…¶Š¯)-¸•Ì‘cQT휂ÉÈòà(Ùa zN~ Ðß?@II‰2ä4\°`;wíFöµ$1/šû®_‚oôç¼Vý0»«Þ"ÔßM„ .Í·bgŠC· êêÛqøNP×ÐÈÌ™3¬!Œ?^ÀŸeô É2Å)¥ï²ãGóRõ:º7·R6}1Ïx\N EƒÖ3Aª¶¼MJ¤As¸4` €×ë±±±ß{'H7,ºN4{0-„í°pX'ö“zS4knx…êÖøõ¦¥Í"dùמg°_Æ WÝAnÞZ[Zi<° Mï#sä(<ùùT­+'mçV><bÉŽí¤§§'„”\!¦Þ<™”˜T$é|DdYÆ“œGaÊ ^?ü"[?ctR.×d—ëŒã¹=Ó¸½‡IÑ3ÉHL¤Ï륲ªšÉ%%Ìš6Q9cIˆ­Eyé1øûؽ›¬¬¬‹ Tc0Ës-)Qit:‘%‡âB•54Y£Á{o ‡ äh{-á~J³ærÑ£ü“Õ|òÆ›DïNB¶î[²„ý+–£N¸‚ã­¨ÂyG2O©&Ë ilh#³³¥ ÓÐKXT6W°ý«-XÂ"Â鯩9Q§æÂ8·¡¥§™­úÛÌÍù ÷=ÊÃÞ{hÜÐÆš¿®gά9Ò‹%%Âã­&vtÇWû!>÷âLžTe–RWW'rrr¤ tÀ°tÚûNÑöuX  ëFrÃ¥âp8q9]D8Ýç º|l«—¸¼ÝÅŸvýŠ0cÍ6]]Â-³|ÄåGAª’LÔíé<¥H,›RÌ‘#G„Çã‘."Ã2:¤(*˜¦‰aèŠBX]»îþ.Z|ÍŒˆÉ‘=ÝdççK'êêĆ)…üÎô‘$wØò)ÑóGð¤*ñç©Å:tHäååIª°l㺩#B ,A°@ȲI(Â!BXÈ’ÌÈÔ ä%LàÃÆwÐkäN9/¹#rr¤–†ñrq·‰^†_Õi?‚a7gð¤"óàÌéìß·OœóÀèÄ\ÎÎîÆNÍ…CuâP4µ7p¶·!Š¢22i4Wg]G£·Žÿ¼¿–‚¨YüúÚëYñàÊó²ž-µ65‰MævËKê¤ÎAO@ìMü­'È=‹Ù‡°7x–œø1dÇyP$Y’‘%…aÎËÊ÷3AxËxZzšYT½Œ,Y²dÉòÞŽª(ŠÄ`W+‘¾S äÏm¤¤ª³ÅŠßiÂk3‘V ¦’©x„îSG˜ˆ÷‘c/ ª~)y…eû̘é”FJ1ìaüô1l‰(zy5s.ÇîtÓXá§6h#ÇmÏ* ½/µÔÌ- ¾—ŒºhÏúÚO"É2€`š h2™ðçäR\Ûˆ½°“Ù‚fÀ@O/¯lÞJîâëYY]BÇD˜Îƒ[Y¹´–ÆU+°›þЖ˜˜:Å#24ÖÆµ¾Éd¨“‘ñ“\²ø/©(]‘ÕJ–,Y²Ì’H,Nósÿ‹y®WX±¬]WØs`„aëÇi¼á‹¸\n,&Ð èëieËk?Ä´n˜KË×rrê$£»4®\ð.¹z¦½–•ö/`}ý®]Tƒ¯°˜ž£Gx^ò±øÎ¤¨¤”"—Bc¹'kPdÀ¦/˜ÌöºÑ¶]Hãí|ôÆár¹Þ2ðààí$‘|夓q^~áeœó?ÁeWUSä_M.Vï­¼øÄýå““_ô¦xNv=MZE3džyù»X­`²·PPü5Òñõ³Ê|2FÁ„Óã{_“Œ…q¸¼˜-–7WÞÐþ@±éIìNቓ‰@QV›ý‚ñ:=>L&óy×5UAL%pûrßôŒnèÄÓXmÌ ‰è4ª$bu8É – œcôý!†aŒMãñλžNƉLŽ`2™qyýxróf%U‘Sq<þÉX‹ÍŽÉdÂjs¼ý3ª‚¡ëXmvYB•Eœÿ¬õÇ—DL¨ŠŒ"‹8Ýï¬sHDB‚€Ýé~ÇüÍ–T"Š˜Œ“WXF26"Kää_ð›Ã…Åb}Û0ñH§Ç^Ò NñHoNþó'Ki4UÅéö¾å}1•Àáò¼ï ‰DC£”Å»! áöåa2½¹|kšŠ¦ªØìŽ÷ý]TEB‘å·•áû&3à 6=ŽÛ—‹˜Jbú›ÊÀl8²õ1j”GùÔÆ¹øƒ…`¨ÔEùÅÿäÄ®R®»ùL±å•Ÿ ­;ÍW¯¡ÄĬ×aøOòû‡¾O~°†œ@¦½ëm#úØùÞÍW‘_Wó¼v¬/láÉ'ïcÙg¾INy.-._˜íI³`¾öS_zu,ª†€˜N‘ŒÇd Ýe™D4Œ(Šhº‘)WgÊMËìxú~ê.ÙÀîÍÒr`;U‹VŸ£ËL9I%3ñOŽ ‚`F%Ò©$Ь Ir¦N(*b:ÅÞ—ŸÄå  #JÄQT•t*IÓó¿%P:—ñÁ^\þé3yUUM3Îè=‰¢hh†Á©¯“N¥0[ˆé4ª¦‘ŒÇ%EQyý÷¿"¿ln¦üÇ£3e>&L’N§þ³žÈ º’(’ˆG2åùŒNÄT Y–SIÒé4ªªñò£ÿNuÃÚ™<ɲB:™D’¤3é_/ÎÊ]L§1„ŒÜÎ}·7ž}`Y b:$IH’”)‹: v·Ñy|?þ`’$“LÄPÏèVßpñðá‰aÒ‰þ@âjNÚE*•D0Yê§³yR:Aże„'†ëkÇb³3·a5ƒ]Ì™¿œ=/óû9ðÊchª‚ÙbeþÊaqx8Öô CÝ'©[z9=-û±ÚWÎ#f ½wN!Ý'öa.oÅÕ ëm£õàk¬¹ñ³ô:ˆÙbcnÃjüÁ¿¶ «®fr¸›ñþNÌV+&AÀbwâöåR\¹€±þ6"“#ØnÑ.MU)©^@ ¤Šž“ûS ª­Âd2Ózp†®‘WXNÑœyôŸnFJ'X´æ:òK«9}h;ナ+©¿d¯oºOnèô$bZBVTä´È‘[Pe‰Ek¯c ýª,‘,¦´¦=/ò¥µËeI”0[,Xs#ns¬¥bÞ*Fû»ˆGÃDBãŒt1Ò×AçÑ=¬¸ævŠªH§ÒœÚÿZƳ¥$Éø‚åÛµ™âªÅ¨ªN*‘dzr„dܾ &«E°»sÉ-ªf¸ëE•‹˜í!™Œ£*’¬`•dQb°³…T|Ý0 O£H2Áò:ÆzO¡ªùeõÄÃãôœ:‚ªh˜¬n“£ôœ:„Óƒ$I„ÇûÌvFºORZ»“ÍMNa%sbs¸ñßõknú<æñäton!†²¬056D^irtŠÐèùã#㢤“ÙŒÕé'·¨š‘žäÌ! !˜÷âðwN!m‡”Ô2pú f»WN!­‡¶“JÄP ºétfºeî’+9¹ïòK3žUÕ%YV‘d_~9m‡v0Ö×JYíR’ñ8‚Å…,«ˆ¢œÑwZFÓ ¤³¸$35>LnQ©xôŒ±PÁ©ƒ¯1ÚÛFnÑ\eõ¸¼¹Øì.â‘I,v+®¿»Ãª6žG¬¸sƒD&3£LE;“7³DQ&ˆÓ~t7b*E ¯„Žg¼:ššéˆ'Fú¨¨_Îpw ²¬"‹ýíÇQU IRÁdãôá×1Û\¹èù(ªÊp_.¢¤ éiQÁ_XÉ©™2Ÿ[\ ‚…î–ƒ8¼zO7chÁò:¶?ù3*®!25'·˜S·‘ˆ†1L6Þ@ÆH”$Õ@Ó2õælÚ²¢beU#Ñgä|6oéTšÐh?óV0ÔqIVÌvÚ›w"É*ÁŠùä•Ô`è:“ƒ˜lECV4TÝ”1ÖŽìÂå/@զLJ `æô‘XìnZî`¤·ºK®BQu¦&†Q¼/¿‹ÝÇPW ±ð9…UH©²¬!Ê ª¢(e¦Dùüò¥h™w3úœÁlscwÛÒIüAúڛѫ݅/8k| U2y4ÙÉ+­ej¤‡‰¡>ÒéÇ÷d¦šÄÌ”¢(t·@N'”Ì%QV·ŒèÔ¢¤,ŸO":IÏ©Cx3í¥·ä$S‘›—‡óÌz·t2I{W Š>BêLœo­¤BYŠaD ƒX¬VtM# aO˜ï_OòLXÛ¢õL¾ÑÂR¯[N.˜L ÈL‡ÃÄj.Atä ¦D\ŽìâË,gÖL\vË]ÿ§H(f°zI§ÓÄ"“‘“á$¡H’±©Ýú'U&Õ|¦“:ª¢¡¨srÂÓ âj.¡Iƒ‰Þ1ºº˜–È²ŠªüçOS\€ –IL&ƒ9s¢ˆ¢…ªªɸÖãkh=¶‚DÌzf-CpÎBr «Qo _pÑÉòJë1[† UQ±ØÝäU£(*EÕØ]9Ø]¹x¥xrKðå—‘JÆÉ-š‹;§·¿‹ÝƒÝ“‡®8¼ùäVî&¯¤E–IÄ"Xí «ñç Ë2EU Ø=y¸|A\þÂLúªFÁœEØ\¹xóŠSiŠç.ÁáÎ# ëPT݈?XÕáÃ_0‡t2‰¦ÄÃ!¼R,6édI ”Ô‘WRƒÅæÆbóWR‹'¯»+On1’˜F0Û(ª^‚ÕîÁbscux ”Ö#X$ã™|Ï]Š'·§7ˆÓ a²:qù‚º€ªéä•Öá ”a¶:±»rH%âØ\~Ü9ÅyçWàÎ)B‘TEÅS„'·˜ðÄ Òy˜­N“L6‚eõ¤qL‚ÉŠ”Ng:äÒ:“…±¾6ÊêV"˜lé° A%þ`6W¾@©DìŒ,spù °ØÝ8½òŠ3ò°Ú½¸s‹ðʰ9¼˜m.ìî\rŠª™î& áöb²8ðä•bux±¹rðæ•dôíÊÁêðb¶ºp¸sÉ-®!LW\‹7¯”œÂJ&;IF§É/_@°|édÃðÌÁá `súÑt§/On ˜,Ø=¹ä×âÉ+Æîòc²8pzx¥XìÆz[È+©#X±€Ü¢¹hšŽËW@NaÞ@é™÷/GL%)š»§'—¿Y –ÏÇb÷à ”dÊ`õ³—/ˆÅîÁå 21ÐNaõ“5sÝ–™Ÿ[æ=y%$ceó0 ‡7ŸÜ¢¹XlN,67º!PXµ˜t"F°bvW.¾@éd‚¢ÊÅX^Üþ f›ûLÚn¬676w¾@)V‡oæz&î\¬?Þ@)’(R†¦Ê”Ô.Ãd¶~ày(Ëw2/ç4~ó†½SSs‹on¯KlÄüÍØL"ŠnÅ›^@ÿô´×§•Kr%Š“ÃXPIâä”§†®‘$ºa0§<—|nõ]>|˜+Vpýõ×óÒK/½IOeeeŒŒŒ ( –·øR/ËE·}÷qcr"ò_’¸Ý3FIqŠÞÎê¬&²dÉ’åOŒ`Aÿó­ÿíŒ §ÓÉää$n·{æ^ss3—œYéŸ5&Þ, ËýÜù•ÐõìªÜ,Y²dÉ2;¢ÑÏì85ëðO?ý4ÿøÇ?¼-Z´ˆ×^{[n¹eæÚ‹/¾ÈÊ•+9xð`Vy cÂnµàu;H§ÓYidÉ’%K–YžÇnÝèþ‘GáŽ;î@UÕ$o7Ýt›7o~“1qã7žgL¤R)¾ô¥/ñ»ßý‹ÅÂí·ßÎO~òl6ÛŒ—cÛ¶m|ñ‹_¤§§‡ÚÚZî»ï>®ºêª™ûçz9ÞêÚŸ ¦l•È’%K–,,î¿ÿ~>ûÙÏ¢iÜg¤7näÅ_œñ¸ONNÒÒÒÂW\q^¸¯}ík ñú믳iÓ&^~ùe¾÷½ïæ{ßû÷Þ{/¤¼¼œÛn»-«Ô¬1‘%K–,Y>(~ö³Ÿñ…/|ã̂͊E‹a·Û9tè/¿ü2W\qN§ó<¯Äo~óxà–/_ÎÕW_ÍOúS{ì±óâú—ù®½öZ–-[Æw¿û]FGG?0ËŸoë‡Ñ4W_}•d2I  77—`0ˆ¢(TUU½«D†‡‡Ù¹s'6›ºº:H§Ó´¶¶’——‡ßï'™LR^^~ÁøÂá0[·nÅf³qùå—“—÷Þ¿‘e™ææfV¯žÝŠä£GRYYInn.½½½èºN<gÉ’%­ŒX,Æ«¯¾:³ë\AA6lxÛ|=z”U«VÍ:þD"Á3Ï<ƒÓédÍš5 °víÚ Ê:RYYyQïÖÒÒB[[eee¬^½áN;»XJUU&&&¨©©yß yKK 'OžÄétrÕUWá}‹}T¶oߎÅb!77—ŽŽŽ÷mn÷\=MNN2==M}}ýEë2K–ÿîüà?à»ßýîIÚ‚ pÓM7±eËV­ZÅ–-[ظqãyaººº$‰êêê™öH×uTU=Ïø9·o8×É2KÏ„ªªìܹ“õë׳páBdY¦³³“S§N¡id÷îÝLMM]0‘ÞÞ^dYfýúõTUU¡ª*ÍÍÍ8p€;v Ë2¡Pˆþð‡455½£k¿øÅ/X°`+W®ÄåraƒƒƒìÚµ‹ÖÖV4M£³³“7ÞxƒÓ§O£ª*ÇçðáÃLMM …ؽ{7‡F’$6mÚÄÞ½{éïï¿à»„B!vîÜ ÀæÍ›EQÌ|~5::JSSÇGQ:;;I§Ó=z”d2IWW×;Æír¹X·n466RXXHSSCCC3FYSScccH’Ä+¯¼B*•bÿþýìÙ³Y–ß1þh4Joo/555<üðÃlÙ²EQhooGÓ4ÚÚÚ0 ƒ¶¶6>̉'PUY–éèè ¹¹™ƒ"I¡Pˆ7Þxƒ'N\Ð}ÙÚÚÊ믿ÎêÕ«immåСCŒŽŽrðàAöîÝ‹ªª<ðÀ<óÌ3Œ#Ë™-Ã8À±cÇÐ4Ó§OÓÜÜÌ¡C‡2Û‰OL°sçNZZòþÑ IDATZ.˜þ¡C‡(**B^yåTU¥­­ ]×imm¥££ƒ‡~˜P(Ä=÷܃ahšÆÑ£Gijjb||UUÙ»w/G%rðàAšššH&“ï˜öY=ÕßáÇÑ4ææfššš˜˜˜@E^yåFFF8xð ûöíËŽ|²üIóï|ç- ‰ÌÁŒïÏïBlܸ‘Í›7£( [·nå†nxS^öíÛDZcÇ8vì'Nœ µµõ¼p6›mÖï­(JÖ˜x+"‘O=õ‡æÅ_œ¹þ /ÐÜÜL{{;?üð1 ƒýû÷óÔSOqüøqZZZØ»w/ŠÙlÆëõRQQÅb¡®®ŽíÛ·³gϺ»»yàH¥Rüüç?Çb±000À /¼0k™?~œ{ï½—M›6°mÛ6öîÝKww7¿þõ¯gÂíÙ³‡={öÐÕÕÅo¼‘푲üÉò£ýè¿<6l ««‹'Ÿ|’ÊÊÊ7y½«««±X,ô÷÷3oÞ<æÍ›Ç–-[øâ¿8+cå­ ˆæææ¬1ñVäççs÷Ýwsùå—Ÿçjnn¦°°ÒÒRV¬X1+—Óu×]ÇÝwßÍúõ룶¶–•+Wž7*ƒ,Y²ä)×_=_úÒ—(--å·¿ý-ñxœññqü~?+V¬ °ÿ~Ìf3±XŒh4ŠÇãaýúõ8N"‘—^z) Ì™3‡µk×Îê‹–`0ˆÍfã±ÇcÕªU3n/I’èíí%77—¥K—RVVFee%[·neùòå455Q]]ý® h8æòË/'NgNãL&¹ì²ËˆÅb3áêêꨪªâÈ‘#œ8qâ‚ñ†ÃaEáSŸúÔŒ<Ϻö4M#‘HÌÈñÜ£èÍf3kÖ¬¡¾¾žééi®»î:Òé4Û¶mc||üÓt:$ à ‰àóeŽ_¼xñŒ'¦¤¤„úúzrrrèîîfÕªUÌ›7¡¡!Ìf3k×®¥¦¦†H$ 7Ü@"‘`ëÖ­„B¡wLßl6së­·òý零뺎¦i¨ªJAA………,^¼˜`0Hcc#---ø|>ŠŠŠX³f 555444PYYIcc#ÇŸ™“}'¹ûî»ù‹¿ø Nž<‰ßï?/îsîY³†ÎÎÎl”åOÚ3ñ_Ãáàꫯæ[ßú7Þxã›î»Ýn>õ©Oñ•¯|…;wòꫯò£ýˆ;ï¼sVñ#?üá楗^â'?ùIÖ˜˜õ&×_=ÇŽcrr’ºººYy&vìØÁ¯ýköïßO]]{öìáw¿ûÝy£r¯×Ëý÷ßÿŽ{^œe>õÔSœªª2<dÖžLMMaƬ½#çrå•WÒÕÕÅøøøyõçì4ÌÃ?Ì¥—^ší‘²üÉò¯ÿú¯üð‡?|˾àýú͆7266ö–ÆÀ}÷ÝÇe—]ÆÆg ‹Oúӳл´´”Ÿÿüç<ðÀ”••ñ•¯|…oûÛ¶:~öЫÆo½üM£ò‘‘^zé%l6†aPZZÊW\a˜ÍfDQDl6ÛL#ûv¼øâ‹ "‹…}ìc8Ι¸AÀd2ÍŒßi‘K<gÓ¦M3sÊ6› 6PVV†ªªX,–ÌѺš†,Ë3yTUuƵî=»ÝŽ¢(Øl6dY¾àüضmÛFÅÌq¿‚03bVÕÌa=f³yFn’$a³ÙP»ýʼnD"¼ð ȲŒÕjE×uÖ®]Ëܹs±X,3ñ[­Ö™#ÍfóÌZ »ÝþŽºØ³g§OŸÆjÍl÷»nÝ:æÎ‹$I†1#«cÇŽÑÔÔD àÖ[oE×ut]ŸÉÓÙZUUL&Ó™#ëßÞ {ú駉F£¨ª:#AÈS¿nÝ:ÇŒ¬Î~›m±X$iFGçÊäݦÿØc‘H$°Z­444ÐØØ8×[•³ù9[ÆA˜ £ëú̽ ÉüèÑ£9rdæ9A¸ýöÛß2î-[¶——ÇêÕ«±ÛíïÊÈ͒僦££ƒ½­¾ò¹kÞ6Ì=÷ÜÃW¿úÕ™Îÿƒþª#ËÇÛ~Íá÷ûÏù|>Ìfóy®ëÙÒÐÐÀܹsÏ{ö­:V“É4Óѽ“ëjݺuç] X­Öóž5›Íçåñ\#áíîÍf¡M}}=eeeç]+,,œéÏݨäì:€³Î…p:çMý”””œ×ÁžÿÙüÎVÕÕÕ3‰sóý‡y›3g999a2™Îë,Ï–³Ù|A]eéÒ¥oZ˜ q:3yáMïqVvç¾ë{IåÊ•ç-ÒÌËË{“®ÿ° œ«»? c2™f-ó²²²óž]<öVqèCÂb±¼é^–,ª|ùË_ÆãñðùÏ>»ËòŸ«g"K–,Y²d¹ÏÄYž|òIn»í¶?ë¯þ,<†ad­Æ,Y²dÉòGá/ÿò/Ï[Ðå¨1!Š"###YidÉ’%K–Y‘ù*kö'NøÃÎ íº1át:gµód–,Y²dÉÐÓÓ“B–ó È®²Í’%K–,³'»þ!˹dúÊ’%K–,Y²d‰,Y²dÉ’%Ë–Ù4¤˜¬ÖöÔ4Y•9Ô~Y‘Y»p- 1AÇ`+êW`1[þÛ XQŽž>JEIE"$YÂn³ ù0 ƒÎ3‡ Íkhø@6D:Ùv’p4ºkÏÛ£äE8¦µµ·Ë…A$¥¶¶öMû‚\,£££ôôtãñx$ I’illœÙ&ü Z|³·0ÛJ¾WùéM'›Ð4+—^™Ý„,KÖ˜`d šfÇRó±,sý“ýüïþ7-½-8l^9ü EyElkÞÆüŠù|dÝGXZ³—ý¿×'Gj|‡ÐŽüš¦¥w”={ó¥Ë«Hëô~ößËÊE+©Sû¾¶G"#$MIü¹~Âá0G:ÌÜ;=|Œ[OSRyUö[fç¦ç9Ø!ã4kdú+ãìQ“ÅÆßþEs*<³k´SI&øÿ&NáÛ°‚ø«Ûér9i9u„݇wsÝÚëhneçnV¦üÜ<%°rõ&8öoÿÆÒo|Ç;Œpc±ç‚ÇŸejb‚¦Ç§2?Ÿkÿîï¸çïÿþYlk’,ñ÷w~‡ýûöñ~—/ønj«kgõ|"‘Àår]ð(nMÓØ³g›‹’×àó¹) 8þñ­íUD†÷ñàƒrçw¾çoÝUUeÇŽäÖ`É©'pQ”c&)ét$I÷´ÓÞ±“dòn¾ùæ÷ä‰Ñtá¡!Њ–ÙR\J…Q¤444P__Áíëß²cK§q»ÝïhLè±1lá­è9ËÐSã˜r-hjËðkÈqÓ¼¿xß ‰­[8q2—¿¶³ÕÌKÏ·óÐoÚ¸ãsó?pƒB7tzb=l™ømò~ì½èõú[¶’çnÇÿNuÀ!Øùéÿ‹íƒ¯ó¯ß˼Özn]u+…ï[¾>òc¿þ5.çݽ¯,“Z´ˆ9¿ÿ}¶'ÌòÇ5&ÔtkѦ褣=X¥In^^Šæ˜â7Ï<…’SÅsžcËÁ-\:ÿR6^¶‘ª²*¬ëEgltz”ö¼ÀÄÄ………x<ž3‡2iÔÖÂ5×@}½ˆ2ÝIRLâvÌnÔùÔa?¶€kU-½§ØÛ²—͉٠KëR_Ö€Ådâõã,Ï=GÓ~ÄÕÿú¯ïKgÞÛÙÉ®_ü‚n¸ÚuëPÆÆPÃaÞxþyV\qþ¼<Ì–÷wªHÓ4F'FyñééEn»ö3¼Xö2ÿðÐw¹û¦¿eíòµïÛ謳³M7Ðý5„ä1jòçRVà$!*„åËVÕs调ɓO³uëVn¹å–÷”ÎÁƒ),©bܱ”ò•¹P䆘 &·{ÞJZ4£Í°hÑ¢Y€÷‡úêho'K!º.Áçó1¯ÈЬèœê‹ÓßÓISÓnÂá0kÖ¬ù£¸Ì5EÆÐ'p¹ Œ´bò–b‹nÅY$“Šº±½ÏéíÞ3‰–(_ýÆjžíµ1™ÐøÔ'òê³m<úX;uÇü?Ê{†Óöâ²Òµ¸m™vCѶlgoêYìî0æÓ¹üÝÒ¯à´_Ü´®ŽNÜHÐPºˆúÇ<{âY¾ðÂøÜüÏqãògÝn½ûï»»®ºŠ9ç<8+sd„çûúþGuh*/;:|ø0+V¬xËxÎÞSeV}ÅŸ1!%QÌ…œxåu–ÜT„}e-kR“þùž­4%5TíšU ªEÙr| ¯·¼Î‡–\Îgn¸@ÎÅ͵FÄ¢EÄn·ÓÕÕ5sÔœ9ð•¯ÀÙ2Ótz+Nc€O6Þ;«xM6+«@žÛ‚Å&°ûÔsë>B*aþ…Jk= åËTä6â´€¤ŠÄRiz{{gN|ÇÂÜuˆÀúE˜s1Éþ+>ÉÊ„Šñü3l2àt%T§øØ(¬¿îCä]s &EÁ”—GqUGöì¹h¥ªªÊ¾­[ߺ•»îº O ÓÓØ,¾ó³ŸÑsô({~ücÄÂB®ºóNòÎ9¯ã¢t‹ðÓ‡~Fsì( .]Èwù}œ'£éq–Ͻ„ªoTñ£ÌM×sÇ'îx_¦ZŽ?JNuG‡;pÚ4zCy˜L&’²Æ‘žvDÕ„³¸Çäbvìxî=©TŠ¡Á~ÊV~Áä ¡€¬Åœñ`Å$PLfò,Gå¹çžå›ßüÖ»êÇÇljœÄ=« ºi(Èwn€+dz8Èá7öx•`08«²ø®bMe`¤‚²äaò®ª³C–?G*½s*ŠÙå;ã·»8º»#ìÜ5Î7¿½†ß÷ØØÖk §dFÇE¾~Ó\~ûà šš†Y¿¾Œ÷Ûžè ðËî§mè$½üóÄåOt=Ž–×FyŽïñòwK¾A]ÅÅËX7tÕANI§Eó³zþZ~ºý'üî·¿ãËk¾Ìe‹/»ètäéiRosîÛ6ñ¡Æ9gÖü±yúé§ùøÇ?þGM£³³sæß'Ožä£ý(mmm–ûcÂèy†‚ ò¯ÈC0›¼  kª…?±–e1‰—vžàT\GÀ騫K“»`+aq)fgL$Ò*§zbLÄ C`yƒâ È~TRRB~~‘‘0DÓÍ? •eÝøsuÖ®3°2 ñÙZ®™?,•‘ø §¯Ï͆ QŠŠÚKÿ#…ú£˜-rò â­³îć6ÞIì¹c™æÁµâVLv7¹k¯gyJÅØü<»'$V‰V]s=Ë/Ç$ŠÑ(ñæ#ìnj¢'Q †Ã¼öÀTª*wÜy'fA€P4 T»¦1¿²’ú’†ÚÛyîk_cÃ÷¾GÅ9±½Z;ZùöýOõ-5Ü^w;v‹Y—N`,X&“™oÞùußú$'~ú5þŸ¿ù'‚àE¥kL„ EWÑ$Ø}ºƒÃ=ÁLLQT§˜Â,Ål±ÑÑÑñ®½™“l]LëR()Puˆ¤!"Áh"c\äZHÔ14x’h4JNÎì×twub+^I 7¢øgÒAÒ!Ñr&cíìnj¢¶¶Yék>‚œLP¶¸‘œÂ¢÷n€6ãµîÀ·@@0ÜE`.ý$¹óìèÎ>äp/†ýRó›=§£§i‰¶pcñ8/°H;VùÅCí|ã««Ø5î`G¯š‘“)NŒ§ùiRãþz!ßÿÁAJ˽̭ò_TO²¿%sT¼è†[÷Ž:ÒüãøOð”$YTïD’¼4ïLóùKþ–ùUóÞo§¤Ó˜ÜÏô©)Ì^ 9•¹,-¼a‘Àÿ»óÇ<~äq¾tå—X0gÁ{7&Âa’ç*5™0é:> e2áÖõó>ßSc1Œw95ò^yä‘G¸ãŽ;.8my±ÔÔÔüçà&™¹–5&þø¼í䫚»Œ¡¡|¶n9‰6#zutœáÃ=´ïb\Ôq»¡¡n» >ýiXÜh0%-^øà0U3øÁÃs2N=ÀmfÇñIu hj†¾¯ëF–,ü—¯½›Õ—|•Pøn¶o6!¦tÌfÞŲéŒ1a2 Ø,fªŠª(*Ê¡¶6ÇŽÛé$/lja€IÐ3ÏÌÆÝØ¾Ÿû{wñ°ÉǾ×^%þúoÑdž0‰"¥k¹ä²køpV®YOpå*Ì’„>6FdÇöÜÆ ÖÕ·\wÞ —ï–þÓ§±ŒpéÊ•˜#˜šÊ““™ßÄŒcš˜ ÂëåsË–±çÿ‘s,úwKW_ßþõw(»¹‚ª²*Bâ£É1ÆÒ㌥ƙHO0!†‰S„¤)®¾üCˆy›·m¾èìp¹ðzä8±Y͈šF8%1Laè:.+ä85rüvL& ápø=¹Nm6^—@Ž]Ç$ÀTN…`8ž1PsPè·Ç‰¦éˆ¢ø.½I¢‚P:¦ eNN@O¢"äú¬¸‹êb ³ƒÝýÿt?ý+¦ù»øL ¿g9ÞbÒbÆzýÄÛ‡AOƒGOÅ™<|šØ@ÕT„ðÓS)5ÅÓýOóÏ}ßâß{LÓþ¦wî\5ß>ÞÎGn®#j÷òZ·Ž&ŠˆÉb2šNs¨#Æ£»&¹ë³óxâ÷ÝÄòE•‘×a6™¨,rStRžïäK«ng>ñçyX¹01­rh»Èçÿ†EÕ Þ·éÍÐh™l¡çùNú_ë¥wGÇ75óòã[Øó\‹Ô!^*ñùíÃ=›ïatjô=¥£„äúûIõ÷gÐlfØ0SUz$‰>M£G’˜ŽÇI ’êïGÅøÎdºÿþûùìg?{QíÚûI4åÖ[oÅår‘››Ë7¿ùÍóòv¡û³ñÀ”––âr¹¸ë®»$)ÓNvu±qãF¼^/‹…E‹ñì³ÏÎL‘‚ÀO/Ñ=‰IA,^qŒ[®¿pË™×#‘ÚÖ̾R7kw×â´;¹¶{01!z 5•åìXÕÀïzL¤KJæ9¸žKLü|ä!¾Œ#eee8ËœTE‚±‚=> –kbø2÷k}ºˆßõø#²Fhl¾e¢¦[Cƒü:6,|>ìÕÕ8].Ô:ºôt QQØþýo¤šðz‘.é fÆŒ<ñÄWÔMb×®],[¶Œêêjî¹ç, O=õT³ÖŸW_}•yóæQRR½÷ÞK›6mxñÅyöÙg dÍš5¨T*>øàî¼óNêë뛯… ’‘‘ñëAŽ|ÚôíÈ’ïrцâ(«Â¹£’ÇvgÅÆ}äHKƒ FVHµÒꈌXœ[L(€¾qn¯§WAL`l6v¸uX]^n’RB¥’p¸Á­—dÁÞPˆÖ•F°»ùáªÊãŠB|>:Å¥aóôM)‰š~¸ðz”x¼n” >4û·E† KžÁf–lØ‹rýt®µ’Ú•Î@ Å¾º:ª÷ícóÁ]ìj#õæ:-QQ D›KÁyÿÔ †Ýy'»6làƒ9s¸£_?"*+¡¶<<ééàr¡,*BYVuuX€.ûö±-'‡·ÝÖ¢ã-Z¹˜ž­´‰nKeC%v„àx:&£WêY_±¯äŬ $VËüæqmÜ(îxàBCC/z›ÍhíV|¸1hH^µÚ¶‘ˆŸ;œÊÛP«U´mÛr/zN‡OWå>vÛæR|li5×ЫËht:=*%¨•Po³Sþó6ââb[,&¼7f‡@‡œÙ_B¡­ Ðx¬Ôm_Fšg+}{·#¡Wå å”Fd¡‰.¤ìðÁ‹»˜uEZª¨=V‡ÕуЀ"¥ÑÅCS²Úö8.||ää/çãïrC¯`Šj ¬gçµSiwî??l(åX¹É¯ý„Çåcìð" Ø­6\6;F•–¼ýÙÔ%.·Ó{Qb¯„R¡`¹—e{ìØëmdµD郋0æÙ¹¿Û}tïÔµõ>] Þ®¤¢¼­F‹N§C£qòÀœ %U°tu-¹Ñ'c÷1ù§ç™³i/{™”¸æMÉùœN¼N'¨Õ8{öÄ^_R¥B¥•ÝfSÆÃœ”„»ºšªädÔßR©^"^zé%þüç?_Q7¼úúzæÎË’%KèÛ·/Ï>û,3gÎä©§ž:ïúæ0}út®:î »gÏ>þøc^|ñE¾üòKÿ6N§“ôôtl6[“0ÿW_}•^¿ÐPÝsЉ*U,o}4‡Â` wz”©u|sÄJîk ) '$ÄJUƒ?¬0`è0yá|å”JЩ½Øí>œ’ ‡^YH¸¼`uº°»½¸<àSÊÛ[] Ò(¨±w`ÉÂTB®%JUÃ3CPå IDAT„fþ‘W* Ü¦bî. ŸÏ‹Ç§Åë×çcg„ÇëÃ'yðz%jÁx|-°L4>ŽA‡µW»ŽV¾u-J«clP¨¼>lÅÅûù »¤Þc$2A‹åøqŽ‹ûPU*]®ºŠ˜¤$>~í5†&'Ó%&÷ÁƒüùÿÀÜ¥ !:½SSéâó¡üé'º™Í|4w.C†Ñ‹$Iç]ß‹¾}ûòç?ÿŸÏÇÎ;y饗ؼy3ÅÅÅ$œÁ*”™™É/•sŠ EH4…Ç£2Vذªõ„X,ú"0*„‡7 V[÷i"¡Y7\¥‚° 5µv’Jv¯ìtf÷€ÃkÂ¥ÐcõÖãvס”8|&쵑”z†“_ ª† "v~„QéÍû®)¡Ê¡àèQ1:÷‹ðI²H—$8P¨äHŽÀ8- ŸëÂÄ„ËC춃t«/&;Õ;×S±i+§ •F‡Z§#P¯'«Ì@íž( ©uÌ"-îøÛßX1gù‡1(%Ó¡CÜ9u*ö†¶®ZÅŽ;¸¥_?Œ?ü@fi){7n¤ß5×4«ÿÍÛ7S\L|p"Ý-ÝØ‘³ƒWþ6ò/D[¢ybÊ“dFd·z7žc.¦ÿþUR’SZÕŒ¼iÿ&röæPï¶Ò¹K?|z¼>Ze õ%f¶í̧4?c¯»ãÎU¬}í/ôzü4Úæ:¾üÉ‹³å£DEmm =5Yì,ßBtXª-sÖ¼D¯èë©.(ÄQ[ÆÄ»ï£þ›÷Ùß…Œ±·4û½¦¦¥‘·w±ú@‚C1©!<Jkäþ¸’Ò•Ùô̰‘Ú·/}’mUUl]Fƒ¦ ƒ&ÝGÌEFxh hÒ[wBË!þ¹~9ýÚgÐ?c0>ÉÇÂ=Ë™sìúv6“Û™òðÃ'^û7ÒRR›{¯Ã =nES#Y½¸nêe˄îD’$4Z•;ÏËΪÌ«øü‚"^êôÚGµ?ëqž}eJµƒNE}½›1Ãthõ*ôÆ|¨µ,QFLêάX¯aÁ÷[IK âÁñ©­û «¯Ò‹ !!!DGÑëÝ(Õ€„F½|“õù|Øóm„æ†ðP̸cèö]q¹Ph4è‚‚0DD ÒhPïG¡V£6\ú,ÆgWgºž—oý…O¥Ra³Ù2d7Ýtß}÷)))ìØ±£‰hZíOÖ'&$IÂãð Ò©(Ðû§&Ìf/:•JqQJS©PbRRUçÃ( ˆ›ì|Ve—oð•2•„äP`÷¨±¹A¥7á.?Œ»¾‹®®Ç·‚5n~?ÀMU½ˆ5*•Â/„>YìæÈ&5/(¥–Y&|^j—‡¸¸wñÚ¼np{\xl.Ü6’.¥R‰V¯'É­!ÿ e*/7(Ѷ® 0šLŒºûn¶­ZÅÜ¥Kñ¢7 fäí·s =9³gskf&íV¯fÛš5Ík6¯Eß6€öÁ‰ìZ¸ƒqøõú[08].B‚BXüÅ"†ôçößÝNDxD«à­‡·"K¬-ú#{Ik“ŠJŠÇí¢¶ª‚ºê:ÚªThËöÑñ†0¼{–²îßÓè1ñ Ï?']PÎÕƒ¯¢ÒZ†Nc ÄÆÎâÍ®:ÈU ƒH͈aöÜ—‰®K ]­#¬[:ÜÈÑïç³íK]ÇÝÙ¬#‹ÅBEy9Gw¬Æ’Ø Ed4ΪZò–~‰ãÀ| ¡M§4žm¸*öplŸ‹-ÛaÎx^ÃÆÚjÿúnL»Ž'׬âÖá|¸äCªíVòlû9ªÛÌý“ Ðòìø¢–i×¾HFj§ ;¶BtÜyµW‚·ÃGb¸ŸtòK'I•ö*r r@¹‚Úúú)‡{ή3ÚÈÍcÚSTçÃãõáĆÞ€Ô8•tŒ äÁ»:iV3sîA2RZ?Ó§¤–(I)Ãr µWMrr5 'on Ê\Þlñ1J1Š;†ÝNVZ&£©å×ÕãA±t)ÒàÁ@`Û¶xl¶“çãvã>vì’ßX&OžÌ´iÓ®¸^»víP«ÕlÞ¼™AƒÉ²éС …â¼ë›ÃÆ2d?þø#iiiü¾ 'í+0¡ïÝôç~Ï7ŒNàßïí&+3’}¾¾Îóaµj1š ¨ðM®ÿn©ãáÁAÔVÚñ8<ôÊjý:$ ¥}˜Ïaj¯΃ݮÆ+A©¾/r°|uI{˜Øk"ýºô#48ôÂkÙHŠ’$« ” • ÉãÁ}ìÖÅ‹iX¶ì’ßX^~ùeL&Ï?ÿüEOM´&&“‰[o½•?þñ¼ÿþûTUU1mÚ4ž{î¹f­oO?ý4ÙÙÙóÊ+¯ð׿þ•6mÚ Ñhxýõ×¹ùæ›Ù¾}»¿Ïýû÷ÿ*ÄÄ9o“&ƒ‰Ñ}F£sêðz¼ÇoÆF£µúÌ!E·Š5U»{4ëÚFè(¯²ós9|·¬ àó€Í%'ªuÊqö59¦¿Ö E…5$zñ8}6ì%--µEoØã—ÛG]“cå*êjÔ×;ü•ÒCp°¼-ð™èÚ›ùUŒ(ÚAjH'~$À£€|“œ”6 ÀݨOBAªÛŒea(ù³UÔ•¶þšBA\|<]ºw?íŸr¯Áƒ) ¤¼m[ŒUUTVT4«Ïå¹kCvz¹ÿ–ûOKBÕ®mýúô»dB@…а°0’“£IH£]ª‚Îýœtí'‘Þ±#˜»ç¯lZeƵj/±±.²:ïbÍÛÓ°5ú×v6ë\ƒ³[©“úòjjj©³ÖRo«£ÎVK£ ^Gƒ³Èôtô7LaËb¾Ÿö’ÚSA¬4uóæ4+´L©T’À¨‘£PW•ÐÅb£ÿÈn„SŒ´w!e[ŠY1K;ÍßžHϤÝ[¿®Õ UJ%wdeÙú„˜ytÔ ·ÏÀæ±±öðV̪æ‰Þàê>ý.ê8íÛš1(Y½£ŒŸò*Ù°·š+0÷à<ª•ùb××Ì)x‡¤xõ>´û;3±ÿƒž?ïD I˸1íxëÝm OH‰T¡2Л䇤Õ3º[(ÝÚ˜;ÿg¼7ÍolÝX%!A¡4¤Ûq†»ðª%\á.–ÔyaI‹ßs3Î>‘ïýë\GDXÄ 5 ?þ0Ô×£ÿþ{Ô‚ÝŽúØ1Þ~›êGÅññǨ ÑZZ#ýØÙyî¹çxã7®¸go¿ý6 :”»îº‹‰'òØc5{ýù?~<Æ c„ ÜsÏ=üñ$,,Œ™3gòþûï“™™ÉG}Ä·ß~K»víøûßÿþë·Lx¼Âésž7ý±Û飺$euoÚ^%¾y7ø¤¸@åZ©¨¶à²ƒòøýÈ+Í N5¨”ò —§ÍF‚ªŠ vaäîQÐ.T6]µÄ2áö‚äôâ°Õ3eB=n§’òr•?·„=!Á ”Ëê£%ßã•$FÔƒNÜ><’‚ŸMzvŽ¢8®'eº}èæVR…ßB¡Q(I“B(]Jü¸/û@èvÝulúࢣ¢(-)!ö<•6këë5„Rz ˜»{'22ò2€cµ±ì­Ë#6ÑFHˆ —ÓC}…EMQ'§UB’SPMÃÊgïd /¸A賃­Ë—Óo̘³O[ù|$[R¸åö›Ñ©uu&¶ÙÀÏ%ûé‘x†(r–,áéQSˆéÙ“bígü˜=‘>®Ýt–ÎþÿCéÑ«ˆiÆ8õù|ìÛ¼u]%™¢;ú%ΊäV±f_!Çй` m  dDÚõû—5Ð~È5­Z™5.ÌBºê*~ÌßA§ØXœ>»Š Y÷©gF<Ì þŸµ1IÁà6*îî¡æ_ÿÚʽw$d¾4…ï@˜. Mœba›d`ß‘½üüæÏŒ »‰Ûn¹øØø‹*âÆqa>9ˆ   aáB¿3Ø©‰»=—XL<öØc˜L&&NœØ¢â„­A÷îÝÏ(´Íf3³fÍ:ë~çZ¶>O]w¦pØñãÇ3~üø&Ë:tÅXm.©˜P*•D‡Gc1Y(s–¡Ð)üÿ¶U* …§CÂQ€¢ºñ××­ÚÐìabÖQQYJ©äCén¤| ©§FPÊ‹¼.' ‡óñD¹):T„ªd3û[°Xšož ’l8kÊñY먮rÐ6LIMuÓð utÞ] t; h^cUB&R/;¥º| vaâè5!ÄÝÉ‘m&Â≱sà]ë$´€O’È·Z) EÁåWòm“’ØL@e¥?Éʹ¨¬ªÀiA›¯¦Çèÿ³ܹ}gJ·—àn¨Á¥ÒR³·/ñæk°ÄtB¯mjá1ÇÆÒqúlVN¾„Â}l·¥Ñõ±N燶`6¬Ù€B©Än·“’‘DBx"ÑA±$š;óõRî¿ê¤w8éݹ <ò.«Þz„è#¹T+F`o^fÓºª*–ÎúœøÔhêÊ÷é8º7ˆƒ¾NdÜÿ©½úàÈ¿–ýŸü‰dòHØ‘ê5ó)ÍïHLûö­zmG§ âß;·c ʧ¸ÂÁæY^žúW_Õ÷’}ž]£3Ù¸é'R;ƒJãeí–#%3qؽ-·èÛ7†÷°è«=üîÚT>ËS¡AÇÝiJ>xw]3CHëzé¨BEm!‚r‹rÙ²fI¥‰¼5(›Î) 4¶ŠCr1ÑhÊã\¡ŸÎË &î¿ÿ~ŒF#&L@ðëE}ns§Š.ºÐ.¦ÛlgÃþ TÙKq9|è%Aî0œù $… !2¶µá¾k ú&{yÿûC؟ˉ„I²#y꜕H E(¬Å¨å˜]ÕÔçC˜YÏMÝŒôíÓ«EfôÇîˆfÖí¸BÔֹϸiŠ:D‚Âç%¼~Yí~’™x×}ŒYåe—3€Éíéq‹–È ÚÝ^T:%¦¾áT–Ç‘¿°‚d»ƒ’†v¶iõ/¾ø?*•ЏÌLŽäåÓÌ,‘;¬;¹3êvÂÃÃÿg¸G§ÄG·¥°2¨ÐXƒâÐéLgdæ¨(Ò_ú kA>="bˆML¯—}›6±oóÊÊ£p£ÕuÄœ5Š~ýÓ&EŽ„Ñ¦¦#Ý;ƒ¼ÿ{Œè†ƒT8¯"%$¤Õ¯mFR–ŸÒؼë'Ê×øCßÛ2`@«FãœJ˜)˜.¡½X»n‡sA*÷ޏ‹ðÐ cjµ’ w¦ò¬ü& #“Áçãƒw¶­cø°¶(/¡^‰½KÇü5_âÛíá)2`Ð,á–V³$uà~ÊΦ¥%Ã|@ÃeúžÞvÛm—tºSp…‹ ÿ¿ùÀ d  Sb'­û–ê#ÕôŠ¿•¾}z£Õ V]\8ËØþ1T•®cöwŸ¡p—à%Ôaf Az¢ƒ‰ŒŒ$,,³ÙL`` F£‘€€L&S‹Âiâbx=‘Í1mªU³Íø&K4mÿÛÁ¶oëS©ëц€°R”N/ýS1×¥gîF—;:RÓãg–ÿéO4DFrí_þBÐynÌ&“é’å·ïØ‘Õ55´iFؤR©Ä»ÃMï½Ñjµ­~.F£±Y~*¥Šèˆ¢#bšoŠ%(6¶y7·0ÂBäBh%eÅT”³xõB¢k“˜rç?ˆŽ:{FÍðÄ$Hl~²% 0…„0æˆKM%ªm[CCÑŸú#¬P”’Šâ¡÷(Ü»“¤ÌX›^¯oñܵZ¥âæîØññ1Æ÷ìØѣ.ù’B¡ gB–Í_Þ©e⸻‰ºÈ)4NÅï߉o¾ù™¿¿°€k¯mËÀqì'ќߕR…RRòÞ;ïp½e cÆŽ¡M´ìˆ×š~]ï¾›ü´´ Ú7)*ŠËŘsL' ~ù(fÌ\"ýáöØíöÿé‰8NŠŠŠhhhÀ`0`0Ðëõèt:Ôj5jµ¥RyÅ9󜊊 —Fx”ØÀ.„'^±çêõz)8vŒÐÐPÍæónŸ·7¸˜8ÌÍØö×@YE ×|M;K{úõ¼Z#~A.’$QQQ‰Á ¿ ©+‰ªº*êjë°DXÎòKcÿþý¬Ë«áñ{†‹A+àŠ)¥¦ÓéZäHùK!<<üø4@÷+þ\U*ñ-ÈÕß1µãoêËÉ}7<(~5.ƒu"""üWñ^BÍ¡„šCŇ*øÕ£—@ @ þg¨Až£¼Ü1À@ ~EbâСC>|ø¢;‹ŒŒlâ yª@Ù´IÏO?Á¸û!8L\|@ ¸QžŠ ªªªÎºœhK8! ‰‰ÚÚZŒFc‹w>pàÉ*¶k×®Iìtca¡P(øæ3Ÿ}·? QÅÅ‚+õÆ`ßK—.]ðz½x<Ün7n·Ûÿº¢¢Êâb üô‚X¶lsçν }ÿ³áïSXs¸Ußxi}!» 7Š gA§Ó¡ÓéÐjµþ‡Z­nõ\‚ß°˜h×®AAA´o½æŒËço›ÉÂ]³øjûL¶[Ç{k^Æá¶±öç%<:÷Ffmz¯ÏË7;?eá®Yø$/ŸnøSscùÞÿbwÛx燗ØY¸ ‰e{¾bîÖp{Ý|²áMVîû–ow~ÆÞ’¼¿fv·œ[ãï‹æûý Øvl>ÉÇ´%“(®=ŠÛëâ‹-ïóü·÷ãñºÙQ°žw~x »Û&FŽ@ øÍàñxøøã±Z­âbZWL´¿ˆ:üë—o+XG|X21AñääÍc`ʵ,Úýý’FÐ#~wôxˆ¢Ú#Ô;j(·SV_Ì„^¤kÜUD˜¢øvç§Œè8ŽïrçàtÛÉ-Þ‚AÀ¾ÒÖfÓ‘ÕTÛ*0é¹9ëwÖä QiYŸ¿’œ¼y¨•²Wÿ•=%Û1é 3F╼d¯þ5ù,Üõ¹9à7Ã[o½Å³Ï>Ëøñãÿç ¿21q& E“‡$IMçè5‘ÓƒÞí7û˜ wÍ¢Mh"ãz·Ê{˜¾ìiFv‡R!û~8Ü6vo‘­1aøÛµïrS×ûÅÈ¿ öíÛGqq1÷Ýw,]ºT\Ái\TÌÖÎXÙ>âdåÅ¡©cY¹wõü#}‡1kÓÛÜÒíwhM(*"LQªØË®¢MÔ;j¹¦Óíügý O» Ú@ª%“{)‘´HG©PŽ^cDµ9í¸ƒ;ŒaÍÁÒ£»‘jÉäçò<⎧ÀÞñ&¦/{šQé·Ð%®=àWO‡xå•Wü˜.—ë’ÕürQ̘¹DêÕ!—ËuÑedd4‰æhlP(LŸÄÔ©ð].$ý¢9ŠjòŸõ3H Oãæ¬P*DŽ/@ðÛø—ißKbb"^¯×/$‹‰’’¶rˆÚ‚‹·L´”o„¤$ÈŒ…À–:Ûí`0€Ïn7èšQñÓá‡L&P7³Ü¯$‡ÊšÍD·%käŒ_äkk°¡R«Ð5ç: A#”À`Ïž=þ¤†>Ÿ¯×ëv»ÝâB .^LìÝ»—õë×3bÄ¢££O³Dœ°FH’ä÷¡ÈÊ‚¬¬ót¼t)  ÊS¬Ï=3fÀáÃðÝwðè£ç?ÉMá7`òdèÞ¼B[‹/bÓ¦M<ñÄHR[·~@bâPÚ¶í@CC9uuLjŽÎ¢´t'{ö|Ezú­DDœ¹pqñ6ÌæXŒÆHXDaáF®ºêI´Ú@òò¾¤¬,—«¯þ3Jåébgóæ÷ðxìôîý8ë׿F@·nÏx¬£G×Õ­ÖÄÒEß±{÷nþò—¿ T ‹Š@ h9™™™~kĉg—Ë…Ýn§¸¸ðŠ‹$ð Ð ¢¸¸˜qãÆñÍ7ß4ýcŠÃåi±Èû÷ÃÌ™ðÕWr{çN¹]Q6›,f΄åËåõk×Êm— Š‹áûï¡ÿFwÿEòú;aß>ؽ¾þZ^׿¿liÌÇÊòëÇóL8ÕÕÔ×׳~ýz^|ñEÙ°áMz÷ž„ÕZŠÏç¡®®€U«þJQ‘ì¹cÇ'ôî=‰mÛ>:«X±b2 eTWÿLUÕÏôî=‰~˜JQÑf<½{ObåÊNÛ·¨h3 HLƦMïpøðjÒÒn "¢#¹¹_œ¶ý±cëX¾|2.—ºuóÍ7Ó±cG6lØ F¹@ ®L11hÐ ¼^oË3gΜ ݺAz:80w®Ü~ë-ÐhÀb‘ÍíÛËÂcûvy½J kÖÈ}-[& nÝ * V­‚Y³äé/¿<ýØß|]»Â±c°iÌž}R°;FYY‘‘‘þÍm¶JŠ‹·Ó«µ”ýû¿£K—»üë}>/z}>ßéÎH%%;(+ÛEZÚM¨Tz<ÅÅ[0™,ø|”J z}ã´ýcbºc2EQY¹£1’„„ÅãtÖpzIãààRR®m²ì–[n¹àÄb@ \r1ÑÐÐÀÊ•+3fLËvLJ’EYH’<­1s&Éb""22 !Aöw0!3S&¤¦žì«S'Ù1g޼/À„ gÊ)ß·/üç?²åÂj…Ûn“ÅáÃòñNA’|¸\ lÝú!‡-§¨h37¾ÍÞ½ÿ=ïÛܽ{.ÅÅÛØ½{{÷þ÷ø”ÜŸRÙ¼|ö’äÅãq RÉÛççÏç!1qØiÛƈÑ,‚_–˜øâ‹/ýT¶P˜L VÃ5×È냃OzqîÞ-ïûá‡ðÌ3ò²ˆÑX? IDAT3 'x@nwì(Oœù ÔÔ@Cƒ,(ÀïƒD×®]™>}:V«•Þ½gÅŠçIJŽZ­ Œ¨¨L23ïdÅŠçéÚõ>¶lÙBNNN“ðX‹%ƒ€€pBCÛc6ǰbÅó ø"±±½$+V<ϰa¯ðå—_ràÀ@žæØ»÷vïžK¯^D©TSP°ž+ž§¤d;ÙÙÙMÒÛÆÅõD«•§,XÀöíÛéׯŸå@ ¸¤\Ö<ZË£Ù,_iiÛ¼í?ÿ\17®É⢢",K“÷Òp:„††^ÐéWVVb0hÖöÅÅÅDDD VŸ”S]]F£i¹åH €ÜÜ\:tèpÎhŽ]Ǽ"Ï„¸Ìy&.šº:y #$äÌë‡åU û`hšú(lß¾ÄÄDÌãÇ7Y¾oß>‚ƒƒ‰‰¹0ÿ£ÑxA¥ÜOÖ¢íO„䞉³]#@ Z™ žæØ°aÙÙÙìÛ·¯uÏèóÏeÁp&¶l9ÉÑ>þXžÒhDNN[·nÅáp`µ–’“#‡vú|ÊÊÊÎéƒ  Å„F£á‘GaÙ²eþeç*æåwRܸQöoØ·Ov–ÌÉ‘—/Xµµð¯Á³ÏÊB`Þ“ùBÎ'¡ÕÊ’$/ÓjON}ÜpÃÉvd¤œ'bʹ½v­,F´Ú“¡¡o¿-Gsˆ”Ò@ \YbbÑ¢EØl¶–×}8p@¶$dfÊÂB¥’3S=*¯Š’…Æ‘#rèhCƒl¡8‘™òÈÈÍ•·ËÍ•WM˜ =Z¶\ìÚu2iÕoÈýŸN‰ŽŽ>žSŒÆHJKwáv7øC?ßÿ}&Nœ(F†@ ÍD5rì„¿Æ…ëðz[V°E«Õ²gÏìeŒŒŒl".Oo( ¹‚e›6°~½œ7Âå’3ZJ qqpÕUòßã‘§*œNYüþ÷r6Ì#G ¤~XΦ™Ÿ¥¥Ð»·œ‚;&Fžê ƒÄD¹š ••GHHï½÷íÚµ#3sæÙ‘èè,>üðC¬V+×^{­à7MYYááá§U õz½x<¬V+eu½»$‰‹%hÝ<:uj’ó ±C¦R©Äl6‹+.¿Dž AKhUG‚Ó*„6Â/,>ûL.ÐÕRNTø¬¯‡={Zõ"Ìš5‹êêjœõNÊóÊ)Ú\tÎí 7Ê_¶9¹X|à‚ë¶»)Ë-»$¬Û&÷}â\ÏǼyó(--ß@ \^1±hÑ"ö´ôÆÞ¹óÉòã-áD…O«öîmµ ðÎ;ˆÁ` ¡¬Ÿ—þLî¹çÜg×l9Ì4²S${¿9y.³®›EΤælÖ±=vÏ%ŽðŸëië5,[öŒ¿žžÎ;ï¼#¾@ h1œóÇäÈ‘#X,––협!;DÊæ ¹Tøºup×]òºÙ³aëVÙG¢];9ßÄž=rž‰ƒáÍ7aÄyÿ7ß”kutëyyòò7ß”×=þ¸ì”ùÚk²£ç„ СL*÷ûÀ4ø|”••ѽ{wÔj5ª(ÆtÀãKŠo-fǧ;>}8ë È›ŸGÁO~1¡1œÌ®Ú>”‘3F’3)‡¤áIäÎÉ¥pS!Y÷gÞ!œŸî tW)Ñ]£‰ÏOÿü‰„ þýËrËØú[IžDò¨ä&—mß·ûð8‘KŽwìӧûïÊF^o0È–“&ÉN— ×â ·Þ‚íÛåœ=7Þ(—%ûmyûñ㡸^~^yEvô\¿·Û-+ªã~£†Ä":F°ó³ Ÿ>œÿR­$o~#gŒ$®OÜßΑŽ3)K†¯ËKHRçgë‡[©9RƒÛîføôát¾«3ÁñÁôŸÜŸªƒrÔIùîr Ö0rÆÈÓ„@õ¡j¼./íG´gÏ×{¨Ø[Ö¨%²S$‡Wfí+k9c$‰C±WÛQëÕ„¶%²SäÏ5+ëL¦¦9Bâââ(((ß @ \z1¡R©Ø¸q#999¬[·Î¿üÔ*¡“VËŸ¢ ß~+g¸¬¬<ÿ¶íÛCt´¿ê'^/üãðúëM·kœ„ê¹çdKHÛ¶çí¾÷ã½Y>y9«§¬Æçñwûø«ã9c$¥»d߃ƒ‹²|òr¬¥VBÛ‡ÈòÉË›Lœ æp Á Áçî¿|“vÛþ§¿‡üïóŨÁ•/&úôéÃþðFMß¾}/üè*•ly˜7O¾¹»\r»gO9„Ô鄊 YœH§}.ÊÊ %EN\UW>*ç™—×wî,÷ݾ=Hf³I’¨¯¯?cwU«ˆí‹ä•Å‘ÉbbÇvø§9NÛþ@»çíÆk–Ňb{Æ’BåJ|±=c±[OÛ·ÝvTªf÷¼Ý~?ŠÏF~ÖÄÿbÿ¢ým."8þtÑqõ W“3)‡Ðög¯XúÔSOñÏþó¬ë¿þúkn¸áñ­AËnçšg 88˜ððp´Z-ÐÌ< ç}–ÅDJÊÉ„SAA²¨P(dÿ‡¨(¹™) „à`yº#1å~âãåGçÎн»¼ot´ìGa±ÈÓ ² ;V©©’‚B¡ ))‰éÓ§“žžN```“÷綺QëÔ´ÒC°ÈôHÔz5™wf¢–ý>ÂSÃý¯ƒ‚Ñ™u$JF¨#$)$H‘„J«BòJèÌ:R®IA©R¢Ò©M EgÖ¡T+‰H‹ÀmscŒ0¢ÒcɰÑ1ACÁú̱f,™b{ÆÚ>”€ÐŠ B¬' ,[¥°ä0Œ‘M«—3gΞxâ )øððTôzY˜üýïgàÀ¤¤¤ˆo…@ y&-¢ÕóL¨Tª³Š‰ÿIž‰¯¿–…Ç©åÉaTì« (.QsÆõ’Ob÷» Š¢ÍUmÄÈ…È3!h —¿`ÅÂ…—÷x7Ü@öÞ½äææ¶z×S¦L¡°°ð²¼ðág ¥‚N·wBB ¿1ñÐC‘ÍìùŽ[?NuÈ`ÅŠsw\˜ú@ ,-â†n@­V³`Á‚–í¨RÉÖ‡5käè‚9Ä’%²æ AðÏÂȹ!àþûeq`³ÉíéÓáÿþO.9>t(<ù$Ì+ 0@î¯OúãI²RS¯Çh<{’­ôô›ý‰g"3s<M@“e&“ «Õ*F’@ „e¢¥ddd ÑhX¿~}ËvŒ•«6‡”ÙÚ°aƒœÜªM9‹e‹´‹ ¯×ÛÄ1´1N§I’ü‚ãTJ¥Ò±r*§Iq3@ „e¢™Ìž=›O>ù„¸¸“Ù [œ´J­¦LNäeC‡Â´iðŲXµJžæ8¶ùÅr&Ëaà -MžÖx÷]9tä²äS¦ÈâèÚµ+Û¶m;ëû˜6m=ôÐY×ßwß}¼~j¬F|ûí·Œ3FŒ$@ üf¹àÐP—Ë…ÓéÄ`0øÿ™7+4ôÄTʼng‡C~m6ËâäZœS¢¶V^" ‹âb9B'gª«“óTŸžp»åÊ¢F#èt¸\.Þ|óM†NçÎñx¨TZ %v»I“&1uêTÂÂÂŽïnóOe=z”7ß|“©S§ú-׿ð L˜0-´–Á•Ž \1q&.yž «UN™$>9@ bBp…pÁÓ6›ââbœNgËv¬¯—§!¦MkÑn+W®äpEÅ9…„ÓYOuu>nwÓÔÛ•Í©óØí•,/ TWçãrYÏÙ·@ BL\ sçÎeݺu|÷Ýw-ÛqÖ,¸áxæ¹-Iò4Å $é´e’$‰ñ<Ž›ë×Ï`ÿþlÙò^“}§L™‚Ïçó‡„ú|>|>ß)‚c?_~y»¿½iÓ[ìß¿€³ÏÚ·@ ‚‹ˆæ°Z­ÜsÏ=M–5v´Ôét¬_¿ž¬¬¬¦7î `ýz¹>Æ“OÂÔ©²µ"3îº ž~ZöwhÛeË–ñúë¯óꫯ¢ÕjùðÃýÝEEE1~üøã–…j ø 99“üë·mÛÆš5kxúé§¹îºë0›ÍÌ™3…BÁ„ HOO ¼|é (ÅŒ9Ãß×™ú@p–‰]»v‘ͪÆå½ãõzY°`ÿüç?ÉÍÍm–yýõr–Êgž‘3]:rÙðÆ<âÇç¶ÛNfžT©TþGãÂbg"++‹«¯¾šüã 0€µk×òàƒrûí·³iÓ&ÿv©©×‹Ñ Áå´LdddðÈ#ÍÀO³PDGGc4 >kÆÉ³|öÄQ:Ž=zøÛ&“I|Š@ üÅDtt4ÙÙÙþšQ*•deeñ§?ý‰¸¸8|>ßÉȃád¨F#—Ÿ4IÎ\)«ƒ3ïDª^¯§ï‰œ§šDNÎ$bc{4YÞ·o_&MšÄõ×_ÏðáÃyÿý÷Q©TÜÿý§•“%È-– rr&)O}„„$ï»§5@ 46"´vhhãl-J¥òS‚\ -F„† .‹eâl4§f½\´hË–-W] ®`Ìf37ß|³¸‚K/&JKK9|ø0©©©53‰ÔèÑ£=ztË´gœ6[ —ÜÜ\qÍæ‚£9,X€J¥jyÕÐ’¹äø‰J›°{7Øír*ì ¦JJäHiÓäõ……âÓà×$&\.éééTUUµlDZcårãï½'‹‡ÿ~úI.)^^}$/ýu¹fGq±¼þàAñi @ðkƒ bÖ¬Y”””4YÞ¸Jhã ¢~úô‡†‚¹ÎƪU²b͈‰‘“W½ü2<û¬\Ì«S'xà“Ñ@ ~bB©Trÿý÷ÓDHœ³æšèÚþð˜8Q¶DlÛ={ÂÆâÓà×,& ÉÎÎ>k·³’”tòY«…¬,xé%9ÿ„ÍíÚÁ¨Q'§5~XÎC1{¶ø´@ ¸iÕ<MRgŸ&$J‡ Á/‘gBДâ@ ¸lbbûöíþ×dÞ¼y”––ú—5v¸”$©‰3æ¹ü)@ üÄDNNóçÏ÷·—-[Æ€øöÛoÅU@ˆ‰óÓ¹sg,‹¿íõz‰ŒŒÄétŠ«(ç'::Z\-@ .&@ ÎD‹ }uêÔÉÿºoß¾dggsíµ×ú—êhyÖDU@ ~›bbàÀþ×]»v¥k×®â @ðç;Í!IPVvúòá¦N§\‚¼¼üü}••ÏwæuÂW@ üÄ„×ëeÅŠMÚ+W®¼¸£;0cÆéË_]~nh€¥Ká­·Îß×ÛoËý‰W^¹ Ó;‘´qvPIò±k×çääLÂn¯¦ºú99“ÈÉ™DnîbD @ˆ‰³1þ|~øá{Ö¬Y¬_¿þCÃy’V­Z%—¨¬„­[å×o¼EEP_S§ÂàÁòòÐP¸çž¦'2oL›ÖtÙ7߀F#?–-ƒÅ‹åã5fùrÙ²¿|œ;Onßøسgü1«V­bñâÅØl„…u`äȬ^ýwBB9r#GΠ `½Q@ bâlŒ3†ˆˆûæ›oÆl6Ÿ¹S¥FƒV«E«Õ6½™»\ð PQ!W]±n¸þõ/0áÁ!'çÌ'±v­,î¿^|ñäòÁƒåþN•™3A­†”—Ÿ8¶Ó |ø¡|œO?•×-ZÔä9// 6pï½÷0|øpT*‹/ÆhŒ$&¦;ee¹X,²CªÛÝÀÚµ¯0xð1¢@ð›£Ù˜z½þœíÆ8¦·dffrË-·àõz!!æÌ´4X¹¢£aȈ—oôJ%„‡Ÿý$Ünøüsøé'HN>¹<0P®:z‹† ƒM›dñ‘ŸŸ|/¿,¯ß¶M¶LTVÊíäd˜5 zô ,, ›Í†ÝnGsÜÚQZZJzz:{(,ÜHçÎwPR²“D´Z“Q@ –‰Ö@¯×óÒK/1uêTn½õV<¼â 7Æ—§®¿¾¥í·ÂcAlló÷k×Þ{¾øBÝ»ÃãÃðãÕvïöO¯X,®¿þzæÍ›ÀÂ… IOO'++‹ººcìØñ‰‰Cp8jؽ{.éé·ˆÑ$‚ß$ª‘c'ü5.\'[΃N§#**ê¬íÈÈH”J%’$áóùüsPèt:Ù‚pòÙh„¶mO¶¡ék…L&ˆ‹ƒ6md+Ãúõp÷ݧ ¶meëÆ‰ýõzy¿À@hß®ºJ¶V (ûYôë°ohµÐ»·¿;³ÙLVV)))þ  >Ÿ‡ªªƒTTìÅëuÚµÚ@pp‚MàWCYYáááø|>¼^¯ÿÙëõâñx°Z­”ÕIôî’$.–ÅŒ™K¤^›D,\(¨T*»qÒ*…BAPPЕy&O†G…˜1"ÈÍÍ¥C‡¸Ýn\.—ÿÙåra·Û)..f×1/ß3\\,Á//vCC?ÿüsëv:mš@ \j1Q__ϬY³üí•+W’ÍÖá—‰šš6oÞ|Öõyyó),Ü(>Y@ ®41±dÉòóóýíØØXyäÖ­[wÙNöàÁƒ¼úê«„„„PUUEEE…ÿqôè:ŽYÝ^->Y@ .Í 7nÙÙÙþv‡8zô(mÛ¶õ/;Wa¯ÆÀ.”öíÛóøãóÝwß1|øp>ÿüsêêêüëŸyæ\®:ñ© @p%ЉS9|ø0yyyMª†ž*(ZC@œ‹ªª*jjjš%f@ \abâ“O>aèСäåå5)M~9y±qL@ W¾˜3fŒÿõ¨Q£ü58.'QQQMÎãTbbº‹OU ‚+UL4öèq<õôå& €øøøs¬Ÿª@ —‘VÏ3ѸJhã ¢W ›7C#?‹‹åرc¼Õœé§PXXÈ¿þõ/1@ðÛ%%%¼þúëþöüùóÉÎÎfÅŠM„ÄÙ¸bEU•\¹´•xë­·¸í¶Û¨¨ØKNΤ3nçtÖ³fÍ4rr&‘Ÿÿ=‘‘‘ :”ÿûßb àM³§9¶nÝ꯳п"##ÉÎÎfÈ!—ïŒ7m’+|}û»ï‚Õ ?,¯+)‘=‹Ãرpô¨\૾^Þ÷õ×åBc_ ¡¡r-ví@£Ù³!%E.s¾n\Ããða¹Hزer)ó=àŽ;X¼x1ƒ&,, €Ã‡Wãõ:ÏxÚ*•–¬¬û1#ÉÉ™D»vƒHNNæóÏ?Çívû«“ @ð«µLŒ=ºIÙñÈÈH>ûì3NäºäæÂÎ0c†\qtÕ*4þŸ½ó¯¢Úúð›Þ $!„^ƒô"½"Ò¼Ä^¸ Šzc¹¶ zÅOTô%‚¨ Aé% 5¡jz IHHBéíœï•s’“‚$²Þç9OfÏžÙ³gΜ̚½×ú­7Þ€… !>jÖ„±caõjHO—‘ˆ¸8ÈÊ’}z÷–tç™™ —.I ôeËÀÖ|}e]|¼~~Ъ °v­ÔoÛ@BB‚ÙèÒå%llJ·Úlpq©Å‰ËiÓæØÙÙ‘——§!­Š¢(ÊaL”Æ“O>Ixxø­ëm|¼dù¼íÛ.Oœþþ°~= VrÛ»ï¶ü¿ÿ.‹‰ÔT0MåÄÄH}Ñc\'N¬ÀÙ¹ öÑ;OQEQcbÞ¼y,[¶Ìœš°p¸4Θ•"`5`$%Á×_CP4o;wʨ„)ºdþ|X·LÚ]ºÀã—¯}£QR˜wé‡Á¿þÓ¦ÁÀR߯ŸÔ8p>ùä“,\¸ðšMÖ¨QƒÐÐPϲ˜˜˜Cœ9³?”š5kboo¯w¢¢(ŠRe¹®ÐÐgžyƼüÈ#põêU<<øàZ´h­­C†LÀÎÎ…‹/òÃ?ðöÛoë]¨(Š¢Ti¬ü~ÚhìÞ²:9•áàããƒMaãEF#¬¬¬puu½¹g#†€³³”#" #CŒ‹!5U ‰&MÄXQE¹C ¥eË–äææ’““cþ›““Cff&111„Dæó¯g‡èÅR®od"++Ë 3//O±µ½=ΦȔ ED¶nˆêÕejCQEQ”2)·ÏÄùóç™:uªÅ:Ž=ªWQQEQî`Ê=¤i¹dÉš6mj±MqGK yTEQ”¿?å™èׯÖÖ²ùÒ¥Kquu%))‰ÈÈH½ŠŠ¢(Š¢ÆÄõÑ£G<<<0 ª˜Š¢(Š¢Üy\—ç¤ÉѲaÃ†æ ¢ª‘ (Š¢(jL”›ñãÇ[”»wïnQ.ž!´xh¨¢(Š¢(?¬õ(Š¢(ŠrËŒ‰˜˜órhh(¡¡¡œ9sæÖö88X’m­Zu]»ùùù•Y—žKDÄ.23-Ö_¸páOÛÍξJDÄ.RS£ÈÌL$"bééqÅÚNºf;å9Vi$%]лXQE©ÆÄáÇ™9s¦¹¼hÑ"HII¹u½ÍΆٳáÍ7 Ťââ :ºp›äd¸rE2†KëÖ­ËlöÀY¤¥Å<Û¼.33“O?ý”¨¨(RSSÉ¥qùòe‹}Ö’–Ã3#ÁÁß‘–CHÈâbmg±_\\œ¹í´´4ó±Ò úM|||Á)%“––FBB‚EgϰeËûz+Š¢()åö™°²²¢víÚærbb"aaaŒ9òÖõ6.Nòm,Y"ɸÜÝ%©—­­äÐ4HÒ÷éÇ›³nÞ¼™Å‹3tèPvîÜÉÊ•+ÍM2ƒ!…6m& À×¼>22’Ó§O³dÉúôéC~~>AAAFúõëG=èÔi\Áö»1!==ž>} ðYY%Û>räØÙÙÑ·o_ìííÍÇ2d—/_æèÑ£äææ2bÄæÌ™ƒ««+öööŒ;–&MšÈ—gëHµjuô.VEQªÆÈD‡,Ê3gÎdüøñ¬*2Ý`­ÊËËcþüùÌ›7]»vamm]9V ˆÑ`™8}úö•ä]û÷Ë6-[Â{ï¦G’q5oÞ€jÕªáíímþ”•/¤E‹têÔ‰7ß|“nݺqôèQFň# )6jóŽŽnXYYB@€/{öü¯ÌÓ0X[[ãææF×®]iß¾½ùXíÚµcß¾}äååqùòeó4ÒG}D›6mˆŠŠ2·Ó¨Q½ƒEQ”ª32Qœ‹/Ò¸qãR;;;†Š••ÎÎηV‹ÂÊJ>eФIjÔ¨a.»»»³woEKBéØñ96n|£Ñˆ—W;†õ³‰(NÇŽ©]»6111Ìž=›—^z©Ä6÷Ýwùùù¸»»¨Ñ0Š¢(Êߨ¨U«–yùÔ©S¬[·Ž®]»–ºmíڵ͆†Ñh¬¼‡aýú…Ëýú‰Åš5ðòË%ë-v“õ®®®%F#ê×ïJ@€o‰7ý#FàëëËðáÃ9r$³fÍÂÊÊŠ &˜·IMæÐ¡9xyù`eeá,A IDATE£F} ðÅÛ[ÂfëÕëB@€/(2’q˜ùóçãèèhnkÀ€øúú2fÌžzê)fΜ‰«««ÙÐðõõ¥nݺ 8Т®®õõ.VEQþR*5y»ví,Rל(:" ”Ÿ>ø€ÿû¿ÿÓ ¡(Ê-CS+×C¥êL\Ë/B‡éo5$EQ”¿1qüøqóòÅ‹Y·nW®\)aP˜>&‡ÌÊ2$233Í¡“7ĪUpß}~cûGEÁ¥K×ÜäÇ䫯¾ &æ‡Í)ScâÂ…m:4£ÑÀñãÇyï½÷8uêÔŸŸŸÄÆ–^—”$«×à·ß~cÒ¤Iæò»ï¾ @nn.¾¾¾lÞ¼Y1Š¢(Ê[·neñâÅær@@mÚ´áðáÃUçlG’Q“Ch^lÞ EŒ$Nž”uÙÙ’"Ë&ãcÙ2X°¶n¥ÀZú8¨Šˆˆ 55•7ß|“ììNŸ^‹·wwöïŸQ¢+±±ÇHL<‹·wwvíú‚6mÚðÒK/`Þfß¾}Ä´MD„|öí+läôiسGt5Nž„:u ZµÂº3gd½|ðý÷ÒßÜ\1.6o–¢{qöìY¦L™bþ¾ûöí ˆC­ŸŸAAA\½zU5Š¢(ÊM›6µÐ™HJJÂÎÎŽ>}úTݳÿþ{ÈÉ Ä`8qvìuF#¬X!ËsæÈßü|1@rseÿÙ³eýl»Z±b>ø C>`…——O©#¹¹88¸âååCZšŒ&4jÔˆð"£&Ÿ}öG•Âòå0k–&cæ™g 2RŒ£¼<Ø´ ¶øì3øã‰Ž–ú¼<éoѾ”ƒ‚‚,¾ËÜÜ\V¬XaÑç–-[VläDQE¹³‰»îºË¢ÏÁƒY»vmÕ=û3g`Ø0ðð€«WŸxé%Yçè(ü7Ê»MèÖM¦J¶l‘ú;oJ÷V¬XÁàÁƒ WŒíÚNµôè> ^^àã­Zn[£†D¸T«Ò÷»ï–s³³ƒºu¥ïŽŽ¥û¾ûi”CQEQ*Ø(NãÆ5jT yé¢~Eý'*¥³ÖÖX[ßÄÜd:Á¡C…å3ÄaРҷïÒEêÿýï‚b‚ƒƒËl>??ŸÏ?ÿœ´´´Rë¯\¹‚§§§¹üóÏ?súOün˜gž‘¾¯YSîQ‡˜˜êÖ­«¿EQ寉-Z˜—»v튿¿?C† ±0$Ê¢² Š ;s¶hQèWðÞ{’4 äÍýñÇÅÂ×Wü%^xA–»w—©ešáwdŸ‘#¥¾àí¾W¯^œ9s†€€ݨU«5¾tí*ZÁÁÁÌ›7ÜÜ\êÖíLvv ¾ôï?™èèh–/_NÏž=Í]=}ú´eî“)Sd4áᇠŸ¢´n]8Ò`ªkÞ\ηukóòõ•‘Š/¿”å{ïÀÇLJ´´4‹©Nmäçç³xñb\]]ñööÖ_¢(Šbùl®J:ÙÙÙFËš¿HJJâÒ¥Køøø”¨ ÇÆÆ† ”¨KNN&22’víÚ•Þð’%"ÒUçæåâHOOçÔ©Sf#„Á` 88˜Ž;bgg§¿E¹P åz°ÕKp¤¤ˆ?B¸»»ãîî^j]£FJi.£Ñˆ››nnnewÌ‹âÕ«W1 ×Þç:qqq)aH€L/uëÖM¿{EQ¥T®kšc×®]æåÙ³g3kÖ,–,YrK;\YÓ%7ÌGUZS©©©LŸ>Ýìg‘–v™K—ö—¹}`àÿ±wïtŽ;ÆŒ3ˆ-KWBQEQn7câ÷ß·Ð@7n/¾ø"ñññú²D«*C¸Ê`0T-Ž•ß/bN;wŠ’äòå²ßš5¢-ѯ_¡¡±q#lß.NŒ0w®< z))²ÍˆÓdxx᱿ü€Í›7so¤‹‹;+³ëõÃÙÙ“ÔÔKæä^={öd÷îÝz+Š¢(UØ(ži3%%…¨¨(Ú¶m[uÎvî\xúihÒœœÄphÒD" rrÀÓFx8~ÿ\\ÀÞ4ýL<ù¤h<ôé#ƃ½½Œ<;&#VVàæ&¹¹°zµÔçå•èš3¶¶N×ìþÙ³ØØ8–Ènª(Š¢(U˜(ζmÛJ¤Ã¾íyì1XºTŒˆ¼<1"LË66òÐOJ’¿ÖÖpÏ=2Ú0j””ÿŒà`˜*û?ú(œ?ï¾ “&»»·iS©/Pµ¼çž{Ø¿?ëÖ­dª£nÝÎæCýüóÏæÄf®$$œbß¾\¹r’­[·²mÛ6zõê¥w±¢(Šò—¢:EùõW½0áç={ŠhÕ°aƒäËxí5hܸÔM²²²J=§ôôt°µµ-õZ œœœô.V¥ÒQ å¦LTyΜ‘^eQÔ€BõËåþû‰~ûm''—¹‰££c™Æ‘‹‹K©†@TT”ER0EQ”Û™eË–éEPc233YnŠnvî܉¿¿?¡¡¡Uçl¿ûîÚÆDL T$qÙêÕbqÈïÈÉÉ!??—ÇçàKRÒ¹RwŽ>ȹs›ÊlþÔ©ÕÄÅ…——Ǻu눈ˆÐ»XQ”Ûš ðXñ—5åÎ4&V­ZEXX˜¹|äÈ&NœÈöíÛ«ÖoÛ?ü FEjªŒ>üò‹”-‚ÿý¯07Çùó²ìë+Nš¿ý&aŸ¦,¡ûöIÝáÃRöóƒ÷߇¯¾`íÚµôë×îÝ»“››AýúÝ:Ô}ûüKt+>þ8!!‹HI)Ý8ßÁÉ“+ÉÌL$1×°aÃØ¸q£ÞÅŠ¢Ü¶Ìž=›gžy†üüü›~¬àààúF¦O=þt¿¼¼<‹åÔÔT¶oߎÑh´X¯”¤ÜrÚ=öþþ…ÁêÕ«³xñbêׯo^W|˜|°Ìî¯^½š‘#Gê]¬(ÊmÅ{ï½Wª!QÖÄ|*Brr2=ôŽŽŽ4mÚ”mÛ¶™ëŠNgtíÚ;;»R§B¶lÙB‹-°µµ¥uëÖl1¥f@r/35jÄŒ3Êœ&Ù¾};VVV¬_¿ž®]»âèèÈ]wÝe1’yzèС¸ººâââÂÈ‘#‰‹‹+ÑÎÊ•+iÛ¶-tëÖS§NY´óÍ7ßвeKìííñööfòäÉž†º.cb¨Icxàˆ‹‹«Z³§ŸUÊÎEWâÕW!2RÂ?›5ƒúõaÐ Y—Ÿ/Δ‘‘¢tio/†Fd$Œ+½þç?¥üÏF#\¾\`«xãââ¬Y³pttç®»ú’IFÆ@ò´oßÞ;;›W^y…ÐÐP6nÜÈÅ‹yå•WJ´3uêTæÌ™ÃÑ£G±²²büøñæº>úˆ™3g2}útΟ?ÏÏ?ÿÌ‚ ˜}:iii¸»»³fÍó ò_|Á;ï¼Cnn.GŽ¡k×®åZÞ²e‹Y :((ˆ¾}û𝓻»;ëׯgРA|õÕW¼õÖ[äææ–˜‚Ù¾}; `þüùÉ;ï¼ÃêÕ«Ë4fV­ZÅØ±cIOOÇÊÊÊÜNÑ~-]º”'žx‚ÌÌLrrrðôôdË–-ÜsÏ=æv/^ÌĉIHH¸áïö2¿ÜâÃO•.ÜÚÚú¯MA^QCÂ`€½{e$¤INNæ×_µ°>¯ÅÎ;éÝ»w™[XX]ºt1¯ËËËãÀ7_y ÄÆÆFU:åãÓO?¥Zµj|ðÁjÜ °pÍÎÎfÉ’%<ýôÓX[ÛÒ³ç›tëö*'N¬àôéutêô½{¿ƒµµ-!!‹éÛ÷6ìÃ¥KûðôôdìØ±,^¼Xÿ³*ÊÈ믿Î?üpÃë›A“&M°³³c×®]æu{÷î­ôcØØØpàÀ‹ÿÕÆŽ;,Ê´jÕ ÂÂÂHIIaÊ”)ÜsÏ=4oÞÜÂù²<´mÛGGG.^¼H³fÍJ|*ò=•{Ï#FXX-^^^øûûUµîî]»àí·ÅáÒß_t"œœdÄ`ôhøÇ?d]°d‰,‡…IÒ¯÷Þƒ×_N ??0 GíÛ'ååËáÄ hß^ —5¤üÅbÀ€d#mÓFŒƒ¬,1*F–ö¿ýVÂW‡ ã"2R š1c$Ýy‘ÐÖÄÄD<<<Ìåš5›såÊ ³£fQñóóãÒ¥K¥^š 0yòd.^¼h^wáÂä©V­6™™ ìÝëG£F nöÿcÿ~œk–ÚfÆ U¥SQî`^xá~ùå—Õ¼Ξ=[êÇ`0àììÌ£>Êk¯½F`` ëׯǯ¨žP)\¸pẎ_½zuyä^ýuvíÚE@@ß~ûm9Þu?fݺuDFF2wî\¾þúksæèFaccÃŒ3gåÊ•|ýõ××Õ¯jÕªñî»ïòꫯ2oÞ<.^¼ÈÙ³gYºt)üq…®ù »>ú(€EèJñ¡,+++ŒFc¥„ò¦¹aÚ´Ívzæ üñ‡<ðÿ èÐAt)ÜÝÅ)J­Z’ü«KIož™) œÙÙ’®Ü„iÔ`Îps“TæeJTÔ>:w~±R~”´ˆqskL¾„†.ÆÖÖ‘¾}? ''cÇ~ÑÿšŠ¢”Êc=vKç[·n]êúÌÌLñ÷÷gܸq 2'''^}õU¦L™Rbû¦M›Ò´iSÚµkÇN“òq9™9s&/¼ðýû÷§C‡|ôÑG<óÌ3×½ò÷÷gòäÉ9r///>ÿüs^xáêÕ«Ç÷ßÏþó¾ùæºuëÆ‡~È?MÑ„åäÃ?¤nݺüïÿãÅ_ÄÎÎŽ¶mÛ^w;•fLüòË/xxxàååUâ_Ô˜¨ #¢hÛ•:÷Ö¡ƒLkÄÆ‚‡‡„¦¤Èº1c$møO?Éze8,¿Šš5¥¾vm“Ù'å† ÅÿâzÈ̽ŠêÕ%=úèÑ¢´Ù¸1\º$F££ø]‰¼0`ï½÷Æ `Û¶iÞü~BC—àã#âX:uÂÏϯ„sÈÜž‡‡aaaj¦—.]"&&†'žß‹˜˜CDEíÅÊÊ//¬­í8{vFc>uêtÀÉɃãÇ#''Í>žzõêU­;º@Þýˆ°01$¼½eݳϊH•(`ž= < å>’‘Ó¼Ò+¯ÈÄ]wIùõ×!:š6£ÄtÉÛo¿Í´iÓ8p CÖÖv€Dn 8Ðbtáí"×`ÕªU¼ùæ›f£ÐÝÝÝ|sÆÄÄзo_ó¶uëvÂÁÁ•üü\ó4Š«k}¬¬¬©Y³EÁÈHvvN¸»7aùòå899ѰaCýOª(ÊE«V­¸÷Þ{?~(«¿F£|nÔ£Õ`¶‹´¿{÷nŽ=Ê„ 0ó1 æQƒR:PàcRpü"£Ò=`e–]MIIá±Ç«:×_Qå¡K—.Ñ×¢´©ˆªF¹ŸšË–-ãÇ4Ï3-\¸ü‘µÅ’fÕN7ù8T–¯ƒµµuÅBŒvîc¡,Ο—0ÑeÆ ( ˜µ9²²’ؾýc¶lù€“'W•ºû¾}þ><·Ìæ7lxˆˆ † Fzz:Ç×_­¢(ŠR5Œ‰aÆ1~üxbccÐ?~¼Eá­xC®ð1¾ù¦L¸8ؽ[t!¦N‡•+%¬Ó¤3±j•,ûúB^¼ôü÷¿â ¢áë óçKyåJiû«¯˜6mšÙ?ÁÞ¾:½{ÿ›Áƒ¿ <|{‰nÅÇÇÁ¡ì(“ðð¸»7±X÷øã³hÑ"½‹EQ”¿”rOs¸¸¸pôèQ:tèPµÏxäH ÇËÕ«Eâ§ŸdDaôh é4E„„Àc‰¤­­DQ¼þº møù Y £FA£F€d3IœZ[ÛbeeÑ#?Ó±ãs%ºU«VŒFQQ¥{ò6jÔÌÌD‹uÎÎÎdddè]¬(Š¢T‘‰£G’ššZ¦ s•¡àA_.&L€ðpøî;q„ts“O9©^½ºY5Ô`È#$äêÔéHíÚw¬3SæPNNÎ5Î222þº¤gŠ¢(Šr½ÆÄÏ?ÿLXX , FÌž=›»La‘\;‰KeMTª“ʽ÷Â;ïÀ… P·®èFÄÇ˺«WEóÐ!ј°²‚S§¤Î¤+Q¿¾” "éÝfφU2S¸&@ròŽOHÈ"BBdj"66–zõêYÈWeïÞ½‰bгhÑ"üq½‹EQ”¿”r‡†æåå™—mmm1  ‹hŽÛ>44?_ ƒ¢Q99½a’zÍÏ—øI²LqL›&ÛZ[K;yy…e ý]»vqìØ1&LO~~nÁµ°ÆÚÚ–ùóçãååeNƒ+†Ra4Ç´iÓ4h:u*¨×hEQn ªÜc¢<üíu&âãEhJQE 5&3åžæHKKãüù󤧧›×%$$ÜÒÎ:99ýµ‚UjH(Š¢(ÊëׯçäÉ“¬\¹Pß}÷^AEQEQc¢|<úè£ 6Œ¤¤$òóó©Q£F‰íÊ­REQå7& P?(5ÊàZŽ€jP(Š¢(ÊnLlß¾ZµjѶm[½jŠ¢(Š¢\¿1±uëV¶mÛÆO?ýd^WÚ4‡¢(Š¢(wå–ÓþøãK¬{ê©§ô *Š¢(Š•GqgËâ:Š¢(Š¢üý(÷4G\\Û·o7犸téÛ·o7GwÜ 233-t.n }T¸|ù2dM½ÉÉÉL:•M›6žKjjÌwsFÂÂ~#2r ,`úôéäççë/OQåN4&8€§§'k×® 88OOOV¯^]µÎxÿ~ù\½ péœ?/uYYb0ìß/2ÛÇÃÝwî»r%,] ÁÁR¾rE¶-fP8p€öíÛ3dÈÒÓãÙ¼ù}bb•ÞŸÈH‘ìNN–c_¾ QQÒvz:dgË1""d{Óߨ(‘ýNI‘úd}B‚”K+?_Î×ÔŽéS´ÝsçdƒAÚNI‘åÈH© “ú˜ãèèQÉÂZ 'O®ÄÕµ>±±G‰ á©§žÂÞÞžó¦ë­(Š¢ÜYÆÄ<@«V­Ì²Û£F¢eË–dggW³]¸P–çΉáðé§°x1,[VhX<ñ„ÔççCt´ìc"!A¢.HyÖ,ÙvÖ,‹Ã¬_¿žaÆ““JóæÃÊîÓ¼yòàß¶ –/‡gŸ…9s¤Í”ôèçÎÁ‚b`øùÉ~³gCf&|ÿ½ÔÿIŸ †Hd{v&M‚߇qã`Ñ"ذV¬ýç̓½{aÏ1hf͂ݻ!0PêSR`ãF1¬ví‚;J®uëiР'®äåeðòË/3sæLýå)Т܉ÆÀ† ÌI€U«V1räÈ[Úá ù^Ô«'oÒ¹¹àåNNðÖ["“œ,Û<ø Œ+u÷Þ E²¢Ò©ôï<"å-[¤½mÛÊ<¤»{¯õòŸÿHŠóœèÛ~X’нü²¤??uJúãâ"Æ@qªW—>4l(å­[¥¼ukÉm$!ÙÎr.’¼¬F hÞ\ŽU·®ïر’û»¹‰Á­ZÁ™32"²áèN1.^ ÂÖÖ‘úõ»ê¯MQåoJ¹0W¬XA÷îÝ©W¯‹/æ¾ûîÃÃÃÃâA_ôa_ÙBUÖÖÖksà@èÕ Ö¯/õMúº¹ûnøïå½-[¶äÔ©S´lÙ²ÔÝΞ=˱cÇøÇ?þ!oÿÍ›Ë(HyCm³²ààAY~ñE1ŽÞ{zô€víJôiÑ¢EôíÛoooèÚUŒŸçž“ôêåÁÔV›60y²Ó§K¶T“1R0ÕsòäINŸ>ÍÈ‘#‰ˆ"##žÖ­47µoß>ºw﮿y˜O›&}èÛWÚ6LÊ)ã/^¼È´iÓ “²5o5k‚··´oe­[C:ÒÆÕ«r¼·Þ‚>}¤‰‰r}’sŸ3žyž|~ýæÎ… ˜;w®Ùñ4.î8/ðII8räëÖ­#JQEùÛP©)ÈÛµkg‘‚¼x˜hEE®²³³18::VÎÙþy¡aPÉ„……áääD“&MJÔÒ¾}û["úIBB:t1cÄÿ¢‚éàËbûöítîÜ™êÕ«—¨ ¥Zµj4*n°)ŠrÛ¡)È•ëÁöŽ;ãœy/Ñ’± IDAT£·¶C";[Ö¹¸È:±ZÄ¿à: ‡‚ýÊ’ÏÉÉ¡k×®899ýYƒ×݇ÒhР F pt”Ñ™Š'?_¢Ol‹Ü:ƒ¬·³£¯^b´äåYnøøøTüû+Þß¼<]1±¹¹r|'§ÇWEQn×5Í1þ|ÂÃÃ8uêóçÏ'&&Æb$¢è§hÑÊ­2ŠM)\7³g‹!ÈCgêT™*ˆ/|8ýç?×ÕdJJ S§NekÓãÑ£óÙ½ûK._>ÂŽSرc ÑÑÁìß¿ŸÏ?ÿœ¨¨(ËFΜ±tb|÷Ý[s=NL „„\{û}û$âÃò¦0ê%4^yEüRnvA"`öï/,ñ…|Ÿ/ê¯[Qåv3&.\¸Àƒ>Ȇ ­zðÁYUüM÷&RátæÁÁòV[³¦”ƒ‚$jÁä£P“váC0¾ø$'˃¿Hýž={¸çž{¸ÿþû‰‹ ¡vív´ný»wI­Z­éÖíš7¿ŸK—öÓ»woî¿ÿ~vîÜiy¬_~‘¨ŽE‹ ×­][¨ÿpü¸ô!6VÞΓm ¢PöîÝË¡Ò*,(Œì0Ϲs…á¨EDW®„o¿•ãø\˜÷‘›@ÂS32d£Qô'‚ƒÁ”E¶cGqî,ʲe°nŪK—.YÞ;çÏK›&#àÀ1._–ò‘#R_TÓ#,L¾Ó´É¡Cò6k&#Š¢(ÊíeL 0kkk³¿ÂÀ‰ŠŠÂÅÅ¥êœmݺò 59#Ö­ µkKTFq?ŒeËä¡ ú wß 3fHÔÅöí²MÁƒãÆÜwß}xyµ£NŽde%ãââ…`Å¥KûiÛöQºwïξ}û,W¯4i¦©€à`y þðƒ”çÍ“>Ìšii0a‚8Súû› š`“˜–‰éÓŹ2"BÞÞwï–Q™€1&5’0Ñ¢}hØPŽcšòY´H®ÃŒ¢9qþ¼wß _~)¾ÕªYŽ7f<п¶ŒVÄÆ†péÒ:txÆ<%sáÂ67`nþðáÃt,Ø×Œ••82–åÒ¿¿ô¡ ‘°¥K—²fÍš’m~ñ¼ÿ¾¼±¯X!!¥¡¡…²ÚÅ·7-ûðøã22ñê«2*Ѿýõ]K++QÚüðC Cîĉ|úé§…Ûuî,ç÷øãe·µwo¡Œ·¢(ŠRõŒ‰œœ–.]Ê‚ pwwç»ï¾cÔ¨QEž–—Å2+ÜYkk¬­­+ÖHÇŽ¢äò–}Ï=ÅýúÉÂÈÃëî»áßÿ-‡m÷îæ·ä¾}ûȶmÛ°²²">þ›6ý›óç7ШQsó`ýúõôë×Ïò¸Ã†‰O‚Éù³Ë¿£GKÚ·—¡þ=,êmllJ^›Ï?—ù¾}22aÚ¯K#¥èÝÚZŽc öð(-éß_Þþ[´°Ü×Ó³pzdô¦iSY~ã ÁXµJT7‹Ü+¶E£-žzJŽkÚ¯èù»»Ëõ¾xQÔ9‹Ò²¥LW•v>Š¢(Ê-áÎÖ™¸._–·ìÙ³-V'L?¸™ •2HMM%''‡š&'PEQ”ÛÕ™P® Ä¿^êÔ)aH”Lj0Q]EQ”¿åž38vìþþþ+’êØ±c\0e«TEQE‰k‘››Ëĉ àøñã¬]»–ÄÄDó6×ò‹¨,Ѫ û^|ð$Å2 DmÞ,åË—%Za×.)_½*Qï½W˜ìÔ))›´Ö­“Ð̰0)›ö1ÃRWáìY8yV¯–úÔTiÛ´}~¾Þ‰Š¢(Êßߘèܹ3IIIxxxpüøqbccé_г[Y ˜•A…0ß}W">üPB ·l‘H…?½‰ädYþðC‰ÚøúkYµÌï¿—²)Tò³Ï$Dsî\)ÿþ»Ô¿ø¢) N…áá‰àê*õ,Ñ3fHùV©]*Š¢(ÊM Ü> ìܹ“Ñ£G³}ûvΟ?OLL ^^^tîܹjœí›oJtC­ZòÀ_»üü,·=ºPéÂ9¸rE¢¤lÒzèÒE¢LNÏžR?hè8̘!ZÇŽI$áCÕpõªlÿàƒr,“Ú¤¢(Š¢üG&~ýõWš5kFBBÆ câĉ >œÞ½{W³5à…$¼ñÜ9I£½p¡ YY%·oׯãÀÚZ ƒqã Ó}§M©ß¿_B““Eà)27Í…qãDÎ;3SšÂÂdTDQEQþî#-[¶äÂ… 8::š³P6mڴ⺷’ðpIdu×]…¹$òóE&ºn]±8°pûW^‘‘„®]%å‹/ÂÆ`2 ÆŒ±ü»{·ü0A²^Xo:æž=ðôÓâ³qú´(H¾ý¶Þ‰Š¢(J•¥Ru&|||,„ˆŠ:KZ[[ãêêZ¡ö³²²0ž¾»*)#íÚé]¨(Êm‡êL(7ed¢\–É5-+C³²9o 4¢(Š¢Ü)ÆÄŽ; ¡]»vôë×ÿüç?Ô©S‡š5k2¶¸ÄñmÌ¥ÔKÔtª‰£íµU4ã3âq°qÀÕ¡ìÑ”ØôXœíœ©n/BT©éT“¶^mÍÛœK<‡‡³F£'½ãEQ”¿åvxhР'N$$$WWW~øazè¡*uÂË/':5šœüÒrÒHÌL$+/‹KW%ùUJv §N“ž“N¾1ÿýþœMÔt®É‰ø,8º€€³LÙ1…øôx…,"èbgÏòãÁ¹|ì¼lV\Ū“«HËIcÊŽ)däfðåî/˜sh3Ì`t«Ñ8Û9œ•Ì™„3t©×…Z.µ¸¯Ù},8¶@ï8EQåoG¹§9"##9|ø°y$âÿøþþþæmŠ+Tõq¨ ƒÁP1Ñ* Cæåç6’•—E÷&l<·‘“WNâdçÄÄnÖ|ÎvÎt©×…Wº½RêÔÈ+]_aá±…z')Š¢(:2ñgÌ›7öîÝ ÀÒ¥K ¬²Ù/ÛÔjƒ§³'­=[óN¯wHÌLÄÝɽÔm}¼|Xsj ©9©Œm7–N³;ñvO çÜza+žÎž%ö±·±Ç`4gAªó‰çiâÞDï8EQåo‡ÍÐÑO}äíé@þŸä‡¨U«NNN8;;S«V-êÔ©C^^Ý»wÇÞÞ/// ݉â#êl^^F£Ñ|¼ ¸µ >^>ôjØ oWoÚÕnG—z]hS« ÕªS»ZmêV¯‹ƒ­w×¾›”ìêW¯—‹=¼{мfsêT«ƒ³3÷7»ß<½Ñ¢f Üܱ·±§±{c¶]؆­µ-ññæÑEQ”Û¸¸8<==1 äçç›ÿæçç“——GZZqWôèÐT/–RþiŽÖ­[[”kÖ¬YeG%L)pstÃͱ0xñцž z–XörñÂËÅ«Ì6ïªqwÕ¸Ëld(Š¢(ÊmLÜü-ĪEQåN5&V®\ITTÞÞÞŒ=š_ý•+W®Ð¬Y3† P"CheUU˜ÿ¾øB¿iEQEù«‰~ýúáîînŽÞ¸rå 'N$))éÖõvß>Ø´ ’’$O†››¤OO‡—^‚$@p0xxH*p__xöYhß^¿qEQEù«Œ wwwNœ8A›6m Áßߟ¾}ûâîî~kz›‘0m¼óôè!)Àïº –,'Ÿ„õëeÛooèׯdšqEQEQ*r‡†ž8q‚˜˜dÕl×®'N$00ðÖö¸U+Ëò±cpü8Ü{¯dþÌΖO:úí*Š¢(ÊídLÌ;—èèh~ÿýw@ä´.\ˆ···y“h•écò¡(îKQi´n ÕªA\œŒZÌ™C†ÀàÁ0w®lS·.üßÿÁÉ“úm+Š¢(ÊM ÜÓ“&M2=ö™™™¸¸¸ÜºÞöî F#ØØÀÿ ..2•‘Ÿ/þÝ»ƒlÛ¸±ü}ýuHM…êÕõÛVEQ”¿Ò˜puµÌžioo_)âQ×…ÉP1$jÔ(\çXDîÚÆFþ:8ÈGQEQ”›B¹§9²²²ˆ%++ €ØØXbccIHH¸µ=>{V¢3V­º®Ý~úé§2ërrÒHI¹Hnn&ÙÙWII¹H~~vÁ¹'“’rƒ!×b¿òD²o»,*+*&33IïjEQåö4&V¬XAPP+V¬`çÎñõ×_ßÚû­DgŒu]»5iRv^Œ½{¿æÄ‰ÏÂh4°{÷Wœ8±‚C‡æj®?zÔ2¡×Çü§ÇÝ»wzAÛß]s»ò´õg\¸°…M›ÞÖ»ZQE¹¥”{šcìØ±@a–Їzˆ˜˜˜ù7nªhÕÙ³°c‡ŒLôïmÚˆÓe^Œ#>(Ž™#FÀ=÷àççÇš5kغu+GŽaûöíæ&{ôèAß¾à‹Ñh 77ƒþ @ZZ,¶¶ôèñ/|ÍûýñÇìØ±___ž{î9’““Y±bÎÎÎL˜0Á옚‘‘@ß¾ÿ±Ø÷ôéÓÌ;—ììlFŒƒƒƒ¹­1cÆ`eeÅÒ¥K±··gܸqøûûãîîNvv6/¿ü2õë×/qi †¡}ûöDDDpìØ1^}õU¶oßιsç¨_¿>ëׯç?þ0·ùðÃÓ«×pΟߢwµ¢(Šr{»wïÆÉɉŽ;d‘1´(VVVÔ¬Y+++ªW¯~keµœ, ‰âxyyѹsgs¹^½z\½E¯^o›G5À!Óð-Ó˜¨½zõÂÅÅ…èèh-ZÄã?^b›š5kâééIË–- ,! 6lØ0† Ó,¤Š¢(J2&V¯^··7GŽá¹çž#55•fÍš•º­µµ5:u2ƒ¡òt&І¢vë?ü+WÂ3Ï”¬·ØÍÅl<Ô«WÏ¢îÀ™$$œ¡nÝXYYS­Z|iذŽŽ5+|iÚtˆÅ~­Zµ2Os<ñļñƸ¹¹1~üxó6Íð¥nÝŽæu‡fþüùØÙÙñLA¿;uêdžæ5jóçÏÇÉɉvíÚ™GWÜÜܘ0aÂ5/½½‹ÞÕŠ¢(Ê-ÅÊï§Æî-«“““SáÆ|||°µ-´OŠŽHX[[—/Uʇ¯¯¯y DQåVJË–-ÉÍÍ%''Çü7''‡ÌÌLbbb‰Ìç_ÏÑ‹¥T~ ò¢ÄMQ½¼ùüóÏõ"(Š¢(·-å MLLäÀ$&&Ǹzõê-ëlff&ééé7ÞÀªUðÐCucû_¹¢«±lÙ2¾úê«‚kv–³g7’““Vê¶±±G9{v#F£ãÇ3iÒ$¢Jé[¹ÅÁ~üQúXiipéÒ5wÿã?˜4i’¹üÙgŸ››‹¯¯/ÁÁÁú‹QEQnܘ Âh4²zõj@|(Š–«£FIH©iJ'?_rvÄÄ}Â˺¼<ÈÌ”e“±v­øgœ>-å«W¥>5á©ãÇóæ›o’““JHÈ"ÀHpðìRì’“„‡ïŒ<ø=mÚ´áé§Ÿ¶¸žááᤴMb¢|ÂÃ-ûzá‚ —/C½z…Χ±±’³$6VÊûöÁÏ?Kóó%—ÉÉ“æœ%©©©1eÊN:evTµ³³ÃÏÏßÿÝ,Z¦(Š¢(×mLŒ5Š.]º‘‘@vv6íÛ·¿¥#•ÎâÅ¢[ñÓOòÖ#Ë;vHæÑ dù›o 7΃عSö÷÷—úY³˜?>O?ýt’ XѬÙP®^-9Ú••Œ‹Kmš5Ê•+§hÞ¼9gΜ1oóøã³mÛ6 ‡?cfß>Y7z´8‰‰¢ÁñãfÆ÷Þ“pÙ~£âìY1‚vìCé‡d¹ ëë¦M›2¤pîsçÎüòË/}n×®!!!ú«QEQn̘`èС€äêX°`A =…¢YB‹f­ ¬¬¬°¶¶®¼³?x^zI2‹&$À_À»ïÊ:>\ÖïØ!oó={°aðüó²ÿ¶mR_D«2Ù½{7#GŽ,\áë }ûŽŒô课 J´îEÂXkÔƒÂÝ]FPzöŽ—^’\%ööÒ÷ŽK=ö /¼P"UQEQ*dL¬[·Ž6mÚ˜e©SRR7nœ…Ôµ.+à¸i©ÌM´hQø ‘øç?¡}ûÒ·oÖLêÿõ/@BEO^#Õ¹Á`à—_~!3³ô<ÉÉÉÔ(’¸lÆ DFFÞœs7Nú¾d 6üSa¯„„jÖ¬©¿E¹CˆŠŠ"::šË—/Ç•+WHLL$%%…üü|½@Êõ¡¡¡¬]»Öœ0«uëÖøûûÓ³gϪuÆuëf0AÞöÓÓEEóùçaëVY—’"ꚟ~ :Áúõòvä¼óŽì?dˆÔçJ°û{÷røða\qu­O@€/íÚ‰ù™3gx÷ÝwÉÈÈÀË«ii1øÒ£Çk$&&²e˺tébîê²e˸páBaß§Luëdt x¾ooq(Zg:ßfÍÄOÂ×Wþ~ýµô½`d¢k×®\¼x‘}¦) ó™ vîÜINNÎ5sœ(Šò÷"))‰ŒŒ òóó±±±ÁÙÙwwwêÕ«GµjÕô)…/û•©3Ñ®];lL©¿)&Zô­ûFÈÎÎÆh4âX4ÕømFtt4'Nœ`РA%êŽ9‚­­->>>%ê._¾LHHƒ.½á9s`èP(%/GeþãØµkÇ·XŸŸŸÏÊ•+>|8šÎ]QîBCC±±±ÁÖÖ¶ÄÇÆÆ†³gϲûx²êL(ÀMЙ¸ÙÜRiî 4…M:t(s¿:uêP§N²~á…›Þwww÷†€ =ôþZEQ”R)÷4Gdd$Ë–-3ë œ;wŽeË–gñ /ú)êŒY¾ƒ¡r†U„7Þ¨´¦ÒÓÓùè£X¶l FãâÂÊÜþðṄ„,`ýúõLž<™„?ѽPEQ”ÛÆ˜8yò$½{÷fýúõ€õîÝ›U«VU­3>^Â+¯\_‡•+áÐ!© cÇ 4´° lÞlNkΩS*šœ\¸Ý¹s…mœ8!å]»¤|ô¨” ´},|EQå¶6&Œ›››Ù'ÂÚÚšÔÔT’’’ªÎÙ^º6H¸¤­-|û­,Š‘ñÅbX¬^-Áܹ²ßÂ…"tU£†8@‚¤?ÿõWxûm1~û ¤½Ù³Eïá·ß¤ø 66v´mûH™]oÔ¨µk·ÃÊÊ[[{ówR4 ¹¢(Š¢ÜÖÆDnn.7näàþûïçÂ… UKñÿ“Ž~ýÀÍ .^”å5DEÒÓž}V""²³EÇaãFpv;;èÚUŒ/½ÕªItET”DP˜D¥rsÁÊJÚpt5Í ¤¾h„FNN8:º]³ûQQ{ÉÈH yóôÎUEQªž1±|ùrzõêevŒŽŽfÈ!xxxܲÎVØ÷âþûå^^úô={`Ð (¥R&›6Ÿ4m*²Öùù0uj¡÷ÃK}AhgŸ>} *³¹ððpsžÈÈݤ¤Dâã3Æ\l–¼VEQ”ÛÞ˜HIIá×_5ëLØÙÙáïïo©(ú°/M³²D«*¤€yï½¢þèë+òÒ~(˶¶àã#S¾¾Ð¸±ä¹°³“QŠ¢Z=zÈßdÄ¡Gðñ#Á×Wþ††Âûï‹ ¥——R_ %1hÐ ¶mÛÆ®Ÿ ''<=[™µdÉsr­ÜÜ "#wàKtt0ÁÁÁlÚ´‰ê]¬(Š¢ü¥¨ÎDQ¾ûÆ/,ö™HTpcímØ £O?]¦lull,ƒºuë–¨;þ<µjÕ¢zõê%êâââÈËË+3 UQ¥"¨Î„r=ØÞQgµj•]_ÔÉÓQ”ž=¹zõ* ÊØ¤víÚeî~-µIkkëÊÍS¢(Š¢(7Èu…†úûû›sO9r‹¦Ä¾Ýùì3 ñ¼–±Q‘¤][·úGðÍ7ßpôèQŒF#¡¡Kð%3³tmˆ””""v•Ùü¥KHL”¬¢.\`îܹÄMŸ®(Š¢(·³1‘””ÄĉÙ¼y3 )ª'NœÈÚµkÍÛÜlÑ*£ÑXqѪà`øýwYÎÊ£@;ƒåËÅAò³Ï$´3:Z–?ûLÒvoÞ,‰±Ž‘íägút /-ð+ ¢mÛ¶ >œÌÌDÜÜîbèP?vìø¤D·Ï4•+WN”iHìÚõ©©b‘ä^‘‘pü¸øGôè!ë\\`Æ Y~þy‰æøòKhÔ~ùEÚúùg©›3GÊÝ»Ã#À¨Q€{™rm8;×ÄÛ»ññ'¨U«u‰nÕ¨áMçÎÿ,³Û^^m-"9LÅô.VEQª†1!4¯JqÔüKyüq ÛÌÉ‘l¡^^±‘—Õ«ËÇË ¬­á$´síZ0¡uk1òò¤­¼<Ù¶ k(Õª‰VEᲉ‰g‰ˆØI‡Ï•¨³±qÀÆÆ¾ÌnÛÙ9cee£w¬¢(ŠRu‰Í›7ãììL^ÁƒÔÆÆ†øøøªEÒÕUĦ²³% ÔÖV „¨(шhÑÞ|Sd²sseZ$*J¶1B¢¢$ÜÔdLÄÇCl,cÆŒaÉ’%¤¥ÅpèК7¿Ÿœœ«€L=òÈ#ækZœãÇóòË/—Ùý-[¶”šTQEQnKc¢E‹lÛ¶a‚K¦ùú‘#GV³9RT)Û¶…fÍDbÉÑ•hÝîº î¾[Öef–-²ÖüÁSVEQ¥ê{öìÁßߟ={dˆ>%%…¥K—þ½®Ft´Œ>Ü,òó%¼´’™5k–yÔçôéµørúôºRF3ò9rd¾\º´Ÿüüüž€_ââBÉÍÍ`ß¾ø’”t¡ÔcEFFrüøñ2ûräÈ._¾\Â(ˆˆˆàÊ•“øràÀ,òò²ˆ‰9D@€/‡ÏÅ`È#""ˆ€_Ž“hWWWfÏž­¿REQ”¿‹1áîîÎĉ9xð ëÖ­«Z‚U&æÎ…?–Ü ’+cÞ‹"SR¡¡¡xxxзo_\\j3t¨çÏ—4Z uê´gèP?BB“šz‰¼¼,†õ#77“øøã89y0t¨ûö}SbÿC‡ñã?–9]µqãFprr2¯ËÊÊâäÉ“tèÐììT†õÃÊÊšääpŽ]ÀС~Ô«eÏ IDAT׃!ãÇ—3t¨11‡0 tïÞV­Z±sçNý¥*Š¢üŒ‰V­Z±fͼ¼¼xüñÇqvv.öæ[¶De‰VUXgbÎxí5qÀüä©2M?Œ ÿø‡¬«QfÏ–åÝ»%âã½÷ÄiÓd˜D® "6ظQÊs犡áé cÇŠ!rø°Æk׊´÷ر²u«„¢NšŸ~*m o¼!ß}Ï='ÉÊLÇbbb,òzԯߕ””HjÔ()àmccG: šJ:8sf=Û¶MÆÓ³E‰íg̘Áäɓ͟–-[2vìØ2Èûî»nݺYLi|ûí·¼òÊ+æ¾?¿™´´œ=ÉȈg۶ɤ§Çbk[ºLÓ¦M9wîœþREQnc®+7ÇàÁƒ™;wîŸ>ð+Ó€(Þv…0»u7·Û7*JFÞ~ûÏ·ur’æ:ˆÑmY_¿>´iS˜ÞÜÑQ”3“’Àݽp;Ó¨À”)"¦õØce6)é<çÎm¢{÷×Êܦ{÷WÙ±ãc5êKãÆéÒeŸÐ¶í#Û=ÿüó×»¸ñXžï+##ãÿÛ»óè(ª|ãßN:ÝéldOI@¶ ¢/,Adv\`fq<ïÁqtßQyŒ £‰8(£ ¢,OA–EÁ¤%l!@²@0k§×z\ÒI“Yþ>çÔIº«êVõMwê׿{ë^üýýÝϵmÛsçŽ`±”a2…qï½Ï±{÷îàF!Ämœ™X¿~=ÙÙÙW|A¹©µo¯ú0œ?¯«2™ ¦F=gµBt´ú]¯WƒXÍšqq*ëjœŠ-[ꃓI=¾ÔdbÍ),T·¦Ž¥Ž5b„æ»®3c|<Œ ýû×s™´® À޳ Œqß~ pÿý÷óõ×_ãpÔ²gÏ"òó¿ÆÏ/½Þ„¦iì&0°5Fc55gÉÍÝBhhGüýý t/M‡Œ;¶É—”““CTT!‚#³y'OîÄn¯A¯7ѪU»Ñ4^^>øûG’›»½¾~ì’uëÖñÀ…E…BÜœ¼G<8qFl¸§ÓyÉ ÃÃÃ9{ö,}úôqQQQ7ø–éq dËN§»æ®š¦a0®¾øøú‹ýü=ª²‰‰* Výî¸C=Ÿ—§š""Ôz—K5[t쨵*,„Ñ£Õ€U:¨>> jŸøxõ|LŒÚ&>^5ÄÇ«ìDl¬:vr² "¬V8P2:¨±,ÕR\¬˜”÷Ë1 x{{óæ›o2lØ0 †@t„„´ç‹/¾Àl6óÈ#„ÉLuu)]º<ŒŸ_&S(Ë9ºvG@@4z½/µµ?”4®q¬@LLŒ{Zô×_þýûsÏ…)ÖÃÃÃ‰ŽŽÆh4²dÉž~úi÷¾aa(+;JLL2aaˆŠº‹óçsiÛ¶AAmˆŒL¢¼ü$: Çd åå—_æî»ï¦{÷îòIâ+))qÏNÜÔRVVÆéÒZRîî •%Zvœ‰¤¤$q&.&‚‚‚®©|‹Å‚ËåòH›ßÖ>þX&È;UqCÉ8âJ´ø8 g m8ƒh‹œì…ˆøªmÛ¦² 7Ðwß}ÇG}tu;ÿêWÍ;wîdÓ¦MòBqë7n$55•¦ëþôÓOIMMeÛ¶mMf".ÖRÅ5uêܰáÒÁD^žºãj-Y¢f màý÷ßgøðáØl•|ñÅ6mšN^^F“»ge}HVÖŠf‹ß±cùùªCæ=÷ÜÉ'8\7ý¹Bq³ÉÉÉL:•ÜÜ\úöíËÔ©S/9€ÑMé½÷àµ×Ô8߯ƅxã Õñò“OàƒêÇ™ÈÌT¿OŸ®&{é%˜3GG°zµZ·~½z¼b… bî\Þ~ûmüqBBBðòòáž{&1bÄô¡Ck1™ÂhÛ¶¿¼ó„Büü‚‰>úˆO?ý”°°0Þ}÷]ÊÊÊØºu«Ç…¾áÒ°3fK `år¹®}Ъ†zõRCXªÛ5[µRcN,\ÕÕ*ó`4ª~š'Oªu¡¡jÿÈHõ8&F=îÞ] ju¡ÃåŒ3˜1ceeÇÈÎþ¢¢ƒ;¦:NáããÓì4;vì C‡æo»Z¶l¨›þ\!„ø‰\v3Ç<ÀùóçÝ=ûì³hš†Oƒ”nzÏ?¯ÆrøÅ/ÔO£Quº ¬{bÊ5P”Ñ÷Þ«æÄ UEED¨!¯ÃÃë3%%õÙŠÕ@Xî8ñòòbðàÁ¼õÖ[ü×=Á!s0Ô­­iii,Z´È]‡aaiÕª­ûtwîÜÉoÔϑѱã0t:uëíÆÑ4Î;Ë»X!ÄOJÆ™¸ÇŽ©Áª„â6'ãLˆë’™p8ÔÖÖâëë‹^¯Çn·cµZ1™LÄõÔp6ÊŸ„B!ÄÕŸ|ò‰;˜øÍo~Ç~ˆ¦iËÜ B!„?Â`0šš Àøñã=:Zj7x´I!„BÜx—}7‡Á`ðgÂ`0ðÁÐî˜ B!„`â’ÊËË=Æ™(//g„ äååI- !„?c—Ý̱uëV iÓ¦ 6l ¬¬ì’ã !„B‚ ·‡~Øãñ#<Òh›‹g½øÖP!„BÜ~¼¤ „BqC‚‰òòrÌf3îç*++©®®¾a'k±Xnèñ5±W~P˨®®fÁ‚lÞ¼€ÚÚrjkÏÿ ß^ùù_qîÜ@MÇþÎ;ï´ìèBˆë¦¦¦†ššª««©ªª¢²²’ŠŠ ***p8RAâʃ‰-[¶PRRºuë.\ kyóÍ7ÉÉɹµ^qa¡Z¬V5Íxee}€àp¨99 Á鄳g!1±~ßM› - Μ©‹nÔ¶µµ‡8xð 111 6 »½†-[þ©S»š>ŸŠ 5ïGm­:vuµ:§š°ÛÕyªsUQ]]$§ö³ZÕú‹ÏÉbiâÚ®©ýêÊ©[–{þ¼Ú¿®l«Uý^D––ªõUUêqI‰z® ‡­¥¼ü4GŽlàìÙÃLœ8‘’’™éTˆ[Dpp0~~~èõz\.‹…òòrJKK©½èÿžøy»ì>cÇŽp+±råJ’““oø _Sß‹Ï>ƒC‡Ôï¿ù Ìž ­[«¹4žxB]À'O†aÃÔ›7Ã{ïÁˆjŸ}ûTàQ\ O? €··ÚÿOræã?fÞ¼y”•§]»ÍŸÓ¬Yð÷¿ÃÖ­pô¨šö<%Eññàë«‹EÍ2s¦šöüÕWá/QÓ§×Öªóxæ5ñX]=÷œç±*+Õ ¨ÿó?0c”•A‡*0€Aƒ 3SÍKÒ¡øû«@bÀ5íú¯­‚)½^ÍCb³ÁÎj›¡C¡GÃÕMµþý÷«©©9 $ð׿þ•éÓ§»ëGqójݺ5N§»Ýî^l6‡‹ÅHvB\afp3ñöÛoãççGVVYYYú†Ëųˆ^óÉzyáåu Ý<ìv0™ kWu¡6™à… 6¶þÛõèÑê"<]ºÔï?x0üêW*رüüÔ¸QQÝðó oþœfφüC}ÃÿÅ/ࡇT`0m˜Í*€yî9 ªÏ4ätªs6Ìóœvìh¼­Á ƒUÆ%$DM~f·«:Ù·î¸CoçÎÆû;õžõì ß~«2••Ðà}ÐPQÑ·Øíââî•O›Bü܃‰¼¼<÷8ãÇçÞ{ï¥sçÎÄÇÇß:¯ö¡‡`äHõüë¯ë"”‹#–Ë//&Fe-&Oöx:66–üüüfw+,,ä‹/¾PŽQÁLu5œ;WüK‡Í¦²ÿùŸêÞ{¯î«D£sÚ¶mgÏžUYŽÄDظQet:uœ{Íf³úÙ£Œ¯¬¥KÕsýû««W/NŸ>ÍW_}@qqÅÅYtëö[wF)''‡Ä†MGBˆ›ÚáÇ>|8)))Üwß}¬^½Z*E\}0qâÄ RSSIJJ"((ˆ6mÚçó–°n¤¦BA$$¨¦ƒéÓU?öíÕ7÷ððÆC^½`ï^Õ¼*“šÚ¨Âý÷ßÏúõë)..¾Àh t¯_µj¯¿þºzž&@÷¦;ŒTM 11êâ=}ºÊVDEÁ˜1õÙ//Õ¬‘š wÞ©Ê:T=®©àܹs<õÔS?~\­4HíÛ«òu:€´j÷ÜEEêxO|8>ø TŠh¤E§ ïÖ­›Ç ¢9ѪU«k*ßjµ¢i¾¾¾-óêŸ^53\;wî$00»ï¾»Ñº•+W2xð`"""®ûøÐ¡C0dÈÕ·bäHX³‚ƒ¯Ëñþýï3räHB/ effÂ]wÝ%ŸAAA×T~mm-.— ???ùË !Ä &.î€)Á„hH_÷ßjµ^sa………™‰†%u:eee?}0±s§êlX÷Í9=]-Ï=§Òý.lØ :b^uëÖ¡iÚ¦·oßÎéÓ§yôÑG/]àÚµªáz»Òãäå©ÛH»w¯îÌ8}Z5íÙ~øƒªçë}¾ª&šº çví‚Õ«UŸ‘Îå.ÄU*//'??—Ë…ËåÂápàt:Ý‹Ýn—Jž™‰>]ZѾ}û&7p¹\œ:uJæà¸ÅØl6rrr¾NÍBˆ[[EEñññøûû7¹þĉDGG7{N§ããÏÍ’™õ™ oooL&“ûÉÊÊJŒF#ƒ—Ë…··7ƒAjëâr¹0 Íþ£Bü¼Y­VŒF#&“ MÓ8þ¼G_'½^O@@ÀµÝŽ/~^Á„Ëår§¬\.>ú(3gÎ$11Ñâ’”Ö­ÅápàåååÑì$„u¼¼¼<úCŒ3†5kÖ¸³™2콸ê`¢¶¶–‰'²cÇ^xáìv;.—KÚÇnAv»//¯Fb…TFºaÇʃ2zôhV¬XAtt4N§S*I\Y0¡i6› NÇ/ùKvíÚ…ÃáÀf³¡i.—«Eîö7>3!Á„¢¹ÌDÝÿùºI»†J` º»O2âª3ãÆ£ªª ½^ÝnGÓ4ÉLHfBqv»½^ÓédÊ”)L™2ÅýÿC2âª2 §“0a‚ûÛ­d&$3!„¸ýx{{ãt:Ýÿû§OŸîþßQ÷%Sˆ+ &, ÍnTQQqa†8q«p¹\F Q!êTUUát:›í¤]saH~!.;˜èÑ£G‹Ìê)„âöQ^^NQQÑ%Ç£ÂLüðÃ’ÒBááôéÓDGGóå—_’œœì±NÆŸ‚‰1á”Bˆ[˨®®ÆÇLJ¨¨¨&¶8*•$êƒ éµ+„¢!§ÓÉÝwßMqq1±±±ÔÖÖz¬×étRIÂ3˜ ””•B·ììlœN'~~~”––º0¬ûÙ“CŠÛ,˜B!.Ö©S§KNAµRIIG!„øQ'NœJL!„¸:YYYŒ?žåË—ËB‚ !„WæðáÃüþ÷¿'??Ÿ3f°zõj©шô™BѬ„„öïßߨτ IfB!„×D2B!šT7:²Ãáh´Hß !Á„BˆUפQ7»hÝï6›Mf’L!„øqmÚ´q÷“¨ûi³Ù°X,TWW2z²P¤Ï„B!$˜Bqs»‘·”ÚívæÏŸO÷îÝ1 øûûÓ¿>þøc4M»ìr*++ÉÈȸ¢}®g973iæBq]½ÿþûLš4é†ÜRj³Ùøå/‰Ùlæ¿ÿû¿éÛ·/‡ƒ´´4&MšÄ×_Íܹs/«¬Ã‡3hÐ ìv;zýÕ_.[ª &„Bü,-^¼˜)S¦Ü°o寽öYYYìÝ»—6mÚ¸ŸONNfذaÜwß} 6ŒáÇ˧I3‡BˆëbÞ¼yLž<ù†.—‹ÔÔT^zé%@¢N¯^½˜4i .`ïÞ½èt:ŒIÃçzöì €ûùÅ‹J`` üãq8WTNCèt:6nÜHÏž=ñõõ¥mÛ¶¤¦¦zl———Lj# Âßߟ1cÆPRRÒ¨œµk×ÒµkWŒF#½zõâðáÃå¼ñÆ$$$`0ˆåÅ_Äél™N´L!„hq/¿ü2Ï<óÌ =f^^EEEŒ9²ÙmFÅW_}uYå}úé§:tÈýÜÛo¿ÍgŸ}Æ¿þõ/–/_Îüù󯪜†žzê)^|ñEŽ9 /¼À³Ï>Ë»ï¾ë^oµZyòÉ'ÉÎÎ&==“'Oòä“O6*ç•W^aÙ²e¹¹¹,_¾œ÷ߟ_|±Eê^š9„B´¨¿ýíoÌ™3§Ñó:®ÅŽÑT¶ã‡~ **ªÙý¢¢¢(++»¬A·âââèØ±#àÿø÷Þ{¯;8X¾|9¼ìršòÒK/1zôhžxâ Ž=Ê«¯¾Ê¤I“5¤yBBñññÌœ9“ßþö·hšæQ§¯¼ò )))üéOâw¿û‡›ÍÆ«¯¾ÊÖ­[éÓ§±±±Ìž=›©S§2kÖ,ÉL!„¸¹4HÜÁÁÁœ;w®ÙmΞ=KPP^^WwùëÝ»·û÷¾}û’““sÍÍ8 hô8''«Õ Àž={9r$ÑÑÑ2~üx, UUUû%%%¹ŒŒÄápP]]ÙlÆb±0tèPÜËã?NYYY£r$˜BqSd&~ íÚµ#**Š´´´f·IKKã¾ûîkv½Ýn¿ü ¨—W³Ä•”s©ŒMyy9C‡%**Š5kÖ°ÿ~/^ Ш¿CS’¦iî,̦M›8pà€{ÉÊÊâèÑ£øùùI0!„âæ2{öì&S皦µØÒÜÅýÉ'ŸdÆŒ5Z¿wï^–.]ÊÔ©S›½ðïß¿ÿ’¯í›o¾qÿ¾k×.ÜÁÀ•”ÓPff¦Çã;v˜˜ˆÑhÄl6S^^ÎßÿþwúôéC§N<:_^Ž®]»âëëËÉ“'騱c£åj³4L!„¸®žþyæÏŸß¢ý$.Ç_þòºtéB¯^½X²d ÙÙÙìÛ·—_~™2yòdwÍÖ­[£Óé˜5klܸ‘×^{­Q™'Nœpÿ>}út¾úê+Ö¬YÜ9sxüñǯªœ†fΜɆ 8}ú4ï¼ó ,àÙgŸug[¼½½Y¸p!yyy¬]»– \Qð׿þ•iÓ¦ñ¯ý‹“'OrìØ1V­ZÅÌ™3[¦âç½›®9NM!„¨“••¥Ùl6­ººZ;þ¼VRR¢åççk¹¹¹šÙlÖ¶lÙ¢Í{7ýGËYºt©æå奩ÄÄa³Ù´ÿýßÿÕ’’’4½^¯ùúúj}ûöÕV¬X¡¹\.m-Z¤EGGk€Ö©S'mÑ¢E Ùív­¬¬LëСƒf4µ={öh€öÖ[oiaaaZ`` öÇ?þQs8WTNCÛ·o×-==]ëÝ»·f4µ¸¸8mÁ‚Û-[¶Lkݺµf4µ~ýúiK–,Ñíüùóå”––6*»nMÓ´Å‹kwÝu—f04­W¯^Ú’%KZ¤ÎuóÞMמztH‹¤9„Bܲ³³IHHhv¢¯3gÎuÚÉÓ ûѲ>úè#&NœxEýn6{÷î¥gÏž-:ŠeFFƒ ¢´´”ððð[úý"·† !„¸®Æß"üÄÍKÒB!®»1cÆH%ÜÆ$3!„¢IYYY¸\.÷ât:Ý?[jæ[E=Z|XðÞ63‰J0!„¢I‰‰‰8Nìv»{±Ùl8Ž ·^ÖJ% @š9„Bq$3!„¢Y¹¹¹¬ZµÊÝ´Ñ©S§‹BH0!„B¸ÅÅÅQYYÉÂ… ILLä½÷Þ“JL!„¸|>>>üíoÃÇLJGy„‡TŒ`B!Äå3üùÏvwÀâbÒS!D“.¾mñv¹Q´<=À?ü 5!„ÂM§Ó±gÏžf×#·† `"//ªª* ƒÔˆB|}}›]J¤’D}0¡iñññ"M!„¢y^^^2׆ðà=âÁ‰3ÚFùáç燯¯/‹…ÿû¿ÿÃh4RYYI«V­.»°þóŸìÝ»—=z\ñ‰|ÿý÷}M/(??ŸÔÔTôz½Šœ/Ð4íÛ·ÌÆÑëõ¼÷Þ{¤¤¤™™‰Á`àøñã¬X±‚ï¾ûŽ.]ºpìØ1*** u—S\\ŒÙlfß¾}ÄÅÅa0(((àõ×_'++ ///Ž=JÛ¶mÑét—}Þv»Ï>ûŒM›6áëëKTTT“û;N>þøc’’’®ËBÓ4>ýôS:v숷·÷%·ÍÉÉÁd2]2£•––FDDÄ%¿á!n-:¾ùî)ww ïæp8deeѵkW\.iiiÔÔÔ Óé¸ÿþû±Z­¬[·»ÝΘ1c<¦M5jK—.mö"õí·ß²gÏ:wîL¿~ýضm§OŸfܸqQSSCII C† áСCøûûc6›±Z­x{{ãççGAA?ü0ß}÷EEEX­Vxà £oß¾äååѧO÷ñ+++ùöÛoéÕ«$&&†­[·2`ÀŽ?NDD+V¬àùçŸ' oooL&tèPÿaÉÌ̤K—.˜Ífúõ뇿¿?ÄÆÆòÄO°dÉ:vìHllìeÿ!öïßOee%S¦LaöìÙtîÜÙù[­VV®\‰Ãá`ĈìÙ³¼½½>|8œ?~œÂÂBî¸ãBBBX¶lgÏžeûöí 0€6lØ@rr2111îcíܹ‡ÃAJJ :Ž9sæàïïÏîÝ»Ýuér¹˜;w.:ŽââbV­ZÅ–-[°X,<ú裴k׎äädÆŽKUUÿþ÷¿ eÕªUäåå±|ùrî¿ÿ~÷ëBÜ>, Ÿþ¹T„øñ`¢ŽÁ` M›6a³Ù¨ªª"%%…Q£FñØc5»ŸÃáð¸;L&&“ £ÑˆÝnÇÏÏÐÐPª««Ýx///l6çÏŸT 6mÚI›6m§ººÚÝŒJmí÷(v8xyy¾Ü   Ù·oš¦Ñ³gO^xáFŽIZZ^^^3ãÕÍœwqú_§Ó1pà@¦M›Fxx8z½¾É‹¨ËåbáÂ…lÛ¶­ÑºΞ=ëžT§á1***ˆŽŽÆ×××1iݺ5ØívV®\ÉwÞ‰‡ƒ"##1 <õÔS;vŒ·ß~Û]ÞСCéÖ­ëׯ'33???z÷îÍþðw•ÓéDÓ4z÷îÍØ±c=z4555„††b4ñññA¯×ãããƒÍf#::šÞ½{óÌ3Ïкukjkk &((H>eBÜfÄîÝ»={/þÔ¦IDATš‘…hLxyyN@@þþþDEEЪU+üüü;v,Ÿ}öÛ·ooÔç­·Þ"77—·Þz‹3gΰ}ûv÷ºÐÐPbccY°`Ÿþ9qqqØívÞÿ}FŒ¿¿?AAA 2„7ÞxƒS§Náççç>~pp0F££ÑHpp0aaaèõzüüüÜM Æ‘_¹r%;wî$33Ó#p°Z­èt:"""0™L1f̬V+>>>¤§§³xñb233>ž¦êvÚ´i <¸ÑºîÝ»sîÜ9.\Hrr²»nu:&L`Ù²eüóŸÿ¤¤¤„ÈÈHwb4¹ãŽ;HOOÇ××wÙív222(,,ôøàŸ8q‚o¾ù—ËE\\)))¬]»–œœüýý‰ˆˆÀ`00tèPÖ¯_Ï®]»æ¾ûîÃl6“ššÊ÷ßÏwÞÉÊ•+ñññ!$$„µk×RZZŠÉdbÈ!¤¦¦RSSƒ^/c£ q;°Z­î@âܹsR!¢þKõ¼wÓµ~Ý kÑ»9ŠŠŠ0 JN§“¥K—2qâÄËî…¼{÷n¬V+ýû÷w?g6›9uê#GŽlrŸªª*>úè#~ÿûßããã#ï0!ÄmÁáp°}ûvºté©S§`n-O?6L*GÔ‘‘‘„„„H!„h”‘ضmݺu#''‡ˆˆøà³ýLàÂ݉‰‰x{{7êS „Bèõz†ŽÑh$&&F8Mv»]zÝ !„¸$‹ÅpYÞÅÏ‹¤"„BqMôæãÅ,_ûÔ„Bˆ+b>^,• ø=¯%LØIEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/snapshotFileMenu.png0000777000076500007660000004450110463126447026746 0ustar ‰PNG  IHDRÀÐ6óºè IDAThìÝ{\Tuþ?ð× —5®IdæmÕu7å22—4‘rA%ÁËí[>Ìüæ¥¬Õ %Óbs¿š·¯™[¸–†¤K!®I" Øz ×;~3Û†”PùýÁÎYgæp¸ çõ|<|çÌy{Î ç¥HKK3€ˆˆHf`Ò¤IíÝ""¢6qîÜ9œ={¶¡@yyy{¶‡ˆˆ¨M)Û»DDD툈d‰ˆˆd‰ˆˆd‰ˆˆdÉjÔétðððÀ¼yóL†õïß¿ÕFDDöeãÆP«ÕÐh4P«Õxÿý÷QQQÕ«W[O§Ó¡OŸ>’×c«Ú$zèââ‚}ûö¡¨¨¨Y &""ùX¿~=233‘••…¼¼<ø ***ðá‡Zœ¯®®Îâ8kE͵I´:99á¿ÿû¿‘œœlvü70sæLh4aòäÉ(..lݺ .?~8~ü8`á…زeK‹NDDÇÚµkñÞ{ïÁÍÍ  R©0cÆ Lœ87oÞ„V«…V«®ö/^Œððp|òÉ'-ZŸXm’BÒw€ 8yò$Nž ”ˆˆd‰ˆˆd‰ˆˆd‰ˆˆd‰ˆˆd‰ˆˆd‰ˆˆdIR\·nÔj5´Z-BBBðÕW_µv»ˆˆÈŽ´U¼‘-ê’hĆ ðõ×_#++ nnnøé§Ÿð‡?ünnn­ö\7""²ëׯGVV–P'ª««±}ûv! þÕW_5;ŸX¼V«ÅåË—ïg«º$zØ4å÷ÑGÅo¼!d/«÷Â… ŒÑ£G ‰ð€õÄxã¼III ÅСC…À\""²m/V—¤²ZKKKQZZŠßýîw&ÃGŒ3gÎïõz=BCC‘ŸŸ§žz ‰‰‰Â8k‰ñÆyƒ‚‚pðàA$&& ÁºDDÔñµu¼Ôº$…ä@\« qtDdd$ ::“&M ž4üO!""àïï«W¯Ú¢IDDÔÙ* Þ¬@cÊï?ÿùO“j{üøñ{ª¯9RãU*•ðÚÁÁážIDDW[§Áßo]jLô;À¦)¿?ýôÞ}÷]Ì™3G˜¦¶¶™™™€={ö@­V–ODDö­­Óà¥Ô%)DoΞ=uuuxê©§àää¥R‰åË—›\–ººº"??+W®„J¥Â¶mÛ„qü1æÍ›‡ÔÔTx{{cðàÁ&Ñ’’’ÄÇÇcïÞ½_Qû›={6 ÆŽ+ÜÉ‹‰‰1IƒïÚµ+vìØa³õ‰Õ%)î;^§ÓA­VãÇlÑüDDDmÉ&‰ðšý«""¢ŽÀ&‰ð¼ú#""{Ãg‘,±‘,±‘,±‘,±‘,±‘,±‘,ÙU"ü Ñh0räHŒ=QQQ’žÝÒÔᦤ$‹µ£ÿþÇyyy ÙYZ­›7oƸqã„ñ¶Ø"ê8t:<<<0sæL“ájµÚâ¹¢±’’áÑž˜ߊª««‘€ôôtŒ1@C.”B¡h³6M8¾_Ý»w¿çéç/¼ðB«¬‹ˆ:WWW¡¼¼îîî8vì\]]qýúuÑy{ôèÑ&ÏF¶–ÐÎDøVN„¯ªªÂí۷ѳgOa˜§§§I´¶®¦Ä¦½víâããFƒiÓ¦À= ÇR–uüøqøûû#<<›7oërÖþwÔÒ¾-//GDD„°mÑÑѸråŠÉ|ÉÉɇŸŸrss‘””„ððp 6 yyy-ês"²,&&_|ñ 55Ó§OÆIùÌ6}m|ßø*2%%Æ ƒV«EXX.]ºÀòùN*&·r"¼»»;æÌ™DEEaÉ’%Ø¿? ƒäu5&6mBBüüüpôèQäååaíÚµÌ'‹-ëå—_Fbb"²³³-æ"UVVšÜ½qã†Åi[Ú·]»vEjjª°m3gÎÄ¢E‹Læ>|8²³³‘””„ØØX¨ÕjdggcÙ²eHJJjQŸ‘e±±±Ø±cnß¾£G",,L'ö™•¢¼¼«V­BNNrss‘Þ½{°|¾“‚‰ðm”Ÿ””„Ù³gãðáÃ(,,Ä+¯¼‚ &`ÅŠ’Öe$6­^¯Ç±cǰ{÷na˜§§g‹–U^^Ž¢¢"¡&Nœˆ>úÈâ66½ªÓéZ´^Àrß:;;ãûï¿GJJ ôz=êëëMžûªR©„ö>\ˆ91¾7>ûµ9}NDÖy{{ÃÇÇË—/ÇøñãMBcÅ>³R¸¹¹aøðáˆGXX‚‚‚(z¾³uB;áin"üC=„ &`„ ?~<¦OŸŽ+VHZWsÚ@Ò÷‹ÍY¯-ÝOßÞ¹sÏ?ÿ<öíÛ‡!C†àâÅ‹&_¢«T*aÛÐ¥K³Ëi¯m'ꬦOŸŽ©S§âĉ&ÃÅ>³FJ¥Òä{µ;wî¯ ²²²pêÔ)œ8qË—/GïÞ½±jÕ*a¼9RÚ™ÖK„¯¨¨@nn®É-ÏS§N¡oß¾Í^—Ø´®®®ð÷÷dž „a¥¥¥pO±زÜÝÝÑ¿¡¾üòËfo{K¶ÁšššÔÔÔ G€O?ý´ÍÛ@D÷Šˆˆ@ii©p^3’ú™õòò‚Á`¾ÛKOOÆUWW£¸¸~~~˜5kQPP`õ|'ámœß”Á`Àºuë0þ|¨T*ÔÕÕ¡_¿~X¿~}‹Ö%6í–-[°`Á¤¦¦B¥R¡oß¾HMM½'á877WtYëÖ­ÃK/½„””6{Û-iiߺººbÑ¢E ÁÃ?lò]C[µˆ¤“ú™urrBrr2¢££áããƒa\UUf̘ÊÊJ(•J8;; ¢`é|'á™ HDDv@R"<µ«ã›û…7Ywß°gÏž¼ú³8"¢¶Åg‘,±‘,±‘,±‘,±‘,±‘,±‘,Y-€ʃ‚‚ŽÓ§O·UÛLÜo;µ¾¶J†·E}½4Æóà¹çžkv•-ÔÕÕ ÉÂDDÔ1­_¿™™™ÈÊÊB^^<ˆ|Pôü-– ß8Ô·±û­OͺªÑhLžúb- <%%o¾ù¦0mii)|}}qëÖ-ÑyÍ¥›Kb'"¢Ž£­“ákZŸ¤hVüꫯLò–¬¥ÇÅÅa×®]¨­­¤¥¥!""ݺu¸75Ø\²0u m ßTÓú$…è³@+++¡ÕjqãÆ Üºu 999ÄÓÀ{õê…Áƒcÿþý7n¶oߎäädIóâ©ÁDDd¿l‘ o©>I%Z÷XëëëñöÛoãÏþ3þüç?KJŸ:u*>ûì3ôéÓååå -I\,5˜ˆˆ:޶N†,×'©$W¥R‰?þñøöÛoqîÜ9IiàãÇÇáÇñá‡".. …@Ë’Ä[+Y˜ˆˆl£­“ášÖ'Éó5g%ÎÎΘ;w.Þzë- iàùùù:t(ÆŒƒ%K–˜Lïââ‚ÈÈH|þùç˜2eŠÉ8±y›jœ,ÌÁu<³gÏFDDÆŽ Fƒ°°0”••µÉù»i}’â¾ቈˆì‰¤Dx¦”Qgeµ²ÀQgÅŸY‘,±‘,±‘,±‘,±‘,±‘,±‘,I*€æ~››ÞKDDO[%À'''cþüùÂû}ûöÁÃÃçÏŸ†ÅÆÆbëÖ­’—)Z-%ü‘¼µe¼V«E^^žð>??#GކÕÕÕ¡  FrûE  ¥„ߦ µZ¨¨(\¿~]—’’‚aÆA«Õ",, —.]`=žˆˆ:¶¶L€ ÄÕ«W…Ú’ŸŸE‹ °°°...xì±Ç$/Ój´–ðÛÔ‹/¾ˆùóçãÈ‘#ÀÒ¥KåååXµjrrr››‹ììlôîÝ€x*<uLmߥKøùù!//•••¸uëž|òIœ>}——׬«?@B ®eee(**Âøñã111ˆ‰‰¸¹¹aøðáˆGXX‚‚‚()žˆˆ:[$Àk4äååÁÕÕjµðõõÅùóç‘——‡ÈÈÈfµÉjln¯9 …YYY8uêNœ8åË—£wïÞx÷ÝwESቈ¨cjx­V‹ ÀÍÍ ÁÁÁ€àà`äää   +V¬hÖ6ˆ~h)á·1 0™™™.G%L_\\ ???Ìš5 ‰‰‰(((hQ*<um€«W¯âoû›p»sÔ¨Qؼy3ºuëföÇ3ÖˆÞ={6 ÆŽ Ô×× ·7Û´iæÎ‹wÞyÞÞÞØ¼y3 ªª 3fÌ@ee%”J%œ…ŸÇ~üñǘ7oRSSáííÁƒ›D""ê¸,Õ‡Æ ð]»vÅŽ;l²>•J…‘#G¢¸¸>>>€áÇC§Óá™gžiöò˜ODD²ÂDx""’5&‘,ñY DD$K,€DD$K,€DD$K,€DD$K,€DD$K,€DD$K,€DD$K¢BÓëpòÔIÔ×ÕÃÙÙŽŽŽ ‡B¡h‹ö‘8á<Š.A¡PÀ`0 oŸ¾ø›¸xé"†üvˆÅùnß¾¯2¿Âä˜É’×e‹ÚdµÖÕÕ!/?Oy öz …UUUP©T¨¬¬”¼""êÜΟ?éþ…ñOG÷îÝQWW‡óÎC©TâÜùsá7wîܹg>ƒÁ ¼vssÃÍ›7…÷·oßFfV&b&š>ÚVµI´ÖÕÕáA¯qûömáÉÞµµµ€ššÌ9ˆêšj(•JtéÒþèÞ½;þy柨®®Æ¿žžñU¢£¢áèèˆêêjüãØ?pS†zºu놠À ¸¸¸Hn<u gϟŸ±ãЭ[7TVVÂ`0 ÷£½‘¹7555Øó·=¨««ChH(¾Êü ¾ý|ñ믿¢ÿþx¤ç#V—Ý´0ŠÕ&©¬@ggg 4Û?ß/O/xxxÀÇÇ=î ppt@È!ðòò‚B¡À?ü€“§N"ä‰ôë×ûþ¾£Ô£P]]+?^Á#<///èõzäÎÇ Aƒ0 ÿ888àâÅ‹8vüBža0.‘©®®Fuu5zè!ܺuËäª.4${÷íEìäXÔÕÕ¡²²wïÞEïÞ½¡ÕháèèØìÇnŠÕ&©D¿6t† †’_Kpýúuýî(úöé‹áÆÃAé€k¥×p(÷ªkªPs·...¨¯¯‡››Š)†§‡'þï‡ÿC`@ îÞ½‹ššüríÔÔÔàûᅦÁ`€( ¸¸¸àÖ­[ÍÚ""j_ … …Âl Á`€Á`@EEnß¾ ¥R‰Ç<†ªª*TUU¡¦¦Ædú̽ Ù²õõõ¨©©ÁÎ/v Ë×ún­6I%Zò~=î‰>½ûà›ìo0J= •••ÈÍËÅÓ㞆ÊË˱'c¾ý|qþÂy<þ»ÇQSSƒ>½û ªª CC±{öÙgƒÈЉˆ¨CS©TpvvFiY)”¢Ó;88@¡PÜSøŒ"ÇEâ@ee%ÒÒÓ„«G£ŠŠ áµ¹ÚTUU%©ÝVÿ âîÝ»¸v퀆J|÷î]ÿRŒîݺÃÉÉ õõõ¨¯¯‡‡§ªªªPxºP(nÐûÑÞÐét8wþúûö‡B¡@mm-œáéቓ'O¢¢¢(--^‘}ùíàß"7/Wø «®®—Š.ÁÁѵµµ&·EÜó¾©ŠŠ ávªñêÑøO¬6I%zxþÂy|wì;(•J <Ðý<¡}õõõprrÂï÷{|‘öº¨º ½Fx´×£¸xé"â&Ç™T{M°ÇŽÙ³gÐ¥K¸»¹#(0H´Sˆˆ¨ã4p‘õ÷,¡hõëÛ®¸¢Oï>Øþùv(J„†„Úd}Öj“T¢‰ð …]»v…ƒƒƒPœêëëQUU%¬¨K—.pvv†Á`ÀÝ»w¡R©L~±ÓµkW8;;C¯×›4N©T¢k×®ÂÔÕÕáöíÛ-é ""ꌷCîÞ½‹;wî k×®ptt„Á`À­[·ðÀ˜Ô ¥RyÏ0kÃ¥Ô&K$%Âÿõ³¿Z]È´)ÓwîÜ1ùûަëqûöm³…­¾¾žOHDÔ‰ÚTÓд Õ××ß3ÌÚpc!½V  ±Àu6|(É É É É É É É’hŒÂÂB¼òÊ+˜0aV¬Xggg|ÿý÷HII’ŒÑö½zõÂàÁƒ±ÿ~Œ7Û·oGrr2€†œ§C‡¡¤¤Ë–-Ñ{·©©©ˆ<ýôÓX¸p!Š‹‹ñðÃÃÍÍ Ã‡G||<„ÀÀ@É@DÔx{{ÃÇÇË—/Çøñã¡Tþç&µó­T–Εz½ÇŽÃîÝ»…i===…×Z­@C²ƒñjÎÈXØšÃÉÉI¸€1GÊú¬Õ&©$%Â?ôÐC˜0a&L˜€ñãÇcúôéX±bîܹƒçŸûöíÃ!CpñâE“/b§NŠÏ>û }úôAyy9‚ƒƒ4ÜóU*•8pà€Il†%555HKKƒ³³3¶oß. Û¾};,X…B¬¬,œ:u 'NœÀòåËÑ»wolذArGuÓ§OÇÔ©SqâÄ “ábç[#¥Riò½ZãtKçÊU«V ãÍi|õÖøjÎÈÓÓžžž¸pá(º...&޹ë3²T›¤²ú`EErssMBjO:…¾}ûh(B555Â%¹ñÒÙhüøñ8|ø0>üðCÄÅÅ ëîîŽÇkÖ¬¦ÕëõÛ‘™™‰àìÙ³(,,Daa!¾üòK¡VWW£¸¸~~~˜5kQPP ¹ˆˆ:Šˆˆ”–– çY#±ó­‘—— ƒðÝ^zzº0ÎÒ¹ÒÕÕþþþ& ͹ sçÎÅ믿.œË«««±uëV¸¸¸ ªªÊê]šK¬6Ieõ Ð`0`ݺu˜?>T*êêêЯ_?¬_¿@ï–-Z„<üðà 3™ßÅÅ‘‘‘ضmNž ”ˆˆd‰ˆˆd‰ˆˆd‰ˆˆd‰ˆˆd‰ˆˆd‰ˆˆdÉ®á›Ã\21QGÆdøæ%Ãët:xyyA«Õ"((cÆŒÁÙ³g%ÏoW‰ðRYJ&&"êè˜ ß¼õuïÞ¹¹¹(((@ll,,X y;ì"ÞÚẕ”L ……… Z­FTT®_¿à?ÿóX¸p!‚ƒƒ1zôh¡=»wï6ywuu5 „ŸþÙZ÷µ“á[&44?üðƒäé­ÀÆ©»QQQX²d öïß/DPŠ=м¼<Ìœ9‹-ÄÅÅa×®]¨­­³‰ðqqqÈËËCAA&Nœˆyóæ™m‡µõ4e-™^|ñEÌŸ?GŽA@@–.]*ŒÓëõ E~~>žzê)$&&žyæœ;w?þø#€†‚èïïGyÄZ÷µHll,vìØÛ·oãèÑ£&ÉÍ9ZbL†ÏÉÉAnn.²³³Ñ»wo Éð~~~Âò×®]+y¹bÉðnnnÈÍÍòýŒÉðÙÙÙHHHhÖ6˜³gÏIy„Fv‘o‹$d á¹¢EEE?~<€†ÿeÅÄÄü§3 ˆŽŽÆ¤I“„á3fÌÀÖ­[‘””„>úK–,iöú‰ˆ¤`2¼ôõUVVB«Õ¢¦¦>ú(>øàÉë·‹Dx©IÈ@󓉥zî¹çðÄO`ܸq¸yó¦IÆ‘­1^Z2¼ñ;À–°‹Dx©IÈF–’‰=<<0`Àdffh¸$5j”0_mm­0nÏž=P«ÕÂ8///„††"!!³fͲº~"¢ûÅdøÖg‰ðR“,%À¦M›0wî\¼óÎ;ðööÆæÍ›MÖ“ŸŸ•+WB¥RaÛ¶m&ËÇž={0eʦÍQ»`2¼í0þßt:ÔjµðCs>øàüüóÏøÓŸþÔ†-#""[²›DøŽ"88 …»víj撚 °þ[Ïž=­^ýåçç·akˆˆ¨µ±ððð°:¾%rADD XàˆˆäˆiDD$K,€DD$K,€DD$K,€DD$K,€DD$K,€DD$KV `ã¸yã?c”P[hàXRRb1‚ˆˆÿ»îÆDÿð~¢&l©G|À4‰òððô÷Ý-¾jŒ³OJJBhh(†Šœœaüµk×ÀÀ@h4L›6MWXXˆ¨ÕjDEEáúõë¸ãÇÃßßááá&I ÆõIY÷ñãÇ€ððp$%% W‘DD$R®E  1m×Ü-P½^   }°páBcôèÑ(..æ-,,DHHÔj5¢¢¢pýúu“ù/^Œððp|òÉ'˜8q"nÞ¼)\‰‘r%Øâ8¤Ç{ o½õ/¾økÖ¬æÓëõ E~~>žzê)$&& ã^|ñEÌŸ?GŽA@@–.]j2_@@²³³‘€ôôt¸¹¹ ‰ôDDDRˆÁûº‹œœL›6 {÷î…««ëìèˆÈÈH@tt4&Mš áqeEEEB!‰‰ALLŒ0Ÿ““¢££ÅšEDDd•ØmÐûúhMM Ο?777”””ÜÏ¢...P*ùãT""j¹VýÞzë- 6 »wïÆ«¯¾ N'Œ«­­Eff&`Ïž=P«Õ.I  ŒKOOǨQ£,®ÃÅÅUUU¨««»Ÿ¦‘LH F½jüÐÈÝÝøú믑——‡@¥Ráõ×_ÇÌ™3‘‘‘puuE~~>V®\ •J…mÛ¶ ËØ´iæÎ‹wÞyÞÞÞØ¼y³Åõ{xx ::èÚµ+¿$""‹š“ ¤HKK3Lš4 ååå6k€N§ƒZ­Æ?þh³eÙBqq1Ξ=ký ÐÚ/h˜½GDDöÌjli‘ëÙ³'¯þˆˆ¨CãÏ-‰ˆH–X‰ˆH–X‰ˆH–X‰ˆH–X‰ˆH–X‰ˆH–X‰ˆH–$'Âa̘18{ö¬ÙiKJJ0nÜ8Ñ2ረsÛ¸q#Ôj54 Ôj5Þÿ}Iç~c&¬TÍ©Qæˆ^ã ‹ Ü3M]]zôè½{÷Š®Ð˜ðNDDÏúõë‘™™‰¬¬,äååáàÁƒxðÁEÏýÖt:ú÷ïovœ”eI³n†††â‡~0›ÜÞ¸r_'%%!44C‡ENN0ረ[»v-Þ{ï=¸¹¹T*f̘qϹß\¹_Æ%U³ àž={0pà@÷&·7¥×넃"11Ë–-&¼uR¥¥¥(++àAƒîgîÜ/VGš«q’BrRMM }ôQ|ðÁÄ“ÛU*"""þþþ¸zõªäFQç'VGŒw ïÞ½+\=‹¨¥%…h4Þ_mL§Ó‰&·«T*ᵃƒêëë%7Šˆˆì§§'<==qáÂIWbbuÄX{t:´Z­Ù»†æj”TmþgLx'"ê¼æÎ‹×_z½P]]­[·vÈs¿è ­1ረóš={6 ÆŽ+Üý‹‰‰¹çÜ¿cÇŽönjë$ÂuTL„'""Yk•Dx""¢ŽŽÏ%""Yb$""Yb$""Yb$""Yb$""Y²ú+ЧN´U;ˆˆˆlÎo˜ŸÅqV `xh¸ÍCDDÔV¬=äÅjäÓaˆˆ¨³âw€DD$K,€DD$K,€DD$K,€DD$K,€DD$K,€DD$K,€DD$KV  N§CŸ>}Zmå:ýû÷·8þÀÐh49r$F¨¨(Ô××·J[JJJ0nܸVY6u%%Æ ƒV«EXX.]ºdqxÓ«]KÛgœ.)) ¡¡¡:t(rrrZÚDDÔNZ\_|ñEÌŸ?GŽA@@–.] èÚµ+RSSqôèQäååaæÌ™X´h‘0ßË/¿ŒÄÄDdggÃÙÙÙâòÝÝÝ1gÎøûû#** K–,Áþýûa0„i^xáÄÅÅ!//˜8q"æÍ› ¡¯Zµ 999ÈÍÍEvv6z÷îmq¸Ôí½^   N???üòË/€Ÿ~ú áááÂÕ%ulÅÅÅ8{ö¬í¿¼sçžþyìÛ·C† ÁÅ‹ïëÇ%=ô&L˜€ &`üøñ˜>}:V¬Xºº:(•J8pÀ앤B¡@VVN:…'N`ùòåèÝ»76lØ`vxã+<1*•JxíààÐj?Ì!"¢ÖÓ¢[ 0`233ééé5j ¦¦555èÑ£àÓO?æswwGÿþý…ù¾üòK‹ë¨¨¨@nn®É-ÏS§N¡o߾²üq¬Y³F¯×ë…×ÕÕÕ(..†ŸŸfÍš…ÄÄDX.uûˆˆ¨s½¬¨¨Àoû[Ὧ¯/¾úê+lÚ´ sçÎÅ;ï¼oooá-®®®X´hBBBððÃ#,,ÌdyëÖ­ÃK/½„””á–¤9ƒëÖ­Ãüùó¡R©PWW‡~ýúaýúõÂ4ü1æÍ›‡ÔÔTx{{cðàÁBA¬ªªÂŒ3PYY ¥R ggg¬^½Úâð¦,mŸ5%%%ˆÇÞ½{-¾&"¢ŽÁêw€DDDñ;@> †ˆˆd‰ˆˆd‰ˆˆd‰ˆˆd‰ˆˆdÉäÏ ü&h¯vµ‰¯ÿ§áOûL  “cë$-u4¦ÐˆˆäW€DD$K¢0h˜7^™>*gèoÕ êN^^võžÑÙÚ²n*¬ZèÿZšgóeQÇФšþ(ÔÉI‰¯ŽÄ«+ pörãÒܺ;ÃÑQƒ¡í®Ûº•·îbÎÛ‡ïé""ê<¬^>ÐÕ.*G”é«…q·ïÜ…ã¿¿+| ›Þïº;£¶®7õ5Hù¸ºë·ñÿ¢ƒ[wg|ø×3×îÎØö~b_=€ª;µp{Àóâ‡>t‡ƒR_~­BÊ–BüZvçžFе€èòþ_Ôcˆ y·«jQWg@òÆ“¸ª«4;¼êN-þòn(ž~1 ðX7¼öÂãprT¢ôf5–¯?‰²›ÕèáÙy7ûöGŒò \»;á½ qâ̯6Ù9DDÔzL  s“X]]‹]ûþ©ï‡âÂÿÝÄå«7qòì üãôu @]]=–­;Žr} @3¯>÷{üqõwø¶àg¬YŒ-_œC]½šGpôûk¨«­ƒ³£‰süþ÷ð]áuÀ˜à^xmÖãX²ú÷4R¬¬.¯{7'D `uu5  [±bÂÃÃ1tèPäääà µZ¨¨(\¿~Àþg›œœŒððpøùù!77IIIǰa×—',çÆ˜9s&4 ‚‚‚0yòd!¾¢i›´Z­ðoĈðððÔ–ÆþøÇ?B£Ñ`ôèÑÂzÊËËÀÀ@h4DGGãÊ•+Vû¥)kËHIIÁ›o¾)L[ZZ ___ܺuKRû/^Œððp|òÉ'V§7×Ö”” 6 Z­aaa¸téàøñãð÷÷Gxx86oÞlq»ÓëõB›¥ô›¹u7Ý'×®]C||¼°ŒiÓ¦™Ýã| .Dpp°Éþkn?YÛbÛÔ˜-ú¶%Ç£¥õ‘e¢0''Jeäz½~~~ÈÎÎFbb"–-[&Lûâ‹/bþüù8räLnSéõz >ÙÙÙHJJBll,Ôj5²³³±lÙ2$%% Ӿ𠈋‹C^^ 0qâDÌ›7Ïl›rss‘››‹o¾ù={öÖi­-éõz¨Õjäååá©§žBbb" k×®HMMÅÑ£G‘——‡™3gbÑ¢EûÅkˈ‹‹Ã®]»P[[ HKKCDDºuë&©/„„Ñé·µ¼¼«V­BNNrss‘Þ½{^~ùe$&&";;ÎÎη«²²Z­jµ¯¼ò žyæá ËÚ6[[wc ðóó–±víZ‹ý®×ëŠüü|“ý×Ü~²¶?ÄŽ#[ômKŽG©ýJD¦¬> 233Mn7©T*DDDüýýqõêU@YYŠŠŠ0~üx@LL bbbL拌Œ > …cÇŽÞÿøã€ŠŠ :t%%%Bq­¯¯·Ú¦úúz¼ôÒK|8âãㆠ  ¢¼¼EEEB_Lœ8}ô‘Ùí2Þ5öý»ï¾‹E‹áƒ>°ºÍ–Öݘ^¯Ç±cǰ{÷na˜§§§Å~·´ÿšÛOÖö‡Ø±`d‹¾mÉñ(¥_‰è^V `}}=:„•+W ÃT*•ðÚÁÁážâd‰J¥‚B¡æëÒ¥‹ÙåÔÕÕA©TâÀfÿ§l®M‹/“a÷ëÎ;xþùç±oß> 2/^~¨a® Í]L:Ÿ}öúôéƒòòrKj›‹‹‹Õ+ÏÆš¶U¡P ++ §N‰'°|ùrôîÝï¾û®¤å5¥T*1yòdDEEáƒ>°ºÍ–ÖmîêÜx¬XÛ1Íé'ÀòþÛÛl˾m¬%ýºaÆû^/Qgfõìpüøq 2ĤXYâáá 33žžŽQ£F5»AîîîxüñDZfÍa˜^¯·Ø¦?ýéO8wî6nÜ(œìšÓ–ÚÚZaº={ö@­VjjjPSSƒ=z>ýôS‹m°ÄÚ2`üøñ8|ø0>üðCÄÅÅ 'ýæö¥µé›¶µººÅÅÅðóóìY³˜˜ˆ‚‚¸»»£ÿþÂ2¾üòK«ÛÖØ0`ÀÑm¶´îÆ\]]áïïorò.--5»-€åý×Ü~,ï±ý(¶}ÍéÛ–Rú•ˆîeõ ð믿nÇH±iÓ&Ì;ï¼ó¼½½%ÿ¢©?þóæÍCjj*¼½½1xð`¡ 6mSrr2|}}1zôhaXnn®ä¶¸ºº"??+W®„J¥Â¶mÛ„á‹-BHH~øa„…… ó˜ë—ŠŠ üö·¿Þûúú⫯¾²¸  á %22Û¶mÃÉ“'MÆ5·/-Mß´­UUU˜1c*++¡T*áììŒÕ«WÖ­[‡—^z )))Vo¡¿€»wïâ‘Göµ~³¶îƶlÙ‚  55*• }ûöEjjªÙ~·´ÿšÛO€åýam›JJJ½{÷Ú¤o[r¡¡¡B>¥1)£%˜OÔv˜ßm°%&ÂKÓš‰ð›7oÆÁƒñÝwßáµ×^Ã+¯¼Òjë""Ûa"<˜ÏDøûK„wqq^ß¼y½zõ2ÛWL‹'êX˜ÏDx&‹ì±c¡¤¤Z­ÄÊ•+±qãÆ{¶‰iñDá™ÏDx‘ý!v,ôèѹ¹¹¨¯¯ÇŠ+°dÉlݺÕd»˜OÔñ0Þ&ÂKÃDxÓ¾˜2eŠP`›nÓâ‰:&Â3ž‰ðÿÖ’Døëׯ›difddà÷¿ÿý=ëfZ>{öìÁ”)S,n·km±vL }?{öl¤¤¤ @¸ÓÂTy¢ÖÃDx;mƒTöÔV1­™ÿÁàçŸÆŸþô§Í¿m©­­…R©„R©Ä† ðí·ßbçÎ-ZYÇDx;oƒTöÔV1­µ-ÁÁÁP(صkW«,_ ½^ØØX”——ÃÙÙ[¶li·¶É…Õ+@""¢ÎÆxÈg‘,±‘,±‘,±‘,±‘,±‘,±‘,1ž‰ðfÙC"¼¹~oÜn1-IKONNÆüùó…÷ûö탇‡Ο?/ ‹ÅÖ­[%µÁ\[Ì“ºM­ióÔ™0¾Ú`KL„o[Z­Ö$¼9??#GކÕÕÕ¡  Fò2¥îC"²-&ƒ‰ðöš/…رd‰¥þ ÄÕ«W…÷ùùùX´h‘püÂÅÅ=öX³÷acÍÝMû°éU£”Dw¦Í“Ü0ž‰ðvol‹ñßĉM–%v,Yb©?»té???äå塲²·nÝ“O>‰Ó§Oòòò„«¿æîÃÆ¤î )¤ô;ÓæIŽ˜ÏDx»N„oÜ áÊÇÕ$åX2G¬?5 òòòàêê µZ øúúâüùóÈËËCddd³÷acÍÙRHéw¦Í“1Þ&ÂKÓ‘ám•ÄÞ”V«Å‚ àææ&ì³àà`äää   +V¬]Fsö¡J¥Òä»Ä;w$º3mžäˆ‰ðL„·ëDxkÄŽ%KÄú? W¯^Åßþö7ávç¨Q£°yóftëÖ ýû÷¿¯ÏCKö…—— ƒðýYzzº0NJ¿3mžäˆ‰ðL„·ëDx1bIì–Xë•J…‘#G¢¸¸>>>nãët:<óÌ3’–!Fê¾0rrrBrr2¢££áããƒaœ¥~gÚ<Éáí´ RÙS[Åt¦m!¢öcÌd .ÉŠ±Šþ ”ˆ:ã­ç¦ÿ–ˆ¤a$²#,tD¶Ã‡a‘,±‘,±‘,±‘,±‘,±‘,1ž‰ðf1Þ<{L„gŠ;‘yL„o‡6ØáÛá‰:&ƒ‰ðL„¿—½$Â3Ũå˜ÏDx&›a‰ðLq'º?L„g"<á›°—Dx¦¸Ý&Â[ÀDxi˜ß~‰ðLq'º?L„g"<á›°—Dx¦¸Ý&Â3ž‰ðftÔDx¦¸Ùáí´ RÙS[Åt¦m!¢öÃDx""’%cä£ÐˆˆH–X‰ˆH–X‰ˆH–X‰ˆH–X‰ˆH–X‰ˆH–X‰ˆH–X‰ˆH–˜ÏDx³ì5^ª¶JFg;QÇÅDøvhƒ-1žˆ¨e˜&ÂÛ{"¼¥ãÑÖiðM1Ⱦ1ž‰ðvoíx´u|cLc'²L„g"¼]'Â[ÊMðIDAT:[+ ÞˆiìDö‰ð0^šöN„·t<¶V|ãö1Ⱦ1ž‰ð2¾µÒàŶ…iìDöƒ‰ðL„ï´‰ð¶Nƒg;QçÂDx;mƒTöÔV1i[ˆ¨ý0žˆˆd‰‰ðDD$k,€DD$K,€DD$K,€DD$K,€DD$K,€DD$K,€DD$K,€DD$KL„g"¼YL„7oÚ´i9r$‚‚‚y_Y|L‹'j_L„o‡6ØáÛV||<Ž=Š‚‚<ûì³xùå—Û¥Dtÿ˜&Â3Þ”µ¾;v,£F‚N§3» ¦Åu|L„g"<á›zìlذ&L¸g8Óâ‰ìá™ÏDøF¤;›6m™3g‘‘qÏ8¦ÅÙ&Â[ÀDxiä˜ÿ׿þ©©©ÈÈÈ0ÎË´x"ûÀDx&Â3¾±¾ßµkÖ¬Yƒôôtáû榘Od˜ÏDx&Â7a­ï_zé%øøø·$ÝÝÝ‘‘‘Á´x";ÄDx;mƒTöÔV1i[ˆ¨ý0žˆˆd‰‰ðDD$k,€DD$K,€DD$K,€DD$K,€DD$K,€DD$K,€DD$K,€DD$KL„g"¼YöoMã6K]~GÝLŽ'jL„o‡6Øám¿|"’&ƒ‰ðöœomZ£æ,¿ñzfÍš…7Þxÿú׿lzü6Æäx¢öÃDx&ÂÛu"¼µi-›çæÍ›xöÙg1|øp¼ûî»P*•6=~˜OÔ¾˜ÏDx»M„›Ö±yjjj0vìX¼öÚk˜8q¢0ܖǯ“ã‰Úá-`"¼4íoiZ1–æqrrBPP233ñ‡?üŽŽ [¿MÛÀäx¢öÃDx&ÂÛm"¼µi-›G¡P`õêÕðòòÂóÏ?ššÉý4/‰žÉñD틉ðL„·ëDxKÓZ#6B¡ÀªU«ðöÛocêÔ©Xµj•Õå5eíøerùÄàââbøüóÏ…÷#FŒ–fعs§ð~Æ †1cƘm“ñß/¿übÐh4†¥K—жÅÕÕÕ¤]©©©†²²2Ão¼axöÙg eee†k×®.^¼(,ÿÓO?5Œ=Úb¿—ÙøŸµeœ>}Úàíím())1”••V­Ze˜2eŠä¾Ü²e‹Éº,Mß´­?üðƒÁÑÑÑpåÊCYY™¡´´ÔðË/¿Ë0öÅk¯½fðôô4ÛgJ¥Òð»ßýÎ0hÐ ƒ›››aÆŒ†_ýUt›-­»iÿ5ʘ˜(¼¿|ù²ÕãÑÜþkºÌ3gÎÛSVVf8p 0ß›o¾)Œ³Ö?æÖÝt?X;v­}~¬õ[k~~ìy;ŒÿlqL·ä<`m½ü×±ÿ={Ö––f`"<áí6°¼ÿ¬)++ÃåË—…ù¢¢¢°qãFÑ66]wÓý 娵ôù;ÞZóóc¯Ûad‹cº%ç)Ç3ulL„·€‰ðÒt„DxKíjü}Ö;w$m¥6®[·îžu7ÝRÒà-}~ÄŽ•ÖüüØãv4fëcº±–ÏÖ©cc"<áí6°¼ÿ¼¼¼`0„ïdÒÓÓMúË××YYY€ŒŒ Ñ6JÙçÍIƒoJìX‘ª¹ŸŸ–,Ú¶ÚŽÆlqL·ä< åx¦Ž‰ðL„·ëDxKûÏÉÉ ÉÉÉˆŽŽ†BBBLæ[·nfÏž””W4–Ú(õ³`íØµÆZ¿5Ws>?öº%%%ˆÇÞ½{mrL·ä< õx¦Ž‹‰ðvÚ©ì©­bl¹-µµµP*•P*•ذa¾ýö[ìܹ³MÖÝž:ËvÝ&“¬•––"66åååpvvÆ–-[0hРönµcý(Qgäéé‰ýû÷·w3ˆ¨ñY DD$K,€DD$K,€DD$K,€DD$K,€DD$KVzâÔ‰¶j‘Íù ó³8Îj  ·ycˆˆˆÚе¿q·ZùÇñDôÿÛ»{Å¡0ŒãÏ€(âbmeece— °D Ñ+H%6é­l¼ E„ V ¢×K!" ‚ ³ÅÀÀ0ËÊø5³›ÿÒsòvï9!ø_qð$àI À“@€'€O"žD<é¯躮b±˜ Ãxr¹ÜÅE7›²Ù¬$i¿ß«ÕjݧZîäâ…¸Á`PÓéôK‹Æãq ‡CIoØn·ešæuðWo.—K¥R)­V+IR³ÙT¥R‘ôÖ9& IR¡PÐn·{ï ø .v€‡ÃáCpE"Ù¶­d2)˲T­VÕh4Ôét4?Íïõz2 ãË]$tÓh©TÒd2Q¹\Öp8T(º{<ÂM_žN'- …Ãam6›{ÕÀÃÝ€–e)N«ßïË4M¹®ûiŒßï×ñxÔù|¾åUÜÕÕg€ƒÁ@³ÙL£ÑH>ŸOõz]µZM¶m˜F•Ïç•Éd8 ü¿ºÝîk±Xäî?€'¬×k9Žs¹ü“h4zqÌv»½fižâª$Üÿ:þ ð$àI À“^$i>Ÿw<Õ‹$9ŽóÝuðT¿䢕ÁЍk¸IEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/previousbookmark.png0000777000076500007660000000340410463126333027053 0ustar ‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ .*RÌ‘IDAT(ÏÕ—{pUÕÅçÜWb¸y“g°’R@Ð)"4´PÅPZÛÔZ§tFKKњΠkg`€±L‹‚¥Ž‚Õ´†‚ðaH Rò"7HÇÍ9gŸóõè $áå]ÿ=göZû[ßÚøÀùóõ²hQžÄÅ­¿,Xð‘?^-÷cn½¿ŠŠÎʼyÛ ï¾;—ÜÜù„…E™YÀÖ­'åk]ùÇ—‰?r­¬Z]"_Æ{ï—‹?r­¬_äëQPpFüQkåÍgz(mÉ?gËÖ2[º» Ù¹«ZüQëdÓ¦âû+âXq•$&¾)ë7”ŠˆˆãØòÖqGžü@dÎGVìî–Ö¶N±%÷“JñG¯“üígîˆêš7n£üáÕC7Vþ·’ù‚Gæo1dÆ[òò¶6ii¹&"Jþ²á¤ JZ/Ÿ—ÖܱíË äH7^ò>œ 8l= [Îè„»Û´° eš´¶›Ì¥ñÒãaDÆ„ñ‹‡øüh=99³<8Q»«¬^sXJ*®ñÎ_3Ø_ V脹n&·L ŠOJ;Ù|¤àµ +—?†DøøóÊwÇ+eù'ؼá{ÄÇ…SÕlóv©ŽŽàX!r«‡\Ê´pc±q+;ËÚñé6Ö¤ó~n ÿüWém[áhh¸,Oþ°€¥K'3}ÊÚ‚6k‹]4w .ÛB”‰X!ReXX¦…i˜»L:»LVüû‰à‘1Q¼ñú–fá\e½ŒI}°_+\>ÿ–×µ*þ¾.]sØW ÿi¤pE¬ÇÂ0íVȆrŠ‘1 €£è6lJô0yÂ@ŽŸ»Ê}õœ.ý`E¿Møéî yö×9÷cJ‰Ae º&†Â§ «É9Ä+ Ë4éè0™4Ôͪ§ã1•ƒK×0,ÁëÑ1”Fúüí¼öÒxþtbŸUp/ÎþŒyO¥é÷RUÛ†#=ö9ÂÀ¸0<^P–2,4®[`bY‚#‚Ûã¡©9ˆã„¾GíãYcÈ~íXÿ=0vB<;Ö‘¿·æ£×Z»ÉûÇÌ|,e…V®‰B]Oƒ¥áÒ5ꚺønÖ½:šK D·Kcì„\®èG@îÛ™Zå…€ˆÜܸs¡”"Ø–B:!!Ê4±MÁ¶¼a:ùgâðÜ4ÇèYÛôÛJAjò¯ø46ã=Aq¥z*€ ÅѰP– Çv·W'.&ŒÃ’úíúÚÆZÙØÁ±¶c<ÿLHÀ­ :!¶ecª'Š&Êr÷ô‹€®aÛýGÿlíYYU±Š ×aê:¯ ]ÐzÚ¢Çq0 ‹ÎN¥…*ÐÑi zpA~o—¥°a‹O=OlB å†È>¸4P¶®12VÇ£¹P¦CG˜‡AQ.ì põ^ùSU§äÇ^§ÆS̤äHtw,…{jùvGÏ=ý\ßp¹4LËaáôXžŠšãôDÎAÙº~};»Æ€ å•“¯…§R’h7lòvWókSY2g1Ç×z Dh¾jд Zh8R&šà è´´¨ëVôàÂÅ òæ‰M”tïaìÈp¦J¡ªù*ÛvÔ‘Üò¯ü$›ÔÔTíF n…o=˯V~†×ãBú8Ë-åÝ…Ksôœ£ùöÒ}ËpÇ]á‰qÃHŽ÷SñEy…Ñ6ž—3wƒü–÷Û=Ä~¾å+vx+ Ñ1(çQ_øuŠ»ö“:ꦥŒ >ÜËñÆ:òwU)…?e-#--M»£[qoe Ë ¼ê*ƒ"â˜5uU!ej3'åûc¾ÉO8ÅEØ4†ìÌß|…¼O úÃä!ãø¨4‘Òš‹ÌI†ŸGgÐ1˜ÒÅé†z>ÝUÅ€Àƒ,ËZ¤I“´»zô†Ñ#“µ9Ãgq¶²™êÖƒÄé Õl¡´±†¢¢z¢F=ÿù^ÉïIÀ̱Ñ9˜“Uµ4u_¢Ùh¢üRûw5⮌ç÷™‹x|ZºvO/£¾:2Y›>ì;TU©n«ç\S€£{›ñÕ&ñâ~Izzz¿M~O¦Žžˆ·%‰3]œØÛåq,™û3fgdÜVÂîYÀÄ´‡=3†Ná‹}ðOä·ó³˜={ömÇ[ã> ¶¶VJJÊHHˆfÚ´iw4ç[™<à™IEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/fileopen.png0000777000076500007660000000413510463126333025254 0ustar ‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ , T ¾ÏêIDAT(Ï¥—[l\ÅÇç~v×{9ëõúÛu IIA.¢4Ôj¥T-H¡¢PDUU¢R(í[QA*}á©Hª>ÐV⡈–¶¨…V¥…‡D\š*\$n¹ljY¯cÇ»ñf÷ÜçLÎY;¤†‘>Ù93ßÿÿýç›9ßÂçh''åÏ=!÷üxܽ·|êOÉþ»·>zKÞúà­òñg— Ÿ,ÈKùP.x±¹(Ÿ?ðœ£æØ”KÝ(áá§^ãÞ‰|û®ïàQæÔ™€?~† ´‰â!9çÁ»$ÙX?jM‚’¤ªyXvPÞ©Ñ=¦â6¯¤d>Hä_ÍáU…Ŧԯ¹²È{Ë]RÀø<ðHn‹¤ODA3ªhB'D’l*#@fà¡3['Õ/¿±ƒó×#«C¨…žskð;ô]Ûþñb?J™o(pø¼h¥ÔÐMK-á¸C(â  ;ÆíÙ¸Áº?B7t‘S_§tÍŒbË©ròàA–Ž@¿ú ‡Vûç¼”m˜|z úIÄÐ ÓÌ÷cb ‘8ˆ¤D":Øj Ä=˜@êtº©?#¯’ø‚µSH©¨ºï½Èp­Š^-Û„¾Oë˜VªB”%“¢¤@'ÚpjÖƒT USËL]ÓP‡ pH俉 EjŠi¡6±ïa„]ÜVcõ[oÜ…^«Õ”÷ýM®´C¶Œ™D"Z*ðn^[„3>X:ä Èéi_URed¦Tÿ†íŸˆ8KÆP@¢ƒj—‰Ý¤ˆè­Ì3bebb"ýl))4V=&ÇÍtaÿþÛÕ#+`DU(VAW7É&ýFRF š‹gYmvîbοÂôÔ£££¨Û¶äX<í¢(é—߇7?S »‚Ì|‘n§ïEàÅ™E›ÏPB«О›cjÒÁëz$Ò‚¥ÌÌÌP¯×SWÍ ±¸ÜEÓàX‡œš+úC”úÑ%€³ß~œ’t#8~øCîÿÆÓÓU"iõº”EƒÉÉIFFFR_ÚZ¡±¼N,àðˆ(½PŸ6§§Á¿Ø½ÀBàÈ;óÜ~E”+ 4³ºïä[LŽ9ÔëuÇɶ`²Hk½Ck«›²÷#¿Ðd qFd@ö¬…;¬×^;ÁÜ™ë®r@)νÊÖ­[¥P(¤*¥žçÑX8¸Dô!B2JU1$Y‚úçÁ©Ü>{oœˆ0•06 Ö–)ø3==M½^gjjJÓªÕªòÝŸ½$û¹àYrõyl­ÚÎÕÒvú/öR·¯ŽJW¥8´ç¥Ò¼X&Ù(ZQDaa!Á`·ÛÍÐÐÓÓÓX­°m¬_ÿ?åõèØ0j@!|A-î¢MÓRýB-†ßäsIw‰Š†ŠYe;Ç’$‘••Eff&ƒ¿ß×ë%‘H™™‰J##c®77¿ Ân×ðyÇìùqÿãþ1ò ydlÖà]íåÀ_ÐÜÚ,žÛøœ”6oƒ¸$™LÞ½÷¡VßäYëŸxbár›Š†™èG9)ã0;@Ìãù@R"ÈÎΞIÈÿIâ§bè&t¸j\Ô¬­Á˜o¼?@2=ID!'žs…^ 5Á fáÞ®VÏ\‡ƒaB-~h‡-OoÁ¹Ã‰©ÀÄrÛrl6›t_€Àº0w†FùÑðl€¢"~¿–`0^åY!#=ƒX<ÆØQć åËÊi|½‘åæåØmvV­\%-X†º\=áD?ž°—<.*‘*µZYPq{@p-(éfúXSº‰½;÷RQ\AA~æB3F£QúÞ>£è1ûÍüÍ(Ÿ_±àZHâz(³ýn<§<è¾Ò±«êç¼´þ%òró°š­˜Ífé÷½VlJ2)ùÑéÈ dÎ<ËÈH‚¤•áF0ÿL¥óù¸—îæøDP]Vë.L&l™ÚÌûZ½0€JOvv""¶òˆ‚v$ƒ¸ QsœÉX‚3¡º#1Z¯\$y4A¹±œ†W(]UŠÍbÃñ¸CZòv¬WéÉMÏKݤ%©ñJ` 0ÂÉÞSxO`J˜pmvñlÙ³ä`Ì7.è íþ™~~â<7>º†®M‡óÇNœ?u’—›‡Éhš)«ÅÊcšq΢›ñ~Þ;så¸LuY5ÎW8ìÌ…f²uÙßçEªßù> óëË¿"üNrc9ÎN*Š+°š­”—,Yé‚ùêTü;üoýSØDCõnjÖÖ`*4-)΋8þ”?Ÿ8 œÏ8ÙR¹k¡›Å†F£ùAî^P.\½ ¨BP…¨ÜU)ŽŸ<.Ú.· ÷ û¡þβ¦ùr³pº)²͸û¡Y|Wþ §üÅ«ýi)³IEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/filenew.png0000777000076500007660000000340010463126333025076 0ustar ‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYsÄÄ•+tIMEÕ +6ï˜YIDAT(ÏÕ–]l×Çwf¿f³ ³¶wרƒ)6ÈæÃØ…Ò#‚J!j«¶i« EíC¢ªJˆÚ<$êCÓªDI£4JP’¤êPT7„€AÔ´$61Ć]/ë5Þõ.3so–/³K„>ôH£éÜ;ÿß=÷œs/ÜÄ>Û½Eñ?4íšoq½s°óUQ×Ǚן(!î(ÀC³‹Ž•ÄUÛˆ£F‹|ÍF¿®ËÏl}K¾˜}•‹vŒÉ++ì±PK|8Nû÷ÛÕyë<»Wq×-";8‰-+%‘Lð«/°réJf50½zº¸m€ÌþçoêÀë3Hïû© ~íW"7šà_É8)‘âíû+1¿ñäÆ9sø þtŠüÅ<Çû3”¢ëŸ],™³„ïîT 3˜^ss+޼¯Ìþ§ñ¯¹€ìß:¹pä*Ÿx”~ñ²3¦±ì»ë ‰ùÆ;<²#E°zMõM¼¹÷MR¤š@^”ø•Ÿ–úî^r7‹›‹ÄÄM‰„êÝÿMb;Á5 Àêù÷‚¯bÞ»y (8õÆÛ<üZ?Ÿ…ü([á¶ÝØØC »t¤”(©P–ÂÀ`~í|V/[MÛü6"•‘"‘Š*ÙßÍxrˆþq/é]ÏÓÞQ¿ã¾žæiƒ‚ìŽN~ù—X‚¬Ï…éäˆ y¡£iÚ„K)QJ¡,IØàÞ%í|sõÃÄ"U \ùý¿' Pî" ð£EáÜB@3h=A¯ªfõÚ®“çÍÛøtÁɾ³ô)wqr¹4|>¨®ÖihÈaeöcÙ?('UoË"p¹JìPóÕw ïÂE,]K/»m›Í²|9_…‡óeV*¥’×Fã ¬ûò˦¤`((à€Fƒë‚P[Ëû’E€úº:ùçM›6Œµùù¨ÆI‚W¯Þ@S—“#ï c™·7Ñ'O¢rv6ùò @UF)QQr^NŽ,IÒ€ÄÛ«@’$9]­æqf&_ïÚ…{PÈò;íAUwKK¹vé×´Z|W®dyd$£F¨¯«“ILäãGˆþáT£Fu4™,öïÜ!W£á²VKP|< /ý¸\P çîØÁç„ÅÄ€•Ug ®­¥¾ÉDõ•+;}eh(QÛ¶ {{ûÞÔ©©òÃŒ 6nØ€_p°yP£±Ç ½™þÉöíÝKÃôél?|Ø"„Ðét¬õ÷—"#™hlkÛÀdê~ÝÓ³®÷ Ô‡qÃÛ›”´4¡P(z^‹8®ÑP\Vf^_CKKgæw´öâ<Þi--mû{k—,áëW9´gÜkü]X(ŸÙ²…I“ˆLH€[· ±Ñì¥P˜sBótt¨ë— f3Í€­­ I4êtl©¬$øèQæ ‹«@«ÕÊ7oƵ¡˜Ý»©×ÃÝ»ðúµÙŒÆÎ~O÷º^·÷‹8`2±77W8:9YÞŒF#Ç”ïge³i~þþPVfþ½]_½ºó%̰÷î½f_EDG³6:ZXèÐ.È¿'%±8011P^nÒ>àìlJ[[q6 _<üüø4, •ÉyyPW×  º©‰í’Ä·çÎ1vìXÑëV¼ 4TÄž:ÅŸOŸ²/6½—L›66o|\–.%hÿ~žÏKzE‘ááœ=~ý¢E°b…9¡ÛåîàÀ¤¦&Š‹Šú~»Mœ(¾KK£) €Øˆª››aþ|ptàGG> 룢Ğôt6fgS`0˜}% Ö¬é1äHJÏžåU—ì×zÀÞÞ^Ä%&Š™ÉÉlݾüÓ§!4ÞJ&;;;áéå%RŽ3““IJI¡¸¼Ö­;;üœœªª¨«­•û\t(táBáææ&‰‹ã~|§¶6êÛëÊ!ðòñ\:||˜ PðH«:€àˆþ*,„yóp0il?è† à“3Ä#kknÔÖâêì @[[ÛÐL áFa!øùñŸ$ =ÀôY³¨¸}œù·¦fh§ cîéõ4µ'à8O™BYI öcÆ |'Œž>y"ÿSTĸñãññõÿ–-Ó°ÖB ×IEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/snapshotReplace.png0000777000076500007660000004227410463127015026612 0ustar ‰PNG  IHDR`æ÷zY IDATX…ìÝ{\Tuþ?ð×ÌÀŒ(Œ„‰•šh¿%K”•›2‚ЦIÀšeŠ}ݶúZ~as³ÄKÖºY¸^Ö\o ÝU´‹ŠÛ‚qK,5µ"*/5¤ ƒ303¿?ŒÃ\¸Ìàøz><š9çs>Ÿ÷ç||÷9ŸsFd4ÑÚ†ƒß´ÝHDDDDv{rÊQëm¢– ؆ƒß}ünïÒFÇû÷6yŸÿýUáõߞėñíñœ/ öËCÀ•­œ‚ÛFY¬‹ˆ®3RÆàƒ5ǜ݀ÚÍ;š¾ v»Ëæ¼£½ºî8{­®³w´_Weù&‰˜€m8øñþˆøï™x4©qõü—(¿ø#ê®^…^¯‡Ñ`€X"ш% ˆE"ŒFˆE"@$†T&Cï>žè?púÜr'ê$^Ú$}€¼v¢xÿ›¸<|‚‚‚0p F#P^^'N é„Ýû0"g}wò¾ 8¿ÛÝàááKí$8ÄßV|ÞnÞñÝÉ#øSé1 4X¨kð!øÓŸã«uí>ò ñ†ƒßÝ€k3_Í*T*Üy'êëëqîÜyÈdRˆD"FˆD" FˆÅb“ÿ6'j Z\½z#îº ?|ÿ=nÒhÔ§àæÁ‘0øöŒ‰‰Ä$ÑÓëõÂÏ€pîë;•—!‰®ÇÏ<Fƒ'N‚‚‚ —ËMÊ´L¼šeî‰Ã¬é»ÚÔפkD¯>r<ýÏk3d_|² »7¼€Ç_~ÇîØšt0Mÿæ‘kûáô ¿åßZÍ;08w¬ØlÞñÃé#ˆñó¹V×·ÖëºyÀMøèë¶uI$€èt¿ÿŸgcc#üø¡¾¾?ÿü3z÷î ƒÁwwwF455A,Ã`0ÜÜ~¿ŠÙÔÔ­V £Ñˆ›ûߌҳgMê€2ítÜêí //9´Z-¤R)Äb±|sZ­ …7êêêp¶tz›zˆ¨gj=ëÕœˆ5swo›|5àÿ'\øÖ4±º6‹nþ ÆÞþ§ð¾ê— Èú×\­­†›»Z¸½úôź§ïÅÝc§âÜ™cÊzcö_7þvOеº´õW°sÕc¨¯­X"Ay?Üÿ—— è àŠúW|´u.],…D⯛ü0ç¹·Û¦ï-C»ìQ×)“OoÀËËë÷¼C$†Hl.ïP ®®gû~n6ïýú xS˜ÖÕn£@]]BO·­«—Ço Xcãïÿ7è.•¡_¿~ðññAŸ>½Ñ«W/!»k¾c²åkBBf0 ÕjQWW½^www“º ¾¯7úôé ///ôê%…T Èd€XˆD€Á ‚®Q­V­¶ UUU¨÷ôjSõlæ.?zxx ©©ÞlùÍ›¯ý÷ûÓ¦Ÿõ¦ß–14ÿ øê³lô¿m¸ð~׺TÜ›¼7ºß?Œ¶¬ÀýO¼Œ«µj 9Sæ.A^ÖëÈÎüîyp‘P—Q$ÁÌgÖ¢¼\;vër<˜ºðîkÏ`øh%¾ ¸Z«¶Øæ#K¶tÉy#¢®U/×À·^r/ôêÕ R©2™LHœ t:´Z-´Z-ªªªðkß³yÇMMôésëo9Œmuù4o[—€µ˜ŽïëÕèÛ×^^^ðòò²«£555‹Åøå—KðèݧÍTÿ-·Ý ±XŒ¾}¥ðìs-ùrw¿6ÐØhµÀ•:7H$ÜzÛ­¼d@tjNÄšI$_¶[¾õg½±±õulúëý¸Z«†®¡É+ßE£®º†«ø©ì4²6< ¿-‡£±±7)†Þ5ºFüaÌ=xgÍ×/£QhãâÙÓ(üàßÐÖ×F#´õW„z/–žÄƒ©›„²î²>–Ûäß(¢Éí6Äb-úöí OOOÈd2¸»» 7 466B«ÕâÊ•+H$p»Mfö3=pðÀßrÛë8ø¨ÚÔåÖöd½æ*>ùï'  OOO»;êéé N‡ììƒ;>Ÿ]2v»ÀaäÔ' — ðò¾–|¹¹b1~ Ðë™îÚµZ-î nºÝ±Ñõ§õT}£N^½ûbÎÒ·a4Põ/}¸“æ<® b±¼ð&D"±pL]Måïu‰DhlÔF#uza»¾I‡¬ÅìÅÛqÓ-þ¨¾tﬞ®I¸yH§k‚H,6‰§½6¹L‚¨gú³8õËÑ«W/x{{ÃÝÝnnnÿöÙ6 ÐëõÐétÐëõÐj›ð¸x‰ÙÏôÙisqSÞ»&u‰[%1F“º´8;- Ò6u¹µ½9>z .ž9Š—^z ÷ßñã•vu´¨è3deíÁw¡ÊЯʹÛmÝѨÕFÜr«2ÙµY°–tºk‰Ù…ó€¶¡·Ü=*^‚$º>ˆÍoNJ:‰7Þe~g ­ÿf46ý¶pþ·í¡÷&cçòY¸t± ý †ïmÿ§ >Àˆði€Ñˆ_Ε ¯Ïè›tøîħ:2ßÄ@ÿ@“ºµ 045BÚ[ŽÆÆF|yx7Œ¿µ/»ÃoèÝøü?o!(f ¡®½úxA$q7Ûæ€ÛGtê´Q÷¸íc ûÑjµ·Þz+d2¤­Fîîî8þ<´õî¸åóyÇmƒúOÞ„Z­Æ-·Þz-‘šÖ%jÔAæîŽÚóçqUÛØN]½Ú΀}uÑ€?Þ=?ÿR…?þ¯¿þ:€ß×~0¹ë±yú"1D üünçMƒ!é? 'Ï7@o4}ŒEƒç@<â_„7OIp“ïhÜqàáaz R,ÊË_žÆÃC@+]ÝUQÏç†GÐÔ+³Ív©ToÓñæfÀZoŒzY1eþK˜8' ‡ßýŽòô:ô€qqO¢W/üøu1Š>xnÒ^˜’¼Ê´.‘;ÆLN›/ÎAoy? Œ¿·óð (Øõ¾*؉›;<7cêc³mNœ³Ôþ“EDÝ®Ás ÷}ÿ8õ4|}}1üŽ;àááarÙ°^,¾öû/¿Å³žk¡• 4›w4xÄÅÂí½Â××ý‡›IbêÅP——ãÄ—_â¬ÿ…¨ºDë|m<ýÍ囌¹½Ýpç 9ùyûoH$bèõ@$‚€ø·»ššôhÔš«:\®¾ŠTjœ»tW 0¶ó5D¼Ãê²<ìþe ðÃPÿ>èßÿZü—/?þ …Jõ3âûgÃ{X$ŽŸ­èÔÉ'"ÇÉß5yÿ?ÿsÿþ÷!‘œÜv Øæ5¯tYÛWk«°gÍ<<²|_—ÕIDׯæ¼c!7ûÝøöï‰D‚ŠË—ñÃ? üçËxÿ°šw4×uÇGÛqËÍýáïï~¾×’˜šŠku],ÿgîMj·®‘#ú·½yí=p¶¾ gË\ns`g£BH@V^–¯àó£?¢öJD"¼½äð½I“~Áš£êòö‰¨{I}öØ\vÃË/ýöªë–456 —‰ˆšóŽ­}?ÁŠKÁçÅ'P[W‘ð–{¡¿Ï-Ø:êMü ñ´šw4×Õëù@4f¬CÑçÇqµ¶"‘}½ûÁ«ÿôZ²r+u‰ÖøÚxäóó]ÝW›Üîç…a·zã6ßÞðò¸¶­²¶ ªj-¾ÿ©?–×8%."êž~¯ÿçŽã­·îFCƒ’“¿ÄkËW812"ºueÞÑ™ºÂC·} …#=ÿ+ΞÿÕzA"º.UŸŸ P >ø©$°zÉ4t匑-º2ïèl]¢˜¹éÆ«®±""""r„Þrßk3`¶¦:;"""¢Bâ¢7Ú{bu&`DDDDÆŒˆˆˆÈÁ˜€90""""cFDDDä`LÀˆˆˆˆŒ ‘ƒ1#"""r07gp£+//wvDDDÔE V«­–cÖ”””8;"""ê6•cÖC$$$8;"""—´gÏL:µÛÛ9pà€Íe™€‘Ë3ÎÁ0"""ryƒÁÙ!˜`FDDD. ‘ƒ1#"""r°ž–€uùƒXU*||| T*…Ÿõë×cÊ”)ªËßß¿S± <Øîãjkk‘žžÞáv‰ˆˆ¨g1V|||Úý±åx{tË ˜§§' L¶=õÔSÝÑT·¨­­Å† ðÌ3Ï8;"""ê¶Ì€]¾|¹SÇÛÃ!_EÔr&ªùõ²eË…ÀÀ@äåå e?Žàà`DGGcË–-íÖ¹cǤ¤¤Ç( ?~’’‚mÛ¶ e_zé%DGG›´¥V«‹ÐÐPDDD ..çÎÄÇÇ£¦¦F˜Á#""¢ë›Á`èö{tKvåÊ“K&û5 ÂÂÂðé§Ÿ"-- +V¬ö=ùä“HKKCnn.¤Ri»mDFF"??ŸŸàà`!¹ÊÏÏGdd¤ÐVPPrssMÚêÝ»7233qôèQ"99©©©€¬¬,xyy¡  ¨¨¨èÐ%T"""êlI  ÐîOW'`¹©R©LöËd2ÄÆÆ‚ƒƒqáÂ×f¥ÊÊÊ„§ÕÆÇÇcëÖ­fÛ:t(êëë¡R©——‡¥K—â•W^Áƒ>ˆºº: 6 *•ªÝ¶¤R)N:…5kÖ@£ÑÀ`0 ººÚl[¾¾¾8xð`'Î9“- ÒO?ý„[o½Õìöëòdk2™Lx-‘H:Ü©ñãÇãСC¸|ù2"""péÒ%dgg ³_–Újhh@RR^}õU|öÙgÈÈÈ@SSS{DDDD=™-‹èF#.^¼hrÜÅ‹m>ÖNIÀÚãíí á»”öîÝk±|dd$ÒÓÓGzz:¢¢¢¬¶¥Óé Óéàëë ÈÈÈöyxx ¾¾z½¾ƒ=!""¢žÄžµ\çÏŸœ?þúZÖ7nÄòåËÕî%ÁfãÇÇÅ‹1~üx³ï-‘ËåHMMEdd$¢££MfÊ âââ"¬aã0""¢ë—½ êüñÇn]„/Š™›nÜýZR÷ô–¬*//GII œ ‘KÚ³gFÝíí|ùå—HHH€Z­¶X.qÑ|>¹¾žö$|&`DDDäòì]$ßݘ€‘Ëã ™¥Õj‘Ëúú믂 &`N€€€g‡ADDä²zânLÀœÌÚDDDäzzÜsÀˆˆˆˆ\0""""cFDDDä`LÀˆˆˆˆŒ ‘ƒ1#"""r0&`DDDDÆŒˆˆˆÈÁ˜€90""""cFDDDä`LÀˆˆˆˆŒ ‘ƒ1#"""r0&`DDDDÆŒˆˆˆÈÁÜœÀ®¼¼ÜÙ!Q €Z­¶ZŽ XPRRâ숈ˆ¨ ØTŽ X‘à숈ˆ\Òž={0uêÔnoçÀ6—eFDDD.Ïh4:;LÀˆˆˆÈå g‡`‚ ¹<&`DDDDÆŒˆˆˆÈÁzZfÓƒXU*||| T*†èèh|õÕWn\¥RaðàÁ®§«UTT`Ê”)€ÚÚZ¤§§ ûzjÌDDDÔ>£ÑhõÇÇǧÝ[Ž·‡Í3`žžž(((ìܹ©©©ÈÎζ¯÷× ___‚ƒƒ…*??‘‘‘&å³²²àåå…‚‚aP£Ñ ((¹¹¹HKKÊ+˜^º$""¢žÃ–jÀ€íþtufó%È+W®@©T¢²²uuuBÒR[[‹üü|TTT‰Hë ÜÜÜ„'ÐÆÅÅ™}ê»T*Å©S§°fÍh4 TWW¸–ð;v ûöíÊ÷ë×Ïæö[:t(êëë¡R©——‡¥K—â•W^Áƒ>ˆºº: 6 *•Êâ¹ÉdˆãÂ… L/]QÏaK‚ôÓO?áÖ[o5»½«/AÚ½Ì`0`ùòåX»v-Ö®] ½^±XŒœœH¥ÒÒÐЀ¤¤$:t#FŒÀÙ³gÛÌ&‰D¢6Çu¤ýñãÇãСC¸|ù2"""’’‚ììì6³_í‘ÉdÂk‰DÒãî¬ """S¶.’¿xñ"n»í6“÷Ýñ}»/AŠÅb,Y²‡Æ·ß~ oooŒ9ëÖ­Êh4“cššš„ïGúàƒÞ¦^NN___@FF†°O.—#88›6m¶UUU€Mí·‰ôôt„……ÂÃÑžžŽ¨¨¨6e=<Ìœ9Sx¯Õjñ‡?ü?ÿü³Åv‰ˆˆ\Ó°xï½÷®^½Š£Gb„ ¾޽{#33GEaa!’““‘šš ÈÊÊ‚—— PPP˜7o‚‚‚„òëׯêÒh4 Bnn.ÒÒÒ°bÅ ³ñDFF"??ŸŸàà`!™ÈÏÏGdd¤Õú,X€E‹áÈ‘# Á /¼`¶­Ç{ ³fÍBaa!Š‹‹… v*.Kmk4„„„ 77óæÍ<ùä“HKKCnn.¤R©Ù¶mé—F£AXX>ýôÓvÏï´iÓðí·ßâüùó®%dÁÁÁ¸å–[,¶KDDäjœž€õïß ÀÊ•+1}útˆÅ¿‡$•JqêÔ)ÄÆÆbìØ±XµjNŸ>m¶FƒcÇŽá‰'ž¶õë×Ox-“É Æ… ÌÖ3tèPÔ××C¥R!//K—.E^^ÊËËQWW‡aÆY¬¯ººeee˜>}:€k3|Ÿ}öY›vjkk‘ŸŸ+V³xëׯow6È–¸¬µíî¸8á½Z­FYY¦N àÚ¬b{¬ÕmËùussÃܹs±cÇÀÖ­[1þüvÛ$""rUvÝÙ]~øa<ôÐC8qâ„Éö††$%%áСC1bΞ=‹)S¦X¬K$™Ý.“Ʉ׉ƒ¡Ý:ÆC‡áòåˈˆˆ@JJ ²³³…Y&{ë3G¯×C,#''ÇêÌ“=qYâááa’àv%[ÏÇ£>ŠñãÇcÊ”)¨©©±9v"""Wâô0ˆEUU† b²]§ÓA§ÓÁ×ב‘!ìóðð@}}½°˜\.—#88›6mÊTUUu(žÈÈH¤§§#,, Àµ;3ÓÓÓeõX…BaÆáÀ®]*;vl›rÞÞÞ9r$Ö­['lÓh4ŠËÖ¶[Æàïï/”ß»wo§ûe¢¢¢0oÞ<Î~Ñ «G$`í‘ËåHMMEdd$¢££MfY âââ",Âß¶mŽ=*lko=•5ãÇÇÅ‹1~üx³ï­Ù¼y3^y儇‡£¸¸+W®4[nûöí(**B`` &NœˆçŸ¾ÓqÙÚv³7bùò刊ŠBuuu—ôËš9sæ ¦¦>ø`‡Ž'""ºÞ‰bæ¦w¿–d±Pyy9JJJ0mÚ4›*•Éd|>µëµ×^ÃÏ?ÿŒW_}ÕÙ¡9\â¢7l_fËSðÉ5) ‹û­Íœµ4nÜ8ˆD"ìÙ³§³a]·lJÀüüü8£u³'Á²¦¨¨¨Ëê"""º^õè5`DDDD®ˆ ‘ƒ1#"""r0&`DDDDÆŒˆˆˆÈÁ˜€90""""cFDDDä`LÀˆˆˆˆ̦'á———Û]±ŸŸŸÝÇÝlþ.È’’›+MHHàWµÃæ °í ¹µZm‡ƒ!"""º8m ˜J¥‚B¡@rr²Éöððpøûû[=¾¶¶ééé6·5xðàÅIDDDÔÕœº_.—£¬¬L¸\yìØ1Èår›Ž­­­Å† º3<"""¢náô» ±k×.@ff&~øaaŸZ­Fll,BCC¸¸8œ;wšš(•J(•JÀ¥K—0gΡüìÙ³MÚz饗ÀÀ@äååµS{õXŠÖ¬YƒQ£FA©Tb„ (--TVV"99 ÃÌ™3;tc¹»Ö€u‡x=ôfÏž£G"55Ë–-ôîÝ™™™ðõõ|ôÑGHMMÅ®]»••¥R‰‚‚¡®yóæaâĉÈÈÈTUU û4 ‚‚‚ðÜsÏ!++ +V¬@NNŽÙ˜Ú«ÇR£Å䊈ˆˆnT=z ‘+bFDDDä`LÀˆˆˆˆŒ ‘ƒ1#"""r0&`DDDDÆŒˆˆˆÈÁ˜€90""""³éIøåååvWìççg÷1DDDD7›¿ ²¤¤ÄæJøeÜDDDDí°9lûBn­VÛá`ˆˆˆˆnN[¦R©àãã¥R‰°°0DGG㫯¾êö6Ü­m\***0eÊg‡ADDtÃrê"|OOO ¸¸>ú(RSSN»ôz½Kµíë닃vy½DDDd›sdDDΟ?/¼¯¬¬Drr2"""†™3gšÜ püøq„„„ ::Ë–-ƒ¿¿?€¶³\*•JØ×’Z­Fll,BCC¸¸8œ;wΤŽÅ‹#::;wî4³¥KKK1bÄ\¼x°zõj$%%™ÔŸ’’‚qãÆáž{îŽk¯mkçcÍš55j”J%&L˜€ÒÒÒv··>G§OŸFdd$ÂÃÃ1cÆ \¾|Ù$–eË–!** ÈË˳6”DDDdEIÀ>þøcÜu×]ÂûÇ{ ³fÍBaa!Š‹‹…  ûŸxâ ,]º¹¹¹èÓ§ÝíõîÝ™™™8zô( ‘œœl2§Ñh‚ÜÜ\Ì›7Ïl–b>|8–.]Šyóæ!77»víºuëLꊊBQQ&Mš„´´4‹m[jK­VcõêÕÈËËCAArss1hРv··¶`Á,Z´GŽAHH^xá“XÂÂÂðé§Ÿ"-- +V¬°û\‘)»áwµ+W®@©T¢²²uuuÂìJmm-òóóQQQ!üƒo0„㪫«ñý÷ßcêÔ©€3fàõ×_·«m©TŠS§NaÍš5Ðh40 ¨®®ö»»»#..®Ýã­Å<ðòòò0{öl@xxx‡ÛÒjµ(//GPPæÏŸ´´4·»½%…BaÆ ±deeaìØ±v """²SgÀZ’J¥xê©§°téRìÚµ Û·oÇÂ… ‘™™‰þýû# À$Ù¸q#üq¬Y³!!!ÂL»»;^|ñEÄÅÅaÀ€ˆŒŒ4Ûž\.Gjj*"##áçç‡ &س¥÷ïßÂÂBäää@&“áÙgŸErr²,Êåráïÿ;d2Þ|óÍ·U__¹sçâÊ•+‹ÅJ¥HOOow{k›7oÆSO=…U«V¡ÿþزe‹Ý炈ˆˆl'Š™›nÜýZ’ÅBååå())Á´iÓlªT&“uû“𛚚 ‹!‹±iÓ&>|ï¿ÿ~·¶ÙUT*ÂÃÃMîú$""¢Câ¢7lŸ³å)øŽ¤ÑhðÀ@­VC*•bÛ¶mÎI P(¬–i¹ Ÿˆˆˆn,6%`~~~=î»ûõë‡O>ùÄÙa˜ÕònJ"""¢ÖzÄ"|"""¢ 0""""cFDDDä`LÀˆˆˆˆŒ ‘ƒ1#"""r0&`DDDDÆŒˆˆˆÈÁ˜€9˜MOÂ///·»b???»!"""ºØü]%%%6WšÐ㾺ˆˆˆˆ¨§°9lûBn­VÛá`ˆˆˆˆnv¯3f ÆŒcu›5/¾ø"-Z$¼?tè Μ9#l{à°cÇ{C¼î©T*øûû;; """ê&^„ßœpÙ›x5S*•(,,Þa̘1Â6½^ââbDDD´9V¯×w¨ÍÎrV»DDDäZìNÀŽ;&¼n™|µÜn‹ÐÐP\¸p—/_p-KMM°Ó§OÃÃÃLJJ¥ÂàÁƒ±xñbDGGcçÎP«ÕˆEhh("""‡sç΀P>%%ãÆÃ=÷ÜÓî¶ÔÓ²ÝæØ"##Ž3f}h.߬åLVó¾eË–!** ÈËËÊ?~ÁÁÁˆŽŽÆ–-[ì:—DDDt}éÐ XëdËÞä zõê…   âÊ•+¨««CLL ¾úê+@aa¡Éì—F£AHHrss1oÞ<ôîÝ™™™8zô( ‘œœŒÔÔT“òQQQ(**¤I“––f6[êiÙ.,X°‹-‘#G‚^xÁ¦>k4„……áÓO?EZZV¬X!ì{òÉ'‘––†ÜÜ\H¥RÛO$]wìZ„ßÌܰŽ$a(,,„\.Gxx8$ †Š3gΠ°°S§Nʺ»»#..Nx/•JqêÔ)¬Y³ƒÕÕÕÂ~777áø¸¸¸vo °VOëv«««QVV†éÓ§‘˜˜hSe2bccÁÁÁ¸pá€k³peeeB¼ñññغu«MuÑõ§C‹ð›µw9ÒVÍëÀŠŠŠ0nÜ8À¸qã——×fý—‡‡ÄâßÃmhh@RR^}õU|öÙgÈÈÈ@SS“Ý1X«§u»–ˆÅb“ub &ûe2™ðZ"‘À`0Ø/]ÿ:¼¿9ùêÈÌW³\¸p~ø¡l;[¶lAŸ>},Þ ¨Óé Óéàëë ÈÈÈ0ÙßÔÔ„>øà„‡‡w¨žÖ † &Ô••…±cÇ|||`4QZZ*ì³…··7üýý…:÷îÝkÓqDDDt}êÐ"|skÀ:’ˆÉd2aælÀ€€Ñ£GC¥R™½û±%¹\ŽÔÔTDFF"::Údv©yQQ"""åË—w¨s6oÞŒW^yááá(..ÆÊ•+\»\ùâ‹/"..111¸zõªÕºšmܸË—/GTT”É%P"""r=¢˜¹éÆÝ¯%Y,T^^Ž’’L›6ͦJe2™SŸ„¯R©ŽóçÏ;-""""s½aû"|[ž‚o…BaWyÎ ‘«°)óóóëò­îL¨ÈÙ/"""ê±:¼Ÿˆˆˆˆ:† ‘ƒ1#"""r0&`DDDDÆŒˆˆˆÈÁ˜€90""""cFDDDä`LÀˆˆˆˆ̦'á———Û]±ŸŸŸÝÇÝlþ.È’’›+MHHpê—qõd6'`€m_È­Õj; ÑÀikÀ”J%”J%ÂÂÂpÓM7 ï•Je··ýÜsÏa̘1i«%•J…Áƒ;µÎÎÆÐ}è‰***0eÊg‡ADD.Ê®°®TPPàÚ?èJ¥Rxß’^¯‡D"éÒv+++‘‘‘sçÎÁÍ;îwG<ÔyÝ1.¾¾¾8xð`—ÖIDDÔ¬GÝÙ<»²xñbDGGcçÎP«ÕˆEhh("""‡sçΙ”_¶l¢¢¢ˆ¼¼<¡¾5kÖ`Ô¨QP*•˜0aJKKqï½÷¢¡¡&LfÀNŸ>ÈÈH„‡‡cÆŒ¸|ùr»ñ4o{ñÅ   `Ù²eˆŽŽÆ¨Q£PXXh±ŸK–,ADDî¹çáKý€K—.aΜ9ÂþÙ³g·©W«ÕbþüùøÛßþƒÁ`¶ÿ-YkÓÒñ/½ô¢££ÛœóÖ*++‘œœŒˆˆ„……aæÌ™BŸKKK1bÄ\¼x°zõj$%%™œû””Œ7Îä\™kmYê¹í­gú¬ýŽØó;HDD$Š™›nÜýZ’ÅBååå())±y ˜L&³y~ó Ø÷ß•J…#F`Û¶mˆèt:ÔÔÔÀ××ðÑG!##»víÊ¿óÎ;ˆEVV6n܈œœ¨Õj >eeeðòò‚Ñh„N§Cee¥Ð^³ððp,^¼3fÌÀªU«páÂlÞ¼Ùl<ÍÛÞ|óMÜ{ï½øðÃñç?ÿ;vìÀäÉ“ñá‡bݺuøïÿk¶¯#FŒ@ff&¦M›†üã(++ÿÿýo‹ý€{ï½'NÄÓO? ¨ªªB¿~ý R©ŽÓ§Oã‘GÁäÉ“ñÄOXìxx8Ο?o±MKÇ·wÎ͉Çã?މ'Þ}÷]deeáý÷ß¼÷Þ{غu+þö·¿á¯ý+rss!—Ë-ž+sãb­­öúS__oõ<Ùò;bÏï L&³é³ADD®)qÑλÙwwwÄÅÅ ï¥R)N:…5kÖ@£ÑÀ`0 ººZØ/“É Æ… ^^^=z4æÌ™ƒ & ,, ¡¡¡mÚ«®®FYY¦OŸHLLDbbb»ñ4·9uêTÀèÑ£!‰0yòdá}ó?Úæ¸¹¹ ÇÆÅÅ I­¥~j4;v ûöíêéׯŸðZ§ÓaòäÉøë_ÿ*$$¶ôßR›–ŽoV[[‹üü|TTT`ÅŠƒÁ`Ræ@^^fÏžƒB.—[=W@Ûq±ÖV{ý‘J¥VÏ“µß‘ÎþѧÇ%`‹¿2ÚÐЀ¤¤$:t#FŒÀÙ³gMG·œMH$Â?º"‘ÙÙÙ8yò$Nœ8•+WbРAxá…:Os›"‘Hh³W¯^fc°‡µ~6÷Éwww„……áÀ¸ï¾ûàææfSÿ-µiéøöÎykz½b±999J¥fËèt:œ9s^^^¨¨¨°ù|µkmµ×ŸM›6uú÷ÄÞßÁM›6Ù\7¹¦µÌNN'\&ËÈȰé8­V‹òòraþüùHKKCqqq›r …Æ ÃYYY;vl×u •¦¦&¡­>øááá,÷S.—#88Øä*áµH$Bzz:|||””NgSÿ-µiëù³ÄÛÛ#GŽÄºuë„mƤÌÒ¥K1jÔ(ìÛ·Ï<ó T*•ÕsÕ‘¶Úë-ýìèïHWœC""rM=n¬5¹\ŽÔÔTDFFÂÏÏ&L°é¸úúzÌ;W®\X,†T*EzzºÙ²›7oÆSO=…U«V¡ÿþزeKWvÁ„\.GQQþþ÷¿C&“áÍ7ß¶[êç¶mÛðÿ÷ÈÌÌ„L&Ã!C™™)ì‰DX½z5–/_އz6l°ÚKmÚsþ,Ù¾};.\ˆÌÌLôïßB’´ÿ~"''2™ Ï>û,’““ñÑGY‘«aFDDDä`LÀˆˆˆˆŒ ‘ƒ1#"""r0&`DDDDÆŒˆˆˆÈÁ˜€90""""³éIøåååvWìççg÷1DDDD7›¿ ²¤¤ÄæJøeÜDDDDí°9lûBn­VÛá`ˆˆˆˆnN[¦R©àãã¥R‰°°0DGG㫯¾rV8ÝB¥RÁßßPQQ)S¦tK;µµµHOOÞwg[DDDÔyN]„ïé鉂‚ãÑGEjjªÃcÐëõiÇ××ì–jkk±aÛÚ""""çë1wAFDDàüùóÂûÊÊJ$''#""aaa˜9s¦p3Àš5kðÜsÏ e«ªª0tèPÔÕÕY=V¥RaðàÁX¼x1¢££±sçN¡ÎQ£FA©Tb„ (--µZ—9ÇGpp0¢££±eËa{s»–b°ÖÖ¥K—0g΄††"""³gÏÄÇÇ£¦¦J¥J¥Ò¤-8}ú4"##Ž3fàòåË&q,[¶ QQQ D^^ž]ãFDDDöë1 ØÇŒ»îºKxÿØcaÖ¬Y(,,Dqq1âãã±páBÀ¬Y³°gÏ455vïÞØØXôéÓÇê± Ñh‚ÜÜ\Ì›7jµ«W¯F^^ ››‹AƒÙTWkO>ù$ÒÒÒ›› ©TÚn¹Ö1ØÒÖ¼yó„£G¢°°ëׯdeeÁËË (((hÓÖ‚ °hÑ"9r!!!xá…Lâ çŸ~Š´´4¬X±¢Ý˜‰ˆˆ¨kص¿«]¹rJ¥•••¨««f_jkk‘ŸŸŠŠ !!0 Âq·Þz+ðÉ'Ÿ`Ê”)xûí·ñâ‹/Út,¸»»#..Nxïåå…Ñ£GcΜ9˜0aÂÂÂjS]-©Õj”••aêÔ©®ÍLmݺÕlÙÖ1XkK£ÑàØ±cØ·oŸ°­_¿~íÆÒ¬ººeee˜>}: 11‰‰‰Â~™L†ØØX@pp0.\¸`µN"""ê§&`ÍkÀ –/_޵k×bíÚµÐëõ‹ÅÈÉÉiw顇Â;#ÁƒC­Vcܸq`Ó±‹Ÿü‰DÈÎÎÆÉ“'qâÄ ¬\¹ƒ ÂË/¿lµ®Žjƒ-q7ÇÚ•d2™ðZ"‘XL0‰ˆˆ¨kôˆKb±K–,ÁáÇñí·ßÂÛÛ#GŽÄºuë„2Æä˜éÓ§ã³Ï>Æ 0kÖ,!1±åØÖ´Z-ÊËË„ùóç#-- ÅÅÅv×åíí 8p°wï^›Ïµ¶är9‚ƒƒ±iÓ&a[UU€kÉ\}}½ÙÅü …Æ bÊÊÊÂØ±cmŽ‹ˆˆˆº^HÀ@*•â©§žÂÒ¥KÛ·oGQQ1qâD<ÿüó&å=<<0uêT¼ûî»xðÁMöY;¶µúúzÌ;cÇŽEDD/^,<ÖÁÞº6n܈åË—#** ÕÕÕvkmmÛ¶ GEHH”J¥°>L¡P ..NØÞÚæÍ›ñÊ+¯ <<ÅÅÅX¹r¥]qQ×ÅÌM7î~-Éb¡òòr”””`Ú´i6U*“Éø$|""""3½aû0[ž‚ï …Âj{gžˆˆˆˆɦÌÏϯÇÌh1¹"""¢ë]YFDDDt£`FDDDä`LÀˆˆˆˆŒ ‘ƒ1#"""r°6wA–””8#""""—uçwš¼o“€ñkjˆˆˆˆºVëÇyµIÀzÊ󾈈ˆˆ\×€90""""cFDDDä`LÀˆˆˆˆŒ ‘ƒµ¹ ÒšòòrTWWwG,Ô …~~~΃ˆˆˆl`WÖœ|9r¤»â¡NHNNvvDDDd›°–ÉWrr2rrrº3.²CLL ''GxÝYßž£«Æ´%ŽoÏÁñum_×Ö™ñµ9k|%$$t¸QêZ{öìALL „×ÁñíYºbL[âøö,_ׯñum_»×€5¾V«íPƒÔõbbb““Óæ{¦:‚ãÛó´ßήóãøö<_ׯñum_»°fƒ¡£‡R7éÊ›#8¾=Ouuu—ÝhÁñíy8¾®ãëÚ:2¾NÀŒFcG¥ëÇ×µq|]Ç×µq|]gÀÈ,ޝkãøº6ޝkãøº&`dÇ×µq|]Ç×µq|]02‹ãëÚ8¾®ãëÚ8¾®Á%0•J…ÀÀ@“»yäìÝ»û÷ï·»®ÈÈH”––vu˜]F,îúo”rÔø¶«ÆÆFxxx`íÚµ¸ûî»;]ï¸qãðã?vQ¤ÎÓSÇ×ÇN­VãÎ;ïÄ£>Š—_~ÙlL]_OßÎô/77Ë–-C}}=¼½½Ñ§OdeeÙÔÇ®:¯µµµØ¶mž~úiÀ¯¿þŠG}Ôî¿ý]¥§oWؼy3222 ‘H ×ëqÿý÷#%%Åáqô„¿ó_—\„o4áéé‰O?ýÔd{rr²Ýq7—ïÉýíŽêoë±ÊÌÌijÏ>Ûé?–7ê¸Ùª+΋+ŽÝîÝ»1aÂìݻ˖-ƒT*mÓõð»Õ™Ø:Ú?N‡äädìÞ½AAA€ªª*›ëêªóªÑh°qãF,\¸àããƒ?þ¸G—½œÙ—M›6áСCØ¿?¼¼¼ ÓéðöÛo;%¦ëá³h‰K΀5ÇÖ2F•J…ñãÇ£¬¬Lx=gÎäç磺ºk×®…R©œ8qO<ñúöí‹ñãÇÃh4öèþJ$’.¯ÓQým=VáááX½zµð¾ªª ûÛßðÝwßA¯×ã¶Ûn믾 ???aP\\ ìØ±~~~&õªÕj<üðÃP«Õpssƒ^{í5 <péÒ%,^¼¥¥¥pssàAƒ‘‘aµ}Gé©ãëŠc÷Ö[oaÕªUøç?ÿ‰à¾ûîkÓWs_:£§oËþYû[ÙÒ•+WpõêUÜ|óÍBÞÞÞ&I«¥1i}^­_{cÿ§?ý 555ˆŒŒpmL›ÿöÀW_}…§Ÿ~:ýû÷Ç믿___»újž6¾µqãFìÚµ }ûö…Á`€››æÌ™ƒªªªv?«ÖÎmG?Ç]ýYìˆÎŒo‡çΚÿõģш+W®`„ ÂOee¥·Ñh„F£AHHþóŸÿàùçŸÇÊ•+…ã.\ˆ%K– ;;îîî=¾¿ÝÁ‘cÕ²½ýû÷ãÎ;ïÞ/X°‰‰‰ÈÍÍE^^î»ï>,Z´Èd•J%>Œ˜˜¬X±¢M½ؾ};òóó‘››‹¤¤$<ûì³B=öF-ìOOO·©ý}|]mì¾þúkÔÔÔ 88úÓŸðöÛo›íkë~»Úø¶î«¥¿•-är9,X€±cÇ">>K—.Å'Ÿ|½^oóïDËØ­_{cÿî»ïB.—#''999mêýË_þ‚… "//cÆŒAZZšÝ}½žÇ·3?•••¨®®ÆðáÃÛì³ôYµvn;ú9îêÏ¢£Ç×egÀ<==ñÉ'ŸÛÊËË…}ƒ2™ ÷Üs F‹/Â`0 ¦¦ßÿ=&MšƒÁ€éÓ§cûöí=º¿ÝÁQý5 ¸rå ¢££QUU…«W¯âСC0 ¨­­Eaa!***°jÕ*hósssÆjÚ´ix衇L>ƒ‰'OžÄ?ÿùOÔÖÖÂ`¸6³b0 Ñhpüøq¼÷Þ{Â1^^^6µ=ëŠø]mìÞzë-$&&Â`0`Ò¤IxöÙg¡R©0`À“˜Z¾î©:[ë¾¶÷·Òœ%K–`þüù8zô(¾þúk,Z´÷Ýw–/_nÓïDókke-}ëñiù_µZï¿ÿ±±±0 ˜1cfϞݡ¾:“³b²ô»oé³jéÜvæs|=|-qÙ¬õeÃ–Û ¤R©°_$µÉhÛûï‘ XŸ>}ðŸÿüƒ/¿ü2Ö¯_üãhjj‚H$Âþýû…™È–ÇY«–ãÝÐЀ `ß¾}@ii)âãã…2Ì^f¶Öþõ¬«0W»ÆÆFìÝ»R©ï½÷ž°íÝwßÅÿþïÿ¶ùûÑÓ—%t6³åoe{|}}1mÚ4L›6 S¦LArr2ÒÒÒlúhn×ZYKcoîwªeÚ+Ó‘¾:€ÀkIDAT‹³bòòò‚B¡À™3gpÇw˜ì³ôYµtn;ó9¾>‹–tødóuýžúc.Æ–ÛZïo~/—Ëqûí·ãСC0øè£z|»ƒ3ÆJ$!55ùùù8sæ är9îºë.üë_ÿÊj4“c›šš„±Ú¿?BBBÚÔ«Óé ÕjqÓM7Áh4âí·ßöyzzâü#¶nÝ*WUU%ü.XkÿF_W»ììløûûã‹/¾À‘#GpäȼõÖ[xÿý÷ÛÄÔúµ+ޝ¥¾¶Wmm-ŠŠŠ„F#N:…AƒÙ<&Íu[+kiì{õê…††455µ©×ËË C‡~ï>üðC„††ÚÝ×ë}|;ó³`Á,]ºT­V‹ŒŒ ‹ŸUKç¶³ŸcgŸÎpÉ5`­ÿ¯ÆÜ¶Öû[¾_³f ^~ùeL™2Eø~Eg÷ÇZ_»š³ÆJ"‘`Á‚xñÅa0°qãF9ráááÂ¥Œ–ÇöíÛGŽÁ¤I“ðÉ'Ÿ`ñâÅmêíÓ§.\ˆØØXÜ{ï½Éd&m®_¿_|ñ¢¢¢0iÒ$¤¦¦ û¬µ£¯«ŒÝ{g3f˜l=z4 >ûì³6}íêsØÓÆ×R_Û«_¯×ãßÿþ·01118|ø0^}õU›Ç¤eÝÖʶ7ör¹÷Þ{¯°½u½k×®ÅÚµkƒÏ?ÿÏ=÷œÝ}½ÞÇ·3?óæÍCLL âââ0iÒ$L:ÕÕÕV?«–Îmg>ÇÎ>!Š™›nÜýZ’Õ‚%%%8rä† ‚„„œ;w®S S×ñööFNNüüüP^^Ž˜˜˜ו““sÝŒï/¿ü‚I“&áôéÓÎ¥[µߖ϶눞2¾7ÊØÙÂÇ—~ÇñumßÄEo¸æ°ÖüýýMÞÿý÷NŠäúáˆñm=.æX«–ÿ÷Cöqö9ëIcgËï!p}ýÝpôyíìg™ìãŒÏ ǸëÝ Xë§Ø_O±;‹#Α-ß.`)ŽþýûãĉÏpö9ëIcgë·\ô„XmåèX;ûY&û8ã\rŒ»žK> Ÿ:ãëÚ8¾®ãëÚ8¾®á†˜#ûq|]Ç×µq|]Ç×50#³8¾®ãëÚ8¾®ãëìNÀbbb°gÏžNÝiG]«ù …B!<ñ¿£8¾=OËñí,ŽoÏÃñum_×Ö™ñµ9kYyLL rrrþ{wtƒ …aÇ`„²†“˜äv¬£O%>bÁËM=g4ùüð¡|ýaüF¿”2­ëzøzöÍ¥í{Ö À훋}Çfß±Ùww€Íó<ÕZ·sH–eÙ)åZ-¾Î|2²ogÞ¼ûæaß±ÙwlGöÝ}ë'õ“¿¥ ¿îƒXýÐôë~$}@0L€`Á@0L€`Á@0L€`Án÷Çóuõ—ø'o'æž³BJ¶CIEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/nextbookmark.png0000777000076500007660000000333710463126333026162 0ustar ‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ -*­ÃflIDAT(ÏÅ–}lUåÇ?Ï9ç9·/Ür/--Pä¥p5ƒ‰vÌ N0¢H†’F#ƒD!Y·¬8MÂâ’1Y€˜:qÓ8ŠåEÞ…F*ã%ÈKRÚRÞÁ–[¨¥÷ÞsÏùí[\k阰ï?Oròäù~Ÿßóû~ÏþÏPw›°îBl<·‘={˜1ën’¯;. -䘹“ÓÍõ¨j…qW˜_Æz÷À2ùÅáŸq¹Ó?ÈLó¡Ïk²ÝlÌ;Í}¸æ°Äµ9·¼ey}“IOMeߎKä5ýˆâ§~y{=°ëÄù°z ÒîåÙa?Õ@ü¦M…ØÌþ(º¼î=’2êùaÿ š¢.k·Õr_ãCÌ|¼˜ÜÜ\u[æm^ +οO¦ég´~Š'ÎüÖ9Õgªå/‡–±/RÆÀ¾ÉŒÈÉ¢¦á*+7ÖÐïÊ`æO|‰P(¤€ÛëÁï‘é Ò/Ô‰mÑõ¼Rúª6`¬Ü½NžÿlUªœ1ƒz1²o'¿jfõæ3ôi̬Ïø†ü±¡5uy‘Ó¥w˜Ì@OË2Ä7 ü{¯o'”“Âðþ}ÈH¶Ùá4ë¶T‘q±?¯LšCnn®êPÎÚ ›w_ÄÖ&ÒNˆ8q.Ùaz _G0 –Û‹Y=0Œ8‡/fSÙ)Ò/öfÖØ"òÊ¿‰¯Í8xô K=”üA´´8x" ‚ˆà‰`™u¯3i~Eù @·” 1¹Î‘ógÙ´¥†Nçz2gR1yyyÿñ²m °”"½³`²‰ŠÇq]Ï<ñð$±ú”ÐůQ¸tïÔÛŽŽ]ádýE¶—] óù>¼ðô´6ÉÛ€®+ØÚàò+|²·­\â1‡¯›c †ð<'æòUäIfŒÓ ì*»„U›ÁÌ Ó(^ÐnŸµ-À`™Šp‹P{Åç\œ¨Ëµ&‡nAÓ4P ܘGÝÕóÐå`y_]wŠÇO¡  à–MÞn@a>Ÿ&5Õ‡IÜ2ðn5åó°´…¡ °±hØ™B@==‘Ñ£GwØÞ@Uõ9ù¶ÙÆNÙ ’`YÚ¶Ñ­¹¥KkŒÖ'°°˜úƒ ôº'H(âÄɳpï£k j‹¤]ãž[##'Š÷þõUàZ8‚e ¦¶°|KZ+` ¦m¡”Â4 œ¨ð»¥a”yÔ)DËT<’ßÍ+«m?쬊õ<6²/óf !q^O˜ž®éI8±D¹µmcµž¥[ŸÀõ„ìÌÊW<ÑjQÁó„`Àǻ俾å¯-Êêµ'¹Ö#§w€~½Òèí§o/?ÚJ –6±|:!¢uÕZc(EÜqèÐü&A¿I÷ ¼½¬’¿Ò±‘ìÅyeR¶§žò5ã±LaSl¬VØÄñ‡sa‡ú«1<ÇÁ‰9Ä¢1|ÄéÖ âNœÆ¦(Ãú'3}dÁ.)L}~–ã°âoãnÙŒÀϧ $ÖÐÌïíE)“ü{ePÖœ¸ªùÚ³ð%éÖÛklŸM‹c—=¾<§1¢ó@€¬ÌTJלb×gg˜ÿR^Ç]УG–ú|g•<1~ ëɈ¡Ùßeîç&-ކ88JÝôSÀPðò؆Ҩ¬iföœ/xcÑPî õì¿™† ©y³`Êô-Ô7´“nòÜý CëDØ6ÚNT²5q4ÏylŸ¨g2}Æv&ëÃ3ãïïpÜ´±°p¥D°Yû÷±€GéX^al nÌÁ‰:Äc1ÂM1ÍQ¼ðpiÁ$Š~µƒ/wŸå‹#a›kÅNGÜ4ýñÕ¡ÔU^æ7swsáÉþBK\aÚ‰JD”͈P3N&-˜JÉ›Gù¸ô8¯ÿ¹€ÿ†¼MìÙ[#YY¯IÉÒƒ""ây®¼¹ß“'Wˆ<¾Ü“ùÛ"nlWVR%þÀY·¾B¾ÓqzÆ ñw^,o¿S! ¸²®Ò•ÒC®D"QÙ¼¥Vü—È[oíýnÉo`ÕªCâO[, ÿ´Oþï/;*þ´ÅRR²ëÎßÀÖ­ÇeÀ€¥2fÌDz~}lÛV'“'ož=K¤´ôÀ%¿'ÎÊ´ik%=}‰øý‹¤°ðCÙ¿¿öîßiüPàŵx“Ú?IEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/img/redo.png0000777000076500007660000000274310463126333024407 0ustar ‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ .@âìápIDAT(Ͻ—kPTeÇçÂÊâ²›,‚èâ6*¸Ëͨ`µ-74Ã$Pc´Û65FVlä…jJ@ñÅFñƒ“3ÑT85ÅZÑÝ­(ó9ÚP‹—V–=}n\/<_ÎÎ{ž=ÿßûÜÎ{„ööv®×¯´+m'Û¨~¥[jº0’ÿŠ×+ÞÜâR\ß¹è(8ý;u{w*£ pÉjï“oÀYÿ…Ž"ÅÓåQF GñãLZÏ‘ŽÐüs–dànu+£Ðí靈ÛCœa:¿W·â]­±,“ºú 0$ˆ|­‚ ‡”÷›iþ¦Dðöxñt{Ôû®•ŸP>£g±÷¯n*Ÿ¯Pô¡ú*Œ´ ¶ÖV)uïÔáÑw¡]¦géy<‘ð¨z_¤ÿ_:Z)|¦KGÕ•Û°L·×ÐÜâR¥ÚÆž$û¹)÷ Šˆ}¢’zíͬ(HH‚H·¿›ì] ©—©,© ßž/Œ ®~§â|ÕÉøõ‘lέ$Xƒ(ô—O¤\Zëý]yt Ÿ•4‘Ÿ•Ouå6᪥O) 7ùúO]Ô·3Qêï 倈‰AªÿW¶°ù™MXÄxÞÛ}H`km•RU_Ŭ­dNÉèéII/1°GñãWz‘CX¾$Ÿíkk†î‚ƦF¥jwI•w03:…NogßåY”՜ˢ¬æýrPoÏE.ø.094†?Ξ¤lÝuVb¢bO§Ë£$ÏOáìÙm™…nŒŽ`9˜ -²(#‹2IÓ'(ÔÃ¥øü>|~Ár0 &eSqtŸ®o¢0£€â‚bL&“0hJ7;ñÄž#=nç/žÇëóÒåíꂤî¸BPaþ5ß2…ùça}=…±{ƒ(/.#g^“&M$I˜‚æ—Òp¸Û*âM!XO|XIa L7LS×ßnÝÍ©³§|mQitû}X—$`¼âeR’S†œ„uõu*ö?aóLsɘp7/-£ìÝð¹Zý Š=Ej*nÕŽ'wrÕßoçà“ȻӎÃéÀl6£Õj…!GqÛÉ6¥ñÓFb7N O‹¹‹¢©+Xóñ<º| FoyÉ Iœ›H{r;5ûkUߤˆDæL˜Í¬·3ñ×þKÉCëÈ[”Gll¬ IÒðï‚ý‡À"¡W×–Å/%DaÚš¼•’û×aϵ†Á`¾øöK¥f-IÃÂØ ‰ÍÄ|b2%/<‹-ÍFdd¤pU/£Æ#0§i…u9]ø‹²_"Û’…c‹ƒøøxA¯×xÐÓ‰OòÖO»Ø±ª†lkŽ ,‹ Óé†tòåáww3}u©gªâ-\KÁÒÌfó aXt ¶ò”¬~{®}XßAš[šÁ(¬Ã 5“Áâ";Ù–¬aÅm©éB¶-[ùsßiJËwvgQQQW}.TÜ­nˆëXe-¤àÀ*}œO;¯¸›úê=™3g­V‹N§Ñ¡T8ö«’DLãMüÖqœ®Wÿ¦äµ70™L\)”’$ôö5J]_»ÐtÌ3Í¥lËËÞ÷0V‹u@ßÞh 8¦Þv;§Îbì—cxàÞ07U\hnq)ˆi¥ìÝØ’Ó‰ŽŽæjªøÆE T sâ=°¿›¼yFFÃúŒõ?ïè‰À:ÊF£F BàÃc‘8-qãÆ1ZP„]ïÿƒm¦+Ï›ðƒ~ö“’rÓ[oÐ‡*øñ(½^ûƒ´ÚqƒŒ¹IEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/sdlBasicIdeIndex.html0000777000076500007660000000223710463126332026215 0ustar sdlBasic IDE Index
sdlBasic IDE

Interface
Menu
Toolbar
Buffers
Sessions
Find and replace
Keyboard shorcuts
Abbreviations
Folding
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/interface.html0000777000076500007660000000447710463126213025025 0ustar Interface
Interface

sdlBasic now have its own dedicated editor provided with the interpreter. Naturally you can continue to use your preferred text editor if you wish. sdlBasic editor (sdlBasic on Linux or sdlBasic.exe on windows) derive from the good and well known SciTE text editor ( http://scintilla.sourceforge.net/ ) and share with him most of the powerful features.
SciTe was chosen because several reasons:
- it's a good text editor with many useful features such as text folding, syntax highlight, etc...
- it run on several platforms as sdlBasic does;
- it's free software and it's sources are available to be modified and freely distributed.

Here below is shown how sdlBasic Editor looks

snapshot

It consists in:
  • Menu where you will find all the commands;
  • Tool bar allowing a fast shortcut to mostly used commands;
  • Editing pane that is where you will write your sdlBasic programs;
  • Output pane that receive and show console output such as error messages.
   usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/folding.html0000777000076500007660000000241110463126213024471 0ustar Folding
Folding

sdlBasic editor supports folding based upon indentation. The fold point markers can be clicked to expand and contract folds. Ctrl+Shift+Click in the fold margin will expand or contract all the top level folds. Ctrl+Click on a fold point to toggle it and perform the same operation on all children. Shift+Click on a fold point to show all children.

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/abbreviations.html0000777000076500007660000000437510463126213025712 0ustar Abbreviations
Abbreviations

To use an abbreviation, type it and use the Expand Abbreviation command or the Ctrl+B key. The abbreviation is replaced by an expansion defined in the Abbreviations file. You can open the Abbreviations file with a command in the Options menu and add abbreviations.

Each line in the files looks like "abbreviation=expansion".
The abbreviations names can have any character (except perhaps control chars, surely for CR and LF), including high Ascii chars (accented chars).
Names have properties files limits: they cannot start with sharp (#) or space or tab (but can have spaces inside); and they cannot have '=' character inside.
Abbreviations names are limited to 32 characters. It is probably enough for abbreviations...

An expansion may contain new line characters indicated by '\n' and a caret position indicated by the '|' character. To include a literal '|' character, use '||'.
When expanding, the names don't need to be separated from the previous text. Ie. if you define 'é' as '&eacute;', you can expand it inside a word.
If a name is the ending of another one, only the shorter will ever be expanded. Ie. if you define 'ring' and 'gathering', the later will see only the 'ring' part expanded.  
usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/sessions.html0000777000076500007660000000242010463126332024717 0ustar Sessions
Sessions

You can save a complete set of your currently opened buffers as a session for fast batch-loading in the future. Sessions are stored as plain text files with the extension ".ses".

Use File | Load Session and File | Save Session to load/save sessions.



Loading previously saved session will close your currently opened buffers. However you will not loose your edits, because you will be asked to save unsaved buffers first.

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/findReplace.html0000777000076500007660000000325610463126213025273 0ustar Find and replace
Find and replace

sdlBasic editor has options to allow searching for words, regular expressions, matching case, in the reverse direction, wrapping around the end of the document. C style backslash escapes which are listed in the command line arguments section, may be used to search and replace control characters.

find

Replacements can be made individually, over the current selection or over the whole file. When regular expressions are used tagged subexpressions can be used in the replacement text. Regular expressions will not match across a line end.


replace

usr/src/sdlBasic/share/doc/sdlBasic/english/sections/sdlBasicIde/menu.html0000777000076500007660000006255610463126332024035 0ustar Menu
Menu

File
New Create a new blank document.
Open Open up the file requester to select what source you want to load from disk.
Open Selected Filename If current selected text (in editing or output pane) is a filename, then, the corresponding file will be opened in a new document buffer.
Revert Revert document in current buffer on the one saved on disk.
Close Close document in current buffer.
Save Save document in current buffer on disk, if document was not yet saved before a file requester will appear to ask you its name and where you want to save it.
Save As Save document in current buffer with a new name or in another location.
Save a Copy Save a copy of document in current buffer with a new name or in another location.
Encoding Change document encoding
Export Save a copy of document in current buffer in a different file format.
Print Print document held in current buffer.
Load Session... Open previously saved work session. See Sessions section more for details.
Save Session... Save current work session. See Sessions section more for details.
Exit Quit sdlBasic Editor.


Edit
Undo Unmake last action.
Redo remake last unmade action.
Cut Cut selected text and store it into clipboard.
Copy Copy selected text into clipboard.
Paste Paste on current document buffer previously Copied/Cut text.
Delete Delete selected text.
Select All Select all text in current document buffer.
Match Brace Move cursor to matching brace. Cursor need to be just inside the opening brace or just outside the closing one.
Select to Brace Select braces and the text contained (if any). If cursor is just inside the opening brace it will be selected only the content, if cursor is just outside the closing one also the braces will be included in selection.
Show calltip Show calltip of keyword under the text cursor (if any).
Complete Symbol Pop up a list of possible completion based on sdlBasic language Api.
Complete Word Pop up a list of possible completion based on what you wrote into document.
Expand Abbreviation Expand abbreviation if you had previously specified any in abbreviation file. See Abbreviations section for more details.
Block Comment or Uncomment Comment or uncomment selected text section.
Make Selection Uppercase Make selected text characters uppercase.
Make Selection Lowercase Make selected text characters lowercase.


Search
Find Open search window dialog. See Find and replace section for more details.
Find Next Search next occurrence of previously searched text.
Find Previous Search previous occurrence of previously searched text.
Find in Files Find a word or a sentence in all files of a given folder.
Replace Open find and replace window dialog. See Find and replace section for more details.
Go To... Open a dialog on which you can specify line number where to go.
Next Bookmark Jump to next bookmark.
Previous Bookmark Jump to previous bookmark.
Toggle Bookmark Set or unset a bookmark on current line.
Clear All Bookmarks Remove all previously deployed marker.


View
Toggle current fold Expand or contract fold where cursor is located. See Folding section for more details.
Toggle all folds Expand or contract all folds.
Full Screen Expand sdlBasic editor window to cover the entire screen.
Tool Bar Hide or show the tool bar.
Tab Bar Hide or show the tab bar.
Status Bar Hide or show the status bar.
Whitespace Hide or show space markers.
End of Line Hide or show end of line markers.
Indentation Guides Hide or show indentation guides.
Line Numbers Hide or show line numbers margin.
Margin Hide or show error and bookmarks margin.
Fold Margin Hide or show fold margin.


Tools
Go Run the program.
Stop Execution Stop program execution.
Switch Pane Toggle editing from editing to out pane and vice versa.


Plugins
Autoindent Indent your program  basing on code syntax.
Unindent Remove all indentation
Make Executable Embed your program into sdlBasic runtime executable and save it into program folder.
Extract Code Extract embedded code from sdlBasic runtime executable.
more to come... You can write your own plug-ins with sdlBasic language.


Options
Vertical Split Toggle output pane orientation.
Wrap Wrap lines exceeding editing pane width.
Wrap Output Wrap lines exceeding output pane width.
Read-Only Inhibit document editing.
Line End Characters Choose one of the three line end characters standard.
Convert Line End Characters Convert line end characters on choice you made on Line End Character menu.
Use Monospaced Font Toggle mono spaced font
Open Local Options File Open local option file in a new buffer.
Open User Options File Open user option file in a new buffer.
Open Global Options File Open global option file in a new buffer.
Open Abbreviations File Open abbreviations file in a new buffer.
Edit Properties Edit languages properties: sdlBasic or others.


Buffers
Previous Switch to previous document buffer. See Buffers section for more details.
Next Switch to next document buffer. See Buffers section for more details.
Close All Close all document buffers.
Save All Save all documents held in buffers to disk


Help
Quick Help Let you browse sdlBasic quick command guide.
sdlBasic Reference Guide Let you browse sdlBasic complete documentation.
About sdlBasic Open sdlBasic Editor credit window.

usr/src/sdlBasic/share/doc/sdlBasic/english/sdlBasic.txt0000755000076500007660000011022310637401731020452 0ustar # sdlBasic is a little basic for make simple games in 2d # # This basic run on : # linux(with a reasonable recent version) # windows (9x and nt-XP based) # macOSX # FreeBSD # OpenBSD # MorphOS # AmigaOS # # This basic is another demostration to the GPL's power # the basic interpreter come from wxbasic by David Cuny ("http://wxbasic.sourceforge.net") distribuited under lGPL # The graphic system is based uppon SDL graphics libraries family("http://www.libsdl.org")distribuited under GPL # The graphics engine was initially based on the aliens demo game ("http://www.libsdl.org/projects/aliens") # written in c and distribuited on GPL, later graphic engine was re-written from scratch. # putpixel and getpixel routines are derivated from SDL tutorial and was improved with Gigi Davassi suggestions # The original line rutine was imported from Alvyn Basic with Author's write permission. # I used also the source of sdldraw library ("http://sdl-draw.sourceforge.net/") ever lGPL # # I cut, pasted and adapted code distribuited under lGPL. # This software is subject to lGPL license and is free as every program used to create it # #_________________________________________________________________________________________________________________# # # sdlBasic comands and syntax list: # # i suggest to read full documentation for more details # # sections: # Run time # Sub and function # Control structures # Operator # Array # Strings # Maths # Files # Dirs # Data function # console output # Date and time # Memory Bank # # Screen # Graphics # File graphics input output # Image manipulation # Blitting # Sprite system # Bob system # Text draw # Print screen # Sounds and music # CD support # Video Mpeg # Keyboard # Mouse # Joystick # SDLtime # Socket # #________________________________________________________________________________________________________________ # # notes: # * it don't works # ** it don't works and need to be tested # ? it don't work well: unresolved bug # -> to be deleted # #________________________________________________________________________________________________________________ # Run Time # command line arguments # --nodefaults : disable the default setting display # --nosound : disable sound # --nosocket : disable socket support # --debug : start sdlBasic in step to step mode # --version : display the version (iso date) # --license : display license type # --copyright : display copyright ( ;-) absolutelly free software ) # --help : display a run option list # const : declaration of numeric constant option explicit : must declare variable option qbasic : qbasic mode you can use a function before create in a code include(filename) : inclusion of extern source file argc : return number of args in caller argv(index) : return arg in caller command [param] : returns requested arg from command line command$ [param] : returns requested arg from command line argument(optional n) : returns the arguments sends to sub/function with n=0 or without parameter will be return the arguments count argument$(optional n) : returns the arguments sends to sub/function with n=0 or without parameter will be return the arguments count ?setenv(varname,value) : set a enviremont variable in currently os. if variable exist it will be overwrite getenv(varname) : return the value of enviremont variable in currently os *run : run command on new thread shell : execute command, wait until finished end : terminate program and exit stop : breakpoint and start debug os : return the operative system in work (linux windows macosx etc...) isfbsd : return 1 if the current os is FreeBSD isosx : return 1 if the current os is MacOSX islinux : return 1 if the current os is linux iswin32 : return 1 if the current os is windows ismos : return 1 if the current os is MorphOS isnetbsd : return 1 if the current os is NetBSD isamigaos : return 1 if the current os is AmigaOS # debug : work with option --debug at start or when you press ctrl+c key in interpretation of basic program # if you press F5 you continue the normal execution # with F6 you advanced in execution of one step # with F4 you can see the vale of the prompted variable. For see the value of an array you must enter the name # of array without the square bracket and at the request you must enter the indexes of record requested. #_________________________________________________________________________________________________________________________ # Sub and Function declare [sub | function][name] : declare a subrutine/function in qbasic mode sub [name](args...) : start a subrutine exit sub : break a subrutine end sub : terminate a subrutine function [name](args...) : start a function exit function : break a function end function : terminate a function return [value | variable] : set the result of a function(can substituite funcname=x) #_________________________________________________________________________________________________________________________ # Control Structures while [condition expression] : start while cycle wend : end while cycle end while : end while cycle exit while : stop while cycle continue : terminate the last while cycle if [condition expression] : classic if control structure then : then must be terminate a command else : classic else:it must be a single command elseif : elseif is support in sdlBasic end if : must terminate a if structure select case [condition expression] : similar to c switch (syntax like pascal) case : control condition case else : default condition end select : end select case structure for[var]=[val1]to[val2][step[vals]] : classic for-next well implemented for each [var] in [array] : for each are well supported warning: report the indexes of array not the value continue : force the exit of for next cycle (work only with for each) exit for : force the exit of for next cycle next : end for loop end for : sdlBasic accept end for do : start a do-loop cycle loop : the bottom of do-loop cycle exit do : the exit of a do-loop cycle *repeat : not implemented yet *until : not implemented yet or : condition in espression logic or and : condition in espression logic and xor : condition in espression logic xor not : condition in espression logic not #_________________________________________________________________________________________________________________________ # Operator [+] : addtional operator [-] : substraction operator [*] : multiply operator [/] : division operator [^] : exponetial operator mod : rest of division operator shl : shift left shr : shift right #_________________________________________________________________________________________________________________________ # Array dim [name][[index of array]] : declare an array note: array use [] for parentesis *redim [name][[index of array]] : redeclare an array shared [variable] : declare variable extern in a subrutine common [variable] : declare variable or array global lbound [array] : returns lower bound of array *quicksort [array] : sort an array ubound [array] : upperbound of array erase [array] : free an array #_________________________________________________________________________________________________________________________ # Strings asc(char) : returns ascii value of first char in string chr(v) : return string corresponding to ascii key value chr$(v) : return string corresponding to ascii key value *format() : returns formatted string with embedded args *format$() : returns formatted string with embedded args insert(source$,target$,position) : insert source string to target at index insert$(source$,target$,position) : insert source string to target at index instr(optional start,source$,target$) : returns position in source that target was found lcase(string$) : convert string to lower case lcase$(string$) : convert string to lower case left(string$,number) : returns leftmost chars in string left$(string$,number) : returns leftmost chars in string len(string$) : return length of string length(string$) : return length of string ltrim(string$) : returns string with left whitespace removed ltrim$(string$) : returns string with left whitespace removed mid(string$,start,optional end) : returns string with chars 1..n from source mid$(string$,start,optional end) : returns string with chars 1..n from source replace(opt index,source$,replace$) : replace string from source with replace starting at index replace$(opt index,source$,replace$) : replace string from source with replace starting at index replacesubstr(source$,rep$) : replace substring in source with withstring return the new string replacesubstr$(source$,rep$) : replace substring in source with withstring return the new string reverse(string$) : reverse a string return the new string reverse$(string$) : reverse a string return the new string right(string$,number) : returns rightmost chars in string right$(string$,number) : returns rightmost chars in string rinstr(optional start,source$,target$) : reverse Instr function, search from end to start rtrim(string$) : right trim string rtrim$(string$) : right trim string space(n) : return string with n spaces in it space$(n) : return string with n spaces in it str(value) : return string representation of numeric expression str$(value) : return string representation of numeric expression strf(value) : converts a floating point or number value to a string strf$(value) : converts a floating point or number value to a string string(n,string$) : returns string m chars wide with n in it string$(n,string$) : returns string m chars wide with n in it tally(src$,sub$) : returns number of occurances of matchstring trim(string$) : trim string trim$(string$) : trim string typeof(variable) : returns string with datatype typeof$(variable) : returns string with datatype ucase(string$) : convert string to upper case ucase$(string$) : convert string to upper case val(string$) : returns closest numeric representation of number #_________________________________________________________________________________________________________________________ # Maths abs(value) : returns absolute value of number acos(value) : returns arccos of number asin(value) : returns arcsin of number atan(value) : returns arctan of number bin(value) : returns binary representation of number bin$(value) : returns binary representation of number cos(value) : returns cos of number exp(value) : returns exponential function fix(value) : truncate fractional number, rounding down towards zero floor(value) : truncate fractional number, rounding down towards zero frac(value) : return fractional portion of number hex(value) : returns hexidecimal representation of number hex$(value) : returns hexidecimal representation of number int(value) : convert to 32 bit integer, truncating decimals log(value) : returns natural log of expression randomize(value) : reseed the random number generator rnd(optional upper) : return an random number round(value) : round to nearest integer sgn(value) : returns sign of numeric expression sin(value) : returns sine of given angle in radians sqr(value) : return square root - make sure it's non-negative tan(value) : return tanget of given angle in radians min(value1,value2) : return min number of the operands max(value1,value2) : return max number of the operands bitwiseand(value1,value2) : return the logic and of the operands andbit(value1,value2) : return the logic and of the operands bitwiseor(value1,value2) : return the logic or of the operands orbit(value1,value2) : return the logic or of the operands bitwisexor(value1,value2) : return the logic xor of the operands xorbit(value1,value2) : return the logic xor of the operands #________________________________________________________________________________________________________________________ # Files open[filename]for{input|output|append}as[stream]: open file stream file input #[stream] : read a line from file stream input #[stream] : read a line from file stream file output #[stream] : print a line in file stream print #[stream] : print a line in file stream close [stream] : close file stream eof(stream) : returns nonzero if Eof fileexists(filename) : returns true if the file exists filecopy(source,dest) : copy a file filemove(source,dest) : move a file filerename(filename,newname) : rename a file freefile() : return the handle of the next free file kill(filename) : delete filename. filename can be then path+filename filedelete(filename) : delete filename. filename can be then path+filename loc(stream) : returns position in file lof(stream) : returns length of file readbyte(stream) : return a byte from the file rename(filename,newname) : rename file seek(stream) : seek file position/return current file position writebyte(stream,byte) : write a byte in the file #_________________________________________________________________________________________________________________________ # Dirs chdir(path) : change directory dir dir$ : returns current path direxists(path) : returns true if directory exists dirfirst(path) : returns first entry in path dir dirnext : returns next entry in path dir mkdir(path) : create a new directory rmdir(path) : remove directory #_________________________________________________________________________________________________________________________ # Data Function data(optional 0-255 param) : store the data read(optional pointer) : without parameter read a data record with point change the next data loaded #_________________________________________________________________________________________________________________________ # Console Output print [text|variable|number] : Print in standard output a espression (i use it for debugging output) #_________________________________________________________________________________________________________________________ # Date and Time date() : returns date in MM-DD-YYYY format date$() : returns date in MM-DD-YYYY format time() : return time in HH:MM:SS format time$() : return time in HH:MM:SS format ticks() : returns current timer value #_________________________________________________________________________________________________________________________ # Memory Bank reservebank(bank,size) : make a raw memory bank. there are 256 bank ( 0 - 255) baseimage(bank,image) : link a memorybank from a imagebank bitmap access baseimageCC(bank,image) : link a memorybank from a imagebank bitmap access with colorkey trasparency basescreen(bank,image) : link a memorybank from a screen bitmap access basesound(bank,sound) : link a memory bank with soundb bank freebase(bank) : unconnect a memory bank with a image or screen freebank(bank) : destroy a memory bank copybank(s,d) : copy the bank s in d loadbank(filename,optional bank) : load a file in memory bank (if omitted the current ) savebank(filename,optional bank) : save memory bank in a file setbank(optional bank) : set the current bank (if omitted return the current) currentbank(optional bank) : set the current bank (if omitted return the current) sizebank(optional bank) : return the bank memory size (if omitted return the value of current bank) banksize(optional bank) : return the bank memory size (if omitted return the value of current bank) poke(optional bank,address,value) : write a byte value in memory bank at specific address doke(optional bank,address,value) : write a 16bit value in memory bank at specific address loke(optional bank,address,value) : write a 32bit value in memory bank at specific address peek(optional bank,address) : read a byte value in memory bank at specific address deek(optional bank,address) : read a 16bit value in memory bank at specific address leek(optional bank,address) : read a 32bit value in memory bank at specific address memcopy(sbank,s,dbank,d,size) : copy a part of bank memory s in d #_________________________________________________________________________________________________________________________ # Screen setdefaults(w,h,bpp,m) : open the display, perform initializations on cursor and fonts and sets default values on sprites, bobs and screens system. setdisplay(w,h,bpp,m) : open the screen/window in double buffer. 0=fullscreen|1=window|2=resizable|3=fullscreen software (provvisory) setcaption(title) : change the display window title setalphachannel(v) : activate deactivate alpha channel trasparency caption() : return the display window title displaymode : return the display mode displaywidth : return the display width displayheight : return the display height displaybpp : return the display color depth screen(n) : set the logic screen n without parameter return the current screen screenz(n,z) : set the zorder position of screen if z =-1 report actual z position lastscreen : return the last screen open directscreen : direct drawing on display like a screen(more fast but sprite and offset does not works) screenopen(n,w,h,dx,dy,dw,dh,flag) : open the logic screen n of dimension w,h in display coordinates dx,dy,dw,dh screenclose(n) : close the logic screen n screenclone(n,s,x,y,w,h,flag) : create a new viewport in logic screen s screencopy(n,x,y,w,h,nd,xd,yd) : copy a portion of screen n in a screen nd screenfade(n,t) : fade the screen n in t time in multitasking without parameter return 0 if terminate screenfadeout(n,t) : fade the screen n in t time in multitasking without parameter return 0 if terminate screenfadein(n,otional i,optional t) : fade the screen n to image i in t time in multitasking without parameter return 0 if terminate screencrossfade(n,i,t) : fade the screen n from current screen to image i in t time in multitasking without parameter return 0 if terminate screenalpha(n,a) : set alpha(trasparency) of screen n screenlock(n) : lock the screen n for direct graphics access screenunlock(n) : unlock the screen n for direct graphics access screenrect(x,y,w,h,flag) : change the display output coordinates of the current screen screenviewport(x,y,w,h,flag) : change the display output coordinates of the current screen xscreenrect : give the x coordinate of current screen viewport screenviewportx : give the x coordinate of current screen viewport yscreenrect : give the y coordinate of current screen viewport screenviewporty : give the y coordinate of current screen viewport wscreenrect : give the w value of current screen viewport screenviewportw : give the w value of current screen viewport hscreenrect : give the h value of current screen viewport screenviewporth : give the h value of current screen viewport flagscreenrect : give the flag value of current screen viewport screenviewportflag : give the flag value of current screen viewport screenwidth : give the current screen width screenheight : give the current screen height offset(x,y) : set the logical current screen position screenoffset(x,y) : set the logical current screen position xoffset : give the x coordinate offset in current screen screenoffsetx : give the x coordinate offset in current screen yoffset : give the y coordinate offset in current screen screenoffsety : give the y coordinate offset in current screen cls : clear the current logic screen screenswap : update display,bobsystem,spritesystem autoback(m) : enable / disable automatic screenswap m=0 disable m>0 wait m milliseconds and perform screenswap m<0 perform the invocate in code screenswap after m milliseconds setautoback(m) : enable / disable automatic screenswap m=0 disable m>0 wait m milliseconds and perform screenswap m<0 perform the invocate in code screenswap after m dualplayfield(optional m) : set/unset automatic update of a screen upper sprite waitvbl : wait automatic screenswap fps(optional n) : set/unset or give the current frame rate counter (0/1/none) #_________________________________________________________________________________________________________________________ # Graphics rgb(r,g,b) : give current color in Uint32 format enablepalette(optional state) : enable disable and check the palettemode in 8 bit display color (c,optional v) : set palette color c with value v se missing give the current color c palette(optional 0-255 param) : set all palettes color(0,0xff,0xff00,....) colorcycling(s,e,d=0|1,optional delay) : move the palette color one color forward or back work only in 8bit display if you set delay automatically colorcycling work on multitasking colorcycling() : stop the multitasking colorcycling ink(c) : select the current color in Uint32 format point(x,y) : give the color of x,y point getpixel(x,y) : give the color of x,y point dot(x,y) : write x,y point with a current color setpixel(x,y) : write x,y point with a current color putpixel(x,y) : write x,y point with a current color plot(x,y,c) : write x,y point with a c color line(x,y,x1,y1) : write a line box(x,y,x1,y1) : write a empty rettangle bar(x,y,x1,y1) : write a fill rettangle circle(x,y,r) : write a circle fillcircle(x,y,r) : write a fill circle ellipse(x,y,rx,ry) : write a ellipse fillellipse(x,y,rx,ry) : write a fill ellipse paint(x,y) : fill a close area triangle(xa,ya,xb,yb,xc,yc) : draw a fill triangle polyline(xa,ya,xb,yb,xc,yc,.....) : draw a perimeter of a polygon polygon(xa,ya,xb,yb,xc,yc,.....) : draw a fill polygon #_________________________________________________________________________________________________________________________ # File Graphics Input Output loadimage(filename,optional n) : load a graphics file in a slot n if omitted n is the first free return n loadzipimage(zipfile,filename,opt n) : load a zipped graphics file in a slot n if omitted n is the first free return n saveimage(filename,n) : save slot n in a graphics file(only bmp) loadsound(filename,opt n) : load a wave file in a sound slot n loadzipsound(zipfile,filename,opt n) : load a zipped wave file in a sound slot n ?savesound(filename,n) : save a wave file from sound slot n (low quality result) loadmusic(filename) : load a music module (mod family,ogg,mp3 and midi) #_________________________________________________________________________________________________________________________ # Image Manipulation hotspot(n,x,y) : select the point of coordinates in a imageslot (n,0,0=up left(default) | n,1,1=center | n,2,2 =down right)n= image setcolorkey(c) : set the colorkey for bitmap transparency if set -1 (default ) will be used the left-up corner color. colorkey(c) : set the colorkey for bitmap transparency if set -1 (default ) will be used the left-up corner color. imageexists(n) : give 1 if the image buffer n exist 0 if empty imagewidth(n) : give the image n width or error if image n if empty imageheight(n) : give the image n height or error if image n if empty deleteimage(n) : erase the image n of the memory copyimage(s,d) : copy image s to image d setalpha(n,a) : set trasparency in image n imagealpha(n,a) : set trasparency in image n zoomimage(n,zoomx,zoomy) : zoom image rotateimage(n,angle) : rotate image rotozoomimage(n,angle,zoom) : rotate and zoom image mirrorimage(n,x,y) : vertical-orizontal mirror #_________________________________________________________________________________________________________________________ # Blitting blt(n,sx,sy,sw,sh,dx,dy) : copy a part of graphics slot in screen pastebob(x,y,n) : copy on screen image n at x,y performing clip pasteicon(x,y,n) : copy on screen image n at x,y without colorkey trasparency grab(n,x,y,w,h) : grab a a selectarea and copy it in slot n #_________________________________________________________________________________________________________________________ # Sprite System # # In this implementation there are 512 sprites software that are indipendent from the screens spriteclip(x,y,w,h) : set the visibilty area of sprites sprite(n,x,y,fr) : set or move the sprite n at x,y with image fr deletesprite(n) : unset sprite n xsprite(n) : give the x of sprite n spritex(n) : give the x of sprite n ysprite(n) : give the y of sprite n spritey(n) : give the y of sprite n spritewidth(n) : give the width of sprite n spriteheight(n) : give the height of sprite n frsprite(n) : give the frame of sprite n spriteimage(n) : give the frame of sprite n livesprite(n) : give 1 if sprite n is "live" spriteexist(n) : give 1 if sprite n is "live" spritehit(n,optional x) : give 1 if sprite n have a collission with sprite x if x=-1 with any spritez(n,z) : set the zorder position of sprite if z omitted or-1 report actual z position lastsprite : return the last sprite active autoupdatesprite(m) : set/ unset automatic sprites update at screenswap updatesprite : manual sprites updates at next screenswap #_________________________________________________________________________________________________________________________ # Bob System # # In this implementation there are 512 bobs software that are dipendent from the screens and performs # background preserve setbob(n,scr) : set bob n at logic screen scr bob(n,x,y,fr) : set or move bob n at x,y with frame fr deletebob(n) : unset bob n xbob(n) : give x of bob n bobx(n) : give x of bob n ybob(n) : give y of bob n boby(n) : give y of bob n bobwidth(n) : give width of bob n bobheight(n) : give height of bob n frbob(n) : give the frame of bob n bobimage(n) : give the frame of bob n livebob(n) : give 1 if bob n is "live" bobexist(n) : give 1 if bob n is "live" bobhit(n,optional x) : give 1 if bob n have a collision with bob x if x=-1 with any bobz(n,z) : set the zorder position of bob if z =-1 report actual z position lastbob : return the last bob active autoupdatebob(m) : set/ unset automatic bobs update at screenswap updatebob : manual bobs updates at next screenswap #_________________________________________________________________________________________________________________________ # Text Draw text(x,y,s,testo,optional type) : print the text testo on current screen with s size The type of render can be default=solid 1=Shaded 2=blended setfont(path) : select the font getfont() : return the current font textrender(testo,s,optional n,optional type) : make an image slot n with the text write with a current font and size s if n is omitted use and return first free The type of render can be default=solid 1=Shaded 2=blended #_________________________________________________________________________________________________________________________ # Print Screen pen(c) : set prints color (without parameter give the current color) paper(c) : set caractere back color (without parameter give the current color) fprints(testo) : print a text monospace without cariage return prints(testo) : print a text monospace locate(x,y) : move the cursor at x y atx : give x of cursor aty : give y of cursor curson : show the text cursor on screen at(atx,aty) cursoff : hide the text cursor inputs(prompt,defs) : give the string insert to keyboard(default is default text) zoneinputs(x,y,l,default) : give the string insert to keyboard in x,y coordinates with l lenght #_________________________________________________________________________________________________________________________ # Sounds and Music isenabledsound() : return 1 if sdlsound was enabled soundenabled() : return 1 if sdlsound was enabled soundexists(n) : give 1 if the sound buffer n exist 0 if empty deletesound(n) : delete from memory sound n copysound(s,d) : copy sound bank s in sound bank d musicexists() : give 1 if the music is load 0 if empty playsound(n,c,optional l) : play the sound n in channel c l loops playfreqsound(n,c,pitch,optional l) : play the sound n in channel with pitch resampling frequency c l loops volumesound(c,optional v) : change the volume of channel c (-1 all) at value v (0-128) without v or -1 give the current volume soundvolume(c,optional v) : change the volume of channel c (-1 all) at value v (0-128) without v or -1 give the current volume stopsound(optional c) : stop the wave play in channel c (-1 or none =all) pausesound(optional c) : paused channel c (-1 or none =all) resumesound(optional c) : unpaused channel c (-1 or none =all) ?vumetersound(optional c) : give the current state of sound channel (-1 or none=all) sound3d(c,angle,dist) : position sound in 3d space positionsound(c,angle,dist) : position sound in 3d space soundchannels(n) : dinamically change the number of channells managed by sdlBasic playmusic(n) : play track xm,mod,ogg,mp3 n=number of ripetition(-1 always) positionmusic(p) : move the execution at p second stopmusic : terminate the music play pausemusic : set pause of the current music resumemusic : unset pause of musica rewindmusic : report at start the music fademusic(t) : music fade volumemusic(optional v) : change the volume of music (0-128) -1 or none give the current volume musicvolume(optional v) : change the volume of music (0-128) -1 or none give the current volume speedmusic(v) : change the speed of music musicspeed(v) : change the speed of music #_________________________________________________________________________________________________________________________ #CD Support numdrivescd() : returns the number of cd-rom drives on the system. countcddrives() : returns the number of cd-rom drives on the system. namecd(drive) : returns a human-readable, system-dependent identifier for the cd-rom. cdname(drive) : returns a human-readable, system-dependent identifier for the cd-rom. opencd(n,drive) : opens a cd-rom drive for access. indrivecd(n) : return 1 if cd is in driver cdinserted(n) : return 1 if cd is in driver trackscd(n) : return the number of tracks in cd countcdtracks(n) : return the number of tracks in cd curtrackcd(n) : return the current track in cd cdcurtrack(n) : return the current track in cd curframecd(n) : return the current frame in cd cdcurframe(n) : return the current frame in cd playcd(n,s,l) : play a cd playtrackscd(n,trk1,fr1,ntrks,nfrs) : play the given cd track(s) from frame fr1 of trrack trk1 for ntrks/nfrs playtrackscd(n,trk1,ntrks) : play the given cd track(s)from trk1 for ntracks playtrackscd(n) : play all cd track(s) playcdtracks(n,trk1,fr1,ntrks,nfrs) : play the given cd track(s) from frame fr1 of trrack trk1 for ntrks/nfrs playcdtracks(n,trk1,ntrks) : play the given cd track(s)from trk1 for ntracks playcdtracks(n) : play all cd track(s) pausecd(n) : pauses a cdrom resumecd(n) : resumes a cdrom stopcd(n) : stops a cdrom ejectcd(n) : ejects a cdrom closecd(n) : closes a cd handle tracktypecd(n,t) : return SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...) cdtracktype(n,t) : return SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...) tracklengthcd(n,t) : return the length of track t cdtracklength(n,t) : return the length of track t trackoffsetcd(n,t) : return the offset to the beginning of this track in frames cdtrackoffset(n,t) : return the offset to the beginning of this track in frames #________________________________________________________________________________________________________________________ # Video Mpeg loadmpeg(fname,usesound) : load a mpeg video plaympeg(optional loop) : play a mpeg1 video stopmpeg() : terminate the video play deletempeg() : unload mpeg video pausempeg() : Pause/Resume playback of an SMPEG object rewindmpeg() : Rewind the play position of an SMPEG object to the beginning of the MPEG seekmpeg(p) : Seek 'bytes' bytes in the MPEG stream skipmpeg(s) : Skip 'seconds' seconds in the MPEG stream statusmpeg() : return 1 if plaympeg work or 0 in other case #_________________________________________________________________________________________________________________________ # Keyboard key(keycode) : give 1 if is press the key keycode inkey : give ascii code of key press waitkey(optional keycode) : wait a key pression (0 =any key) #_________________________________________________________________________________________________________________________ # Mouse xmouse : give mouse x coordinate on display ymouse : give mouse y coordinate on display mousex : give mouse x coordinate on display mousey : give mouse y coordinate on display xmousescreen(n) : give mouse x coordinate on screen ymousescreen(n) : give mouse y coordinate on screen mousescreenx(n) : give mouse x coordinate on screen mousescreeny(n) : give mouse y coordinate on screen bmouse : give the buttonclick on the mouse mousebutton : give the buttonclick on the mouse changemouse(optional n) : change mouse from default(0) to emulate with sprite 0 - image 0 (1,2,3)without n return current pointer mousepointer(optional n) : change mouse from default(0) to emulate with sprite 0 - image 0 (1,2,3)without n return current pointer locatemouse(x,y) : move mouse at x y coordinates placemouse(x,y) : move mouse at x y coordinates mouseshow : show the mouse cursor howmouse : show the mouse cursor mousehide : hide the mouse cursor hidemouse : hide the mouse cursor mousezone(x,y,w,h) : give 1 if the mouse pointer is in rectangle(xy with size wh) #_________________________________________________________________________________________________________________________ # Joystick numjoysticks : count available joysticks namejoystick(index) : get joystick name numaxesjoystick(i) : get the number of joystick axes numballsjoystick(i) : get the number of joystick trackballs numhatsjoystick(i) : get the number of joystick hats numbuttonsjoystick(i) : get the number of joysitck buttons getaxisjoystick(i,a) : get the current state of an axis gethatjoystick(i,a) : get the current state of a joystick hat getbuttonjoystick(i,a) : get the current state of a given button on a given joystick xgetballjoystick(i,a) : get relative x trackball motion ygetballjoystick(i,a) : get relative y trackball motion joy(i) : return joystick boolean coordinate bjoy(i) : return joystick buttons pressed in boolean expression joybuttons(i) : return joystick buttons pressed in boolean expression fire(i) : return joystick buttons pressed in boolean expression waitbjoy(optional i) : wait the pression of a joystick button (or emulate in keyboard) #_________________________________________________________________________________________________________________________ # SDLtime wait(t) : wait t milliseconds timer : give the current tick #_________________________________________________________________________________________________________________________ # Socket isenabledsock() : return 1 if sdlnet was enabled sock=getfreesock() : return the first free sock in sdlSocket array sock=OpenSock(port) : Server side socket sock is the stream. in sdlBasic there are 256 stream and sintax is very similar of file open close. clientsock=AcceptSock(serversock) : Accept the client connection IsServerReady(Sock) : True/False if server is sending data     sock=ConnectSock(ServerName,port) : client side socket connection *ConnectionReadySock(sock) : the server have accepted the connection IsClientReady(Sock) : True/False if client is sending data CloseSock(sock) : Close the socket connection. Works for client and server *PeekSock(Sock, NumBytes) : Peek information coming from socket, but do not clear. ReadSock(Sock, NumBytes) : Read NumBytes ReadByteSock(Sock) : Read a single byte       ReadLineSock(Sock) : Read complete line WriteSock(Sock, Message, NumBytes) : Sends NumBytes from Message WriteByteSock(Sock, Byte) : Sends a single byte WriteLineSock(Sock, Message) : Send Message getremoteip(sock) : return the ip address of remote client connetted getremoteport(sock) : return the port address of remote client connetted ?getlocalip() : return the local ip (not work on windows) #_________________________________________________________________________________________________________________________ # usr/src/sdlBasic/share/doc/sdlBasic/english/motd.png0000777000076500007660000001440010463122070017633 0ustar ‰PNG  IHDR‚€ðAÄýPLTE™ºŒ!" *,*%95741PDEC m&*_&m/ o9k'w1j4 w+q|.s(#l0ÇZr.y%3#n=RTQ+m7.m1,p-'t)„A"rHCh%‡7zL|!„K5m8‰3„//t75pA€,Ž72u>.{0á[,}+;s>DlK‘D>rI:z3)†+LmU”W–QŒ6>yI3„1bda5…+X9|SDzP(2žPÁ7n2Œ1žZä/U9Ž,=Œ2LO/ŽP¤\ã-pDŠ1I€\Tƒ.L€V/•8T~^molœ],“e7—3jsnªb?•2G“4lupLˆdZ2S‰^V‡b²htvs=ž9F›8UŠmN™7Kž3L”qcŒi¾k·gbp]n|~{I¦„†ƒQ­@f™wéT…\­:s–{mš|g­A[´AôgHŒd´Aìe{yŸ„x¤s“•’c¼Hj´e‹œ•nºGék o¼B~§ŒlÂFœž›vÂHó}o†®•‹¬–’©—úU’²v“·]yÈM™´n€ÌI„ÉOÿ@§©¦’¶Ÿî…¬Κ­‡ÒOô–’ÎVÒR¯±®›¾©¡»ªþ¢L“ØV«Çqµ·´ŒßN™ÕcûŸ€ØX—×r«ÅŸÞm§ÆµŸàP¢Ûc²ÕY¼¾»§Øq¦Þ^²Ê®¸Ôp¼Ök¸ÈÁ°Ï¿ªèNÿ¼a÷³ª¾àU¹Ï¿ÇÈÅ®ëZÿ¼}¶æjõ¶ËÁèT¹ØÈÀÖÈÆÖÍèÅÐÐÒÏÿÊ~ÄëtÉéxÂàÐÿËžÈÞÐÕØÔÿ˰Ðï|ÏàÙÏûRÉç×Õú]ÖûVÒäÝÐæØÍçÞÙãÞÙúfÙúnàâßÿܳÝùvÜù}ÔíÞá÷‹âù~áù…þã¬ÔîåÜîæûãÙéëçüåèÞõæÿèÔÿìÍãõîþñ×áûòòôñèúóÿôçìþöúú÷ýÿü©fÌ1tRNS@æØfbKGDˆH¤IDAT×Å›\Zç¹Çó¯I¼ÖD+Ôô[+%ÕpóÇP±#ƒ.›Ñ¹œ,+Uj£r¶µS;$®Ww½¨ ²ba^æ¿:·kWæ¨íâ²+·Ù´ci*ë–,d-míºPêêôàgÏ{ÿb"¦¤Ï'=È9ïû=Ïû<¿÷yßs²fMÌŒ$É5Ÿª‘þ‘B=<úTPÈiëñÛã+©¾=Ç{=ä§Px;}Ë–*ªç‰øøü¾iò–lAVEúa\ñ[¶Äç[o9=RúOÜ’X5^U5á¿Ç[n/¹E1AŒ=˜xGâ©pxû‰‘x8ˆøÂ1‚¸ùÛÀs¶%~ õ(âß "ÿ³ŸÝìóŽ;æIŸ\$nÂîÝÛ·o¿s‘… î,ÿÁTÌ£!ìÞ½g ‚¸³¬ëŸLß"€È¹gÖ‚ ,xë­X#þÑÔíÛÁ‘=GäܳÙ=;Åùà[`±ö9qÂÿÎ;·ïÙ}äÈsvìAÀ›o"@ˆ©:xîÝʃœ=á¡BAÝ/._Fï¼óÎOŒÅR¢®}vONpÜï¹'!ܶ㾸r»Ïß{׉Wc7O>xðàÁœ @î»ï×þˬáö{ïj]Ef1u)h“SÄr‡Ž=Håø?bya»{ñÞ{¿øÝNF p©W)Ý—F£Œ-VèF.N^[ 2ùàQd}(A…ðæ,¿ûòû/OFëó®¼rµºE£Ñ(j°¤¤¤ 1—Î`W˜G®!ï E;ææ9áoo¼öþûÑ"þz¦Âh4´jœ—„á"¡ˆÇÃd2ŒÇ¡±¥;Ó¬³±uíÁ2ðBNÎ=  ÿ÷ÁÝü/åjDÇÊJfÄeÐib\„çå >—ÎÅÊqYGWÚÄ<Ôù)0Ê99Ø“³á½÷Þ‹ôHÅZœ–\\¼wo|!O[έ8†óÙ×<}Ê"WÛÅé[ˆpêT˜BóàýÿM! vŽòäòºcñÉ¢± S¤(Ò=¨JŸö虜 ÏEð8Ø,Ã#7‡@NŽðìQÒu˜Æâ2^†ñÕ<¡bgHêýÖyEaáñÇà A7¼r‚]nÄÙã$ĤÇÚ(Hã&e$e`BžFÜIß©y…ãûQ„#q‘ÁV§I«4-)#E¤ÀöM¥iáq áTó¬æ3¬4)‰‘4¸ˆ9…Ð1øøin+Y92á”åÏ?EóÕ1üm…Aù¾01Ù[™ÊVºWÖRá+OŽ}eÞ@¼py 0€ýjE„5Sm8& +›)ÆË“O—ØüôÈ^ .D„Ù9"ÌðîŠü}»ÔqQx1èo¤—k»5L=IºôÖeKò±£ÎF#…p$Œš*â嬠tò›wµÄ³ºä£¥ûüùa3Æ·f”Õ5 ÈE Ž!a2ž #$s#M¡€…wR®Æ£%%‹qœ—ÂÍÊp­&Ý=ÂH<« ¸LŽÐ"ð€F£—h„rúRa ¯H¹0ÇÉrXýc µ,%IB s2w¦§7FŸk¬q€P È”* `Íee¼§üKEUpL+âò Še˜ˆ—’‘‘’•ÇLOTèG¯ø]ã«Ñ¨Þ8DP&§À †ÊäÉÒ%|H3`¹½ºªü»R·‚1RÙùR¥Þz…¼™§e½É0”š©x0à”¤[¹ô†È nÀÓ¨?ÿ´ljý›TgN.(()£BÁ` ¦Š†¬2¡`b©GÉ Z |òÃtÉ{ Jäum†îþÁ~*„¬²æòcÄÒUh¸>ù'ºÄ½eòm÷Ðy˜¡$ÑèPÇÕdŽ‹h #Vt)Ï<` C0C]€bAË´>Eß+oSgöN-!LÆâ©‹9ŒðÆ{€`1Š•”bÖZv™çŸËŒÁ+Bè -°°%¡¶L §5쉈 F›ìã Ž h . u«Ó¨Õ,éÊO„";Od€Š@mDÙ›ýõéTÖÞb„ec¿†ZË’%½¬Y˯D7NŽgAQ¬M“d~"BÐv÷k9zÿlU¤‹/iÖ¢Mr4Mm<+´“°5F¢¡ÍØÝmørã¼jÑ?¶ÄR×(Db¬ÈéÑô$ 0=hót âtr[Œ'÷¥A$JcĤ97§hS$²JäÍ?Üq’žÛ{˜_àêZW5 Ä”T|Z,˜Š˜ãU™"X8 ³ãïÒ¹üºÔ8V±¼¹ A` ‚ïd¬f± Ñ ¾q°#Ý) ªè@^œEßz‚ꎼY%uÚ®AÊ‚›y1n:t±Bç ¦—Œ21X¼ÃRº¬ è€ð,àüˆ¶ŽAÊÒ‰ÕNä„4Ëãq™4¶Ô¼HMHÿHS†¶ºbˆåÂ^ЫJñ)%0iöDºòêj*2Ò¯Oñèl©~Üã'Œæ'ãʬäÔªÿ’HÒ¥LMæÉC™JWÔ¤«ˆ/£KÇýK+J¸Å|&®EP¼õ¸õZd7C™ ² ;ú‡;ŽE AöecÂÏY#5NŒ<ÂÁµ(ãóͯ—çĵ‘ª­É% PKöwœÌT^ŒB¦tLYž ¢cÙ²6!è_wã& â’¹ˆ.”k»û»5"±Ba˜jåÔp*#WVSÙ c‹žßºÒ·~ˆ©1e6§¼ÅÐmQ‹2i½´’ë3GÁ\NǦ25Æ!½jdå:“HïñÌ•‰víèE½ÑŒÇdïÃàA£¡†»¹˜`†²D‹¾5¿ªUg6›u•l:_”.]0]‘ãRƾñÑlŽX(âq9éi v‘´B©ll¬ÈfòDBæÃÑ¼Ë µWä‡Ñ¨àg×Ox¤Ç Y‰ôT+ô½!àkNî»2éÊÆÔx¶u¼¯µ2—Áäòy"¬ÃD<>79!!.)«ùrU4û…°lÍ΃Ù_-¦±ÅÚf^\<ÔX Ôz§¢[<+Kþ?ýél:¬YLƒ-8|8—ÉLNÊȉx)I)¼r…Ö"c¿ú§èìU}.ÆCƒk›‹ãØ}ó¿’õX·8¼LžÝ¯R=ÀDQÂò@?1L†ã¸—a<‘¨¦EkжÔÈ’ÿ]½}íŒG[YÜ¢‹¿†6I˜xX–ü£‡83pž={¶¯¹€Á œÀC»ÿ5.âƒsrõ¾™ëØ?Þ~û£#}á=ÃæfÑëýÖøõkhl'˜‚}ðþõì™ÊÜ4z&ƒ_&ä2ÓØ‡ëÏ8¼¾@`qÛ¾›™w&ðÇç^yûŸÿóŸöd6‡—:ÃÝÓÔÔ>à´ŸùÆ7LÔ>¯iÀP󞙹Z‹–É ÛOO‚‰L† ù\zZ®´±ïÕ¿úËݸ»Z"é±ÛjmÿÁ³¼MÉ€M%©¶f|¦R•Óë¨.u¸k%¥=v{O­7 êÙ¿ß>3óÕ…)îbóñL$ãq“˜é´ÏÕŸésü5’ã8Ã$‘¸¡[Û¾ý›Y×ÔJ¼3^èÑ0Iª)g8Kpf)œèñΘìÕµŽ%„«þÜ\6LŸ<ð3}6“i Çð˜Ð­ØLNð¸ÍÍœ==vøÆfp‡f~ÿçÀ¥0.í‰Ý^*±ÿdsÎôP3àQŸÏ‹üúÕÅüÏšàöœ¦ÀŒ£gÆ¡rÀ‰í&Ÿjß Ùª½^[µ{f 8ܵN›Äçó9a„Ýÿûyn‚[Àp8TÁ^ƒž "ø¼³§-FXÛŽ¼æ­¶Úc— +¼çŒy´Ö䬥ڴ;íªå‚ûó÷8otÓQ*i‡@)óMÁn_K¥p „Lð¢jÛB„jSSSè¦(„ *U­ä3_š0 ‚(5Ü¥’ê™yU“Jr#_»DåœiR£Ð^jš‡àöö¨Üµ¦Ðõv‰Óé졜Ÿc!‚Éí¬…@/Pöööv“¼àôùL7B€ÐƒüQEB(í1•Ú}Õí³ ¦pFÌü÷üX˜QÁ@H$í(+PK>ˆ‹ž@p ¼î! P«5…b`á@øLÕîZU Œ€ÚžEøíý?ž'¥T8–R7G8#Þë#8¡Qgµ³ÚAyDerSí‡cÁWm2Ûôºƒáè #Ì|çÛÌ&D74µÏG@×:l×G°AßÎö€M… §É¨5ù^Ľ…s逪Öx{!€~ûT‰ 9æÃï}/Ä€TVÚ $l ëÀé@gš|>G­ýúIi7 ˜LÈ ç&xUµM&'ü35 ÀÇžvÇ@mS»Éë65DµÛ Ešš¨F?üßg_GsÔÇvøK» uS“Íg«­VÕ–ªzÜԙȜ×G¸)ûÇ민ý÷"ú2çÇaEæS¹?m„öõÎ&elͱaÝ-AÀTàõÎNõбccç:G 4ÛÇaÿ¶ë{|µ×m ÊlÀ¶óÆÍ wë:;;7oÛ¶ßkgmg§j㶦ýk;÷£,]ß30­Ûè´·ïï\[ †/æ±à\×¹¶M£kA «×RM·wnÀ[ 3ÞõÕh¼½:U3Žuë½!.û„X$åÇo¿þú Õšw# 4u®+E&Ùãc„_9wî¹ïÿ&°açgÈ|1F¼rîï?÷ìÓ¿]„°­sÃ\½[„ž;÷ÑGxîéï,ñÂ:GD„O>?xöÜþpîÙo}i‚ 2ô!|øô³Ï=÷ìÓ_÷ºY„jôc½;¤(MíáÉ3ÿñ­§ŸþÖîÿT>k;©ºÕ½¡s|Z߹ю4r³}Æjåv«Úc¤ ¿½Ùw>œ©Ý¼víz¨Òš¶­]»Vvø¼­tÛ6©@íÚÎõ–h•ó&Íñ?ŸÿÌg>ÿ{§³2›Óúí´7I6ïWÙ¨“šöoS9¨ó— \ý¯[mgoÅÿ·ŽÂþòÁ!Ò~_IEND®B`‚usr/src/sdlBasic/share/doc/sdlBasic/english/translationGlossary.txt0000777000076500007660000000137310463122141023011 0ustar Amos to SdlBasic translation glossary • Dim Amos: Dim var(size) SdlBasic: Dim var[size] • GetBob/Grab Amos: Get Bob n,x,y To x+xs-1,y+ys-1 SdlBasic: grab(n,x,y,xs,ys) • LoadIff/Loadimage Amos: Load Iff filename$,bank SdlBasic: Loadimage(filename$,bank) • ProcedureEndProc/SubEndSub Amos: Procedure proc1[value1,value2] End Proc SdlBasic: sub proc1(value1,value2) End sub • ScreenOpen/SetDisplay Amos: Screen Open n,xsize,ysize,2^bitdepth,resolution SdlBasic: setdisplay(xsize,ysize,bitdepth,displaymode) (note: bitdepth and resolution issues seems to be different) • Plot/Dot Amos: Plot x,y SdlBasic: Dot (x,y) usr/src/sdlBasic/share/doc/sdlBasic/english/lgpl.txt0000777000076500007660000006126710463122026017677 0ustar GNU LIBRARY GENERAL PUBLIC LICENSE ================================== Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! usr/src/sdlBasic/share/doc/sdlBasic/english/index.html0000777000076500007660000000105210463121761020164 0ustar sdlBasic doc usr/src/sdlBasic/share/doc/sdlBasic/english/keywords.txt0000755000076500007660000001207610637402037020604 0ustar const \ option explicit \ option qbasic \ include \ argc \ argv \ command \ command$ \ argument \ argument$ \ getenv \ shell \ end \ stop \ os \ isfbsd \ isosx \ islinux \ iswin32 \ ismos \ isnetbsd \ isamigaos \ debug \ declare \ sub \ exit sub \ end sub \ function \ exit function \ end function \ return \ while \ wend \ end while \ exit while \ continue \ if \ then \ else \ elseif \ end if \ select case \ case \ case else \ end select \ for \ for each \ continue \ exit for \ next \ end for \ do \ loop \ exit do \ or \ and \ xor \ not \ \ \ \ \ \ mod \ shl \ shr \ dim \ shared \ common \ lbound \ ubound \ erase \ asc \ chr \ chr$ \ insert \ insert$ \ instr \ lcase \ lcase$ \ left \ left$ \ len \ length \ ltrim \ ltrim$ \ mid \ mid$ \ replace \ replace$ \ replacesubstr \ replacesubstr$ \ reverse \ reverse$ \ right \ right$ \ rinstr \ rtrim \ rtrim$ \ space \ space$ \ str \ str$ \ strf \ strf$ \ string \ string$ \ tally \ trim \ trim$ \ typeof \ typeof$ \ ucase \ ucase$ \ val \ abs \ acos \ asin \ atan \ bin \ bin$ \ cos \ exp \ fix \ floor \ frac \ hex \ hex$ \ int \ log \ randomize \ rnd \ round \ sgn \ sin \ sqr \ tan \ min \ max \ bitwiseand \ andbit \ bitwiseor \ orbit \ bitwisexor \ xorbit \ open \ file input \ input \ file output \ print \ close \ eof \ fileexists \ filecopy \ filemove \ filerename \ freefile \ kill \ filedelete \ loc \ lof \ readbyte \ rename \ seek \ writebyte \ chdir \ dir dir$ \ direxists \ dirfirst \ dirnext \ mkdir \ rmdir \ data \ read \ print \ date \ date$ \ time \ time$ \ ticks \ reservebank \ baseimage \ baseimageCC \ basescreen \ basesound \ freebase \ freebank \ copybank \ loadbank \ savebank \ setbank \ currentbank \ sizebank \ banksize \ poke \ doke \ loke \ peek \ deek \ leek \ memcopy \ setdefaults \ setdisplay \ setcaption \ setalphachannel \ caption \ displaymode \ displaywidth \ displayheight \ displaybpp \ screen \ screenz \ lastscreen \ directscreen \ screenopen \ screenclose \ screenclone \ screencopy \ screenfade \ screenfadeout \ screenfadein \ screencrossfade \ screenalpha \ screenlock \ screenunlock \ screenrect \ screenviewport \ xscreenrect \ screenviewportx \ yscreenrect \ screenviewporty \ wscreenrect \ screenviewportw \ hscreenrect \ screenviewporth \ flagscreenrect \ screenviewportflag \ screenwidth \ screenheight \ offset \ screenoffset \ xoffset \ screenoffsetx \ yoffset \ screenoffsety \ cls \ screenswap \ autoback \ setautoback \ dualplayfield \ waitvbl \ fps \ rgb \ enablepalette \ color \ palette \ colorcycling \ colorcycling \ ink \ point \ getpixel \ dot \ setpixel \ putpixel \ plot \ line \ box \ bar \ circle \ fillcircle \ ellipse \ fillellipse \ paint \ triangle \ polyline \ polygon \ loadimage \ loadzipimage \ saveimage \ loadsound \ loadzipsound \ loadmusic \ hotspot \ setcolorkey \ colorkey \ imageexists \ imagewidth \ imageheight \ deleteimage \ copyimage \ setalpha \ imagealpha \ zoomimage \ rotateimage \ rotozoomimage \ mirrorimage \ blt \ pastebob \ pasteicon \ grab \ spriteclip \ sprite \ deletesprite \ xsprite \ spritex \ ysprite \ spritey \ spritewidth \ spriteheight \ frsprite \ spriteimage \ livesprite \ spriteexist \ spritehit \ spritez \ lastsprite \ autoupdatesprite \ updatesprite \ setbob \ bob \ deletebob \ xbob \ bobx \ ybob \ boby \ bobwidth \ bobheight \ frbob \ bobimage \ livebob \ bobexist \ bobhit \ bobz \ lastbob \ autoupdatebob \ updatebob \ text \ setfont \ getfont \ textrender \ pen \ paper \ fprints \ prints \ locate \ atx \ aty \ curson \ cursoff \ inputs \ zoneinputs \ isenabledsound \ soundenabled \ soundexists \ deletesound \ copysound \ musicexists \ playsound \ playfreqsound \ volumesound \ soundvolume \ stopsound \ pausesound \ resumesound \ sound3d \ positionsound \ soundchannels \ playmusic \ positionmusic \ stopmusic \ pausemusic \ resumemusic \ rewindmusic \ fademusic \ volumemusic \ musicvolume \ speedmusic \ musicspeed \ numdrivescd \ countcddrives \ namecd \ cdname \ opencd \ indrivecd \ cdinserted \ trackscd \ countcdtracks \ curtrackcd \ cdcurtrack \ curframecd \ cdcurframe \ playcd \ playtrackscd \ playtrackscd \ playtrackscd \ playcdtracks \ playcdtracks \ playcdtracks \ pausecd \ resumecd \ stopcd \ ejectcd \ closecd \ tracktypecd \ cdtracktype \ tracklengthcd \ cdtracklength \ trackoffsetcd \ cdtrackoffset \ loadmpeg \ plaympeg \ stopmpeg \ deletempeg \ pausempeg \ rewindmpeg \ seekmpeg \ skipmpeg \ statusmpeg \ key \ inkey \ waitkey \ xmouse \ ymouse \ mousex \ mousey \ xmousescreen \ ymousescreen \ mousescreenx \ mousescreeny \ bmouse \ mousebutton \ changemouse \ mousepointer \ locatemouse \ placemouse \ mouseshow \ howmouse \ mousehide \ hidemouse \ mousezone \ numjoysticks \ namejoystick \ numaxesjoystick \ numballsjoystick \ numhatsjoystick \ numbuttonsjoystick \ getaxisjoystick \ gethatjoystick \ getbuttonjoystick \ xgetballjoystick \ ygetballjoystick \ joy \ bjoy \ joybuttons \ fire \ waitbjoy \ wait \ timer \ isenabledsock \ sock=getfreesock \ sock=OpenSock \ clientsock=AcceptSock \ IsServerReady \ sock=ConnectSock \ IsClientReady \ CloseSock \ ReadSock \ ReadByteSock \ ReadLineSock \ WriteSock \ WriteByteSock \ WriteLineSock \ getremoteip \ getremoteport \ usr/src/sdlBasic/share/doc/sdlBasic/english/style.css0000777000076500007660000000507310463122141020041 0ustar FONT {FONT-FAMILY: Helvetica; FONT-SIZE: 12px} TD {FONT-FAMILY: Helvetica; FONT-SIZE: 12px; COLOR: #000000;} BODY {FONT-FAMILY: Helvetica; FONT-SIZE: 12px} P {FONT-FAMILY: Helvetica; FONT-SIZE: 12px} DIV {FONT-FAMILY: Helvetica; FONT-SIZE: 12px} INPUT {BORDER-TOP-COLOR: #000000; BORDER-LEFT-COLOR: #000000; BORDER-RIGHT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-WIDTH: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE: 10px; BORDER-BOTTOM-WIDTH: 1px; FONT-FAMILY: Helvetica; BORDER-RIGHT-WIDTH: 1px} TEXTAREA {BORDER-TOP-COLOR: #000000; BORDER-LEFT-COLOR: #000000; BORDER-RIGHT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-WIDTH: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE: 10px; BORDER-BOTTOM-WIDTH: 1px; FONT-FAMILY: Helvetica; BORDER-RIGHT-WIDTH: 1px} SELECT {BORDER-TOP-COLOR: #000000; BORDER-LEFT-COLOR: #000000; BORDER-RIGHT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-WIDTH: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE: 10px; BORDER-BOTTOM-WIDTH: 1px; FONT-FAMILY: Helvetica; BORDER-RIGHT-WIDTH: 1px} FORM {FONT-FAMILY: Helvetica; FONT-SIZE: 10px} A:link {BACKGROUND: none; COLOR: #672F10; FONT-SIZE: 12px; FONT-FAMILY: Helvetica; TEXT-DECORATION: underline} A:active {BACKGROUND: none; COLOR: #672F10; FONT-SIZE: 12px; FONT-FAMILY: Helvetica; TEXT-DECORATION: underline} A:visited {BACKGROUND: none; COLOR: #672F10; FONT-SIZE: 12px; FONT-FAMILY: Helvetica; TEXT-DECORATION: underline} A:hover {BACKGROUND: none; COLOR: #672F10; FONT-SIZE: 12px; FONT-FAMILY: Helvetica; TEXT-DECORATION: underline} .title {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 16px; FONT-WEIGHT: bold; FONT-FAMILY: Helvetica; TEXT-DECORATION: none} .content {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 12px; FONT-FAMILY: Helvetica} .block-title {BACKGROUND: none; COLOR: #FFFFFF; FONT-SIZE: 12px; FONT-FAMILY: Helvetica} .storytitle {BACKGROUND: none; COLOR: #363636; FONT-SIZE: 14px; FONT-WEIGHT: bold; FONT-FAMILY: Helvetica; TEXT-DECORATION: none} .storycat {BACKGROUND: none; COLOR: #363636; FONT-SIZE: 16px; FONT-WEIGHT: bold; FONT-FAMILY: Helvetica; TEXT-DECORATION: underline} .boxtitle {BACKGROUND: none; COLOR: #363636; FONT-SIZE: 14px; FONT-WEIGHT: bold; FONT-FAMILY: Helvetica; TEXT-DECORATION: none} .boxcontent {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 12px; FONT-FAMILY: Helvetica} .option {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: Helvetica; TEXT-DECORATION: none} .tiny {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 10px; FONT-WEIGHT: normal; FONT-FAMILY: Helvetica; TEXT-DECORATION: none} usr/src/sdlBasic/share/doc/sdlBasic/english/sdlBasic_IDE_License.txt0000777000076500007660000000167110463122141022577 0ustar License for Scintilla and sdlBasic Editor Copyright 1998-2003 by Neil Hodgson Copyright 2005 by sdlBasic team http://sdlBasic.sf.net All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. usr/src/sdlBasic/share/doc/sdlBasic/english/keycode.txt0000777000076500007660000000407210463121761020360 0ustar key code string "k_backspace" = 8 "k_tab" = 9 "k_clear" = 12 "k_return" = 13 "k_pauseE" = 19 "k_escape" = 27 "k_esc" = 27 "k_space" = 32 "k_exclaim" = 33 "k_quotedbl" = 34 "k_hash" = 35 "k_dollar" = 36 "k_ampersand" = 38 "k_quote" = 39 "k_leftparen" = 40 "K_RIGHTPAREN" = 41 "k_asterisk" = 42 "k_plus" = 43 "k_comma" = 44 "k_minus" = 45 "k_period" = 46 "k_slash" = 47 "k_colon" = 58 "k_semicolon" = 59 "k_less" = 60 "k_equals" = 61 "k_greater" = 62 "k_question" = 63 "k_at" = 64 "k_leftbracket" = 91 "k_backslash" = 92 "k_rightbracket" = 93 "k_caret" = 94 "k_underscore" = 95 "k_backquote" = 96 "k_delete" = 127 "k_1" = 49 "k_2" = 50 "k_3" = 51 "k_4" = 52 "k_5" = 53 "k_6" = 54 "k_7" = 55 "k_8" = 56 "k_9" = 57 "k_0" = 48 "k_kp0" = 256 "k_kp1" = 257 "k_kp2" = 258 "k_kp3" = 259 "k_kp4" = 260 "k_kp5" = 261 "k_kp6" = 262 "k_kp7" = 263 "k_kp8" = 264 "k_kp9" = 265 "k_kp_period" = 266 "k_kp_divide" = 267 "k_kp_multiply" = 268 "k_kp_minus" = 269 "k_kp_plus" = 270 "k_kp_enter" = 271 "k_kp_equals" = 272 "k_up" = 273 "k_down" = 274 "k_right" = 275 "k_left" = 276 "k_insert" = 277 "k_home" = 278 "k_end" = 279 "k_pageup" = 280 "k_pagedown" = 281 "k_f1" = 282 "k_f2" = 283 "k_f3" = 284 "k_f4" = 285 "k_f5" = 286 "k_f6" = 287 "k_f7" = 288 "k_f8" = 289 "k_f9" = 290 "k_f10" = 291 "k_f11" = 292 "k_f12" = 293 "k_f13" = 294 "k_f14" = 295 "k_f15" = 296 "k_numlock" = 300 "k_capslock" = 301 "k_scrollock" = 302 "k_rshift" = 303 "k_lshift" = 304 "k_rctrl" = 305 "k_lctrl" = 306 "k_ralt" = 307 "k_lalt" = 308 "k_rmeta" = 309 "k_lmeta" = 310 "k_lsuper" = 311 /* Left "Windows" key */ "k_rsuper" = 312 /* Right "Windows" key */ "k_mode" = 313 /* "Alt Gr" key */ "k_compose" = 314 /* Multi-key compose key */ "k_help" = 315 "k_print" = 316 "k_sysreq" = 317 "k_break" = 318 "k_menu" = 319 "k_power" = 320 /* Power Macintosh power key */ "k_euro" = 321 /* Some european keyboards */ "k_undo" = 322 /* Atari keyboard has Undo */ usr/src/sdlBasic/share/doc/sdlBasic/english/htmlconvert.sdlbas0000777000076500007660000001130710463121761021732 0ustar ' ' sdlbasic doc: html converter ' ' name: htmlconverter.sdlbas ' purpose: generate a manual html page of sdlbasic for send at sourceforge site ' author: __vroby__ ' licence: lgpl ' ' bugs: ' ' todo: ' '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- makeexamples=0 cleanapi=true apiFile="../../../sdlBasic/sdlBasic.api" base$="../../../../../../../share/sdlBasic/sdlbasicsoftware/examples" mkdir(base$) inputfile$="sdlBasic.txt" outputfile$="QuickHelp.html" keywordlist$="keywords.txt" open inputfile$ for input as 1 open outputfile$ for output as 2 open keywordlist$ for output as 3 print #2,"" print #2,"" print #2,"" print #2,"" print #2,"" print #2,"" print #2,"" print #2,"" print #2,"" print #2,"" print #2,"" print #2,"sdlbasic quickhelp" print #2,"" print #2,"" print #2,"" print #2,"[sourceforge]" print #2,"[sdlbasic]" print #2,"

sdlbasic quick help

" print #2,"
" l=1:c=0 while eof(1)=0 a$="" file input #1,a$ a$=replacesubstr(a$,"#","" ) 'start section if c=1 then: t$=trim(left$(a$,len(a$))): mkdir(base$+"/"+t$): a$=""+a$+"": c=0: end if if left$(a$,5)="_____" then: a$="
": c=1: end if if left$(trim$(a$),1)="*" and left$(trim$(a$),2)<>"**" then a$="
"+a$+"
" end if if left$(trim$(a$),2)="**" then a$="
"+a$+"
" end if if left$(trim$(a$),1)="?" then a$="
"+a$+"
" end if if left$(trim$(a$),2)="->" then a$="
"+a$+"
" end if s=instr(a$,": ") if s<>0 then b$=left$(a$,s) c$=mid$(a$,s+1) a$=""+b$+""+c$ com$=rtrim$(left$(b$,len(b$)-1)) if instr(com$,"[")then: com$=left$(com$,instr(com$,"[")-1):end if if instr(com$,"(")then: com$=left$(com$,instr(com$,"(")-1):end if com$=rtrim(com$) com$=replacesubstr(com$,chr$(9),"") com$=replacesubstr(com$,"?","") com$=replacesubstr(com$,"--","<") if left$(trim$(com$),1)<>"<" then print #3,com$ &" \\" end if if makeexamples<>0 then if not fileexists(base$+"/"+t$+"/"+replacesubstr$(com$,"*","")+".sdlbas") and left$(trim$(com$),1)<>"<" then open (base$+"/"+t$+"/"+replacesubstr$(com$,"*","")+".sdlbas") for output as 3 print base$+"/"+t$+"/"+replacesubstr$(com$,"*","")+".sdlbas" print #3,"'" print #3,"' sdlbasic example "+t$+":"+com$ print #3,"'" print #3,"' name: "+com$+".sdlbas" print #3,"' purpose: "+c$ print #3,"' author: __vroby__ ( __vroby__@libero.it )" print #3,"' licence: lgpl" print #3,"'" print #3,"'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------" close 3 end if end if end if print #2,a$+"
" locate(0,0) prints("line"+str$(l)+" ") l=l+1 'waitvbl end while print #2,"
" print #2,"

" print #2,"generated with sdlbasic
" print #2,"graphics zoiba
" print #2,"

" print #2,"" print #2,"" close 2 close 1 -------------------------------------------------- making api file for ide if cleanapi=false then filecopy("sdlBasic.txt",apiFile) else ------------------ cleanup sdlbasic.api while copying it outputfile$=apiFile open inputfile$ for input as 1 open outputfile$ for output as 2 while eof(1)=0 file input #1,a$ for n = 1 to 10 if instr( a$, chr(09) )<>0 then a$=replacesubstr( a$,chr(09),"" ) end if next if left$( a$, 1 )<>"#" then file output #2,a$ end if wend close 2 close 1 end if waitkey usr/src/sdlBasic/share/doc/sdlBasic/english/QuickHelp.html0000755000000000000000000012451110644532445022515 0ustar rootroot sdlbasic quickhelp [sourceforge] [sdlbasic]

sdlbasic quick help


sdlBasic is a little basic for make simple games in 2d

This basic run on :
linux(with a reasonable recent version)
windows (9x and nt-XP based)
macOSX
FreeBSD
OpenBSD
MorphOS
AmigaOS

This basic is another demostration to the GPL's power
the basic interpreter come from wxbasic by David Cuny ("http://wxbasic.sourceforge.net") distribuited under lGPL
The graphic system is based uppon SDL graphics libraries family("http://www.libsdl.org")distribuited under GPL
The graphics engine was initially based on the aliens demo game ("http://www.libsdl.org/projects/aliens")
written in c and distribuited on GPL, later graphic engine was re-written from scratch.
putpixel and getpixel routines are derivated from SDL tutorial and was improved with Gigi Davassi suggestions
The original line rutine was imported from Alvyn Basic with Author's write permission.
I used also the source of sdldraw library ("http://sdl-draw.sourceforge.net/") ever lGPL

I cut, pasted and adapted code distribuited under lGPL.
This software is subject to lGPL license and is free as every program used to create it




sdlBasic comands and syntax list:

i suggest to read full documentation for more details

sections:
Run time
Sub and function
Control structures
Operator
Array
Strings
Maths
Files
Dirs
Data function
console output
Date and time
Memory Bank

Screen
Graphics
File graphics input output
Image manipulation
Blitting
Sprite system
Bob system
Text draw
Print screen
Sounds and music
CD support
Video Mpeg
Keyboard
Mouse
Joystick
SDLtime
Socket




notes:
* it don't works

** it don't works and need to be tested

? it don't work well: unresolved bug

-> to be deleted




Run Time

command line arguments
--nodefaults : disable the default setting display
--nosound : disable sound
--nosocket : disable socket support
--debug : start sdlBasic in step to step mode
--version : display the version (iso date)
--license : display license type
--copyright : display copyright ( ;-) absolutelly free software )
--help : display a run option list


const : declaration of numeric constant
option explicit : must declare variable
option qbasic : qbasic mode you can use a function before create in a code
include(filename) : inclusion of extern source file
argc : return number of args in caller
argv(index) : return arg in caller
command [param] : returns requested arg from command line
command$ [param] : returns requested arg from command line
argument(optional n) : returns the arguments sends to sub/function with n=0 or without parameter will be return the arguments count
argument$(optional n) : returns the arguments sends to sub/function with n=0 or without parameter will be return the arguments count
?setenv(varname,value) : set a enviremont variable in currently os. if variable exist it will be overwrite

getenv(varname) : return the value of enviremont variable in currently os
*run : run command on new thread

shell : execute command, wait until finished
end : terminate program and exit
stop : breakpoint and start debug

os : return the operative system in work (linux windows macosx etc...)
isfbsd : return 1 if the current os is FreeBSD
isosx : return 1 if the current os is MacOSX
islinux : return 1 if the current os is linux
iswin32 : return 1 if the current os is windows
ismos : return 1 if the current os is MorphOS
isnetbsd : return 1 if the current os is NetBSD
isamigaos : return 1 if the current os is AmigaOS

debug : work with option --debug at start or when you press ctrl+c key in interpretation of basic program
if you press F5 you continue the normal execution
with F6 you advanced in execution of one step
with F4 you can see the vale of the prompted variable. For see the value of an array you must enter the name
of array without the square bracket and at the request you must enter the indexes of record requested.



Sub and Function

declare [sub | function][name] : declare a subrutine/function in qbasic mode
sub [name](args...) : start a subrutine
exit sub : break a subrutine
end sub : terminate a subrutine

function [name](args...) : start a function
exit function : break a function
end function : terminate a function
return [value | variable] : set the result of a function(can substituite funcname=x)



Control Structures

while [condition expression] : start while cycle
wend : end while cycle
end while : end while cycle
exit while : stop while cycle
continue : terminate the last while cycle

if [condition expression] : classic if control structure
then : then must be terminate a command
else : classic else:it must be a single command
elseif : elseif is support in sdlBasic
end if : must terminate a if structure

select case [condition expression] : similar to c switch (syntax like pascal)
case : control condition
case else : default condition
end select : end select case structure

for[var]=[val1]to[val2][step[vals]] : classic for-next well implemented
for each [var] in [array] : for each are well supported warning: report the indexes of array not the value
continue : force the exit of for next cycle (work only with for each)
exit for : force the exit of for next cycle
next : end for loop
end for : sdlBasic accept end for

do : start a do-loop cycle
loop : the bottom of do-loop cycle
exit do : the exit of a do-loop cycle

*repeat : not implemented yet

*until : not implemented yet


or : condition in espression logic or
and : condition in espression logic and
xor : condition in espression logic xor
not : condition in espression logic not





Operator

[+] : addtional operator
[-] : substraction operator
[*] : multiply operator
[/] : division operator
[^] : exponetial operator
mod : rest of division operator
shl : shift left
shr : shift right



Array

dim [name][[index of array]] : declare an array note: array use [] for parentesis
*redim [name][[index of array]] : redeclare an array

shared [variable] : declare variable extern in a subrutine
common [variable] : declare variable or array global
lbound [array] : returns lower bound of array
*quicksort [array] : sort an array

ubound [array] : upperbound of array
erase [array] : free an array


Strings

asc(char) : returns ascii value of first char in string
chr(v) : return string corresponding to ascii key value
chr$(v) : return string corresponding to ascii key value
*format() : returns formatted string with embedded args

*format$() : returns formatted string with embedded args

insert(source$,target$,position) : insert source string to target at index
insert$(source$,target$,position) : insert source string to target at index
instr(optional start,source$,target$) : returns position in source that target was found
lcase(string$) : convert string to lower case
lcase$(string$) : convert string to lower case
left(string$,number) : returns leftmost chars in string
left$(string$,number) : returns leftmost chars in string
len(string$) : return length of string
length(string$) : return length of string
ltrim(string$) : returns string with left whitespace removed
ltrim$(string$) : returns string with left whitespace removed
mid(string$,start,optional end) : returns string with chars 1..n from source
mid$(string$,start,optional end) : returns string with chars 1..n from source
replace(opt index,source$,replace$) : replace string from source with replace starting at index
replace$(opt index,source$,replace$) : replace string from source with replace starting at index
replacesubstr(source$,rep$) : replace substring in source with withstring return the new string
replacesubstr$(source$,rep$) : replace substring in source with withstring return the new string
reverse(string$) : reverse a string return the new string
reverse$(string$) : reverse a string return the new string
right(string$,number) : returns rightmost chars in string
right$(string$,number) : returns rightmost chars in string
rinstr(optional start,source$,target$) : reverse Instr function, search from end to start
rtrim(string$) : right trim string
rtrim$(string$) : right trim string
space(n) : return string with n spaces in it
space$(n) : return string with n spaces in it
str(value) : return string representation of numeric expression
str$(value) : return string representation of numeric expression
strf(value) : converts a floating point or number value to a string
strf$(value) : converts a floating point or number value to a string
string(n,string$) : returns string m chars wide with n in it
string$(n,string$) : returns string m chars wide with n in it
tally(src$,sub$) : returns number of occurances of matchstring
trim(string$) : trim string
trim$(string$) : trim string
typeof(variable) : returns string with datatype
typeof$(variable) : returns string with datatype
ucase(string$) : convert string to upper case
ucase$(string$) : convert string to upper case
val(string$) : returns closest numeric representation of number



Maths

abs(value) : returns absolute value of number
acos(value) : returns arccos of number
asin(value) : returns arcsin of number
atan(value) : returns arctan of number
bin(value) : returns binary representation of number
bin$(value) : returns binary representation of number
cos(value) : returns cos of number
exp(value) : returns exponential function
fix(value) : truncate fractional number, rounding down towards zero
floor(value) : truncate fractional number, rounding down towards zero
frac(value) : return fractional portion of number
hex(value) : returns hexidecimal representation of number
hex$(value) : returns hexidecimal representation of number
int(value) : convert to 32 bit integer, truncating decimals
log(value) : returns natural log of expression
randomize(value) : reseed the random number generator
rnd(optional upper) : return an random number
round(value) : round to nearest integer
sgn(value) : returns sign of numeric expression
sin(value) : returns sine of given angle in radians
sqr(value) : return square root - make sure it's non-negative
tan(value) : return tanget of given angle in radians
min(value1,value2) : return min number of the operands
max(value1,value2) : return max number of the operands
bitwiseand(value1,value2) : return the logic and of the operands
andbit(value1,value2) : return the logic and of the operands
bitwiseor(value1,value2) : return the logic or of the operands
orbit(value1,value2) : return the logic or of the operands
bitwisexor(value1,value2) : return the logic xor of the operands
xorbit(value1,value2) : return the logic xor of the operands



Files

open[filename]for{input|output|append}as[stream]: open file stream
file input [stream] : read a line from file stream
input [stream] : read a line from file stream
file output [stream] : print a line in file stream
print [stream] : print a line in file stream
close [stream] : close file stream

eof(stream) : returns nonzero if Eof
fileexists(filename) : returns true if the file exists
filecopy(source,dest) : copy a file
filemove(source,dest) : move a file
filerename(filename,newname) : rename a file
freefile() : return the handle of the next free file
kill(filename) : delete filename. filename can be then path+filename
filedelete(filename) : delete filename. filename can be then path+filename
loc(stream) : returns position in file
lof(stream) : returns length of file
readbyte(stream) : return a byte from the file
rename(filename,newname) : rename file
seek(stream) : seek file position/return current file position
writebyte(stream,byte) : write a byte in the file



Dirs

chdir(path) : change directory
dir dir$ : returns current path
direxists(path) : returns true if directory exists
dirfirst(path) : returns first entry in path dir
dirnext : returns next entry in path dir
mkdir(path) : create a new directory
rmdir(path) : remove directory



Data Function

data(optional 0-255 param) : store the data
read(optional pointer) : without parameter read a data record with point change the next data loaded



Console Output

print [text|variable|number] : Print in standard output a espression (i use it for debugging output)


Date and Time

date() : returns date in MM-DD-YYYY format
date$() : returns date in MM-DD-YYYY format
time() : return time in HH:MM:SS format
time$() : return time in HH:MM:SS format
ticks() : returns current timer value



Memory Bank


reservebank(bank,size) : make a raw memory bank. there are 256 bank ( 0 - 255)
baseimage(bank,image) : link a memorybank from a imagebank bitmap access
baseimageCC(bank,image) : link a memorybank from a imagebank bitmap access with colorkey trasparency
basescreen(bank,image) : link a memorybank from a screen bitmap access
basesound(bank,sound) : link a memory bank with soundb bank

freebase(bank) : unconnect a memory bank with a image or screen
freebank(bank) : destroy a memory bank

copybank(s,d) : copy the bank s in d

loadbank(filename,optional bank) : load a file in memory bank (if omitted the current )
savebank(filename,optional bank) : save memory bank in a file

setbank(optional bank) : set the current bank (if omitted return the current)
currentbank(optional bank) : set the current bank (if omitted return the current)
sizebank(optional bank) : return the bank memory size (if omitted return the value of current bank)
banksize(optional bank) : return the bank memory size (if omitted return the value of current bank)

poke(optional bank,address,value) : write a byte value in memory bank at specific address
doke(optional bank,address,value) : write a 16bit value in memory bank at specific address
loke(optional bank,address,value) : write a 32bit value in memory bank at specific address

peek(optional bank,address) : read a byte value in memory bank at specific address
deek(optional bank,address) : read a 16bit value in memory bank at specific address
leek(optional bank,address) : read a 32bit value in memory bank at specific address

memcopy(sbank,s,dbank,d,size) : copy a part of bank memory s in d



Screen

setdefaults(w,h,bpp,m) : open the display, perform initializations on cursor and fonts and sets default values on sprites, bobs and screens system.
setdisplay(w,h,bpp,m) : open the screen/window in double buffer. 0=fullscreen|1=window|2=resizable|3=fullscreen software (provvisory)
setcaption(title) : change the display window title
setalphachannel(bool) : activate or deactivate alpha channel trasparency
caption() : return the display window title
displaymode : return the display mode
displaywidth : return the display width
displayheight : return the display height
displaybpp : return the display color depth

screen(n) : set the logic screen n without parameter return the current screen
screenz(n,z) : set the zorder position of screen if z =-1 report actual z position
lastscreen : return the last screen open
directscreen : direct drawing on display like a screen(more fast but sprite and offset does not works)
screenopen(n,w,h,dx,dy,dw,dh,flag) : open the logic screen n of dimension w,h in display coordinates dx,dy,dw,dh
screenclose(n) : close the logic screen n

screenclone(n,s,x,y,w,h,flag) : create a new viewport in logic screen s
screencopy(n,x,y,w,h,nd,xd,yd) : copy a portion of screen n in a screen nd
screenfade(n,t) : fade the screen n in t time in multitasking without parameter return 0 if terminate
screenfadeout(n,t) : fade the screen n in t time in multitasking without parameter return 0 if terminate
screenfadein(n,otional i,optional t) : fade the screen n to image i in t time in multitasking without parameter return 0 if terminate
screencrossfade(n,i,t) : fade the screen n from current screen to image i in t time in multitasking without parameter return 0 if terminate
screenalpha(n,a) : set alpha(trasparency) of screen n
screenlock(n) : lock the screen n for direct graphics access
screenunlock(n) : unlock the screen n for direct graphics access

screenrect(x,y,w,h,flag) : change the display output coordinates of the current screen
screenviewport(x,y,w,h,flag) : change the display output coordinates of the current screen
xscreenrect : give the x coordinate of current screen viewport
screenviewportx : give the x coordinate of current screen viewport
yscreenrect : give the y coordinate of current screen viewport
screenviewporty : give the y coordinate of current screen viewport
wscreenrect : give the w value of current screen viewport
screenviewportw : give the w value of current screen viewport
hscreenrect : give the h value of current screen viewport
screenviewporth : give the h value of current screen viewport
flagscreenrect : give the flag value of current screen viewport
screenviewportflag : give the flag value of current screen viewport

screenwidth : give the current screen width
screenheight : give the current screen height

offset(x,y) : set the logical current screen position
screenoffset(x,y) : set the logical current screen position
xoffset : give the x coordinate offset in current screen
screenoffsetx : give the x coordinate offset in current screen
yoffset : give the y coordinate offset in current screen
screenoffsety : give the y coordinate offset in current screen

cls : clear the current logic screen

screenswap : update display,bobsystem,spritesystem
autoback(m) : enable / disable automatic screenswap m=0 disable m>0 wait m milliseconds and perform screenswap m<0 perform the invocate in code screenswap after m milliseconds
setautoback(m) : enable / disable automatic screenswap m=0 disable m>0 wait m milliseconds and perform screenswap m<0 perform the invocate in code screenswap after m
dualplayfield(optional m) : set/unset automatic update of a screen upper sprite
waitvbl : wait automatic screenswap
fps(optional n) : set/unset or give the current frame rate counter (0/1/none)



Graphics

rgb(r,g,b) : give current color in Uint32 format
enablepalette(optional state) : enable disable and check the palettemode in 8 bit display
color (c,optional v) : set palette color c with value v se missing give the current color c
palette(optional 0-255 param) : set all palettes color(0,0xff,0xff00,....)
colorcycling(s,e,d=0|1,optional delay) : move the palette color one color forward or back work only in 8bit display
if you set delay automatically colorcycling work on multitasking
colorcycling() : stop the multitasking colorcycling
ink(c) : select the current color in Uint32 format

point(x,y) : give the color of x,y point
getpixel(x,y) : give the color of x,y point
dot(x,y) : write x,y point with a current color
setpixel(x,y) : write x,y point with a current color
putpixel(x,y) : write x,y point with a current color
plot(x,y,c) : write x,y point with a c color
line(x,y,x1,y1) : write a line
box(x,y,x1,y1) : write a empty rettangle
bar(x,y,x1,y1) : write a fill rettangle
circle(x,y,r) : write a circle
fillcircle(x,y,r) : write a fill circle
ellipse(x,y,rx,ry) : write a ellipse
fillellipse(x,y,rx,ry) : write a fill ellipse
paint(x,y) : fill a close area
triangle(xa,ya,xb,yb,xc,yc) : draw a fill triangle
polyline(xa,ya,xb,yb,xc,yc,.....) : draw an empty polygon
polygon(xa,ya,xb,yb,xc,yc,.....) : draw a fill polygon



File Graphics Input Output

loadimage(filename,optional n) : load a graphics file in a slot n if omitted n is the first free return n
loadzipimage(zipfile,filename,opt n) : load a zipped graphics file in a slot n if omitted n is the first free return n
saveimage(filename,n) : save slot n in a graphics file(only bmp)
loadsound(filename,opt n) : load a wave file in a sound slot n
loadzipsound(zipfile,filename,opt n) : load a zipped wave file in a sound slot n
?savesound(filename,n) : save a wave file from sound slot n (low quality result)

loadmusic(filename) : load a music module (mod family,ogg,mp3 and midi)



Image Manipulation

hotspot(n,x,y) : select the point of coordinates in a imageslot (n,0,0=up left(default) | n,1,1=center | n,2,2 =down right)n= image
setcolorkey(c) : set the colorkey for bitmap transparency if set -1 (default ) will be used the left-up corner color.
colorkey(c) : set the colorkey for bitmap transparency if set -1 (default ) will be used the left-up corner color.
imageexists(n) : give 1 if the image buffer n exist 0 if empty
imagewidth(n) : give the image n width or error if image n if empty
imageheight(n) : give the image n height or error if image n if empty
deleteimage(n) : erase the image n of the memory
copyimage(s,d) : copy image s to image d
setalpha(n,a) : set trasparency in image n
imagealpha(n,a) : set trasparency in image n
zoomimage(n,zoomx,zoomy) : zoom image
rotateimage(n,angle) : rotate image
rotozoomimage(n,angle,zoom) : rotate and zoom image
mirrorimage(n,x,y) : vertical-orizontal mirror



Blitting

blt(n,sx,sy,sw,sh,dx,dy) : copy a part of graphics slot in screen
pastebob(x,y,n) : copy on screen image n at x,y performing clip
pasteicon(x,y,n) : copy on screen image n at x,y without colorkey trasparency
grab(n,x,y,w,h) : grab a a selectarea and copy it in slot n



Sprite System

In this implementation there are 512 sprites software that are indipendent from the screens

spriteclip(x,y,w,h) : set the visibilty area of sprites
sprite(n,x,y,fr) : set or move the sprite n at x,y with image fr
deletesprite(n) : unset sprite n
xsprite(n) : give the x of sprite n
spritex(n) : give the x of sprite n
ysprite(n) : give the y of sprite n
spritey(n) : give the y of sprite n
spritewidth(n) : give the width of sprite n
spriteheight(n) : give the height of sprite n
frsprite(n) : give the frame of sprite n
spriteimage(n) : give the frame of sprite n
livesprite(n) : give 1 if sprite n is "live"
spriteexist(n) : give 1 if sprite n is "live"
spritehit(n,optional x) : give 1 if sprite n have a collission with sprite x if x=-1 with any
spritez(n,z) : set the zorder position of sprite if z omitted or-1 report actual z position
lastsprite : return the last sprite active
autoupdatesprite(m) : set/ unset automatic sprites update at screenswap
updatesprite : manual sprites updates at next screenswap



Bob System

In this implementation there are 512 bobs software that are dipendent from the screens and performs
background preserve

setbob(n,scr) : set bob n at logic screen scr
bob(n,x,y,fr) : set or move bob n at x,y with frame fr
deletebob(n) : unset bob n
xbob(n) : give x of bob n
bobx(n) : give x of bob n
ybob(n) : give y of bob n
boby(n) : give y of bob n
bobwidth(n) : give width of bob n
bobheight(n) : give height of bob n
frbob(n) : give the frame of bob n
bobimage(n) : give the frame of bob n
livebob(n) : give 1 if bob n is "live"
bobexist(n) : give 1 if bob n is "live"
bobhit(n,optional x) : give 1 if bob n have a collision with bob x if x=-1 with any
bobz(n,z) : set the zorder position of bob if z =-1 report actual z position
lastbob : return the last bob active
autoupdatebob(m) : set/ unset automatic bobs update at screenswap
updatebob : manual bobs updates at next screenswap



Text Draw

text(x,y,s,testo,optional type) : print the text testo on current screen with s size The type of render can be default=solid 1=Shaded 2=blended
setfont(path) : select the font
getfont() : return the current font
textrender(testo,s,optional n,optional type) : make an image slot n with the text write with a current font and size s if n is omitted use and return first free The type of render can be default=solid 1=Shaded 2=blended



Print Screen

pen(c) : set prints color (without parameter give the current color)
paper(c) : set caractere back color (without parameter give the current color)
fprints(testo) : print a text monospace without cariage return
prints(testo) : print a text monospace
locate(x,y) : move the cursor at x y
atx : give x of cursor
aty : give y of cursor
curson : show the text cursor on screen at(atx,aty)
cursoff : hide the text cursor
inputs(prompt,defs) : give the string insert to keyboard(default is default text)
zoneinputs(x,y,l,default) : give the string insert to keyboard in x,y coordinates with l lenght



Sounds and Music

isenabledsound() : return 1 if sdlsound was enabled
soundenabled() : return 1 if sdlsound was enabled

soundexists(n) : give 1 if the sound buffer n exist 0 if empty
deletesound(n) : delete from memory sound n
copysound(s,d) : copy sound bank s in sound bank d

musicexists() : give 1 if the music is load 0 if empty

playsound(n,c,optional l) : play the sound n in channel c l loops
playfreqsound(n,c,pitch,optional l) : play the sound n in channel with pitch resampling frequency c l loops
volumesound(c,optional v) : change the volume of channel c (-1 all) at value v (0-128) without v or -1 give the current volume
soundvolume(c,optional v) : change the volume of channel c (-1 all) at value v (0-128) without v or -1 give the current volume
stopsound(optional c) : stop the wave play in channel c (-1 or none =all)
pausesound(optional c) : paused channel c (-1 or none =all)
resumesound(optional c) : unpaused channel c (-1 or none =all)
?vumetersound(optional c) : give the current state of sound channel (-1 or none=all)

sound3d(c,angle,dist) : position sound in 3d space
positionsound(c,angle,dist) : position sound in 3d space
soundchannels(n) : dinamically change the number of channells managed by sdlBasic

playmusic(n) : play track xm,mod,ogg,mp3 n=number of ripetition(-1 always)
positionmusic(p) : move the execution at p second
stopmusic : terminate the music play
pausemusic : set pause of the current music
resumemusic : unset pause of musica
rewindmusic : report at start the music
fademusic(t) : music fade
volumemusic(optional v) : change the volume of music (0-128) -1 or none give the current volume
musicvolume(optional v) : change the volume of music (0-128) -1 or none give the current volume
speedmusic(v) : change the speed of music
musicspeed(v) : change the speed of music



CD Support

numdrivescd() : returns the number of cd-rom drives on the system.
countcddrives() : returns the number of cd-rom drives on the system.
namecd(drive) : returns a human-readable, system-dependent identifier for the cd-rom.
cdname(drive) : returns a human-readable, system-dependent identifier for the cd-rom.
opencd(n,drive) : opens a cd-rom drive for access.
indrivecd(n) : return 1 if cd is in driver
cdinserted(n) : return 1 if cd is in driver
trackscd(n) : return the number of tracks in cd
countcdtracks(n) : return the number of tracks in cd
curtrackcd(n) : return the current track in cd
cdcurtrack(n) : return the current track in cd
curframecd(n) : return the current frame in cd
cdcurframe(n) : return the current frame in cd
playcd(n,s,l) : play a cd
playtrackscd(n,trk1,fr1,ntrks,nfrs) : play the given cd track(s) from frame fr1 of trrack trk1 for ntrks/nfrs
playtrackscd(n,trk1,ntrks) : play the given cd track(s)from trk1 for ntracks
playtrackscd(n) : play all cd track(s)
playcdtracks(n,trk1,fr1,ntrks,nfrs) : play the given cd track(s) from frame fr1 of trrack trk1 for ntrks/nfrs
playcdtracks(n,trk1,ntrks) : play the given cd track(s)from trk1 for ntracks
playcdtracks(n) : play all cd track(s)
pausecd(n) : pauses a cdrom
resumecd(n) : resumes a cdrom
stopcd(n) : stops a cdrom
ejectcd(n) : ejects a cdrom
closecd(n) : closes a cd handle
tracktypecd(n,t) : return SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...)
cdtracktype(n,t) : return SDL_AUDIO_TRACK(0...) or SDL_DATA_TRACK(1...)
tracklengthcd(n,t) : return the length of track t
cdtracklength(n,t) : return the length of track t
trackoffsetcd(n,t) : return the offset to the beginning of this track in frames
cdtrackoffset(n,t) : return the offset to the beginning of this track in frames



Video Mpeg

loadmpeg(fname,usesound) : load a mpeg video
plaympeg(optional loop) : play a mpeg1 video
stopmpeg() : terminate the video play
deletempeg() : unload mpeg video
pausempeg() : Pause/Resume playback of an SMPEG object
rewindmpeg() : Rewind the play position of an SMPEG object to the beginning of the MPEG
seekmpeg(p) : Seek 'bytes' bytes in the MPEG stream
skipmpeg(s) : Skip 'seconds' seconds in the MPEG stream
statusmpeg() : return 1 if plaympeg work or 0 in other case



Keyboard

key(keycode) : give 1 if is press the key keycode
inkey : give ascii code of key press
waitkey(optional keycode) : wait a key pression (0 =any key)



Mouse

xmouse : give mouse x coordinate on display
ymouse : give mouse y coordinate on display
mousex : give mouse x coordinate on display
mousey : give mouse y coordinate on display
xmousescreen(n) : give mouse x coordinate on screen
ymousescreen(n) : give mouse y coordinate on screen
mousescreenx(n) : give mouse x coordinate on screen
mousescreeny(n) : give mouse y coordinate on screen
bmouse : give the buttonclick on the mouse
mousebutton : give the buttonclick on the mouse
changemouse(optional n) : change mouse from default(0) to emulate with sprite 0 - image 0 (1,2,3)without n return current pointer
mousepointer(optional n) : change mouse from default(0) to emulate with sprite 0 - image 0 (1,2,3)without n return current pointer
locatemouse(x,y) : move mouse at x y coordinates
placemouse(x,y) : move mouse at x y coordinates
mouseshow : show the mouse cursor
howmouse : show the mouse cursor
mousehide : hide the mouse cursor
hidemouse : hide the mouse cursor
mousezone(x,y,w,h) : give 1 if the mouse pointer is in rectangle(xy with size wh)



Joystick

numjoysticks : count available joysticks
namejoystick(index) : get joystick name
numaxesjoystick(i) : get the number of joystick axes
numballsjoystick(i) : get the number of joystick trackballs
numhatsjoystick(i) : get the number of joystick hats
numbuttonsjoystick(i) : get the number of joysitck buttons
getaxisjoystick(i,a) : get the current state of an axis
gethatjoystick(i,a) : get the current state of a joystick hat
getbuttonjoystick(i,a) : get the current state of a given button on a given joystick
xgetballjoystick(i,a) : get relative x trackball motion
ygetballjoystick(i,a) : get relative y trackball motion
joy(i) : return joystick boolean coordinate
bjoy(i) : return joystick buttons pressed in boolean expression
joybuttons(i) : return joystick buttons pressed in boolean expression
fire(i) : return joystick buttons pressed in boolean expression
waitbjoy(optional i) : wait for pressed joystick button (even in emulated joystick)



SDLtime

wait(t) : wait t milliseconds
timer : give the current tick



Socket

isenabledsock() : return 1 if sdlnet was enabled

sock=getfreesock() : return the first free sock in sdlSocket array
sock=OpenSock(port) : Server side socket sock is the stream. in sdlBasic there are 256 stream and
sintax is very similar of file open close.
clientsock=AcceptSock(serversock) : Accept the client connection
IsServerReady(Sock) : True/False if server is sending data    
sock=ConnectSock(ServerName,port) : client side socket connection
*ConnectionReadySock(sock) : the server have accepted the connection

IsClientReady(Sock) : True/False if client is sending data
CloseSock(sock) : Close the socket connection. Works for client and server
*PeekSock(Sock, NumBytes) : Peek information coming from socket, but do not clear.

ReadSock(Sock, NumBytes) : Read NumBytes
ReadByteSock(Sock) : Read a single byte      
ReadLineSock(Sock) : Read complete line
WriteSock(Sock, Message, NumBytes) : Sends NumBytes from Message
WriteByteSock(Sock, Byte) : Sends a single byte
WriteLineSock(Sock, Message) : Send Message
getremoteip(sock) : return the ip address of remote client connetted
getremoteport(sock) : return the port address of remote client connetted
?getlocalip() : return the local ip (not work on windows)






generated with sdlbasic
graphics zoiba

usr/src/sdlBasic/share/doc/sdlBasic/english/font-license0000777000076500007660000000471410463121761020510 0ustar Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. Bitstream Vera Fonts Copyright ------------------------------ Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera". This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names. The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org. $Id: font-license,v 1.1.1.1 2005/09/24 19:52:29 vroby Exp $ usr/src/sdlBasic/bin/0000777000000000000000000000000010645354306013462 5ustar rootroot