diff
stringlengths
41
2.03M
msg
stringlengths
1
1.5k
repo
stringlengths
5
40
sha
stringlengths
40
40
time
stringlengths
20
20
mmm a / hphp / runtime / ext / json / JSON_parser . cpp <nl> ppp b / hphp / runtime / ext / json / JSON_parser . cpp <nl> static void object_set ( Variant & var , <nl> collections : : set ( var . getObjectData ( ) , & keyTV , value . asCell ( ) ) ; <nl> } else if ( container_type = = JSONContainerType : : HACK_ARRAYS ) { <nl> forceToDict ( var ) . set ( key , value ) ; <nl> - } else if ( container_type = = JSONContainerType : : DARRAYS ) { <nl> + } else if ( container_type = = JSONContainerType : : DARRAYS | | <nl> + container_type = = JSONContainerType : : DARRAYS_AND_VARRAYS ) { <nl> forceToDArray ( var ) . set ( key , value ) ; <nl> } else { <nl> forceToArray ( var ) . set ( key , value ) ; <nl> JSONContainerType get_container_type_from_options ( int64_t options ) { <nl> return JSONContainerType : : DARRAYS ; <nl> } <nl> <nl> + if ( options & k_JSON_FB_DARRAYS_AND_VARRAYS ) { <nl> + return JSONContainerType : : DARRAYS_AND_VARRAYS ; <nl> + } <nl> + <nl> return JSONContainerType : : PHP_ARRAYS ; <nl> } <nl> <nl> JSONContainerType get_container_type_from_options ( int64_t options ) { <nl> * machine with a stack . <nl> * <nl> * The behavior is as follows : <nl> - * Container Type | is_assoc | JSON input = > output type <nl> + * Container Type | is_assoc | JSON input = > output type <nl> + * <nl> + * COLLECTIONS | true | " { } " = > c_Map <nl> + * COLLECTIONS | false | " { } " = > c_Map <nl> + * COLLECTIONS | true | " [ ] " = > c_Vector <nl> + * COLLECTIONS | false | " [ ] " = > c_Vector <nl> * <nl> - * COLLECTIONS | true | " { } " = > c_Map <nl> - * COLLECTIONS | false | " { } " = > c_Map <nl> - * COLLECTIONS | true | " [ ] " = > c_Vector <nl> - * COLLECTIONS | false | " [ ] " = > c_Vector <nl> + * HACK_ARRAYS | true | " { } " = > dict <nl> + * HACK_ARRAYS | false | " { } " = > stdClass <nl> + * HACK_ARRAYS | true | " [ ] " = > vec <nl> + * HACK_ARRAYS | false | " [ ] " = > stdClass <nl> * <nl> - * HACK_ARRAYS | true | " { } " = > dict <nl> - * HACK_ARRAYS | false | " { } " = > stdClass <nl> - * HACK_ARRAYS | true | " [ ] " = > vec <nl> - * HACK_ARRAYS | false | " [ ] " = > stdClass <nl> + * DARRAYS | true | " { } " = > darray <nl> + * DARRAYS | false | " { } " = > stdClass <nl> + * DARRAYS | true | " [ ] " = > darray <nl> + * DARRAYS | false | " [ ] " = > stdClass <nl> * <nl> - * DARRAYS | true | " { } " = > darray <nl> - * DARRAYS | false | " { } " = > stdClass <nl> - * DARRAYS | true | " [ ] " = > darray <nl> - * DARRAYS | false | " [ ] " = > stdClass <nl> + * PHP_ARRAYS | true | " { } " = > array <nl> + * PHP_ARRAYS | false | " { } " = > stdClass <nl> + * PHP_ARRAYS | true | " [ ] " = > array <nl> + * PHP_ARRAYS | false | " [ ] " = > stdClass <nl> * <nl> - * PHP_ARRAYS | true | " { } " = > array <nl> - * PHP_ARRAYS | false | " { } " = > stdClass <nl> - * PHP_ARRAYS | true | " [ ] " = > array <nl> - * PHP_ARRAYS | false | " [ ] " = > stdClass <nl> + * DARRAYS_AND_VARRAYS | true | " { } " = > darray <nl> + * DARRAYS_AND_VARRAYS | false | " { } " = > stdClass <nl> + * DARRAYS_AND_VARRAYS | true | " [ ] " = > varray <nl> + * DARRAYS_AND_VARRAYS | false | " [ ] " = > stdClass <nl> * / <nl> bool JSON_parser ( Variant & z , const char * p , int length , bool const assoc , <nl> int depth , int64_t options ) { <nl> bool JSON_parser ( Variant & z , const char * p , int length , bool const assoc , <nl> / * < fb > * / <nl> } else if ( container_type = = JSONContainerType : : HACK_ARRAYS ) { <nl> top = Array : : CreateDict ( ) ; <nl> - } else if ( container_type = = JSONContainerType : : DARRAYS ) { <nl> + } else if ( container_type = = JSONContainerType : : DARRAYS | | <nl> + container_type = = JSONContainerType : : DARRAYS_AND_VARRAYS ) <nl> + { <nl> top = Array : : CreateDArray ( ) ; <nl> / * < / fb > * / <nl> } else { <nl> bool JSON_parser ( Variant & z , const char * p , int length , bool const assoc , <nl> top = req : : make < c_Vector > ( ) ; <nl> } else if ( container_type = = JSONContainerType : : HACK_ARRAYS ) { <nl> top = Array : : CreateVec ( ) ; <nl> + } else if ( container_type = = JSONContainerType : : DARRAYS_AND_VARRAYS ) { <nl> + top = Array : : CreateVArray ( ) ; <nl> } else if ( container_type = = JSONContainerType : : DARRAYS ) { <nl> top = Array : : CreateDArray ( ) ; <nl> } else { <nl> mmm a / hphp / runtime / ext / json / JSON_parser . h <nl> ppp b / hphp / runtime / ext / json / JSON_parser . h <nl> enum class JSONContainerType { <nl> COLLECTIONS = 2 , <nl> HACK_ARRAYS = 3 , <nl> DARRAYS = 4 , <nl> + DARRAYS_AND_VARRAYS = 5 , <nl> } ; <nl> <nl> struct StringBuffer ; <nl> mmm a / hphp / runtime / ext / json / ext_json . cpp <nl> ppp b / hphp / runtime / ext / json / ext_json . cpp <nl> const int64_t k_JSON_FB_HACK_ARRAYS = 1 < < 25 ; <nl> const int64_t k_JSON_FB_FORCE_PHP_ARRAYS = 1 < < 26 ; <nl> const int64_t k_JSON_FB_WARN_DICTS = 1 < < 27 ; <nl> const int64_t k_JSON_FB_WARN_PHP_ARRAYS = 1 < < 28 ; <nl> + const int64_t k_JSON_FB_DARRAYS_AND_VARRAYS = 1 < < 29 ; <nl> <nl> const int64_t k_JSON_ERROR_NONE <nl> = json_error_codes : : JSON_ERROR_NONE ; <nl> TypedValue HHVM_FUNCTION ( json_decode , const String & json , <nl> k_JSON_FB_STABLE_MAPS | <nl> k_JSON_BIGINT_AS_STRING | <nl> k_JSON_FB_HACK_ARRAYS | <nl> - k_JSON_FB_DARRAYS ; <nl> + k_JSON_FB_DARRAYS | <nl> + k_JSON_FB_DARRAYS_AND_VARRAYS ; <nl> int64_t parser_options = options & supported_options ; <nl> Variant z ; <nl> const auto ok = <nl> mmm a / hphp / runtime / ext / json / ext_json . h <nl> ppp b / hphp / runtime / ext / json / ext_json . h <nl> extern const int64_t k_JSON_FB_COLLECTIONS ; <nl> extern const int64_t k_JSON_FB_HACK_ARRAYS ; <nl> extern const int64_t k_JSON_FB_STABLE_MAPS ; <nl> extern const int64_t k_JSON_BIGINT_AS_STRING ; <nl> + extern const int64_t k_JSON_FB_DARRAYS_AND_VARRAYS ; <nl> <nl> extern const int64_t k_JSON_ERROR_NONE ; <nl> extern const int64_t k_JSON_ERROR_DEPTH ; <nl> new file mode 100644 <nl> index 00000000000 . . 973c5b9ea51 <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / dv_array / ext_json . php <nl> <nl> + < ? hh <nl> + <nl> + function decode ( $ input ) { <nl> + / / We don ' t expose this option in userland : we only want to use it internally <nl> + return json_decode ( $ input , true , 512 , 1 < < 29 ) ; <nl> + } <nl> + <nl> + / / JSON input , is_varray , is_darray <nl> + function cases ( ) : vec < ( string , bool , bool ) > { <nl> + return vec [ <nl> + tuple ( ' [ ] ' , true , false ) , <nl> + tuple ( ' { } ' , false , true ) , <nl> + tuple ( ' [ 1 , 2 , 3 ] ' , true , false ) , <nl> + tuple ( ' { " foo " : null } ' , false , true ) , <nl> + ] ; <nl> + } <nl> + <nl> + function deep_case ( ) { <nl> + $ res = decode ( ' [ { " bar " : 0 } , [ 1 , 2 , 3 ] ] ' ) ; <nl> + invariant ( is_varray ( $ res ) , ' Expected top - level to be varray ' ) ; <nl> + invariant ( is_darray ( $ res [ 0 ] ) , ' Expected 0th element to be darray ' ) ; <nl> + invariant ( is_varray ( $ res [ 1 ] ) , ' Expected 1st element to be varray ' ) ; <nl> + } <nl> + <nl> + < < __EntryPoint > > <nl> + function main ( ) { <nl> + foreach ( cases ( ) as $ case ) { <nl> + list ( $ input , $ is_varray , $ is_darray ) = $ case ; <nl> + invariant ( <nl> + is_varray ( decode ( $ input ) ) = = = $ is_varray , <nl> + ' Expected input to % s varray ' , <nl> + $ is_varray ? ' be ' : ' not be ' , <nl> + ) ; <nl> + invariant ( <nl> + is_darray ( decode ( $ input ) ) = = = $ is_darray , <nl> + ' Expected input to % s darray ' , <nl> + $ is_varray ? ' be ' : ' not be ' , <nl> + ) ; <nl> + } <nl> + deep_case ( ) ; <nl> + } <nl> new file mode 100644 <nl> index 00000000000 . . e69de29bb2d <nl> new file mode 100644 <nl> index 00000000000 . . 2a2ecb9c9f5 <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / dv_array / ext_json . php . hphp_opts <nl> <nl> + - vRuntime . Eval . HackArrCompatTypeHintNotices = 1 <nl> + - vEnableHipHopSyntax = 1 <nl> new file mode 100644 <nl> index 00000000000 . . 96b5573880a <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / dv_array / ext_json . php . opts <nl> <nl> + - vEval . HackArrCompatTypeHintNotices = 1 <nl> + - vEval . EnableHipHopSyntax = 1 <nl> new file mode 100644 <nl> index 00000000000 . . 973c5b9ea51 <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / dv_array_hack_arr / ext_json . php <nl> <nl> + < ? hh <nl> + <nl> + function decode ( $ input ) { <nl> + / / We don ' t expose this option in userland : we only want to use it internally <nl> + return json_decode ( $ input , true , 512 , 1 < < 29 ) ; <nl> + } <nl> + <nl> + / / JSON input , is_varray , is_darray <nl> + function cases ( ) : vec < ( string , bool , bool ) > { <nl> + return vec [ <nl> + tuple ( ' [ ] ' , true , false ) , <nl> + tuple ( ' { } ' , false , true ) , <nl> + tuple ( ' [ 1 , 2 , 3 ] ' , true , false ) , <nl> + tuple ( ' { " foo " : null } ' , false , true ) , <nl> + ] ; <nl> + } <nl> + <nl> + function deep_case ( ) { <nl> + $ res = decode ( ' [ { " bar " : 0 } , [ 1 , 2 , 3 ] ] ' ) ; <nl> + invariant ( is_varray ( $ res ) , ' Expected top - level to be varray ' ) ; <nl> + invariant ( is_darray ( $ res [ 0 ] ) , ' Expected 0th element to be darray ' ) ; <nl> + invariant ( is_varray ( $ res [ 1 ] ) , ' Expected 1st element to be varray ' ) ; <nl> + } <nl> + <nl> + < < __EntryPoint > > <nl> + function main ( ) { <nl> + foreach ( cases ( ) as $ case ) { <nl> + list ( $ input , $ is_varray , $ is_darray ) = $ case ; <nl> + invariant ( <nl> + is_varray ( decode ( $ input ) ) = = = $ is_varray , <nl> + ' Expected input to % s varray ' , <nl> + $ is_varray ? ' be ' : ' not be ' , <nl> + ) ; <nl> + invariant ( <nl> + is_darray ( decode ( $ input ) ) = = = $ is_darray , <nl> + ' Expected input to % s darray ' , <nl> + $ is_varray ? ' be ' : ' not be ' , <nl> + ) ; <nl> + } <nl> + deep_case ( ) ; <nl> + } <nl> new file mode 100644 <nl> index 00000000000 . . e69de29bb2d <nl> new file mode 100644 <nl> index 00000000000 . . e412e606da7 <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / dv_array_hack_arr / ext_json . php . hphp_opts <nl> <nl> + - vRuntime . Eval . HackArrCompatTypeHintNotices = 1 <nl> + - vEnableHipHopSyntax = 1 <nl> + - vHackArrDVArrs = 1 <nl> new file mode 100644 <nl> index 00000000000 . . b0b0401ca3f <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / dv_array_hack_arr / ext_json . php . opts <nl> <nl> + - vEval . HackArrCompatTypeHintNotices = 1 <nl> + - vEval . EnableHipHopSyntax = 1 <nl> + - vEval . HackArrDVArrs = true <nl>
Add unexposed option for json_decode to return varray / darray
facebook/hhvm
17e3111a51022c3afb928979955c892c7e5c6911
2018-08-14T22:31:48Z
mmm a / BUILD . gn <nl> ppp b / BUILD . gn <nl> group ( " blink_unittests " ) { <nl> testonly = true <nl> <nl> deps = [ <nl> - " / / third_party / WebKit / public : all_blink " , <nl> - " / / third_party / WebKit / public : test_support " , <nl> + " / / third_party / blink / public : all_blink " , <nl> + " / / third_party / blink / public : test_support " , <nl> ] <nl> } <nl> <nl>
Update test targets paths for Blink
electron/electron
f6080b04ea63f31c5e09d850049572294f8c306e
2018-09-11T18:24:03Z
mmm a / tensorflow / core / common_runtime / eager / BUILD <nl> ppp b / tensorflow / core / common_runtime / eager / BUILD <nl> tf_cc_test ( <nl> deps = [ <nl> " : eager_op_rewrite_registry " , <nl> " / / tensorflow / core : lib " , <nl> + " / / tensorflow / core : no_op_op_lib " , <nl> " / / tensorflow / core : test " , <nl> " / / tensorflow / core : test_main " , <nl> ] , <nl>
Add noop dependency to eager_op_rewrite_graph_registry_test
tensorflow/tensorflow
09f68fb13f0ab789a8495049b15dafff21005e3c
2020-02-13T15:51:10Z
mmm a / scene / gui / item_list . cpp <nl> ppp b / scene / gui / item_list . cpp <nl> void ItemList : : _bind_methods ( ) { <nl> ClassDB : : bind_method ( D_METHOD ( " set_auto_height " , " enable " ) , & ItemList : : set_auto_height ) ; <nl> ClassDB : : bind_method ( D_METHOD ( " has_auto_height " ) , & ItemList : : has_auto_height ) ; <nl> <nl> + ClassDB : : bind_method ( D_METHOD ( " is_anything_selected " ) , & ItemList : : is_anything_selected ) ; <nl> + <nl> ClassDB : : bind_method ( D_METHOD ( " get_item_at_position " , " position " , " exact " ) , & ItemList : : get_item_at_position , DEFVAL ( false ) ) ; <nl> <nl> ClassDB : : bind_method ( D_METHOD ( " ensure_current_is_visible " ) , & ItemList : : ensure_current_is_visible ) ; <nl>
Merge pull request from AlexHolly / expose - itemlist - is_anything_selected
godotengine/godot
67a5a39dee825537e64e4153cd6444542bb8a4fa
2018-03-13T08:23:31Z
mmm a / src / node / ext / server . cc <nl> ppp b / src / node / ext / server . cc <nl> Server : : Server ( grpc_server * server ) : wrapped_server ( server ) { <nl> Server : : ~ Server ( ) { <nl> this - > ShutdownServer ( ) ; <nl> grpc_completion_queue_shutdown ( this - > shutdown_queue ) ; <nl> - grpc_server_destroy ( wrapped_server ) ; <nl> + grpc_server_destroy ( this - > wrapped_server ) ; <nl> grpc_completion_queue_destroy ( this - > shutdown_queue ) ; <nl> } <nl> <nl> void Server : : Init ( Handle < Object > exports ) { <nl> NanSetPrototypeTemplate ( tpl , " start " , <nl> NanNew < FunctionTemplate > ( Start ) - > GetFunction ( ) ) ; <nl> <nl> - NanSetPrototypeTemplate ( tpl , " shutdown " , <nl> - NanNew < FunctionTemplate > ( Shutdown ) - > GetFunction ( ) ) ; <nl> + NanSetPrototypeTemplate ( tpl , " tryShutdown " , <nl> + NanNew < FunctionTemplate > ( TryShutdown ) - > GetFunction ( ) ) ; <nl> + NanSetPrototypeTemplate ( <nl> + tpl , " forceShutdown " , <nl> + NanNew < FunctionTemplate > ( ForceShutdown ) - > GetFunction ( ) ) ; <nl> <nl> NanAssignPersistent ( fun_tpl , tpl ) ; <nl> Handle < Function > ctr = tpl - > GetFunction ( ) ; <nl> bool Server : : HasInstance ( Handle < Value > val ) { <nl> } <nl> <nl> void Server : : ShutdownServer ( ) { <nl> - if ( this - > wrapped_server ! = NULL ) { <nl> - grpc_server_shutdown_and_notify ( this - > wrapped_server , <nl> - this - > shutdown_queue , <nl> - NULL ) ; <nl> - grpc_completion_queue_pluck ( this - > shutdown_queue , NULL , <nl> - gpr_inf_future ( GPR_CLOCK_REALTIME ) , NULL ) ; <nl> - this - > wrapped_server = NULL ; <nl> - } <nl> + grpc_server_shutdown_and_notify ( this - > wrapped_server , <nl> + this - > shutdown_queue , <nl> + NULL ) ; <nl> + grpc_server_cancel_all_calls ( this - > wrapped_server ) ; <nl> + grpc_completion_queue_pluck ( this - > shutdown_queue , NULL , <nl> + gpr_inf_future ( GPR_CLOCK_REALTIME ) , NULL ) ; <nl> } <nl> <nl> NAN_METHOD ( Server : : New ) { <nl> NAN_METHOD ( Server : : RequestCall ) { <nl> return NanThrowTypeError ( " requestCall can only be called on a Server " ) ; <nl> } <nl> Server * server = ObjectWrap : : Unwrap < Server > ( args . This ( ) ) ; <nl> - if ( server - > wrapped_server = = NULL ) { <nl> - return NanThrowError ( " requestCall cannot be called on a shut down Server " ) ; <nl> - } <nl> NewCallOp * op = new NewCallOp ( ) ; <nl> unique_ptr < OpVec > ops ( new OpVec ( ) ) ; <nl> ops - > push_back ( unique_ptr < Op > ( op ) ) ; <nl> NAN_METHOD ( Server : : AddHttp2Port ) { <nl> " addHttp2Port ' s second argument must be ServerCredentials " ) ; <nl> } <nl> Server * server = ObjectWrap : : Unwrap < Server > ( args . This ( ) ) ; <nl> - if ( server - > wrapped_server = = NULL ) { <nl> - return NanThrowError ( <nl> - " addHttp2Port cannot be called on a shut down Server " ) ; <nl> - } <nl> ServerCredentials * creds_object = ObjectWrap : : Unwrap < ServerCredentials > ( <nl> args [ 1 ] - > ToObject ( ) ) ; <nl> grpc_server_credentials * creds = creds_object - > GetWrappedServerCredentials ( ) ; <nl> NAN_METHOD ( Server : : Start ) { <nl> return NanThrowTypeError ( " start can only be called on a Server " ) ; <nl> } <nl> Server * server = ObjectWrap : : Unwrap < Server > ( args . This ( ) ) ; <nl> - if ( server - > wrapped_server = = NULL ) { <nl> - return NanThrowError ( " start cannot be called on a shut down Server " ) ; <nl> - } <nl> grpc_server_start ( server - > wrapped_server ) ; <nl> NanReturnUndefined ( ) ; <nl> } <nl> <nl> - NAN_METHOD ( ShutdownCallback ) { <nl> + NAN_METHOD ( Server : : TryShutdown ) { <nl> + NanScope ( ) ; <nl> + if ( ! HasInstance ( args . This ( ) ) ) { <nl> + return NanThrowTypeError ( " tryShutdown can only be called on a Server " ) ; <nl> + } <nl> + Server * server = ObjectWrap : : Unwrap < Server > ( args . This ( ) ) ; <nl> + unique_ptr < OpVec > ops ( new OpVec ( ) ) ; <nl> + grpc_server_shutdown_and_notify ( <nl> + server - > wrapped_server , <nl> + CompletionQueueAsyncWorker : : GetQueue ( ) , <nl> + new struct tag ( new NanCallback ( args [ 0 ] . As < Function > ( ) ) , ops . release ( ) , <nl> + shared_ptr < Resources > ( nullptr ) ) ) ; <nl> + CompletionQueueAsyncWorker : : Next ( ) ; <nl> NanReturnUndefined ( ) ; <nl> } <nl> <nl> - NAN_METHOD ( Server : : Shutdown ) { <nl> + NAN_METHOD ( Server : : ForceShutdown ) { <nl> NanScope ( ) ; <nl> if ( ! HasInstance ( args . This ( ) ) ) { <nl> - return NanThrowTypeError ( " shutdown can only be called on a Server " ) ; <nl> + return NanThrowTypeError ( " forceShutdown can only be called on a Server " ) ; <nl> } <nl> Server * server = ObjectWrap : : Unwrap < Server > ( args . This ( ) ) ; <nl> server - > ShutdownServer ( ) ; <nl> mmm a / src / node / ext / server . h <nl> ppp b / src / node / ext / server . h <nl> class Server : public : : node : : ObjectWrap { <nl> static NAN_METHOD ( RequestCall ) ; <nl> static NAN_METHOD ( AddHttp2Port ) ; <nl> static NAN_METHOD ( Start ) ; <nl> - static NAN_METHOD ( Shutdown ) ; <nl> + static NAN_METHOD ( TryShutdown ) ; <nl> + static NAN_METHOD ( ForceShutdown ) ; <nl> static NanCallback * constructor ; <nl> static v8 : : Persistent < v8 : : FunctionTemplate > fun_tpl ; <nl> <nl> mmm a / src / node / src / server . js <nl> ppp b / src / node / src / server . js <nl> function Server ( options ) { <nl> } <nl> server . requestCall ( handleNewCall ) ; <nl> } ; <nl> + <nl> + / * * <nl> + * Gracefully shuts down the server . The server will stop receiving new calls , <nl> + * and any pending calls will complete . The callback will be called when all <nl> + * pending calls have completed and the server is fully shut down . This method <nl> + * is idempotent with itself and forceShutdown . <nl> + * @ param { function ( ) } callback The shutdown complete callback <nl> + * / <nl> + this . tryShutdown = function ( callback ) { <nl> + server . tryShutdown ( callback ) ; <nl> + } ; <nl> + <nl> / * * <nl> - * Shuts down the server . <nl> + * Forcibly shuts down the server . The server will stop receiving new calls <nl> + * and cancel all pending calls . When it returns , the server has shut down . <nl> + * This method is idempotent with itself and tryShutdown , and it will trigger <nl> + * any outstanding tryShutdown callbacks . <nl> * / <nl> - this . shutdown = function ( ) { <nl> - server . shutdown ( ) ; <nl> + this . forceShutdown = function ( ) { <nl> + server . forceShutdown ( ) ; <nl> } ; <nl> } <nl> <nl> mmm a / src / node / test / call_test . js <nl> ppp b / src / node / test / call_test . js <nl> describe ( ' call ' , function ( ) { <nl> channel = new grpc . Channel ( ' localhost : ' + port , insecureCreds ) ; <nl> } ) ; <nl> after ( function ( ) { <nl> - server . shutdown ( ) ; <nl> + server . forceShutdown ( ) ; <nl> } ) ; <nl> describe ( ' constructor ' , function ( ) { <nl> it ( ' should reject anything less than 3 arguments ' , function ( ) { <nl> mmm a / src / node / test / end_to_end_test . js <nl> ppp b / src / node / test / end_to_end_test . js <nl> describe ( ' end - to - end ' , function ( ) { <nl> channel = new grpc . Channel ( ' localhost : ' + port_num , insecureCreds ) ; <nl> } ) ; <nl> after ( function ( ) { <nl> - server . shutdown ( ) ; <nl> + server . forceShutdown ( ) ; <nl> } ) ; <nl> it ( ' should start and end a request without error ' , function ( complete ) { <nl> var done = multiDone ( complete , 2 ) ; <nl> mmm a / src / node / test / health_test . js <nl> ppp b / src / node / test / health_test . js <nl> describe ( ' Health Checking ' , function ( ) { <nl> grpc . Credentials . createInsecure ( ) ) ; <nl> } ) ; <nl> after ( function ( ) { <nl> - healthServer . shutdown ( ) ; <nl> + healthServer . forceShutdown ( ) ; <nl> } ) ; <nl> it ( ' should say an enabled service is SERVING ' , function ( done ) { <nl> healthClient . check ( { service : ' ' } , function ( err , response ) { <nl> mmm a / src / node / test / interop_sanity_test . js <nl> ppp b / src / node / test / interop_sanity_test . js <nl> describe ( ' Interop tests ' , function ( ) { <nl> done ( ) ; <nl> } ) ; <nl> after ( function ( ) { <nl> - server . shutdown ( ) ; <nl> + server . forceShutdown ( ) ; <nl> } ) ; <nl> / / This depends on not using a binary stream <nl> it ( ' should pass empty_unary ' , function ( done ) { <nl> mmm a / src / node / test / math_client_test . js <nl> ppp b / src / node / test / math_client_test . js <nl> describe ( ' Math client ' , function ( ) { <nl> done ( ) ; <nl> } ) ; <nl> after ( function ( ) { <nl> - server . shutdown ( ) ; <nl> + server . forceShutdown ( ) ; <nl> } ) ; <nl> it ( ' should handle a single request ' , function ( done ) { <nl> var arg = { dividend : 7 , divisor : 4 } ; <nl> mmm a / src / node / test / server_test . js <nl> ppp b / src / node / test / server_test . js <nl> describe ( ' server ' , function ( ) { <nl> server . addHttp2Port ( ' 0 . 0 . 0 . 0 : 0 ' , grpc . ServerCredentials . createInsecure ( ) ) ; <nl> } ) ; <nl> after ( function ( ) { <nl> - server . shutdown ( ) ; <nl> + server . forceShutdown ( ) ; <nl> } ) ; <nl> it ( ' should start without error ' , function ( ) { <nl> assert . doesNotThrow ( function ( ) { <nl> describe ( ' server ' , function ( ) { <nl> } ) ; <nl> } ) ; <nl> } ) ; <nl> + describe ( ' shutdown ' , function ( ) { <nl> + var server ; <nl> + beforeEach ( function ( ) { <nl> + server = new grpc . Server ( ) ; <nl> + server . addHttp2Port ( ' 0 . 0 . 0 . 0 : 0 ' , grpc . ServerCredentials . createInsecure ( ) ) ; <nl> + server . start ( ) ; <nl> + } ) ; <nl> + afterEach ( function ( ) { <nl> + server . forceShutdown ( ) ; <nl> + } ) ; <nl> + it ( ' tryShutdown should shutdown successfully ' , function ( done ) { <nl> + server . tryShutdown ( done ) ; <nl> + } ) ; <nl> + it ( ' forceShutdown should shutdown successfully ' , function ( ) { <nl> + server . forceShutdown ( ) ; <nl> + } ) ; <nl> + it ( ' tryShutdown should be idempotent ' , function ( done ) { <nl> + server . tryShutdown ( done ) ; <nl> + server . tryShutdown ( function ( ) { } ) ; <nl> + } ) ; <nl> + it ( ' forceShutdown should be idempotent ' , function ( ) { <nl> + server . forceShutdown ( ) ; <nl> + server . forceShutdown ( ) ; <nl> + } ) ; <nl> + it ( ' forceShutdown should trigger tryShutdown ' , function ( done ) { <nl> + server . tryShutdown ( done ) ; <nl> + server . forceShutdown ( ) ; <nl> + } ) ; <nl> + } ) ; <nl> } ) ; <nl> mmm a / src / node / test / surface_test . js <nl> ppp b / src / node / test / surface_test . js <nl> describe ( ' Server . prototype . addProtoService ' , function ( ) { <nl> server = new grpc . Server ( ) ; <nl> } ) ; <nl> afterEach ( function ( ) { <nl> - server . shutdown ( ) ; <nl> + server . forceShutdown ( ) ; <nl> } ) ; <nl> it ( ' Should succeed with a single service ' , function ( ) { <nl> assert . doesNotThrow ( function ( ) { <nl> describe ( ' Client # $ waitForReady ' , function ( ) { <nl> client = new Client ( ' localhost : ' + port , grpc . Credentials . createInsecure ( ) ) ; <nl> } ) ; <nl> after ( function ( ) { <nl> - server . shutdown ( ) ; <nl> + server . forceShutdown ( ) ; <nl> } ) ; <nl> it ( ' should complete when called alone ' , function ( done ) { <nl> client . $ waitForReady ( Infinity , function ( error ) { <nl> describe ( ' Echo service ' , function ( ) { <nl> server . start ( ) ; <nl> } ) ; <nl> after ( function ( ) { <nl> - server . shutdown ( ) ; <nl> + server . forceShutdown ( ) ; <nl> } ) ; <nl> it ( ' should echo the recieved message directly ' , function ( done ) { <nl> client . echo ( { value : ' test value ' , value2 : 3 } , function ( error , response ) { <nl> describe ( ' Generic client and server ' , function ( ) { <nl> grpc . Credentials . createInsecure ( ) ) ; <nl> } ) ; <nl> after ( function ( ) { <nl> - server . shutdown ( ) ; <nl> + server . forceShutdown ( ) ; <nl> } ) ; <nl> it ( ' Should respond with a capitalized string ' , function ( done ) { <nl> client . capitalize ( ' abc ' , function ( err , response ) { <nl> describe ( ' Echo metadata ' , function ( ) { <nl> server . start ( ) ; <nl> } ) ; <nl> after ( function ( ) { <nl> - server . shutdown ( ) ; <nl> + server . forceShutdown ( ) ; <nl> } ) ; <nl> it ( ' with unary call ' , function ( done ) { <nl> var call = client . unary ( { } , function ( err , data ) { <nl> describe ( ' Other conditions ' , function ( ) { <nl> server . start ( ) ; <nl> } ) ; <nl> after ( function ( ) { <nl> - server . shutdown ( ) ; <nl> + server . forceShutdown ( ) ; <nl> } ) ; <nl> it ( ' channel . getTarget should be available ' , function ( ) { <nl> assert . strictEqual ( typeof client . channel . getTarget ( ) , ' string ' ) ; <nl> describe ( ' Other conditions ' , function ( ) { <nl> } ) ; <nl> afterEach ( function ( ) { <nl> console . log ( ' Shutting down server ' ) ; <nl> - proxy . shutdown ( ) ; <nl> + proxy . forceShutdown ( ) ; <nl> } ) ; <nl> describe ( ' Cancellation ' , function ( ) { <nl> it ( ' With a unary call ' , function ( done ) { <nl> describe ( ' Cancelling surface client ' , function ( ) { <nl> server . start ( ) ; <nl> } ) ; <nl> after ( function ( ) { <nl> - server . shutdown ( ) ; <nl> + server . forceShutdown ( ) ; <nl> } ) ; <nl> it ( ' Should correctly cancel a unary call ' , function ( done ) { <nl> var call = client . div ( { ' divisor ' : 0 , ' dividend ' : 0 } , function ( err , resp ) { <nl>
Merge pull request from murgatroid99 / node_server_graceful_shutdown
grpc/grpc
da22c1521130336e4f3fdcf6b2f7f20fb944ef47
2015-08-26T21:23:14Z
deleted file mode 100644 <nl> index b87fe182104 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - change - edge <nl> ppp / dev / null <nl> <nl> - > curl - - data @ - - X PUT - - dump - http : / / localhost : 8529 / _api / blueprints / edge / edge1 ? graph = graph1 <nl> - { " optional2 " : " val2 " } <nl> - <nl> - HTTP / 1 . 1 200 OK <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " edge " : { <nl> - " _id " : " 82564582 / 85317094 " , <nl> - " _rev " : " 85906918 " , <nl> - " _key " : " 85317094 " , <nl> - " _from " : " 81778150 / 84989414 " , <nl> - " _to " : " 81778150 / 84792806 " , <nl> - " $ label " : null , <nl> - " $ id " : " edge1 " , <nl> - " optional2 " : " val2 " <nl> - } , <nl> - " error " : false , <nl> - " code " : 200 <nl> - } <nl> deleted file mode 100644 <nl> index 55d0399f901 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - change - vertex <nl> ppp / dev / null <nl> <nl> - > curl - - data @ - - X PUT - - dump - http : / / localhost : 8529 / _api / blueprints / vertex / v1 ? graph = graph1 <nl> - { " optional1 " : " val2 " } <nl> - <nl> - HTTP / 1 . 1 200 OK <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " vertex " : { <nl> - " _id " : " 39572966 / 42653158 " , <nl> - " _rev " : " 42849766 " , <nl> - " _key " : " 42653158 " , <nl> - " $ id " : " v1 " , <nl> - " optional1 " : " val2 " <nl> - } , <nl> - " error " : false , <nl> - " code " : 200 <nl> - } <nl> deleted file mode 100644 <nl> index 69852b96479 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - create - edge <nl> ppp / dev / null <nl> <nl> - > curl - - data @ - - X POST - - dump - http : / / localhost : 8529 / _api / blueprints / edge ? graph = graph1 <nl> - { " $ id " : " edge1 " , " _from " : " vert2 " , " _to " : " vert1 " , " optional1 " : " val1 " } <nl> - <nl> - HTTP / 1 . 1 200 OK <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " edge " : { <nl> - " _id " : " 54842854 / 57595366 " , <nl> - " _rev " : " 57595366 " , <nl> - " _key " : " 57595366 " , <nl> - " _from " : " 54056422 / 57267686 " , <nl> - " _to " : " 54056422 / 57071078 " , <nl> - " $ label " : null , <nl> - " $ id " : " edge1 " , <nl> - " optional1 " : " val1 " <nl> - } , <nl> - " error " : false , <nl> - " code " : 200 <nl> - } <nl> deleted file mode 100644 <nl> index 02de660067f . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - create - graph <nl> ppp / dev / null <nl> <nl> - > curl - - data @ - - X POST - - dump - http : / / localhost : 8529 / _api / blueprints / graph <nl> - { " name " : " graph1 " , " verticesName " : " v " , " edgesName " : " e " } <nl> - <nl> - HTTP / 1 . 1 200 OK <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " graph " : { <nl> - " _id " : " 1849955 / 7686033 " , <nl> - " _rev " : " 7686033 " , <nl> - " _key " : " 7686033 " , <nl> - " vertices " : 5523345 , <nl> - " edges " : 6309777 , <nl> - " name " : " graph1 " , <nl> - " verticesName " : " v " , <nl> - " edgesName " : " e " <nl> - } , <nl> - " error " : false , <nl> - " code " : 200 <nl> - } <nl> deleted file mode 100644 <nl> index 4dc77178d14 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - create - vertex <nl> ppp / dev / null <nl> <nl> - > curl - - data @ - - X POST - - dump - http : / / localhost : 8529 / _api / blueprints / vertex ? graph = graph1 <nl> - { " $ id " : " v1 " , " optional1 " : " val1 " , " optional2 " : " val2 " } <nl> - <nl> - HTTP / 1 . 1 200 OK <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " vertex " : { <nl> - " _id " : " 21186449 / 24332177 " , <nl> - " _rev " : " 24332177 " , <nl> - " _key " : " 24332177 " , <nl> - " $ id " : " v1 " , <nl> - " optional1 " : " val1 " , <nl> - " optional2 " : " val2 " <nl> - } , <nl> - " error " : false , <nl> - " code " : 200 <nl> - } <nl> deleted file mode 100644 <nl> index 5b85984b7ec . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - delete - edge <nl> ppp / dev / null <nl> <nl> - > curl - X DELETE - - dump - http : / / localhost : 8529 / _api / blueprints / edge / edge1 ? graph = graph1 <nl> - <nl> - HTTP / 1 . 1 200 OK <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " deleted " : true , <nl> - " error " : false , <nl> - " code " : 200 <nl> - } <nl> deleted file mode 100644 <nl> index 66de0e96528 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - delete - graph <nl> ppp / dev / null <nl> <nl> - > curl - X DELETE - - dump - http : / / localhost : 8529 / _api / blueprints / graph / graph1 <nl> - <nl> - HTTP / 1 . 1 200 OK <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " deleted " : true , <nl> - " error " : false , <nl> - " code " : 200 <nl> - } <nl> deleted file mode 100644 <nl> index e8051499b97 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - delete - vertex <nl> ppp / dev / null <nl> <nl> - > curl - X DELETE - - dump - http : / / localhost : 8529 / _api / blueprints / vertex / 46519782 / 49599974 ? graph = graph1 <nl> - <nl> - HTTP / 1 . 1 200 OK <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " deleted " : true , <nl> - " error " : false , <nl> - " code " : 200 <nl> - } <nl> deleted file mode 100644 <nl> index ef00fcd57ce . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - get - edge <nl> ppp / dev / null <nl> <nl> - > curl - X GET - - dump - http : / / localhost : 8529 / _api / blueprints / edge / edge1 ? graph = graph1 <nl> - <nl> - HTTP / 1 . 1 200 OK <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " edge " : { <nl> - " _id " : " 74569190 / 77321702 " , <nl> - " _rev " : " 77321702 " , <nl> - " _key " : " 77321702 " , <nl> - " _from " : " 73782758 / 76994022 " , <nl> - " _to " : " 73782758 / 76797414 " , <nl> - " $ label " : null , <nl> - " $ id " : " edge1 " , <nl> - " optional1 " : " val1 " <nl> - } , <nl> - " error " : false , <nl> - " code " : 200 <nl> - } <nl> deleted file mode 100644 <nl> index d1e6a7f17f7 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - get - edges <nl> ppp / dev / null <nl> <nl> - > curl - - data @ - - X POST - - dump - http : / / localhost : 8529 / _api / blueprints / edges ? graph = graph1 <nl> - { " batchSize " : 100 } <nl> - <nl> - HTTP / 1 . 1 201 Created <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " result " : [ <nl> - { <nl> - " _id " : " 90051519 / 93328319 " , <nl> - " _rev " : " 93328319 " , <nl> - " _key " : " 93328319 " , <nl> - " _from " : " 89265087 / 92607423 " , <nl> - " _to " : " 89265087 / 92672959 " , <nl> - " $ label " : null , <nl> - " $ id " : " edge2 " , <nl> - " optional1 " : " val1b " <nl> - } , <nl> - { <nl> - " _id " : " 90051519 / 92935103 " , <nl> - " _rev " : " 92935103 " , <nl> - " _key " : " 92935103 " , <nl> - " _from " : " 89265087 / 92410815 " , <nl> - " _to " : " 89265087 / 92607423 " , <nl> - " $ label " : null , <nl> - " $ id " : " edge1 " , <nl> - " optional1 " : " val1a " <nl> - } <nl> - ] , <nl> - " hasMore " : false , <nl> - " error " : false , <nl> - " code " : 201 <nl> - } <nl> deleted file mode 100644 <nl> index e6e2962224d . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - get - edges - by - vertex <nl> ppp / dev / null <nl> <nl> - > curl - - data @ - - X POST - - dump - http : / / localhost : 8529 / _api / blueprints / edges ? graph = graph1 <nl> - { " batchSize " : 100 , " vertex " : " id2 " } <nl> - <nl> - HTTP / 1 . 1 201 Created <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " result " : [ <nl> - { <nl> - " _id " : " 94311359 / 97194943 " , <nl> - " _rev " : " 97194943 " , <nl> - " _key " : " 97194943 " , <nl> - " _from " : " 93524927 / 96670655 " , <nl> - " _to " : " 93524927 / 96867263 " , <nl> - " $ label " : null , <nl> - " $ id " : " edge1 " , <nl> - " optional1 " : " val1a " <nl> - } , <nl> - { <nl> - " _id " : " 94311359 / 97588159 " , <nl> - " _rev " : " 97588159 " , <nl> - " _key " : " 97588159 " , <nl> - " _from " : " 93524927 / 96867263 " , <nl> - " _to " : " 93524927 / 96932799 " , <nl> - " $ label " : null , <nl> - " $ id " : " edge2 " , <nl> - " optional1 " : " val1b " <nl> - } <nl> - ] , <nl> - " hasMore " : false , <nl> - " error " : false , <nl> - " code " : 201 <nl> - } <nl> deleted file mode 100644 <nl> index 133c6a59397 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - get - graph <nl> ppp / dev / null <nl> <nl> - > curl - X GET - - dump - http : / / localhost : 8529 / _api / blueprints / graph / graph1 <nl> - <nl> - HTTP / 1 . 1 200 OK <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " graph " : { <nl> - " _id " : " 1849955 / 16992145 " , <nl> - " _rev " : " 16992145 " , <nl> - " _key " : " 16992145 " , <nl> - " vertices " : 15157137 , <nl> - " edges " : 15943569 , <nl> - " name " : " graph1 " , <nl> - " verticesName " : " v " , <nl> - " edgesName " : " e " <nl> - } , <nl> - " error " : false , <nl> - " code " : 200 <nl> - } <nl> deleted file mode 100644 <nl> index 6049eb8e911 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - get - graph - by - id <nl> ppp / dev / null <nl> <nl> - > curl - X GET - - dump - http : / / localhost : 8529 / _api / blueprints / graph / 1849955 / 16992145 <nl> - <nl> - HTTP / 1 . 1 200 OK <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " graph " : { <nl> - " _id " : " 1849955 / 16992145 " , <nl> - " _rev " : " 16992145 " , <nl> - " _key " : " 16992145 " , <nl> - " vertices " : 15157137 , <nl> - " edges " : 15943569 , <nl> - " name " : " graph1 " , <nl> - " verticesName " : " v " , <nl> - " edgesName " : " e " <nl> - } , <nl> - " error " : false , <nl> - " code " : 200 <nl> - } <nl> deleted file mode 100644 <nl> index 3c491b08526 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - get - in - edges - by - vertex <nl> ppp / dev / null <nl> <nl> - > curl - - data @ - - X POST - - dump - http : / / localhost : 8529 / _api / blueprints / edges ? graph = graph1 <nl> - { " batchSize " : 100 , " vertex " : " id2 " , " direction " : " in " } <nl> - <nl> - HTTP / 1 . 1 201 Created <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " result " : [ <nl> - { <nl> - " _id " : " 98636735 / 101520319 " , <nl> - " _rev " : " 101520319 " , <nl> - " _key " : " 101520319 " , <nl> - " _from " : " 97850303 / 100996031 " , <nl> - " _to " : " 97850303 / 101192639 " , <nl> - " $ label " : null , <nl> - " $ id " : " edge1 " , <nl> - " optional1 " : " val1a " <nl> - } <nl> - ] , <nl> - " hasMore " : false , <nl> - " error " : false , <nl> - " code " : 201 <nl> - } <nl> deleted file mode 100644 <nl> index eecd5edcfb0 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - get - out - edges - by - vertex <nl> ppp / dev / null <nl> <nl> - > curl - - data @ - - X POST - - dump - http : / / localhost : 8529 / _api / blueprints / edges ? graph = graph1 <nl> - { " batchSize " : 100 , " vertex " : " id2 " , " direction " : " out " } <nl> - <nl> - HTTP / 1 . 1 201 Created <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " result " : [ <nl> - { <nl> - " _id " : " 102896575 / 106173375 " , <nl> - " _rev " : " 106173375 " , <nl> - " _key " : " 106173375 " , <nl> - " _from " : " 102110143 / 105452479 " , <nl> - " _to " : " 102110143 / 105518015 " , <nl> - " $ label " : null , <nl> - " $ id " : " edge2 " , <nl> - " optional1 " : " val1b " <nl> - } <nl> - ] , <nl> - " hasMore " : false , <nl> - " error " : false , <nl> - " code " : 201 <nl> - } <nl> deleted file mode 100644 <nl> index 5c7577b8505 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - get - outbound - vertices <nl> ppp / dev / null <nl> <nl> - > curl - - data @ - - X POST - - dump - http : / / localhost : 8529 / _api / blueprints / vertices ? graph = graph1 <nl> - { " batchSize " : 100 , " vertex " : " id2 " , " direction " : " out " } <nl> - <nl> - HTTP / 1 . 1 201 Created <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " result " : [ <nl> - { <nl> - " _id " : " 44402657 / 47810529 " , <nl> - " _rev " : " 47810529 " , <nl> - " _key " : " 47810529 " , <nl> - " optional2 " : 2 , <nl> - " $ id " : " id3 " , <nl> - " optional1 " : " val1 " <nl> - } <nl> - ] , <nl> - " hasMore " : false , <nl> - " error " : false , <nl> - " code " : 201 <nl> - } <nl> - <nl> deleted file mode 100644 <nl> index 3b985b99e96 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - get - vertex <nl> ppp / dev / null <nl> <nl> - > curl - X GET - - dump - http : / / localhost : 8529 / _api / blueprints / vertex / v1 ? graph = graph1 <nl> - <nl> - HTTP / 1 . 1 200 OK <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " vertex " : { <nl> - " _id " : " 28133265 / 31278993 " , <nl> - " _rev " : " 31278993 " , <nl> - " _key " : " 31278993 " , <nl> - " $ id " : " v1 " , <nl> - " optional1 " : " val1 " , <nl> - " optional2 " : " val2 " <nl> - } , <nl> - " error " : false , <nl> - " code " : 200 <nl> - } <nl> deleted file mode 100644 <nl> index dd107ddf3fa . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - get - vertex - by - id <nl> ppp / dev / null <nl> <nl> - > curl - X GET - - dump - http : / / localhost : 8529 / _api / blueprints / vertex / 28133265 / 31278993 ? graph = graph1 <nl> - <nl> - HTTP / 1 . 1 200 OK <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " vertex " : { <nl> - " _id " : " 28133265 / 31278993 " , <nl> - " _rev " : " 31278993 " , <nl> - " _key " : " 31278993 " , <nl> - " $ id " : " v1 " , <nl> - " optional1 " : " val1 " , <nl> - " optional2 " : " val2 " <nl> - } , <nl> - " error " : false , <nl> - " code " : 200 <nl> - } <nl> deleted file mode 100644 <nl> index 2d2f07a26d9 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - get - vertices <nl> ppp / dev / null <nl> <nl> - > curl - - data @ - - X POST - - dump - http : / / localhost : 8529 / _api / blueprints / vertices ? graph = graph1 <nl> - { " batchSize " : 100 } <nl> - <nl> - HTTP / 1 . 1 201 Created <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " result " : [ <nl> - { <nl> - " _id " : " 44402657 / 47744993 " , <nl> - " _rev " : " 47744993 " , <nl> - " _key " : " 47744993 " , <nl> - " optional2 " : 2 , <nl> - " $ id " : " id2 " , <nl> - " optional1 " : " val1 " <nl> - } , <nl> - { <nl> - " _id " : " 44402657 / 47810529 " , <nl> - " _rev " : " 47810529 " , <nl> - " _key " : " 47810529 " , <nl> - " optional2 " : 2 , <nl> - " $ id " : " id3 " , <nl> - " optional1 " : " val1 " <nl> - } , <nl> - { <nl> - " _id " : " 44402657 / 47548385 " , <nl> - " _rev " : " 47548385 " , <nl> - " _key " : " 47548385 " , <nl> - " optional2 " : 1 , <nl> - " $ id " : " id1 " , <nl> - " optional1 " : " val1 " <nl> - } , <nl> - { <nl> - " _id " : " 44402657 / 48007137 " , <nl> - " _rev " : " 48007137 " , <nl> - " _key " : " 48007137 " , <nl> - " $ id " : " id5 " , <nl> - " optional2 " : " val2 " <nl> - } , <nl> - { <nl> - " _id " : " 44402657 / 47876065 " , <nl> - " _rev " : " 47876065 " , <nl> - " _key " : " 47876065 " , <nl> - " optional2 " : 3 , <nl> - " $ id " : " id4 " , <nl> - " optional1 " : " val1 " <nl> - } <nl> - ] , <nl> - " hasMore " : false , <nl> - " error " : false , <nl> - " code " : 201 <nl> - } <nl> deleted file mode 100644 <nl> index 913a2d0e455 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - get - vertices - key <nl> ppp / dev / null <nl> <nl> - > curl - - data @ - - X POST - - dump - http : / / localhost : 8529 / _api / blueprints / vertices ? graph = graph1 <nl> - { " batchSize " : 100 , " key " : " optional2 " , " value " : 3 } <nl> - <nl> - HTTP / 1 . 1 201 Created <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " result " : [ <nl> - { <nl> - " _id " : " 44402657 / 47876065 " , <nl> - " _rev " : " 47876065 " , <nl> - " _key " : " 47876065 " , <nl> - " optional2 " : 3 , <nl> - " $ id " : " id4 " , <nl> - " optional1 " : " val1 " <nl> - } <nl> - ] , <nl> - " hasMore " : false , <nl> - " error " : false , <nl> - " code " : 201 <nl> - } <nl> - <nl> deleted file mode 100644 <nl> index 780ce62c929 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - get - vertices - label <nl> ppp / dev / null <nl> <nl> - > curl - - data @ - - X POST - - dump - http : / / localhost : 8529 / _api / blueprints / vertices ? graph = graph1 <nl> - { " batchSize " : 100 , " vertex " : " id2 " , " labels " : [ " l2 " ] } <nl> - <nl> - HTTP / 1 . 1 201 Created <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " result " : [ <nl> - { <nl> - " _id " : " 44402657 / 47810529 " , <nl> - " _rev " : " 47810529 " , <nl> - " _key " : " 47810529 " , <nl> - " optional2 " : 2 , <nl> - " $ id " : " id3 " , <nl> - " optional1 " : " val1 " <nl> - } <nl> - ] , <nl> - " hasMore " : false , <nl> - " error " : false , <nl> - " code " : 201 <nl> - } <nl> - <nl> deleted file mode 100644 <nl> index 061ccd555e5 . . 00000000000 <nl> mmm a / Documentation / Examples / api - blueprints - get - vertices2 <nl> ppp / dev / null <nl> <nl> - > curl - - data @ - - X POST - - dump - http : / / localhost : 8529 / _api / blueprints / vertices ? graph = graph1 <nl> - { " batchSize " : 100 , " vertex " : " id2 " } <nl> - <nl> - HTTP / 1 . 1 201 Created <nl> - content - type : application / json ; charset = utf - 8 <nl> - <nl> - { <nl> - " result " : [ <nl> - { <nl> - " _id " : " 44402657 / 47548385 " , <nl> - " _rev " : " 47548385 " , <nl> - " _key " : " 47548385 " , <nl> - " optional2 " : 1 , <nl> - " $ id " : " id1 " , <nl> - " optional1 " : " val1 " <nl> - } , <nl> - { <nl> - " _id " : " 44402657 / 47810529 " , <nl> - " _rev " : " 47810529 " , <nl> - " _key " : " 47810529 " , <nl> - " optional2 " : 2 , <nl> - " $ id " : " id3 " , <nl> - " optional1 " : " val1 " <nl> - } <nl> - ] , <nl> - " hasMore " : false , <nl> - " error " : false , <nl> - " code " : 201 <nl> - } <nl> - <nl> deleted file mode 100644 <nl> index dd600e5b3b5 . . 00000000000 <nl> mmm a / UnitTests / HttpInterface / api - blueprints - spec . rb <nl> ppp / dev / null <nl> <nl> - # coding : utf - 8 <nl> - <nl> - require ' rspec ' <nl> - require ' . / arangodb . rb ' <nl> - <nl> - <nl> - describe ArangoDB do <nl> - prefix = " api - blueprints " <nl> - <nl> - vertex_collection = " v " <nl> - edge_collection = " e " <nl> - graph_name = " graph1 " <nl> - <nl> - context " testing blueprints methods : " do <nl> - <nl> - def truncate_collection ( prefix , name ) <nl> - cmd = " / _api / collection / # { name } / truncate " <nl> - ArangoDB . log_put ( " # { prefix } " , cmd ) <nl> - end <nl> - <nl> - # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> - # # checking graph responses <nl> - # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> - <nl> - context " checks blueprints graph requests " do <nl> - before do <nl> - # ArangoDB . create_collection ( edge_collection , 0 , 3 ) <nl> - # ArangoDB . create_collection ( vertex_collection , 0 , 2 ) <nl> - truncate_collection ( prefix , " _graphs " ) <nl> - end <nl> - <nl> - after do <nl> - truncate_collection ( prefix , " _graphs " ) <nl> - ArangoDB . drop_collection ( vertex_collection ) <nl> - ArangoDB . drop_collection ( edge_collection ) <nl> - end <nl> - <nl> - it " checks create graph " do <nl> - cmd = " / _api / blueprints / graph " <nl> - body = " { \ " name \ " : \ " # { graph_name } \ " , \ " verticesName \ " : \ " # { vertex_collection } \ " , \ " edgesName \ " : \ " # { edge_collection } \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 200 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc . parsed_response [ ' graph ' ] [ ' name ' ] . should eq ( " # { graph_name } " ) <nl> - end <nl> - <nl> - it " checks create graph with wrong edges collection " do <nl> - ArangoDB . create_collection ( edge_collection , 0 , 2 ) <nl> - <nl> - cmd = " / _api / blueprints / graph " <nl> - body = " { \ " name \ " : \ " # { graph_name } \ " , \ " verticesName \ " : \ " # { vertex_collection } \ " , \ " edgesName \ " : \ " # { edge_collection } \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 400 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( true ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 400 ) <nl> - doc . parsed_response [ ' errorNum ' ] . should eq ( 1902 ) <nl> - end <nl> - <nl> - it " checks ( re ) create graph " do <nl> - cmd = " / _api / blueprints / graph " <nl> - body = " { \ " name \ " : \ " # { graph_name } \ " , \ " verticesName \ " : \ " # { vertex_collection } \ " , \ " edgesName \ " : \ " # { edge_collection } \ " } " <nl> - doc1 = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc1 . code . should eq ( 200 ) <nl> - <nl> - doc2 = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc2 . code . should eq ( 200 ) <nl> - <nl> - doc1 . parsed_response [ ' graph ' ] [ ' _id ' ] . should eq ( doc2 . parsed_response [ ' graph ' ] [ ' _id ' ] ) <nl> - end <nl> - <nl> - it " checks create and get graph " do <nl> - cmd = " / _api / blueprints / graph " <nl> - body = " { \ " name \ " : \ " # { graph_name } \ " , \ " verticesName \ " : \ " # { vertex_collection } \ " , \ " edgesName \ " : \ " # { edge_collection } \ " } " <nl> - doc1 = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - g_id = doc1 . parsed_response [ ' graph ' ] [ ' _id ' ] <nl> - <nl> - doc1 . code . should eq ( 200 ) <nl> - <nl> - cmd = " / _api / blueprints / graph / # { graph_name } " <nl> - doc2 = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - <nl> - doc2 . code . should eq ( 200 ) <nl> - doc2 . parsed_response [ ' graph ' ] [ ' _id ' ] . should eq ( g_id ) <nl> - <nl> - cmd = " / _api / blueprints / graph / # { g_id } " <nl> - doc3 = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - <nl> - doc3 . code . should eq ( 200 ) <nl> - doc3 . parsed_response [ ' graph ' ] [ ' _id ' ] . should eq ( g_id ) <nl> - end <nl> - <nl> - it " checks create and delete graph " do <nl> - # create <nl> - cmd = " / _api / blueprints / graph " <nl> - body = " { \ " name \ " : \ " # { graph_name } \ " , \ " verticesName \ " : \ " # { vertex_collection } \ " , \ " edgesName \ " : \ " # { edge_collection } \ " } " <nl> - doc1 = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - doc1 . code . should eq ( 200 ) <nl> - <nl> - # delete <nl> - cmd = " / _api / blueprints / graph / # { graph_name } " <nl> - doc2 = ArangoDB . log_delete ( " # { prefix } " , cmd ) <nl> - doc2 . code . should eq ( 200 ) <nl> - doc2 . parsed_response [ ' deleted ' ] . should eq ( true ) <nl> - <nl> - # check <nl> - doc3 = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - doc3 . code . should eq ( 400 ) <nl> - end <nl> - <nl> - end <nl> - <nl> - # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> - # # checking vertex responses <nl> - # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> - <nl> - context " checks blueprints vertex requests " do <nl> - before do <nl> - truncate_collection ( prefix , " _graphs " ) <nl> - cmd = " / _api / blueprints / graph " <nl> - body = " { \ " name \ " : \ " # { graph_name } \ " , \ " verticesName \ " : \ " # { vertex_collection } \ " , \ " edgesName \ " : \ " # { edge_collection } \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - end <nl> - <nl> - after do <nl> - truncate_collection ( prefix , " _graphs " ) <nl> - ArangoDB . drop_collection ( vertex_collection ) <nl> - ArangoDB . drop_collection ( edge_collection ) <nl> - end <nl> - <nl> - it " checks create vertex with \ $ id " do <nl> - cmd = " / _api / blueprints / vertex ? graph = # { graph_name } " <nl> - body = " { \ " \ $ id \ " : \ " v1 \ " , \ " optional1 \ " : \ " val1 \ " , \ " optional2 \ " : \ " val2 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 200 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc . parsed_response [ ' vertex ' ] [ ' $ id ' ] . should eq ( " v1 " ) <nl> - doc . parsed_response [ ' vertex ' ] [ ' optional1 ' ] . should eq ( " val1 " ) <nl> - end <nl> - <nl> - it " checks create second vertex with \ $ id " do <nl> - cmd = " / _api / blueprints / vertex ? graph = # { graph_name } " <nl> - body = " { \ " \ $ id \ " : \ " double_id \ " , \ " optional1 \ " : \ " val1 \ " , \ " optional2 \ " : \ " val2 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 200 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - <nl> - doc2 = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - doc2 . code . should eq ( 400 ) <nl> - doc2 . parsed_response [ ' error ' ] . should eq ( true ) <nl> - doc2 . parsed_response [ ' code ' ] . should eq ( 400 ) <nl> - end <nl> - <nl> - it " checks get vertex by \ $ id " do <nl> - cmd = " / _api / blueprints / vertex ? graph = # { graph_name } " <nl> - body = " { \ " \ $ id \ " : \ " v1 \ " , \ " optional1 \ " : \ " val1 \ " , \ " optional2 \ " : \ " val2 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 200 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc . parsed_response [ ' vertex ' ] [ ' $ id ' ] . should eq ( " v1 " ) <nl> - doc . parsed_response [ ' vertex ' ] [ ' optional1 ' ] . should eq ( " val1 " ) <nl> - <nl> - cmd = " / _api / blueprints / vertex / v1 ? graph = # { graph_name } " <nl> - doc2 = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - doc2 . code . should eq ( 200 ) <nl> - doc2 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc2 . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc2 . parsed_response [ ' vertex ' ] [ ' optional1 ' ] . should eq ( doc . parsed_response [ ' vertex ' ] [ ' optional1 ' ] ) <nl> - <nl> - _id = doc2 . parsed_response [ ' vertex ' ] [ ' _id ' ] ; <nl> - cmd = " / _api / blueprints / vertex / # { _id } ? graph = # { graph_name } " <nl> - doc3 = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - doc3 . code . should eq ( 200 ) <nl> - doc3 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc3 . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc3 . parsed_response [ ' vertex ' ] [ ' optional1 ' ] . should eq ( doc . parsed_response [ ' vertex ' ] [ ' optional1 ' ] ) <nl> - end <nl> - <nl> - it " checks get vertex by wrong \ $ id " do <nl> - cmd = " / _api / blueprints / vertex / vv11 ? graph = # { graph_name } " <nl> - doc = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - doc . code . should eq ( 400 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( true ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 400 ) <nl> - end <nl> - <nl> - it " checks update vertex by \ $ id " do <nl> - cmd = " / _api / blueprints / vertex ? graph = # { graph_name } " <nl> - body = " { \ " \ $ id \ " : \ " v1 \ " , \ " optional1 \ " : \ " val1 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 200 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc . parsed_response [ ' vertex ' ] [ ' $ id ' ] . should eq ( " v1 " ) <nl> - doc . parsed_response [ ' vertex ' ] [ ' optional1 ' ] . should eq ( " val1 " ) <nl> - <nl> - cmd = " / _api / blueprints / vertex / v1 ? graph = # { graph_name } " <nl> - doc2 = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - doc2 . code . should eq ( 200 ) <nl> - doc2 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc2 . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc2 . parsed_response [ ' vertex ' ] [ ' optional1 ' ] . should eq ( doc . parsed_response [ ' vertex ' ] [ ' optional1 ' ] ) <nl> - <nl> - _id = doc2 . parsed_response [ ' vertex ' ] [ ' _id ' ] ; <nl> - cmd = " / _api / blueprints / vertex / # { _id } ? graph = # { graph_name } " <nl> - body = " { \ " \ $ id \ " : \ " v1 \ " , \ " optional1 \ " : \ " val2 \ " } " <nl> - doc3 = ArangoDB . log_put ( " # { prefix } " , cmd , : body = > body ) <nl> - doc3 . code . should eq ( 200 ) <nl> - doc3 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc3 . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc3 . parsed_response [ ' vertex ' ] [ ' optional1 ' ] . should eq ( " val2 " ) <nl> - <nl> - cmd = " / _api / blueprints / vertex / v1 ? graph = # { graph_name } " <nl> - doc2 = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - doc2 . code . should eq ( 200 ) <nl> - doc2 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc2 . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc2 . parsed_response [ ' vertex ' ] [ ' optional1 ' ] . should eq ( " val2 " ) <nl> - end <nl> - <nl> - it " checks update vertex " do <nl> - cmd = " / _api / blueprints / vertex ? graph = # { graph_name } " <nl> - body = " { \ " optional1 \ " : \ " val1 \ " , \ " optional2 \ " : \ " val2 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 200 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc . parsed_response [ ' vertex ' ] [ ' $ id ' ] . should eq ( nil ) <nl> - doc . parsed_response [ ' vertex ' ] [ ' optional1 ' ] . should eq ( " val1 " ) <nl> - doc . parsed_response [ ' vertex ' ] [ ' optional2 ' ] . should eq ( " val2 " ) <nl> - _id = doc . parsed_response [ ' vertex ' ] [ ' _id ' ] ; <nl> - <nl> - cmd = " / _api / blueprints / vertex / # { _id } ? graph = # { graph_name } " <nl> - doc2 = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - doc2 . code . should eq ( 200 ) <nl> - doc2 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc2 . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc2 . parsed_response [ ' vertex ' ] [ ' optional1 ' ] . should eq ( doc . parsed_response [ ' vertex ' ] [ ' optional1 ' ] ) <nl> - <nl> - cmd = " / _api / blueprints / vertex / # { _id } ? graph = # { graph_name } " <nl> - body = " { \ " optional1 \ " : \ " val2 \ " } " <nl> - doc3 = ArangoDB . log_put ( " # { prefix } " , cmd , : body = > body ) <nl> - doc3 . code . should eq ( 200 ) <nl> - doc3 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc3 . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc3 . parsed_response [ ' vertex ' ] [ ' optional1 ' ] . should eq ( " val2 " ) <nl> - doc3 . parsed_response [ ' vertex ' ] [ ' optional2 ' ] . should eq ( nil ) <nl> - <nl> - cmd = " / _api / blueprints / vertex / # { _id } ? graph = # { graph_name } " <nl> - doc4 = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - doc4 . code . should eq ( 200 ) <nl> - doc4 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc4 . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc4 . parsed_response [ ' vertex ' ] [ ' optional1 ' ] . should eq ( " val2 " ) <nl> - doc4 . parsed_response [ ' vertex ' ] [ ' optional2 ' ] . should eq ( nil ) <nl> - end <nl> - <nl> - it " checks delete vertex " do <nl> - cmd = " / _api / blueprints / vertex ? graph = # { graph_name } " <nl> - body = " { \ " optional1 \ " : \ " val1 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 200 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc . parsed_response [ ' vertex ' ] [ ' $ id ' ] . should eq ( nil ) <nl> - doc . parsed_response [ ' vertex ' ] [ ' optional1 ' ] . should eq ( " val1 " ) <nl> - _id = doc . parsed_response [ ' vertex ' ] [ ' _id ' ] ; <nl> - <nl> - cmd = " / _api / blueprints / vertex / # { _id } ? graph = # { graph_name } " <nl> - doc2 = ArangoDB . log_delete ( " # { prefix } " , cmd ) <nl> - doc2 . code . should eq ( 200 ) <nl> - doc2 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc2 . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc2 . parsed_response [ ' deleted ' ] . should eq ( true ) <nl> - <nl> - cmd = " / _api / blueprints / vertex / # { _id } ? graph = # { graph_name } " <nl> - doc3 = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - doc3 . code . should eq ( 400 ) <nl> - doc3 . parsed_response [ ' error ' ] . should eq ( true ) <nl> - doc3 . parsed_response [ ' code ' ] . should eq ( 400 ) <nl> - end <nl> - <nl> - end <nl> - <nl> - # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> - # # checking vertices responses <nl> - # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> - <nl> - context " checks blueprints vertices requests " do <nl> - before do <nl> - truncate_collection ( prefix , " _graphs " ) <nl> - cmd = " / _api / blueprints / graph " <nl> - body = " { \ " name \ " : \ " # { graph_name } \ " , \ " verticesName \ " : \ " # { vertex_collection } \ " , \ " edgesName \ " : \ " # { edge_collection } \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - end <nl> - <nl> - after do <nl> - truncate_collection ( prefix , " _graphs " ) <nl> - ArangoDB . drop_collection ( vertex_collection ) <nl> - ArangoDB . drop_collection ( edge_collection ) <nl> - end <nl> - <nl> - it " checks list of vertices " do <nl> - cmd = " / _api / blueprints / vertex ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " id1 \ " , \ " optional1 \ " : \ " val1 \ " , \ " optional2 \ " : 1 } " <nl> - ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - body = " { \ " $ id \ " : \ " id2 \ " , \ " optional1 \ " : \ " val1 \ " , \ " optional2 \ " : 2 } " <nl> - ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - body = " { \ " $ id \ " : \ " id3 \ " , \ " optional1 \ " : \ " val1 \ " , \ " optional2 \ " : 2 } " <nl> - ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - body = " { \ " $ id \ " : \ " id4 \ " , \ " optional1 \ " : \ " val1 \ " , \ " optional2 \ " : 3 } " <nl> - ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - body = " { \ " $ id \ " : \ " id5 \ " , \ " optional2 \ " : \ " val2 \ " } " <nl> - ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - cmd = " / _api / blueprints / edge ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " edge1 \ " , \ " _from \ " : \ " id1 \ " , \ " _to \ " : \ " id2 \ " , \ " $ label \ " : \ " l1 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - body = " { \ " $ id \ " : \ " edge2 \ " , \ " _from \ " : \ " id2 \ " , \ " _to \ " : \ " id3 \ " , \ " $ label \ " : \ " l2 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - cmd = " / _api / blueprints / vertices ? graph = # { graph_name } " <nl> - body = " { \ " batchSize \ " : 100 } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - doc . code . should eq ( 201 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 201 ) <nl> - doc . parsed_response [ ' result ' ] . count . should eq ( 5 ) <nl> - <nl> - cmd = " / _api / blueprints / vertices ? graph = # { graph_name } " <nl> - body = " { \ " batchSize \ " : 100 , \ " key \ " : \ " optional2 \ " , \ " value \ " : 3 } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - doc . code . should eq ( 201 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 201 ) <nl> - doc . parsed_response [ ' result ' ] . count . should eq ( 1 ) <nl> - <nl> - cmd = " / _api / blueprints / vertices ? graph = # { graph_name } " <nl> - body = " { \ " batchSize \ " : 100 , \ " key \ " : \ " optional2 \ " , \ " value \ " : 2 } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - doc . code . should eq ( 201 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 201 ) <nl> - doc . parsed_response [ ' result ' ] . count . should eq ( 2 ) <nl> - <nl> - cmd = " / _api / blueprints / vertices ? graph = # { graph_name } " <nl> - body = " { \ " batchSize \ " : 100 , \ " vertex \ " : \ " id2 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - doc . code . should eq ( 201 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 201 ) <nl> - doc . parsed_response [ ' result ' ] . count . should eq ( 2 ) <nl> - <nl> - cmd = " / _api / blueprints / vertices ? graph = # { graph_name } " <nl> - body = " { \ " batchSize \ " : 100 , \ " vertex \ " : \ " id2 \ " , \ " direction \ " : \ " in \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - doc . code . should eq ( 201 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 201 ) <nl> - doc . parsed_response [ ' result ' ] . count . should eq ( 1 ) <nl> - doc . parsed_response [ ' result ' ] [ 0 ] [ ' $ id ' ] . should eq ( " id1 " ) <nl> - <nl> - cmd = " / _api / blueprints / vertices ? graph = # { graph_name } " <nl> - body = " { \ " batchSize \ " : 100 , \ " vertex \ " : \ " id2 \ " , \ " direction \ " : \ " out \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - doc . code . should eq ( 201 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 201 ) <nl> - doc . parsed_response [ ' result ' ] . count . should eq ( 1 ) <nl> - doc . parsed_response [ ' result ' ] [ 0 ] [ ' $ id ' ] . should eq ( " id3 " ) <nl> - <nl> - cmd = " / _api / blueprints / vertices ? graph = # { graph_name } " <nl> - body = " { \ " batchSize \ " : 100 , \ " vertex \ " : \ " id2 \ " , \ " labels \ " : [ \ " l2 \ " ] } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - doc . code . should eq ( 201 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 201 ) <nl> - doc . parsed_response [ ' result ' ] . count . should eq ( 1 ) <nl> - doc . parsed_response [ ' result ' ] [ 0 ] [ ' $ id ' ] . should eq ( " id3 " ) <nl> - <nl> - end <nl> - <nl> - end <nl> - <nl> - # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> - # # checking edge responses <nl> - # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> - <nl> - context " checks blueprints edge requests " do <nl> - before do <nl> - truncate_collection ( prefix , " _graphs " ) <nl> - cmd = " / _api / blueprints / graph " <nl> - body = " { \ " name \ " : \ " # { graph_name } \ " , \ " verticesName \ " : \ " # { vertex_collection } \ " , \ " edgesName \ " : \ " # { edge_collection } \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - cmd = " / _api / blueprints / vertex ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " vert1 \ " } " <nl> - ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - body = " { \ " $ id \ " : \ " vert2 \ " } " <nl> - ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - body = " { \ " $ id \ " : \ " vert3 \ " } " <nl> - ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - end <nl> - <nl> - after do <nl> - truncate_collection ( prefix , " _graphs " ) <nl> - ArangoDB . drop_collection ( vertex_collection ) <nl> - ArangoDB . drop_collection ( edge_collection ) <nl> - end <nl> - <nl> - it " checks create edge " do <nl> - cmd = " / _api / blueprints / edge ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " edge1 \ " , \ " _from \ " : \ " vert2 \ " , \ " _to \ " : \ " vert1 \ " , \ " optional1 \ " : \ " val1 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 200 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc . parsed_response [ ' edge ' ] [ ' $ id ' ] . should eq ( " edge1 " ) <nl> - doc . parsed_response [ ' edge ' ] [ ' optional1 ' ] . should eq ( " val1 " ) <nl> - doc . parsed_response [ ' edge ' ] [ ' $ label ' ] . should eq ( nil ) <nl> - end <nl> - <nl> - it " checks create second edge with same \ $ id " do <nl> - cmd = " / _api / blueprints / edge ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " edge1 \ " , \ " _from \ " : \ " vert2 \ " , \ " _to \ " : \ " vert1 \ " , \ " optional1 \ " : \ " val1 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 200 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc . parsed_response [ ' edge ' ] [ ' $ id ' ] . should eq ( " edge1 " ) <nl> - doc . parsed_response [ ' edge ' ] [ ' optional1 ' ] . should eq ( " val1 " ) <nl> - doc . parsed_response [ ' edge ' ] [ ' $ label ' ] . should eq ( nil ) <nl> - <nl> - cmd = " / _api / blueprints / edge ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " edge1 \ " , \ " _from \ " : \ " vert2 \ " , \ " _to \ " : \ " vert1 \ " , \ " optional1 \ " : \ " val1 \ " } " <nl> - doc1 = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc1 . code . should eq ( 400 ) <nl> - doc1 . parsed_response [ ' error ' ] . should eq ( true ) <nl> - doc1 . parsed_response [ ' code ' ] . should eq ( 400 ) <nl> - end <nl> - <nl> - it " checks create edge with unknown vertex " do <nl> - cmd = " / _api / blueprints / edge ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " edge1 \ " , \ " _from \ " : \ " unknown \ " , \ " _to \ " : \ " vert1 \ " , \ " optional1 \ " : \ " val1 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 400 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( true ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 400 ) <nl> - end <nl> - <nl> - it " checks create edge with \ $ label " do <nl> - cmd = " / _api / blueprints / edge ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " edge1 \ " , \ " _from \ " : \ " vert2 \ " , \ " _to \ " : \ " vert1 \ " , \ " $ label \ " : \ " label1 \ " , \ " optional1 \ " : \ " val1 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 200 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc . parsed_response [ ' edge ' ] [ ' $ id ' ] . should eq ( " edge1 " ) <nl> - doc . parsed_response [ ' edge ' ] [ ' optional1 ' ] . should eq ( " val1 " ) <nl> - doc . parsed_response [ ' edge ' ] [ ' $ label ' ] . should eq ( " label1 " ) <nl> - end <nl> - <nl> - it " checks create edge with _id of vertex " do <nl> - cmd = " / _api / blueprints / vertex ? graph = # { graph_name } " <nl> - body = " { } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - v_id1 = doc . parsed_response [ ' vertex ' ] [ ' _id ' ] <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - v_id2 = doc . parsed_response [ ' vertex ' ] [ ' _id ' ] <nl> - <nl> - cmd = " / _api / blueprints / edge ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " edge1 \ " , \ " _from \ " : \ " # { v_id1 } \ " , \ " _to \ " : \ " # { v_id2 } \ " , \ " $ label \ " : \ " label1 \ " , \ " optional1 \ " : \ " val1 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 200 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc . parsed_response [ ' edge ' ] [ ' $ id ' ] . should eq ( " edge1 " ) <nl> - doc . parsed_response [ ' edge ' ] [ ' optional1 ' ] . should eq ( " val1 " ) <nl> - doc . parsed_response [ ' edge ' ] [ ' _from ' ] . should eq ( v_id1 ) <nl> - doc . parsed_response [ ' edge ' ] [ ' _to ' ] . should eq ( v_id2 ) <nl> - end <nl> - <nl> - it " checks get edge by $ id " do <nl> - cmd = " / _api / blueprints / edge ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " edge1 \ " , \ " _from \ " : \ " vert2 \ " , \ " _to \ " : \ " vert1 \ " , \ " optional1 \ " : \ " val1 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - eid = doc . parsed_response [ ' edge ' ] [ ' $ id ' ] <nl> - e_id = doc . parsed_response [ ' edge ' ] [ ' _id ' ] <nl> - <nl> - <nl> - cmd = " / _api / blueprints / edge / # { eid } ? graph = # { graph_name } " <nl> - doc1 = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - <nl> - doc1 . code . should eq ( 200 ) <nl> - doc1 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc1 . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' $ id ' ] . should eq ( eid ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' _id ' ] . should eq ( e_id ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' optional1 ' ] . should eq ( " val1 " ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' $ label ' ] . should eq ( nil ) <nl> - end <nl> - <nl> - it " checks get edge by _id " do <nl> - cmd = " / _api / blueprints / edge ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " edge1 \ " , \ " _from \ " : \ " vert2 \ " , \ " _to \ " : \ " vert1 \ " , \ " optional1 \ " : \ " val1 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - eid = doc . parsed_response [ ' edge ' ] [ ' $ id ' ] <nl> - e_id = doc . parsed_response [ ' edge ' ] [ ' _id ' ] <nl> - <nl> - <nl> - cmd = " / _api / blueprints / edge / # { e_id } ? graph = # { graph_name } " <nl> - doc1 = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - <nl> - doc1 . code . should eq ( 200 ) <nl> - doc1 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc1 . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' $ id ' ] . should eq ( eid ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' _id ' ] . should eq ( e_id ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' optional1 ' ] . should eq ( " val1 " ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' $ label ' ] . should eq ( nil ) <nl> - end <nl> - <nl> - it " checks replace edge properties by _id " do <nl> - cmd = " / _api / blueprints / edge ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " edge1 \ " , \ " _from \ " : \ " vert2 \ " , \ " _to \ " : \ " vert1 \ " , \ " optional1 \ " : \ " val1 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - doc . code . should eq ( 200 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc . parsed_response [ ' edge ' ] [ ' optional1 ' ] . should eq ( " val1 " ) <nl> - doc . parsed_response [ ' edge ' ] [ ' optional2 ' ] . should eq ( nil ) <nl> - doc . parsed_response [ ' edge ' ] [ ' $ label ' ] . should eq ( nil ) <nl> - eid = doc . parsed_response [ ' edge ' ] [ ' $ id ' ] <nl> - e_id = doc . parsed_response [ ' edge ' ] [ ' _id ' ] <nl> - e_to = doc . parsed_response [ ' edge ' ] [ ' _to ' ] <nl> - <nl> - <nl> - cmd = " / _api / blueprints / edge / # { e_id } ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " edge4711 \ " , \ " optional2 \ " : \ " val2 \ " , \ " label \ " : \ " label1 \ " , \ " _to \ " : \ " to \ " } " <nl> - doc1 = ArangoDB . log_put ( " # { prefix } " , cmd , : body = > body ) <nl> - doc1 . code . should eq ( 200 ) <nl> - doc1 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc1 . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' $ id ' ] . should eq ( eid ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' _id ' ] . should eq ( e_id ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' _to ' ] . should eq ( e_to ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' nameEdges ' ] . should eq ( nil ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' optional1 ' ] . should eq ( nil ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' optional2 ' ] . should eq ( " val2 " ) <nl> - doc1 . parsed_response [ ' edge ' ] [ ' $ label ' ] . should eq ( nil ) <nl> - end <nl> - <nl> - it " checks delete edge by $ id " do <nl> - cmd = " / _api / blueprints / edge ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " edge1 \ " , \ " _from \ " : \ " vert2 \ " , \ " _to \ " : \ " vert1 \ " , \ " optional1 \ " : \ " val1 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - eid = doc . parsed_response [ ' edge ' ] [ ' $ id ' ] <nl> - e_id = doc . parsed_response [ ' edge ' ] [ ' _id ' ] <nl> - <nl> - <nl> - cmd = " / _api / blueprints / edge / # { eid } ? graph = # { graph_name } " <nl> - doc1 = ArangoDB . log_delete ( " # { prefix } " , cmd ) <nl> - doc1 . code . should eq ( 200 ) <nl> - doc1 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc1 . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - <nl> - cmd = " / _api / blueprints / edge / # { eid } ? graph = # { graph_name } " <nl> - doc2 = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - doc2 . code . should eq ( 400 ) <nl> - doc2 . parsed_response [ ' error ' ] . should eq ( true ) <nl> - doc2 . parsed_response [ ' code ' ] . should eq ( 400 ) <nl> - end <nl> - <nl> - it " checks delete edge by _id " do <nl> - cmd = " / _api / blueprints / edge ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " edge1 \ " , \ " _from \ " : \ " vert2 \ " , \ " _to \ " : \ " vert1 \ " , \ " optional1 \ " : \ " val1 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - eid = doc . parsed_response [ ' edge ' ] [ ' $ id ' ] <nl> - e_id = doc . parsed_response [ ' edge ' ] [ ' _id ' ] <nl> - <nl> - cmd = " / _api / blueprints / edge / # { e_id } ? graph = # { graph_name } " <nl> - doc1 = ArangoDB . log_delete ( " # { prefix } " , cmd ) <nl> - doc1 . code . should eq ( 200 ) <nl> - doc1 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc1 . parsed_response [ ' code ' ] . should eq ( 200 ) <nl> - <nl> - cmd = " / _api / blueprints / edge / # { eid } ? graph = # { graph_name } " <nl> - doc2 = ArangoDB . log_get ( " # { prefix } " , cmd ) <nl> - doc2 . code . should eq ( 400 ) <nl> - doc2 . parsed_response [ ' error ' ] . should eq ( true ) <nl> - doc2 . parsed_response [ ' code ' ] . should eq ( 400 ) <nl> - end <nl> - <nl> - end <nl> - <nl> - # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> - # # checking edges responses <nl> - # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> - <nl> - context " checks blueprints edges requests " do <nl> - before do <nl> - truncate_collection ( prefix , " _graphs " ) <nl> - cmd = " / _api / blueprints / graph " <nl> - body = " { \ " name \ " : \ " # { graph_name } \ " , \ " verticesName \ " : \ " # { vertex_collection } \ " , \ " edgesName \ " : \ " # { edge_collection } \ " } " <nl> - ArangoDB . post ( cmd , : body = > body ) <nl> - <nl> - cmd = " / _api / blueprints / vertex ? graph = # { graph_name } " <nl> - body = " { \ " $ id \ " : \ " id1 \ " , \ " optional1 \ " : \ " val1a \ " , \ " optional2 \ " : \ " val2a \ " } " <nl> - ArangoDB . post ( cmd , : body = > body ) <nl> - body = " { \ " $ id \ " : \ " id2 \ " , \ " optional1 \ " : \ " val1b \ " , \ " optional2 \ " : \ " val2b \ " } " <nl> - ArangoDB . post ( cmd , : body = > body ) <nl> - body = " { \ " $ id \ " : \ " id3 \ " , \ " optional1 \ " : \ " val1c \ " , \ " optional2 \ " : \ " val2c \ " } " <nl> - ArangoDB . post ( cmd , : body = > body ) <nl> - <nl> - cmd = " / _api / blueprints / edge ? graph = # { graph_name } " <nl> - body1 = " { \ " $ id \ " : \ " edge1 \ " , \ " _from \ " : \ " id1 \ " , \ " _to \ " : \ " id2 \ " , \ " optional1 \ " : \ " val1a \ " } " <nl> - ArangoDB . post ( cmd , : body = > body1 ) <nl> - <nl> - body2 = " { \ " $ id \ " : \ " edge2 \ " , \ " _from \ " : \ " id2 \ " , \ " _to \ " : \ " id3 \ " , \ " optional1 \ " : \ " val1b \ " } " <nl> - ArangoDB . post ( cmd , : body = > body2 ) <nl> - end <nl> - <nl> - after do <nl> - truncate_collection ( prefix , " _graphs " ) <nl> - ArangoDB . drop_collection ( vertex_collection ) <nl> - ArangoDB . drop_collection ( edge_collection ) <nl> - end <nl> - <nl> - it " checks list of all edges " do <nl> - cmd = " / _api / blueprints / edges ? graph = # { graph_name } " <nl> - body = " { \ " batchSize \ " : 100 } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 201 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 201 ) <nl> - doc . parsed_response [ ' result ' ] . count . should eq ( 2 ) <nl> - end <nl> - <nl> - it " checks list of all edges of one vertex " do <nl> - cmd = " / _api / blueprints / edges ? graph = # { graph_name } " <nl> - body = " { \ " batchSize \ " : 100 , \ " vertex \ " : \ " id1 \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 201 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 201 ) <nl> - doc . parsed_response [ ' result ' ] . count . should eq ( 1 ) <nl> - doc . parsed_response [ ' result ' ] [ 0 ] [ ' $ id ' ] . should eq ( " edge1 " ) <nl> - <nl> - cmd = " / _api / blueprints / edges ? graph = # { graph_name } " <nl> - body = " { \ " batchSize \ " : 100 , \ " vertex \ " : \ " id2 \ " } " <nl> - doc2 = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc2 . code . should eq ( 201 ) <nl> - doc2 . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc2 . parsed_response [ ' code ' ] . should eq ( 201 ) <nl> - doc2 . parsed_response [ ' result ' ] . count . should eq ( 2 ) <nl> - end <nl> - <nl> - it " checks list of all in edges of one vertex " do <nl> - cmd = " / _api / blueprints / edges ? graph = # { graph_name } " <nl> - body = " { \ " batchSize \ " : 100 , \ " vertex \ " : \ " id2 \ " , \ " direction \ " : \ " in \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 201 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 201 ) <nl> - doc . parsed_response [ ' result ' ] . count . should eq ( 1 ) <nl> - doc . parsed_response [ ' result ' ] [ 0 ] [ ' $ id ' ] . should eq ( " edge1 " ) <nl> - end <nl> - <nl> - it " checks list of all out edges of one vertex " do <nl> - cmd = " / _api / blueprints / edges ? graph = # { graph_name } " <nl> - body = " { \ " batchSize \ " : 100 , \ " vertex \ " : \ " id2 \ " , \ " direction \ " : \ " out \ " } " <nl> - doc = ArangoDB . log_post ( " # { prefix } " , cmd , : body = > body ) <nl> - <nl> - doc . code . should eq ( 201 ) <nl> - doc . parsed_response [ ' error ' ] . should eq ( false ) <nl> - doc . parsed_response [ ' code ' ] . should eq ( 201 ) <nl> - doc . parsed_response [ ' result ' ] . count . should eq ( 1 ) <nl> - doc . parsed_response [ ' result ' ] [ 0 ] [ ' $ id ' ] . should eq ( " edge2 " ) <nl> - end <nl> - <nl> - end <nl> - <nl> - end <nl> - <nl> - end <nl> deleted file mode 100644 <nl> index 662ed341820 . . 00000000000 <nl> mmm a / arangod / Documentation / api - blueprints . dox <nl> ppp / dev / null <nl> <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief over the wire protocol <nl> - / / / <nl> - / / / @ file <nl> - / / / <nl> - / / / DISCLAIMER <nl> - / / / <nl> - / / / Copyright 2012 triagens GmbH , Cologne , Germany <nl> - / / / <nl> - / / / Licensed under the Apache License , Version 2 . 0 ( the " License " ) ; <nl> - / / / you may not use this file except in compliance with the License . <nl> - / / / You may obtain a copy of the License at <nl> - / / / <nl> - / / / http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> - / / / <nl> - / / / Unless required by applicable law or agreed to in writing , software <nl> - / / / distributed under the License is distributed on an " AS IS " BASIS , <nl> - / / / WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> - / / / See the License for the specific language governing permissions and <nl> - / / / limitations under the License . <nl> - / / / <nl> - / / / Copyright holder is triAGENS GmbH , Cologne , Germany <nl> - / / / <nl> - / / / @ author Jan Steemann <nl> - / / / @ author Copyright 2012 , triAGENS GmbH , Cologne , Germany <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ page HttpBlueprints HTTP Interface for Blueprints implementations <nl> - / / / <nl> - / / / Blueprints is a property graph model interface with provided implementations . <nl> - / / / Databases that implement the Blueprints interfaces automatically support <nl> - / / / Blueprints - enabled applications . ( http : / / tinkerpop . com / ) <nl> - / / / <nl> - / / / @ anchor A_JSF_POST_blueprints_graph <nl> - / / / @ copydetails JSF_POST_blueprints_graph <nl> - / / / <nl> - / / / @ anchor A_JSF_GET_blueprints_graph <nl> - / / / @ copydetails JSF_GET_blueprints_graph <nl> - / / / <nl> - / / / @ anchor A_JSF_DELETE_blueprints_graph <nl> - / / / @ copydetails JSF_DELETE_blueprints_graph <nl> - / / / <nl> - / / / <nl> - / / / <nl> - / / / @ anchor A_JSF_POST_blueprints_vertex <nl> - / / / @ copydetails JSF_POST_blueprints_vertex <nl> - / / / <nl> - / / / @ anchor A_JSF_GET_blueprints_vertex <nl> - / / / @ copydetails JSF_GET_blueprints_vertex <nl> - / / / <nl> - / / / @ anchor A_JSF_PUT_blueprints_vertex <nl> - / / / @ copydetails JSF_PUT_blueprints_vertex <nl> - / / / <nl> - / / / @ anchor A_JSF_DELETE_blueprints_vertex <nl> - / / / @ copydetails JSF_DELETE_blueprints_vertex <nl> - / / / <nl> - / / / @ anchor A_JSF_POST_blueprints_vertices <nl> - / / / @ copydetails JSF_POST_blueprints_vertices <nl> - / / / <nl> - / / / @ anchor A_JSF_POST_blueprints_edge <nl> - / / / @ copydetails JSF_POST_blueprints_edge <nl> - / / / <nl> - / / / @ anchor A_JSF_GET_blueprints_edge <nl> - / / / @ copydetails JSF_GET_blueprints_edge <nl> - / / / <nl> - / / / @ anchor A_JSF_PUT_blueprints_edge <nl> - / / / @ copydetails JSF_PUT_blueprints_edge <nl> - / / / <nl> - / / / @ anchor A_JSF_DELETE_blueprints_edge <nl> - / / / @ copydetails JSF_DELETE_blueprints_edge <nl> - / / / <nl> - / / / @ anchor A_JSF_POST_blueprints_edges <nl> - / / / @ copydetails JSF_POST_blueprints_edges <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / Local Variables : <nl> - / / mode : c + + <nl> - / / mode : outline - minor <nl> - / / outline - regexp : " ^ \ \ ( / / / @ brief \ \ | / / / { @ inheritDoc } \ \ | / / / @ addtogroup \ \ | / / - - SECTION - - \ \ | / / / @ page \ \ | / / / @ \ \ } \ \ ) " <nl> - / / End : <nl> deleted file mode 100644 <nl> index 530e5d3e17e . . 00000000000 <nl> mmm a / js / actions / system / api - blueprints . js <nl> ppp / dev / null <nl> <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief blueprints graph api <nl> - / / / <nl> - / / / @ file <nl> - / / / <nl> - / / / DISCLAIMER <nl> - / / / <nl> - / / / Copyright 2012 triagens GmbH , Cologne , Germany <nl> - / / / <nl> - / / / Licensed under the Apache License , Version 2 . 0 ( the " License " ) ; <nl> - / / / you may not use this file except in compliance with the License . <nl> - / / / You may obtain a copy of the License at <nl> - / / / <nl> - / / / http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> - / / / <nl> - / / / Unless required by applicable law or agreed to in writing , software <nl> - / / / distributed under the License is distributed on an " AS IS " BASIS , <nl> - / / / WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> - / / / See the License for the specific language governing permissions and <nl> - / / / limitations under the License . <nl> - / / / <nl> - / / / Copyright holder is triAGENS GmbH , Cologne , Germany <nl> - / / / <nl> - / / / @ author Achim Brandt <nl> - / / / @ author Jan Steemann <nl> - / / / @ author Copyright 2012 , triAGENS GmbH , Cologne , Germany <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - var arangodb = require ( " org / arangodb " ) ; <nl> - var actions = require ( " org / arangodb / actions " ) ; <nl> - var graph = require ( " org / arangodb / graph " ) ; <nl> - var ArangoError = require ( " org / arangodb / arango - error " ) . ArangoError ; <nl> - var QUERY = require ( " internal " ) . AQL_QUERY ; <nl> - <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - / / - - SECTION - - global variables <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ addtogroup ArangoAPI <nl> - / / / @ { <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief url prefix <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - var BLUEPRINTS_URL = " _api / blueprints " ; <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief context <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - var BLUEPRINTS_CONTEXT = " api " ; <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ } <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - / / - - SECTION - - private functions <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ addtogroup ArangoAPI <nl> - / / / @ { <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief get graph by request parameter ( throws exception ) <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function blueprints_graph_by_request_parameter ( req ) { <nl> - var name = req . parameters [ ' graph ' ] ; <nl> - <nl> - if ( name = = undefined ) { <nl> - throw " missing graph name " ; <nl> - } <nl> - <nl> - return new graph . Graph ( name ) ; <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief get graph by request parameter ( throws exception ) <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function blueprints_graph_by_request ( req ) { <nl> - var id = req . suffix [ 0 ] ; <nl> - <nl> - if ( req . suffix . length > 1 ) { <nl> - id + = " / " + req . suffix [ 1 ] ; <nl> - } <nl> - <nl> - var g = new graph . Graph ( id ) ; <nl> - <nl> - if ( g . _properties = = null ) { <nl> - throw " no graph found for : " + id ; <nl> - } <nl> - <nl> - return g ; <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief get vertex by request ( throws exception ) <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function blueprints_vertex_by_request ( graph , req ) { <nl> - var id = req . suffix [ 0 ] ; <nl> - <nl> - if ( req . suffix . length > 1 ) { <nl> - id + = " / " + req . suffix [ 1 ] ; <nl> - } <nl> - <nl> - var vertex = graph . getVertex ( id ) ; <nl> - <nl> - if ( vertex = = undefined | | vertex . _properties = = undefined ) { <nl> - throw " no vertex found for : " + id ; <nl> - } <nl> - <nl> - return vertex ; <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief get edge by request ( throws exception ) <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function blueprints_edge_by_request ( graph , req ) { <nl> - var id = req . suffix [ 0 ] ; <nl> - if ( req . suffix . length > 1 ) { <nl> - id + = " / " + req . suffix [ 1 ] ; <nl> - } <nl> - <nl> - var edge = graph . getEdge ( id ) ; <nl> - <nl> - if ( edge = = undefined | | edge . _properties = = undefined ) { <nl> - throw " no edge found for : " + id ; <nl> - } <nl> - <nl> - return edge ; <nl> - } <nl> - <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ } <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - / / - - SECTION - - graph functions <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ addtogroup ArangoAPI <nl> - / / / @ { <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief create a blueprint graph <nl> - / / / <nl> - / / / @ RESTHEADER { POST / _api / blueprints / graph , create graph } <nl> - / / / <nl> - / / / @ REST { POST / _api / blueprints / graph } <nl> - / / / <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / <nl> - / / / Creates a new graph . <nl> - / / / <nl> - / / / The call expects a JSON hash array as body with the following attributes : <nl> - / / / <nl> - / / / - @ LIT { name } : The identifier or name of the new graph . <nl> - / / / - @ LIT { verticesName } : The name of the vertices collection . <nl> - / / / - @ LIT { edgesName } : The name of the egge collection . <nl> - / / / <nl> - / / / Returns an object with an attribute @ LIT { graph } containing a <nl> - / / / list of all graph properties . <nl> - / / / <nl> - / / / @ EXAMPLES <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - create - graph <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function POST_blueprints_graph ( req , res ) { <nl> - try { <nl> - var json = actions . getJsonBody ( req , res , arangodb . ERROR_GRAPH_COULD_NOT_CREATE_GRAPH ) ; <nl> - <nl> - if ( json = = = undefined ) { <nl> - return ; <nl> - } <nl> - <nl> - var name = json [ ' name ' ] ; <nl> - var vertices = json [ ' verticesName ' ] ; <nl> - var edges = json [ ' edgesName ' ] ; <nl> - <nl> - var g = new graph . Graph ( name , vertices , edges ) ; <nl> - <nl> - if ( g . _properties = = null ) { <nl> - throw " no properties of graph found " ; <nl> - } <nl> - <nl> - actions . resultOk ( req , res , actions . HTTP_OK , { " graph " : g . _properties } ) ; <nl> - } <nl> - catch ( err ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_COULD_NOT_CREATE_GRAPH , err ) ; <nl> - } <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief get blueprint graph properties <nl> - / / / <nl> - / / / @ RESTHEADER { GET / _api / blueprints / graph , get graph properties } <nl> - / / / <nl> - / / / @ REST { GET / _api / blueprints / graph / @ FA { graph - identifier } } <nl> - / / / <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / <nl> - / / / Returns an object with an attribute @ LIT { graph } containing a <nl> - / / / list of all graph properties . <nl> - / / <nl> - / / / @ EXAMPLES <nl> - / / / <nl> - / / / get graph by name <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - get - graph <nl> - / / / <nl> - / / / get graph by document id <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - get - graph - by - id <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function GET_blueprints_graph ( req , res ) { <nl> - if ( req . suffix . length < 1 ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_GRAPH , " graph not found " ) ; <nl> - return ; <nl> - } <nl> - <nl> - try { <nl> - var g = blueprints_graph_by_request ( req ) ; <nl> - <nl> - actions . resultOk ( req , res , actions . HTTP_OK , { " graph " : g . _properties } ) ; <nl> - } <nl> - catch ( err ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_GRAPH , err ) ; <nl> - } <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief deletes a blueprint graph <nl> - / / / <nl> - / / / @ RESTHEADER { DELETE / _api / blueprints / graph , delete graph } <nl> - / / / <nl> - / / / @ REST { DELETE / _api / blueprints / graph / @ FA { graph - identifier } } <nl> - / / / <nl> - / / / Deletes graph , edges and vertices <nl> - / / / <nl> - / / / @ EXAMPLES <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - delete - graph <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function DELETE_blueprints_graph ( req , res ) { <nl> - if ( req . suffix . length < 1 ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_GRAPH , " graph not found " ) ; <nl> - return ; <nl> - } <nl> - <nl> - try { <nl> - var g = blueprints_graph_by_request ( req ) ; <nl> - <nl> - g . drop ( ) ; <nl> - <nl> - actions . resultOk ( req , res , actions . HTTP_OK , { " deleted " : true } ) ; <nl> - } <nl> - catch ( err ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_GRAPH , err ) ; <nl> - } <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief actions gateway <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - actions . defineHttp ( { <nl> - url : BLUEPRINTS_URL + " / graph " , <nl> - context : BLUEPRINTS_CONTEXT , <nl> - <nl> - callback : function ( req , res ) { <nl> - try { <nl> - switch ( req . requestType ) { <nl> - case ( actions . POST ) : <nl> - POST_blueprints_graph ( req , res ) ; <nl> - break ; <nl> - <nl> - case ( actions . GET ) : <nl> - GET_blueprints_graph ( req , res ) ; <nl> - break ; <nl> - <nl> - case ( actions . DELETE ) : <nl> - DELETE_blueprints_graph ( req , res ) ; <nl> - break ; <nl> - <nl> - default : <nl> - actions . resultUnsupported ( req , res ) ; <nl> - } <nl> - } <nl> - catch ( err ) { <nl> - actions . resultException ( req , res , err ) ; <nl> - } <nl> - } <nl> - } ) ; <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ } <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - / / - - SECTION - - vertex functions <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ addtogroup ArangoAPI <nl> - / / / @ { <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief creates a blueprint graph vertex <nl> - / / / <nl> - / / / @ RESTHEADER { POST / _api / blueprints / vertex , create vertex } <nl> - / / / <nl> - / / / @ REST { POST / _api / blueprints / vertex ? graph = @ FA { graph - identifier } } <nl> - / / / <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / <nl> - / / / Creates a vertex in a graph . <nl> - / / / <nl> - / / / The call expects a JSON hash array as body with the vertex properties : <nl> - / / / <nl> - / / / - @ LIT { $ id } : The identifier or name of the vertex ( optional ) . <nl> - / / / - further optional attributes . <nl> - / / / <nl> - / / / Returns an object with an attribute @ LIT { vertex } containing a <nl> - / / / list of all vertex properties . <nl> - / / / <nl> - / / / @ EXAMPLES <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - create - vertex <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function POST_blueprints_vertex ( req , res ) { <nl> - try { <nl> - var g = blueprints_graph_by_request_parameter ( req ) ; <nl> - var json = actions . getJsonBody ( req , res ) ; <nl> - var id = undefined ; <nl> - <nl> - if ( json ) { <nl> - id = json [ " $ id " ] ; <nl> - } <nl> - <nl> - var v = g . addVertex ( id , json ) ; <nl> - <nl> - if ( v = = undefined | | v . _properties = = undefined ) { <nl> - throw " could not create vertex " ; <nl> - } <nl> - <nl> - actions . resultOk ( req , res , actions . HTTP_OK , { " vertex " : v . _properties } ) ; <nl> - } <nl> - catch ( err ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_COULD_NOT_CREATE_VERTEX , err ) ; <nl> - } <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief get vertex properties <nl> - / / / <nl> - / / / @ RESTHEADER { GET / _api / blueprints / vertex , get vertex } <nl> - / / / <nl> - / / / @ REST { GET / _api / blueprints / vertex / @ FA { vertex - identifier } ? graph = @ FA { graph - identifier } } <nl> - / / / <nl> - / / / Returns an object with an attribute @ LIT { vertex } containing a <nl> - / / / list of all vertex properties . <nl> - / / / <nl> - / / / @ EXAMPLES <nl> - / / / <nl> - / / / get vertex properties by $ id <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - get - vertex <nl> - / / / <nl> - / / / get vertex properties by document id <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - get - vertex - by - id <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function GET_blueprints_vertex ( req , res ) { <nl> - if ( req . suffix . length < 1 ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_VERTEX , " vertex not found " ) ; <nl> - return ; <nl> - } <nl> - <nl> - try { <nl> - var g = blueprints_graph_by_request_parameter ( req ) ; <nl> - var v = blueprints_vertex_by_request ( g , req ) ; <nl> - <nl> - actions . resultOk ( req , res , actions . HTTP_OK , { " vertex " : v . _properties } ) ; <nl> - } <nl> - catch ( err ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_VERTEX , err ) ; <nl> - } <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief delete vertex <nl> - / / / <nl> - / / / @ RESTHEADER { DELETE / _api / blueprints / vertex , delete vertex } <nl> - / / / <nl> - / / / @ REST { DELETE / _api / blueprints / vertex / @ FA { vertex - identifier } ? graph = @ FA { graph - identifier } } <nl> - / / / <nl> - / / / Deletes vertex and all in and out edges of the vertex <nl> - / / / <nl> - / / / @ EXAMPLES <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - delete - vertex <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function DELETE_blueprints_vertex ( req , res ) { <nl> - if ( req . suffix . length < 1 ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_VERTEX , " vertex not found " ) ; <nl> - return ; <nl> - } <nl> - <nl> - try { <nl> - var g = blueprints_graph_by_request_parameter ( req ) ; <nl> - var v = blueprints_vertex_by_request ( g , req ) ; <nl> - <nl> - g . removeVertex ( v ) ; <nl> - <nl> - actions . resultOk ( req , res , actions . HTTP_OK , { " deleted " : true } ) ; <nl> - } <nl> - catch ( err ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_VERTEX , err ) ; <nl> - } <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief updates a vertex <nl> - / / / <nl> - / / / @ RESTHEADER { PUT / _api / blueprints / vertex , update vertex } <nl> - / / / <nl> - / / / @ REST { PUT / _api / blueprints / vertex / @ FA { vertex - identifier } ? graph = @ FA { graph - identifier } } <nl> - / / / <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / <nl> - / / / Replaces the vertex properties . <nl> - / / / <nl> - / / / The call expects a JSON hash array as body with the new vertex properties : <nl> - / / / <nl> - / / / - @ LIT { $ id } : The identifier or name of the vertex ( not changeable ) . <nl> - / / / <nl> - / / / - further optional attributes . <nl> - / / / <nl> - / / / Returns an object with an attribute @ LIT { vertex } containing a <nl> - / / / list of all vertex properties . <nl> - / / / <nl> - / / / @ EXAMPLES <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - change - vertex <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function PUT_blueprints_vertex ( req , res ) { <nl> - if ( req . suffix . length < 1 ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_COULD_NOT_CHANGE_VERTEX , " vertex not found " ) ; <nl> - return ; <nl> - } <nl> - <nl> - try { <nl> - var g = blueprints_graph_by_request_parameter ( req ) ; <nl> - var v = blueprints_vertex_by_request ( g , req ) ; <nl> - <nl> - var json = actions . getJsonBody ( req , res , arangodb . ERROR_GRAPH_COULD_NOT_CHANGE_VERTEX ) ; <nl> - <nl> - if ( json = = = undefined ) { <nl> - return ; <nl> - } <nl> - <nl> - var shallow = json . shallowCopy ; <nl> - shallow . $ id = v . _properties . $ id ; <nl> - <nl> - var id2 = g . _vertices . replace ( v . _properties , shallow ) ; <nl> - var result = g . _vertices . document ( id2 ) ; <nl> - <nl> - actions . resultOk ( req , res , actions . HTTP_OK , { " vertex " : result } ) ; <nl> - } <nl> - catch ( err ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_COULD_NOT_CHANGE_VERTEX , err ) ; <nl> - } <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief actions gateway <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - actions . defineHttp ( { <nl> - url : BLUEPRINTS_URL + " / vertex " , <nl> - context : BLUEPRINTS_CONTEXT , <nl> - <nl> - callback : function ( req , res ) { <nl> - try { <nl> - switch ( req . requestType ) { <nl> - case ( actions . POST ) : <nl> - POST_blueprints_vertex ( req , res ) ; <nl> - break ; <nl> - <nl> - case ( actions . DELETE ) : <nl> - DELETE_blueprints_vertex ( req , res ) ; <nl> - break ; <nl> - <nl> - case ( actions . GET ) : <nl> - GET_blueprints_vertex ( req , res ) ; <nl> - break ; <nl> - <nl> - case ( actions . PUT ) : <nl> - PUT_blueprints_vertex ( req , res ) ; <nl> - break ; <nl> - <nl> - default : <nl> - actions . resultUnsupported ( req , res ) ; <nl> - } <nl> - } <nl> - catch ( err ) { <nl> - actions . resultException ( req , res , err ) ; <nl> - } <nl> - } <nl> - } ) ; <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ } <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - / / - - SECTION - - vertices functions <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ addtogroup ArangoAPI <nl> - / / / @ { <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief get graph vertices <nl> - / / / <nl> - / / / @ RESTHEADER { POST / _api / blueprints / vertices , get vertices } <nl> - / / / <nl> - / / / @ REST { POST / _api / blueprints / vertices ? graph = @ FA { graph - identifier } } <nl> - / / / <nl> - / / / Returns a cursor . <nl> - / / / <nl> - / / / The call expects a JSON hash array as body to filter the edges : <nl> - / / / <nl> - / / / - @ LIT { vertex } : the identifier or name of a vertex . This selects inbound and <nl> - / / / outbound neighbors of a vertex . If a vertex is given the edge direction <nl> - / / / can be filterd by @ LIT { direction } and labels of edges can be filterd by <nl> - / / / @ LIT { labels } . <nl> - / / / - @ LIT { direction } : Filter for inbound ( value " in " ) or outbound ( value " out " ) <nl> - / / / neighbors . Default value is " any " . <nl> - / / / - @ LIT { key } : filter the result vertices by a key value pair <nl> - / / / - @ LIT { value } : the value of the @ LIT { key } <nl> - / / / - @ LIT { labels } : filter by an array of edge labels <nl> - / / / - @ LIT { batchSize } : the batch size of the returned cursor <nl> - / / / <nl> - / / / @ EXAMPLES <nl> - / / / <nl> - / / / Select all vertices <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - get - vertices <nl> - / / / <nl> - / / / Select of all neighbors of a vertex . <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - get - vertices2 <nl> - / / / <nl> - / / / Select of all outbound neighbors of a vertex . <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - get - outbound - vertices <nl> - / / <nl> - / / / Select of all neighbors of a vertex by a edge label . <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - get - vertices - label <nl> - / / / <nl> - / / / Select of vertices by key value <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - get - vertices - key <nl> - / / / <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function POST_blueprints_vertices ( req , res ) { <nl> - if ( req . suffix . length ! = 0 ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_VERTEX , " vertex not found " ) ; <nl> - return ; <nl> - } <nl> - <nl> - var json = actions . getJsonBody ( req , res ) ; <nl> - <nl> - if ( json = = = undefined ) { <nl> - json = { } ; <nl> - } <nl> - <nl> - <nl> - try { <nl> - var g = blueprints_graph_by_request_parameter ( req ) ; <nl> - var selectEdge = " " ; <nl> - var vertexFilter = " " ; <nl> - var edgeFilter = " " ; <nl> - var bindVars = { " @ vertexColl " : g . _properties . verticesName } ; <nl> - <nl> - if ( json . vertex ! = undefined ) { <nl> - / / get neighbors <nl> - var v = g . getVertex ( json . vertex ) ; <nl> - <nl> - if ( v = = undefined | | v . _properties = = undefined ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_VERTEX , " vertex not found " ) ; <nl> - return ; <nl> - } <nl> - selectEdge = " FOR e IN @ @ edgeColl " ; <nl> - <nl> - / / get inbound neighbors <nl> - if ( json . direction = = " in " ) { <nl> - edgeFilter = " FILTER e . _to = = @ id " ; <nl> - vertexFilter = " FILTER e . _from = = v . _id " ; <nl> - } <nl> - / / get outbound neighbors <nl> - else if ( json . direction = = " out " ) { <nl> - edgeFilter = " FILTER e . _from = = @ id " ; <nl> - vertexFilter = " FILTER e . _to = = v . _id " ; <nl> - } <nl> - / / get all neighbors <nl> - else { <nl> - vertexFilter = " FILTER ( ( e . _from = = @ id & & e . _to = = v . _id ) | | ( e . _to = = @ id & & e . _from = = v . _id ) ) " ; <nl> - } <nl> - <nl> - bindVars [ " @ edgeColl " ] = g . _properties . edgesName ; <nl> - bindVars [ " id " ] = v . _id ; <nl> - <nl> - / / filter edge labels <nl> - if ( json . labels ! = undefined & & json . labels instanceof Array ) { <nl> - if ( edgeFilter = = " " ) { <nl> - edgeFilter = " FILTER " ; <nl> - } <nl> - else { <nl> - edgeFilter + = " & & " ; <nl> - } <nl> - edgeFilter + = ' e [ " $ label " ] IN @ labels ' ; <nl> - bindVars [ " labels " ] = json . labels ; <nl> - } <nl> - <nl> - } <nl> - <nl> - / / filter key / value pairs labels <nl> - if ( json . key ! = undefined ) { <nl> - / / get all with key = value <nl> - if ( vertexFilter = = " " ) { vertexFilter = " FILTER " ; } else { vertexFilter + = " & & " ; } <nl> - vertexFilter + = " v [ @ key ] = = @ value " ; <nl> - bindVars [ " key " ] = json . key ; <nl> - bindVars [ " value " ] = json . value ; <nl> - } <nl> - <nl> - / / build aql query <nl> - var query = selectEdge + edgeFilter + " FOR v IN @ @ vertexColl " + vertexFilter + " RETURN v " ; <nl> - <nl> - var cursor = QUERY ( query , <nl> - bindVars , <nl> - ( json . count ! = undefined ? json . count : false ) , <nl> - json . batchSize , <nl> - ( json . batchSize = = undefined ) ) ; <nl> - <nl> - / / error occurred <nl> - if ( cursor instanceof ArangoError ) { <nl> - actions . resultBad ( req , res , cursor . errorNum , cursor . errorMessage ) ; <nl> - return ; <nl> - } <nl> - <nl> - / / this might dispose or persist the cursor <nl> - actions . resultCursor ( req , res , cursor , actions . HTTP_CREATED , { countRequested : json . count ? true : false } ) ; <nl> - } <nl> - catch ( err ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_VERTEX , err ) ; <nl> - } <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief actions gateway <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - actions . defineHttp ( { <nl> - url : BLUEPRINTS_URL + " / vertices " , <nl> - context : BLUEPRINTS_CONTEXT , <nl> - <nl> - callback : function ( req , res ) { <nl> - try { <nl> - switch ( req . requestType ) { <nl> - case ( actions . POST ) : <nl> - POST_blueprints_vertices ( req , res ) ; <nl> - break ; <nl> - <nl> - default : <nl> - actions . resultUnsupported ( req , res ) ; <nl> - } <nl> - } <nl> - catch ( err ) { <nl> - actions . resultException ( req , res , err ) ; <nl> - } <nl> - } <nl> - } ) ; <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ } <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - / / - - SECTION - - edge functions <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ addtogroup ArangoAPI <nl> - / / / @ { <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief creates a blueprint graph edge <nl> - / / / <nl> - / / / @ RESTHEADER { POST / _api / blueprints / edge , create edge } <nl> - / / / <nl> - / / / @ REST { POST / _api / blueprints / edge ? graph = @ FA { graph - identifier } } <nl> - / / / <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / <nl> - / / / Creates an edge in a graph . <nl> - / / / <nl> - / / / The call expects a JSON hash array as body with the edge properties : <nl> - / / / <nl> - / / / - @ LIT { $ id } : The identifier or name of the edge . <nl> - / / / - @ LIT { _from } : The identifier or name of the from vertex . <nl> - / / / - @ LIT { _to } : The identifier or name of the to vertex . <nl> - / / / - @ LIT { $ label } : A label for the edge ( optional ) . <nl> - / / / - further optional attributes . <nl> - / / / <nl> - / / / Returns an object with an attribute @ LIT { edge } containing the <nl> - / / / list of all edge properties . <nl> - / / / <nl> - / / / @ EXAMPLES <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - create - edge <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function POST_blueprints_edge ( req , res ) { <nl> - try { <nl> - var g = blueprints_graph_by_request_parameter ( req ) ; <nl> - var json = actions . getJsonBody ( req , res , arangodb . ERROR_GRAPH_COULD_NOT_CREATE_EDGE ) ; <nl> - <nl> - if ( json = = = undefined ) { <nl> - return ; <nl> - } <nl> - <nl> - var id = json [ " $ id " ] ; <nl> - var out = g . getVertex ( json [ " _from " ] ) ; <nl> - var ine = g . getVertex ( json [ " _to " ] ) ; <nl> - var label = json [ " $ label " ] ; <nl> - <nl> - var e = g . addEdge ( out , ine , id , label , json ) ; <nl> - <nl> - if ( e = = undefined | | e . _properties = = undefined ) { <nl> - throw " could not create edge " ; <nl> - } <nl> - <nl> - actions . resultOk ( req , res , actions . HTTP_OK , { " edge " : e . _properties } ) ; <nl> - } <nl> - catch ( err ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_COULD_NOT_CREATE_EDGE , err ) ; <nl> - } <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief get edge properties <nl> - / / / <nl> - / / / @ RESTHEADER { GET / _api / blueprints / edge , get edge } <nl> - / / / <nl> - / / / @ REST { GET / _api / blueprints / edge / @ FA { edge - identifier } ? graph = @ FA { graph - identifier } } <nl> - / / / <nl> - / / / Returns an object with an attribute @ LIT { edge } containing a <nl> - / / / list of all edge properties . <nl> - / / / <nl> - / / / @ EXAMPLES <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - get - edge <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function GET_blueprints_edge ( req , res ) { <nl> - if ( req . suffix . length < 1 ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_EDGE , " edge not found " ) ; <nl> - return ; <nl> - } <nl> - <nl> - try { <nl> - var g = blueprints_graph_by_request_parameter ( req ) ; <nl> - var e = blueprints_edge_by_request ( g , req ) ; <nl> - <nl> - actions . resultOk ( req , res , actions . HTTP_OK , { " edge " : e . _properties } ) ; <nl> - } <nl> - catch ( err ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_EDGE , err ) ; <nl> - } <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief deletes an edge <nl> - / / / <nl> - / / / @ RESTHEADER { DELETE / _api / blueprints / edge , delete edge } <nl> - / / / <nl> - / / / @ REST { DELETE / _api / blueprints / edge / @ FA { edge - identifier } ? graph = @ FA { graph - identifier } } <nl> - / / / <nl> - / / / Deletes an edges of the graph <nl> - / / / <nl> - / / / @ EXAMPLES <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - delete - edge <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function DELETE_blueprints_edge ( req , res ) { <nl> - if ( req . suffix . length < 1 ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_EDGE , " edge not found " ) ; <nl> - return ; <nl> - } <nl> - <nl> - try { <nl> - var g = blueprints_graph_by_request_parameter ( req ) ; <nl> - var e = blueprints_edge_by_request ( g , req ) ; <nl> - <nl> - g . removeEdge ( e ) ; <nl> - <nl> - actions . resultOk ( req , res , actions . HTTP_OK , { " deleted " : true } ) ; <nl> - } <nl> - catch ( err ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_EDGE , err ) ; <nl> - } <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief updates an edge <nl> - / / / <nl> - / / / @ RESTHEADER { PUT / _api / blueprints / edge , update edge } <nl> - / / / <nl> - / / / @ REST { PUT / _api / blueprints / edge / @ FA { edge - identifier } ? graph = @ FA { graph - identifier } } <nl> - / / / <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / <nl> - / / / Replaces the optional edge properties . <nl> - / / / <nl> - / / / The call expects a JSON hash array as body with the new edge properties . <nl> - / / / <nl> - / / / Returns an object with an attribute @ LIT { edge } containing a <nl> - / / / list of all edge properties . <nl> - / / / <nl> - / / / @ EXAMPLES <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - change - edge <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function PUT_blueprints_edge ( req , res ) { <nl> - if ( req . suffix . length < 1 ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_COULD_NOT_CHANGE_EDGE , " edge not found " ) ; <nl> - return ; <nl> - } <nl> - <nl> - try { <nl> - var g = blueprints_graph_by_request_parameter ( req ) ; <nl> - var e = blueprints_edge_by_request ( g , req ) ; <nl> - <nl> - var json = actions . getJsonBody ( req , res , arangodb . ERROR_GRAPH_COULD_NOT_CHANGE_EDGE ) ; <nl> - <nl> - if ( json = = = undefined ) { <nl> - return ; <nl> - } <nl> - <nl> - var shallow = json . shallowCopy ; <nl> - shallow . $ id = e . _properties . $ id ; <nl> - shallow . $ label = e . _properties . $ label ; <nl> - <nl> - var id2 = g . _edges . replace ( e . _properties , shallow ) ; <nl> - var result = g . _edges . document ( id2 ) ; <nl> - <nl> - actions . resultOk ( req , res , actions . HTTP_OK , { " edge " : result } ) ; <nl> - } <nl> - catch ( err ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_COULD_NOT_CHANGE_EDGE , err ) ; <nl> - } <nl> - } <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief actions gateway <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - actions . defineHttp ( { <nl> - url : BLUEPRINTS_URL + " / edge " , <nl> - context : BLUEPRINTS_CONTEXT , <nl> - <nl> - callback : function ( req , res ) { <nl> - try { <nl> - switch ( req . requestType ) { <nl> - case ( actions . POST ) : <nl> - POST_blueprints_edge ( req , res ) ; <nl> - break ; <nl> - <nl> - case ( actions . GET ) : <nl> - GET_blueprints_edge ( req , res ) ; <nl> - break ; <nl> - <nl> - case ( actions . DELETE ) : <nl> - DELETE_blueprints_edge ( req , res ) ; <nl> - break ; <nl> - <nl> - case ( actions . PUT ) : <nl> - PUT_blueprints_edge ( req , res ) ; <nl> - break ; <nl> - <nl> - default : <nl> - actions . resultUnsupported ( req , res ) ; <nl> - } <nl> - } <nl> - catch ( err ) { <nl> - actions . resultException ( req , res , err ) ; <nl> - } <nl> - } <nl> - } ) ; <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ } <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - / / - - SECTION - - edges functions <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ addtogroup ArangoAPI <nl> - / / / @ { <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief get graph edges <nl> - / / / <nl> - / / / @ RESTHEADER { POST / _api / blueprints / edges , get edges } <nl> - / / / <nl> - / / / @ REST { POST / _api / blueprints / edges ? graph = @ FA { graph - identifier } } <nl> - / / / <nl> - / / / Returns a cursor . <nl> - / / / <nl> - / / / The call expects a JSON hash array as body to filter the edges : <nl> - / / / <nl> - / / / - @ LIT { vertex } : the identifier or name of a vertex . This selects inbound and <nl> - / / / outbound edges of a vertex . If a vertex is given the edge direction <nl> - / / / can be filterd by @ LIT { direction } . <nl> - / / / - @ LIT { direction } : Filter for inbound ( value " in " ) or outbound ( value " out " ) <nl> - / / / edges . Default value is " any " . <nl> - / / / - @ LIT { labels } : filter by an array of edge labels <nl> - / / / - @ LIT { key } : filter the by a key value pair <nl> - / / / - @ LIT { value } : the value of the @ LIT { key } <nl> - / / / - @ LIT { batchSize } : the batch size of the returned cursor <nl> - / / / <nl> - / / / @ EXAMPLES <nl> - / / / <nl> - / / / Select all edges <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - get - edges <nl> - / / / <nl> - / / / Select of all inbound and outbound edges of a vertex . <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - get - edges - by - vertex <nl> - / / / <nl> - / / / Select of all outbound edges of a vertex . <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - get - out - edges - by - vertex <nl> - / / / <nl> - / / / Select of all edges of a vertex by a label . <nl> - / / / <nl> - / / / @ verbinclude api - blueprints - get - in - edges - by - vertex <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function POST_blueprints_edges ( req , res ) { <nl> - if ( req . suffix . length ! = 0 ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_VERTEX , " edges not found " ) ; <nl> - return ; <nl> - } <nl> - <nl> - var json = actions . getJsonBody ( req , res ) ; <nl> - <nl> - if ( json = = = undefined ) { <nl> - json = { } ; <nl> - } <nl> - <nl> - try { <nl> - var g = blueprints_graph_by_request_parameter ( req ) ; <nl> - var filter = " " ; <nl> - var bindVars = { " @ edgeColl " : g . _properties . edgesName } ; <nl> - <nl> - if ( json . vertex ! = undefined ) { <nl> - / / get edges of a vertex <nl> - var v = g . getVertex ( json . vertex ) ; <nl> - <nl> - if ( v = = undefined | | v . _properties = = undefined ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_VERTEX , " vertex not found " ) ; <nl> - return ; <nl> - } <nl> - <nl> - if ( json . direction = = " in " ) { <nl> - filter = " FILTER e . _to = = @ id " ; <nl> - } <nl> - else if ( json . direction = = " out " ) { <nl> - filter = " FILTER e . _from = = @ id " ; <nl> - } <nl> - else { <nl> - filter = " FILTER ( e . _from = = @ id | | e . _to = = @ id ) " ; <nl> - } <nl> - <nl> - bindVars [ " id " ] = v . _id ; <nl> - } <nl> - <nl> - if ( json . key ! = undefined ) { <nl> - / / get all with key = value <nl> - if ( filter = = " " ) { filter = " FILTER " ; } else { filter + = " & & " ; } <nl> - filter + = " e [ @ key ] = = @ value " ; <nl> - bindVars [ " key " ] = json . key ; <nl> - bindVars [ " value " ] = json . value ; <nl> - } <nl> - <nl> - if ( json . labels ! = undefined & & json . labels instanceof Array ) { <nl> - / / get all with $ lable = value <nl> - if ( filter = = " " ) { filter = " FILTER " ; } else { filter + = " & & " ; } <nl> - filter + = ' e [ " $ label " ] IN @ labels ' ; <nl> - bindVars [ " labels " ] = json . labels ; <nl> - } <nl> - <nl> - var query = " FOR e IN @ @ edgeColl " + filter + " RETURN e " ; <nl> - <nl> - var cursor = QUERY ( query , <nl> - bindVars , <nl> - ( json . count ! = undefined ? json . count : false ) , <nl> - json . batchSize , <nl> - ( json . batchSize = = undefined ) ) ; <nl> - <nl> - / / error occurred <nl> - if ( cursor instanceof ArangoError ) { <nl> - actions . resultBad ( req , res , cursor . errorNum , cursor . errorMessage ) ; <nl> - return ; <nl> - } <nl> - <nl> - / / this might dispose or persist the cursor <nl> - actions . resultCursor ( req , res , cursor , actions . HTTP_CREATED , { countRequested : json . count ? true : false } ) ; <nl> - } <nl> - catch ( err ) { <nl> - actions . resultBad ( req , res , arangodb . ERROR_GRAPH_INVALID_VERTEX , err ) ; <nl> - } <nl> - } <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief actions gateway <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - actions . defineHttp ( { <nl> - url : BLUEPRINTS_URL + " / edges " , <nl> - context : BLUEPRINTS_CONTEXT , <nl> - <nl> - callback : function ( req , res ) { <nl> - try { <nl> - switch ( req . requestType ) { <nl> - case ( actions . POST ) : <nl> - POST_blueprints_edges ( req , res ) ; <nl> - break ; <nl> - <nl> - default : <nl> - actions . resultUnsupported ( req , res ) ; <nl> - } <nl> - } <nl> - catch ( err ) { <nl> - actions . resultException ( req , res , err ) ; <nl> - } <nl> - } <nl> - } ) ; <nl> - <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ } <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - / / - - SECTION - - END - OF - FILE <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - <nl> - / / Local Variables : <nl> - / / mode : outline - minor <nl> - / / outline - regexp : " ^ \ \ ( / / / @ brief \ \ | / / / @ addtogroup \ \ | / / - - SECTION - - \ \ | / / / @ page \ \ | / / / @ } \ \ ) " <nl> - / / End : <nl>
deleted api for blueprints
arangodb/arangodb
0bc71a226d9cde2909e4874a75b7a05d994ddbc9
2013-01-29T12:44:31Z
mmm a / stdlib / public / core / FloatingPointTypes . swift . gyb <nl> ppp b / stdlib / public / core / FloatingPointTypes . swift . gyb <nl> extension $ { Self } : BinaryFloatingPoint { <nl> / / bit set . <nl> return _representation . explicitSignificand > = Float80 . _explicitBitMask <nl> } <nl> - % end <nl> + % end <nl> <nl> public static var infinity : $ { Self } { <nl> return $ { Self } ( sign : . plus , <nl>
Merge pull request from apple / stdlib - fix - indentation
apple/swift
1cc190adef4cea58cccf7f6e078dee7c10255b39
2016-05-31T23:21:05Z
mmm a / dlib / image_processing / scan_fhog_pyramid . h <nl> ppp b / dlib / image_processing / scan_fhog_pyramid . h <nl> namespace dlib <nl> <nl> typedef array < array2d < float > > fhog_image ; <nl> <nl> + static rectangle apply_filters_to_fhog ( <nl> + const fhog_filterbank & w , <nl> + const fhog_image & feats , <nl> + array2d < float > & saliency_image <nl> + ) ; <nl> + <nl> array < fhog_image > feats ; <nl> int cell_size ; <nl> unsigned long padding ; <nl> namespace dlib <nl> <nl> } ; <nl> <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + <nl> + template < typename T > <nl> + rectangle scan_fhog_pyramid < T > : : <nl> + apply_filters_to_fhog ( <nl> + const fhog_filterbank & w , <nl> + const fhog_image & feats , <nl> + array2d < float > & saliency_image <nl> + ) <nl> + { <nl> + const unsigned long num_separable_filters = w . num_separable_filters ( ) ; <nl> + rectangle area ; <nl> + if ( num_separable_filters > 31 * 3 ) <nl> + { <nl> + area = spatially_filter_image ( feats [ 0 ] , saliency_image , w . filters [ 0 ] ) ; <nl> + for ( unsigned long i = 1 ; i < w . filters . size ( ) ; + + i ) <nl> + { <nl> + / / now we filter but the output adds to saliency_image rather than <nl> + / / overwriting it . <nl> + spatially_filter_image ( feats [ i ] , saliency_image , w . filters [ i ] , 1 , false , true ) ; <nl> + } <nl> + } <nl> + else <nl> + { <nl> + saliency_image . clear ( ) ; <nl> + <nl> + / / find the first filter to apply <nl> + unsigned long i = 0 ; <nl> + while ( i < w . row_filters . size ( ) & & w . row_filters [ i ] . size ( ) = = 0 ) <nl> + + + i ; <nl> + <nl> + for ( ; i < w . row_filters . size ( ) ; + + i ) <nl> + { <nl> + for ( unsigned long j = 0 ; j < w . row_filters [ i ] . size ( ) ; + + j ) <nl> + { <nl> + if ( saliency_image . size ( ) = = 0 ) <nl> + area = spatially_filter_image_separable ( feats [ i ] , saliency_image , w . row_filters [ i ] [ j ] , w . col_filters [ i ] [ j ] , 1 , false , false ) ; <nl> + else <nl> + area = spatially_filter_image_separable ( feats [ i ] , saliency_image , w . row_filters [ i ] [ j ] , w . col_filters [ i ] [ j ] , 1 , false , true ) ; <nl> + } <nl> + } <nl> + if ( saliency_image . size ( ) = = 0 ) <nl> + { <nl> + saliency_image . set_size ( feats [ 0 ] . nr ( ) , feats [ 0 ] . nc ( ) ) ; <nl> + assign_all_pixels ( saliency_image , 0 ) ; <nl> + } <nl> + } <nl> + return area ; <nl> + } <nl> + <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> template < typename T > <nl> namespace dlib <nl> ( height + 1 ) % 2 ) ; <nl> <nl> array2d < float > saliency_image ; <nl> - array2d < float > temp ; <nl> pyramid_type pyr ; <nl> <nl> - const unsigned long num_separable_filters = w . num_separable_filters ( ) ; <nl> / / for all pyramid levels <nl> for ( unsigned long l = 0 ; l < feats . size ( ) ; + + l ) <nl> { <nl> - rectangle area ; <nl> - if ( num_separable_filters > 31 * 3 ) <nl> - { <nl> - area = spatially_filter_image ( feats [ l ] [ 0 ] , saliency_image , w . filters [ 0 ] ) ; <nl> - for ( unsigned long i = 1 ; i < w . filters . size ( ) ; + + i ) <nl> - { <nl> - / / now we filter but the output adds to saliency_image rather than <nl> - / / overwriting it . <nl> - spatially_filter_image ( feats [ l ] [ i ] , saliency_image , w . filters [ i ] , 1 , false , true ) ; <nl> - } <nl> - } <nl> - else <nl> - { <nl> - saliency_image . clear ( ) ; <nl> - <nl> - / / find the first filter to apply <nl> - unsigned long i = 0 ; <nl> - while ( i < w . row_filters . size ( ) & & w . row_filters [ i ] . size ( ) = = 0 ) <nl> - + + i ; <nl> - <nl> - for ( ; i < w . row_filters . size ( ) ; + + i ) <nl> - { <nl> - for ( unsigned long j = 0 ; j < w . row_filters [ i ] . size ( ) ; + + j ) <nl> - { <nl> - if ( saliency_image . size ( ) = = 0 ) <nl> - area = spatially_filter_image_separable ( feats [ l ] [ i ] , saliency_image , w . row_filters [ i ] [ j ] , w . col_filters [ i ] [ j ] , 1 , false , false ) ; <nl> - else <nl> - area = spatially_filter_image_separable ( feats [ l ] [ i ] , saliency_image , w . row_filters [ i ] [ j ] , w . col_filters [ i ] [ j ] , 1 , false , true ) ; <nl> - } <nl> - } <nl> - if ( saliency_image . size ( ) = = 0 ) <nl> - { <nl> - saliency_image . set_size ( feats [ l ] [ 0 ] . nr ( ) , feats [ l ] [ 0 ] . nc ( ) ) ; <nl> - assign_all_pixels ( saliency_image , 0 ) ; <nl> - } <nl> - } <nl> + const rectangle area = apply_filters_to_fhog ( w , feats [ l ] , saliency_image ) ; <nl> <nl> / / now search the saliency image for any detections <nl> for ( long r = area . top ( ) ; r < = area . bottom ( ) ; + + r ) <nl>
Slightly simplified the code
davisking/dlib
14a11a2688e7e1ef694938125e16b11d245503a7
2013-11-16T01:17:57Z
mmm a / docs / how - to - use - and - FAQ / FAQ - ncnn - produce - wrong - result . md <nl> ppp b / docs / how - to - use - and - FAQ / FAQ - ncnn - produce - wrong - result . md <nl> Besides , you may interest in https : / / github . com / conanhujinming / matcaffe2caffe <nl> <nl> If your caffemodel is trained using c + + caffe and opencv , then the input image should be BGR order . <nl> <nl> - If your model is trained using matlab caffe or mxnet or tensorflow , the input image would probably be RGB order . <nl> + If your model is trained using matlab caffe or pytorch or mxnet or tensorflow , the input image would probably be RGB order . <nl> <nl> The channel order can be changed on - the - fly through proper pixel type enum <nl> ` ` ` <nl> transform_param { <nl> } <nl> ` ` ` <nl> <nl> + For pytorch or mxnet - gluon <nl> + ` ` ` <nl> + transforms . ToTensor ( ) , <nl> + transforms . Normalize ( ( 0 . 485 , 0 . 456 , 0 . 406 ) , ( 0 . 229 , 0 . 224 , 0 . 225 ) ) , <nl> + ` ` ` <nl> + Then the corresponding code for ncnn pre process is <nl> + ` ` ` <nl> + / / R ' = ( R / 255 - 0 . 485 ) / 0 . 229 = ( R - 0 . 485 * 255 ) / 0 . 229 / 255 <nl> + / / G ' = ( G / 255 - 0 . 456 ) / 0 . 224 = ( G - 0 . 456 * 255 ) / 0 . 224 / 255 <nl> + / / B ' = ( B / 255 - 0 . 406 ) / 0 . 225 = ( B - 0 . 406 * 255 ) / 0 . 225 / 255 <nl> + const float mean_vals [ 3 ] = { 0 . 485f * 255 . f , 0 . 456f * 255 . f , 0 . 406f * 255 . f } ; <nl> + const float norm_vals [ 3 ] = { 1 / 0 . 229f / 255 . f , 1 / 0 . 224f / 255 . f , 1 / 0 . 225f / 255 . f } ; <nl> + in . substract_mean_normalize ( mean_vals , norm_vals ) ; <nl> + ` ` ` <nl> + <nl> # # # use the desired blob <nl> The blob names for input and extract are differ among models . <nl> <nl>
add FAQ about pytorch and mxnet - gluon preprocess
Tencent/ncnn
7e8cbe6170ab26f87e4f2ca452af4ad1227473da
2019-09-03T05:03:12Z
mmm a / tensorflow / contrib / util / __init__ . py <nl> ppp b / tensorflow / contrib / util / __init__ . py <nl> <nl> @ @ constant_value <nl> @ @ make_tensor_proto <nl> @ @ make_ndarray <nl> + @ ops_used_by_graph_def <nl> @ @ stripped_op_list_for_graph <nl> <nl> " " " <nl> <nl> from tensorflow . python . framework . tensor_util import constant_value <nl> from tensorflow . python . framework . tensor_util import make_tensor_proto <nl> from tensorflow . python . framework . tensor_util import MakeNdarray as make_ndarray <nl> + from tensorflow . python . training . saver import ops_used_by_graph_def <nl> from tensorflow . python . training . saver import stripped_op_list_for_graph <nl> from tensorflow . python . util . all_util import make_all <nl> <nl> mmm a / tensorflow / python / training / saver . py <nl> ppp b / tensorflow / python / training / saver . py <nl> <nl> from tensorflow . python . util import compat <nl> <nl> <nl> - def stripped_op_list_for_graph ( graph_def ) : <nl> - " " " Collect the ops used by a graph . <nl> + def ops_used_by_graph_def ( graph_def ) : <nl> + " " " Collect the list of ops used by a graph . <nl> <nl> - This function computes the ` stripped_op_list ` field of ` MetaGraphDef ` and <nl> - similar protos . The result can be communicated from the producer to the <nl> - consumer , which can then use the C + + function <nl> - ` RemoveNewDefaultAttrsFromGraphDef ` to improve forwards compatibility . <nl> + Does not validate that the ops are all registered . <nl> <nl> Args : <nl> graph_def : A ` GraphDef ` proto , as from ` graph . as_graph_def ( ) ` . <nl> <nl> Returns : <nl> - An ` OpList ` of ops used by the graph . <nl> - <nl> - Raises : <nl> - ValueError : If an unregistered op is used . <nl> + A list of strings , each naming an op used by the graph . <nl> " " " <nl> - # This is the Python equivalent of StrippedOpListForGraph in C + + . <nl> - # Unfortunately , since the Python op registry can differ from that in C + + , we <nl> - # can ' t remove the duplication using swig ( at least naively ) . <nl> - # TODO ( irving ) : Support taking graphs directly . <nl> - <nl> # Map function names to definitions <nl> name_to_function = { } <nl> for fun in graph_def . library . function : <nl> def mark_op_as_used ( op ) : <nl> for node in fun . node : <nl> mark_op_as_used ( node . op ) <nl> <nl> + return [ op for op in used_ops if op not in name_to_function ] <nl> + <nl> + <nl> + def stripped_op_list_for_graph ( graph_def ) : <nl> + " " " Collect the stripped OpDefs for ops used by a graph . <nl> + <nl> + This function computes the ` stripped_op_list ` field of ` MetaGraphDef ` and <nl> + similar protos . The result can be communicated from the producer to the <nl> + consumer , which can then use the C + + function <nl> + ` RemoveNewDefaultAttrsFromGraphDef ` to improve forwards compatibility . <nl> + <nl> + Args : <nl> + graph_def : A ` GraphDef ` proto , as from ` graph . as_graph_def ( ) ` . <nl> + <nl> + Returns : <nl> + An ` OpList ` of ops used by the graph . <nl> + <nl> + Raises : <nl> + ValueError : If an unregistered op is used . <nl> + " " " <nl> + # This is the Python equivalent of StrippedOpListForGraph in C + + . <nl> + # Unfortunately , since the Python op registry can differ from that in C + + , we <nl> + # can ' t remove the duplication using swig ( at least naively ) . <nl> + # TODO ( irving ) : Support taking graphs directly . <nl> + <nl> + used_ops = ops_used_by_graph_def ( graph_def ) <nl> + <nl> # Verify that all used ops are registered . <nl> registered_ops = op_def_registry . get_registered_ops ( ) <nl> # These internal ops used by functions are not registered , so we need to <nl> # whitelist them . # TODO ( irving ) : Do something better here . <nl> op_whitelist = ( " _Arg " , " _Retval " , " _ListToArray " , " _ArrayToList " ) <nl> for op in used_ops : <nl> - if ( op not in name_to_function and op not in registered_ops and <nl> - op not in op_whitelist ) : <nl> + if op not in registered_ops and op not in op_whitelist : <nl> raise ValueError ( " Op % s is used by the graph , but is not registered " % op ) <nl> <nl> # Build the stripped op list in sorted order <nl> def _add_collection_def ( meta_graph_def , key ) : <nl> " " " <nl> if not isinstance ( key , six . string_types ) and not isinstance ( key , bytes ) : <nl> logging . warning ( " Only collections with string type keys will be " <nl> - " serialized . This key has % s " % type ( key ) ) <nl> + " serialized . This key has % s " , type ( key ) ) <nl> return <nl> collection_list = ops . get_collection ( key ) <nl> if not collection_list : <nl> def _add_collection_def ( meta_graph_def , key ) : <nl> except Exception as e : # pylint : disable = broad - except <nl> logging . warning ( " Error encountered when serializing % s . \ n " <nl> " Type is unsupported , or the types of the items don ' t " <nl> - " match field type in CollectionDef . \ n % s " % ( key , str ( e ) ) ) <nl> + " match field type in CollectionDef . \ n % s " , key , str ( e ) ) <nl> if key in meta_graph_def . collection_def : <nl> del meta_graph_def . collection_def [ key ] <nl> return <nl> def _import_meta_graph_def ( meta_graph_def ) : <nl> for key , col_def in meta_graph_def . collection_def . items ( ) : <nl> kind = col_def . WhichOneof ( " kind " ) <nl> if kind is None : <nl> - logging . error ( " Cannot identify data type for collection % s . Skipping . " <nl> - % key ) <nl> + logging . error ( " Cannot identify data type for collection % s . Skipping . " , <nl> + key ) <nl> continue <nl> from_proto = ops . get_from_proto_function ( key ) <nl> if from_proto : <nl>
Add function ops_used_by_graph_def ( ) , with the functionality of
tensorflow/tensorflow
ec4d8840a5b42a2d88cef732b2c7f3e9f1e4b18d
2016-04-29T17:32:12Z
mmm a / depends / packages / miniupnpc . mk <nl> ppp b / depends / packages / miniupnpc . mk <nl> <nl> package = miniupnpc <nl> - $ ( package ) _version = 1 . 9 . 20150609 <nl> + $ ( package ) _version = 1 . 9 . 20150730 <nl> $ ( package ) _download_path = http : / / miniupnp . free . fr / files <nl> $ ( package ) _file_name = $ ( package ) - $ ( $ ( package ) _version ) . tar . gz <nl> - $ ( package ) _sha256_hash = 86e6ccec5b660ba6889893d1f3fca21db087c6466b1a90f495a1f87ab1cd1c36 <nl> + $ ( package ) _sha256_hash = 1d64fab1fd3b4c8545139341ba197f19329a863f4f21b578fc2a228ab586a604 <nl> <nl> define $ ( package ) _set_vars <nl> $ ( package ) _build_opts = CC = " $ ( $ ( package ) _cc ) " <nl>
depends : bump miniupnpc to 1 . 9 . 20150730
bitcoin/bitcoin
888c595cffe73b0d49434acf49a9611cbff1ea1d
2015-09-02T16:05:35Z
mmm a / include / grpcpp / server . h <nl> ppp b / include / grpcpp / server . h <nl> class Server : public ServerInterface , private GrpcLibraryCodegen { <nl> std : : unique_ptr < HealthCheckServiceInterface > health_check_service_ ; <nl> bool health_check_service_disabled_ ; <nl> <nl> + / / When appropriate , use a default callback generic service to handle <nl> + / / unimplemented methods <nl> + std : : unique_ptr < experimental : : CallbackGenericService > unimplemented_service_ ; <nl> + <nl> / / A special handler for resource exhausted in sync case <nl> std : : unique_ptr < internal : : MethodHandler > resource_exhausted_handler_ ; <nl> <nl> mmm a / src / cpp / server / server_cc . cc <nl> ppp b / src / cpp / server / server_cc . cc <nl> void Server : : Start ( ServerCompletionQueue * * cqs , size_t num_cqs ) { <nl> RegisterService ( nullptr , default_health_check_service_impl ) ; <nl> } <nl> <nl> + / / If this server uses callback methods , then create a callback generic <nl> + / / service to handle any unimplemented methods using the default reactor <nl> + / / creator <nl> + if ( ! callback_reqs_to_start_ . empty ( ) & & ! has_callback_generic_service_ ) { <nl> + unimplemented_service_ . reset ( new experimental : : CallbackGenericService ) ; <nl> + RegisterCallbackGenericService ( unimplemented_service_ . get ( ) ) ; <nl> + } <nl> + <nl> grpc_server_start ( server_ ) ; <nl> <nl> if ( ! has_async_generic_service_ & & ! has_callback_generic_service_ ) { <nl>
Properly implement unimplemented RPCs at callback - only server
grpc/grpc
b7f14fdab8c6da31b8009a4b4dc395a913660493
2019-03-07T07:43:34Z
mmm a / CMakeLists . txt <nl> ppp b / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> # <nl> # Parts of this file come from the Allegro 4 . 4 CMakeLists . txt <nl> <nl> mmm a / README . html <nl> ppp b / README . html <nl> <nl> < div id = " page " > <nl> <nl> < div id = " title " > ASEPRITE < / div > <nl> - < div id = " subtitle " > Copyright & copy ; 2001 - 2011 David Capello < / div > <nl> + < div id = " subtitle " > Copyright & copy ; 2001 - 2012 David Capello < / div > <nl> < div id = " warning " > <nl> THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY < br / > <nl> See < a href = " # license " > license < / a > section for more information . <nl> < h1 > TABLE OF CONTENTS < / h1 > <nl> AllegroFont wrapper . <nl> < / div > <nl> <nl> - < div id = " footer " > Copyright & copy ; 2001 - 2011 David Capello < / div > <nl> + < div id = " footer " > Copyright & copy ; 2001 - 2012 David Capello < / div > <nl> < / div > <nl> < / body > <nl> < / html > <nl> mmm a / config . h <nl> ppp b / config . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> <nl> # define VERSION " 0 . 9 . 1 " <nl> # define ASE_BETA 1 <nl> # define WEBSITE " http : / / www . aseprite . org / " <nl> - # define COPYRIGHT " Copyright ( C ) 2001 - 2011 David Capello " <nl> + # define COPYRIGHT " Copyright ( C ) 2001 - 2012 David Capello " <nl> <nl> # define PRINTF verbose_printf <nl> <nl> mmm a / data / widgets / advanced_mode . xml <nl> ppp b / data / widgets / advanced_mode . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " Warning - Important " name = " advanced_mode_warning " > <nl> < grid columns = " 1 " > <nl> mmm a / data / widgets / canvas_size . xml <nl> ppp b / data / widgets / canvas_size . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < box vertical = " true " name = " main_box " > <nl> < box horizontal = " true " > <nl> mmm a / data / widgets / cel_properties . xml <nl> ppp b / data / widgets / cel_properties . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " Cel Properties " name = " cel_properties " > <nl> < grid columns = " 2 " > <nl> mmm a / data / widgets / color_curve . xml <nl> ppp b / data / widgets / color_curve . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " Point Properties " name = " point_properties " > <nl> < box vertical = " true " > <nl> mmm a / data / widgets / convolution_matrix . xml <nl> ppp b / data / widgets / convolution_matrix . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < box vertical = " true " name = " controls " expansive = " true " > <nl> < view expansive = " true " name = " view " minwidth = " 128 " minheight = " 64 " > <nl> mmm a / data / widgets / despeckle . xml <nl> ppp b / data / widgets / despeckle . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < grid columns = " 2 " name = " controls " > <nl> < label text = " Width : " / > <nl> mmm a / data / widgets / draw_text . xml <nl> ppp b / data / widgets / draw_text . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " Draw Text " name = " drawtext_window " > <nl> < box vertical = " true " > <nl> mmm a / data / widgets / duplicate_sprite . xml <nl> ppp b / data / widgets / duplicate_sprite . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " Duplicate Sprite " name = " duplicate_sprite " > <nl> < box vertical = " true " > <nl> mmm a / data / widgets / file_selector . xml <nl> ppp b / data / widgets / file_selector . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " " name = " file_selector " > <nl> < box vertical = " true " > <nl> mmm a / data / widgets / frame_duration . xml <nl> ppp b / data / widgets / frame_duration . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " Frame Duration " name = " frame_duration " > <nl> < grid columns = " 3 " > <nl> mmm a / data / widgets / grid_settings . xml <nl> ppp b / data / widgets / grid_settings . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " Grid Settings " name = " grid_settings " > <nl> < grid columns = " 4 " > <nl> mmm a / data / widgets / jpeg_options . xml <nl> ppp b / data / widgets / jpeg_options . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " JPEG Options " name = " jpeg_options " > <nl> < grid columns = " 2 " > <nl> mmm a / data / widgets / main_window . xml <nl> ppp b / data / widgets / main_window . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window noborders = " true " desktop = " true " text = " Main Window " name = " main_window " > <nl> < box noborders = " true " vertical = " true " > <nl> mmm a / data / widgets / new_layer . xml <nl> ppp b / data / widgets / new_layer . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " New Image Layer " name = " new_layer " > <nl> < box vertical = " true " > <nl> mmm a / data / widgets / new_sprite . xml <nl> ppp b / data / widgets / new_sprite . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " New Sprite " name = " new_sprite " > <nl> < box vertical = " true " > <nl> mmm a / data / widgets / options . xml <nl> ppp b / data / widgets / options . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " Options " name = " options " > <nl> < box vertical = " true " > <nl> mmm a / data / widgets / play_flic . xml <nl> ppp b / data / widgets / play_flic . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " Play FLI / FLC " name = " play_fli " > <nl> < box vertical = " true " > <nl> mmm a / data / widgets / replace_color . xml <nl> ppp b / data / widgets / replace_color . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < box vertical = " true " expansive = " true " name = " controls " > <nl> < box horizontal = " true " expansive = " true " > <nl> mmm a / data / widgets / sprite_properties . xml <nl> ppp b / data / widgets / sprite_properties . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " Sprite Properties " name = " sprite_properties " > <nl> < box vertical = " true " > <nl> mmm a / data / widgets / sprite_size . xml <nl> ppp b / data / widgets / sprite_size . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " Sprite Size " name = " sprite_size " > <nl> < box vertical = " true " > <nl> mmm a / data / widgets / tools_configuration . xml <nl> ppp b / data / widgets / tools_configuration . xml <nl> <nl> < ! - - ASE - Allegro Sprite Editor - - > <nl> - < ! - - Copyright ( C ) 2001 - 2011 by David Capello - - > <nl> + < ! - - Copyright ( C ) 2001 - 2012 by David Capello - - > <nl> < jinete > <nl> < window text = " Tools Configuration " name = " configure_tool " > <nl> < box vertical = " true " childspacing = " 0 " > <nl> mmm a / docs / files / ase . txt <nl> ppp b / docs / files / ase . txt <nl> <nl> ASE Files ( . ASE ) Format description <nl> - Copyright ( C ) 2001 - 2011 by David Capello <nl> + Copyright ( C ) 2001 - 2012 by David Capello <nl> mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> 1 . References <nl> mmm a / src / CMakeLists . txt <nl> ppp b / src / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> if ( MSVC ) <nl> # Do not link with libcmt . lib ( to avoid duplicated symbols with msvcrtd . lib ) <nl> mmm a / src / app . cpp <nl> ppp b / src / app . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / app . h <nl> ppp b / src / app . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / app / check_update . cpp <nl> ppp b / src / app / check_update . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / app / check_update . h <nl> ppp b / src / app / check_update . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / app / color . cpp <nl> ppp b / src / app / color . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / app / color . h <nl> ppp b / src / app / color . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / app / color_unittest . cpp <nl> ppp b / src / app / color_unittest . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / app / color_utils . cpp <nl> ppp b / src / app / color_utils . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / app / color_utils . h <nl> ppp b / src / app / color_utils . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / base / CMakeLists . txt <nl> ppp b / src / base / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> add_library ( base - lib <nl> convert_to . cpp <nl> mmm a / src / base / LICENSE . txt <nl> ppp b / src / base / LICENSE . txt <nl> <nl> ASE base library <nl> - Copyright ( c ) 2001 - 2011 David Capello <nl> + Copyright ( c ) 2001 - 2012 David Capello <nl> All rights reserved . <nl> <nl> Redistribution and use in source and binary forms , with or without <nl> mmm a / src / base / bind . h <nl> ppp b / src / base / bind . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / compiler_specific . h <nl> ppp b / src / base / compiler_specific . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / convert_to . cpp <nl> ppp b / src / base / convert_to . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / convert_to . h <nl> ppp b / src / base / convert_to . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / disable_copying . h <nl> ppp b / src / base / disable_copying . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / errno_string . cpp <nl> ppp b / src / base / errno_string . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / errno_string . h <nl> ppp b / src / base / errno_string . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / exception . cpp <nl> ppp b / src / base / exception . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / exception . h <nl> ppp b / src / base / exception . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / mem_utils . cpp <nl> ppp b / src / base / mem_utils . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / mem_utils . h <nl> ppp b / src / base / mem_utils . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / memory . cpp <nl> ppp b / src / base / memory . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / memory . h <nl> ppp b / src / base / memory . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / memory_dump . cpp <nl> ppp b / src / base / memory_dump . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / memory_dump . h <nl> ppp b / src / base / memory_dump . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / memory_dump_none . h <nl> ppp b / src / base / memory_dump_none . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / memory_dump_win32 . h <nl> ppp b / src / base / memory_dump_win32 . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / mutex . cpp <nl> ppp b / src / base / mutex . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / mutex . h <nl> ppp b / src / base / mutex . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / mutex_pthread . h <nl> ppp b / src / base / mutex_pthread . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / mutex_win32 . h <nl> ppp b / src / base / mutex_win32 . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / path . cpp <nl> ppp b / src / base / path . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / path . h <nl> ppp b / src / base / path . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / path_unittest . cpp <nl> ppp b / src / base / path_unittest . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / remove_from_container . h <nl> ppp b / src / base / remove_from_container . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / scoped_lock . h <nl> ppp b / src / base / scoped_lock . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / serialization . cpp <nl> ppp b / src / base / serialization . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / serialization . h <nl> ppp b / src / base / serialization . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / sha1 . cpp <nl> ppp b / src / base / sha1 . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / sha1 . h <nl> ppp b / src / base / sha1 . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / shared_ptr . h <nl> ppp b / src / base / shared_ptr . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / shared_ptr_unittest . cpp <nl> ppp b / src / base / shared_ptr_unittest . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / signal . h <nl> ppp b / src / base / signal . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / slot . h <nl> ppp b / src / base / slot . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / split_string . cpp <nl> ppp b / src / base / split_string . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / split_string . h <nl> ppp b / src / base / split_string . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / split_string_unittest . cpp <nl> ppp b / src / base / split_string_unittest . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / string . cpp <nl> ppp b / src / base / string . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / string . h <nl> ppp b / src / base / string . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / thread . cpp <nl> ppp b / src / base / thread . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / thread . h <nl> ppp b / src / base / thread . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / thread_unittest . cpp <nl> ppp b / src / base / thread_unittest . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / unique_ptr . h <nl> ppp b / src / base / unique_ptr . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / unique_ptr_unittest . cpp <nl> ppp b / src / base / unique_ptr_unittest . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / version . cpp <nl> ppp b / src / base / version . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / version . h <nl> ppp b / src / base / version . h <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / base / version_unittest . cpp <nl> ppp b / src / base / version_unittest . cpp <nl> <nl> / / ASE base library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / check_args . cpp <nl> ppp b / src / check_args . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / check_args . h <nl> ppp b / src / check_args . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_about . cpp <nl> ppp b / src / commands / cmd_about . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_advanced_mode . cpp <nl> ppp b / src / commands / cmd_advanced_mode . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_background_from_layer . cpp <nl> ppp b / src / commands / cmd_background_from_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_canvas_size . cpp <nl> ppp b / src / commands / cmd_canvas_size . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_cel_properties . cpp <nl> ppp b / src / commands / cmd_cel_properties . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_change_color . cpp <nl> ppp b / src / commands / cmd_change_color . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_change_image_type . cpp <nl> ppp b / src / commands / cmd_change_image_type . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_change_pen . cpp <nl> ppp b / src / commands / cmd_change_pen . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_clear . cpp <nl> ppp b / src / commands / cmd_clear . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_close_file . cpp <nl> ppp b / src / commands / cmd_close_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_configure_tools . cpp <nl> ppp b / src / commands / cmd_configure_tools . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_copy . cpp <nl> ppp b / src / commands / cmd_copy . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_copy_cel . cpp <nl> ppp b / src / commands / cmd_copy_cel . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_crop . cpp <nl> ppp b / src / commands / cmd_crop . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_cut . cpp <nl> ppp b / src / commands / cmd_cut . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_deselect_mask . cpp <nl> ppp b / src / commands / cmd_deselect_mask . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_developer_console . cpp <nl> ppp b / src / commands / cmd_developer_console . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_duplicate_layer . cpp <nl> ppp b / src / commands / cmd_duplicate_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_duplicate_sprite . cpp <nl> ppp b / src / commands / cmd_duplicate_sprite . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_exit . cpp <nl> ppp b / src / commands / cmd_exit . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_export_sprite_sheet . cpp <nl> ppp b / src / commands / cmd_export_sprite_sheet . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_eyedropper . cpp <nl> ppp b / src / commands / cmd_eyedropper . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_film_editor . cpp <nl> ppp b / src / commands / cmd_film_editor . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_flatten_layers . cpp <nl> ppp b / src / commands / cmd_flatten_layers . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_flip . cpp <nl> ppp b / src / commands / cmd_flip . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_frame_properties . cpp <nl> ppp b / src / commands / cmd_frame_properties . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_goto_frame . cpp <nl> ppp b / src / commands / cmd_goto_frame . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_goto_layer . cpp <nl> ppp b / src / commands / cmd_goto_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_grid . cpp <nl> ppp b / src / commands / cmd_grid . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_import_sprite_sheet . cpp <nl> ppp b / src / commands / cmd_import_sprite_sheet . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_invert_mask . cpp <nl> ppp b / src / commands / cmd_invert_mask . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_launch . cpp <nl> ppp b / src / commands / cmd_launch . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_layer_from_background . cpp <nl> ppp b / src / commands / cmd_layer_from_background . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_layer_properties . cpp <nl> ppp b / src / commands / cmd_layer_properties . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_load_mask . cpp <nl> ppp b / src / commands / cmd_load_mask . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_mask_all . cpp <nl> ppp b / src / commands / cmd_mask_all . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_mask_by_color . cpp <nl> ppp b / src / commands / cmd_mask_by_color . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_merge_down_layer . cpp <nl> ppp b / src / commands / cmd_merge_down_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_move_cel . cpp <nl> ppp b / src / commands / cmd_move_cel . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_new_file . cpp <nl> ppp b / src / commands / cmd_new_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_new_frame . cpp <nl> ppp b / src / commands / cmd_new_frame . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_new_layer . cpp <nl> ppp b / src / commands / cmd_new_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_new_layer_set . cpp <nl> ppp b / src / commands / cmd_new_layer_set . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_open_file . cpp <nl> ppp b / src / commands / cmd_open_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_open_in_folder . cpp <nl> ppp b / src / commands / cmd_open_in_folder . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_open_with_app . cpp <nl> ppp b / src / commands / cmd_open_with_app . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_options . cpp <nl> ppp b / src / commands / cmd_options . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_palette_editor . cpp <nl> ppp b / src / commands / cmd_palette_editor . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_paste . cpp <nl> ppp b / src / commands / cmd_paste . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_play_animation . cpp <nl> ppp b / src / commands / cmd_play_animation . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_preview . cpp <nl> ppp b / src / commands / cmd_preview . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_redo . cpp <nl> ppp b / src / commands / cmd_redo . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_refresh . cpp <nl> ppp b / src / commands / cmd_refresh . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_remove_cel . cpp <nl> ppp b / src / commands / cmd_remove_cel . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_remove_frame . cpp <nl> ppp b / src / commands / cmd_remove_frame . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_remove_layer . cpp <nl> ppp b / src / commands / cmd_remove_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_reselect_mask . cpp <nl> ppp b / src / commands / cmd_reselect_mask . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_rotate_canvas . cpp <nl> ppp b / src / commands / cmd_rotate_canvas . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_save_file . cpp <nl> ppp b / src / commands / cmd_save_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_save_mask . cpp <nl> ppp b / src / commands / cmd_save_mask . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_screen_shot . cpp <nl> ppp b / src / commands / cmd_screen_shot . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_select_file . cpp <nl> ppp b / src / commands / cmd_select_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_sprite_editor . cpp <nl> ppp b / src / commands / cmd_sprite_editor . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_sprite_properties . cpp <nl> ppp b / src / commands / cmd_sprite_properties . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_sprite_size . cpp <nl> ppp b / src / commands / cmd_sprite_size . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_switch_colors . cpp <nl> ppp b / src / commands / cmd_switch_colors . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / cmd_undo . cpp <nl> ppp b / src / commands / cmd_undo . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / command . cpp <nl> ppp b / src / commands / command . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / command . h <nl> ppp b / src / commands / command . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / command_factory . h <nl> ppp b / src / commands / command_factory . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / commands . cpp <nl> ppp b / src / commands / commands . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / commands . h <nl> ppp b / src / commands / commands . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / commands_list . h <nl> ppp b / src / commands / commands_list . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / cmd_color_curve . cpp <nl> ppp b / src / commands / filters / cmd_color_curve . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / cmd_convolution_matrix . cpp <nl> ppp b / src / commands / filters / cmd_convolution_matrix . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / cmd_despeckle . cpp <nl> ppp b / src / commands / filters / cmd_despeckle . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / cmd_invert_color . cpp <nl> ppp b / src / commands / filters / cmd_invert_color . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / cmd_replace_color . cpp <nl> ppp b / src / commands / filters / cmd_replace_color . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / color_curve_editor . cpp <nl> ppp b / src / commands / filters / color_curve_editor . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / color_curve_editor . h <nl> ppp b / src / commands / filters / color_curve_editor . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / convolution_matrix_stock . cpp <nl> ppp b / src / commands / filters / convolution_matrix_stock . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / convolution_matrix_stock . h <nl> ppp b / src / commands / filters / convolution_matrix_stock . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / filter_manager_impl . cpp <nl> ppp b / src / commands / filters / filter_manager_impl . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / filter_manager_impl . h <nl> ppp b / src / commands / filters / filter_manager_impl . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / filter_preview . cpp <nl> ppp b / src / commands / filters / filter_preview . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / filter_preview . h <nl> ppp b / src / commands / filters / filter_preview . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / filter_target_buttons . cpp <nl> ppp b / src / commands / filters / filter_target_buttons . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / filter_target_buttons . h <nl> ppp b / src / commands / filters / filter_target_buttons . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / filter_window . cpp <nl> ppp b / src / commands / filters / filter_window . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / filter_window . h <nl> ppp b / src / commands / filters / filter_window . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / filter_worker . cpp <nl> ppp b / src / commands / filters / filter_worker . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / filters / filter_worker . h <nl> ppp b / src / commands / filters / filter_worker . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / commands / params . h <nl> ppp b / src / commands / params . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / console . cpp <nl> ppp b / src / console . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / console . h <nl> ppp b / src / console . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / context . cpp <nl> ppp b / src / context . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / context . h <nl> ppp b / src / context . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / context_flags . cpp <nl> ppp b / src / context_flags . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / context_flags . h <nl> ppp b / src / context_flags . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / aniedit . cpp <nl> ppp b / src / dialogs / aniedit . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / aniedit . h <nl> ppp b / src / dialogs / aniedit . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / drawtext . cpp <nl> ppp b / src / dialogs / drawtext . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / drawtext . h <nl> ppp b / src / dialogs / drawtext . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / filesel . cpp <nl> ppp b / src / dialogs / filesel . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / filesel . h <nl> ppp b / src / dialogs / filesel . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / maskcol . cpp <nl> ppp b / src / dialogs / maskcol . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / maskcol . h <nl> ppp b / src / dialogs / maskcol . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / playfli . cpp <nl> ppp b / src / dialogs / playfli . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / playfli . h <nl> ppp b / src / dialogs / playfli . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / repo . cpp <nl> ppp b / src / dialogs / repo . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / dialogs / repo . h <nl> ppp b / src / dialogs / repo . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / document . cpp <nl> ppp b / src / document . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / document . h <nl> ppp b / src / document . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / document_id . h <nl> ppp b / src / document_id . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / document_wrappers . h <nl> ppp b / src / document_wrappers . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / documents . cpp <nl> ppp b / src / documents . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / documents . h <nl> ppp b / src / documents . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / drop_files . cpp <nl> ppp b / src / drop_files . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / drop_files . h <nl> ppp b / src / drop_files . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / errno_unittest . cpp <nl> ppp b / src / errno_unittest . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / ase_format . cpp <nl> ppp b / src / file / ase_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / bmp_format . cpp <nl> ppp b / src / file / bmp_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / file . cpp <nl> ppp b / src / file / file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / file . h <nl> ppp b / src / file / file . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / file_format . cpp <nl> ppp b / src / file / file_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / file_format . h <nl> ppp b / src / file / file_format . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / file_formats_manager . cpp <nl> ppp b / src / file / file_formats_manager . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / file_formats_manager . h <nl> ppp b / src / file / file_formats_manager . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / fli / fli . cpp <nl> ppp b / src / file / fli / fli . cpp <nl> <nl> * <nl> * / <nl> <nl> - / * Modified by David Capello to use with ASE ( 2001 - 2011 ) . <nl> + / * Modified by David Capello to use with ASE ( 2001 - 2012 ) . <nl> See . . / README . txt for more information <nl> * / <nl> <nl> mmm a / src / file / fli_format . cpp <nl> ppp b / src / file / fli_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / format_options . h <nl> ppp b / src / file / format_options . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / gif_format . cpp <nl> ppp b / src / file / gif_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / ico_format . cpp <nl> ppp b / src / file / ico_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / jpeg_format . cpp <nl> ppp b / src / file / jpeg_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / pcx_format . cpp <nl> ppp b / src / file / pcx_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / png_format . cpp <nl> ppp b / src / file / png_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file / tga_format . cpp <nl> ppp b / src / file / tga_format . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file_system . cpp <nl> ppp b / src / file_system . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / file_system . h <nl> ppp b / src / file_system . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / CMakeLists . txt <nl> ppp b / src / filters / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> add_library ( filters - lib <nl> color_curve . cpp <nl> mmm a / src / filters / color_curve . cpp <nl> ppp b / src / filters / color_curve . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / color_curve . h <nl> ppp b / src / filters / color_curve . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / color_curve_filter . cpp <nl> ppp b / src / filters / color_curve_filter . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / color_curve_filter . h <nl> ppp b / src / filters / color_curve_filter . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / convolution_matrix . cpp <nl> ppp b / src / filters / convolution_matrix . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / convolution_matrix . h <nl> ppp b / src / filters / convolution_matrix . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / convolution_matrix_filter . cpp <nl> ppp b / src / filters / convolution_matrix_filter . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / convolution_matrix_filter . h <nl> ppp b / src / filters / convolution_matrix_filter . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / filter . h <nl> ppp b / src / filters / filter . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / filter_indexed_data . h <nl> ppp b / src / filters / filter_indexed_data . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / filter_manager . h <nl> ppp b / src / filters / filter_manager . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / invert_color_filter . cpp <nl> ppp b / src / filters / invert_color_filter . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / invert_color_filter . h <nl> ppp b / src / filters / invert_color_filter . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / median_filter . cpp <nl> ppp b / src / filters / median_filter . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / median_filter . h <nl> ppp b / src / filters / median_filter . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / neighboring_pixels . h <nl> ppp b / src / filters / neighboring_pixels . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / replace_color_filter . cpp <nl> ppp b / src / filters / replace_color_filter . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / replace_color_filter . h <nl> ppp b / src / filters / replace_color_filter . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / target . h <nl> ppp b / src / filters / target . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / filters / tiled_mode . h <nl> ppp b / src / filters / tiled_mode . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / gfx / CMakeLists . txt <nl> ppp b / src / gfx / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> add_library ( gfx - lib <nl> hsv . cpp <nl> mmm a / src / gfx / LICENSE . txt <nl> ppp b / src / gfx / LICENSE . txt <nl> <nl> ASE gfx library <nl> - Copyright ( c ) 2001 - 2011 David Capello <nl> + Copyright ( c ) 2001 - 2012 David Capello <nl> All rights reserved . <nl> <nl> Redistribution and use in source and binary forms , with or without <nl> mmm a / src / gfx / border . h <nl> ppp b / src / gfx / border . h <nl> <nl> / / ASE gfx library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gfx / hsv . cpp <nl> ppp b / src / gfx / hsv . cpp <nl> <nl> / / ASE gfx library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gfx / hsv . h <nl> ppp b / src / gfx / hsv . h <nl> <nl> / / ASE gfx library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gfx / hsv_unittest . cpp <nl> ppp b / src / gfx / hsv_unittest . cpp <nl> <nl> / / ASE gfx library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gfx / point . h <nl> ppp b / src / gfx / point . h <nl> <nl> / / ASE gfx library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gfx / rect . h <nl> ppp b / src / gfx / rect . h <nl> <nl> / / ASE gfx library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gfx / rect_unittest . cpp <nl> ppp b / src / gfx / rect_unittest . cpp <nl> <nl> / / ASE gfx library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gfx / rgb . cpp <nl> ppp b / src / gfx / rgb . cpp <nl> <nl> / / ASE gfx library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gfx / rgb . h <nl> ppp b / src / gfx / rgb . h <nl> <nl> / / ASE gfx library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gfx / rgb_unittest . cpp <nl> ppp b / src / gfx / rgb_unittest . cpp <nl> <nl> / / ASE gfx library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gfx / size . h <nl> ppp b / src / gfx / size . h <nl> <nl> / / ASE gfx library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gfx / transformation . cpp <nl> ppp b / src / gfx / transformation . cpp <nl> <nl> / / ASE gfx library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gfx / transformation . h <nl> ppp b / src / gfx / transformation . h <nl> <nl> / / ASE gfx library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gfxmode . cpp <nl> ppp b / src / gfxmode . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / gfxmode . h <nl> ppp b / src / gfxmode . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / gui / CMakeLists . txt <nl> ppp b / src / gui / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> add_library ( gui - lib <nl> accel . cpp <nl> mmm a / src / gui / LICENSE . txt <nl> ppp b / src / gui / LICENSE . txt <nl> <nl> ASE gui library <nl> - Copyright ( c ) 2001 - 2011 David Capello <nl> + Copyright ( c ) 2001 - 2012 David Capello <nl> All rights reserved . <nl> <nl> Redistribution and use in source and binary forms , with or without <nl> mmm a / src / gui / accel . cpp <nl> ppp b / src / gui / accel . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / accel . h <nl> ppp b / src / gui / accel . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / alert . cpp <nl> ppp b / src / gui / alert . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / alert . h <nl> ppp b / src / gui / alert . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / base . h <nl> ppp b / src / gui / base . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / box . cpp <nl> ppp b / src / gui / box . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / box . h <nl> ppp b / src / gui / box . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / button . cpp <nl> ppp b / src / gui / button . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / button . h <nl> ppp b / src / gui / button . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / clipboard . cpp <nl> ppp b / src / gui / clipboard . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / clipboard . h <nl> ppp b / src / gui / clipboard . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / close_event . h <nl> ppp b / src / gui / close_event . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / combobox . cpp <nl> ppp b / src / gui / combobox . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / combobox . h <nl> ppp b / src / gui / combobox . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / component . cpp <nl> ppp b / src / gui / component . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / component . h <nl> ppp b / src / gui / component . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / custom_label . cpp <nl> ppp b / src / gui / custom_label . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / custom_label . h <nl> ppp b / src / gui / custom_label . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / draw . cpp <nl> ppp b / src / gui / draw . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / draw . h <nl> ppp b / src / gui / draw . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / entry . cpp <nl> ppp b / src / gui / entry . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / entry . h <nl> ppp b / src / gui / entry . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / event . cpp <nl> ppp b / src / gui / event . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / event . h <nl> ppp b / src / gui / event . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / font . cpp <nl> ppp b / src / gui / font . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / font . h <nl> ppp b / src / gui / font . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / fontbmp . cpp <nl> ppp b / src / gui / fontbmp . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / frame . cpp <nl> ppp b / src / gui / frame . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / frame . h <nl> ppp b / src / gui / frame . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / graphics . cpp <nl> ppp b / src / gui / graphics . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / graphics . h <nl> ppp b / src / gui / graphics . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / grid . cpp <nl> ppp b / src / gui / grid . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / grid . h <nl> ppp b / src / gui / grid . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / grid_unittest . cpp <nl> ppp b / src / gui / grid_unittest . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / gui / gui . cpp <nl> ppp b / src / gui / gui . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / gui . h <nl> ppp b / src / gui / gui . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / hit_test_event . h <nl> ppp b / src / gui / hit_test_event . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / hook . cpp <nl> ppp b / src / gui / hook . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / hook . h <nl> ppp b / src / gui / hook . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / image_view . cpp <nl> ppp b / src / gui / image_view . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / image_view . h <nl> ppp b / src / gui / image_view . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / intern . cpp <nl> ppp b / src / gui / intern . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / intern . h <nl> ppp b / src / gui / intern . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / label . cpp <nl> ppp b / src / gui / label . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / label . h <nl> ppp b / src / gui / label . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / link_label . cpp <nl> ppp b / src / gui / link_label . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / link_label . h <nl> ppp b / src / gui / link_label . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / list . cpp <nl> ppp b / src / gui / list . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / list . h <nl> ppp b / src / gui / list . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / list_unittest . cpp <nl> ppp b / src / gui / list_unittest . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / gui / listbox . cpp <nl> ppp b / src / gui / listbox . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / listbox . h <nl> ppp b / src / gui / listbox . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / manager . cpp <nl> ppp b / src / gui / manager . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / manager . h <nl> ppp b / src / gui / manager . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / menu . cpp <nl> ppp b / src / gui / menu . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / menu . h <nl> ppp b / src / gui / menu . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / message . cpp <nl> ppp b / src / gui / message . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / message . h <nl> ppp b / src / gui / message . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / paint_event . cpp <nl> ppp b / src / gui / paint_event . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / paint_event . h <nl> ppp b / src / gui / paint_event . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / panel . cpp <nl> ppp b / src / gui / panel . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / panel . h <nl> ppp b / src / gui / panel . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / popup_frame . cpp <nl> ppp b / src / gui / popup_frame . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / popup_frame . h <nl> ppp b / src / gui / popup_frame . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / preferred_size_event . cpp <nl> ppp b / src / gui / preferred_size_event . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / preferred_size_event . h <nl> ppp b / src / gui / preferred_size_event . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / property . cpp <nl> ppp b / src / gui / property . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / property . h <nl> ppp b / src / gui / property . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / rect . cpp <nl> ppp b / src / gui / rect . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / rect . h <nl> ppp b / src / gui / rect . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / region . cpp <nl> ppp b / src / gui / region . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / region . h <nl> ppp b / src / gui / region . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / scroll_bar . cpp <nl> ppp b / src / gui / scroll_bar . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / scroll_bar . h <nl> ppp b / src / gui / scroll_bar . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / separator . cpp <nl> ppp b / src / gui / separator . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / separator . h <nl> ppp b / src / gui / separator . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / slider . cpp <nl> ppp b / src / gui / slider . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / slider . h <nl> ppp b / src / gui / slider . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / stream . cpp <nl> ppp b / src / gui / stream . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / stream . h <nl> ppp b / src / gui / stream . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / system . cpp <nl> ppp b / src / gui / system . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / system . h <nl> ppp b / src / gui / system . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / textbox . cpp <nl> ppp b / src / gui / textbox . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / textbox . h <nl> ppp b / src / gui / textbox . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / theme . cpp <nl> ppp b / src / gui / theme . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / theme . h <nl> ppp b / src / gui / theme . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / tooltips . cpp <nl> ppp b / src / gui / tooltips . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / tooltips . h <nl> ppp b / src / gui / tooltips . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / view . cpp <nl> ppp b / src / gui / view . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / view . h <nl> ppp b / src / gui / view . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / viewport . cpp <nl> ppp b / src / gui / viewport . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / viewport . h <nl> ppp b / src / gui / viewport . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / widget . cpp <nl> ppp b / src / gui / widget . cpp <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / widget . h <nl> ppp b / src / gui / widget . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui / widgets_list . h <nl> ppp b / src / gui / widgets_list . h <nl> <nl> / / ASE gui library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / gui_xml . cpp <nl> ppp b / src / gui_xml . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / gui_xml . h <nl> ppp b / src / gui_xml . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / ini_file . cpp <nl> ppp b / src / ini_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / ini_file . h <nl> ppp b / src / ini_file . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / job . cpp <nl> ppp b / src / job . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / job . h <nl> ppp b / src / job . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / la / LICENSE . txt <nl> ppp b / src / la / LICENSE . txt <nl> <nl> ASEPRITE Linear Algebra Library <nl> - Copyright ( c ) 2001 - 2011 David Capello <nl> + Copyright ( c ) 2001 - 2012 David Capello <nl> All rights reserved . <nl> <nl> Redistribution and use in source and binary forms , with or without <nl> mmm a / src / la / vector2d . h <nl> ppp b / src / la / vector2d . h <nl> <nl> / / ASEPRITE Linear Algebra Library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / launcher . cpp <nl> ppp b / src / launcher . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / launcher . h <nl> ppp b / src / launcher . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / listeners . h <nl> ppp b / src / listeners . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / log . cpp <nl> ppp b / src / log . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / log . h <nl> ppp b / src / log . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / main . cpp <nl> ppp b / src / main . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules . cpp <nl> ppp b / src / modules . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules . h <nl> ppp b / src / modules . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / editors . cpp <nl> ppp b / src / modules / editors . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / editors . h <nl> ppp b / src / modules / editors . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / gfx . cpp <nl> ppp b / src / modules / gfx . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / gfx . h <nl> ppp b / src / modules / gfx . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / gui . cpp <nl> ppp b / src / modules / gui . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / gui . h <nl> ppp b / src / modules / gui . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / palettes . cpp <nl> ppp b / src / modules / palettes . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / palettes . h <nl> ppp b / src / modules / palettes . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / rootmenu . cpp <nl> ppp b / src / modules / rootmenu . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / modules / rootmenu . h <nl> ppp b / src / modules / rootmenu . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / net / CMakeLists . txt <nl> ppp b / src / net / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> add_definitions ( - DCURL_STATICLIB ) <nl> <nl> mmm a / src / net / http_headers . cpp <nl> ppp b / src / net / http_headers . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / net / http_headers . h <nl> ppp b / src / net / http_headers . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / net / http_request . cpp <nl> ppp b / src / net / http_request . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / net / http_request . h <nl> ppp b / src / net / http_request . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / net / http_response . cpp <nl> ppp b / src / net / http_response . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / net / http_response . h <nl> ppp b / src / net / http_response . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / objects_container_impl . cpp <nl> ppp b / src / objects_container_impl . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / objects_container_impl . h <nl> ppp b / src / objects_container_impl . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / objects_container_impl_unittest . cpp <nl> ppp b / src / objects_container_impl_unittest . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / algo . cpp <nl> ppp b / src / raster / algo . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / algo . h <nl> ppp b / src / raster / algo . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / algo_polygon . cpp <nl> ppp b / src / raster / algo_polygon . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / blend . cpp <nl> ppp b / src / raster / blend . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / blend . h <nl> ppp b / src / raster / blend . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / cel . cpp <nl> ppp b / src / raster / cel . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / cel . h <nl> ppp b / src / raster / cel . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / cel_io . cpp <nl> ppp b / src / raster / cel_io . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / cel_io . h <nl> ppp b / src / raster / cel_io . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / color_histogram . h <nl> ppp b / src / raster / color_histogram . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / dirty . cpp <nl> ppp b / src / raster / dirty . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / dirty . h <nl> ppp b / src / raster / dirty . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / dirty_io . cpp <nl> ppp b / src / raster / dirty_io . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / dirty_io . h <nl> ppp b / src / raster / dirty_io . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / dithering_method . h <nl> ppp b / src / raster / dithering_method . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / gfxobj . cpp <nl> ppp b / src / raster / gfxobj . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / gfxobj . h <nl> ppp b / src / raster / gfxobj . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / image . cpp <nl> ppp b / src / raster / image . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / image . h <nl> ppp b / src / raster / image . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / image_impl . h <nl> ppp b / src / raster / image_impl . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / image_io . cpp <nl> ppp b / src / raster / image_io . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / image_io . h <nl> ppp b / src / raster / image_io . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / image_traits . h <nl> ppp b / src / raster / image_traits . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / images_collector . cpp <nl> ppp b / src / raster / images_collector . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / images_collector . h <nl> ppp b / src / raster / images_collector . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / layer . cpp <nl> ppp b / src / raster / layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / layer . h <nl> ppp b / src / raster / layer . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / layer_io . cpp <nl> ppp b / src / raster / layer_io . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / layer_io . h <nl> ppp b / src / raster / layer_io . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / mask . cpp <nl> ppp b / src / raster / mask . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / mask . h <nl> ppp b / src / raster / mask . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / mask_io . cpp <nl> ppp b / src / raster / mask_io . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / mask_io . h <nl> ppp b / src / raster / mask_io . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / median_cut . h <nl> ppp b / src / raster / median_cut . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / palette . cpp <nl> ppp b / src / raster / palette . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / palette . h <nl> ppp b / src / raster / palette . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / palette_io . cpp <nl> ppp b / src / raster / palette_io . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / palette_io . h <nl> ppp b / src / raster / palette_io . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / path . cpp <nl> ppp b / src / raster / path . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / path . h <nl> ppp b / src / raster / path . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / pen . cpp <nl> ppp b / src / raster / pen . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / pen . h <nl> ppp b / src / raster / pen . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / pen_type . h <nl> ppp b / src / raster / pen_type . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / quantization . cpp <nl> ppp b / src / raster / quantization . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / quantization . h <nl> ppp b / src / raster / quantization . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / raster . h <nl> ppp b / src / raster / raster . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / rgbmap . cpp <nl> ppp b / src / raster / rgbmap . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / rgbmap . h <nl> ppp b / src / raster / rgbmap . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / rotate . cpp <nl> ppp b / src / raster / rotate . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / rotate . h <nl> ppp b / src / raster / rotate . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / sprite . cpp <nl> ppp b / src / raster / sprite . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / sprite . h <nl> ppp b / src / raster / sprite . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / stock . cpp <nl> ppp b / src / raster / stock . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / raster / stock . h <nl> ppp b / src / raster / stock . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / recent_files . cpp <nl> ppp b / src / recent_files . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / recent_files . h <nl> ppp b / src / recent_files . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / resource_finder . cpp <nl> ppp b / src / resource_finder . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / resource_finder . h <nl> ppp b / src / resource_finder . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / settings / settings . h <nl> ppp b / src / settings / settings . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / settings / ui_settings_impl . cpp <nl> ppp b / src / settings / ui_settings_impl . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / settings / ui_settings_impl . h <nl> ppp b / src / settings / ui_settings_impl . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / skin / button_icon_impl . cpp <nl> ppp b / src / skin / button_icon_impl . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / skin / button_icon_impl . h <nl> ppp b / src / skin / button_icon_impl . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / skin / skin_parts . h <nl> ppp b / src / skin / skin_parts . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / skin / skin_property . cpp <nl> ppp b / src / skin / skin_property . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / skin / skin_property . h <nl> ppp b / src / skin / skin_property . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / skin / skin_slider_property . cpp <nl> ppp b / src / skin / skin_slider_property . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / skin / skin_slider_property . h <nl> ppp b / src / skin / skin_slider_property . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / skin / skin_theme . cpp <nl> ppp b / src / skin / skin_theme . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / skin / skin_theme . h <nl> ppp b / src / skin / skin_theme . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tests / test . h <nl> ppp b / src / tests / test . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / controller . h <nl> ppp b / src / tools / controller . h <nl> <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / controllers . h <nl> ppp b / src / tools / controllers . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / fill . h <nl> ppp b / src / tools / fill . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / ink . h <nl> ppp b / src / tools / ink . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / ink_processing . h <nl> ppp b / src / tools / ink_processing . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / inks . h <nl> ppp b / src / tools / inks . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / intertwine . cpp <nl> ppp b / src / tools / intertwine . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / intertwine . h <nl> ppp b / src / tools / intertwine . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / intertwiners . h <nl> ppp b / src / tools / intertwiners . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / point_shape . cpp <nl> ppp b / src / tools / point_shape . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / point_shape . h <nl> ppp b / src / tools / point_shape . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / point_shapes . h <nl> ppp b / src / tools / point_shapes . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / tool . h <nl> ppp b / src / tools / tool . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / tool_box . cpp <nl> ppp b / src / tools / tool_box . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / tool_box . h <nl> ppp b / src / tools / tool_box . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / tool_group . h <nl> ppp b / src / tools / tool_group . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / tool_loop . h <nl> ppp b / src / tools / tool_loop . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / tool_loop_manager . cpp <nl> ppp b / src / tools / tool_loop_manager . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / tool_loop_manager . h <nl> ppp b / src / tools / tool_loop_manager . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / tools / trace_policy . h <nl> ppp b / src / tools / trace_policy . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / ui_context . cpp <nl> ppp b / src / ui_context . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / ui_context . h <nl> ppp b / src / ui_context . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undo / CMakeLists . txt <nl> ppp b / src / undo / CMakeLists . txt <nl> <nl> # ASEPRITE Undo Library <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> add_library ( undo - lib <nl> undo_history . cpp <nl> mmm a / src / undo / LICENSE . txt <nl> ppp b / src / undo / LICENSE . txt <nl> <nl> ASEPRITE Undo Library <nl> - Copyright ( c ) 2001 - 2011 David Capello <nl> + Copyright ( c ) 2001 - 2012 David Capello <nl> All rights reserved . <nl> <nl> Redistribution and use in source and binary forms , with or without <nl> mmm a / src / undo / modification . h <nl> ppp b / src / undo / modification . h <nl> <nl> / / ASEPRITE Undo Library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / undo / object_id . h <nl> ppp b / src / undo / object_id . h <nl> <nl> / / ASEPRITE Undo Library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / undo / objects_container . h <nl> ppp b / src / undo / objects_container . h <nl> <nl> / / ASEPRITE Undo Library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / undo / undo_exception . h <nl> ppp b / src / undo / undo_exception . h <nl> <nl> / / ASEPRITE Undo Library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / undo / undo_history . cpp <nl> ppp b / src / undo / undo_history . cpp <nl> <nl> / / ASEPRITE Undo Library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / undo / undo_history . h <nl> ppp b / src / undo / undo_history . h <nl> <nl> / / ASEPRITE Undo Library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / undo / undoer . h <nl> ppp b / src / undo / undoer . h <nl> <nl> / / ASEPRITE Undo Library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / undo / undoers_collector . h <nl> ppp b / src / undo / undoers_collector . h <nl> <nl> / / ASEPRITE Undo Library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / undo / undoers_stack . cpp <nl> ppp b / src / undo / undoers_stack . cpp <nl> <nl> / / ASEPRITE Undo Library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / undo / undoers_stack . h <nl> ppp b / src / undo / undoers_stack . h <nl> <nl> / / ASEPRITE Undo Library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / undo_transaction . cpp <nl> ppp b / src / undo_transaction . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undo_transaction . h <nl> ppp b / src / undo_transaction . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / add_cel . cpp <nl> ppp b / src / undoers / add_cel . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / add_cel . h <nl> ppp b / src / undoers / add_cel . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / add_image . cpp <nl> ppp b / src / undoers / add_image . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / add_image . h <nl> ppp b / src / undoers / add_image . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / add_layer . cpp <nl> ppp b / src / undoers / add_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / add_layer . h <nl> ppp b / src / undoers / add_layer . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / add_palette . cpp <nl> ppp b / src / undoers / add_palette . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / add_palette . h <nl> ppp b / src / undoers / add_palette . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / close_group . cpp <nl> ppp b / src / undoers / close_group . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / close_group . h <nl> ppp b / src / undoers / close_group . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / dirty_area . cpp <nl> ppp b / src / undoers / dirty_area . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / dirty_area . h <nl> ppp b / src / undoers / dirty_area . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / flip_image . cpp <nl> ppp b / src / undoers / flip_image . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / flip_image . h <nl> ppp b / src / undoers / flip_image . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / image_area . cpp <nl> ppp b / src / undoers / image_area . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / image_area . h <nl> ppp b / src / undoers / image_area . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / move_layer . cpp <nl> ppp b / src / undoers / move_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / move_layer . h <nl> ppp b / src / undoers / move_layer . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / object_io . h <nl> ppp b / src / undoers / object_io . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / open_group . cpp <nl> ppp b / src / undoers / open_group . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / open_group . h <nl> ppp b / src / undoers / open_group . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / remap_palette . cpp <nl> ppp b / src / undoers / remap_palette . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / remap_palette . h <nl> ppp b / src / undoers / remap_palette . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / remove_cel . cpp <nl> ppp b / src / undoers / remove_cel . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / remove_cel . h <nl> ppp b / src / undoers / remove_cel . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / remove_image . cpp <nl> ppp b / src / undoers / remove_image . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / remove_image . h <nl> ppp b / src / undoers / remove_image . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / remove_layer . cpp <nl> ppp b / src / undoers / remove_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / remove_layer . h <nl> ppp b / src / undoers / remove_layer . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / remove_palette . cpp <nl> ppp b / src / undoers / remove_palette . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / remove_palette . h <nl> ppp b / src / undoers / remove_palette . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / replace_image . cpp <nl> ppp b / src / undoers / replace_image . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / replace_image . h <nl> ppp b / src / undoers / replace_image . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_cel_frame . cpp <nl> ppp b / src / undoers / set_cel_frame . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_cel_frame . h <nl> ppp b / src / undoers / set_cel_frame . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_cel_opacity . cpp <nl> ppp b / src / undoers / set_cel_opacity . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_cel_opacity . h <nl> ppp b / src / undoers / set_cel_opacity . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_cel_position . cpp <nl> ppp b / src / undoers / set_cel_position . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_cel_position . h <nl> ppp b / src / undoers / set_cel_position . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_current_frame . cpp <nl> ppp b / src / undoers / set_current_frame . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_current_frame . h <nl> ppp b / src / undoers / set_current_frame . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_current_layer . cpp <nl> ppp b / src / undoers / set_current_layer . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_current_layer . h <nl> ppp b / src / undoers / set_current_layer . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_frame_duration . cpp <nl> ppp b / src / undoers / set_frame_duration . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_frame_duration . h <nl> ppp b / src / undoers / set_frame_duration . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_imgtype . h <nl> ppp b / src / undoers / set_imgtype . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_layer_flags . cpp <nl> ppp b / src / undoers / set_layer_flags . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_layer_flags . h <nl> ppp b / src / undoers / set_layer_flags . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_layer_name . cpp <nl> ppp b / src / undoers / set_layer_name . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_layer_name . h <nl> ppp b / src / undoers / set_layer_name . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_mask . cpp <nl> ppp b / src / undoers / set_mask . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_mask . h <nl> ppp b / src / undoers / set_mask . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_mask_position . cpp <nl> ppp b / src / undoers / set_mask_position . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_mask_position . h <nl> ppp b / src / undoers / set_mask_position . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_palette_colors . cpp <nl> ppp b / src / undoers / set_palette_colors . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_palette_colors . h <nl> ppp b / src / undoers / set_palette_colors . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_sprite_imgtype . cpp <nl> ppp b / src / undoers / set_sprite_imgtype . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_sprite_imgtype . h <nl> ppp b / src / undoers / set_sprite_imgtype . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_sprite_size . cpp <nl> ppp b / src / undoers / set_sprite_size . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_sprite_size . h <nl> ppp b / src / undoers / set_sprite_size . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_stock_imgtype . cpp <nl> ppp b / src / undoers / set_stock_imgtype . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_stock_imgtype . h <nl> ppp b / src / undoers / set_stock_imgtype . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_total_frames . cpp <nl> ppp b / src / undoers / set_total_frames . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / set_total_frames . h <nl> ppp b / src / undoers / set_total_frames . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / undoers / undoer_base . h <nl> ppp b / src / undoers / undoer_base . h <nl> <nl> / / ASEPRITE Undo Library <nl> - / / Copyright ( C ) 2001 - 2011 David Capello <nl> + / / Copyright ( C ) 2001 - 2012 David Capello <nl> / / <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> mmm a / src / updater / CMakeLists . txt <nl> ppp b / src / updater / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> set ( UPDATER_LIB_SOURCES <nl> check_update . cpp <nl> mmm a / src / updater / check_update . cpp <nl> ppp b / src / updater / check_update . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / updater / check_update . h <nl> ppp b / src / updater / check_update . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / updater / user_agent . cpp <nl> ppp b / src / updater / user_agent . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / updater / user_agent . h <nl> ppp b / src / updater / user_agent . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / updater / user_agent_mac . m <nl> ppp b / src / updater / user_agent_mac . m <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / updater / user_agent_win . c <nl> ppp b / src / updater / user_agent_win . c <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / autocrop . cpp <nl> ppp b / src / util / autocrop . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / autocrop . h <nl> ppp b / src / util / autocrop . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / boundary . cpp <nl> ppp b / src / util / boundary . cpp <nl> <nl> * <nl> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> * <nl> - * Adapted to ASE by David Capello ( 2001 - 2011 ) <nl> + * Adapted to ASE by David Capello ( 2001 - 2012 ) <nl> * See " LEGAL . txt " for more information . <nl> * / <nl> <nl> mmm a / src / util / boundary . h <nl> ppp b / src / util / boundary . h <nl> <nl> * <nl> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> * <nl> - * Adapted to ASE by David Capello ( 2001 - 2011 ) <nl> + * Adapted to ASE by David Capello ( 2001 - 2012 ) <nl> * See " LICENSE . txt " for more information . <nl> * / <nl> <nl> mmm a / src / util / celmove . cpp <nl> ppp b / src / util / celmove . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / celmove . h <nl> ppp b / src / util / celmove . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / clipboard . cpp <nl> ppp b / src / util / clipboard . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / clipboard . h <nl> ppp b / src / util / clipboard . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / clipboard_win32 . h <nl> ppp b / src / util / clipboard_win32 . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / col_file . cpp <nl> ppp b / src / util / col_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / col_file . h <nl> ppp b / src / util / col_file . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / expand_cel_canvas . cpp <nl> ppp b / src / util / expand_cel_canvas . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / expand_cel_canvas . h <nl> ppp b / src / util / expand_cel_canvas . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / filetoks . cpp <nl> ppp b / src / util / filetoks . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / filetoks . h <nl> ppp b / src / util / filetoks . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / misc . cpp <nl> ppp b / src / util / misc . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / misc . h <nl> ppp b / src / util / misc . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / msk_file . cpp <nl> ppp b / src / util / msk_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / msk_file . h <nl> ppp b / src / util / msk_file . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / pic_file . cpp <nl> ppp b / src / util / pic_file . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / pic_file . h <nl> ppp b / src / util / pic_file . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / render . cpp <nl> ppp b / src / util / render . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / render . h <nl> ppp b / src / util / render . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / thmbnail . cpp <nl> ppp b / src / util / thmbnail . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / util / thmbnail . h <nl> ppp b / src / util / thmbnail . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / color_bar . cpp <nl> ppp b / src / widgets / color_bar . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / color_bar . h <nl> ppp b / src / widgets / color_bar . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / color_button . cpp <nl> ppp b / src / widgets / color_button . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / color_button . h <nl> ppp b / src / widgets / color_button . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / color_selector . cpp <nl> ppp b / src / widgets / color_selector . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / color_selector . h <nl> ppp b / src / widgets / color_selector . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / color_sliders . cpp <nl> ppp b / src / widgets / color_sliders . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / color_sliders . h <nl> ppp b / src / widgets / color_sliders . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / drop_down_button . cpp <nl> ppp b / src / widgets / drop_down_button . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / drop_down_button . h <nl> ppp b / src / widgets / drop_down_button . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / click . cpp <nl> ppp b / src / widgets / editor / click . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / cursor . cpp <nl> ppp b / src / widgets / editor / cursor . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / drawing_state . cpp <nl> ppp b / src / widgets / editor / drawing_state . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / drawing_state . h <nl> ppp b / src / widgets / editor / drawing_state . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / editor . cpp <nl> ppp b / src / widgets / editor / editor . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / editor . h <nl> ppp b / src / widgets / editor / editor . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / editor_customization_delegate . h <nl> ppp b / src / widgets / editor / editor_customization_delegate . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / editor_decorator . h <nl> ppp b / src / widgets / editor / editor_decorator . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / editor_listener . h <nl> ppp b / src / widgets / editor / editor_listener . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / editor_listeners . cpp <nl> ppp b / src / widgets / editor / editor_listeners . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / editor_listeners . h <nl> ppp b / src / widgets / editor / editor_listeners . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / editor_state . h <nl> ppp b / src / widgets / editor / editor_state . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / editor_states_history . cpp <nl> ppp b / src / widgets / editor / editor_states_history . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / editor_states_history . h <nl> ppp b / src / widgets / editor / editor_states_history . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / editor_view . cpp <nl> ppp b / src / widgets / editor / editor_view . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / editor_view . h <nl> ppp b / src / widgets / editor / editor_view . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / handle_type . h <nl> ppp b / src / widgets / editor / handle_type . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / keys . cpp <nl> ppp b / src / widgets / editor / keys . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / moving_cel_state . cpp <nl> ppp b / src / widgets / editor / moving_cel_state . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / moving_cel_state . h <nl> ppp b / src / widgets / editor / moving_cel_state . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / moving_pixels_state . cpp <nl> ppp b / src / widgets / editor / moving_pixels_state . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / moving_pixels_state . h <nl> ppp b / src / widgets / editor / moving_pixels_state . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / pixels_movement . cpp <nl> ppp b / src / widgets / editor / pixels_movement . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / pixels_movement . h <nl> ppp b / src / widgets / editor / pixels_movement . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / ruler . h <nl> ppp b / src / widgets / editor / ruler . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / scrolling_state . cpp <nl> ppp b / src / widgets / editor / scrolling_state . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / scrolling_state . h <nl> ppp b / src / widgets / editor / scrolling_state . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / select_box_state . cpp <nl> ppp b / src / widgets / editor / select_box_state . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / select_box_state . h <nl> ppp b / src / widgets / editor / select_box_state . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / standby_state . cpp <nl> ppp b / src / widgets / editor / standby_state . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / standby_state . h <nl> ppp b / src / widgets / editor / standby_state . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / tool_loop_impl . cpp <nl> ppp b / src / widgets / editor / tool_loop_impl . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / tool_loop_impl . h <nl> ppp b / src / widgets / editor / tool_loop_impl . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / transform_handles . cpp <nl> ppp b / src / widgets / editor / transform_handles . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / editor / transform_handles . h <nl> ppp b / src / widgets / editor / transform_handles . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / fileview . cpp <nl> ppp b / src / widgets / fileview . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / fileview . h <nl> ppp b / src / widgets / fileview . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / groupbut . cpp <nl> ppp b / src / widgets / groupbut . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / groupbut . h <nl> ppp b / src / widgets / groupbut . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / hex_color_entry . cpp <nl> ppp b / src / widgets / hex_color_entry . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / hex_color_entry . h <nl> ppp b / src / widgets / hex_color_entry . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / menuitem2 . cpp <nl> ppp b / src / widgets / menuitem2 . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / menuitem2 . h <nl> ppp b / src / widgets / menuitem2 . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / palette_view . cpp <nl> ppp b / src / widgets / palette_view . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / palette_view . h <nl> ppp b / src / widgets / palette_view . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / popup_frame_pin . cpp <nl> ppp b / src / widgets / popup_frame_pin . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / popup_frame_pin . h <nl> ppp b / src / widgets / popup_frame_pin . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / statebar . cpp <nl> ppp b / src / widgets / statebar . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / statebar . h <nl> ppp b / src / widgets / statebar . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / tabs . cpp <nl> ppp b / src / widgets / tabs . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / tabs . h <nl> ppp b / src / widgets / tabs . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / toolbar . cpp <nl> ppp b / src / widgets / toolbar . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / widgets / toolbar . h <nl> ppp b / src / widgets / toolbar . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / xml_exception . cpp <nl> ppp b / src / xml_exception . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / xml_exception . h <nl> ppp b / src / xml_exception . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / xml_widgets . cpp <nl> ppp b / src / xml_widgets . cpp <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / src / xml_widgets . h <nl> ppp b / src / xml_widgets . h <nl> <nl> / * ASE - Allegro Sprite Editor <nl> - * Copyright ( C ) 2001 - 2011 David Capello <nl> + * Copyright ( C ) 2001 - 2012 David Capello <nl> * <nl> * This program is free software ; you can redistribute it and / or modify <nl> * it under the terms of the GNU General Public License as published by <nl> mmm a / third_party / CMakeLists . txt <nl> ppp b / third_party / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> include_directories ( . ) <nl> <nl> mmm a / third_party / freetype / CMakeLists . txt <nl> ppp b / third_party / freetype / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> include_directories ( include ) <nl> <nl> mmm a / third_party / giflib / CMakeLists . txt <nl> ppp b / third_party / giflib / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> include_directories ( <nl> lib <nl> mmm a / third_party / gtest / CMakeLists . txt <nl> ppp b / third_party / gtest / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> include_directories ( . include ) <nl> <nl> mmm a / third_party / jpeg / CMakeLists . txt <nl> ppp b / third_party / jpeg / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> add_library ( jpeg <nl> jcapimin . c <nl> mmm a / third_party / libart_lgpl / CMakeLists . txt <nl> ppp b / third_party / libart_lgpl / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> add_library ( libart_lgpl <nl> art_affine . c <nl> mmm a / third_party / libpng / CMakeLists . txt <nl> ppp b / third_party / libpng / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> add_library ( libpng <nl> png . c <nl> mmm a / third_party / loadpng / CMakeLists . txt <nl> ppp b / third_party / loadpng / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> add_library ( loadpng <nl> loadpng . c <nl> mmm a / third_party / tinyxml / CMakeLists . txt <nl> ppp b / third_party / tinyxml / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> add_library ( tinyxml <nl> tinystr . cpp <nl> mmm a / third_party / zlib / CMakeLists . txt <nl> ppp b / third_party / zlib / CMakeLists . txt <nl> <nl> # ASE - Allegro Sprite Editor <nl> - # Copyright ( C ) 2001 - 2011 David Capello <nl> + # Copyright ( C ) 2001 - 2012 David Capello <nl> <nl> add_library ( zlib <nl> adler32 . c <nl>
Update copyright year to 2012 .
aseprite/aseprite
02a9d505246e0cf7c61ad9f0d8ed5a4c80a4ca06
2012-01-06T03:52:11Z
mmm a / lib / IRGen / GenFunc . cpp <nl> ppp b / lib / IRGen / GenFunc . cpp <nl> RValue IRGenFunction : : emitApplyExpr ( ApplyExpr * E , const TypeInfo & ResultInfo ) { <nl> <nl> / / TODO : exceptions , calling conventions <nl> llvm : : CallInst * Call = <nl> - Builder . CreateCall ( CastFn , Args . Values , Fn - > getName ( ) + " . call " ) ; <nl> + Builder . CreateCall ( CastFn , Args . Values ) ; <nl> Call - > setAttributes ( llvm : : AttrListPtr : : get ( Args . Attrs . data ( ) , <nl> Args . Attrs . size ( ) ) ) ; <nl> <nl>
Missing commit .
apple/swift
c3fb2ec8baf3e0e510653c5a053a65bdf40420b6
2011-09-14T22:26:50Z
mmm a / tensorflow / compiler / xla / service / mlir_gpu / experimental / conv_emitter / conv_emitter_transforms . cc <nl> ppp b / tensorflow / compiler / xla / service / mlir_gpu / experimental / conv_emitter / conv_emitter_transforms . cc <nl> void SinkPerfectlyNestedLoops ( absl : : Span < const mlir : : AffineForOp > loops , <nl> std : : rotate ( permutation . begin ( ) , <nl> permutation . begin ( ) + loops . size ( ) - rotate_amount , <nl> permutation . end ( ) ) ; <nl> - mlir : : interchangeLoops ( <nl> + mlir : : permuteLoops ( <nl> llvm : : ArrayRef < mlir : : AffineForOp > ( loops . begin ( ) , loops . end ( ) ) , <nl> permutation ) ; <nl> } <nl> mmm a / tensorflow / workspace . bzl <nl> ppp b / tensorflow / workspace . bzl <nl> def tf_repositories ( path_prefix = " " , tf_repo_name = " " ) : <nl> ) <nl> <nl> # Check out LLVM and MLIR from llvm - project . <nl> - LLVM_COMMIT = " b539f18c565656cdd49fc0c37efbaa8e584b2d65 " <nl> - LLVM_SHA256 = " 56d09abf727cb4551e9fe836e3cbb7a86cecd4ab1f6d0d13f9d79bdc4257851f " <nl> + LLVM_COMMIT = " 11a5caee2aeae2546213366e7fc54095bb8163b9 " <nl> + LLVM_SHA256 = " f1beaa0bd8ebac43dfa0c299e22dcc7ffd82431456a5cf752d9f63bfa39adcdd " <nl> LLVM_URLS = [ <nl> " https : / / storage . googleapis . com / mirror . tensorflow . org / github . com / llvm / llvm - project / archive / { commit } . tar . gz " . format ( commit = LLVM_COMMIT ) , <nl> " https : / / github . com / llvm / llvm - project / archive / { commit } . tar . gz " . format ( commit = LLVM_COMMIT ) , <nl>
Bump tensorflow open source LLVM revision to 11a5caee2aeae2546213366e7fc54095bb8163b9
tensorflow/tensorflow
c7aab7b5f311005fc900fbf5cb6bf8c3bc37eee5
2020-03-30T19:01:35Z
mmm a / src / codegen / base . cpp <nl> ppp b / src / codegen / base . cpp <nl> <nl> <nl> TLANG_NAMESPACE_BEGIN <nl> <nl> - std : : string CodeGenBase : : get_source_fn ( ) { <nl> + std : : string CodeGenBase : : get_source_path ( ) { <nl> return fmt : : format ( " { } / { } / { } " , get_project_fn ( ) , folder , get_source_name ( ) ) ; <nl> } <nl> <nl> mmm a / src / codegen / base . h <nl> ppp b / src / codegen / base . h <nl> TLANG_NAMESPACE_BEGIN <nl> / / Base class for Struct , CPU , GPU codegen <nl> class CodeGenBase { <nl> public : <nl> + int id ; <nl> + void * dll ; <nl> std : : string line_suffix ; <nl> std : : string folder ; <nl> std : : string func_name ; <nl> - int num_groups ; <nl> - int id ; <nl> std : : string suffix ; <nl> - void * dll ; <nl> <nl> enum class CodeRegion : int { <nl> header , <nl> class CodeGenBase { <nl> return fmt : : format ( " tmp { : 04d } . { } " , id , suffix ) ; <nl> } <nl> <nl> - template < typename T > <nl> - static std : : string vec_to_list ( std : : vector < T > val , std : : string bracket ) { <nl> - std : : string members = bracket ; <nl> - bool first = true ; <nl> - for ( int i = 0 ; i < ( int ) val . size ( ) ; i + + ) { <nl> - if ( ! first ) { <nl> - members + = " , " ; <nl> - } <nl> - first = false ; <nl> - members + = fmt : : format ( " { } " , val [ i ] ) ; <nl> - } <nl> - if ( bracket = = " < " ) { <nl> - members + = " > " ; <nl> - } else if ( bracket = = " { " ) { <nl> - members + = " } " ; <nl> - } else if ( bracket = = " ( " ) { <nl> - members + = " ) " ; <nl> - } else if ( bracket ! = " " ) { <nl> - TC_P ( bracket ) ; <nl> - TC_NOT_IMPLEMENTED <nl> - } <nl> - return members ; <nl> - } <nl> - <nl> - std : : string get_source_fn ( ) ; <nl> + std : : string get_source_path ( ) ; <nl> <nl> - std : : string get_library_fn ( ) { <nl> + std : : string get_library_path ( ) { <nl> # if defined ( TC_PLATFORM_OSX ) <nl> / / Note : use . so here will lead to wired behavior . . . <nl> return fmt : : format ( " { } / tmp { : 04d } . dylib " , folder , id ) ; <nl> class CodeGenBase { <nl> # endif <nl> } <nl> <nl> - template < typename . . . Args > <nl> - void emit_code ( std : : string f , Args & & . . . args ) { <nl> - emit ( f , std : : forward < Args > ( args ) . . . ) ; <nl> - } <nl> - <nl> template < typename . . . Args > <nl> void emit ( std : : string f , Args & & . . . args ) { <nl> if ( codes . find ( current_code_region ) = = codes . end ( ) ) { <nl> class CodeGenBase { <nl> } <nl> <nl> void write_source ( ) { <nl> - std : : ifstream ifs ( get_source_fn ( ) ) ; <nl> + std : : ifstream ifs ( get_source_path ( ) ) ; <nl> std : : string firstline ; <nl> std : : getline ( ifs , firstline ) ; <nl> if ( firstline . find ( " debug " ) ! = firstline . npos ) { <nl> - TC_WARN ( " Debugging file { } . Code overridden . " , get_source_fn ( ) ) ; <nl> + TC_WARN ( " Debugging file { } . Code overridden . " , get_source_path ( ) ) ; <nl> return ; <nl> } <nl> { <nl> - std : : ofstream of ( get_source_fn ( ) ) ; <nl> + std : : ofstream of ( get_source_path ( ) ) ; <nl> for ( auto const & k : codes ) { <nl> of < < " / / region " < < get_region_name ( k . first ) < < std : : endl ; <nl> of < < k . second ; <nl> } <nl> } <nl> trash ( std : : system ( <nl> - fmt : : format ( " cp { } { } _unformated " , get_source_fn ( ) , get_source_fn ( ) ) <nl> + fmt : : format ( " cp { } { } _unformated " , get_source_path ( ) , get_source_path ( ) ) <nl> . c_str ( ) ) ) ; <nl> auto format_ret = <nl> - std : : system ( fmt : : format ( " clang - format - i { } " , get_source_fn ( ) ) . c_str ( ) ) ; <nl> + std : : system ( fmt : : format ( " clang - format - i { } " , get_source_path ( ) ) . c_str ( ) ) ; <nl> trash ( format_ret ) ; <nl> } <nl> <nl> void load_dll ( ) { <nl> - dll = dlopen ( ( " . / " + get_library_fn ( ) ) . c_str ( ) , RTLD_LAZY ) ; <nl> + dll = dlopen ( ( " . / " + get_library_path ( ) ) . c_str ( ) , RTLD_LAZY ) ; <nl> if ( dll = = nullptr ) { <nl> TC_ERROR ( " { } " , dlerror ( ) ) ; <nl> } <nl> class CodeGenBase { <nl> void disassemble ( ) { <nl> # if defined ( TC_PLATFORM_LINUX ) <nl> auto objdump_ret = system ( <nl> - fmt : : format ( " objdump { } - d > { } . s " , get_library_fn ( ) , get_library_fn ( ) ) <nl> + fmt : : format ( " objdump { } - d > { } . s " , get_library_path ( ) , get_library_path ( ) ) <nl> . c_str ( ) ) ; <nl> trash ( objdump_ret ) ; <nl> # endif <nl> mmm a / src / codegen / cpu . cpp <nl> ppp b / src / codegen / cpu . cpp <nl> void CPUCodeGen : : codegen ( Kernel & kernel ) { <nl> FunctionType CPUCodeGen : : compile ( Program & prog , Kernel & kernel ) { <nl> codegen ( kernel ) ; <nl> write_source ( ) ; <nl> - auto cmd = get_current_program ( ) . config . compile_cmd ( get_source_fn ( ) , <nl> - get_library_fn ( ) ) ; <nl> + auto cmd = get_current_program ( ) . config . compile_cmd ( get_source_path ( ) , <nl> + get_library_path ( ) ) ; <nl> auto compile_ret = std : : system ( cmd . c_str ( ) ) ; <nl> if ( compile_ret ! = 0 ) { <nl> - auto cmd = get_current_program ( ) . config . compile_cmd ( get_source_fn ( ) , <nl> - get_library_fn ( ) , true ) ; <nl> + auto cmd = get_current_program ( ) . config . compile_cmd ( get_source_path ( ) , <nl> + get_library_path ( ) , true ) ; <nl> trash ( std : : system ( cmd . c_str ( ) ) ) ; <nl> - TC_ERROR ( " Source { } compilation failed . " , get_source_fn ( ) ) ; <nl> + TC_ERROR ( " Source { } compilation failed . " , get_source_path ( ) ) ; <nl> } <nl> disassemble ( ) ; <nl> return load_function ( ) ; <nl> mmm a / src / codegen / cpu . h <nl> ppp b / src / codegen / cpu . h <nl> class CPUCodeGen : public CodeGenBase { <nl> public : <nl> Program * prog ; <nl> Kernel * current_kernel ; <nl> - std : : map < std : : string , std : : string > constant_vectors ; / / statement to var name <nl> - int constant_counter ; <nl> std : : map < int , std : : string > masks ; <nl> <nl> public : <nl> - std : : string get_constant ( std : : string statement ) { <nl> - if ( constant_vectors . find ( statement ) = = constant_vectors . end ( ) ) { <nl> - CODE_REGION ( exterior_shared_variable_begin ) ; <nl> - auto key = fmt : : format ( " const { : 04d } " , constant_counter + + ) ; <nl> - emit_code ( " const auto { } = { } ; \ n " , key , statement ) ; <nl> - constant_vectors [ statement ] = key ; <nl> - } <nl> - return constant_vectors [ statement ] ; <nl> - } <nl> <nl> CPUCodeGen ( ) : CodeGenBase ( ) { <nl> suffix = " cpp " ; <nl> - constant_counter = 0 ; <nl> } <nl> <nl> / * <nl> class CPUCodeGen : public CodeGenBase { <nl> <nl> <nl> void generate_header ( ) { <nl> - emit_code ( " # include < common . h > \ n " ) ; <nl> - emit_code ( " # define TLANG_KERNEL \ n " ) ; <nl> - emit_code ( " # include \ " { } \ " " , prog - > layout_fn ) ; <nl> - emit_code ( " using namespace taichi ; using namespace Tlang ; " ) ; <nl> + emit ( " # include < common . h > \ n " ) ; <nl> + emit ( " # define TLANG_KERNEL \ n " ) ; <nl> + emit ( " # include \ " { } \ " " , prog - > layout_fn ) ; <nl> + emit ( " using namespace taichi ; using namespace Tlang ; " ) ; <nl> <nl> - emit_code ( " extern \ " C \ " void " + func_name + " ( Context context ) { { \ n " ) ; <nl> - emit_code ( " auto root = ( { } * ) context . buffers [ 0 ] ; " , <nl> + emit ( " extern \ " C \ " void " + func_name + " ( Context context ) { { \ n " ) ; <nl> + emit ( " auto root = ( { } * ) context . buffers [ 0 ] ; " , <nl> prog - > snode_root - > node_type_name ) ; <nl> } <nl> <nl> void generate_tail ( ) { <nl> - emit_code ( " } } \ n " ) ; <nl> + emit ( " } } \ n " ) ; <nl> } <nl> <nl> void codegen ( Kernel & ker ) ; <nl> mmm a / src / codegen / struct . h <nl> ppp b / src / codegen / struct . h <nl> class StructCompiler : public CodeGenBase { <nl> snode_count = 0 ; <nl> <nl> suffix = " cpp " ; <nl> - emit_code ( " # define TLANG_HOST " ) ; <nl> - emit_code ( " # include < common . h > " ) ; <nl> - emit_code ( " using namespace taichi ; " ) ; <nl> - emit_code ( " using namespace Tlang ; " ) ; <nl> - emit_code ( " \ n " ) ; <nl> + emit ( " # define TLANG_HOST " ) ; <nl> + emit ( " # include < common . h > " ) ; <nl> + emit ( " using namespace taichi ; " ) ; <nl> + emit ( " using namespace Tlang ; " ) ; <nl> + emit ( " \ n " ) ; <nl> } <nl> <nl> std : : string create_snode ( ) { <nl> class StructCompiler : public CodeGenBase { <nl> snode . total_num_bits + = snode . extractors [ i ] . num_bits ; <nl> } <nl> <nl> - emit_code ( " " ) ; <nl> + emit ( " " ) ; <nl> snode . node_type_name = create_snode ( ) ; <nl> auto type = snode . type ; <nl> <nl> class StructCompiler : public CodeGenBase { <nl> } <nl> <nl> if ( snode . has_ambient ) { <nl> - emit_code ( " { } { } _ambient = { } ; " , snode . data_type_name ( ) , <nl> + emit ( " { } { } _ambient = { } ; " , snode . data_type_name ( ) , <nl> snode . node_type_name , snode . ambient_val . stringify ( ) ) ; <nl> } <nl> <nl> / / create children type that supports forking . . . <nl> - emit_code ( " struct { } _ch { { " , snode . node_type_name ) ; <nl> - emit_code ( " static constexpr int n = 1 ; " ) ; <nl> + emit ( " struct { } _ch { { " , snode . node_type_name ) ; <nl> + emit ( " static constexpr int n = 1 ; " ) ; <nl> for ( int i = 0 ; i < ( int ) snode . ch . size ( ) ; i + + ) { <nl> - emit_code ( " { } member { } ; " , snode . ch [ i ] - > node_type_name , i ) ; <nl> + emit ( " { } member { } ; " , snode . ch [ i ] - > node_type_name , i ) ; <nl> } <nl> for ( int i = 0 ; i < ( int ) snode . ch . size ( ) ; i + + ) { <nl> - emit_code ( " auto * get { } ( ) { { return & member { } ; } } " , i , i ) ; <nl> + emit ( " auto * get { } ( ) { { return & member { } ; } } " , i , i ) ; <nl> } <nl> - / / emit_code ( " TC_FORCE_INLINE int get_n ( ) { { return 1 ; } } " ) ; <nl> - emit_code ( " } } ; " ) ; <nl> + / / emit ( " TC_FORCE_INLINE int get_n ( ) { { return 1 ; } } " ) ; <nl> + emit ( " } } ; " ) ; <nl> <nl> if ( type = = SNodeType : : fixed ) { <nl> - emit_code ( " using { } = fixed < { } _ch , { } > ; " , snode . node_type_name , <nl> + emit ( " using { } = fixed < { } _ch , { } > ; " , snode . node_type_name , <nl> snode . node_type_name , snode . n ) ; <nl> } else if ( type = = SNodeType : : root ) { <nl> - emit_code ( " using { } = layout_root < { } _ch > ; " , snode . node_type_name , <nl> + emit ( " using { } = layout_root < { } _ch > ; " , snode . node_type_name , <nl> snode . node_type_name ) ; <nl> } else if ( type = = SNodeType : : dynamic ) { <nl> - emit_code ( " using { } = dynamic < { } _ch , { } > ; " , snode . node_type_name , <nl> + emit ( " using { } = dynamic < { } _ch , { } > ; " , snode . node_type_name , <nl> snode . node_type_name , snode . n ) ; <nl> } else if ( type = = SNodeType : : indirect ) { <nl> - emit_code ( " using { } = indirect < { } _ch > ; " , snode . node_type_name , snode . n ) ; <nl> + emit ( " using { } = indirect < { } _ch > ; " , snode . node_type_name , snode . n ) ; <nl> } else if ( type = = SNodeType : : pointer ) { <nl> - emit_code ( " using { } = pointer < { } _ch > ; " , snode . node_type_name , <nl> + emit ( " using { } = pointer < { } _ch > ; " , snode . node_type_name , <nl> snode . node_type_name ) ; <nl> } else if ( type = = SNodeType : : hashed ) { <nl> - emit_code ( " using { } = hashed < { } _ch > ; " , snode . node_type_name , <nl> + emit ( " using { } = hashed < { } _ch > ; " , snode . node_type_name , <nl> snode . node_type_name ) ; <nl> } else if ( type = = SNodeType : : place ) { <nl> - emit_code ( " using { } = { } ; " , snode . node_type_name , snode . data_type_name ( ) ) ; <nl> + emit ( " using { } = { } ; " , snode . node_type_name , snode . data_type_name ( ) ) ; <nl> } else { <nl> TC_P ( snode . type_name ( ) ) ; <nl> TC_NOT_IMPLEMENTED ; <nl> } <nl> - emit_code ( " " ) ; <nl> + emit ( " " ) ; <nl> } <nl> <nl> void generate_leaf_accessors ( SNode & snode ) { <nl> class StructCompiler : public CodeGenBase { <nl> TC_ASSERT ( snode . ch . size ( ) > 0 ) ; <nl> for ( int i = 0 ; i < ( int ) snode . ch . size ( ) ; i + + ) { <nl> auto ch = snode . ch [ i ] ; <nl> - emit_code ( " TC_FORCE_INLINE { } * access_ { } ( { } * parent , int i ) { { " , <nl> + emit ( " TC_FORCE_INLINE { } * access_ { } ( { } * parent , int i ) { { " , <nl> ch - > node_type_name , ch - > node_type_name , snode . node_type_name ) ; <nl> - emit_code ( " auto lookup = parent - > look_up ( i ) ; " <nl> + emit ( " auto lookup = parent - > look_up ( i ) ; " <nl> " if ( { } : : has_null & & lookup = = nullptr ) return nullptr ; " , <nl> snode . node_type_name ) ; <nl> - emit_code ( " return lookup - > get { } ( ) ; " , i ) ; <nl> - emit_code ( " } } " ) ; <nl> + emit ( " return lookup - > get { } ( ) ; " , i ) ; <nl> + emit ( " } } " ) ; <nl> } <nl> - emit_code ( " " ) ; <nl> + emit ( " " ) ; <nl> } <nl> { / / SNode : : place & indirect <nl> / / emit end2end accessors for leaf ( place ) nodes , using chain accessors <nl> - emit_code ( <nl> + emit ( <nl> " TLANG_ACCESSOR { } * access_ { } ( void * root , int i0 , int i1 = 0 , int " <nl> " i2 = 0 , " <nl> " int i3 = 0 ) { { " , <nl> snode . node_type_name , snode . node_type_name ) ; <nl> if ( snode . _verbose ) { <nl> - emit_code ( <nl> + emit ( <nl> " std : : cout < < \ " accessing node { } at \ " < < i0 < < ' ' < < i1 < < ' ' " <nl> " < < i2 < < ' ' < < i3 < < std : : endl ; " , <nl> snode . node_type_name ) ; <nl> } <nl> - emit_code ( " int tmp ; " ) ; <nl> - emit_code ( " auto n0 = ( { } * ) root ; " , root_type ) ; <nl> + emit ( " int tmp ; " ) ; <nl> + emit ( " auto n0 = ( { } * ) root ; " , root_type ) ; <nl> for ( int i = 0 ; i + 1 < ( int ) stack . size ( ) ; i + + ) { <nl> - emit_code ( " tmp = 0 ; " , i ) ; <nl> + emit ( " tmp = 0 ; " , i ) ; <nl> for ( int j = 0 ; j < max_num_indices ; j + + ) { <nl> auto e = stack [ i ] - > extractors [ j ] ; <nl> int b = e . num_bits ; <nl> if ( b ) { <nl> if ( e . num_bits = = e . start | | max_num_indices ! = 1 ) { <nl> - emit_code ( " tmp = ( tmp < < { } ) + ( ( i { } > > { } ) & ( ( 1 < < { } ) - 1 ) ) ; " , <nl> + emit ( " tmp = ( tmp < < { } ) + ( ( i { } > > { } ) & ( ( 1 < < { } ) - 1 ) ) ; " , <nl> e . num_bits , j , e . start , e . num_bits ) ; <nl> } else { <nl> TC_WARN ( " Emitting shortcut indexing " ) ; <nl> - emit_code ( " tmp = i { } ; " , j ) ; <nl> + emit ( " tmp = i { } ; " , j ) ; <nl> } <nl> } <nl> } <nl> - emit_code ( " auto n { } = access_ { } ( n { } , tmp ) ; " , i + 1 , <nl> + emit ( " auto n { } = access_ { } ( n { } , tmp ) ; " , i + 1 , <nl> stack [ i + 1 ] - > node_type_name , i ) ; <nl> if ( snode . has_ambient & & stack [ i + 1 ] ! = & snode ) <nl> - emit_code ( " if ( { } : : has_null & & n { } = = nullptr ) return & { } _ambient ; " , <nl> + emit ( " if ( { } : : has_null & & n { } = = nullptr ) return & { } _ambient ; " , <nl> stack [ i ] - > node_type_name , i + 1 , snode . node_type_name ) ; <nl> } <nl> - emit_code ( " return n { } ; " , ( int ) stack . size ( ) - 1 ) ; <nl> - emit_code ( " } } " ) ; <nl> - emit_code ( " " ) ; <nl> + emit ( " return n { } ; " , ( int ) stack . size ( ) - 1 ) ; <nl> + emit ( " } } " ) ; <nl> + emit ( " " ) ; <nl> } <nl> <nl> if ( type = = SNodeType : : indirect ) { / / toucher <nl> - emit_code ( <nl> + emit ( <nl> " TLANG_ACCESSOR void touch_ { } ( void * root , int val , int i0 , int " <nl> " i1 = 0 , int " <nl> " i2 = 0 , " <nl> " int i3 = 0 ) { { " , <nl> snode . node_type_name ) ; <nl> - emit_code ( " auto node = access_ { } ( root , i0 , i1 , i2 , i3 ) ; " , <nl> + emit ( " auto node = access_ { } ( root , i0 , i1 , i2 , i3 ) ; " , <nl> snode . node_type_name ) ; <nl> / * <nl> - emit_code ( <nl> + emit ( <nl> " std : : cout < < val < < ' ' < < i0 < < ' ' < < i1 < < ' ' < < i2 < < ' ' < < i3 < < " <nl> " std : : endl ; " ) ; <nl> * / <nl> - emit_code ( " node - > touch ( val ) ; " ) ; <nl> - emit_code ( " } " ) ; <nl> + emit ( " node - > touch ( val ) ; " ) ; <nl> + emit ( " } " ) ; <nl> } <nl> <nl> if ( type = = SNodeType : : dynamic ) { / / toucher <nl> - emit_code ( <nl> + emit ( <nl> " TLANG_ACCESSOR void touch_ { } ( void * root , const { } : : child_type & val , " <nl> " int i0 , int " <nl> " i1 = 0 , int " <nl> " i2 = 0 , " <nl> " int i3 = 0 ) { { " , <nl> snode . node_type_name , snode . node_type_name ) ; <nl> - emit_code ( " auto node = access_ { } ( root , i0 , i1 , i2 , i3 ) ; " , <nl> + emit ( " auto node = access_ { } ( root , i0 , i1 , i2 , i3 ) ; " , <nl> snode . node_type_name ) ; <nl> - emit_code ( " node - > touch ( val ) ; " ) ; <nl> - emit_code ( " } } " ) ; <nl> + emit ( " node - > touch ( val ) ; " ) ; <nl> + emit ( " } } " ) ; <nl> } <nl> <nl> for ( auto ch : snode . ch ) { <nl> class StructCompiler : public CodeGenBase { <nl> <nl> void run ( SNode & node ) { <nl> set_parents ( node ) ; <nl> - emit_code ( " # if defined ( TLANG_KERNEL ) " ) ; <nl> - emit_code ( " # define TLANG_ACCESSOR TC_FORCE_INLINE " ) ; <nl> - emit_code ( " # else " ) ; <nl> - emit_code ( " # define TLANG_ACCESSOR extern \ " C \ " " ) ; <nl> - emit_code ( " # endif " ) ; <nl> + emit ( " # if defined ( TLANG_KERNEL ) " ) ; <nl> + emit ( " # define TLANG_ACCESSOR TC_FORCE_INLINE " ) ; <nl> + emit ( " # else " ) ; <nl> + emit ( " # define TLANG_ACCESSOR extern \ " C \ " " ) ; <nl> + emit ( " # endif " ) ; <nl> / / bottom to top <nl> visit ( node ) ; <nl> root_type = node . node_type_name ; <nl> generate_leaf_accessors ( node ) ; <nl> - emit_code ( " extern \ " C \ " void * create_data_structure ( ) { { auto p = new { } ; " , <nl> + emit ( " extern \ " C \ " void * create_data_structure ( ) { { auto p = new { } ; " , <nl> root_type ) ; <nl> for ( int i = 0 ; i < ( int ) node . ch . size ( ) ; i + + ) { <nl> if ( node . ch [ i ] - > type ! = SNodeType : : hashed ) { <nl> - emit_code ( " std : : memset ( p - > children . get { } ( ) , 0 , sizeof ( { } ) ) ; " , i , <nl> + emit ( " std : : memset ( p - > children . get { } ( ) , 0 , sizeof ( { } ) ) ; " , i , <nl> node . ch [ i ] - > node_type_name ) ; <nl> } <nl> } <nl> - emit_code ( " return p ; } } " ) ; <nl> - emit_code ( <nl> + emit ( " return p ; } } " ) ; <nl> + emit ( <nl> " extern \ " C \ " void release_data_structure ( void * ds ) { { delete ( { } " <nl> " * ) ds ; } } " , <nl> root_type ) ; <nl> write_source ( ) ; <nl> <nl> - auto cmd = get_current_program ( ) . config . compile_cmd ( get_source_fn ( ) , <nl> - get_library_fn ( ) ) ; <nl> + auto cmd = get_current_program ( ) . config . compile_cmd ( get_source_path ( ) , <nl> + get_library_path ( ) ) ; <nl> auto compile_ret = std : : system ( cmd . c_str ( ) ) ; <nl> <nl> if ( compile_ret ! = 0 ) { <nl> auto cmd = get_current_program ( ) . config . compile_cmd ( <nl> - get_source_fn ( ) , get_library_fn ( ) , true ) ; <nl> + get_source_path ( ) , get_library_path ( ) , true ) ; <nl> trash ( std : : system ( cmd . c_str ( ) ) ) ; <nl> TC_ERROR ( " Compilation failed " ) ; <nl> } <nl> mmm a / src / program . cpp <nl> ppp b / src / program . cpp <nl> SNode root ; <nl> void Program : : materialize_layout ( ) { <nl> StructCompiler scomp ; <nl> scomp . run ( root ) ; <nl> - layout_fn = scomp . get_source_fn ( ) ; <nl> + layout_fn = scomp . get_source_path ( ) ; <nl> data_structure = scomp . creator ( ) ; <nl> } <nl> <nl>
refactor
taichi-dev/taichi
cef151109a42b2f2844d99a634b01f9a6fe27ea9
2019-03-23T01:54:53Z
mmm a / emcc <nl> ppp b / emcc <nl> Options that are modified or new in % s include : <nl> The target file , if specified ( - o < target > ) , defines what will <nl> be generated : <nl> <nl> - < name > . js JavaScript <nl> + < name > . js JavaScript ( default ) <nl> < name > . html HTML with embedded JavaScript <nl> - < name > . bc LLVM bitcode ( default ) <nl> + < name > . bc LLVM bitcode <nl> < name > . o LLVM bitcode <nl> <nl> - If - o < target > is * not * specified , the default is to generate <nl> - bitcode . In other words , to generate JavaScript or HTML , you must <nl> - specify so explicitly . The reason for this is that otherwise <nl> - many build systems would create a lot of JavaScript in <nl> - intermediary stages in a wasteful and inefficient manner . <nl> - <nl> The - c option ( which tells gcc not to run the linker ) will <nl> - also cause LLVM bitcode to be generated , as % s only generates <nl> + cause LLVM bitcode to be generated , as % s only generates <nl> JavaScript in the final linking stage of building . <nl> <nl> ' ' ' % ( this , this , this ) <nl> if use_compiler : <nl> newargs + = CC_ADDITIONAL_ARGS <nl> <nl> specified_target = target <nl> - target = specified_target if specified_target is not None else ' a . out . bc ' # specified_target is the user - specified one , target is what we will generate <nl> + target = specified_target if specified_target is not None else ' a . out . js ' # specified_target is the user - specified one , target is what we will generate <nl> <nl> target_basename = unsuffixed_basename ( target ) <nl> <nl> mmm a / tests / runner . py <nl> ppp b / tests / runner . py <nl> def clear ( ) : <nl> - O0 No optimizations ( default ) <nl> ' ' ' % ( shortcompiler , shortcompiler ) , output [ 0 ] , output [ 1 ] ) <nl> <nl> - # emcc src . cpp = = > writes a . out . bc . we do not generate JS unless explicitly told to <nl> + # emcc src . cpp = = > writes a . out . js <nl> clear ( ) <nl> output = Popen ( [ compiler , path_from_root ( ' tests ' , ' hello_world ' + suffix ) ] , stdout = PIPE , stderr = PIPE ) . communicate ( ) <nl> assert len ( output [ 0 ] ) = = 0 , output [ 0 ] <nl> - assert os . path . exists ( ' hello_world . bc ' ) , output [ 1 ] <nl> - self . assertContained ( ' hello , world ! ' , self . run_llvm_interpreter ( [ ' hello_world . bc ' ] ) ) <nl> - output = Popen ( [ compiler , ' hello_world . bc ' , ' - o ' , ' out . js ' ] , stdout = PIPE , stderr = PIPE ) . communicate ( ) # compile . bc to . js <nl> - assert os . path . exists ( ' out . js ' ) , ' \ n ' . join ( output ) <nl> - self . assertContained ( ' hello , world ! ' , run_js ( ' out . js ' ) ) <nl> + assert os . path . exists ( ' a . out . js ' ) , ' \ n ' . join ( output ) <nl> + self . assertContained ( ' hello , world ! ' , run_js ( ' a . out . js ' ) ) <nl> <nl> # emcc src . cpp - c and emcc src . cpp - o src . [ o | bc ] = = > should give a . bc file <nl> for args in [ [ ' - c ' ] , [ ' - o ' , ' src . o ' ] , [ ' - o ' , ' src . bc ' ] ] : <nl>
return to a . out . js as default output in emcc
emscripten-core/emscripten
6c2ee0edcff41748ac4bd771a3fdc7be03b1e084
2011-12-14T18:50:22Z
new file mode 100644 <nl> index 00000000000 . . 568c2d728ed <nl> mmm / dev / null <nl> ppp b / Tests / EndToEndTests / CNTKv2Python / Examples / deeprl_test . py <nl> <nl> + import os <nl> + import platform <nl> + import shelve <nl> + import shutil <nl> + import subprocess <nl> + <nl> + import pytest <nl> + <nl> + def test_deeprl ( ) : <nl> + # if platform . system ( ) ! = ' Linux ' : <nl> + # pytest . skip ( ' test only runs on Linux ( Gym Atari dependency ) ' ) <nl> + <nl> + test_dir = os . path . dirname ( os . path . abspath ( __file__ ) ) <nl> + script_dir = os . path . join ( test_dir , ' . . ' , ' . . ' , ' . . ' , ' . . ' , ' Examples ' , <nl> + ' ReinforcementLearning ' , ' deeprl ' , ' scripts ' ) <nl> + script_file = os . path . join ( script_dir , ' run . py ' ) <nl> + config_file = os . path . join ( script_dir , ' config_examples ' , ' qlearning . cfg ' ) <nl> + <nl> + subprocess . call ( [ <nl> + ' python ' , script_file , ' - - env = CartPole - v0 ' , ' - - max_steps = 5000 ' , <nl> + ' - - agent_config = ' + config_file , ' - - eval_period = 1000 ' , <nl> + ' - - eval_steps = 20000 ' <nl> + ] ) <nl> + <nl> + assert os . path . exists ( <nl> + os . path . join ( test_dir , ' output ' , ' output . params ' ) ) = = True <nl> + <nl> + wks = shelve . open ( os . path . join ( test_dir , ' output ' , ' output . wks ' ) ) <nl> + rewards = wks [ ' reward_history ' ] <nl> + assert len ( rewards ) > = 4 and len ( rewards ) < = 5 <nl> + assert max ( rewards ) > = 160 <nl> + <nl> + shutil . rmtree ( os . path . join ( test_dir , ' output ' ) ) <nl>
add e2e test
microsoft/CNTK
3a0d34d773d72d1b701737355a17ddba941c7d7b
2017-07-14T18:53:02Z
mmm a / lib / Sema / TypeCheckAttr . cpp <nl> ppp b / lib / Sema / TypeCheckAttr . cpp <nl> visitDynamicCallableAttr ( DynamicCallableAttr * attr ) { <nl> } <nl> } <nl> <nl> + static bool hasSingleNonVariadicParam ( SubscriptDecl * decl ) { <nl> + auto * indices = decl - > getIndices ( ) ; <nl> + return indices - > size ( ) = = 1 & & ! indices - > get ( 0 ) - > isVariadic ( ) ; <nl> + } <nl> + <nl> / / / Returns true if the given subscript method is an valid implementation of <nl> / / / the ` subscript ( dynamicMember : ) ` requirement for @ dynamicMemberLookup . <nl> / / / The method is given to be defined as ` subscript ( dynamicMember : ) ` . <nl> bool swift : : isValidDynamicMemberLookupSubscript ( SubscriptDecl * decl , <nl> DeclContext * DC , <nl> TypeChecker & TC ) { <nl> + / / It could be <nl> + / / - ` subscript ( dynamicMember : { Writable } KeyPath < . . . > ) ` ; or <nl> + / / - ` subscript ( dynamicMember : String * ) ` <nl> + return isValidKeyPathDynamicMemberLookup ( decl , TC ) | | <nl> + isValidStringDynamicMemberLookup ( decl , DC , TC ) ; <nl> + <nl> + } <nl> + <nl> + bool swift : : isValidStringDynamicMemberLookup ( SubscriptDecl * decl , <nl> + DeclContext * DC , <nl> + TypeChecker & TC ) { <nl> / / There are two requirements : <nl> / / - The subscript method has exactly one , non - variadic parameter . <nl> / / - The parameter type conforms to ` ExpressibleByStringLiteral ` . <nl> - auto indices = decl - > getIndices ( ) ; <nl> + if ( ! hasSingleNonVariadicParam ( decl ) ) <nl> + return false ; <nl> + <nl> + const auto * param = decl - > getIndices ( ) - > get ( 0 ) ; <nl> + auto paramType = param - > getType ( ) ; <nl> <nl> auto stringLitProto = <nl> TC . Context . getProtocol ( KnownProtocolKind : : ExpressibleByStringLiteral ) ; <nl> - <nl> - return indices - > size ( ) = = 1 & & ! indices - > get ( 0 ) - > isVariadic ( ) & & <nl> - TC . conformsToProtocol ( indices - > get ( 0 ) - > getType ( ) , <nl> - stringLitProto , DC , ConformanceCheckOptions ( ) ) ; <nl> + <nl> + / / If this is ` subscript ( dynamicMember : String * ) ` <nl> + return bool ( TC . conformsToProtocol ( paramType , stringLitProto , DC , <nl> + ConformanceCheckOptions ( ) ) ) ; <nl> + } <nl> + <nl> + bool swift : : isValidKeyPathDynamicMemberLookup ( SubscriptDecl * decl , <nl> + TypeChecker & TC ) { <nl> + if ( ! hasSingleNonVariadicParam ( decl ) ) <nl> + return false ; <nl> + <nl> + const auto * param = decl - > getIndices ( ) - > get ( 0 ) ; <nl> + if ( param - > isVariadic ( ) ) <nl> + return false ; <nl> + <nl> + if ( auto NTD = param - > getType ( ) - > getAnyNominal ( ) ) { <nl> + return NTD = = TC . Context . getKeyPathDecl ( ) | | <nl> + NTD = = TC . Context . getWritableKeyPathDecl ( ) ; <nl> + } <nl> + return false ; <nl> } <nl> <nl> / / / The @ dynamicMemberLookup attribute is only allowed on types that have at <nl> mmm a / lib / Sema / TypeChecker . h <nl> ppp b / lib / Sema / TypeChecker . h <nl> bool isValidDynamicCallableMethod ( FuncDecl * decl , DeclContext * DC , <nl> bool isValidDynamicMemberLookupSubscript ( SubscriptDecl * decl , DeclContext * DC , <nl> TypeChecker & TC ) ; <nl> <nl> + / / / Returns true if the given subscript method is an valid implementation of <nl> + / / / the ` subscript ( dynamicMember : ) ` requirement for @ dynamicMemberLookup . <nl> + / / / The method is given to be defined as ` subscript ( dynamicMember : ) ` which <nl> + / / / takes a single non - variadic parameter that conforms to <nl> + / / / ` ExpressibleByStringLiteral ` protocol . <nl> + bool isValidStringDynamicMemberLookup ( SubscriptDecl * decl , DeclContext * DC , <nl> + TypeChecker & TC ) ; <nl> + <nl> + / / / Returns true if the given subscript method is an valid implementation of <nl> + / / / the ` subscript ( dynamicMember : { Writable } KeyPath < . . . > ) ` requirement for <nl> + / / / @ dynamicMemberLookup . <nl> + / / / The method is given to be defined as ` subscript ( dynamicMember : ) ` which <nl> + / / / takes a single non - variadic parameter of ` { Writable } KeyPath < T , U > ` type . <nl> + bool isValidKeyPathDynamicMemberLookup ( SubscriptDecl * decl , TypeChecker & TC ) ; <nl> + <nl> / / / Whether an overriding declaration requires the ' override ' keyword . <nl> enum class OverrideRequiresKeyword { <nl> / / / The keyword is never required . <nl>
[ TypeChecker ] Adjust dynamic member lookup to support keypaths
apple/swift
b3cb1a159bbe9d2ed40263c26fffcb9bdff9950e
2019-04-01T19:40:39Z
mmm a / contrib / Python / cntk / ops / __init__ . py <nl> ppp b / contrib / Python / cntk / ops / __init__ . py <nl> def cross_entropy_with_softmax ( target_vector , output_vector , name = None ) : <nl> over the labels . <nl> output_vector : the unscaled computed output values from the network <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk1 import CrossEntropyWithSoftmax <nl> def square_error ( target_matrix , output_matrix , name = None ) : <nl> hot bit corresponds to the label index <nl> output_matrix : the output values from the network <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk1 import SquareError <nl> def error_prediction ( target_vector , output_vector , name = None ) : <nl> label index <nl> output_vector : the output values from the network <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import ErrorPrediction <nl> def less ( left , right , name = None ) : <nl> left : left side tensor <nl> right : right side tensor <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Less <nl> def equal ( left , right , name = None ) : <nl> left : left side tensor <nl> right : right side tensor <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Equal <nl> def greater ( left , right , name = None ) : <nl> left : left side tensor <nl> right : right side tensor <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Greater <nl> def greater_equal ( left , right , name = None ) : <nl> left : left side tensor <nl> right : right side tensor <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import GreaterEqual <nl> def not_equal ( left , right , name = None ) : <nl> left : left side tensor <nl> right : right side tensor <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import NotEqual <nl> def less_equal ( left , right , name = None ) : <nl> left : left side tensor <nl> right : right side tensor <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import LessEqual <nl> def plus ( left , right , name = None ) : <nl> left : left side tensor <nl> right : right side tensor <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Plus <nl> def minus ( left , right , name = None ) : <nl> left : left side tensor <nl> right : right side tensor <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> <nl> def element_times ( left , right , name = None ) : <nl> left : left side tensor <nl> right : right side tensor <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import ElementTimes <nl> def element_divide ( left , right , name = None ) : <nl> left : left side tensor <nl> right : right side tensor <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import ElementDivide <nl> def times ( left , right , output_rank = 1 , name = None ) : <nl> into matrices , perform the operation and then reshape back ( explode the axes ) <nl> name : the name of the node in the network <nl> <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Times <nl> # CNTK uses column vectors and column major representation , thus we reverse <nl> # params <nl> op = Times ( right , left , outputRank = output_rank , name = name ) <nl> - wrap_numpy_arrays ( op ) <nl> - op . rank = op . _ . rank + op . y . rank - 2 <nl> + # wrap_numpy_arrays ( op ) <nl> + op . rank = op . x . rank + op . y . rank - 2 <nl> return op <nl> <nl> def identity ( x , name = None ) : <nl> " " " <nl> - The identity function . It op = s an identical tensor to the input tensor ` x ` : <nl> + The identity function . It returns an identical tensor to the input tensor ` x ` : <nl> <nl> : math : ` pass_tensor ( x ) = x ` <nl> <nl> def identity ( x , name = None ) : <nl> <nl> Args : <nl> x : any : class : ` cntk . graph . ComputationNode ` that outputs a tensor <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Identity <nl> def floor ( arg , name = None ) : <nl> Args : <nl> arg : input tensor <nl> name : the name of the node in the network ( optional ) <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Floor <nl> def ceil ( arg , name = None ) : <nl> Args : <nl> arg : input tensor <nl> name : the name of the node in the network ( optional ) <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Ceil <nl> def round ( arg , name = None ) : <nl> Args : <nl> arg : input tensor <nl> name : the name of the node in the network ( optional ) <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Round <nl> def clip ( x , min_value , max_value , name = None ) : <nl> min_value : the minimum value to clip element values to <nl> max_value : the maximum value to clip element values to <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Clip <nl> def relu ( x , name = None ) : <nl> <nl> Args : <nl> x : any : class : ` cntk . graph . ComputationNode ` that outputs a tensor <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Relu <nl> def sigmoid ( x , name = None ) : <nl> <nl> Args : <nl> x : any : class : ` cntk . graph . ComputationNode ` that outputs a tensor <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Sigmoid <nl> def tanh ( x , name = None ) : <nl> <nl> Args : <nl> x : any : class : ` cntk . graph . ComputationNode ` that outputs a tensor <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Tanh <nl> def softmax ( x , name = None ) : <nl> <nl> Args : <nl> x : any : class : ` cntk . graph . ComputationNode ` that outputs a tensor <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Softmax <nl> def exp ( x , name = None ) : <nl> <nl> Args : <nl> x : any : class : ` cntk . graph . ComputationNode ` that outputs a tensor <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Exp <nl> def log ( x , name = None ) : <nl> <nl> Args : <nl> x : any : class : ` cntk . graph . ComputationNode ` that outputs a tensor <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> <nl> Note : <nl> - CNTK op = s - 85 . 1 for log ( x ) if ` x ` is negative or zero . The reason is that <nl> + CNTK returns - 85 . 1 for log ( x ) if ` x ` is negative or zero . The reason is that <nl> it uses 1e - 37 ( whose natural logarithm is - 85 . 1 ) as the smallest float <nl> number for ` log ` , because this is the only guaranteed precision across <nl> platforms . This will be changed to op = ` NaN ` and ` - inf ` . <nl> def sqrt ( x , name = None ) : <nl> <nl> Args : <nl> x : any : class : ` cntk . graph . ComputationNode ` that outputs a tensor <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> <nl> Note : <nl> - CNTK op = s zero for sqrt of negative nubmers , this will be changed to <nl> + CNTK returns zero for sqrt of negative nubmers , this will be changed to <nl> op = NaN <nl> " " " <nl> from cntk . ops . cntk2 import Sqrt <nl> def square ( x , name = None ) : <nl> <nl> Args : <nl> x : any : class : ` cntk . graph . ComputationNode ` that outputs a tensor <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Square <nl> def abs ( x , name = None ) : <nl> <nl> Args : <nl> x : any : class : ` cntk . graph . ComputationNode ` that outputs a tensor <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Abs <nl> def cond ( flag , value_if_true , value_if_false , name = None ) : <nl> value_if_true : tensor <nl> value_if_false : tensor <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk1 import If <nl> op = If ( flag , value_if_true , value_if_false , name = name ) <nl> wrap_numpy_arrays ( op ) <nl> - op . rank = max ( op . cond . rank ( max ( op . thenVal , op . elseVal ) ) ) <nl> + op . rank = max ( op . cond . rank , max ( op . thenVal . rank , op . elseVal . rank ) ) <nl> return op <nl> <nl> # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> def cond ( flag , value_if_true , value_if_false , name = None ) : <nl> <nl> def future_value ( shape , x , time_step = 1 , default_hidden_activation = 0 . 1 , name = None ) : <nl> " " " <nl> - This function op = s the future value wrt ` x ` . It is most often used when <nl> + This function returns the future value wrt ` x ` . It is most often used when <nl> creating RNNs . The resulting tensor has the same shape as the input but is <nl> the next logical sample . The ` time_step ` parameter is the number of steps <nl> to look into the future and is 1 by default . If there is no future value ( i . e . <nl> def future_value ( shape , x , time_step = 1 , default_hidden_activation = 0 . 1 , name = None <nl> time_step : the number of time steps to look into the future ( default 1 ) <nl> default_hidden_activation : the default value to use when no future value <nl> is available ( default 0 . 1 ) <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> <nl> def future_value ( shape , x , time_step = 1 , default_hidden_activation = 0 . 1 , name = None <nl> <nl> def past_value ( shape , x , time_step = 1 , default_hidden_activation = 0 . 1 , name = None ) : <nl> " " " <nl> - This function op = s the past value wrt ` x ` . It is most often used when <nl> + This function returns the past value wrt ` x ` . It is most often used when <nl> creating RNNs . The resulting tensor has the same shape as the input but is <nl> the previous logical sample . The ` time_step ` parameter is the number of steps <nl> to look into the past and is 1 by default . If there is no past value ( i . e . <nl> def past_value ( shape , x , time_step = 1 , default_hidden_activation = 0 . 1 , name = None ) : <nl> time_step : the number of time steps to look into the past ( default 1 ) <nl> default_hidden_activation : the default value to use when no past value <nl> is available ( default 0 . 1 ) <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> <nl> from cntk . ops . cntk1 import PastValue <nl> op = PastValue ( shape , x , time_step , default_hidden_activation , name = name ) <nl> - wrap_numpy_arrays ( op ) <nl> + wrap_numpy_arrays ( op ) <nl> op . rank = 0 if np . isscalar ( shape ) else len ( shape ) <nl> return op <nl> <nl> def reshape ( x , shape , name = None ) : <nl> x : tensor to be reshaped <nl> shape : a tuple defining the resulting shape <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk1 import NewReshape <nl> def transpose_dimensions ( x , axis1 , axis2 , name = None ) : <nl> x : tensor to be reshaped <nl> axis1 : the axis to swap with axis2 <nl> axis2 : the axis to swap with axis1 <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import TransposeDimensions <nl> def slice ( x , begin_index , end_index , axis = 0 , name = None ) : <nl> See also : <nl> Indexing in NumPy : http : / / docs . scipy . org / doc / numpy / reference / arrays . indexing . html <nl> <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> ' ' ' <nl> from cntk . ops . cntk2 import Slice <nl> def dropout ( x , name = None ) : <nl> <nl> Args : <nl> x : source tensor <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> from cntk . ops . cntk2 import Dropout <nl> def input_numpy ( value , alias = None , dynamic_axis = ' ' , name = None ) : <nl> alias ( str ) : alias to be used in the data file <nl> dynamic_axis ( str ) : whether the tensor has already the data <nl> alias ( str ) : optional the alias to be used when serializing the data into an intermediate file <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> ' ' ' <nl> from . . import utils <nl> - if utils . is_tensor ( value ) : <nl> + if utils . is_tensor ( value ) or utils . is_tensor_list ( value ) : <nl> value = np . asarray ( value ) <nl> if dynamic_axis : <nl> cntk_shape = value [ 0 ] . shape [ 1 : ] <nl> def input ( shape , dynamic_axis = ' ' , name = None ) : <nl> shape ( tuple ) : the shape of the input tensor <nl> dynamic_axis ( str or output of : func : ` cntk . ops . dynamic_axis ` ) : the dynamic axis <nl> name ( str ) : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> <nl> def sparse_input_numpy ( indices , values , shape , alias = None , dynamic_axis = ' ' , name <nl> alias ( str ) : alias to be used in the data file <nl> dynamic_axis ( str ) : whether the tensor has already the data <nl> alias ( str ) : optional the alias to be used when serializing the data into an intermediate file <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> ' ' ' <nl> <nl> def sparse_input ( shape , dynamic_axis = ' ' , name = None ) : <nl> shape ( tuple ) : the shape of the input tensor <nl> dynamic_axis ( str or output of : func : ` cntk . ops . dynamic_axis ` ) : the dynamic axis <nl> name ( str ) : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> <nl> def parameter ( shape = None , value = None , learning_rate_multiplier = 1 . 0 , <nl> init_from_file_path ( str ) : the file that contains the initial tensor value . Used only if ` ` value = None ` ` . <nl> name ( str , optional ) : the name of the node in the network <nl> <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> <nl> def constant ( value , name = None ) : <nl> Args : <nl> value : the tensor constant passed as numpy array <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> <nl> def dynamic_axis ( name = None ) : <nl> <nl> Args : <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> <nl> def reconcile_dynamic_axis ( data_input , layout_input , name = None ) : <nl> data_input : the tensor to have its dynamic axis layout adapted <nl> layout_input : the tensor layout to use for adapting ` data_input ` s layout <nl> name : the name of the node in the network <nl> - op = s : <nl> + returns : <nl> : class : ` cntk . graph . ComputationNode ` <nl> " " " <nl> <nl> mmm a / contrib / Python / cntk / ops / cntk1 . py <nl> ppp b / contrib / Python / cntk / ops / cntk1 . py <nl> def __init__ ( self , cond , thenVal , elseVal , op_name = ' BS . Boolean . If ' , name = None ) : <nl> self . thenVal = thenVal <nl> self . elseVal = elseVal <nl> self . params_with_defaults = [ ] <nl> + self . inputs = [ ' cond ' , ' thenVal ' , ' elseVal ' ] <nl> <nl> class Sign ( ComputationNode ) : <nl> def __init__ ( self , x , op_name = ' Sign ' , name = None ) : <nl> mmm a / contrib / Python / cntk / ops / tests / linear_test . py <nl> ppp b / contrib / Python / cntk / ops / tests / linear_test . py <nl> def numpy_op ( x ) : <nl> <nl> <nl> TIMES_PAIRS = [ <nl> - ( [ [ 30 . ] ] , [ [ 10 . ] ] ) , <nl> - ( [ [ 1 . 5 , 2 . 1 ] ] , [ [ 10 . ] , [ 20 . ] ] ) , <nl> + # ( [ [ 30 . ] ] , [ [ 10 . ] ] ) , <nl> + # ( [ [ 1 . 5 , 2 . 1 ] ] , [ [ 10 . ] , [ 20 . ] ] ) , <nl> ( [ [ 100 . , 200 . ] , [ 300 . , 400 . ] ] , [ [ 10 . ] , [ 20 . ] ] ) , <nl> ] <nl> <nl> @ pytest . mark . parametrize ( " left_operand , right_operand " , TIMES_PAIRS ) <nl> def test_op_times ( left_operand , right_operand , device_id , precision , <nl> left_matrix_type , right_matrix_type ) : <nl> - if left_matrix_type = = ' sparse ' : <nl> - pytest . skip ( ' first operator of times ( ) has to be dense ' ) <nl> + if right_matrix_type = = ' sparse ' : <nl> + pytest . skip ( ' second operator of times ( ) has to be dense ' ) <nl> <nl> dt = PRECISION_TO_TYPE [ precision ] <nl> # Forward pass test <nl> def test_op_times ( left_operand , right_operand , device_id , precision , <nl> # the first for sequences ( length = 1 , since we have dynamic_axis = ' ' ) <nl> # the second for batch of one sample <nl> expected = [ [ np . dot ( AA ( left_operand , dtype = dt ) , AA ( right_operand , dtype = dt ) ) ] ] <nl> - <nl> - a = I ( [ left_operand ] ) <nl> - <nl> - if right_matrix_type = = ' sparse ' : <nl> - b = SI ( * batch_dense_to_sparse ( [ right_operand ] ) ) <nl> + <nl> + if left_matrix_type = = ' sparse ' : <nl> + a = SI ( * batch_dense_to_sparse ( [ left_operand ] ) ) <nl> else : <nl> - b = I ( [ right_operand ] ) <nl> + a = I ( [ left_operand ] ) <nl> + <nl> + b = I ( [ right_operand ] ) <nl> <nl> from cntk . ops import times , constant <nl> left_as_input = times ( a , constant ( right_operand ) ) <nl> mmm a / contrib / Python / cntk / utils / __init__ . py <nl> ppp b / contrib / Python / cntk / utils / __init__ . py <nl> def tensors_to_text_format ( sample_idx , alias_tensor_map ) : <nl> <nl> return ' \ n ' . join ( lines ) <nl> <nl> - <nl> - <nl> - <nl> def is_tensor ( data ) : <nl> ' ' ' <nl> Checks whether the data is a tensor , i . e . whether it is a NumPy array or a <nl> def is_tensor ( data ) : <nl> <nl> return True <nl> <nl> + def is_tensor_list ( data ) : <nl> + ' ' ' <nl> + Checks whether the data is a CNTK sequence , which is expressed in Python as <nl> + a list of varying sized NumPy objects . <nl> + ' ' ' <nl> + is_list = isinstance ( data , list ) <nl> + return is_list and len ( data ) > 0 and isinstance ( data [ 0 ] , np . ndarray ) <nl> + <nl> def get_temp_filename ( directory = None ) : <nl> ' ' ' <nl> Create and return a temporary filename . <nl> def get_temp_filename ( directory = None ) : <nl> return tf . name <nl> <nl> def wrap_numpy_arrays ( node ) : <nl> + ' ' ' <nl> + for a given computation node , wrapes its tensor inputs that are numpy arrays <nl> + into input and constant nodes <nl> + <nl> + Args : <nl> + node ( : class : ` cntk . graph . ComputationNode ` ) : the computation node that will <nl> + get its inputs wraped <nl> + ' ' ' <nl> from . . graph import ComputationNode , _InputComputationNodeBase <nl> from . . ops import input_numpy , constant <nl> <nl> def wrap_numpy_arrays ( node ) : <nl> for p in node . params : <nl> if p in node . inputs : <nl> val = getattr ( node , p ) <nl> - if not isinstance ( val , ComputationNode ) : <nl> + if not ( isinstance ( val , ComputationNode ) or isinstance ( val , str ) ) : <nl> # One param needs to be an Input ( ) node . This will be fixed in <nl> # CNTK soon , so that we can remove this workaround and evaluate a <nl> # network with no inputs . <nl> mmm a / contrib / Python / cntk / utils / tests / utils_test . py <nl> ppp b / contrib / Python / cntk / utils / tests / utils_test . py <nl> def test_tensor_conversion_dense ( idx , alias_tensor_map , expected ) : <nl> def test_is_tensor ( data , expected ) : <nl> assert is_tensor ( data ) = = expected <nl> <nl> + @ pytest . mark . parametrize ( " data , expected " , [ <nl> + ( [ ] , False ) , <nl> + ( [ 1 ] , False ) , <nl> + ( [ [ 1 , 2 ] ] , False ) , <nl> + ( [ [ ] ] , False ) , <nl> + ( [ [ AA ( [ 1 , 2 ] ) ] ] , False ) , <nl> + ( [ AA ( [ 1 , 2 ] ) ] , True ) , <nl> + ( [ AA ( [ 1 , 2 ] ) , AA ( [ ] ) ] , True ) , <nl> + ] ) <nl> + def test_is_tensor_list ( data , expected ) : <nl> + assert is_tensor_list ( data ) = = expected <nl>
adjust some unit tests
microsoft/CNTK
85e5bceb4d01d1461bcd7abc2dc2d57e32a37651
2016-06-02T08:35:01Z
mmm a / cocoa / NSArray . cpp <nl> ppp b / cocoa / NSArray . cpp <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> mmm a / cocoa / NSAutoreleasePool . cpp <nl> ppp b / cocoa / NSAutoreleasePool . cpp <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> mmm a / cocoa / NSData . cpp <nl> ppp b / cocoa / NSData . cpp <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> + <nl> # include " NSData . h " <nl> <nl> NSData : : NSData ( void ) <nl> NSData : : NSData ( void ) <nl> NSData : : ~ NSData ( void ) <nl> { <nl> } <nl> + <nl> mmm a / cocoa / NSLock . cpp <nl> ppp b / cocoa / NSLock . cpp <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> + <nl> mmm a / cocoa / NSObject . cpp <nl> ppp b / cocoa / NSObject . cpp <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> + <nl> # include " NSObject . h " <nl> <nl> NSObject : : NSObject ( void ) <nl> mmm a / cocoa / NSSet . cpp <nl> ppp b / cocoa / NSSet . cpp <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> mmm a / cocoa / NSString . cpp <nl> ppp b / cocoa / NSString . cpp <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> mmm a / cocoa / NSZone . cpp <nl> ppp b / cocoa / NSZone . cpp <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> mmm a / include / CCCamera . h <nl> ppp b / include / CCCamera . h <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> # ifndef __CCCAMERA_H__ <nl> # define __CCCAMERA_H__ <nl> <nl> mmm a / include / CCConfiguration . h <nl> ppp b / include / CCConfiguration . h <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> # ifndef __CCCONFIGURATION_H__ <nl> # define __CCCONFIGURATION_H__ <nl> <nl> <nl> # include < GLES / gl . h > <nl> # include < string > <nl> <nl> - / * * <nl> - CCConfiguration contains some openGL variables <nl> - @ since v0 . 99 . 0 <nl> + / * * <nl> + CCConfiguration contains some openGL variables <nl> + @ since v0 . 99 . 0 <nl> * / <nl> class CCConfiguration : public NSObject <nl> { <nl> class CCConfiguration : public NSObject <nl> / / OpenGL Max Modelview Stack Depth <nl> INT32 getMaxModelviewStackDepth ( void ) ; <nl> <nl> - / * * Whether or not the GPU supports NPOT ( Non Power Of Two ) textures . <nl> - NPOT textures have the following limitations : <nl> - - They can ' t have mipmaps <nl> - - They only accept GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_ { S , T } <nl> - <nl> - @ since v0 . 99 . 2 <nl> + / * * Whether or not the GPU supports NPOT ( Non Power Of Two ) textures . <nl> + NPOT textures have the following limitations : <nl> + - They can ' t have mipmaps <nl> + - They only accept GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_ { S , T } <nl> + <nl> + @ since v0 . 99 . 2 <nl> * / <nl> BOOL isSupportsNPOT ( void ) ; <nl> <nl> / / Whether or not PVR Texture Compressed is supported <nl> BOOL isSupportsPVRTC ( void ) ; <nl> <nl> - / * * Whether or not BGRA8888 textures are supported . <nl> - @ since v0 . 99 . 2 <nl> + / * * Whether or not BGRA8888 textures are supported . <nl> + @ since v0 . 99 . 2 <nl> * / <nl> BOOL isSupportsBGRA8888 ( void ) ; <nl> <nl> - / * * Whether or not glDiscardFramebufferEXT is supported <nl> - @ since v0 . 99 . 2 <nl> + / * * Whether or not glDiscardFramebufferEXT is supported <nl> + @ since v0 . 99 . 2 <nl> * / <nl> BOOL isSupportsDiscardFramebuffer ( void ) ; <nl> <nl> mmm a / include / CCDrawingPrimitives . h <nl> ppp b / include / CCDrawingPrimitives . h <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> + <nl> # ifndef __CCDRAWING_PRIMITIVES__ <nl> # define __CCDRAWING_PRIMITIVES__ <nl> <nl> - # ifdef __cplusplus <nl> - extern " C " { <nl> - # endif <nl> - <nl> - / * * <nl> - @ file <nl> - Drawing OpenGL ES primitives . <nl> - - drawPoint <nl> - - drawLine <nl> - - drawPoly <nl> - - drawCircle <nl> - <nl> - You can change the color , width and other property by calling the <nl> - glColor4ub ( ) , glLineWitdh ( ) , glPointSize ( ) . <nl> - <nl> - @ warning These functions draws the Line , Point , Polygon , immediately . They aren ' t batched . If you are going to make a game that depends on these primitives , I suggest creating a batch . <nl> - * / <nl> - <nl> - # include " CGGeometry . h " / / for CGPoint <nl> - # include " Cocos2dTypes . h " <nl> - <nl> - / * * draws a point given x and y coordinate * / <nl> - void ccDrawPoint ( CGPoint point ) ; <nl> - <nl> - / * * draws an array of points . <nl> - @ since v0 . 7 . 2 <nl> - * / <nl> - void ccDrawPoints ( CGPoint * points , unsigned int numberOfPoints ) ; <nl> - <nl> - / * * draws a line given the origin and destination point * / <nl> - void ccDrawLine ( CGPoint origin , CGPoint destination ) ; <nl> - <nl> - / * * draws a poligon given a pointer to CGPoint coordiantes and the number of vertices . The polygon can be closed or open <nl> - * / <nl> - void ccDrawPoly ( CGPoint * vertices , int numOfVertices , BOOL closePolygon ) ; <nl> - <nl> - / * * draws a circle given the center , radius and number of segments . * / <nl> - void ccDrawCircle ( CGPoint center , float radius , float angle , int segments , BOOL drawLineToCenter ) ; <nl> - <nl> - / * * draws a quad bezier path <nl> - @ since v0 . 8 <nl> - * / <nl> - void ccDrawQuadBezier ( CGPoint origin , CGPoint control , CGPoint destination , int segments ) ; <nl> - <nl> - / * * draws a cubic bezier path <nl> - @ since v0 . 8 <nl> - * / <nl> - void ccDrawCubicBezier ( CGPoint origin , CGPoint control1 , CGPoint control2 , CGPoint destination , int segments ) ; <nl> - <nl> - # ifdef __cplusplus <nl> - } <nl> + # ifdef __cplusplus <nl> + extern " C " { <nl> + # endif <nl> + <nl> + / * * <nl> + @ file <nl> + Drawing OpenGL ES primitives . <nl> + - drawPoint <nl> + - drawLine <nl> + - drawPoly <nl> + - drawCircle <nl> + <nl> + You can change the color , width and other property by calling the <nl> + glColor4ub ( ) , glLineWitdh ( ) , glPointSize ( ) . <nl> + <nl> + @ warning These functions draws the Line , Point , Polygon , immediately . They aren ' t batched . If you are going to make a game that depends on these primitives , I suggest creating a batch . <nl> + * / <nl> + <nl> + # include " CGGeometry . h " / / for CGPoint <nl> + # include " Cocos2dTypes . h " <nl> + <nl> + / * * draws a point given x and y coordinate * / <nl> + void ccDrawPoint ( CGPoint point ) ; <nl> + <nl> + / * * draws an array of points . <nl> + @ since v0 . 7 . 2 <nl> + * / <nl> + void ccDrawPoints ( CGPoint * points , unsigned int numberOfPoints ) ; <nl> + <nl> + / * * draws a line given the origin and destination point * / <nl> + void ccDrawLine ( CGPoint origin , CGPoint destination ) ; <nl> + <nl> + / * * draws a poligon given a pointer to CGPoint coordiantes and the number of vertices . The polygon can be closed or open <nl> + * / <nl> + void ccDrawPoly ( CGPoint * vertices , int numOfVertices , BOOL closePolygon ) ; <nl> + <nl> + / * * draws a circle given the center , radius and number of segments . * / <nl> + void ccDrawCircle ( CGPoint center , float radius , float angle , int segments , BOOL drawLineToCenter ) ; <nl> + <nl> + / * * draws a quad bezier path <nl> + @ since v0 . 8 <nl> + * / <nl> + void ccDrawQuadBezier ( CGPoint origin , CGPoint control , CGPoint destination , int segments ) ; <nl> + <nl> + / * * draws a cubic bezier path <nl> + @ since v0 . 8 <nl> + * / <nl> + void ccDrawCubicBezier ( CGPoint origin , CGPoint control1 , CGPoint control2 , CGPoint destination , int segments ) ; <nl> + <nl> + # ifdef __cplusplus <nl> + } <nl> # endif <nl> <nl> # endif / / __CCDRAWING_PRIMITIVES__ <nl> mmm a / include / CCProtocols . h <nl> ppp b / include / CCProtocols . h <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> # ifndef __CCPROTOCOLS_H__ <nl> # define __CCPROTOCOLS_H__ <nl> <nl> <nl> / / CC RGBA protocol <nl> class CCRGBAProtocol <nl> { <nl> - / * * sets Color <nl> - @ since v0 . 8 <nl> - * / <nl> - virtual void setColor ( ccColor3B color ) = 0 ; <nl> - <nl> - / * * returns the color <nl> - @ since v0 . 8 <nl> - * / <nl> - virtual ccColor3B color ( void ) = 0 ; <nl> - <nl> - / / returns the opacity <nl> - virtual GLubyte opacity ( void ) = 0 ; <nl> - <nl> - / * * sets the opacity . <nl> - @ warning If the the texture has premultiplied alpha then , the R , G and B channels will be modifed . <nl> - Values goes from 0 to 255 , where 255 means fully opaque . <nl> - * / <nl> - virtual void setOpacity ( GLubyte opacity ) = 0 ; <nl> - <nl> - / / optional <nl> - <nl> - / * * sets the premultipliedAlphaOpacity property . <nl> - If set to NO then opacity will be applied as : glColor ( R , G , B , opacity ) ; <nl> - If set to YES then oapcity will be applied as : glColor ( opacity , opacity , opacity , opacity ) ; <nl> - Textures with premultiplied alpha will have this property by default on YES . Otherwise the default value is NO <nl> - @ since v0 . 8 <nl> - * / <nl> - virtual void setOpacityModifyRGB ( BOOL bValue ) { } <nl> - <nl> - / * * returns whether or not the opacity will be applied using glColor ( R , G , B , opacity ) or glColor ( opacity , opacity , opacity , opacity ) ; <nl> - @ since v0 . 8 <nl> + / * * sets Color <nl> + @ since v0 . 8 <nl> + * / <nl> + virtual void setColor ( ccColor3B color ) = 0 ; <nl> + <nl> + / * * returns the color <nl> + @ since v0 . 8 <nl> + * / <nl> + virtual ccColor3B color ( void ) = 0 ; <nl> + <nl> + / / returns the opacity <nl> + virtual GLubyte opacity ( void ) = 0 ; <nl> + <nl> + / * * sets the opacity . <nl> + @ warning If the the texture has premultiplied alpha then , the R , G and B channels will be modifed . <nl> + Values goes from 0 to 255 , where 255 means fully opaque . <nl> + * / <nl> + virtual void setOpacity ( GLubyte opacity ) = 0 ; <nl> + <nl> + / / optional <nl> + <nl> + / * * sets the premultipliedAlphaOpacity property . <nl> + If set to NO then opacity will be applied as : glColor ( R , G , B , opacity ) ; <nl> + If set to YES then oapcity will be applied as : glColor ( opacity , opacity , opacity , opacity ) ; <nl> + Textures with premultiplied alpha will have this property by default on YES . Otherwise the default value is NO <nl> + @ since v0 . 8 <nl> + * / <nl> + virtual void setOpacityModifyRGB ( BOOL bValue ) { } <nl> + <nl> + / * * returns whether or not the opacity will be applied using glColor ( R , G , B , opacity ) or glColor ( opacity , opacity , opacity , opacity ) ; <nl> + @ since v0 . 8 <nl> * / <nl> virtual BOOL doesOpacityModifyRGB ( void ) = { return FALSE ; } <nl> } <nl> <nl> - / * * <nl> - You can specify the blending fuction . <nl> - @ since v0 . 99 . 0 <nl> + / * * <nl> + You can specify the blending fuction . <nl> + @ since v0 . 99 . 0 <nl> * / <nl> class CCBlendProtocol <nl> { <nl> class CCBlendProtocol <nl> virtual ccBlendFunc blendFunc ( void ) ; <nl> } <nl> <nl> - / * * CCNode objects that uses a Texture2D to render the images . <nl> - The texture can have a blending function . <nl> - If the texture has alpha premultiplied the default blending function is : <nl> - src = GL_ONE dst = GL_ONE_MINUS_SRC_ALPHA <nl> - else <nl> - src = GL_SRC_ALPHA dst = GL_ONE_MINUS_SRC_ALPHA <nl> - But you can change the blending funtion at any time . <nl> - @ since v0 . 8 . 0 <nl> + / * * CCNode objects that uses a Texture2D to render the images . <nl> + The texture can have a blending function . <nl> + If the texture has alpha premultiplied the default blending function is : <nl> + src = GL_ONE dst = GL_ONE_MINUS_SRC_ALPHA <nl> + else <nl> + src = GL_SRC_ALPHA dst = GL_ONE_MINUS_SRC_ALPHA <nl> + But you can change the blending funtion at any time . <nl> + @ since v0 . 8 . 0 <nl> * / <nl> class CCTextureProtocol : public CCBlendProtocol <nl> { <nl> class CCLabelProtocol <nl> virtual void setString ( std : : string & label ) = 0 ; <nl> <nl> / / optional <nl> - / * * sets a new label using a CString . <nl> - It is faster than setString since it doesn ' t require to alloc / retain / release an NString object . <nl> - @ since v0 . 99 . 0 <nl> + / * * sets a new label using a CString . <nl> + It is faster than setString since it doesn ' t require to alloc / retain / release an NString object . <nl> + @ since v0 . 99 . 0 <nl> * / <nl> virtual void setCString ( char * pLabel ) { } <nl> } <nl> mmm a / include / CGGeometry . h <nl> ppp b / include / CGGeometry . h <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> # ifndef __COCOS_CGGEMETRY_H__ <nl> # define __COCOS_CGGEMETRY_H__ <nl> <nl> mmm a / include / Cocos2dTypes . h <nl> ppp b / include / Cocos2dTypes . h <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> # ifndef __SUPPORT_COCOS2D_TYPES_H__ <nl> # define __SUPPORT_COCOS2D_TYPES_H__ <nl> <nl> mmm a / include / NSArray . h <nl> ppp b / include / NSArray . h <nl> <nl> - # pragma once <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> + # ifndef __NSARRAY_H__ <nl> + # define __NSARRAY_H__ <nl> <nl> class NSArray <nl> { <nl> class NSArray <nl> NSArray ( void ) ; <nl> ~ NSArray ( void ) ; <nl> } ; <nl> + <nl> + # endif / / __NSARRAY_H__ <nl> + <nl> mmm a / include / NSAutoreleasePool . h <nl> ppp b / include / NSAutoreleasePool . h <nl> <nl> - # pragma once <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> + # ifndef __NS_AUTO_RELEASE_POOL_H__ <nl> + # define __NS_AUTO_RELEASE_POOL_H__ <nl> <nl> class NSAutoreleasePool <nl> { <nl> class NSAutoreleasePool <nl> NSAutoreleasePool ( void ) ; <nl> ~ NSAutoreleasePool ( void ) ; <nl> } ; <nl> + <nl> + # endif / / __NS_AUTO_RELEASE_POOL_H__ <nl> mmm a / include / NSData . h <nl> ppp b / include / NSData . h <nl> <nl> - # pragma once <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> + # ifndef __NSDATA_H__ <nl> + # define __NSDATA_H__ <nl> <nl> class NSData <nl> { <nl> class NSData <nl> NSData ( void ) ; <nl> ~ NSData ( void ) ; <nl> } ; <nl> + <nl> + # endif / / __NSDATA_H__ <nl> + <nl> mmm a / include / NSLock . h <nl> ppp b / include / NSLock . h <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> + # ifndef __NSLOCK_H__ <nl> + # define __NSLOCK_H__ <nl> + <nl> + # endif / / __NSLOCK_H__ <nl> + <nl> mmm a / include / NSObject . h <nl> ppp b / include / NSObject . h <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> # ifndef __COCOA_NSOBJECT_H__ <nl> # define __COCOA_NSOBJECT_H__ <nl> <nl> class NSString ; <nl> class NSCopying <nl> { <nl> public : <nl> - virtual NSObject * copyWithZone ( NSZone * zone ) ; <nl> + virtual NSObject * copyWithZone ( NSZone * pZone ) ; <nl> } ; <nl> <nl> class NSObject : public NSCopying <nl> { <nl> protected : <nl> / / object id <nl> - UINT32 m_nID ; <nl> + UINT32 m_uID ; <nl> / / count of refrence <nl> - UINT32 m_nRefrence ; <nl> + UINT32 m_uRefrence ; <nl> / / is the object autoreleased <nl> BOOL m_bManaged ; <nl> public : <nl> mmm a / include / NSSet . h <nl> ppp b / include / NSSet . h <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> + # ifndef __NS_SET_H__ <nl> + # define __NS_SET_H__ <nl> + <nl> + # endif / / __NS_SET_H__ <nl> + <nl> mmm a / include / NSString . h <nl> ppp b / include / NSString . h <nl> <nl> - # pragma once <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> + # ifndef __NS_STRING_H__ <nl> + # define __NS_STRING_H__ <nl> <nl> class NSString <nl> { <nl> class NSString <nl> NSString ( void ) ; <nl> ~ NSString ( void ) ; <nl> } ; <nl> + <nl> + # endif / / __NS_STRING_H__ <nl> + <nl> mmm a / include / NSZone . h <nl> ppp b / include / NSZone . h <nl> <nl> - # pragma once <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> + # ifndef __NS_ZONE_H__ <nl> + # define __NS_ZONE_H__ <nl> <nl> class NSZone <nl> { <nl> class NSZone <nl> NSZone ( void ) ; <nl> ~ NSZone ( void ) ; <nl> } ; <nl> + <nl> + # endif / / __NS_ZONE_H__ <nl> mmm a / include / ccConfig . h <nl> ppp b / include / ccConfig . h <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> # ifndef __CCCONFIG_H__ <nl> # define __CCCONFIG_H__ <nl> <nl> - / * * @ def CC_FONT_LABEL_SUPPORT <nl> - If enabled , FontLabel will be used to render . ttf files . <nl> - If the . ttf file is not found , then it will use the standard UIFont class <nl> - If disabled , the standard UIFont class will be used . <nl> - <nl> - To enable set it to a value different than 0 . Enabled by default . <nl> - * / <nl> - # define CC_FONT_LABEL_SUPPORT 1 <nl> - <nl> - / * * @ def CC_DIRECTOR_FAST_FPS <nl> - If enabled , then the FPS will be drawn using CCLabelAtlas ( fast rendering ) . <nl> - You will need to add the fps_images . png to your project . <nl> - If disabled , the FPS will be rendered using CCLabel ( slow rendering ) <nl> - <nl> - To enable set it to a value different than 0 . Enabled by default . <nl> - * / <nl> - # define CC_DIRECTOR_FAST_FPS 1 <nl> - <nl> - / * * @ def CC_DIRECTOR_FPS_INTERVAL <nl> - Senconds between FPS updates . <nl> - 0 . 5 seconds , means that the FPS number will be updated every 0 . 5 seconds . <nl> - Having a bigger number means a more reliable FPS <nl> - <nl> - Default value : 0 . 1f <nl> - * / <nl> - # define CC_DIRECTOR_FPS_INTERVAL ( 0 . 1f ) <nl> - <nl> - / * * @ def CC_DIRECTOR_DISPATCH_FAST_EVENTS <nl> - If enabled , and only when it is used with CCFastDirector , the main loop will wait 0 . 04 seconds to <nl> - dispatch all the events , even if there are not events to dispatch . <nl> - If your game uses lot ' s of events ( eg : touches ) it might be a good idea to enable this feature . <nl> - Otherwise , it is safe to leave it disabled . <nl> - <nl> - To enable set it to a value different than 0 . Disabled by default . <nl> - <nl> - @ warning This feature is experimental <nl> - * / <nl> - # define CC_DIRECTOR_DISPATCH_FAST_EVENTS 0 <nl> - <nl> - / * * @ def CC_COCOSNODE_RENDER_SUBPIXEL <nl> - If enabled , the CCNode objects ( CCSprite , CCLabel , etc ) will be able to render in subpixels . <nl> - If disabled , integer pixels will be used . <nl> - <nl> - To enable set it to a value different than 0 . Enabled by default . <nl> - * / <nl> - # define CC_COCOSNODE_RENDER_SUBPIXEL 1 <nl> - <nl> - / * * @ def CC_SPRITESHEET_RENDER_SUBPIXEL <nl> - If enabled , the CCSprite objects rendered with CCSpriteSheet will be able to render in subpixels . <nl> - If disabled , integer pixels will be used . <nl> - <nl> - To enable set it to a value different than 0 . Enabled by default . <nl> - * / <nl> - # define CC_SPRITESHEET_RENDER_SUBPIXEL 1 <nl> - <nl> - / * * @ def CC_TEXTURE_ATLAS_USES_VBO <nl> - If enabled , the CCTextureAtlas object will use VBO instead of vertex list ( VBO is recommended by Apple ) <nl> - <nl> - To enable set it to a value different than 0 . Enabled by default . <nl> - <nl> - @ since v0 . 99 . 0 <nl> - * / <nl> - # define CC_TEXTURE_ATLAS_USES_VBO 1 <nl> - <nl> - / * * @ def CC_NODE_TRANSFORM_USING_AFFINE_MATRIX <nl> - If enabled , CCNode will transform the nodes using a cached Affine matrix . <nl> - If disabled , the node will be transformed using glTranslate , glRotate , glScale . <nl> - Using the affine matrix only requires 2 GL calls . <nl> - Using the translate / rotate / scale requires 5 GL calls . <nl> - But computing the Affine matrix is relative expensive . <nl> - But according to performance tests , Affine matrix performs better . <nl> - This parameter doesn ' t affect SpriteSheet nodes . <nl> - <nl> - To enable set it to a value different than 0 . Enabled by default . <nl> - <nl> - * / <nl> - # define CC_NODE_TRANSFORM_USING_AFFINE_MATRIX 1 <nl> - <nl> - / * * @ def CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP <nl> - Use GL_TRIANGLE_STRIP instead of GL_TRIANGLES when rendering the texture atlas . <nl> - It seems it is the recommend way , but it is much slower , so , enable it at your own risk <nl> - <nl> - To enable set it to a value different than 0 . Disabled by default . <nl> - <nl> - * / <nl> - # define CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP 0 <nl> - <nl> - / * * @ def CC_TEXTURE_NPOT_SUPPORT <nl> - If enabled , NPOT textures will be used where available . Only 3rd gen ( and newer ) devices support NPOT textures . <nl> - NPOT textures have the following limitations : <nl> - - They can ' t have mipmaps <nl> - - They only accept GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_ { S , T } <nl> - <nl> - To enable set it to a value different than 0 . Disabled by default . <nl> - <nl> - @ since v0 . 99 . 2 <nl> - * / <nl> - # define CC_TEXTURE_NPOT_SUPPORT 0 <nl> - <nl> - / * * @ def CC_SPRITE_DEBUG_DRAW <nl> - If enabled , all subclasses of CCSprite will draw a bounding box <nl> - Useful for debugging purposes only . It is recommened to leave it disabled . <nl> - <nl> - To enable set it to a value different than 0 . Disabled by default . <nl> - * / <nl> - # define CC_SPRITE_DEBUG_DRAW 0 <nl> - <nl> - / * * @ def CC_SPRITESHEET_DEBUG_DRAW <nl> - If enabled , all subclasses of CCSprite that are rendered using an CCSpriteSheet draw a bounding box . <nl> - Useful for debugging purposes only . It is recommened to leave it disabled . <nl> - <nl> - To enable set it to a value different than 0 . Disabled by default . <nl> - * / <nl> - # define CC_SPRITESHEET_DEBUG_DRAW 0 <nl> - <nl> - / * * @ def CC_BITMAPFONTATLAS_DEBUG_DRAW <nl> - If enabled , all subclasses of BitmapFontAtlas will draw a bounding box <nl> - Useful for debugging purposes only . It is recommened to leave it disabled . <nl> - <nl> - To enable set it to a value different than 0 . Disabled by default . <nl> - * / <nl> - # define CC_BITMAPFONTATLAS_DEBUG_DRAW 0 <nl> - <nl> - / * * @ def CC_LABELATLAS_DEBUG_DRAW <nl> - If enabled , all subclasses of LabeltAtlas will draw a bounding box <nl> - Useful for debugging purposes only . It is recommened to leave it disabled . <nl> - <nl> - To enable set it to a value different than 0 . Disabled by default . <nl> - * / <nl> - # define CC_LABELATLAS_DEBUG_DRAW 0 <nl> - <nl> - / * * @ def CC_ENABLE_PROFILERS <nl> - If enabled , will activate various profilers withing cocos2d . This statistical data will be output to the console <nl> - once per second showing average time ( in milliseconds ) required to execute the specific routine ( s ) . <nl> - Useful for debugging purposes only . It is recommened to leave it disabled . <nl> - <nl> - To enable set it to a value different than 0 . Disabled by default . <nl> - * / <nl> - # define CC_ENABLE_PROFILERS 0 <nl> - <nl> - / * * @ def CC_COMPATIBILITY_WITH_0_8 <nl> - Enable it if you want to support v0 . 8 compatbility . <nl> - Basically , classes without namespaces will work . <nl> - It is recommended to disable compatibility once you have migrated your game to v0 . 9 to avoid class name polution <nl> - <nl> - To enable set it to a value different than 0 . Disabled by default . <nl> - * / <nl> + / * * @ def CC_FONT_LABEL_SUPPORT <nl> + If enabled , FontLabel will be used to render . ttf files . <nl> + If the . ttf file is not found , then it will use the standard UIFont class <nl> + If disabled , the standard UIFont class will be used . <nl> + <nl> + To enable set it to a value different than 0 . Enabled by default . <nl> + * / <nl> + # define CC_FONT_LABEL_SUPPORT 1 <nl> + <nl> + / * * @ def CC_DIRECTOR_FAST_FPS <nl> + If enabled , then the FPS will be drawn using CCLabelAtlas ( fast rendering ) . <nl> + You will need to add the fps_images . png to your project . <nl> + If disabled , the FPS will be rendered using CCLabel ( slow rendering ) <nl> + <nl> + To enable set it to a value different than 0 . Enabled by default . <nl> + * / <nl> + # define CC_DIRECTOR_FAST_FPS 1 <nl> + <nl> + / * * @ def CC_DIRECTOR_FPS_INTERVAL <nl> + Senconds between FPS updates . <nl> + 0 . 5 seconds , means that the FPS number will be updated every 0 . 5 seconds . <nl> + Having a bigger number means a more reliable FPS <nl> + <nl> + Default value : 0 . 1f <nl> + * / <nl> + # define CC_DIRECTOR_FPS_INTERVAL ( 0 . 1f ) <nl> + <nl> + / * * @ def CC_DIRECTOR_DISPATCH_FAST_EVENTS <nl> + If enabled , and only when it is used with CCFastDirector , the main loop will wait 0 . 04 seconds to <nl> + dispatch all the events , even if there are not events to dispatch . <nl> + If your game uses lot ' s of events ( eg : touches ) it might be a good idea to enable this feature . <nl> + Otherwise , it is safe to leave it disabled . <nl> + <nl> + To enable set it to a value different than 0 . Disabled by default . <nl> + <nl> + @ warning This feature is experimental <nl> + * / <nl> + # define CC_DIRECTOR_DISPATCH_FAST_EVENTS 0 <nl> + <nl> + / * * @ def CC_COCOSNODE_RENDER_SUBPIXEL <nl> + If enabled , the CCNode objects ( CCSprite , CCLabel , etc ) will be able to render in subpixels . <nl> + If disabled , integer pixels will be used . <nl> + <nl> + To enable set it to a value different than 0 . Enabled by default . <nl> + * / <nl> + # define CC_COCOSNODE_RENDER_SUBPIXEL 1 <nl> + <nl> + / * * @ def CC_SPRITESHEET_RENDER_SUBPIXEL <nl> + If enabled , the CCSprite objects rendered with CCSpriteSheet will be able to render in subpixels . <nl> + If disabled , integer pixels will be used . <nl> + <nl> + To enable set it to a value different than 0 . Enabled by default . <nl> + * / <nl> + # define CC_SPRITESHEET_RENDER_SUBPIXEL 1 <nl> + <nl> + / * * @ def CC_TEXTURE_ATLAS_USES_VBO <nl> + If enabled , the CCTextureAtlas object will use VBO instead of vertex list ( VBO is recommended by Apple ) <nl> + <nl> + To enable set it to a value different than 0 . Enabled by default . <nl> + <nl> + @ since v0 . 99 . 0 <nl> + * / <nl> + # define CC_TEXTURE_ATLAS_USES_VBO 1 <nl> + <nl> + / * * @ def CC_NODE_TRANSFORM_USING_AFFINE_MATRIX <nl> + If enabled , CCNode will transform the nodes using a cached Affine matrix . <nl> + If disabled , the node will be transformed using glTranslate , glRotate , glScale . <nl> + Using the affine matrix only requires 2 GL calls . <nl> + Using the translate / rotate / scale requires 5 GL calls . <nl> + But computing the Affine matrix is relative expensive . <nl> + But according to performance tests , Affine matrix performs better . <nl> + This parameter doesn ' t affect SpriteSheet nodes . <nl> + <nl> + To enable set it to a value different than 0 . Enabled by default . <nl> + <nl> + * / <nl> + # define CC_NODE_TRANSFORM_USING_AFFINE_MATRIX 1 <nl> + <nl> + / * * @ def CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP <nl> + Use GL_TRIANGLE_STRIP instead of GL_TRIANGLES when rendering the texture atlas . <nl> + It seems it is the recommend way , but it is much slower , so , enable it at your own risk <nl> + <nl> + To enable set it to a value different than 0 . Disabled by default . <nl> + <nl> + * / <nl> + # define CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP 0 <nl> + <nl> + / * * @ def CC_TEXTURE_NPOT_SUPPORT <nl> + If enabled , NPOT textures will be used where available . Only 3rd gen ( and newer ) devices support NPOT textures . <nl> + NPOT textures have the following limitations : <nl> + - They can ' t have mipmaps <nl> + - They only accept GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_ { S , T } <nl> + <nl> + To enable set it to a value different than 0 . Disabled by default . <nl> + <nl> + @ since v0 . 99 . 2 <nl> + * / <nl> + # define CC_TEXTURE_NPOT_SUPPORT 0 <nl> + <nl> + / * * @ def CC_SPRITE_DEBUG_DRAW <nl> + If enabled , all subclasses of CCSprite will draw a bounding box <nl> + Useful for debugging purposes only . It is recommened to leave it disabled . <nl> + <nl> + To enable set it to a value different than 0 . Disabled by default . <nl> + * / <nl> + # define CC_SPRITE_DEBUG_DRAW 0 <nl> + <nl> + / * * @ def CC_SPRITESHEET_DEBUG_DRAW <nl> + If enabled , all subclasses of CCSprite that are rendered using an CCSpriteSheet draw a bounding box . <nl> + Useful for debugging purposes only . It is recommened to leave it disabled . <nl> + <nl> + To enable set it to a value different than 0 . Disabled by default . <nl> + * / <nl> + # define CC_SPRITESHEET_DEBUG_DRAW 0 <nl> + <nl> + / * * @ def CC_BITMAPFONTATLAS_DEBUG_DRAW <nl> + If enabled , all subclasses of BitmapFontAtlas will draw a bounding box <nl> + Useful for debugging purposes only . It is recommened to leave it disabled . <nl> + <nl> + To enable set it to a value different than 0 . Disabled by default . <nl> + * / <nl> + # define CC_BITMAPFONTATLAS_DEBUG_DRAW 0 <nl> + <nl> + / * * @ def CC_LABELATLAS_DEBUG_DRAW <nl> + If enabled , all subclasses of LabeltAtlas will draw a bounding box <nl> + Useful for debugging purposes only . It is recommened to leave it disabled . <nl> + <nl> + To enable set it to a value different than 0 . Disabled by default . <nl> + * / <nl> + # define CC_LABELATLAS_DEBUG_DRAW 0 <nl> + <nl> + / * * @ def CC_ENABLE_PROFILERS <nl> + If enabled , will activate various profilers withing cocos2d . This statistical data will be output to the console <nl> + once per second showing average time ( in milliseconds ) required to execute the specific routine ( s ) . <nl> + Useful for debugging purposes only . It is recommened to leave it disabled . <nl> + <nl> + To enable set it to a value different than 0 . Disabled by default . <nl> + * / <nl> + # define CC_ENABLE_PROFILERS 0 <nl> + <nl> + / * * @ def CC_COMPATIBILITY_WITH_0_8 <nl> + Enable it if you want to support v0 . 8 compatbility . <nl> + Basically , classes without namespaces will work . <nl> + It is recommended to disable compatibility once you have migrated your game to v0 . 9 to avoid class name polution <nl> + <nl> + To enable set it to a value different than 0 . Disabled by default . <nl> + * / <nl> # define CC_COMPATIBILITY_WITH_0_8 0 <nl> <nl> # endif / / __CCCONFIG_H__ <nl> mmm a / include / ccMacros . h <nl> ppp b / include / ccMacros . h <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> # ifndef __CCMACROS_H__ <nl> # define __CCMACROS_H__ <nl> <nl> - # include < math . h > <nl> - <nl> - / * * <nl> - @ file <nl> - cocos2d helper macros <nl> - * / <nl> - / * <nl> - * if COCOS2D_DEBUG is not defined , or if it is 0 then <nl> - * all CCLOGXXX macros will be disabled <nl> - * <nl> - * if COCOS2D_DEBUG = = 1 then : <nl> - * CCLOG ( ) will be enabled <nl> - * CCLOGERROR ( ) will be enabled <nl> - * CCLOGINFO ( ) will be disabled <nl> - * <nl> - * if COCOS2D_DEBUG = = 2 or higher then : <nl> - * CCLOG ( ) will be enabled <nl> - * CCLOGERROR ( ) will be enabled <nl> - * CCLOGINFO ( ) will be enabled <nl> - * / <nl> - <nl> - # if ! defined ( COCOS2D_DEBUG ) | | COCOS2D_DEBUG = = 0 <nl> - # define CCLOG ( . . . ) do { } while ( 0 ) <nl> - # define CCLOGINFO ( . . . ) do { } while ( 0 ) <nl> - # define CCLOGERROR ( . . . ) do { } while ( 0 ) <nl> - <nl> - # elif COCOS2D_DEBUG = = 1 <nl> - # define CCLOG ( . . . ) printf ( __VA_ARGS__ ) <nl> - # define CCLOGERROR ( . . . ) printf ( __VA_ARGS__ ) <nl> - # define CCLOGINFO ( . . . ) do { } while ( 0 ) <nl> - <nl> - # elif COCOS2D_DEBUG > 1 <nl> - # define CCLOG ( . . . ) printf ( __VA_ARGS__ ) <nl> - # define CCLOGERROR ( . . . ) printf ( __VA_ARGS__ ) <nl> - # define CCLOGINFO ( . . . ) printf ( __VA_ARGS__ ) <nl> - # endif / / COCOS2D_DEBUG <nl> - <nl> - / * * @ def CC_SWAP <nl> - simple macro that swaps 2 variables <nl> - * / <nl> - # define CC_SWAP ( x , y ) \ <nl> - ( { typename ( x ) temp = ( x ) ; \ <nl> - x = y ; y = temp ; \ <nl> - } ) <nl> - <nl> - <nl> - / * * @ def CCRANDOM_MINUS1_1 <nl> - returns a random float between - 1 and 1 <nl> - * / <nl> - # define CCRANDOM_MINUS1_1 ( ) ( ( random ( ) / ( float ) 0x3fffffff ) - 1 . 0f ) <nl> - <nl> - / * * @ def CCRANDOM_0_1 <nl> - returns a random float between 0 and 1 <nl> - * / <nl> - # define CCRANDOM_0_1 ( ) ( ( random ( ) / ( float ) 0x7fffffff ) ) <nl> - <nl> - / * * @ def CC_DEGREES_TO_RADIANS <nl> - converts degrees to radians <nl> - * / <nl> - # define CC_DEGREES_TO_RADIANS ( __ANGLE__ ) ( ( __ANGLE__ ) / 180 . 0f * ( float ) M_PI ) <nl> - <nl> - / * * @ def CC_RADIANS_TO_DEGREES <nl> - converts radians to degrees <nl> - * / <nl> - # define CC_RADIANS_TO_DEGREES ( __ANGLE__ ) ( ( __ANGLE__ ) / ( float ) M_PI * 180 . 0f ) <nl> - <nl> - / * * @ def CC_BLEND_SRC <nl> - default gl blend src function . Compatible with premultiplied alpha images . <nl> - * / <nl> - # define CC_BLEND_SRC GL_ONE <nl> - <nl> - / * * @ def CC_BLEND_DST <nl> - default gl blend dst function . Compatible with premultiplied alpha images . <nl> - * / <nl> - # define CC_BLEND_DST GL_ONE_MINUS_SRC_ALPHA <nl> - <nl> - / * * @ def CC_ENABLE_DEFAULT_GL_STATES <nl> - GL states that are enabled : <nl> - - GL_TEXTURE_2D <nl> - - GL_VERTEX_ARRAY <nl> - - GL_TEXTURE_COORD_ARRAY <nl> - - GL_COLOR_ARRAY <nl> - * / <nl> - # define CC_ENABLE_DEFAULT_GL_STATES ( ) { \ <nl> - glEnableClientState ( GL_VERTEX_ARRAY ) ; \ <nl> - glEnableClientState ( GL_COLOR_ARRAY ) ; \ <nl> - glEnableClientState ( GL_TEXTURE_COORD_ARRAY ) ; \ <nl> - glEnable ( GL_TEXTURE_2D ) ; \ <nl> - } <nl> - <nl> - / * * @ def CC_DISABLE_DEFAULT_GL_STATES <nl> - Disable default GL states : <nl> - - GL_TEXTURE_2D <nl> - - GL_VERTEX_ARRAY <nl> - - GL_TEXTURE_COORD_ARRAY <nl> - - GL_COLOR_ARRAY <nl> - * / <nl> - # define CC_DISABLE_DEFAULT_GL_STATES ( ) { \ <nl> - glDisable ( GL_TEXTURE_2D ) ; \ <nl> - glDisableClientState ( GL_COLOR_ARRAY ) ; \ <nl> - glDisableClientState ( GL_TEXTURE_COORD_ARRAY ) ; \ <nl> - glDisableClientState ( GL_VERTEX_ARRAY ) ; \ <nl> - } <nl> - <nl> - / * * @ def CC_DIRECTOR_INIT <nl> - - Initializes an EAGLView with 0 - bit depth format , and RGB565 render buffer . <nl> - - The EAGLView view will have multiple touches disabled . <nl> - - It will create a UIWindow and it will assign it the ' window ' variable . ' window ' must be declared before calling this marcro . <nl> - - It will parent the EAGLView to the created window <nl> - - If the firmware > = 3 . 1 it will create a Display Link Director . Else it will create an NSTimer director . <nl> - - It will try to run at 60 FPS . <nl> - - The FPS won ' t be displayed . <nl> - - The orientation will be portrait . <nl> - - It will connect the director with the EAGLView . <nl> - <nl> - IMPORTANT : If you want to use another type of render buffer ( eg : RGBA8 ) <nl> - or if you want to use a 16 - bit or 24 - bit depth buffer , you should NOT <nl> - use this macro . Instead , you should create the EAGLView manually . <nl> - <nl> - @ since v0 . 99 . 4 <nl> - * / <nl> - <nl> - / / mmm - todo : replace with uphone window <nl> - <nl> - / * <nl> - # define CC_DIRECTOR_INIT ( ) \ <nl> - do { \ <nl> - window = [ [ UIWindow alloc ] initWithFrame : [ [ UIScreen mainScreen ] bounds ] ] ; \ <nl> - if ( ! [ CCDirector setDirectorType : kCCDirectorTypeDisplayLink ] ) \ <nl> - [ CCDirector setDirectorType : kCCDirectorTypeNSTimer ] ; \ <nl> - CCDirector * __director = [ CCDirector sharedDirector ] ; \ <nl> - [ __director setDeviceOrientation : kCCDeviceOrientationPortrait ] ; \ <nl> - [ __director setDisplayFPS : NO ] ; \ <nl> - [ __director setAnimationInterval : 1 . 0 / 60 ] ; \ <nl> - EAGLView * __glView = [ EAGLView viewWithFrame : [ window bounds ] \ <nl> - pixelFormat : kEAGLColorFormatRGB565 \ <nl> - depthFormat : 0 / * GL_DEPTH_COMPONENT24_OES \ <nl> - preserveBackbuffer : NO ] ; \ <nl> - [ __director setOpenGLView : __glView ] ; \ <nl> - [ window addSubview : __glView ] ; \ <nl> - [ window makeKeyAndVisible ] ; \ <nl> - } while ( 0 ) <nl> - * / <nl> - <nl> - / * * @ def CC_DIRECTOR_END <nl> - Stops and removes the director from memory . <nl> - Removes the EAGLView from its parent <nl> - <nl> - @ since v0 . 99 . 4 <nl> - * / <nl> - <nl> - / / mmm - todo : replace with uphone window <nl> - <nl> - / * <nl> - # define CC_DIRECTOR_END ( ) \ <nl> - do { \ <nl> - CCDirector * __director = [ CCDirector sharedDirector ] ; \ <nl> - EAGLView * __view = [ __director openGLView ] ; \ <nl> - [ __view removeFromSuperview ] ; \ <nl> - [ __director end ] ; \ <nl> - } while ( 0 ) <nl> - * / <nl> - <nl> - # define DISALLOW_COPY_AND_ASSIGN ( TypeName ) \ <nl> - TypeName ( const TypeName & ) ; \ <nl> - void operator = ( const TypeName & ) <nl> + # include < math . h > <nl> + <nl> + / * * <nl> + @ file <nl> + cocos2d helper macros <nl> + * / <nl> + / * <nl> + * if COCOS2D_DEBUG is not defined , or if it is 0 then <nl> + * all CCLOGXXX macros will be disabled <nl> + * <nl> + * if COCOS2D_DEBUG = = 1 then : <nl> + * CCLOG ( ) will be enabled <nl> + * CCLOGERROR ( ) will be enabled <nl> + * CCLOGINFO ( ) will be disabled <nl> + * <nl> + * if COCOS2D_DEBUG = = 2 or higher then : <nl> + * CCLOG ( ) will be enabled <nl> + * CCLOGERROR ( ) will be enabled <nl> + * CCLOGINFO ( ) will be enabled <nl> + * / <nl> + <nl> + # if ! defined ( COCOS2D_DEBUG ) | | COCOS2D_DEBUG = = 0 <nl> + # define CCLOG ( . . . ) do { } while ( 0 ) <nl> + # define CCLOGINFO ( . . . ) do { } while ( 0 ) <nl> + # define CCLOGERROR ( . . . ) do { } while ( 0 ) <nl> + <nl> + # elif COCOS2D_DEBUG = = 1 <nl> + # define CCLOG ( . . . ) printf ( __VA_ARGS__ ) <nl> + # define CCLOGERROR ( . . . ) printf ( __VA_ARGS__ ) <nl> + # define CCLOGINFO ( . . . ) do { } while ( 0 ) <nl> + <nl> + # elif COCOS2D_DEBUG > 1 <nl> + # define CCLOG ( . . . ) printf ( __VA_ARGS__ ) <nl> + # define CCLOGERROR ( . . . ) printf ( __VA_ARGS__ ) <nl> + # define CCLOGINFO ( . . . ) printf ( __VA_ARGS__ ) <nl> + # endif / / COCOS2D_DEBUG <nl> + <nl> + / * * @ def CC_SWAP <nl> + simple macro that swaps 2 variables <nl> + * / <nl> + # define CC_SWAP ( x , y ) \ <nl> + ( { typename ( x ) temp = ( x ) ; \ <nl> + x = y ; y = temp ; \ <nl> + } ) <nl> + <nl> + <nl> + / * * @ def CCRANDOM_MINUS1_1 <nl> + returns a random float between - 1 and 1 <nl> + * / <nl> + # define CCRANDOM_MINUS1_1 ( ) ( ( random ( ) / ( float ) 0x3fffffff ) - 1 . 0f ) <nl> + <nl> + / * * @ def CCRANDOM_0_1 <nl> + returns a random float between 0 and 1 <nl> + * / <nl> + # define CCRANDOM_0_1 ( ) ( ( random ( ) / ( float ) 0x7fffffff ) ) <nl> + <nl> + / * * @ def CC_DEGREES_TO_RADIANS <nl> + converts degrees to radians <nl> + * / <nl> + # define CC_DEGREES_TO_RADIANS ( __ANGLE__ ) ( ( __ANGLE__ ) / 180 . 0f * ( float ) M_PI ) <nl> + <nl> + / * * @ def CC_RADIANS_TO_DEGREES <nl> + converts radians to degrees <nl> + * / <nl> + # define CC_RADIANS_TO_DEGREES ( __ANGLE__ ) ( ( __ANGLE__ ) / ( float ) M_PI * 180 . 0f ) <nl> + <nl> + / * * @ def CC_BLEND_SRC <nl> + default gl blend src function . Compatible with premultiplied alpha images . <nl> + * / <nl> + # define CC_BLEND_SRC GL_ONE <nl> + <nl> + / * * @ def CC_BLEND_DST <nl> + default gl blend dst function . Compatible with premultiplied alpha images . <nl> + * / <nl> + # define CC_BLEND_DST GL_ONE_MINUS_SRC_ALPHA <nl> + <nl> + / * * @ def CC_ENABLE_DEFAULT_GL_STATES <nl> + GL states that are enabled : <nl> + - GL_TEXTURE_2D <nl> + - GL_VERTEX_ARRAY <nl> + - GL_TEXTURE_COORD_ARRAY <nl> + - GL_COLOR_ARRAY <nl> + * / <nl> + # define CC_ENABLE_DEFAULT_GL_STATES ( ) { \ <nl> + glEnableClientState ( GL_VERTEX_ARRAY ) ; \ <nl> + glEnableClientState ( GL_COLOR_ARRAY ) ; \ <nl> + glEnableClientState ( GL_TEXTURE_COORD_ARRAY ) ; \ <nl> + glEnable ( GL_TEXTURE_2D ) ; \ <nl> + } <nl> + <nl> + / * * @ def CC_DISABLE_DEFAULT_GL_STATES <nl> + Disable default GL states : <nl> + - GL_TEXTURE_2D <nl> + - GL_VERTEX_ARRAY <nl> + - GL_TEXTURE_COORD_ARRAY <nl> + - GL_COLOR_ARRAY <nl> + * / <nl> + # define CC_DISABLE_DEFAULT_GL_STATES ( ) { \ <nl> + glDisable ( GL_TEXTURE_2D ) ; \ <nl> + glDisableClientState ( GL_COLOR_ARRAY ) ; \ <nl> + glDisableClientState ( GL_TEXTURE_COORD_ARRAY ) ; \ <nl> + glDisableClientState ( GL_VERTEX_ARRAY ) ; \ <nl> + } <nl> + <nl> + / * * @ def CC_DIRECTOR_INIT <nl> + - Initializes an EAGLView with 0 - bit depth format , and RGB565 render buffer . <nl> + - The EAGLView view will have multiple touches disabled . <nl> + - It will create a UIWindow and it will assign it the ' window ' variable . ' window ' must be declared before calling this marcro . <nl> + - It will parent the EAGLView to the created window <nl> + - If the firmware > = 3 . 1 it will create a Display Link Director . Else it will create an NSTimer director . <nl> + - It will try to run at 60 FPS . <nl> + - The FPS won ' t be displayed . <nl> + - The orientation will be portrait . <nl> + - It will connect the director with the EAGLView . <nl> + <nl> + IMPORTANT : If you want to use another type of render buffer ( eg : RGBA8 ) <nl> + or if you want to use a 16 - bit or 24 - bit depth buffer , you should NOT <nl> + use this macro . Instead , you should create the EAGLView manually . <nl> + <nl> + @ since v0 . 99 . 4 <nl> + * / <nl> + <nl> + / / mmm - todo : replace with uphone window <nl> + <nl> + / * <nl> + # define CC_DIRECTOR_INIT ( ) \ <nl> + do { \ <nl> + window = [ [ UIWindow alloc ] initWithFrame : [ [ UIScreen mainScreen ] bounds ] ] ; \ <nl> + if ( ! [ CCDirector setDirectorType : kCCDirectorTypeDisplayLink ] ) \ <nl> + [ CCDirector setDirectorType : kCCDirectorTypeNSTimer ] ; \ <nl> + CCDirector * __director = [ CCDirector sharedDirector ] ; \ <nl> + [ __director setDeviceOrientation : kCCDeviceOrientationPortrait ] ; \ <nl> + [ __director setDisplayFPS : NO ] ; \ <nl> + [ __director setAnimationInterval : 1 . 0 / 60 ] ; \ <nl> + EAGLView * __glView = [ EAGLView viewWithFrame : [ window bounds ] \ <nl> + pixelFormat : kEAGLColorFormatRGB565 \ <nl> + depthFormat : 0 / * GL_DEPTH_COMPONENT24_OES \ <nl> + preserveBackbuffer : NO ] ; \ <nl> + [ __director setOpenGLView : __glView ] ; \ <nl> + [ window addSubview : __glView ] ; \ <nl> + [ window makeKeyAndVisible ] ; \ <nl> + } while ( 0 ) <nl> + * / <nl> + <nl> + / * * @ def CC_DIRECTOR_END <nl> + Stops and removes the director from memory . <nl> + Removes the EAGLView from its parent <nl> + <nl> + @ since v0 . 99 . 4 <nl> + * / <nl> + <nl> + / / mmm - todo : replace with uphone window <nl> + <nl> + / * <nl> + # define CC_DIRECTOR_END ( ) \ <nl> + do { \ <nl> + CCDirector * __director = [ CCDirector sharedDirector ] ; \ <nl> + EAGLView * __view = [ __director openGLView ] ; \ <nl> + [ __view removeFromSuperview ] ; \ <nl> + [ __director end ] ; \ <nl> + } while ( 0 ) <nl> + * / <nl> + <nl> + # define DISALLOW_COPY_AND_ASSIGN ( TypeName ) \ <nl> + TypeName ( const TypeName & ) ; \ <nl> + void operator = ( const TypeName & ) <nl> <nl> <nl> # endif / / __CCMACROS_H__ <nl> mmm a / include / ccTypes . h <nl> ppp b / include / ccTypes . h <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> # ifndef __CCTYPES_H__ <nl> # define __CCTYPES_H__ <nl> <nl> <nl> # include " Support / Cocos2dTypes . h " <nl> # include < GLES / gl . h > <nl> <nl> - / * * RGB color composed of bytes 3 bytes <nl> - @ since v0 . 8 <nl> - * / <nl> - typedef struct _ccColor3B <nl> - { <nl> - GLubyte r ; <nl> - GLubyte g ; <nl> - GLubyte b ; <nl> - } ccColor3B ; <nl> - <nl> - / / ! helper macro that creates an ccColor3B type <nl> - static inline ccColor3B <nl> - ccc3 ( const GLubyte r , const GLubyte g , const GLubyte b ) <nl> - { <nl> - ccColor3B c = { r , g , b } ; <nl> - return c ; <nl> - } <nl> - / / ccColor3B predefined colors <nl> - / / ! White color ( 255 , 255 , 255 ) <nl> - static const ccColor3B ccWHITE = { 255 , 255 , 255 } ; <nl> - / / ! Yellow color ( 255 , 255 , 0 ) <nl> - static const ccColor3B ccYELLOW = { 255 , 255 , 0 } ; <nl> - / / ! Blue color ( 0 , 0 , 255 ) <nl> - static const ccColor3B ccBLUE = { 0 , 0 , 255 } ; <nl> - / / ! Green Color ( 0 , 255 , 0 ) <nl> - static const ccColor3B ccGREEN = { 0 , 255 , 0 } ; <nl> - / / ! Red Color ( 255 , 0 , 0 , ) <nl> - static const ccColor3B ccRED = { 255 , 0 , 0 } ; <nl> - / / ! Magenta Color ( 255 , 0 , 255 ) <nl> - static const ccColor3B ccMAGENTA = { 255 , 0 , 255 } ; <nl> - / / ! Black Color ( 0 , 0 , 0 ) <nl> - static const ccColor3B ccBLACK = { 0 , 0 , 0 } ; <nl> - / / ! Orange Color ( 255 , 127 , 0 ) <nl> - static const ccColor3B ccORANGE = { 255 , 127 , 0 } ; <nl> - / / ! Gray Color ( 166 , 166 , 166 ) <nl> - static const ccColor3B ccGRAY = { 166 , 166 , 166 } ; <nl> - <nl> - / * * RGBA color composed of 4 bytes <nl> - @ since v0 . 8 <nl> - * / <nl> - typedef struct _ccColor4B <nl> - { <nl> - unsigned char r ; <nl> - unsigned char g ; <nl> - unsigned char b ; <nl> - unsigned char a ; <nl> - } ccColor4B ; <nl> - / / ! helper macro that creates an ccColor4B type <nl> - static inline ccColor4B <nl> - ccc4 ( const GLubyte r , const GLubyte g , const GLubyte b , const GLubyte o ) <nl> - { <nl> - ccColor4B c = { r , g , b , o } ; <nl> - return c ; <nl> - } <nl> - <nl> - <nl> - / * * RGBA color composed of 4 floats <nl> - @ since v0 . 8 <nl> - * / <nl> - typedef struct _ccColor4F { <nl> - float r ; <nl> - float g ; <nl> - float b ; <nl> - float a ; <nl> - } ccColor4F ; <nl> - <nl> - / * * Returns a ccColor4F from a ccColor3B . Alpha will be 1 . <nl> - @ since v0 . 99 . 1 <nl> - * / <nl> - static inline ccColor4F ccc4FFromccc3B ( ccColor3B c ) <nl> - { <nl> - return ( ccColor4F ) { c . r / 255 . f , c . g / 255 . f , c . b / 255 . f , 1 . f } ; <nl> - } <nl> - <nl> - / * * Returns a ccColor4F from a ccColor4B . <nl> - @ since v0 . 99 . 1 <nl> - * / <nl> - static inline ccColor4F ccc4FFromccc4B ( ccColor4B c ) <nl> - { <nl> - return ( ccColor4F ) { c . r / 255 . f , c . g / 255 . f , c . b / 255 . f , c . a / 255 . f } ; <nl> - } <nl> - <nl> - / * * returns YES if both ccColor4F are equal . Otherwise it returns NO . <nl> - @ since v0 . 99 . 1 <nl> - * / <nl> - static inline BOOL ccc4FEqual ( ccColor4F a , ccColor4F b ) <nl> - { <nl> - return a . r = = b . r & & a . g = = b . g & & a . b = = b . b & & a . a = = b . a ; <nl> - } <nl> - <nl> - / * * A vertex composed of 2 floats : x , y <nl> - @ since v0 . 8 <nl> - * / <nl> - # define ccVertex2F CGPoint <nl> - <nl> - / * * A vertex composed of 2 floats : x , y <nl> - @ since v0 . 8 <nl> - * / <nl> - typedef struct _ccVertex3F <nl> - { <nl> - float x ; <nl> - float y ; <nl> - float z ; <nl> - } ccVertex3F ; <nl> - <nl> - / * * A texcoord composed of 2 floats : u , y <nl> - @ since v0 . 8 <nl> - * / <nl> - typedef struct _ccTex2F { <nl> - float u ; <nl> - float v ; <nl> - } ccTex2F ; <nl> - <nl> - <nl> - / / ! Point Sprite component <nl> - typedef struct _ccPointSprite <nl> - { <nl> - ccVertex2F pos ; / / 8 bytes <nl> - ccColor4F colors ; / / 16 bytes <nl> - float size ; / / 4 bytes <nl> - } ccPointSprite ; <nl> - <nl> - / / ! A 2D Quad . 4 * 2 floats <nl> - typedef struct _ccQuad2 { <nl> - ccVertex2F tl ; <nl> - ccVertex2F tr ; <nl> - ccVertex2F bl ; <nl> - ccVertex2F br ; <nl> - } ccQuad2 ; <nl> - <nl> - <nl> - / / ! A 3D Quad . 4 * 3 floats <nl> - typedef struct _ccQuad3 { <nl> - ccVertex3F bl ; <nl> - ccVertex3F br ; <nl> - ccVertex3F tl ; <nl> - ccVertex3F tr ; <nl> - } ccQuad3 ; <nl> - <nl> - / / ! A 2D grid size <nl> - typedef struct _ccGridSize <nl> - { <nl> - int x ; <nl> - int y ; <nl> - } ccGridSize ; <nl> - <nl> - / / ! helper function to create a ccGridSize <nl> - static inline ccGridSize <nl> - ccg ( const int x , const int y ) <nl> - { <nl> - ccGridSize v = { x , y } ; <nl> - return v ; <nl> - } <nl> - <nl> - / / ! a Point with a vertex point , a tex coord point and a color 4F <nl> - typedef struct _ccV2F_C4F_T2F <nl> - { <nl> - / / ! vertices ( 2F ) <nl> - ccVertex2F vertices ; <nl> - / / ! colors ( 4F ) <nl> - ccColor4F colors ; <nl> - / / ! tex coords ( 2F ) <nl> - ccTex2F texCoords ; <nl> - } ccV2F_C4F_T2F ; <nl> - <nl> - / / ! a Point with a vertex point , a tex coord point and a color 4B <nl> - typedef struct _ccV3F_C4B_T2F <nl> - { <nl> - / / ! vertices ( 3F ) <nl> - ccVertex3F vertices ; / / 12 bytes <nl> - / / char __padding__ [ 4 ] ; <nl> - <nl> - / / ! colors ( 4B ) <nl> - ccColor4B colors ; / / 4 bytes <nl> - / / char __padding2__ [ 4 ] ; <nl> - <nl> - / / tex coords ( 2F ) <nl> - ccTex2F texCoords ; / / 8 byts <nl> - } ccV3F_C4B_T2F ; <nl> - <nl> - / / ! 4 ccVertex3FTex2FColor4B <nl> - typedef struct _ccV3F_C4B_T2F_Quad <nl> - { <nl> - / / ! top left <nl> - ccV3F_C4B_T2F tl ; <nl> - / / ! bottom left <nl> - ccV3F_C4B_T2F bl ; <nl> - / / ! top right <nl> - ccV3F_C4B_T2F tr ; <nl> - / / ! bottom right <nl> - ccV3F_C4B_T2F br ; <nl> - } ccV3F_C4B_T2F_Quad ; <nl> - <nl> - / / ! 4 ccVertex2FTex2FColor4F Quad <nl> - typedef struct _ccV2F_C4F_T2F_Quad <nl> - { <nl> - / / ! bottom left <nl> - ccV2F_C4F_T2F bl ; <nl> - / / ! bottom right <nl> - ccV2F_C4F_T2F br ; <nl> - / / ! top left <nl> - ccV2F_C4F_T2F tl ; <nl> - / / ! top right <nl> - ccV2F_C4F_T2F tr ; <nl> - } ccV2F_C4F_T2F_Quad ; <nl> - <nl> - / / ! Blend Function used for textures <nl> - typedef struct _ccBlendFunc <nl> - { <nl> - / / ! source blend function <nl> - GLenum src ; <nl> - / / ! destination blend function <nl> - GLenum dst ; <nl> - } ccBlendFunc ; <nl> - <nl> - / / ! delta time type <nl> - / / ! if you want more resolution redefine it as a double <nl> - typedef float ccTime ; <nl> + / * * RGB color composed of bytes 3 bytes <nl> + @ since v0 . 8 <nl> + * / <nl> + typedef struct _ccColor3B <nl> + { <nl> + GLubyte r ; <nl> + GLubyte g ; <nl> + GLubyte b ; <nl> + } ccColor3B ; <nl> + <nl> + / / ! helper macro that creates an ccColor3B type <nl> + static inline ccColor3B <nl> + ccc3 ( const GLubyte r , const GLubyte g , const GLubyte b ) <nl> + { <nl> + ccColor3B c = { r , g , b } ; <nl> + return c ; <nl> + } <nl> + / / ccColor3B predefined colors <nl> + / / ! White color ( 255 , 255 , 255 ) <nl> + static const ccColor3B ccWHITE = { 255 , 255 , 255 } ; <nl> + / / ! Yellow color ( 255 , 255 , 0 ) <nl> + static const ccColor3B ccYELLOW = { 255 , 255 , 0 } ; <nl> + / / ! Blue color ( 0 , 0 , 255 ) <nl> + static const ccColor3B ccBLUE = { 0 , 0 , 255 } ; <nl> + / / ! Green Color ( 0 , 255 , 0 ) <nl> + static const ccColor3B ccGREEN = { 0 , 255 , 0 } ; <nl> + / / ! Red Color ( 255 , 0 , 0 , ) <nl> + static const ccColor3B ccRED = { 255 , 0 , 0 } ; <nl> + / / ! Magenta Color ( 255 , 0 , 255 ) <nl> + static const ccColor3B ccMAGENTA = { 255 , 0 , 255 } ; <nl> + / / ! Black Color ( 0 , 0 , 0 ) <nl> + static const ccColor3B ccBLACK = { 0 , 0 , 0 } ; <nl> + / / ! Orange Color ( 255 , 127 , 0 ) <nl> + static const ccColor3B ccORANGE = { 255 , 127 , 0 } ; <nl> + / / ! Gray Color ( 166 , 166 , 166 ) <nl> + static const ccColor3B ccGRAY = { 166 , 166 , 166 } ; <nl> + <nl> + / * * RGBA color composed of 4 bytes <nl> + @ since v0 . 8 <nl> + * / <nl> + typedef struct _ccColor4B <nl> + { <nl> + unsigned char r ; <nl> + unsigned char g ; <nl> + unsigned char b ; <nl> + unsigned char a ; <nl> + } ccColor4B ; <nl> + / / ! helper macro that creates an ccColor4B type <nl> + static inline ccColor4B <nl> + ccc4 ( const GLubyte r , const GLubyte g , const GLubyte b , const GLubyte o ) <nl> + { <nl> + ccColor4B c = { r , g , b , o } ; <nl> + return c ; <nl> + } <nl> + <nl> + <nl> + / * * RGBA color composed of 4 floats <nl> + @ since v0 . 8 <nl> + * / <nl> + typedef struct _ccColor4F { <nl> + float r ; <nl> + float g ; <nl> + float b ; <nl> + float a ; <nl> + } ccColor4F ; <nl> + <nl> + / * * Returns a ccColor4F from a ccColor3B . Alpha will be 1 . <nl> + @ since v0 . 99 . 1 <nl> + * / <nl> + static inline ccColor4F ccc4FFromccc3B ( ccColor3B c ) <nl> + { <nl> + return ( ccColor4F ) { c . r / 255 . f , c . g / 255 . f , c . b / 255 . f , 1 . f } ; <nl> + } <nl> + <nl> + / * * Returns a ccColor4F from a ccColor4B . <nl> + @ since v0 . 99 . 1 <nl> + * / <nl> + static inline ccColor4F ccc4FFromccc4B ( ccColor4B c ) <nl> + { <nl> + return ( ccColor4F ) { c . r / 255 . f , c . g / 255 . f , c . b / 255 . f , c . a / 255 . f } ; <nl> + } <nl> + <nl> + / * * returns YES if both ccColor4F are equal . Otherwise it returns NO . <nl> + @ since v0 . 99 . 1 <nl> + * / <nl> + static inline BOOL ccc4FEqual ( ccColor4F a , ccColor4F b ) <nl> + { <nl> + return a . r = = b . r & & a . g = = b . g & & a . b = = b . b & & a . a = = b . a ; <nl> + } <nl> + <nl> + / * * A vertex composed of 2 floats : x , y <nl> + @ since v0 . 8 <nl> + * / <nl> + # define ccVertex2F CGPoint <nl> + <nl> + / * * A vertex composed of 2 floats : x , y <nl> + @ since v0 . 8 <nl> + * / <nl> + typedef struct _ccVertex3F <nl> + { <nl> + float x ; <nl> + float y ; <nl> + float z ; <nl> + } ccVertex3F ; <nl> + <nl> + / * * A texcoord composed of 2 floats : u , y <nl> + @ since v0 . 8 <nl> + * / <nl> + typedef struct _ccTex2F { <nl> + float u ; <nl> + float v ; <nl> + } ccTex2F ; <nl> + <nl> + <nl> + / / ! Point Sprite component <nl> + typedef struct _ccPointSprite <nl> + { <nl> + ccVertex2F pos ; / / 8 bytes <nl> + ccColor4F colors ; / / 16 bytes <nl> + float size ; / / 4 bytes <nl> + } ccPointSprite ; <nl> + <nl> + / / ! A 2D Quad . 4 * 2 floats <nl> + typedef struct _ccQuad2 { <nl> + ccVertex2F tl ; <nl> + ccVertex2F tr ; <nl> + ccVertex2F bl ; <nl> + ccVertex2F br ; <nl> + } ccQuad2 ; <nl> + <nl> + <nl> + / / ! A 3D Quad . 4 * 3 floats <nl> + typedef struct _ccQuad3 { <nl> + ccVertex3F bl ; <nl> + ccVertex3F br ; <nl> + ccVertex3F tl ; <nl> + ccVertex3F tr ; <nl> + } ccQuad3 ; <nl> + <nl> + / / ! A 2D grid size <nl> + typedef struct _ccGridSize <nl> + { <nl> + int x ; <nl> + int y ; <nl> + } ccGridSize ; <nl> + <nl> + / / ! helper function to create a ccGridSize <nl> + static inline ccGridSize <nl> + ccg ( const int x , const int y ) <nl> + { <nl> + ccGridSize v = { x , y } ; <nl> + return v ; <nl> + } <nl> + <nl> + / / ! a Point with a vertex point , a tex coord point and a color 4F <nl> + typedef struct _ccV2F_C4F_T2F <nl> + { <nl> + / / ! vertices ( 2F ) <nl> + ccVertex2F vertices ; <nl> + / / ! colors ( 4F ) <nl> + ccColor4F colors ; <nl> + / / ! tex coords ( 2F ) <nl> + ccTex2F texCoords ; <nl> + } ccV2F_C4F_T2F ; <nl> + <nl> + / / ! a Point with a vertex point , a tex coord point and a color 4B <nl> + typedef struct _ccV3F_C4B_T2F <nl> + { <nl> + / / ! vertices ( 3F ) <nl> + ccVertex3F vertices ; / / 12 bytes <nl> + / / char __padding__ [ 4 ] ; <nl> + <nl> + / / ! colors ( 4B ) <nl> + ccColor4B colors ; / / 4 bytes <nl> + / / char __padding2__ [ 4 ] ; <nl> + <nl> + / / tex coords ( 2F ) <nl> + ccTex2F texCoords ; / / 8 byts <nl> + } ccV3F_C4B_T2F ; <nl> + <nl> + / / ! 4 ccVertex3FTex2FColor4B <nl> + typedef struct _ccV3F_C4B_T2F_Quad <nl> + { <nl> + / / ! top left <nl> + ccV3F_C4B_T2F tl ; <nl> + / / ! bottom left <nl> + ccV3F_C4B_T2F bl ; <nl> + / / ! top right <nl> + ccV3F_C4B_T2F tr ; <nl> + / / ! bottom right <nl> + ccV3F_C4B_T2F br ; <nl> + } ccV3F_C4B_T2F_Quad ; <nl> + <nl> + / / ! 4 ccVertex2FTex2FColor4F Quad <nl> + typedef struct _ccV2F_C4F_T2F_Quad <nl> + { <nl> + / / ! bottom left <nl> + ccV2F_C4F_T2F bl ; <nl> + / / ! bottom right <nl> + ccV2F_C4F_T2F br ; <nl> + / / ! top left <nl> + ccV2F_C4F_T2F tl ; <nl> + / / ! top right <nl> + ccV2F_C4F_T2F tr ; <nl> + } ccV2F_C4F_T2F_Quad ; <nl> + <nl> + / / ! Blend Function used for textures <nl> + typedef struct _ccBlendFunc <nl> + { <nl> + / / ! source blend function <nl> + GLenum src ; <nl> + / / ! destination blend function <nl> + GLenum dst ; <nl> + } ccBlendFunc ; <nl> + <nl> + / / ! delta time type <nl> + / / ! if you want more resolution redefine it as a double <nl> + typedef float ccTime ; <nl> / / typedef double ccTime ; <nl> <nl> # endif / / __CCTYPES_H__ <nl> mmm a / include / cocos2d . h <nl> ppp b / include / cocos2d . h <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> + <nl> # ifndef __COCOS2D_H__ <nl> # define __COCOS2D_H__ <nl> <nl> mmm a / include / glu . h <nl> ppp b / include / glu . h <nl> <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + Copyright ( c ) 2010 cocos2d - x . org <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy <nl> + of this software and associated documentation files ( the " Software " ) , to deal <nl> + in the Software without restriction , including without limitation the rights <nl> + to use , copy , modify , merge , publish , distribute , sublicense , and / or sell <nl> + copies of the Software , and to permit persons to whom the Software is <nl> + furnished to do so , subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in <nl> + all copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , <nl> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE <nl> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER <nl> + LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , <nl> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <nl> + THE SOFTWARE . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> / / <nl> / / cocos2d GLU implementation <nl> / / <nl>
issue , add MIT license to each file
cocos2d/cocos2d-x
a68ac7c9979990b3b4ec221aefeb2f8121d9a01a
2010-07-06T07:46:45Z
mmm a / caffe2 / proto / torch . proto <nl> ppp b / caffe2 / proto / torch . proto <nl> message AttributeProto { <nl> <nl> / / The name field MUST be present for this version of the IR . <nl> optional string name = 1 ; / / namespace Attribute <nl> - <nl> + <nl> / / if ref_attr_name is not empty , ref_attr_name is the attribute name in parent function . <nl> / / In this case , this AttributeProto does not contain data , and it ' s a reference of attribute <nl> / / in parent scope . <nl> message NodeProto { <nl> repeated AttributeProto attribute = 5 ; <nl> <nl> / / A human - readable documentation for this node . Markdown is allowed . <nl> + / / Equivalent to string debug_info <nl> optional string doc_string = 6 ; <nl> <nl> / / Additional annotations , attributes are defined in Schema <nl> message NodeProto { <nl> / / string engine <nl> / / string list control_input <nl> / / int64 is_gradient_op <nl> - / / string debug_info <nl> repeated AttributeProto annotations = 8 ; <nl> <nl> / / Besides the node type , PyTorhc also serialize ATen function signature <nl> new file mode 100644 <nl> index 000000000000 . . d6dae901f081 <nl> mmm / dev / null <nl> ppp b / caffe2 / proto / torch_pb . h <nl> <nl> + # ifndef CAFFE2_PROTO_TORCH_PB_H_ <nl> + # define CAFFE2_PROTO_TORCH_PB_H_ <nl> + <nl> + # include < caffe2 / proto / caffe2 . pb . h > <nl> + # include < caffe2 / proto / torch . pb . h > <nl> + <nl> + # endif / / CAFFE2_PROTO_TORCH_PB_H_ <nl> new file mode 100644 <nl> index 000000000000 . . 50eaf220c7f7 <nl> mmm / dev / null <nl> ppp b / caffe2 / python / convert . py <nl> <nl> + # # @ package workspace <nl> + # Module caffe2 . python . workspace <nl> + from __future__ import absolute_import <nl> + from __future__ import division <nl> + from __future__ import print_function <nl> + from __future__ import unicode_literals <nl> + <nl> + from caffe2 . proto import caffe2_pb2 , torch_pb2 <nl> + <nl> + import caffe2 . python . _import_c_extension as C <nl> + <nl> + <nl> + def ArgumentToAttributeProto ( arg ) : <nl> + serialized_arg = None <nl> + if hasattr ( arg , ' SerializeToString ' ) and callable ( arg . SerializeToString ) : <nl> + serialized_arg = arg . SerializeToString ( ) <nl> + elif isinstance ( arg , bytes ) : <nl> + serialized_arg = arg <nl> + else : <nl> + raise ValueError ( ' No SerializeToString method is detected . ' <nl> + ' neither arg is bytes . \ ntype is { } ' . format ( type ( arg ) ) ) <nl> + attr = torch_pb2 . AttributeProto ( ) <nl> + attr . ParseFromString ( C . argument_to_attribute_proto ( serialized_arg ) ) <nl> + return attr <nl> + <nl> + <nl> + def AttributeProtoToArgument ( attr ) : <nl> + serialized_attr = None <nl> + if hasattr ( attr , ' SerializeToString ' ) and callable ( attr . SerializeToString ) : <nl> + serialized_attr = attr . SerializeToString ( ) <nl> + elif isinstance ( attr , bytes ) : <nl> + serialized_attr = attr <nl> + else : <nl> + raise ValueError ( ' No SerializeToString method is detected . ' <nl> + ' neither attr is bytes . \ ntype is { } ' . format ( type ( attr ) ) ) <nl> + arg = caffe2_pb2 . Argument ( ) <nl> + arg . ParseFromString ( C . attribute_proto_to_argument ( serialized_attr ) ) <nl> + return arg <nl> + <nl> + <nl> + def OperatorDefToNodeProto ( op_def ) : <nl> + serialized_op_def = None <nl> + if hasattr ( op_def , ' SerializeToString ' ) and callable ( op_def . SerializeToString ) : <nl> + serialized_op_def = op_def . SerializeToString ( ) <nl> + elif isinstance ( op_def , bytes ) : <nl> + serialized_op_def = op_def <nl> + else : <nl> + raise ValueError ( ' No SerializeToString method is detected . ' <nl> + ' neither op_def is bytes . \ ntype is { } ' . format ( type ( op_def ) ) ) <nl> + node = torch_pb2 . NodeProto ( ) <nl> + node . ParseFromString ( C . operator_def_to_node_proto ( serialized_op_def ) ) <nl> + return node <nl> + <nl> + <nl> + def NodeProtoToOperatorDef ( node_proto ) : <nl> + serialized_node_proto = None <nl> + if hasattr ( node_proto , ' SerializeToString ' ) and callable ( node_proto . SerializeToString ) : <nl> + serialized_node_proto = node_proto . SerializeToString ( ) <nl> + elif isinstance ( node_proto , bytes ) : <nl> + serialized_node_proto = node_proto <nl> + else : <nl> + raise ValueError ( ' No SerializeToString method is detected . ' <nl> + ' neither node_proto is bytes . \ ntype is { } ' . format ( type ( node_proto ) ) ) <nl> + op_def = caffe2_pb2 . OperatorDef ( ) <nl> + op_def . ParseFromString ( C . node_proto_to_operator_def ( serialized_node_proto ) ) <nl> + return op_def <nl> new file mode 100644 <nl> index 000000000000 . . c8de7e975068 <nl> mmm / dev / null <nl> ppp b / caffe2 / python / convert_test . py <nl> <nl> + from __future__ import absolute_import <nl> + from __future__ import division <nl> + from __future__ import print_function <nl> + from __future__ import unicode_literals <nl> + <nl> + from caffe2 . python import convert , workspace <nl> + from caffe2 . proto import caffe2_pb2 , torch_pb2 <nl> + import unittest <nl> + import numpy as np <nl> + <nl> + class TestOperator ( unittest . TestCase ) : <nl> + def setUp ( self ) : <nl> + workspace . ResetWorkspace ( ) <nl> + <nl> + def testArgument2AttributeProto ( self ) : <nl> + arg_f = caffe2_pb2 . Argument ( ) <nl> + arg_f . name = " TestArgF " <nl> + arg_f . f = 10 . 0 <nl> + attr_f = convert . ArgumentToAttributeProto ( arg_f ) <nl> + self . assertEqual ( attr_f . name , arg_f . name ) <nl> + self . assertEqual ( attr_f . f , arg_f . f ) <nl> + <nl> + arg_i = caffe2_pb2 . Argument ( ) <nl> + arg_i . name = " TestArgI " <nl> + arg_i . i = 100 <nl> + attr_i = convert . ArgumentToAttributeProto ( arg_i ) <nl> + self . assertEqual ( attr_i . name , arg_i . name ) <nl> + self . assertEqual ( attr_i . i , arg_i . i ) <nl> + <nl> + arg_s = caffe2_pb2 . Argument ( ) <nl> + arg_s . name = " TestArgS " <nl> + arg_s . s = " TestS " . encode ( " utf - 8 " ) <nl> + attr_s = convert . ArgumentToAttributeProto ( arg_s ) <nl> + self . assertEqual ( attr_s . name , arg_s . name ) <nl> + self . assertEqual ( attr_s . s , arg_s . s ) <nl> + <nl> + # TODO : test net arg <nl> + <nl> + arg_floats = caffe2_pb2 . Argument ( ) <nl> + arg_floats . name = " TestArgFloats " <nl> + arg_floats . floats . extend ( [ 10 . 0 , 11 . 0 , 12 . 0 ] ) <nl> + attr_floats = convert . ArgumentToAttributeProto ( arg_floats ) <nl> + self . assertEqual ( attr_floats . name , arg_floats . name ) <nl> + self . assertEqual ( attr_floats . floats , arg_floats . floats ) <nl> + <nl> + arg_ints = caffe2_pb2 . Argument ( ) <nl> + arg_ints . name = " TestArgInts " <nl> + arg_ints . ints . extend ( [ 100 , 101 , 102 ] ) <nl> + attr_ints = convert . ArgumentToAttributeProto ( arg_ints ) <nl> + self . assertEqual ( attr_ints . name , arg_ints . name ) <nl> + self . assertEqual ( attr_ints . ints , arg_ints . ints ) <nl> + <nl> + arg_strings = caffe2_pb2 . Argument ( ) <nl> + arg_strings . name = " TestArgStrings " <nl> + arg_strings . strings . extend ( [ <nl> + " TestStrings1 " . encode ( " utf - 8 " ) , <nl> + " TestStrings2 " . encode ( " utf - 8 " ) , <nl> + ] ) <nl> + attr_strings = convert . ArgumentToAttributeProto ( arg_strings ) <nl> + self . assertEqual ( attr_strings . name , arg_strings . name ) <nl> + self . assertEqual ( attr_strings . strings , arg_strings . strings ) <nl> + <nl> + # TODO : test nets arg <nl> + <nl> + def testAttributeProto2Argument ( self ) : <nl> + attr_f = torch_pb2 . AttributeProto ( ) <nl> + attr_f . type = torch_pb2 . AttributeProto . FLOAT <nl> + attr_f . name = " TestAttrF " <nl> + attr_f . f = 10 . 0 <nl> + arg_f = convert . AttributeProtoToArgument ( attr_f ) <nl> + self . assertEqual ( arg_f . name , attr_f . name ) <nl> + self . assertEqual ( arg_f . f , attr_f . f ) <nl> + <nl> + attr_i = torch_pb2 . AttributeProto ( ) <nl> + attr_i . type = torch_pb2 . AttributeProto . INT <nl> + attr_i . name = " TestArgI " <nl> + attr_i . i = 100 <nl> + arg_i = convert . AttributeProtoToArgument ( attr_i ) <nl> + self . assertEqual ( arg_i . name , attr_i . name ) <nl> + self . assertEqual ( arg_i . i , attr_i . i ) <nl> + <nl> + attr_s = torch_pb2 . AttributeProto ( ) <nl> + attr_s . type = torch_pb2 . AttributeProto . STRING <nl> + attr_s . name = " TestArgS " <nl> + attr_s . s = " TestS " . encode ( " utf - 8 " ) <nl> + arg_s = convert . AttributeProtoToArgument ( attr_s ) <nl> + self . assertEqual ( arg_s . name , attr_s . name ) <nl> + self . assertEqual ( arg_s . s , attr_s . s ) <nl> + <nl> + # TODO : test graph attribute <nl> + <nl> + attr_floats = torch_pb2 . AttributeProto ( ) <nl> + attr_floats . type = torch_pb2 . AttributeProto . FLOATS <nl> + attr_floats . name = " TestAttrFloats " <nl> + attr_floats . floats . extend ( [ 10 . 0 , 11 . 0 , 12 . 0 ] ) <nl> + arg_floats = convert . AttributeProtoToArgument ( attr_floats ) <nl> + self . assertEqual ( arg_floats . name , attr_floats . name ) <nl> + self . assertEqual ( arg_floats . floats , attr_floats . floats ) <nl> + <nl> + attr_ints = torch_pb2 . AttributeProto ( ) <nl> + attr_ints . type = torch_pb2 . AttributeProto . INTS <nl> + attr_ints . name = " TestArgInts " <nl> + attr_ints . ints . extend ( [ 100 , 101 , 102 ] ) <nl> + arg_ints = convert . AttributeProtoToArgument ( attr_ints ) <nl> + self . assertEqual ( arg_ints . name , attr_ints . name ) <nl> + self . assertEqual ( arg_ints . ints , attr_ints . ints ) <nl> + <nl> + attr_strings = torch_pb2 . AttributeProto ( ) <nl> + attr_strings . type = torch_pb2 . AttributeProto . STRINGS <nl> + attr_strings . name = " TestArgStrings " <nl> + attr_strings . strings . extend ( [ <nl> + " TestStrings1 " . encode ( " utf - 8 " ) , <nl> + " TestStrings2 " . encode ( " utf - 8 " ) , <nl> + ] ) <nl> + arg_strings = convert . AttributeProtoToArgument ( attr_strings ) <nl> + self . assertEqual ( arg_strings . name , attr_strings . name ) <nl> + self . assertEqual ( arg_strings . strings , attr_strings . strings ) <nl> + <nl> + # TODO : test graphs attribute <nl> + <nl> + <nl> + def testOperatorDef2NodeProto ( self ) : <nl> + op_def = caffe2_pb2 . OperatorDef ( ) <nl> + op_def . input . extend ( [ " A " , " B " , " C " ] ) <nl> + op_def . output . extend ( [ " X " , " Y " ] ) <nl> + op_def . name = " TestOpName " <nl> + op_def . type = " TestOp " <nl> + arg1 = caffe2_pb2 . Argument ( ) <nl> + arg1 . name = " TestArg1 " <nl> + arg1 . i = 1 <nl> + arg2 = caffe2_pb2 . Argument ( ) <nl> + arg2 . name = " TestArg2 " <nl> + arg1 . s = " TestInfo " . encode ( " utf - 8 " ) <nl> + op_def . arg . extend ( [ arg1 , arg2 ] ) <nl> + op_def . device_option . CopyFrom ( caffe2_pb2 . DeviceOption ( ) ) <nl> + op_def . engine = " TestEngine " . encode ( " utf - 8 " ) <nl> + op_def . control_input . extend ( [ " input1 " , " input2 " ] ) <nl> + op_def . is_gradient_op = True <nl> + op_def . debug_info = " TestDebugInfo " <nl> + <nl> + node = convert . OperatorDefToNodeProto ( op_def ) <nl> + <nl> + self . assertEqual ( node . input , op_def . input ) <nl> + self . assertEqual ( node . output , op_def . output ) <nl> + self . assertEqual ( node . name , op_def . name ) <nl> + self . assertEqual ( node . op_type , op_def . type ) <nl> + self . assertEqual ( node . attribute [ 0 ] . name , op_def . arg [ 0 ] . name ) <nl> + self . assertEqual ( node . attribute [ 1 ] . name , op_def . arg [ 1 ] . name ) <nl> + self . assertEqual ( node . device_option , op_def . device_option ) <nl> + node_engine = [ a . s . decode ( " utf - 8 " ) for a in node . annotations if a . name = = " engine " ] [ 0 ] <nl> + self . assertEqual ( node_engine , op_def . engine ) <nl> + node_control_input = [ a . strings for a in node . annotations if a . name = = " control_input " ] [ 0 ] <nl> + self . assertEqual ( len ( node_control_input ) , len ( op_def . control_input ) ) <nl> + for x , y in zip ( node_control_input , op_def . control_input ) : <nl> + self . assertEqual ( x . decode ( " utf - 8 " ) , y ) <nl> + self . assertEqual ( node . doc_string , op_def . debug_info ) <nl> + node_is_gradient_op = [ a . i for a in node . annotations if a . name = = " is_gradient_op " ] [ 0 ] <nl> + self . assertEqual ( node_is_gradient_op , int ( op_def . is_gradient_op ) ) <nl> + <nl> + def testNodeProto2OperatorDef ( self ) : <nl> + node = torch_pb2 . NodeProto ( ) <nl> + node . input . extend ( [ " A " , " B " , " C " ] ) <nl> + node . output . extend ( [ " X " , " Y " ] ) <nl> + node . name = " TestOpName " <nl> + node . op_type = " TestOp " <nl> + attr1 = torch_pb2 . AttributeProto ( ) <nl> + attr1 . name = " TestAttr1 " <nl> + attr1 . type = torch_pb2 . AttributeProto . STRING <nl> + attr1 . s = " TestInfo " . encode ( " utf - 8 " ) <nl> + attr2 = torch_pb2 . AttributeProto ( ) <nl> + attr2 . name = " TestAttr2 " <nl> + attr2 . type = torch_pb2 . AttributeProto . INT <nl> + attr2 . i = 10 <nl> + node . attribute . extend ( [ attr1 , attr2 ] ) <nl> + node . device_option . CopyFrom ( caffe2_pb2 . DeviceOption ( ) ) <nl> + anno1 = torch_pb2 . AttributeProto ( ) <nl> + anno1 . name = " engine " <nl> + anno1 . type = torch_pb2 . AttributeProto . STRING <nl> + anno1 . s = " TestEngine " . encode ( " utf - 8 " ) <nl> + anno2 = torch_pb2 . AttributeProto ( ) <nl> + anno2 . name = " control_input " <nl> + anno2 . type = torch_pb2 . AttributeProto . STRINGS <nl> + anno2 . strings . extend ( [ " input1 " . encode ( " utf - 8 " ) , " input2 " . encode ( " utf - 8 " ) ] ) <nl> + anno3 = torch_pb2 . AttributeProto ( ) <nl> + anno3 . name = " is_gradient_op " <nl> + anno3 . type = torch_pb2 . AttributeProto . INT <nl> + anno3 . i = 1 <nl> + node . annotations . extend ( [ anno1 , anno2 , anno3 ] ) <nl> + node . doc_string = " TestDocString " . encode ( " utf - 8 " ) <nl> + <nl> + op_def = convert . NodeProtoToOperatorDef ( node ) <nl> + <nl> + self . assertEqual ( op_def . input , node . input ) <nl> + self . assertEqual ( op_def . output , node . output ) <nl> + self . assertEqual ( op_def . name , node . name ) <nl> + self . assertEqual ( op_def . type , node . op_type ) <nl> + self . assertEqual ( op_def . arg [ 0 ] . name , node . attribute [ 0 ] . name ) <nl> + self . assertEqual ( op_def . arg [ 1 ] . name , node . attribute [ 1 ] . name ) <nl> + self . assertEqual ( op_def . device_option , node . device_option ) <nl> + node_engine = [ a . s for a in node . annotations if a . name = = " engine " ] [ 0 ] <nl> + self . assertEqual ( op_def . engine , node_engine . decode ( " utf - 8 " ) ) <nl> + node_control_input = [ a . strings for a in node . annotations if a . name = = " control_input " ] [ 0 ] <nl> + for x , y in zip ( op_def . control_input , node_control_input ) : <nl> + self . assertEqual ( x , y . decode ( " utf - 8 " ) ) <nl> + self . assertEqual ( op_def . debug_info , node . doc_string ) <nl> + node_is_gradient_op = [ a . i for a in node . annotations if a . name = = " is_gradient_op " ] [ 0 ] <nl> + self . assertEqual ( int ( op_def . is_gradient_op ) , node_is_gradient_op ) <nl> + <nl> + def testEnd2End ( self ) : <nl> + op_def = caffe2_pb2 . OperatorDef ( ) <nl> + op_def . type = " Add " <nl> + op_def . input . extend ( [ " input1 " ] ) <nl> + op_def . input . extend ( [ " input2 " ] ) <nl> + op_def . output . extend ( [ " output1 " ] ) <nl> + node = convert . OperatorDefToNodeProto ( op_def ) <nl> + <nl> + input1 = np . random . randn ( 1 , 3 , 1 , 5 ) . astype ( np . float32 ) <nl> + input2 = np . random . randn ( 2 , 1 , 4 , 1 ) . astype ( np . float32 ) <nl> + ref_output1 = input1 + input2 <nl> + workspace . FeedBlob ( " input1 " , input1 ) <nl> + workspace . FeedBlob ( " input2 " , input2 ) <nl> + self . assertEqual ( workspace . RunOperatorOnce ( node . SerializeToString ( ) , legacy_proto = False ) , True ) <nl> + <nl> + self . assertEqual ( workspace . HasBlob ( " output1 " ) , True ) <nl> + fetched_back = workspace . FetchBlob ( " output1 " ) <nl> + np . testing . assert_array_equal ( fetched_back , ref_output1 ) <nl> + <nl> + def testRoundTrip ( self ) : <nl> + op_def = caffe2_pb2 . OperatorDef ( ) <nl> + op_def . type = " Add " <nl> + op_def . input . extend ( [ " input1 " ] ) <nl> + op_def . input . extend ( [ " input2 " ] ) <nl> + op_def . output . extend ( [ " output1 " ] ) <nl> + node = convert . OperatorDefToNodeProto ( op_def ) <nl> + new_op_def = convert . NodeProtoToOperatorDef ( node ) <nl> + <nl> + input1 = np . random . randn ( 1 , 3 , 1 , 5 ) . astype ( np . float32 ) <nl> + input2 = np . random . randn ( 2 , 1 , 4 , 1 ) . astype ( np . float32 ) <nl> + ref_output1 = input1 + input2 <nl> + workspace . FeedBlob ( " input1 " , input1 ) <nl> + workspace . FeedBlob ( " input2 " , input2 ) <nl> + self . assertEqual ( workspace . RunOperatorOnce ( new_op_def . SerializeToString ( ) ) , True ) <nl> + <nl> + self . assertEqual ( workspace . HasBlob ( " output1 " ) , True ) <nl> + fetched_back = workspace . FetchBlob ( " output1 " ) <nl> + np . testing . assert_array_equal ( fetched_back , ref_output1 ) <nl> + <nl> + <nl> + if __name__ = = ' __main__ ' : <nl> + unittest . main ( ) <nl> mmm a / caffe2 / python / pybind_state . cc <nl> ppp b / caffe2 / python / pybind_state . cc <nl> <nl> # include " caffe2 / predictor / predictor . h " <nl> # include " caffe2 / python / pybind_state_registry . h " <nl> # include " caffe2 / utils / cpuid . h " <nl> + # include " caffe2 / utils / proto_convert . h " <nl> # include " caffe2 / utils / string_utils . h " <nl> <nl> namespace caffe2 { <nl> void addGlobalMethods ( py : : module & m ) { <nl> return true ; <nl> } ) ; <nl> m . def ( " nets " , [ ] ( ) { return gWorkspace - > Nets ( ) ; } ) ; <nl> - m . def ( " run_operator_once " , [ ] ( const py : : bytes & op_def ) { <nl> + m . def ( " run_operator_once " , [ ] ( const py : : bytes & op_def , bool legacy_proto = true ) { <nl> CAFFE_ENFORCE ( gWorkspace ) ; <nl> OperatorDef def ; <nl> - CAFFE_ENFORCE ( <nl> - ParseProtoFromLargeString ( op_def . cast < std : : string > ( ) , & def ) ) ; <nl> + if ( legacy_proto ) { <nl> + CAFFE_ENFORCE ( ParseProtoFromLargeString ( op_def . cast < std : : string > ( ) , & def ) ) ; <nl> + } else { <nl> + : : torch : : NodeProto node ; <nl> + CAFFE_ENFORCE ( <nl> + ParseProtoFromLargeString ( op_def . cast < std : : string > ( ) , & node ) ) ; <nl> + NodeProtoToOperatorDef ( node , & def ) ; <nl> + } <nl> py : : gil_scoped_release g ; <nl> CAFFE_ENFORCE ( gWorkspace - > RunOperatorOnce ( def ) ) ; <nl> return true ; <nl> void addGlobalMethods ( py : : module & m ) { <nl> CAFFE_ENFORCE ( blob ) ; <nl> return BlobStat : : sizeBytes ( * blob ) ; <nl> } ) ; <nl> + m . def ( " argument_to_attribute_proto " , [ ] ( py : : bytes arg_str ) - > py : : bytes { <nl> + Argument arg ; <nl> + CAFFE_ENFORCE ( <nl> + ParseProtoFromLargeString ( arg_str . cast < std : : string > ( ) , & arg ) ) ; <nl> + : : torch : : AttributeProto attr ; <nl> + ArgumentToAttributeProto ( arg , & attr ) ; <nl> + return attr . SerializeAsString ( ) ; <nl> + } ) ; <nl> + m . def ( " attribute_proto_to_argument " , [ ] ( py : : bytes attr_str ) - > py : : bytes { <nl> + : : torch : : AttributeProto attr ; <nl> + CAFFE_ENFORCE ( <nl> + ParseProtoFromLargeString ( attr_str . cast < std : : string > ( ) , & attr ) ) ; <nl> + Argument arg ; <nl> + AttributeProtoToArgument ( attr , & arg ) ; <nl> + return arg . SerializeAsString ( ) ; <nl> + } ) ; <nl> + m . def ( " operator_def_to_node_proto " , [ ] ( py : : bytes op_str ) - > py : : bytes { <nl> + OperatorDef op_def ; <nl> + CAFFE_ENFORCE ( <nl> + ParseProtoFromLargeString ( op_str . cast < std : : string > ( ) , & op_def ) ) ; <nl> + : : torch : : NodeProto node ; <nl> + OperatorDefToNodeProto ( op_def , & node ) ; <nl> + return node . SerializeAsString ( ) ; <nl> + } ) ; <nl> + m . def ( " node_proto_to_operator_def " , [ ] ( py : : bytes node_str ) - > py : : bytes { <nl> + : : torch : : NodeProto node_proto ; <nl> + CAFFE_ENFORCE ( <nl> + ParseProtoFromLargeString ( node_str . cast < std : : string > ( ) , & node_proto ) ) ; <nl> + OperatorDef op_def ; <nl> + NodeProtoToOperatorDef ( node_proto , & op_def ) ; <nl> + return op_def . SerializeAsString ( ) ; <nl> + } ) ; <nl> m . def ( " support_onnx_export " , [ ] ( const std : : string & op ) - > bool { <nl> const OpSchema * schema = caffe2 : : OpSchemaRegistry : : Schema ( op ) ; <nl> if ( ! schema ) { <nl> mmm a / caffe2 / python / workspace . py <nl> ppp b / caffe2 / python / workspace . py <nl> def GetOperatorCost ( operator , blobs ) : <nl> return C . get_operator_cost ( StringifyProto ( operator ) , blobs ) <nl> <nl> <nl> - def RunOperatorOnce ( operator ) : <nl> - return C . run_operator_once ( StringifyProto ( operator ) ) <nl> + def RunOperatorOnce ( operator , legacy_proto = True ) : <nl> + return C . run_operator_once ( StringifyProto ( operator ) , legacy_proto ) <nl> <nl> <nl> def RunOperatorsOnce ( operators ) : <nl> mmm a / caffe2 / utils / CMakeLists . txt <nl> ppp b / caffe2 / utils / CMakeLists . txt <nl> <nl> list ( APPEND Caffe2_CPU_SRCS <nl> + utils / proto_convert . cc <nl> utils / proto_wrap . cc <nl> utils / proto_utils . cc <nl> utils / murmur_hash3 . cc <nl> new file mode 100644 <nl> index 000000000000 . . 24984203bcb8 <nl> mmm / dev / null <nl> ppp b / caffe2 / utils / proto_convert . cc <nl> <nl> + # include " caffe2 / utils / proto_convert . h " <nl> + # include " caffe2 / core / logging . h " <nl> + <nl> + namespace caffe2 { <nl> + <nl> + CAFFE2_EXPORT void ArgumentToAttributeProto ( <nl> + const Argument & arg , <nl> + : : torch : : AttributeProto * attr ) { <nl> + CAFFE_ENFORCE ( arg . has_name ( ) ) ; <nl> + attr - > set_name ( arg . name ( ) ) ; <nl> + if ( arg . has_f ( ) ) { <nl> + attr - > set_f ( arg . f ( ) ) ; <nl> + } else if ( arg . has_i ( ) ) { <nl> + attr - > set_i ( arg . i ( ) ) ; <nl> + } else if ( arg . has_s ( ) ) { <nl> + attr - > set_s ( arg . s ( ) ) ; <nl> + } else if ( arg . has_n ( ) ) { <nl> + / / TODO <nl> + CAFFE_THROW ( " NetDef conversion is not implemented yet . " ) ; <nl> + } else if ( arg . floats_size ( ) > 0 ) { <nl> + attr - > mutable_floats ( ) - > CopyFrom ( arg . floats ( ) ) ; <nl> + } else if ( arg . ints_size ( ) > 0 ) { <nl> + attr - > mutable_ints ( ) - > CopyFrom ( arg . ints ( ) ) ; <nl> + } else if ( arg . strings_size ( ) > 0 ) { <nl> + attr - > mutable_strings ( ) - > CopyFrom ( arg . strings ( ) ) ; <nl> + } else if ( arg . nets_size ( ) > 0 ) { <nl> + / / TODO <nl> + CAFFE_THROW ( " NetDefs conversion is not implemented yet . " ) ; <nl> + } <nl> + } <nl> + <nl> + CAFFE2_EXPORT void AttributeProtoToArgument ( <nl> + const : : torch : : AttributeProto & attr , <nl> + Argument * arg ) { <nl> + CAFFE_ENFORCE ( attr . has_name ( ) ) ; <nl> + arg - > set_name ( attr . name ( ) ) ; <nl> + CAFFE_ENFORCE ( attr . has_type ( ) ) ; <nl> + const auto type = attr . type ( ) ; <nl> + if ( type = = <nl> + : : torch : : AttributeProto_AttributeType : : <nl> + AttributeProto_AttributeType_FLOAT ) { <nl> + CAFFE_ENFORCE ( attr . has_f ( ) ) ; <nl> + arg - > set_f ( attr . f ( ) ) ; <nl> + } else if ( <nl> + type = = <nl> + : : torch : : AttributeProto_AttributeType : : AttributeProto_AttributeType_INT ) { <nl> + CAFFE_ENFORCE ( attr . has_i ( ) ) ; <nl> + arg - > set_i ( attr . i ( ) ) ; <nl> + } else if ( <nl> + type = = <nl> + : : torch : : AttributeProto_AttributeType : : <nl> + AttributeProto_AttributeType_STRING ) { <nl> + CAFFE_ENFORCE ( attr . has_s ( ) ) ; <nl> + arg - > set_s ( attr . s ( ) ) ; <nl> + } else if ( <nl> + type = = <nl> + : : torch : : AttributeProto_AttributeType : : <nl> + AttributeProto_AttributeType_TENSOR ) { <nl> + CAFFE_THROW ( " Caffe2 ' s Argument does not support tensor as attribute . " ) ; <nl> + } else if ( <nl> + type = = <nl> + : : torch : : AttributeProto_AttributeType : : <nl> + AttributeProto_AttributeType_GRAPH ) { <nl> + / / TODO <nl> + CAFFE_THROW ( " GraphProto conversion is not implemented yet . " ) ; <nl> + } else if ( <nl> + type = = <nl> + : : torch : : AttributeProto_AttributeType : : <nl> + AttributeProto_AttributeType_FLOATS ) { <nl> + arg - > mutable_floats ( ) - > CopyFrom ( attr . floats ( ) ) ; <nl> + } else if ( <nl> + type = = <nl> + : : torch : : AttributeProto_AttributeType : : <nl> + AttributeProto_AttributeType_INTS ) { <nl> + arg - > mutable_ints ( ) - > CopyFrom ( attr . ints ( ) ) ; <nl> + } else if ( <nl> + type = = <nl> + : : torch : : AttributeProto_AttributeType : : <nl> + AttributeProto_AttributeType_STRINGS ) { <nl> + arg - > mutable_strings ( ) - > CopyFrom ( attr . strings ( ) ) ; <nl> + } else if ( <nl> + type = = <nl> + : : torch : : AttributeProto_AttributeType : : <nl> + AttributeProto_AttributeType_TENSORS ) { <nl> + CAFFE_THROW ( " Caffe2 ' s Argument does not support tensors as attribute . " ) ; <nl> + } else if ( <nl> + type = = <nl> + : : torch : : AttributeProto_AttributeType : : <nl> + AttributeProto_AttributeType_GRAPHS ) { <nl> + / / TODO <nl> + CAFFE_THROW ( " GraphProtos conversion is not implemented yet . " ) ; <nl> + } else { <nl> + CAFFE_THROW ( " Unknow Attribute type . " ) ; <nl> + } <nl> + } <nl> + <nl> + CAFFE2_EXPORT void OperatorDefToNodeProto ( <nl> + const OperatorDef & def , <nl> + : : torch : : NodeProto * node ) { <nl> + node - > mutable_input ( ) - > CopyFrom ( def . input ( ) ) ; <nl> + node - > mutable_output ( ) - > CopyFrom ( def . output ( ) ) ; <nl> + if ( def . has_name ( ) ) { <nl> + node - > set_name ( def . name ( ) ) ; <nl> + } <nl> + CAFFE_ENFORCE ( def . has_type ( ) ) ; <nl> + node - > set_op_type ( def . type ( ) ) ; <nl> + for ( int i = 0 ; i < def . arg_size ( ) ; + + i ) { <nl> + auto attr = node - > add_attribute ( ) ; <nl> + ArgumentToAttributeProto ( def . arg ( i ) , attr ) ; <nl> + } <nl> + if ( def . has_device_option ( ) ) { <nl> + node - > mutable_device_option ( ) - > CopyFrom ( def . device_option ( ) ) ; <nl> + } <nl> + if ( def . has_engine ( ) ) { <nl> + auto attr = node - > add_annotations ( ) ; <nl> + attr - > set_name ( " engine " ) ; <nl> + attr - > set_type ( : : torch : : AttributeProto_AttributeType : : <nl> + AttributeProto_AttributeType_STRING ) ; <nl> + attr - > set_s ( def . engine ( ) ) ; <nl> + } <nl> + if ( def . control_input_size ( ) > 0 ) { <nl> + auto attr = node - > add_annotations ( ) ; <nl> + attr - > set_name ( " control_input " ) ; <nl> + attr - > set_type ( : : torch : : AttributeProto_AttributeType : : <nl> + AttributeProto_AttributeType_STRINGS ) ; <nl> + attr - > mutable_strings ( ) - > CopyFrom ( def . control_input ( ) ) ; <nl> + } <nl> + if ( def . has_is_gradient_op ( ) ) { <nl> + auto attr = node - > add_annotations ( ) ; <nl> + attr - > set_name ( " is_gradient_op " ) ; <nl> + attr - > set_type ( : : torch : : AttributeProto_AttributeType : : <nl> + AttributeProto_AttributeType_INT ) ; <nl> + if ( def . is_gradient_op ( ) ) { <nl> + attr - > set_i ( 1 ) ; <nl> + } else { <nl> + attr - > set_i ( 0 ) ; <nl> + } <nl> + } <nl> + if ( def . has_debug_info ( ) ) { <nl> + node - > set_doc_string ( def . debug_info ( ) ) ; <nl> + } <nl> + } <nl> + <nl> + CAFFE2_EXPORT void NodeProtoToOperatorDef ( <nl> + const : : torch : : NodeProto & node , <nl> + OperatorDef * def ) { <nl> + def - > mutable_input ( ) - > CopyFrom ( node . input ( ) ) ; <nl> + def - > mutable_output ( ) - > CopyFrom ( node . output ( ) ) ; <nl> + if ( node . has_name ( ) ) { <nl> + def - > set_name ( node . name ( ) ) ; <nl> + } <nl> + <nl> + CAFFE_ENFORCE ( node . has_op_type ( ) ) ; <nl> + def - > set_type ( node . op_type ( ) ) ; <nl> + for ( int i = 0 ; i < node . attribute_size ( ) ; + + i ) { <nl> + auto arg = def - > add_arg ( ) ; <nl> + AttributeProtoToArgument ( node . attribute ( i ) , arg ) ; <nl> + } <nl> + if ( node . has_doc_string ( ) ) { <nl> + def - > set_debug_info ( node . doc_string ( ) ) ; <nl> + } <nl> + for ( int i = 0 ; i < node . annotations_size ( ) ; + + i ) { <nl> + const auto & attr = node . annotations ( i ) ; <nl> + CAFFE_ENFORCE ( attr . has_name ( ) ) ; <nl> + if ( attr . name ( ) = = " engine " ) { <nl> + CAFFE_ENFORCE ( attr . has_s ( ) ) ; <nl> + def - > set_engine ( attr . s ( ) ) ; <nl> + } else if ( attr . name ( ) = = " control_input " ) { <nl> + def - > mutable_control_input ( ) - > CopyFrom ( attr . strings ( ) ) ; <nl> + } else if ( attr . name ( ) = = " is_gradient_op " ) { <nl> + CAFFE_ENFORCE ( attr . has_i ( ) ) ; <nl> + if ( i = = 0 ) { <nl> + def - > set_is_gradient_op ( false ) ; <nl> + } else { <nl> + def - > set_is_gradient_op ( true ) ; <nl> + } <nl> + } <nl> + auto arg = def - > add_arg ( ) ; <nl> + AttributeProtoToArgument ( node . annotations ( i ) , arg ) ; <nl> + } <nl> + if ( node . has_device_option ( ) ) { <nl> + def - > mutable_device_option ( ) - > CopyFrom ( node . device_option ( ) ) ; <nl> + } <nl> + } <nl> + <nl> + } / / namespace caffe2 <nl> new file mode 100644 <nl> index 000000000000 . . a9ca9c3ad4fa <nl> mmm / dev / null <nl> ppp b / caffe2 / utils / proto_convert . h <nl> <nl> + # ifndef CAFFE2_UTILS_PROTO_CONVERT_H_ <nl> + # define CAFFE2_UTILS_PROTO_CONVERT_H_ <nl> + <nl> + # include " caffe2 / core / common . h " <nl> + # include " caffe2 / proto / caffe2_pb . h " <nl> + # include " caffe2 / proto / torch_pb . h " <nl> + <nl> + namespace caffe2 { <nl> + <nl> + CAFFE2_API void ArgumentToAttributeProto ( <nl> + const Argument & arg , <nl> + : : torch : : AttributeProto * attr ) ; <nl> + CAFFE2_API void AttributeProtoToArgument ( <nl> + const : : torch : : AttributeProto & attr , <nl> + Argument * arg ) ; <nl> + CAFFE2_API void OperatorDefToNodeProto ( <nl> + const OperatorDef & def , <nl> + : : torch : : NodeProto * node ) ; <nl> + CAFFE2_API void NodeProtoToOperatorDef ( <nl> + const : : torch : : NodeProto & node , <nl> + OperatorDef * def ) ; <nl> + <nl> + } / / namespace caffe2 <nl> + <nl> + # endif / / CAFFE2_UTILS_PROTO_CONVERT_H_ <nl>
OperatorDef < = = > NodeProto Conversion ( )
pytorch/pytorch
32494c226ec27066136522092647d9fe91557201
2018-09-19T15:41:33Z
mmm a / src / platform - linux . cc <nl> ppp b / src / platform - linux . cc <nl> static int GetThreadID ( ) { <nl> <nl> <nl> static void ProfilerSignalHandler ( int signal , siginfo_t * info , void * context ) { <nl> - # ifndef V8_HOST_ARCH_MIPS <nl> USE ( info ) ; <nl> if ( signal ! = SIGPROF ) return ; <nl> Isolate * isolate = Isolate : : UncheckedCurrent ( ) ; <nl> static void ProfilerSignalHandler ( int signal , siginfo_t * info , void * context ) { <nl> sample - > pc = reinterpret_cast < Address > ( mcontext . arm_pc ) ; <nl> sample - > sp = reinterpret_cast < Address > ( mcontext . arm_sp ) ; <nl> sample - > fp = reinterpret_cast < Address > ( mcontext . arm_fp ) ; <nl> - # endif <nl> + # endif / / ( __GLIBC__ < 2 | | ( __GLIBC__ = = 2 & & __GLIBC_MINOR__ < = 3 ) ) <nl> # elif V8_HOST_ARCH_MIPS <nl> - sample . pc = reinterpret_cast < Address > ( mcontext . pc ) ; <nl> - sample . sp = reinterpret_cast < Address > ( mcontext . gregs [ 29 ] ) ; <nl> - sample . fp = reinterpret_cast < Address > ( mcontext . gregs [ 30 ] ) ; <nl> - # endif <nl> + sample - > pc = reinterpret_cast < Address > ( mcontext . pc ) ; <nl> + sample - > sp = reinterpret_cast < Address > ( mcontext . gregs [ 29 ] ) ; <nl> + sample - > fp = reinterpret_cast < Address > ( mcontext . gregs [ 30 ] ) ; <nl> + # endif / / V8_HOST_ARCH_ * <nl> sampler - > SampleStack ( sample ) ; <nl> sampler - > Tick ( sample ) ; <nl> - # endif <nl> } <nl> <nl> <nl>
MIPS : Enable the V8 profiler on MIPS .
v8/v8
09e97c41f2b827f09990226e64b60f9e8eaf14ae
2011-11-09T11:57:05Z
mmm a / src / MainWindow . cpp <nl> ppp b / src / MainWindow . cpp <nl> void MainWindow : : setCurrentFile ( const QString & fileName ) <nl> void MainWindow : : addToRecentFilesMenu ( const QString & filename ) <nl> { <nl> QStringList files = Settings : : getSettingsValue ( " General " , " recentFileList " ) . toStringList ( ) ; <nl> - files . removeAll ( filename ) ; <nl> - files . prepend ( filename ) ; <nl> + QFileInfo info ( filename ) ; <nl> + <nl> + files . removeAll ( info . absoluteFilePath ( ) ) ; <nl> + files . prepend ( info . absoluteFilePath ( ) ) ; <nl> while ( files . size ( ) > MaxRecentFiles ) <nl> files . removeLast ( ) ; <nl> <nl>
Add absolutePath to the recent Menu . Fix ( )
sqlitebrowser/sqlitebrowser
8ac4c0342acd2b640f22f5cee2c20d1aa8ec1956
2017-02-28T14:44:39Z
mmm a / editor / code_editor . cpp <nl> ppp b / editor / code_editor . cpp <nl> void FindReplaceBar : : _replace_text_entered ( const String & p_text ) { <nl> if ( selection_only - > is_pressed ( ) & & text_edit - > is_selection_active ( ) ) { <nl> _replace_all ( ) ; <nl> _hide_bar ( ) ; <nl> + } else if ( Input : : get_singleton ( ) - > is_key_pressed ( KEY_SHIFT ) ) { <nl> + _replace ( ) ; <nl> + search_prev ( ) ; <nl> + } else { <nl> + _replace ( ) ; <nl> } <nl> } <nl> <nl>
Allow using Enter key for replacing text in code editors ( also Shift + Enter works backwards )
godotengine/godot
1adcd57377a4364e0c5f28d7aa929ac98827eb9d
2020-02-08T20:46:04Z
mmm a / src / log . cc <nl> ppp b / src / log . cc <nl> class Profiler : public Thread { <nl> bool Profiler : : paused_ = false ; <nl> <nl> <nl> + / / <nl> + / / StackTracer implementation <nl> + / / <nl> + void StackTracer : : Trace ( TickSample * sample ) { <nl> + / / Assuming that stack grows from lower addresses <nl> + if ( sample - > sp < sample - > fp & & sample - > fp < low_stack_bound_ ) { <nl> + sample - > InitStack ( 1 ) ; <nl> + sample - > stack [ 0 ] = Memory : : Address_at ( <nl> + ( Address ) ( sample - > fp + StandardFrameConstants : : kCallerPCOffset ) ) ; <nl> + } else { <nl> + / / FP seems to be in some intermediate state , better discard this sample <nl> + sample - > InitStack ( 0 ) ; <nl> + } <nl> + } <nl> + <nl> + <nl> / / <nl> / / Ticker used to provide ticks to the profiler and the sliding state <nl> / / window . <nl> class Ticker : public Sampler { <nl> public : <nl> explicit Ticker ( int interval , unsigned int low_stack_bound ) : <nl> Sampler ( interval , FLAG_prof ) , window_ ( NULL ) , profiler_ ( NULL ) , <nl> - low_stack_bound_ ( low_stack_bound ) { } <nl> + stack_tracer_ ( low_stack_bound ) { } <nl> <nl> ~ Ticker ( ) { if ( IsActive ( ) ) Stop ( ) ; } <nl> <nl> void Tick ( TickSample * sample ) { <nl> - if ( IsProfiling ( ) ) SampleStack ( sample ) ; <nl> + if ( IsProfiling ( ) ) stack_tracer_ . Trace ( sample ) ; <nl> if ( profiler_ ) profiler_ - > Insert ( sample ) ; <nl> if ( window_ ) window_ - > AddState ( sample - > state ) ; <nl> } <nl> class Ticker : public Sampler { <nl> } <nl> <nl> private : <nl> - void SampleStack ( TickSample * sample ) { <nl> - / / Assuming that stack grows from lower addresses <nl> - if ( sample - > sp < sample - > fp & & sample - > fp < low_stack_bound_ ) { <nl> - sample - > InitStack ( 1 ) ; <nl> - sample - > stack [ 0 ] = Memory : : Address_at ( <nl> - ( Address ) ( sample - > fp + StandardFrameConstants : : kCallerPCOffset ) ) ; <nl> - } else { <nl> - / / FP seems to be in some intermediate state , better discard this sample <nl> - sample - > InitStack ( 0 ) ; <nl> - } <nl> - } <nl> - <nl> SlidingStateWindow * window_ ; <nl> Profiler * profiler_ ; <nl> - unsigned int low_stack_bound_ ; <nl> + StackTracer stack_tracer_ ; <nl> } ; <nl> <nl> <nl> mmm a / src / log . h <nl> ppp b / src / log . h <nl> class Logger { <nl> } ; <nl> <nl> <nl> + / / Class that extracts stack trace , used for profiling <nl> + class StackTracer BASE_EMBEDDED { <nl> + public : <nl> + StackTracer ( unsigned int low_stack_bound ) : low_stack_bound_ ( low_stack_bound ) { <nl> + } <nl> + void Trace ( TickSample * sample ) ; <nl> + private : <nl> + unsigned int low_stack_bound_ ; <nl> + } ; <nl> + <nl> + <nl> } } / / namespace v8 : : internal <nl> <nl> # endif / / V8_LOG_H_ <nl> mmm a / test / cctest / SConscript <nl> ppp b / test / cctest / SConscript <nl> SOURCES = { <nl> ' test - sockets . cc ' <nl> ] , <nl> ' arch : arm ' : [ ' test - assembler - arm . cc ' , ' test - disasm - arm . cc ' ] , <nl> - ' arch : ia32 ' : [ ' test - assembler - ia32 . cc ' , ' test - disasm - ia32 . cc ' ] , <nl> + ' arch : ia32 ' : [ ' test - assembler - ia32 . cc ' , ' test - disasm - ia32 . cc ' , ' test - log - ia32 . cc ' ] , <nl> ' os : linux ' : [ ' test - platform - linux . cc ' ] , <nl> ' os : macos ' : [ ' test - platform - macos . cc ' ] , <nl> ' os : nullos ' : [ ' test - platform - nullos . cc ' ] , <nl> new file mode 100644 <nl> index 00000000000 . . 07ba07be9f1 <nl> mmm / dev / null <nl> ppp b / test / cctest / test - log - ia32 . cc <nl> <nl> + / / Copyright 2006 - 2009 the V8 project authors . All rights reserved . <nl> + / / <nl> + / / Tests of profiler - related functions from log . h <nl> + <nl> + # include < stdlib . h > <nl> + <nl> + # include " v8 . h " <nl> + <nl> + # include " log . h " <nl> + # include " cctest . h " <nl> + <nl> + using v8 : : Function ; <nl> + using v8 : : Local ; <nl> + using v8 : : Object ; <nl> + using v8 : : Script ; <nl> + using v8 : : String ; <nl> + using v8 : : Value ; <nl> + <nl> + using v8 : : internal : : byte ; <nl> + using v8 : : internal : : Handle ; <nl> + using v8 : : internal : : JSFunction ; <nl> + using v8 : : internal : : StackTracer ; <nl> + using v8 : : internal : : TickSample ; <nl> + <nl> + <nl> + static v8 : : Persistent < v8 : : Context > env ; <nl> + <nl> + <nl> + static struct { <nl> + StackTracer * tracer ; <nl> + TickSample * sample ; <nl> + } trace_env ; <nl> + <nl> + <nl> + static void InitTraceEnv ( StackTracer * tracer , TickSample * sample ) { <nl> + trace_env . tracer = tracer ; <nl> + trace_env . sample = sample ; <nl> + } <nl> + <nl> + <nl> + static void DoTrace ( unsigned int fp ) { <nl> + trace_env . sample - > fp = fp ; <nl> + / / something that is less than fp <nl> + trace_env . sample - > sp = trace_env . sample - > fp - sizeof ( unsigned int ) ; <nl> + trace_env . tracer - > Trace ( trace_env . sample ) ; <nl> + } <nl> + <nl> + <nl> + static void CFuncDoTrace ( ) { <nl> + unsigned int fp ; <nl> + # ifdef __GNUC__ <nl> + fp = reinterpret_cast < unsigned int > ( __builtin_frame_address ( 0 ) ) ; <nl> + # elif defined _MSC_VER <nl> + __asm mov [ fp ] , ebp <nl> + # endif <nl> + DoTrace ( fp ) ; <nl> + } <nl> + <nl> + <nl> + static void CFunc ( int i ) { <nl> + for ( int j = i ; j > = 0 ; - - j ) { <nl> + CFuncDoTrace ( ) ; <nl> + } <nl> + } <nl> + <nl> + <nl> + static void CheckRetAddrIsInFunction ( unsigned int ret_addr , <nl> + unsigned int func_start_addr , <nl> + unsigned int func_len ) { <nl> + printf ( " CheckRetAddrIsInFunction : % 08x % 08x % 08x \ n " , <nl> + func_start_addr , ret_addr , func_start_addr + func_len ) ; <nl> + CHECK_GE ( ret_addr , func_start_addr ) ; <nl> + CHECK_GE ( func_start_addr + func_len , ret_addr ) ; <nl> + } <nl> + <nl> + <nl> + # ifdef DEBUG <nl> + static const int kMaxCFuncLen = 0x40 ; / / seems enough for a small C function <nl> + <nl> + static void CheckRetAddrIsInCFunction ( unsigned int ret_addr , <nl> + unsigned int func_start_addr ) { <nl> + CheckRetAddrIsInFunction ( ret_addr , func_start_addr , kMaxCFuncLen ) ; <nl> + } <nl> + # endif <nl> + <nl> + <nl> + TEST ( PureCStackTrace ) { <nl> + TickSample sample ; <nl> + StackTracer tracer ( reinterpret_cast < unsigned int > ( & sample ) ) ; <nl> + InitTraceEnv ( & tracer , & sample ) ; <nl> + CFunc ( 0 ) ; <nl> + # ifdef DEBUG <nl> + / / C stack trace works only in debug mode , in release mode EBP is <nl> + / / usually treated as a general - purpose register <nl> + CheckRetAddrIsInCFunction ( reinterpret_cast < unsigned int > ( sample . stack [ 0 ] ) , <nl> + reinterpret_cast < unsigned int > ( & CFunc ) ) ; <nl> + CHECK_EQ ( 0 , sample . stack [ 1 ] ) ; <nl> + # endif <nl> + } <nl> + <nl> + <nl> + / / mmm T r a c e E x t e n s i o n mmm <nl> + <nl> + class TraceExtension : public v8 : : Extension { <nl> + public : <nl> + TraceExtension ( ) : v8 : : Extension ( " v8 / trace " , kSource ) { } <nl> + virtual v8 : : Handle < v8 : : FunctionTemplate > GetNativeFunction ( <nl> + v8 : : Handle < v8 : : String > name ) ; <nl> + static v8 : : Handle < v8 : : Value > Trace ( const v8 : : Arguments & args ) ; <nl> + private : <nl> + static const char * kSource ; <nl> + } ; <nl> + <nl> + <nl> + const char * TraceExtension : : kSource = " native function trace ( ) ; " ; <nl> + <nl> + <nl> + v8 : : Handle < v8 : : FunctionTemplate > TraceExtension : : GetNativeFunction ( <nl> + v8 : : Handle < v8 : : String > str ) { <nl> + return v8 : : FunctionTemplate : : New ( TraceExtension : : Trace ) ; <nl> + } <nl> + <nl> + <nl> + v8 : : Handle < v8 : : Value > TraceExtension : : Trace ( const v8 : : Arguments & args ) { <nl> + CHECK_EQ ( 1 , args . Length ( ) ) ; <nl> + unsigned int fp = args [ 0 ] - > Int32Value ( ) < < 2 ; <nl> + printf ( " Trace : % 08x \ n " , fp ) ; <nl> + DoTrace ( fp ) ; <nl> + return v8 : : Undefined ( ) ; <nl> + } <nl> + <nl> + <nl> + static TraceExtension kTraceExtension ; <nl> + v8 : : DeclareExtension kTraceExtensionDeclaration ( & kTraceExtension ) ; <nl> + <nl> + <nl> + static void InitializeVM ( ) { <nl> + if ( env . IsEmpty ( ) ) { <nl> + v8 : : HandleScope scope ; <nl> + const char * extensions [ ] = { " v8 / trace " } ; <nl> + v8 : : ExtensionConfiguration config ( 1 , extensions ) ; <nl> + env = v8 : : Context : : New ( & config ) ; <nl> + } <nl> + v8 : : HandleScope scope ; <nl> + env - > Enter ( ) ; <nl> + } <nl> + <nl> + <nl> + static Handle < JSFunction > CompileFunction ( const char * source ) { <nl> + return v8 : : Utils : : OpenHandle ( * Script : : Compile ( String : : New ( source ) ) ) ; <nl> + } <nl> + <nl> + <nl> + static void CompileRun ( const char * source ) { <nl> + Script : : Compile ( String : : New ( source ) ) - > Run ( ) ; <nl> + } <nl> + <nl> + <nl> + static Local < Value > GetGlobalProperty ( const char * name ) { <nl> + return env - > Global ( ) - > Get ( String : : New ( name ) ) ; <nl> + } <nl> + <nl> + <nl> + static void SetGlobalProperty ( const char * name , Local < Value > value ) { <nl> + env - > Global ( ) - > Set ( String : : New ( name ) , value ) ; <nl> + } <nl> + <nl> + <nl> + static bool Patch ( byte * from , size_t num , byte * original , byte * patch , size_t patch_len ) { <nl> + byte * to = from + num ; <nl> + do { <nl> + from = ( byte * ) memchr ( from , * original , to - from ) ; <nl> + CHECK ( from ! = NULL ) ; <nl> + if ( memcmp ( original , from , patch_len ) = = 0 ) { <nl> + memcpy ( from , patch , patch_len ) ; <nl> + return true ; <nl> + } else { <nl> + from + + ; <nl> + } <nl> + } while ( to - from > 0 ) ; <nl> + return false ; <nl> + } <nl> + <nl> + <nl> + TEST ( PureJSStackTrace ) { <nl> + TickSample sample ; <nl> + StackTracer tracer ( reinterpret_cast < unsigned int > ( & sample ) ) ; <nl> + InitTraceEnv ( & tracer , & sample ) ; <nl> + <nl> + InitializeVM ( ) ; <nl> + v8 : : HandleScope scope ; <nl> + Handle < JSFunction > call_trace = CompileFunction ( " trace ( 0x6666 ) ; " ) ; <nl> + CHECK ( ! call_trace . is_null ( ) ) ; <nl> + v8 : : internal : : Code * call_trace_code = call_trace - > code ( ) ; <nl> + CHECK ( call_trace_code - > IsCode ( ) ) ; <nl> + <nl> + byte original [ ] = { 0x68 , 0xcc , 0xcc , 0x00 , 0x00 } ; / / push 0xcccc ( = 0x6666 < < 1 ) <nl> + byte patch [ ] = { 0x89 , 0xe8 , 0xd1 , 0xe8 , 0x50 } ; / / mov eax , ebp ; shr eax ; push eax ; <nl> + / / Patch generated code to replace pushing of a constant with <nl> + / / pushing of ebp contents in a Smi <nl> + CHECK ( Patch ( call_trace_code - > instruction_start ( ) , <nl> + call_trace_code - > instruction_size ( ) , <nl> + original , patch , sizeof ( patch ) ) ) ; <nl> + <nl> + SetGlobalProperty ( " JSFuncDoTrace " , v8 : : ToApi < Value > ( call_trace ) ) ; <nl> + <nl> + CompileRun ( <nl> + " function JSTrace ( ) { " <nl> + " JSFuncDoTrace ( ) ; " <nl> + " } ; \ n " <nl> + " JSTrace ( ) ; " ) ; <nl> + Handle < JSFunction > js_trace ( JSFunction : : cast ( * ( v8 : : Utils : : OpenHandle ( <nl> + * GetGlobalProperty ( " JSTrace " ) ) ) ) ) ; <nl> + v8 : : internal : : Code * js_trace_code = js_trace - > code ( ) ; <nl> + CheckRetAddrIsInFunction ( reinterpret_cast < unsigned int > ( sample . stack [ 0 ] ) , <nl> + reinterpret_cast < unsigned int > ( js_trace_code - > instruction_start ( ) ) , <nl> + js_trace_code - > instruction_size ( ) ) ; <nl> + CHECK_EQ ( 0 , sample . stack [ 1 ] ) ; <nl> + } <nl> mmm a / tools / visual_studio / v8_cctest . vcproj <nl> ppp b / tools / visual_studio / v8_cctest . vcproj <nl> <nl> RelativePath = " . . \ . . \ test \ cctest \ test - lock . cc " <nl> > <nl> < / File > <nl> + < File <nl> + RelativePath = " . . \ . . \ test \ cctest \ test - log - ia32 . cc " <nl> + > <nl> + < / File > <nl> < File <nl> RelativePath = " . . \ . . \ test \ cctest \ test - mark - compact . cc " <nl> > <nl>
Adding unit tests for profiler ' s stack tracer .
v8/v8
632d4e4f3de8d1e371cc56e7c03363c26ca31aaf
2009-02-25T16:00:21Z
mmm a / dbms / src / DataStreams / PushingToViewsBlockOutputStream . cpp <nl> ppp b / dbms / src / DataStreams / PushingToViewsBlockOutputStream . cpp <nl> <nl> # include < DataStreams / SquashingBlockInputStream . h > <nl> # include < DataTypes / NestedUtils . h > <nl> # include < Interpreters / InterpreterSelectQuery . h > <nl> + # include < Common / CurrentThread . h > <nl> + # include < Common / setThreadName . h > <nl> + # include < Common / getNumberOfPhysicalCPUCores . h > <nl> + # include < common / ThreadPool . h > <nl> # include < Storages / MergeTree / ReplicatedMergeTreeBlockOutputStream . h > <nl> <nl> - <nl> namespace DB <nl> { <nl> <nl> void PushingToViewsBlockOutputStream : : write ( const Block & block ) <nl> if ( replicated_output & & replicated_output - > lastBlockIsDuplicate ( ) ) <nl> return ; <nl> <nl> - / / / Insert data into materialized views only after successful insert into main table <nl> - for ( auto & view : views ) <nl> + / / Insert data into materialized views only after successful insert into main table <nl> + bool allow_concurrent_view_processing = context . getSettingsRef ( ) . allow_concurrent_view_processing ; <nl> + if ( allow_concurrent_view_processing & & views . size ( ) > 1 ) <nl> { <nl> - try <nl> + / / Push to views concurrently if enabled , and more than one view is attached <nl> + ThreadPool pool ( std : : min ( getNumberOfPhysicalCPUCores ( ) , views . size ( ) ) ) ; <nl> + for ( size_t view_num = 0 ; view_num < views . size ( ) ; + + view_num ) <nl> { <nl> - BlockInputStreamPtr from = std : : make_shared < OneBlockInputStream > ( block ) ; <nl> - InterpreterSelectQuery select ( view . query , * views_context , from ) ; <nl> - BlockInputStreamPtr in = std : : make_shared < MaterializingBlockInputStream > ( select . execute ( ) . in ) ; <nl> - / / / Squashing is needed here because the materialized view query can generate a lot of blocks <nl> - / / / even when only one block is inserted into the parent table ( e . g . if the query is a GROUP BY <nl> - / / / and two - level aggregation is triggered ) . <nl> - in = std : : make_shared < SquashingBlockInputStream > ( <nl> - in , context . getSettingsRef ( ) . min_insert_block_size_rows , context . getSettingsRef ( ) . min_insert_block_size_bytes ) ; <nl> - <nl> - in - > readPrefix ( ) ; <nl> - <nl> - while ( Block result_block = in - > read ( ) ) <nl> + auto thread_group = CurrentThread : : getGroup ( ) ; <nl> + pool . schedule ( [ = ] ( ) <nl> { <nl> - Nested : : validateArraySizes ( result_block ) ; <nl> - view . out - > write ( result_block ) ; <nl> - } <nl> - <nl> - in - > readSuffix ( ) ; <nl> - } <nl> - catch ( Exception & ex ) <nl> - { <nl> - ex . addMessage ( " while pushing to view " + view . database + " . " + view . table ) ; <nl> - throw ; <nl> + setThreadName ( " PushingToViewsBlockOutputStream " ) ; <nl> + CurrentThread : : attachToIfDetached ( thread_group ) ; <nl> + process ( block , view_num ) ; <nl> + } ) ; <nl> } <nl> + / / Wait for concurrent view processing <nl> + pool . wait ( ) ; <nl> + } <nl> + else <nl> + { <nl> + / / Process sequentially <nl> + for ( size_t view_num = 0 ; view_num < views . size ( ) ; + + view_num ) <nl> + process ( block , view_num ) ; <nl> } <nl> } <nl> <nl> void PushingToViewsBlockOutputStream : : flush ( ) <nl> view . out - > flush ( ) ; <nl> } <nl> <nl> + void PushingToViewsBlockOutputStream : : process ( const Block & block , size_t view_num ) <nl> + { <nl> + auto & view = views [ view_num ] ; <nl> + <nl> + try <nl> + { <nl> + BlockInputStreamPtr from = std : : make_shared < OneBlockInputStream > ( block ) ; <nl> + InterpreterSelectQuery select ( view . query , * views_context , from ) ; <nl> + BlockInputStreamPtr in = std : : make_shared < MaterializingBlockInputStream > ( select . execute ( ) . in ) ; <nl> + / / / Squashing is needed here because the materialized view query can generate a lot of blocks <nl> + / / / even when only one block is inserted into the parent table ( e . g . if the query is a GROUP BY <nl> + / / / and two - level aggregation is triggered ) . <nl> + in = std : : make_shared < SquashingBlockInputStream > ( <nl> + in , context . getSettingsRef ( ) . min_insert_block_size_rows , context . getSettingsRef ( ) . min_insert_block_size_bytes ) ; <nl> + <nl> + in - > readPrefix ( ) ; <nl> + <nl> + while ( Block result_block = in - > read ( ) ) <nl> + { <nl> + Nested : : validateArraySizes ( result_block ) ; <nl> + view . out - > write ( result_block ) ; <nl> + } <nl> + <nl> + in - > readSuffix ( ) ; <nl> + } <nl> + catch ( Exception & ex ) <nl> + { <nl> + ex . addMessage ( " while pushing to view " + backQuoteIfNeed ( view . database ) + " . " + backQuoteIfNeed ( view . table ) ) ; <nl> + throw ; <nl> + } <nl> + } <nl> + <nl> } <nl> mmm a / dbms / src / DataStreams / PushingToViewsBlockOutputStream . h <nl> ppp b / dbms / src / DataStreams / PushingToViewsBlockOutputStream . h <nl> class PushingToViewsBlockOutputStream : public IBlockOutputStream <nl> <nl> std : : vector < ViewInfo > views ; <nl> std : : unique_ptr < Context > views_context ; <nl> + <nl> + void process ( const Block & block , size_t view_num ) ; <nl> } ; <nl> <nl> <nl> mmm a / dbms / src / Interpreters / Settings . h <nl> ppp b / dbms / src / Interpreters / Settings . h <nl> struct Settings <nl> M ( SettingUInt64 , http_max_multipart_form_data_size , 1024 * 1024 * 1024 , " Limit on size of multipart / form - data content . This setting cannot be parsed from URL parameters and should be set in user profile . Note that content is parsed and external tables are created in memory before start of query execution . And this is the only limit that has effect on that stage ( limits on max memory usage and max execution time have no effect while reading HTTP form data ) . " ) \ <nl> M ( SettingBool , calculate_text_stack_trace , 1 , " Calculate text stack trace in case of exceptions during query execution . This is the default . It requires symbol lookups that may slow down fuzzing tests when huge amount of wrong queries are executed . In normal cases you should not disable this option . " ) \ <nl> M ( SettingBool , allow_ddl , true , " If it is set to true , then a user is allowed to executed DDL queries . " ) \ <nl> + M ( SettingBool , allow_concurrent_view_processing , false , " Enables pushing to attached views concurrently instead of sequentially . " ) \ <nl> <nl> <nl> # define DECLARE ( TYPE , NAME , DEFAULT , DESCRIPTION ) \ <nl>
Merge pull request from vavrusa / master
ClickHouse/ClickHouse
a4736275c689a72b975fdb22f0343139c14cf441
2018-10-01T01:42:55Z
mmm a / language / Finnish / strings . xml <nl> ppp b / language / Finnish / strings . xml <nl> <nl>  < ? xml version = " 1 . 0 " encoding = " utf - 8 " standalone = " yes " ? > <nl> < ! - - Language file translated with Team XBMC Translator - - > <nl> < ! - - Translator : Mika Pirinen - - > <nl> - < ! - - Date of translation : 12 / 12 / 2009 - - > <nl> - < ! - - Finnish strings based on English strings revision 25406 - - > <nl> + < ! - - Date of translation : 15 / 12 / 2009 - - > <nl> + < ! - - Finnish strings based on English strings revision 25728 - - > <nl> < strings > <nl> < string id = " 0 " > Ohjelmat < / string > <nl> < string id = " 1 " > Kuvat < / string > <nl> <nl> < string id = " 269 " > Järjestä : Esittäjä < / string > <nl> < string id = " 270 " > Järjestä : Albumi < / string > <nl> < string id = " 271 " > 100 suosituinta < / string > <nl> - < string id = " 272 " > Määritä kuvan vasen yläkulma < / string > <nl> - < string id = " 273 " > Määritä kuvan oikea alakulma < / string > <nl> - < string id = " 274 " > Määritä tekstityksen sijainti < / string > <nl> + < string id = " 272 " > Kuvan vasen yläkulma < / string > <nl> + < string id = " 273 " > Kuvan oikea alakulma < / string > <nl> + < string id = " 274 " > Aseta tekstityksen paikka < / string > <nl> < string id = " 275 " > Määritä pikselin muoto < / string > <nl> < string id = " 276 " > Siirtämällä nuolta voit määrittää näkyvän kuva - alan < / string > <nl> - < string id = " 277 " > Siirtämällä palkkia voit määrittää tekstityksen paikan kuvaruudulla < / string > <nl> - < string id = " 278 " > Muuta laatikon sivujen suhdetta siten , että laatikosta tulee täysin neliö < / string > <nl> + < string id = " 277 " > Siirtämällä palkkia voit määrittää tekstityksen paikan < / string > <nl> + < string id = " 278 " > Säädä suorakulmiosta täysin neliö < / string > <nl> < string id = " 279 " > Asetuksia ei voitu ladata < / string > <nl> < string id = " 280 " > Oletusasetukset otettu käyttöön < / string > <nl> < string id = " 281 " > Tarkista XML - tiedostot < / string > <nl> <nl> <nl> < string id = " 1210 " > Poista < / string > <nl> < string id = " 1211 " > Musiikki < / string > <nl> - < string id = " 1212 " > Videot < / string > <nl> + < string id = " 1212 " > Video < / string > <nl> < string id = " 1213 " > Kuvat < / string > <nl> < string id = " 1214 " > Tiedostot < / string > <nl> < string id = " 1215 " > Musiikki ja videot < / string > <nl> <nl> < string id = " 10514 " > < / string > <nl> < string id = " 10515 " > < / string > <nl> < string id = " 10516 " > Musiikki - Kirjasto < / string > <nl> - < string id = " 10517 " > Musiikki - Nyt soitossa < / string > <nl> + < string id = " 10517 " > Musiikki - Nyt toistetaan < / string > <nl> < string id = " 10518 " > < / string > <nl> < string id = " 10519 " > < / string > <nl> < string id = " 10520 " > < / string > <nl> < string id = " 10521 " > < / string > <nl> - < string id = " 10522 " > Videot - Nyt soitossa < / string > <nl> + < string id = " 10522 " > Videot - Nyt toistetaan < / string > <nl> < string id = " 10523 " > Albumin tiedot < / string > <nl> < string id = " 10524 " > Elokuvan tiedot < / string > <nl> <nl> <nl> < string id = " 12356 " > Muuta lukitus < / string > <nl> < string id = " 12357 " > Sijainnin lukitus < / string > <nl> < string id = " 12358 " > Salasana oli tyhjä . Yritä uudelleen . < / string > <nl> - < string id = " 12360 " > Pääkäyttäjän lukitus < / string > <nl> + < string id = " 12360 " > Käytön esto < / string > <nl> < string id = " 12362 " > Sammuta laite lukituksen poistoyritysten maksimimäärän jälkeen < / string > <nl> < string id = " 12367 " > Pääkäyttäjän koodi ei ole oikea < / string > <nl> < string id = " 12368 " > Anna oikea pääkäyttäjän koodi < / string > <nl> <nl> < string id = " 15218 " > Libre . fm - käyttäjätunnus < / string > <nl> < string id = " 15219 " > Libre . fm - salasana < / string > <nl> < string id = " 15220 " > Libre . fm < / string > <nl> - < string id = " 15221 " > Kappaleiden lähetys < / string > <nl> + < string id = " 15221 " > Musiikin lähetys < / string > <nl> <nl> < string id = " 15250 " > Last . fm - radion lähetys käytössä < / string > <nl> < string id = " 15251 " > Yhdistetään Last . fm palveluun . . . < / string > <nl> <nl> < string id = " 20337 " > Näyttelijä < / string > <nl> < string id = " 20338 " > Elokuva < / string > <nl> < string id = " 20339 " > Ohjaaja < / string > <nl> - < string id = " 20340 " > Halutko poistaa kirjastosta kaikki kohteet < / string > <nl> + < string id = " 20340 " > Halutko poistaa XBMC - kirjastosta kaikki kohteet , < / string > <nl> < string id = " 20341 " > jotka on tässä polussa ? < / string > <nl> < string id = " 20342 " > Elokuvat < / string > <nl> < string id = " 20343 " > TV - ohjelmat < / string > <nl> mmm a / language / Greek / strings . xml <nl> ppp b / language / Greek / strings . xml <nl> <nl> < ! - - Language file translated with Team XBMC Translator - - > <nl> < ! - - Translator : Ydatografida - - > <nl> < ! - - Email : ydatografida @ gmail . com - - > <nl> - < ! - - Date of translation : 12 / 13 / 2009 - - > <nl> + < ! - - Date of translation : 12 / 16 / 2009 - - > <nl> < ! - - $ Revision $ - - > <nl> - < ! - - Based on english strings version 25637 - - > <nl> + < ! - - Based on english strings version 25761 - - > <nl> < strings > <nl> < string id = " 0 " > Εφαρμογές < / string > <nl> < string id = " 1 " > Φωτογραφίες < / string > <nl> <nl> < string id = " 20337 " > Ηθοποιός < / string > <nl> < string id = " 20338 " > Ταινία < / string > <nl> < string id = " 20339 " > Σκηνοθέτης < / string > <nl> - < string id = " 20340 " > Θέλετε να διαγράψετε όλα τα αντικείμενα < / string > <nl> - < string id = " 20341 " > από τη συλλογή ; < / string > <nl> + < string id = " 20340 " > Θέλετε να απομακρύνετε όλα τα αντικείμενα που βρίσκονται < / string > <nl> + < string id = " 20341 " > σ ΄ αυτή την διαδρομή από τη συλλογή του XBMC ; < / string > <nl> < string id = " 20342 " > Ταινίες < / string > <nl> < string id = " 20343 " > Τηλεοπτικές σειρές < / string > <nl> < string id = " 20344 " > Αυτός ο φάκελος περιέχει < / string > <nl> <nl> < string id = " 22021 " > Επιτρεπόμενο σφάλμα στο λόγο απεικόνισης για να ελαχιστοποιηθούν οι μαύρες μπάρες < / string > <nl> < string id = " 22022 " > Εμφάνιση αρχείων βίντεο στις λίστες < / string > <nl> < string id = " 22023 " > Κατασκευαστής DirectX : < / string > <nl> - < string id = " 22024 " > Έκδοση DirectX : < / string > <nl> + < string id = " 22024 " > Έκδοση Direct3D : < / string > <nl> < string id = " 22030 " > Γραμματοσειρά < / string > <nl> < string id = " 22031 " > - Μέγεθος < / string > <nl> < string id = " 22032 " > - Χρώματα < / string > <nl> mmm a / language / Italian / strings . xml <nl> ppp b / language / Italian / strings . xml <nl> <nl>  < ? xml version = " 1 . 0 " encoding = " utf - 8 " standalone = " yes " ? > <nl> < ! - - Translator : KoTiX - - > <nl> < ! - - Email : marcotix @ libero . it - - > <nl> - < ! - - Date of translation : 11 / 20 / 2009 - - > <nl> - < ! - - Based on english strings version 24792 - - > <nl> + < ! - - Date of translation : 12 / 15 / 2009 - - > <nl> + < ! - - Based on english strings version 25742 - - > <nl> < strings > <nl> < string id = " 0 " > Programmi < / string > <nl> < string id = " 1 " > Immagini < / string > <nl> per questo effetto grafico < / string > <nl> < string id = " 13411 " > Minima vel . ventola < / string > <nl> < string id = " 13412 " > < / string > <nl> < string id = " 13413 " > Download in corso < / string > <nl> - < string id = " 13414 " > Mostra gli artisti presenti solo nelle compilation < / string > <nl> + < string id = " 13414 " > Includi gli artisti presenti solo nelle compilation < / string > <nl> < string id = " 13415 " > Metodo di render < / string > <nl> < string id = " 13416 " > Automatico < / string > <nl> < string id = " 13417 " > Sfumatura di base ( ARB ) < / string > <nl> per questo effetto grafico < / string > <nl> < string id = " 13421 " > VDPAU < / string > <nl> < string id = " 13422 " > Avvia lo slideshow da qui < / string > <nl> < string id = " 13423 " > Ricorda per questo percorso < / string > <nl> + < string id = " 13424 " > Usa oggetti pixel buffer < / string > <nl> < string id = " 13500 " > Metodo di sincronizzazione A / V < / string > <nl> < string id = " 13501 " > Clock audio < / string > <nl> < string id = " 13502 " > Clock video ( Lascia / Aggiungi audio ) < / string > <nl> per questo effetto grafico < / string > <nl> < string id = " 20338 " > Film < / string > <nl> < string id = " 20339 " > Regista < / string > <nl> < string id = " 20340 " > Vuoi rimuovere tutti gli elementi in < / string > <nl> - < string id = " 20341 " > questo percorso dall ' archivio ? < / string > <nl> + < string id = " 20341 " > questo percorso dall ' archivio di XBMC ? < / string > <nl> < string id = " 20342 " > Film < / string > <nl> < string id = " 20343 " > Serie TV < / string > <nl> < string id = " 20344 " > Questa directory contiene < / string > <nl> per questo effetto grafico < / string > <nl> < string id = " 22022 " > Mostra i file video nelle liste < / string > <nl> < string id = " 22023 " > DirectX Vendor : < / string > <nl> < string id = " 22024 " > Versione Direct3D : < / string > <nl> - <nl> < string id = " 22030 " > Carattere < / string > <nl> < string id = " 22031 " > - Dimensione < / string > <nl> < string id = " 22032 " > - Colore < / string > <nl> per questo effetto grafico < / string > <nl> < string id = " 23000 " > Plugin meteo < / string > <nl> < string id = " 23001 " > - Impostazioni plugin < / string > <nl> < string id = " 23050 " > Attiva il Teletext < / string > <nl> + < string id = " 23051 " > Parte % i < / string > <nl> + < string id = " 23052 " > Buffering % i bytes < / string > <nl> < string id = " 23100 " > Player Esterno Attivato < / string > <nl> < string id = " 23101 " > Premi OK per chiudere il player < / string > <nl> < string id = " 23104 " > Premi OK al termine della riproduzione < / string > <nl> per questo effetto grafico < / string > <nl> < string id = " 33076 " > Aggiorna XBMC . < / string > <nl> < string id = " 33077 " > Nessun informazione trovata ! < / string > <nl> < string id = " 33078 " > Prossima pagina < / string > <nl> + < string id = " 33079 " > Amore < / string > <nl> + < string id = " 33080 " > Odio < / string > <nl> + < string id = " 33081 " > Questo file è multiplo , seleziona la parte da cui iniziare la riproduzione . < / string > <nl> + < string id = " 33082 " > Percorso per lo script < / string > <nl> + < string id = " 33083 " > Abilita il pulsante per lo script personalizzato < / string > <nl> < / strings > <nl> \ No newline at end of file <nl> mmm a / language / Korean / strings . xml <nl> ppp b / language / Korean / strings . xml <nl> <nl> < ! - - Language file translated with Team XBMC Translator - - > <nl> < ! - - Translator : airplanez - - > <nl> < ! - - Email : airplanez @ gmail . com - - > <nl> - < ! - - Date of translation : 12 / 15 / 2009 - - > <nl> + < ! - - Date of translation : 12 / 16 / 2009 - - > <nl> < ! - - $ Revision $ - - > <nl> < strings > <nl> < string id = " 0 " > 프로그램 < / string > <nl> <nl> < string id = " 20337 " > 배우 < / string > <nl> < string id = " 20338 " > 영화 < / string > <nl> < string id = " 20339 " > 감독 < / string > <nl> - < string id = " 20340 " > 라이브러리에서 이 경로의 < / string > <nl> + < string id = " 20340 " > XBMC 라이브러리에서 이 경로의 < / string > <nl> < string id = " 20341 " > 모든 항목을 제거 하시겠습니까 ? < / string > <nl> < string id = " 20342 " > 영화 < / string > <nl> < string id = " 20343 " > TV 쇼 < / string > <nl> mmm a / language / Turkish / strings . xml <nl> ppp b / language / Turkish / strings . xml <nl> <nl> < ! - - Date of translation : 06 / 07 / 2006 - - > <nl> < ! - - Translator : Özgür BASKIN ( queeup ) - - > <nl> < ! - - Email : ozgur . baskin @ gmail . com - - > <nl> - < ! - - Date of translation : 07 / 12 / 2009 - - > <nl> - < ! - - Based on English strings revision 25426 - - > <nl> + < ! - - Date of translation : 15 / 12 / 2009 - - > <nl> + < ! - - Based on English strings revision 25728 - - > <nl> < strings > <nl> < string id = " 0 " > Programlar < / string > <nl> < string id = " 1 " > Resimler < / string > <nl> <nl> < string id = " 20338 " > Film < / string > <nl> < string id = " 20339 " > Yönetmen < / string > <nl> < string id = " 20340 " > Bu yol içindeki tüm ögeleri < / string > <nl> - < string id = " 20341 " > kitaplıktan kaldırmak istiyor musunuz ? < / string > <nl> + < string id = " 20341 " > XBMC kitaplığından kaldırmak istiyor musunuz ? < / string > <nl> < string id = " 20342 " > Filmler < / string > <nl> < string id = " 20343 " > TV programları < / string > <nl> < string id = " 20344 " > Bu dizinin içeriği < / string > <nl> mmm a / skin / Confluence / language / Greek / strings . xml <nl> ppp b / skin / Confluence / language / Greek / strings . xml <nl> <nl> < string id = " 31002 " > Απεχθές < / string > <nl> < string id = " 31003 " > Επιλογές λειτουργίας < / string > <nl> < string id = " 31004 " > Απασχολημένο . . . < / string > <nl> + < string id = " 31005 " > Απόκρυψη Πληροφοριών < / string > <nl> <nl> < string id = " 31007 " > Επεκτάσεις < / string > <nl> <nl>
updated : Italian translation , based on English r25742 ( thanks to KoTiX )
xbmc/xbmc
b77912c61495d467c539f7ffb9b7ca499578ab73
2009-12-16T13:08:32Z
mmm a / js / server / modules / org / arangodb / actions . js <nl> ppp b / js / server / modules / org / arangodb / actions . js <nl> var fs = require ( " fs " ) ; <nl> var console = require ( " console " ) ; <nl> <nl> var arangodb = require ( " org / arangodb " ) ; <nl> - var foxx = require ( " org / arangodb / foxx " ) ; <nl> var foxxManager = require ( " org / arangodb / foxx - manager " ) ; <nl> <nl> var moduleExists = function ( name ) { return module . exists ; } ; <nl> function lookupCallbackStatic ( content ) { <nl> } <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief looks up a callback for a callback action <nl> + / / / @ brief looks up a callback for a callback action given as string <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - function lookupCallbackActionCallback ( route , action , context ) { <nl> + function lookupCallbackActionCallbackString ( route , action , context ) { <nl> ' use strict ' ; <nl> <nl> var func ; <nl> function lookupCallbackActionCallback ( route , action , context ) { <nl> try { <nl> var sandbox = { } ; <nl> <nl> - for ( key in context . requires ) { <nl> - if ( context . requires . hasOwnProperty ( key ) ) { <nl> - sandbox [ key ] = context . requires [ key ] ; <nl> - } <nl> - } <nl> - <nl> sandbox . module = module . root ; <nl> - sandbox . repositories = context . repositories ; <nl> <nl> sandbox . require = function ( path ) { <nl> return context . appModule . require ( path ) ; <nl> function lookupCallbackActionCallback ( route , action , context ) { <nl> } ; <nl> } <nl> <nl> + / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + / / / @ brief looks up a callback for a callback action <nl> + / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + <nl> + function lookupCallbackActionCallback ( route , action , context ) { <nl> + ' use strict ' ; <nl> + <nl> + if ( typeof action . callback = = = ' string ' ) { <nl> + return lookupCallbackActionCallbackString ( route , action , context ) ; <nl> + } <nl> + <nl> + if ( typeof action . callback = = = ' function ' ) { <nl> + return { <nl> + controller : action . callback , <nl> + options : action . options | | { } , <nl> + methods : action . methods | | ALL_METHODS <nl> + } ; <nl> + } <nl> + <nl> + return { <nl> + controller : errorFunction ( <nl> + route , <nl> + " an error occurred while loading function ' " <nl> + + action . callback + " ' : unknown type ' " + String ( typeof action . callback ) + " ' " ) , <nl> + options : action . options | | { } , <nl> + methods : action . methods | | ALL_METHODS <nl> + } ; <nl> + } <nl> + <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ brief looks up a callback for a module action <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> function lookupCallback ( route , context ) { <nl> return result ; <nl> } <nl> <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief creates all contexts <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - function createContexts ( appModule , appContext , desc ) { <nl> - ' use strict ' ; <nl> - <nl> - var key ; <nl> - var c ; <nl> - <nl> - var result = { } ; <nl> - <nl> - for ( key in desc ) { <nl> - if ( desc . hasOwnProperty ( key ) ) { <nl> - var d = desc [ key ] ; <nl> - var collectionPrefix = appContext . connectionPrefix ; <nl> - <nl> - result [ key ] = { <nl> - appModule : appModule , <nl> - repositories : { } , <nl> - requires : { } <nl> - } ; <nl> - <nl> - / / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <nl> - / / requires <nl> - / / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <nl> - <nl> - if ( d . hasOwnProperty ( ' requires ' ) ) { <nl> - for ( c in d . requires ) { <nl> - if ( d . requires . hasOwnProperty ( c ) ) { <nl> - var name = d . requires [ c ] ; <nl> - var m = appModule . require ( name ) ; <nl> - <nl> - result [ key ] . requires [ c ] = m ; <nl> - } <nl> - } <nl> - } <nl> - <nl> - / / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <nl> - / / repositories <nl> - / / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <nl> - <nl> - if ( d . hasOwnProperty ( ' repositories ' ) ) { <nl> - for ( c in d . repositories ) { <nl> - if ( d . repositories . hasOwnProperty ( c ) ) { <nl> - var rep = d . repositories [ c ] ; <nl> - var model ; <nl> - var Repo ; <nl> - <nl> - if ( rep . hasOwnProperty ( ' model ' ) ) { <nl> - model = appModule . require ( rep . model ) . Model ; <nl> - <nl> - if ( model = = = undefined ) { <nl> - throw new Error ( " module ' " + rep . model + " ' does not define a model " ) ; <nl> - } <nl> - } <nl> - else { <nl> - model = foxx . Model ; <nl> - } <nl> - <nl> - if ( rep . hasOwnProperty ( ' repository ' ) ) { <nl> - Repo = appModule . require ( rep . repository ) . Repository ; <nl> - <nl> - if ( Repo = = = undefined ) { <nl> - throw new Error ( " module ' " + rep . repository + " ' does not define a repository " ) ; <nl> - } <nl> - } <nl> - else { <nl> - Repo = foxx . Repository ; <nl> - } <nl> - <nl> - var prefix = appContext . collectionPrefix ; <nl> - var cname ; <nl> - <nl> - if ( prefix = = = " " ) { <nl> - cname = c ; <nl> - } <nl> - else { <nl> - cname = prefix + " _ " + c ; <nl> - } <nl> - <nl> - var collection = arangodb . db . _collection ( cname ) ; <nl> - <nl> - result [ key ] . repositories [ c ] = new Repo ( prefix , collection , model ) ; <nl> - } <nl> - } <nl> - } <nl> - } <nl> - } <nl> - <nl> - return result ; <nl> - } <nl> - <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ brief intersect methods <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> function reloadRouting ( ) { <nl> var urlPrefix = routes . urlPrefix | | " " ; <nl> var modulePrefix = routes . modulePrefix | | " " ; <nl> var keys = [ ' routes ' , ' middleware ' ] ; <nl> - var repositories = { } ; <nl> var j ; <nl> <nl> / / create the application context <nl> function reloadRouting ( ) { <nl> appModule = app . createAppModule ( ) ; <nl> } <nl> <nl> - / / create the route contexts <nl> - var contexts = createContexts ( appModule , appContext , routes . context | | { } ) ; <nl> - <nl> / / install the routes <nl> for ( j = 0 ; j < keys . length ; + + j ) { <nl> var key = keys [ j ] ; <nl> function reloadRouting ( ) { <nl> <nl> for ( i = 0 ; i < r . length ; + + i ) { <nl> var route = r [ i ] ; <nl> - var context = { } ; <nl> - <nl> - if ( route . hasOwnProperty ( ' context ' ) ) { <nl> - var cn = route . context ; <nl> - <nl> - if ( contexts . hasOwnProperty ( cn ) ) { <nl> - context = contexts [ cn ] ; <nl> - } <nl> - else { <nl> - throw new Error ( " unknown context ' " + cn + " ' " ) ; <nl> - } <nl> - } <nl> + var context = { appModule : appModule } ; <nl> <nl> installRoute ( RoutingCache [ arangodb . db . _name ( ) ] [ key ] , <nl> urlPrefix , <nl> mmm a / js / server / modules / org / arangodb / foxx - manager . js <nl> ppp b / js / server / modules / org / arangodb / foxx - manager . js <nl> var arangodb = require ( " org / arangodb " ) ; <nl> / / - - SECTION - - private functions <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ addtogroup Foxx <nl> - / / / @ { <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ brief returns the aal collection <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> function installAssets ( app , routes ) { <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> function executeAppScript ( app , name , mount , prefix ) { <nl> - var desc ; <nl> - var appContext ; <nl> - <nl> - appContext = { <nl> - name : app . _name , <nl> - version : app . _version , <nl> - appId : app . _id , <nl> - mount : mount , <nl> - collectionPrefix : prefix <nl> - } ; <nl> - <nl> - desc = app . _manifest ; <nl> + var desc = app . _manifest ; <nl> <nl> if ( ! desc ) { <nl> throw new Error ( " invalid application manifest , app " + internal . inspect ( app ) ) ; <nl> function executeAppScript ( app , name , mount , prefix ) { <nl> } <nl> <nl> if ( desc . hasOwnProperty ( name ) ) { <nl> + var appContext = { <nl> + name : app . _name , <nl> + version : app . _version , <nl> + appId : app . _id , <nl> + mount : mount , <nl> + collectionPrefix : prefix , <nl> + appModule : app . createAppModule ( ) <nl> + } ; <nl> + <nl> var cp = appContext . collectionPrefix ; <nl> var cname = " " ; <nl> <nl> function executeAppScript ( app , name , mount , prefix ) { <nl> } <nl> } ; <nl> <nl> - app . loadAppScript ( app . createAppModule ( ) , desc [ name ] , appContext , context ) ; <nl> + app . loadAppScript ( appContext . appModule , desc [ name ] , appContext , context ) ; <nl> } <nl> } <nl> <nl> function routingAalApp ( app , mount , prefix ) { <nl> if ( apps . hasOwnProperty ( i ) ) { <nl> var file = apps [ i ] ; <nl> <nl> - <nl> - / / set up a context for the routing table <nl> - routes . context [ i ] = { <nl> - repositories : { } , <nl> - requires : { } <nl> - } ; <nl> - <nl> / / set up a context for the application start function <nl> context = { <nl> + name : app . _name , / / app name <nl> + version : app . _version , / / app version <nl> + appId : app . _id , / / app identifier <nl> + mount : mount , / / global mount <nl> prefix : arangodb . normalizeURL ( " / " + i ) , / / app mount <nl> - requires : { } , <nl> - routingInfo : { } <nl> + collectionPrefix : prefix , / / collection prefix <nl> + appModule : app . createAppModule ( ) , / / app module <nl> + <nl> + routingInfo : { } , <nl> + foxxes : [ ] <nl> } ; <nl> <nl> - app . loadAppScript ( app . createAppModule ( ) , file , context ) ; <nl> + app . loadAppScript ( context . appModule , file , context ) ; <nl> <nl> / / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <nl> / / routingInfo <nl> / / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <nl> <nl> - var ri = context . routingInfo ; <nl> - var rm = [ " routes " , " middleware " ] ; <nl> - <nl> - var route ; <nl> - var j ; <nl> - var k ; <nl> + var foxxes = context . foxxes ; <nl> + var u ; <nl> <nl> - p = ri . urlPrefix ; <nl> + for ( u = 0 ; u < foxxes . length ; + + u ) { <nl> + var foxx = foxxes [ u ] ; <nl> + var ri = foxx . routingInfo ; <nl> + var rm = [ " routes " , " middleware " ] ; <nl> <nl> - for ( k = 0 ; k < rm . length ; + + k ) { <nl> - var key = rm [ k ] ; <nl> + var route ; <nl> + var j ; <nl> + var k ; <nl> <nl> - if ( ri . hasOwnProperty ( key ) ) { <nl> - var rt = ri [ key ] ; <nl> + p = ri . urlPrefix ; <nl> <nl> - for ( j = 0 ; j < rt . length ; + + j ) { <nl> - route = rt [ j ] ; <nl> + for ( k = 0 ; k < rm . length ; + + k ) { <nl> + var key = rm [ k ] ; <nl> <nl> - if ( route . hasOwnProperty ( " url " ) ) { <nl> - route . url . match = arangodb . normalizeURL ( p + " / " + route . url . match ) ; <nl> - } <nl> + if ( ri . hasOwnProperty ( key ) ) { <nl> + var rt = ri [ key ] ; <nl> <nl> - route . context = i ; <nl> + for ( j = 0 ; j < rt . length ; + + j ) { <nl> + route = rt [ j ] ; <nl> + <nl> + if ( route . hasOwnProperty ( " url " ) ) { <nl> + route . url . match = arangodb . normalizeURL ( p + " / " + route . url . match ) ; <nl> + } <nl> <nl> - routes [ key ] . push ( route ) ; <nl> + route . context = i ; <nl> + <nl> + routes [ key ] . push ( route ) ; <nl> + } <nl> } <nl> } <nl> - <nl> - / / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <nl> - / / repositories <nl> - / / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <nl> - <nl> - if ( ri . hasOwnProperty ( " repositories " ) ) { <nl> - routes . context [ i ] . repositories = ri . repositories ; <nl> - } <nl> } <nl> - <nl> - / / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <nl> - / / requires <nl> - / / . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <nl> - <nl> - routes . context [ i ] . requires = context . requires ; <nl> } <nl> } <nl> <nl> function routingAalApp ( app , mount , prefix ) { <nl> return null ; <nl> } <nl> <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ } <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> / / - - SECTION - - public functions <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ addtogroup Foxx <nl> - / / / @ { <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ brief scans available FOXX applications <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> exports . developmentRoutes = function ( ) { <nl> return routes ; <nl> } ; <nl> <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ } <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - / / / - - SECTION - - END - OF - FILE <nl> - / / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + / / - - SECTION - - END - OF - FILE <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> <nl> / / / Local Variables : <nl> / / / mode : outline - minor <nl> mmm a / js / server / modules / org / arangodb / foxx . js <nl> ppp b / js / server / modules / org / arangodb / foxx . js <nl> var Application , <nl> backbone_helpers = require ( " backbone " ) , <nl> db = require ( " org / arangodb " ) . db , <nl> fs = require ( " fs " ) , <nl> - console = require ( " console " ) , <nl> - INTERNAL = require ( " internal " ) , <nl> - foxxManager = require ( " org / arangodb / foxx - manager " ) , <nl> internal = { } ; <nl> <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ addtogroup ArangoAPI <nl> - / / / @ { <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + / / - - SECTION - - Application <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ fn JSF_foxx_createUrlObject <nl> / / / @ brief create a new url object <nl> / / / <nl> / / / This creates a new ` UrlObject ` . <nl> - / / / ArangoDB uses a certain structure we refer to as ` UrlObject ` . <nl> - / / / With the following function ( which is only internal , and not <nl> - / / / exported ) you can create an UrlObject with a given URL , <nl> - / / / a constraint and a method . For example : <nl> + / / / <nl> + / / / ArangoDB uses a certain structure we refer to as ` UrlObject ` . With the <nl> + / / / following function ( which is only internal , and not exported ) you can create <nl> + / / / an UrlObject with a given URL , a constraint and a method . For example : <nl> / / / <nl> / / / @ EXAMPLES <nl> / / / <nl> internal . createUrlObject = function ( url , constraint , method ) { <nl> / / / @ fn JSF_foxx_application_initializer <nl> / / / @ brief Create a new Application <nl> / / / <nl> - / / / This creates a new Application . It takes two optional arguments as displayed above : <nl> + / / / This creates a new Application . It takes two optional arguments as displayed <nl> + / / / above : <nl> + / / / <nl> / / / * * * The URL Prefix : * * All routes you define within will be prefixed with it <nl> / / / * * * The Template Collection : * * More information in the template section <nl> / / / <nl> / / / @ EXAMPLES <nl> / / / <nl> / / / @ code <nl> - / / / app = new Application ( { <nl> + / / / app = new Application ( applicationContext , { <nl> / / / urlPrefix : " / wiese " , <nl> / / / templateCollection : " my_templates " <nl> / / / } ) ; <nl> / / / @ endcode <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - Application = function ( options ) { <nl> + Application = function ( context , options ) { <nl> ' use strict ' ; <nl> var urlPrefix , templateCollection , myMiddleware ; <nl> <nl> options = options | | { } ; <nl> <nl> - urlPrefix = options . urlPrefix | | " " ; <nl> templateCollection = options . templateCollection ; <nl> <nl> this . routingInfo = { <nl> routes : [ ] <nl> } ; <nl> <nl> - this . requires = { } ; <nl> - this . helperCollection = { } ; <nl> + urlPrefix = options . urlPrefix | | " " ; <nl> <nl> + if ( urlPrefix = = = " " ) { <nl> + urlPrefix = context . prefix ; <nl> + } else { <nl> + urlPrefix = context . prefix + " / " + urlPrefix ; <nl> + } <nl> + <nl> + this . helperCollection = { } ; <nl> this . routingInfo . urlPrefix = urlPrefix ; <nl> <nl> if ( _ . isString ( templateCollection ) ) { <nl> Application = function ( options ) { <nl> action : { callback : myMiddleware . stringRepresentation } <nl> } <nl> ] ; <nl> - this . routingInfo . repositories = { } ; <nl> + <nl> + context . foxxes . push ( this ) ; <nl> + <nl> + this . applicationContext = context ; <nl> } ; <nl> <nl> _ . extend ( Application . prototype , { <nl> + <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ fn JSF_foxx_application_start <nl> - / / / @ brief Start the application <nl> - / / / <nl> - / / / Sometimes it is a good idea to actually start the application <nl> - / / / you wrote . If this precious moment has arrived , you should <nl> - / / / use this function . <nl> - / / / You have to provide the start function with the ` applicationContext ` <nl> - / / / variable . <nl> + / / / @ fn JSF_foxx_application_registerRepository <nl> + / / / @ brief Create a repository <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - start : function ( context ) { <nl> - ' use strict ' ; <nl> - var prefix = context . prefix ; <nl> + createRepository : function ( name , opts ) { <nl> + var model ; <nl> + var Repo ; <nl> <nl> - this . routingInfo . urlPrefix = prefix + " / " + this . routingInfo . urlPrefix ; <nl> + if ( opts & & opts . hasOwnProperty ( ' model ' ) ) { <nl> + model = this . applicationContext . appModule . require ( opts . model ) . Model ; <nl> <nl> - context . requires = this . requires ; <nl> - context . routingInfo = this . routingInfo ; <nl> - } , <nl> + if ( model = = = undefined ) { <nl> + throw new Error ( " module ' " + opts . model + " ' does not define a model " ) ; <nl> + } <nl> + } else { <nl> + model = Model ; <nl> + } <nl> <nl> - registerRepository : function ( name , opts ) { <nl> - this . routingInfo . repositories [ name ] = opts | | { } ; <nl> + if ( opts & & opts . hasOwnProperty ( ' repository ' ) ) { <nl> + Repo = this . applicationContext . appModule . require ( opts . repository ) . Repository ; <nl> + <nl> + if ( Repo = = = undefined ) { <nl> + throw new Error ( " module ' " + opts . repository + " ' does not define a repository " ) ; <nl> + } <nl> + } else { <nl> + Repo = Repository ; <nl> + } <nl> + <nl> + var prefix = this . applicationContext . collectionPrefix ; <nl> + var cname ; <nl> + <nl> + if ( prefix = = = " " ) { <nl> + cname = name ; <nl> + } else { <nl> + cname = prefix + " _ " + name ; <nl> + } <nl> + <nl> + var collection = db . _collection ( cname ) ; <nl> + <nl> + return new Repo ( prefix , collection , model ) ; <nl> } , <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ fn JSF_foxx_application_handleRequest <nl> / / / @ brief Handle a request <nl> / / / <nl> - / / / The ` handleRequest ` method is the raw way to create a new <nl> - / / / route . You probably wont call it directly , but it is used <nl> - / / / in the other request methods : <nl> + / / / The ` handleRequest ` method is the raw way to create a new route . You <nl> + / / / probably wont call it directly , but it is used in the other request methods : <nl> / / / <nl> - / / / When defining a route you can also define a so called ' parameterized ' <nl> - / / / route like ` / gaense / : stable ` . In this case you can later get the value <nl> - / / / the user provided for ` stable ` via the ` params ` function ( see the Request <nl> - / / / object ) . <nl> + / / / When defining a route you can also define a so called ' parameterized ' route <nl> + / / / like ` / gaense / : stable ` . In this case you can later get the value the user <nl> + / / / provided for ` stable ` via the ` params ` function ( see the Request object ) . <nl> / / / <nl> / / / @ EXAMPLES <nl> / / / <nl> _ . extend ( Application . prototype , { <nl> var newRoute = { <nl> url : internal . createUrlObject ( route , undefined , method ) , <nl> action : { <nl> - callback : String ( callback ) <nl> + callback : callback <nl> } , <nl> docs : { <nl> parameters : [ ] , <nl> _ . extend ( Application . prototype , { <nl> / / / @ fn JSF_foxx_application_head <nl> / / / @ brief Handle a ` head ` request <nl> / / / <nl> - / / / This handles requests from the HTTP verb ` head ` . <nl> - / / / As with all other requests you can give an option as the third <nl> - / / / argument , or leave it blank . You have to give a function as <nl> - / / / the last argument however . It will get a request and response <nl> - / / / object as its arguments <nl> + / / / This handles requests from the HTTP verb ` head ` . As with all other requests <nl> + / / / you can give an option as the third argument , or leave it blank . You have to <nl> + / / / give a function as the last argument however . It will get a request and <nl> + / / / response object as its arguments <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + <nl> head : function ( route , callback ) { <nl> ' use strict ' ; <nl> return this . handleRequest ( " head " , route , callback ) ; <nl> _ . extend ( Application . prototype , { <nl> / / / @ fn JSF_foxx_application_get <nl> / / / @ brief Manage a ` get ` request <nl> / / / <nl> - / / / This handles requests from the HTTP verb ` get ` . <nl> - / / / See above for the arguments you can give . An example : <nl> + / / / This handles requests from the HTTP verb ` get ` . See above for the arguments <nl> + / / / you can give . An example : <nl> / / / <nl> / / / @ EXAMPLES <nl> / / / <nl> _ . extend ( Application . prototype , { <nl> / / / } ) ; <nl> / / / @ endcode <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + <nl> get : function ( route , callback ) { <nl> ' use strict ' ; <nl> return this . handleRequest ( " get " , route , callback ) ; <nl> _ . extend ( Application . prototype , { <nl> / / / @ fn JSF_foxx_application_post <nl> / / / @ brief Tackle a ` post ` request <nl> / / / <nl> - / / / This handles requests from the HTTP verb ` post ` . <nl> - / / / See above for the arguments you can give . An example : <nl> + / / / This handles requests from the HTTP verb ` post ` . See above for the <nl> + / / / arguments you can give . An example : <nl> / / / <nl> / / / @ EXAMPLES <nl> / / / <nl> _ . extend ( Application . prototype , { <nl> / / / } ) ; <nl> / / / @ endcode <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + <nl> post : function ( route , callback ) { <nl> ' use strict ' ; <nl> return this . handleRequest ( " post " , route , callback ) ; <nl> _ . extend ( Application . prototype , { <nl> / / / @ fn JSF_foxx_application_put <nl> / / / @ brief Sort out a ` put ` request <nl> / / / <nl> - / / / This handles requests from the HTTP verb ` put ` . <nl> - / / / See above for the arguments you can give . An example : <nl> + / / / This handles requests from the HTTP verb ` put ` . See above for the arguments <nl> + / / / you can give . An example : <nl> / / / <nl> / / / @ EXAMPLES <nl> / / / <nl> _ . extend ( Application . prototype , { <nl> / / / } ) ; <nl> / / / @ endcode <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + <nl> put : function ( route , callback ) { <nl> ' use strict ' ; <nl> return this . handleRequest ( " put " , route , callback ) ; <nl> _ . extend ( Application . prototype , { <nl> / / / @ fn JSF_foxx_application_patch <nl> / / / @ brief Take charge of a ` patch ` request <nl> / / / <nl> - / / / This handles requests from the HTTP verb ` patch ` . <nl> - / / / See above for the arguments you can give . An example : <nl> + / / / This handles requests from the HTTP verb ` patch ` . See above for the <nl> + / / / arguments you can give . An example : <nl> / / / <nl> / / / @ EXAMPLES <nl> / / / <nl> _ . extend ( Application . prototype , { <nl> / / / } ) ; <nl> / / / @ endcode <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + <nl> patch : function ( route , callback ) { <nl> ' use strict ' ; <nl> return this . handleRequest ( " patch " , route , callback ) ; <nl> _ . extend ( Application . prototype , { <nl> / / / @ fn JSF_foxx_application_delete <nl> / / / @ brief Respond to a ` delete ` request <nl> / / / <nl> - / / / This handles requests from the HTTP verb ` delete ` . <nl> - / / / See above for the arguments you can give . <nl> - / / / * * A word of warning : * * Do not forget that ` delete ` is <nl> - / / / a reserved word in JavaScript and therefore needs to be <nl> - / / / called as app [ ' delete ' ] . There is also an alias ` del ` <nl> - / / / for this very reason . <nl> + / / / This handles requests from the HTTP verb ` delete ` . See above for the <nl> + / / / arguments you can give . <nl> + / / / <nl> + / / / * * A word of warning : * * Do not forget that ` delete ` is a reserved word in <nl> + / / / JavaScript and therefore needs to be called as app [ ' delete ' ] . There is also <nl> + / / / an alias ` del ` for this very reason . <nl> / / / <nl> / / / @ EXAMPLES <nl> / / / <nl> _ . extend ( Application . prototype , { <nl> / / / @ fn JSF_foxx_application_before <nl> / / / @ brief Before <nl> / / / <nl> - / / / The before function takes a path on which it should watch <nl> - / / / and a function that it should execute before the routing <nl> - / / / takes place . If you do omit the path , the function will <nl> - / / / be executed before each request , no matter the path . <nl> - / / / Your function gets a Request and a Response object . <nl> - / / / An example : <nl> + / / / The before function takes a path on which it should watch and a function <nl> + / / / that it should execute before the routing takes place . If you do omit the <nl> + / / / path , the function will be executed before each request , no matter the path . <nl> + / / / Your function gets a Request and a Response object . An example : <nl> / / / <nl> / / / @ EXAMPLES <nl> / / / <nl> _ . extend ( Application . prototype , { <nl> / / / @ fn JSF_foxx_application_after <nl> / / / @ brief After <nl> / / / <nl> - / / / This works pretty similar to the before function . <nl> - / / / But it acts after the execution of the handlers <nl> - / / / ( Big surprise , I suppose ) . <nl> + / / / This works pretty similar to the before function . But it acts after the <nl> + / / / execution of the handlers ( Big surprise , I suppose ) . <nl> / / / <nl> / / / An example : <nl> / / / <nl> _ . extend ( Application . prototype , { <nl> / / / @ fn JSF_foxx_application_helper <nl> / / / @ brief The ViewHelper concept <nl> / / / <nl> - / / / If you want to use a function inside your templates , the ViewHelpers <nl> - / / / will come to rescue you . Define them on your app like in the example . <nl> + / / / If you want to use a function inside your templates , the ViewHelpers will <nl> + / / / come to rescue you . Define them on your app like in the example . <nl> / / / <nl> - / / / Then you can just call this function in your template ' s JavaScript <nl> - / / / blocks . <nl> + / / / Then you can just call this function in your template ' s JavaScript blocks . <nl> / / / <nl> / / / @ EXAMPLES <nl> / / / <nl> _ . extend ( Application . prototype , { <nl> / / / @ brief Shortform for using the FormatMiddleware <nl> / / / <nl> / / / Shortform for using the FormatMiddleware <nl> + / / / <nl> / / / More information about the FormatMiddleware in the corresponding section . <nl> / / / This is a shortcut to add the middleware to your application : <nl> / / / <nl> RequestContext = function ( route ) { <nl> } ; <nl> <nl> _ . extend ( RequestContext . prototype , { <nl> + <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ fn JSF_foxx_RequestContext_pathParam <nl> / / / @ brief Describe a Path Parameter <nl> / / / <nl> / / / Describe a Path Paramter : <nl> + / / / <nl> / / / If you defined a route " / foxx / : id " , you can constrain which format the id <nl> / / / can have by giving a type . We currently support the following types : <nl> / / / <nl> _ . extend ( RequestContext . prototype , { <nl> / / / @ brief Describe a Query Parameter <nl> / / / <nl> / / / Describe a Query Parameter : <nl> + / / / <nl> / / / If you defined a route " / foxx " , you can constrain which format a query <nl> / / / parameter ( ` / foxx ? a = 12 ` ) can have by giving it a type . <nl> / / / We currently support the following types : <nl> _ . extend ( RequestContext . prototype , { <nl> / / / * string <nl> / / / <nl> / / / You can also provide a description of this parameter , if it is required and <nl> - / / / if you can provide the parameter multiple times . <nl> + / / / if you can provide the parameter multiple times . <nl> / / / <nl> / / / @ EXAMPLES <nl> / / / <nl> BaseMiddleware = function ( templateCollection , helperCollection ) { <nl> _ = require ( " underscore " ) ; <nl> <nl> requestFunctions = { <nl> + <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ fn JSF_foxx_BaseMiddleware_request_body <nl> / / / @ brief The superfluous ` body ` function <nl> BaseMiddleware = function ( templateCollection , helperCollection ) { <nl> } ; <nl> <nl> responseFunctions = { <nl> + <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ fn JSF_foxx_BaseMiddleware_response_status <nl> / / / @ brief The straightforward ` status ` function <nl> BaseMiddleware = function ( templateCollection , helperCollection ) { <nl> / / / response . status ( 404 ) ; <nl> / / / @ endcode <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + <nl> status : function ( code ) { <nl> this . responseCode = code ; <nl> } , <nl> BaseMiddleware = function ( templateCollection , helperCollection ) { <nl> / / / response . render ( " high / way " , { username : ' Application ' } ) <nl> / / / @ endcode <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + <nl> render : function ( templatePath , data ) { <nl> var template ; <nl> <nl> BaseMiddleware = function ( templateCollection , helperCollection ) { <nl> } ; <nl> } ; <nl> <nl> + / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + / / / @ brief FormatMiddleware <nl> + / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + <nl> FormatMiddleware = function ( allowedFormats , defaultFormat ) { <nl> ' use strict ' ; <nl> var stringRepresentation , middleware = function ( request , response , options , next ) { <nl> FormatMiddleware = function ( allowedFormats , defaultFormat ) { <nl> } ; <nl> } ; <nl> <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + / / - - SECTION - - Model <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ fn JSF_foxx_model_initializer <nl> / / / @ brief Create a new instance of Model <nl> Model = function ( attributes ) { <nl> } ; <nl> <nl> _ . extend ( Model . prototype , { <nl> + <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ fn JSF_foxx_model_get <nl> / / / @ brief Get the value of an attribute <nl> _ . extend ( Model . prototype , { <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ fn JSF_foxx_model_has <nl> - / / / @ brief Returns true if the attribute is set to a non - null or non - undefined value . <nl> + / / / @ brief Returns true if attribute is set to a non - null or non - undefined value <nl> / / / <nl> / / / Returns true if the attribute is set to a non - null or non - undefined value . <nl> / / / @ EXAMPLES <nl> _ . extend ( Model . prototype , { <nl> <nl> Model . extend = backbone_helpers . extend ; <nl> <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + / / - - SECTION - - Repository <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ fn JSF_foxx_repository_initializer <nl> / / / @ brief Create a new instance of Repository <nl> / / / <nl> / / / Create a new instance of Repository <nl> - / / / A Foxx Repository is always initialized with the prefix , the collection and the modelPrototype . <nl> - / / / If you initialize a model , you can give it initial data as an object . <nl> + / / / <nl> + / / / A Foxx Repository is always initialized with the prefix , the collection and <nl> + / / / the modelPrototype . If you initialize a model , you can give it initial data <nl> + / / / as an object . <nl> / / / <nl> / / / @ EXAMPLES <nl> / / / <nl> exports . Repository = Repository ; <nl> exports . BaseMiddleware = BaseMiddleware ; <nl> exports . FormatMiddleware = FormatMiddleware ; <nl> <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ } <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - <nl> - / / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - / / / - - SECTION - - END - OF - FILE <nl> - / / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + / / - - SECTION - - END - OF - FILE <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> <nl> / / / Local Variables : <nl> / / / mode : outline - minor <nl>
better foxx support with global context
arangodb/arangodb
ee1ec3d43bd79f61f2e173a857366f2f921ef030
2013-07-21T10:10:54Z
mmm a / Marlin / src / sd / SdBaseFile . cpp <nl> ppp b / Marlin / src / sd / SdBaseFile . cpp <nl> int8_t SdBaseFile : : readDir ( dir_t * dir , char * longFilename ) { <nl> if ( ! isDir ( ) | | ( 0x1F & curPosition_ ) ) return - 1 ; <nl> <nl> / / If we have a longFilename buffer , mark it as invalid . <nl> - / / If long filename is found it will be filled automatically . <nl> + / / If a long filename is found it will be filled automatically . <nl> if ( longFilename ) longFilename [ 0 ] = ' \ 0 ' ; <nl> <nl> while ( 1 ) { <nl> int16_t SdBaseFile : : write ( const void * buf , uint16_t nbyte ) { <nl> return - 1 ; <nl> } <nl> <nl> - # if ALLOW_DEPRECATED_FUNCTIONS <nl> - void ( * SdBaseFile : : oldDateTime_ ) ( uint16_t & date , uint16_t & time ) = 0 ; <nl> - # endif <nl> - <nl> # endif / / SDSUPPORT <nl> mmm a / Marlin / src / sd / SdBaseFile . h <nl> ppp b / Marlin / src / sd / SdBaseFile . h <nl> class SdBaseFile { <nl> bool open ( SdBaseFile * dirFile , const uint8_t dname [ 11 ] , uint8_t oflag ) ; <nl> bool openCachedEntry ( uint8_t cacheIndex , uint8_t oflags ) ; <nl> dir_t * readDirCache ( ) ; <nl> - <nl> - / / Deprecated functions <nl> - # if ALLOW_DEPRECATED_FUNCTIONS <nl> - public : <nl> - <nl> - / * * <nl> - * \ deprecated Use : <nl> - * bool contiguousRange ( uint32_t * bgnBlock , uint32_t * endBlock ) ; <nl> - * \ param [ out ] bgnBlock the first block address for the file . <nl> - * \ param [ out ] endBlock the last block address for the file . <nl> - * \ return true for success or false for failure . <nl> - * / <nl> - bool contiguousRange ( uint32_t & bgnBlock , uint32_t & endBlock ) { <nl> - return contiguousRange ( & bgnBlock , & endBlock ) ; <nl> - } <nl> - <nl> - / * * <nl> - * \ deprecated Use : <nl> - * bool createContiguous ( SdBaseFile * dirFile , const char * path , uint32_t size ) <nl> - * \ param [ in ] dirFile The directory where the file will be created . <nl> - * \ param [ in ] path A path with a valid DOS 8 . 3 file name . <nl> - * \ param [ in ] size The desired file size . <nl> - * \ return true for success or false for failure . <nl> - * / <nl> - bool createContiguous ( SdBaseFile & dirFile , const char * path , uint32_t size ) { <nl> - return createContiguous ( & dirFile , path , size ) ; <nl> - } <nl> - <nl> - / * * <nl> - * \ deprecated Use : <nl> - * static void dateTimeCallback ( <nl> - * void ( * dateTime ) ( uint16_t * date , uint16_t * time ) ) ; <nl> - * \ param [ in ] dateTime The user ' s call back function . <nl> - * / <nl> - static void dateTimeCallback ( <nl> - void ( * dateTime ) ( uint16_t & date , uint16_t & time ) ) { <nl> - oldDateTime_ = dateTime ; <nl> - dateTime_ = dateTime ? oldToNew : 0 ; <nl> - } <nl> - <nl> - / * * <nl> - * \ deprecated Use : <nl> - * bool open ( SdBaseFile * dirFile , const char * path , uint8_t oflag ) ; <nl> - * \ param [ in ] dirFile An open SdFat instance for the directory containing the <nl> - * file to be opened . <nl> - * \ param [ in ] path A path with a valid 8 . 3 DOS name for the file . <nl> - * \ param [ in ] oflag Values for \ a oflag are constructed by a bitwise - inclusive <nl> - * OR of flags O_READ , O_WRITE , O_TRUNC , and O_SYNC . <nl> - * \ return true for success or false for failure . <nl> - * / <nl> - bool open ( SdBaseFile & dirFile , const char * path , uint8_t oflag ) { <nl> - return open ( & dirFile , path , oflag ) ; <nl> - } <nl> - <nl> - / * * <nl> - * \ deprecated Do not use in new apps <nl> - * \ param [ in ] dirFile An open SdFat instance for the directory containing the <nl> - * file to be opened . <nl> - * \ param [ in ] path A path with a valid 8 . 3 DOS name for a file to be opened . <nl> - * \ return true for success or false for failure . <nl> - * / <nl> - bool open ( SdBaseFile & dirFile , const char * path ) { <nl> - return open ( dirFile , path , O_RDWR ) ; <nl> - } <nl> - <nl> - / * * <nl> - * \ deprecated Use : <nl> - * bool open ( SdBaseFile * dirFile , uint16_t index , uint8_t oflag ) ; <nl> - * \ param [ in ] dirFile An open SdFat instance for the directory . <nl> - * \ param [ in ] index The \ a index of the directory entry for the file to be <nl> - * opened . The value for \ a index is ( directory file position ) / 32 . <nl> - * \ param [ in ] oflag Values for \ a oflag are constructed by a bitwise - inclusive <nl> - * OR of flags O_READ , O_WRITE , O_TRUNC , and O_SYNC . <nl> - * \ return true for success or false for failure . <nl> - * / <nl> - bool open ( SdBaseFile & dirFile , uint16_t index , uint8_t oflag ) { <nl> - return open ( & dirFile , index , oflag ) ; <nl> - } <nl> - <nl> - / * * <nl> - * \ deprecated Use : bool openRoot ( SdVolume * vol ) ; <nl> - * \ param [ in ] vol The FAT volume containing the root directory to be opened . <nl> - * \ return true for success or false for failure . <nl> - * / <nl> - bool openRoot ( SdVolume & vol ) { return openRoot ( & vol ) ; } <nl> - <nl> - / * * <nl> - * \ deprecated Use : int8_t readDir ( dir_t * dir ) ; <nl> - * \ param [ out ] dir The dir_t struct that will receive the data . <nl> - * \ return bytes read for success zero for eof or - 1 for failure . <nl> - * / <nl> - int8_t readDir ( dir_t & dir , char * longFilename ) { <nl> - return readDir ( & dir , longFilename ) ; <nl> - } <nl> - <nl> - / * * <nl> - * \ deprecated Use : <nl> - * static uint8_t remove ( SdBaseFile * dirFile , const char * path ) ; <nl> - * \ param [ in ] dirFile The directory that contains the file . <nl> - * \ param [ in ] path The name of the file to be removed . <nl> - * \ return true for success or false for failure . <nl> - * / <nl> - static bool remove ( SdBaseFile & dirFile , const char * path ) { return remove ( & dirFile , path ) ; } <nl> - <nl> - private : <nl> - static void ( * oldDateTime_ ) ( uint16_t & date , uint16_t & time ) ; <nl> - static void oldToNew ( uint16_t * const date , uint16_t * const time ) { <nl> - uint16_t d , t ; <nl> - oldDateTime_ ( d , t ) ; <nl> - * date = d ; <nl> - * time = t ; <nl> - } <nl> - # endif / / ALLOW_DEPRECATED_FUNCTIONS <nl> } ; <nl> <nl> # endif / / _SDBASEFILE_H_ <nl> mmm a / Marlin / src / sd / SdFatConfig . h <nl> ppp b / Marlin / src / sd / SdFatConfig . h <nl> <nl> * / <nl> # define ENDL_CALLS_FLUSH 0 <nl> <nl> - / * * <nl> - * Allow use of deprecated functions if ALLOW_DEPRECATED_FUNCTIONS is nonzero <nl> - * / <nl> - # define ALLOW_DEPRECATED_FUNCTIONS 1 <nl> - <nl> / * * <nl> * Allow FAT12 volumes if FAT12_SUPPORT is nonzero . <nl> * FAT12 has not been well tested . <nl> mmm a / Marlin / src / sd / SdVolume . h <nl> ppp b / Marlin / src / sd / SdVolume . h <nl> class SdVolume { <nl> } <nl> bool readBlock ( uint32_t block , uint8_t * dst ) { return sdCard_ - > readBlock ( block , dst ) ; } <nl> bool writeBlock ( uint32_t block , const uint8_t * dst ) { return sdCard_ - > writeBlock ( block , dst ) ; } <nl> - <nl> - / / Deprecated functions <nl> - # if ALLOW_DEPRECATED_FUNCTIONS <nl> - public : <nl> - / * * <nl> - * \ deprecated Use : bool SdVolume : : init ( Sd2Card * dev ) ; <nl> - * \ param [ in ] dev The SD card where the volume is located . <nl> - * \ return true for success or false for failure . <nl> - * / <nl> - bool init ( Sd2Card & dev ) { return init ( & dev ) ; } <nl> - / * * <nl> - * \ deprecated Use : bool SdVolume : : init ( Sd2Card * dev , uint8_t vol ) ; <nl> - * \ param [ in ] dev The SD card where the volume is located . <nl> - * \ param [ in ] part The partition to be used . <nl> - * \ return true for success or false for failure . <nl> - * / <nl> - bool init ( Sd2Card & dev , uint8_t part ) { return init ( & dev , part ) ; } <nl> - # endif / / ALLOW_DEPRECATED_FUNCTIONS <nl> } ; <nl> <nl> # endif / / _SDVOLUME_H_ <nl> mmm a / Marlin / src / sd / cardreader . cpp <nl> ppp b / Marlin / src / sd / cardreader . cpp <nl> void CardReader : : lsDive ( const char * prepend , SdFile parent , const char * const m <nl> uint8_t cnt = 0 ; <nl> <nl> / / Read the next entry from a directory <nl> - while ( parent . readDir ( p , longFilename ) > 0 ) { <nl> + while ( parent . readDir ( & p , longFilename ) > 0 ) { <nl> <nl> / / If the entry is a directory and the action is LS_SerialPrint <nl> if ( DIR_IS_SUBDIR ( & p ) & & lsAction ! = LS_Count & & lsAction ! = LS_GetFilename ) { <nl> <nl> / / Get the short name for the item , which we know is a folder <nl> - char lfilename [ FILENAME_LENGTH ] ; <nl> - createFilename ( lfilename , p ) ; <nl> + char dosFilename [ FILENAME_LENGTH ] ; <nl> + createFilename ( dosFilename , p ) ; <nl> <nl> / / Allocate enough stack space for the full path to a folder , trailing slash , and nul <nl> bool prepend_is_empty = ( prepend [ 0 ] = = ' \ 0 ' ) ; <nl> - int len = ( prepend_is_empty ? 1 : strlen ( prepend ) ) + strlen ( lfilename ) + 1 + 1 ; <nl> + int len = ( prepend_is_empty ? 1 : strlen ( prepend ) ) + strlen ( dosFilename ) + 1 + 1 ; <nl> char path [ len ] ; <nl> <nl> / / Append the FOLDERNAME12 / to the passed string . <nl> / / It contains the full path to the " parent " argument . <nl> / / We now have the full path to the item in this folder . <nl> strcpy ( path , prepend_is_empty ? " / " : prepend ) ; / / root slash if prepend is empty <nl> - strcat ( path , lfilename ) ; / / FILENAME_LENGTH - 1 characters maximum <nl> + strcat ( path , dosFilename ) ; / / FILENAME_LENGTH - 1 characters maximum <nl> strcat ( path , " / " ) ; / / 1 character <nl> <nl> / / Serial . print ( path ) ; <nl> void CardReader : : lsDive ( const char * prepend , SdFile parent , const char * const m <nl> / / Get a new directory object using the full path <nl> / / and dive recursively into it . <nl> SdFile dir ; <nl> - if ( ! dir . open ( parent , lfilename , O_READ ) ) { <nl> + if ( ! dir . open ( & parent , dosFilename , O_READ ) ) { <nl> if ( lsAction = = LS_SerialPrint ) { <nl> SERIAL_ECHO_START_P ( port ) ; <nl> SERIAL_ECHOPGM_P ( port , MSG_SD_CANT_OPEN_SUBDIR ) ; <nl> - SERIAL_ECHOLN_P ( port , lfilename ) ; <nl> + SERIAL_ECHOLN_P ( port , dosFilename ) ; <nl> } <nl> } <nl> lsDive ( path , dir <nl> void CardReader : : ls ( <nl> <nl> / / Open the sub - item as the new dive parent <nl> SdFile dir ; <nl> - if ( ! dir . open ( diveDir , segment , O_READ ) ) { <nl> + if ( ! dir . open ( & diveDir , segment , O_READ ) ) { <nl> SERIAL_EOL_P ( port ) ; <nl> SERIAL_ECHO_START_P ( port ) ; <nl> SERIAL_ECHOPGM_P ( port , MSG_SD_CANT_OPEN_SUBDIR ) ; <nl> void CardReader : : printFilename ( <nl> # endif <nl> ) { <nl> if ( file . isOpen ( ) ) { <nl> - char lfilename [ FILENAME_LENGTH ] ; <nl> - file . getFilename ( lfilename ) ; <nl> - SERIAL_ECHO_P ( port , lfilename ) ; <nl> + char dosFilename [ FILENAME_LENGTH ] ; <nl> + file . getFilename ( dosFilename ) ; <nl> + SERIAL_ECHO_P ( port , dosFilename ) ; <nl> # if ENABLED ( LONG_FILENAME_HOST_SUPPORT ) <nl> - getfilename ( 0 , lfilename ) ; <nl> + getfilename ( 0 , dosFilename ) ; <nl> if ( longFilename [ 0 ] ) { <nl> SERIAL_ECHO_P ( port , ' ' ) ; <nl> SERIAL_ECHO_P ( port , longFilename ) ; <nl> void CardReader : : initsd ( ) { <nl> # define SPI_SPEED SPI_FULL_SPEED <nl> # endif <nl> <nl> - if ( ! card . init ( SPI_SPEED , SDSS ) <nl> + if ( ! sd2card . init ( SPI_SPEED , SDSS ) <nl> # if defined ( LCD_SDSS ) & & ( LCD_SDSS ! = SDSS ) <nl> - & & ! card . init ( SPI_SPEED , LCD_SDSS ) <nl> + & & ! sd2card . init ( SPI_SPEED , LCD_SDSS ) <nl> # endif <nl> ) { <nl> - / / if ( ! card . init ( SPI_HALF_SPEED , SDSS ) ) <nl> + / / if ( ! sd2card . init ( SPI_HALF_SPEED , SDSS ) ) <nl> SERIAL_ECHO_START ( ) ; <nl> SERIAL_ECHOLNPGM ( MSG_SD_INIT_FAIL ) ; <nl> } <nl> - else if ( ! volume . init ( & card ) ) { <nl> + else if ( ! volume . init ( & sd2card ) ) { <nl> SERIAL_ERROR_START ( ) ; <nl> SERIAL_ERRORLNPGM ( MSG_SD_VOL_INIT_FAIL ) ; <nl> } <nl> void CardReader : : initsd ( ) { <nl> setroot ( ) ; <nl> } <nl> <nl> - void CardReader : : setroot ( ) { <nl> - / * if ( ! workDir . openRoot ( & volume ) ) { <nl> - SERIAL_ECHOLNPGM ( MSG_SD_WORKDIR_FAIL ) ; <nl> - } * / <nl> - workDir = root ; <nl> - curDir = & workDir ; <nl> - # if ENABLED ( SDCARD_SORT_ALPHA ) <nl> - presort ( ) ; <nl> - # endif <nl> - } <nl> - <nl> void CardReader : : release ( ) { <nl> sdprinting = false ; <nl> cardOK = false ; <nl> void CardReader : : stopSDPrint ( <nl> # endif <nl> } <nl> <nl> - void CardReader : : openLogFile ( char * name ) { <nl> + void CardReader : : openLogFile ( char * const path ) { <nl> logging = true ; <nl> - openFile ( name , false ) ; <nl> + openFile ( path , false ) ; <nl> } <nl> <nl> void appendAtom ( SdFile & file , char * & dst , uint8_t & cnt ) { <nl> void CardReader : : getAbsFilename ( char * t ) { <nl> * t = ' \ 0 ' ; <nl> } <nl> <nl> - void CardReader : : openFile ( char * name , const bool read , const bool subcall / * = false * / ) { <nl> + void CardReader : : openFile ( char * const path , const bool read , const bool subcall / * = false * / ) { <nl> <nl> if ( ! cardOK ) return ; <nl> <nl> void CardReader : : openFile ( char * name , const bool read , const bool subcall / * = fals <nl> filespos [ file_subcall_ctr ] = sdpos ; <nl> <nl> SERIAL_ECHO_START ( ) ; <nl> - SERIAL_ECHOPAIR ( " SUBROUTINE CALL target : \ " " , name ) ; <nl> + SERIAL_ECHOPAIR ( " SUBROUTINE CALL target : \ " " , path ) ; <nl> SERIAL_ECHOPAIR ( " \ " parent : \ " " , proc_filenames [ file_subcall_ctr ] ) ; <nl> SERIAL_ECHOLNPAIR ( " \ " pos " , sdpos ) ; <nl> file_subcall_ctr + + ; <nl> void CardReader : : openFile ( char * name , const bool read , const bool subcall / * = fals <nl> SERIAL_ECHO_START ( ) ; <nl> SERIAL_ECHOPGM ( " Now " ) ; <nl> serialprintPGM ( doing = = 1 ? PSTR ( " doing " ) : PSTR ( " fresh " ) ) ; <nl> - SERIAL_ECHOLNPAIR ( " file : " , name ) ; <nl> + SERIAL_ECHOLNPAIR ( " file : " , path ) ; <nl> } <nl> <nl> stopSDPrint ( ) ; <nl> <nl> - SdFile myDir ; <nl> - curDir = & root ; <nl> - char * fname = name ; <nl> - char * dirname_start , * dirname_end ; <nl> - <nl> - if ( name [ 0 ] = = ' / ' ) { <nl> - dirname_start = & name [ 1 ] ; <nl> - while ( dirname_start ! = NULL ) { <nl> - dirname_end = strchr ( dirname_start , ' / ' ) ; <nl> - / / SERIAL_ECHOPGM ( " start : " ) ; SERIAL_ECHOLN ( ( int ) ( dirname_start - name ) ) ; <nl> - / / SERIAL_ECHOPGM ( " end : " ) ; SERIAL_ECHOLN ( ( int ) ( dirname_end - name ) ) ; <nl> - if ( dirname_end ! = NULL & & dirname_end > dirname_start ) { <nl> - char subdirname [ FILENAME_LENGTH ] ; <nl> - strncpy ( subdirname , dirname_start , dirname_end - dirname_start ) ; <nl> - subdirname [ dirname_end - dirname_start ] = ' \ 0 ' ; <nl> - if ( ! myDir . open ( curDir , subdirname , O_READ ) ) { <nl> - SERIAL_PROTOCOLPGM ( MSG_SD_OPEN_FILE_FAIL ) ; <nl> - SERIAL_PROTOCOL ( subdirname ) ; <nl> - SERIAL_PROTOCOLCHAR ( ' . ' ) ; <nl> - return ; <nl> - } <nl> - else { <nl> - / / SERIAL_ECHOLNPGM ( " dive ok " ) ; <nl> - } <nl> - <nl> - curDir = & myDir ; <nl> - dirname_start = dirname_end + 1 ; <nl> - } <nl> - else { / / the remainder after all / fsa / fdsa / is the filename <nl> - fname = dirname_start ; <nl> - / / SERIAL_ECHOLNPGM ( " remainder " ) ; <nl> - / / SERIAL_ECHOLN ( fname ) ; <nl> - break ; <nl> - } <nl> - } <nl> - } <nl> - else <nl> - curDir = & workDir ; / / Relative paths start in current directory <nl> + SdFile * curDir ; <nl> + const char * const fname = diveToFile ( curDir , path , false ) ; <nl> + if ( ! fname ) return ; <nl> <nl> if ( read ) { <nl> if ( file . open ( curDir , fname , O_READ ) ) { <nl> void CardReader : : openFile ( char * name , const bool read , const bool subcall / * = fals <nl> } <nl> else { <nl> saving = true ; <nl> - SERIAL_PROTOCOLLNPAIR ( MSG_SD_WRITE_TO_FILE , name ) ; <nl> + SERIAL_PROTOCOLLNPAIR ( MSG_SD_WRITE_TO_FILE , path ) ; <nl> lcd_setstatus ( fname ) ; <nl> } <nl> } <nl> void CardReader : : removeFile ( const char * const name ) { <nl> <nl> stopSDPrint ( ) ; <nl> <nl> - SdFile myDir ; <nl> - curDir = & root ; <nl> - const char * fname = name ; <nl> - <nl> - char * dirname_start , * dirname_end ; <nl> - if ( name [ 0 ] = = ' / ' ) { <nl> - dirname_start = strchr ( name , ' / ' ) + 1 ; <nl> - while ( dirname_start ! = NULL ) { <nl> - dirname_end = strchr ( dirname_start , ' / ' ) ; <nl> - / / SERIAL_ECHOPGM ( " start : " ) ; SERIAL_ECHOLN ( ( int ) ( dirname_start - name ) ) ; <nl> - / / SERIAL_ECHOPGM ( " end : " ) ; SERIAL_ECHOLN ( ( int ) ( dirname_end - name ) ) ; <nl> - if ( dirname_end ! = NULL & & dirname_end > dirname_start ) { <nl> - char subdirname [ FILENAME_LENGTH ] ; <nl> - strncpy ( subdirname , dirname_start , dirname_end - dirname_start ) ; <nl> - subdirname [ dirname_end - dirname_start ] = 0 ; <nl> - SERIAL_ECHOLN ( subdirname ) ; <nl> - if ( ! myDir . open ( curDir , subdirname , O_READ ) ) { <nl> - SERIAL_PROTOCOLPAIR ( MSG_SD_OPEN_FILE_FAIL , subdirname ) ; <nl> - SERIAL_PROTOCOLCHAR ( ' . ' ) ; <nl> - SERIAL_EOL ( ) ; <nl> - return ; <nl> - } <nl> - <nl> - curDir = & myDir ; <nl> - dirname_start = dirname_end + 1 ; <nl> - } <nl> - else { <nl> - fname = dirname_start ; <nl> - break ; <nl> - } <nl> - } <nl> - } <nl> - else / / Relative paths are rooted in the current directory <nl> - curDir = & workDir ; <nl> + SdFile * curDir ; <nl> + const char * const fname = diveToFile ( curDir , name , false ) ; <nl> + if ( ! fname ) return ; <nl> <nl> if ( file . remove ( curDir , fname ) ) { <nl> SERIAL_PROTOCOLPGM ( " File deleted : " ) ; <nl> void CardReader : : checkautostart ( ) { <nl> sprintf_P ( autoname , PSTR ( " auto % i . g " ) , autostart_index ) ; <nl> dir_t p ; <nl> root . rewind ( ) ; <nl> - while ( root . readDir ( p , NULL ) > 0 ) { <nl> + while ( root . readDir ( & p , NULL ) > 0 ) { <nl> for ( int8_t i = ( int8_t ) strlen ( ( char * ) p . name ) ; i - - ; ) p . name [ i ] = tolower ( p . name [ i ] ) ; <nl> if ( p . name [ 9 ] ! = ' ~ ' & & strncmp ( ( char * ) p . name , autoname , 5 ) = = 0 ) { <nl> openAndPrintFile ( autoname ) ; <nl> void CardReader : : closefile ( const bool store_location ) { <nl> <nl> / * * <nl> * Get the name of a file in the current directory by index <nl> + * with optional name to match . <nl> * / <nl> void CardReader : : getfilename ( uint16_t nr , const char * const match / * = NULL * / ) { <nl> # if ENABLED ( SDSORT_CACHE_NAMES ) <nl> void CardReader : : getfilename ( uint16_t nr , const char * const match / * = NULL * / ) { <nl> return ; <nl> } <nl> # endif / / SDSORT_CACHE_NAMES <nl> - curDir = & workDir ; <nl> lsAction = LS_GetFilename ; <nl> nrFile_index = nr ; <nl> - curDir - > rewind ( ) ; <nl> - lsDive ( NULL , * curDir , match ) ; <nl> + workDir . rewind ( ) ; <nl> + lsDive ( NULL , workDir , match ) ; <nl> } <nl> <nl> uint16_t CardReader : : getnrfilenames ( ) { <nl> - curDir = & workDir ; <nl> lsAction = LS_Count ; <nl> nrFiles = 0 ; <nl> - curDir - > rewind ( ) ; <nl> - lsDive ( NULL , * curDir ) ; <nl> + workDir . rewind ( ) ; <nl> + lsDive ( NULL , workDir ) ; <nl> / / SERIAL_ECHOLN ( nrFiles ) ; <nl> return nrFiles ; <nl> } <nl> <nl> - void CardReader : : chdir ( const char * relpath ) { <nl> - SdFile newDir ; <nl> - SdFile * parent = & root ; <nl> + / * * <nl> + * Dive to the given file path , with optional echo . <nl> + * On exit set curDir and return the name part of the path . <nl> + * A NULL result indicates an unrecoverable error . <nl> + * / <nl> + const char * CardReader : : diveToFile ( SdFile * & curDir , const char * const path , const bool echo ) { <nl> + SdFile myDir ; <nl> + if ( path [ 0 ] ! = ' / ' ) { curDir = & workDir ; return path ; } <nl> <nl> - if ( workDir . isOpen ( ) ) parent = & workDir ; <nl> + curDir = & root ; <nl> + const char * dirname_start = & path [ 1 ] ; <nl> + while ( dirname_start ) { <nl> + char * const dirname_end = strchr ( dirname_start , ' / ' ) ; <nl> + if ( dirname_end < = dirname_start ) break ; <nl> <nl> - if ( ! newDir . open ( * parent , relpath , O_READ ) ) { <nl> - SERIAL_ECHO_START ( ) ; <nl> - SERIAL_ECHOPGM ( MSG_SD_CANT_ENTER_SUBDIR ) ; <nl> - SERIAL_ECHOLN ( relpath ) ; <nl> + char dosSubdirname [ FILENAME_LENGTH ] ; <nl> + const uint8_t len = dirname_end - dirname_start ; <nl> + strncpy ( dosSubdirname , dirname_start , len ) ; <nl> + dosSubdirname [ len ] = 0 ; <nl> + <nl> + if ( echo ) SERIAL_ECHOLN ( dosSubdirname ) ; <nl> + <nl> + if ( ! myDir . open ( curDir , dosSubdirname , O_READ ) ) { <nl> + SERIAL_PROTOCOLPAIR ( MSG_SD_OPEN_FILE_FAIL , dosSubdirname ) ; <nl> + SERIAL_PROTOCOLCHAR ( ' . ' ) ; <nl> + SERIAL_EOL ( ) ; <nl> + return NULL ; <nl> + } <nl> + curDir = & myDir ; <nl> + dirname_start = dirname_end + 1 ; <nl> } <nl> - else { <nl> + return dirname_start ; <nl> + } <nl> + <nl> + void CardReader : : chdir ( const char * relpath ) { <nl> + SdFile newDir ; <nl> + SdFile * parent = workDir . isOpen ( ) ? & workDir : & root ; <nl> + <nl> + if ( newDir . open ( parent , relpath , O_READ ) ) { <nl> workDir = newDir ; <nl> if ( workDirDepth < MAX_DIR_DEPTH ) <nl> workDirParents [ workDirDepth + + ] = workDir ; <nl> void CardReader : : chdir ( const char * relpath ) { <nl> presort ( ) ; <nl> # endif <nl> } <nl> + else { <nl> + SERIAL_ECHO_START ( ) ; <nl> + SERIAL_ECHOPGM ( MSG_SD_CANT_ENTER_SUBDIR ) ; <nl> + SERIAL_ECHOLN ( relpath ) ; <nl> + } <nl> } <nl> <nl> int8_t CardReader : : updir ( ) { <nl> int8_t CardReader : : updir ( ) { <nl> return workDirDepth ; <nl> } <nl> <nl> + void CardReader : : setroot ( ) { <nl> + / * if ( ! workDir . openRoot ( & volume ) ) { <nl> + SERIAL_ECHOLNPGM ( MSG_SD_WORKDIR_FAIL ) ; <nl> + } * / <nl> + workDir = root ; <nl> + # if ENABLED ( SDCARD_SORT_ALPHA ) <nl> + presort ( ) ; <nl> + # endif <nl> + } <nl> + <nl> # if ENABLED ( SDCARD_SORT_ALPHA ) <nl> <nl> / * * <nl> mmm a / Marlin / src / sd / cardreader . h <nl> ppp b / Marlin / src / sd / cardreader . h <nl> class CardReader { <nl> void beginautostart ( ) ; <nl> void checkautostart ( ) ; <nl> <nl> - void openFile ( char * name , const bool read , const bool subcall = false ) ; <nl> - void openLogFile ( char * name ) ; <nl> + void openFile ( char * const path , const bool read , const bool subcall = false ) ; <nl> + void openLogFile ( char * const path ) ; <nl> void removeFile ( const char * const name ) ; <nl> void closefile ( const bool store_location = false ) ; <nl> void release ( ) ; <nl> class CardReader { <nl> int8_t updir ( ) ; <nl> void setroot ( ) ; <nl> <nl> + const char * diveToFile ( SdFile * & curDir , const char * const path , const bool echo ) ; <nl> + <nl> uint16_t get_num_Files ( ) ; <nl> <nl> # if ENABLED ( SDCARD_SORT_ALPHA ) <nl> class CardReader { <nl> FORCE_INLINE uint8_t percentDone ( ) { return ( isFileOpen ( ) & & filesize ) ? sdpos / ( ( filesize + 99 ) / 100 ) : 0 ; } <nl> FORCE_INLINE char * getWorkDirName ( ) { workDir . getFilename ( filename ) ; return filename ; } <nl> <nl> - Sd2Card & getSd2Card ( ) { return card ; } <nl> + Sd2Card & getSd2Card ( ) { return sd2card ; } <nl> <nl> # if ENABLED ( AUTO_REPORT_SD_STATUS ) <nl> void auto_report_sd_status ( void ) ; <nl> class CardReader { <nl> char filename [ FILENAME_LENGTH ] , longFilename [ LONG_FILENAME_LENGTH ] ; <nl> int autostart_index ; <nl> private : <nl> - SdFile root , * curDir , workDir , workDirParents [ MAX_DIR_DEPTH ] ; <nl> + SdFile root , workDir , workDirParents [ MAX_DIR_DEPTH ] ; <nl> uint8_t workDirDepth ; <nl> <nl> / / Sort files and folders alphabetically . <nl> class CardReader { <nl> <nl> # endif / / SDCARD_SORT_ALPHA <nl> <nl> - Sd2Card card ; <nl> + Sd2Card sd2card ; <nl> SdVolume volume ; <nl> SdFile file ; <nl> <nl>
Clean up and consolidate SD - related code ( )
MarlinFirmware/Marlin
8b44745bc75918fec1aae8c57666a50e773499f5
2018-05-24T06:18:56Z
mmm a / jstests / replsets / remove1 . js <nl> ppp b / jstests / replsets / remove1 . js <nl> assert . soon ( function ( ) { <nl> } ) ; <nl> <nl> config . version = 4 ; <nl> - var oldHost = config . members . pop ( ) ; <nl> + config . members . pop ( ) ; <nl> try { <nl> master . getDB ( " admin " ) . runCommand ( { replSetReconfig : config , force : true } ) ; <nl> } <nl> config = master . getDB ( " local " ) . system . replset . findOne ( ) ; <nl> printjson ( config ) ; <nl> assert ( config . version > 4 ) ; <nl> <nl> - print ( " re - add host removed with force " ) ; <nl> - replTest . start ( 1 ) ; <nl> - config . version + + ; <nl> - config . members . push ( oldHost ) ; <nl> - try { <nl> - master . adminCommand ( { replSetReconfig : config } ) ; <nl> - } <nl> - catch ( e ) { <nl> - print ( e ) ; <nl> - throw e ; <nl> - } <nl> - <nl> - var sentinel = { sentinel : 1 } ; <nl> - master . getDB ( " foo " ) . bar . baz . insert ( sentinel ) ; <nl> - var out = master . adminCommand ( { getLastError : 1 , w : 2 , wtimeout : 30 * 1000 } ) <nl> - assert . eq ( out . err , null ) ; <nl> - <nl> - reconnect ( replTest . nodes [ 1 ] ) ; <nl> - assert . eq ( replTest . nodes [ 1 ] . getDB ( " foo " ) . bar . baz . count ( sentinel ) , 1 ) <nl> - <nl> replTest . stopSet ( ) ; <nl> <nl>
breaking bb
mongodb/mongo
a1b1601affd2f412e830115694177be3298a358e
2011-08-24T04:08:27Z
mmm a / lib / SIL / SILFunctionType . cpp <nl> ppp b / lib / SIL / SILFunctionType . cpp <nl> class SILTypeSubstituter : <nl> substObjectType ) ) ; <nl> } <nl> <nl> - / / / Any other type is would be a valid type in the AST . Just <nl> - / / / apply the substitution on the AST level and then lower that . <nl> + / / / Any other type would be a valid type in the AST . Just apply the <nl> + / / / substitution on the AST level and then lower that . <nl> CanType visitType ( CanType origType ) { <nl> assert ( ! isa < AnyFunctionType > ( origType ) ) ; <nl> assert ( ! isa < LValueType > ( origType ) & & ! isa < InOutType > ( origType ) ) ; <nl>
[ gardening ] Fix some grammar in a comment . NFC .
apple/swift
8109fc545ea5d38ca62e5c2332b1c507f641252b
2019-07-01T20:12:57Z
mmm a / lib / SILOptimizer / IPO / ClosureSpecializer . cpp <nl> ppp b / lib / SILOptimizer / IPO / ClosureSpecializer . cpp <nl> void SILClosureSpecializerTransform : : gatherCallSites ( <nl> / / <nl> / / We need this to make sure that we insert a release in the appropriate <nl> / / locations to balance the + 1 from the creation of the partial apply . <nl> + / / <nl> + / / However , thin_to_thick_function closures don ' t have a context and <nl> + / / don ' t need to be released . <nl> llvm : : TinyPtrVector < SILBasicBlock * > NonFailureExitBBs ; <nl> if ( ClosureParamInfo . isGuaranteed ( ) & & <nl> + ! isa < ThinToThickFunctionInst > ( & II ) & & <nl> ! findAllNonFailureExitBBs ( ApplyCallee , NonFailureExitBBs ) ) { <nl> continue ; <nl> } <nl> mmm a / test / SILOptimizer / closure_specialize_consolidated . sil <nl> ppp b / test / SILOptimizer / closure_specialize_consolidated . sil <nl> bb0 ( % 0 : $ @ callee_owned ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . Nat <nl> % 9999 = tuple ( ) <nl> return % 9999 : $ ( ) <nl> } <nl> - <nl> - / / CHECK - LABEL : sil @ thin_thick_and_partial_apply_test : $ @ convention ( thin ) ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) { <nl> - / / CHECK : bb0 ( [ [ ARG0 : % . * ] ] : $ Builtin . NativeObject , [ [ ARG1 : % . * ] ] : $ Builtin . Int32 , [ [ ARG2 : % . * ] ] : $ Builtin . NativeObject , [ [ ARG3 : % . * ] ] : $ Builtin . NativeObject ) : <nl> + sil @ guaranteed_apply_callee_throw : $ @ convention ( thin ) ( @ guaranteed @ callee_owned ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) , Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject , @ owned Error ) - > @ error Error { <nl> + bb0 ( % 0 : $ @ callee_owned ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) , % 1 : $ Builtin . NativeObject , % 2 : $ Builtin . Int32 , % 3 : $ Builtin . NativeObject , % 4 : $ Builtin . NativeObject , % 5 : $ Error ) : <nl> + retain_value % 3 : $ Builtin . NativeObject <nl> + apply % 0 ( % 1 , % 2 , % 3 , % 4 ) : $ @ callee_owned ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) <nl> + release_value % 3 : $ Builtin . NativeObject <nl> + throw % 5 : $ Error <nl> + } <nl> + / / CHECK - LABEL : sil @ thin_thick_and_partial_apply_test : $ @ convention ( thin ) ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject , @ owned Error ) - > ( ) { <nl> + / / CHECK : bb0 ( [ [ ARG0 : % . * ] ] : $ Builtin . NativeObject , [ [ ARG1 : % . * ] ] : $ Builtin . Int32 , [ [ ARG2 : % . * ] ] : $ Builtin . NativeObject , [ [ ARG3 : % . * ] ] : $ Builtin . NativeObject , [ [ ARG4 : % . * ] ] : $ Error ) : <nl> / / CHECK : [ [ OLD_CLOSURE_CALLEE1 : % . * ] ] = function_ref @ large_closure_callee <nl> / / CHECK : [ [ OLD_CLOSURE_CALLEE2 : % . * ] ] = function_ref @ small_closure_callee <nl> / / CHECK : retain_value [ [ ARG0 ] ] : $ Builtin . NativeObject <nl> bb0 ( % 0 : $ @ callee_owned ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . Nat <nl> / / CHECK - NEXT : release_value [ [ DEAD_CLOSURE_1 ] ] <nl> / / CHECK - NOT : release_value [ [ DEAD_CLOSURE_2 ] ] <nl> <nl> - / / REMOVECLOSURES - LABEL : sil @ thin_thick_and_partial_apply_test : $ @ convention ( thin ) ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) { <nl> - / / REMOVECLOSURES : bb0 ( [ [ ARG0 : % . * ] ] : $ Builtin . NativeObject , [ [ ARG1 : % . * ] ] : $ Builtin . Int32 , [ [ ARG2 : % . * ] ] : $ Builtin . NativeObject , [ [ ARG3 : % . * ] ] : $ Builtin . NativeObject ) : <nl> + / / REMOVECLOSURES - LABEL : sil @ thin_thick_and_partial_apply_test : $ @ convention ( thin ) ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject , @ owned Error ) - > ( ) { <nl> + / / REMOVECLOSURES : bb0 ( [ [ ARG0 : % . * ] ] : $ Builtin . NativeObject , [ [ ARG1 : % . * ] ] : $ Builtin . Int32 , [ [ ARG2 : % . * ] ] : $ Builtin . NativeObject , [ [ ARG3 : % . * ] ] : $ Builtin . NativeObject , [ [ ARG4 : % . * ] ] : $ Error ) : <nl> / / REMOVECLOSURES : [ [ OLD_CLOSURE_CALLEE1 : % . * ] ] = function_ref @ large_closure_callee <nl> / / REMOVECLOSURES : [ [ OLD_CLOSURE_CALLEE2 : % . * ] ] = function_ref @ small_closure_callee <nl> / / REMOVECLOSURES : retain_value [ [ ARG0 ] ] : $ Builtin . NativeObject <nl> bb0 ( % 0 : $ @ callee_owned ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . Nat <nl> / / REMOVECLOSURES - NEXT : retain_value [ [ ARG2 ] ] : $ Builtin . NativeObject <nl> / / REMOVECLOSURES - NEXT : retain_value [ [ ARG3 ] ] : $ Builtin . NativeObject <nl> / / REMOVECLOSURES - NOT : partial_apply [ [ OLD_CLOSURE_CALLEE1 ] ] <nl> + / / REMOVECLOSURES : [ [ SPECFUN4 : % . * ] ] = function_ref @ _T029guaranteed_apply_callee_throw014small_closure_C0Tf1cnnnnn_n <nl> / / REMOVECLOSURES : [ [ SPECFUN2 : % . * ] ] = function_ref @ _T023guaranteed_apply_callee014small_closure_C0Tf1cnnnn_n <nl> / / REMOVECLOSURES : [ [ SPECFUN3 : % . * ] ] = function_ref @ _T018owned_apply_callee014small_closure_C0Tf1cnnnn_n <nl> / / REMOVECLOSURES - NOT : thin_to_thick_function [ [ OLD_CLOSURE_CALLEE2 ] ] <nl> bb0 ( % 0 : $ @ callee_owned ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . Nat <nl> / / REMOVECLOSURES - NEXT : strong_release [ [ ARG0 ] ] : $ Builtin . NativeObject <nl> / / REMOVECLOSURES - NEXT : strong_release [ [ ARG2 ] ] : $ Builtin . NativeObject <nl> / / REMOVECLOSURES - NEXT : strong_release [ [ ARG3 ] ] : $ Builtin . NativeObject <nl> - <nl> - sil @ thin_thick_and_partial_apply_test : $ @ convention ( thin ) ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) { <nl> - bb0 ( % 0 : $ Builtin . NativeObject , % 1 : $ Builtin . Int32 , % 2 : $ Builtin . NativeObject , % 3 : $ Builtin . NativeObject ) : <nl> + / / REMOVECLOSURES - NEXT : try_apply [ [ SPECFUN4 ] ] ( <nl> + sil @ thin_thick_and_partial_apply_test : $ @ convention ( thin ) ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject , @ owned Error ) - > ( ) { <nl> + bb0 ( % 0 : $ Builtin . NativeObject , % 1 : $ Builtin . Int32 , % 2 : $ Builtin . NativeObject , % 3 : $ Builtin . NativeObject , % 11 : $ Error ) : <nl> % 4 = function_ref @ owned_apply_callee : $ @ convention ( thin ) ( @ owned @ callee_owned ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) , Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) <nl> % 5 = function_ref @ guaranteed_apply_callee : $ @ convention ( thin ) ( @ guaranteed @ callee_owned ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) , Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) <nl> % 6 = function_ref @ large_closure_callee : $ @ convention ( thin ) ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject , Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) <nl> % 7 = function_ref @ small_closure_callee : $ @ convention ( thin ) ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) <nl> + % 10 = function_ref @ guaranteed_apply_callee_throw : $ @ convention ( thin ) ( @ guaranteed @ callee_owned ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) , Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject , @ owned Error ) - > @ error Error <nl> <nl> retain_value % 0 : $ Builtin . NativeObject <nl> retain_value % 2 : $ Builtin . NativeObject <nl> bb0 ( % 0 : $ Builtin . NativeObject , % 1 : $ Builtin . Int32 , % 2 : $ Builtin . NativeObject , <nl> apply % 5 ( % 9 , % 0 , % 1 , % 2 , % 3 ) : $ @ convention ( thin ) ( @ guaranteed @ callee_owned ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) , Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) <nl> <nl> release_value % 8 : $ @ callee_owned ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) <nl> + try_apply % 10 ( % 9 , % 0 , % 1 , % 2 , % 3 , % 11 ) : $ @ convention ( thin ) ( @ guaranteed @ callee_owned ( Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject ) - > ( ) , Builtin . NativeObject , Builtin . Int32 , @ owned Builtin . NativeObject , @ guaranteed Builtin . NativeObject , @ owned Error ) - > @ error Error , normal bb2 , error bb3 <nl> + <nl> + bb2 ( % n : $ ( ) ) : <nl> + br bb4 <nl> + <nl> + bb3 ( % e : $ Error ) : <nl> + br bb4 <nl> + <nl> + bb4 : <nl> % 9999 = tuple ( ) <nl> return % 9999 : $ ( ) <nl> } <nl>
Merge remote - tracking branch ' origin / master ' into master - next
apple/swift
56794c0ff7e55a11e917e7f50da8ab2f758584f2
2017-06-07T16:48:35Z
mmm a / xbmc / interfaces / json - rpc / JSONServiceDescription . cpp <nl> ppp b / xbmc / interfaces / json - rpc / JSONServiceDescription . cpp <nl> <nl> # include " ServiceDescription . h " <nl> # include " JSONServiceDescription . h " <nl> # include " utils / log . h " <nl> - # include " utils / StringUtils . h " <nl> + # include " utils / StdString . h " <nl> <nl> using namespace std ; <nl> using namespace JSONRPC ; <nl> <nl> JSONSchemaTypeDefinition : : CJsonSchemaPropertiesMap : : CJsonSchemaPropertiesMap ( ) <nl> { <nl> - m_propertiesmap = std : : map < CStdString , JSONSchemaTypeDefinition > ( ) ; <nl> + m_propertiesmap = std : : map < std : : string , JSONSchemaTypeDefinition > ( ) ; <nl> } <nl> <nl> void JSONSchemaTypeDefinition : : CJsonSchemaPropertiesMap : : add ( JSONSchemaTypeDefinition & property ) <nl> JSONSchemaTypeDefinition : : CJsonSchemaPropertiesMap : : JSONSchemaPropertiesIterator <nl> return m_propertiesmap . begin ( ) ; <nl> } <nl> <nl> - JSONSchemaTypeDefinition : : CJsonSchemaPropertiesMap : : JSONSchemaPropertiesIterator JSONSchemaTypeDefinition : : CJsonSchemaPropertiesMap : : find ( const CStdString & key ) const <nl> + JSONSchemaTypeDefinition : : CJsonSchemaPropertiesMap : : JSONSchemaPropertiesIterator JSONSchemaTypeDefinition : : CJsonSchemaPropertiesMap : : find ( const std : : string & key ) const <nl> { <nl> return m_propertiesmap . find ( key ) ; <nl> } <nl> unsigned int JSONSchemaTypeDefinition : : CJsonSchemaPropertiesMap : : size ( ) const <nl> Json : : Value CJSONServiceDescription : : m_notifications = Json : : Value ( Json : : objectValue ) ; <nl> CJSONServiceDescription : : CJsonRpcMethodMap CJSONServiceDescription : : m_actionMap ; <nl> JsonRpcDescriptionHeader CJSONServiceDescription : : m_header ; <nl> - std : : map < CStdString , JSONSchemaTypeDefinition > CJSONServiceDescription : : m_types = std : : map < CStdString , JSONSchemaTypeDefinition > ( ) ; <nl> - std : : vector < CStdString > CJSONServiceDescription : : m_badMethods = std : : vector < CStdString > ( ) ; <nl> + std : : map < std : : string , JSONSchemaTypeDefinition > CJSONServiceDescription : : m_types = std : : map < std : : string , JSONSchemaTypeDefinition > ( ) ; <nl> + std : : vector < JsonRpcMethodMap > CJSONServiceDescription : : m_unresolvedMethods = std : : vector < JsonRpcMethodMap > ( ) ; <nl> bool CJSONServiceDescription : : m_newReferenceType = false ; <nl> <nl> - bool CJSONServiceDescription : : Parse ( const JsonRpcMethodMap methodMap [ ] , unsigned int size ) <nl> + bool CJSONServiceDescription : : Parse ( JsonRpcMethodMap methodMap [ ] , unsigned int size ) <nl> { <nl> Json : : Value descriptionObject ; <nl> Json : : Reader reader ; <nl> bool CJSONServiceDescription : : Parse ( const JsonRpcMethodMap methodMap [ ] , unsigned <nl> <nl> / / First parse the header <nl> parseHeader ( descriptionObject ) ; <nl> - <nl> - / / Get all child elements <nl> - Json : : Value : : Members methodNames = descriptionObject . getMemberNames ( ) ; <nl> <nl> - / / Loop through the methods <nl> - for ( unsigned int index = 0 ; index < methodNames . size ( ) ; index + + ) <nl> + / / At the beginning all methods are unresolved <nl> + for ( unsigned int index = 0 ; index < size ; index + + ) <nl> { <nl> - CStdString methodName = methodNames . at ( index ) ; <nl> - / / Make sure the method actually exists and represents an object <nl> - if ( ! descriptionObject . isMember ( methodName ) | | ! descriptionObject [ methodName ] . isObject ( ) | | <nl> - ! descriptionObject [ methodName ] . isMember ( " type " ) | | ! descriptionObject [ methodName ] [ " type " ] . isString ( ) ) <nl> - continue ; <nl> - <nl> - CStdString type = GetString ( descriptionObject [ methodName ] [ " type " ] , " " ) ; <nl> - if ( type . compare ( " method " ) = = 0 ) <nl> - { <nl> - / / Check if the method is available in the method map <nl> - JSONRPC : : MethodCall methodCall = NULL ; <nl> - unsigned int mapIndex ; <nl> - for ( mapIndex = 0 ; mapIndex < size ; mapIndex + + ) <nl> - { <nl> - if ( methodName . compare ( methodMap [ mapIndex ] . name ) = = 0 ) <nl> - { <nl> - methodCall = methodMap [ mapIndex ] . method ; <nl> - break ; <nl> - } <nl> - } <nl> - <nl> - / / If the method is not available in the method map <nl> - / / we have to ignore it <nl> - if ( methodCall = = NULL ) <nl> - { <nl> - CLog : : Log ( LOGERROR , " JSONRPC : No implementation for method % s found " , methodName . c_str ( ) ) ; <nl> - continue ; <nl> - } <nl> - <nl> - / / Parse the details of the method <nl> - JsonRpcMethod method ; <nl> - method . name = methodMap [ mapIndex ] . name ; <nl> - method . method = methodCall ; <nl> - if ( ! parseMethod ( descriptionObject [ methodName ] , method ) ) <nl> - { <nl> - / / If parsing failed add the method to the list of currently bad methods <nl> - / / ( might be that a reference for a parameter is missing ) <nl> - m_badMethods . push_back ( methodName ) ; <nl> - CLog : : Log ( LOGDEBUG , " JSONRPC : Method % s could not be parsed correctly and might be re - parsed later " , methodName . c_str ( ) ) ; <nl> - continue ; <nl> - } <nl> - <nl> - m_actionMap . add ( method ) ; <nl> - } <nl> - else if ( descriptionObject [ methodName ] . isMember ( " id " ) & & descriptionObject [ methodName ] [ " id " ] . isString ( ) ) <nl> - { <nl> - JSONSchemaTypeDefinition globalType ; <nl> - globalType . name = methodName . c_str ( ) ; <nl> - parseTypeDefinition ( descriptionObject [ methodName ] , globalType , false ) ; <nl> - } <nl> + m_unresolvedMethods . push_back ( methodMap [ index ] ) ; <nl> } <nl> <nl> / / As long as there have been new reference types <nl> / / and there are more bad methods than in the last <nl> / / try we can try parsing again <nl> - unsigned int badMethodCount = m_badMethods . size ( ) + 1 ; <nl> - while ( m_newReferenceType & & m_badMethods . size ( ) > 0 & & m_badMethods . size ( ) < badMethodCount ) <nl> + unsigned int unresolvedMethodCount = m_unresolvedMethods . size ( ) + 1 ; <nl> + m_newReferenceType = true ; <nl> + while ( m_newReferenceType & & m_unresolvedMethods . size ( ) > 0 & & m_unresolvedMethods . size ( ) < unresolvedMethodCount ) <nl> { <nl> m_newReferenceType = false ; <nl> - badMethodCount = m_badMethods . size ( ) ; <nl> - std : : vector < CStdString > stillBadMethods = std : : vector < CStdString > ( ) ; <nl> + unresolvedMethodCount = m_unresolvedMethods . size ( ) ; <nl> + std : : vector < JsonRpcMethodMap > stillUnresolvedMethods = std : : vector < JsonRpcMethodMap > ( ) ; <nl> <nl> - for ( unsigned int methodIndex = 0 ; methodIndex < badMethodCount ; methodIndex + + ) <nl> + / / Loop through the methods <nl> + std : : vector < JsonRpcMethodMap > : : const_iterator iteratorEnd = m_unresolvedMethods . end ( ) ; <nl> + for ( std : : vector < JsonRpcMethodMap > : : const_iterator iterator = m_unresolvedMethods . begin ( ) ; iterator ! = iteratorEnd ; iterator + + ) <nl> { <nl> - JsonRpcMethod method ; <nl> - / / Check if the method is available in the method map <nl> - JSONRPC : : MethodCall methodCall = NULL ; <nl> - unsigned int mapIndex ; <nl> - for ( mapIndex = 0 ; mapIndex < size ; mapIndex + + ) <nl> + / / Make sure the method description actually exists and represents an object <nl> + if ( ! descriptionObject . isMember ( ( * iterator ) . name ) | | ! descriptionObject [ ( * iterator ) . name ] . isObject ( ) | | <nl> + ! descriptionObject [ ( * iterator ) . name ] . isMember ( " type " ) | | ! descriptionObject [ ( * iterator ) . name ] [ " type " ] . isString ( ) ) <nl> { <nl> - if ( m_badMethods . at ( methodIndex ) . compare ( methodMap [ mapIndex ] . name ) = = 0 ) <nl> - { <nl> - methodCall = methodMap [ mapIndex ] . method ; <nl> - break ; <nl> - } <nl> + CLog : : Log ( LOGERROR , " JSONRPC : No json schema description for method % s found " , ( * iterator ) . name . c_str ( ) ) ; <nl> + continue ; <nl> } <nl> <nl> - / / If the method is not available in the method map <nl> - / / we have to ignore it <nl> - if ( methodCall = = NULL ) <nl> + std : : string type = GetString ( descriptionObject [ ( * iterator ) . name ] [ " type " ] , " " ) ; <nl> + if ( type . compare ( " method " ) ! = 0 ) <nl> { <nl> - CLog : : Log ( LOGERROR , " JSONRPC : No implementation for method % s found " , m_badMethods . at ( methodIndex ) . c_str ( ) ) ; <nl> - continue ; <nl> + CLog : : Log ( LOGERROR , " JSONRPC : No valid json schema description for method % s found " , ( * iterator ) . name . c_str ( ) ) ; <nl> + continue ; <nl> } <nl> <nl> / / Parse the details of the method <nl> - method . name = methodMap [ mapIndex ] . name ; <nl> - method . method = methodCall ; <nl> - if ( ! parseMethod ( descriptionObject [ m_badMethods . at ( methodIndex ) ] , method ) ) <nl> + JsonRpcMethod method ; <nl> + method . name = ( * iterator ) . name ; <nl> + method . method = ( * iterator ) . method ; <nl> + if ( ! parseMethod ( descriptionObject [ method . name ] , method ) ) <nl> { <nl> - / / If parsing still failed add the method to the list of currently bad methods <nl> + / / If parsing failed add the method to the list of currently bad methods <nl> / / ( might be that a reference for a parameter is missing ) <nl> - stillBadMethods . push_back ( m_badMethods . at ( methodIndex ) ) ; <nl> - CLog : : Log ( LOGDEBUG , " JSONRPC : Method % s could not be parsed correctly and might be re - parsed later " , m_badMethods . at ( methodIndex ) . c_str ( ) ) ; <nl> + stillUnresolvedMethods . push_back ( ( * iterator ) ) ; <nl> + CLog : : Log ( LOGDEBUG , " JSONRPC : Method % s could not be parsed correctly and might be re - parsed later " , method . name . c_str ( ) ) ; <nl> continue ; <nl> } <nl> <nl> m_actionMap . add ( method ) ; <nl> } <nl> <nl> - m_badMethods = stillBadMethods ; <nl> + m_unresolvedMethods = stillUnresolvedMethods ; <nl> + } <nl> + <nl> + / / Get all child elements <nl> + Json : : Value : : Members methodNames = descriptionObject . getMemberNames ( ) ; <nl> + <nl> + / / Parse <nl> + for ( unsigned int index = 0 ; index < methodNames . size ( ) ; index + + ) <nl> + { <nl> + std : : string methodName = methodNames . at ( index ) ; <nl> + / / Make sure the method actually exists and represents an object <nl> + if ( ! descriptionObject . isMember ( methodName ) | | ! descriptionObject [ methodName ] . isObject ( ) | | <nl> + ! descriptionObject [ methodName ] . isMember ( " type " ) | | ! descriptionObject [ methodName ] [ " type " ] . isString ( ) ) <nl> + continue ; <nl> + <nl> + std : : string type = GetString ( descriptionObject [ methodName ] [ " type " ] , " " ) ; <nl> + if ( type . compare ( " method " ) ! = 0 & & descriptionObject [ methodName ] . isMember ( " id " ) & & descriptionObject [ methodName ] [ " id " ] . isString ( ) ) <nl> + { <nl> + JSONSchemaTypeDefinition globalType ; <nl> + globalType . name = methodName ; <nl> + parseTypeDefinition ( descriptionObject [ methodName ] , globalType , false ) ; <nl> + } <nl> } <nl> <nl> / / Print a log message for every unparseable method <nl> - for ( unsigned int badMethodIndex = 0 ; badMethodIndex < m_badMethods . size ( ) ; badMethodIndex + + ) <nl> - CLog : : Log ( LOGERROR , " JSONRPC : Method % s could not be parsed correctly and will be ignored " , m_badMethods . at ( badMethodIndex ) . c_str ( ) ) ; <nl> + std : : vector < JsonRpcMethodMap > : : const_iterator iteratorEnd = m_unresolvedMethods . end ( ) ; <nl> + for ( std : : vector < JsonRpcMethodMap > : : const_iterator iterator = m_unresolvedMethods . begin ( ) ; iterator ! = iteratorEnd ; iterator + + ) <nl> + CLog : : Log ( LOGERROR , " JSONRPC : Method % s could not be parsed correctly and will be ignored " , ( * iterator ) . name . c_str ( ) ) ; <nl> <nl> return true ; <nl> } <nl> void CJSONServiceDescription : : Print ( Json : : Value & result , ITransportLayer * transp <nl> result [ " version " ] = m_header . version ; <nl> result [ " description " ] = m_header . description ; <nl> <nl> - std : : map < CStdString , JSONSchemaTypeDefinition > : : const_iterator typeIterator ; <nl> - std : : map < CStdString , JSONSchemaTypeDefinition > : : const_iterator typeIteratorEnd = m_types . end ( ) ; <nl> + std : : map < std : : string , JSONSchemaTypeDefinition > : : const_iterator typeIterator ; <nl> + std : : map < std : : string , JSONSchemaTypeDefinition > : : const_iterator typeIteratorEnd = m_types . end ( ) ; <nl> for ( typeIterator = m_types . begin ( ) ; typeIterator ! = typeIteratorEnd ; typeIterator + + ) <nl> { <nl> Json : : Value currentType = Json : : Value ( Json : : objectValue ) ; <nl> void CJSONServiceDescription : : Print ( Json : : Value & result , ITransportLayer * transp <nl> Json : : Value currentMethod = Json : : Value ( Json : : objectValue ) ; <nl> <nl> currentMethod [ " type " ] = " method " ; <nl> - if ( printDescriptions & & strlen ( methodIterator - > second . description ) > 0 ) <nl> + if ( printDescriptions & & ! methodIterator - > second . description . empty ( ) ) <nl> currentMethod [ " description " ] = methodIterator - > second . description ; <nl> if ( printMetadata ) <nl> { <nl> currentMethod [ " permission " ] = PermissionToString ( methodIterator - > second . permission ) ; <nl> - currentMethod [ " statechanging " ] = methodIterator - > second . stateChanging ; <nl> } <nl> <nl> currentMethod [ " params " ] = Json : : Value ( Json : : arrayValue ) ; <nl> JSON_STATUS CJSONServiceDescription : : CheckCall ( const char * const method , const J <nl> CJsonRpcMethodMap : : JsonRpcMethodIterator iter = m_actionMap . find ( method ) ; <nl> if ( iter ! = m_actionMap . end ( ) ) <nl> { <nl> - if ( client ! = NULL & & ( client - > GetPermissionFlags ( ) & iter - > second . permission ) & & ( ! announcement | | iter - > second . stateChanging ) ) <nl> + if ( client ! = NULL & & ( client - > GetPermissionFlags ( ) & iter - > second . permission ) & & ( ! announcement | | ( iter - > second . permission & OPERATION_PERMISSION_ANNOUNCEMENT ) ) ) <nl> { <nl> methodCall = iter - > second . method ; <nl> <nl> void CJSONServiceDescription : : printType ( const JSONSchemaTypeDefinition & type , bo <nl> <nl> if ( isGlobal ) <nl> output [ " id " ] = type . id ; <nl> - else if ( type . id ! = NULL & & strlen ( type . id ) > 0 ) <nl> + else if ( ! type . id . empty ( ) ) <nl> { <nl> output [ " $ ref " ] = type . id ; <nl> typeReference = true ; <nl> } <nl> <nl> - if ( printDescriptions & & strlen ( type . description ) > 0 ) <nl> + if ( printDescriptions & & ! type . description . empty ( ) ) <nl> output [ " description " ] = type . description ; <nl> <nl> if ( isParameter | | printDefault ) <nl> JSON_STATUS CJSONServiceDescription : : checkParameter ( const Json : : Value & requestPa <nl> <nl> JSON_STATUS CJSONServiceDescription : : checkType ( const Json : : Value & value , const JSONSchemaTypeDefinition & type , Json : : Value & outputValue , Json : : Value & errorData ) <nl> { <nl> - if ( type . name ! = NULL ) <nl> + if ( ! type . name . empty ( ) ) <nl> errorData [ " name " ] = type . name ; <nl> SchemaValueTypeToJson ( type . type , errorData [ " type " ] ) ; <nl> CStdString errorMessage ; <nl> JSON_STATUS CJSONServiceDescription : : checkType ( const Json : : Value & value , const J <nl> / / Let ' s check the type of the provided parameter <nl> if ( ! IsType ( value , type . type ) ) <nl> { <nl> - CLog : : Log ( LOGWARNING , " JSONRPC : Type mismatch in type % s " , type . name ) ; <nl> - errorMessage . Format ( " Invalid type % s received " , ValueTypeToString ( value . type ( ) ) ) ; <nl> + CLog : : Log ( LOGWARNING , " JSONRPC : Type mismatch in type % s " , type . name . c_str ( ) ) ; <nl> + errorMessage . Format ( " Invalid type % s received " , ValueTypeToString ( value . type ( ) ) . c_str ( ) ) ; <nl> errorData [ " message " ] = errorMessage . c_str ( ) ; <nl> return InvalidParams ; <nl> } <nl> else if ( value . isNull ( ) & & ! HasType ( type . type , NullValue ) ) <nl> { <nl> - CLog : : Log ( LOGWARNING , " JSONRPC : Value is NULL in type % s " , type . name ) ; <nl> + CLog : : Log ( LOGWARNING , " JSONRPC : Value is NULL in type % s " , type . name . c_str ( ) ) ; <nl> errorData [ " message " ] = " Received value is null " ; <nl> return InvalidParams ; <nl> } <nl> JSON_STATUS CJSONServiceDescription : : checkType ( const Json : : Value & value , const J <nl> / / Check the number of items against minItems and maxItems <nl> if ( ( type . minItems > 0 & & value . size ( ) < type . minItems ) | | ( type . maxItems > 0 & & value . size ( ) > type . maxItems ) ) <nl> { <nl> - CLog : : Log ( LOGWARNING , " JSONRPC : Number of array elements does not match minItems and / or maxItems in type % s " , type . name ) ; <nl> + CLog : : Log ( LOGWARNING , " JSONRPC : Number of array elements does not match minItems and / or maxItems in type % s " , type . name . c_str ( ) ) ; <nl> if ( type . minItems > 0 & & type . maxItems > 0 ) <nl> errorMessage . Format ( " Between % d and % d array items expected but % d received " , type . minItems , type . maxItems , value . size ( ) ) ; <nl> else if ( type . minItems > 0 ) <nl> JSON_STATUS CJSONServiceDescription : : checkType ( const Json : : Value & value , const J <nl> JSON_STATUS status = checkType ( value [ arrayIndex ] , itemType , outputValue [ arrayIndex ] , errorData [ " property " ] ) ; <nl> if ( status ! = OK ) <nl> { <nl> - CLog : : Log ( LOGWARNING , " JSONRPC : Array element at index % u does not match in type % s " , arrayIndex , type . name ) ; <nl> - errorMessage . Format ( " % s expected for array element at index % u but % s received " , SchemaValueTypeToString ( type . type ) , arrayIndex , ValueTypeToString ( value . type ( ) ) ) ; <nl> + CLog : : Log ( LOGWARNING , " JSONRPC : Array element at index % u does not match in type % s " , arrayIndex , type . name . c_str ( ) ) ; <nl> + errorMessage . Format ( " % s expected for array element at index % u but % s received " , SchemaValueTypeToString ( type . type ) . c_str ( ) , arrayIndex , ValueTypeToString ( value . type ( ) ) . c_str ( ) ) ; <nl> errorData [ " message " ] = errorMessage . c_str ( ) ; <nl> return status ; <nl> } <nl> JSON_STATUS CJSONServiceDescription : : checkType ( const Json : : Value & value , const J <nl> / / allowed there is no need to check every element <nl> if ( value . size ( ) < type . items . size ( ) | | ( value . size ( ) ! = type . items . size ( ) & & type . additionalItems . size ( ) = = 0 ) ) <nl> { <nl> - CLog : : Log ( LOGWARNING , " JSONRPC : One of the array elements does not match in type % s " , type . name ) ; <nl> + CLog : : Log ( LOGWARNING , " JSONRPC : One of the array elements does not match in type % s " , type . name . c_str ( ) ) ; <nl> errorMessage . Format ( " % d array elements expected but % d received " , type . items . size ( ) , value . size ( ) ) ; <nl> errorData [ " message " ] = errorMessage . c_str ( ) ; <nl> return InvalidParams ; <nl> JSON_STATUS CJSONServiceDescription : : checkType ( const Json : : Value & value , const J <nl> <nl> if ( ! ok ) <nl> { <nl> - CLog : : Log ( LOGWARNING , " JSONRPC : Array contains non - conforming additional items in type % s " , type . name ) ; <nl> + CLog : : Log ( LOGWARNING , " JSONRPC : Array contains non - conforming additional items in type % s " , type . name . c_str ( ) ) ; <nl> errorMessage . Format ( " Array element at index % u does not match the \ " additionalItems \ " schema " , arrayIndex ) ; <nl> errorData [ " message " ] = errorMessage . c_str ( ) ; <nl> return InvalidParams ; <nl> JSON_STATUS CJSONServiceDescription : : checkType ( const Json : : Value & value , const J <nl> / / If two elements are the same they are not unique <nl> if ( Compare ( outputValue [ checkingIndex ] , outputValue [ checkedIndex ] ) = = 0 ) <nl> { <nl> - CLog : : Log ( LOGWARNING , " JSONRPC : Not unique array element at index % u and % u in type % s " , checkingIndex , checkedIndex , type . name ) ; <nl> + CLog : : Log ( LOGWARNING , " JSONRPC : Not unique array element at index % u and % u in type % s " , checkingIndex , checkedIndex , type . name . c_str ( ) ) ; <nl> errorMessage . Format ( " Array element at index % u is not unique ( same as array element at index % u ) " , checkingIndex , checkedIndex ) ; <nl> errorData [ " message " ] = errorMessage . c_str ( ) ; <nl> return InvalidParams ; <nl> JSON_STATUS CJSONServiceDescription : : checkType ( const Json : : Value & value , const J <nl> JSON_STATUS status = checkType ( value [ propertiesIterator - > first ] , propertiesIterator - > second , outputValue [ propertiesIterator - > first ] , errorData [ " property " ] ) ; <nl> if ( status ! = OK ) <nl> { <nl> - CLog : : Log ( LOGWARNING , " JSONRPC : Invalid property \ " % s \ " in type % s " , propertiesIterator - > first . c_str ( ) , type . name ) ; <nl> + CLog : : Log ( LOGWARNING , " JSONRPC : Invalid property \ " % s \ " in type % s " , propertiesIterator - > first . c_str ( ) , type . name . c_str ( ) ) ; <nl> return status ; <nl> } <nl> handled + + ; <nl> JSON_STATUS CJSONServiceDescription : : checkType ( const Json : : Value & value , const J <nl> outputValue [ propertiesIterator - > first ] = propertiesIterator - > second . defaultValue ; <nl> else <nl> { <nl> - CLog : : Log ( LOGWARNING , " JSONRPC : Missing property \ " % s \ " in type % s " , propertiesIterator - > first . c_str ( ) , type . name ) ; <nl> + CLog : : Log ( LOGWARNING , " JSONRPC : Missing property \ " % s \ " in type % s " , propertiesIterator - > first . c_str ( ) , type . name . c_str ( ) ) ; <nl> errorData [ " property " ] [ " name " ] = propertiesIterator - > first . c_str ( ) ; <nl> errorData [ " property " ] [ " type " ] = SchemaValueTypeToString ( propertiesIterator - > second . type ) ; <nl> errorData [ " message " ] = " Missing property " ; <nl> JSON_STATUS CJSONServiceDescription : : checkType ( const Json : : Value & value , const J <nl> / / Check maximum <nl> ( type . exclusiveMaximum & & numberValue > = type . maximum ) | | ( ! type . exclusiveMaximum & & numberValue > type . maximum ) ) <nl> { <nl> - CLog : : Log ( LOGWARNING , " JSONRPC : Value does not lay between minimum and maximum in type % s " , type . name ) ; <nl> + CLog : : Log ( LOGWARNING , " JSONRPC : Value does not lay between minimum and maximum in type % s " , type . name . c_str ( ) ) ; <nl> errorMessage . Format ( " Value between % f ( % s ) and % f ( % s ) expected but % f received " , <nl> type . minimum , type . exclusiveMinimum ? " exclusive " : " inclusive " , type . maximum , type . exclusiveMaximum ? " exclusive " : " inclusive " , numberValue ) ; <nl> errorData [ " message " ] = errorMessage . c_str ( ) ; <nl> JSON_STATUS CJSONServiceDescription : : checkType ( const Json : : Value & value , const J <nl> / / Check divisibleBy <nl> else if ( ( HasType ( type . type , IntegerValue ) & & type . divisibleBy > 0 & & ( ( int ) numberValue % type . divisibleBy ) ! = 0 ) ) <nl> { <nl> - CLog : : Log ( LOGWARNING , " JSONRPC : Value does not meet divisibleBy requirements in type % s " , type . name ) ; <nl> + CLog : : Log ( LOGWARNING , " JSONRPC : Value does not meet divisibleBy requirements in type % s " , type . name . c_str ( ) ) ; <nl> errorMessage . Format ( " Value should be divisible by % d but % d received " , type . divisibleBy , ( int ) numberValue ) ; <nl> errorData [ " message " ] = errorMessage . c_str ( ) ; <nl> return InvalidParams ; <nl> void CJSONServiceDescription : : parseHeader ( const Json : : Value & descriptionObject ) <nl> bool CJSONServiceDescription : : parseMethod ( const Json : : Value & value , JsonRpcMethod & method ) <nl> { <nl> / / Parse XBMC specific information about the method <nl> - method . transportneed = StringToTransportLayer ( value . isMember ( " transport " ) ? value [ " transport " ] . asString ( ) . c_str ( ) : " " ) ; <nl> - method . permission = StringToPermission ( value . isMember ( " permission " ) ? value [ " permission " ] . asString ( ) . c_str ( ) : " " ) ; <nl> + method . transportneed = StringToTransportLayer ( value . isMember ( " transport " ) ? value [ " transport " ] . asString ( ) : " " ) ; <nl> + method . permission = StringToPermission ( value . isMember ( " permission " ) ? value [ " permission " ] . asString ( ) : " " ) ; <nl> method . description = GetString ( value [ " description " ] , " " ) ; <nl> - method . stateChanging = value . isMember ( " statechanging " ) ? value [ " statechanging " ] . asBool ( ) : false ; <nl> <nl> / / Check whether there are parameters defined <nl> if ( value . isMember ( " params " ) & & value [ " params " ] . isArray ( ) ) <nl> bool CJSONServiceDescription : : parseTypeDefinition ( const Json : : Value & value , JSON <nl> bool isReferenceType = false ; <nl> bool hasReference = false ; <nl> <nl> - type . id = NULL ; <nl> - type . description = NULL ; <nl> - <nl> / / Check if the type of the parameter defines a json reference <nl> / / to a type defined somewhere else <nl> if ( value . isMember ( " $ ref " ) & & value [ " $ ref " ] . isString ( ) ) <nl> { <nl> / / Get the name of the referenced type <nl> - CStdString refType = value [ " $ ref " ] . asString ( ) ; <nl> + std : : string refType = value [ " $ ref " ] . asString ( ) ; <nl> / / Check if the referenced type exists <nl> - std : : map < CStdString , JSONSchemaTypeDefinition > : : const_iterator iter = m_types . find ( refType ) ; <nl> + std : : map < std : : string , JSONSchemaTypeDefinition > : : const_iterator iter = m_types . find ( refType ) ; <nl> if ( refType . length ( ) < = 0 | | iter = = m_types . end ( ) ) <nl> { <nl> - CLog : : Log ( LOGDEBUG , " JSONRPC : JSON schema type % s references an unknown type % s " , type . name , refType . c_str ( ) ) ; <nl> + CLog : : Log ( LOGDEBUG , " JSONRPC : JSON schema type % s references an unknown type % s " , type . name . c_str ( ) , refType . c_str ( ) ) ; <nl> return false ; <nl> } <nl> <nl> - const char * typeName = type . name ; <nl> + std : : string typeName = type . name ; <nl> type = iter - > second ; <nl> - if ( strlen ( typeName ) > 0 ) <nl> + if ( ! typeName . empty ( ) ) <nl> type . name = typeName ; <nl> hasReference = true ; <nl> } <nl> bool CJSONServiceDescription : : parseTypeDefinition ( const Json : : Value & value , JSON <nl> { <nl> / / If the type is a string try to parse it <nl> if ( value [ " type " ] [ typeIndex ] . isString ( ) ) <nl> - parsedType | = StringToSchemaValueType ( value [ " type " ] [ typeIndex ] . asString ( ) . c_str ( ) ) ; <nl> + parsedType | = StringToSchemaValueType ( value [ " type " ] [ typeIndex ] . asString ( ) ) ; <nl> else <nl> CLog : : Log ( LOGWARNING , " JSONRPC : Invalid type in union type definition of type % s " , type . name ) ; <nl> } <nl> bool CJSONServiceDescription : : parseTypeDefinition ( const Json : : Value & value , JSON <nl> type . type = AnyValue ; <nl> } <nl> else <nl> - type . type = value [ " type " ] . isString ( ) ? StringToSchemaValueType ( value [ " type " ] . asString ( ) . c_str ( ) ) : AnyValue ; <nl> + type . type = value [ " type " ] . isString ( ) ? StringToSchemaValueType ( value [ " type " ] . asString ( ) ) : AnyValue ; <nl> <nl> if ( type . type = = ObjectValue ) <nl> { <nl> bool CJSONServiceDescription : : parseTypeDefinition ( const Json : : Value & value , JSON <nl> Json : : Value : : Members properties = value [ " properties " ] . getMemberNames ( ) ; <nl> for ( unsigned int propertyIndex = 0 ; propertyIndex < properties . size ( ) ; propertyIndex + + ) <nl> { <nl> - CStdString propertyName = properties . at ( propertyIndex ) ; <nl> + std : : string propertyName = properties . at ( propertyIndex ) ; <nl> if ( ! value [ " properties " ] . isMember ( propertyName ) ) <nl> continue ; <nl> <nl> bool CJSONServiceDescription : : parseTypeDefinition ( const Json : : Value & value , JSON <nl> / / recursively and add its default value <nl> / / to the current type ' s default value <nl> JSONSchemaTypeDefinition propertyType ; <nl> - propertyType . name = propertyName . c_str ( ) ; <nl> + propertyType . name = propertyName ; <nl> if ( ! parseTypeDefinition ( value [ " properties " ] [ propertyName ] , propertyType , false ) ) <nl> return false ; <nl> type . defaultValue [ propertyName ] = propertyType . defaultValue ; <nl> bool CJSONServiceDescription : : parseTypeDefinition ( const Json : : Value & value , JSON <nl> if ( value [ " additionalItems " ] . isObject ( ) ) <nl> { <nl> JSONSchemaTypeDefinition additionalItem ; <nl> - additionalItem . name = NULL ; <nl> <nl> if ( parseTypeDefinition ( value [ " additionalItems " ] , additionalItem , false ) ) <nl> type . additionalItems . push_back ( additionalItem ) ; <nl> bool CJSONServiceDescription : : parseTypeDefinition ( const Json : : Value & value , JSON <nl> for ( unsigned int itemIndex = 0 ; itemIndex < value [ " additionalItems " ] . size ( ) ; itemIndex + + ) <nl> { <nl> JSONSchemaTypeDefinition additionalItem ; <nl> - additionalItem . name = NULL ; <nl> <nl> if ( parseTypeDefinition ( value [ " additionalItems " ] [ itemIndex ] , additionalItem , false ) ) <nl> type . additionalItems . push_back ( additionalItem ) ; <nl> bool CJSONServiceDescription : : parseTypeDefinition ( const Json : : Value & value , JSON <nl> if ( value [ " items " ] . isObject ( ) ) <nl> { <nl> JSONSchemaTypeDefinition item ; <nl> - item . name = NULL ; <nl> <nl> if ( ! parseTypeDefinition ( value [ " items " ] , item , false ) ) <nl> return false ; <nl> bool CJSONServiceDescription : : parseTypeDefinition ( const Json : : Value & value , JSON <nl> for ( unsigned int itemIndex = 0 ; itemIndex < value [ " items " ] . size ( ) ; itemIndex + + ) <nl> { <nl> JSONSchemaTypeDefinition item ; <nl> - item . name = NULL ; <nl> <nl> if ( ! parseTypeDefinition ( value [ " items " ] [ itemIndex ] , item , false ) ) <nl> return false ; <nl> void CJSONServiceDescription : : addReferenceTypeDefinition ( JSONSchemaTypeDefinitio <nl> { <nl> / / If the given json value is no object or does not contain an " id " field <nl> / / of type string it is no valid type definition <nl> - if ( typeDefinition . id = = NULL | | strlen ( typeDefinition . id ) < = 0 ) <nl> + if ( typeDefinition . id . empty ( ) ) <nl> return ; <nl> <nl> / / If the id has already been defined we ignore the type definition <nl> void CJSONServiceDescription : : addReferenceTypeDefinition ( JSONSchemaTypeDefinitio <nl> <nl> / / Add the type to the list of type definitions <nl> m_types [ typeDefinition . id ] = typeDefinition ; <nl> - if ( m_badMethods . size ( ) > 0 ) <nl> + if ( m_unresolvedMethods . size ( ) > 0 ) <nl> m_newReferenceType = true ; <nl> } <nl> <nl> CJSONServiceDescription : : CJsonRpcMethodMap : : CJsonRpcMethodMap ( ) <nl> { <nl> - m_actionmap = std : : map < CStdString , JsonRpcMethod > ( ) ; <nl> + m_actionmap = std : : map < std : : string , JsonRpcMethod > ( ) ; <nl> } <nl> <nl> void CJSONServiceDescription : : CJsonRpcMethodMap : : add ( JsonRpcMethod & method ) <nl> CJSONServiceDescription : : CJsonRpcMethodMap : : JsonRpcMethodIterator CJSONServiceDe <nl> return m_actionmap . begin ( ) ; <nl> } <nl> <nl> - CJSONServiceDescription : : CJsonRpcMethodMap : : JsonRpcMethodIterator CJSONServiceDescription : : CJsonRpcMethodMap : : find ( const CStdString & key ) const <nl> + CJSONServiceDescription : : CJsonRpcMethodMap : : JsonRpcMethodIterator CJSONServiceDescription : : CJsonRpcMethodMap : : find ( const std : : string & key ) const <nl> { <nl> return m_actionmap . find ( key ) ; <nl> } <nl> mmm a / xbmc / interfaces / json - rpc / JSONServiceDescription . h <nl> ppp b / xbmc / interfaces / json - rpc / JSONServiceDescription . h <nl> <nl> * <nl> * / <nl> <nl> - # include " utils / StdString . h " <nl> # include < string > <nl> # include < vector > <nl> # include " jsoncpp / include / json / json . h " <nl> namespace JSONRPC <nl> \ brief Identification of the published <nl> service containing json rpc methods . <nl> * / <nl> - const char * id ; <nl> + std : : string id ; <nl> / * ! <nl> \ brief Description of the published <nl> service containing json rpc methods . <nl> * / <nl> - const char * description ; <nl> + std : : string description ; <nl> <nl> / * ! <nl> \ brief Version of the published <nl> namespace JSONRPC <nl> \ brief Name of the parameter ( for <nl> by - name calls ) <nl> * / <nl> - const char * name ; <nl> + std : : string name ; <nl> <nl> / * ! <nl> \ brief Id of the type ( for <nl> referenced types ) <nl> * / <nl> - const char * id ; <nl> + std : : string id ; <nl> <nl> / * ! <nl> \ brief Description of the parameter <nl> * / <nl> - const char * description ; <nl> + std : : string description ; <nl> <nl> / * ! <nl> \ brief JSON schema type of the parameter ' s value <nl> namespace JSONRPC <nl> <nl> void add ( JSONSchemaTypeDefinition & property ) ; <nl> <nl> - typedef std : : map < CStdString , JSONSchemaTypeDefinition > : : const_iterator JSONSchemaPropertiesIterator ; <nl> + typedef std : : map < std : : string , JSONSchemaTypeDefinition > : : const_iterator JSONSchemaPropertiesIterator ; <nl> JSONSchemaPropertiesIterator begin ( ) const ; <nl> - JSONSchemaPropertiesIterator find ( const CStdString & key ) const ; <nl> + JSONSchemaPropertiesIterator find ( const std : : string & key ) const ; <nl> JSONSchemaPropertiesIterator end ( ) const ; <nl> unsigned int size ( ) const ; <nl> private : <nl> - std : : map < CStdString , JSONSchemaTypeDefinition > m_propertiesmap ; <nl> + std : : map < std : : string , JSONSchemaTypeDefinition > m_propertiesmap ; <nl> } ; <nl> <nl> / * ! <nl> namespace JSONRPC <nl> / * ! <nl> \ brief Name of the represented method <nl> * / <nl> - const char * name ; <nl> + std : : string name ; <nl> / * ! <nl> \ brief Pointer tot he implementation <nl> of the represented method <nl> namespace JSONRPC <nl> to execute the method <nl> * / <nl> OperationPermission permission ; <nl> - / * ! <nl> - \ brief Whether this method changes the internal <nl> - state of XBMC or not <nl> - * / <nl> - bool stateChanging ; <nl> / * ! <nl> \ brief Description of the method <nl> * / <nl> - const char * description ; <nl> + std : : string description ; <nl> / * ! <nl> \ brief List of accepted parameters <nl> * / <nl> namespace JSONRPC <nl> / * ! <nl> \ brief Name of the json rpc method . <nl> * / <nl> - const char * name ; <nl> + std : : string name ; <nl> / * ! <nl> \ brief Pointer to the actual <nl> implementation of the json rpc <nl> namespace JSONRPC <nl> \ param size Size of the method map <nl> \ return True if the json schema description has been parsed sucessfully otherwise false <nl> * / <nl> - static bool Parse ( const JsonRpcMethodMap methodMap [ ] , unsigned int size ) ; <nl> + static bool Parse ( JsonRpcMethodMap methodMap [ ] , unsigned int size ) ; <nl> <nl> / * ! <nl> \ brief Gets the version of the json <nl> namespace JSONRPC <nl> <nl> void add ( JsonRpcMethod & method ) ; <nl> <nl> - typedef std : : map < CStdString , JsonRpcMethod > : : const_iterator JsonRpcMethodIterator ; <nl> + typedef std : : map < std : : string , JsonRpcMethod > : : const_iterator JsonRpcMethodIterator ; <nl> JsonRpcMethodIterator begin ( ) const ; <nl> - JsonRpcMethodIterator find ( const CStdString & key ) const ; <nl> + JsonRpcMethodIterator find ( const std : : string & key ) const ; <nl> JsonRpcMethodIterator end ( ) const ; <nl> private : <nl> - std : : map < CStdString , JsonRpcMethod > m_actionmap ; <nl> + std : : map < std : : string , JsonRpcMethod > m_actionmap ; <nl> } ; <nl> <nl> static Json : : Value m_notifications ; <nl> static JsonRpcDescriptionHeader m_header ; <nl> static CJsonRpcMethodMap m_actionMap ; <nl> - static std : : map < CStdString , JSONSchemaTypeDefinition > m_types ; <nl> - static std : : vector < CStdString > m_badMethods ; <nl> + static std : : map < std : : string , JSONSchemaTypeDefinition > m_types ; <nl> + static std : : vector < JsonRpcMethodMap > m_unresolvedMethods ; <nl> static bool m_newReferenceType ; <nl> } ; <nl> } <nl> mmm a / xbmc / interfaces / json - rpc / JSONUtils . h <nl> ppp b / xbmc / interfaces / json - rpc / JSONUtils . h <nl> namespace JSONRPC <nl> <nl> static const int OPERATION_PERMISSION_ALL = ( ReadData | ControlPlayback | ControlAnnounce | ControlPower | Logging | ScanLibrary ) ; <nl> <nl> + static const int OPERATION_PERMISSION_ANNOUNCEMENT = ( ControlPlayback | ControlAnnounce | ControlPower | Logging | ScanLibrary ) ; <nl> + <nl> / * ! <nl> \ brief Possible value types of a parameter or return type <nl> * / <nl> namespace JSONRPC <nl> the given object is not an array ) or for a parameter at the <nl> given position ( if the given object is an array ) . <nl> * / <nl> - static inline bool ParameterExists ( const Json : : Value & parameterObject , const char * key , unsigned int position ) { return IsValueMember ( parameterObject , key ) | | ( parameterObject . isArray ( ) & & parameterObject . size ( ) > position ) ; } <nl> + static inline bool ParameterExists ( const Json : : Value & parameterObject , std : : string key , unsigned int position ) { return IsValueMember ( parameterObject , key ) | | ( parameterObject . isArray ( ) & & parameterObject . size ( ) > position ) ; } <nl> <nl> / * ! <nl> \ brief Checks if the given object contains a value <nl> namespace JSONRPC <nl> \ return True if the given object contains a member with <nl> the given key otherwise false <nl> * / <nl> - static inline bool IsValueMember ( const Json : : Value & value , const char * key ) { return value . isObject ( ) & & value . isMember ( key ) ; } <nl> + static inline bool IsValueMember ( const Json : : Value & value , std : : string key ) { return value . isObject ( ) & & value . isMember ( key ) ; } <nl> <nl> / * ! <nl> \ brief Returns the json value of a parameter <nl> namespace JSONRPC <nl> the given object is not an array ) or of the parameter at the <nl> given position ( if the given object is an array ) . <nl> * / <nl> - static inline Json : : Value GetParameter ( const Json : : Value & parameterObject , const char * key , unsigned int position ) { return IsValueMember ( parameterObject , key ) ? parameterObject [ key ] : parameterObject [ position ] ; } <nl> + static inline Json : : Value GetParameter ( const Json : : Value & parameterObject , std : : string key , unsigned int position ) { return IsValueMember ( parameterObject , key ) ? parameterObject [ key ] : parameterObject [ position ] ; } <nl> <nl> / * ! <nl> \ brief Returns the json value of a parameter or the given <nl> namespace JSONRPC <nl> given position ( if the given object is an array ) . If the <nl> parameter does not exist the given default value is returned . <nl> * / <nl> - static inline Json : : Value GetParameter ( const Json : : Value & parameterObject , const char * key , unsigned int position , Json : : Value fallback ) { return IsValueMember ( parameterObject , key ) ? parameterObject [ key ] : ( ( parameterObject . isArray ( ) & & parameterObject . size ( ) > position ) ? parameterObject [ position ] : fallback ) ; } <nl> + static inline Json : : Value GetParameter ( const Json : : Value & parameterObject , std : : string key , unsigned int position , Json : : Value fallback ) { return IsValueMember ( parameterObject , key ) ? parameterObject [ key ] : ( ( parameterObject . isArray ( ) & & parameterObject . size ( ) > position ) ? parameterObject [ position ] : fallback ) ; } <nl> <nl> / * ! <nl> \ brief Returns the given json value as a string <nl> namespace JSONRPC <nl> \ return String value of the given json value or the default value <nl> if the given json value is no string <nl> * / <nl> - static inline const char * GetString ( const Json : : Value & value , const char * defaultValue ) <nl> + static inline std : : string GetString ( const Json : : Value & value , const char * defaultValue ) <nl> { <nl> - CStdString str = defaultValue ; <nl> + std : : string str = defaultValue ; <nl> if ( value . isString ( ) ) <nl> { <nl> str = value . asString ( ) ; <nl> } <nl> <nl> - return strcpy ( ( char * ) malloc ( sizeof ( char ) * str . length ( ) + 1 ) , str . c_str ( ) ) ; <nl> + return str ; <nl> } <nl> <nl> / * ! <nl> namespace JSONRPC <nl> \ param permission Specific OperationPermission <nl> \ return String representation of the given OperationPermission <nl> * / <nl> - static inline const char * PermissionToString ( const OperationPermission & permission ) <nl> + static inline std : : string PermissionToString ( const OperationPermission & permission ) <nl> { <nl> switch ( permission ) <nl> { <nl> namespace JSONRPC <nl> \ param permission String representation of the OperationPermission <nl> \ return OperationPermission value of the given string representation <nl> * / <nl> - static inline OperationPermission StringToPermission ( const char * permission ) <nl> + static inline OperationPermission StringToPermission ( std : : string permission ) <nl> { <nl> - if ( strcmp ( permission , " ControlPlayback " ) = = 0 ) <nl> + if ( permission . compare ( " ControlPlayback " ) = = 0 ) <nl> return ControlPlayback ; <nl> - if ( strcmp ( permission , " ControlAnnounce " ) = = 0 ) <nl> + if ( permission . compare ( " ControlAnnounce " ) = = 0 ) <nl> return ControlAnnounce ; <nl> - if ( strcmp ( permission , " ControlPower " ) = = 0 ) <nl> + if ( permission . compare ( " ControlPower " ) = = 0 ) <nl> return ControlPower ; <nl> - if ( strcmp ( permission , " Logging " ) = = 0 ) <nl> + if ( permission . compare ( " Logging " ) = = 0 ) <nl> return Logging ; <nl> - if ( strcmp ( permission , " ScanLibrary " ) = = 0 ) <nl> + if ( permission . compare ( " ScanLibrary " ) = = 0 ) <nl> return ScanLibrary ; <nl> <nl> return ReadData ; <nl> namespace JSONRPC <nl> \ param announcement Specific EAnnouncementFlag <nl> \ return String representation of the given EAnnouncementFlag <nl> * / <nl> - static inline const char * AnnouncementFlagToString ( const EAnnouncementFlag & announcement ) <nl> + static inline std : : string AnnouncementFlagToString ( const EAnnouncementFlag & announcement ) <nl> { <nl> switch ( announcement ) <nl> { <nl> namespace JSONRPC <nl> \ param transport String representation of the TransportLayerCapability <nl> \ return TransportLayerCapability value of the given string representation <nl> * / <nl> - static inline TransportLayerCapability StringToTransportLayer ( const char * transport ) <nl> + static inline TransportLayerCapability StringToTransportLayer ( std : : string transport ) <nl> { <nl> - if ( strcmp ( transport , " Announcing " ) = = 0 ) <nl> + if ( transport . compare ( " Announcing " ) = = 0 ) <nl> return Announcing ; <nl> - if ( strcmp ( transport , " FileDownload " ) = = 0 ) <nl> + if ( transport . compare ( " FileDownload " ) = = 0 ) <nl> return FileDownload ; <nl> <nl> return Response ; <nl> namespace JSONRPC <nl> \ param valueType String representation of the JSONSchemaType <nl> \ return JSONSchemaType value of the given string representation <nl> * / <nl> - static inline JSONSchemaType StringToSchemaValueType ( const char * valueType ) <nl> + static inline JSONSchemaType StringToSchemaValueType ( std : : string valueType ) <nl> { <nl> - if ( strcmp ( valueType , " null " ) = = 0 ) <nl> + if ( valueType . compare ( " null " ) = = 0 ) <nl> return NullValue ; <nl> - if ( strcmp ( valueType , " string " ) = = 0 ) <nl> + if ( valueType . compare ( " string " ) = = 0 ) <nl> return StringValue ; <nl> - if ( strcmp ( valueType , " number " ) = = 0 ) <nl> + if ( valueType . compare ( " number " ) = = 0 ) <nl> return NumberValue ; <nl> - if ( strcmp ( valueType , " integer " ) = = 0 ) <nl> + if ( valueType . compare ( " integer " ) = = 0 ) <nl> return IntegerValue ; <nl> - if ( strcmp ( valueType , " boolean " ) = = 0 ) <nl> + if ( valueType . compare ( " boolean " ) = = 0 ) <nl> return BooleanValue ; <nl> - if ( strcmp ( valueType , " array " ) = = 0 ) <nl> + if ( valueType . compare ( " array " ) = = 0 ) <nl> return ArrayValue ; <nl> - if ( strcmp ( valueType , " object " ) = = 0 ) <nl> + if ( valueType . compare ( " object " ) = = 0 ) <nl> return ObjectValue ; <nl> <nl> return AnyValue ; <nl> namespace JSONRPC <nl> \ param valueType Specific JSONSchemaType <nl> \ return String representation of the given JSONSchemaType <nl> * / <nl> - static inline const char * SchemaValueTypeToString ( JSONSchemaType valueType ) <nl> + static inline std : : string SchemaValueTypeToString ( JSONSchemaType valueType ) <nl> { <nl> std : : vector < JSONSchemaType > types = std : : vector < JSONSchemaType > ( ) ; <nl> for ( unsigned int value = 0x01 ; value < = ( unsigned int ) AnyValue ; value * = 2 ) <nl> namespace JSONRPC <nl> types . push_back ( ( JSONSchemaType ) value ) ; <nl> } <nl> <nl> - CStdString strType ; <nl> + std : : string strType ; <nl> if ( types . size ( ) > 1 ) <nl> strType . append ( " [ " ) ; <nl> <nl> namespace JSONRPC <nl> if ( types . size ( ) > 1 ) <nl> strType . append ( " ] " ) ; <nl> <nl> - return strcpy ( ( char * ) malloc ( sizeof ( char ) * strType . length ( ) + 1 ) , strType . c_str ( ) ) ; <nl> + return strType ; <nl> } <nl> <nl> / * ! <nl> namespace JSONRPC <nl> jsonObject = jsonObject [ 0 ] ; <nl> } <nl> <nl> - static inline const char * ValueTypeToString ( Json : : ValueType valueType ) <nl> + static inline std : : string ValueTypeToString ( Json : : ValueType valueType ) <nl> { <nl> switch ( valueType ) <nl> { <nl> mmm a / xbmc / interfaces / json - rpc / ServiceDescription . h <nl> ppp b / xbmc / interfaces / json - rpc / ServiceDescription . h <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Enumerates all actions and descriptions \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " getdescriptions \ " , \ " type \ " : \ " boolean \ " , \ " default \ " : true } , " <nl> " { \ " name \ " : \ " getmetadata \ " , \ " type \ " : \ " boolean \ " , \ " default \ " : false } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve the jsonrpc protocol version \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve the clients permissions \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : { " <nl> " \ " type \ " : \ " object \ " , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Ping responder \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Get announcement flags \ " , " <nl> " \ " transport \ " : \ " Announcing \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : { " <nl> " \ " id \ " : \ " Announcement . Flags \ " , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Change the announcement flags \ " , " <nl> " \ " transport \ " : \ " Announcing \ " , " <nl> " \ " permission \ " : \ " ControlAnnounce \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " Playback \ " , \ " type \ " : \ " boolean \ " , \ " default \ " : false } , " <nl> " { \ " name \ " : \ " GUI \ " , \ " type \ " : \ " boolean \ " , \ " default \ " : false } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Announce to other connected clients \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " sender \ " , \ " type \ " : \ " string \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " message \ " , \ " type \ " : \ " string \ " , \ " required \ " : true } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Returns all active players \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : { " <nl> " \ " type \ " : \ " object \ " , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Returns playback state of the audio player ( if it is active ) \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : { " <nl> " \ " id \ " : \ " Player . State . Extended \ " , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Pauses or unpause playback and returns the new state \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : { " <nl> " \ " id \ " : \ " Player . State \ " , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Stops playback \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Skips to previous item on the playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Skips to next item on the playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Rewind current playback \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Forward current playback \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieves the current and total time of the currently playing file \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : { " <nl> " \ " id \ " : \ " Player . TimeValues \ " , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve current playback progress in percentage \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " number \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Seek to a specific time \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " value \ " , \ " id \ " : \ " Player . SeekTime \ " , \ " type \ " : \ " integer \ " , \ " required \ " : true , \ " minimum \ " : 0 , \ " description \ " : \ " Time to seek to in seconds \ " } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Seek to a specific percentage \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " value \ " , \ " id \ " : \ " Player . SeekPercentage \ " , \ " type \ " : \ " number \ " , \ " required \ " : true , \ " minimum \ " : 0 . 0 , \ " maximum \ " : 100 . 0 , \ " description \ " : \ " Percentage value to seek to \ " } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Returns playback state of the video player ( if it is active ) \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : { \ " $ ref \ " : \ " Player . State . Extended \ " } " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Pauses or unpause playback and returns the new state \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : { \ " $ ref \ " : \ " Player . State \ " } " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Stops playback \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Skips to previous item on the playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Skips to next item on the playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Rewind current playback \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Forward current playback \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieves the current and total time of the currently playing file \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : { \ " $ ref \ " : \ " Player . TimeValues \ " } " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve current playback progress in percentage \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " number \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Seek to a specific time \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " value \ " , \ " $ ref \ " : \ " Player . SeekTime \ " , \ " required \ " : true } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Seek to a specific percentage \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " value \ " , \ " $ ref \ " : \ " Player . SeekPercentage \ " , \ " required \ " : true } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Pauses or unpause slideshow \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Stops slideshow \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Skips to previous picture in the slideshow \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Skips to next picture in the slideshow \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " If picture is zoomed move viewport left otherwise skip previous \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " If picture is zoomed move viewport right otherwise skip next \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " If picture is zoomed move viewport down \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " If picture is zoomed move viewport up \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Zoom out once \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Zoom in once \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Zooms current picture \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " value \ " , \ " type \ " : \ " integer \ " , \ " required \ " : true , \ " minimum \ " : 1 , \ " maximum \ " : 10 , \ " description \ " : \ " Zoom level \ " } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Rotates current picture \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Creates a virtual playlist from a given one from a file \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " playlist \ " , \ " type \ " : \ " object \ " , \ " id \ " : \ " Playlist . Id \ " , \ " required \ " : true , " <nl> " \ " properties \ " : { " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Destroys a virtual playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " playlistid \ " , \ " type \ " : \ " string \ " , \ " required \ " : true , \ " description \ " : \ " Identification of the playlist \ " } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve items in the playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " playlist \ " , \ " $ ref \ " : \ " Playlist . Id \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " fields \ " , \ " type \ " : \ " array \ " , \ " id \ " : \ " List . Fields . All \ " , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Add items to the playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " playlist \ " , \ " $ ref \ " : \ " Playlist . Id \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " items \ " , \ " $ ref \ " : \ " Playlist . Id \ " , \ " required \ " : true , \ " description \ " : \ " Adds items from given virtual and / or file based playlist \ " } " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Remove item from the playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " playlist \ " , \ " $ ref \ " : \ " Playlist . Id \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " item \ " , \ " type \ " : [ \ " integer \ " , \ " string \ " ] , \ " required \ " : true } " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Swap items in the playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " playlist \ " , \ " $ ref \ " : \ " Playlist . Id \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " item1 \ " , \ " $ ref \ " : \ " Playlist . Item . Position \ " , \ " required \ " : true } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Clear playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " playlist \ " , \ " $ ref \ " : \ " Playlist . Id \ " , \ " required \ " : true } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Shuffle playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " playlist \ " , \ " $ ref \ " : \ " Playlist . Id \ " , \ " required \ " : true } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Unshuffle playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " playlist \ " , \ " $ ref \ " : \ " Playlist . Id \ " , \ " required \ " : true } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Play current or a specific item \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " item \ " , \ " id \ " : \ " Playlist . Item . Position \ " , \ " type \ " : \ " integer \ " , \ " minimum \ " : 0 , \ " default \ " : - 1 , \ " description \ " : \ " Position of the item \ " } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Skip current item and play previous item \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Skip current item and play next item \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Get all items from playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " fields \ " , \ " type \ " : \ " array \ " , \ " id \ " : \ " List . Fields . Video \ " , " <nl> " \ " items \ " : { \ " type \ " : \ " string \ " , \ " uniqueItems \ " : true , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Add item ( s ) to playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " item \ " , \ " type \ " : \ " object \ " , \ " id \ " : \ " Playlist . Video . Item \ " , \ " required \ " : true , " <nl> " \ " properties \ " : { " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Insert item ( s ) into playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " index \ " , \ " $ ref \ " : \ " Playlist . Item . Position \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " item \ " , \ " $ ref \ " : \ " Playlist . Video . Item \ " , \ " required \ " : true } " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Remove item from playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " item \ " , \ " $ ref \ " : \ " Playlist . Item . Position \ " , \ " required \ " : true } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Clear playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Shuffle playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Unshuffle playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Play current or a specific item \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " item \ " , \ " $ ref \ " : \ " Playlist . Item . Position \ " } , " <nl> " { \ " name \ " : \ " songid \ " , \ " $ ref \ " : \ " Library . Id \ " , \ " description \ " : \ " Identification of a song from the audio library \ " } " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Skip current item and play previous item \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Skip current item and play next item \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Get all items from playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " fields \ " , \ " $ ref \ " : \ " Library . Fields . Song \ " } , " <nl> " { \ " name \ " : \ " limits \ " , \ " $ ref \ " : \ " List . Limits \ " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Add item ( s ) to playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " item \ " , \ " type \ " : \ " object \ " , \ " id \ " : \ " Playlist . Audio . Item \ " , \ " required \ " : true , " <nl> " \ " properties \ " : { " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Insert item ( s ) into playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " index \ " , \ " $ ref \ " : \ " Playlist . Item . Position \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " item \ " , \ " $ ref \ " : \ " Playlist . Audio . Item \ " , \ " required \ " : true } " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Remove item from playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " item \ " , \ " $ ref \ " : \ " Playlist . Item . Position \ " , \ " required \ " : true } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Clear playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Shuffle playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Unshuffle playlist \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Get the sources of the media windows \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " media \ " , \ " id \ " : \ " Files . Media \ " , \ " type \ " : \ " string \ " , \ " required \ " : true , \ " enum \ " : [ \ " video \ " , \ " music \ " , \ " pictures \ " , \ " files \ " , \ " programs \ " ] } , " <nl> " { \ " name \ " : \ " limits \ " , \ " id \ " : \ " List . Limits \ " , \ " type \ " : \ " object \ " , \ " required \ " : false , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " \ " , " <nl> " \ " transport \ " : \ " FileDownload \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " path \ " , \ " type \ " : \ " string \ " , \ " required \ " : true } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " directory \ " , \ " type \ " : \ " string \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " media \ " , \ " $ ref \ " : \ " Files . Media \ " , \ " default \ " : \ " files \ " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve all artists \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " genreid \ " , \ " id \ " : \ " Library . Id \ " , \ " type \ " : \ " integer \ " , \ " default \ " : - 1 , \ " minimum \ " : 1 } , " <nl> " { \ " name \ " : \ " fields \ " , \ " type \ " : \ " array \ " , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve all albums from specified artist or genre \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " artistid \ " , \ " $ ref \ " : \ " Library . Id \ " } , " <nl> " { \ " name \ " : \ " genreid \ " , \ " $ ref \ " : \ " Library . Id \ " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve details about a specific album \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " albumid \ " , \ " $ ref \ " : \ " Library . Id \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " fields \ " , \ " $ ref \ " : \ " Library . Fields . Album \ " } " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve all songs from specified album , artist or genre \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " artistid \ " , \ " $ ref \ " : \ " Library . Id \ " } , " <nl> " { \ " name \ " : \ " albumid \ " , \ " $ ref \ " : \ " Library . Id \ " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve details about a specific song \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " songid \ " , \ " $ ref \ " : \ " Library . Id \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " fields \ " , \ " $ ref \ " : \ " Library . Fields . Song \ " } " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve all genres \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " limits \ " , \ " $ ref \ " : \ " List . Limits \ " } , " <nl> " { \ " name \ " : \ " sort \ " , \ " $ ref \ " : \ " List . Sort \ " } " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Scans the audio sources for new library items \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ScanLibrary \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve all movies \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " fields \ " , \ " type \ " : \ " array \ " , \ " id \ " : \ " Library . Fields . Movie \ " , " <nl> " \ " items \ " : { \ " type \ " : \ " string \ " , \ " uniqueItems \ " : true , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve details about a specific movie \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " movieid \ " , \ " $ ref \ " : \ " Library . Id \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " fields \ " , \ " $ ref \ " : \ " Library . Fields . Movie \ " } " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve all tv shows \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " fields \ " , \ " type \ " : \ " array \ " , \ " id \ " : \ " Library . Fields . TVShow \ " , " <nl> " \ " items \ " : { \ " type \ " : \ " string \ " , \ " uniqueItems \ " : true , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve details about a specific tv show \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " tvshowid \ " , \ " $ ref \ " : \ " Library . Id \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " fields \ " , \ " $ ref \ " : \ " Library . Fields . TVShow \ " } " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve all tv seasons \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " tvshowid \ " , \ " $ ref \ " : \ " Library . Id \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " fields \ " , \ " type \ " : \ " array \ " , \ " id \ " : \ " Library . Fields . Season \ " , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve all tv show episodes \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " tvshowid \ " , \ " $ ref \ " : \ " Library . Id \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " season \ " , \ " type \ " : \ " Integer \ " , \ " required \ " : true , \ " minimum \ " : 0 } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve details about a specific tv show episode \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " episodeid \ " , \ " $ ref \ " : \ " Library . Id \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " fields \ " , \ " $ ref \ " : \ " Library . Fields . Episode \ " } " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve all music videos \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " artistid \ " , \ " $ ref \ " : \ " Library . Id \ " } , " <nl> " { \ " name \ " : \ " albumid \ " , \ " $ ref \ " : \ " Library . Id \ " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve details about a specific music video \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " musicvideoid \ " , \ " $ ref \ " : \ " Library . Id \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " fields \ " , \ " $ ref \ " : \ " Library . Fields . MusicVideo \ " } " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve all recently added movies \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " fields \ " , \ " $ ref \ " : \ " Library . Fields . Movie \ " } , " <nl> " { \ " name \ " : \ " limits \ " , \ " $ ref \ " : \ " List . Limits \ " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve all recently added tv episodes \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " fields \ " , \ " $ ref \ " : \ " Library . Fields . Episode \ " } , " <nl> " { \ " name \ " : \ " limits \ " , \ " $ ref \ " : \ " List . Limits \ " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve all recently added music videos \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " fields \ " , \ " $ ref \ " : \ " Library . Fields . MusicVideo \ " } , " <nl> " { \ " name \ " : \ " limits \ " , \ " $ ref \ " : \ " List . Limits \ " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Scans the video sources for new library items \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ScanLibrary \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Shuts the system running XBMC down \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPower \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Suspends the system running XBMC \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPower \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Puts the system running XBMC into hibernate mode \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPower \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Reboots the system running XBMC \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPower \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve info labels about the system \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " labels \ " , \ " type \ " : \ " array \ " , \ " required \ " : true , \ " items \ " : { \ " type \ " : \ " string \ " } , \ " minItems \ " : 1 , \ " description \ " : \ " See http : / / wiki . xbmc . org / index . php ? title = InfoLabels for a list of possible info labels \ " } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve info booleans about the system \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " booleans \ " , \ " type \ " : \ " array \ " , \ " required \ " : true , \ " items \ " : { \ " type \ " : \ " string \ " } , \ " minItems \ " : 1 , \ " description \ " : \ " \ " } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Retrieve the current volume \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ReadData \ " , " <nl> - " \ " statechanging \ " : false , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " integer \ " " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Set the current volume \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " value \ " , \ " type \ " : \ " integer \ " , \ " minimum \ " : 0 , \ " maximum \ " : 100 , \ " required \ " : true } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Toggle mute / unmute \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : { \ " type \ " : \ " integer \ " , \ " description \ " : \ " New volume \ " } " <nl> " } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Starts playback of the given file \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " file \ " , \ " type \ " : \ " string \ " , \ " required \ " : true } " <nl> " ] , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Starts slideshow with the images from the given directory \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPlayback \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " directory \ " , \ " type \ " : \ " string \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " random \ " , \ " type \ " : \ " boolean \ " , \ " default \ " : true } , " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Logs a line in the xbmc . log \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " Logging \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ " <nl> " { \ " name \ " : \ " message \ " , \ " type \ " : \ " string \ " , \ " required \ " : true } , " <nl> " { \ " name \ " : \ " level \ " , \ " type \ " : \ " string \ " , \ " default \ " : \ " debug \ " , \ " enum \ " : [ \ " debug \ " , \ " info \ " , \ " notice \ " , \ " warning \ " , \ " error \ " , \ " severe \ " , \ " fatal \ " , \ " none \ " ] } " <nl> namespace JSONRPC <nl> " \ " description \ " : \ " Quit XBMC \ " , " <nl> " \ " transport \ " : \ " Response \ " , " <nl> " \ " permission \ " : \ " ControlPower \ " , " <nl> - " \ " statechanging \ " : true , " <nl> " \ " params \ " : [ ] , " <nl> " \ " returns \ " : \ " string \ " " <nl> " } " <nl>
JSONRPC : replace usage of const char * with std : : string
xbmc/xbmc
2d8bd04dd1a66054f636085cb413633a01d9cf7c
2011-04-01T19:22:34Z
mmm a / tools / run_tests / artifacts / artifact_targets . py <nl> ppp b / tools / run_tests / artifacts / artifact_targets . py <nl> def build_jobspec ( self ) : <nl> environ = environ , <nl> use_workspace = True ) <nl> else : <nl> - generator = ' Visual Studio 12 Win64 ' if self . arch = = ' x64 ' else ' Visual Studio 12 ' <nl> - vcplatform = ' x64 ' if self . arch = = ' x64 ' else ' Win32 ' <nl> + generator = ' Visual Studio 14 2015 Win64 ' if self . arch = = ' x64 ' else ' Visual Studio 14 2015 ' <nl> return create_jobspec ( self . name , <nl> [ ' tools \ \ run_tests \ \ artifacts \ \ build_artifact_protoc . bat ' ] , <nl> - environ = { ' generator ' : generator , <nl> - ' Platform ' : vcplatform } , <nl> + environ = { ' generator ' : generator } , <nl> use_workspace = True ) <nl> <nl> def __str__ ( self ) : <nl> mmm a / tools / run_tests / artifacts / build_artifact_protoc . bat <nl> ppp b / tools / run_tests / artifacts / build_artifact_protoc . bat <nl> mkdir solution & cd solution <nl> cmake - G " % generator % " - Dprotobuf_BUILD_TESTS = OFF . . / . . | | goto : error <nl> endlocal <nl> <nl> - call vsprojects / build_plugins . bat | | goto : error <nl> - <nl> - xcopy / Y third_party \ protobuf \ cmake \ build \ solution \ Release \ protoc . exe % ARTIFACTS_OUT % \ | | goto : error <nl> - xcopy / Y vsprojects \ Release \ * _plugin . exe % ARTIFACTS_OUT % \ | | xcopy / Y vsprojects \ x64 \ Release \ * _plugin . exe % ARTIFACTS_OUT % \ | | goto : error <nl> + xcopy / Y cmake \ build \ third_party \ protobuf \ Release \ protoc . exe % ARTIFACTS_OUT % \ | | goto : error <nl> + xcopy / Y cmake \ build \ Release \ * _plugin . exe % ARTIFACTS_OUT % \ | | goto : error <nl> <nl> goto : EOF <nl> <nl> deleted file mode 100644 <nl> index 4eec024e871 . . 00000000000 <nl> mmm a / tools / run_tests / helper_scripts / pre_build_c . bat <nl> ppp / dev / null <nl> <nl> - @ rem Copyright 2016 gRPC authors . <nl> - @ rem <nl> - @ rem Licensed under the Apache License , Version 2 . 0 ( the " License " ) ; <nl> - @ rem you may not use this file except in compliance with the License . <nl> - @ rem You may obtain a copy of the License at <nl> - @ rem <nl> - @ rem http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> - @ rem <nl> - @ rem Unless required by applicable law or agreed to in writing , software <nl> - @ rem distributed under the License is distributed on an " AS IS " BASIS , <nl> - @ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> - @ rem See the License for the specific language governing permissions and <nl> - @ rem limitations under the License . <nl> - <nl> - @ rem Performs nuget restore step for C / C + + . <nl> - <nl> - setlocal <nl> - <nl> - @ rem enter repo root <nl> - cd / d % ~ dp0 \ . . \ . . \ . . <nl> - <nl> - @ rem Location of nuget . exe <nl> - set NUGET = C : \ nuget \ nuget . exe <nl> - <nl> - if exist % NUGET % ( <nl> - % NUGET % restore vsprojects / grpc . sln | | goto : error <nl> - ) <nl> - <nl> - endlocal <nl> - <nl> - goto : EOF <nl> - <nl> - : error <nl> - echo Failed ! <nl> - exit / b % errorlevel % <nl> mmm a / tools / run_tests / helper_scripts / pre_build_cmake . bat <nl> ppp b / tools / run_tests / helper_scripts / pre_build_cmake . bat <nl> <nl> <nl> setlocal <nl> <nl> + set ARCHITECTURE = % 1 <nl> + <nl> cd / d % ~ dp0 \ . . \ . . \ . . <nl> <nl> mkdir cmake <nl> cd build <nl> @ rem If yasm is not on the path , use hardcoded path instead . <nl> yasm - - version | | set USE_HARDCODED_YASM_PATH_MAYBE = - DCMAKE_ASM_NASM_COMPILER = " C : / Program Files ( x86 ) / yasm / yasm . exe " <nl> <nl> - cmake - G " Visual Studio 14 2015 " - DgRPC_BUILD_TESTS = ON % USE_HARDCODED_YASM_PATH_MAYBE % . . / . . | | goto : error <nl> + cmake - G " Visual Studio 14 2015 " - A % ARCHITECTURE % - DgRPC_BUILD_TESTS = ON % USE_HARDCODED_YASM_PATH_MAYBE % . . / . . | | goto : error <nl> <nl> endlocal <nl> <nl> mmm a / tools / run_tests / run_tests . py <nl> ppp b / tools / run_tests / run_tests . py <nl> def __init__ ( self , make_target , test_lang ) : <nl> def configure ( self , config , args ) : <nl> self . config = config <nl> self . args = args <nl> - if self . args . compiler = = ' cmake ' : <nl> + if self . platform = = ' windows ' : <nl> + _check_compiler ( self . args . compiler , [ ' default ' , ' cmake ' ] ) <nl> + _check_arch ( self . args . arch , [ ' default ' , ' x64 ' , ' x86 ' ] ) <nl> + self . _cmake_arch_option = ' x64 ' if self . args . arch = = ' x64 ' else ' Win32 ' <nl> + self . _use_cmake = True <nl> + self . _make_options = [ ] <nl> + elif self . args . compiler = = ' cmake ' : <nl> _check_arch ( self . args . arch , [ ' default ' ] ) <nl> self . _use_cmake = True <nl> self . _docker_distro = ' jessie ' <nl> self . _make_options = [ ] <nl> - elif self . platform = = ' windows ' : <nl> - self . _use_cmake = False <nl> - self . _make_options = [ _windows_toolset_option ( self . args . compiler ) , <nl> - _windows_arch_option ( self . args . arch ) ] <nl> else : <nl> self . _use_cmake = False <nl> self . _docker_distro , self . _make_options = self . _compiler_options ( self . args . use_docker , <nl> def test_specs ( self ) : <nl> if self . args . iomgr_platform in target . get ( ' exclude_iomgrs ' , [ ] ) : <nl> continue <nl> if self . platform = = ' windows ' : <nl> - if self . _use_cmake : <nl> - binary = ' cmake / build / % s / % s . exe ' % ( _MSBUILD_CONFIG [ self . config . build_config ] , target [ ' name ' ] ) <nl> - else : <nl> - binary = ' vsprojects / % s % s / % s . exe ' % ( <nl> - ' x64 / ' if self . args . arch = = ' x64 ' else ' ' , <nl> - _MSBUILD_CONFIG [ self . config . build_config ] , <nl> - target [ ' name ' ] ) <nl> + binary = ' cmake / build / % s / % s . exe ' % ( _MSBUILD_CONFIG [ self . config . build_config ] , target [ ' name ' ] ) <nl> else : <nl> if self . _use_cmake : <nl> binary = ' cmake / build / % s ' % target [ ' name ' ] <nl> def make_options ( self ) : <nl> return self . _make_options ; <nl> <nl> def pre_build_steps ( self ) : <nl> - if self . _use_cmake : <nl> - if self . platform = = ' windows ' : <nl> - return [ [ ' tools \ \ run_tests \ \ helper_scripts \ \ pre_build_cmake . bat ' ] ] <nl> - else : <nl> - return [ [ ' tools / run_tests / helper_scripts / pre_build_cmake . sh ' ] ] <nl> + if self . platform = = ' windows ' : <nl> + return [ [ ' tools \ \ run_tests \ \ helper_scripts \ \ pre_build_cmake . bat ' , self . _cmake_arch_option ] ] <nl> + elif self . _use_cmake : <nl> + return [ [ ' tools / run_tests / helper_scripts / pre_build_cmake . sh ' ] ] <nl> else : <nl> - if self . platform = = ' windows ' : <nl> - return [ [ ' tools \ \ run_tests \ \ helper_scripts \ \ pre_build_c . bat ' ] ] <nl> - else : <nl> - return [ ] <nl> + return [ ] <nl> <nl> def build_steps ( self ) : <nl> return [ ] <nl> def _check_arch_option ( arch ) : <nl> sys . exit ( 1 ) <nl> <nl> <nl> - def _windows_build_bat ( compiler ) : <nl> - " " " Returns name of build . bat for selected compiler . " " " <nl> - # For CoreCLR , fall back to the default compiler for C core <nl> - if compiler = = ' default ' or compiler = = ' vs2013 ' : <nl> - return ' vsprojects \ \ build_vs2013 . bat ' <nl> - elif compiler = = ' vs2015 ' : <nl> - return ' vsprojects \ \ build_vs2015 . bat ' <nl> - else : <nl> - print ( ' Compiler % s not supported . ' % compiler ) <nl> - sys . exit ( 1 ) <nl> - <nl> - <nl> - def _windows_toolset_option ( compiler ) : <nl> - " " " Returns msbuild PlatformToolset for selected compiler . " " " <nl> - # For CoreCLR , fall back to the default compiler for C core <nl> - if compiler = = ' default ' or compiler = = ' vs2013 ' or compiler = = ' coreclr ' : <nl> - return ' / p : PlatformToolset = v120 ' <nl> - elif compiler = = ' vs2015 ' : <nl> - return ' / p : PlatformToolset = v140 ' <nl> - else : <nl> - print ( ' Compiler % s not supported . ' % compiler ) <nl> - sys . exit ( 1 ) <nl> - <nl> - <nl> def _docker_arch_suffix ( arch ) : <nl> " " " Returns suffix to dockerfile dir to use . " " " <nl> if arch = = ' default ' or arch = = ' x64 ' : <nl> def isclose ( a , b , rel_tol = 1e - 09 , abs_tol = 0 . 0 ) : <nl> choices = [ ' default ' , <nl> ' gcc4 . 4 ' , ' gcc4 . 6 ' , ' gcc4 . 8 ' , ' gcc4 . 9 ' , ' gcc5 . 3 ' , ' gcc_musl ' , <nl> ' clang3 . 4 ' , ' clang3 . 5 ' , ' clang3 . 6 ' , ' clang3 . 7 ' , <nl> - ' vs2013 ' , ' vs2015 ' , <nl> ' python2 . 7 ' , ' python3 . 4 ' , ' python3 . 5 ' , ' python3 . 6 ' , ' pypy ' , ' pypy3 ' , ' python_alpine ' , <nl> ' node0 . 12 ' , ' node4 ' , ' node5 ' , ' node6 ' , ' node7 ' , ' node8 ' , <nl> ' electron1 . 3 ' , ' electron1 . 6 ' , <nl> deleted file mode 100644 <nl> index 85a3b78d4bf . . 00000000000 <nl> mmm a / vsprojects / build_plugins . bat <nl> ppp / dev / null <nl> <nl> - @ rem Copyright 2016 gRPC authors . <nl> - @ rem <nl> - @ rem Licensed under the Apache License , Version 2 . 0 ( the " License " ) ; <nl> - @ rem you may not use this file except in compliance with the License . <nl> - @ rem You may obtain a copy of the License at <nl> - @ rem <nl> - @ rem http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> - @ rem <nl> - @ rem Unless required by applicable law or agreed to in writing , software <nl> - @ rem distributed under the License is distributed on an " AS IS " BASIS , <nl> - @ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> - @ rem See the License for the specific language governing permissions and <nl> - @ rem limitations under the License . <nl> - <nl> - @ rem Convenience script to build gRPC protoc plugins from command line . protoc plugins are used to generate service stub code from . proto service defintions . <nl> - <nl> - setlocal <nl> - <nl> - @ rem enter this directory <nl> - cd / d % ~ dp0 <nl> - <nl> - @ rem Set VS variables ( uses Visual Studio 2013 ) <nl> - @ call " % VS120COMNTOOLS % \ . . \ . . \ vc \ vcvarsall . bat " x86 <nl> - <nl> - @ rem Build third_party / protobuf <nl> - msbuild . . \ third_party \ protobuf \ cmake \ build \ solution \ protobuf . sln / p : Configuration = Release | | goto : error <nl> - <nl> - @ rem Build the C # protoc plugins <nl> - msbuild grpc_protoc_plugins . sln / p : Configuration = Release | | goto : error <nl> - <nl> - endlocal <nl> - <nl> - goto : EOF <nl> - <nl> - : error <nl> - echo Failed ! <nl> - exit / b % errorlevel % <nl>
build C tests and protoc artifacts on windows with cmake
grpc/grpc
6521c5078c9d4c817cc61665a68a471c877571ea
2017-08-23T05:53:18Z
mmm a / src / core / lib / iomgr / resolve_address_windows . c <nl> ppp b / src / core / lib / iomgr / resolve_address_windows . c <nl> static grpc_error * blocking_resolve_address_impl ( <nl> s = getaddrinfo ( host , port , & hints , & result ) ; <nl> GRPC_SCHEDULING_END_BLOCKING_REGION ; <nl> if ( s ! = 0 ) { <nl> - char * error_message = gpr_format_message ( s ) ; <nl> - gpr_log ( GPR_ERROR , " getaddrinfo : % s " , error_message ) ; <nl> - gpr_free ( error_message ) ; <nl> + error = GRPC_WSA_ERROR ( WSAGetLastError ( ) , " getaddrinfo " ) ; <nl> goto done ; <nl> } <nl> <nl> static void do_request_thread ( grpc_exec_ctx * exec_ctx , void * rp , <nl> } <nl> <nl> void grpc_resolved_addresses_destroy ( grpc_resolved_addresses * addrs ) { <nl> - gpr_free ( addrs - > addrs ) ; <nl> + if ( addrs ! = NULL ) { <nl> + gpr_free ( addrs - > addrs ) ; <nl> + } <nl> gpr_free ( addrs ) ; <nl> } <nl> <nl>
Fix naming bug
grpc/grpc
e451225f7067ea2d71317aeb71bb9d4eb474921a
2016-05-17T23:30:33Z
mmm a / src / IO / PeekableReadBuffer . cpp <nl> ppp b / src / IO / PeekableReadBuffer . cpp <nl> PeekableReadBuffer : : PeekableReadBuffer ( ReadBuffer & sub_buf_ , size_t start_size_ <nl> checkStateCorrect ( ) ; <nl> } <nl> <nl> + void PeekableReadBuffer : : reset ( ) <nl> + { <nl> + peeked_size = 0 ; <nl> + checkpoint = nullptr ; <nl> + checkpoint_in_own_memory = false ; <nl> + <nl> + if ( ! currentlyReadFromOwnMemory ( ) ) <nl> + sub_buf . position ( ) = pos ; <nl> + <nl> + Buffer & sub_working = sub_buf . buffer ( ) ; <nl> + BufferBase : : set ( sub_working . begin ( ) , sub_working . size ( ) , sub_buf . offset ( ) ) ; <nl> + } <nl> + <nl> bool PeekableReadBuffer : : peekNext ( ) <nl> { <nl> checkStateCorrect ( ) ; <nl> mmm a / src / IO / PeekableReadBuffer . h <nl> ppp b / src / IO / PeekableReadBuffer . h <nl> namespace ErrorCodes <nl> <nl> / / / Also allows to set checkpoint at some position in stream and come back to this position later . <nl> / / / When next ( ) is called , saves data between checkpoint and current position to own memory and loads next data to sub - buffer <nl> - / / / Sub - buffer should not be accessed directly during the lifetime of peekable buffer . <nl> + / / / Sub - buffer should not be accessed directly during the lifetime of peekable buffer ( unless <nl> + / / / you reset ( ) the state of peekable buffer after each change of underlying buffer ) <nl> / / / If position ( ) of peekable buffer is explicitly set to some position before checkpoint <nl> / / / ( e . g . by istr . position ( ) = prev_pos ) , behavior is undefined . <nl> class PeekableReadBuffer : public BufferWithOwnMemory < ReadBuffer > <nl> class PeekableReadBuffer : public BufferWithOwnMemory < ReadBuffer > <nl> peeked_size = 0 ; <nl> } <nl> checkpoint = pos ; <nl> + <nl> + / / FIXME : we are checking checkpoint existence in few places ( rollbackToCheckpoint / dropCheckpoint ) <nl> + / / by simple if ( checkpoint ) but checkpoint can be nullptr after <nl> + / / setCheckpoint called on empty ( non initialized / eof ) buffer <nl> + / / and we can ' t just use simple if ( checkpoint ) <nl> } <nl> <nl> / / / Forget checkpoint and all data between checkpoint and position <nl> class PeekableReadBuffer : public BufferWithOwnMemory < ReadBuffer > <nl> / / / This data will be lost after destruction of peekable buffer . <nl> bool hasUnreadData ( ) const ; <nl> <nl> + / / for streaming reading ( like in Kafka ) we need to restore initial state of the buffer <nl> + / / w / o recreating the buffer . <nl> + void reset ( ) ; <nl> + <nl> private : <nl> bool nextImpl ( ) override ; <nl> <nl> mmm a / src / Processors / Formats / Impl / JSONAsStringRowInputFormat . cpp <nl> ppp b / src / Processors / Formats / Impl / JSONAsStringRowInputFormat . cpp <nl> JSONAsStringRowInputFormat : : JSONAsStringRowInputFormat ( const Block & header_ , Re <nl> } <nl> } <nl> <nl> + void JSONAsStringRowInputFormat : : resetParser ( ) <nl> + { <nl> + IRowInputFormat : : resetParser ( ) ; <nl> + buf . reset ( ) ; <nl> + } <nl> + <nl> void JSONAsStringRowInputFormat : : readJSONObject ( IColumn & column ) <nl> { <nl> PeekableReadBufferCheckpoint checkpoint { buf } ; <nl> mmm a / src / Processors / Formats / Impl / JSONAsStringRowInputFormat . h <nl> ppp b / src / Processors / Formats / Impl / JSONAsStringRowInputFormat . h <nl> class JSONAsStringRowInputFormat : public IRowInputFormat <nl> <nl> bool readRow ( MutableColumns & columns , RowReadExtension & ext ) override ; <nl> String getName ( ) const override { return " JSONAsStringRowInputFormat " ; } <nl> + void resetParser ( ) override ; <nl> <nl> private : <nl> void readJSONObject ( IColumn & column ) ; <nl> mmm a / src / Processors / Formats / Impl / JSONCompactEachRowRowInputFormat . cpp <nl> ppp b / src / Processors / Formats / Impl / JSONCompactEachRowRowInputFormat . cpp <nl> JSONCompactEachRowRowInputFormat : : JSONCompactEachRowRowInputFormat ( ReadBuffer & <nl> bool with_names_ ) <nl> : IRowInputFormat ( header_ , in_ , std : : move ( params_ ) ) , format_settings ( format_settings_ ) , with_names ( with_names_ ) <nl> { <nl> - / / / In this format , BOM at beginning of stream cannot be confused with value , so it is safe to skip it . <nl> - skipBOMIfExists ( in ) ; <nl> const auto & sample = getPort ( ) . getHeader ( ) ; <nl> size_t num_columns = sample . columns ( ) ; <nl> <nl> JSONCompactEachRowRowInputFormat : : JSONCompactEachRowRowInputFormat ( ReadBuffer & <nl> } <nl> } <nl> <nl> + void JSONCompactEachRowRowInputFormat : : resetParser ( ) <nl> + { <nl> + IRowInputFormat : : resetParser ( ) ; <nl> + column_indexes_for_input_fields . clear ( ) ; <nl> + not_seen_columns . clear ( ) ; <nl> + } <nl> + <nl> void JSONCompactEachRowRowInputFormat : : readPrefix ( ) <nl> { <nl> + / / / In this format , BOM at beginning of stream cannot be confused with value , so it is safe to skip it . <nl> + skipBOMIfExists ( in ) ; <nl> + <nl> if ( with_names ) <nl> { <nl> size_t num_columns = getPort ( ) . getHeader ( ) . columns ( ) ; <nl> mmm a / src / Processors / Formats / Impl / JSONCompactEachRowRowInputFormat . h <nl> ppp b / src / Processors / Formats / Impl / JSONCompactEachRowRowInputFormat . h <nl> class JSONCompactEachRowRowInputFormat : public IRowInputFormat <nl> bool readRow ( MutableColumns & columns , RowReadExtension & ext ) override ; <nl> bool allowSyncAfterError ( ) const override { return true ; } <nl> void syncAfterError ( ) override ; <nl> - <nl> + void resetParser ( ) override ; <nl> <nl> private : <nl> void addInputColumn ( const String & column_name ) ; <nl> mmm a / src / Processors / Formats / Impl / MsgPackRowInputFormat . cpp <nl> ppp b / src / Processors / Formats / Impl / MsgPackRowInputFormat . cpp <nl> namespace ErrorCodes <nl> MsgPackRowInputFormat : : MsgPackRowInputFormat ( const Block & header_ , ReadBuffer & in_ , Params params_ ) <nl> : IRowInputFormat ( header_ , in_ , std : : move ( params_ ) ) , buf ( in ) , parser ( visitor ) , data_types ( header_ . getDataTypes ( ) ) { } <nl> <nl> + void MsgPackRowInputFormat : : resetParser ( ) <nl> + { <nl> + IRowInputFormat : : resetParser ( ) ; <nl> + buf . reset ( ) ; <nl> + visitor . reset ( ) ; <nl> + } <nl> + <nl> void MsgPackVisitor : : set_info ( IColumn & column , DataTypePtr type ) / / NOLINT <nl> { <nl> while ( ! info_stack . empty ( ) ) <nl> void MsgPackVisitor : : set_info ( IColumn & column , DataTypePtr type ) / / NOLINT <nl> info_stack . push ( Info { column , type } ) ; <nl> } <nl> <nl> + void MsgPackVisitor : : reset ( ) <nl> + { <nl> + info_stack = { } ; <nl> + } <nl> + <nl> void MsgPackVisitor : : insert_integer ( UInt64 value ) / / NOLINT <nl> { <nl> Info & info = info_stack . top ( ) ; <nl> mmm a / src / Processors / Formats / Impl / MsgPackRowInputFormat . h <nl> ppp b / src / Processors / Formats / Impl / MsgPackRowInputFormat . h <nl> class MsgPackVisitor : public msgpack : : null_visitor <nl> <nl> void insert_integer ( UInt64 value ) ; <nl> <nl> + void reset ( ) ; <nl> + <nl> private : <nl> / / / Stack is needed to process nested arrays <nl> std : : stack < Info > info_stack ; <nl> class MsgPackRowInputFormat : public IRowInputFormat <nl> <nl> bool readRow ( MutableColumns & columns , RowReadExtension & ext ) override ; <nl> String getName ( ) const override { return " MagPackRowInputFormat " ; } <nl> + void resetParser ( ) override ; <nl> + <nl> private : <nl> bool readObject ( ) ; <nl> <nl> PeekableReadBuffer buf ; <nl> MsgPackVisitor visitor ; <nl> msgpack : : detail : : parse_helper < MsgPackVisitor > parser ; <nl> - DataTypes data_types ; <nl> + const DataTypes data_types ; <nl> } ; <nl> <nl> } <nl> mmm a / src / Processors / Formats / Impl / RegexpRowInputFormat . cpp <nl> ppp b / src / Processors / Formats / Impl / RegexpRowInputFormat . cpp <nl> namespace ErrorCodes <nl> <nl> RegexpRowInputFormat : : RegexpRowInputFormat ( <nl> ReadBuffer & in_ , const Block & header_ , Params params_ , const FormatSettings & format_settings_ ) <nl> - : IRowInputFormat ( header_ , in_ , std : : move ( params_ ) ) , buf ( in_ ) , format_settings ( format_settings_ ) , regexp ( format_settings_ . regexp . regexp ) <nl> + : IRowInputFormat ( header_ , in_ , std : : move ( params_ ) ) <nl> + , buf ( in_ ) <nl> + , format_settings ( format_settings_ ) <nl> + , field_format ( stringToFormat ( format_settings_ . regexp . escaping_rule ) ) <nl> + , regexp ( format_settings_ . regexp . regexp ) <nl> { <nl> size_t fields_count = regexp . NumberOfCapturingGroups ( ) ; <nl> matched_fields . resize ( fields_count ) ; <nl> RegexpRowInputFormat : : RegexpRowInputFormat ( <nl> / / Save pointer to argument . <nl> re2_arguments_ptrs [ i ] = & re2_arguments [ i ] ; <nl> } <nl> + } <nl> + <nl> <nl> - field_format = stringToFormat ( format_settings_ . regexp . escaping_rule ) ; <nl> + void RegexpRowInputFormat : : resetParser ( ) <nl> + { <nl> + IRowInputFormat : : resetParser ( ) ; <nl> + buf . reset ( ) ; <nl> } <nl> <nl> RegexpRowInputFormat : : ColumnFormat RegexpRowInputFormat : : stringToFormat ( const String & format ) <nl> mmm a / src / Processors / Formats / Impl / RegexpRowInputFormat . h <nl> ppp b / src / Processors / Formats / Impl / RegexpRowInputFormat . h <nl> class RegexpRowInputFormat : public IRowInputFormat <nl> String getName ( ) const override { return " RegexpRowInputFormat " ; } <nl> <nl> bool readRow ( MutableColumns & columns , RowReadExtension & ext ) override ; <nl> + void resetParser ( ) override ; <nl> <nl> private : <nl> bool readField ( size_t index , MutableColumns & columns ) ; <nl> class RegexpRowInputFormat : public IRowInputFormat <nl> <nl> PeekableReadBuffer buf ; <nl> const FormatSettings format_settings ; <nl> - ColumnFormat field_format ; <nl> + const ColumnFormat field_format ; <nl> <nl> - RE2 regexp ; <nl> + const RE2 regexp ; <nl> / / The vector of fields extracted from line using regexp . <nl> std : : vector < re2 : : StringPiece > matched_fields ; <nl> / / These two vectors are needed to use RE2 : : FullMatchN ( function for extracting fields ) . <nl> mmm a / src / Processors / Formats / Impl / TabSeparatedRowInputFormat . cpp <nl> ppp b / src / Processors / Formats / Impl / TabSeparatedRowInputFormat . cpp <nl> void TabSeparatedRowInputFormat : : syncAfterError ( ) <nl> void TabSeparatedRowInputFormat : : resetParser ( ) <nl> { <nl> RowInputFormatWithDiagnosticInfo : : resetParser ( ) ; <nl> + const auto & sample = getPort ( ) . getHeader ( ) ; <nl> + read_columns . assign ( sample . columns ( ) , false ) ; <nl> column_indexes_for_input_fields . clear ( ) ; <nl> - read_columns . clear ( ) ; <nl> columns_to_fill_with_default_values . clear ( ) ; <nl> } <nl> <nl> mmm a / src / Processors / Formats / Impl / TemplateRowInputFormat . cpp <nl> ppp b / src / Processors / Formats / Impl / TemplateRowInputFormat . cpp <nl> void TemplateRowInputFormat : : resetParser ( ) <nl> { <nl> RowInputFormatWithDiagnosticInfo : : resetParser ( ) ; <nl> end_of_stream = false ; <nl> + buf . reset ( ) ; <nl> } <nl> <nl> void registerInputFormatProcessorTemplate ( FormatFactory & factory ) <nl> mmm a / src / Processors / Formats / Impl / TemplateRowInputFormat . h <nl> ppp b / src / Processors / Formats / Impl / TemplateRowInputFormat . h <nl> class TemplateRowInputFormat : public RowInputFormatWithDiagnosticInfo <nl> <nl> private : <nl> PeekableReadBuffer buf ; <nl> - DataTypes data_types ; <nl> + const DataTypes data_types ; <nl> <nl> FormatSettings settings ; <nl> const bool ignore_spaces ; <nl> - ParsedTemplateFormatString format ; <nl> - ParsedTemplateFormatString row_format ; <nl> + const ParsedTemplateFormatString format ; <nl> + const ParsedTemplateFormatString row_format ; <nl> <nl> size_t format_data_idx ; <nl> bool end_of_stream = false ; <nl> std : : vector < size_t > always_default_columns ; <nl> - char default_csv_delimiter ; <nl> + const char default_csv_delimiter ; <nl> <nl> - std : : string row_between_delimiter ; <nl> + const std : : string row_between_delimiter ; <nl> } ; <nl> <nl> } <nl> mmm a / src / Processors / Formats / Impl / ValuesBlockInputFormat . cpp <nl> ppp b / src / Processors / Formats / Impl / ValuesBlockInputFormat . cpp <nl> void ValuesBlockInputFormat : : resetParser ( ) <nl> IInputFormat : : resetParser ( ) ; <nl> / / I ' m not resetting parser modes here . <nl> / / There is a good chance that all messages have the same format . <nl> + buf . reset ( ) ; <nl> total_rows = 0 ; <nl> } <nl> <nl> mmm a / src / Processors / Formats / Impl / ValuesBlockInputFormat . h <nl> ppp b / src / Processors / Formats / Impl / ValuesBlockInputFormat . h <nl> class ValuesBlockInputFormat final : public IInputFormat <nl> private : <nl> PeekableReadBuffer buf ; <nl> <nl> - RowInputFormatParams params ; <nl> + const RowInputFormatParams params ; <nl> <nl> std : : unique_ptr < Context > context ; / / / pimpl <nl> const FormatSettings format_settings ; <nl> <nl> - size_t num_columns ; <nl> + const size_t num_columns ; <nl> size_t total_rows = 0 ; <nl> <nl> std : : vector < ParserType > parser_type_for_column ; <nl> class ValuesBlockInputFormat final : public IInputFormat <nl> ConstantExpressionTemplates templates ; <nl> ConstantExpressionTemplate : : Cache templates_cache ; <nl> <nl> - DataTypes types ; <nl> + const DataTypes types ; <nl> <nl> BlockMissingValues block_missing_values ; <nl> } ; <nl> mmm a / src / Storages / Kafka / KafkaBlockInputStream . cpp <nl> ppp b / src / Storages / Kafka / KafkaBlockInputStream . cpp <nl> <nl> # include < Formats / FormatFactory . h > <nl> # include < Storages / Kafka / ReadBufferFromKafkaConsumer . h > <nl> # include < Processors / Formats / InputStreamFromInputFormat . h > <nl> + # include < common / logger_useful . h > <nl> <nl> namespace DB <nl> { <nl> namespace ErrorCodes <nl> { <nl> extern const int LOGICAL_ERROR ; <nl> } <nl> + <nl> + / / with default poll timeout ( 500ms ) it will give about 5 sec delay for doing 10 retries <nl> + / / when selecting from empty topic <nl> + const auto MAX_FAILED_POLL_ATTEMPTS = 10 ; <nl> + <nl> KafkaBlockInputStream : : KafkaBlockInputStream ( <nl> - StorageKafka & storage_ , const std : : shared_ptr < Context > & context_ , const Names & columns , size_t max_block_size_ , bool commit_in_suffix_ ) <nl> + StorageKafka & storage_ , const std : : shared_ptr < Context > & context_ , const Names & columns , Poco : : Logger * log_ , size_t max_block_size_ , bool commit_in_suffix_ ) <nl> : storage ( storage_ ) <nl> , context ( context_ ) <nl> , column_names ( columns ) <nl> + , log ( log_ ) <nl> , max_block_size ( max_block_size_ ) <nl> , commit_in_suffix ( commit_in_suffix_ ) <nl> , non_virtual_header ( storage . getSampleBlockNonMaterialized ( ) ) <nl> Block KafkaBlockInputStream : : readImpl ( ) <nl> } ; <nl> <nl> size_t total_rows = 0 ; <nl> + size_t failed_poll_attempts = 0 ; <nl> <nl> while ( true ) <nl> { <nl> - / / some formats ( like RowBinaryWithNamesAndTypes / CSVWithNames ) <nl> - / / throw an exception from readPrefix when buffer in empty <nl> - if ( buffer - > eof ( ) ) <nl> - break ; <nl> - <nl> - auto new_rows = read_kafka_message ( ) ; <nl> + auto new_rows = buffer - > poll ( ) ? read_kafka_message ( ) : 0 ; <nl> <nl> - buffer - > storeLastReadMessageOffset ( ) ; <nl> + if ( new_rows ) <nl> + { <nl> + buffer - > storeLastReadMessageOffset ( ) ; <nl> <nl> - auto topic = buffer - > currentTopic ( ) ; <nl> - auto key = buffer - > currentKey ( ) ; <nl> - auto offset = buffer - > currentOffset ( ) ; <nl> - auto partition = buffer - > currentPartition ( ) ; <nl> - auto timestamp_raw = buffer - > currentTimestamp ( ) ; <nl> - auto header_list = buffer - > currentHeaderList ( ) ; <nl> + auto topic = buffer - > currentTopic ( ) ; <nl> + auto key = buffer - > currentKey ( ) ; <nl> + auto offset = buffer - > currentOffset ( ) ; <nl> + auto partition = buffer - > currentPartition ( ) ; <nl> + auto timestamp_raw = buffer - > currentTimestamp ( ) ; <nl> + auto header_list = buffer - > currentHeaderList ( ) ; <nl> <nl> - Array headers_names ; <nl> - Array headers_values ; <nl> + Array headers_names ; <nl> + Array headers_values ; <nl> <nl> - if ( ! header_list . empty ( ) ) <nl> - { <nl> - headers_names . reserve ( header_list . size ( ) ) ; <nl> - headers_values . reserve ( header_list . size ( ) ) ; <nl> - for ( const auto & header : header_list ) <nl> + if ( ! header_list . empty ( ) ) <nl> { <nl> - headers_names . emplace_back ( header . get_name ( ) ) ; <nl> - headers_values . emplace_back ( static_cast < std : : string > ( header . get_value ( ) ) ) ; <nl> + headers_names . reserve ( header_list . size ( ) ) ; <nl> + headers_values . reserve ( header_list . size ( ) ) ; <nl> + for ( const auto & header : header_list ) <nl> + { <nl> + headers_names . emplace_back ( header . get_name ( ) ) ; <nl> + headers_values . emplace_back ( static_cast < std : : string > ( header . get_value ( ) ) ) ; <nl> + } <nl> } <nl> - } <nl> <nl> - for ( size_t i = 0 ; i < new_rows ; + + i ) <nl> - { <nl> - virtual_columns [ 0 ] - > insert ( topic ) ; <nl> - virtual_columns [ 1 ] - > insert ( key ) ; <nl> - virtual_columns [ 2 ] - > insert ( offset ) ; <nl> - virtual_columns [ 3 ] - > insert ( partition ) ; <nl> - if ( timestamp_raw ) <nl> + for ( size_t i = 0 ; i < new_rows ; + + i ) <nl> { <nl> - auto ts = timestamp_raw - > get_timestamp ( ) ; <nl> - virtual_columns [ 4 ] - > insert ( std : : chrono : : duration_cast < std : : chrono : : seconds > ( ts ) . count ( ) ) ; <nl> - virtual_columns [ 5 ] - > insert ( DecimalField < Decimal64 > ( std : : chrono : : duration_cast < std : : chrono : : milliseconds > ( ts ) . count ( ) , 3 ) ) ; <nl> - } <nl> - else <nl> - { <nl> - virtual_columns [ 4 ] - > insertDefault ( ) ; <nl> - virtual_columns [ 5 ] - > insertDefault ( ) ; <nl> + virtual_columns [ 0 ] - > insert ( topic ) ; <nl> + virtual_columns [ 1 ] - > insert ( key ) ; <nl> + virtual_columns [ 2 ] - > insert ( offset ) ; <nl> + virtual_columns [ 3 ] - > insert ( partition ) ; <nl> + if ( timestamp_raw ) <nl> + { <nl> + auto ts = timestamp_raw - > get_timestamp ( ) ; <nl> + virtual_columns [ 4 ] - > insert ( std : : chrono : : duration_cast < std : : chrono : : seconds > ( ts ) . count ( ) ) ; <nl> + virtual_columns [ 5 ] - > insert ( DecimalField < Decimal64 > ( std : : chrono : : duration_cast < std : : chrono : : milliseconds > ( ts ) . count ( ) , 3 ) ) ; <nl> + } <nl> + else <nl> + { <nl> + virtual_columns [ 4 ] - > insertDefault ( ) ; <nl> + virtual_columns [ 5 ] - > insertDefault ( ) ; <nl> + } <nl> + virtual_columns [ 6 ] - > insert ( headers_names ) ; <nl> + virtual_columns [ 7 ] - > insert ( headers_values ) ; <nl> } <nl> - virtual_columns [ 6 ] - > insert ( headers_names ) ; <nl> - virtual_columns [ 7 ] - > insert ( headers_values ) ; <nl> - } <nl> - <nl> - total_rows = total_rows + new_rows ; <nl> - buffer - > allowNext ( ) ; <nl> <nl> - if ( buffer - > hasMorePolledMessages ( ) ) <nl> + total_rows = total_rows + new_rows ; <nl> + } <nl> + else if ( buffer - > isStalled ( ) ) <nl> { <nl> - continue ; <nl> + + + failed_poll_attempts ; <nl> } <nl> - if ( total_rows > = max_block_size | | ! checkTimeLimit ( ) ) <nl> + else if ( buffer - > polledDataUnusable ( ) ) <nl> + { <nl> + break ; <nl> + } <nl> + else <nl> + { <nl> + LOG_WARNING ( log , " Parsing of message ( topic : { } , partition : { } , offset : { } ) return no rows . " , buffer - > currentTopic ( ) , buffer - > currentPartition ( ) , buffer - > currentOffset ( ) ) ; <nl> + } <nl> + <nl> + if ( ! buffer - > hasMorePolledMessages ( ) <nl> + & & ( total_rows > = max_block_size | | ! checkTimeLimit ( ) | | failed_poll_attempts > = MAX_FAILED_POLL_ATTEMPTS ) ) <nl> { <nl> break ; <nl> } <nl> mmm a / src / Storages / Kafka / KafkaBlockInputStream . h <nl> ppp b / src / Storages / Kafka / KafkaBlockInputStream . h <nl> <nl> # include < Storages / Kafka / ReadBufferFromKafkaConsumer . h > <nl> <nl> <nl> + namespace Poco <nl> + { <nl> + class Logger ; <nl> + } <nl> namespace DB <nl> { <nl> <nl> class KafkaBlockInputStream : public IBlockInputStream <nl> { <nl> public : <nl> KafkaBlockInputStream ( <nl> - StorageKafka & storage_ , const std : : shared_ptr < Context > & context_ , const Names & columns , size_t max_block_size_ , bool commit_in_suffix = true ) ; <nl> + StorageKafka & storage_ , const std : : shared_ptr < Context > & context_ , const Names & columns , Poco : : Logger * log_ , size_t max_block_size_ , bool commit_in_suffix = true ) ; <nl> ~ KafkaBlockInputStream ( ) override ; <nl> <nl> String getName ( ) const override { return storage . getName ( ) ; } <nl> class KafkaBlockInputStream : public IBlockInputStream <nl> StorageKafka & storage ; <nl> const std : : shared_ptr < Context > context ; <nl> Names column_names ; <nl> + Poco : : Logger * log ; <nl> UInt64 max_block_size ; <nl> <nl> ConsumerBufferPtr buffer ; <nl> mmm a / src / Storages / Kafka / ReadBufferFromKafkaConsumer . cpp <nl> ppp b / src / Storages / Kafka / ReadBufferFromKafkaConsumer . cpp <nl> namespace ErrorCodes <nl> <nl> using namespace std : : chrono_literals ; <nl> const auto MAX_TIME_TO_WAIT_FOR_ASSIGNMENT_MS = 15000 ; <nl> + const std : : size_t POLL_TIMEOUT_WO_ASSIGNMENT_MS = 50 ; <nl> const auto DRAIN_TIMEOUT_MS = 5000ms ; <nl> <nl> <nl> ReadBufferFromKafkaConsumer : : ReadBufferFromKafkaConsumer ( <nl> / / * clean buffered non - commited messages <nl> / / * set flag / flush <nl> <nl> - messages . clear ( ) ; <nl> - current = messages . begin ( ) ; <nl> - BufferBase : : set ( nullptr , 0 , 0 ) ; <nl> + cleanUnprocessed ( ) ; <nl> <nl> - rebalance_happened = true ; <nl> + stalled_status = REBALANCE_HAPPENED ; <nl> assignment . clear ( ) ; <nl> + waited_for_assignment = 0 ; <nl> <nl> / / for now we use slower ( but reliable ) sync commit in main loop , so no need to repeat <nl> / / try <nl> void ReadBufferFromKafkaConsumer : : commit ( ) <nl> } <nl> <nl> offsets_stored = 0 ; <nl> - stalled = false ; <nl> } <nl> <nl> void ReadBufferFromKafkaConsumer : : subscribe ( ) <nl> void ReadBufferFromKafkaConsumer : : subscribe ( ) <nl> } <nl> } <nl> <nl> - stalled = false ; <nl> - rebalance_happened = false ; <nl> - offsets_stored = 0 ; <nl> + cleanUnprocessed ( ) ; <nl> + allowed = false ; <nl> + <nl> + / / we can reset any flags ( except of CONSUMER_STOPPED ) before attempt of reading new block of data <nl> + if ( stalled_status ! = CONSUMER_STOPPED ) <nl> + stalled_status = NO_MESSAGES_RETURNED ; <nl> } <nl> <nl> - void ReadBufferFromKafkaConsumer : : unsubscribe ( ) <nl> + void ReadBufferFromKafkaConsumer : : cleanUnprocessed ( ) <nl> { <nl> - LOG_TRACE ( log , " Re - joining claimed consumer after failure " ) ; <nl> - <nl> messages . clear ( ) ; <nl> current = messages . begin ( ) ; <nl> BufferBase : : set ( nullptr , 0 , 0 ) ; <nl> + offsets_stored = 0 ; <nl> + } <nl> + <nl> + void ReadBufferFromKafkaConsumer : : unsubscribe ( ) <nl> + { <nl> + LOG_TRACE ( log , " Re - joining claimed consumer after failure " ) ; <nl> + cleanUnprocessed ( ) ; <nl> <nl> / / it should not raise exception as used in destructor <nl> try <nl> void ReadBufferFromKafkaConsumer : : unsubscribe ( ) <nl> } <nl> <nl> <nl> - bool ReadBufferFromKafkaConsumer : : hasMorePolledMessages ( ) const <nl> - { <nl> - return ( ! stalled ) & & ( current ! = messages . end ( ) ) ; <nl> - } <nl> - <nl> - <nl> void ReadBufferFromKafkaConsumer : : resetToLastCommitted ( const char * msg ) <nl> { <nl> if ( assignment . empty ( ) ) <nl> void ReadBufferFromKafkaConsumer : : resetToLastCommitted ( const char * msg ) <nl> LOG_TRACE ( log , " { } Returned to committed position : { } " , msg , committed_offset ) ; <nl> } <nl> <nl> - / / / Do commit messages implicitly after we processed the previous batch . <nl> - bool ReadBufferFromKafkaConsumer : : nextImpl ( ) <nl> + / / it do the poll when needed <nl> + bool ReadBufferFromKafkaConsumer : : poll ( ) <nl> { <nl> + resetIfStopped ( ) ; <nl> <nl> - / / / NOTE : ReadBuffer was implemented with an immutable underlying contents in mind . <nl> - / / / If we failed to poll any message once - don ' t try again . <nl> - / / / Otherwise , the | poll_timeout | expectations get flawn . <nl> + if ( polledDataUnusable ( ) ) <nl> + return false ; <nl> <nl> - / / we can react on stop only during fetching data <nl> - / / after block is formed ( i . e . during copying data to MV / commiting ) we ignore stop attempts <nl> - if ( stopped ) <nl> + if ( hasMorePolledMessages ( ) ) <nl> { <nl> - was_stopped = true ; <nl> - offsets_stored = 0 ; <nl> - return false ; <nl> + allowed = true ; <nl> + return true ; <nl> } <nl> <nl> - if ( stalled | | was_stopped | | ! allowed | | rebalance_happened ) <nl> - return false ; <nl> - <nl> + if ( intermediate_commit ) <nl> + commit ( ) ; <nl> <nl> - if ( current = = messages . end ( ) ) <nl> + while ( true ) <nl> { <nl> - if ( intermediate_commit ) <nl> - commit ( ) ; <nl> - <nl> - size_t waited_for_assignment = 0 ; <nl> - while ( true ) <nl> + stalled_status = NO_MESSAGES_RETURNED ; <nl> + <nl> + / / we already wait enough for assignment in the past , <nl> + / / let ' s make polls shorter and not block other consumer <nl> + / / which can work successfully in parallel <nl> + / / POLL_TIMEOUT_WO_ASSIGNMENT_MS ( 50ms ) is 100 % enough just to check if we got assignment <nl> + / / ( see https : / / github . com / ClickHouse / ClickHouse / issues / 11218 ) <nl> + auto actual_poll_timeout_ms = ( waited_for_assignment > = MAX_TIME_TO_WAIT_FOR_ASSIGNMENT_MS ) <nl> + ? std : : min ( POLL_TIMEOUT_WO_ASSIGNMENT_MS , poll_timeout ) <nl> + : poll_timeout ; <nl> + <nl> + / / / Don ' t drop old messages immediately , since we may need them for virtual columns . <nl> + auto new_messages = consumer - > poll_batch ( batch_size , <nl> + std : : chrono : : milliseconds ( actual_poll_timeout_ms ) ) ; <nl> + <nl> + resetIfStopped ( ) ; <nl> + if ( stalled_status = = CONSUMER_STOPPED ) <nl> { <nl> - / / / Don ' t drop old messages immediately , since we may need them for virtual columns . <nl> - auto new_messages = consumer - > poll_batch ( batch_size , std : : chrono : : milliseconds ( poll_timeout ) ) ; <nl> - <nl> - if ( stopped ) <nl> + return false ; <nl> + } <nl> + else if ( stalled_status = = REBALANCE_HAPPENED ) <nl> + { <nl> + if ( ! new_messages . empty ( ) ) <nl> { <nl> - was_stopped = true ; <nl> - offsets_stored = 0 ; <nl> - return false ; <nl> - } <nl> - else if ( rebalance_happened ) <nl> - { <nl> - if ( ! new_messages . empty ( ) ) <nl> - { <nl> - / / we have polled something just after rebalance . <nl> - / / we will not use current batch , so we need to return to last commited position <nl> - / / otherwise we will continue polling from that position <nl> - resetToLastCommitted ( " Rewind last poll after rebalance . " ) ; <nl> - } <nl> - <nl> - offsets_stored = 0 ; <nl> - return false ; <nl> + / / we have polled something just after rebalance . <nl> + / / we will not use current batch , so we need to return to last commited position <nl> + / / otherwise we will continue polling from that position <nl> + resetToLastCommitted ( " Rewind last poll after rebalance . " ) ; <nl> } <nl> + return false ; <nl> + } <nl> <nl> - if ( new_messages . empty ( ) ) <nl> + if ( new_messages . empty ( ) ) <nl> + { <nl> + / / While we wait for an assignment after subscription , we ' ll poll zero messages anyway . <nl> + / / If we ' re doing a manual select then it ' s better to get something after a wait , then immediate nothing . <nl> + if ( assignment . empty ( ) ) <nl> { <nl> - / / While we wait for an assignment after subscription , we ' ll poll zero messages anyway . <nl> - / / If we ' re doing a manual select then it ' s better to get something after a wait , then immediate nothing . <nl> - if ( assignment . empty ( ) ) <nl> + waited_for_assignment + = poll_timeout ; / / slightly innaccurate , but rough calculation is ok . <nl> + if ( waited_for_assignment < MAX_TIME_TO_WAIT_FOR_ASSIGNMENT_MS ) <nl> { <nl> - waited_for_assignment + = poll_timeout ; / / slightly innaccurate , but rough calculation is ok . <nl> - if ( waited_for_assignment < MAX_TIME_TO_WAIT_FOR_ASSIGNMENT_MS ) <nl> - { <nl> - continue ; <nl> - } <nl> - else <nl> - { <nl> - LOG_TRACE ( log , " Can ' t get assignment " ) ; <nl> - stalled = true ; <nl> - return false ; <nl> - } <nl> - <nl> + continue ; <nl> } <nl> else <nl> { <nl> - LOG_TRACE ( log , " Stalled " ) ; <nl> - stalled = true ; <nl> + LOG_WARNING ( log , " Can ' t get assignment . It can be caused by some issue with consumer group ( not enough partitions ? ) . Will keep trying . " ) ; <nl> + stalled_status = NO_ASSIGNMENT ; <nl> return false ; <nl> } <nl> + <nl> } <nl> else <nl> { <nl> - messages = std : : move ( new_messages ) ; <nl> - current = messages . begin ( ) ; <nl> - LOG_TRACE ( log , " Polled batch of { } messages . Offset position : { } " , messages . size ( ) , consumer - > get_offsets_position ( consumer - > get_assignment ( ) ) ) ; <nl> - break ; <nl> + LOG_TRACE ( log , " Stalled " ) ; <nl> + return false ; <nl> } <nl> } <nl> + else <nl> + { <nl> + messages = std : : move ( new_messages ) ; <nl> + current = messages . begin ( ) ; <nl> + LOG_TRACE ( log , " Polled batch of { } messages . Offset position : { } " , messages . size ( ) , consumer - > get_offsets_position ( consumer - > get_assignment ( ) ) ) ; <nl> + break ; <nl> + } <nl> } <nl> <nl> - if ( auto err = current - > get_error ( ) ) <nl> + while ( auto err = current - > get_error ( ) ) <nl> { <nl> + + current ; <nl> <nl> / / TODO : should throw exception instead <nl> LOG_ERROR ( log , " Consumer error : { } " , err ) ; <nl> - return false ; <nl> + if ( current = = messages . end ( ) ) <nl> + { <nl> + LOG_ERROR ( log , " No actual messages polled , errors only . " ) ; <nl> + stalled_status = ERRORS_RETURNED ; <nl> + return false ; <nl> + } <nl> + } <nl> + stalled_status = NOT_STALLED ; <nl> + allowed = true ; <nl> + return true ; <nl> + } <nl> + <nl> + void ReadBufferFromKafkaConsumer : : resetIfStopped ( ) <nl> + { <nl> + / / we can react on stop only during fetching data <nl> + / / after block is formed ( i . e . during copying data to MV / commiting ) we ignore stop attempts <nl> + if ( stopped ) <nl> + { <nl> + stalled_status = CONSUMER_STOPPED ; <nl> + cleanUnprocessed ( ) ; <nl> } <nl> + } <nl> + <nl> + / / / Do commit messages implicitly after we processed the previous batch . <nl> + bool ReadBufferFromKafkaConsumer : : nextImpl ( ) <nl> + { <nl> + <nl> + / / / NOTE : ReadBuffer was implemented with an immutable underlying contents in mind . <nl> + / / / If we failed to poll any message once - don ' t try again . <nl> + / / / Otherwise , the | poll_timeout | expectations get flawn . <nl> + resetIfStopped ( ) ; <nl> + <nl> + if ( ! allowed | | ! hasMorePolledMessages ( ) ) <nl> + return false ; <nl> <nl> / / XXX : very fishy place with const casting . <nl> auto * new_position = reinterpret_cast < char * > ( const_cast < unsigned char * > ( current - > get_payload ( ) . get_data ( ) ) ) ; <nl> bool ReadBufferFromKafkaConsumer : : nextImpl ( ) <nl> <nl> void ReadBufferFromKafkaConsumer : : storeLastReadMessageOffset ( ) <nl> { <nl> - if ( ! stalled & & ! was_stopped & & ! rebalance_happened ) <nl> + if ( ! isStalled ( ) ) <nl> { <nl> consumer - > store_offset ( * ( current - 1 ) ) ; <nl> + + offsets_stored ; <nl> mmm a / src / Storages / Kafka / ReadBufferFromKafkaConsumer . h <nl> ppp b / src / Storages / Kafka / ReadBufferFromKafkaConsumer . h <nl> class ReadBufferFromKafkaConsumer : public ReadBuffer <nl> const Names & _topics <nl> ) ; <nl> ~ ReadBufferFromKafkaConsumer ( ) override ; <nl> - void allowNext ( ) { allowed = true ; } / / Allow to read next message . <nl> void commit ( ) ; / / Commit all processed messages . <nl> void subscribe ( ) ; / / Subscribe internal consumer to topics . <nl> void unsubscribe ( ) ; / / Unsubscribe internal consumer in case of failure . <nl> <nl> auto pollTimeout ( ) const { return poll_timeout ; } <nl> <nl> - bool hasMorePolledMessages ( ) const ; <nl> - bool polledDataUnusable ( ) const { return ( was_stopped | | rebalance_happened ) ; } <nl> - bool isStalled ( ) const { return stalled ; } <nl> + inline bool hasMorePolledMessages ( ) const <nl> + { <nl> + return ( stalled_status = = NOT_STALLED ) & & ( current ! = messages . end ( ) ) ; <nl> + } <nl> + <nl> + inline bool polledDataUnusable ( ) const <nl> + { <nl> + return ( stalled_status ! = NOT_STALLED ) & & ( stalled_status ! = NO_MESSAGES_RETURNED ) ; <nl> + } <nl> + <nl> + inline bool isStalled ( ) const { return stalled_status ! = NOT_STALLED ; } <nl> <nl> void storeLastReadMessageOffset ( ) ; <nl> void resetToLastCommitted ( const char * msg ) ; <nl> <nl> + / / Polls batch of messages from Kafka or allows to read consecutive message by nextImpl <nl> + / / returns true if there are some messages to process <nl> + / / return false and sets stalled to false if there are no messages to process . <nl> + / / additionally sets <nl> + bool poll ( ) ; <nl> + <nl> / / Return values for the message that ' s being read . <nl> String currentTopic ( ) const { return current [ - 1 ] . get_topic ( ) ; } <nl> String currentKey ( ) const { return current [ - 1 ] . get_key ( ) ; } <nl> class ReadBufferFromKafkaConsumer : public ReadBuffer <nl> private : <nl> using Messages = std : : vector < cppkafka : : Message > ; <nl> <nl> + enum StalledStatus <nl> + { <nl> + NOT_STALLED , <nl> + NO_MESSAGES_RETURNED , <nl> + REBALANCE_HAPPENED , <nl> + CONSUMER_STOPPED , <nl> + NO_ASSIGNMENT , <nl> + ERRORS_RETURNED <nl> + } ; <nl> + <nl> ConsumerPtr consumer ; <nl> Poco : : Logger * log ; <nl> const size_t batch_size = 1 ; <nl> const size_t poll_timeout = 0 ; <nl> size_t offsets_stored = 0 ; <nl> - bool stalled = false ; <nl> + <nl> + StalledStatus stalled_status = NO_MESSAGES_RETURNED ; <nl> + <nl> bool intermediate_commit = true ; <nl> bool allowed = true ; <nl> + size_t waited_for_assignment = 0 ; <nl> <nl> const std : : atomic < bool > & stopped ; <nl> <nl> class ReadBufferFromKafkaConsumer : public ReadBuffer <nl> Messages messages ; <nl> Messages : : const_iterator current ; <nl> <nl> - bool rebalance_happened = false ; <nl> - <nl> - bool was_stopped = false ; <nl> - <nl> / / order is important , need to be destructed before consumer <nl> cppkafka : : TopicPartitionList assignment ; <nl> const Names topics ; <nl> <nl> void drain ( ) ; <nl> + void cleanUnprocessed ( ) ; <nl> + void resetIfStopped ( ) ; <nl> <nl> bool nextImpl ( ) override ; <nl> } ; <nl> mmm a / src / Storages / Kafka / StorageKafka . cpp <nl> ppp b / src / Storages / Kafka / StorageKafka . cpp <nl> namespace <nl> for ( const auto & key : keys ) <nl> { <nl> const String key_path = path + " . " + key ; <nl> - const String key_name = boost : : replace_all_copy ( key , " _ " , " . " ) ; <nl> + / / log_level has valid underscore , rest librdkafka setting use dot . separated . format <nl> + / / which is not acceptable for XML . <nl> + / / See also https : / / github . com / edenhill / librdkafka / blob / master / CONFIGURATION . md <nl> + const String key_name = ( key = = " log_level " ) ? key : boost : : replace_all_copy ( key , " _ " , " . " ) ; <nl> conf . set ( key_name , config . getString ( key_path ) ) ; <nl> } <nl> } <nl> Pipes StorageKafka : : read ( <nl> / / / TODO : probably that leads to awful performance . <nl> / / / FIXME : seems that doesn ' t help with extra reading and committing unprocessed messages . <nl> / / / TODO : rewrite KafkaBlockInputStream to KafkaSource . Now it is used in other place . <nl> - pipes . emplace_back ( std : : make_shared < SourceFromInputStream > ( std : : make_shared < KafkaBlockInputStream > ( * this , modified_context , column_names , 1 ) ) ) ; <nl> + pipes . emplace_back ( std : : make_shared < SourceFromInputStream > ( std : : make_shared < KafkaBlockInputStream > ( * this , modified_context , column_names , log , 1 ) ) ) ; <nl> } <nl> <nl> LOG_DEBUG ( log , " Starting reading { } streams " , pipes . size ( ) ) ; <nl> bool StorageKafka : : streamToViews ( ) <nl> for ( size_t i = 0 ; i < num_created_consumers ; + + i ) <nl> { <nl> auto stream <nl> - = std : : make_shared < KafkaBlockInputStream > ( * this , kafka_context , block_io . out - > getHeader ( ) . getNames ( ) , block_size , false ) ; <nl> + = std : : make_shared < KafkaBlockInputStream > ( * this , kafka_context , block_io . out - > getHeader ( ) . getNames ( ) , log , block_size , false ) ; <nl> streams . emplace_back ( stream ) ; <nl> <nl> / / Limit read batch to maximum block size to allow DDL <nl> void registerStorageKafka ( StorageFactory & factory ) <nl> throw Exception ( " Number of consumers can not be lower than 1 " , ErrorCodes : : BAD_ARGUMENTS ) ; <nl> } <nl> <nl> + if ( kafka_settings - > kafka_max_block_size . changed & & kafka_settings - > kafka_max_block_size . value < 1 ) <nl> + { <nl> + throw Exception ( " kafka_max_block_size can not be lower than 1 " , ErrorCodes : : BAD_ARGUMENTS ) ; <nl> + } <nl> + <nl> + if ( kafka_settings - > kafka_poll_max_batch_size . changed & & kafka_settings - > kafka_poll_max_batch_size . value < 1 ) <nl> + { <nl> + throw Exception ( " kafka_poll_max_batch_size can not be lower than 1 " , ErrorCodes : : BAD_ARGUMENTS ) ; <nl> + } <nl> + <nl> return StorageKafka : : create ( args . table_id , args . context , args . columns , std : : move ( kafka_settings ) ) ; <nl> } ; <nl> <nl> new file mode 100644 <nl> index 00000000000 . . c910aa8589e <nl> mmm / dev / null <nl> ppp b / tests / integration / test_storage_kafka / clickhouse_path / format_schemas / template_row . format <nl> @ @ - 0 , 0 + 1 @ @ <nl> + ( id = $ { id : Escaped } , blockNo = $ { blockNo : Escaped } , val1 = $ { val1 : CSV } , val2 = $ { val2 : Escaped } , val3 = $ { val3 : Escaped } ) <nl> \ No newline at end of file <nl> new file mode 100644 <nl> index 00000000000 . . caf693313de <nl> mmm / dev / null <nl> ppp b / tests / integration / test_storage_kafka / clickhouse_path / format_schemas / test . avsc <nl> <nl> + { <nl> + " type " : " record " , <nl> + " name " : " row " , <nl> + " fields " : [ <nl> + { " name " : " id " , " type " : " long " } , <nl> + { " name " : " blockNo " , " type " : " int " } , <nl> + { " name " : " val1 " , " type " : " string " } , <nl> + { " name " : " val2 " , " type " : " float " } , <nl> + { " name " : " val3 " , " type " : " int " } <nl> + ] <nl> + } <nl> \ No newline at end of file <nl> new file mode 100644 <nl> index 00000000000 . . 44f1961205b <nl> mmm / dev / null <nl> ppp b / tests / integration / test_storage_kafka / clickhouse_path / format_schemas / test . capnp <nl> <nl> + @ 0x99f75f775fe63dae ; <nl> + <nl> + struct TestRecordStruct <nl> + { <nl> + id @ 0 : Int64 ; <nl> + blockNo @ 1 : UInt16 ; <nl> + val1 @ 2 : Text ; <nl> + val2 @ 3 : Float32 ; <nl> + val3 @ 4 : UInt8 ; <nl> + } <nl> \ No newline at end of file <nl> new file mode 100644 <nl> index 00000000000 . . cabdff04a78 <nl> mmm / dev / null <nl> ppp b / tests / integration / test_storage_kafka / clickhouse_path / format_schemas / test . proto <nl> <nl> + syntax = " proto3 " ; <nl> + <nl> + message TestMessage { <nl> + int64 id = 1 ; <nl> + uint32 blockNo = 2 ; <nl> + string val1 = 3 ; <nl> + float val2 = 4 ; <nl> + uint32 val3 = 5 ; <nl> + } ; <nl> mmm a / tests / integration / test_storage_kafka / test . py <nl> ppp b / tests / integration / test_storage_kafka / test . py <nl> def kafka_produce_protobuf_messages ( topic , start_index , num_messages ) : <nl> print ( " Produced { } messages for topic { } " . format ( num_messages , topic ) ) <nl> <nl> <nl> + @ pytest . mark . timeout ( 180 ) <nl> + def test_kafka_json_as_string ( kafka_cluster ) : <nl> + kafka_produce ( ' kafka_json_as_string ' , [ ' { " t " : 123 , " e " : { " x " : " woof " } } ' , ' ' , ' { " t " : 124 , " e " : { " x " : " test " } } ' , ' { " F1 " : " V1 " , " F2 " : { " F21 " : " V21 " , " F22 " : { } , " F23 " : " V23 " , " F24 " : " 2019 - 12 - 24T16 : 28 : 04 " } , " F3 " : " V3 " } ' ] ) <nl> + <nl> + instance . query ( ' ' ' <nl> + CREATE TABLE test . kafka ( field String ) <nl> + ENGINE = Kafka <nl> + SETTINGS kafka_broker_list = ' kafka1 : 19092 ' , <nl> + kafka_topic_list = ' kafka_json_as_string ' , <nl> + kafka_group_name = ' kafka_json_as_string ' , <nl> + kafka_format = ' JSONAsString ' , <nl> + kafka_flush_interval_ms = 1000 ; <nl> + ' ' ' ) <nl> + <nl> + result = instance . query ( ' SELECT * FROM test . kafka ; ' ) <nl> + expected = ' ' ' \ <nl> + { " t " : 123 , " e " : { " x " : " woof " } } <nl> + { " t " : 124 , " e " : { " x " : " test " } } <nl> + { " F1 " : " V1 " , " F2 " : { " F21 " : " V21 " , " F22 " : { } , " F23 " : " V23 " , " F24 " : " 2019 - 12 - 24T16 : 28 : 04 " } , " F3 " : " V3 " } <nl> + ' ' ' <nl> + assert TSV ( result ) = = TSV ( expected ) <nl> + assert instance . contains_in_log ( " Parsing of message ( topic : kafka_json_as_string , partition : 0 , offset : 1 ) return no rows " ) <nl> + <nl> + @ pytest . mark . timeout ( 300 ) <nl> + def test_kafka_formats ( kafka_cluster ) : <nl> + # data was dumped from clickhouse itself in a following manner <nl> + # clickhouse - client - - format = Native - - query = ' SELECT toInt64 ( number ) as id , toUInt16 ( intDiv ( id , 65536 ) ) as blockNo , reinterpretAsString ( 19777 ) as val1 , toFloat32 ( 0 . 5 ) as val2 , toUInt8 ( 1 ) as val3 from numbers ( 100 ) ORDER BY id ' | xxd - ps | tr - d ' \ n ' | sed ' s / \ ( . . \ ) / \ \ x \ 1 / g ' <nl> + <nl> + all_formats = { <nl> + # # Text formats # # <nl> + # dumped with clickhouse - client . . . | perl - pe ' s / \ n / \ \ n / ; s / \ t / \ \ t / g ; ' <nl> + ' JSONEachRow ' : { <nl> + ' data_sample ' : [ <nl> + ' { " id " : " 0 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n ' , <nl> + ' { " id " : " 1 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n { " id " : " 2 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n { " id " : " 3 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n { " id " : " 4 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n { " id " : " 5 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n { " id " : " 6 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n { " id " : " 7 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n { " id " : " 8 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n { " id " : " 9 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n { " id " : " 10 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n { " id " : " 11 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n { " id " : " 12 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n { " id " : " 13 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n { " id " : " 14 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n { " id " : " 15 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n ' , <nl> + ' { " id " : " 0 " , " blockNo " : 0 , " val1 " : " AM " , " val2 " : 0 . 5 , " val3 " : 1 } \ n ' , <nl> + ' ' # tolerates <nl> + ] , <nl> + } , <nl> + # JSONAsString doesn ' t fit to that test , and tested separately <nl> + ' JSONCompactEachRow ' : { <nl> + ' data_sample ' : [ <nl> + ' [ " 0 " , 0 , " AM " , 0 . 5 , 1 ] \ n ' , <nl> + ' [ " 1 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 2 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 3 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 4 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 5 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 6 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 7 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 8 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 9 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 10 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 11 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 12 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 13 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 14 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 15 " , 0 , " AM " , 0 . 5 , 1 ] \ n ' , <nl> + ' [ " 0 " , 0 , " AM " , 0 . 5 , 1 ] \ n ' , <nl> + ' ' # tolerates <nl> + ] , <nl> + } , <nl> + ' JSONCompactEachRowWithNamesAndTypes ' : { <nl> + ' data_sample ' : [ <nl> + ' [ " id " , " blockNo " , " val1 " , " val2 " , " val3 " ] \ n [ " Int64 " , " UInt16 " , " String " , " Float32 " , " UInt8 " ] \ n [ " 0 " , 0 , " AM " , 0 . 5 , 1 ] \ n ' , <nl> + ' [ " id " , " blockNo " , " val1 " , " val2 " , " val3 " ] \ n [ " Int64 " , " UInt16 " , " String " , " Float32 " , " UInt8 " ] \ n [ " 1 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 2 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 3 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 4 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 5 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 6 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 7 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 8 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 9 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 10 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 11 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 12 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 13 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 14 " , 0 , " AM " , 0 . 5 , 1 ] \ n [ " 15 " , 0 , " AM " , 0 . 5 , 1 ] \ n ' , <nl> + ' [ " id " , " blockNo " , " val1 " , " val2 " , " val3 " ] \ n [ " Int64 " , " UInt16 " , " String " , " Float32 " , " UInt8 " ] \ n [ " 0 " , 0 , " AM " , 0 . 5 , 1 ] \ n ' , <nl> + # ' ' <nl> + # On empty message exception : Cannot parse input : expected ' [ ' at end of stream . , Stack trace ( when copying this message , always include the lines below ) : <nl> + # / src / IO / ReadHelpers . h : 175 : DB : : assertChar ( char , DB : : ReadBuffer & ) @ 0x15db231a in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / Impl / JSONCompactEachRowRowInputFormat . cpp : 0 : DB : : JSONCompactEachRowRowInputFormat : : readPrefix ( ) @ 0x1dee6bd6 in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / IRowInputFormat . cpp : 0 : DB : : IRowInputFormat : : generate ( ) @ 0x1de72710 in / usr / bin / clickhouse <nl> + ] , <nl> + } , <nl> + ' TSKV ' : { <nl> + ' data_sample ' : [ <nl> + ' id = 0 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ n ' , <nl> + ' id = 1 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ nid = 2 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ nid = 3 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ nid = 4 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ nid = 5 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ nid = 6 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ nid = 7 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ nid = 8 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ nid = 9 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ nid = 10 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ nid = 11 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ nid = 12 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ nid = 13 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ nid = 14 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ nid = 15 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ n ' , <nl> + ' id = 0 \ tblockNo = 0 \ tval1 = AM \ tval2 = 0 . 5 \ tval3 = 1 \ n ' , <nl> + # ' ' <nl> + # On empty message exception : Unexpected end of stream while reading key name from TSKV format <nl> + # / src / Processors / Formats / Impl / TSKVRowInputFormat . cpp : 88 : DB : : readName ( DB : : ReadBuffer & , StringRef & , std : : __1 : : basic_string < char , std : : __1 : : char_traits < char > , std : : __1 : : allocator < char > > & ) @ 0x1df8c098 in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / Impl / TSKVRowInputFormat . cpp : 114 : DB : : TSKVRowInputFormat : : readRow ( std : : __1 : : vector < COW < DB : : IColumn > : : mutable_ptr < DB : : IColumn > , std : : __1 : : allocator < COW < DB : : IColumn > : : mutable_ptr < DB : : IColumn > > > & , DB : : RowReadExtension & ) @ 0x1df8ae3e in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / IRowInputFormat . cpp : 64 : DB : : IRowInputFormat : : generate ( ) @ 0x1de727cf in / usr / bin / clickhouse <nl> + ] , <nl> + } , <nl> + ' CSV ' : { <nl> + ' data_sample ' : [ <nl> + ' 0 , 0 , " AM " , 0 . 5 , 1 \ n ' , <nl> + ' 1 , 0 , " AM " , 0 . 5 , 1 \ n2 , 0 , " AM " , 0 . 5 , 1 \ n3 , 0 , " AM " , 0 . 5 , 1 \ n4 , 0 , " AM " , 0 . 5 , 1 \ n5 , 0 , " AM " , 0 . 5 , 1 \ n6 , 0 , " AM " , 0 . 5 , 1 \ n7 , 0 , " AM " , 0 . 5 , 1 \ n8 , 0 , " AM " , 0 . 5 , 1 \ n9 , 0 , " AM " , 0 . 5 , 1 \ n10 , 0 , " AM " , 0 . 5 , 1 \ n11 , 0 , " AM " , 0 . 5 , 1 \ n12 , 0 , " AM " , 0 . 5 , 1 \ n13 , 0 , " AM " , 0 . 5 , 1 \ n14 , 0 , " AM " , 0 . 5 , 1 \ n15 , 0 , " AM " , 0 . 5 , 1 \ n ' , <nl> + ' 0 , 0 , " AM " , 0 . 5 , 1 \ n ' , <nl> + ' ' # tolerates <nl> + ] , <nl> + } , <nl> + ' TSV ' : { <nl> + ' data_sample ' : [ <nl> + ' 0 \ t0 \ tAM \ t0 . 5 \ t1 \ n ' , <nl> + ' 1 \ t0 \ tAM \ t0 . 5 \ t1 \ n2 \ t0 \ tAM \ t0 . 5 \ t1 \ n3 \ t0 \ tAM \ t0 . 5 \ t1 \ n4 \ t0 \ tAM \ t0 . 5 \ t1 \ n5 \ t0 \ tAM \ t0 . 5 \ t1 \ n6 \ t0 \ tAM \ t0 . 5 \ t1 \ n7 \ t0 \ tAM \ t0 . 5 \ t1 \ n8 \ t0 \ tAM \ t0 . 5 \ t1 \ n9 \ t0 \ tAM \ t0 . 5 \ t1 \ n10 \ t0 \ tAM \ t0 . 5 \ t1 \ n11 \ t0 \ tAM \ t0 . 5 \ t1 \ n12 \ t0 \ tAM \ t0 . 5 \ t1 \ n13 \ t0 \ tAM \ t0 . 5 \ t1 \ n14 \ t0 \ tAM \ t0 . 5 \ t1 \ n15 \ t0 \ tAM \ t0 . 5 \ t1 \ n ' , <nl> + ' 0 \ t0 \ tAM \ t0 . 5 \ t1 \ n ' , <nl> + ' ' # tolerates <nl> + ] , <nl> + } , <nl> + ' CSVWithNames ' : { <nl> + ' data_sample ' : [ <nl> + ' " id " , " blockNo " , " val1 " , " val2 " , " val3 " \ n0 , 0 , " AM " , 0 . 5 , 1 \ n ' , <nl> + ' " id " , " blockNo " , " val1 " , " val2 " , " val3 " \ n1 , 0 , " AM " , 0 . 5 , 1 \ n2 , 0 , " AM " , 0 . 5 , 1 \ n3 , 0 , " AM " , 0 . 5 , 1 \ n4 , 0 , " AM " , 0 . 5 , 1 \ n5 , 0 , " AM " , 0 . 5 , 1 \ n6 , 0 , " AM " , 0 . 5 , 1 \ n7 , 0 , " AM " , 0 . 5 , 1 \ n8 , 0 , " AM " , 0 . 5 , 1 \ n9 , 0 , " AM " , 0 . 5 , 1 \ n10 , 0 , " AM " , 0 . 5 , 1 \ n11 , 0 , " AM " , 0 . 5 , 1 \ n12 , 0 , " AM " , 0 . 5 , 1 \ n13 , 0 , " AM " , 0 . 5 , 1 \ n14 , 0 , " AM " , 0 . 5 , 1 \ n15 , 0 , " AM " , 0 . 5 , 1 \ n ' , <nl> + ' " id " , " blockNo " , " val1 " , " val2 " , " val3 " \ n0 , 0 , " AM " , 0 . 5 , 1 \ n ' , <nl> + # ' ' , <nl> + # On empty message exception happens : Attempt to read after eof <nl> + # / src / IO / VarInt . h : 122 : DB : : throwReadAfterEOF ( ) @ 0x15c34487 in / usr / bin / clickhouse <nl> + # / src / IO / ReadHelpers . cpp : 583 : void DB : : readCSVStringInto < std : : __1 : : basic_string < char , std : : __1 : : char_traits < char > , std : : __1 : : allocator < char > > > ( std : : __1 : : basic_string < char , std : : __1 : : char_traits < char > , std : : __1 : : allocator < char > > & , DB : : ReadBuffer & , DB : : FormatSettings : : CSV const & ) @ 0x15c961e1 in / usr / bin / clickhouse <nl> + # / src / IO / ReadHelpers . cpp : 678 : DB : : readCSVString ( std : : __1 : : basic_string < char , std : : __1 : : char_traits < char > , std : : __1 : : allocator < char > > & , DB : : ReadBuffer & , DB : : FormatSettings : : CSV const & ) @ 0x15c8dfae in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / Impl / CSVRowInputFormat . cpp : 170 : DB : : CSVRowInputFormat : : readPrefix ( ) @ 0x1dec46f7 in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / IRowInputFormat . cpp : 0 : DB : : IRowInputFormat : : generate ( ) @ 0x1de72710 in / usr / bin / clickhouse <nl> + # / src / Processors / ISource . cpp : 48 : DB : : ISource : : work ( ) @ 0x1dd79737 in / usr / bin / clickhouse <nl> + ] , <nl> + } , <nl> + ' Values ' : { <nl> + ' data_sample ' : [ <nl> + " ( 0 , 0 , ' AM ' , 0 . 5 , 1 ) " , <nl> + " ( 1 , 0 , ' AM ' , 0 . 5 , 1 ) , ( 2 , 0 , ' AM ' , 0 . 5 , 1 ) , ( 3 , 0 , ' AM ' , 0 . 5 , 1 ) , ( 4 , 0 , ' AM ' , 0 . 5 , 1 ) , ( 5 , 0 , ' AM ' , 0 . 5 , 1 ) , ( 6 , 0 , ' AM ' , 0 . 5 , 1 ) , ( 7 , 0 , ' AM ' , 0 . 5 , 1 ) , ( 8 , 0 , ' AM ' , 0 . 5 , 1 ) , ( 9 , 0 , ' AM ' , 0 . 5 , 1 ) , ( 10 , 0 , ' AM ' , 0 . 5 , 1 ) , ( 11 , 0 , ' AM ' , 0 . 5 , 1 ) , ( 12 , 0 , ' AM ' , 0 . 5 , 1 ) , ( 13 , 0 , ' AM ' , 0 . 5 , 1 ) , ( 14 , 0 , ' AM ' , 0 . 5 , 1 ) , ( 15 , 0 , ' AM ' , 0 . 5 , 1 ) " , <nl> + " ( 0 , 0 , ' AM ' , 0 . 5 , 1 ) " , <nl> + ' ' # tolerates <nl> + ] , <nl> + } , <nl> + ' TSVWithNames ' : { <nl> + ' data_sample ' : [ <nl> + ' id \ tblockNo \ tval1 \ tval2 \ tval3 \ n0 \ t0 \ tAM \ t0 . 5 \ t1 \ n ' , <nl> + ' id \ tblockNo \ tval1 \ tval2 \ tval3 \ n1 \ t0 \ tAM \ t0 . 5 \ t1 \ n2 \ t0 \ tAM \ t0 . 5 \ t1 \ n3 \ t0 \ tAM \ t0 . 5 \ t1 \ n4 \ t0 \ tAM \ t0 . 5 \ t1 \ n5 \ t0 \ tAM \ t0 . 5 \ t1 \ n6 \ t0 \ tAM \ t0 . 5 \ t1 \ n7 \ t0 \ tAM \ t0 . 5 \ t1 \ n8 \ t0 \ tAM \ t0 . 5 \ t1 \ n9 \ t0 \ tAM \ t0 . 5 \ t1 \ n10 \ t0 \ tAM \ t0 . 5 \ t1 \ n11 \ t0 \ tAM \ t0 . 5 \ t1 \ n12 \ t0 \ tAM \ t0 . 5 \ t1 \ n13 \ t0 \ tAM \ t0 . 5 \ t1 \ n14 \ t0 \ tAM \ t0 . 5 \ t1 \ n15 \ t0 \ tAM \ t0 . 5 \ t1 \ n ' , <nl> + ' id \ tblockNo \ tval1 \ tval2 \ tval3 \ n0 \ t0 \ tAM \ t0 . 5 \ t1 \ n ' , <nl> + ' ' # tolerates <nl> + ] , <nl> + } , <nl> + ' TSVWithNamesAndTypes ' : { <nl> + ' data_sample ' : [ <nl> + ' id \ tblockNo \ tval1 \ tval2 \ tval3 \ nInt64 \ tUInt16 \ tString \ tFloat32 \ tUInt8 \ n0 \ t0 \ tAM \ t0 . 5 \ t1 \ n ' , <nl> + ' id \ tblockNo \ tval1 \ tval2 \ tval3 \ nInt64 \ tUInt16 \ tString \ tFloat32 \ tUInt8 \ n1 \ t0 \ tAM \ t0 . 5 \ t1 \ n2 \ t0 \ tAM \ t0 . 5 \ t1 \ n3 \ t0 \ tAM \ t0 . 5 \ t1 \ n4 \ t0 \ tAM \ t0 . 5 \ t1 \ n5 \ t0 \ tAM \ t0 . 5 \ t1 \ n6 \ t0 \ tAM \ t0 . 5 \ t1 \ n7 \ t0 \ tAM \ t0 . 5 \ t1 \ n8 \ t0 \ tAM \ t0 . 5 \ t1 \ n9 \ t0 \ tAM \ t0 . 5 \ t1 \ n10 \ t0 \ tAM \ t0 . 5 \ t1 \ n11 \ t0 \ tAM \ t0 . 5 \ t1 \ n12 \ t0 \ tAM \ t0 . 5 \ t1 \ n13 \ t0 \ tAM \ t0 . 5 \ t1 \ n14 \ t0 \ tAM \ t0 . 5 \ t1 \ n15 \ t0 \ tAM \ t0 . 5 \ t1 \ n ' , <nl> + ' id \ tblockNo \ tval1 \ tval2 \ tval3 \ nInt64 \ tUInt16 \ tString \ tFloat32 \ tUInt8 \ n0 \ t0 \ tAM \ t0 . 5 \ t1 \ n ' , <nl> + # ' ' , <nl> + # On empty message exception happens : Cannot parse input : expected ' \ n ' at end of stream . <nl> + # / src / IO / ReadHelpers . cpp : 84 : DB : : throwAtAssertionFailed ( char const * , DB : : ReadBuffer & ) @ 0x15c8d8ec in / usr / bin / clickhouse <nl> + # / src / IO / ReadHelpers . h : 175 : DB : : assertChar ( char , DB : : ReadBuffer & ) @ 0x15db231a in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / Impl / TabSeparatedRowInputFormat . cpp : 24 : DB : : skipTSVRow ( DB : : ReadBuffer & , unsigned long ) @ 0x1df92fac in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / Impl / TabSeparatedRowInputFormat . cpp : 168 : DB : : TabSeparatedRowInputFormat : : readPrefix ( ) @ 0x1df92df0 in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / IRowInputFormat . cpp : 0 : DB : : IRowInputFormat : : generate ( ) @ 0x1de72710 in / usr / bin / clickhouse <nl> + ] , <nl> + } , <nl> + # ' Template ' : { <nl> + # ' data_sample ' : [ <nl> + # ' ( id = 0 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) ' , <nl> + # # ' ( id = 1 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 2 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 3 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 4 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 5 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 6 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 7 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 8 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 9 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 10 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 11 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 12 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 13 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 14 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 15 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) ' , <nl> + # # ' ( id = 0 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) ' , <nl> + # # ' ' # tolerates <nl> + # ] , <nl> + # ' extra_settings ' : " , format_template_row = ' template_row . format ' " <nl> + # } , <nl> + ' Regexp ' : { <nl> + ' data_sample ' : [ <nl> + ' ( id = 0 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) ' , <nl> + ' ( id = 1 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 2 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 3 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 4 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 5 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 6 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 7 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 8 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 9 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 10 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 11 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 12 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 13 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 14 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) \ n ( id = 15 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) ' , <nl> + ' ( id = 0 , blockNo = 0 , val1 = " AM " , val2 = 0 . 5 , val3 = 1 ) ' , <nl> + # ' ' <nl> + # On empty message exception happens : Line " " doesn ' t match the regexp . : ( at row 1 ) <nl> + # / src / Processors / Formats / Impl / RegexpRowInputFormat . cpp : 140 : DB : : RegexpRowInputFormat : : readRow ( std : : __1 : : vector < COW < DB : : IColumn > : : mutable_ptr < DB : : IColumn > , std : : __1 : : allocator < COW < DB : : IColumn > : : mutable_ptr < DB : : IColumn > > > & , DB : : RowReadExtension & ) @ 0x1df82fcb in / usr / bin / clickhouse <nl> + ] , <nl> + ' extra_settings ' : " , format_regexp = ' \ ( id = ( . + ? ) , blockNo = ( . + ? ) , val1 = \ " ( . + ? ) \ " , val2 = ( . + ? ) , val3 = ( . + ? ) \ ) ' , format_regexp_escaping_rule = ' Escaped ' " <nl> + } , <nl> + <nl> + # # BINARY FORMATS <nl> + # dumped with <nl> + # clickhouse - client . . . | xxd - ps - c 200 | tr - d ' \ n ' | sed ' s / \ ( . . \ ) / \ \ x \ 1 / g ' <nl> + ' Native ' : { <nl> + ' data_sample ' : [ <nl> + ' \ x05 \ x01 \ x02 \ x69 \ x64 \ x05 \ x49 \ x6e \ x74 \ x36 \ x34 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x06 \ x55 \ x49 \ x6e \ x74 \ x31 \ x36 \ x00 \ x00 \ x04 \ x76 \ x61 \ x6c \ x31 \ x06 \ x53 \ x74 \ x72 \ x69 \ x6e \ x67 \ x02 \ x41 \ x4d \ x04 \ x76 \ x61 \ x6c \ x32 \ x07 \ x46 \ x6c \ x6f \ x61 \ x74 \ x33 \ x32 \ x00 \ x00 \ x00 \ x3f \ x04 \ x76 \ x61 \ x6c \ x33 \ x05 \ x55 \ x49 \ x6e \ x74 \ x38 \ x01 ' , <nl> + ' \ x05 \ x0f \ x02 \ x69 \ x64 \ x05 \ x49 \ x6e \ x74 \ x36 \ x34 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x03 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x07 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x09 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0b \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0c \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0e \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x06 \ x55 \ x49 \ x6e \ x74 \ x31 \ x36 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x04 \ x76 \ x61 \ x6c \ x31 \ x06 \ x53 \ x74 \ x72 \ x69 \ x6e \ x67 \ x02 \ x41 \ x4d \ x02 \ x41 \ x4d \ x02 \ x41 \ x4d \ x02 \ x41 \ x4d \ x02 \ x41 \ x4d \ x02 \ x41 \ x4d \ x02 \ x41 \ x4d \ x02 \ x41 \ x4d \ x02 \ x41 \ x4d \ x02 \ x41 \ x4d \ x02 \ x41 \ x4d \ x02 \ x41 \ x4d \ x02 \ x41 \ x4d \ x02 \ x41 \ x4d \ x02 \ x41 \ x4d \ x04 \ x76 \ x61 \ x6c \ x32 \ x07 \ x46 \ x6c \ x6f \ x61 \ x74 \ x33 \ x32 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x04 \ x76 \ x61 \ x6c \ x33 \ x05 \ x55 \ x49 \ x6e \ x74 \ x38 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 ' , <nl> + ' \ x05 \ x01 \ x02 \ x69 \ x64 \ x05 \ x49 \ x6e \ x74 \ x36 \ x34 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x06 \ x55 \ x49 \ x6e \ x74 \ x31 \ x36 \ x00 \ x00 \ x04 \ x76 \ x61 \ x6c \ x31 \ x06 \ x53 \ x74 \ x72 \ x69 \ x6e \ x67 \ x02 \ x41 \ x4d \ x04 \ x76 \ x61 \ x6c \ x32 \ x07 \ x46 \ x6c \ x6f \ x61 \ x74 \ x33 \ x32 \ x00 \ x00 \ x00 \ x3f \ x04 \ x76 \ x61 \ x6c \ x33 \ x05 \ x55 \ x49 \ x6e \ x74 \ x38 \ x01 ' , <nl> + # ' ' <nl> + # On empty message exception happens : DB : : Exception : Attempt to read after eof <nl> + # / src / IO / VarInt . h : 122 : DB : : throwReadAfterEOF ( ) @ 0x15c34487 in / usr / bin / clickhouse <nl> + # / src / IO / VarInt . h : 135 : void DB : : readVarUIntImpl < false > ( unsigned long & , DB : : ReadBuffer & ) @ 0x15c68bb7 in / usr / bin / clickhouse <nl> + # / src / IO / VarInt . h : 149 : DB : : readVarUInt ( unsigned long & , DB : : ReadBuffer & ) @ 0x15c68844 in / usr / bin / clickhouse <nl> + # / src / DataStreams / NativeBlockInputStream . cpp : 124 : DB : : NativeBlockInputStream : : readImpl ( ) @ 0x1d3e2778 in / usr / bin / clickhouse <nl> + # / src / DataStreams / IBlockInputStream . cpp : 60 : DB : : IBlockInputStream : : read ( ) @ 0x1c9c92fd in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / Impl / NativeFormat . cpp : 42 : DB : : NativeInputFormatFromNativeBlockInputStream : : generate ( ) @ 0x1df1ea79 in / usr / bin / clickhouse <nl> + # / src / Processors / ISource . cpp : 48 : DB : : ISource : : work ( ) @ 0x1dd79737 in / usr / bin / clickhouse <nl> + ] , <nl> + } , <nl> + ' MsgPack ' : { <nl> + ' data_sample ' : [ <nl> + ' \ x00 \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 ' , <nl> + ' \ x01 \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 \ x02 \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 \ x03 \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 \ x04 \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 \ x05 \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 \ x06 \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 \ x07 \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 \ x08 \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 \ x09 \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 \ x0a \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 \ x0b \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 \ x0c \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 \ x0d \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 \ x0e \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 \ x0f \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 ' , <nl> + ' \ x00 \ x00 \ xa2 \ x41 \ x4d \ xca \ x3f \ x00 \ x00 \ x00 \ x01 ' , <nl> + # ' ' <nl> + # On empty message exception happens : Unexpected end of file while parsing msgpack object . : ( at row 1 ) <nl> + # coming from Processors / Formats / Impl / MsgPackRowInputFormat . cpp : 170 <nl> + ] , <nl> + } , <nl> + ' RowBinary ' : { <nl> + ' data_sample ' : [ <nl> + ' \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 ' , <nl> + ' \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x02 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x03 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x07 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x09 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x0a \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x0b \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x0c \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x0d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x0e \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 ' , <nl> + ' \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 ' , <nl> + # ' ' <nl> + # On empty message exception happens : DB : : Exception : Cannot read all data . Bytes read : 0 . Bytes expected : 8 . <nl> + # / src / IO / ReadBuffer . h : 157 : DB : : ReadBuffer : : readStrict ( char * , unsigned long ) @ 0x15c6894d in / usr / bin / clickhouse <nl> + # / src / IO / ReadHelpers . h : 108 : void DB : : readPODBinary < long > ( long & , DB : : ReadBuffer & ) @ 0x15c67715 in / usr / bin / clickhouse <nl> + # / src / IO / ReadHelpers . h : 737 : std : : __1 : : enable_if < is_arithmetic_v < long > , void > : : type DB : : readBinary < long > ( long & , DB : : ReadBuffer & ) @ 0x15e7afbd in / usr / bin / clickhouse <nl> + # / src / DataTypes / DataTypeNumberBase . cpp : 180 : DB : : DataTypeNumberBase < long > : : deserializeBinary ( DB : : IColumn & , DB : : ReadBuffer & ) const @ 0x1cace581 in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / Impl / BinaryRowInputFormat . cpp : 22 : DB : : BinaryRowInputFormat : : readRow ( std : : __1 : : vector < COW < DB : : IColumn > : : mutable_ptr < DB : : IColumn > , std : : __1 : : allocator < COW < DB : : IColumn > : : mutable_ptr < DB : : IColumn > > > & , DB : : RowReadExtension & ) @ 0x1dea2c0b in / usr / bin / clickhouse <nl> + ] , <nl> + } , <nl> + ' RowBinaryWithNamesAndTypes ' : { <nl> + ' data_sample ' : [ <nl> + ' \ x05 \ x02 \ x69 \ x64 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x04 \ x76 \ x61 \ x6c \ x31 \ x04 \ x76 \ x61 \ x6c \ x32 \ x04 \ x76 \ x61 \ x6c \ x33 \ x05 \ x49 \ x6e \ x74 \ x36 \ x34 \ x06 \ x55 \ x49 \ x6e \ x74 \ x31 \ x36 \ x06 \ x53 \ x74 \ x72 \ x69 \ x6e \ x67 \ x07 \ x46 \ x6c \ x6f \ x61 \ x74 \ x33 \ x32 \ x05 \ x55 \ x49 \ x6e \ x74 \ x38 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 ' , <nl> + ' \ x05 \ x02 \ x69 \ x64 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x04 \ x76 \ x61 \ x6c \ x31 \ x04 \ x76 \ x61 \ x6c \ x32 \ x04 \ x76 \ x61 \ x6c \ x33 \ x05 \ x49 \ x6e \ x74 \ x36 \ x34 \ x06 \ x55 \ x49 \ x6e \ x74 \ x31 \ x36 \ x06 \ x53 \ x74 \ x72 \ x69 \ x6e \ x67 \ x07 \ x46 \ x6c \ x6f \ x61 \ x74 \ x33 \ x32 \ x05 \ x55 \ x49 \ x6e \ x74 \ x38 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x02 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x03 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x07 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x09 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x0a \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x0b \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x0c \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x0d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x0e \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 ' , <nl> + ' \ x05 \ x02 \ x69 \ x64 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x04 \ x76 \ x61 \ x6c \ x31 \ x04 \ x76 \ x61 \ x6c \ x32 \ x04 \ x76 \ x61 \ x6c \ x33 \ x05 \ x49 \ x6e \ x74 \ x36 \ x34 \ x06 \ x55 \ x49 \ x6e \ x74 \ x31 \ x36 \ x06 \ x53 \ x74 \ x72 \ x69 \ x6e \ x67 \ x07 \ x46 \ x6c \ x6f \ x61 \ x74 \ x33 \ x32 \ x05 \ x55 \ x49 \ x6e \ x74 \ x38 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x01 ' , <nl> + # ' ' <nl> + # ! ! ! On empty message segfault : Address not mapped to object <nl> + # / contrib / FastMemcpy / FastMemcpy . h : 666 : memcpy_fast @ 0x21742d65 in / usr / bin / clickhouse <nl> + # / contrib / FastMemcpy / memcpy_wrapper . c : 5 : memcpy @ 0x21738235 in / usr / bin / clickhouse <nl> + # / src / IO / ReadBuffer . h : 145 : DB : : ReadBuffer : : read ( char * , unsigned long ) @ 0x15c369d7 in / usr / bin / clickhouse <nl> + # / src / IO / ReadBuffer . h : 155 : DB : : ReadBuffer : : readStrict ( char * , unsigned long ) @ 0x15c68878 in / usr / bin / clickhouse <nl> + # / src / DataTypes / DataTypeString . cpp : 84 : DB : : DataTypeString : : deserializeBinary ( DB : : IColumn & , DB : : ReadBuffer & ) const @ 0x1cad12e7 in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / Impl / BinaryRowInputFormat . cpp : 22 : DB : : BinaryRowInputFormat : : readRow ( std : : __1 : : vector < COW < DB : : IColumn > : : mutable_ptr < DB : : IColumn > , std : : __1 : : allocator < COW < DB : : IColumn > : : mutable_ptr < DB : : IColumn > > > & , DB : : RowReadExtension & ) @ 0x1dea2c0b in / usr / bin / clickhouse <nl> + ] , <nl> + } , <nl> + ' Protobuf ' : { <nl> + ' data_sample ' : [ <nl> + ' \ x0b \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 ' , <nl> + ' \ x0d \ x08 \ x01 \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 \ x0d \ x08 \ x02 \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 \ x0d \ x08 \ x03 \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 \ x0d \ x08 \ x04 \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 \ x0d \ x08 \ x05 \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 \ x0d \ x08 \ x06 \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 \ x0d \ x08 \ x07 \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 \ x0d \ x08 \ x08 \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 \ x0d \ x08 \ x09 \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 \ x0d \ x08 \ x0a \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 \ x0d \ x08 \ x0b \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 \ x0d \ x08 \ x0c \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 \ x0d \ x08 \ x0d \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 \ x0d \ x08 \ x0e \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 \ x0d \ x08 \ x0f \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 ' , <nl> + ' \ x0b \ x1a \ x02 \ x41 \ x4d \ x25 \ x00 \ x00 \ x00 \ x3f \ x28 \ x01 ' , <nl> + # ' ' <nl> + # On empty message exception : Attempt to read after eof <nl> + # / src / IO / ReadBuffer . h : 184 : DB : : ReadBuffer : : throwReadAfterEOF ( ) @ 0x15c9699b in / usr / bin / clickhouse <nl> + # / src / Formats / ProtobufReader . h : 115 : DB : : ProtobufReader : : SimpleReader : : startMessage ( ) @ 0x1df4f828 in / usr / bin / clickhouse <nl> + # / src / Formats / ProtobufReader . cpp : 1119 : DB : : ProtobufReader : : startMessage ( ) @ 0x1df5356c in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / Impl / ProtobufRowInputFormat . cpp : 25 : DB : : ProtobufRowInputFormat : : readRow ( std : : __1 : : vector < COW < DB : : IColumn > : : mutable_ptr < DB : : IColumn > , std : : __1 : : allocator < COW < DB : : IColumn > : : mutable_ptr < DB : : IColumn > > > & , DB : : RowReadExtension & ) @ 0x1df4cc71 in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / IRowInputFormat . cpp : 64 : DB : : IRowInputFormat : : generate ( ) @ 0x1de727cf in / usr / bin / clickhouse <nl> + ] , <nl> + ' extra_settings ' : " , kafka_schema = ' test : TestMessage ' " <nl> + } , <nl> + ' ORC ' : { <nl> + ' data_sample ' : [ <nl> + ' \ x4f \ x52 \ x43 \ x11 \ x00 \ x00 \ x0a \ x06 \ x12 \ x04 \ x08 \ x01 \ x50 \ x00 \ x2b \ x00 \ x00 \ x0a \ x13 \ x0a \ x03 \ x00 \ x00 \ x00 \ x12 \ x0c \ x08 \ x01 \ x12 \ x06 \ x08 \ x00 \ x10 \ x00 \ x18 \ x00 \ x50 \ x00 \ x30 \ x00 \ x00 \ xe3 \ x12 \ xe7 \ x62 \ x65 \ x00 \ x01 \ x21 \ x3e \ x0e \ x46 \ x25 \ x0e \ x2e \ x46 \ x03 \ x21 \ x46 \ x03 \ x09 \ xa6 \ x00 \ x06 \ x00 \ x32 \ x00 \ x00 \ xe3 \ x92 \ xe4 \ x62 \ x65 \ x00 \ x01 \ x21 \ x01 \ x0e \ x46 \ x25 \ x2e \ x2e \ x26 \ x47 \ x5f \ x21 \ x20 \ x96 \ x60 \ x09 \ x60 \ x00 \ x00 \ x36 \ x00 \ x00 \ xe3 \ x92 \ xe1 \ x62 \ x65 \ x00 \ x01 \ x21 \ x61 \ x0e \ x46 \ x23 \ x5e \ x2e \ x46 \ x03 \ x21 \ x66 \ x03 \ x3d \ x53 \ x29 \ x10 \ x11 \ xc0 \ x00 \ x00 \ x2b \ x00 \ x00 \ x0a \ x13 \ x0a \ x03 \ x00 \ x00 \ x00 \ x12 \ x0c \ x08 \ x01 \ x12 \ x06 \ x08 \ x02 \ x10 \ x02 \ x18 \ x02 \ x50 \ x00 \ x05 \ x00 \ x00 \ xff \ x00 \ x03 \ x00 \ x00 \ x30 \ x07 \ x00 \ x00 \ x40 \ x00 \ x80 \ x05 \ x00 \ x00 \ x41 \ x4d \ x07 \ x00 \ x00 \ x42 \ x00 \ x80 \ x03 \ x00 \ x00 \ x0a \ x07 \ x00 \ x00 \ x42 \ x00 \ x80 \ x05 \ x00 \ x00 \ xff \ x01 \ x88 \ x00 \ x00 \ x4d \ xca \ xc1 \ x0a \ x80 \ x30 \ x0c \ x03 \ xd0 \ x2e \ x6b \ xcb \ x98 \ x17 \ xf1 \ x14 \ x50 \ xfc \ xff \ xcf \ xb4 \ x66 \ x1e \ x3c \ x84 \ x47 \ x9a \ xce \ x1c \ xb9 \ x1b \ xb7 \ xf9 \ xda \ x48 \ x09 \ x9e \ xb2 \ xf3 \ x92 \ xce \ x5b \ x86 \ xf6 \ x56 \ x7f \ x21 \ x41 \ x2f \ x51 \ xa6 \ x7a \ xd7 \ x1d \ xe5 \ xea \ xae \ x3d \ xca \ xd5 \ x83 \ x71 \ x60 \ xd8 \ x17 \ xfc \ x62 \ x0f \ xa8 \ x00 \ x00 \ xe3 \ x4a \ xe6 \ x62 \ xe1 \ x60 \ x0c \ x60 \ xe0 \ xe2 \ xe3 \ x60 \ x14 \ x62 \ xe3 \ x60 \ x10 \ x60 \ x90 \ x60 \ x08 \ x60 \ x88 \ x60 \ xe5 \ x12 \ xe0 \ x60 \ x54 \ xe2 \ xe0 \ x62 \ x34 \ x10 \ x62 \ x34 \ x90 \ x60 \ x02 \ x8a \ x70 \ x71 \ x09 \ x01 \ x45 \ xb8 \ xb8 \ x98 \ x1c \ x7d \ x85 \ x80 \ x58 \ x82 \ x05 \ x28 \ xc6 \ xcd \ x25 \ xca \ xc1 \ x68 \ xc4 \ x0b \ x52 \ xc5 \ x6c \ xa0 \ x67 \ x2a \ x05 \ x22 \ xc0 \ x4a \ x21 \ x86 \ x31 \ x09 \ x30 \ x81 \ xb5 \ xb2 \ x02 \ x00 \ x36 \ x01 \ x00 \ x25 \ x8c \ xbd \ x0a \ xc2 \ x30 \ x14 \ x85 \ x73 \ x6f \ x92 \ xf6 \ x92 \ x6a \ x09 \ x01 \ x21 \ x64 \ x92 \ x4e \ x75 \ x91 \ x58 \ x71 \ xc9 \ x64 \ x27 \ x5d \ x2c \ x1d \ x5d \ xfd \ x59 \ xc4 \ x42 \ x37 \ x5f \ xc0 \ x17 \ xe8 \ x23 \ x9b \ xc6 \ xe1 \ x3b \ x70 \ x0f \ xdf \ xb9 \ xc4 \ xf5 \ x17 \ x5d \ x41 \ x5c \ x4f \ x60 \ x37 \ xeb \ x53 \ x0d \ x55 \ x4d \ x0b \ x23 \ x01 \ xb9 \ x90 \ x2e \ xbf \ x0f \ xe3 \ xe3 \ xdd \ x8d \ x0e \ x5f \ x4f \ x27 \ x3e \ xb7 \ x61 \ x97 \ xb2 \ x49 \ xb9 \ xaf \ x90 \ x20 \ x92 \ x27 \ x32 \ x2a \ x6b \ xf4 \ xf3 \ x0d \ x1e \ x82 \ x20 \ xe8 \ x59 \ x28 \ x09 \ x4c \ x46 \ x4c \ x33 \ xcb \ x7a \ x76 \ x95 \ x41 \ x47 \ x9f \ x14 \ x78 \ x03 \ xde \ x62 \ x6c \ x54 \ x30 \ xb1 \ x51 \ x0a \ xdb \ x8b \ x89 \ x58 \ x11 \ xbb \ x22 \ xac \ x08 \ x9a \ xe5 \ x6c \ x71 \ xbf \ x3d \ xb8 \ x39 \ x92 \ xfa \ x7f \ x86 \ x1a \ xd3 \ x54 \ x1e \ xa7 \ xee \ xcc \ x7e \ x08 \ x9e \ x01 \ x10 \ x01 \ x18 \ x80 \ x80 \ x10 \ x22 \ x02 \ x00 \ x0c \ x28 \ x57 \ x30 \ x06 \ x82 \ xf4 \ x03 \ x03 \ x4f \ x52 \ x43 \ x18 ' , <nl> + ' \ x4f \ x52 \ x43 \ x11 \ x00 \ x00 \ x0a \ x06 \ x12 \ x04 \ x08 \ x0f \ x50 \ x00 \ x2b \ x00 \ x00 \ x0a \ x13 \ x0a \ x03 \ x00 \ x00 \ x00 \ x12 \ x0c \ x08 \ x0f \ x12 \ x06 \ x08 \ x00 \ x10 \ x00 \ x18 \ x00 \ x50 \ x00 \ x30 \ x00 \ x00 \ xe3 \ x12 \ xe7 \ x62 \ x65 \ x00 \ x01 \ x21 \ x3e \ x0e \ x7e \ x25 \ x0e \ x2e \ x46 \ x43 \ x21 \ x46 \ x4b \ x09 \ xad \ x00 \ x06 \ x00 \ x33 \ x00 \ x00 \ x0a \ x17 \ x0a \ x03 \ x00 \ x00 \ x00 \ x12 \ x10 \ x08 \ x0f \ x22 \ x0a \ x0a \ x02 \ x41 \ x4d \ x12 \ x02 \ x41 \ x4d \ x18 \ x3c \ x50 \ x00 \ x3a \ x00 \ x00 \ xe3 \ x92 \ xe1 \ x62 \ x65 \ x00 \ x01 \ x21 \ x61 \ x0e \ x7e \ x23 \ x5e \ x2e \ x46 \ x03 \ x21 \ x66 \ x03 \ x3d \ x53 \ x29 \ x66 \ x73 \ x3d \ xd3 \ x00 \ x06 \ x00 \ x2b \ x00 \ x00 \ x0a \ x13 \ x0a \ x03 \ x00 \ x00 \ x00 \ x12 \ x0c \ x08 \ x0f \ x12 \ x06 \ x08 \ x02 \ x10 \ x02 \ x18 \ x1e \ x50 \ x00 \ x05 \ x00 \ x00 \ x0c \ x00 \ x2b \ x00 \ x00 \ x31 \ x32 \ x33 \ x34 \ x35 \ x36 \ x37 \ x38 \ x39 \ x31 \ x30 \ x31 \ x31 \ x31 \ x32 \ x31 \ x33 \ x31 \ x34 \ x31 \ x35 \ x09 \ x00 \ x00 \ x06 \ x01 \ x03 \ x02 \ x09 \ x00 \ x00 \ xc0 \ x0e \ x00 \ x00 \ x07 \ x00 \ x00 \ x42 \ x00 \ x80 \ x05 \ x00 \ x00 \ x41 \ x4d \ x0a \ x00 \ x00 \ xe3 \ xe2 \ x42 \ x01 \ x00 \ x09 \ x00 \ x00 \ xc0 \ x0e \ x02 \ x00 \ x05 \ x00 \ x00 \ x0c \ x01 \ x94 \ x00 \ x00 \ x2d \ xca \ xc1 \ x0e \ x80 \ x30 \ x08 \ x03 \ xd0 \ xc1 \ x60 \ x2e \ xf3 \ x62 \ x76 \ x6a \ xe2 \ x0e \ xfe \ xff \ x57 \ x5a \ x3b \ x0f \ xe4 \ x51 \ xe8 \ x68 \ xbd \ x5d \ x05 \ xe7 \ xf8 \ x34 \ x40 \ x3a \ x6e \ x59 \ xb1 \ x64 \ xe0 \ x91 \ xa9 \ xbf \ xb1 \ x97 \ xd2 \ x95 \ x9d \ x1e \ xca \ x55 \ x3a \ x6d \ xb4 \ xd2 \ xdd \ x0b \ x74 \ x9a \ x74 \ xf7 \ x12 \ x39 \ xbd \ x97 \ x7f \ x7c \ x06 \ xbb \ xa6 \ x8d \ x97 \ x17 \ xb4 \ x00 \ x00 \ xe3 \ x4a \ xe6 \ x62 \ xe1 \ xe0 \ x0f \ x60 \ xe0 \ xe2 \ xe3 \ xe0 \ x17 \ x62 \ xe3 \ x60 \ x10 \ x60 \ x90 \ x60 \ x08 \ x60 \ x88 \ x60 \ xe5 \ x12 \ xe0 \ xe0 \ x57 \ xe2 \ xe0 \ x62 \ x34 \ x14 \ x62 \ xb4 \ x94 \ xd0 \ x02 \ x8a \ xc8 \ x73 \ x09 \ x01 \ x45 \ xb8 \ xb8 \ x98 \ x1c \ x7d \ x85 \ x80 \ x58 \ xc2 \ x06 \ x28 \ x26 \ xc4 \ x25 \ xca \ xc1 \ x6f \ xc4 \ xcb \ xc5 \ x68 \ x20 \ xc4 \ x6c \ xa0 \ x67 \ x2a \ xc5 \ x6c \ xae \ x67 \ x0a \ x14 \ xe6 \ x87 \ x1a \ xc6 \ x24 \ xc0 \ x24 \ x21 \ x07 \ x32 \ x0c \ x00 \ x4a \ x01 \ x00 \ xe3 \ x60 \ x16 \ x58 \ xc3 \ x24 \ xc5 \ xcd \ xc1 \ x2c \ x30 \ x89 \ x51 \ xc2 \ x4b \ xc1 \ x57 \ x83 \ x5f \ x49 \ x83 \ x83 \ x47 \ x88 \ x95 \ x91 \ x89 \ x99 \ x85 \ x55 \ x8a \ x3d \ x29 \ x27 \ x3f \ x39 \ xdb \ x2f \ x5f \ x8a \ x29 \ x33 \ x45 \ x8a \ xa5 \ x2c \ x31 \ xc7 \ x10 \ x4c \ x1a \ x81 \ x49 \ x63 \ x25 \ x26 \ x0e \ x46 \ x20 \ x66 \ x07 \ x63 \ x36 \ x0e \ x3e \ x0d \ x26 \ x03 \ x10 \ x9f \ xd1 \ x80 \ xdf \ x8a \ x85 \ x83 \ x3f \ x80 \ xc1 \ x8a \ x8f \ x83 \ x5f \ x88 \ x8d \ x83 \ x41 \ x80 \ x41 \ x82 \ x21 \ x80 \ x21 \ x82 \ xd5 \ x4a \ x80 \ x83 \ x5f \ x89 \ x83 \ x8b \ xd1 \ x50 \ x88 \ xd1 \ x52 \ x42 \ x0b \ x28 \ x22 \ x6f \ x25 \ x04 \ x14 \ xe1 \ xe2 \ x62 \ x72 \ xf4 \ x15 \ x02 \ x62 \ x09 \ x1b \ xa0 \ x98 \ x90 \ x95 \ x28 \ x07 \ xbf \ x11 \ x2f \ x17 \ xa3 \ x81 \ x10 \ xb3 \ x81 \ x9e \ xa9 \ x14 \ xb3 \ xb9 \ x9e \ x29 \ x50 \ x98 \ x1f \ x6a \ x18 \ x93 \ x00 \ x93 \ x84 \ x1c \ xc8 \ x30 \ x87 \ x09 \ x7e \ x1e \ x0c \ x00 \ x08 \ xa8 \ x01 \ x10 \ x01 \ x18 \ x80 \ x80 \ x10 \ x22 \ x02 \ x00 \ x0c \ x28 \ x5d \ x30 \ x06 \ x82 \ xf4 \ x03 \ x03 \ x4f \ x52 \ x43 \ x18 ' , <nl> + ' \ x4f \ x52 \ x43 \ x11 \ x00 \ x00 \ x0a \ x06 \ x12 \ x04 \ x08 \ x01 \ x50 \ x00 \ x2b \ x00 \ x00 \ x0a \ x13 \ x0a \ x03 \ x00 \ x00 \ x00 \ x12 \ x0c \ x08 \ x01 \ x12 \ x06 \ x08 \ x00 \ x10 \ x00 \ x18 \ x00 \ x50 \ x00 \ x30 \ x00 \ x00 \ xe3 \ x12 \ xe7 \ x62 \ x65 \ x00 \ x01 \ x21 \ x3e \ x0e \ x46 \ x25 \ x0e \ x2e \ x46 \ x03 \ x21 \ x46 \ x03 \ x09 \ xa6 \ x00 \ x06 \ x00 \ x32 \ x00 \ x00 \ xe3 \ x92 \ xe4 \ x62 \ x65 \ x00 \ x01 \ x21 \ x01 \ x0e \ x46 \ x25 \ x2e \ x2e \ x26 \ x47 \ x5f \ x21 \ x20 \ x96 \ x60 \ x09 \ x60 \ x00 \ x00 \ x36 \ x00 \ x00 \ xe3 \ x92 \ xe1 \ x62 \ x65 \ x00 \ x01 \ x21 \ x61 \ x0e \ x46 \ x23 \ x5e \ x2e \ x46 \ x03 \ x21 \ x66 \ x03 \ x3d \ x53 \ x29 \ x10 \ x11 \ xc0 \ x00 \ x00 \ x2b \ x00 \ x00 \ x0a \ x13 \ x0a \ x03 \ x00 \ x00 \ x00 \ x12 \ x0c \ x08 \ x01 \ x12 \ x06 \ x08 \ x02 \ x10 \ x02 \ x18 \ x02 \ x50 \ x00 \ x05 \ x00 \ x00 \ xff \ x00 \ x03 \ x00 \ x00 \ x30 \ x07 \ x00 \ x00 \ x40 \ x00 \ x80 \ x05 \ x00 \ x00 \ x41 \ x4d \ x07 \ x00 \ x00 \ x42 \ x00 \ x80 \ x03 \ x00 \ x00 \ x0a \ x07 \ x00 \ x00 \ x42 \ x00 \ x80 \ x05 \ x00 \ x00 \ xff \ x01 \ x88 \ x00 \ x00 \ x4d \ xca \ xc1 \ x0a \ x80 \ x30 \ x0c \ x03 \ xd0 \ x2e \ x6b \ xcb \ x98 \ x17 \ xf1 \ x14 \ x50 \ xfc \ xff \ xcf \ xb4 \ x66 \ x1e \ x3c \ x84 \ x47 \ x9a \ xce \ x1c \ xb9 \ x1b \ xb7 \ xf9 \ xda \ x48 \ x09 \ x9e \ xb2 \ xf3 \ x92 \ xce \ x5b \ x86 \ xf6 \ x56 \ x7f \ x21 \ x41 \ x2f \ x51 \ xa6 \ x7a \ xd7 \ x1d \ xe5 \ xea \ xae \ x3d \ xca \ xd5 \ x83 \ x71 \ x60 \ xd8 \ x17 \ xfc \ x62 \ x0f \ xa8 \ x00 \ x00 \ xe3 \ x4a \ xe6 \ x62 \ xe1 \ x60 \ x0c \ x60 \ xe0 \ xe2 \ xe3 \ x60 \ x14 \ x62 \ xe3 \ x60 \ x10 \ x60 \ x90 \ x60 \ x08 \ x60 \ x88 \ x60 \ xe5 \ x12 \ xe0 \ x60 \ x54 \ xe2 \ xe0 \ x62 \ x34 \ x10 \ x62 \ x34 \ x90 \ x60 \ x02 \ x8a \ x70 \ x71 \ x09 \ x01 \ x45 \ xb8 \ xb8 \ x98 \ x1c \ x7d \ x85 \ x80 \ x58 \ x82 \ x05 \ x28 \ xc6 \ xcd \ x25 \ xca \ xc1 \ x68 \ xc4 \ x0b \ x52 \ xc5 \ x6c \ xa0 \ x67 \ x2a \ x05 \ x22 \ xc0 \ x4a \ x21 \ x86 \ x31 \ x09 \ x30 \ x81 \ xb5 \ xb2 \ x02 \ x00 \ x36 \ x01 \ x00 \ x25 \ x8c \ xbd \ x0a \ xc2 \ x30 \ x14 \ x85 \ x73 \ x6f \ x92 \ xf6 \ x92 \ x6a \ x09 \ x01 \ x21 \ x64 \ x92 \ x4e \ x75 \ x91 \ x58 \ x71 \ xc9 \ x64 \ x27 \ x5d \ x2c \ x1d \ x5d \ xfd \ x59 \ xc4 \ x42 \ x37 \ x5f \ xc0 \ x17 \ xe8 \ x23 \ x9b \ xc6 \ xe1 \ x3b \ x70 \ x0f \ xdf \ xb9 \ xc4 \ xf5 \ x17 \ x5d \ x41 \ x5c \ x4f \ x60 \ x37 \ xeb \ x53 \ x0d \ x55 \ x4d \ x0b \ x23 \ x01 \ xb9 \ x90 \ x2e \ xbf \ x0f \ xe3 \ xe3 \ xdd \ x8d \ x0e \ x5f \ x4f \ x27 \ x3e \ xb7 \ x61 \ x97 \ xb2 \ x49 \ xb9 \ xaf \ x90 \ x20 \ x92 \ x27 \ x32 \ x2a \ x6b \ xf4 \ xf3 \ x0d \ x1e \ x82 \ x20 \ xe8 \ x59 \ x28 \ x09 \ x4c \ x46 \ x4c \ x33 \ xcb \ x7a \ x76 \ x95 \ x41 \ x47 \ x9f \ x14 \ x78 \ x03 \ xde \ x62 \ x6c \ x54 \ x30 \ xb1 \ x51 \ x0a \ xdb \ x8b \ x89 \ x58 \ x11 \ xbb \ x22 \ xac \ x08 \ x9a \ xe5 \ x6c \ x71 \ xbf \ x3d \ xb8 \ x39 \ x92 \ xfa \ x7f \ x86 \ x1a \ xd3 \ x54 \ x1e \ xa7 \ xee \ xcc \ x7e \ x08 \ x9e \ x01 \ x10 \ x01 \ x18 \ x80 \ x80 \ x10 \ x22 \ x02 \ x00 \ x0c \ x28 \ x57 \ x30 \ x06 \ x82 \ xf4 \ x03 \ x03 \ x4f \ x52 \ x43 \ x18 ' , <nl> + # ' ' <nl> + # On empty message exception : IOError : File size too small , Stack trace ( when copying this message , always include the lines below ) : <nl> + # / src / Processors / Formats / Impl / ORCBlockInputFormat . cpp : 36 : DB : : ORCBlockInputFormat : : generate ( ) @ 0x1df282a6 in / usr / bin / clickhouse <nl> + # / src / Processors / ISource . cpp : 48 : DB : : ISource : : work ( ) @ 0x1dd79737 in / usr / bin / clickhouse <nl> + ] , <nl> + } , <nl> + ' CapnProto ' : { <nl> + ' data_sample ' : [ <nl> + ' \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 ' , <nl> + ' \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x02 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x03 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x07 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x09 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x0a \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x0b \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x0c \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x0d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x0e \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 ' , <nl> + ' \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x3f \ x01 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 ' , <nl> + # ' ' <nl> + # On empty message exception : Cannot read all data . Bytes read : 0 . Bytes expected : 4 . <nl> + # / src / IO / ReadBuffer . h : 157 : DB : : ReadBuffer : : readStrict ( char * , unsigned long ) @ 0x15c6894d in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / Impl / CapnProtoRowInputFormat . cpp : 212 : DB : : CapnProtoRowInputFormat : : readMessage ( ) @ 0x1ded1cab in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / Impl / CapnProtoRowInputFormat . cpp : 241 : DB : : CapnProtoRowInputFormat : : readRow ( std : : __1 : : vector < COW < DB : : IColumn > : : mutable_ptr < DB : : IColumn > , std : : __1 : : allocator < COW < DB : : IColumn > : : mutable_ptr < DB : : IColumn > > > & , DB : : RowReadExtension & ) @ 0x1ded205d in / usr / bin / clickhouse <nl> + ] , <nl> + ' extra_settings ' : " , kafka_schema = ' test : TestRecordStruct ' " <nl> + } , <nl> + <nl> + <nl> + # ' Parquet ' : { <nl> + # not working at all with Kafka : DB : : Exception : IOError : Invalid Parquet file size is 0 bytes <nl> + # / contrib / libcxx / include / exception : 129 : std : : exception : : capture ( ) @ 0x15c33fe8 in / usr / bin / clickhouse <nl> + # / contrib / libcxx / include / exception : 109 : std : : exception : : exception ( ) @ 0x15c33fb5 in / usr / bin / clickhouse <nl> + # / contrib / poco / Foundation / src / Exception . cpp : 27 : Poco : : Exception : : Exception ( std : : __1 : : basic_string < char , std : : __1 : : char_traits < char > , std : : __1 : : allocator < char > > const & , int ) @ 0x21877833 in / usr / bin / clickhouse <nl> + # / src / Common / Exception . cpp : 37 : DB : : Exception : : Exception ( std : : __1 : : basic_string < char , std : : __1 : : char_traits < char > , std : : __1 : : allocator < char > > const & , int ) @ 0x15c2d2a3 in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / Impl / ParquetBlockInputFormat . cpp : 70 : DB : : ParquetBlockInputFormat : : prepareReader ( ) @ 0x1df2b0c2 in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / Impl / ParquetBlockInputFormat . cpp : 36 : DB : : ParquetBlockInputFormat : : ParquetBlockInputFormat ( DB : : ReadBuffer & , DB : : Block ) @ 0x1df2af8b in / usr / bin / clickhouse <nl> + # / contrib / libcxx / include / memory : 2214 : std : : __1 : : __compressed_pair_elem < DB : : ParquetBlockInputFormat , 1 , false > : : __compressed_pair_elem < DB : : ReadBuffer & , DB : : Block const & , 0ul , 1ul > ( std : : __1 : : piecewise_construct_t , std : : __1 : : tuple < DB : : ReadBuffer & , DB : : Block const & > , std : : __1 : : __tuple_indices < 0ul , 1ul > ) @ 0x1df2dc88 in / usr / bin / clickhouse <nl> + # / contrib / libcxx / include / memory : 2299 : std : : __1 : : __compressed_pair < std : : __1 : : allocator < DB : : ParquetBlockInputFormat > , DB : : ParquetBlockInputFormat > : : __compressed_pair < std : : __1 : : allocator < DB : : ParquetBlockInputFormat > & , DB : : ReadBuffer & , DB : : Block const & > ( std : : __1 : : piecewise_construct_t , std : : __1 : : tuple < std : : __1 : : allocator < DB : : ParquetBlockInputFormat > & > , std : : __1 : : tuple < DB : : ReadBuffer & , DB : : Block const & > ) @ 0x1df2d9c8 in / usr / bin / clickhouse <nl> + # / contrib / libcxx / include / memory : 3569 : std : : __1 : : __shared_ptr_emplace < DB : : ParquetBlockInputFormat , std : : __1 : : allocator < DB : : ParquetBlockInputFormat > > : : __shared_ptr_emplace < DB : : ReadBuffer & , DB : : Block const & > ( std : : __1 : : allocator < DB : : ParquetBlockInputFormat > , DB : : ReadBuffer & , DB : : Block const & ) @ 0x1df2d687 in / usr / bin / clickhouse <nl> + # / contrib / libcxx / include / memory : 4400 : std : : __1 : : enable_if < ! ( is_array < DB : : ParquetBlockInputFormat > : : value ) , std : : __1 : : shared_ptr < DB : : ParquetBlockInputFormat > > : : type std : : __1 : : make_shared < DB : : ParquetBlockInputFormat , DB : : ReadBuffer & , DB : : Block const & > ( DB : : ReadBuffer & , DB : : Block const & ) @ 0x1df2d455 in / usr / bin / clickhouse <nl> + # / src / Processors / Formats / Impl / ParquetBlockInputFormat . cpp : 95 : DB : : registerInputFormatProcessorParquet ( DB : : FormatFactory & ) : : $ _0 : : operator ( ) ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) const @ 0x1df2cec7 in / usr / bin / clickhouse <nl> + # / contrib / libcxx / include / type_traits : 3519 : decltype ( std : : __1 : : forward < DB : : registerInputFormatProcessorParquet ( DB : : FormatFactory & ) : : $ _0 & > ( fp ) ( std : : __1 : : forward < DB : : ReadBuffer & > ( fp0 ) , std : : __1 : : forward < DB : : Block const & > ( fp0 ) , std : : __1 : : forward < DB : : RowInputFormatParams const & > ( fp0 ) , std : : __1 : : forward < DB : : FormatSettings const & > ( fp0 ) ) ) std : : __1 : : __invoke < DB : : registerInputFormatProcessorParquet ( DB : : FormatFactory & ) : : $ _0 & , DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & > ( DB : : registerInputFormatProcessorParquet ( DB : : FormatFactory & ) : : $ _0 & , DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) @ 0x1df2ce6a in / usr / bin / clickhouse <nl> + # / contrib / libcxx / include / __functional_base : 317 : std : : __1 : : shared_ptr < DB : : IInputFormat > std : : __1 : : __invoke_void_return_wrapper < std : : __1 : : shared_ptr < DB : : IInputFormat > > : : __call < DB : : registerInputFormatProcessorParquet ( DB : : FormatFactory & ) : : $ _0 & , DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & > ( DB : : registerInputFormatProcessorParquet ( DB : : FormatFactory & ) : : $ _0 & , DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) @ 0x1df2cd7d in / usr / bin / clickhouse <nl> + # / contrib / libcxx / include / functional : 1540 : std : : __1 : : __function : : __alloc_func < DB : : registerInputFormatProcessorParquet ( DB : : FormatFactory & ) : : $ _0 , std : : __1 : : allocator < DB : : registerInputFormatProcessorParquet ( DB : : FormatFactory & ) : : $ _0 > , std : : __1 : : shared_ptr < DB : : IInputFormat > ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) > : : operator ( ) ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) @ 0x1df2ccda in / usr / bin / clickhouse <nl> + # / contrib / libcxx / include / functional : 1714 : std : : __1 : : __function : : __func < DB : : registerInputFormatProcessorParquet ( DB : : FormatFactory & ) : : $ _0 , std : : __1 : : allocator < DB : : registerInputFormatProcessorParquet ( DB : : FormatFactory & ) : : $ _0 > , std : : __1 : : shared_ptr < DB : : IInputFormat > ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) > : : operator ( ) ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) @ 0x1df2bdec in / usr / bin / clickhouse <nl> + # / contrib / libcxx / include / functional : 1867 : std : : __1 : : __function : : __value_func < std : : __1 : : shared_ptr < DB : : IInputFormat > ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) > : : operator ( ) ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) const @ 0x1dd14dbd in / usr / bin / clickhouse <nl> + # / contrib / libcxx / include / functional : 2473 : std : : __1 : : function < std : : __1 : : shared_ptr < DB : : IInputFormat > ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) > : : operator ( ) ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) const @ 0x1dd07035 in / usr / bin / clickhouse <nl> + # / src / Formats / FormatFactory . cpp : 258 : DB : : FormatFactory : : getInputFormat ( std : : __1 : : basic_string < char , std : : __1 : : char_traits < char > , std : : __1 : : allocator < char > > const & , DB : : ReadBuffer & , DB : : Block const & , DB : : Context const & , unsigned long , std : : __1 : : function < void ( ) > ) const @ 0x1dd04007 in / usr / bin / clickhouse <nl> + # / src / Storages / Kafka / KafkaBlockInputStream . cpp : 76 : DB : : KafkaBlockInputStream : : readImpl ( ) @ 0x1d8f6559 in / usr / bin / clickhouse <nl> + # / src / DataStreams / IBlockInputStream . cpp : 60 : DB : : IBlockInputStream : : read ( ) @ 0x1c9c92fd in / usr / bin / clickhouse <nl> + # / src / DataStreams / copyData . cpp : 26 : void DB : : copyDataImpl < DB : : copyData ( DB : : IBlockInputStream & , DB : : IBlockOutputStream & , std : : __1 : : atomic < bool > * ) : : $ _0 & , void ( & ) ( DB : : Block const & ) > ( DB : : IBlockInputStream & , DB : : IBlockOutputStream & , DB : : copyData ( DB : : IBlockInputStream & , DB : : IBlockOutputStream & , std : : __1 : : atomic < bool > * ) : : $ _0 & , void ( & ) ( DB : : Block const & ) ) @ 0x1c9ea01c in / usr / bin / clickhouse <nl> + # / src / DataStreams / copyData . cpp : 63 : DB : : copyData ( DB : : IBlockInputStream & , DB : : IBlockOutputStream & , std : : __1 : : atomic < bool > * ) @ 0x1c9e9fc7 in / usr / bin / clickhouse <nl> + # / src / Storages / Kafka / StorageKafka . cpp : 565 : DB : : StorageKafka : : streamToViews ( ) @ 0x1d8cc3fa in / usr / bin / clickhouse <nl> + # # ' data_sample ' : [ <nl> + # # ' \ x50 \ x41 \ x52 \ x31 \ x15 \ x04 \ x15 \ x10 \ x15 \ x14 \ x4c \ x15 \ x02 \ x15 \ x04 \ x12 \ x00 \ x00 \ x08 \ x1c \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x15 \ x00 \ x15 \ x06 \ x15 \ x0a \ x2c \ x15 \ x02 \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x16 \ x00 \ x28 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x03 \ x08 \ x01 \ x02 \ x00 \ x26 \ xbc \ x01 \ x1c \ x15 \ x04 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x02 \ x69 \ x64 \ x15 \ x02 \ x16 \ x02 \ x16 \ xac \ x01 \ x16 \ xb4 \ x01 \ x26 \ x38 \ x26 \ x08 \ x1c \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x16 \ x00 \ x28 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x15 \ x04 \ x15 \ x08 \ x15 \ x0c \ x4c \ x15 \ x02 \ x15 \ x04 \ x12 \ x00 \ x00 \ x04 \ x0c \ x00 \ x00 \ x00 \ x00 \ x15 \ x00 \ x15 \ x06 \ x15 \ x0a \ x2c \ x15 \ x02 \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x36 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x00 \ x18 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x03 \ x08 \ x01 \ x02 \ x00 \ x26 \ xc8 \ x03 \ x1c \ x15 \ x02 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x15 \ x02 \ x16 \ x02 \ x16 \ x6c \ x16 \ x74 \ x26 \ xfc \ x02 \ x26 \ xd4 \ x02 \ x1c \ x36 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x00 \ x18 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x15 \ x04 \ x15 \ x0c \ x15 \ x10 \ x4c \ x15 \ x02 \ x15 \ x04 \ x12 \ x00 \ x00 \ x06 \ x14 \ x02 \ x00 \ x00 \ x00 \ x41 \ x4d \ x15 \ x00 \ x15 \ x06 \ x15 \ x0a \ x2c \ x15 \ x02 \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x36 \ x00 \ x28 \ x02 \ x41 \ x4d \ x18 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x03 \ x08 \ x01 \ x02 \ x00 \ x26 \ xa2 \ x05 \ x1c \ x15 \ x0c \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x31 \ x15 \ x02 \ x16 \ x02 \ x16 \ x68 \ x16 \ x70 \ x26 \ xde \ x04 \ x26 \ xb2 \ x04 \ x1c \ x36 \ x00 \ x28 \ x02 \ x41 \ x4d \ x18 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x15 \ x04 \ x15 \ x08 \ x15 \ x0c \ x4c \ x15 \ x02 \ x15 \ x04 \ x12 \ x00 \ x00 \ x04 \ x0c \ x00 \ x00 \ x00 \ x3f \ x15 \ x00 \ x15 \ x06 \ x15 \ x0a \ x2c \ x15 \ x02 \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x16 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x03 \ x08 \ x01 \ x02 \ x00 \ x26 \ x8a \ x07 \ x1c \ x15 \ x08 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x32 \ x15 \ x02 \ x16 \ x02 \ x16 \ x84 \ x01 \ x16 \ x8c \ x01 \ x26 \ xa6 \ x06 \ x26 \ xfe \ x05 \ x1c \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x16 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x15 \ x04 \ x15 \ x08 \ x15 \ x0c \ x4c \ x15 \ x02 \ x15 \ x04 \ x12 \ x00 \ x00 \ x04 \ x0c \ x01 \ x00 \ x00 \ x00 \ x15 \ x00 \ x15 \ x06 \ x15 \ x0a \ x2c \ x15 \ x02 \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x36 \ x00 \ x28 \ x04 \ x01 \ x00 \ x00 \ x00 \ x18 \ x04 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x03 \ x08 \ x01 \ x02 \ x00 \ x26 \ xfe \ x08 \ x1c \ x15 \ x02 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x33 \ x15 \ x02 \ x16 \ x02 \ x16 \ x6c \ x16 \ x74 \ x26 \ xb2 \ x08 \ x26 \ x8a \ x08 \ x1c \ x36 \ x00 \ x28 \ x04 \ x01 \ x00 \ x00 \ x00 \ x18 \ x04 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x15 \ x02 \ x19 \ x6c \ x35 \ x00 \ x18 \ x06 \ x73 \ x63 \ x68 \ x65 \ x6d \ x61 \ x15 \ x0a \ x00 \ x15 \ x04 \ x25 \ x00 \ x18 \ x02 \ x69 \ x64 \ x00 \ x15 \ x02 \ x25 \ x00 \ x18 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x25 \ x18 \ x4c \ xac \ x13 \ x10 \ x12 \ x00 \ x00 \ x00 \ x15 \ x0c \ x25 \ x00 \ x18 \ x04 \ x76 \ x61 \ x6c \ x31 \ x25 \ x00 \ x4c \ x1c \ x00 \ x00 \ x00 \ x15 \ x08 \ x25 \ x00 \ x18 \ x04 \ x76 \ x61 \ x6c \ x32 \ x00 \ x15 \ x02 \ x25 \ x00 \ x18 \ x04 \ x76 \ x61 \ x6c \ x33 \ x25 \ x16 \ x4c \ xac \ x13 \ x08 \ x12 \ x00 \ x00 \ x00 \ x16 \ x02 \ x19 \ x1c \ x19 \ x5c \ x26 \ xbc \ x01 \ x1c \ x15 \ x04 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x02 \ x69 \ x64 \ x15 \ x02 \ x16 \ x02 \ x16 \ xac \ x01 \ x16 \ xb4 \ x01 \ x26 \ x38 \ x26 \ x08 \ x1c \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x16 \ x00 \ x28 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x26 \ xc8 \ x03 \ x1c \ x15 \ x02 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x15 \ x02 \ x16 \ x02 \ x16 \ x6c \ x16 \ x74 \ x26 \ xfc \ x02 \ x26 \ xd4 \ x02 \ x1c \ x36 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x00 \ x18 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x26 \ xa2 \ x05 \ x1c \ x15 \ x0c \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x31 \ x15 \ x02 \ x16 \ x02 \ x16 \ x68 \ x16 \ x70 \ x26 \ xde \ x04 \ x26 \ xb2 \ x04 \ x1c \ x36 \ x00 \ x28 \ x02 \ x41 \ x4d \ x18 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x26 \ x8a \ x07 \ x1c \ x15 \ x08 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x32 \ x15 \ x02 \ x16 \ x02 \ x16 \ x84 \ x01 \ x16 \ x8c \ x01 \ x26 \ xa6 \ x06 \ x26 \ xfe \ x05 \ x1c \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x16 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x26 \ xfe \ x08 \ x1c \ x15 \ x02 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x33 \ x15 \ x02 \ x16 \ x02 \ x16 \ x6c \ x16 \ x74 \ x26 \ xb2 \ x08 \ x26 \ x8a \ x08 \ x1c \ x36 \ x00 \ x28 \ x04 \ x01 \ x00 \ x00 \ x00 \ x18 \ x04 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x16 \ x98 \ x05 \ x16 \ x02 \ x00 \ x28 \ x22 \ x70 \ x61 \ x72 \ x71 \ x75 \ x65 \ x74 \ x2d \ x63 \ x70 \ x70 \ x20 \ x76 \ x65 \ x72 \ x73 \ x69 \ x6f \ x6e \ x20 \ x31 \ x2e \ x35 \ x2e \ x31 \ x2d \ x53 \ x4e \ x41 \ x50 \ x53 \ x48 \ x4f \ x54 \ x19 \ x5c \ x1c \ x00 \ x00 \ x1c \ x00 \ x00 \ x1c \ x00 \ x00 \ x1c \ x00 \ x00 \ x1c \ x00 \ x00 \ x00 \ xc4 \ x01 \ x00 \ x00 \ x50 \ x41 \ x52 \ x31 ' , <nl> + # # ' \ x50 \ x41 \ x52 \ x31 \ x15 \ x04 \ x15 \ xf0 \ x01 \ x15 \ x90 \ x01 \ x4c \ x15 \ x1e \ x15 \ x04 \ x12 \ x00 \ x00 \ x78 \ x04 \ x01 \ x00 \ x09 \ x01 \ x00 \ x02 \ x09 \ x07 \ x04 \ x00 \ x03 \ x0d \ x08 \ x00 \ x04 \ x0d \ x08 \ x00 \ x05 \ x0d \ x08 \ x00 \ x06 \ x0d \ x08 \ x00 \ x07 \ x0d \ x08 \ x00 \ x08 \ x0d \ x08 \ x00 \ x09 \ x0d \ x08 \ x00 \ x0a \ x0d \ x08 \ x00 \ x0b \ x0d \ x08 \ x00 \ x0c \ x0d \ x08 \ x00 \ x0d \ x0d \ x08 \ x3c \ x0e \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x15 \ x00 \ x15 \ x14 \ x15 \ x18 \ x2c \ x15 \ x1e \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x18 \ x08 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x16 \ x00 \ x28 \ x08 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x24 \ x04 \ x05 \ x10 \ x32 \ x54 \ x76 \ x98 \ xba \ xdc \ x0e \ x26 \ xca \ x02 \ x1c \ x15 \ x04 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x02 \ x69 \ x64 \ x15 \ x02 \ x16 \ x1e \ x16 \ x9e \ x03 \ x16 \ xc2 \ x02 \ x26 \ xb8 \ x01 \ x26 \ x08 \ x1c \ x18 \ x08 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x16 \ x00 \ x28 \ x08 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x15 \ x04 \ x15 \ x08 \ x15 \ x0c \ x4c \ x15 \ x02 \ x15 \ x04 \ x12 \ x00 \ x00 \ x04 \ x0c \ x00 \ x00 \ x00 \ x00 \ x15 \ x00 \ x15 \ x06 \ x15 \ x0a \ x2c \ x15 \ x1e \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x36 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x00 \ x18 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x03 \ x08 \ x01 \ x1e \ x00 \ x26 \ xd8 \ x04 \ x1c \ x15 \ x02 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x15 \ x02 \ x16 \ x1e \ x16 \ x6c \ x16 \ x74 \ x26 \ x8c \ x04 \ x26 \ xe4 \ x03 \ x1c \ x36 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x00 \ x18 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x15 \ x04 \ x15 \ x0c \ x15 \ x10 \ x4c \ x15 \ x02 \ x15 \ x04 \ x12 \ x00 \ x00 \ x06 \ x14 \ x02 \ x00 \ x00 \ x00 \ x41 \ x4d \ x15 \ x00 \ x15 \ x06 \ x15 \ x0a \ x2c \ x15 \ x1e \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x36 \ x00 \ x28 \ x02 \ x41 \ x4d \ x18 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x03 \ x08 \ x01 \ x1e \ x00 \ x26 \ xb2 \ x06 \ x1c \ x15 \ x0c \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x31 \ x15 \ x02 \ x16 \ x1e \ x16 \ x68 \ x16 \ x70 \ x26 \ xee \ x05 \ x26 \ xc2 \ x05 \ x1c \ x36 \ x00 \ x28 \ x02 \ x41 \ x4d \ x18 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x15 \ x04 \ x15 \ x08 \ x15 \ x0c \ x4c \ x15 \ x02 \ x15 \ x04 \ x12 \ x00 \ x00 \ x04 \ x0c \ x00 \ x00 \ x00 \ x3f \ x15 \ x00 \ x15 \ x06 \ x15 \ x0a \ x2c \ x15 \ x1e \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x16 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x03 \ x08 \ x01 \ x1e \ x00 \ x26 \ x9a \ x08 \ x1c \ x15 \ x08 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x32 \ x15 \ x02 \ x16 \ x1e \ x16 \ x84 \ x01 \ x16 \ x8c \ x01 \ x26 \ xb6 \ x07 \ x26 \ x8e \ x07 \ x1c \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x16 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x15 \ x04 \ x15 \ x08 \ x15 \ x0c \ x4c \ x15 \ x02 \ x15 \ x04 \ x12 \ x00 \ x00 \ x04 \ x0c \ x01 \ x00 \ x00 \ x00 \ x15 \ x00 \ x15 \ x06 \ x15 \ x0a \ x2c \ x15 \ x1e \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x36 \ x00 \ x28 \ x04 \ x01 \ x00 \ x00 \ x00 \ x18 \ x04 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x03 \ x08 \ x01 \ x1e \ x00 \ x26 \ x8e \ x0a \ x1c \ x15 \ x02 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x33 \ x15 \ x02 \ x16 \ x1e \ x16 \ x6c \ x16 \ x74 \ x26 \ xc2 \ x09 \ x26 \ x9a \ x09 \ x1c \ x36 \ x00 \ x28 \ x04 \ x01 \ x00 \ x00 \ x00 \ x18 \ x04 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x15 \ x02 \ x19 \ x6c \ x35 \ x00 \ x18 \ x06 \ x73 \ x63 \ x68 \ x65 \ x6d \ x61 \ x15 \ x0a \ x00 \ x15 \ x04 \ x25 \ x00 \ x18 \ x02 \ x69 \ x64 \ x00 \ x15 \ x02 \ x25 \ x00 \ x18 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x25 \ x18 \ x4c \ xac \ x13 \ x10 \ x12 \ x00 \ x00 \ x00 \ x15 \ x0c \ x25 \ x00 \ x18 \ x04 \ x76 \ x61 \ x6c \ x31 \ x25 \ x00 \ x4c \ x1c \ x00 \ x00 \ x00 \ x15 \ x08 \ x25 \ x00 \ x18 \ x04 \ x76 \ x61 \ x6c \ x32 \ x00 \ x15 \ x02 \ x25 \ x00 \ x18 \ x04 \ x76 \ x61 \ x6c \ x33 \ x25 \ x16 \ x4c \ xac \ x13 \ x08 \ x12 \ x00 \ x00 \ x00 \ x16 \ x1e \ x19 \ x1c \ x19 \ x5c \ x26 \ xca \ x02 \ x1c \ x15 \ x04 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x02 \ x69 \ x64 \ x15 \ x02 \ x16 \ x1e \ x16 \ x9e \ x03 \ x16 \ xc2 \ x02 \ x26 \ xb8 \ x01 \ x26 \ x08 \ x1c \ x18 \ x08 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x16 \ x00 \ x28 \ x08 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x26 \ xd8 \ x04 \ x1c \ x15 \ x02 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x15 \ x02 \ x16 \ x1e \ x16 \ x6c \ x16 \ x74 \ x26 \ x8c \ x04 \ x26 \ xe4 \ x03 \ x1c \ x36 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x00 \ x18 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x26 \ xb2 \ x06 \ x1c \ x15 \ x0c \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x31 \ x15 \ x02 \ x16 \ x1e \ x16 \ x68 \ x16 \ x70 \ x26 \ xee \ x05 \ x26 \ xc2 \ x05 \ x1c \ x36 \ x00 \ x28 \ x02 \ x41 \ x4d \ x18 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x26 \ x9a \ x08 \ x1c \ x15 \ x08 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x32 \ x15 \ x02 \ x16 \ x1e \ x16 \ x84 \ x01 \ x16 \ x8c \ x01 \ x26 \ xb6 \ x07 \ x26 \ x8e \ x07 \ x1c \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x16 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x26 \ x8e \ x0a \ x1c \ x15 \ x02 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x33 \ x15 \ x02 \ x16 \ x1e \ x16 \ x6c \ x16 \ x74 \ x26 \ xc2 \ x09 \ x26 \ x9a \ x09 \ x1c \ x36 \ x00 \ x28 \ x04 \ x01 \ x00 \ x00 \ x00 \ x18 \ x04 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x16 \ xa6 \ x06 \ x16 \ x1e \ x00 \ x28 \ x22 \ x70 \ x61 \ x72 \ x71 \ x75 \ x65 \ x74 \ x2d \ x63 \ x70 \ x70 \ x20 \ x76 \ x65 \ x72 \ x73 \ x69 \ x6f \ x6e \ x20 \ x31 \ x2e \ x35 \ x2e \ x31 \ x2d \ x53 \ x4e \ x41 \ x50 \ x53 \ x48 \ x4f \ x54 \ x19 \ x5c \ x1c \ x00 \ x00 \ x1c \ x00 \ x00 \ x1c \ x00 \ x00 \ x1c \ x00 \ x00 \ x1c \ x00 \ x00 \ x00 \ xc5 \ x01 \ x00 \ x00 \ x50 \ x41 \ x52 \ x31 ' , <nl> + # # ' \ x50 \ x41 \ x52 \ x31 \ x15 \ x04 \ x15 \ x10 \ x15 \ x14 \ x4c \ x15 \ x02 \ x15 \ x04 \ x12 \ x00 \ x00 \ x08 \ x1c \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x15 \ x00 \ x15 \ x06 \ x15 \ x0a \ x2c \ x15 \ x02 \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x16 \ x00 \ x28 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x03 \ x08 \ x01 \ x02 \ x00 \ x26 \ xbc \ x01 \ x1c \ x15 \ x04 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x02 \ x69 \ x64 \ x15 \ x02 \ x16 \ x02 \ x16 \ xac \ x01 \ x16 \ xb4 \ x01 \ x26 \ x38 \ x26 \ x08 \ x1c \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x16 \ x00 \ x28 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x15 \ x04 \ x15 \ x08 \ x15 \ x0c \ x4c \ x15 \ x02 \ x15 \ x04 \ x12 \ x00 \ x00 \ x04 \ x0c \ x00 \ x00 \ x00 \ x00 \ x15 \ x00 \ x15 \ x06 \ x15 \ x0a \ x2c \ x15 \ x02 \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x36 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x00 \ x18 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x03 \ x08 \ x01 \ x02 \ x00 \ x26 \ xc8 \ x03 \ x1c \ x15 \ x02 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x15 \ x02 \ x16 \ x02 \ x16 \ x6c \ x16 \ x74 \ x26 \ xfc \ x02 \ x26 \ xd4 \ x02 \ x1c \ x36 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x00 \ x18 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x15 \ x04 \ x15 \ x0c \ x15 \ x10 \ x4c \ x15 \ x02 \ x15 \ x04 \ x12 \ x00 \ x00 \ x06 \ x14 \ x02 \ x00 \ x00 \ x00 \ x41 \ x4d \ x15 \ x00 \ x15 \ x06 \ x15 \ x0a \ x2c \ x15 \ x02 \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x36 \ x00 \ x28 \ x02 \ x41 \ x4d \ x18 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x03 \ x08 \ x01 \ x02 \ x00 \ x26 \ xa2 \ x05 \ x1c \ x15 \ x0c \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x31 \ x15 \ x02 \ x16 \ x02 \ x16 \ x68 \ x16 \ x70 \ x26 \ xde \ x04 \ x26 \ xb2 \ x04 \ x1c \ x36 \ x00 \ x28 \ x02 \ x41 \ x4d \ x18 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x15 \ x04 \ x15 \ x08 \ x15 \ x0c \ x4c \ x15 \ x02 \ x15 \ x04 \ x12 \ x00 \ x00 \ x04 \ x0c \ x00 \ x00 \ x00 \ x3f \ x15 \ x00 \ x15 \ x06 \ x15 \ x0a \ x2c \ x15 \ x02 \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x16 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x03 \ x08 \ x01 \ x02 \ x00 \ x26 \ x8a \ x07 \ x1c \ x15 \ x08 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x32 \ x15 \ x02 \ x16 \ x02 \ x16 \ x84 \ x01 \ x16 \ x8c \ x01 \ x26 \ xa6 \ x06 \ x26 \ xfe \ x05 \ x1c \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x16 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x15 \ x04 \ x15 \ x08 \ x15 \ x0c \ x4c \ x15 \ x02 \ x15 \ x04 \ x12 \ x00 \ x00 \ x04 \ x0c \ x01 \ x00 \ x00 \ x00 \ x15 \ x00 \ x15 \ x06 \ x15 \ x0a \ x2c \ x15 \ x02 \ x15 \ x04 \ x15 \ x06 \ x15 \ x06 \ x1c \ x36 \ x00 \ x28 \ x04 \ x01 \ x00 \ x00 \ x00 \ x18 \ x04 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x03 \ x08 \ x01 \ x02 \ x00 \ x26 \ xfe \ x08 \ x1c \ x15 \ x02 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x33 \ x15 \ x02 \ x16 \ x02 \ x16 \ x6c \ x16 \ x74 \ x26 \ xb2 \ x08 \ x26 \ x8a \ x08 \ x1c \ x36 \ x00 \ x28 \ x04 \ x01 \ x00 \ x00 \ x00 \ x18 \ x04 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x15 \ x02 \ x19 \ x6c \ x35 \ x00 \ x18 \ x06 \ x73 \ x63 \ x68 \ x65 \ x6d \ x61 \ x15 \ x0a \ x00 \ x15 \ x04 \ x25 \ x00 \ x18 \ x02 \ x69 \ x64 \ x00 \ x15 \ x02 \ x25 \ x00 \ x18 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x25 \ x18 \ x4c \ xac \ x13 \ x10 \ x12 \ x00 \ x00 \ x00 \ x15 \ x0c \ x25 \ x00 \ x18 \ x04 \ x76 \ x61 \ x6c \ x31 \ x25 \ x00 \ x4c \ x1c \ x00 \ x00 \ x00 \ x15 \ x08 \ x25 \ x00 \ x18 \ x04 \ x76 \ x61 \ x6c \ x32 \ x00 \ x15 \ x02 \ x25 \ x00 \ x18 \ x04 \ x76 \ x61 \ x6c \ x33 \ x25 \ x16 \ x4c \ xac \ x13 \ x08 \ x12 \ x00 \ x00 \ x00 \ x16 \ x02 \ x19 \ x1c \ x19 \ x5c \ x26 \ xbc \ x01 \ x1c \ x15 \ x04 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x02 \ x69 \ x64 \ x15 \ x02 \ x16 \ x02 \ x16 \ xac \ x01 \ x16 \ xb4 \ x01 \ x26 \ x38 \ x26 \ x08 \ x1c \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x16 \ x00 \ x28 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x26 \ xc8 \ x03 \ x1c \ x15 \ x02 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x07 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x15 \ x02 \ x16 \ x02 \ x16 \ x6c \ x16 \ x74 \ x26 \ xfc \ x02 \ x26 \ xd4 \ x02 \ x1c \ x36 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x00 \ x18 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x26 \ xa2 \ x05 \ x1c \ x15 \ x0c \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x31 \ x15 \ x02 \ x16 \ x02 \ x16 \ x68 \ x16 \ x70 \ x26 \ xde \ x04 \ x26 \ xb2 \ x04 \ x1c \ x36 \ x00 \ x28 \ x02 \ x41 \ x4d \ x18 \ x02 \ x41 \ x4d \ x00 \ x00 \ x00 \ x26 \ x8a \ x07 \ x1c \ x15 \ x08 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x32 \ x15 \ x02 \ x16 \ x02 \ x16 \ x84 \ x01 \ x16 \ x8c \ x01 \ x26 \ xa6 \ x06 \ x26 \ xfe \ x05 \ x1c \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x16 \ x00 \ x28 \ x04 \ x00 \ x00 \ x00 \ x3f \ x18 \ x04 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x26 \ xfe \ x08 \ x1c \ x15 \ x02 \ x19 \ x35 \ x04 \ x00 \ x06 \ x19 \ x18 \ x04 \ x76 \ x61 \ x6c \ x33 \ x15 \ x02 \ x16 \ x02 \ x16 \ x6c \ x16 \ x74 \ x26 \ xb2 \ x08 \ x26 \ x8a \ x08 \ x1c \ x36 \ x00 \ x28 \ x04 \ x01 \ x00 \ x00 \ x00 \ x18 \ x04 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x16 \ x98 \ x05 \ x16 \ x02 \ x00 \ x28 \ x22 \ x70 \ x61 \ x72 \ x71 \ x75 \ x65 \ x74 \ x2d \ x63 \ x70 \ x70 \ x20 \ x76 \ x65 \ x72 \ x73 \ x69 \ x6f \ x6e \ x20 \ x31 \ x2e \ x35 \ x2e \ x31 \ x2d \ x53 \ x4e \ x41 \ x50 \ x53 \ x48 \ x4f \ x54 \ x19 \ x5c \ x1c \ x00 \ x00 \ x1c \ x00 \ x00 \ x1c \ x00 \ x00 \ x1c \ x00 \ x00 \ x1c \ x00 \ x00 \ x00 \ xc4 \ x01 \ x00 \ x00 \ x50 \ x41 \ x52 \ x31 ' , <nl> + # # ' ' <nl> + # # ] , <nl> + # } , <nl> + # ' Avro ' : { <nl> + # # TODO : Not working at all : avro : : Exception , e . what ( ) = EOF reached <nl> + # # . / contrib / libcxx / src / support / runtime / stdexcept_default . ipp : 33 : std : : runtime_error : : runtime_error ( std : : __1 : : basic_string < char , std : : __1 : : char_traits < char > , std : : __1 : : allocator < char > > const & ) @ 0x22ce2080 in / usr / bin / clickhouse <nl> + # # . / contrib / avro / lang / c + + / api / Exception . hh : 36 : avro : : Exception : : Exception ( std : : __1 : : basic_string < char , std : : __1 : : char_traits < char > , std : : __1 : : allocator < char > > const & ) @ 0x1de48a6e in / usr / bin / clickhouse <nl> + # # . / contrib / avro / lang / c + + / api / Stream . hh : 336 : avro : : StreamReader : : more ( ) @ 0x22717f56 in / usr / bin / clickhouse <nl> + # # . / contrib / avro / lang / c + + / api / Stream . hh : 0 : avro : : StreamReader : : readBytes ( unsigned char * , unsigned long ) @ 0x22717d22 in / usr / bin / clickhouse <nl> + # # . / contrib / avro / lang / c + + / impl / BinaryDecoder . cc : 170 : avro : : BinaryDecoder : : decodeFixed ( unsigned long , std : : __1 : : vector < unsigned char , std : : __1 : : allocator < unsigned char > > & ) @ 0x227177cb in / usr / bin / clickhouse <nl> + # # . / contrib / avro / lang / c + + / api / Specific . hh : 216 : avro : : codec_traits < std : : __1 : : array < unsigned char , 4ul > > : : decode ( avro : : Decoder & , std : : __1 : : array < unsigned char , 4ul > & ) @ 0x22743624 in / usr / bin / clickhouse <nl> + # # . / contrib / avro / lang / c + + / api / Specific . hh : 342 : void avro : : decode < std : : __1 : : array < unsigned char , 4ul > > ( avro : : Decoder & , std : : __1 : : array < unsigned char , 4ul > & ) @ 0x2272970d in / usr / bin / clickhouse <nl> + # # . / contrib / avro / lang / c + + / impl / DataFile . cc : 487 : avro : : DataFileReaderBase : : readHeader ( ) @ 0x2272608d in / usr / bin / clickhouse <nl> + # # . / contrib / avro / lang / c + + / impl / DataFile . cc : 280 : avro : : DataFileReaderBase : : DataFileReaderBase ( std : : __1 : : unique_ptr < avro : : InputStream , std : : __1 : : default_delete < avro : : InputStream > > ) @ 0x22726923 in / usr / bin / clickhouse <nl> + # # . / src / Processors / Formats / Impl / AvroRowInputFormat . cpp : 571 : DB : : AvroRowInputFormat : : AvroRowInputFormat ( DB : : Block const & , DB : : ReadBuffer & , DB : : RowInputFormatParams ) @ 0x1de19c9b in / usr / bin / clickhouse <nl> + # ' data_sample ' : [ <nl> + # # ' \ x4f \ x62 \ x6a \ x01 \ x04 \ x14 \ x61 \ x76 \ x72 \ x6f \ x2e \ x63 \ x6f \ x64 \ x65 \ x63 \ x0c \ x73 \ x6e \ x61 \ x70 \ x70 \ x79 \ x16 \ x61 \ x76 \ x72 \ x6f \ x2e \ x73 \ x63 \ x68 \ x65 \ x6d \ x61 \ x80 \ x03 \ x7b \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x72 \ x65 \ x63 \ x6f \ x72 \ x64 \ x22 \ x2c \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x72 \ x6f \ x77 \ x22 \ x2c \ x22 \ x66 \ x69 \ x65 \ x6c \ x64 \ x73 \ x22 \ x3a \ x5b \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x69 \ x64 \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x6c \ x6f \ x6e \ x67 \ x22 \ x7d \ x2c \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x69 \ x6e \ x74 \ x22 \ x7d \ x2c \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x76 \ x61 \ x6c \ x31 \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x62 \ x79 \ x74 \ x65 \ x73 \ x22 \ x7d \ x2c \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x76 \ x61 \ x6c \ x32 \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x66 \ x6c \ x6f \ x61 \ x74 \ x22 \ x7d \ x2c \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x76 \ x61 \ x6c \ x33 \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x69 \ x6e \ x74 \ x22 \ x7d \ x5d \ x7d \ x00 \ x73 \ x6e \ x66 \ xa3 \ x62 \ x9f \ x88 \ xed \ x28 \ x08 \ x67 \ xf0 \ x75 \ xaf \ x23 \ x83 \ x02 \ x20 \ x0a \ x24 \ x00 \ x00 \ x04 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x02 \ x80 \ xaa \ x4a \ xe3 \ x73 \ x6e \ x66 \ xa3 \ x62 \ x9f \ x88 \ xed \ x28 \ x08 \ x67 \ xf0 \ x75 \ xaf \ x23 \ x83 ' , <nl> + # # ' \ x4f \ x62 \ x6a \ x01 \ x04 \ x14 \ x61 \ x76 \ x72 \ x6f \ x2e \ x63 \ x6f \ x64 \ x65 \ x63 \ x0c \ x73 \ x6e \ x61 \ x70 \ x70 \ x79 \ x16 \ x61 \ x76 \ x72 \ x6f \ x2e \ x73 \ x63 \ x68 \ x65 \ x6d \ x61 \ x80 \ x03 \ x7b \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x72 \ x65 \ x63 \ x6f \ x72 \ x64 \ x22 \ x2c \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x72 \ x6f \ x77 \ x22 \ x2c \ x22 \ x66 \ x69 \ x65 \ x6c \ x64 \ x73 \ x22 \ x3a \ x5b \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x69 \ x64 \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x6c \ x6f \ x6e \ x67 \ x22 \ x7d \ x2c \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x69 \ x6e \ x74 \ x22 \ x7d \ x2c \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x76 \ x61 \ x6c \ x31 \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x62 \ x79 \ x74 \ x65 \ x73 \ x22 \ x7d \ x2c \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x76 \ x61 \ x6c \ x32 \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x66 \ x6c \ x6f \ x61 \ x74 \ x22 \ x7d \ x2c \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x76 \ x61 \ x6c \ x33 \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x69 \ x6e \ x74 \ x22 \ x7d \ x5d \ x7d \ x00 \ x73 \ x6e \ x66 \ xa3 \ x62 \ x9f \ x88 \ xed \ x28 \ x08 \ x67 \ xf0 \ x75 \ xaf \ x23 \ x83 \ x1e \ x9e \ x01 \ x96 \ x01 \ x28 \ x02 \ x00 \ x04 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x02 \ x04 \ x15 \ x0a \ x00 \ x06 \ x15 \ x0a \ x00 \ x08 \ x15 \ x0a \ x00 \ x0a \ x15 \ x0a \ x00 \ x0c \ x15 \ x0a \ x00 \ x0e \ x15 \ x0a \ x00 \ x10 \ x15 \ x0a \ x00 \ x12 \ x15 \ x0a \ x00 \ x14 \ x15 \ x0a \ x00 \ x16 \ x15 \ x0a \ x00 \ x18 \ x15 \ x0a \ x00 \ x1a \ x15 \ x0a \ x00 \ x1c \ x15 \ x0a \ x24 \ x1e \ x00 \ x04 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x02 \ x49 \ x73 \ x4d \ xca \ x73 \ x6e \ x66 \ xa3 \ x62 \ x9f \ x88 \ xed \ x28 \ x08 \ x67 \ xf0 \ x75 \ xaf \ x23 \ x83 ' , <nl> + # # ' \ x4f \ x62 \ x6a \ x01 \ x04 \ x14 \ x61 \ x76 \ x72 \ x6f \ x2e \ x63 \ x6f \ x64 \ x65 \ x63 \ x0c \ x73 \ x6e \ x61 \ x70 \ x70 \ x79 \ x16 \ x61 \ x76 \ x72 \ x6f \ x2e \ x73 \ x63 \ x68 \ x65 \ x6d \ x61 \ x80 \ x03 \ x7b \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x72 \ x65 \ x63 \ x6f \ x72 \ x64 \ x22 \ x2c \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x72 \ x6f \ x77 \ x22 \ x2c \ x22 \ x66 \ x69 \ x65 \ x6c \ x64 \ x73 \ x22 \ x3a \ x5b \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x69 \ x64 \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x6c \ x6f \ x6e \ x67 \ x22 \ x7d \ x2c \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x69 \ x6e \ x74 \ x22 \ x7d \ x2c \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x76 \ x61 \ x6c \ x31 \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x62 \ x79 \ x74 \ x65 \ x73 \ x22 \ x7d \ x2c \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x76 \ x61 \ x6c \ x32 \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x66 \ x6c \ x6f \ x61 \ x74 \ x22 \ x7d \ x2c \ x7b \ x22 \ x6e \ x61 \ x6d \ x65 \ x22 \ x3a \ x22 \ x76 \ x61 \ x6c \ x33 \ x22 \ x2c \ x22 \ x74 \ x79 \ x70 \ x65 \ x22 \ x3a \ x22 \ x69 \ x6e \ x74 \ x22 \ x7d \ x5d \ x7d \ x00 \ x73 \ x6e \ x66 \ xa3 \ x62 \ x9f \ x88 \ xed \ x28 \ x08 \ x67 \ xf0 \ x75 \ xaf \ x23 \ x83 \ x02 \ x20 \ x0a \ x24 \ x00 \ x00 \ x04 \ x41 \ x4d \ x00 \ x00 \ x00 \ x3f \ x02 \ x80 \ xaa \ x4a \ xe3 \ x73 \ x6e \ x66 \ xa3 \ x62 \ x9f \ x88 \ xed \ x28 \ x08 \ x67 \ xf0 \ x75 \ xaf \ x23 \ x83 ' , <nl> + # # ' ' <nl> + # ] , <nl> + # } , <nl> + # TODO : test for AvroConfluence <nl> + # ' Arrow ' : { <nl> + # # Not working at all : DB : : Exception : Error while opening a table : Invalid : File is too small : 0 , Stack trace ( when copying this message , always include the lines below ) : <nl> + # # / src / Common / Exception . cpp : 37 : DB : : Exception : : Exception ( std : : __1 : : basic_string < char , std : : __1 : : char_traits < char > , std : : __1 : : allocator < char > > const & , int ) @ 0x15c2d2a3 in / usr / bin / clickhouse <nl> + # # / src / Processors / Formats / Impl / ArrowBlockInputFormat . cpp : 88 : DB : : ArrowBlockInputFormat : : prepareReader ( ) @ 0x1ddff1c3 in / usr / bin / clickhouse <nl> + # # / src / Processors / Formats / Impl / ArrowBlockInputFormat . cpp : 26 : DB : : ArrowBlockInputFormat : : ArrowBlockInputFormat ( DB : : ReadBuffer & , DB : : Block const & , bool ) @ 0x1ddfef63 in / usr / bin / clickhouse <nl> + # # / contrib / libcxx / include / memory : 2214 : std : : __1 : : __compressed_pair_elem < DB : : ArrowBlockInputFormat , 1 , false > : : __compressed_pair_elem < DB : : ReadBuffer & , DB : : Block const & , bool & & , 0ul , 1ul , 2ul > ( std : : __1 : : piecewise_construct_t , std : : __1 : : tuple < DB : : ReadBuffer & , DB : : Block const & , bool & & > , std : : __1 : : __tuple_indices < 0ul , 1ul , 2ul > ) @ 0x1de0470f in / usr / bin / clickhouse <nl> + # # / contrib / libcxx / include / memory : 2299 : std : : __1 : : __compressed_pair < std : : __1 : : allocator < DB : : ArrowBlockInputFormat > , DB : : ArrowBlockInputFormat > : : __compressed_pair < std : : __1 : : allocator < DB : : ArrowBlockInputFormat > & , DB : : ReadBuffer & , DB : : Block const & , bool & & > ( std : : __1 : : piecewise_construct_t , std : : __1 : : tuple < std : : __1 : : allocator < DB : : ArrowBlockInputFormat > & > , std : : __1 : : tuple < DB : : ReadBuffer & , DB : : Block const & , bool & & > ) @ 0x1de04375 in / usr / bin / clickhouse <nl> + # # / contrib / libcxx / include / memory : 3569 : std : : __1 : : __shared_ptr_emplace < DB : : ArrowBlockInputFormat , std : : __1 : : allocator < DB : : ArrowBlockInputFormat > > : : __shared_ptr_emplace < DB : : ReadBuffer & , DB : : Block const & , bool > ( std : : __1 : : allocator < DB : : ArrowBlockInputFormat > , DB : : ReadBuffer & , DB : : Block const & , bool & & ) @ 0x1de03f97 in / usr / bin / clickhouse <nl> + # # / contrib / libcxx / include / memory : 4400 : std : : __1 : : enable_if < ! ( is_array < DB : : ArrowBlockInputFormat > : : value ) , std : : __1 : : shared_ptr < DB : : ArrowBlockInputFormat > > : : type std : : __1 : : make_shared < DB : : ArrowBlockInputFormat , DB : : ReadBuffer & , DB : : Block const & , bool > ( DB : : ReadBuffer & , DB : : Block const & , bool & & ) @ 0x1de03d4c in / usr / bin / clickhouse <nl> + # # / src / Processors / Formats / Impl / ArrowBlockInputFormat . cpp : 107 : DB : : registerInputFormatProcessorArrow ( DB : : FormatFactory & ) : : $ _0 : : operator ( ) ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) const @ 0x1de010df in / usr / bin / clickhouse <nl> + # ' data_sample ' : [ <nl> + # ' \ x41 \ x52 \ x52 \ x4f \ x57 \ x31 \ x00 \ x00 \ xff \ xff \ xff \ xff \ x48 \ x01 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x0c \ x00 \ x06 \ x00 \ x05 \ x00 \ x08 \ x00 \ x0a \ x00 \ x00 \ x00 \ x00 \ x01 \ x03 \ x00 \ x0c \ x00 \ x00 \ x00 \ x08 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ xe4 \ x00 \ x00 \ x00 \ x9c \ x00 \ x00 \ x00 \ x6c \ x00 \ x00 \ x00 \ x34 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x40 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x18 \ x00 \ x00 \ x00 \ x0c \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x72 \ xff \ xff \ xff \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x33 \ x00 \ x00 \ x00 \ x00 \ x6c \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x03 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x06 \ x00 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x32 \ x00 \ x00 \ x00 \ x00 \ xa0 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x05 \ x18 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x04 \ x00 \ x04 \ x00 \ x04 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x31 \ x00 \ x00 \ x00 \ x00 \ xcc \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x04 \ x00 \ x06 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x07 \ x00 \ x00 \ x00 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x00 \ x10 \ x00 \ x14 \ x00 \ x08 \ x00 \ x00 \ x00 \ x07 \ x00 \ x0c \ x00 \ x00 \ x00 \ x10 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x24 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x0c \ x00 \ x08 \ x00 \ x07 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x40 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x69 \ x64 \ x00 \ x00 \ xff \ xff \ xff \ xff \ x58 \ x01 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0c \ x00 \ x16 \ x00 \ x06 \ x00 \ x05 \ x00 \ x08 \ x00 \ x0c \ x00 \ x0c \ x00 \ x00 \ x00 \ x00 \ x03 \ x03 \ x00 \ x18 \ x00 \ x00 \ x00 \ x30 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x18 \ x00 \ x0c \ x00 \ x04 \ x00 \ x08 \ x00 \ x0a \ x00 \ x00 \ x00 \ xcc \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0b \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x20 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x20 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x28 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x28 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xff \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x0c \ x00 \ x14 \ x00 \ x06 \ x00 \ x08 \ x00 \ x0c \ x00 \ x10 \ x00 \ x0c \ x00 \ x00 \ x00 \ x00 \ x00 \ x03 \ x00 \ x3c \ x00 \ x00 \ x00 \ x28 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x58 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x60 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x30 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ xe4 \ x00 \ x00 \ x00 \ x9c \ x00 \ x00 \ x00 \ x6c \ x00 \ x00 \ x00 \ x34 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x40 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x18 \ x00 \ x00 \ x00 \ x0c \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x72 \ xff \ xff \ xff \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x33 \ x00 \ x00 \ x00 \ x00 \ x6c \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x03 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x06 \ x00 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x32 \ x00 \ x00 \ x00 \ x00 \ xa0 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x05 \ x18 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x04 \ x00 \ x04 \ x00 \ x04 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x31 \ x00 \ x00 \ x00 \ x00 \ xcc \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x04 \ x00 \ x06 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x07 \ x00 \ x00 \ x00 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x00 \ x10 \ x00 \ x14 \ x00 \ x08 \ x00 \ x00 \ x00 \ x07 \ x00 \ x0c \ x00 \ x00 \ x00 \ x10 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x24 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x0c \ x00 \ x08 \ x00 \ x07 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x40 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x69 \ x64 \ x00 \ x00 \ x78 \ x01 \ x00 \ x00 \ x41 \ x52 \ x52 \ x4f \ x57 \ x31 ' , <nl> + # ' \ x41 \ x52 \ x52 \ x4f \ x57 \ x31 \ x00 \ x00 \ xff \ xff \ xff \ xff \ x48 \ x01 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x0c \ x00 \ x06 \ x00 \ x05 \ x00 \ x08 \ x00 \ x0a \ x00 \ x00 \ x00 \ x00 \ x01 \ x03 \ x00 \ x0c \ x00 \ x00 \ x00 \ x08 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ xe4 \ x00 \ x00 \ x00 \ x9c \ x00 \ x00 \ x00 \ x6c \ x00 \ x00 \ x00 \ x34 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x40 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x18 \ x00 \ x00 \ x00 \ x0c \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x72 \ xff \ xff \ xff \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x33 \ x00 \ x00 \ x00 \ x00 \ x6c \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x03 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x06 \ x00 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x32 \ x00 \ x00 \ x00 \ x00 \ xa0 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x05 \ x18 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x04 \ x00 \ x04 \ x00 \ x04 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x31 \ x00 \ x00 \ x00 \ x00 \ xcc \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x04 \ x00 \ x06 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x07 \ x00 \ x00 \ x00 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x00 \ x10 \ x00 \ x14 \ x00 \ x08 \ x00 \ x00 \ x00 \ x07 \ x00 \ x0c \ x00 \ x00 \ x00 \ x10 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x24 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x0c \ x00 \ x08 \ x00 \ x07 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x40 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x69 \ x64 \ x00 \ x00 \ xff \ xff \ xff \ xff \ x58 \ x01 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0c \ x00 \ x16 \ x00 \ x06 \ x00 \ x05 \ x00 \ x08 \ x00 \ x0c \ x00 \ x0c \ x00 \ x00 \ x00 \ x00 \ x03 \ x03 \ x00 \ x18 \ x00 \ x00 \ x00 \ x48 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x18 \ x00 \ x0c \ x00 \ x04 \ x00 \ x08 \ x00 \ x0a \ x00 \ x00 \ x00 \ xcc \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0b \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x78 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x78 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x78 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x20 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x98 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x98 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x40 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xd8 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x20 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xf8 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xf8 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x40 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x38 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x38 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x03 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x07 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x09 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0b \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0c \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0e \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x06 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x0a \ x00 \ x00 \ x00 \ x0c \ x00 \ x00 \ x00 \ x0e \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x12 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x16 \ x00 \ x00 \ x00 \ x18 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x1c \ x00 \ x00 \ x00 \ x1e \ x00 \ x00 \ x00 \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x00 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x00 \ xff \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x0c \ x00 \ x14 \ x00 \ x06 \ x00 \ x08 \ x00 \ x0c \ x00 \ x10 \ x00 \ x0c \ x00 \ x00 \ x00 \ x00 \ x00 \ x03 \ x00 \ x3c \ x00 \ x00 \ x00 \ x28 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x58 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x60 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x48 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ xe4 \ x00 \ x00 \ x00 \ x9c \ x00 \ x00 \ x00 \ x6c \ x00 \ x00 \ x00 \ x34 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x40 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x18 \ x00 \ x00 \ x00 \ x0c \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x72 \ xff \ xff \ xff \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x33 \ x00 \ x00 \ x00 \ x00 \ x6c \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x03 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x06 \ x00 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x32 \ x00 \ x00 \ x00 \ x00 \ xa0 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x05 \ x18 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x04 \ x00 \ x04 \ x00 \ x04 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x31 \ x00 \ x00 \ x00 \ x00 \ xcc \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x04 \ x00 \ x06 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x07 \ x00 \ x00 \ x00 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x00 \ x10 \ x00 \ x14 \ x00 \ x08 \ x00 \ x00 \ x00 \ x07 \ x00 \ x0c \ x00 \ x00 \ x00 \ x10 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x24 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x0c \ x00 \ x08 \ x00 \ x07 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x40 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x69 \ x64 \ x00 \ x00 \ x78 \ x01 \ x00 \ x00 \ x41 \ x52 \ x52 \ x4f \ x57 \ x31 ' , <nl> + # ' \ x41 \ x52 \ x52 \ x4f \ x57 \ x31 \ x00 \ x00 \ xff \ xff \ xff \ xff \ x48 \ x01 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x0c \ x00 \ x06 \ x00 \ x05 \ x00 \ x08 \ x00 \ x0a \ x00 \ x00 \ x00 \ x00 \ x01 \ x03 \ x00 \ x0c \ x00 \ x00 \ x00 \ x08 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ xe4 \ x00 \ x00 \ x00 \ x9c \ x00 \ x00 \ x00 \ x6c \ x00 \ x00 \ x00 \ x34 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x40 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x18 \ x00 \ x00 \ x00 \ x0c \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x72 \ xff \ xff \ xff \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x33 \ x00 \ x00 \ x00 \ x00 \ x6c \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x03 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x06 \ x00 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x32 \ x00 \ x00 \ x00 \ x00 \ xa0 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x05 \ x18 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x04 \ x00 \ x04 \ x00 \ x04 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x31 \ x00 \ x00 \ x00 \ x00 \ xcc \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x04 \ x00 \ x06 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x07 \ x00 \ x00 \ x00 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x00 \ x10 \ x00 \ x14 \ x00 \ x08 \ x00 \ x00 \ x00 \ x07 \ x00 \ x0c \ x00 \ x00 \ x00 \ x10 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x24 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x0c \ x00 \ x08 \ x00 \ x07 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x40 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x69 \ x64 \ x00 \ x00 \ xff \ xff \ xff \ xff \ x58 \ x01 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0c \ x00 \ x16 \ x00 \ x06 \ x00 \ x05 \ x00 \ x08 \ x00 \ x0c \ x00 \ x0c \ x00 \ x00 \ x00 \ x00 \ x03 \ x03 \ x00 \ x18 \ x00 \ x00 \ x00 \ x30 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x18 \ x00 \ x0c \ x00 \ x04 \ x00 \ x08 \ x00 \ x0a \ x00 \ x00 \ x00 \ xcc \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0b \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x20 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x20 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x28 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x28 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xff \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x0c \ x00 \ x14 \ x00 \ x06 \ x00 \ x08 \ x00 \ x0c \ x00 \ x10 \ x00 \ x0c \ x00 \ x00 \ x00 \ x00 \ x00 \ x03 \ x00 \ x3c \ x00 \ x00 \ x00 \ x28 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x58 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x60 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x30 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ xe4 \ x00 \ x00 \ x00 \ x9c \ x00 \ x00 \ x00 \ x6c \ x00 \ x00 \ x00 \ x34 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x40 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x18 \ x00 \ x00 \ x00 \ x0c \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x72 \ xff \ xff \ xff \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x33 \ x00 \ x00 \ x00 \ x00 \ x6c \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x03 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x06 \ x00 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x32 \ x00 \ x00 \ x00 \ x00 \ xa0 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x05 \ x18 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x04 \ x00 \ x04 \ x00 \ x04 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x31 \ x00 \ x00 \ x00 \ x00 \ xcc \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x04 \ x00 \ x06 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x07 \ x00 \ x00 \ x00 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x00 \ x10 \ x00 \ x14 \ x00 \ x08 \ x00 \ x00 \ x00 \ x07 \ x00 \ x0c \ x00 \ x00 \ x00 \ x10 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x24 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x0c \ x00 \ x08 \ x00 \ x07 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x40 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x69 \ x64 \ x00 \ x00 \ x78 \ x01 \ x00 \ x00 \ x41 \ x52 \ x52 \ x4f \ x57 \ x31 ' , <nl> + # ] , <nl> + # } , <nl> + # ' ArrowStream ' : { <nl> + # # Not working at all : <nl> + # # Error while opening a table : Invalid : Tried reading schema message , was null or length 0 , Stack trace ( when copying this message , always include the lines below ) : <nl> + # # / src / Processors / Formats / Impl / ArrowBlockInputFormat . cpp : 88 : DB : : ArrowBlockInputFormat : : prepareReader ( ) @ 0x1ddff1c3 in / usr / bin / clickhouse <nl> + # # / src / Processors / Formats / Impl / ArrowBlockInputFormat . cpp : 26 : DB : : ArrowBlockInputFormat : : ArrowBlockInputFormat ( DB : : ReadBuffer & , DB : : Block const & , bool ) @ 0x1ddfef63 in / usr / bin / clickhouse <nl> + # # / contrib / libcxx / include / memory : 2214 : std : : __1 : : __compressed_pair_elem < DB : : ArrowBlockInputFormat , 1 , false > : : __compressed_pair_elem < DB : : ReadBuffer & , DB : : Block const & , bool & & , 0ul , 1ul , 2ul > ( std : : __1 : : piecewise_construct_t , std : : __1 : : tuple < DB : : ReadBuffer & , DB : : Block const & , bool & & > , std : : __1 : : __tuple_indices < 0ul , 1ul , 2ul > ) @ 0x1de0470f in / usr / bin / clickhouse <nl> + # # / contrib / libcxx / include / memory : 2299 : std : : __1 : : __compressed_pair < std : : __1 : : allocator < DB : : ArrowBlockInputFormat > , DB : : ArrowBlockInputFormat > : : __compressed_pair < std : : __1 : : allocator < DB : : ArrowBlockInputFormat > & , DB : : ReadBuffer & , DB : : Block const & , bool & & > ( std : : __1 : : piecewise_construct_t , std : : __1 : : tuple < std : : __1 : : allocator < DB : : ArrowBlockInputFormat > & > , std : : __1 : : tuple < DB : : ReadBuffer & , DB : : Block const & , bool & & > ) @ 0x1de04375 in / usr / bin / clickhouse <nl> + # # / contrib / libcxx / include / memory : 3569 : std : : __1 : : __shared_ptr_emplace < DB : : ArrowBlockInputFormat , std : : __1 : : allocator < DB : : ArrowBlockInputFormat > > : : __shared_ptr_emplace < DB : : ReadBuffer & , DB : : Block const & , bool > ( std : : __1 : : allocator < DB : : ArrowBlockInputFormat > , DB : : ReadBuffer & , DB : : Block const & , bool & & ) @ 0x1de03f97 in / usr / bin / clickhouse <nl> + # # / contrib / libcxx / include / memory : 4400 : std : : __1 : : enable_if < ! ( is_array < DB : : ArrowBlockInputFormat > : : value ) , std : : __1 : : shared_ptr < DB : : ArrowBlockInputFormat > > : : type std : : __1 : : make_shared < DB : : ArrowBlockInputFormat , DB : : ReadBuffer & , DB : : Block const & , bool > ( DB : : ReadBuffer & , DB : : Block const & , bool & & ) @ 0x1de03d4c in / usr / bin / clickhouse <nl> + # # / src / Processors / Formats / Impl / ArrowBlockInputFormat . cpp : 117 : DB : : registerInputFormatProcessorArrow ( DB : : FormatFactory & ) : : $ _1 : : operator ( ) ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) const @ 0x1de0273f in / usr / bin / clickhouse <nl> + # # / contrib / libcxx / include / type_traits : 3519 : decltype ( std : : __1 : : forward < DB : : registerInputFormatProcessorArrow ( DB : : FormatFactory & ) : : $ _1 & > ( fp ) ( std : : __1 : : forward < DB : : ReadBuffer & > ( fp0 ) , std : : __1 : : forward < DB : : Block const & > ( fp0 ) , std : : __1 : : forward < DB : : RowInputFormatParams const & > ( fp0 ) , std : : __1 : : forward < DB : : FormatSettings const & > ( fp0 ) ) ) std : : __1 : : __invoke < DB : : registerInputFormatProcessorArrow ( DB : : FormatFactory & ) : : $ _1 & , DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & > ( DB : : registerInputFormatProcessorArrow ( DB : : FormatFactory & ) : : $ _1 & , DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) @ 0x1de026da in / usr / bin / clickhouse <nl> + # # / contrib / libcxx / include / __functional_base : 317 : std : : __1 : : shared_ptr < DB : : IInputFormat > std : : __1 : : __invoke_void_return_wrapper < std : : __1 : : shared_ptr < DB : : IInputFormat > > : : __call < DB : : registerInputFormatProcessorArrow ( DB : : FormatFactory & ) : : $ _1 & , DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & > ( DB : : registerInputFormatProcessorArrow ( DB : : FormatFactory & ) : : $ _1 & , DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) @ 0x1de025ed in / usr / bin / clickhouse <nl> + # # / contrib / libcxx / include / functional : 1540 : std : : __1 : : __function : : __alloc_func < DB : : registerInputFormatProcessorArrow ( DB : : FormatFactory & ) : : $ _1 , std : : __1 : : allocator < DB : : registerInputFormatProcessorArrow ( DB : : FormatFactory & ) : : $ _1 > , std : : __1 : : shared_ptr < DB : : IInputFormat > ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) > : : operator ( ) ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) @ 0x1de0254a in / usr / bin / clickhouse <nl> + # # / contrib / libcxx / include / functional : 1714 : std : : __1 : : __function : : __func < DB : : registerInputFormatProcessorArrow ( DB : : FormatFactory & ) : : $ _1 , std : : __1 : : allocator < DB : : registerInputFormatProcessorArrow ( DB : : FormatFactory & ) : : $ _1 > , std : : __1 : : shared_ptr < DB : : IInputFormat > ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) > : : operator ( ) ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) @ 0x1de0165c in / usr / bin / clickhouse <nl> + # # / contrib / libcxx / include / functional : 1867 : std : : __1 : : __function : : __value_func < std : : __1 : : shared_ptr < DB : : IInputFormat > ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) > : : operator ( ) ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) const @ 0x1dd14dbd in / usr / bin / clickhouse <nl> + # # / contrib / libcxx / include / functional : 2473 : std : : __1 : : function < std : : __1 : : shared_ptr < DB : : IInputFormat > ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) > : : operator ( ) ( DB : : ReadBuffer & , DB : : Block const & , DB : : RowInputFormatParams const & , DB : : FormatSettings const & ) const @ 0x1dd07035 in / usr / bin / clickhouse <nl> + # # / src / Formats / FormatFactory . cpp : 258 : DB : : FormatFactory : : getInputFormat ( std : : __1 : : basic_string < char , std : : __1 : : char_traits < char > , std : : __1 : : allocator < char > > const & , DB : : ReadBuffer & , DB : : Block const & , DB : : Context const & , unsigned long , std : : __1 : : function < void ( ) > ) const @ 0x1dd04007 in / usr / bin / clickhouse <nl> + # # / src / Storages / Kafka / KafkaBlockInputStream . cpp : 76 : DB : : KafkaBlockInputStream : : readImpl ( ) @ 0x1d8f6559 in / usr / bin / clickhouse <nl> + # # / src / DataStreams / IBlockInputStream . cpp : 60 : DB : : IBlockInputStream : : read ( ) @ 0x1c9c92fd in / usr / bin / clickhouse <nl> + # # / src / DataStreams / copyData . cpp : 26 : void DB : : copyDataImpl < DB : : copyData ( DB : : IBlockInputStream & , DB : : IBlockOutputStream & , std : : __1 : : atomic < bool > * ) : : $ _0 & , void ( & ) ( DB : : Block const & ) > ( DB : : IBlockInputStream & , DB : : IBlockOutputStream & , DB : : copyData ( DB : : IBlockInputStream & , DB : : IBlockOutputStream & , std : : __1 : : atomic < bool > * ) : : $ _0 & , void ( & ) ( DB : : Block const & ) ) @ 0x1c9ea01c in / usr / bin / clickhouse <nl> + # ' data_sample ' : [ <nl> + # ' \ xff \ xff \ xff \ xff \ x48 \ x01 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x0c \ x00 \ x06 \ x00 \ x05 \ x00 \ x08 \ x00 \ x0a \ x00 \ x00 \ x00 \ x00 \ x01 \ x03 \ x00 \ x0c \ x00 \ x00 \ x00 \ x08 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ xe4 \ x00 \ x00 \ x00 \ x9c \ x00 \ x00 \ x00 \ x6c \ x00 \ x00 \ x00 \ x34 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x40 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x18 \ x00 \ x00 \ x00 \ x0c \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x72 \ xff \ xff \ xff \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x33 \ x00 \ x00 \ x00 \ x00 \ x6c \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x03 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x06 \ x00 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x32 \ x00 \ x00 \ x00 \ x00 \ xa0 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x05 \ x18 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x04 \ x00 \ x04 \ x00 \ x04 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x31 \ x00 \ x00 \ x00 \ x00 \ xcc \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x04 \ x00 \ x06 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x07 \ x00 \ x00 \ x00 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x00 \ x10 \ x00 \ x14 \ x00 \ x08 \ x00 \ x00 \ x00 \ x07 \ x00 \ x0c \ x00 \ x00 \ x00 \ x10 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x24 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x0c \ x00 \ x08 \ x00 \ x07 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x40 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x69 \ x64 \ x00 \ x00 \ xff \ xff \ xff \ xff \ x58 \ x01 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0c \ x00 \ x16 \ x00 \ x06 \ x00 \ x05 \ x00 \ x08 \ x00 \ x0c \ x00 \ x0c \ x00 \ x00 \ x00 \ x00 \ x03 \ x03 \ x00 \ x18 \ x00 \ x00 \ x00 \ x30 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x18 \ x00 \ x0c \ x00 \ x04 \ x00 \ x08 \ x00 \ x0a \ x00 \ x00 \ x00 \ xcc \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0b \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x20 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x20 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x28 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x28 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xff \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x00 ' , <nl> + # ' \ xff \ xff \ xff \ xff \ x48 \ x01 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x0c \ x00 \ x06 \ x00 \ x05 \ x00 \ x08 \ x00 \ x0a \ x00 \ x00 \ x00 \ x00 \ x01 \ x03 \ x00 \ x0c \ x00 \ x00 \ x00 \ x08 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ xe4 \ x00 \ x00 \ x00 \ x9c \ x00 \ x00 \ x00 \ x6c \ x00 \ x00 \ x00 \ x34 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x40 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x18 \ x00 \ x00 \ x00 \ x0c \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x72 \ xff \ xff \ xff \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x33 \ x00 \ x00 \ x00 \ x00 \ x6c \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x03 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x06 \ x00 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x32 \ x00 \ x00 \ x00 \ x00 \ xa0 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x05 \ x18 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x04 \ x00 \ x04 \ x00 \ x04 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x31 \ x00 \ x00 \ x00 \ x00 \ xcc \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x04 \ x00 \ x06 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x07 \ x00 \ x00 \ x00 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x00 \ x10 \ x00 \ x14 \ x00 \ x08 \ x00 \ x00 \ x00 \ x07 \ x00 \ x0c \ x00 \ x00 \ x00 \ x10 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x24 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x0c \ x00 \ x08 \ x00 \ x07 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x40 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x69 \ x64 \ x00 \ x00 \ xff \ xff \ xff \ xff \ x58 \ x01 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0c \ x00 \ x16 \ x00 \ x06 \ x00 \ x05 \ x00 \ x08 \ x00 \ x0c \ x00 \ x0c \ x00 \ x00 \ x00 \ x00 \ x03 \ x03 \ x00 \ x18 \ x00 \ x00 \ x00 \ x48 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x18 \ x00 \ x0c \ x00 \ x04 \ x00 \ x08 \ x00 \ x0a \ x00 \ x00 \ x00 \ xcc \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0b \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x78 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x78 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x78 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x20 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x98 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x98 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x40 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xd8 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x20 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xf8 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xf8 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x40 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x38 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x38 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x03 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x07 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x09 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0b \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0c \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0e \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0f \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x06 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x0a \ x00 \ x00 \ x00 \ x0c \ x00 \ x00 \ x00 \ x0e \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x12 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x16 \ x00 \ x00 \ x00 \ x18 \ x00 \ x00 \ x00 \ x1a \ x00 \ x00 \ x00 \ x1c \ x00 \ x00 \ x00 \ x1e \ x00 \ x00 \ x00 \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x00 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x01 \ x00 \ xff \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x00 ' , <nl> + # ' \ xff \ xff \ xff \ xff \ x48 \ x01 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x0c \ x00 \ x06 \ x00 \ x05 \ x00 \ x08 \ x00 \ x0a \ x00 \ x00 \ x00 \ x00 \ x01 \ x03 \ x00 \ x0c \ x00 \ x00 \ x00 \ x08 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ xe4 \ x00 \ x00 \ x00 \ x9c \ x00 \ x00 \ x00 \ x6c \ x00 \ x00 \ x00 \ x34 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x40 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x18 \ x00 \ x00 \ x00 \ x0c \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x72 \ xff \ xff \ xff \ x08 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x33 \ x00 \ x00 \ x00 \ x00 \ x6c \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x03 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x06 \ x00 \ x06 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x32 \ x00 \ x00 \ x00 \ x00 \ xa0 \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x05 \ x18 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x04 \ x00 \ x04 \ x00 \ x04 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x76 \ x61 \ x6c \ x31 \ x00 \ x00 \ x00 \ x00 \ xcc \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x02 \ x20 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x06 \ x00 \ x08 \ x00 \ x04 \ x00 \ x06 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x07 \ x00 \ x00 \ x00 \ x62 \ x6c \ x6f \ x63 \ x6b \ x4e \ x6f \ x00 \ x10 \ x00 \ x14 \ x00 \ x08 \ x00 \ x00 \ x00 \ x07 \ x00 \ x0c \ x00 \ x00 \ x00 \ x10 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x24 \ x00 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x04 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x0c \ x00 \ x08 \ x00 \ x07 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x40 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x69 \ x64 \ x00 \ x00 \ xff \ xff \ xff \ xff \ x58 \ x01 \ x00 \ x00 \ x14 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0c \ x00 \ x16 \ x00 \ x06 \ x00 \ x05 \ x00 \ x08 \ x00 \ x0c \ x00 \ x0c \ x00 \ x00 \ x00 \ x00 \ x03 \ x03 \ x00 \ x18 \ x00 \ x00 \ x00 \ x30 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0a \ x00 \ x18 \ x00 \ x0c \ x00 \ x04 \ x00 \ x08 \ x00 \ x0a \ x00 \ x00 \ x00 \ xcc \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x0b \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x10 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x18 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x20 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x20 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x28 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x28 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x08 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x05 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x02 \ x00 \ x00 \ x00 \ x41 \ x4d \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x3f \ x00 \ x00 \ x00 \ x00 \ x01 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xff \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x00 ' , <nl> + # ] , <nl> + # } , <nl> + } <nl> + <nl> + for format_name in all_formats : <nl> + print ( ' Set up { } ' . format ( format_name ) ) <nl> + topic_name = ' format_tests_ { } ' . format ( format_name ) <nl> + kafka_produce ( topic_name , all_formats [ format_name ] [ ' data_sample ' ] ) <nl> + instance . query ( ' ' ' <nl> + DROP TABLE IF EXISTS test . kafka_ { format_name } ; <nl> + <nl> + CREATE TABLE test . kafka_ { format_name } ( <nl> + id Int64 , <nl> + blockNo UInt16 , <nl> + val1 String , <nl> + val2 Float32 , <nl> + val3 UInt8 <nl> + ) ENGINE = Kafka ( ) <nl> + SETTINGS kafka_broker_list = ' kafka1 : 19092 ' , <nl> + kafka_topic_list = ' { topic_name } ' , <nl> + kafka_group_name = ' { topic_name } _group ' , <nl> + kafka_format = ' { format_name } ' , <nl> + kafka_flush_interval_ms = 1000 { extra_settings } ; <nl> + <nl> + DROP TABLE IF EXISTS test . kafka_ { format_name } _mv ; <nl> + <nl> + CREATE MATERIALIZED VIEW test . kafka_ { format_name } _mv Engine = Log AS <nl> + SELECT * , _topic , _partition , _offset FROM test . kafka_ { format_name } ; <nl> + ' ' ' . format ( topic_name = topic_name , format_name = format_name , extra_settings = all_formats [ format_name ] . get ( ' extra_settings ' ) or ' ' ) ) <nl> + <nl> + time . sleep ( 12 ) <nl> + <nl> + for format_name in all_formats : <nl> + print ( ' Checking { } ' . format ( format_name ) ) <nl> + topic_name = ' format_tests_ { } ' . format ( format_name ) <nl> + <nl> + result = instance . query ( ' SELECT * FROM test . kafka_ { format_name } _mv ; ' . format ( format_name = format_name ) ) <nl> + expected = ' ' ' \ <nl> + 0 0 AM 0 . 5 1 { topic_name } 0 0 <nl> + 1 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 2 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 3 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 4 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 5 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 6 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 7 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 8 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 9 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 10 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 11 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 12 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 13 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 14 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 15 0 AM 0 . 5 1 { topic_name } 0 1 <nl> + 0 0 AM 0 . 5 1 { topic_name } 0 2 <nl> + ' ' ' . format ( topic_name = topic_name ) <nl> + assert TSV ( result ) = = TSV ( expected ) , ' Proper result for format : { } ' . format ( format_name ) <nl> + <nl> + <nl> # Since everything is async and shaky when receiving messages from Kafka , <nl> # we may want to try and check results multiple times in a loop . <nl> def kafka_check_result ( result , check = False , ref_file = ' test_kafka_json . reference ' ) : <nl> def kafka_cluster ( ) : <nl> cluster . start ( ) <nl> kafka_id = instance . cluster . kafka_docker_id <nl> print ( " kafka_id is { } " . format ( kafka_id ) ) <nl> - instance . query ( ' CREATE DATABASE test ' ) <nl> - <nl> yield cluster <nl> <nl> finally : <nl> def kafka_cluster ( ) : <nl> <nl> @ pytest . fixture ( autouse = True ) <nl> def kafka_setup_teardown ( ) : <nl> - instance . query ( ' DROP TABLE IF EXISTS test . kafka ' ) <nl> + instance . query ( ' DROP DATABASE IF EXISTS test ; CREATE DATABASE test ; ' ) <nl> wait_kafka_is_available ( ) <nl> - print ( " kafka is available - running test " ) <nl> + # print ( " kafka is available - running test " ) <nl> yield # run test <nl> - instance . query ( ' DROP TABLE IF EXISTS test . kafka ' ) <nl> - <nl> <nl> # Tests <nl> <nl> def test_kafka_flush_by_time ( kafka_cluster ) : <nl> kafka_max_block_size = 100 , <nl> kafka_row_delimiter = ' \ \ n ' ; <nl> <nl> - CREATE TABLE test . view ( key UInt64 , value UInt64 ) <nl> + SELECT * FROM test . kafka ; <nl> + <nl> + CREATE TABLE test . view ( key UInt64 , value UInt64 , ts DateTime64 ( 3 ) MATERIALIZED now64 ( 3 ) ) <nl> ENGINE = MergeTree ( ) <nl> ORDER BY key ; <nl> - <nl> - CREATE MATERIALIZED VIEW test . consumer TO test . view AS <nl> - SELECT * FROM test . kafka ; <nl> ' ' ' ) <nl> <nl> cancel = threading . Event ( ) <nl> def produce ( ) : <nl> messages = [ ] <nl> messages . append ( json . dumps ( { ' key ' : 0 , ' value ' : 0 } ) ) <nl> kafka_produce ( ' flush_by_time ' , messages ) <nl> - time . sleep ( 1 ) <nl> + time . sleep ( 0 . 8 ) <nl> <nl> kafka_thread = threading . Thread ( target = produce ) <nl> kafka_thread . start ( ) <nl> <nl> + instance . query ( ' ' ' <nl> + CREATE MATERIALIZED VIEW test . consumer TO test . view AS <nl> + SELECT * FROM test . kafka ; <nl> + ' ' ' ) <nl> + <nl> time . sleep ( 18 ) <nl> <nl> - result = instance . query ( ' SELECT count ( ) FROM test . view ' ) <nl> + result = instance . query ( ' SELECT uniqExact ( ts ) = 2 , count ( ) > 15 FROM test . view ' ) <nl> <nl> - print ( result ) <nl> cancel . set ( ) <nl> kafka_thread . join ( ) <nl> <nl> def produce ( ) : <nl> DROP TABLE test . view ; <nl> ' ' ' ) <nl> <nl> - # 40 = 2 flushes ( 7 . 5 sec ) , 15 polls each , about 1 mgs per 1 . 5 sec <nl> - assert int ( result ) > 12 , ' Messages from kafka should be flushed at least every stream_flush_interval_ms ! ' <nl> + assert TSV ( result ) = = TSV ( ' 1 1 ' ) <nl> <nl> <nl> @ pytest . mark . timeout ( 600 ) <nl> def produce ( ) : <nl> <nl> # Some queries to debug . . . <nl> # SELECT * FROM test . destination where key in ( SELECT key FROM test . destination group by key having count ( ) < > 1 ) <nl> - # select number + 1 as key from numbers ( 4141 ) left join test . destination using ( key ) where test . destination . key = 0 ; <nl> + # select number + 1 as key from numbers ( 4141 ) x left join test . destination using ( key ) where test . destination . key = 0 ; <nl> # SELECT * FROM test . destination WHERE key between 2360 and 2370 order by key ; <nl> # select _partition from test . destination group by _partition having count ( ) < > max ( _offset ) + 1 ; <nl> - # select toUInt64 ( 0 ) as _partition , number + 1 as _offset from numbers ( 400 ) left join test . destination using ( _partition , _offset ) where test . destination . key = 0 order by _offset ; <nl> + # select toUInt64 ( 0 ) as _partition , number + 1 as _offset from numbers ( 400 ) x left join test . destination using ( _partition , _offset ) where test . destination . key = 0 order by _offset ; <nl> # SELECT * FROM test . destination WHERE _partition = 0 and _offset between 220 and 240 order by _offset ; <nl> <nl> # CREATE TABLE test . reference ( key UInt64 , value UInt64 ) ENGINE = Kafka SETTINGS kafka_broker_list = ' kafka1 : 19092 ' , <nl> def test_kafka_duplicates_when_commit_failed ( kafka_cluster ) : <nl> # impossible . So we have a duplicate in that scenario , but we report that situation properly . <nl> assert TSV ( result ) = = TSV ( ' 42 \ t22 \ t22 ' ) <nl> <nl> + # if we came to partition end we will repeat polling until reaching kafka_max_block_size or flush_interval <nl> + # that behavior is a bit quesionable - we can just take a bigger pauses between polls instead - <nl> + # to do more job in a single pass , and give more rest for a thread . <nl> + # But in cases of some peaky loads in kafka topic the current contract sounds more predictable and <nl> + # easier to understand , so let ' s keep it as is for now . <nl> + # also we can came to eof because we drained librdkafka internal queue too fast <nl> + @ pytest . mark . timeout ( 120 ) <nl> + def test_premature_flush_on_eof ( kafka_cluster ) : <nl> + instance . query ( ' ' ' <nl> + CREATE TABLE test . kafka ( key UInt64 , value UInt64 ) <nl> + ENGINE = Kafka <nl> + SETTINGS kafka_broker_list = ' kafka1 : 19092 ' , <nl> + kafka_topic_list = ' premature_flush_on_eof ' , <nl> + kafka_group_name = ' premature_flush_on_eof ' , <nl> + kafka_format = ' JSONEachRow ' ; <nl> + SELECT * FROM test . kafka LIMIT 1 ; <nl> + CREATE TABLE test . destination ( <nl> + key UInt64 , <nl> + value UInt64 , <nl> + _topic String , <nl> + _key String , <nl> + _offset UInt64 , <nl> + _partition UInt64 , <nl> + _timestamp Nullable ( DateTime ) , <nl> + _consumed_by LowCardinality ( String ) <nl> + ) <nl> + ENGINE = MergeTree ( ) <nl> + ORDER BY key ; <nl> + ' ' ' ) <nl> + <nl> + messages = [ json . dumps ( { ' key ' : j + 1 , ' value ' : j + 1 } ) for j in range ( 1 ) ] <nl> + kafka_produce ( ' premature_flush_on_eof ' , messages ) <nl> + <nl> + instance . query ( ' ' ' <nl> + CREATE MATERIALIZED VIEW test . kafka_consumer TO test . destination AS <nl> + SELECT <nl> + key , <nl> + value , <nl> + _topic , <nl> + _key , <nl> + _offset , <nl> + _partition , <nl> + _timestamp <nl> + FROM test . kafka ; <nl> + ' ' ' ) <nl> + <nl> + <nl> + # all subscriptions / assignments done during select , so it start sending data to test . destination <nl> + # immediately after creation of MV <nl> + time . sleep ( 2 ) <nl> + # produce more messages after delay <nl> + kafka_produce ( ' premature_flush_on_eof ' , messages ) <nl> + # data was not flushed yet ( it will be flushed 7 . 5 sec after creating MV ) <nl> + assert int ( instance . query ( " SELECT count ( ) FROM test . destination " ) ) = = 0 <nl> + time . sleep ( 6 ) <nl> + <nl> + # it should be single part , i . e . single insert <nl> + result = instance . query ( ' SELECT _part , count ( ) FROM test . destination group by _part ' ) <nl> + assert TSV ( result ) = = TSV ( ' all_1_1_0 \ t2 ' ) <nl> <nl> + instance . query ( ' ' ' <nl> + DROP TABLE test . kafka_consumer ; <nl> + DROP TABLE test . destination ; <nl> + ' ' ' ) <nl> <nl> if __name__ = = ' __main__ ' : <nl> cluster . start ( ) <nl>
Merge pull request from filimonov / better_kafka_states
ClickHouse/ClickHouse
9bfefc99abaa501bcee4ffa4d354ee17de4b02c8
2020-06-20T17:36:54Z
mmm a / vendor / Readme . md <nl> ppp b / vendor / Readme . md <nl> <nl> # # Vendor <nl> <nl> - Softwere from third parties + init sctipt <nl> + Software from third parties + init sctipt <nl>
minor typo fix
cmderdev/cmder
ee898d9d280de54d5b9e0dd8978d98f83f910d6e
2013-10-08T10:29:35Z
mmm a / src / mongo / db / auth / user_document_parser . cpp <nl> ppp b / src / mongo / db / auth / user_document_parser . cpp <nl> namespace { <nl> return Status ( ErrorCodes : : UnsupportedFormat , " Role db must be non - empty strings " ) ; <nl> } <nl> <nl> - if ( canDelegateElement - > eoo ( ) & & canDelegateElement - > type ( ) ! = Bool ) { <nl> + if ( ! canDelegateElement - > eoo ( ) & & canDelegateElement - > type ( ) ! = Bool ) { <nl> return Status ( ErrorCodes : : UnsupportedFormat , <nl> " ' canDelegate ' field must be a boolean if provided " ) ; <nl> } <nl> - if ( hasRoleElement - > eoo ( ) & & hasRoleElement - > type ( ) ! = Bool ) { <nl> + if ( ! hasRoleElement - > eoo ( ) & & hasRoleElement - > type ( ) ! = Bool ) { <nl> return Status ( ErrorCodes : : UnsupportedFormat , <nl> " ' hasRole ' field must be a boolean if provided " ) ; <nl> } <nl>
SERVER - 9517 Fix backwards condition in user document parser
mongodb/mongo
100fc6d278597a4e119ac70b07b0f7c38cd2c4ab
2013-10-11T21:40:17Z
mmm a / hphp / runtime / base / ini - setting . cpp <nl> ppp b / hphp / runtime / base / ini - setting . cpp <nl> const StaticString <nl> s_core ( " core " ) ; <nl> <nl> int64_t convert_bytes_to_long ( const std : : string & value ) { <nl> - int64_t newInt = strtoll ( value . c_str ( ) , nullptr , 10 ) ; <nl> - char lastChar = value . at ( value . size ( ) - 1 ) ; <nl> + if ( value . size ( ) = = 0 ) { <nl> + return 0 ; <nl> + } <nl> + int64_t newInt = strtoll ( value . data ( ) , nullptr , 10 ) ; <nl> + char lastChar = value . data ( ) [ value . size ( ) - 1 ] ; <nl> if ( lastChar = = ' K ' | | lastChar = = ' k ' ) { <nl> newInt < < = 10 ; <nl> } else if ( lastChar = = ' M ' | | lastChar = = ' m ' ) { <nl> int64_t convert_bytes_to_long ( const std : : string & value ) { <nl> return newInt ; <nl> } <nl> <nl> - bool ini_on_update ( const std : : string & value , bool & p ) { <nl> - if ( ( value . size ( ) = = 0 ) | | <nl> - ( value . size ( ) = = 1 & & value = = " 0 " ) | | <nl> - ( value . size ( ) = = 2 & & strcasecmp ( " no " , value . data ( ) ) = = 0 ) | | <nl> - ( value . size ( ) = = 3 & & strcasecmp ( " off " , value . data ( ) ) = = 0 ) | | <nl> - ( value . size ( ) = = 5 & & strcasecmp ( " false " , value . data ( ) ) = = 0 ) ) { <nl> + static std : : string dynamic_to_std_string ( const folly : : dynamic & v ) { <nl> + switch ( v . type ( ) ) { <nl> + case folly : : dynamic : : Type : : NULLT : <nl> + case folly : : dynamic : : Type : : ARRAY : <nl> + case folly : : dynamic : : Type : : OBJECT : <nl> + return " " ; <nl> + case folly : : dynamic : : Type : : BOOL : <nl> + return std : : to_string ( v . asBool ( ) ) ; <nl> + case folly : : dynamic : : Type : : DOUBLE : <nl> + return std : : to_string ( v . asDouble ( ) ) ; <nl> + case folly : : dynamic : : Type : : INT64 : <nl> + return std : : to_string ( v . asInt ( ) ) ; <nl> + case folly : : dynamic : : Type : : STRING : <nl> + return v . data ( ) ; <nl> + } <nl> + not_reached ( ) ; <nl> + } <nl> + <nl> + # define INI_ASSERT_STR ( v ) \ <nl> + if ( value . isArray ( ) | | value . isObject ( ) ) { \ <nl> + return false ; \ <nl> + } \ <nl> + auto str = dynamic_to_std_string ( v ) ; <nl> + <nl> + bool ini_on_update ( const folly : : dynamic & value , bool & p ) { <nl> + INI_ASSERT_STR ( value ) ; <nl> + if ( ( str . size ( ) = = 0 ) | | <nl> + ( str . size ( ) = = 1 & & strcasecmp ( " 0 " , str . data ( ) ) = = 0 ) | | <nl> + ( str . size ( ) = = 2 & & strcasecmp ( " no " , str . data ( ) ) = = 0 ) | | <nl> + ( str . size ( ) = = 3 & & strcasecmp ( " off " , str . data ( ) ) = = 0 ) | | <nl> + ( str . size ( ) = = 5 & & strcasecmp ( " false " , str . data ( ) ) = = 0 ) ) { <nl> p = false ; <nl> } else { <nl> p = true ; <nl> bool ini_on_update ( const std : : string & value , bool & p ) { <nl> return true ; <nl> } <nl> <nl> - bool ini_on_update ( const std : : string & value , double & p ) { <nl> - p = zend_strtod ( value . c_str ( ) , nullptr ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , double & p ) { <nl> + INI_ASSERT_STR ( value ) ; <nl> + p = zend_strtod ( str . data ( ) , nullptr ) ; <nl> return true ; <nl> } <nl> <nl> - bool ini_on_update ( const std : : string & value , int16_t & p ) { <nl> - auto n = convert_bytes_to_long ( value ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , int16_t & p ) { <nl> + INI_ASSERT_STR ( value ) ; <nl> + auto n = convert_bytes_to_long ( str ) ; <nl> auto maxValue = 0x7FFFL ; <nl> if ( n > maxValue | | n < ( - maxValue - 1 ) ) { <nl> return false ; <nl> bool ini_on_update ( const std : : string & value , int16_t & p ) { <nl> return true ; <nl> } <nl> <nl> - bool ini_on_update ( const std : : string & value , int32_t & p ) { <nl> - auto n = convert_bytes_to_long ( value ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , int32_t & p ) { <nl> + INI_ASSERT_STR ( value ) ; <nl> + auto n = convert_bytes_to_long ( str ) ; <nl> auto maxValue = 0x7FFFFFFFL ; <nl> if ( n > maxValue | | n < ( - maxValue - 1 ) ) { <nl> return false ; <nl> bool ini_on_update ( const std : : string & value , int32_t & p ) { <nl> return true ; <nl> } <nl> <nl> - bool ini_on_update ( const std : : string & value , int64_t & p ) { <nl> - p = convert_bytes_to_long ( value ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , int64_t & p ) { <nl> + INI_ASSERT_STR ( value ) ; <nl> + p = convert_bytes_to_long ( str ) ; <nl> return true ; <nl> } <nl> <nl> - bool ini_on_update ( const std : : string & value , uint16_t & p ) { <nl> - auto n = convert_bytes_to_long ( value ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , uint16_t & p ) { <nl> + INI_ASSERT_STR ( value ) ; <nl> + auto n = convert_bytes_to_long ( str ) ; <nl> auto mask = ~ 0xFFFFUL ; <nl> if ( ( ( uint64_t ) n & mask ) ) { <nl> return false ; <nl> bool ini_on_update ( const std : : string & value , uint16_t & p ) { <nl> return true ; <nl> } <nl> <nl> - bool ini_on_update ( const std : : string & value , uint32_t & p ) { <nl> - auto n = convert_bytes_to_long ( value ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , uint32_t & p ) { <nl> + INI_ASSERT_STR ( value ) ; <nl> + auto n = convert_bytes_to_long ( str ) ; <nl> auto mask = ~ 0x7FFFFFFFUL ; <nl> if ( ( ( uint64_t ) n & mask ) ) { <nl> return false ; <nl> bool ini_on_update ( const std : : string & value , uint32_t & p ) { <nl> return true ; <nl> } <nl> <nl> - bool ini_on_update ( const std : : string & value , uint64_t & p ) { <nl> - p = convert_bytes_to_long ( value ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , uint64_t & p ) { <nl> + INI_ASSERT_STR ( value ) ; <nl> + p = convert_bytes_to_long ( str ) ; <nl> return true ; <nl> } <nl> <nl> - bool ini_on_update ( const std : : string & value , std : : string & p ) { <nl> - p = value ; <nl> + bool ini_on_update ( const folly : : dynamic & value , std : : string & p ) { <nl> + INI_ASSERT_STR ( value ) ; <nl> + p = str ; <nl> return true ; <nl> } <nl> <nl> - bool ini_on_update ( const std : : string & value , String & p ) { <nl> - p = String ( value ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , String & p ) { <nl> + INI_ASSERT_STR ( value ) ; <nl> + p = str . data ( ) ; <nl> return true ; <nl> } <nl> <nl> - std : : string ini_get ( bool & p ) { <nl> + folly : : dynamic ini_get ( bool & p ) { <nl> return p ? " 1 " : " " ; <nl> } <nl> <nl> - std : : string ini_get ( double & p ) { <nl> - return std : : to_string ( p ) ; <nl> + folly : : dynamic ini_get ( double & p ) { <nl> + return p ; <nl> } <nl> <nl> - std : : string ini_get ( int16_t & p ) { <nl> - return std : : to_string ( p ) ; <nl> + folly : : dynamic ini_get ( int16_t & p ) { <nl> + return p ; <nl> } <nl> <nl> - std : : string ini_get ( int32_t & p ) { <nl> - return std : : to_string ( p ) ; <nl> + folly : : dynamic ini_get ( int32_t & p ) { <nl> + return p ; <nl> } <nl> <nl> - std : : string ini_get ( int64_t & p ) { <nl> - return std : : to_string ( p ) ; <nl> + folly : : dynamic ini_get ( int64_t & p ) { <nl> + return p ; <nl> } <nl> <nl> - std : : string ini_get ( uint16_t & p ) { <nl> - return std : : to_string ( p ) ; <nl> + folly : : dynamic ini_get ( uint16_t & p ) { <nl> + return p ; <nl> } <nl> <nl> - std : : string ini_get ( uint32_t & p ) { <nl> - return std : : to_string ( p ) ; <nl> + folly : : dynamic ini_get ( uint32_t & p ) { <nl> + return p ; <nl> } <nl> <nl> - std : : string ini_get ( uint64_t & p ) { <nl> - return std : : to_string ( p ) ; <nl> + folly : : dynamic ini_get ( uint64_t & p ) { <nl> + return p ; <nl> } <nl> <nl> - std : : string ini_get ( std : : string & p ) { <nl> - return p ; <nl> + folly : : dynamic ini_get ( std : : string & p ) { <nl> + return p . data ( ) ; <nl> } <nl> <nl> - std : : string ini_get ( String & p ) { <nl> - return p - > toCppString ( ) ; <nl> + folly : : dynamic ini_get ( String & p ) { <nl> + return p . data ( ) ; <nl> } <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> IniSetting : : Map IniSetting : : FromStringAsMap ( const std : : string & ini , <nl> struct IniCallbackData { <nl> const Extension * extension ; <nl> IniSetting : : Mode mode ; <nl> - std : : function < bool ( const std : : string & value ) > updateCallback ; <nl> - std : : function < std : : string ( ) > getCallback ; <nl> + std : : function < bool ( const folly : : dynamic & value ) > updateCallback ; <nl> + std : : function < folly : : dynamic ( ) > getCallback ; <nl> } ; <nl> <nl> typedef std : : map < std : : string , IniCallbackData > CallbackMap ; <nl> static IMPLEMENT_THREAD_LOCAL ( CallbackMap , s_user_callbacks ) ; <nl> / / Things that are only settable at startup go here <nl> static CallbackMap s_system_ini_callbacks ; <nl> <nl> - typedef std : : map < std : : string , std : : string > DefaultMap ; <nl> + typedef std : : map < std : : string , folly : : dynamic > DefaultMap ; <nl> static IMPLEMENT_THREAD_LOCAL ( DefaultMap , s_savedDefaults ) ; <nl> <nl> class IniSettingExtension : public Extension { <nl> class IniSettingExtension : public Extension { <nl> void requestShutdown ( ) { <nl> / / Put all the defaults back to the way they were before any ini_set ( ) <nl> for ( auto & item : * s_savedDefaults ) { <nl> - IniSetting : : Set ( item . first , item . second ) ; <nl> + IniSetting : : Set ( item . first , item . second , IniSetting : : FollyDynamic ( ) ) ; <nl> } <nl> s_savedDefaults - > clear ( ) ; <nl> } <nl> class IniSettingExtension : public Extension { <nl> <nl> void IniSetting : : Bind ( const Extension * extension , const Mode mode , <nl> const char * name , <nl> - std : : function < bool ( const std : : string & value ) > <nl> + std : : function < bool ( const folly : : dynamic & value ) > <nl> updateCallback , <nl> - std : : function < std : : string ( ) > getCallback ) { <nl> + std : : function < folly : : dynamic ( ) > getCallback ) { <nl> assert ( name & & * name ) ; <nl> <nl> bool is_thread_local = ( mode = = PHP_INI_USER | | mode = = PHP_INI_ALL ) ; <nl> void IniSetting : : Unbind ( const char * name ) { <nl> s_user_callbacks - > erase ( name ) ; <nl> } <nl> <nl> - bool IniSetting : : Get ( const std : : string & name , std : : string & value ) { <nl> + bool IniSetting : : Get ( const std : : string & name , folly : : dynamic & value ) { <nl> CallbackMap : : iterator iter = s_system_ini_callbacks . find ( name . data ( ) ) ; <nl> if ( iter = = s_system_ini_callbacks . end ( ) ) { <nl> iter = s_user_callbacks - > find ( name . data ( ) ) ; <nl> bool IniSetting : : Get ( const std : : string & name , std : : string & value ) { <nl> return true ; <nl> } <nl> <nl> - bool IniSetting : : Get ( const String & name , String & value ) { <nl> - std : : string b ; <nl> + bool IniSetting : : Get ( const std : : string & name , std : : string & value ) { <nl> + folly : : dynamic b = nullptr ; <nl> + auto ret = Get ( name , b ) ; <nl> + value = dynamic_to_std_string ( b ) ; <nl> + return ret & & ! value . empty ( ) ; <nl> + } <nl> + <nl> + bool IniSetting : : Get ( const String & name , String & value ) { <nl> + Variant b ; <nl> + auto ret = Get ( name , b ) ; <nl> + value = b . toString ( ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + / * * <nl> + * I was going to make this a constructor for Variant , but both folly : : dynamic <nl> + * and Variant have so many overrides that everything becomes ambiguous . <nl> + * * / <nl> + static Variant dynamic_to_variant ( const folly : : dynamic & v ) { <nl> + switch ( v . type ( ) ) { <nl> + case folly : : dynamic : : Type : : NULLT : <nl> + return init_null_variant ; <nl> + case folly : : dynamic : : Type : : BOOL : <nl> + return v . asBool ( ) ; <nl> + case folly : : dynamic : : Type : : DOUBLE : <nl> + return v . asDouble ( ) ; <nl> + case folly : : dynamic : : Type : : INT64 : <nl> + return v . asInt ( ) ; <nl> + case folly : : dynamic : : Type : : STRING : <nl> + return v . data ( ) ; <nl> + case folly : : dynamic : : Type : : ARRAY : <nl> + case folly : : dynamic : : Type : : OBJECT : <nl> + ArrayInit ret ( v . size ( ) ) ; <nl> + for ( auto & item : v . items ( ) ) { <nl> + ret . add ( dynamic_to_variant ( item . first ) , <nl> + dynamic_to_variant ( item . second ) ) ; <nl> + } <nl> + return ret . toArray ( ) ; <nl> + } <nl> + not_reached ( ) ; <nl> + } <nl> + <nl> + static folly : : dynamic variant_to_dynamic ( const Variant & v ) { <nl> + switch ( v . getType ( ) ) { <nl> + case KindOfUninit : <nl> + case KindOfNull : <nl> + default : <nl> + return nullptr ; <nl> + case KindOfBoolean : <nl> + return v . toBoolean ( ) ; <nl> + case KindOfDouble : <nl> + return v . toDouble ( ) ; <nl> + case KindOfInt64 : <nl> + return v . toInt64 ( ) ; <nl> + case KindOfStaticString : <nl> + case KindOfString : <nl> + return v . toString ( ) . data ( ) ; <nl> + case KindOfArray : <nl> + case KindOfObject : <nl> + case KindOfResource : <nl> + folly : : dynamic ret = folly : : dynamic : : object ; <nl> + for ( ArrayIter iter ( v . toArray ( ) ) ; iter ; + + iter ) { <nl> + ret . insert ( variant_to_dynamic ( iter . first ( ) ) , <nl> + variant_to_dynamic ( iter . second ( ) ) ) ; <nl> + } <nl> + return ret ; <nl> + } <nl> + not_reached ( ) ; <nl> + } <nl> + <nl> + bool IniSetting : : Get ( const String & name , Variant & value ) { <nl> + folly : : dynamic b = nullptr ; <nl> auto ret = Get ( name . toCppString ( ) , b ) ; <nl> - value = b ; <nl> + value = dynamic_to_variant ( b ) ; <nl> return ret ; <nl> } <nl> <nl> std : : string IniSetting : : Get ( const std : : string & name ) { <nl> return ret ; <nl> } <nl> <nl> - static bool ini_set ( const String & name , const Variant & value , <nl> + static bool ini_set ( const std : : string & name , const folly : : dynamic & value , <nl> IniSetting : : Mode mode ) { <nl> CallbackMap : : iterator iter = s_user_callbacks - > find ( name . data ( ) ) ; <nl> if ( iter ! = s_user_callbacks - > end ( ) ) { <nl> if ( ( iter - > second . mode & mode ) & & iter - > second . updateCallback ) { <nl> - return iter - > second . updateCallback ( value . toString ( ) . toCppString ( ) ) ; <nl> + return iter - > second . updateCallback ( value ) ; <nl> } <nl> } <nl> return false ; <nl> } <nl> <nl> - bool IniSetting : : Set ( const String & name , const Variant & value ) { <nl> + bool IniSetting : : Set ( const std : : string & name , const folly : : dynamic & value , <nl> + FollyDynamic ) { <nl> return ini_set ( name , value , static_cast < Mode > ( <nl> PHP_INI_ONLY | PHP_INI_SYSTEM | PHP_INI_PERDIR | PHP_INI_USER | PHP_INI_ALL <nl> ) ) ; <nl> } <nl> <nl> - bool IniSetting : : SetUser ( const String & nameString , const Variant & value ) { <nl> - auto name = nameString . toCppString ( ) ; <nl> + bool IniSetting : : Set ( const String & name , const Variant & value ) { <nl> + return Set ( name . toCppString ( ) , variant_to_dynamic ( value ) , FollyDynamic ( ) ) ; <nl> + } <nl> + <nl> + bool IniSetting : : SetUser ( const std : : string & name , const folly : : dynamic & value , <nl> + FollyDynamic ) { <nl> auto it = s_savedDefaults - > find ( name ) ; <nl> if ( it = = s_savedDefaults - > end ( ) ) { <nl> - Get ( name , ( * s_savedDefaults ) [ name ] ) ; <nl> + folly : : dynamic def = nullptr ; <nl> + auto success = Get ( name , def ) ; <nl> + if ( success ) { <nl> + s_savedDefaults - > insert ( make_pair ( name , def ) ) ; <nl> + } <nl> } <nl> - return ini_set ( nameString , value , static_cast < Mode > ( <nl> + return ini_set ( name , value , static_cast < Mode > ( <nl> PHP_INI_USER | PHP_INI_ALL <nl> ) ) ; <nl> } <nl> <nl> + bool IniSetting : : SetUser ( const String & name , const Variant & value ) { <nl> + return SetUser ( name . toCppString ( ) , variant_to_dynamic ( value ) , FollyDynamic ( ) ) ; <nl> + } <nl> + <nl> Array IniSetting : : GetAll ( const String & ext_name , bool details ) { <nl> Array r = Array : : Create ( ) ; <nl> <nl> Array IniSetting : : GetAll ( const String & ext_name , bool details ) { <nl> continue ; <nl> } <nl> <nl> + auto value = dynamic_to_variant ( iter . second . getCallback ( ) ) ; <nl> + / / Cast all non - arrays to strings since that is what everything used ot be <nl> + if ( ! value . isArray ( ) ) { <nl> + value = value . toString ( ) ; <nl> + } <nl> if ( details ) { <nl> Array item = Array : : Create ( ) ; <nl> - auto value = iter . second . getCallback ( ) ; <nl> item . add ( s_global_value , value ) ; <nl> item . add ( s_local_value , value ) ; <nl> if ( iter . second . mode = = PHP_INI_ALL ) { <nl> Array IniSetting : : GetAll ( const String & ext_name , bool details ) { <nl> } <nl> r . add ( String ( iter . first ) , item ) ; <nl> } else { <nl> - r . add ( String ( iter . first ) , iter . second . getCallback ( ) ) ; <nl> + r . add ( String ( iter . first ) , value ) ; <nl> } <nl> } <nl> return r ; <nl> mmm a / hphp / runtime / base / ini - setting . h <nl> ppp b / hphp / runtime / base / ini - setting . h <nl> namespace HPHP { <nl> <nl> class Extension ; <nl> <nl> - bool ini_on_update ( const std : : string & value , bool & p ) ; <nl> - bool ini_on_update ( const std : : string & value , double & p ) ; <nl> - bool ini_on_update ( const std : : string & value , int16_t & p ) ; <nl> - bool ini_on_update ( const std : : string & value , int32_t & p ) ; <nl> - bool ini_on_update ( const std : : string & value , int64_t & p ) ; <nl> - bool ini_on_update ( const std : : string & value , uint16_t & p ) ; <nl> - bool ini_on_update ( const std : : string & value , uint32_t & p ) ; <nl> - bool ini_on_update ( const std : : string & value , uint64_t & p ) ; <nl> - bool ini_on_update ( const std : : string & value , std : : string & p ) ; <nl> - bool ini_on_update ( const std : : string & value , String & p ) ; <nl> - std : : string ini_get ( bool & p ) ; <nl> - std : : string ini_get ( double & p ) ; <nl> - std : : string ini_get ( int16_t & p ) ; <nl> - std : : string ini_get ( int32_t & p ) ; <nl> - std : : string ini_get ( int64_t & p ) ; <nl> - std : : string ini_get ( uint16_t & p ) ; <nl> - std : : string ini_get ( uint32_t & p ) ; <nl> - std : : string ini_get ( uint64_t & p ) ; <nl> - std : : string ini_get ( std : : string & p ) ; <nl> - std : : string ini_get ( String & p ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , bool & p ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , double & p ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , int16_t & p ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , int32_t & p ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , int64_t & p ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , uint16_t & p ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , uint32_t & p ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , uint64_t & p ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , std : : string & p ) ; <nl> + bool ini_on_update ( const folly : : dynamic & value , String & p ) ; <nl> + folly : : dynamic ini_get ( bool & p ) ; <nl> + folly : : dynamic ini_get ( double & p ) ; <nl> + folly : : dynamic ini_get ( int16_t & p ) ; <nl> + folly : : dynamic ini_get ( int32_t & p ) ; <nl> + folly : : dynamic ini_get ( int64_t & p ) ; <nl> + folly : : dynamic ini_get ( uint16_t & p ) ; <nl> + folly : : dynamic ini_get ( uint32_t & p ) ; <nl> + folly : : dynamic ini_get ( uint64_t & p ) ; <nl> + folly : : dynamic ini_get ( std : : string & p ) ; <nl> + folly : : dynamic ini_get ( String & p ) ; <nl> <nl> class IniSetting { <nl> public : <nl> class IniSetting { <nl> static Map FromStringAsMap ( const std : : string & ini , <nl> const std : : string & filename ) ; <nl> <nl> - static bool Get ( const std : : string & name , std : : string & value ) ; <nl> + static bool Get ( const std : : string & name , folly : : dynamic & value ) ; <nl> + static bool Get ( const std : : string & name , std : : string & value ) ; <nl> + static bool Get ( const String & name , Variant & value ) ; <nl> static bool Get ( const String & name , String & value ) ; <nl> static std : : string Get ( const std : : string & name ) ; <nl> static Array GetAll ( const String & extension , bool details ) ; <nl> <nl> + / / Because folly : : dynamic and Variant are too ambiguous <nl> + enum class FollyDynamic { } ; <nl> / * * <nl> * Change an INI setting as if it was in the php . ini file <nl> * / <nl> + static bool Set ( const std : : string & name , const folly : : dynamic & value , <nl> + FollyDynamic ) ; <nl> static bool Set ( const String & name , const Variant & value ) ; <nl> / * * <nl> * Change an INI setting as if there was a call to ini_set ( ) <nl> * / <nl> + static bool SetUser ( const std : : string & name , const folly : : dynamic & value , <nl> + FollyDynamic ) ; <nl> static bool SetUser ( const String & name , const Variant & value ) ; <nl> <nl> template < class T > <nl> class IniSetting { <nl> static void Bind ( const Extension * extension , const Mode mode , <nl> const char * name , const char * defaultValue , <nl> SetAndGet < T > callbacks , T * p = nullptr ) { <nl> - auto setter = [ callbacks , p ] ( const std : : string & value ) { <nl> + auto setter = [ callbacks , p ] ( const folly : : dynamic & value ) { <nl> T v ; <nl> auto ret = ini_on_update ( value , v ) ; <nl> if ( ! ret ) { <nl> class IniSetting { <nl> private : <nl> static void Bind ( const Extension * extension , const Mode mode , <nl> const char * name , <nl> - std : : function < bool ( const std : : string & value ) > updateCallback , <nl> - std : : function < std : : string ( ) > getCallback ) ; <nl> + std : : function < bool ( const folly : : dynamic & value ) > <nl> + updateCallback , <nl> + std : : function < folly : : dynamic ( ) > getCallback ) ; <nl> } ; <nl> <nl> int64_t convert_bytes_to_long ( const std : : string & value ) ; <nl> mmm a / hphp / runtime / base / program - functions . cpp <nl> ppp b / hphp / runtime / base / program - functions . cpp <nl> void process_ini_settings ( ) { <nl> if ( RuntimeOption : : IniFile . empty ( ) ) { <nl> return ; <nl> } <nl> - auto settings = f_parse_ini_file ( String ( RuntimeOption : : IniFile ) ) ; <nl> - for ( ArrayIter iter ( settings ) ; iter ; + + iter ) { <nl> - IniSetting : : Set ( iter . first ( ) , iter . second ( ) ) ; <nl> + std : : ifstream ifs ( RuntimeOption : : IniFile ) ; <nl> + const std : : string str ( ( std : : istreambuf_iterator < char > ( ifs ) ) , <nl> + std : : istreambuf_iterator < char > ( ) ) ; <nl> + auto settings = IniSetting : : FromStringAsMap ( str , RuntimeOption : : IniFile ) ; <nl> + <nl> + for ( auto & item : settings . items ( ) ) { <nl> + IniSetting : : Set ( item . first . data ( ) , item . second , IniSetting : : FollyDynamic ( ) ) ; <nl> } <nl> } <nl> <nl> new file mode 100644 <nl> index 00000000000 . . 218f38748a2 <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / ext_datetime / empty_ini_get . php . ini <nl> @ @ - 0 , 0 + 1 @ @ <nl> + date . timezone = <nl>
switch back to using Variant
facebook/hhvm
ab8c6f3cb7f010ca19a57ddbc8e067de55f101c3
2014-03-04T19:13:04Z
mmm a / js / server / modules / @ arangodb / cluster . js <nl> ppp b / js / server / modules / @ arangodb / cluster . js <nl> function createLocalCollections ( plannedCollections , planVersion , <nl> servers : [ ourselves ] , <nl> planVersion : planVersion } ; <nl> <nl> - console . error ( ' creating Current / Collections / ' + database + ' / ' + <nl> + console . debug ( ' creating Current / Collections / ' + database + ' / ' + <nl> collInfo . planId + ' / ' + shard ) ; <nl> global . ArangoAgency . set ( ' Current / Collections / ' + database + ' / ' + <nl> collInfo . planId + ' / ' + shard , <nl> payload ) ; <nl> - console . error ( ' creating Current / Collections / ' + database + ' / ' + <nl> + console . debug ( ' creating Current / Collections / ' + database + ' / ' + <nl> collInfo . planId + ' / ' + shard + ' done . ' ) ; <nl> } ; <nl> <nl> function dropLocalCollections ( plannedCollections , currentCollections , <nl> <nl> var dropCollectionAgency = function ( database , shardID , id ) { <nl> try { <nl> - console . error ( ' dropping Current / Collections / ' + database + ' / ' + <nl> + console . debug ( ' dropping Current / Collections / ' + database + ' / ' + <nl> id + ' / ' + shardID ) ; <nl> global . ArangoAgency . remove ( ' Current / Collections / ' + database + ' / ' + id + ' / ' + shardID ) ; <nl> - console . error ( ' dropping Current / Collections / ' + database + ' / ' + <nl> + console . debug ( ' dropping Current / Collections / ' + database + ' / ' + <nl> id + ' / ' + shardID + ' done . ' ) ; <nl> } catch ( err ) { <nl> / / ignore errors <nl> function cleanupCurrentCollections ( plannedCollections , currentCollections , <nl> writeLocked ) { <nl> var dropCollectionAgency = function ( database , collection , shardID ) { <nl> try { <nl> - console . error ( ' cleaning Current / Collections / ' + database + ' / ' + <nl> + console . debug ( ' cleaning Current / Collections / ' + database + ' / ' + <nl> collection + ' / ' + shardID ) ; <nl> global . ArangoAgency . remove ( ' Current / Collections / ' + database + ' / ' + collection + ' / ' + shardID ) ; <nl> - console . error ( ' cleaning Current / Collections / ' + database + ' / ' + <nl> + console . debug ( ' cleaning Current / Collections / ' + database + ' / ' + <nl> collection + ' / ' + shardID + ' done . ' ) ; <nl> } catch ( err ) { <nl> / / ignore errors <nl>
Put some debug messages in log level debug .
arangodb/arangodb
c9cf9a60c87f8468f21fc780820c1f90b1b3bcfc
2016-10-14T16:48:11Z
mmm a / spec / api - web - contents - spec . js <nl> ppp b / spec / api - web - contents - spec . js <nl> <nl> ' use strict ' <nl> <nl> const assert = require ( ' assert ' ) <nl> + const http = require ( ' http ' ) <nl> const path = require ( ' path ' ) <nl> const { closeWindow } = require ( ' . / window - helpers ' ) <nl> <nl> const { ipcRenderer , remote } = require ( ' electron ' ) <nl> - const { BrowserWindow , webContents , ipcMain } = remote <nl> + const { BrowserWindow , webContents , ipcMain , session } = remote <nl> <nl> const isCi = remote . getGlobal ( ' isCi ' ) <nl> <nl> describe ( ' webContents module ' , function ( ) { <nl> } ) <nl> } ) <nl> } ) <nl> + <nl> + describe ( ' zoom api ' , ( ) = > { <nl> + const zoomScheme = remote . getGlobal ( ' zoomScheme ' ) <nl> + const hostZoomMap = { <nl> + ' host1 ' : 0 . 3 , <nl> + ' host2 ' : 0 . 7 , <nl> + ' host3 ' : 0 . 2 <nl> + } <nl> + <nl> + before ( ( done ) = > { <nl> + let protocol = session . defaultSession . protocol <nl> + protocol . registerStringProtocol ( zoomScheme , ( request , callback ) = > { <nl> + let response = ` < script > <nl> + const { ipcRenderer , remote } = require ( ' electron ' ) <nl> + ipcRenderer . send ( ' set - zoom ' , window . location . hostname ) <nl> + ipcRenderer . on ( window . location . hostname + ' - zoom - set ' , ( ) = > { <nl> + remote . getCurrentWebContents ( ) . getZoomLevel ( ( zoomLevel ) = > { <nl> + ipcRenderer . send ( window . location . hostname + ' - zoom - level ' , zoomLevel ) <nl> + } ) <nl> + } ) <nl> + < / script > ` <nl> + callback ( { data : response , mimeType : ' text / html ' } ) <nl> + } , ( error ) = > done ( error ) ) <nl> + } ) <nl> + <nl> + after ( ( done ) = > { <nl> + let protocol = session . defaultSession . protocol <nl> + protocol . unregisterProtocol ( zoomScheme , ( error ) = > done ( error ) ) <nl> + } ) <nl> + <nl> + it ( ' can set the correct zoom level ' , ( done ) = > { <nl> + w . loadURL ( ' about : blank ' ) <nl> + w . webContents . on ( ' did - finish - load ' , ( ) = > { <nl> + w . webContents . getZoomLevel ( ( zoomLevel ) = > { <nl> + assert . equal ( zoomLevel , 0 . 0 ) <nl> + w . webContents . setZoomLevel ( 0 . 5 ) <nl> + w . webContents . getZoomLevel ( ( zoomLevel ) = > { <nl> + assert . equal ( zoomLevel , 0 . 5 ) <nl> + w . webContents . setZoomLevel ( 0 ) <nl> + done ( ) <nl> + } ) <nl> + } ) <nl> + } ) <nl> + } ) <nl> + <nl> + it ( ' can persist zoom level across navigation ' , ( done ) = > { <nl> + let finalNavigation = false <nl> + ipcMain . on ( ' set - zoom ' , ( e , host ) = > { <nl> + let zoomLevel = hostZoomMap [ host ] <nl> + if ( ! finalNavigation ) { <nl> + w . webContents . setZoomLevel ( zoomLevel ) <nl> + } <nl> + e . sender . send ( ` $ { host } - zoom - set ` ) <nl> + } ) <nl> + ipcMain . on ( ' host1 - zoom - level ' , ( e , zoomLevel ) = > { <nl> + let expectedZoomLevel = hostZoomMap [ ' host1 ' ] <nl> + assert . equal ( zoomLevel , expectedZoomLevel ) <nl> + if ( finalNavigation ) { <nl> + done ( ) <nl> + } else { <nl> + w . loadURL ( ` $ { zoomScheme } : / / host2 ` ) <nl> + } <nl> + } ) <nl> + ipcMain . once ( ' host2 - zoom - level ' , ( e , zoomLevel ) = > { <nl> + let expectedZoomLevel = hostZoomMap [ ' host2 ' ] <nl> + assert . equal ( zoomLevel , expectedZoomLevel ) <nl> + finalNavigation = true <nl> + w . webContents . goBack ( ) <nl> + } ) <nl> + w . loadURL ( ` $ { zoomScheme } : / / host1 ` ) <nl> + } ) <nl> + <nl> + it ( ' can propagate zoom level across same session ' , ( done ) = > { <nl> + const w2 = new BrowserWindow ( { <nl> + show : false <nl> + } ) <nl> + w2 . webContents . on ( ' did - finish - load ' , ( ) = > { <nl> + w . webContents . getZoomLevel ( ( zoomLevel1 ) = > { <nl> + assert . equal ( zoomLevel1 , hostZoomMap [ ' host3 ' ] ) <nl> + w2 . webContents . getZoomLevel ( ( zoomLevel2 ) = > { <nl> + assert . equal ( zoomLevel1 , zoomLevel2 ) <nl> + w2 . setClosable ( true ) <nl> + w2 . close ( ) <nl> + done ( ) <nl> + } ) <nl> + } ) <nl> + } ) <nl> + w . webContents . on ( ' did - finish - load ' , ( ) = > { <nl> + w . webContents . setZoomLevel ( hostZoomMap [ ' host3 ' ] ) <nl> + w2 . loadURL ( ` $ { zoomScheme } : / / host3 ` ) <nl> + } ) <nl> + w . loadURL ( ` $ { zoomScheme } : / / host3 ` ) <nl> + } ) <nl> + <nl> + it ( ' can persist when it contains iframe ' , ( done ) = > { <nl> + const server = http . createServer ( function ( req , res ) { <nl> + setTimeout ( ( ) = > { <nl> + res . end ( ) <nl> + } , 2000 ) <nl> + } ) <nl> + server . listen ( 0 , ' 127 . 0 . 0 . 1 ' , function ( ) { <nl> + const url = ' http : / / 127 . 0 . 0 . 1 : ' + server . address ( ) . port <nl> + const content = ` < iframe src = $ { url } > < / iframe > ` <nl> + w . webContents . on ( ' did - frame - finish - load ' , ( e , isMainFrame ) = > { <nl> + if ( ! isMainFrame ) { <nl> + w . webContents . getZoomLevel ( ( zoomLevel ) = > { <nl> + assert . equal ( zoomLevel , 2 . 0 ) <nl> + w . webContents . setZoomLevel ( 0 ) <nl> + server . close ( ) <nl> + done ( ) <nl> + } ) <nl> + } <nl> + } ) <nl> + w . webContents . on ( ' dom - ready ' , ( ) = > { <nl> + w . webContents . setZoomLevel ( 2 . 0 ) <nl> + } ) <nl> + w . loadURL ( ` data : text / html , $ { content } ` ) <nl> + } ) <nl> + } ) <nl> + } ) <nl> } ) <nl> mmm a / spec / static / main . js <nl> ppp b / spec / static / main . js <nl> if ( global . isCi ) { <nl> <nl> / / Register app as standard scheme . <nl> global . standardScheme = ' app ' <nl> - protocol . registerStandardSchemes ( [ global . standardScheme ] , { secure : true } ) <nl> + global . zoomScheme = ' zoom ' <nl> + protocol . registerStandardSchemes ( [ global . standardScheme , global . zoomScheme ] , { secure : true } ) <nl> <nl> app . on ( ' window - all - closed ' , function ( ) { <nl> app . quit ( ) <nl>
add zoom spec
electron/electron
763b9ab8d8aaa93087048db8a282edc5b2f4f102
2017-02-17T20:04:32Z
mmm a / apinotes / Metal . apinotes <nl> ppp b / apinotes / Metal . apinotes <nl> Enumerators : <nl> SwiftName : shared <nl> - Name : MTLTextureUsageUnknown <nl> SwiftName : unknown <nl> + - Name : MTLDataTypeUInt <nl> + SwiftName : uint <nl> + - Name : MTLDataTypeUInt2 <nl> + SwiftName : uint2 <nl> + - Name : MTLDataTypeUInt3 <nl> + SwiftName : uint3 <nl> + - Name : MTLDataTypeUInt4 <nl> + SwiftName : uint4 <nl> + - Name : MTLDataTypeUShort <nl> + SwiftName : ushort <nl> + - Name : MTLDataTypeUShort2 <nl> + SwiftName : ushort2 <nl> + - Name : MTLDataTypeUShort3 <nl> + SwiftName : ushort3 <nl> + - Name : MTLDataTypeUShort4 <nl> + SwiftName : ushort4 <nl> + - Name : MTLDataTypeUChar <nl> + SwiftName : uchar <nl> + - Name : MTLDataTypeUChar2 <nl> + SwiftName : uchar2 <nl> + - Name : MTLDataTypeUChar3 <nl> + SwiftName : uchar3 <nl> + - Name : MTLDataTypeUChar4 <nl> + SwiftName : uchar4 <nl> + - Name : MTLPixelFormatRGBA8Unorm_sRGB <nl> + SwiftName : rgba8Unorm_srgb <nl> + - Name : MTLPixelFormatBGRA8Unorm_sRGB <nl> + SwiftName : bgra8Unorm_srgb <nl> + - Name : MTLPixelFormatRGB10A2Unorm <nl> + SwiftName : rgb10a2Unorm <nl> + - Name : MTLPixelFormatRGB10A2Uint <nl> + SwiftName : rgb10a2Uint <nl> + - Name : MTLPixelFormatRG11B10Float <nl> + SwiftName : rg11b10Float <nl> + - Name : MTLPixelFormatRGB9E5Float <nl> + SwiftName : rgb9e5Float <nl> + - Name : MTLPixelFormatBC1_RGBA <nl> + SwiftName : bc1_rgba <nl> + - Name : MTLPixelFormatBC1_RGBA_sRGB <nl> + SwiftName : bc1_rgba_srgb <nl> + - Name : MTLPixelFormatBC2_RGBA <nl> + SwiftName : bc2_rgba <nl> + - Name : MTLPixelFormatBC2_RGBA_sRGB <nl> + SwiftName : bc2_rgba_srgb <nl> + - Name : MTLPixelFormatBC3_RGBA <nl> + SwiftName : bc3_rgba <nl> + - Name : MTLPixelFormatBC3_RGBA_sRGB <nl> + SwiftName : bc3_rgba_srgb <nl> + - Name : MTLPixelFormatBC4_RUnorm <nl> + SwiftName : bc4_rUnorm <nl> + - Name : MTLPixelFormatBC4_RSnorm <nl> + SwiftName : bc4_rSnorm <nl> + - Name : MTLPixelFormatBC5_RGUnorm <nl> + SwiftName : bc5_rgUnorm <nl> + - Name : MTLPixelFormatBC5_RGSnorm <nl> + SwiftName : bc5_rgSnorm <nl> + - Name : MTLPixelFormatBC6H_RGBFloat <nl> + SwiftName : bc6H_rgbFloat <nl> + - Name : MTLPixelFormatBC6H_RGBUfloat <nl> + SwiftName : bc6H_rgbuFloat <nl> + - Name : MTLPixelFormatBC7_RGBAUnorm <nl> + SwiftName : bc7_rgbaUnorm <nl> + - Name : MTLPixelFormatBC7_RGBAUnorm_sRGB <nl> + SwiftName : bc7_rgbaUnorm_srgb <nl> + - Name : MTLPixelFormatGBGR422 <nl> + SwiftName : gbgr422 <nl> + - Name : MTLPixelFormatBGRG422 <nl> + SwiftName : bgrg422 <nl> + - Name : MTLPixelFormatDepth24Unorm_Stencil8 <nl> + SwiftName : depth24Unorm_stencil8 <nl> + - Name : MTLPixelFormatDepth32Float_Stencil8 <nl> + SwiftName : depth32Float_stencil8 <nl> + - Name : MTLPixelFormatX32_Stencil8 <nl> + SwiftName : x32_stencil8 <nl> + - Name : MTLPixelFormatX24_Stencil8 <nl> + SwiftName : x24_stencil8 <nl> + - Name : MTLPixelFormatR8Unorm_sRGB <nl> + SwiftName : r8Unorm_srgb <nl> + - Name : MTLPixelFormatRG8Unorm_sRGB <nl> + SwiftName : rg8Unorm_srgb <nl> + - Name : MTLPixelFormatB5G6R5Unorm <nl> + SwiftName : b5g6r5Unorm <nl> + - Name : MTLPixelFormatA1BGR5Unorm <nl> + SwiftName : a1bgr5Unorm <nl> + - Name : MTLPixelFormatBGR10_XR <nl> + SwiftName : bgr10_xr <nl> + - Name : MTLPixelFormatBGR10_XR_sRGB <nl> + SwiftName : bgr10_xr_srgb <nl> + - Name : MTLPixelFormatPVRTC_RGB_2BPP <nl> + SwiftName : pvrtc_rgb_2bpp <nl> + - Name : MTLPixelFormatPVRTC_RGB_2BPP_sRGB <nl> + SwiftName : pvrtc_rgb_2bpp_srgb <nl> + - Name : MTLPixelFormatPVRTC_RGB_4BPP <nl> + SwiftName : pvrtc_rgb_4bpp <nl> + - Name : MTLPixelFormatPVRTC_RGB_4BPP_sRGB <nl> + SwiftName : pvrtc_rgb_4bpp_srgb <nl> + - Name : MTLPixelFormatPVRTC_RGBA_2BPP <nl> + SwiftName : pvrtc_rgba_2bpp <nl> + - Name : MTLPixelFormatPVRTC_RGBA_2BPP_sRGB <nl> + SwiftName : pvrtc_rgba_2bpp_srgb <nl> + - Name : MTLPixelFormatPVRTC_RGBA_4BPP <nl> + SwiftName : pvrtc_rgba_4bpp <nl> + - Name : MTLPixelFormatPVRTC_RGBA_4BPP_sRGB <nl> + SwiftName : pvrtc_rgba_4bpp_srgb <nl> + - Name : MTLPixelFormatEAC_R11Unorm <nl> + SwiftName : eac_r11Unorm <nl> + - Name : MTLPixelFormatEAC_R11Snorm <nl> + SwiftName : eac_r11Snorm <nl> + - Name : MTLPixelFormatEAC_RG11Unorm <nl> + SwiftName : eac_rg11Unorm <nl> + - Name : MTLPixelFormatEAC_RG11Snorm <nl> + SwiftName : eac_rg11Snorm <nl> + - Name : MTLPixelFormatEAC_RGBA8 <nl> + SwiftName : eac_rgba8 <nl> + - Name : MTLPixelFormatEAC_RGBA8_sRGB <nl> + SwiftName : eac_rgba8_srgb <nl> + - Name : MTLPixelFormatETC2_RGB8 <nl> + SwiftName : etc2_rgb8 <nl> + - Name : MTLPixelFormatETC2_RGB8_sRGB <nl> + SwiftName : etc2_rgb8_srgb <nl> + - Name : MTLPixelFormatETC2_RGB8A1 <nl> + SwiftName : etc2_rgb8a1 <nl> + - Name : MTLPixelFormatETC2_RGB8A1_sRGB <nl> + SwiftName : etc2_rgb8a1_srgb <nl> + - Name : MTLPixelFormatASTC_4x4_sRGB <nl> + SwiftName : astc_4x4_srgb <nl> + - Name : MTLPixelFormatASTC_5x4_sRGB <nl> + SwiftName : astc_5x4_srgb <nl> + - Name : MTLPixelFormatASTC_5x5_sRGB <nl> + SwiftName : astc_5x5_srgb <nl> + - Name : MTLPixelFormatASTC_6x5_sRGB <nl> + SwiftName : astc_6x5_srgb <nl> + - Name : MTLPixelFormatASTC_6x6_sRGB <nl> + SwiftName : astc_6x6_srgb <nl> + - Name : MTLPixelFormatASTC_8x5_sRGB <nl> + SwiftName : astc_8x5_srgb <nl> + - Name : MTLPixelFormatASTC_8x6_sRGB <nl> + SwiftName : astc_8x6_srgb <nl> + - Name : MTLPixelFormatASTC_8x8_sRGB <nl> + SwiftName : astc_8x8_srgb <nl> + - Name : MTLPixelFormatASTC_10x5_sRGB <nl> + SwiftName : astc_10x5_srgb <nl> + - Name : MTLPixelFormatASTC_10x6_sRGB <nl> + SwiftName : astc_10x6_srgb <nl> + - Name : MTLPixelFormatASTC_10x8_sRGB <nl> + SwiftName : astc_10x8_srgb <nl> + - Name : MTLPixelFormatASTC_10x10_sRGB <nl> + SwiftName : astc_10x10_srgb <nl> + - Name : MTLPixelFormatASTC_12x10_sRGB <nl> + SwiftName : astc_12x10_srgb <nl> + - Name : MTLPixelFormatASTC_12x12_sRGB <nl> + SwiftName : astc_12x12_srgb <nl> + - Name : MTLPixelFormatASTC_4x4_LDR <nl> + SwiftName : astc_4x4_ldr <nl> + - Name : MTLPixelFormatASTC_5x4_LDR <nl> + SwiftName : astc_5x4_ldr <nl> + - Name : MTLPixelFormatASTC_5x5_LDR <nl> + SwiftName : astc_5x5_ldr <nl> + - Name : MTLPixelFormatASTC_6x5_LDR <nl> + SwiftName : astc_6x5_ldr <nl> + - Name : MTLPixelFormatASTC_6x6_LDR <nl> + SwiftName : astc_6x6_ldr <nl> + - Name : MTLPixelFormatASTC_8x5_LDR <nl> + SwiftName : astc_8x5_ldr <nl> + - Name : MTLPixelFormatASTC_8x6_LDR <nl> + SwiftName : astc_8x6_ldr <nl> + - Name : MTLPixelFormatASTC_8x8_LDR <nl> + SwiftName : astc_8x8_ldr <nl> + - Name : MTLPixelFormatASTC_10x5_LDR <nl> + SwiftName : astc_10x5_ldr <nl> + - Name : MTLPixelFormatASTC_10x6_LDR <nl> + SwiftName : astc_10x6_ldr <nl> + - Name : MTLPixelFormatASTC_10x8_LDR <nl> + SwiftName : astc_10x8_ldr <nl> + - Name : MTLPixelFormatASTC_10x10_LDR <nl> + SwiftName : astc_10x10_ldr <nl> + - Name : MTLPixelFormatASTC_12x10_LDR <nl> + SwiftName : astc_12x10_ldr <nl> + - Name : MTLPixelFormatASTC_12x12_LDR <nl> + SwiftName : astc_12x12_ldr <nl> + - Name : MTLTessellationControlPointIndexTypeUInt16 <nl> + SwiftName : uint16 <nl> + - Name : MTLTessellationControlPointIndexTypeUInt32 <nl> + SwiftName : uint32 <nl> + - Name : MTLAttributeFormatUChar2 <nl> + SwiftName : uchar2 <nl> + - Name : MTLAttributeFormatUChar3 <nl> + SwiftName : uchar3 <nl> + - Name : MTLAttributeFormatUChar4 <nl> + SwiftName : uchar4 <nl> + - Name : MTLAttributeFormatUChar2Normalized <nl> + SwiftName : uchar2Normalized <nl> + - Name : MTLAttributeFormatUChar3Normalized <nl> + SwiftName : uchar3Normalized <nl> + - Name : MTLAttributeFormatUChar4Normalized <nl> + SwiftName : uchar4Normalized <nl> + - Name : MTLAttributeFormatUShort2 <nl> + SwiftName : ushort2 <nl> + - Name : MTLAttributeFormatUShort3 <nl> + SwiftName : ushort3 <nl> + - Name : MTLAttributeFormatUShort4 <nl> + SwiftName : ushort4 <nl> + - Name : MTLAttributeFormatUShort2Normalized <nl> + SwiftName : ushort2Normalized <nl> + - Name : MTLAttributeFormatUShort3Normalized <nl> + SwiftName : ushort3Normalized <nl> + - Name : MTLAttributeFormatUShort4Normalized <nl> + SwiftName : ushort4Normalized <nl> + - Name : MTLAttributeFormatUInt <nl> + SwiftName : uint <nl> + - Name : MTLAttributeFormatUInt2 <nl> + SwiftName : uint2 <nl> + - Name : MTLAttributeFormatUInt3 <nl> + SwiftName : uint3 <nl> + - Name : MTLAttributeFormatUInt4 <nl> + SwiftName : uint4 <nl> + - Name : MTLIndexTypeUInt16 <nl> + SwiftName : uint16 <nl> + - Name : MTLIndexTypeUInt32 <nl> + SwiftName : uint32 <nl> + - Name : MTLVertexFormatUChar2 <nl> + SwiftName : uchar2 <nl> + - Name : MTLVertexFormatUChar3 <nl> + SwiftName : uchar3 <nl> + - Name : MTLVertexFormatUChar4 <nl> + SwiftName : uchar4 <nl> + - Name : MTLVertexFormatUChar2Normalized <nl> + SwiftName : uchar2Normalized <nl> + - Name : MTLVertexFormatUChar3Normalized <nl> + SwiftName : uchar3Normalized <nl> + - Name : MTLVertexFormatUChar4Normalized <nl> + SwiftName : uchar4Normalized <nl> + - Name : MTLVertexFormatUShort2 <nl> + SwiftName : ushort2 <nl> + - Name : MTLVertexFormatUShort3 <nl> + SwiftName : ushort3 <nl> + - Name : MTLVertexFormatUShort4 <nl> + SwiftName : ushort4 <nl> + - Name : MTLVertexFormatUShort2Normalized <nl> + SwiftName : ushort2Normalized <nl> + - Name : MTLVertexFormatUShort3Normalized <nl> + SwiftName : ushort3Normalized <nl> + - Name : MTLVertexFormatUShort4Normalized <nl> + SwiftName : ushort4Normalized <nl> + - Name : MTLVertexFormatUInt <nl> + SwiftName : uint <nl> + - Name : MTLVertexFormatUInt2 <nl> + SwiftName : uint2 <nl> + - Name : MTLVertexFormatUInt3 <nl> + SwiftName : uint3 <nl> + - Name : MTLVertexFormatUInt4 <nl> + SwiftName : uint4 <nl> + - Name : MTLVertexFormatUInt1010102Normalized <nl> + SwiftName : uint1010102Normalized <nl> + Classes : <nl> + - Name : MTLStructType <nl> + Methods : <nl> + - Selector : ' memberByName : ' <nl> + SwiftName : memberByName ( _ : ) <nl> + MethodKind : Instance <nl> + - Name : MTLTextureDescriptor <nl> + Methods : <nl> + - Selector : ' texture2DDescriptorWithPixelFormat : width : height : mipmapped : ' <nl> + SwiftName : texture2DDescriptor ( pixelFormat : width : height : mipmapped : ) <nl> + MethodKind : Class <nl> + - Selector : ' textureCubeDescriptorWithPixelFormat : size : mipmapped : ' <nl> + SwiftName : textureCubeDescriptor ( pixelFormat : size : mipmapped : ) <nl> + MethodKind : Class <nl> + Protocols : <nl> + - Name : MTLBlitCommandEncoder <nl> + Methods : <nl> + - Selector : ' synchronizeResource : ' <nl> + SwiftName : synchronize ( resource : ) <nl> + MethodKind : Instance <nl> + - Selector : ' synchronizeTexture : slice : level : ' <nl> + SwiftName : synchronize ( texture : slice : level : ) <nl> + MethodKind : Instance <nl> + - Selector : ' fillBuffer : range : value : ' <nl> + SwiftName : fill ( buffer : range : value : ) <nl> + MethodKind : Instance <nl> + - Selector : ' updateFence : ' <nl> + SwiftName : updateFence ( _ : ) <nl> + MethodKind : Instance <nl> + - Selector : ' waitForFence : ' <nl> + SwiftName : waitForFence ( _ : ) <nl> + MethodKind : Instance <nl> + - Name : MTLBuffer <nl> + Methods : <nl> + - Selector : ' newTextureWithDescriptor : offset : bytesPerRow : ' <nl> + SwiftName : makeTexture ( descriptor : offset : bytesPerRow : ) <nl> + MethodKind : Instance <nl> + - Name : MTLCommandBuffer <nl> + Methods : <nl> + - Selector : ' blitCommandEncoder ' <nl> + SwiftName : makeBlitCommandEncoder ( ) <nl> + MethodKind : Instance <nl> + - Selector : ' renderCommandEncoderWithDescriptor : ' <nl> + SwiftName : makeRenderCommandEncoder ( descriptor : ) <nl> + MethodKind : Instance <nl> + - Selector : ' computeCommandEncoder ' <nl> + SwiftName : makeComputeCommandEncoder ( ) <nl> + MethodKind : Instance <nl> + - Selector : ' parallelRenderCommandEncoderWithDescriptor : ' <nl> + SwiftName : makeParallelRenderCommandEncoder ( descriptor : ) <nl> + MethodKind : Instance <nl> + - Name : MTLCommandQueue <nl> + Methods : <nl> + - Selector : ' commandBuffer ' <nl> + SwiftName : makeCommandBuffer ( ) <nl> + MethodKind : Instance <nl> + - Selector : ' commandBufferWithUnretainedReferences ' <nl> + SwiftName : makeCommandBufferWithUnretainedReferences ( ) <nl> + MethodKind : Instance <nl> + - Name : MTLComputeCommandEncoder <nl> + Methods : <nl> + - Selector : ' setStageInRegion : ' <nl> + SwiftName : setStageInRegion ( _ : ) <nl> + MethodKind : Instance <nl> + - Selector : ' dispatchThreadgroupsWithIndirectBuffer : indirectBufferOffset : threadsPerThreadgroup : ' <nl> + SwiftName : dispatchThreadgroups ( indirectBuffer : indirectBufferOffset : threadsPerThreadgroup : ) <nl> + MethodKind : Instance <nl> + - Selector : ' updateFence : ' <nl> + SwiftName : updateFence ( _ : ) <nl> + MethodKind : Instance <nl> + - Selector : ' waitForFence : ' <nl> + SwiftName : waitForFence ( _ : ) <nl> + MethodKind : Instance <nl> + - Name : MTLDevice <nl> + Methods : <nl> + - Selector : ' newDefaultLibraryWithBundle : error : ' <nl> + SwiftName : makeDefaultLibrary ( bundle : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newDefaultLibrary ' <nl> + SwiftName : makeDefaultLibrary <nl> + MethodKind : Instance <nl> + - Selector : ' newLibraryWithFile : error : ' <nl> + SwiftName : makeLibrary ( filepath : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newLibraryWithData : error : ' <nl> + SwiftName : makeLibrary ( data : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newLibraryWithSource : options : error : ' <nl> + SwiftName : makeLibrary ( source : options : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newLibraryWithSource : options : completionHandler : ' <nl> + SwiftName : makeLibrary ( source : options : completionHandler : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newRenderPipelineStateWithDescriptor : completionHandler : ' <nl> + SwiftName : makeRenderPipelineState ( descriptor : completionHandler : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newRenderPipelineStateWithDescriptor : options : completionHandler : ' <nl> + SwiftName : makeRenderPipelineState ( descriptor : options : completionHandler : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newRenderPipelineStateWithDescriptor : error : ' <nl> + SwiftName : makeRenderPipelineState ( descriptor : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newRenderPipelineStateWithDescriptor : options : reflection : error : ' <nl> + SwiftName : makeRenderPipelineState ( descriptor : options : reflection : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newComputePipelineStateWithFunction : completionHandler : ' <nl> + SwiftName : makeComputePipelineState ( function : completionHandler : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newComputePipelineStateWithFunction : options : completionHandler : ' <nl> + SwiftName : makeComputePipelineState ( function : options : completionHandler : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newComputePipelineStateWithFunction : error : ' <nl> + SwiftName : makeComputePipelineState ( function : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newComputePipelineStateWithFunction : options : reflection : error : ' <nl> + SwiftName : makeComputePipelineState ( function : options : reflection : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newComputePipelineStateWithDescriptor : options : completionHandler : ' <nl> + SwiftName : makeComputePipelineState ( descriptor : options : completionHandler : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newComputePipelineStateWithDescriptor : options : reflection : error : ' <nl> + SwiftName : makeComputePipelineState ( descriptor : options : reflection : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newCommandQueue ' <nl> + SwiftName : makeCommandQueue ( ) <nl> + MethodKind : Instance <nl> + - Selector : ' newCommandQueueWithMaxCommandBufferCount : ' <nl> + SwiftName : makeCommandQueue ( maxCommandBufferCount : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newBufferWithLength : options : ' <nl> + SwiftName : makeBuffer ( length : options : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newBufferWithBytes : length : options : ' <nl> + SwiftName : makeBuffer ( bytes : length : options : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newBufferWithBytesNoCopy : length : options : deallocator : ' <nl> + SwiftName : makeBuffer ( bytesNoCopy : length : options : deallocator : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newDepthStencilStateWithDescriptor : ' <nl> + SwiftName : makeDepthStencilState ( descriptor : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newTextureWithDescriptor : ' <nl> + SwiftName : makeTexture ( descriptor : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newTextureWithDescriptor : iosurface : plane : ' <nl> + SwiftName : makeTexture ( descriptor : iosurface : plane : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newHeapWithDescriptor : ' <nl> + SwiftName : makeHeap ( descriptor : ) <nl> + MethodKind : Instance <nl> + - Selector : ' heapBufferSizeAndAlignWithLength : options : ' <nl> + SwiftName : heapBufferSizeAndAlign ( length : options : ) <nl> + MethodKind : Instance <nl> + - Selector : ' heapTextureSizeAndAlignWithDescriptor : ' <nl> + SwiftName : heapTextureSizeAndAlign ( descriptor : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newFence ' <nl> + SwiftName : makeFence ( ) <nl> + MethodKind : Instance <nl> + - Selector : ' newSamplerStateWithDescriptor : ' <nl> + SwiftName : makeSamplerState ( descriptor : ) <nl> + MethodKind : Instance <nl> + - Name : MTLDrawable <nl> + Methods : <nl> + - Selector : ' presentAtTime : ' <nl> + SwiftName : present ( at : ) <nl> + MethodKind : Instance <nl> + - Name : MTLHeap <nl> + Methods : <nl> + - Selector : ' maxAvailableSizeWithAlignment : ' <nl> + SwiftName : maxAvailableSize ( alignment : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newBufferWithLength : options : ' <nl> + SwiftName : makeBuffer ( length : options : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newTextureWithDescriptor : ' <nl> + SwiftName : makeTexture ( descriptor : ) <nl> + MethodKind : Instance <nl> + - Name : MTLLibrary <nl> + Methods : <nl> + - Selector : ' newFunctionWithName : ' <nl> + SwiftName : makeFunction ( name : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newFunctionWithName : constantValues : completionHandler : ' <nl> + SwiftName : makeFunction ( name : constantValues : completionHandler : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newFunctionWithName : constantValues : error : ' <nl> + SwiftName : makeFunction ( name : constantValues : ) <nl> + MethodKind : Instance <nl> + - Name : MTLParallelRenderCommandEncoder <nl> + Methods : <nl> + - Selector : ' renderCommandEncoder ' <nl> + SwiftName : makeRenderCommandEncoder ( ) <nl> + MethodKind : Instance <nl> + - Name : MTLRenderCommandEncoder <nl> + Methods : <nl> + - Selector : ' setBlendColorRed : green : blue : alpha : ' <nl> + SwiftName : setBlendColor ( red : green : blue : alpha : ) <nl> + MethodKind : Instance <nl> + - Selector : ' setStencilFrontReferenceValue : backReferenceValue : ' <nl> + SwiftName : setStencilReferenceValues ( front : back : ) <nl> + MethodKind : Instance <nl> + - Selector : ' drawPatches : patchStart : patchCount : patchIndexBuffer : patchIndexBufferOffset : instanceCount : baseInstance : ' <nl> + SwiftName : drawPatches ( numberOfPatchControlPoints : patchStart : patchCount : patchIndexBuffer : patchIndexBufferOffset : instanceCount : baseInstance : ) <nl> + MethodKind : Instance <nl> + - Selector : ' drawPatches : patchIndexBuffer : patchIndexBufferOffset : indirectBuffer : indirectBufferOffset : ' <nl> + SwiftName : drawPatches ( numberOfPatchControlPoints : patchIndexBuffer : patchIndexBufferOffset : indirectBuffer : indirectBufferOffset : ) <nl> + MethodKind : Instance <nl> + - Selector : ' drawIndexedPatches : patchStart : patchCount : patchIndexBuffer : patchIndexBufferOffset : controlPointIndexBuffer : controlPointIndexBufferOffset : instanceCount : baseInstance : ' <nl> + SwiftName : drawIndexedPatches ( numberOfPatchControlPoints : patchStart : patchCount : patchIndexBuffer : patchIndexBufferOffset : controlPointIndexBuffer : controlPointIndexBufferOffset : instanceCount : baseInstance : ) <nl> + MethodKind : Instance <nl> + - Selector : ' drawIndexedPatches : patchIndexBuffer : patchIndexBufferOffset : controlPointIndexBuffer : controlPointIndexBufferOffset : indirectBuffer : indirectBufferOffset : ' <nl> + SwiftName : drawIndexedPatches ( numberOfPatchControlPoints : patchIndexBuffer : patchIndexBufferOffset : controlPointIndexBuffer : controlPointIndexBufferOffset : indirectBuffer : indirectBufferOffset : ) <nl> + MethodKind : Instance <nl> + - Selector : ' drawPrimitives : vertexStart : vertexCount : instanceCount : baseInstance : ' <nl> + SwiftName : drawPrimitives ( type : vertexStart : vertexCount : instanceCount : baseInstance : ) <nl> + MethodKind : Instance <nl> + - Selector : ' drawPrimitives : vertexStart : vertexCount : instanceCount : ' <nl> + SwiftName : drawPrimitives ( type : vertexStart : vertexCount : instanceCount : ) <nl> + MethodKind : Instance <nl> + - Selector : ' drawPrimitives : vertexStart : vertexCount : ' <nl> + SwiftName : drawPrimitives ( type : vertexStart : vertexCount : ) <nl> + MethodKind : Instance <nl> + - Selector : ' drawPrimitives : indirectBuffer : indirectBufferOffset : ' <nl> + SwiftName : drawPrimitives ( type : indirectBuffer : indirectBufferOffset : ) <nl> + MethodKind : Instance <nl> + - Selector : ' drawIndexedPrimitives : indexCount : indexType : indexBuffer : indexBufferOffset : instanceCount : baseVertex : baseInstance : ' <nl> + SwiftName : drawIndexedPrimitives ( type : indexCount : indexType : indexBuffer : indexBufferOffset : instanceCount : baseVertex : baseInstance : ) <nl> + MethodKind : Instance <nl> + - Selector : ' drawIndexedPrimitives : indexCount : indexType : indexBuffer : indexBufferOffset : instanceCount : ' <nl> + SwiftName : drawIndexedPrimitives ( type : indexCount : indexType : indexBuffer : indexBufferOffset : instanceCount : ) <nl> + MethodKind : Instance <nl> + - Selector : ' drawIndexedPrimitives : indexCount : indexType : indexBuffer : indexBufferOffset : ' <nl> + SwiftName : drawIndexedPrimitives ( type : indexCount : indexType : indexBuffer : indexBufferOffset : ) <nl> + MethodKind : Instance <nl> + - Selector : ' drawIndexedPrimitives : indexType : indexBuffer : indexBufferOffset : indirectBuffer : indirectBufferOffset : ' <nl> + SwiftName : drawIndexedPrimitives ( type : indexType : indexBuffer : indexBufferOffset : indirectBuffer : indirectBufferOffset : ) <nl> + MethodKind : Instance <nl> + - Selector : ' updateFence : afterStages : ' <nl> + SwiftName : updateFence ( after : ) <nl> + MethodKind : Instance <nl> + - Selector : ' waitForFence : beforeStages : ' <nl> + SwiftName : waitForFence ( before : ) <nl> + MethodKind : Instance <nl> + - Name : MTLTexture <nl> + Methods : <nl> + - Selector : ' newTextureViewWithPixelFormat : ' <nl> + SwiftName : makeTextureView ( pixelFormat : ) <nl> + MethodKind : Instance <nl> + - Selector : ' newTextureViewWithPixelFormat : textureType : levels : slices : ' <nl> + SwiftName : makeTextureView ( pixelFormat : textureType : levels : slices : ) <nl> + MethodKind : Instance <nl> + - Selector : ' replaceRegion : mipmapLevel : withBytes : bytesPerRow : ' <nl> + SwiftName : replace ( region : mipmapLevel : withBytes : bytesPerRow : ) <nl> + MethodKind : Instance <nl> + - Selector : ' replaceRegion : mipmapLevel : slice : withBytes : bytesPerRow : bytesPerImage : ' <nl> + SwiftName : replace ( region : mipmapLevel : slice : withBytes : bytesPerRow : bytesPerImage : ) <nl> + MethodKind : Instance <nl>
[ overlay ] updating Metal API via apinotes
apple/swift
802a95384daa3963e69d7902f265cacd60dffc73
2016-08-16T23:32:26Z
mmm a / lib / IDE / CodeCompletion . cpp <nl> ppp b / lib / IDE / CodeCompletion . cpp <nl> class CompletionLookup final : public swift : : VisibleDeclConsumer { <nl> <nl> if ( ! D - > hasType ( ) ) <nl> TypeResolver - > resolveDeclSignature ( D ) ; <nl> + else if ( isa < TypeAliasDecl > ( D ) ) { <nl> + / / A TypeAliasDecl might have type set , but not the underlying type . <nl> + TypeResolver - > resolveDeclSignature ( D ) ; <nl> + } <nl> <nl> switch ( Kind ) { <nl> case LookupKind : : ValueExpr : <nl>
Code completion : always validate typealiases
apple/swift
006dcecb619cbb75b849890e37312e303f447ef6
2014-10-01T15:39:20Z
mmm a / xbmc / cores / AudioEngine / Sinks / AESinkAUDIOTRACK . cpp <nl> ppp b / xbmc / cores / AudioEngine / Sinks / AESinkAUDIOTRACK . cpp <nl> void CAESinkAUDIOTRACK : : Deinitialize ( ) <nl> if ( ! m_at_jni ) <nl> return ; <nl> <nl> - uint64_t before = CurrentHostCounter ( ) ; <nl> if ( IsInitialized ( ) ) <nl> { <nl> - m_at_jni - > stop ( ) ; <nl> + m_at_jni - > pause ( ) ; <nl> m_at_jni - > flush ( ) ; <nl> } <nl> m_at_jni - > release ( ) ; <nl> void CAESinkAUDIOTRACK : : Deinitialize ( ) <nl> <nl> delete m_at_jni ; <nl> m_at_jni = NULL ; <nl> - uint64_t gone = CurrentHostCounter ( ) - before ; <nl> - uint64_t delta_ms = 1000 * gone / CurrentHostFrequency ( ) ; <nl> - int64_t diff = m_audiotrackbuffer_sec * 1000 - delta_ms ; <nl> - if ( diff > 0 ) <nl> - { <nl> - CLog : : Log ( LOGDEBUG , " Flushing might not be properly implemented , sleeping : % d ms " , diff ) ; <nl> - usleep ( diff * 1000 ) ; <nl> - } <nl> m_delay = 0 . 0 ; <nl> } <nl> <nl> void CAESinkAUDIOTRACK : : Drain ( ) <nl> <nl> CLog : : Log ( LOGDEBUG , " Draining Audio " ) ; <nl> m_at_jni - > stop ( ) ; <nl> + m_at_jni - > pause ( ) ; <nl> m_duration_written = 0 ; <nl> m_headPos = 0 ; <nl> m_linearmovingaverage . clear ( ) ; <nl> mmm a / xbmc / cores / AudioEngine / Sinks / AESinkPULSE . cpp <nl> ppp b / xbmc / cores / AudioEngine / Sinks / AESinkPULSE . cpp <nl> void CAESinkPULSE : : Deinitialize ( ) <nl> m_maxLatency = 0 . 0 ; <nl> <nl> if ( m_Stream ) <nl> - Drain ( ) ; <nl> + { <nl> + CSingleExit exit ( m_sec ) ; <nl> + pa_threaded_mainloop_lock ( m_MainLoop ) ; <nl> + WaitForOperation ( pa_stream_flush ( m_Stream , NULL , NULL ) , m_MainLoop , " Flush " ) ; <nl> + pa_threaded_mainloop_unlock ( m_MainLoop ) ; <nl> + } <nl> <nl> { <nl> CSingleExit exit ( m_sec ) ; <nl> void CAESinkPULSE : : Drain ( ) <nl> <nl> pa_threaded_mainloop_lock ( m_MainLoop ) ; <nl> WaitForOperation ( pa_stream_drain ( m_Stream , NULL , NULL ) , m_MainLoop , " Drain " ) ; <nl> + WaitForOperation ( pa_stream_cork ( m_Stream , 1 , NULL , NULL ) , m_MainLoop , " Pause " ) ; <nl> + m_IsStreamPaused = true ; <nl> pa_threaded_mainloop_unlock ( m_MainLoop ) ; <nl> } <nl> <nl>
Merge pull request from fritsch / fixdrain
xbmc/xbmc
6e710cf22fdfff514548dd1c9a1f5ffc4dc49423
2019-11-26T08:37:49Z
mmm a / docs / api / structures / rectangle . md <nl> ppp b / docs / api / structures / rectangle . md <nl> <nl> # Rectangle Object <nl> <nl> - * ` x ` Number - The x coordinate of the origin of the rectangle <nl> - * ` y ` Number - The y coordinate of the origin of the rectangle <nl> - * ` width ` Number <nl> - * ` height ` Number <nl> + * ` x ` Number - The x coordinate of the origin of the rectangle ( must be an integer ) <nl> + * ` y ` Number - The y coordinate of the origin of the rectangle ( must be an integer ) <nl> + * ` width ` Number - The width of the rectangle ( must be an integer ) <nl> + * ` height ` Number - The height of the rectangle ( must be an integer ) <nl>
Merge pull request from brianfajardo / patch - 1
electron/electron
f91409b2e83c050c49cbded6082eae4d0a8a7c68
2017-06-13T18:53:49Z
mmm a / xbmc / pvr / windows / GUIWindowPVRBase . cpp <nl> ppp b / xbmc / pvr / windows / GUIWindowPVRBase . cpp <nl> <nl> using namespace PVR ; <nl> using namespace EPG ; <nl> <nl> - std : : map < bool , std : : string > CGUIWindowPVRBase : : m_selectedItemPath ; <nl> + std : : map < bool , std : : string > CGUIWindowPVRBase : : m_selectedItemPaths ; <nl> <nl> CGUIWindowPVRBase : : CGUIWindowPVRBase ( bool bRadio , int id , const std : : string & xmlFile ) : <nl> CGUIMediaWindow ( id , xmlFile . c_str ( ) ) , <nl> m_bRadio ( bRadio ) <nl> { <nl> - m_selectedItemPath [ false ] = " " ; <nl> - m_selectedItemPath [ true ] = " " ; <nl> + m_selectedItemPaths [ false ] = " " ; <nl> + m_selectedItemPaths [ true ] = " " ; <nl> } <nl> <nl> CGUIWindowPVRBase : : ~ CGUIWindowPVRBase ( void ) <nl> void CGUIWindowPVRBase : : OnInitWindow ( void ) <nl> <nl> / / use the path of the current playing channel if no previous selection exists <nl> / / to mark the corresponding item in the list as selected <nl> - if ( m_selectedItemPath . empty ( ) & & g_PVRManager . IsPlaying ( ) ) <nl> - m_selectedItemPath . at ( m_bRadio ) = g_application . CurrentFile ( ) ; <nl> + if ( m_selectedItemPaths . empty ( ) & & g_PVRManager . IsPlaying ( ) ) <nl> + m_selectedItemPaths . at ( m_bRadio ) = g_application . CurrentFile ( ) ; <nl> <nl> CGUIMediaWindow : : OnInitWindow ( ) ; <nl> <nl> / / mark item as selected by channel path <nl> - m_viewControl . SetSelectedItem ( m_selectedItemPath . at ( m_bRadio ) ) ; <nl> + m_viewControl . SetSelectedItem ( m_selectedItemPaths . at ( m_bRadio ) ) ; <nl> } <nl> <nl> void CGUIWindowPVRBase : : OnDeinitWindow ( int nextWindowID ) <nl> void CGUIWindowPVRBase : : OnDeinitWindow ( int nextWindowID ) <nl> { <nl> CFileItemPtr fileItem = m_vecItems - > Get ( selectedItem ) ; <nl> if ( fileItem ) <nl> - m_selectedItemPath . at ( m_bRadio ) = fileItem - > GetPath ( ) ; <nl> + m_selectedItemPaths . at ( m_bRadio ) = fileItem - > GetPath ( ) ; <nl> } <nl> } <nl> <nl> mmm a / xbmc / pvr / windows / GUIWindowPVRBase . h <nl> ppp b / xbmc / pvr / windows / GUIWindowPVRBase . h <nl> namespace PVR <nl> virtual void ShowRecordingInfo ( CFileItem * item ) ; <nl> virtual bool UpdateEpgForChannel ( CFileItem * item ) ; <nl> <nl> - static std : : map < bool , std : : string > m_selectedItemPath ; <nl> + static std : : map < bool , std : : string > m_selectedItemPaths ; <nl> <nl> CCriticalSection m_critSection ; <nl> bool m_bRadio ; <nl> mmm a / xbmc / pvr / windows / GUIWindowPVRGuide . cpp <nl> ppp b / xbmc / pvr / windows / GUIWindowPVRGuide . cpp <nl> void CGUIWindowPVRGuide : : OnDeinitWindow ( int nextWindowID ) <nl> { <nl> CPVRChannel * channel = epgGridContainer - > GetChannel ( epgGridContainer - > GetSelectedChannel ( ) ) ; <nl> if ( channel ! = NULL ) <nl> - m_selectedItemPath . at ( m_bRadio ) = channel - > Path ( ) ; <nl> + m_selectedItemPaths . at ( m_bRadio ) = channel - > Path ( ) ; <nl> } <nl> } <nl> else <nl> void CGUIWindowPVRGuide : : UpdateViewNow ( ) <nl> } <nl> <nl> m_viewControl . SetItems ( * m_vecItems ) ; <nl> - m_viewControl . SetSelectedItem ( m_selectedItemPath . at ( m_bRadio ) ) ; <nl> + m_viewControl . SetSelectedItem ( m_selectedItemPaths . at ( m_bRadio ) ) ; <nl> } <nl> <nl> void CGUIWindowPVRGuide : : UpdateViewNext ( ) <nl> void CGUIWindowPVRGuide : : UpdateViewNext ( ) <nl> } <nl> <nl> m_viewControl . SetItems ( * m_vecItems ) ; <nl> - m_viewControl . SetSelectedItem ( m_selectedItemPath . at ( m_bRadio ) ) ; <nl> + m_viewControl . SetSelectedItem ( m_selectedItemPaths . at ( m_bRadio ) ) ; <nl> } <nl> <nl> void CGUIWindowPVRGuide : : UpdateViewTimeline ( ) <nl> void CGUIWindowPVRGuide : : UpdateViewTimeline ( ) <nl> <nl> m_viewControl . SetItems ( * m_vecItems ) ; <nl> <nl> - epgGridContainer - > SetChannel ( m_selectedItemPath . at ( m_bRadio ) ) ; <nl> + epgGridContainer - > SetChannel ( m_selectedItemPaths . at ( m_bRadio ) ) ; <nl> } <nl> <nl> bool CGUIWindowPVRGuide : : Update ( const std : : string & strDirectory , bool updateFilterPath / * = true * / ) <nl>
[ pvr ] cosmetics : renames m_selectedItemPath to m_selectedItemPaths to reflect it ' s a map
xbmc/xbmc
c80de4e06a1d37d19d5e301d75ade418aca45778
2014-09-05T11:25:00Z
mmm a / src / boosting / gbdt . cpp <nl> ppp b / src / boosting / gbdt . cpp <nl> void GBDT : : ResetTrainingData ( const BoostingConfig * config , const Dataset * train_ <nl> num_data_ = train_data - > num_data ( ) ; <nl> / / create buffer for gradients and hessians <nl> if ( object_function_ ! = nullptr ) { <nl> - gradients_ = std : : vector < score_t > ( num_data_ * num_class_ ) ; <nl> - hessians_ = std : : vector < score_t > ( num_data_ * num_class_ ) ; <nl> + gradients_ . resize ( num_data_ * num_class_ ) ; <nl> + hessians_ . resize ( num_data_ * num_class_ ) ; <nl> } <nl> / / get max feature index <nl> max_feature_idx_ = train_data - > num_total_features ( ) - 1 ; <nl> void GBDT : : ResetTrainingData ( const BoostingConfig * config , const Dataset * train_ <nl> | | ( gbdt_config_ - > bagging_fraction ! = new_config - > bagging_fraction ) ) { <nl> / / if need bagging , create buffer <nl> if ( new_config - > bagging_fraction < 1 . 0 & & new_config - > bagging_freq > 0 ) { <nl> - out_of_bag_data_indices_ = std : : vector < data_size_t > ( num_data_ ) ; <nl> - bag_data_indices_ = std : : vector < data_size_t > ( num_data_ ) ; <nl> + out_of_bag_data_indices_ . resize ( num_data_ ) ; <nl> + bag_data_indices_ . resize ( num_data_ ) ; <nl> } else { <nl> out_of_bag_data_cnt_ = 0 ; <nl> out_of_bag_data_indices_ . clear ( ) ; <nl> mmm a / src / treelearner / data_partition . hpp <nl> ppp b / src / treelearner / data_partition . hpp <nl> namespace LightGBM { <nl> * / <nl> class DataPartition { <nl> public : <nl> - DataPartition ( data_size_t num_data , int num_leafs ) <nl> - : num_data_ ( num_data ) , num_leaves_ ( num_leafs ) { <nl> + DataPartition ( data_size_t num_data , int num_leaves ) <nl> + : num_data_ ( num_data ) , num_leaves_ ( num_leaves ) { <nl> leaf_begin_ . resize ( num_leaves_ ) ; <nl> leaf_count_ . resize ( num_leaves_ ) ; <nl> indices_ . resize ( num_data_ ) ; <nl> class DataPartition { <nl> left_write_pos_buf_ . resize ( num_threads_ ) ; <nl> right_write_pos_buf_ . resize ( num_threads_ ) ; <nl> } <nl> + <nl> + void ResetLeaves ( int num_leaves ) { <nl> + num_leaves_ = num_leaves ; <nl> + leaf_begin_ . resize ( num_leaves_ ) ; <nl> + leaf_count_ . resize ( num_leaves_ ) ; <nl> + } <nl> + <nl> ~ DataPartition ( ) { <nl> <nl> } <nl> mmm a / src / treelearner / feature_histogram . hpp <nl> ppp b / src / treelearner / feature_histogram . hpp <nl> class HistogramPool { <nl> } <nl> is_enough_ = ( cache_size_ = = total_size_ ) ; <nl> if ( ! is_enough_ ) { <nl> - mapper_ = std : : vector < int > ( total_size_ ) ; <nl> - inverse_mapper_ = std : : vector < int > ( cache_size_ ) ; <nl> - last_used_time_ = std : : vector < int > ( cache_size_ ) ; <nl> + mapper_ . resize ( total_size_ ) ; <nl> + inverse_mapper_ . resize ( cache_size_ ) ; <nl> + last_used_time_ . resize ( cache_size_ ) ; <nl> ResetMap ( ) ; <nl> } <nl> } <nl> mmm a / src / treelearner / serial_tree_learner . cpp <nl> ppp b / src / treelearner / serial_tree_learner . cpp <nl> void SerialTreeLearner : : ResetConfig ( const TreeConfig * tree_config ) { <nl> <nl> / / push split information for all leaves <nl> best_split_per_leaf_ . resize ( tree_config_ - > num_leaves ) ; <nl> - data_partition_ . reset ( new DataPartition ( num_data_ , tree_config_ - > num_leaves ) ) ; <nl> + data_partition_ - > ResetLeaves ( tree_config_ - > num_leaves ) ; <nl> } else { <nl> tree_config_ = tree_config ; <nl> } <nl>
better performance for reset parameters
microsoft/LightGBM
574d534265a911a0fdea752ca551b16c15044417
2016-12-19T13:58:13Z
mmm a / arangod / V8Server / v8 - vocbase . cpp <nl> ppp b / arangod / V8Server / v8 - vocbase . cpp <nl> static v8 : : Handle < v8 : : Value > MapGetNamedShapedJson ( v8 : : Local < v8 : : String > name , <nl> } <nl> <nl> / / convert the JavaScript string to a string <nl> - string const key = TRI_ObjectToString ( name ) ; <nl> + / / we take the fast path here and don ' t normalize the string <nl> + v8 : : String : : Utf8Value const str ( name ) ; <nl> + string const key ( * str , ( size_t ) str . length ( ) ) ; <nl> <nl> if ( key . empty ( ) | | key [ 0 ] = = ' _ ' | | strchr ( key . c_str ( ) , ' . ' ) ! = 0 ) { <nl> return scope . Close ( v8 : : Handle < v8 : : Value > ( ) ) ; <nl>
fast path for named property access
arangodb/arangodb
350e8fc8fe58f6a523df81c5a3d26d21d3a16e03
2014-05-28T19:35:42Z
mmm a / src / bailout - reason . h <nl> ppp b / src / bailout - reason . h <nl> namespace internal { <nl> V ( kAllocatingNonEmptyPackedArray , " Allocating non - empty packed array " ) \ <nl> V ( kAllocationIsNotDoubleAligned , " Allocation is not double aligned " ) \ <nl> V ( kAPICallReturnedInvalidObject , " API call returned invalid object " ) \ <nl> - V ( kArgumentsObjectValueInATestContext , \ <nl> - " Arguments object value in a test context " ) \ <nl> - V ( kArrayIndexConstantValueTooBig , " Array index constant value too big " ) \ <nl> - V ( kAssignmentToLetVariableBeforeInitialization , \ <nl> - " Assignment to let variable before initialization " ) \ <nl> - V ( kAssignmentToLOOKUPVariable , " Assignment to LOOKUP variable " ) \ <nl> - V ( kAssignmentToParameterFunctionUsesArgumentsObject , \ <nl> - " Assignment to parameter , function uses arguments object " ) \ <nl> - V ( kAssignmentToParameterInArgumentsObject , \ <nl> - " Assignment to parameter in arguments object " ) \ <nl> - V ( kBadValueContextForArgumentsObjectValue , \ <nl> - " Bad value context for arguments object value " ) \ <nl> - V ( kBadValueContextForArgumentsValue , \ <nl> - " Bad value context for arguments value " ) \ <nl> V ( kBailedOutDueToDependencyChange , " Bailed out due to dependency change " ) \ <nl> - V ( kBailoutWasNotPrepared , " Bailout was not prepared " ) \ <nl> V ( kBothRegistersWereSmisInSelectNonSmi , \ <nl> " Both registers were smis in SelectNonSmi " ) \ <nl> V ( kClassConstructorFunction , " Class constructor function " ) \ <nl> V ( kClassLiteral , " Class literal " ) \ <nl> V ( kCodeGenerationFailed , " Code generation failed " ) \ <nl> V ( kCodeObjectNotProperlyPatched , " Code object not properly patched " ) \ <nl> - V ( kCompoundAssignmentToLookupSlot , " Compound assignment to lookup slot " ) \ <nl> V ( kComputedPropertyName , " Computed property name " ) \ <nl> V ( kContextAllocatedArguments , " Context - allocated arguments " ) \ <nl> - V ( kCopyBuffersOverlap , " Copy buffers overlap " ) \ <nl> - V ( kCouldNotGenerateZero , " Could not generate + 0 . 0 " ) \ <nl> - V ( kCouldNotGenerateNegativeZero , " Could not generate - 0 . 0 " ) \ <nl> V ( kDebuggerStatement , " DebuggerStatement " ) \ <nl> V ( kDeclarationInCatchContext , " Declaration in catch context " ) \ <nl> V ( kDeclarationInWithContext , " Declaration in with context " ) \ <nl> - V ( kDefaultNaNModeNotSet , " Default NaN mode not set " ) \ <nl> - V ( kDeleteWithGlobalVariable , " Delete with global variable " ) \ <nl> - V ( kDeleteWithNonGlobalVariable , " Delete with non - global variable " ) \ <nl> - V ( kDestinationOfCopyNotAligned , " Destination of copy not aligned " ) \ <nl> - V ( kDontDeleteCellsCannotContainTheHole , \ <nl> - " DontDelete cells can ' t contain the hole " ) \ <nl> - V ( kDoExpressionUnmodelable , \ <nl> - " Encountered a do - expression with unmodelable control statements " ) \ <nl> - V ( kDoPushArgumentNotImplementedForDoubleType , \ <nl> - " DoPushArgument not implemented for double type " ) \ <nl> V ( kDynamicImport , " Dynamic module import " ) \ <nl> - V ( kEliminatedBoundsCheckFailed , " Eliminated bounds check failed " ) \ <nl> - V ( kEmitLoadRegisterUnsupportedDoubleImmediate , \ <nl> - " EmitLoadRegister : Unsupported double immediate " ) \ <nl> V ( kCyclicObjectStateDetectedInEscapeAnalysis , \ <nl> " Cyclic object state detected by escape analysis " ) \ <nl> V ( kEval , " eval " ) \ <nl> V ( kExpectedAllocationSite , " Expected allocation site " ) \ <nl> V ( kExpectedBooleanValue , " Expected boolean value " ) \ <nl> V ( kExpectedFeedbackVector , " Expected feedback vector " ) \ <nl> - V ( kExpectedFixedDoubleArrayMap , \ <nl> - " Expected a fixed double array map in fast shallow clone array literal " ) \ <nl> - V ( kExpectedFunctionObject , " Expected function object in register " ) \ <nl> V ( kExpectedHeapNumber , " Expected HeapNumber " ) \ <nl> - V ( kExpectedJSReceiver , " Expected object to have receiver type " ) \ <nl> - V ( kExpectedNativeContext , " Expected native context " ) \ <nl> V ( kExpectedNonIdenticalObjects , " Expected non - identical objects " ) \ <nl> - V ( kExpectedNonNullContext , " Expected non - null context " ) \ <nl> V ( kExpectedOptimizationSentinel , \ <nl> " Expected optimized code cell or optimization sentinel " ) \ <nl> - V ( kExpectedPositiveZero , " Expected + 0 . 0 " ) \ <nl> V ( kExpectedNewSpaceObject , " Expected new space object " ) \ <nl> V ( kExpectedUndefinedOrCell , " Expected undefined or cell in register " ) \ <nl> V ( kExternalStringExpectedButNotFound , \ <nl> " External string expected , but not found " ) \ <nl> - V ( kForInStatementWithNonLocalEachVariable , \ <nl> - " ForInStatement with non - local each variable " ) \ <nl> V ( kForOfStatement , " ForOfStatement " ) \ <nl> V ( kFunctionBeingDebugged , " Function is being debugged " ) \ <nl> V ( kFunctionCallsEval , " Function calls eval " ) \ <nl> V ( kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry , \ <nl> " The function_data field should be a BytecodeArray on interpreter entry " ) \ <nl> - V ( kGeneratedCodeIsTooLarge , " Generated code is too large " ) \ <nl> V ( kGenerator , " Generator " ) \ <nl> V ( kGetIterator , " GetIterator " ) \ <nl> V ( kGlobalFunctionsMustHaveInitialMap , \ <nl> " Global functions must have initial map " ) \ <nl> V ( kGraphBuildingFailed , " Optimized graph construction failed " ) \ <nl> V ( kHeapNumberMapRegisterClobbered , " HeapNumberMap register clobbered " ) \ <nl> - V ( kHydrogenFilter , " Optimization disabled by filter " ) \ <nl> V ( kIndexIsNegative , " Index is negative " ) \ <nl> V ( kIndexIsTooLarge , " Index is too large " ) \ <nl> - V ( kInliningBailedOut , " Inlining bailed out " ) \ <nl> V ( kInputGPRIsExpectedToHaveUpper32Cleared , \ <nl> " Input GPR is expected to have upper32 cleared " ) \ <nl> V ( kInputStringTooLong , " Input string too long " ) \ <nl> namespace internal { <nl> V ( kInvalidBytecode , " Invalid bytecode " ) \ <nl> V ( kInvalidElementsKindForInternalArrayOrInternalPackedArray , \ <nl> " Invalid ElementsKind for InternalArray or InternalPackedArray " ) \ <nl> - V ( kInvalidFrameForFastNewRestArgumentsStub , \ <nl> - " Invalid frame for FastNewRestArgumentsStub " ) \ <nl> - V ( kInvalidFrameForFastNewSloppyArgumentsStub , \ <nl> - " Invalid frame for FastNewSloppyArgumentsStub " ) \ <nl> - V ( kInvalidFrameForFastNewStrictArgumentsStub , \ <nl> - " Invalid frame for FastNewStrictArgumentsStub " ) \ <nl> V ( kInvalidFullCodegenState , " invalid full - codegen state " ) \ <nl> V ( kInvalidHandleScopeLevel , " Invalid HandleScope level " ) \ <nl> V ( kInvalidJumpTableIndex , " Invalid jump table index " ) \ <nl> - V ( kInvalidLeftHandSideInAssignment , " Invalid left - hand side in assignment " ) \ <nl> - V ( kInvalidLhsInCompoundAssignment , " Invalid lhs in compound assignment " ) \ <nl> - V ( kInvalidLhsInCountOperation , " Invalid lhs in count operation " ) \ <nl> - V ( kInvalidMinLength , " Invalid min_length " ) \ <nl> V ( kInvalidRegisterFileInGenerator , " invalid register file in generator " ) \ <nl> V ( kLiveEdit , " LiveEdit " ) \ <nl> - V ( kLookupVariableInCountOperation , " Lookup variable in count operation " ) \ <nl> - V ( kMapBecameDeprecated , " Map became deprecated " ) \ <nl> - V ( kMapBecameUnstable , " Map became unstable " ) \ <nl> V ( kMissingBytecodeArray , " Missing bytecode array from function " ) \ <nl> V ( kNativeFunctionLiteral , " Native function literal " ) \ <nl> - V ( kNeedSmiLiteral , " Need a Smi literal here " ) \ <nl> V ( kNoCasesLeft , " No cases left " ) \ <nl> - V ( kNonInitializerAssignmentToConst , " Non - initializer assignment to const " ) \ <nl> - V ( kNonSmiIndex , " Non - smi index " ) \ <nl> - V ( kNonSmiKeyInArrayLiteral , " Non - smi key in array literal " ) \ <nl> - V ( kNonSmiValue , " Non - smi value " ) \ <nl> V ( kNonObject , " Non - object value " ) \ <nl> - V ( kNotEnoughVirtualRegistersForValues , \ <nl> - " Not enough virtual registers for values " ) \ <nl> - V ( kNotEnoughSpillSlotsForOsr , " Not enough spill slots for OSR " ) \ <nl> V ( kNotEnoughVirtualRegistersRegalloc , \ <nl> " Not enough virtual registers ( regalloc ) " ) \ <nl> - V ( kObjectLiteralWithComplexProperty , " Object literal with complex property " ) \ <nl> V ( kOffsetOutOfRange , " Offset out of range " ) \ <nl> V ( kOperandIsASmiAndNotABoundFunction , \ <nl> " Operand is a smi and not a bound function " ) \ <nl> namespace internal { <nl> V ( kOperandIsASmiAndNotAFunction , " Operand is a smi and not a function " ) \ <nl> V ( kOperandIsASmiAndNotAGeneratorObject , \ <nl> " Operand is a smi and not a generator object " ) \ <nl> - V ( kOperandIsASmiAndNotAName , " Operand is a smi and not a name " ) \ <nl> - V ( kOperandIsASmiAndNotAReceiver , " Operand is a smi and not a receiver " ) \ <nl> - V ( kOperandIsASmiAndNotAString , " Operand is a smi and not a string " ) \ <nl> V ( kOperandIsASmi , " Operand is a smi " ) \ <nl> V ( kOperandIsNotABoundFunction , " Operand is not a bound function " ) \ <nl> V ( kOperandIsNotAFixedArray , " Operand is not a fixed array " ) \ <nl> V ( kOperandIsNotAFunction , " Operand is not a function " ) \ <nl> V ( kOperandIsNotAGeneratorObject , " Operand is not a generator object " ) \ <nl> - V ( kOperandIsNotAReceiver , " Operand is not a receiver " ) \ <nl> V ( kOperandIsNotASmi , " Operand is not a smi " ) \ <nl> - V ( kOperandIsNotAString , " Operand is not a string " ) \ <nl> V ( kOperandIsNotSmi , " Operand is not smi " ) \ <nl> V ( kObjectTagged , " The object is tagged " ) \ <nl> V ( kObjectNotTagged , " The object is not tagged " ) \ <nl> V ( kOptimizationDisabled , " Optimization disabled " ) \ <nl> V ( kOptimizationDisabledForTest , " Optimization disabled for test " ) \ <nl> - V ( kOutOfVirtualRegistersWhileTryingToAllocateTempRegister , \ <nl> - " Out of virtual registers while trying to allocate temp register " ) \ <nl> - V ( kParseScopeError , " Parse / scope error " ) \ <nl> - V ( kPossibleDirectCallToEval , " Possible direct call to eval " ) \ <nl> V ( kReceivedInvalidReturnAddress , " Received invalid return address " ) \ <nl> V ( kReferenceToAVariableWhichRequiresDynamicLookup , \ <nl> " Reference to a variable which requires dynamic lookup " ) \ <nl> - V ( kReferenceToGlobalLexicalVariable , " Reference to global lexical variable " ) \ <nl> V ( kReferenceToModuleVariable , " Reference to module - allocated variable " ) \ <nl> - V ( kReferenceToUninitializedVariable , " Reference to uninitialized variable " ) \ <nl> V ( kRegisterDidNotMatchExpectedRoot , " Register did not match expected root " ) \ <nl> V ( kRegisterWasClobbered , " Register was clobbered " ) \ <nl> V ( kRememberedSetPointerInNewSpace , " Remembered set pointer is in new space " ) \ <nl> namespace internal { <nl> " The current stack pointer is below csp " ) \ <nl> V ( kTheStackWasCorruptedByMacroAssemblerCall , \ <nl> " The stack was corrupted by MacroAssembler : : Call ( ) " ) \ <nl> - V ( kTooManyParametersLocals , " Too many parameters / locals " ) \ <nl> V ( kTooManyParameters , " Too many parameters " ) \ <nl> - V ( kTooManySpillSlotsNeededForOSR , " Too many spill slots needed for OSR " ) \ <nl> - V ( kToOperand32UnsupportedImmediate , " ToOperand32 unsupported immediate . " ) \ <nl> - V ( kToOperandIsDoubleRegisterUnimplemented , \ <nl> - " ToOperand IsDoubleRegister unimplemented " ) \ <nl> - V ( kToOperandUnsupportedDoubleImmediate , \ <nl> - " ToOperand Unsupported double immediate " ) \ <nl> V ( kTryCatchStatement , " TryCatchStatement " ) \ <nl> V ( kTryFinallyStatement , " TryFinallyStatement " ) \ <nl> V ( kUnalignedAllocationInNewSpace , " Unaligned allocation in new space " ) \ <nl> namespace internal { <nl> " Unexpected fall - through from string comparison " ) \ <nl> V ( kUnexpectedFallthroughToCharCodeAtSlowCase , \ <nl> " Unexpected fallthrough to CharCodeAt slow case " ) \ <nl> - V ( kUnexpectedFPUStackDepthAfterInstruction , \ <nl> - " Unexpected FPU stack depth after instruction " ) \ <nl> V ( kUnexpectedInitialMapForArrayFunction1 , \ <nl> " Unexpected initial map for Array function ( 1 ) " ) \ <nl> V ( kUnexpectedInitialMapForArrayFunction2 , \ <nl> namespace internal { <nl> V ( kUnexpectedFunctionIDForInvokeIntrinsic , \ <nl> " Unexpected runtime function id for the InvokeIntrinsic bytecode " ) \ <nl> V ( kUnexpectedFPCRMode , " Unexpected FPCR mode . " ) \ <nl> - V ( kUnexpectedSmi , " Unexpected smi value " ) \ <nl> V ( kUnexpectedStackDepth , " Unexpected operand stack depth in full - codegen " ) \ <nl> V ( kUnexpectedStackPointer , " The stack pointer is not the expected value " ) \ <nl> V ( kUnexpectedStringType , " Unexpected string type " ) \ <nl> - V ( kUnexpectedTestTypeofLiteralFlag , \ <nl> - " Unexpected literal flag for TestTypeof bytecode " ) \ <nl> V ( kUnexpectedValue , " Unexpected value " ) \ <nl> - V ( kUnsupportedDoubleImmediate , " Unsupported double immediate " ) \ <nl> - V ( kUnsupportedLetCompoundAssignment , " Unsupported let compound assignment " ) \ <nl> - V ( kUnsupportedLookupSlotInDeclaration , \ <nl> - " Unsupported lookup slot in declaration " ) \ <nl> V ( kUnsupportedModuleOperation , " Unsupported module operation " ) \ <nl> V ( kUnsupportedNonPrimitiveCompare , " Unsupported non - primitive compare " ) \ <nl> - V ( kUnsupportedPhiUseOfArguments , " Unsupported phi use of arguments " ) \ <nl> - V ( kUnsupportedPhiUseOfConstVariable , \ <nl> - " Unsupported phi use of const or let variable " ) \ <nl> V ( kUnexpectedReturnFromFrameDropper , \ <nl> " Unexpectedly returned from dropping frames " ) \ <nl> V ( kUnexpectedReturnFromThrow , " Unexpectedly returned from a throw " ) \ <nl> - V ( kUnsupportedSwitchStatement , " Unsupported switch statement " ) \ <nl> - V ( kUnsupportedTaggedImmediate , " Unsupported tagged immediate " ) \ <nl> - V ( kUnstableConstantTypeHeapObject , " Unstable constant - type heap object " ) \ <nl> V ( kVariableResolvedToWithContext , " Variable resolved to with context " ) \ <nl> V ( kWithStatement , " WithStatement " ) \ <nl> V ( kWrongFunctionContext , " Wrong context passed to function " ) \ <nl> enum BailoutReason { <nl> } ; <nl> # undef ERROR_MESSAGES_CONSTANTS <nl> <nl> - <nl> const char * GetBailoutReason ( BailoutReason reason ) ; <nl> <nl> } / / namespace internal <nl> mmm a / src / objects / shared - function - info . h <nl> ppp b / src / objects / shared - function - info . h <nl> class SharedFunctionInfo : public HeapObject { <nl> <nl> / / Bit fields in | bailout_reason | . <nl> # define BAILOUT_REASON_BIT_FIELDS ( V , _ ) \ <nl> - V ( DisabledOptimizationReasonBits , BailoutReason , 8 , _ ) <nl> + V ( DisabledOptimizationReasonBits , BailoutReason , 7 , _ ) <nl> <nl> DEFINE_BIT_FIELDS ( BAILOUT_REASON_BIT_FIELDS ) <nl> # undef BAILOUT_REASON_BIT_FIELDS <nl> <nl> + / / Bailout reasons must fit in the DisabledOptimizationReason bitfield . <nl> + STATIC_ASSERT ( kLastErrorMessage < = DisabledOptimizationReasonBits : : kMax ) ; <nl> + <nl> private : <nl> / / [ raw_name ] : Function name string or kNoSharedNameSentinel . <nl> DECL_ACCESSORS ( raw_name , Object ) <nl> mmm a / test / cctest / interpreter / bytecode_expectations / AsyncGenerators . golden <nl> ppp b / test / cctest / interpreter / bytecode_expectations / AsyncGenerators . golden <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 1 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 3 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 3 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 3 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 1 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 6 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 3 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 3 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 10 ) , <nl> B ( Star ) , R ( 11 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 6 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 12 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 12 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> / * 36 E > * / B ( TestEqualStrictNoFeedback ) , R ( 11 ) , <nl> B ( JumpIfTrue ) , U8 ( 11 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 20 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 20 ) , U8 ( 1 ) , <nl> / * 31 S > * / B ( LdaNamedProperty ) , R ( 4 ) , U8 ( 13 ) , U8 ( 7 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 9 ) , <nl> B ( Star ) , R ( 10 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 13 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 11 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 11 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> B ( TestEqualStrictNoFeedback ) , R ( 10 ) , <nl> B ( JumpIfTrue ) , U8 ( 11 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 15 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 15 ) , U8 ( 1 ) , <nl> B ( StackCheck ) , <nl> mmm a / test / cctest / interpreter / bytecode_expectations / ForAwaitOf . golden <nl> ppp b / test / cctest / interpreter / bytecode_expectations / ForAwaitOf . golden <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 11 ) , <nl> B ( Star ) , R ( 12 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 3 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 13 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 13 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> / * 43 E > * / B ( TestEqualStrictNoFeedback ) , R ( 12 ) , <nl> B ( JumpIfTrue ) , U8 ( 11 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 21 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 21 ) , U8 ( 1 ) , <nl> / * 40 S > * / B ( LdaNamedProperty ) , R ( 4 ) , U8 ( 7 ) , U8 ( 11 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 11 ) , <nl> B ( Star ) , R ( 12 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 3 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 13 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 13 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> / * 43 E > * / B ( TestEqualStrictNoFeedback ) , R ( 12 ) , <nl> B ( JumpIfTrue ) , U8 ( 11 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 21 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 21 ) , U8 ( 1 ) , <nl> / * 40 S > * / B ( LdaNamedProperty ) , R ( 4 ) , U8 ( 7 ) , U8 ( 11 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 11 ) , <nl> B ( Star ) , R ( 12 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 3 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 13 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 13 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> / * 43 E > * / B ( TestEqualStrictNoFeedback ) , R ( 12 ) , <nl> B ( JumpIfTrue ) , U8 ( 11 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 21 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 21 ) , U8 ( 1 ) , <nl> / * 40 S > * / B ( LdaNamedProperty ) , R ( 4 ) , U8 ( 7 ) , U8 ( 11 ) , <nl> mmm a / test / cctest / interpreter / bytecode_expectations / ForOfLoop . golden <nl> ppp b / test / cctest / interpreter / bytecode_expectations / ForOfLoop . golden <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 11 ) , <nl> B ( Star ) , R ( 12 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 13 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 13 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 10 ) , <nl> B ( Star ) , R ( 11 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 12 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 12 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> / * 35 E > * / B ( TestEqualStrictNoFeedback ) , R ( 11 ) , <nl> B ( JumpIfTrue ) , U8 ( 11 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 17 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 17 ) , U8 ( 1 ) , <nl> / * 30 S > * / B ( LdaNamedProperty ) , R ( 4 ) , U8 ( 6 ) , U8 ( 6 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 11 ) , <nl> B ( Star ) , R ( 12 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 13 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 13 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> / * 40 E > * / B ( TestEqualStrictNoFeedback ) , R ( 12 ) , <nl> B ( JumpIfTrue ) , U8 ( 11 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 22 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 22 ) , U8 ( 1 ) , <nl> / * 35 S > * / B ( LdaNamedProperty ) , R ( 4 ) , U8 ( 3 ) , U8 ( 6 ) , <nl> mmm a / test / cctest / interpreter / bytecode_expectations / Generators . golden <nl> ppp b / test / cctest / interpreter / bytecode_expectations / Generators . golden <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 1 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 3 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 3 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 1 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 3 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 3 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 10 ) , <nl> B ( Star ) , R ( 11 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 12 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 12 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> / * 30 E > * / B ( TestEqualStrictNoFeedback ) , R ( 11 ) , <nl> B ( JumpIfTrue ) , U8 ( 11 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 16 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 16 ) , U8 ( 1 ) , <nl> / * 25 S > * / B ( LdaNamedProperty ) , R ( 4 ) , U8 ( 7 ) , U8 ( 7 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 1 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 3 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 3 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> B ( TestEqualStrictNoFeedback ) , R ( 2 ) , <nl> B ( JumpIfTrue ) , U8 ( 11 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 9 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 9 ) , U8 ( 1 ) , <nl> B ( Ldar ) , R ( 4 ) , <nl> mmm a / test / cctest / interpreter / bytecode_expectations / Modules . golden <nl> ppp b / test / cctest / interpreter / bytecode_expectations / Modules . golden <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 0 ) , <nl> B ( Star ) , R ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 2 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 0 ) , <nl> B ( Star ) , R ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 2 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 0 ) , <nl> B ( Star ) , R ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 2 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 0 ) , <nl> B ( Star ) , R ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 2 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 0 ) , <nl> B ( Star ) , R ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 2 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 0 ) , <nl> B ( Star ) , R ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 2 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 0 ) , <nl> B ( Star ) , R ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 2 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 0 ) , <nl> B ( Star ) , R ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 2 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 0 ) , <nl> B ( Star ) , R ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 2 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 0 ) , <nl> B ( Star ) , R ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 2 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 0 ) , <nl> B ( Star ) , R ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 2 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 2 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> mmm a / test / cctest / interpreter / bytecode_expectations / StandardForLoop . golden <nl> ppp b / test / cctest / interpreter / bytecode_expectations / StandardForLoop . golden <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 3 ) , <nl> B ( Star ) , R ( 4 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 5 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 5 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 2 ) , <nl> B ( Star ) , R ( 3 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 4 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 4 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> / * 31 E > * / B ( TestEqualStrictNoFeedback ) , R ( 3 ) , <nl> B ( JumpIfTrue ) , U8 ( 11 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 4 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 4 ) , U8 ( 1 ) , <nl> / * 36 S > * / B ( LdaSmi ) , I8 ( 10 ) , <nl> bytecodes : [ <nl> B ( RestoreGeneratorState ) , R ( 3 ) , <nl> B ( Star ) , R ( 4 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 5 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 5 ) , U8 ( 1 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> bytecodes : [ <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> / * 36 E > * / B ( TestEqualStrictNoFeedback ) , R ( 4 ) , <nl> B ( JumpIfTrue ) , U8 ( 11 ) , <nl> - B ( LdaSmi ) , I8 ( 81 ) , <nl> + B ( LdaSmi ) , I8 ( 46 ) , <nl> B ( Star ) , R ( 9 ) , <nl> B ( CallRuntime ) , U16 ( Runtime : : kAbort ) , R ( 9 ) , U8 ( 1 ) , <nl> / * 41 S > * / B ( LdaSmi ) , I8 ( 10 ) , <nl>
[ objects ] Remove unused bailout reasons
v8/v8
33cac84c73e639fbe73aa3f33dc1485aa2c2f5ac
2017-08-02T11:28:18Z
mmm a / unittests / CMakeLists . txt <nl> ppp b / unittests / CMakeLists . txt <nl> find_package ( Gperftools QUIET ) <nl> <nl> # # # Build contracts with cdt if available <nl> include ( ExternalProject ) <nl> - # if no cdt root is given use default path <nl> - if ( EOSIO_CDT_ROOT STREQUAL " " OR NOT EOSIO_CDT_ROOT ) <nl> - set ( EOSIO_WASM_OLD_BEHAVIOR " Off " ) <nl> - find_package ( eosio . cdt ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> + # if no cdt root is given use default path <nl> + if ( EOSIO_CDT_ROOT STREQUAL " " OR NOT EOSIO_CDT_ROOT ) <nl> + set ( EOSIO_WASM_OLD_BEHAVIOR " Off " ) <nl> + find_package ( eosio . cdt ) <nl> + endif ( ) <nl> endif ( ) <nl> <nl> - if ( eosio . cdt_FOUND ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> + message ( STATUS " Building contracts in directory ` eos / unittests / test - contracts / ` " ) <nl> ExternalProject_Add ( <nl> test_contracts_project <nl> SOURCE_DIR $ { CMAKE_CURRENT_SOURCE_DIR } / test - contracts <nl> if ( eosio . cdt_FOUND ) <nl> BUILD_ALWAYS 1 <nl> ) <nl> else ( ) <nl> + message ( STATUS " Not building contracts in directory ` eos / unittests / test - contracts / ` " ) <nl> add_subdirectory ( test - contracts ) <nl> endif ( ) <nl> <nl> mmm a / unittests / test - contracts / CMakeLists . txt <nl> ppp b / unittests / test - contracts / CMakeLists . txt <nl> add_subdirectory ( proxy ) <nl> add_subdirectory ( snapshot_test ) <nl> add_subdirectory ( test . inline ) <nl> add_subdirectory ( test_api ) <nl> - add_subdirectory ( test_api_mem ) <nl> add_subdirectory ( test_api_db ) <nl> + add_subdirectory ( test_api_mem ) <nl> add_subdirectory ( test_api_multi_index ) <nl> add_subdirectory ( test_ram_limit ) <nl> mmm a / unittests / test - contracts / asserter / CMakeLists . txt <nl> ppp b / unittests / test - contracts / asserter / CMakeLists . txt <nl> <nl> - if ( $ { eosio . cdt_FOUND } ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> add_executable ( asserter asserter asserter . cpp ) <nl> target_include_directories ( asserter PUBLIC $ { CMAKE_CURRENT_SOURCE } / . . / ) <nl> else ( ) <nl> mmm a / unittests / test - contracts / deferred_test / CMakeLists . txt <nl> ppp b / unittests / test - contracts / deferred_test / CMakeLists . txt <nl> <nl> - if ( $ { eosio . cdt_FOUND } ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> add_contract ( deferred_test deferred_test deferred_test . cpp ) <nl> else ( ) <nl> configure_file ( $ { CMAKE_CURRENT_SOURCE_DIR } / deferred_test . wasm $ { CMAKE_CURRENT_BINARY_DIR } / deferred_test . wasm COPYONLY ) <nl> mmm a / unittests / test - contracts / integration_test / CMakeLists . txt <nl> ppp b / unittests / test - contracts / integration_test / CMakeLists . txt <nl> <nl> - if ( $ { eosio . cdt_FOUND } ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> add_contract ( integration_test integration_test integration_test . cpp ) <nl> else ( ) <nl> configure_file ( $ { CMAKE_CURRENT_SOURCE_DIR } / integration_test . wasm $ { CMAKE_CURRENT_BINARY_DIR } / integration_test . wasm COPYONLY ) <nl> mmm a / unittests / test - contracts / multi_index_test / CMakeLists . txt <nl> ppp b / unittests / test - contracts / multi_index_test / CMakeLists . txt <nl> <nl> - if ( $ { eosio . cdt_FOUND } ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> add_contract ( snapshot_test multi_index_test multi_index_test . cpp ) <nl> else ( ) <nl> configure_file ( $ { CMAKE_CURRENT_SOURCE_DIR } / multi_index_test . wasm $ { CMAKE_CURRENT_BINARY_DIR } / multi_index_test . wasm COPYONLY ) <nl> mmm a / unittests / test - contracts / noop / CMakeLists . txt <nl> ppp b / unittests / test - contracts / noop / CMakeLists . txt <nl> <nl> - if ( $ { eosio . cdt_FOUND } ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> add_contract ( noop noop noop . cpp ) <nl> else ( ) <nl> configure_file ( $ { CMAKE_CURRENT_SOURCE_DIR } / noop . wasm $ { CMAKE_CURRENT_BINARY_DIR } / noop . wasm COPYONLY ) <nl> mmm a / unittests / test - contracts / payloadless / CMakeLists . txt <nl> ppp b / unittests / test - contracts / payloadless / CMakeLists . txt <nl> <nl> - if ( $ { eosio . cdt_FOUND } ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> add_contract ( payloadless payloadless payloadless . cpp ) <nl> else ( ) <nl> configure_file ( $ { CMAKE_CURRENT_SOURCE_DIR } / payloadless . wasm $ { CMAKE_CURRENT_BINARY_DIR } / payloadless . wasm COPYONLY ) <nl> mmm a / unittests / test - contracts / proxy / CMakeLists . txt <nl> ppp b / unittests / test - contracts / proxy / CMakeLists . txt <nl> <nl> - if ( $ { eosio . cdt_FOUND } ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> add_executable ( proxy proxy proxy . cpp ) <nl> else ( ) <nl> configure_file ( $ { CMAKE_CURRENT_SOURCE_DIR } / proxy . wasm $ { CMAKE_CURRENT_BINARY_DIR } / proxy . wasm COPYONLY ) <nl> mmm a / unittests / test - contracts / snapshot_test / CMakeLists . txt <nl> ppp b / unittests / test - contracts / snapshot_test / CMakeLists . txt <nl> <nl> - if ( $ { eosio . cdt_FOUND } ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> add_contract ( snapshot_test snapshot_test snapshot_test . cpp ) <nl> else ( ) <nl> configure_file ( $ { CMAKE_CURRENT_SOURCE_DIR } / snapshot_test . wasm $ { CMAKE_CURRENT_BINARY_DIR } / snapshot_test . wasm COPYONLY ) <nl> mmm a / unittests / test - contracts / test . inline / CMakeLists . txt <nl> ppp b / unittests / test - contracts / test . inline / CMakeLists . txt <nl> <nl> - if ( $ { eosio . cdt_FOUND } ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> add_contract ( test . inline test . inline test . inline . cpp ) <nl> else ( ) <nl> configure_file ( $ { CMAKE_CURRENT_SOURCE_DIR } / test . inline . wasm $ { CMAKE_CURRENT_BINARY_DIR } / test . inline . wasm COPYONLY ) <nl> mmm a / unittests / test - contracts / test_api / CMakeLists . txt <nl> ppp b / unittests / test - contracts / test_api / CMakeLists . txt <nl> <nl> - if ( $ { eosio . cdt_FOUND } ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> add_executable ( test_api test_api . cpp ) <nl> else ( ) <nl> configure_file ( $ { CMAKE_CURRENT_SOURCE_DIR } / test_api . wasm $ { CMAKE_CURRENT_BINARY_DIR } / test_api . wasm COPYONLY ) <nl> mmm a / unittests / test - contracts / test_api_db / CMakeLists . txt <nl> ppp b / unittests / test - contracts / test_api_db / CMakeLists . txt <nl> <nl> - if ( $ { eosio . cdt_FOUND } ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> add_executable ( test_api_db test_api_db . cpp ) <nl> else ( ) <nl> configure_file ( $ { CMAKE_CURRENT_SOURCE_DIR } / test_api_db . wasm $ { CMAKE_CURRENT_BINARY_DIR } / test_api_db . wasm COPYONLY ) <nl> mmm a / unittests / test - contracts / test_api_mem / CMakeLists . txt <nl> ppp b / unittests / test - contracts / test_api_mem / CMakeLists . txt <nl> <nl> - if ( $ { eosio . cdt_FOUND } ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> add_executable ( test_api_mem test_api_mem . cpp ) <nl> else ( ) <nl> configure_file ( $ { CMAKE_CURRENT_SOURCE_DIR } / test_api_mem . wasm $ { CMAKE_CURRENT_BINARY_DIR } / test_api_mem . wasm COPYONLY ) <nl> mmm a / unittests / test - contracts / test_api_multi_index / CMakeLists . txt <nl> ppp b / unittests / test - contracts / test_api_multi_index / CMakeLists . txt <nl> <nl> - if ( $ { eosio . cdt_FOUND } ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> include_directories ( $ { Boost_INCLUDE_DIRS } ) <nl> add_executable ( test_api_multi_index test_api_multi_index . cpp ) <nl> else ( ) <nl> mmm a / unittests / test - contracts / test_ram_limit / CMakeLists . txt <nl> ppp b / unittests / test - contracts / test_ram_limit / CMakeLists . txt <nl> <nl> - if ( $ { eosio . cdt_FOUND } ) <nl> - message ( STATUS " Not building test_ram_limit , read README . txt in eos / unittests / test - contracts / test_ram_limit " ) <nl> + if ( EOSIO_COMPILE_TEST_CONTRACTS ) <nl> configure_file ( $ { CMAKE_CURRENT_SOURCE_DIR } / test_ram_limit . wasm $ { CMAKE_CURRENT_BINARY_DIR } / test_ram_limit . wasm COPYONLY ) <nl> configure_file ( $ { CMAKE_CURRENT_SOURCE_DIR } / test_ram_limit . abi $ { CMAKE_CURRENT_BINARY_DIR } / test_ram_limit . abi COPYONLY ) <nl> else ( ) <nl>
Make contracts in directory ` test - contracts ` not build by default
EOSIO/eos
e41dc57354c530a4a9550da19becc4182714322a
2019-02-11T22:59:01Z
mmm a / include / swift / Parse / Parser . h <nl> ppp b / include / swift / Parse / Parser . h <nl> class Parser { <nl> DeclNameRef parseDeclNameRef ( DeclNameLoc & loc , const Diagnostic & diag , <nl> DeclNameOptions flags ) ; <nl> <nl> - / / / Parse an unqualified - decl - base - name . <nl> - / / / <nl> - / / / unqualified - decl - name : <nl> - / / / identifier <nl> - / / / <nl> - / / / \ param afterDot Whether this identifier is coming after a period , which <nl> - / / / enables ' . init ' and ' . default ' like expressions . <nl> - / / / \ param loc Will be populated with the location of the name . <nl> - / / / \ param diag The diagnostic to emit if this is not a name . <nl> - / / / \ param allowOperators Whether to allow operator basenames too . <nl> - DeclNameRef parseUnqualifiedDeclBaseName ( bool afterDot , DeclNameLoc & loc , <nl> - const Diagnostic & diag , <nl> - bool allowOperators = false , <nl> - bool allowDeinitAndSubscript = false ) ; <nl> - <nl> - / / / Parse an unqualified - decl - name . <nl> - / / / <nl> - / / / unqualified - decl - name : <nl> - / / / unqualified - decl - base - name <nl> - / / / unqualified - decl - base - name ' ( ' ( ( identifier | ' _ ' ) ' : ' ) + ' ) ' <nl> - / / / <nl> - / / / \ param afterDot Whether this identifier is coming after a period , which <nl> - / / / enables ' . init ' and ' . default ' like expressions . <nl> - / / / \ param loc Will be populated with the location of the name . <nl> - / / / \ param diag The diagnostic to emit if this is not a name . <nl> - / / / \ param allowOperators Whether to allow operator basenames too . <nl> - / / / \ param allowZeroArgCompoundNames Whether to allow empty argument lists . <nl> - DeclNameRef parseUnqualifiedDeclName ( bool afterDot , DeclNameLoc & loc , <nl> - const Diagnostic & diag , <nl> - bool allowOperators = false , <nl> - bool allowZeroArgCompoundNames = false , <nl> - bool allowDeinitAndSubscript = false ) ; <nl> - <nl> Expr * parseExprIdentifier ( ) ; <nl> Expr * parseExprEditorPlaceholder ( Token PlaceholderTok , <nl> Identifier PlaceholderId ) ; <nl> mmm a / lib / Parse / ParseExpr . cpp <nl> ppp b / lib / Parse / ParseExpr . cpp <nl> DeclNameRef Parser : : parseDeclNameRef ( DeclNameLoc & loc , <nl> return DeclNameRef ( { Context , baseName , argumentLabels } ) ; <nl> } <nl> <nl> - DeclNameRef Parser : : parseUnqualifiedDeclBaseName ( <nl> - bool afterDot , <nl> - DeclNameLoc & loc , <nl> - const Diagnostic & diag , <nl> - bool allowOperators , <nl> - bool allowDeinitAndSubscript ) { <nl> - DeclNameOptions flags = { } ; <nl> - if ( afterDot ) <nl> - flags | = DeclNameFlag : : AllowKeywords ; <nl> - if ( allowOperators ) <nl> - flags | = DeclNameFlag : : AllowOperators ; <nl> - if ( allowDeinitAndSubscript ) { <nl> - assert ( afterDot ) ; <nl> - flags | = DeclNameFlag : : UseSpecialNamesForDeinitAndSubscript ; <nl> - } <nl> - <nl> - return parseDeclNameRef ( loc , diag , flags ) ; <nl> - } <nl> - <nl> - <nl> - DeclNameRef Parser : : parseUnqualifiedDeclName ( bool afterDot , <nl> - DeclNameLoc & loc , <nl> - const Diagnostic & diag , <nl> - bool allowOperators , <nl> - bool allowZeroArgCompoundNames , <nl> - bool allowDeinitAndSubscript ) { <nl> - DeclNameOptions flags = DeclNameFlag : : AllowCompoundNames ; <nl> - if ( afterDot ) <nl> - flags | = DeclNameFlag : : AllowKeywords ; <nl> - if ( allowOperators ) <nl> - flags | = DeclNameFlag : : AllowOperators ; <nl> - if ( allowDeinitAndSubscript ) { <nl> - assert ( afterDot ) ; <nl> - flags | = DeclNameFlag : : UseSpecialNamesForDeinitAndSubscript ; <nl> - } <nl> - if ( allowZeroArgCompoundNames ) <nl> - flags | = DeclNameFlag : : AllowZeroArgCompoundNames ; <nl> - <nl> - return parseDeclNameRef ( loc , diag , flags ) ; <nl> - } <nl> - <nl> / / / expr - identifier : <nl> / / / unqualified - decl - name generic - args ? <nl> Expr * Parser : : parseExprIdentifier ( ) { <nl>
[ NFC ] Remove unused Parser : : parseUnqualifiedDeclName methods
apple/swift
b5f02c3d0c0a0f0b6bfcb271a4b10d9eb63ad628
2019-12-16T07:46:42Z
mmm a / xbmc / guilib / GUIListGroup . cpp <nl> ppp b / xbmc / guilib / GUIListGroup . cpp <nl> void CGUIListGroup : : AddControl ( CGUIControl * control , int position / * = - 1 * / ) <nl> <nl> void CGUIListGroup : : Process ( unsigned int currentTime , CDirtyRegionList & dirtyregions ) <nl> { <nl> - CGUIControlGroup : : Process ( currentTime , dirtyregions ) ; <nl> - m_item = NULL ; <nl> - } <nl> - <nl> - void CGUIListGroup : : Render ( ) <nl> - { <nl> + CPoint pos ( GetPosition ( ) ) ; <nl> g_graphicsContext . SetOrigin ( m_posX , m_posY ) ; <nl> + <nl> + CRect rect ; <nl> for ( iControls it = m_children . begin ( ) ; it ! = m_children . end ( ) ; + + it ) <nl> { <nl> CGUIControl * control = * it ; <nl> - control - > DoRender ( ) ; <nl> + control - > UpdateVisibility ( m_item ) ; <nl> + unsigned int oldDirty = dirtyregions . size ( ) ; <nl> + control - > DoProcess ( currentTime , dirtyregions ) ; <nl> + if ( control - > IsVisible ( ) | | ( oldDirty ! = dirtyregions . size ( ) ) ) / / visible or dirty ( was visible ? ) <nl> + rect . Union ( control - > GetRenderRegion ( ) ) ; <nl> } <nl> - CGUIControl : : Render ( ) ; <nl> + <nl> g_graphicsContext . RestoreOrigin ( ) ; <nl> + CGUIControl : : Process ( currentTime , dirtyregions ) ; <nl> + m_renderRegion = rect ; <nl> + m_item = NULL ; <nl> } <nl> <nl> void CGUIListGroup : : ResetAnimation ( ANIMATION_TYPE type ) <nl> mmm a / xbmc / guilib / GUIListGroup . h <nl> ppp b / xbmc / guilib / GUIListGroup . h <nl> class CGUIListGroup : public CGUIControlGroup <nl> virtual void AddControl ( CGUIControl * control , int position = - 1 ) ; <nl> <nl> virtual void Process ( unsigned int currentTime , CDirtyRegionList & dirtyregions ) ; <nl> - virtual void Render ( ) ; <nl> virtual void ResetAnimation ( ANIMATION_TYPE type ) ; <nl> virtual void UpdateVisibility ( const CGUIListItem * item = NULL ) ; <nl> virtual void UpdateInfo ( const CGUIListItem * item ) ; <nl>
no need for overridden Render ( ) in GUIListGroup - we need overridden Process though to send our item to UpdateVisibility
xbmc/xbmc
19e8cb6705db0a7c381177dacbb9182201e0c48c
2011-06-17T23:50:17Z
new file mode 100644 <nl> index 00000000000 . . f062ecf2b8f <nl> mmm / dev / null <nl> ppp b / dbms / src / Server / clickhouse - server . logrt <nl> <nl> + / var / log / clickhouse - server / clickhouse - server * . log { <nl> + rotate 20 <nl> + size 20M <nl> + compress <nl> + missingok <nl> + sharedscripts <nl> + nocreate <nl> + delaycompress <nl> + postrotate <nl> + PROGRAM = clickhouse - server <nl> + PIDDIR = / var / run / $ PROGRAM <nl> + PIDFILE_RE = " $ PIDDIR / $ PROGRAM [ 0 - 9 ] * . pid " <nl> + for PIDFILE in $ ( find $ PIDDIR - regex " $ PIDFILE_RE " ) ; do kill - s USR1 ` cat $ PIDFILE ` ; done <nl> + endscript <nl> + } <nl>
dbms : added missing file [ # METR - 2944 ] .
ClickHouse/ClickHouse
e462bddbcca12ad62b9c60b25ec97529422c0ba6
2015-12-24T18:38:19Z
mmm a / buildscripts / resmokeconfig / suites / sharding_last_stable_mongos . yml <nl> ppp b / buildscripts / resmokeconfig / suites / sharding_last_stable_mongos . yml <nl> selector : <nl> - jstests / sharding / shard_collection_verify_initial_chunks . js <nl> # TODO : Enable when SERVER - 22672 is complete <nl> - jstests / sharding / printShardingStatus . js <nl> + # TODO : Change in error reporting , enable when 3 . 4 becomes ' last - stable ' . <nl> + - jstests / sharding / map_reduce_validation . js <nl> <nl> executor : <nl> js_test : <nl> mmm a / jstests / sharding / map_reduce_validation . js <nl> ppp b / jstests / sharding / map_reduce_validation . js <nl> assert . commandFailed ( testDB . runCommand ( <nl> { mapReduce : ' user ' , map : mapFunc , reduce : reduceFunc , out : { inline : 1 , sharded : true } } ) ) ; <nl> <nl> testDB . bar . insert ( { i : 1 } ) ; <nl> - assert . commandFailed ( testDB . runCommand ( { <nl> + assert . commandFailedWithCode ( testDB . runCommand ( { <nl> mapReduce : ' bar ' , <nl> map : function ( ) { <nl> emit ( this . i , this . i * 3 ) ; <nl> assert . commandFailed ( testDB . runCommand ( { <nl> return Array . sum ( values ) ; <nl> } , <nl> out : { replace : " foo " , db : " admin " } <nl> - } ) ) ; <nl> + } ) , <nl> + ErrorCodes . CommandNotSupported ) ; <nl> <nl> - assert . commandFailed ( testDB . runCommand ( { <nl> + assert . commandFailedWithCode ( testDB . runCommand ( { <nl> mapReduce : ' bar ' , <nl> map : function ( ) { <nl> emit ( this . i , this . i * 3 ) ; <nl> assert . commandFailed ( testDB . runCommand ( { <nl> return Array . sum ( values ) ; <nl> } , <nl> out : { replace : " foo " , db : " config " } <nl> - } ) ) ; <nl> + } ) , <nl> + ErrorCodes . CommandNotSupported ) ; <nl> <nl> assert . commandWorked ( testDB . runCommand ( { <nl> mapReduce : ' bar ' , <nl> mmm a / src / mongo / db / commands / mr . cpp <nl> ppp b / src / mongo / db / commands / mr . cpp <nl> class MapReduceFinishCommand : public Command { <nl> int , <nl> string & errmsg , <nl> BSONObjBuilder & result ) { <nl> - if ( ! grid . shardRegistry ( ) ) { <nl> + if ( serverGlobalParams . clusterRole = = ClusterRole : : ConfigServer ) { <nl> return appendCommandStatus ( <nl> result , <nl> Status ( ErrorCodes : : CommandNotSupported , <nl> - str : : stream ( ) < < " Can not execute mapReduce with output database " <nl> - < < dbname ) ) ; <nl> + str : : stream ( ) < < " Can not execute mapReduce with output database " < < dbname <nl> + < < " which lives on config servers " ) ) ; <nl> } <nl> <nl> boost : : optional < DisableDocumentValidation > maybeDisableValidation ; <nl> mmm a / src / mongo / s / commands / cluster_map_reduce_cmd . cpp <nl> ppp b / src / mongo / s / commands / cluster_map_reduce_cmd . cpp <nl> class MRCmd : public Command { <nl> bool shardedOutput = false ; <nl> NamespaceString outputCollNss ; <nl> bool customOutDB = false ; <nl> + bool inlineOutput = false ; <nl> <nl> string outDB = dbname ; <nl> <nl> class MRCmd : public Command { <nl> shardedOutput = customOut . getBoolField ( " sharded " ) ; <nl> <nl> if ( customOut . hasField ( " inline " ) ) { <nl> + inlineOutput = true ; <nl> uassert ( ErrorCodes : : InvalidOptions , <nl> " cannot specify inline and sharded output at the same time " , <nl> ! shardedOutput ) ; <nl> class MRCmd : public Command { <nl> confOut = confIn ; <nl> } <nl> <nl> + if ( confOut - > getPrimaryId ( ) = = " config " & & ! inlineOutput ) { <nl> + return appendCommandStatus ( <nl> + result , <nl> + Status ( ErrorCodes : : CommandNotSupported , <nl> + str : : stream ( ) < < " Can not execute mapReduce with output database " < < outDB <nl> + < < " which lives on config servers " ) ) ; <nl> + } <nl> + <nl> const bool shardedInput = <nl> confIn & & confIn - > isShardingEnabled ( ) & & confIn - > isSharded ( nss . ns ( ) ) ; <nl> <nl>
SERVER - 24597 Fix check that prevents sending mapreduce output to config servers
mongodb/mongo
ef34ca10813a2fa779b2693f6566e354b09b063b
2016-06-22T21:39:56Z
mmm a / main . cpp <nl> ppp b / main . cpp <nl> static char * output_encoding = NULL ; <nl> static char * test_state_dir = NULL ; <nl> static char * sock_name = NULL ; <nl> static char * pid_file = NULL ; <nl> - char * watchman_state_file = NULL ; <nl> static char * * daemon_argv = NULL ; <nl> const char * watchman_tmp_dir = NULL ; <nl> static int persistent = 0 ; <nl> - int dont_save_state = 0 ; <nl> static int foreground = 0 ; <nl> static int no_pretty = 0 ; <nl> static int no_spawn = 0 ; <nl> mmm a / state . cpp <nl> ppp b / state . cpp <nl> <nl> <nl> using namespace watchman ; <nl> <nl> + char * watchman_state_file = NULL ; <nl> + int dont_save_state = 0 ; <nl> + <nl> / * * The state saving thread is responsible for writing out the <nl> * persistent information about the users watches . <nl> * It runs in its own thread so that we avoid the possibility <nl>
Move watchman_state_file , dont_save_state globals out of main . cpp
facebook/watchman
fe96240883b4552e39e3987c4fbcc99d1ba29ed7
2018-07-03T21:51:47Z
new file mode 100644 <nl> index 000000000000 . . e4641a863c36 <nl> mmm / dev / null <nl> ppp b / validation - test / IDE / crashers_2_fixed / 0023 - rdar41331096 . swift <nl> <nl> + / / RUN : % target - swift - ide - test - code - completion - code - completion - token = A - source - filename = % s <nl> + <nl> + enum E1 { <nl> + case X <nl> + case Y <nl> + } <nl> + enum E2 { <nl> + case A <nl> + case B <nl> + case C <nl> + } <nl> + <nl> + func foo ( ) - > ( [ E1 ] , [ E2 ] ) { <nl> + return ( [ . X ] , [ . A , . B , . # ^ A ^ # ] ) <nl> + } <nl>
[ IDE ] NFC : Add a test - case for a fixed SourceKit crasher
apple/swift
0a3f66636784ff232eb1e383d98ba771f57145b1
2018-11-06T19:58:38Z
mmm a / src / mips / code - stubs - mips . cc <nl> ppp b / src / mips / code - stubs - mips . cc <nl> void MathPowStub : : Generate ( MacroAssembler * masm ) { <nl> <nl> / / double_exponent may not contain the exponent value if the input was a <nl> / / smi . We set it with exponent value before bailing out . <nl> + __ bind ( & bail_out ) ; <nl> __ mtc1 ( exponent , single_scratch ) ; <nl> __ cvt_d_w ( double_exponent , single_scratch ) ; <nl> <nl> / / Returning or bailing out . <nl> - __ bind ( & bail_out ) ; <nl> __ push ( ra ) ; <nl> { <nl> AllowExternalCallThatCantCauseGC scope ( masm ) ; <nl> mmm a / src / mips64 / code - stubs - mips64 . cc <nl> ppp b / src / mips64 / code - stubs - mips64 . cc <nl> void MathPowStub : : Generate ( MacroAssembler * masm ) { <nl> <nl> / / double_exponent may not contain the exponent value if the input was a <nl> / / smi . We set it with exponent value before bailing out . <nl> + __ bind ( & bail_out ) ; <nl> __ mtc1 ( exponent , single_scratch ) ; <nl> __ cvt_d_w ( double_exponent , single_scratch ) ; <nl> <nl> / / Returning or bailing out . <nl> - __ bind ( & bail_out ) ; <nl> __ push ( ra ) ; <nl> { <nl> AllowExternalCallThatCantCauseGC scope ( masm ) ; <nl>
MIPS : Fix mjsunit / regress / regress - 5213
v8/v8
536b49356ea20ff4910aa243ce2469021a34d0fa
2016-07-25T11:48:20Z
mmm a / torch / lib / c10d / FileStore . cpp <nl> ppp b / torch / lib / c10d / FileStore . cpp <nl> FileStore : : ~ FileStore ( ) { <nl> <nl> void FileStore : : set ( const std : : string & key , const std : : vector < uint8_t > & value ) { <nl> std : : string regKey = regularPrefix_ + key ; <nl> + std : : unique_lock < std : : mutex > l ( activeFileOpLock_ ) ; <nl> File file ( path_ , O_RDWR | O_CREAT , timeout_ ) ; <nl> auto lock = file . lockExclusive ( ) ; <nl> file . seek ( 0 , SEEK_END ) ; <nl> std : : vector < uint8_t > FileStore : : get ( const std : : string & key ) { <nl> std : : string regKey = regularPrefix_ + key ; <nl> const auto start = std : : chrono : : steady_clock : : now ( ) ; <nl> while ( true ) { <nl> + std : : unique_lock < std : : mutex > l ( activeFileOpLock_ ) ; <nl> File file ( path_ , O_RDONLY , timeout_ ) ; <nl> auto lock = file . lockShared ( ) ; <nl> auto size = file . size ( ) ; <nl> if ( cache_ . count ( regKey ) = = 0 & & size = = pos_ ) { <nl> / / No new entries ; release the shared lock and sleep for a bit <nl> lock . unlock ( ) ; <nl> + l . unlock ( ) ; <nl> const auto elapsed = std : : chrono : : duration_cast < std : : chrono : : seconds > ( <nl> std : : chrono : : steady_clock : : now ( ) - start ) ; <nl> if ( timeout_ ! = kNoTimeout & & elapsed > timeout_ ) { <nl> std : : vector < uint8_t > FileStore : : get ( const std : : string & key ) { <nl> / / it might be outdated <nl> pos_ = refresh ( file , pos_ , cache_ ) ; <nl> if ( cache_ . count ( regKey ) ! = 0 ) { <nl> - break ; <nl> + return cache_ [ regKey ] ; <nl> } <nl> } <nl> - <nl> - return cache_ [ regKey ] ; <nl> } <nl> <nl> int64_t FileStore : : addHelper ( const std : : string & key , int64_t i ) { <nl> + std : : unique_lock < std : : mutex > l ( activeFileOpLock_ ) ; <nl> File file ( path_ , O_RDWR | O_CREAT , timeout_ ) ; <nl> auto lock = file . lockExclusive ( ) ; <nl> pos_ = refresh ( file , pos_ , cache_ ) ; <nl> int64_t FileStore : : add ( const std : : string & key , int64_t i ) { <nl> } <nl> <nl> bool FileStore : : check ( const std : : vector < std : : string > & keys ) { <nl> + std : : unique_lock < std : : mutex > l ( activeFileOpLock_ ) ; <nl> File file ( path_ , O_RDONLY , timeout_ ) ; <nl> auto lock = file . lockShared ( ) ; <nl> pos_ = refresh ( file , pos_ , cache_ ) ; <nl> mmm a / torch / lib / c10d / FileStore . hpp <nl> ppp b / torch / lib / c10d / FileStore . hpp <nl> <nl> <nl> # include < sys / types . h > <nl> <nl> + # include < mutex > <nl> # include < unordered_map > <nl> <nl> # include < c10d / Store . hpp > <nl> class FileStore : public Store { <nl> const std : : string regularPrefix_ ; <nl> <nl> std : : unordered_map < std : : string , std : : vector < uint8_t > > cache_ ; <nl> + <nl> + std : : mutex activeFileOpLock_ ; <nl> } ; <nl> <nl> } / / namespace c10d <nl>
Make FileStore not segfault with concurrent accesses . ( )
pytorch/pytorch
331e09eca44031ed11b13f1813b84f53d879727f
2019-10-30T18:03:00Z
mmm a / src / terminal . h <nl> ppp b / src / terminal . h <nl> <nl> THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . <nl> * / <nl> <nl> - # ifndef CONSOLE_H <nl> - # define CONSOLE_H <nl> + # ifndef TERMINAL_H <nl> + # define TERMINAL_H <nl> <nl> # include < QString > <nl> # include < ostream > <nl> class Terminal <nl> Encoding m_encoding ; <nl> } ; <nl> <nl> - # endif / / CONSOLE_H <nl> + # endif / / TERMINAL_H <nl>
Ensure consistent # ifdef guard .
ariya/phantomjs
83922ada2f975ab1bb411453bdafa4bd5c6d5aad
2011-08-21T07:30:15Z
mmm a / src / library_stack_trace . js <nl> ppp b / src / library_stack_trace . js <nl> var LibraryStackTrace = { <nl> } , <nl> <nl> $ jsStackTrace : function ( ) { <nl> - var err = new Error ( ) ; <nl> - if ( ! err . stack ) { <nl> + var error = new Error ( ) ; <nl> + if ( ! error . stack ) { <nl> / / IE10 + special cases : It does have callstack info , but it is only populated if an Error object is thrown , <nl> / / so try that as a special - case . <nl> try { <nl> throw new Error ( ) ; <nl> } catch ( e ) { <nl> - err = e ; <nl> + error = e ; <nl> } <nl> - if ( ! err . stack ) { <nl> + if ( ! error . stack ) { <nl> return ' ( no stack trace available ) ' ; <nl> } <nl> } <nl> - return err . stack . toString ( ) ; <nl> + return error . stack . toString ( ) ; <nl> } , <nl> <nl> $ stackTrace : function ( ) { <nl>
Avoid ' err ' in jsStackTrace , which can conflict in LIBRARY_DEBUG which adds code that calls the global err ( ) ( )
emscripten-core/emscripten
bd785f0ffd8ceaa6a1341424be8ca6fd7b88957f
2020-08-31T20:54:05Z
mmm a / test / rql_test / Makefile <nl> ppp b / test / rql_test / Makefile <nl> js_cursor : <nl> py_cursor : <nl> python connections / cursor_test . py $ ( BUILD ) py <nl> <nl> + docs_test : <nl> + . / test - runner run_docs_tests \ " $ ( BUILD ) \ " <nl> <nl> connect : js_connect py_connect <nl> <nl> mmm a / test / rql_test / docs / Makefile <nl> ppp b / test / rql_test / docs / Makefile <nl> JSON_OUT = ~ / rethinkdb - www / _site / assets / js / reql_docs . json <nl> <nl> YAML_FILES = $ ( shell find $ ( YAML_DIR ) - name ' * . yaml ' ) <nl> <nl> - SRCIPTS = scripts <nl> - JSON_CONVERT = $ ( SRCIPTS ) / json_convert . py <nl> + SCRIPTS = . / scripts <nl> + JSON_CONVERT = $ ( SCRIPTS ) / json_convert . py <nl> + BUILD_TESTS = $ ( SCRIPTS ) / build_tests . py <nl> + <nl> + BUILD_DIR = build <nl> <nl> $ ( JSON_OUT ) : $ ( JSON_CONVERT ) $ ( YAML_FILES ) <nl> python $ ( JSON_CONVERT ) $ ( YAML_DIR ) $ ( JSON_OUT ) <nl> <nl> - clean : $ ( JSON_OUT ) <nl> + $ ( BUILD_DIR ) / test . py $ ( BUILD_DIR ) / test . js $ ( BUILD_DIR ) / test . rb : $ ( BUILD_TESTS ) $ ( YAML_FILES ) <nl> + mkdir - p $ ( BUILD_DIR ) <nl> + python $ ( BUILD_TESTS ) $ ( YAML_DIR ) <nl> + <nl> + build_tests : $ ( BUILD_DIR ) / test . py $ ( BUILD_DIR ) / test . js $ ( BUILD_DIR ) / test . rb <nl> + <nl> + clean : <nl> rm - f $ ( JSON_OUT ) <nl> + rm - fr $ ( BUILD_DIR ) <nl> <nl> - . PHONY : clean <nl> + . PHONY : clean build_tests <nl> new file mode 100644 <nl> index 00000000000 . . 5d3b54db301 <nl> mmm / dev / null <nl> ppp b / test / rql_test / docs / scripts / build_tests . py <nl> <nl> + import os <nl> + import sys <nl> + import yaml <nl> + <nl> + # tree of YAML documents defining documentation <nl> + src_dir = sys . argv [ 1 ] <nl> + <nl> + commands = [ ] <nl> + <nl> + # Walk the src files to compile all sections and commands <nl> + for root , dirs , file_names in os . walk ( src_dir ) : <nl> + for file_name in file_names : <nl> + docs = yaml . load ( file ( os . path . join ( root , file_name ) ) ) <nl> + <nl> + if ' commands ' in docs : <nl> + commands . extend ( docs [ ' commands ' ] ) <nl> + <nl> + def build_script ( lang ) : <nl> + with open ( ' build / test . ' + lang , ' w + ' ) as out : <nl> + with open ( ' . . / drivers / driver . ' + lang ) as driver : <nl> + out . write ( driver . read ( ) ) <nl> + out . write ( ' \ n ' ) <nl> + <nl> + for command in commands : <nl> + section_name = command [ ' section ' ] <nl> + command_name = command [ ' tag ' ] <nl> + <nl> + for i , example in enumerate ( command [ ' examples ' ] ) : <nl> + test_tag = section_name + " - " + command_name + " - " + str ( i ) <nl> + test_case = example [ ' code ' ] <nl> + if isinstance ( test_case , dict ) : <nl> + if lang in test_case : <nl> + test_case = test_case [ lang ] <nl> + else : <nl> + test_case = None <nl> + <nl> + # Check for an override of this test case <nl> + if lang in command and isinstance ( command [ lang ] , dict ) : <nl> + override = command [ lang ] <nl> + if ' examples ' in override : <nl> + if str ( i ) in override [ ' examples ' ] : <nl> + example_override = override [ ' examples ' ] [ str ( i ) ] <nl> + <nl> + if len ( example_override ) = = 0 : <nl> + test_case = None <nl> + elif ' code ' in example_override : <nl> + test_case = example_override [ ' code ' ] <nl> + <nl> + if test_case ! = None : <nl> + out . write ( " test ( " + repr ( test_case ) + " , ' ' , " + repr ( test_tag ) + " ) \ n " ) <nl> + <nl> + build_script ( ' py ' ) <nl> + build_script ( ' js ' ) <nl> + build_script ( ' py ' ) <nl> mmm a / test / rql_test / test - runner <nl> ppp b / test / rql_test / test - runner <nl> class TestGroup : <nl> if len ( code ) > 0 : <nl> out . write ( ' define ( ' + code [ 0 ] + ' ) \ n ' ) <nl> <nl> - # Tests may specify generic test strings valid for <nl> + # Tests may specify generic test strings valid for <nl> # all languages or language specific versions <nl> def get_code ( self , obj , lang , index ) : <nl> <nl> class TestGroup : <nl> <nl> # Try language specific version first <nl> if lang in obj : <nl> - <nl> + <nl> lang_specific = obj [ lang ] <nl> <nl> # lang_specific may be a dict giving a code attribute <nl> class TestGroup : <nl> <nl> else : <nl> code = None <nl> - <nl> + <nl> else : <nl> <nl> # obj itself is the code <nl> class TestBuilder : <nl> <nl> tests = [ ] <nl> for root , dirs , files in walk ( self . root ) : <nl> - <nl> + <nl> # Find the nested group location from the root <nl> path = root . split ( ' / ' ) [ 1 : ] <nl> - <nl> + <nl> # Parse and insert the yaml structures <nl> for name in filter ( lambda name : name . endswith ( ' . yaml ' ) , files ) : <nl> test_group = yaml . load ( open ( root + ' / ' + name ) ) <nl> def run ( build , lang = None ) : <nl> def build_test_scripts ( shard ) : <nl> TestBuilder ( ' src ' , shard ) <nl> <nl> + def run_docs_tests ( build , lang = None ) : <nl> + with RethinkDBTestServers ( 4 , server_build = build ) as servers : <nl> + call ( [ ' python ' , ' docs / build / test . py ' , " UNUSED " , str ( servers . driver_port ( ) ) , str ( servers . cluster_port ( ) ) , servers . executable ( ) ] ) <nl> + servers . restart ( ) <nl> + call ( [ ' node ' , ' docs / build / test . js ' , " UNUSED " , str ( servers . driver_port ( ) ) , str ( servers . cluster_port ( ) ) , servers . executable ( ) ] ) <nl> + servers . restart ( ) <nl> + call ( [ ' ruby ' , ' docs / build / test . rb ' , " UNUSED " , str ( servers . driver_port ( ) ) , str ( servers . cluster_port ( ) ) , servers . executable ( ) ] ) <nl> + <nl> test_filter = os . getenv ( " RQL_TEST " ) or " . * " <nl> <nl> # Call 0 - arg function given by shell ( e . g . " . / test - runner run " ) <nl>
docs tests
rethinkdb/rethinkdb
350bd2bd9ce1a799ad24cf9678b4bfb8f6b82160
2013-03-27T19:42:13Z
mmm a / Marlin / Marlin_main . cpp <nl> ppp b / Marlin / Marlin_main . cpp <nl> static void clean_up_after_endstop_or_probe_move ( ) { <nl> # endif <nl> <nl> / / move down slowly to find bed <nl> - do_probe_move ( - 10 , Z_PROBE_SPEED_SLOW ) ; <nl> + do_probe_move ( - ( Z_MAX_LENGTH ) - 10 , Z_PROBE_SPEED_SLOW ) ; <nl> <nl> # if ENABLED ( DEBUG_LEVELING_FEATURE ) <nl> if ( DEBUGGING ( LEVELING ) ) DEBUG_POS ( " < < < run_z_probe " , current_position ) ; <nl>
Fix bed probing bug without PROBE_DOUBLE_TOUCH
MarlinFirmware/Marlin
dd94d0b9d506bee425552c9dd826458aa74e917e
2016-08-29T00:00:25Z
new file mode 100644 <nl> index 000000000000 . . 27fa89d5fa74 <nl> mmm / dev / null <nl> ppp b / validation - test / compiler_crashers / 28290 - swift - constraints - constraintsystem - diagnosefailureforexpr . swift <nl> <nl> + / / This source file is part of the Swift . org open source project <nl> + / / Copyright ( c ) 2014 - 2016 Apple Inc . and the Swift project authors <nl> + / / Licensed under Apache License v2 . 0 with Runtime Library Exception <nl> + / / <nl> + / / See http : / / swift . org / LICENSE . txt for license information <nl> + / / See http : / / swift . org / CONTRIBUTORS . txt for the list of Swift project authors <nl> + <nl> + / / RUN : not - - crash % target - swift - frontend % s - parse <nl> + func a { { String ( $ 0 } { u <nl> + return { <nl>
Merge pull request from practicalswift / swiftc - 28290 - swift - constraints - constraintsystem - diagnosefailureforexpr
apple/swift
b080e86b21254e74e0570de365a22d6504fc24a5
2016-05-06T20:11:51Z
mmm a / tensorflow / python / compiler / xla / xla . py <nl> ppp b / tensorflow / python / compiler / xla / xla . py <nl> <nl> def compile ( computation , inputs = None ) : # pylint : disable = redefined - builtin <nl> " " " Builds an operator that compiles and runs ` computation ` with XLA . <nl> <nl> + NOTE : In eager mode , ` computation ` will have ` @ tf . function ` semantics . <nl> + <nl> Args : <nl> computation : A Python function that builds a computation to apply to the <nl> input . If the function takes n inputs , ' inputs ' should be a list of n <nl>
Add fair warning about calling python function with xla . compile in eager mode
tensorflow/tensorflow
a234ce80f2e5df0a8541d8a5dbd312af6bf191f2
2019-04-16T04:01:47Z
mmm a / docs / en / sql - reference / aggregate - functions / combinators . md <nl> ppp b / docs / en / sql - reference / aggregate - functions / combinators . md <nl> Converts an aggregate function for tables into an aggregate function for arrays <nl> <nl> # # - OrDefault { # agg - functions - combinator - ordefault } <nl> <nl> - Fills the default value of the aggregate function ’ s return type if there is nothing to aggregate . <nl> + Changes behaviour of an aggregate function . <nl> + <nl> + If an aggregate function doesn ' t have input values , with this combinator it returns the default value for its return data type . Applies to the aggregate functions that can take empty input data . <nl> + ` - OrDefault ` can be combined with other combinators . <nl> + <nl> + * * Syntax * * <nl> + <nl> + ` ` ` sql <nl> + < aggFunction > OrDefault ( x ) <nl> + ` ` ` <nl> + <nl> + * * Parameters * * <nl> + <nl> + - ` x ` — Aggregate function parameters . <nl> + <nl> + * * Returned values * * <nl> + <nl> + Returns the default value of an aggregate function ’ s return type if there is nothing to aggregate . <nl> + <nl> + Type depends on the aggregate function used . <nl> + <nl> + * * Example * * <nl> + <nl> + Query : <nl> <nl> ` ` ` sql <nl> SELECT avg ( number ) , avgOrDefault ( number ) FROM numbers ( 0 ) <nl> ` ` ` <nl> <nl> + Result : <nl> + <nl> ` ` ` text <nl> ┌ ─ avg ( number ) ─ ┬ ─ avgOrDefault ( number ) ─ ┐ <nl> │ nan │ 0 │ <nl> └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> ` ` ` <nl> <nl> + Also ` - OrDefault ` can be used with a few combinators . It is useful when the aggregate function does not accept the empty input . <nl> + <nl> + Query : <nl> + <nl> + ` ` ` sql <nl> + SELECT avgOrDefaultIf ( x , x > 10 ) <nl> + FROM <nl> + ( <nl> + SELECT toDecimal32 ( 1 . 23 , 2 ) AS x <nl> + ) <nl> + ` ` ` <nl> + <nl> + Result : <nl> + <nl> + ` ` ` text <nl> + ┌ ─ avgOrDefaultIf ( x , greater ( x , 10 ) ) ─ ┐ <nl> + │ 0 . 00 │ <nl> + └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> + ` ` ` <nl> + <nl> + <nl> # # - OrNull { # agg - functions - combinator - ornull } <nl> <nl> - Fills ` null ` if there is nothing to aggregate . The return column will be nullable . <nl> + Changes behaviour of an aggregate function . <nl> + <nl> + This combinator replaces returned value with nullable one , if the aggregate function does not have values to calculate . Works with different aggregate functions . <nl> + ` - OrNull ` can be combined with other combinators . <nl> + <nl> + * * Syntax * * <nl> + <nl> + ` ` ` sql <nl> + < aggFunction > OrNull ( x ) <nl> + ` ` ` <nl> + <nl> + * * Parameters * * <nl> + <nl> + - ` x ` — Aggregate function parameters . <nl> + <nl> + * * Returned values * * <nl> + <nl> + Returns the ` Null ` value of an aggregate function ’ s return type if there is nothing to aggregate . <nl> + <nl> + Type : [ Nullable ] ( . . / data_types / nullable . md ) . <nl> + <nl> + * * Example * * <nl> + <nl> + Add ` - orNull ` to the end of aggregate function . <nl> + <nl> + Query : <nl> <nl> ` ` ` sql <nl> - SELECT avg ( number ) , avgOrNull ( number ) FROM numbers ( 0 ) <nl> + SELECT sumOrNull ( number ) FROM numbers ( 10 ) WHERE number > 10 <nl> ` ` ` <nl> <nl> + Result : <nl> + <nl> ` ` ` text <nl> - ┌ ─ avg ( number ) ─ ┬ ─ avgOrNull ( number ) ─ ┐ <nl> - │ nan │ ᴺᵁᴸᴸ │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> + ┌ ─ sumOrNull ( number ) ─ ┐ <nl> + │ ᴺᵁᴸᴸ │ <nl> + └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> ` ` ` <nl> <nl> - - OrDefault and - OrNull can be combined with other combinators . It is useful when the aggregate function does not accept the empty input . <nl> + Also ` - OrNull ` can be used with a few combinators . It is useful when the aggregate function does not accept the empty input . <nl> + <nl> + Query : <nl> <nl> ` ` ` sql <nl> SELECT avgOrNullIf ( x , x > 10 ) <nl> FROM <nl> ) <nl> ` ` ` <nl> <nl> + Result : <nl> + <nl> ` ` ` text <nl> ┌ ─ avgOrNullIf ( x , greater ( x , 10 ) ) ─ ┐ <nl> │ ᴺᵁᴸᴸ │ <nl> deleted file mode 100644 <nl> index 86ecbe44946 . . 00000000000 <nl> mmm a / docs / en / sql_reference / aggregate_functions / combinators . md <nl> ppp / dev / null <nl> <nl> mmm - <nl> - toc_priority : 37 <nl> - toc_title : Aggregate function combinators <nl> mmm - <nl> - <nl> - # Aggregate Function Combinators { # aggregate_functions_combinators } <nl> - <nl> - The name of an aggregate function can have a suffix appended to it . This changes the way the aggregate function works . <nl> - <nl> - # # - If { # agg - functions - combinator - if } <nl> - <nl> - The suffix - If can be appended to the name of any aggregate function . In this case , the aggregate function accepts an extra argument – a condition ( Uint8 type ) . The aggregate function processes only the rows that trigger the condition . If the condition was not triggered even once , it returns a default value ( usually zeros or empty strings ) . <nl> - <nl> - Examples : ` sumIf ( column , cond ) ` , ` countIf ( cond ) ` , ` avgIf ( x , cond ) ` , ` quantilesTimingIf ( level1 , level2 ) ( x , cond ) ` , ` argMinIf ( arg , val , cond ) ` and so on . <nl> - <nl> - With conditional aggregate functions , you can calculate aggregates for several conditions at once , without using subqueries and ` JOIN ` s . For example , in Yandex . Metrica , conditional aggregate functions are used to implement the segment comparison functionality . <nl> - <nl> - # # - Array { # agg - functions - combinator - array } <nl> - <nl> - The - Array suffix can be appended to any aggregate function . In this case , the aggregate function takes arguments of the ‘ Array ( T ) ’ type ( arrays ) instead of ‘ T ’ type arguments . If the aggregate function accepts multiple arguments , this must be arrays of equal lengths . When processing arrays , the aggregate function works like the original aggregate function across all array elements . <nl> - <nl> - Example 1 : ` sumArray ( arr ) ` - Totals all the elements of all ‘ arr ’ arrays . In this example , it could have been written more simply : ` sum ( arraySum ( arr ) ) ` . <nl> - <nl> - Example 2 : ` uniqArray ( arr ) ` – Counts the number of unique elements in all ‘ arr ’ arrays . This could be done an easier way : ` uniq ( arrayJoin ( arr ) ) ` , but it ’ s not always possible to add ‘ arrayJoin ’ to a query . <nl> - <nl> - - If and - Array can be combined . However , ‘ Array ’ must come first , then ‘ If ’ . Examples : ` uniqArrayIf ( arr , cond ) ` , ` quantilesTimingArrayIf ( level1 , level2 ) ( arr , cond ) ` . Due to this order , the ‘ cond ’ argument won ’ t be an array . <nl> - <nl> - # # - State { # agg - functions - combinator - state } <nl> - <nl> - If you apply this combinator , the aggregate function doesn ’ t return the resulting value ( such as the number of unique values for the [ uniq ] ( reference . md # agg_function - uniq ) function ) , but an intermediate state of the aggregation ( for ` uniq ` , this is the hash table for calculating the number of unique values ) . This is an ` AggregateFunction ( . . . ) ` that can be used for further processing or stored in a table to finish aggregating later . <nl> - <nl> - To work with these states , use : <nl> - <nl> - - [ AggregatingMergeTree ] ( . . / . . / engines / table_engines / mergetree_family / aggregatingmergetree . md ) table engine . <nl> - - [ finalizeAggregation ] ( . . / . . / sql_reference / functions / other_functions . md # function - finalizeaggregation ) function . <nl> - - [ runningAccumulate ] ( . . / . . / sql_reference / functions / other_functions . md # function - runningaccumulate ) function . <nl> - - [ - Merge ] ( # aggregate_functions_combinators_merge ) combinator . <nl> - - [ - MergeState ] ( # aggregate_functions_combinators_mergestate ) combinator . <nl> - <nl> - # # - Merge { # aggregate_functions_combinators - merge } <nl> - <nl> - If you apply this combinator , the aggregate function takes the intermediate aggregation state as an argument , combines the states to finish aggregation , and returns the resulting value . <nl> - <nl> - # # - MergeState { # aggregate_functions_combinators - mergestate } <nl> - <nl> - Merges the intermediate aggregation states in the same way as the - Merge combinator . However , it doesn ’ t return the resulting value , but an intermediate aggregation state , similar to the - State combinator . <nl> - <nl> - # # - ForEach { # agg - functions - combinator - foreach } <nl> - <nl> - Converts an aggregate function for tables into an aggregate function for arrays that aggregates the corresponding array items and returns an array of results . For example , ` sumForEach ` for the arrays ` [ 1 , 2 ] ` , ` [ 3 , 4 , 5 ] ` and ` [ 6 , 7 ] ` returns the result ` [ 10 , 13 , 5 ] ` after adding together the corresponding array items . <nl> - <nl> - # # - OrDefault { # agg - functions - combinator - ordefault } <nl> - <nl> - Changes behaviour of an aggregate function . <nl> - <nl> - If an aggregate function doesn ' t have input values , with this combinator it returns the default value for its return data type . Applies to the aggregate functions that can take empty input data . <nl> - ` - OrDefault ` can be combined with other combinators . <nl> - <nl> - * * Syntax * * <nl> - <nl> - ` ` ` sql <nl> - < aggFunction > OrDefault ( x ) <nl> - ` ` ` <nl> - <nl> - * * Parameters * * <nl> - <nl> - - ` x ` — Aggregate function parameters . <nl> - <nl> - * * Returned values * * <nl> - <nl> - Returns the default value of an aggregate function ’ s return type if there is nothing to aggregate . <nl> - <nl> - Type depends on the aggregate function used . <nl> - <nl> - * * Example * * <nl> - <nl> - Query : <nl> - <nl> - ` ` ` sql <nl> - SELECT avg ( number ) , avgOrDefault ( number ) FROM numbers ( 0 ) <nl> - ` ` ` <nl> - <nl> - Result : <nl> - <nl> - ` ` ` text <nl> - ┌ ─ avg ( number ) ─ ┬ ─ avgOrDefault ( number ) ─ ┐ <nl> - │ nan │ 0 │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> - ` ` ` <nl> - <nl> - Also ` - OrDefault ` can be used with a few combinators . It is useful when the aggregate function does not accept the empty input . <nl> - <nl> - Query : <nl> - <nl> - ` ` ` sql <nl> - SELECT avgOrDefaultIf ( x , x > 10 ) <nl> - FROM <nl> - ( <nl> - SELECT toDecimal32 ( 1 . 23 , 2 ) AS x <nl> - ) <nl> - ` ` ` <nl> - <nl> - Result : <nl> - <nl> - ` ` ` text <nl> - ┌ ─ avgOrDefaultIf ( x , greater ( x , 10 ) ) ─ ┐ <nl> - │ 0 . 00 │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> - ` ` ` <nl> - <nl> - <nl> - # # - OrNull { # agg - functions - combinator - ornull } <nl> - <nl> - Changes behaviour of an aggregate function . <nl> - <nl> - This combinator replaces returned value with nullable one , if the aggregate function does not have values to calculate . Works with different aggregate functions . <nl> - ` - OrNull ` can be combined with other combinators . <nl> - <nl> - * * Syntax * * <nl> - <nl> - ` ` ` sql <nl> - < aggFunction > OrNull ( x ) <nl> - ` ` ` <nl> - <nl> - * * Parameters * * <nl> - <nl> - - ` x ` — Aggregate function parameters . <nl> - <nl> - * * Returned values * * <nl> - <nl> - Returns the ` Null ` value of an aggregate function ’ s return type if there is nothing to aggregate . <nl> - <nl> - Type : [ Nullable ] ( . . / data_types / nullable . md ) . <nl> - <nl> - * * Example * * <nl> - <nl> - Add ` - orNull ` to the end of aggregate function . <nl> - <nl> - Query : <nl> - <nl> - ` ` ` sql <nl> - SELECT sumOrNull ( number ) FROM numbers ( 10 ) WHERE number > 10 <nl> - ` ` ` <nl> - <nl> - Result : <nl> - <nl> - ` ` ` text <nl> - ┌ ─ sumOrNull ( number ) ─ ┐ <nl> - │ ᴺᵁᴸᴸ │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> - ` ` ` <nl> - <nl> - Also ` - OrNull ` can be used with a few combinators . It is useful when the aggregate function does not accept the empty input . <nl> - <nl> - Query : <nl> - <nl> - ` ` ` sql <nl> - SELECT avgOrNullIf ( x , x > 10 ) <nl> - FROM <nl> - ( <nl> - SELECT toDecimal32 ( 1 . 23 , 2 ) AS x <nl> - ) <nl> - ` ` ` <nl> - <nl> - Result : <nl> - <nl> - ` ` ` text <nl> - ┌ ─ avgOrNullIf ( x , greater ( x , 10 ) ) ─ ┐ <nl> - │ ᴺᵁᴸᴸ │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> - ` ` ` <nl> - <nl> - # # - Resample { # agg - functions - combinator - resample } <nl> - <nl> - Lets you divide data into groups , and then separately aggregates the data in those groups . Groups are created by splitting the values from one column into intervals . <nl> - <nl> - ` ` ` sql <nl> - < aggFunction > Resample ( start , end , step ) ( < aggFunction_params > , resampling_key ) <nl> - ` ` ` <nl> - <nl> - * * Parameters * * <nl> - <nl> - - ` start ` — Starting value of the whole required interval for ` resampling_key ` values . <nl> - - ` stop ` — Ending value of the whole required interval for ` resampling_key ` values . The whole interval doesn ’ t include the ` stop ` value ` [ start , stop ) ` . <nl> - - ` step ` — Step for separating the whole interval into subintervals . The ` aggFunction ` is executed over each of those subintervals independently . <nl> - - ` resampling_key ` — Column whose values are used for separating data into intervals . <nl> - - ` aggFunction_params ` — ` aggFunction ` parameters . <nl> - <nl> - * * Returned values * * <nl> - <nl> - - Array of ` aggFunction ` results for each subinterval . <nl> - <nl> - * * Example * * <nl> - <nl> - Consider the ` people ` table with the following data : <nl> - <nl> - ` ` ` text <nl> - ┌ ─ name ─ ─ ─ ┬ ─ age ─ ┬ ─ wage ─ ┐ <nl> - │ John │ 16 │ 10 │ <nl> - │ Alice │ 30 │ 15 │ <nl> - │ Mary │ 35 │ 8 │ <nl> - │ Evelyn │ 48 │ 11 . 5 │ <nl> - │ David │ 62 │ 9 . 9 │ <nl> - │ Brian │ 60 │ 16 │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ─ ┘ <nl> - ` ` ` <nl> - <nl> - Let ’ s get the names of the people whose age lies in the intervals of ` [ 30 , 60 ) ` and ` [ 60 , 75 ) ` . Since we use integer representation for age , we get ages in the ` [ 30 , 59 ] ` and ` [ 60 , 74 ] ` intervals . <nl> - <nl> - To aggregate names in an array , we use the [ groupArray ] ( reference . md # agg_function - grouparray ) aggregate function . It takes one argument . In our case , it ’ s the ` name ` column . The ` groupArrayResample ` function should use the ` age ` column to aggregate names by age . To define the required intervals , we pass the ` 30 , 75 , 30 ` arguments into the ` groupArrayResample ` function . <nl> - <nl> - ` ` ` sql <nl> - SELECT groupArrayResample ( 30 , 75 , 30 ) ( name , age ) FROM people <nl> - ` ` ` <nl> - <nl> - ` ` ` text <nl> - ┌ ─ groupArrayResample ( 30 , 75 , 30 ) ( name , age ) ─ ─ ─ ─ ─ ┐ <nl> - │ [ [ ' Alice ' , ' Mary ' , ' Evelyn ' ] , [ ' David ' , ' Brian ' ] ] │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> - ` ` ` <nl> - <nl> - Consider the results . <nl> - <nl> - ` Jonh ` is out of the sample because he ’ s too young . Other people are distributed according to the specified age intervals . <nl> - <nl> - Now let ’ s count the total number of people and their average wage in the specified age intervals . <nl> - <nl> - ` ` ` sql <nl> - SELECT <nl> - countResample ( 30 , 75 , 30 ) ( name , age ) AS amount , <nl> - avgResample ( 30 , 75 , 30 ) ( wage , age ) AS avg_wage <nl> - FROM people <nl> - ` ` ` <nl> - <nl> - ` ` ` text <nl> - ┌ ─ amount ─ ┬ ─ avg_wage ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ <nl> - │ [ 3 , 2 ] │ [ 11 . 5 , 12 . 949999809265137 ] │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> - ` ` ` <nl> - <nl> - [ Original article ] ( https : / / clickhouse . tech / docs / en / query_language / agg_functions / combinators / ) < ! - - hide - - > <nl> mmm a / docs / ru / sql - reference / aggregate - functions / combinators . md <nl> ppp b / docs / ru / sql - reference / aggregate - functions / combinators . md <nl> <nl> <nl> Преобразует агрегатную функцию для таблиц в агрегатную функцию для массивов , которая применяет агрегирование для соответствующих элементов массивов и возвращает массив результатов . Например , ` sumForEach ` для массивов ` [ 1 , 2 ] ` , ` [ 3 , 4 , 5 ] ` и ` [ 6 , 7 ] ` даст результат ` [ 10 , 13 , 5 ] ` , сложив соответственные элементы массивов . <nl> <nl> + # # - OrDefault { # agg - functions - combinator - ordefault } <nl> + <nl> + Изменяет поведение агрегатной функции . <nl> + <nl> + Если на вход агрегатной функции передан пустой набор данных , то с помощью комбинатора ` - OrDefault ` функция возвращает значение по умолчанию для соответствующего типа данных . Комбинатор применяется к агрегатным функциям , которые могут принимать пустые входные данные . <nl> + ` - OrDefault ` можно использовать с другими комбинаторами . <nl> + <nl> + * * Синтаксис * * <nl> + <nl> + ` ` ` sql <nl> + < aggFunction > OrDefault ( x ) <nl> + ` ` ` <nl> + <nl> + * * Параметры * * <nl> + <nl> + - ` x ` — Параметры агрегатной функции . <nl> + <nl> + * * Возращаемые зачения * * <nl> + <nl> + Возвращает значение по умолчанию для соответствующего типа агрегатной функции , если агрегировать нечего . <nl> + <nl> + Тип данных зависит от используемой агрегатной функции . <nl> + <nl> + * * Пример * * <nl> + <nl> + Запрос : <nl> + <nl> + ` ` ` sql <nl> + SELECT avg ( number ) , avgOrDefault ( number ) FROM numbers ( 0 ) <nl> + ` ` ` <nl> + <nl> + Результат : <nl> + <nl> + ` ` ` text <nl> + ┌ ─ avg ( number ) ─ ┬ ─ avgOrDefault ( number ) ─ ┐ <nl> + │ nan │ 0 │ <nl> + └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> + ` ` ` <nl> + <nl> + Также ` - OrDefault ` может использоваться с другими комбинаторами . Это полезно , когда агрегатная функция не принимает пустые входные данные . <nl> + <nl> + Запрос : <nl> + <nl> + ` ` ` sql <nl> + SELECT avgOrDefaultIf ( x , x > 10 ) <nl> + FROM <nl> + ( <nl> + SELECT toDecimal32 ( 1 . 23 , 2 ) AS x <nl> + ) <nl> + ` ` ` <nl> + <nl> + Результат : <nl> + <nl> + ` ` ` text <nl> + ┌ ─ avgOrDefaultIf ( x , greater ( x , 10 ) ) ─ ┐ <nl> + │ 0 . 00 │ <nl> + └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> + ` ` ` <nl> + <nl> + <nl> + # # - OrNull { # agg - functions - combinator - ornull } <nl> + <nl> + Изменяет поведение агрегатной функции . <nl> + <nl> + Этот комбинатор заменяет возвращаемое значение на ` Null ` , если на вход агрегатной функции передан пустой набор данных . Комбинатор работает с различными агрегатными функциями . <nl> + ` - OrNull ` может использоваться с другими комбинаторами . <nl> + <nl> + * * Синтаксис * * <nl> + <nl> + ` ` ` sql <nl> + < aggFunction > OrNull ( x ) <nl> + ` ` ` <nl> + <nl> + * * Параметры * * <nl> + <nl> + - ` x ` — Параметры агрегатной функции . <nl> + <nl> + * * Возвращаемые значения * * <nl> + <nl> + Возвращает значение ` Null ` для соответствующего типа агрегатной функции , если агрегировать нечего . <nl> + <nl> + Тип : [ Nullable ] ( . . / data_types / nullable . md ) . <nl> + <nl> + * * Пример * * <nl> + <nl> + Добавьте ` - orNull ` в конец агрегатной функции . <nl> + <nl> + Запрос : <nl> + <nl> + ` ` ` sql <nl> + SELECT sumOrNull ( number ) FROM numbers ( 10 ) WHERE number > 10 <nl> + ` ` ` <nl> + <nl> + Результат : <nl> + <nl> + ` ` ` text <nl> + ┌ ─ sumOrNull ( number ) ─ ┐ <nl> + │ ᴺᵁᴸᴸ │ <nl> + └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> + ` ` ` <nl> + <nl> + Также ` - OrNull ` может использоваться с другими комбинаторами . Это полезно , когда агрегатная функция не принимает пустые входные данные . <nl> + <nl> + Запрос : <nl> + <nl> + ` ` ` sql <nl> + SELECT avgOrNullIf ( x , x > 10 ) <nl> + FROM <nl> + ( <nl> + SELECT toDecimal32 ( 1 . 23 , 2 ) AS x <nl> + ) <nl> + ` ` ` <nl> + <nl> + Результат : <nl> + <nl> + ` ` ` text <nl> + ┌ ─ avgOrNullIf ( x , greater ( x , 10 ) ) ─ ┐ <nl> + │ ᴺᵁᴸᴸ │ <nl> + └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> + ` ` ` <nl> + <nl> # # - Resample { # agg - functions - combinator - resample } <nl> <nl> Позволяет поделить данные на группы , а затем по - отдельности агрегирует данные для этих групп . Группы образуются разбиением значений одного из столбцов на интервалы . <nl> deleted file mode 100644 <nl> index 35ee9d5bb56 . . 00000000000 <nl> mmm a / docs / ru / sql_reference / aggregate_functions / combinators . md <nl> ppp / dev / null <nl> <nl> - # Комбинаторы агрегатных функций { # aggregate_functions_combinators } <nl> - <nl> - К имени агрегатной функции может быть приписан некоторый суффикс . При этом , работа агрегатной функции некоторым образом модифицируется . <nl> - <nl> - # # - If { # agg - functions - combinator - if } <nl> - <nl> - К имени любой агрегатной функции может быть приписан суффикс - If . В этом случае , агрегатная функция принимает ещё один дополнительный аргумент - условие ( типа UInt8 ) . Агрегатная функция будет обрабатывать только те строки , для которых условие сработало . Если условие ни разу не сработало - возвращается некоторое значение по умолчанию ( обычно - нули , пустые строки ) . <nl> - <nl> - Примеры : ` sumIf ( column , cond ) ` , ` countIf ( cond ) ` , ` avgIf ( x , cond ) ` , ` quantilesTimingIf ( level1 , level2 ) ( x , cond ) ` , ` argMinIf ( arg , val , cond ) ` и т . п . <nl> - <nl> - С помощью условных агрегатных функций , вы можете вычислить агрегаты сразу для нескольких условий , не используя подзапросы и ` JOIN ` - ы . <nl> - Например , в Яндекс . Метрике , условные агрегатные функции используются для реализации функциональности сравнения сегментов . <nl> - <nl> - # # - Array { # array } <nl> - <nl> - К имени любой агрегатной функции может быть приписан суффикс - Array . В этом случае , агрегатная функция вместо аргументов типов T принимает аргументы типов Array ( T ) ( массивы ) . Если агрегатная функция принимает несколько аргументов , то это должны быть массивы одинаковых длин . При обработке массивов , агрегатная функция работает , как исходная агрегатная функция по всем элементам массивов . <nl> - <nl> - Пример 1 : ` sumArray ( arr ) ` - просуммировать все элементы всех массивов arr . В данном примере можно было бы написать проще : ` sum ( arraySum ( arr ) ) ` . <nl> - <nl> - Пример 2 : ` uniqArray ( arr ) ` - посчитать количество уникальных элементов всех массивов arr . Это можно было бы сделать проще : ` uniq ( arrayJoin ( arr ) ) ` , но не всегда есть возможность добавить arrayJoin в запрос . <nl> - <nl> - Комбинаторы - If и - Array можно сочетать . При этом , должен сначала идти Array , а потом If . Примеры : ` uniqArrayIf ( arr , cond ) ` , ` quantilesTimingArrayIf ( level1 , level2 ) ( arr , cond ) ` . Из - за такого порядка получается , что аргумент cond не должен быть массивом . <nl> - <nl> - # # - State { # state } <nl> - <nl> - В случае применения этого комбинатора , агрегатная функция возвращает не готовое значение ( например , в случае функции [ uniq ] ( reference . md # agg_function - uniq ) — количество уникальных значений ) , а промежуточное состояние агрегации ( например , в случае функции ` uniq ` — хэш - таблицу для расчёта количества уникальных значений ) , которое имеет тип ` AggregateFunction ( . . . ) ` и может использоваться для дальнейшей обработки или может быть сохранено в таблицу для последующей доагрегации . <nl> - <nl> - Для работы с промежуточными состояниями предназначены : <nl> - <nl> - - Движок таблиц [ AggregatingMergeTree ] ( . . / . . / engines / table_engines / mergetree_family / aggregatingmergetree . md ) . <nl> - - Функция [ finalizeAggregation ] ( . . / . . / sql_reference / aggregate_functions / combinators . md # function - finalizeaggregation ) . <nl> - - Функция [ runningAccumulate ] ( . . / . . / sql_reference / aggregate_functions / combinators . md # function - runningaccumulate ) . <nl> - - Комбинатор [ - Merge ] ( # aggregate_functions_combinators_merge ) . <nl> - - Комбинатор [ - MergeState ] ( # aggregate_functions_combinators_mergestate ) . <nl> - <nl> - # # - Merge { # aggregate_functions_combinators - merge } <nl> - <nl> - В случае применения этого комбинатора , агрегатная функция будет принимать в качестве аргумента промежуточное состояние агрегации , доагрегировать ( объединять вместе ) эти состояния , и возвращать готовое значение . <nl> - <nl> - # # - MergeState { # aggregate_functions_combinators - mergestate } <nl> - <nl> - Выполняет слияние промежуточных состояний агрегации , аналогично комбинатору - Merge , но возвращает не готовое значение , а промежуточное состояние агрегации , аналогично комбинатору - State . <nl> - <nl> - # # - ForEach { # foreach } <nl> - <nl> - Преобразует агрегатную функцию для таблиц в агрегатную функцию для массивов , которая применяет агрегирование для соответствующих элементов массивов и возвращает массив результатов . Например , ` sumForEach ` для массивов ` [ 1 , 2 ] ` , ` [ 3 , 4 , 5 ] ` и ` [ 6 , 7 ] ` даст результат ` [ 10 , 13 , 5 ] ` , сложив соответственные элементы массивов . <nl> - <nl> - # # - OrDefault { # agg - functions - combinator - ordefault } <nl> - <nl> - Изменяет поведение агрегатной функции . <nl> - <nl> - Если на вход агрегатной функции передан пустой набор данных , то с помощью комбинатора ` - OrDefault ` функция возвращает значение по умолчанию для соответствующего типа данных . Комбинатор применяется к агрегатным функциям , которые могут принимать пустые входные данные . <nl> - ` - OrDefault ` можно использовать с другими комбинаторами . <nl> - <nl> - * * Синтаксис * * <nl> - <nl> - ` ` ` sql <nl> - < aggFunction > OrDefault ( x ) <nl> - ` ` ` <nl> - <nl> - * * Параметры * * <nl> - <nl> - - ` x ` — Параметры агрегатной функции . <nl> - <nl> - * * Возращаемые зачения * * <nl> - <nl> - Возвращает значение по умолчанию для соответствующего типа агрегатной функции , если агрегировать нечего . <nl> - <nl> - Тип данных зависит от используемой агрегатной функции . <nl> - <nl> - * * Пример * * <nl> - <nl> - Запрос : <nl> - <nl> - ` ` ` sql <nl> - SELECT avg ( number ) , avgOrDefault ( number ) FROM numbers ( 0 ) <nl> - ` ` ` <nl> - <nl> - Результат : <nl> - <nl> - ` ` ` text <nl> - ┌ ─ avg ( number ) ─ ┬ ─ avgOrDefault ( number ) ─ ┐ <nl> - │ nan │ 0 │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> - ` ` ` <nl> - <nl> - Также ` - OrDefault ` может использоваться с другими комбинаторами . Это полезно , когда агрегатная функция не принимает пустые входные данные . <nl> - <nl> - Запрос : <nl> - <nl> - ` ` ` sql <nl> - SELECT avgOrDefaultIf ( x , x > 10 ) <nl> - FROM <nl> - ( <nl> - SELECT toDecimal32 ( 1 . 23 , 2 ) AS x <nl> - ) <nl> - ` ` ` <nl> - <nl> - Результат : <nl> - <nl> - ` ` ` text <nl> - ┌ ─ avgOrDefaultIf ( x , greater ( x , 10 ) ) ─ ┐ <nl> - │ 0 . 00 │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> - ` ` ` <nl> - <nl> - <nl> - # # - OrNull { # agg - functions - combinator - ornull } <nl> - <nl> - Изменяет поведение агрегатной функции . <nl> - <nl> - Этот комбинатор заменяет возвращаемое значение на ` Null ` , если на вход агрегатной функции передан пустой набор данных . Комбинатор работает с различными агрегатными функциями . <nl> - ` - OrNull ` может использоваться с другими комбинаторами . <nl> - <nl> - * * Синтаксис * * <nl> - <nl> - ` ` ` sql <nl> - < aggFunction > OrNull ( x ) <nl> - ` ` ` <nl> - <nl> - * * Параметры * * <nl> - <nl> - - ` x ` — Параметры агрегатной функции . <nl> - <nl> - * * Возвращаемые значения * * <nl> - <nl> - Возвращает значение ` Null ` для соответствующего типа агрегатной функции , если агрегировать нечего . <nl> - <nl> - Тип : [ Nullable ] ( . . / data_types / nullable . md ) . <nl> - <nl> - * * Пример * * <nl> - <nl> - Добавьте ` - orNull ` в конец агрегатной функции . <nl> - <nl> - Запрос : <nl> - <nl> - ` ` ` sql <nl> - SELECT sumOrNull ( number ) FROM numbers ( 10 ) WHERE number > 10 <nl> - ` ` ` <nl> - <nl> - Результат : <nl> - <nl> - ` ` ` text <nl> - ┌ ─ sumOrNull ( number ) ─ ┐ <nl> - │ ᴺᵁᴸᴸ │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> - ` ` ` <nl> - <nl> - Также ` - OrNull ` может использоваться с другими комбинаторами . Это полезно , когда агрегатная функция не принимает пустые входные данные . <nl> - <nl> - Запрос : <nl> - <nl> - ` ` ` sql <nl> - SELECT avgOrNullIf ( x , x > 10 ) <nl> - FROM <nl> - ( <nl> - SELECT toDecimal32 ( 1 . 23 , 2 ) AS x <nl> - ) <nl> - ` ` ` <nl> - <nl> - Результат : <nl> - <nl> - ` ` ` text <nl> - ┌ ─ avgOrNullIf ( x , greater ( x , 10 ) ) ─ ┐ <nl> - │ ᴺᵁᴸᴸ │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> - ` ` ` <nl> - <nl> - # # - Resample { # agg - functions - combinator - resample } <nl> - <nl> - Позволяет поделить данные на группы , а затем по - отдельности агрегирует данные для этих групп . Группы образуются разбиением значений одного из столбцов на интервалы . <nl> - <nl> - ` ` ` sql <nl> - < aggFunction > Resample ( start , end , step ) ( < aggFunction_params > , resampling_key ) <nl> - ` ` ` <nl> - <nl> - * * Параметры * * <nl> - <nl> - - ` start ` — начальное значение для интервала значений ` resampling_key ` . <nl> - - ` stop ` — конечное значение для интервала значений ` resampling_key ` . Интервал не включает значение ` stop ` ( ` [ start , stop ) ` ) . <nl> - - ` step ` — шаг деления полного интервала на подинтервалы . Функция ` aggFunction ` выполняется для каждого из подинтервалов независимо . <nl> - - ` resampling_key ` — столбец , значения которого используются для разделения данных на интервалы . <nl> - - ` aggFunction_params ` — параметры ` aggFunction ` . <nl> - <nl> - * * Возвращаемые значения * * <nl> - <nl> - - Массив результатов ` aggFunction ` для каждого подинтервала . <nl> - <nl> - * * Пример * * <nl> - <nl> - Рассмотрим таблицу ` people ` со следующими данными : <nl> - <nl> - ` ` ` text <nl> - ┌ ─ name ─ ─ ─ ┬ ─ age ─ ┬ ─ wage ─ ┐ <nl> - │ John │ 16 │ 10 │ <nl> - │ Alice │ 30 │ 15 │ <nl> - │ Mary │ 35 │ 8 │ <nl> - │ Evelyn │ 48 │ 11 . 5 │ <nl> - │ David │ 62 │ 9 . 9 │ <nl> - │ Brian │ 60 │ 16 │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ─ ┘ <nl> - ` ` ` <nl> - <nl> - Получим имена людей , чей возраст находится в интервалах ` [ 30 , 60 ) ` и ` [ 60 , 75 ) ` . Поскольку мы используем целочисленное представление возраста , то интервалы будут выглядеть как ` [ 30 , 59 ] ` и ` [ 60 , 74 ] ` . <nl> - <nl> - Чтобы собрать имена в массив , возьмём агрегатную функцию [ groupArray ] ( reference . md # agg_function - grouparray ) . Она принимает один аргумент . В нашем случае , это столбец ` name ` . Функция ` groupArrayResample ` должна использовать столбец ` age ` для агрегирования имён по возрасту . Чтобы определить необходимые интервалы , передадим в функцию ` groupArrayResample ` аргументы ` 30 , 75 , 30 ` . <nl> - <nl> - ` ` ` sql <nl> - SELECT groupArrayResample ( 30 , 75 , 30 ) ( name , age ) from people <nl> - ` ` ` <nl> - <nl> - ` ` ` text <nl> - ┌ ─ groupArrayResample ( 30 , 75 , 30 ) ( name , age ) ─ ─ ─ ─ ─ ┐ <nl> - │ [ [ ' Alice ' , ' Mary ' , ' Evelyn ' ] , [ ' David ' , ' Brian ' ] ] │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> - ` ` ` <nl> - <nl> - Посмотрим на результаты . <nl> - <nl> - ` Jonh ` не попал в выдачу , поскольку слишком молод . Остальные распределены согласно заданным возрастным интервалам . <nl> - <nl> - Теперь посчитаем общее количество людей и их среднюю заработную плату в заданных возрастных интервалах . <nl> - <nl> - ` ` ` sql <nl> - SELECT <nl> - countResample ( 30 , 75 , 30 ) ( name , age ) AS amount , <nl> - avgResample ( 30 , 75 , 30 ) ( wage , age ) AS avg_wage <nl> - FROM people <nl> - ` ` ` <nl> - <nl> - ` ` ` text <nl> - ┌ ─ amount ─ ┬ ─ avg_wage ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ <nl> - │ [ 3 , 2 ] │ [ 11 . 5 , 12 . 949999809265137 ] │ <nl> - └ ─ ─ ─ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ <nl> - ` ` ` <nl> - <nl> - [ Оригинальная статья ] ( https : / / clickhouse . tech / docs / ru / query_language / agg_functions / combinators / ) < ! - - hide - - > <nl>
CLICKHOUSEDOCS - 441 : OrDefault , OrNull
ClickHouse/ClickHouse
0bbe1f97ab4a029595ede11a6869bad7d2cc0d0c
2020-05-04T08:15:49Z
mmm a / Code / CryEngine / RenderDll / Common / RenderMesh . cpp <nl> ppp b / Code / CryEngine / RenderDll / Common / RenderMesh . cpp <nl> void CRenderMesh : : ComputeSkinningCreateBindPoseAndMorphBuffers ( CMesh & mesh ) <nl> else <nl> vertices [ i ] . pos = mesh . m_pPositionsF16 [ i ] . ToVec3 ( ) ; <nl> <nl> - vertices [ i ] . qtangent = mesh . m_pQTangents [ i ] . GetQ ( ) ; <nl> + if ( mesh . m_pQTangents ) <nl> + vertices [ i ] . qtangent = mesh . m_pQTangents [ i ] . GetQ ( ) ; <nl> + else if ( mesh . m_pTangents ) <nl> + { <nl> + / / This shouldn ' t be done here . . . <nl> + Vec4sf t , b ; <nl> + mesh . m_pTangents [ i ] . ExportTo ( t , b ) ; <nl> + SPipQTangents q ; <nl> + MeshTangentsFrameToQTangents ( & t , sizeof ( t ) , & b , sizeof ( b ) , 1 , & q , sizeof ( q ) ) ; <nl> + vertices [ i ] . qtangent = q . GetQ ( ) ; <nl> + } <nl> + <nl> vertices [ i ] . uv = mesh . m_pTexCoord [ i ] . GetUV ( ) ; <nl> vertices [ i ] . morphDeltaOffset = haveDeltaMorphs ? mesh . m_verticesDeltaOffsets [ i ] : 0 ; <nl> vertices [ i ] . triOffset = count ; <nl>
! I integrate from / / ce / main . . .
CRYTEK/CRYENGINE
83126e0e0b5aeeb68366d8b41fd29e7a67bd0502
2019-02-19T16:02:18Z
mmm a / src / core / ext / client_channel / proxy_mapper_registry . c <nl> ppp b / src / core / ext / client_channel / proxy_mapper_registry . c <nl> static void grpc_proxy_mapper_list_destroy ( grpc_proxy_mapper_list * list ) { <nl> grpc_proxy_mapper_destroy ( list - > list [ i ] ) ; <nl> } <nl> gpr_free ( list - > list ) ; <nl> + / / Clean up in case we re - initialze later . <nl> + / / TODO ( ctiller ) : This should ideally live in <nl> + / / grpc_proxy_mapper_registry_init ( ) . However , if we did this there , <nl> + / / then we would do it AFTER we start registering proxy mappers from <nl> + / / third - party plugins , so they ' d never show up ( and would leak memory ) . <nl> + / / We probably need some sort of dependency system for plugins to fix <nl> + / / this . <nl> + memset ( list , 0 , sizeof ( * list ) ) ; <nl> } <nl> <nl> / / <nl> static void grpc_proxy_mapper_list_destroy ( grpc_proxy_mapper_list * list ) { <nl> <nl> static grpc_proxy_mapper_list g_proxy_mapper_list ; <nl> <nl> - void grpc_proxy_mapper_registry_init ( ) { <nl> - memset ( & g_proxy_mapper_list , 0 , sizeof ( g_proxy_mapper_list ) ) ; <nl> - } <nl> + void grpc_proxy_mapper_registry_init ( ) { } <nl> <nl> void grpc_proxy_mapper_registry_shutdown ( ) { <nl> grpc_proxy_mapper_list_destroy ( & g_proxy_mapper_list ) ; <nl>
Fix proxy mapper initialization to work with third - party plugins .
grpc/grpc
2ac189e60626b6dbcec48feca8d79614db00baee
2017-03-15T17:02:57Z
mmm a / tensorflow / core / kernels / decode_raw_op . cc <nl> ppp b / tensorflow / core / kernels / decode_raw_op . cc <nl> class DecodeRawOp : public OpKernel { <nl> } else { <nl> / / Otherwise , the data is not in the host ' s byte order , and rather than a <nl> / / direct copy , we need to reverse the byte ordering of each element . <nl> + int64 element_size ; <nl> + if ( DataTypeString ( out_type_ ) = = " complex64 " | | DataTypeString ( out_type_ ) = = " complex128 " ) { <nl> + / / For Complex data type , real and imaginary parts needs to be swapped separately <nl> + element_size = sizeof ( T ) / 2 ; <nl> + } else { <nl> + element_size = sizeof ( T ) ; <nl> + } <nl> for ( int64 i = 0 ; i < flat_in . size ( ) ; + + i ) { <nl> const char * in_data_bytes = <nl> reinterpret_cast < const char * > ( flat_in ( i ) . data ( ) ) ; <nl> char * out_data_bytes = reinterpret_cast < char * > ( out_data ) ; <nl> const char * p = in_data_bytes ; <nl> char * q = out_data_bytes ; <nl> - for ( ; p < in_data_bytes + str_size ; p + = sizeof ( T ) , q + = sizeof ( T ) ) { <nl> - std : : reverse_copy ( p , p + sizeof ( T ) , q ) ; <nl> + for ( ; p < in_data_bytes + str_size ; p + = element_size , q + = element_size ) { <nl> + std : : reverse_copy ( p , p + element_size , q ) ; <nl> } <nl> out_data + = added_dim ; <nl> } <nl>
Fixing decode_raw_op for complex numbers on big endian
tensorflow/tensorflow
033ee2efbb3c0c98c37a4f8668a5fefcad694501
2019-10-25T10:18:05Z
mmm a / ports / glad / portfile . cmake <nl> ppp b / ports / glad / portfile . cmake <nl> vcpkg_from_github ( <nl> ) <nl> <nl> vcpkg_find_acquire_program ( PYTHON3 ) <nl> - get_filename_component ( PYTHON3_DIR " $ { PYTHON3 } " DIRECTORY ) <nl> - vcpkg_add_to_path ( " $ { PYTHON3_DIR } " ) <nl> <nl> file ( COPY <nl> $ { CURRENT_INSTALLED_DIR } / include / KHR / khrplatform . h <nl> vcpkg_configure_cmake ( <nl> - DGLAD_REPRODUCIBLE = ON <nl> - DGLAD_SPEC = " gl " # { gl , egl , glx , wgl } <nl> - DGLAD_PROFILE = " compatibility " # { core , compatibility } <nl> + - DPYTHON_EXECUTABLE = $ { PYTHON3 } <nl> OPTIONS_DEBUG <nl> - DGLAD_GENERATOR = " c - debug " <nl> ) <nl>
[ glad ] Pass path to python explicitly to work on default Ubuntu 18 . 04 wherein ' python ' is python2 .
microsoft/vcpkg
28fc76e7332db04e253d861fb3e4f0e27949d9b1
2020-05-01T04:51:31Z
mmm a / src / mongo / base / error_codes . err <nl> ppp b / src / mongo / base / error_codes . err <nl> error_code ( " DocumentValidationFailure " , 121 ) # Only for the document validator o <nl> error_code ( " ReadAfterOptimeTimeout " , 122 ) <nl> error_code ( " NotAReplicaSet " , 123 ) <nl> error_code ( " IncompatibleElectionProtocol " , 124 ) <nl> + error_code ( " CommandFailed " , 125 ) <nl> + error_code ( " RPCProtocolNegotiationFailed " , 126 ) <nl> <nl> # Non - sequential error codes ( for compatibility only ) <nl> error_code ( " NotMaster " , 10107 ) # this comes from assert_util . h <nl> mmm a / src / mongo / rpc / SConscript <nl> ppp b / src / mongo / rpc / SConscript <nl> env . Library ( <nl> <nl> env . Library ( <nl> target = [ <nl> - ' request ' , <nl> + ' protocol ' , <nl> ] , <nl> source = [ <nl> - ' request . cpp ' , <nl> - ' request_builder . cpp ' , <nl> + ' protocol . cpp ' , <nl> + ] , <nl> + ) <nl> + <nl> + env . Library ( <nl> + target = [ <nl> + ' rpc ' , <nl> + ] , <nl> + source = [ <nl> + ' factory . cpp ' , <nl> + ] , <nl> + LIBDEPS = [ <nl> + ' command_reply ' , <nl> + ' command_request ' , <nl> + ' legacy_reply ' , <nl> + ' legacy_request ' , <nl> + ' metadata ' , <nl> + ' protocol ' , <nl> + ' $ BUILD_DIR / mongo / db / server_parameters ' , <nl> + ] , <nl> + ) <nl> + <nl> + env . Library ( <nl> + target = [ <nl> + ' command_request ' , <nl> + ] , <nl> + source = [ <nl> + ' command_request . cpp ' , <nl> + ' command_request_builder . cpp ' , <nl> ] , <nl> LIBDEPS = [ <nl> ' document_range ' , <nl> env . Library ( <nl> <nl> env . Library ( <nl> target = [ <nl> - ' reply ' , <nl> + ' legacy_request ' , <nl> ] , <nl> source = [ <nl> - ' reply . cpp ' , <nl> - ' reply_builder . cpp ' <nl> + ' legacy_request . cpp ' , <nl> + ' legacy_request_builder . cpp ' , <nl> ] , <nl> LIBDEPS = [ <nl> ' document_range ' , <nl> env . Library ( <nl> ] , <nl> ) <nl> <nl> + env . Library ( <nl> + target = [ <nl> + ' command_reply ' , <nl> + ] , <nl> + source = [ <nl> + ' command_reply . cpp ' , <nl> + ' command_reply_builder . cpp ' , <nl> + ' reply_builder_interface . cpp ' , <nl> + ] , <nl> + LIBDEPS = [ <nl> + ' document_range ' , <nl> + ' $ BUILD_DIR / mongo / util / net / network ' , <nl> + ] , <nl> + ) <nl> + <nl> + env . Library ( <nl> + target = [ <nl> + ' legacy_reply ' , <nl> + ] , <nl> + source = [ <nl> + ' legacy_reply . cpp ' , <nl> + ' legacy_reply_builder . cpp ' <nl> + ] , <nl> + LIBDEPS = [ <nl> + ' document_range ' , <nl> + ' $ BUILD_DIR / mongo / util / net / network ' , <nl> + ] , <nl> + ) <nl> + <nl> + env . Library ( <nl> + target = [ <nl> + ' metadata ' , <nl> + ] , <nl> + source = [ <nl> + ' metadata . cpp ' <nl> + ] , <nl> + ) <nl> + <nl> env . CppUnitTest ( <nl> target = [ <nl> ' rpc_test ' , <nl> ] , <nl> source = [ <nl> - ' reply_builder_test . cpp ' , <nl> - ' reply_test . cpp ' , <nl> - ' request_builder_test . cpp ' , <nl> - ' request_test . cpp ' , <nl> + ' command_reply_builder_test . cpp ' , <nl> + ' command_reply_test . cpp ' , <nl> + ' command_request_builder_test . cpp ' , <nl> + ' command_request_test . cpp ' , <nl> + ' protocol_test . cpp ' , <nl> ] , <nl> LIBDEPS = [ <nl> - ' request ' , <nl> - ' reply ' , <nl> + ' command_request ' , <nl> + ' command_reply ' , <nl> + ' protocol ' , <nl> ] , <nl> ) <nl> similarity index 77 % <nl> rename from src / mongo / rpc / reply . cpp <nl> rename to src / mongo / rpc / command_reply . cpp <nl> mmm a / src / mongo / rpc / reply . cpp <nl> ppp b / src / mongo / rpc / command_reply . cpp <nl> <nl> <nl> # include " mongo / platform / basic . h " <nl> <nl> - # include " mongo / rpc / reply . h " <nl> + # include " mongo / rpc / command_reply . h " <nl> <nl> # include < tuple > <nl> <nl> <nl> namespace mongo { <nl> namespace rpc { <nl> <nl> - Reply : : Reply ( const Message * message ) <nl> + CommandReply : : CommandReply ( const Message * message ) <nl> : _message ( message ) { <nl> <nl> - char * begin = _message - > singleData ( ) . data ( ) ; <nl> + const char * begin = _message - > singleData ( ) . data ( ) ; <nl> std : : size_t length = _message - > singleData ( ) . dataLen ( ) ; <nl> <nl> - invariant ( length < = MaxMessageSizeBytes ) ; / / checked by message_port . cpp <nl> + / / This check failing would normally be operation fatal , but we expect it to have been <nl> + / / done earlier in the network layer , so we make it an invariant . <nl> + invariant ( length < = MaxMessageSizeBytes ) ; <nl> <nl> - char * messageEnd = begin + length ; <nl> + const char * messageEnd = begin + length ; <nl> ConstDataRangeCursor cur ( begin , messageEnd ) ; <nl> <nl> / / TODO ( amidvidy ) : we don ' t currently handle BSON validation . <nl> namespace rpc { <nl> _outputDocs = DocumentRange ( cur . data ( ) , messageEnd ) ; <nl> } <nl> <nl> - const BSONObj & Reply : : getMetadata ( ) const { <nl> + const BSONObj & CommandReply : : getMetadata ( ) const { <nl> return _metadata ; <nl> } <nl> <nl> - const BSONObj & Reply : : getCommandReply ( ) const { <nl> + const BSONObj & CommandReply : : getCommandReply ( ) const { <nl> return _commandReply ; <nl> } <nl> <nl> - DocumentRange Reply : : getOutputDocs ( ) const { <nl> + DocumentRange CommandReply : : getOutputDocs ( ) const { <nl> return _outputDocs ; <nl> } <nl> <nl> - bool operator = = ( const Reply & lhs , const Reply & rhs ) { <nl> + bool operator = = ( const CommandReply & lhs , const CommandReply & rhs ) { <nl> return std : : tie ( lhs . _metadata , lhs . _commandReply , lhs . _outputDocs ) = = <nl> std : : tie ( rhs . _metadata , rhs . _commandReply , rhs . _outputDocs ) ; <nl> } <nl> <nl> - bool operator ! = ( const Reply & lhs , const Reply & rhs ) { <nl> + bool operator ! = ( const CommandReply & lhs , const CommandReply & rhs ) { <nl> return ! ( lhs = = rhs ) ; <nl> } <nl> <nl> similarity index 86 % <nl> rename from src / mongo / rpc / reply . h <nl> rename to src / mongo / rpc / command_reply . h <nl> mmm a / src / mongo / rpc / reply . h <nl> ppp b / src / mongo / rpc / command_reply . h <nl> <nl> <nl> # pragma once <nl> <nl> - # include " mongo / bson / bsonobj . h " <nl> + # include " mongo / db / jsobj . h " <nl> # include " mongo / rpc / document_range . h " <nl> + # include " mongo / rpc / reply_interface . h " <nl> <nl> namespace mongo { <nl> class Message ; <nl> namespace rpc { <nl> * explicit . <nl> * See SERVER - 16730 for additional details . <nl> * / <nl> - class Reply { <nl> + class CommandReply : public ReplyInterface { <nl> public : <nl> / * * <nl> * Construct a Reply from a Message . <nl> namespace rpc { <nl> * <nl> * The underlying Message also handles the wire - protocol header . <nl> * / <nl> - explicit Reply ( const Message * message ) ; <nl> + explicit CommandReply ( const Message * message ) ; <nl> <nl> / * * <nl> * Accessor for the metadata object . Metadata is generally used for information <nl> * that is independent of any specific command , e . g . auditing information . <nl> * / <nl> - const BSONObj & getMetadata ( ) const ; <nl> + const BSONObj & getMetadata ( ) const final ; <nl> <nl> / * * <nl> * The result of executing the command . <nl> * / <nl> - const BSONObj & getCommandReply ( ) const ; <nl> + const BSONObj & getCommandReply ( ) const final ; <nl> <nl> / * * <nl> * A variable number of BSON documents returned by the command . It is valid for the <nl> namespace rpc { <nl> * . . . do stuff with doc <nl> * } <nl> * / <nl> - DocumentRange getOutputDocs ( ) const ; <nl> + DocumentRange getOutputDocs ( ) const final ; <nl> <nl> - friend bool operator = = ( const Reply & lhs , const Reply & rhs ) ; <nl> - friend bool operator ! = ( const Reply & lhs , const Reply & rhs ) ; <nl> + friend bool operator = = ( const CommandReply & lhs , const CommandReply & rhs ) ; <nl> + friend bool operator ! = ( const CommandReply & lhs , const CommandReply & rhs ) ; <nl> <nl> private : <nl> const Message * _message ; <nl> similarity index 71 % <nl> rename from src / mongo / rpc / reply_builder . cpp <nl> rename to src / mongo / rpc / command_reply_builder . cpp <nl> mmm a / src / mongo / rpc / reply_builder . cpp <nl> ppp b / src / mongo / rpc / command_reply_builder . cpp <nl> <nl> <nl> # include < utility > <nl> <nl> - # include " mongo / rpc / reply_builder . h " <nl> + # include " mongo / rpc / command_reply_builder . h " <nl> # include " mongo / stdx / memory . h " <nl> # include " mongo / util / assert_util . h " <nl> <nl> namespace mongo { <nl> namespace rpc { <nl> <nl> - ReplyBuilder : : ReplyBuilder ( ) <nl> + CommandReplyBuilder : : CommandReplyBuilder ( ) <nl> : _message { stdx : : make_unique < Message > ( ) } <nl> { } <nl> <nl> - ReplyBuilder : : ReplyBuilder ( std : : unique_ptr < Message > message ) <nl> + CommandReplyBuilder : : CommandReplyBuilder ( std : : unique_ptr < Message > message ) <nl> : _message { std : : move ( message ) } <nl> { } <nl> <nl> - ReplyBuilder & ReplyBuilder : : setMetadata ( const BSONObj & metadata ) { <nl> - invariant ( _buildState = = BuildState : : kMetadata ) ; <nl> + CommandReplyBuilder & CommandReplyBuilder : : setMetadata ( BSONObj metadata ) { <nl> + invariant ( _state = = State : : kMetadata ) ; <nl> metadata . appendSelfToBufBuilder ( _builder ) ; <nl> - _buildState = BuildState : : kCommandReply ; <nl> + _state = State : : kCommandReply ; <nl> return * this ; <nl> } <nl> <nl> - ReplyBuilder & ReplyBuilder : : setCommandReply ( const BSONObj & commandReply ) { <nl> - invariant ( _buildState = = BuildState : : kCommandReply ) ; <nl> + CommandReplyBuilder & CommandReplyBuilder : : setRawCommandReply ( BSONObj commandReply ) { <nl> + invariant ( _state = = State : : kCommandReply ) ; <nl> commandReply . appendSelfToBufBuilder ( _builder ) ; <nl> - _buildState = BuildState : : kOutputDocs ; <nl> + _state = State : : kOutputDocs ; <nl> return * this ; <nl> } <nl> <nl> - ReplyBuilder & ReplyBuilder : : addOutputDocs ( DocumentRange outputDocs ) { <nl> - invariant ( _buildState = = BuildState : : kOutputDocs ) ; <nl> + CommandReplyBuilder & CommandReplyBuilder : : addOutputDocs ( DocumentRange outputDocs ) { <nl> + invariant ( _state = = State : : kOutputDocs ) ; <nl> auto rangeData = outputDocs . data ( ) ; <nl> _builder . appendBuf ( rangeData . data ( ) , rangeData . length ( ) ) ; <nl> / / leave state as is as we can add as many outputDocs as we want . <nl> return * this ; <nl> } <nl> <nl> - ReplyBuilder & ReplyBuilder : : addOutputDoc ( const BSONObj & outputDoc ) { <nl> - invariant ( _buildState = = BuildState : : kOutputDocs ) ; <nl> + CommandReplyBuilder & CommandReplyBuilder : : addOutputDoc ( BSONObj outputDoc ) { <nl> + invariant ( _state = = State : : kOutputDocs ) ; <nl> outputDoc . appendSelfToBufBuilder ( _builder ) ; <nl> return * this ; <nl> } <nl> <nl> - std : : unique_ptr < Message > ReplyBuilder : : done ( ) { <nl> - invariant ( _buildState = = BuildState : : kOutputDocs ) ; <nl> + ReplyBuilderInterface : : State CommandReplyBuilder : : getState ( ) const { <nl> + return _state ; <nl> + } <nl> + <nl> + std : : unique_ptr < Message > CommandReplyBuilder : : done ( ) { <nl> + invariant ( _state = = State : : kOutputDocs ) ; <nl> / / TODO : we can elide a large copy here by transferring the internal buffer of <nl> / / the BufBuilder to the Message . <nl> _message - > setData ( dbCommandReply , _builder . buf ( ) , _builder . len ( ) ) ; <nl> - _buildState = BuildState : : kDone ; <nl> + _state = State : : kDone ; <nl> return std : : move ( _message ) ; <nl> } <nl> <nl> similarity index 74 % <nl> rename from src / mongo / rpc / reply_builder . h <nl> rename to src / mongo / rpc / command_reply_builder . h <nl> mmm a / src / mongo / rpc / reply_builder . h <nl> ppp b / src / mongo / rpc / command_reply_builder . h <nl> <nl> <nl> # include < memory > <nl> <nl> - # include " mongo / bson / bsonobj . h " <nl> + # include " mongo / base / status_with . h " <nl> + # include " mongo / db / jsobj . h " <nl> # include " mongo / rpc / document_range . h " <nl> - # include " mongo / util / net / message . h " / / need Message destructor for unique_ptr <nl> + # include " mongo / rpc / reply_builder_interface . h " <nl> + # include " mongo / util / net / message . h " <nl> <nl> namespace mongo { <nl> namespace rpc { <nl> namespace rpc { <nl> / * * <nl> * Constructs an OP_COMMANDREPLY message . <nl> * / <nl> - class ReplyBuilder { <nl> + class CommandReplyBuilder : public ReplyBuilderInterface { <nl> public : <nl> <nl> / * * <nl> * Constructs an OP_COMMANDREPLY in a new buffer . <nl> * / <nl> - ReplyBuilder ( ) ; <nl> + CommandReplyBuilder ( ) ; <nl> <nl> / * <nl> * Constructs an OP_COMMANDREPLY in an existing buffer . Ownership of the buffer <nl> - * will be transfered to the ReplyBuilder . <nl> + * will be transfered to the CommandReplyBuilder . <nl> * / <nl> - ReplyBuilder ( std : : unique_ptr < Message > message ) ; <nl> + CommandReplyBuilder ( std : : unique_ptr < Message > message ) ; <nl> <nl> - ReplyBuilder & setMetadata ( const BSONObj & metadata ) ; <nl> - ReplyBuilder & setCommandReply ( const BSONObj & commandReply ) ; <nl> + CommandReplyBuilder & setMetadata ( BSONObj metadata ) final ; <nl> + CommandReplyBuilder & setRawCommandReply ( BSONObj commandReply ) final ; <nl> <nl> - ReplyBuilder & addOutputDocs ( DocumentRange outputDocs ) ; <nl> - ReplyBuilder & addOutputDoc ( const BSONObj & outputDoc ) ; <nl> + CommandReplyBuilder & addOutputDocs ( DocumentRange outputDocs ) final ; <nl> + CommandReplyBuilder & addOutputDoc ( BSONObj outputDoc ) final ; <nl> + <nl> + State getState ( ) const final ; <nl> <nl> / * * <nl> * Writes data then transfers ownership of the message to the caller . <nl> * The behavior of calling any methods on the object is subsequently <nl> * undefined . <nl> * / <nl> - std : : unique_ptr < Message > done ( ) ; <nl> + std : : unique_ptr < Message > done ( ) final ; <nl> <nl> private : <nl> / / Default values are all empty . <nl> BufBuilder _builder { } ; <nl> std : : unique_ptr < Message > _message ; <nl> <nl> - enum class BuildState { <nl> - kMetadata , <nl> - kCommandReply , <nl> - kOutputDocs , <nl> - kDone <nl> - } ; <nl> - <nl> - BuildState _buildState { BuildState : : kMetadata } ; <nl> + State _state { State : : kMetadata } ; <nl> } ; <nl> <nl> } / / namespace rpc <nl> similarity index 92 % <nl> rename from src / mongo / rpc / reply_builder_test . cpp <nl> rename to src / mongo / rpc / command_reply_builder_test . cpp <nl> mmm a / src / mongo / rpc / reply_builder_test . cpp <nl> ppp b / src / mongo / rpc / command_reply_builder_test . cpp <nl> <nl> <nl> # include " mongo / platform / basic . h " <nl> <nl> - # include " mongo / bson / bsonobj . h " <nl> - # include " mongo / bson / bsonobjbuilder . h " <nl> # include " mongo / bson / util / builder . h " <nl> + # include " mongo / db / jsobj . h " <nl> + # include " mongo / rpc / command_reply . h " <nl> + # include " mongo / rpc / command_reply_builder . h " <nl> # include " mongo / rpc / document_range . h " <nl> - # include " mongo / rpc / reply . h " <nl> - # include " mongo / rpc / reply_builder . h " <nl> # include " mongo / unittest / unittest . h " <nl> <nl> namespace { <nl> namespace { <nl> auto metadata = metadataBob . done ( ) ; <nl> <nl> BSONObjBuilder commandReplyBob { } ; <nl> - commandReplyBob . append ( " bar " , " baz " ) ; <nl> + commandReplyBob . append ( " bar " , " baz " ) . append ( " ok " , 1 . 0 ) ; <nl> auto commandReply = commandReplyBob . done ( ) ; <nl> <nl> BSONObjBuilder outputDoc1Bob { } ; <nl> namespace { <nl> <nl> rpc : : DocumentRange outputDocRange { outputDocs . buf ( ) , outputDocs . buf ( ) + outputDocs . len ( ) } ; <nl> <nl> - rpc : : ReplyBuilder r ; <nl> + rpc : : CommandReplyBuilder r ; <nl> <nl> auto msg = r . setMetadata ( metadata ) <nl> . setCommandReply ( commandReply ) <nl> . addOutputDocs ( outputDocRange ) <nl> . done ( ) ; <nl> <nl> - rpc : : Reply parsed ( msg . get ( ) ) ; <nl> + rpc : : CommandReply parsed ( msg . get ( ) ) ; <nl> <nl> ASSERT_EQUALS ( parsed . getMetadata ( ) , metadata ) ; <nl> ASSERT_EQUALS ( parsed . getCommandReply ( ) , commandReply ) ; <nl> similarity index 93 % <nl> rename from src / mongo / rpc / reply_test . cpp <nl> rename to src / mongo / rpc / command_reply_test . cpp <nl> mmm a / src / mongo / rpc / reply_test . cpp <nl> ppp b / src / mongo / rpc / command_reply_test . cpp <nl> <nl> <nl> # include " mongo / base / data_type_endian . h " <nl> # include " mongo / base / data_view . h " <nl> - # include " mongo / bson / bsonobjbuilder . h " <nl> + # include " mongo / db / jsobj . h " <nl> # include " mongo / platform / cstdint . h " <nl> - # include " mongo / rpc / reply . h " <nl> + # include " mongo / rpc / command_reply . h " <nl> # include " mongo / stdx / memory . h " <nl> # include " mongo / unittest / unittest . h " <nl> # include " mongo / util / net / message . h " <nl> namespace { <nl> auto outputDoc2 = outputDoc2Bob . done ( ) ; <nl> writeObj ( outputDoc2 ) ; <nl> <nl> - rpc : : Reply opCmdReply { buildMessage ( ) } ; <nl> + rpc : : CommandReply opCmdReply { buildMessage ( ) } ; <nl> <nl> ASSERT_EQUALS ( opCmdReply . getMetadata ( ) , metadata ) ; <nl> ASSERT_EQUALS ( opCmdReply . getCommandReply ( ) , commandReply ) ; <nl> namespace { <nl> } <nl> <nl> TEST_F ( ReplyTest , EmptyMessageThrows ) { <nl> - ASSERT_THROWS ( rpc : : Reply { buildMessage ( ) } , UserException ) ; <nl> + ASSERT_THROWS ( rpc : : CommandReply { buildMessage ( ) } , UserException ) ; <nl> } <nl> <nl> TEST_F ( ReplyTest , MetadataOnlyThrows ) { <nl> namespace { <nl> auto metadata = metadataBob . done ( ) ; <nl> writeObj ( metadata ) ; <nl> <nl> - ASSERT_THROWS ( rpc : : Reply { buildMessage ( ) } , UserException ) ; <nl> + ASSERT_THROWS ( rpc : : CommandReply { buildMessage ( ) } , UserException ) ; <nl> } <nl> <nl> TEST_F ( ReplyTest , MetadataInvalidLengthThrows ) { <nl> namespace { <nl> auto commandReply = commandReplyBob . done ( ) ; <nl> writeObj ( commandReply ) ; <nl> <nl> - ASSERT_THROWS ( rpc : : Reply { buildMessage ( ) } , UserException ) ; <nl> + ASSERT_THROWS ( rpc : : CommandReply { buildMessage ( ) } , UserException ) ; <nl> } <nl> <nl> TEST_F ( ReplyTest , InvalidLengthThrows ) { <nl> namespace { <nl> DataView ( const_cast < char * > ( commandReply . objdata ( ) ) ) . write < LittleEndian < int32_t > > ( 100000 ) ; <nl> writeObj ( commandReply , trueSize ) ; <nl> <nl> - ASSERT_THROWS ( rpc : : Reply { buildMessage ( ) } , UserException ) ; <nl> + ASSERT_THROWS ( rpc : : CommandReply { buildMessage ( ) } , UserException ) ; <nl> } <nl> <nl> } <nl> similarity index 88 % <nl> rename from src / mongo / rpc / request . cpp <nl> rename to src / mongo / rpc / command_request . cpp <nl> mmm a / src / mongo / rpc / request . cpp <nl> ppp b / src / mongo / rpc / command_request . cpp <nl> <nl> <nl> # include " mongo / platform / basic . h " <nl> <nl> - # include " mongo / rpc / request . h " <nl> + # include " mongo / rpc / command_request . h " <nl> <nl> # include < string > <nl> # include < utility > <nl> <nl> # include " mongo / base / data_range_cursor . h " <nl> # include " mongo / base / data_type_string_data . h " <nl> # include " mongo / base / data_type_terminated . h " <nl> - # include " mongo / bson / bsonobj . h " <nl> + # include " mongo / db / jsobj . h " <nl> # include " mongo / util / assert_util . h " <nl> # include " mongo / util / mongoutils / str . h " <nl> # include " mongo / util / net / message . h " <nl> namespace rpc { <nl> <nl> } / / namespace <nl> <nl> - Request : : Request ( const Message * message ) <nl> + CommandRequest : : CommandRequest ( const Message * message ) <nl> : _message ( message ) { <nl> char * begin = _message - > singleData ( ) . data ( ) ; <nl> std : : size_t length = _message - > singleData ( ) . dataLen ( ) ; <nl> namespace rpc { <nl> _inputDocs = DocumentRange { cur . data ( ) , messageEnd } ; <nl> } <nl> <nl> - StringData Request : : getDatabase ( ) const { <nl> + StringData CommandRequest : : getDatabase ( ) const { <nl> return _database ; <nl> } <nl> <nl> - StringData Request : : getCommandName ( ) const { <nl> + StringData CommandRequest : : getCommandName ( ) const { <nl> return _commandName ; <nl> } <nl> <nl> - const BSONObj & Request : : getMetadata ( ) const { <nl> + const BSONObj & CommandRequest : : getMetadata ( ) const { <nl> return _metadata ; <nl> } <nl> <nl> - const BSONObj & Request : : getCommandArgs ( ) const { <nl> + const BSONObj & CommandRequest : : getCommandArgs ( ) const { <nl> return _commandArgs ; <nl> } <nl> <nl> - DocumentRange Request : : getInputDocs ( ) const { <nl> + DocumentRange CommandRequest : : getInputDocs ( ) const { <nl> return _inputDocs ; <nl> } <nl> <nl> - bool operator = = ( const Request & lhs , const Request & rhs ) { <nl> + bool operator = = ( const CommandRequest & lhs , const CommandRequest & rhs ) { <nl> return std : : tie ( lhs . _database , <nl> lhs . _commandName , <nl> lhs . _metadata , <nl> namespace rpc { <nl> rhs . _inputDocs ) ; <nl> } <nl> <nl> - bool operator ! = ( const Request & lhs , const Request & rhs ) { <nl> + bool operator ! = ( const CommandRequest & lhs , const CommandRequest & rhs ) { <nl> return ! ( lhs = = rhs ) ; <nl> } <nl> <nl> similarity index 83 % <nl> rename from src / mongo / rpc / request . h <nl> rename to src / mongo / rpc / command_request . h <nl> mmm a / src / mongo / rpc / request . h <nl> ppp b / src / mongo / rpc / command_request . h <nl> <nl> # pragma once <nl> <nl> # include " mongo / base / string_data . h " <nl> - # include " mongo / bson / bsonobj . h " <nl> + # include " mongo / db / jsobj . h " <nl> # include " mongo / rpc / document_range . h " <nl> + # include " mongo / rpc / request_interface . h " <nl> <nl> namespace mongo { <nl> class Message ; <nl> namespace rpc { <nl> * <nl> * TODO : BSON validation . See SERVER - 18167 for details . <nl> * / <nl> - class Request { <nl> + class CommandRequest : public RequestInterface { <nl> public : <nl> / * * <nl> * Construct a Request from a Message . Underlying message MUST outlive the Request . <nl> * Required fields are parsed eagerly , inputDocs are parsed lazily . <nl> * / <nl> - explicit Request ( const Message * message ) ; <nl> + explicit CommandRequest ( const Message * message ) ; <nl> + <nl> + ~ CommandRequest ( ) = default ; <nl> <nl> / * * <nl> * The database that the command is to be executed on . <nl> * / <nl> - StringData getDatabase ( ) const ; <nl> + StringData getDatabase ( ) const final ; <nl> <nl> / * * <nl> * The name of the command to execute . <nl> * / <nl> - StringData getCommandName ( ) const ; <nl> + StringData getCommandName ( ) const final ; <nl> <nl> / * * <nl> * The metadata associated with the command request . This is information that is <nl> * independent of any specific command , i . e . auditing information . <nl> * / <nl> - const BSONObj & getMetadata ( ) const ; <nl> + const BSONObj & getMetadata ( ) const final ; <nl> <nl> / * * <nl> * The arguments to the command - this is passed to the command ' s run ( ) method . <nl> * / <nl> - const BSONObj & getCommandArgs ( ) const ; <nl> + const BSONObj & getCommandArgs ( ) const final ; <nl> <nl> / * * <nl> * A variable number of BSON documents to pass to the command . It is valid for <nl> namespace rpc { <nl> * . . . do stuff with doc <nl> * } <nl> * / <nl> - DocumentRange getInputDocs ( ) const ; <nl> + DocumentRange getInputDocs ( ) const final ; <nl> <nl> - friend bool operator = = ( const Request & lhs , const Request & rhs ) ; <nl> - friend bool operator ! = ( const Request & lhs , const Request & rhs ) ; <nl> + friend bool operator = = ( const CommandRequest & lhs , const CommandRequest & rhs ) ; <nl> + friend bool operator ! = ( const CommandRequest & lhs , const CommandRequest & rhs ) ; <nl> <nl> private : <nl> const Message * _message ; <nl> similarity index 64 % <nl> rename from src / mongo / rpc / request_builder . cpp <nl> rename to src / mongo / rpc / command_request_builder . cpp <nl> mmm a / src / mongo / rpc / request_builder . cpp <nl> ppp b / src / mongo / rpc / command_request_builder . cpp <nl> <nl> <nl> # include " mongo / platform / basic . h " <nl> <nl> - # include " mongo / rpc / request_builder . h " <nl> + # include " mongo / rpc / command_request_builder . h " <nl> <nl> # include < utility > <nl> <nl> <nl> namespace mongo { <nl> namespace rpc { <nl> <nl> - RequestBuilder : : RequestBuilder ( ) <nl> + CommandRequestBuilder : : CommandRequestBuilder ( ) <nl> : _message { stdx : : make_unique < Message > ( ) } <nl> { } <nl> <nl> - RequestBuilder : : RequestBuilder ( std : : unique_ptr < Message > message ) <nl> + CommandRequestBuilder : : ~ CommandRequestBuilder ( ) <nl> + { } <nl> + <nl> + CommandRequestBuilder : : CommandRequestBuilder ( std : : unique_ptr < Message > message ) <nl> : _message { std : : move ( message ) } <nl> { } <nl> <nl> - RequestBuilder & RequestBuilder : : setDatabase ( StringData database ) { <nl> - invariant ( _buildState = = BuildState : : kDatabase ) ; <nl> + CommandRequestBuilder & CommandRequestBuilder : : setDatabase ( StringData database ) { <nl> + invariant ( _state = = State : : kDatabase ) ; <nl> _builder . appendStr ( database ) ; <nl> - _buildState = BuildState : : kCommandName ; <nl> + _state = State : : kCommandName ; <nl> return * this ; <nl> } <nl> <nl> - RequestBuilder & RequestBuilder : : setCommandName ( StringData commandName ) { <nl> - invariant ( _buildState = = BuildState : : kCommandName ) ; <nl> + CommandRequestBuilder & CommandRequestBuilder : : setCommandName ( StringData commandName ) { <nl> + invariant ( _state = = State : : kCommandName ) ; <nl> _builder . appendStr ( commandName ) ; <nl> - _buildState = BuildState : : kMetadata ; <nl> + _state = State : : kMetadata ; <nl> return * this ; <nl> } <nl> <nl> - RequestBuilder & RequestBuilder : : setMetadata ( const BSONObj & metadata ) { <nl> - invariant ( _buildState = = BuildState : : kMetadata ) ; <nl> + CommandRequestBuilder & CommandRequestBuilder : : setMetadata ( BSONObj metadata ) { <nl> + invariant ( _state = = State : : kMetadata ) ; <nl> metadata . appendSelfToBufBuilder ( _builder ) ; <nl> - _buildState = BuildState : : kCommandArgs ; <nl> + _state = State : : kCommandArgs ; <nl> return * this ; <nl> } <nl> <nl> - RequestBuilder & RequestBuilder : : setCommandArgs ( const BSONObj & commandArgs ) { <nl> - invariant ( _buildState = = BuildState : : kCommandArgs ) ; <nl> + CommandRequestBuilder & CommandRequestBuilder : : setCommandArgs ( BSONObj commandArgs ) { <nl> + invariant ( _state = = State : : kCommandArgs ) ; <nl> commandArgs . appendSelfToBufBuilder ( _builder ) ; <nl> - _buildState = BuildState : : kInputDocs ; <nl> + _state = State : : kInputDocs ; <nl> return * this ; <nl> } <nl> <nl> - RequestBuilder & RequestBuilder : : addInputDocs ( DocumentRange inputDocs ) { <nl> - invariant ( _buildState = = BuildState : : kInputDocs ) ; <nl> + CommandRequestBuilder & CommandRequestBuilder : : addInputDocs ( DocumentRange inputDocs ) { <nl> + invariant ( _state = = State : : kInputDocs ) ; <nl> auto rangeData = inputDocs . data ( ) ; <nl> _builder . appendBuf ( rangeData . data ( ) , rangeData . length ( ) ) ; <nl> return * this ; <nl> } <nl> <nl> - RequestBuilder & RequestBuilder : : addInputDoc ( const BSONObj & inputDoc ) { <nl> - invariant ( _buildState = = BuildState : : kInputDocs ) ; <nl> + CommandRequestBuilder & CommandRequestBuilder : : addInputDoc ( BSONObj inputDoc ) { <nl> + invariant ( _state = = State : : kInputDocs ) ; <nl> inputDoc . appendSelfToBufBuilder ( _builder ) ; <nl> return * this ; <nl> } <nl> <nl> - std : : unique_ptr < Message > RequestBuilder : : done ( ) { <nl> - invariant ( _buildState = = BuildState : : kInputDocs ) ; <nl> + RequestBuilderInterface : : State CommandRequestBuilder : : getState ( ) const { <nl> + return _state ; <nl> + } <nl> + <nl> + std : : unique_ptr < Message > CommandRequestBuilder : : done ( ) { <nl> + invariant ( _state = = State : : kInputDocs ) ; <nl> / / TODO : we can elide a large copy here by transferring the internal buffer of <nl> / / the BufBuilder to the Message . <nl> _message - > setData ( dbCommand , _builder . buf ( ) , _builder . len ( ) ) ; <nl> - _buildState = BuildState : : kDone ; <nl> + _state = State : : kDone ; <nl> return std : : move ( _message ) ; <nl> } <nl> <nl> similarity index 71 % <nl> rename from src / mongo / rpc / request_builder . h <nl> rename to src / mongo / rpc / command_request_builder . h <nl> mmm a / src / mongo / rpc / request_builder . h <nl> ppp b / src / mongo / rpc / command_request_builder . h <nl> <nl> # include < memory > <nl> <nl> # include " mongo / base / string_data . h " <nl> - # include " mongo / bson / bsonobj . h " <nl> + # include " mongo / db / jsobj . h " <nl> # include " mongo / rpc / document_range . h " <nl> + # include " mongo / rpc / request_builder_interface . h " <nl> # include " mongo / util / net / message . h " <nl> <nl> namespace mongo { <nl> namespace rpc { <nl> / * * <nl> * Constructs an OP_COMMAND message . <nl> * / <nl> - class RequestBuilder { <nl> + class CommandRequestBuilder : public RequestBuilderInterface { <nl> public : <nl> <nl> / * * <nl> * Constructs an OP_COMMAND in a new buffer . <nl> * / <nl> - RequestBuilder ( ) ; <nl> + CommandRequestBuilder ( ) ; <nl> + <nl> + ~ CommandRequestBuilder ( ) final ; <nl> <nl> / * * <nl> * Construct an OP_COMMAND in an existing buffer . Ownership of the buffer will be <nl> - * transfered to the RequestBuilder . <nl> + * transfered to the CommandRequestBuilder . <nl> * / <nl> - RequestBuilder ( std : : unique_ptr < Message > message ) ; <nl> + CommandRequestBuilder ( std : : unique_ptr < Message > message ) ; <nl> + <nl> + CommandRequestBuilder & setDatabase ( StringData database ) final ; <nl> + <nl> + CommandRequestBuilder & setCommandName ( StringData commandName ) final ; <nl> + <nl> + CommandRequestBuilder & setMetadata ( BSONObj metadata ) final ; <nl> <nl> - RequestBuilder & setDatabase ( StringData database ) ; <nl> - RequestBuilder & setCommandName ( StringData commandName ) ; <nl> - RequestBuilder & setMetadata ( const BSONObj & metadata ) ; <nl> - RequestBuilder & setCommandArgs ( const BSONObj & commandArgs ) ; <nl> + CommandRequestBuilder & setCommandArgs ( BSONObj commandArgs ) final ; <nl> <nl> - RequestBuilder & addInputDocs ( DocumentRange inputDocs ) ; <nl> - RequestBuilder & addInputDoc ( const BSONObj & inputDoc ) ; <nl> + CommandRequestBuilder & addInputDocs ( DocumentRange inputDocs ) final ; <nl> + <nl> + CommandRequestBuilder & addInputDoc ( BSONObj inputDoc ) final ; <nl> + <nl> + State getState ( ) const final ; <nl> <nl> / * * <nl> * Writes data then transfers ownership of the message to the caller . <nl> * The behavior of calling any methods on the object is subsequently <nl> * undefined . <nl> * / <nl> - std : : unique_ptr < Message > done ( ) ; <nl> + std : : unique_ptr < Message > done ( ) final ; <nl> <nl> private : <nl> BufBuilder _builder { } ; <nl> std : : unique_ptr < Message > _message ; <nl> <nl> - enum class BuildState { <nl> - kDatabase , <nl> - kCommandName , <nl> - kMetadata , <nl> - kCommandArgs , <nl> - kInputDocs , <nl> - kDone <nl> - } ; <nl> - <nl> - BuildState _buildState { BuildState : : kDatabase } ; <nl> + State _state { State : : kDatabase } ; <nl> } ; <nl> <nl> } / / rpc <nl> similarity index 93 % <nl> rename from src / mongo / rpc / request_builder_test . cpp <nl> rename to src / mongo / rpc / command_request_builder_test . cpp <nl> mmm a / src / mongo / rpc / request_builder_test . cpp <nl> ppp b / src / mongo / rpc / command_request_builder_test . cpp <nl> <nl> <nl> # include " mongo / platform / basic . h " <nl> <nl> - # include " mongo / bson / bsonobj . h " <nl> - # include " mongo / bson / bsonobjbuilder . h " <nl> - # include " mongo / bson / util / builder . h " <nl> + # include " mongo / db / jsobj . h " <nl> + # include " mongo / rpc / command_request . h " <nl> + # include " mongo / rpc / command_request_builder . h " <nl> # include " mongo / rpc / document_range . h " <nl> - # include " mongo / rpc / request . h " <nl> - # include " mongo / rpc / request_builder . h " <nl> # include " mongo / unittest / unittest . h " <nl> <nl> namespace { <nl> namespace { <nl> <nl> rpc : : DocumentRange inputDocRange { inputDocs . buf ( ) , inputDocs . buf ( ) + inputDocs . len ( ) } ; <nl> <nl> - rpc : : RequestBuilder r ; <nl> + rpc : : CommandRequestBuilder r ; <nl> <nl> auto msg = r . setDatabase ( databaseName ) <nl> . setCommandName ( commandName ) <nl> namespace { <nl> . addInputDocs ( inputDocRange ) <nl> . done ( ) ; <nl> <nl> - rpc : : Request parsed ( msg . get ( ) ) ; <nl> + rpc : : CommandRequest parsed ( msg . get ( ) ) ; <nl> <nl> ASSERT_EQUALS ( parsed . getDatabase ( ) , databaseName ) ; <nl> ASSERT_EQUALS ( parsed . getCommandName ( ) , commandName ) ; <nl> similarity index 97 % <nl> rename from src / mongo / rpc / request_test . cpp <nl> rename to src / mongo / rpc / command_request_test . cpp <nl> mmm a / src / mongo / rpc / request_test . cpp <nl> ppp b / src / mongo / rpc / command_request_test . cpp <nl> <nl> # include < string > <nl> # include < vector > <nl> <nl> - # include " mongo / bson / bsonobjbuilder . h " <nl> - # include " mongo / rpc / request . h " <nl> + # include " mongo / db / jsobj . h " <nl> + # include " mongo / rpc / command_request . h " <nl> # include " mongo / unittest / unittest . h " <nl> # include " mongo / util / net / message . h " <nl> <nl> namespace { <nl> Message toSend ; <nl> toSend . setData ( dbCommand , opCommandData . data ( ) , opCommandData . size ( ) ) ; <nl> <nl> - rpc : : Request opCmd { & toSend } ; <nl> + rpc : : CommandRequest opCmd { & toSend } ; <nl> <nl> ASSERT_EQUALS ( opCmd . getCommandName ( ) , commandName ) ; <nl> ASSERT_EQUALS ( opCmd . getDatabase ( ) , database ) ; <nl> namespace { <nl> ASSERT_TRUE ( inputDocRangeIter = = inputDocRange . end ( ) ) ; <nl> } <nl> } / / namespace <nl> - <nl> mmm a / src / mongo / rpc / document_range . h <nl> ppp b / src / mongo / rpc / document_range . h <nl> <nl> <nl> # include " mongo / base / data_range . h " <nl> # include " mongo / base / data_range_cursor . h " <nl> - # include " mongo / bson / bsonobj . h " <nl> + # include " mongo / db / jsobj . h " <nl> <nl> namespace mongo { <nl> namespace rpc { <nl> new file mode 100644 <nl> index 000000000000 . . 1edca3950b3c <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / factory . cpp <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # include " mongo / platform / basic . h " <nl> + <nl> + # include " mongo / rpc / factory . h " <nl> + <nl> + # include " mongo / rpc / command_reply . h " <nl> + # include " mongo / rpc / command_request_builder . h " <nl> + # include " mongo / rpc / legacy_reply . h " <nl> + # include " mongo / rpc / legacy_request_builder . h " <nl> + # include " mongo / rpc / protocol . h " <nl> + # include " mongo / stdx / memory . h " <nl> + # include " mongo / util / assert_util . h " <nl> + <nl> + namespace mongo { <nl> + namespace rpc { <nl> + <nl> + std : : unique_ptr < RequestBuilderInterface > makeRequestBuilder ( ProtocolSet clientProtos , <nl> + ProtocolSet serverProtos ) { <nl> + switch ( uassertStatusOK ( negotiate ( clientProtos , serverProtos ) ) ) { <nl> + case Protocol : : kOpQuery : <nl> + return stdx : : make_unique < LegacyRequestBuilder > ( ) ; <nl> + case Protocol : : kOpCommandV1 : <nl> + return stdx : : make_unique < CommandRequestBuilder > ( ) ; <nl> + default : <nl> + MONGO_UNREACHABLE ; <nl> + } <nl> + } <nl> + <nl> + std : : unique_ptr < ReplyInterface > makeReply ( const Message * unownedMessage , <nl> + ProtocolSet clientProtos , <nl> + ProtocolSet serverProtos ) { <nl> + switch ( uassertStatusOK ( negotiate ( clientProtos , serverProtos ) ) ) { <nl> + case Protocol : : kOpQuery : <nl> + return stdx : : make_unique < LegacyReply > ( unownedMessage ) ; <nl> + case Protocol : : kOpCommandV1 : <nl> + return stdx : : make_unique < CommandReply > ( unownedMessage ) ; <nl> + default : <nl> + MONGO_UNREACHABLE ; <nl> + } <nl> + } <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 0e178a54ecb3 <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / factory . h <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # pragma once <nl> + <nl> + # include " mongo / rpc / protocol . h " <nl> + <nl> + # include < memory > <nl> + <nl> + / * * <nl> + * Utilities to construct the correct concrete rpc class based on what the remote server <nl> + * supports , and what the client has been configured to do . <nl> + * / <nl> + <nl> + namespace mongo { <nl> + class Message ; <nl> + <nl> + namespace rpc { <nl> + class ReplyInterface ; <nl> + class RequestBuilderInterface ; <nl> + <nl> + / * * <nl> + * Returns the appropriate concrete RequestBuilder . Throws if one cannot be chosen . <nl> + * / <nl> + std : : unique_ptr < RequestBuilderInterface > makeRequestBuilder ( ProtocolSet clientProtos , <nl> + ProtocolSet serverProtos ) ; <nl> + / * * <nl> + * Returns the appropriate concrete Reply . Throws if one cannot be chosen . <nl> + * / <nl> + std : : unique_ptr < ReplyInterface > makeReply ( const Message * unownedMessage , <nl> + ProtocolSet clientProtos , <nl> + ProtocolSet serverProtos ) ; <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 1dc40c83cd6b <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / legacy_reply . cpp <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # include " mongo / platform / basic . h " <nl> + <nl> + # include " mongo / rpc / legacy_reply . h " <nl> + <nl> + # include < utility > <nl> + <nl> + # include " mongo / util / assert_util . h " <nl> + # include " mongo / util / mongoutils / str . h " <nl> + <nl> + namespace mongo { <nl> + namespace rpc { <nl> + <nl> + LegacyReply : : LegacyReply ( const Message * message ) <nl> + : _message ( std : : move ( message ) ) { <nl> + invariant ( message - > operation ( ) = = opReply ) ; <nl> + <nl> + QueryResult : : View qr = _message - > singleData ( ) . view2ptr ( ) ; <nl> + <nl> + / / should be checked by caller . <nl> + invariant ( qr . msgdata ( ) . getOperation ( ) = = opReply ) ; <nl> + <nl> + uassert ( ErrorCodes : : BadValue , <nl> + str : : stream ( ) < < " Got legacy command reply with a bad cursorId field , " <nl> + < < " expected a value of 0 but got " < < qr . getCursorId ( ) , <nl> + qr . getCursorId ( ) = = 0 ) ; <nl> + <nl> + uassert ( ErrorCodes : : BadValue , <nl> + str : : stream ( ) < < " Got legacy command reply with a bad nReturned field , " <nl> + < < " expected a value of 1 but got " < < qr . getNReturned ( ) , <nl> + qr . getNReturned ( ) = = 1 ) ; <nl> + <nl> + uassert ( ErrorCodes : : BadValue , <nl> + str : : stream ( ) < < " Got legacy command reply with a bad startingFrom field , " <nl> + < < " expected a value of 0 but got " < < qr . getStartingFrom ( ) , <nl> + qr . getStartingFrom ( ) = = 0 ) ; <nl> + / / TODO bson validation <nl> + _commandReply = BSONObj ( qr . data ( ) ) ; <nl> + } <nl> + <nl> + const BSONObj & LegacyReply : : getMetadata ( ) const { <nl> + return _metadataPlaceholder ; <nl> + } <nl> + <nl> + const BSONObj & LegacyReply : : getCommandReply ( ) const { <nl> + return _commandReply ; <nl> + } <nl> + <nl> + DocumentRange LegacyReply : : getOutputDocs ( ) const { <nl> + / / return empty range <nl> + return DocumentRange { } ; <nl> + } <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . fddc050a71b9 <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / legacy_reply . h <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # pragma once <nl> + <nl> + # include " mongo / db / dbmessage . h " <nl> + # include " mongo / db / jsobj . h " <nl> + # include " mongo / rpc / document_range . h " <nl> + # include " mongo / rpc / reply_interface . h " <nl> + <nl> + namespace mongo { <nl> + class Message ; <nl> + <nl> + namespace rpc { <nl> + <nl> + / * * <nl> + * Immutable view of an OP_REPLY legacy - style command reply . <nl> + * <nl> + * TODO : BSON validation ( SERVER - 18167 ) <nl> + * / <nl> + class LegacyReply : public ReplyInterface { <nl> + public : <nl> + <nl> + / * * <nl> + * Construct a Reply from a Message . <nl> + * The underlying message MUST outlive the Reply . <nl> + * / <nl> + explicit LegacyReply ( const Message * message ) ; <nl> + <nl> + / * * <nl> + * Accessor for the metadata object . Metadata is generally used for information <nl> + * that is independent of any specific command , e . g . auditing information . <nl> + * / <nl> + const BSONObj & getMetadata ( ) const final ; <nl> + <nl> + / * * <nl> + * The result of executing the command . <nl> + * / <nl> + const BSONObj & getCommandReply ( ) const final ; <nl> + <nl> + / * * <nl> + * A variable number of BSON documents returned by the command . It is valid for the <nl> + * returned range to be empty . <nl> + * <nl> + * Example usage : <nl> + * <nl> + * for ( auto & & doc : reply . getOutputDocs ( ) ) { <nl> + * . . . do stuff with doc <nl> + * } <nl> + * / <nl> + DocumentRange getOutputDocs ( ) const final ; <nl> + <nl> + private : <nl> + const Message * _message ; <nl> + <nl> + / / TODO : SERVER - 18236 <nl> + BSONObj _metadataPlaceholder { } ; <nl> + BSONObj _commandReply { } ; / / will hold unowned <nl> + } ; <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 4ed4ff88886b <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / legacy_reply_builder . cpp <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # include " mongo / platform / basic . h " <nl> + <nl> + # include " mongo / db / dbmessage . h " <nl> + # include " mongo / db / jsobj . h " <nl> + # include " mongo / rpc / legacy_reply_builder . h " <nl> + # include " mongo / stdx / memory . h " <nl> + # include " mongo / util / assert_util . h " <nl> + <nl> + namespace mongo { <nl> + namespace rpc { <nl> + <nl> + LegacyReplyBuilder : : LegacyReplyBuilder ( ) <nl> + : LegacyReplyBuilder ( stdx : : make_unique < Message > ( ) ) <nl> + { } <nl> + <nl> + LegacyReplyBuilder : : LegacyReplyBuilder ( std : : unique_ptr < Message > message ) <nl> + : _message { std : : move ( message ) } { <nl> + _builder . skip ( sizeof ( QueryResult : : Value ) ) ; <nl> + } <nl> + <nl> + LegacyReplyBuilder : : ~ LegacyReplyBuilder ( ) { } <nl> + <nl> + LegacyReplyBuilder & LegacyReplyBuilder : : setMetadata ( BSONObj metadata ) { <nl> + invariant ( _state = = State : : kMetadata ) ; <nl> + / / no op for now : SERVER - 18236 <nl> + _state = State : : kCommandReply ; <nl> + return * this ; <nl> + } <nl> + <nl> + LegacyReplyBuilder & LegacyReplyBuilder : : setRawCommandReply ( BSONObj commandReply ) { <nl> + invariant ( _state = = State : : kCommandReply ) ; <nl> + commandReply . appendSelfToBufBuilder ( _builder ) ; <nl> + _state = State : : kOutputDocs ; <nl> + return * this ; <nl> + } <nl> + <nl> + LegacyReplyBuilder & LegacyReplyBuilder : : addOutputDocs ( DocumentRange outputDocs ) { <nl> + invariant ( _state = = State : : kOutputDocs ) ; <nl> + / / no op <nl> + return * this ; <nl> + } <nl> + <nl> + LegacyReplyBuilder & LegacyReplyBuilder : : addOutputDoc ( BSONObj outputDoc ) { <nl> + invariant ( _state = = State : : kOutputDocs ) ; <nl> + / / no op <nl> + return * this ; <nl> + } <nl> + <nl> + ReplyBuilderInterface : : State LegacyReplyBuilder : : getState ( ) const { <nl> + return _state ; <nl> + } <nl> + <nl> + std : : unique_ptr < Message > LegacyReplyBuilder : : done ( ) { <nl> + invariant ( _state = = State : : kOutputDocs ) ; <nl> + std : : unique_ptr < Message > message = stdx : : make_unique < Message > ( ) ; <nl> + <nl> + QueryResult : : View qr = _builder . buf ( ) ; <nl> + qr . setResultFlagsToOk ( ) ; <nl> + qr . msgdata ( ) . setLen ( _builder . len ( ) ) ; <nl> + qr . msgdata ( ) . setOperation ( opReply ) ; <nl> + qr . setCursorId ( 0 ) ; <nl> + qr . setStartingFrom ( 0 ) ; <nl> + qr . setNReturned ( 1 ) ; <nl> + _builder . decouple ( ) ; <nl> + <nl> + message - > setData ( qr . view2ptr ( ) , true ) ; <nl> + <nl> + _state = State : : kDone ; <nl> + return std : : move ( message ) ; <nl> + } <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 35dc49a911e1 <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / legacy_reply_builder . h <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # pragma once <nl> + <nl> + # include < memory > <nl> + <nl> + # include " mongo / base / status_with . h " <nl> + # include " mongo / bson / util / builder . h " <nl> + # include " mongo / rpc / document_range . h " <nl> + # include " mongo / rpc / reply_builder_interface . h " <nl> + <nl> + namespace mongo { <nl> + namespace rpc { <nl> + <nl> + class LegacyReplyBuilder : public ReplyBuilderInterface { <nl> + public : <nl> + <nl> + LegacyReplyBuilder ( ) ; <nl> + LegacyReplyBuilder ( std : : unique_ptr < Message > ) ; <nl> + ~ LegacyReplyBuilder ( ) final ; <nl> + <nl> + LegacyReplyBuilder & setMetadata ( BSONObj metadata ) final ; <nl> + LegacyReplyBuilder & setRawCommandReply ( BSONObj commandReply ) final ; <nl> + <nl> + LegacyReplyBuilder & addOutputDocs ( DocumentRange outputDocs ) final ; <nl> + LegacyReplyBuilder & addOutputDoc ( BSONObj outputDoc ) final ; <nl> + <nl> + State getState ( ) const final ; <nl> + <nl> + std : : unique_ptr < Message > done ( ) final ; <nl> + <nl> + private : <nl> + BufBuilder _builder { } ; <nl> + std : : unique_ptr < Message > _message ; <nl> + State _state { State : : kMetadata } ; <nl> + } ; <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . bb79928abb97 <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / legacy_request . cpp <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # include " mongo / platform / basic . h " <nl> + <nl> + # include < utility > <nl> + <nl> + # include " mongo / db / namespace_string . h " <nl> + # include " mongo / rpc / legacy_request . h " <nl> + # include " mongo / rpc / metadata . h " <nl> + # include " mongo / util / assert_util . h " <nl> + <nl> + namespace mongo { <nl> + namespace rpc { <nl> + <nl> + LegacyRequest : : LegacyRequest ( const Message * message ) <nl> + : _message ( std : : move ( message ) ) <nl> + , _dbMessage ( * message ) <nl> + , _queryMessage ( _dbMessage ) <nl> + , _database ( NamespaceString ( _queryMessage . ns ) . db ( ) . toString ( ) ) { <nl> + <nl> + std : : tie ( _upconvertedCommandArgs , _upconvertedMetadata ) = uassertStatusOK ( <nl> + metadata : : upconvertRequest ( std : : move ( _queryMessage . query ) , <nl> + std : : move ( _queryMessage . queryOptions ) ) <nl> + ) ; <nl> + } <nl> + <nl> + LegacyRequest : : ~ LegacyRequest ( ) = default ; <nl> + <nl> + StringData LegacyRequest : : getDatabase ( ) const { <nl> + return _database ; <nl> + } <nl> + <nl> + StringData LegacyRequest : : getCommandName ( ) const { <nl> + return _upconvertedCommandArgs . firstElement ( ) . fieldNameStringData ( ) ; <nl> + } <nl> + <nl> + const BSONObj & LegacyRequest : : getMetadata ( ) const { <nl> + / / TODO SERVER - 18236 <nl> + return _upconvertedMetadata ; <nl> + } <nl> + <nl> + const BSONObj & LegacyRequest : : getCommandArgs ( ) const { <nl> + return _upconvertedCommandArgs ; <nl> + } <nl> + <nl> + DocumentRange LegacyRequest : : getInputDocs ( ) const { <nl> + / / return an empty document range . <nl> + return DocumentRange { } ; <nl> + } <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 93567a6fe6c1 <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / legacy_request . h <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # pragma once <nl> + <nl> + # include " mongo / base / string_data . h " <nl> + # include " mongo / db / dbmessage . h " <nl> + # include " mongo / db / jsobj . h " <nl> + # include " mongo / rpc / document_range . h " <nl> + # include " mongo / rpc / request_interface . h " <nl> + <nl> + namespace mongo { <nl> + class Message ; <nl> + <nl> + namespace rpc { <nl> + <nl> + / * * <nl> + * An immutable view of an OP_QUERY command request . The underlying bytes are owned <nl> + * by a mongo : : Message , which must outlive any LegacyRequest instances created from it . <nl> + * <nl> + * / <nl> + class LegacyRequest : public RequestInterface { <nl> + public : <nl> + / * * <nl> + * Construct a Request from a Message . Underlying message MUST outlive the Request . <nl> + * Required fields are parsed eagerly , inputDocs are parsed lazily . <nl> + * / <nl> + explicit LegacyRequest ( const Message * message ) ; <nl> + <nl> + ~ LegacyRequest ( ) final ; <nl> + <nl> + / * * <nl> + * The database that the command is to be executed on . <nl> + * / <nl> + StringData getDatabase ( ) const final ; <nl> + <nl> + / * * <nl> + * The name of the command to execute . <nl> + * / <nl> + StringData getCommandName ( ) const final ; <nl> + <nl> + / * * <nl> + * The metadata associated with the command request . This is information that is <nl> + * independent of any specific command , i . e . auditing information . <nl> + * / <nl> + const BSONObj & getMetadata ( ) const final ; <nl> + <nl> + / * * <nl> + * The arguments to the command - this is passed to the command ' s run ( ) method . <nl> + * / <nl> + const BSONObj & getCommandArgs ( ) const final ; <nl> + <nl> + / * * <nl> + * A variable number of BSON documents to pass to the command . It is valid for <nl> + * the returned range to be empty . <nl> + * <nl> + * Example usage : <nl> + * <nl> + * for ( auto & & doc : req . getInputDocs ( ) ) { <nl> + * . . . do stuff with doc <nl> + * } <nl> + * / <nl> + DocumentRange getInputDocs ( ) const final ; <nl> + <nl> + private : <nl> + const Message * _message ; <nl> + / / TODO : metadata will be handled in SERVER - 18236 <nl> + / / for now getMetadata ( ) is a no op <nl> + DbMessage _dbMessage ; <nl> + QueryMessage _queryMessage ; <nl> + std : : string _database ; <nl> + <nl> + BSONObj _upconvertedMetadata ; <nl> + BSONObj _upconvertedCommandArgs ; <nl> + } ; <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . f1978583df89 <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / legacy_request_builder . cpp <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # include " mongo / platform / basic . h " <nl> + <nl> + # include " mongo / rpc / legacy_request_builder . h " <nl> + <nl> + # include < utility > <nl> + # include < tuple > <nl> + <nl> + # include " mongo / db / namespace_string . h " <nl> + # include " mongo / rpc / metadata . h " <nl> + # include " mongo / stdx / memory . h " <nl> + # include " mongo / util / assert_util . h " <nl> + <nl> + namespace mongo { <nl> + namespace rpc { <nl> + <nl> + LegacyRequestBuilder : : LegacyRequestBuilder ( ) <nl> + : _message { stdx : : make_unique < Message > ( ) } <nl> + { } <nl> + <nl> + LegacyRequestBuilder : : ~ LegacyRequestBuilder ( ) <nl> + { } <nl> + <nl> + LegacyRequestBuilder : : LegacyRequestBuilder ( std : : unique_ptr < Message > message ) <nl> + : _message { std : : move ( message ) } <nl> + { } <nl> + <nl> + LegacyRequestBuilder & LegacyRequestBuilder : : setDatabase ( StringData database ) { <nl> + invariant ( _state = = State : : kDatabase ) ; <nl> + _ns = NamespaceString ( database , " $ cmd " ) . toString ( ) ; <nl> + _state = State : : kCommandName ; <nl> + return * this ; <nl> + } <nl> + <nl> + LegacyRequestBuilder & LegacyRequestBuilder : : setCommandName ( StringData commandName ) { <nl> + invariant ( _state = = State : : kCommandName ) ; <nl> + / / no op , as commandName is the first element of commandArgs <nl> + _state = State : : kMetadata ; <nl> + return * this ; <nl> + } <nl> + <nl> + LegacyRequestBuilder & LegacyRequestBuilder : : setMetadata ( BSONObj metadata ) { <nl> + invariant ( _state = = State : : kMetadata ) ; <nl> + _metadata = std : : move ( metadata ) ; <nl> + _state = State : : kCommandArgs ; <nl> + return * this ; <nl> + } <nl> + <nl> + LegacyRequestBuilder & LegacyRequestBuilder : : setCommandArgs ( BSONObj commandArgs ) { <nl> + invariant ( _state = = State : : kCommandArgs ) ; <nl> + <nl> + BSONObj legacyCommandArgs ; <nl> + int queryOptions ; <nl> + <nl> + std : : tie ( legacyCommandArgs , queryOptions ) = uassertStatusOK ( <nl> + metadata : : downconvertRequest ( std : : move ( commandArgs ) , <nl> + std : : move ( _metadata ) ) <nl> + ) ; <nl> + <nl> + _builder . appendNum ( queryOptions ) ; / / queryOptions <nl> + _builder . appendStr ( _ns ) ; <nl> + _builder . appendNum ( 0 ) ; / / nToSkip <nl> + _builder . appendNum ( 1 ) ; / / nToReturn <nl> + <nl> + legacyCommandArgs . appendSelfToBufBuilder ( _builder ) ; <nl> + _state = State : : kInputDocs ; <nl> + return * this ; <nl> + } <nl> + <nl> + LegacyRequestBuilder & LegacyRequestBuilder : : addInputDocs ( DocumentRange inputDocs ) { <nl> + invariant ( _state = = State : : kInputDocs ) ; <nl> + / / no op <nl> + return * this ; <nl> + } <nl> + <nl> + LegacyRequestBuilder & LegacyRequestBuilder : : addInputDoc ( BSONObj inputDoc ) { <nl> + invariant ( _state = = State : : kInputDocs ) ; <nl> + / / no op <nl> + return * this ; <nl> + } <nl> + <nl> + RequestBuilderInterface : : State LegacyRequestBuilder : : getState ( ) const { <nl> + return _state ; <nl> + } <nl> + <nl> + std : : unique_ptr < Message > LegacyRequestBuilder : : done ( ) { <nl> + invariant ( _state = = State : : kInputDocs ) ; <nl> + _message - > setData ( dbQuery , _builder . buf ( ) , _builder . len ( ) ) ; <nl> + _state = State : : kDone ; <nl> + return std : : move ( _message ) ; <nl> + } <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 0beed3b9a71c <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / legacy_request_builder . h <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # pragma once <nl> + <nl> + # include < memory > <nl> + <nl> + # include " mongo / base / string_data . h " <nl> + # include " mongo / db / jsobj . h " <nl> + # include " mongo / rpc / document_range . h " <nl> + # include " mongo / rpc / request_builder_interface . h " <nl> + # include " mongo / util / net / message . h " <nl> + <nl> + namespace mongo { <nl> + namespace rpc { <nl> + <nl> + class LegacyRequestBuilder : public RequestBuilderInterface { <nl> + public : <nl> + LegacyRequestBuilder ( ) ; <nl> + ~ LegacyRequestBuilder ( ) final ; <nl> + <nl> + LegacyRequestBuilder ( std : : unique_ptr < Message > ) ; <nl> + <nl> + LegacyRequestBuilder & setDatabase ( StringData database ) final ; <nl> + LegacyRequestBuilder & setCommandName ( StringData commandName ) final ; <nl> + LegacyRequestBuilder & setMetadata ( BSONObj metadata ) final ; <nl> + LegacyRequestBuilder & setCommandArgs ( BSONObj commandArgs ) final ; <nl> + <nl> + LegacyRequestBuilder & addInputDocs ( DocumentRange inputDocs ) final ; <nl> + LegacyRequestBuilder & addInputDoc ( BSONObj inputDoc ) final ; <nl> + <nl> + State getState ( ) const final ; <nl> + <nl> + std : : unique_ptr < Message > done ( ) final ; <nl> + <nl> + private : <nl> + std : : unique_ptr < Message > _message ; <nl> + BufBuilder _builder { } ; <nl> + <nl> + / / we need to stash this as we need commandArgs to <nl> + / / upconvert . <nl> + BSONObj _metadata ; <nl> + <nl> + std : : string _ns { } ; / / copied to in setDatabase <nl> + <nl> + State _state { State : : kDatabase } ; <nl> + } ; <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 055dfd07984b <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / metadata . cpp <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # include " mongo / platform / basic . h " <nl> + <nl> + # include " mongo / rpc / metadata . h " <nl> + <nl> + # include " mongo / client / dbclientinterface . h " <nl> + # include " mongo / db / jsobj . h " <nl> + <nl> + namespace mongo { <nl> + namespace rpc { <nl> + namespace metadata { <nl> + <nl> + BSONObj empty ( ) { <nl> + return BSONObj ( ) ; <nl> + } <nl> + <nl> + const char kSecondaryOk [ ] = " $ secondaryOk " ; <nl> + <nl> + StatusWith < CommandAndMetadata > upconvertRequest ( BSONObj legacyCmdObj , int queryFlags ) { <nl> + BSONObjBuilder metadataBob ; <nl> + <nl> + / / note second check may be erroneous : see SERVER - 18194 <nl> + if ( ( queryFlags & QueryOption_SlaveOk ) ) { <nl> + metadataBob . append ( kSecondaryOk , 1 ) ; <nl> + } <nl> + <nl> + return std : : make_tuple ( std : : move ( legacyCmdObj ) , std : : move ( metadataBob . obj ( ) ) ) ; <nl> + } <nl> + <nl> + StatusWith < LegacyCommandAndFlags > downconvertRequest ( BSONObj cmdObj , BSONObj metadata ) { <nl> + int flags = 0 ; <nl> + <nl> + if ( metadata . hasField ( kSecondaryOk ) ) { <nl> + flags | = QueryOption_SlaveOk ; <nl> + } <nl> + <nl> + return std : : make_tuple ( std : : move ( cmdObj ) , flags ) ; <nl> + } <nl> + <nl> + } / / namespace metadata <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 183dedffc5db <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / metadata . h <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # pragma once <nl> + <nl> + # include < tuple > <nl> + <nl> + # include " mongo / base / status_with . h " <nl> + <nl> + namespace mongo { <nl> + class BSONObj ; <nl> + <nl> + / * * <nl> + * Utilities for converting metadata between the legacy OP_QUERY format and the new <nl> + * OP_COMMAND format . <nl> + * <nl> + * Metadata consists of information independent of any particular command such as : <nl> + * <nl> + * Request / Reply / Both | ( legacy ) OP_QUERY format | OP_COMMAND format <nl> + * __________________________________________________________________________________________________ <nl> + * Request | the slaveOk bit | $ secondaryOk on metadata obj <nl> + * Request | $ readPreference field of command | $ readPreference on metadata obj <nl> + * Request | $ impersonatedUsers on command obj | $ impersonatedUsers on metadata obj <nl> + * Request | $ impersonatedRoles on command obj | $ impersonatedRoles on metadata obj <nl> + * Request | maxTimeMS on command obj | $ maxTimeMS on metadata obj <nl> + * Reply | $ gleStats field on command reply | $ gleStats on metadata obj <nl> + * <nl> + * TODO : currently only $ secondaryOk ( request only ) is handled . SERVER - 18236 will cover the rest . <nl> + * / <nl> + namespace rpc { <nl> + namespace metadata { <nl> + <nl> + / * * <nl> + * Returns an empty metadata object . <nl> + * / <nl> + BSONObj empty ( ) ; <nl> + <nl> + / * * <nl> + * The field name for the secondaryOk metadata field . <nl> + * / <nl> + extern const char kSecondaryOk [ ] ; <nl> + <nl> + / * * <nl> + * A command object and a corresponding metadata object . <nl> + * / <nl> + using CommandAndMetadata = std : : tuple < BSONObj , BSONObj > ; <nl> + <nl> + / * * <nl> + * A legacy command object and a corresponding query flags bitfield . The legacy command object <nl> + * may contain metadata fields , so it cannot safely be passed to a command ' s run method . <nl> + * / <nl> + using LegacyCommandAndFlags = std : : tuple < BSONObj , int > ; <nl> + <nl> + / * * <nl> + * Given a legacy command object and a query flags bitfield , attempts to parse and remove <nl> + * the metadata from the command object and construct a corresponding metadata object . <nl> + * / <nl> + StatusWith < CommandAndMetadata > upconvertRequest ( BSONObj legacyCmdObj , int queryFlags ) ; <nl> + <nl> + / * * <nl> + * Given a command object and a metadata object , attempts to construct a legacy command <nl> + * object and query flags bitfield augmented with the given metadata . <nl> + * / <nl> + StatusWith < LegacyCommandAndFlags > downconvertRequest ( BSONObj cmdObj , BSONObj metadata ) ; <nl> + <nl> + } / / namespace metadata <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . dae77abce3b1 <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / protocol . cpp <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # include " mongo / platform / basic . h " <nl> + <nl> + # include " mongo / rpc / protocol . h " <nl> + <nl> + # include < algorithm > <nl> + # include < iterator > <nl> + <nl> + # include " mongo / base / string_data . h " <nl> + # include " mongo / util / mongoutils / str . h " <nl> + <nl> + namespace mongo { <nl> + namespace rpc { <nl> + <nl> + namespace { <nl> + <nl> + / * * <nl> + * Protocols supported by order of preference . <nl> + * / <nl> + const Protocol kPreferredProtos [ ] = { <nl> + Protocol : : kOpCommandV1 , <nl> + Protocol : : kOpQuery <nl> + } ; <nl> + <nl> + const char kNone [ ] = " none " ; <nl> + const char kOpQueryOnly [ ] = " opQueryOnly " ; <nl> + const char kOpCommandOnly [ ] = " opCommandOnly " ; <nl> + const char kAll [ ] = " all " ; <nl> + <nl> + } / / namespace <nl> + <nl> + StatusWith < Protocol > negotiate ( ProtocolSet fst , ProtocolSet snd ) { <nl> + using std : : begin ; <nl> + using std : : end ; <nl> + <nl> + ProtocolSet common = fst & snd ; <nl> + <nl> + auto it = <nl> + std : : find_if ( begin ( kPreferredProtos ) , end ( kPreferredProtos ) , [ common ] ( Protocol p ) { <nl> + return common & static_cast < ProtocolSet > ( p ) ; <nl> + } ) ; <nl> + <nl> + if ( it = = end ( kPreferredProtos ) ) { <nl> + return Status ( ErrorCodes : : RPCProtocolNegotiationFailed , <nl> + " No common protocol found . " ) ; <nl> + } <nl> + return * it ; <nl> + } <nl> + <nl> + StatusWith < StringData > toString ( ProtocolSet protocols ) { <nl> + switch ( protocols ) { <nl> + case supports : : kNone : <nl> + return StringData ( kNone ) ; <nl> + case supports : : kOpQueryOnly : <nl> + return StringData ( kOpQueryOnly ) ; <nl> + case supports : : kOpCommandOnly : <nl> + return StringData ( kOpCommandOnly ) ; <nl> + case supports : : kAll : <nl> + return StringData ( kAll ) ; <nl> + default : <nl> + return Status ( ErrorCodes : : BadValue , <nl> + str : : stream ( ) < < " Can not convert ProtocolSet " < < protocols <nl> + < < " to a string , only the predefined ProtocolSet " <nl> + < < " constants ' none ' ( 0x0 ) , ' opQueryOnly ' ( 0x1 ) , " <nl> + < < " ' opCommandOnly ' ( 0x2 ) , and ' all ' ( 0x3 ) are supported . " ) ; <nl> + } <nl> + } <nl> + <nl> + StatusWith < ProtocolSet > parseProtocolSet ( StringData repr ) { <nl> + if ( repr = = kNone ) { <nl> + return supports : : kNone ; <nl> + } <nl> + else if ( repr = = kOpQueryOnly ) { <nl> + return supports : : kOpQueryOnly ; <nl> + } <nl> + else if ( repr = = kOpCommandOnly ) { <nl> + return supports : : kOpCommandOnly ; <nl> + } <nl> + else if ( repr = = kAll ) { <nl> + return supports : : kAll ; <nl> + } <nl> + return Status ( ErrorCodes : : BadValue , <nl> + str : : stream ( ) < < " Can not parse a ProtocolSet from " < < repr <nl> + < < " only the predefined ProtocolSet constants " <nl> + < < " ' none ' ( 0x0 ) , ' opQueryOnly ' ( 0x1 ) , ' opCommandOnly ' ( 0x2 ) , " <nl> + < < " and ' all ' ( 0x3 ) are supported . " ) ; <nl> + } <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . ba370a90e697 <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / protocol . h <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # pragma once <nl> + <nl> + # include < string > <nl> + # include < type_traits > <nl> + <nl> + # include " mongo / base / status_with . h " <nl> + # include " mongo / platform / cstdint . h " <nl> + <nl> + namespace mongo { <nl> + namespace rpc { <nl> + <nl> + / * * <nl> + * Bit flags representing support for a particular RPC protocol . <nl> + * This is just an internal representation , and is never transmitted over the wire . It should <nl> + * never be used for any other feature detection in favor of max / min wire version . <nl> + * <nl> + * A new protocol must be added as the highest order bit flag so that it is prioritized in <nl> + * negotiation . <nl> + * / <nl> + enum class Protocol : std : : uint64_t { <nl> + <nl> + / * * <nl> + * The pre - 3 . 2 OP_QUERY on db . $ cmd protocol <nl> + * / <nl> + kOpQuery = 1 < < 0 , <nl> + <nl> + / * * <nl> + * The post - 3 . 2 OP_COMMAND protocol . <nl> + * / <nl> + kOpCommandV1 = 1 < < 1 , <nl> + } ; <nl> + <nl> + / * * <nl> + * Bitfield representing a set of supported RPC protocols . <nl> + * / <nl> + using ProtocolSet = std : : underlying_type < Protocol > : : type ; <nl> + <nl> + / * * <nl> + * This namespace contains predefined bitfields for common levels of protocol support . <nl> + * / <nl> + namespace supports { <nl> + <nl> + const ProtocolSet kNone = ProtocolSet { 0 } ; <nl> + const ProtocolSet kOpQueryOnly = static_cast < ProtocolSet > ( Protocol : : kOpQuery ) ; <nl> + const ProtocolSet kOpCommandOnly = static_cast < ProtocolSet > ( Protocol : : kOpCommandV1 ) ; <nl> + const ProtocolSet kAll = kOpQueryOnly | kOpCommandOnly ; <nl> + <nl> + } / / namespace supports <nl> + <nl> + / * * <nl> + * Returns the newest protocol supported by two parties . <nl> + * / <nl> + StatusWith < Protocol > negotiate ( ProtocolSet fst , ProtocolSet snd ) ; <nl> + <nl> + / * * <nl> + * Converts a ProtocolSet to a string . Currently only the predefined ProtocolSets in the <nl> + * ' supports ' namespace are supported . <nl> + * <nl> + * This intentionally does not conform to the STL ' to_string ' convention so that it will <nl> + * not conflict with the to_string overload for uint64_t . <nl> + * / <nl> + StatusWith < StringData > toString ( ProtocolSet protocols ) ; <nl> + <nl> + / * * <nl> + * Parses a ProtocolSet from a string . Currently only the predefined ProtocolSets in the <nl> + * ' supports ' namespace are supported <nl> + * / <nl> + StatusWith < ProtocolSet > parseProtocolSet ( StringData repr ) ; <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 86211717eb77 <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / protocol_test . cpp <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # include " mongo / platform / basic . h " <nl> + <nl> + # include " mongo / base / status . h " <nl> + # include " mongo / rpc / protocol . h " <nl> + # include " mongo / unittest / unittest . h " <nl> + <nl> + namespace { <nl> + <nl> + using namespace mongo : : rpc ; <nl> + <nl> + / / Checks if negotiation of the first to protocol sets results in the ' proto ' <nl> + const auto assert_negotiated = [ ] ( ProtocolSet fst , ProtocolSet snd , Protocol proto ) { <nl> + auto negotiated = negotiate ( fst , snd ) ; <nl> + ASSERT_TRUE ( negotiated . isOK ( ) ) ; <nl> + ASSERT_TRUE ( negotiated . getValue ( ) = = proto ) ; <nl> + } ; <nl> + <nl> + TEST ( Protocol , SuccessfulNegotiation ) { <nl> + assert_negotiated ( supports : : kAll , supports : : kAll , Protocol : : kOpCommandV1 ) ; <nl> + assert_negotiated ( supports : : kAll , supports : : kOpCommandOnly , Protocol : : kOpCommandV1 ) ; <nl> + assert_negotiated ( supports : : kAll , supports : : kOpQueryOnly , Protocol : : kOpQuery ) ; <nl> + } <nl> + <nl> + / / Checks that negotiation fails <nl> + const auto assert_not_negotiated = [ ] ( ProtocolSet fst , ProtocolSet snd ) { <nl> + auto proto = negotiate ( fst , snd ) ; <nl> + ASSERT_TRUE ( ! proto . isOK ( ) ) ; <nl> + ASSERT_TRUE ( proto . getStatus ( ) . code ( ) = = mongo : : ErrorCodes : : RPCProtocolNegotiationFailed ) ; <nl> + } ; <nl> + <nl> + TEST ( Protocol , FailedNegotiation ) { <nl> + assert_not_negotiated ( supports : : kOpQueryOnly , supports : : kOpCommandOnly ) ; <nl> + assert_not_negotiated ( supports : : kAll , supports : : kNone ) ; <nl> + assert_not_negotiated ( supports : : kOpQueryOnly , supports : : kNone ) ; <nl> + assert_not_negotiated ( supports : : kOpCommandOnly , supports : : kNone ) ; <nl> + } <nl> + <nl> + } / / namespace <nl> new file mode 100644 <nl> index 000000000000 . . 1b4b5aadbdaf <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / reply_builder_interface . cpp <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # include " mongo / platform / basic . h " <nl> + <nl> + # include " mongo / rpc / reply_builder_interface . h " <nl> + <nl> + # include < utility > <nl> + <nl> + # include " mongo / base / status_with . h " <nl> + # include " mongo / db / jsobj . h " <nl> + <nl> + namespace mongo { <nl> + namespace rpc { <nl> + <nl> + namespace { <nl> + const char kOKField [ ] = " ok " ; <nl> + const char kCodeField [ ] = " code " ; <nl> + const char kErrorField [ ] = " errmsg " ; <nl> + <nl> + / / similar to appendCommandStatus ( duplicating logic here to avoid cyclic library <nl> + / / dependency ) <nl> + BSONObj augmentReplyWithStatus ( const Status & status , const BSONObj & reply ) { <nl> + BSONObjBuilder bob ; <nl> + bob . appendElements ( reply ) ; <nl> + <nl> + if ( ! reply . hasField ( kOKField ) ) { <nl> + bob . append ( kOKField , status . isOK ( ) ? 1 . 0 : 0 . 0 ) ; <nl> + } <nl> + <nl> + if ( status . isOK ( ) ) { <nl> + return bob . obj ( ) ; <nl> + } <nl> + <nl> + if ( ! reply . hasField ( kErrorField ) ) { <nl> + bob . append ( kErrorField , status . reason ( ) ) ; <nl> + } <nl> + <nl> + if ( ! reply . hasField ( kCodeField ) ) { <nl> + bob . append ( kCodeField , status . code ( ) ) ; <nl> + } <nl> + <nl> + return bob . obj ( ) ; <nl> + } <nl> + } <nl> + <nl> + ReplyBuilderInterface & <nl> + ReplyBuilderInterface : : setCommandReply ( StatusWith < BSONObj > commandReply ) { <nl> + auto reply = commandReply . isOK ( ) ? std : : move ( commandReply . getValue ( ) ) : BSONObj ( ) ; <nl> + return setRawCommandReply ( augmentReplyWithStatus ( commandReply . getStatus ( ) , reply ) ) ; <nl> + } <nl> + <nl> + ReplyBuilderInterface & <nl> + ReplyBuilderInterface : : setCommandReply ( Status nonOKStatus , BSONObj extraErrorInfo ) { <nl> + invariant ( ! nonOKStatus . isOK ( ) ) ; <nl> + return setRawCommandReply ( augmentReplyWithStatus ( nonOKStatus , extraErrorInfo ) ) ; <nl> + } <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 00942fe1dac8 <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / reply_builder_interface . h <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # pragma once <nl> + <nl> + # include < memory > <nl> + <nl> + # include " mongo / base / disallow_copying . h " <nl> + # include " mongo / base / status_with . h " <nl> + <nl> + namespace mongo { <nl> + class BSONObj ; <nl> + class Message ; <nl> + <nl> + namespace rpc { <nl> + class DocumentRange ; <nl> + <nl> + / * * <nl> + * Constructs an RPC Reply . <nl> + * / <nl> + class ReplyBuilderInterface { <nl> + MONGO_DISALLOW_COPYING ( ReplyBuilderInterface ) ; <nl> + public : <nl> + <nl> + / * * <nl> + * Reply builders must have their fields set in order as they are immediately written into <nl> + * the underlying message buffer . This enum represents the next field that can be written <nl> + * into the builder . Note that when the builder is in state ' kInputDocs ' , multiple input <nl> + * docs can be added . After the builder ' s done ( ) method is called it is in state ' kDone ' , <nl> + * and no further methods can be called . <nl> + * / <nl> + enum class State { <nl> + kMetadata , <nl> + kCommandReply , <nl> + kOutputDocs , <nl> + kDone <nl> + } ; <nl> + <nl> + virtual ~ ReplyBuilderInterface ( ) = default ; <nl> + <nl> + virtual ReplyBuilderInterface & setMetadata ( BSONObj metadata ) = 0 ; <nl> + <nl> + / * * <nl> + * Sets the raw command reply . This should probably not be used in favor of the <nl> + * variants that accept a Status or StatusWith . <nl> + * / <nl> + virtual ReplyBuilderInterface & setRawCommandReply ( BSONObj reply ) = 0 ; <nl> + <nl> + / * * <nl> + * Sets the reply for this command . If an engaged StatusWith < BSONObj > is passed , the command <nl> + * reply will be set to the contained BSONObj , augmented with the element { ok , 1 . 0 } if it <nl> + * does not already have an " ok " field . If a disengaged StatusWith < BSONObj > is passed , the <nl> + * command reply will be set to { ok : 0 . 0 , code : < code of status > , <nl> + * errmsg : < reason of status > } <nl> + * / <nl> + ReplyBuilderInterface & setCommandReply ( StatusWith < BSONObj > commandReply ) ; <nl> + <nl> + / * * <nl> + * Sets the reply for this command . The status parameter must be non - OK . The reply for <nl> + * this command will be set to an object containing all the fields in extraErrorInfo , <nl> + * augmented with { ok : 0 . 0 } , { code : < code of status > } , and { errmsg : < reason of status > } . <nl> + * If any of the fields " ok " , " code " , or " errmsg " already exist in extraErrorInfo , they <nl> + * will be left as - is in the command reply . This use of this form is intended for <nl> + * interfacing with legacy code that adds additional data to a failed command reply and <nl> + * its use is discouraged in new code . <nl> + * / <nl> + ReplyBuilderInterface & setCommandReply ( Status nonOKStatus , BSONObj extraErrorInfo ) ; <nl> + <nl> + / * * <nl> + * Add a range of output documents to the reply . This method can be called multiple times <nl> + * before calling done ( ) . <nl> + * / <nl> + virtual ReplyBuilderInterface & addOutputDocs ( DocumentRange outputDocs ) = 0 ; <nl> + <nl> + / * * <nl> + * Add a single output document to the reply . This method can be called multiple times <nl> + * before calling done ( ) . <nl> + * / <nl> + virtual ReplyBuilderInterface & addOutputDoc ( BSONObj outputDoc ) = 0 ; <nl> + <nl> + / * * <nl> + * Gets the state of the builder . As the builder will simply crash the process if it is ever <nl> + * put in an invalid state , it isn ' t neccessary to call this method for correctness . Rather <nl> + * it may be helpful to explicitly assert that the builder is in a certain state to make <nl> + * code that manipulates the builder more readable . <nl> + * / <nl> + virtual State getState ( ) const = 0 ; <nl> + <nl> + / * * <nl> + * Writes data then transfers ownership of the message to the caller . The behavior of <nl> + * calling any methods on the builder is subsequently undefined . <nl> + * / <nl> + virtual std : : unique_ptr < Message > done ( ) = 0 ; <nl> + <nl> + protected : <nl> + ReplyBuilderInterface ( ) = default ; <nl> + } ; <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 3fd5644f7852 <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / reply_interface . h <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # pragma once <nl> + <nl> + # include " mongo / base / disallow_copying . h " <nl> + <nl> + namespace mongo { <nl> + class BSONObj ; <nl> + class Message ; <nl> + <nl> + namespace rpc { <nl> + class DocumentRange ; <nl> + <nl> + / * * <nl> + * An immutable view of an RPC Reply . <nl> + * / <nl> + class ReplyInterface { <nl> + MONGO_DISALLOW_COPYING ( ReplyInterface ) ; <nl> + public : <nl> + virtual ~ ReplyInterface ( ) = default ; <nl> + <nl> + / * * <nl> + * Accessor for the metadata object . Metadata is generally used for information <nl> + * that is independent of any specific command , e . g . auditing information . <nl> + * / <nl> + virtual const BSONObj & getMetadata ( ) const = 0 ; <nl> + <nl> + / * * <nl> + * The result of executing the command . <nl> + * / <nl> + virtual const BSONObj & getCommandReply ( ) const = 0 ; <nl> + <nl> + / * * <nl> + * A variable number of BSON documents returned by the command . It is valid for the <nl> + * returned range to be empty . <nl> + * <nl> + * Example usage : <nl> + * <nl> + * for ( auto & & doc : reply . getOutputDocs ( ) ) { <nl> + * . . . do stuff with doc <nl> + * } <nl> + * / <nl> + virtual DocumentRange getOutputDocs ( ) const = 0 ; <nl> + <nl> + protected : <nl> + ReplyInterface ( ) = default ; <nl> + } ; <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 39623e12a105 <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / request_builder_interface . h <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # pragma once <nl> + <nl> + # include < memory > <nl> + <nl> + # include " mongo / base / disallow_copying . h " <nl> + <nl> + namespace mongo { <nl> + class Message ; <nl> + class BSONObj ; <nl> + class StringData ; <nl> + <nl> + namespace rpc { <nl> + class DocumentRange ; <nl> + <nl> + / * * <nl> + * Constructs an RPC request . <nl> + * / <nl> + class RequestBuilderInterface { <nl> + MONGO_DISALLOW_COPYING ( RequestBuilderInterface ) ; <nl> + public : <nl> + <nl> + / * * <nl> + * Request builders must have their fields set in order as they are immediately written into <nl> + * the underlying message buffer . This enum represents the next field that can be written <nl> + * into the builder . Note that when the builder is in state ' kInputDocs ' , multiple input <nl> + * docs can be added . After the builder ' s done ( ) method is called it is in state ' kDone ' , <nl> + * and no further methods can be called . <nl> + * / <nl> + enum class State { <nl> + kDatabase , <nl> + kCommandName , <nl> + kMetadata , <nl> + kCommandArgs , <nl> + kInputDocs , <nl> + kDone <nl> + } ; <nl> + <nl> + virtual ~ RequestBuilderInterface ( ) = default ; <nl> + <nl> + / * * <nl> + * Sets the database that the command will be executed against . <nl> + * / <nl> + virtual RequestBuilderInterface & setDatabase ( StringData database ) = 0 ; <nl> + <nl> + / * * <nl> + * Sets the name of the command to execute . <nl> + * / <nl> + virtual RequestBuilderInterface & setCommandName ( StringData commandName ) = 0 ; <nl> + <nl> + / * * <nl> + * Sets the metadata associated with this command request - see metadata . h for details . <nl> + * / <nl> + virtual RequestBuilderInterface & setMetadata ( BSONObj metadata ) = 0 ; <nl> + <nl> + / * * <nl> + * Sets the arguments to pass to the command . <nl> + * / <nl> + virtual RequestBuilderInterface & setCommandArgs ( BSONObj commandArgs ) = 0 ; <nl> + <nl> + / * * <nl> + * Add a range of input documents to the request . This method can be called multiple times <nl> + * before calling done ( ) . <nl> + * / <nl> + virtual RequestBuilderInterface & addInputDocs ( DocumentRange inputDocs ) = 0 ; <nl> + <nl> + / * * <nl> + * Add a single output document to the request . This method can be called multiple times <nl> + * before calling done ( ) . <nl> + * / <nl> + virtual RequestBuilderInterface & addInputDoc ( BSONObj inputDoc ) = 0 ; <nl> + <nl> + / * * <nl> + * Get the state of the builder . This method is intended to enable debug or invariant <nl> + * checks that the builder is in the correct state . <nl> + * / <nl> + virtual State getState ( ) const = 0 ; <nl> + <nl> + / * * <nl> + * Writes data then transfers ownership of the message to the caller . <nl> + * The behavior of calling any methods on the object is subsequently <nl> + * undefined . <nl> + * / <nl> + virtual std : : unique_ptr < Message > done ( ) = 0 ; <nl> + <nl> + protected : <nl> + RequestBuilderInterface ( ) = default ; <nl> + } ; <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 27f407f3f5c3 <nl> mmm / dev / null <nl> ppp b / src / mongo / rpc / request_interface . h <nl> <nl> + / * * <nl> + * Copyright ( C ) 2015 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects for <nl> + * all of the code used other than as permitted herein . If you modify file ( s ) <nl> + * with this exception , you may extend this exception to your version of the <nl> + * file ( s ) , but you are not obligated to do so . If you do not wish to do so , <nl> + * delete this exception statement from your version . If you delete this <nl> + * exception statement from all source files in the program , then also delete <nl> + * it in the license file . <nl> + * / <nl> + <nl> + # pragma once <nl> + <nl> + # include " mongo / base / disallow_copying . h " <nl> + <nl> + namespace mongo { <nl> + class BSONObj ; <nl> + class Message ; <nl> + class StringData ; <nl> + <nl> + namespace rpc { <nl> + class DocumentRange ; <nl> + <nl> + / * * <nl> + * An immutable view of an RPC message . <nl> + * / <nl> + class RequestInterface { <nl> + MONGO_DISALLOW_COPYING ( RequestInterface ) ; <nl> + public : <nl> + virtual ~ RequestInterface ( ) = default ; <nl> + <nl> + / * * <nl> + * Gets the database that the command is to be executed on . <nl> + * / <nl> + virtual StringData getDatabase ( ) const = 0 ; <nl> + <nl> + / * * <nl> + * Gets the name of the command to execute . <nl> + * / <nl> + virtual StringData getCommandName ( ) const = 0 ; <nl> + <nl> + / * * <nl> + * Gets the metadata associated with the command request . This is information that is <nl> + * independent of any specific command , i . e . auditing information . See metadata . h for <nl> + * further details . <nl> + * / <nl> + virtual const BSONObj & getMetadata ( ) const = 0 ; <nl> + <nl> + / * * <nl> + * Gets the arguments to the command - this is passed to the command ' s run ( ) method . <nl> + * / <nl> + virtual const BSONObj & getCommandArgs ( ) const = 0 ; <nl> + <nl> + / * * <nl> + * A variable number of BSON documents to pass to the command . It is valid for <nl> + * the returned range to be empty . <nl> + * <nl> + * Example usage : <nl> + * <nl> + * for ( auto & & doc : req . getInputDocs ( ) ) { <nl> + * . . . do stuff with doc <nl> + * } <nl> + * / <nl> + virtual DocumentRange getInputDocs ( ) const = 0 ; <nl> + <nl> + protected : <nl> + RequestInterface ( ) = default ; <nl> + } ; <nl> + <nl> + } / / namespace rpc <nl> + } / / namespace mongo <nl> mmm a / src / mongo / util / net / message . h <nl> ppp b / src / mongo / util / net / message . h <nl> namespace mongo { <nl> case dbGetMore : return " getmore " ; <nl> case dbDelete : return " remove " ; <nl> case dbKillCursors : return " killcursors " ; <nl> + case dbCommand : return " command " ; <nl> + case dbCommandReply : return " commandReply " ; <nl> default : <nl> massert ( 16141 , str : : stream ( ) < < " cannot translate opcode " < < op , ! op ) ; <nl> return " " ; <nl>
SERVER - 18288 implement a common interface for OP_COMMAND and OP_QUERY
mongodb/mongo
4e0acbc7b67c5386a3a9ed60795f9cab672a3262
2015-05-18T13:52:09Z
mmm a / tensorflow / tools / graph_transforms / BUILD <nl> ppp b / tensorflow / tools / graph_transforms / BUILD <nl> cc_library ( <nl> " fold_old_batch_norms . cc " , <nl> " freeze_requantization_ranges . cc " , <nl> " fuse_convolutions . cc " , <nl> + " fuse_quantized_convolution . cc " , <nl> " insert_logging . cc " , <nl> " obfuscate_names . cc " , <nl> " quantize_nodes . cc " , <nl> new file mode 100644 <nl> index 0000000000000 . . bd021d094efce <nl> mmm / dev / null <nl> ppp b / tensorflow / tools / graph_transforms / fuse_quantized_convolution . cc <nl> <nl> + / * Copyright 2016 The TensorFlow Authors . All Rights Reserved . <nl> + <nl> + Licensed under the Apache License , Version 2 . 0 ( the " License " ) ; <nl> + you may not use this file except in compliance with the License . <nl> + You may obtain a copy of the License at <nl> + <nl> + http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> + <nl> + Unless required by applicable law or agreed to in writing , software <nl> + distributed under the License is distributed on an " AS IS " BASIS , <nl> + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> + See the License for the specific language governing permissions and <nl> + limitations under the License . <nl> + = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * / <nl> + # ifdef INTEL_MKL <nl> + # include < algorithm > <nl> + <nl> + # include " tensorflow / core / common_runtime / constant_folding . h " <nl> + # include " tensorflow / core / framework / attr_value . pb . h " <nl> + # include " tensorflow / core / framework / node_def_util . h " <nl> + # include " tensorflow / core / framework / numeric_types . h " <nl> + # include " tensorflow / core / graph / graph_constructor . h " <nl> + # include " tensorflow / core / graph / node_builder . h " <nl> + # include " tensorflow / core / graph / subgraph . h " <nl> + # include " tensorflow / core / lib / strings / str_util . h " <nl> + # include " tensorflow / core / platform / init_main . h " <nl> + # include " tensorflow / core / public / session . h " <nl> + # include " tensorflow / core / util / command_line_flags . h " <nl> + # include " tensorflow / tools / graph_transforms / fold_constants_lib . h " <nl> + # include " tensorflow / tools / graph_transforms / transform_utils . h " <nl> + <nl> + namespace tensorflow { <nl> + namespace graph_transforms { <nl> + <nl> + Status FuseQuantizedConvolutionAndRequantize ( <nl> + const GraphDef & input_graph_def , const TransformFuncContext & context , <nl> + GraphDef * output_graph_def ) { <nl> + std : : map < string , const NodeDef * > node_map ; <nl> + MapNamesToNodes ( input_graph_def , & node_map ) ; <nl> + GraphDef replaced_graph_def ; <nl> + TF_RETURN_IF_ERROR ( ReplaceMatchingOpTypes ( <nl> + input_graph_def , / / clang - format off <nl> + <nl> + { " Requantize " , <nl> + { <nl> + { " QuantizedConv2D | QuantizedConv2DWithBias | QuantizedConv2DWithRelu | " <nl> + " QuantizedConv2DWithBiasAndRelu | QuantizedConv2DWithBiasSumAndRelu " } , <nl> + { " QuantizedConv2D | QuantizedConv2DWithBias | QuantizedConv2DWithRelu | " <nl> + " QuantizedConv2DWithBiasAndRelu | QuantizedConv2DWithBiasSumAndRelu " } , <nl> + { " QuantizedConv2D | QuantizedConv2DWithBias | QuantizedConv2DWithRelu | " <nl> + " QuantizedConv2DWithBiasAndRelu | QuantizedConv2DWithBiasSumAndRelu " } , <nl> + { " Const " } , <nl> + { " Const " } <nl> + } <nl> + } , / / clang - format on * / <nl> + [ & node_map ] ( const NodeMatch & match , const std : : set < string > & input_nodes , <nl> + const std : : set < string > & output_nodes , <nl> + std : : vector < NodeDef > * new_nodes ) { <nl> + / / TODO ( mdfaijul / sheng ) : Current implementation assumed all <nl> + / / requantization cases have bias . Index of inputs need to be updated <nl> + / / for non - bias cases . <nl> + <nl> + / / Find all the nodes we expect in the subgraph . <nl> + const NodeDef & requantize_node = match . node ; <nl> + CHECK_EQ ( " Requantize " , requantize_node . op ( ) ) ; <nl> + const NodeDef & quantized_conv2D_node = match . inputs [ 0 ] . node ; <nl> + const NodeDef & const_requantize_range_min_node = match . inputs [ 3 ] . node ; <nl> + CHECK_EQ ( " Const " , const_requantize_range_min_node . op ( ) ) ; <nl> + const NodeDef & const_requantize_range_max_node = match . inputs [ 4 ] . node ; <nl> + CHECK_EQ ( " Const " , const_requantize_range_max_node . op ( ) ) ; <nl> + <nl> + string quantized_conv2D_op_name = quantized_conv2D_node . op ( ) ; <nl> + / / Set up the new fused version of the convolution op . <nl> + NodeDef fused_conv ; <nl> + fused_conv . set_op ( quantized_conv2D_op_name + " AndRequantize " ) ; <nl> + fused_conv . set_name ( match . node . name ( ) ) ; <nl> + int n_input = quantized_conv2D_node . input_size ( ) ; <nl> + if ( quantized_conv2D_op_name . compare ( <nl> + " QuantizedConv2DWithBiasSumAndRelu " ) = = 0 ) <nl> + n_input - = 1 ; / / - 1 since summand is moved after frozen min - max <nl> + <nl> + for ( int i = 0 ; i < n_input ; i + + ) <nl> + AddNodeInput ( quantized_conv2D_node . input ( i ) , & fused_conv ) ; <nl> + <nl> + AddNodeInput ( const_requantize_range_min_node . name ( ) , & fused_conv ) ; <nl> + AddNodeInput ( const_requantize_range_max_node . name ( ) , & fused_conv ) ; <nl> + <nl> + / / Add additional inputs to <nl> + / / QuantizedConv2DWithBiasSumAndReluAndRequantize <nl> + if ( quantized_conv2D_op_name . compare ( <nl> + " QuantizedConv2DWithBiasSumAndRelu " ) = = 0 ) { <nl> + const NodeDef * in_requantize = node_map [ node_map [ <nl> + quantized_conv2D_node . input ( n_input ) ] - > input ( 0 ) ] ; <nl> + string summand ( in_requantize - > name ( ) ) ; <nl> + string min_summand ( in_requantize - > name ( ) + " : 1 " ) ; <nl> + string max_summand ( in_requantize - > name ( ) + " : 2 " ) ; <nl> + AddNodeInput ( summand , & fused_conv ) ; <nl> + AddNodeInput ( min_summand , & fused_conv ) ; <nl> + AddNodeInput ( max_summand , & fused_conv ) ; <nl> + <nl> + / / Signed version QuantizedConv2DWithBiasSumAndReluAndRequantize <nl> + / / if Relu does not follow the convolution operation <nl> + std : : vector < string > signed_ops = { <nl> + " QuantizedConv2DWithBias " , <nl> + " QuantizedConv2D " <nl> + } ; <nl> + bool is_signed_summand = <nl> + std : : find ( signed_ops . begin ( ) , signed_ops . end ( ) , <nl> + node_map [ in_requantize - > input ( 0 ) ] - > op ( ) ) ! = signed_ops . end ( ) ; <nl> + if ( is_signed_summand ) { <nl> + fused_conv . set_op ( <nl> + " QuantizedConv2DWithBiasSignedSumAndReluAndRequantize " ) ; <nl> + SetNodeAttr ( " Tsummand " , DT_QINT8 , & fused_conv ) ; <nl> + } else { <nl> + SetNodeAttr ( " Tsummand " , DT_QUINT8 , & fused_conv ) ; <nl> + } <nl> + } <nl> + CopyNodeAttr ( quantized_conv2D_node , " Tinput " , " Tinput " , & fused_conv ) ; <nl> + CopyNodeAttr ( quantized_conv2D_node , " Tfilter " , " Tfilter " , & fused_conv ) ; <nl> + CopyNodeAttr ( quantized_conv2D_node , " strides " , " strides " , & fused_conv ) ; <nl> + CopyNodeAttr ( quantized_conv2D_node , " padding " , " padding " , & fused_conv ) ; <nl> + <nl> + / / Copy dilation attribute if exsit in the orginal node <nl> + if ( HasNodeAttr ( quantized_conv2D_node , " dilations " ) ) <nl> + CopyNodeAttr ( quantized_conv2D_node , " dilations " , <nl> + " dilations " , & fused_conv ) ; <nl> + if ( quantized_conv2D_op_name . compare ( " QuantizedConv2D " ) = = 0 | | <nl> + quantized_conv2D_op_name . compare ( " QuantizedConv2DWithBias " ) = = 0 ) <nl> + SetNodeAttr ( " out_type " , DT_QINT8 , & fused_conv ) ; <nl> + else <nl> + SetNodeAttr ( " out_type " , DT_QUINT8 , & fused_conv ) ; <nl> + new_nodes - > push_back ( fused_conv ) ; <nl> + new_nodes - > push_back ( const_requantize_range_min_node ) ; <nl> + new_nodes - > push_back ( const_requantize_range_max_node ) ; <nl> + <nl> + return Status : : OK ( ) ; <nl> + } , <nl> + { } , & replaced_graph_def ) ) ; <nl> + <nl> + / / Convert bias float - > int32 on replaced_graph_def <nl> + std : : vector < string > fused_requantized_bias_ops = { <nl> + " QuantizedConv2DWithBiasAndRequantize " , <nl> + " QuantizedConv2DWithBiasAndReluAndRequantize " , <nl> + " QuantizedConv2DWithBiasSumAndReluAndRequantize " , <nl> + " QuantizedConv2DWithBiasSignedSumAndReluAndRequantize " <nl> + } ; <nl> + node_map . clear ( ) ; <nl> + MapNamesToNodes ( replaced_graph_def , & node_map ) ; <nl> + for ( auto & node_pair : node_map ) { <nl> + const NodeDef * node = node_pair . second ; <nl> + bool is_fused_requantized_conv_op = <nl> + std : : find ( fused_requantized_bias_ops . begin ( ) , <nl> + fused_requantized_bias_ops . end ( ) , <nl> + node - > op ( ) ) ! = fused_requantized_bias_ops . end ( ) ; <nl> + if ( is_fused_requantized_conv_op ) { <nl> + / / If the op is not fed by Another Requantize op , <nl> + / / then we coonvert bias as Int32 <nl> + string input_op = node_map [ NodeNameFromInput ( node - > input ( 0 ) ) ] - > op ( ) ; <nl> + if ( str_util : : StartsWith ( input_op , " QuantizedConv2D " ) & & <nl> + str_util : : EndsWith ( input_op , " AndRequantize " ) ) { <nl> + NodeDef * bias_node = const_cast < NodeDef * > ( node_map [ NodeNameFromInput ( <nl> + node - > input ( 2 ) ) ] ) ; <nl> + const NodeDef * min_input_node = node_map [ NodeNameFromInput ( <nl> + node_map [ node - > input ( 0 ) ] - > input ( 7 ) ) ] ; <nl> + const NodeDef * max_input_node = node_map [ NodeNameFromInput ( <nl> + node_map [ node - > input ( 0 ) ] - > input ( 8 ) ) ] ; <nl> + const NodeDef * min_filter_node = node_map [ NodeNameFromInput ( <nl> + node - > input ( 5 ) ) ] ; <nl> + const NodeDef * max_filter_node = node_map [ NodeNameFromInput ( <nl> + node - > input ( 6 ) ) ] ; <nl> + const float min_input = <nl> + GetNodeTensorAttr ( * min_input_node , " value " ) . flat < float > ( ) ( 0 ) ; <nl> + const float max_input = <nl> + GetNodeTensorAttr ( * max_input_node , " value " ) . flat < float > ( ) ( 0 ) ; <nl> + const float min_filter = <nl> + GetNodeTensorAttr ( * min_filter_node , " value " ) . flat < float > ( ) ( 0 ) ; <nl> + const float max_filter = <nl> + GetNodeTensorAttr ( * max_filter_node , " value " ) . flat < float > ( ) ( 0 ) ; <nl> + <nl> + TensorProto float_tensor_proto = bias_node - > attr ( ) . at ( " value " ) . tensor ( ) ; <nl> + Tensor float_tensor ; <nl> + if ( ! float_tensor . FromProto ( float_tensor_proto ) ) { <nl> + TF_RETURN_IF_ERROR ( : : tensorflow : : errors : : InvalidArgument ( <nl> + " TensorProto object is not valid . " ) ) ; <nl> + } <nl> + if ( float_tensor . dtype ( ) ! = DT_FLOAT ) { <nl> + TF_RETURN_IF_ERROR ( : : tensorflow : : errors : : Unimplemented ( <nl> + " Expected float tensor . " ) ) ; <nl> + } <nl> + float * p_bias_float = float_tensor . flat < float > ( ) . data ( ) ; <nl> + <nl> + Tensor int32_tensor = Tensor ( DT_QINT32 , float_tensor . shape ( ) ) ; <nl> + qint32 * p_bias_int32 = int32_tensor . flat < qint32 > ( ) . data ( ) ; <nl> + <nl> + float bias_scale = 255 . 0 * 127 . 0 / <nl> + ( std : : max ( std : : abs ( max_input ) , std : : abs ( min_input ) ) * <nl> + std : : max ( std : : abs ( max_filter ) , std : : abs ( min_filter ) ) ) ; <nl> + int64 nelems = float_tensor . NumElements ( ) ; <nl> + for ( int64 n = 0 ; n < nelems ; n + + ) <nl> + p_bias_int32 [ n ] = ( int32_t ) ( p_bias_float [ n ] * bias_scale ) ; <nl> + <nl> + bias_node - > clear_attr ( ) ; <nl> + AttrValue attr_type ; <nl> + attr_type . set_type ( int32_tensor . dtype ( ) ) ; <nl> + bias_node - > mutable_attr ( ) - > insert ( { " dtype " , attr_type } ) ; <nl> + <nl> + AttrValue attr_tensor ; <nl> + TensorProto * t = attr_tensor . mutable_tensor ( ) ; <nl> + int32_tensor . AsProtoTensorContent ( t ) ; <nl> + bias_node - > mutable_attr ( ) - > insert ( { " value " , attr_tensor } ) ; <nl> + SetNodeAttr ( " Tbias " , DT_QINT32 , const_cast < NodeDef * > ( node ) ) ; <nl> + } else { <nl> + SetNodeAttr ( " Tbias " , DT_FLOAT , const_cast < NodeDef * > ( node ) ) ; <nl> + } <nl> + } <nl> + } <nl> + * output_graph_def = replaced_graph_def ; <nl> + return Status : : OK ( ) ; <nl> + } <nl> + <nl> + REGISTER_GRAPH_TRANSFORM ( " fuse_quantized_conv_and_requantize " , <nl> + FuseQuantizedConvolutionAndRequantize ) ; <nl> + <nl> + } / / namespace graph_transforms <nl> + } / / namespace tensorflow <nl> + # endif / / INTEL_MKL <nl>
Merge pull request from Intel - tensorflow : int8 - part3
tensorflow/tensorflow
8c3d9ae5de21c17f2f4a37e8ec89daaeb402b823
2018-10-16T22:30:10Z
mmm a / js / actions / system / api - structure . js <nl> ppp b / js / actions / system / api - structure . js <nl> actions . defineHttp ( { <nl> / / / @ } <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - } ) ( ) ; <nl> - <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> / / - - SECTION - - END - OF - FILE <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl>
fixed typo
arangodb/arangodb
d1a1ab462a82b0beeff4de8a5d0be117df4b01ef
2013-01-03T16:45:54Z
mmm a / src / python / grpcio_tests / tests / unit / _metadata_code_details_test . py <nl> ppp b / src / python / grpcio_tests / tests / unit / _metadata_code_details_test . py <nl> def testSuccessfulUnaryUnary ( self ) : <nl> def testSuccessfulUnaryStream ( self ) : <nl> self . _servicer . set_details ( _DETAILS ) <nl> <nl> - call = self . _unary_stream ( <nl> + response_iterator_call = self . _unary_stream ( <nl> _SERIALIZED_REQUEST , metadata = _CLIENT_METADATA ) <nl> - received_initial_metadata = call . initial_metadata ( ) <nl> - list ( call ) <nl> + received_initial_metadata = response_iterator_call . initial_metadata ( ) <nl> + list ( response_iterator_call ) <nl> <nl> self . assertTrue ( <nl> test_common . metadata_transmitted ( <nl> def testSuccessfulUnaryStream ( self ) : <nl> test_common . metadata_transmitted ( _SERVER_INITIAL_METADATA , <nl> received_initial_metadata ) ) <nl> self . assertTrue ( <nl> - test_common . metadata_transmitted ( _SERVER_TRAILING_METADATA , <nl> - call . trailing_metadata ( ) ) ) <nl> - self . assertIs ( grpc . StatusCode . OK , call . code ( ) ) <nl> - self . assertEqual ( _DETAILS , call . details ( ) ) <nl> + test_common . metadata_transmitted ( <nl> + _SERVER_TRAILING_METADATA , <nl> + response_iterator_call . trailing_metadata ( ) ) ) <nl> + self . assertIs ( grpc . StatusCode . OK , response_iterator_call . code ( ) ) <nl> + self . assertEqual ( _DETAILS , response_iterator_call . details ( ) ) <nl> <nl> def testSuccessfulStreamUnary ( self ) : <nl> self . _servicer . set_details ( _DETAILS ) <nl> def testSuccessfulStreamUnary ( self ) : <nl> def testSuccessfulStreamStream ( self ) : <nl> self . _servicer . set_details ( _DETAILS ) <nl> <nl> - call = self . _stream_stream ( <nl> + response_iterator_call = self . _stream_stream ( <nl> iter ( [ object ( ) ] * test_constants . STREAM_LENGTH ) , <nl> metadata = _CLIENT_METADATA ) <nl> - received_initial_metadata = call . initial_metadata ( ) <nl> - list ( call ) <nl> + received_initial_metadata = response_iterator_call . initial_metadata ( ) <nl> + list ( response_iterator_call ) <nl> <nl> self . assertTrue ( <nl> test_common . metadata_transmitted ( <nl> def testSuccessfulStreamStream ( self ) : <nl> test_common . metadata_transmitted ( _SERVER_INITIAL_METADATA , <nl> received_initial_metadata ) ) <nl> self . assertTrue ( <nl> - test_common . metadata_transmitted ( _SERVER_TRAILING_METADATA , <nl> - call . trailing_metadata ( ) ) ) <nl> - self . assertIs ( grpc . StatusCode . OK , call . code ( ) ) <nl> - self . assertEqual ( _DETAILS , call . details ( ) ) <nl> + test_common . metadata_transmitted ( <nl> + _SERVER_TRAILING_METADATA , <nl> + response_iterator_call . trailing_metadata ( ) ) ) <nl> + self . assertIs ( grpc . StatusCode . OK , response_iterator_call . code ( ) ) <nl> + self . assertEqual ( _DETAILS , response_iterator_call . details ( ) ) <nl> <nl> def testAbortedUnaryUnary ( self ) : <nl> self . _servicer . set_code ( _NON_OK_CODE ) <nl> def testAbortedUnaryStream ( self ) : <nl> self . _servicer . set_details ( _DETAILS ) <nl> self . _servicer . set_abort_call ( ) <nl> <nl> - call = self . _unary_stream ( <nl> + response_iterator_call = self . _unary_stream ( <nl> _SERIALIZED_REQUEST , metadata = _CLIENT_METADATA ) <nl> - received_initial_metadata = call . initial_metadata ( ) <nl> + received_initial_metadata = response_iterator_call . initial_metadata ( ) <nl> with self . assertRaises ( grpc . RpcError ) : <nl> - self . assertEqual ( len ( list ( call ) ) , 0 ) <nl> + self . assertEqual ( len ( list ( response_iterator_call ) ) , 0 ) <nl> <nl> self . assertTrue ( <nl> test_common . metadata_transmitted ( <nl> def testAbortedUnaryStream ( self ) : <nl> test_common . metadata_transmitted ( _SERVER_INITIAL_METADATA , <nl> received_initial_metadata ) ) <nl> self . assertTrue ( <nl> - test_common . metadata_transmitted ( _SERVER_TRAILING_METADATA , <nl> - call . trailing_metadata ( ) ) ) <nl> - self . assertIs ( _NON_OK_CODE , call . code ( ) ) <nl> - self . assertEqual ( _DETAILS , call . details ( ) ) <nl> + test_common . metadata_transmitted ( <nl> + _SERVER_TRAILING_METADATA , <nl> + response_iterator_call . trailing_metadata ( ) ) ) <nl> + self . assertIs ( _NON_OK_CODE , response_iterator_call . code ( ) ) <nl> + self . assertEqual ( _DETAILS , response_iterator_call . details ( ) ) <nl> <nl> def testAbortedStreamUnary ( self ) : <nl> self . _servicer . set_code ( _NON_OK_CODE ) <nl> def testAbortedStreamStream ( self ) : <nl> self . _servicer . set_details ( _DETAILS ) <nl> self . _servicer . set_abort_call ( ) <nl> <nl> - call = self . _stream_stream ( <nl> + response_iterator_call = self . _stream_stream ( <nl> iter ( [ object ( ) ] * test_constants . STREAM_LENGTH ) , <nl> metadata = _CLIENT_METADATA ) <nl> - received_initial_metadata = call . initial_metadata ( ) <nl> + received_initial_metadata = response_iterator_call . initial_metadata ( ) <nl> with self . assertRaises ( grpc . RpcError ) : <nl> - self . assertEqual ( len ( list ( call ) ) , 0 ) <nl> + self . assertEqual ( len ( list ( response_iterator_call ) ) , 0 ) <nl> <nl> self . assertTrue ( <nl> test_common . metadata_transmitted ( <nl> def testAbortedStreamStream ( self ) : <nl> test_common . metadata_transmitted ( _SERVER_INITIAL_METADATA , <nl> received_initial_metadata ) ) <nl> self . assertTrue ( <nl> - test_common . metadata_transmitted ( _SERVER_TRAILING_METADATA , <nl> - call . trailing_metadata ( ) ) ) <nl> - self . assertIs ( _NON_OK_CODE , call . code ( ) ) <nl> - self . assertEqual ( _DETAILS , call . details ( ) ) <nl> + test_common . metadata_transmitted ( <nl> + _SERVER_TRAILING_METADATA , <nl> + response_iterator_call . trailing_metadata ( ) ) ) <nl> + self . assertIs ( _NON_OK_CODE , response_iterator_call . code ( ) ) <nl> + self . assertEqual ( _DETAILS , response_iterator_call . details ( ) ) <nl> <nl> def testCustomCodeUnaryUnary ( self ) : <nl> self . _servicer . set_code ( _NON_OK_CODE ) <nl> def testCustomCodeUnaryStream ( self ) : <nl> self . _servicer . set_code ( _NON_OK_CODE ) <nl> self . _servicer . set_details ( _DETAILS ) <nl> <nl> - call = self . _unary_stream ( <nl> + response_iterator_call = self . _unary_stream ( <nl> _SERIALIZED_REQUEST , metadata = _CLIENT_METADATA ) <nl> - received_initial_metadata = call . initial_metadata ( ) <nl> + received_initial_metadata = response_iterator_call . initial_metadata ( ) <nl> with self . assertRaises ( grpc . RpcError ) : <nl> - list ( call ) <nl> + list ( response_iterator_call ) <nl> <nl> self . assertTrue ( <nl> test_common . metadata_transmitted ( <nl> def testCustomCodeUnaryStream ( self ) : <nl> test_common . metadata_transmitted ( _SERVER_INITIAL_METADATA , <nl> received_initial_metadata ) ) <nl> self . assertTrue ( <nl> - test_common . metadata_transmitted ( _SERVER_TRAILING_METADATA , <nl> - call . trailing_metadata ( ) ) ) <nl> - self . assertIs ( _NON_OK_CODE , call . code ( ) ) <nl> - self . assertEqual ( _DETAILS , call . details ( ) ) <nl> + test_common . metadata_transmitted ( <nl> + _SERVER_TRAILING_METADATA , <nl> + response_iterator_call . trailing_metadata ( ) ) ) <nl> + self . assertIs ( _NON_OK_CODE , response_iterator_call . code ( ) ) <nl> + self . assertEqual ( _DETAILS , response_iterator_call . details ( ) ) <nl> <nl> def testCustomCodeStreamUnary ( self ) : <nl> self . _servicer . set_code ( _NON_OK_CODE ) <nl> def testCustomCodeStreamStream ( self ) : <nl> self . _servicer . set_code ( _NON_OK_CODE ) <nl> self . _servicer . set_details ( _DETAILS ) <nl> <nl> - call = self . _stream_stream ( <nl> + response_iterator_call = self . _stream_stream ( <nl> iter ( [ object ( ) ] * test_constants . STREAM_LENGTH ) , <nl> metadata = _CLIENT_METADATA ) <nl> - received_initial_metadata = call . initial_metadata ( ) <nl> + received_initial_metadata = response_iterator_call . initial_metadata ( ) <nl> with self . assertRaises ( grpc . RpcError ) as exception_context : <nl> - list ( call ) <nl> + list ( response_iterator_call ) <nl> <nl> self . assertTrue ( <nl> test_common . metadata_transmitted ( <nl> def testCustomCodeExceptionUnaryStream ( self ) : <nl> self . _servicer . set_details ( _DETAILS ) <nl> self . _servicer . set_exception ( ) <nl> <nl> - call = self . _unary_stream ( <nl> + response_iterator_call = self . _unary_stream ( <nl> _SERIALIZED_REQUEST , metadata = _CLIENT_METADATA ) <nl> - received_initial_metadata = call . initial_metadata ( ) <nl> + received_initial_metadata = response_iterator_call . initial_metadata ( ) <nl> with self . assertRaises ( grpc . RpcError ) : <nl> - list ( call ) <nl> + list ( response_iterator_call ) <nl> <nl> self . assertTrue ( <nl> test_common . metadata_transmitted ( <nl> def testCustomCodeExceptionUnaryStream ( self ) : <nl> test_common . metadata_transmitted ( _SERVER_INITIAL_METADATA , <nl> received_initial_metadata ) ) <nl> self . assertTrue ( <nl> - test_common . metadata_transmitted ( _SERVER_TRAILING_METADATA , <nl> - call . trailing_metadata ( ) ) ) <nl> - self . assertIs ( _NON_OK_CODE , call . code ( ) ) <nl> - self . assertEqual ( _DETAILS , call . details ( ) ) <nl> + test_common . metadata_transmitted ( <nl> + _SERVER_TRAILING_METADATA , <nl> + response_iterator_call . trailing_metadata ( ) ) ) <nl> + self . assertIs ( _NON_OK_CODE , response_iterator_call . code ( ) ) <nl> + self . assertEqual ( _DETAILS , response_iterator_call . details ( ) ) <nl> <nl> def testCustomCodeExceptionStreamUnary ( self ) : <nl> self . _servicer . set_code ( _NON_OK_CODE ) <nl> def testCustomCodeExceptionStreamStream ( self ) : <nl> self . _servicer . set_details ( _DETAILS ) <nl> self . _servicer . set_exception ( ) <nl> <nl> - call = self . _stream_stream ( <nl> + response_iterator_call = self . _stream_stream ( <nl> iter ( [ object ( ) ] * test_constants . STREAM_LENGTH ) , <nl> metadata = _CLIENT_METADATA ) <nl> - received_initial_metadata = call . initial_metadata ( ) <nl> + received_initial_metadata = response_iterator_call . initial_metadata ( ) <nl> with self . assertRaises ( grpc . RpcError ) : <nl> - list ( call ) <nl> + list ( response_iterator_call ) <nl> <nl> self . assertTrue ( <nl> test_common . metadata_transmitted ( <nl> def testCustomCodeExceptionStreamStream ( self ) : <nl> test_common . metadata_transmitted ( _SERVER_INITIAL_METADATA , <nl> received_initial_metadata ) ) <nl> self . assertTrue ( <nl> - test_common . metadata_transmitted ( _SERVER_TRAILING_METADATA , <nl> - call . trailing_metadata ( ) ) ) <nl> - self . assertIs ( _NON_OK_CODE , call . code ( ) ) <nl> - self . assertEqual ( _DETAILS , call . details ( ) ) <nl> + test_common . metadata_transmitted ( <nl> + _SERVER_TRAILING_METADATA , <nl> + response_iterator_call . trailing_metadata ( ) ) ) <nl> + self . assertIs ( _NON_OK_CODE , response_iterator_call . code ( ) ) <nl> + self . assertEqual ( _DETAILS , response_iterator_call . details ( ) ) <nl> <nl> def testCustomCodeReturnNoneUnaryUnary ( self ) : <nl> self . _servicer . set_code ( _NON_OK_CODE ) <nl>
Refactor : Rename call to response_iterator_call
grpc/grpc
b0afa016cb29d1ca1b55300275aeb54c28e74a62
2017-12-10T14:32:13Z
mmm a / Marlin / language_de . h <nl> ppp b / Marlin / language_de . h <nl> <nl> # define WELCOME_MSG MACHINE_NAME " bereit " <nl> # define MSG_SD_INSERTED " SD - Karte erkannt " <nl> # define MSG_SD_REMOVED " SD - Karte entfernt " <nl> + # define MSG_LCD_ENDSTOPS " Endstopp " / / Max length 8 characters <nl> # define MSG_MAIN " Hauptmenü " <nl> # define MSG_AUTOSTART " Autostart " <nl> - # define MSG_DISABLE_STEPPERS " Motoren aus " / / M84 <nl> + # define MSG_DISABLE_STEPPERS " Motoren deaktivieren " / / M84 <nl> # define MSG_AUTO_HOME " Home " / / G28 <nl> + # define MSG_AUTO_HOME_X " Home X " <nl> + # define MSG_AUTO_HOME_Y " Home Y " <nl> + # define MSG_AUTO_HOME_Z " Home Z " <nl> # define MSG_LEVEL_BED_HOMING " Homing XYZ " <nl> # define MSG_LEVEL_BED_WAITING " Klick für Start " <nl> + # define MSG_LEVEL_BED_NEXT_POINT " Nächste Koordinate " <nl> # define MSG_LEVEL_BED_DONE " Fertig " <nl> # define MSG_LEVEL_BED_CANCEL " Abbruch " <nl> - # define MSG_SET_HOME_OFFSETS " Setze Homeoffsets " <nl> + # define MSG_SET_HOME_OFFSETS " Setze Homeversatz " <nl> # define MSG_HOME_OFFSETS_APPLIED " Offsets aktiv " <nl> # define MSG_SET_ORIGIN " Setze Nullpunkt " / / " G92 X0 Y0 Z0 " commented out in ultralcd . cpp <nl> # define MSG_PREHEAT_1 " Vorwärmen PLA " <nl> <nl> # define MSG_PID_I " PID I " <nl> # define MSG_PID_D " PID D " <nl> # define MSG_PID_C " PID C " <nl> + # define MSG_SELECT " Auswählen " <nl> # define MSG_ACC " A " <nl> # define MSG_VXY_JERK " V XY Jerk " <nl> # define MSG_VZ_JERK " V Z Jerk " <nl> <nl> # define MSG_ERR_MINTEMP LCD_STR_THERMOMETER " UNTERSCHRITTEN " <nl> # define MSG_ERR_MAXTEMP_BED " BETT " LCD_STR_THERMOMETER " ÜBERSCHRITTEN " <nl> # define MSG_ERR_MINTEMP_BED " BETT " LCD_STR_THERMOMETER " UNTERSCHRITTEN " <nl> - # define MSG_HEATING " Extr . Aufheizen . . . " <nl> + # define MSG_ERR_Z_HOMING " G28 Z Forbidden " <nl> + # define MSG_HALTED " DRUCKER STOPP " <nl> + # define MSG_PLEASE_RESET " Bitte Resetten " <nl> + # define MSG_SHORT_DAY " t " / / One character only <nl> + # define MSG_SHORT_HOUR " h " / / One character only <nl> + # define MSG_SHORT_MINUTE " m " / / One character only <nl> + # define MSG_HEATING " Extr . heizt . . . " <nl> # define MSG_HEATING_COMPLETE " Extr . aufgeheizt " <nl> - # define MSG_BED_HEATING " Bett aufheizen " <nl> + # define MSG_BED_HEATING " Bett heizt . . . " <nl> # define MSG_BED_DONE " Bett aufgeheizt " <nl> # define MSG_DELTA_CALIBRATE " Delta kalibrieren " <nl> # define MSG_DELTA_CALIBRATE_X " Kalibriere X " <nl>
Merge pull request from blubbfish / patch - 2
MarlinFirmware/Marlin
b08bd84f8e4f07d169a84e818c27fef8c3dbe31d
2016-09-16T19:39:20Z
mmm a / src / mongo / s / transaction_router_test . cpp <nl> ppp b / src / mongo / s / transaction_router_test . cpp <nl> TEST_F ( <nl> / / First response says readOnly : true . <nl> txnRouter . processParticipantResponse ( operationContext ( ) , shard1 , kOkReadOnlyTrueResponse ) ; <nl> <nl> - const auto participant = txnRouter . getParticipant ( shard1 ) ; <nl> + const auto oldParticipant = txnRouter . getParticipant ( shard1 ) ; <nl> <nl> - ASSERT ( TransactionRouter : : Participant : : ReadOnly : : kReadOnly = = participant - > readOnly ) ; <nl> + ASSERT ( TransactionRouter : : Participant : : ReadOnly : : kReadOnly = = oldParticipant - > readOnly ) ; <nl> <nl> / / Later response says readOnly : false . <nl> txnRouter . processParticipantResponse ( operationContext ( ) , shard1 , kOkReadOnlyFalseResponse ) ; <nl> <nl> - ASSERT ( TransactionRouter : : Participant : : ReadOnly : : kNotReadOnly = = participant - > readOnly ) ; <nl> + const auto updatedParticipant = txnRouter . getParticipant ( shard1 ) ; <nl> + <nl> + ASSERT ( TransactionRouter : : Participant : : ReadOnly : : kNotReadOnly = = updatedParticipant - > readOnly ) ; <nl> } <nl> <nl> TEST_F ( TransactionRouterTestWithDefaultSession , <nl>
SERVER - 42005 Don ' t refer to deleted memory in transaction router unit test
mongodb/mongo
861a2c38ad8bb6bbd7b5cc80b38af0db523d1d54
2019-07-01T19:07:13Z
mmm a / project / VS2010Express / XBMC . vcxproj <nl> ppp b / project / VS2010Express / XBMC . vcxproj <nl> <nl> < ExcludedFromBuild Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Debug Testsuite | Win32 ' " > true < / ExcludedFromBuild > <nl> < ExcludedFromBuild Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Release ( DirectX ) | Win32 ' " > true < / ExcludedFromBuild > <nl> < / ClCompile > <nl> + < ClCompile Include = " . . \ . . \ xbmc \ utils \ GroupUtils . cpp " / > <nl> < ClCompile Include = " . . \ . . \ xbmc \ utils \ HTMLTable . cpp " / > <nl> < ClCompile Include = " . . \ . . \ xbmc \ utils \ HTMLUtil . cpp " / > <nl> < ClCompile Include = " . . \ . . \ xbmc \ utils \ HttpHeader . cpp " / > <nl> <nl> < ExcludedFromBuild Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Debug Testsuite | Win32 ' " > true < / ExcludedFromBuild > <nl> < ExcludedFromBuild Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Release ( DirectX ) | Win32 ' " > true < / ExcludedFromBuild > <nl> < / ClInclude > <nl> + < ClInclude Include = " . . \ . . \ xbmc \ utils \ GroupUtils . h " / > <nl> < ClInclude Include = " . . \ . . \ xbmc \ utils \ HTMLTable . h " / > <nl> < ClInclude Include = " . . \ . . \ xbmc \ utils \ HTMLUtil . h " / > <nl> < ClInclude Include = " . . \ . . \ xbmc \ utils \ HttpHeader . h " / > <nl> mmm a / project / VS2010Express / XBMC . vcxproj . filters <nl> ppp b / project / VS2010Express / XBMC . vcxproj . filters <nl> <nl> < ClCompile Include = " . . \ . . \ xbmc \ filesystem \ HTTPFile . cpp " > <nl> < Filter > filesystem < / Filter > <nl> < / ClCompile > <nl> + < ClCompile Include = " . . \ . . \ xbmc \ utils \ GroupUtils . cpp " > <nl> + < Filter > utils < / Filter > <nl> + < / ClCompile > <nl> < / ItemGroup > <nl> < ItemGroup > <nl> < ClInclude Include = " . . \ . . \ xbmc \ win32 \ pch . h " > <nl> <nl> < ClInclude Include = " . . \ . . \ xbmc \ filesystem \ HTTPFile . h " > <nl> < Filter > filesystem < / Filter > <nl> < / ClInclude > <nl> + < ClInclude Include = " . . \ . . \ xbmc \ utils \ GroupUtils . h " > <nl> + < Filter > utils < / Filter > <nl> + < / ClInclude > <nl> < / ItemGroup > <nl> < ItemGroup > <nl> < ResourceCompile Include = " . . \ . . \ xbmc \ win32 \ XBMC_PC . rc " > <nl> mmm a / xbmc / filesystem / SmartPlaylistDirectory . cpp <nl> ppp b / xbmc / filesystem / SmartPlaylistDirectory . cpp <nl> namespace XFILE <nl> videoUrl . AddOption ( option , xsp ) ; <nl> <nl> CDatabase : : Filter dbfilter ; <nl> - success = db . GetSortedVideos ( mediaType , videoUrl . ToString ( ) , sorting , items , dbfilter , true ) ; <nl> + success = db . GetSortedVideos ( mediaType , videoUrl . ToString ( ) , sorting , items , dbfilter ) ; <nl> db . Close ( ) ; <nl> <nl> / / if we retrieve a list of episodes and we didn ' t receive <nl> mmm a / xbmc / utils / EdenVideoArtUpdater . cpp <nl> ppp b / xbmc / utils / EdenVideoArtUpdater . cpp <nl> void CEdenVideoArtUpdater : : Process ( ) <nl> handle - > SetTitle ( g_localizeStrings . Get ( 12349 ) ) ; <nl> <nl> / / movies <nl> - db . GetMoviesByWhere ( " videodb : / / 1 / 2 / " , CDatabase : : Filter ( ) , items , false ) ; <nl> + db . GetMoviesByWhere ( " videodb : / / 1 / 2 / " , CDatabase : : Filter ( ) , items ) ; <nl> for ( int i = 0 ; i < items . Size ( ) ; i + + ) <nl> { <nl> CFileItemPtr item = items [ i ] ; <nl> new file mode 100644 <nl> index 000000000000 . . a0b31db45e51 <nl> mmm / dev / null <nl> ppp b / xbmc / utils / GroupUtils . cpp <nl> <nl> + / * <nl> + * Copyright ( C ) 2012 Team XBMC <nl> + * http : / / www . xbmc . org <nl> + * <nl> + * This Program is free software ; you can redistribute it and / or modify <nl> + * it under the terms of the GNU General Public License as published by <nl> + * the Free Software Foundation ; either version 2 , or ( at your option ) <nl> + * any later version . <nl> + * <nl> + * This Program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU General Public License <nl> + * along with XBMC ; see the file COPYING . If not , see <nl> + * < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * / <nl> + <nl> + # include < map > <nl> + # include < set > <nl> + <nl> + # include " GroupUtils . h " <nl> + # include " FileItem . h " <nl> + # include " utils / StringUtils . h " <nl> + # include " utils / Variant . h " <nl> + # include " video / VideoInfoTag . h " <nl> + <nl> + using namespace std ; <nl> + <nl> + typedef map < int , set < CFileItemPtr > > SetMap ; <nl> + <nl> + bool GroupUtils : : Group ( GroupBy groupBy , const CFileItemList & items , CFileItemList & groupedItems , GroupAttribute groupAttributes / * = GroupAttributeNone * / ) <nl> + { <nl> + if ( items . Size ( ) < = 0 | | groupBy = = GroupByNone ) <nl> + return false ; <nl> + <nl> + SetMap setMap ; <nl> + for ( int index = 0 ; index < items . Size ( ) ; index + + ) <nl> + { <nl> + bool add = true ; <nl> + const CFileItemPtr item = items . Get ( index ) ; <nl> + <nl> + / / group by sets <nl> + if ( ( groupBy & GroupBySet ) & & <nl> + item - > HasVideoInfoTag ( ) & & item - > GetVideoInfoTag ( ) - > m_iSetId > 0 ) <nl> + { <nl> + add = false ; <nl> + setMap [ item - > GetVideoInfoTag ( ) - > m_iSetId ] . insert ( item ) ; <nl> + } <nl> + <nl> + if ( add ) <nl> + groupedItems . Add ( item ) ; <nl> + } <nl> + <nl> + if ( ( groupBy & GroupBySet ) & & setMap . size ( ) > 0 ) <nl> + { <nl> + for ( SetMap : : const_iterator set = setMap . begin ( ) ; set ! = setMap . end ( ) ; set + + ) <nl> + { <nl> + / / only one item in the set , so just re - add it <nl> + if ( set - > second . size ( ) = = 1 & & ( groupAttributes & GroupAttributeIgnoreSingleItems ) ) <nl> + { <nl> + groupedItems . Add ( * set - > second . begin ( ) ) ; <nl> + continue ; <nl> + } <nl> + <nl> + CFileItemPtr pItem ( new CFileItem ( ( * set - > second . begin ( ) ) - > GetVideoInfoTag ( ) - > m_strSet ) ) ; <nl> + pItem - > GetVideoInfoTag ( ) - > m_iDbId = set - > first ; <nl> + pItem - > GetVideoInfoTag ( ) - > m_type = " set " ; <nl> + pItem - > SetPath ( StringUtils : : Format ( " videodb : / / 1 / 7 / % ld / " , set - > first ) ) ; <nl> + pItem - > m_bIsFolder = true ; <nl> + <nl> + CVideoInfoTag * setInfo = pItem - > GetVideoInfoTag ( ) ; <nl> + setInfo - > m_strPath = pItem - > GetPath ( ) ; <nl> + setInfo - > m_strTitle = pItem - > GetLabel ( ) ; <nl> + <nl> + int ratings = 0 ; <nl> + int iWatched = 0 ; / / have all the movies been played at least once ? <nl> + for ( std : : set < CFileItemPtr > : : const_iterator movie = set - > second . begin ( ) ; movie ! = set - > second . end ( ) ; movie + + ) <nl> + { <nl> + CVideoInfoTag * movieInfo = ( * movie ) - > GetVideoInfoTag ( ) ; <nl> + / / handle rating <nl> + if ( movieInfo - > m_fRating > 0 . 0f ) <nl> + { <nl> + ratings + + ; <nl> + setInfo - > m_fRating + = movieInfo - > m_fRating ; <nl> + } <nl> + <nl> + / / handle year <nl> + if ( movieInfo - > m_iYear > setInfo - > m_iYear ) <nl> + setInfo - > m_iYear = movieInfo - > m_iYear ; <nl> + <nl> + / / handle lastplayed <nl> + if ( movieInfo - > m_lastPlayed . IsValid ( ) & & movieInfo - > m_lastPlayed > setInfo - > m_lastPlayed ) <nl> + setInfo - > m_lastPlayed = movieInfo - > m_lastPlayed ; <nl> + <nl> + / / handle dateadded <nl> + if ( movieInfo - > m_dateAdded . IsValid ( ) & & movieInfo - > m_dateAdded > setInfo - > m_dateAdded ) <nl> + setInfo - > m_dateAdded = movieInfo - > m_dateAdded ; <nl> + <nl> + / / handle playcount / watched <nl> + setInfo - > m_playCount + = movieInfo - > m_playCount ; <nl> + if ( movieInfo - > m_playCount > 0 ) <nl> + iWatched + + ; <nl> + } <nl> + <nl> + if ( ratings > 1 ) <nl> + pItem - > GetVideoInfoTag ( ) - > m_fRating / = ratings ; <nl> + <nl> + setInfo - > m_playCount = iWatched > = ( int ) set - > second . size ( ) ? ( setInfo - > m_playCount / set - > second . size ( ) ) : 0 ; <nl> + pItem - > SetProperty ( " total " , ( int ) set - > second . size ( ) ) ; <nl> + pItem - > SetProperty ( " watched " , iWatched ) ; <nl> + pItem - > SetProperty ( " unwatched " , ( int ) set - > second . size ( ) - iWatched ) ; <nl> + pItem - > SetOverlayImage ( CGUIListItem : : ICON_OVERLAY_UNWATCHED , setInfo - > m_playCount > 0 ) ; <nl> + <nl> + groupedItems . Add ( pItem ) ; <nl> + } <nl> + } <nl> + <nl> + return true ; <nl> + } <nl> + <nl> + bool GroupUtils : : GroupAndSort ( GroupBy groupBy , const CFileItemList & items , const SortDescription & sortDescription , CFileItemList & groupedItems , GroupAttribute groupAttributes / * = GroupAttributeNone * / ) <nl> + { <nl> + if ( ! Group ( groupBy , items , groupedItems , groupAttributes ) ) <nl> + return false ; <nl> + <nl> + groupedItems . Sort ( sortDescription ) ; <nl> + return true ; <nl> + } <nl> new file mode 100644 <nl> index 000000000000 . . 0e0945099841 <nl> mmm / dev / null <nl> ppp b / xbmc / utils / GroupUtils . h <nl> <nl> + # pragma once <nl> + / * <nl> + * Copyright ( C ) 2012 Team XBMC <nl> + * http : / / www . xbmc . org <nl> + * <nl> + * This Program is free software ; you can redistribute it and / or modify <nl> + * it under the terms of the GNU General Public License as published by <nl> + * the Free Software Foundation ; either version 2 , or ( at your option ) <nl> + * any later version . <nl> + * <nl> + * This Program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU General Public License <nl> + * along with XBMC ; see the file COPYING . If not , see <nl> + * < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * / <nl> + <nl> + # include " SortUtils . h " <nl> + <nl> + class CFileItemList ; <nl> + <nl> + / / can be used as a flag <nl> + typedef enum { <nl> + GroupByNone = 0x0 , <nl> + GroupBySet = 0x1 <nl> + } GroupBy ; <nl> + <nl> + typedef enum { <nl> + GroupAttributeNone = 0x0 , <nl> + GroupAttributeIgnoreSingleItems = 0x1 <nl> + } GroupAttribute ; <nl> + <nl> + class GroupUtils <nl> + { <nl> + public : <nl> + static bool Group ( GroupBy groupBy , const CFileItemList & items , CFileItemList & groupedItems , GroupAttribute groupAttributes = GroupAttributeNone ) ; <nl> + static bool GroupAndSort ( GroupBy groupBy , const CFileItemList & items , const SortDescription & sortDescription , CFileItemList & groupedItems , GroupAttribute groupAttributes = GroupAttributeNone ) ; <nl> + } ; <nl> mmm a / xbmc / utils / Makefile <nl> ppp b / xbmc / utils / Makefile <nl> SRCS = AlarmClock . cpp \ <nl> fstrcmp . c \ <nl> fft . cpp \ <nl> GLUtils . cpp \ <nl> + GroupUtils . cpp \ <nl> HTMLTable . cpp \ <nl> HTMLUtil . cpp \ <nl> HttpHeader . cpp \ <nl> mmm a / xbmc / video / VideoDatabase . cpp <nl> ppp b / xbmc / video / VideoDatabase . cpp <nl> <nl> # include " URL . h " <nl> # include " video / VideoDbUrl . h " <nl> # include " playlists / SmartPlayList . h " <nl> + # include " utils / GroupUtils . h " <nl> <nl> using namespace std ; <nl> using namespace dbiplus ; <nl> bool CVideoDatabase : : GetSetsByWhere ( const CStdString & strBaseDir , const Filter & <nl> if ( ! videoUrl . FromString ( strBaseDir ) ) <nl> return false ; <nl> <nl> - CStdString strSQL = " SELECT movieview . * , sets . strSet FROM movieview " <nl> - " JOIN sets ON movieview . idSet = sets . idSet " ; <nl> - if ( ! filter . join . empty ( ) ) <nl> - strSQL + = filter . join ; <nl> - if ( ! filter . where . empty ( ) ) <nl> - strSQL + = " WHERE ( " + filter . where + " ) " ; <nl> - strSQL + = " ORDER BY sets . idSet " ; <nl> - if ( ! filter . order . empty ( ) ) <nl> - strSQL + = " , " + filter . order ; <nl> - if ( ! filter . limit . empty ( ) ) <nl> - strSQL + = " LIMIT " + filter . limit ; <nl> + Filter setFilter = filter ; <nl> + setFilter . join + = " JOIN sets ON movieview . idSet = sets . idSet " ; <nl> + if ( ! setFilter . order . empty ( ) ) <nl> + setFilter . order + = " , " ; <nl> + setFilter . order + = " sets . idSet " ; <nl> <nl> - int iRowsFound = RunQuery ( strSQL ) ; <nl> - if ( iRowsFound < = 0 ) <nl> - return iRowsFound = = 0 ; <nl> - <nl> - map < int , CSetInfo > mapSets ; <nl> - map < int , CSetInfo > : : iterator it ; <nl> - while ( ! m_pDS - > eof ( ) ) <nl> - { <nl> - if ( g_settings . GetMasterProfile ( ) . getLockMode ( ) ! = LOCK_MODE_EVERYONE & & ! g_passwordManager . bMasterUser & & <nl> - ! g_passwordManager . IsDatabasePathUnlocked ( CStdString ( m_pDS - > fv ( " movieview . strPath " ) . get_asString ( ) ) , g_settings . m_videoSources ) ) <nl> - continue ; <nl> - <nl> - / / get the setid and check if we already have this set <nl> - int idSet = m_pDS - > fv ( " movieview . idSet " ) . get_asInt ( ) ; <nl> - if ( ( it = mapSets . find ( idSet ) ) = = mapSets . end ( ) ) <nl> - { <nl> - / / add the set to the list of sets <nl> - CSetInfo set ; <nl> - set . name = m_pDS - > fv ( " sets . strSet " ) . get_asString ( ) ; <nl> - <nl> - pair < map < int , CSetInfo > : : iterator , bool > insertIt = mapSets . insert ( make_pair ( idSet , set ) ) ; <nl> - it = insertIt . first ; <nl> - } <nl> - <nl> - / / add the movie ' s details to the set <nl> - it - > second . movies . push_back ( GetDetailsForMovie ( m_pDS ) ) ; <nl> - <nl> - m_pDS - > next ( ) ; <nl> - } <nl> - m_pDS - > close ( ) ; <nl> - <nl> - for ( it = mapSets . begin ( ) ; it ! = mapSets . end ( ) ; it + + ) <nl> - { <nl> - / / we only handle sets with at least 2 movies <nl> - if ( it - > second . movies . size ( ) < = 0 | | <nl> - ( ignoreSingleMovieSets & & it - > second . movies . size ( ) = = 1 ) ) <nl> - continue ; <nl> - <nl> - CFileItemPtr pItem ( new CFileItem ( it - > second . name ) ) ; <nl> - pItem - > GetVideoInfoTag ( ) - > m_iDbId = it - > first ; <nl> - pItem - > GetVideoInfoTag ( ) - > m_type = " set " ; <nl> - <nl> - CVideoDbUrl itemUrl = videoUrl ; <nl> - CStdString strDir ; strDir . Format ( " % ld / " , it - > first ) ; <nl> - itemUrl . AppendPath ( strDir ) ; <nl> - pItem - > SetPath ( itemUrl . ToString ( ) ) ; <nl> - <nl> - pItem - > m_bIsFolder = true ; <nl> - pItem - > GetVideoInfoTag ( ) - > m_strPath = pItem - > GetPath ( ) ; <nl> - pItem - > GetVideoInfoTag ( ) - > m_strTitle = pItem - > GetLabel ( ) ; <nl> + if ( ! GetMoviesByWhere ( strBaseDir , setFilter , items ) ) <nl> + return false ; <nl> <nl> - / / calculate the remaining metadata from the movies <nl> - int ratings = 0 ; <nl> - int iWatched = 0 ; / / have all the movies been played at least once ? <nl> - for ( VECMOVIES : : const_iterator movie = it - > second . movies . begin ( ) ; movie ! = it - > second . movies . end ( ) ; movie + + ) <nl> - { <nl> - / / handle rating <nl> - if ( movie - > m_fRating > 0 . 0f ) <nl> - { <nl> - ratings + + ; <nl> - pItem - > GetVideoInfoTag ( ) - > m_fRating + = movie - > m_fRating ; <nl> - } <nl> - <nl> - / / handle year <nl> - if ( movie - > m_iYear > pItem - > GetVideoInfoTag ( ) - > m_iYear ) <nl> - pItem - > GetVideoInfoTag ( ) - > m_iYear = movie - > m_iYear ; <nl> - <nl> - / / handle lastplayed <nl> - if ( movie - > m_lastPlayed . IsValid ( ) & & movie - > m_lastPlayed > pItem - > GetVideoInfoTag ( ) - > m_lastPlayed ) <nl> - pItem - > GetVideoInfoTag ( ) - > m_lastPlayed = movie - > m_lastPlayed ; <nl> - <nl> - / / handle dateadded <nl> - if ( movie - > m_dateAdded . IsValid ( ) & & movie - > m_dateAdded > pItem - > GetVideoInfoTag ( ) - > m_dateAdded ) <nl> - pItem - > GetVideoInfoTag ( ) - > m_dateAdded = movie - > m_dateAdded ; <nl> - <nl> - / / handle playcount / watched <nl> - pItem - > GetVideoInfoTag ( ) - > m_playCount + = movie - > m_playCount ; <nl> - if ( movie - > m_playCount > 0 ) <nl> - iWatched + + ; <nl> - } <nl> - <nl> - if ( ratings > 1 ) <nl> - pItem - > GetVideoInfoTag ( ) - > m_fRating / = ratings ; <nl> - <nl> - pItem - > GetVideoInfoTag ( ) - > m_playCount = iWatched > = ( int ) it - > second . movies . size ( ) ? ( pItem - > GetVideoInfoTag ( ) - > m_playCount / it - > second . movies . size ( ) ) : 0 ; <nl> - pItem - > SetProperty ( " total " , ( int ) it - > second . movies . size ( ) ) ; <nl> - pItem - > SetProperty ( " watched " , iWatched ) ; <nl> - pItem - > SetProperty ( " unwatched " , ( int ) it - > second . movies . size ( ) - iWatched ) ; <nl> - pItem - > SetOverlayImage ( CGUIListItem : : ICON_OVERLAY_UNWATCHED , pItem - > GetVideoInfoTag ( ) - > m_playCount > 0 ) ; <nl> + CFileItemList sets ; <nl> + if ( ! GroupUtils : : Group ( GroupBySet , items , sets ) ) <nl> + return false ; <nl> <nl> - if ( ! items . Contains ( pItem - > GetPath ( ) ) ) <nl> - items . Add ( pItem ) ; <nl> - } <nl> + items . ClearItems ( ) ; <nl> + items . Append ( sets ) ; <nl> <nl> return true ; <nl> } <nl> bool CVideoDatabase : : GetSeasonsNav ( const CStdString & strBaseDir , CFileItemList & <nl> return false ; <nl> } <nl> <nl> - bool CVideoDatabase : : GetSortedVideos ( MediaType mediaType , const CStdString & strBaseDir , const SortDescription & sortDescription , CFileItemList & items , const Filter & filter / * = Filter ( ) * / , bool fetchSets / * = false * / ) <nl> + bool CVideoDatabase : : GetSortedVideos ( MediaType mediaType , const CStdString & strBaseDir , const SortDescription & sortDescription , CFileItemList & items , const Filter & filter / * = Filter ( ) * / ) <nl> { <nl> if ( NULL = = m_pDB . get ( ) | | NULL = = m_pDS . get ( ) ) <nl> return false ; <nl> bool CVideoDatabase : : GetSortedVideos ( MediaType mediaType , const CStdString & strB <nl> switch ( mediaType ) <nl> { <nl> case MediaTypeMovie : <nl> - success = GetMoviesByWhere ( strBaseDir , filter , items , fetchSets , sorting ) ; <nl> + success = GetMoviesByWhere ( strBaseDir , filter , items , sorting ) ; <nl> break ; <nl> <nl> case MediaTypeTvShow : <nl> bool CVideoDatabase : : GetMoviesNav ( const CStdString & strBaseDir , CFileItemList & i <nl> videoUrl . AddOption ( " tagid " , idTag ) ; <nl> <nl> Filter filter ; <nl> - return GetMoviesByWhere ( videoUrl . ToString ( ) , filter , items , idSet = = - 1 , sortDescription ) ; <nl> + return GetMoviesByWhere ( videoUrl . ToString ( ) , filter , items , sortDescription ) ; <nl> } <nl> <nl> - bool CVideoDatabase : : GetMoviesByWhere ( const CStdString & strBaseDir , const Filter & filter , CFileItemList & items , bool fetchSets / * = false * / , const SortDescription & sortDescription / * = SortDescription ( ) * / ) <nl> + bool CVideoDatabase : : GetMoviesByWhere ( const CStdString & strBaseDir , const Filter & filter , CFileItemList & items , const SortDescription & sortDescription / * = SortDescription ( ) * / ) <nl> { <nl> try <nl> { <nl> bool CVideoDatabase : : GetMoviesByWhere ( const CStdString & strBaseDir , const Filter <nl> if ( ! videoUrl . FromString ( strBaseDir ) | | ! GetFilter ( videoUrl , extFilter , sorting ) ) <nl> return false ; <nl> <nl> - / / if we have a " setid " option we don ' t want to retrieve sets <nl> - CVariant setId ; <nl> - if ( fetchSets & & videoUrl . GetOption ( " setid " , setId ) & & <nl> - setId . isInteger ( ) & & setId . asInteger ( ) > 0 ) <nl> - fetchSets = false ; <nl> - <nl> int total = - 1 ; <nl> <nl> CStdString strSQL = " select % s from movieview " ; <nl> CStdString strSQLExtra ; <nl> - CFileItemList setItems ; <nl> - if ( fetchSets & & g_guiSettings . GetBool ( " videolibrary . groupmoviesets " ) ) <nl> - { <nl> - / / user wants sets ( and we ' re not fetching a particular set node ) , so grab all sets that match this where clause first <nl> - Filter setsFilter ; <nl> - if ( ! extFilter . where . empty ( ) | | ! extFilter . join . empty ( ) ) <nl> - { <nl> - setsFilter . where = " movieview . idMovie in ( select movieview . idMovie from movieview " ; <nl> - if ( ! extFilter . join . empty ( ) ) <nl> - setsFilter . where + = extFilter . join ; <nl> - if ( ! extFilter . where . empty ( ) ) <nl> - setsFilter . where + = " WHERE " + extFilter . where ; <nl> - setsFilter . where + = " ) " ; <nl> - } <nl> - <nl> - CVideoDbUrl setUrl ; <nl> - if ( ! setUrl . FromString ( " videodb : / / 1 / 7 / " ) ) <nl> - return false ; <nl> - <nl> - setUrl . AddOptions ( videoUrl . GetOptionsString ( ) ) ; <nl> - GetSetsByWhere ( setUrl . ToString ( ) , setsFilter , setItems , true ) ; <nl> - <nl> - CStdString movieSetsWhere ; <nl> - if ( setItems . Size ( ) > 0 ) <nl> - { <nl> - movieSetsWhere = " movieview . idMovie NOT IN ( SELECT idMovie FROM movieview WHERE movieview . idSet IN ( " ; <nl> - for ( int index = 0 ; index < setItems . Size ( ) ; index + + ) <nl> - movieSetsWhere . AppendFormat ( " % s % d " , index > 0 ? " , " : " " , setItems [ index ] - > GetVideoInfoTag ( ) - > m_iDbId ) ; <nl> - movieSetsWhere + = " ) ) " ; <nl> - <nl> - extFilter . AppendWhere ( movieSetsWhere ) ; <nl> - } <nl> - } <nl> - <nl> if ( ! CDatabase : : BuildSQL ( strSQLExtra , extFilter , strSQLExtra ) ) <nl> return false ; <nl> <nl> bool CVideoDatabase : : GetMoviesByWhere ( const CStdString & strBaseDir , const Filter <nl> strSQL = PrepareSQL ( strSQL , ! extFilter . fields . empty ( ) ? extFilter . fields . c_str ( ) : " * " ) + strSQLExtra ; <nl> <nl> int iRowsFound = RunQuery ( strSQL ) ; <nl> - if ( iRowsFound < = 0 & & setItems . Size ( ) = = 0 ) <nl> + if ( iRowsFound < = 0 ) <nl> return iRowsFound = = 0 ; <nl> <nl> - iRowsFound + = setItems . Size ( ) ; <nl> / / store the total value of items as a property <nl> if ( total < iRowsFound ) <nl> total = iRowsFound ; <nl> bool CVideoDatabase : : GetMoviesByWhere ( const CStdString & strBaseDir , const Filter <nl> DatabaseResults results ; <nl> results . reserve ( iRowsFound ) ; <nl> <nl> - / / Add the previously retrieved sets <nl> - for ( int index = 0 ; index < setItems . Size ( ) ; index + + ) <nl> - { <nl> - DatabaseResult result ; <nl> - setItems [ index ] - > ToSortable ( result ) ; <nl> - result [ FieldRow ] = ( unsigned int ) index ; <nl> - results . push_back ( result ) ; <nl> - } <nl> - <nl> - if ( ! SortUtils : : SortFromDataset ( sorting , MediaTypeMovie , m_pDS , results ) ) <nl> + if ( ! SortUtils : : SortFromDataset ( sortDescription , MediaTypeMovie , m_pDS , results ) ) <nl> return false ; <nl> <nl> / / get data from returned rows <nl> bool CVideoDatabase : : GetMoviesByWhere ( const CStdString & strBaseDir , const Filter <nl> for ( DatabaseResults : : const_iterator it = results . begin ( ) ; it ! = results . end ( ) ; it + + ) <nl> { <nl> unsigned int targetRow = ( unsigned int ) it - > at ( FieldRow ) . asInteger ( ) ; <nl> - if ( targetRow < ( unsigned int ) setItems . Size ( ) ) <nl> - { <nl> - items . Add ( setItems [ targetRow ] ) ; <nl> - continue ; <nl> - } <nl> - targetRow - = setItems . Size ( ) ; <nl> - <nl> const dbiplus : : sql_record * const record = data . at ( targetRow ) ; <nl> <nl> CVideoInfoTag movie = GetDetailsForMovie ( record ) ; <nl> mmm a / xbmc / video / VideoDatabase . h <nl> ppp b / xbmc / video / VideoDatabase . h <nl> class CVideoDatabase : public CDatabase <nl> bool ImportArtFromXML ( const TiXmlNode * node , std : : map < std : : string , std : : string > & artwork ) ; <nl> <nl> / / smart playlists and main retrieval work in these functions <nl> - bool GetMoviesByWhere ( const CStdString & strBaseDir , const Filter & filter , CFileItemList & items , bool fetchSets = false , const SortDescription & sortDescription = SortDescription ( ) ) ; <nl> + bool GetMoviesByWhere ( const CStdString & strBaseDir , const Filter & filter , CFileItemList & items , const SortDescription & sortDescription = SortDescription ( ) ) ; <nl> bool GetSetsByWhere ( const CStdString & strBaseDir , const Filter & filter , CFileItemList & items , bool ignoreSingleMovieSets = false ) ; <nl> bool GetTvShowsByWhere ( const CStdString & strBaseDir , const Filter & filter , CFileItemList & items , const SortDescription & sortDescription = SortDescription ( ) ) ; <nl> bool GetEpisodesByWhere ( const CStdString & strBaseDir , const Filter & filter , CFileItemList & items , bool appendFullShowPath = true , const SortDescription & sortDescription = SortDescription ( ) ) ; <nl> bool GetMusicVideosByWhere ( const CStdString & baseDir , const Filter & filter , CFileItemList & items , bool checkLocks = true , const SortDescription & sortDescription = SortDescription ( ) ) ; <nl> <nl> / / retrieve sorted and limited items <nl> - bool GetSortedVideos ( MediaType mediaType , const CStdString & strBaseDir , const SortDescription & sortDescription , CFileItemList & items , const Filter & filter = Filter ( ) , bool fetchSets = false ) ; <nl> + bool GetSortedVideos ( MediaType mediaType , const CStdString & strBaseDir , const SortDescription & sortDescription , CFileItemList & items , const Filter & filter = Filter ( ) ) ; <nl> <nl> / / partymode <nl> int GetMusicVideoCount ( const CStdString & strWhere ) ; <nl> mmm a / xbmc / video / windows / GUIWindowVideoBase . cpp <nl> ppp b / xbmc / video / windows / GUIWindowVideoBase . cpp <nl> <nl> # include " URL . h " <nl> # include " utils / EdenVideoArtUpdater . h " <nl> # include " GUIInfoManager . h " <nl> + # include " utils / GroupUtils . h " <nl> <nl> using namespace std ; <nl> using namespace XFILE ; <nl> bool CGUIWindowVideoBase : : Update ( const CStdString & strDirectory , bool updateFilt <nl> if ( ! CGUIMediaWindow : : Update ( strDirectory , updateFilterPath ) ) <nl> return false ; <nl> <nl> - m_thumbLoader . Load ( * m_unfilteredItems ) ; <nl> + / / might already be running from GetGroupedItems <nl> + if ( ! m_thumbLoader . IsLoading ( ) ) <nl> + m_thumbLoader . Load ( * m_vecItems ) ; <nl> <nl> return true ; <nl> } <nl> bool CGUIWindowVideoBase : : StackingAvailable ( const CFileItemList & items ) const <nl> url . GetProtocol ( ) = = " playlistvideo " ) ; <nl> } <nl> <nl> - void CGUIWindowVideoBase : : OnPrepareFileItems ( CFileItemList & items ) <nl> + void CGUIWindowVideoBase : : GetGroupedItems ( CFileItemList & items ) <nl> { <nl> + CGUIMediaWindow : : GetGroupedItems ( items ) ; <nl> + <nl> + CQueryParams params ; <nl> + CVideoDatabaseDirectory dir ; <nl> + dir . GetQueryParams ( items . GetPath ( ) , params ) ; <nl> + if ( items . GetContent ( ) . Equals ( " movies " ) & & params . GetSetId ( ) < = 0 & & <nl> + CVideoDatabaseDirectory : : GetDirectoryChildType ( items . GetPath ( ) ) ! = NODE_TYPE_RECENTLY_ADDED_MOVIES & & <nl> + g_guiSettings . GetBool ( " videolibrary . groupmoviesets " ) ) <nl> + { <nl> + CFileItemList groupedItems ; <nl> + if ( GroupUtils : : Group ( GroupBySet , items , groupedItems , GroupAttributeIgnoreSingleItems ) ) <nl> + { <nl> + items . ClearItems ( ) ; <nl> + items . Append ( groupedItems ) ; <nl> + } <nl> + } <nl> + <nl> + / / reload thumbs after filtering and grouping <nl> + if ( m_thumbLoader . IsLoading ( ) ) <nl> + m_thumbLoader . StopThread ( ) ; <nl> + <nl> + m_thumbLoader . Load ( items ) ; <nl> } <nl> <nl> bool CGUIWindowVideoBase : : CheckFilterAdvanced ( CFileItemList & items ) const <nl> mmm a / xbmc / video / windows / GUIWindowVideoBase . h <nl> ppp b / xbmc / video / windows / GUIWindowVideoBase . h <nl> class CGUIWindowVideoBase : public CGUIMediaWindow , public IBackgroundLoaderObse <nl> virtual bool Update ( const CStdString & strDirectory , bool updateFilterPath = true ) ; <nl> virtual bool GetDirectory ( const CStdString & strDirectory , CFileItemList & items ) ; <nl> virtual void OnItemLoaded ( CFileItem * pItem ) { } ; <nl> - virtual void OnPrepareFileItems ( CFileItemList & items ) ; <nl> + virtual void GetGroupedItems ( CFileItemList & items ) ; <nl> <nl> virtual bool CheckFilterAdvanced ( CFileItemList & items ) const ; <nl> virtual bool CanContainFilter ( const CStdString & strDirectory ) const ; <nl> mmm a / xbmc / video / windows / GUIWindowVideoNav . cpp <nl> ppp b / xbmc / video / windows / GUIWindowVideoNav . cpp <nl> void CGUIWindowVideoNav : : UpdateButtons ( ) <nl> <nl> bool CGUIWindowVideoNav : : GetFilteredItems ( const CStdString & filter , CFileItemList & items ) <nl> { <nl> - bool listchanged = false ; <nl> - bool updateItems = false ; <nl> - if ( ! m_canFilterAdvanced ) <nl> - listchanged = CGUIMediaWindow : : GetFilteredItems ( filter , items ) ; <nl> - else <nl> - listchanged = CGUIMediaWindow : : GetAdvanceFilteredItems ( items , updateItems ) ; <nl> - <nl> + bool listchanged = CGUIMediaWindow : : GetFilteredItems ( filter , items ) ; <nl> listchanged | = ApplyWatchedFilter ( items ) ; <nl> <nl> - / / there are new items so we need to run the thumbloader <nl> - if ( updateItems ) <nl> - { <nl> - if ( m_thumbLoader . IsLoading ( ) ) <nl> - m_thumbLoader . StopThread ( ) ; <nl> - <nl> - m_thumbLoader . Load ( items ) ; <nl> - } <nl> - <nl> return listchanged ; <nl> } <nl> <nl> mmm a / xbmc / windows / GUIMediaWindow . cpp <nl> ppp b / xbmc / windows / GUIMediaWindow . cpp <nl> void CGUIMediaWindow : : SortItems ( CFileItemList & items ) <nl> <nl> if ( ! sorted ) <nl> items . Sort ( sortMethod , guiState - > GetDisplaySortOrder ( ) ) ; <nl> - <nl> - / / Should these items be saved to the hdd <nl> - if ( items . CacheToDiscAlways ( ) & & ! IsFiltered ( ) ) <nl> - items . Save ( GetID ( ) ) ; <nl> } <nl> } <nl> <nl> void CGUIMediaWindow : : FormatAndSort ( CFileItemList & items ) <nl> LABEL_MASKS labelMasks ; <nl> viewState - > GetSortMethodLabelMasks ( labelMasks ) ; <nl> FormatItemLabels ( items , labelMasks ) ; <nl> + <nl> + items . Sort ( viewState - > GetSortMethod ( ) , viewState - > GetDisplaySortOrder ( ) ) ; <nl> } <nl> - SortItems ( items ) ; <nl> } <nl> <nl> / * ! <nl> bool CGUIMediaWindow : : Update ( const CStdString & strDirectory , bool updateFilterPa <nl> <nl> m_guiState . reset ( CGUIViewState : : GetViewState ( GetID ( ) , * m_vecItems ) ) ; <nl> <nl> - FormatAndSort ( * m_vecItems ) ; <nl> + / / remember the original ( untouched ) list of items ( for filtering etc ) <nl> + m_unfilteredItems - > SetPath ( m_vecItems - > GetPath ( ) ) ; / / use the original path - it ' ll likely be relied on for other things later . <nl> + m_unfilteredItems - > Append ( * m_vecItems ) ; <nl> + <nl> + / / Cache the list of items if possible <nl> + OnCacheFileItems ( * m_vecItems ) ; <nl> + <nl> + / / Filter and group the items if necessary <nl> + CStdString titleFilter = GetProperty ( " filter " ) . asString ( ) ; <nl> + OnFilterItems ( titleFilter ) ; <nl> <nl> / / Ask the devived class if it wants to do custom list operations , <nl> / / eg . changing the label <nl> void CGUIMediaWindow : : OnPrepareFileItems ( CFileItemList & items ) <nl> <nl> } <nl> <nl> + / / \ brief This function will be called by Update ( ) before <nl> + / / any additional formatting , filtering or sorting is applied . <nl> + / / Override this function to define a custom caching behaviour . <nl> + void CGUIMediaWindow : : OnCacheFileItems ( CFileItemList & items ) <nl> + { <nl> + / / Should these items be saved to the hdd <nl> + if ( items . CacheToDiscAlways ( ) & & ! IsFiltered ( ) ) <nl> + items . Save ( GetID ( ) ) ; <nl> + } <nl> + <nl> / / \ brief This function will be called by Update ( ) after the <nl> / / labels of the fileitems are formatted . Override this function <nl> / / to modify the fileitems . Eg . to modify the item label <nl> void CGUIMediaWindow : : OnFinalizeFileItems ( CFileItemList & items ) <nl> { <nl> - m_unfilteredItems - > SetPath ( items . GetPath ( ) ) ; / / use the original path - it ' ll likely be relied on for other things later . <nl> - m_unfilteredItems - > Append ( items ) ; <nl> - <nl> - CStdString filter ( GetProperty ( " filter " ) . asString ( ) ) ; <nl> <nl> - OnFilterItems ( filter ) ; <nl> } <nl> <nl> / / \ brief With this function you can react on a users click in the list / thumb panel . <nl> void CGUIMediaWindow : : OnFilterItems ( const CStdString & filter ) <nl> <nl> CFileItemList items ( m_vecItems - > GetPath ( ) ) ; / / use the original path - it ' ll likely be relied on for other things later . <nl> items . Append ( * m_unfilteredItems ) ; <nl> - if ( GetFilteredItems ( filter , items ) | | m_vecItems - > Size ( ) ! = items . Size ( ) ) <nl> + bool filtered = GetFilteredItems ( filter , items ) ; <nl> + <nl> + m_vecItems - > ClearItems ( ) ; <nl> + / / we need to clear the sort state and re - sort the items <nl> + m_vecItems - > ClearSortState ( ) ; <nl> + m_vecItems - > Append ( items ) ; <nl> + <nl> + / / if the filter has changed , get the new filter path <nl> + if ( filtered & & m_canFilterAdvanced ) <nl> { <nl> - m_vecItems - > ClearItems ( ) ; <nl> - m_vecItems - > Append ( items ) ; <nl> + if ( items . HasProperty ( PROPERTY_PATH_DB ) ) <nl> + m_strFilterPath = items . GetProperty ( PROPERTY_PATH_DB ) . asString ( ) ; <nl> + else <nl> + m_strFilterPath = items . GetPath ( ) ; <nl> + } <nl> + <nl> + GetGroupedItems ( * m_vecItems ) ; <nl> + FormatAndSort ( * m_vecItems ) ; <nl> <nl> - / / we need to clear the sort state and re - sort the items <nl> - m_vecItems - > ClearSortState ( ) ; <nl> - SortItems ( * m_vecItems ) ; <nl> + / / get the " filter " option <nl> + CStdString filterOption ; <nl> + CURL filterUrl ( m_strFilterPath ) ; <nl> + if ( filterUrl . HasOption ( " filter " ) ) <nl> + filterOption = filterUrl . GetOption ( " filter " ) ; <nl> + <nl> + / / apply the " filter " option to any folder item so that <nl> + / / the filter can be passed down to the sub - directory <nl> + for ( int index = 0 ; index < m_vecItems - > Size ( ) ; index + + ) <nl> + { <nl> + CFileItemPtr pItem = m_vecItems - > Get ( index ) ; <nl> + / / if the item is a folder we need to copy the path of <nl> + / / the filtered item to be able to keep the applied filters <nl> + if ( pItem - > m_bIsFolder ) <nl> + { <nl> + CURL itemUrl ( pItem - > GetPath ( ) ) ; <nl> + itemUrl . SetOption ( " filter " , filterOption ) ; <nl> + pItem - > SetPath ( itemUrl . Get ( ) ) ; <nl> + } <nl> + } <nl> <nl> + if ( filtered ) <nl> + { <nl> if ( ! m_canFilterAdvanced ) <nl> SetProperty ( " filter " , filter ) ; <nl> else <nl> { <nl> - if ( items . HasProperty ( PROPERTY_PATH_DB ) ) <nl> - m_strFilterPath = items . GetProperty ( PROPERTY_PATH_DB ) . asString ( ) ; <nl> - else <nl> - m_strFilterPath = items . GetPath ( ) ; <nl> - <nl> / / to be able to select the same item as before we need to adjust <nl> / / the path of the item i . e . add or remove the " filter = " URL option <nl> / / but that ' s only necessary for folder items <nl> void CGUIMediaWindow : : OnFilterItems ( const CStdString & filter ) <nl> bool CGUIMediaWindow : : GetFilteredItems ( const CStdString & filter , CFileItemList & items ) <nl> { <nl> if ( m_canFilterAdvanced ) <nl> - { <nl> - bool hasNewItems ; <nl> - return GetAdvanceFilteredItems ( items , hasNewItems ) ; <nl> - } <nl> + return GetAdvanceFilteredItems ( items ) ; <nl> <nl> CStdString trimmedFilter ( filter ) ; <nl> trimmedFilter . TrimLeft ( ) . ToLower ( ) ; <nl> bool CGUIMediaWindow : : GetFilteredItems ( const CStdString & filter , CFileItemList & <nl> return items . GetObjectCount ( ) > 0 ; <nl> } <nl> <nl> - bool CGUIMediaWindow : : GetAdvanceFilteredItems ( CFileItemList & items , bool & hasNewItems ) <nl> + bool CGUIMediaWindow : : GetAdvanceFilteredItems ( CFileItemList & items ) <nl> { <nl> - hasNewItems = false ; <nl> - <nl> / / don ' t run the advanced filter if the filter is empty <nl> / / and there hasn ' t been a filter applied before which <nl> / / would have to be removed <nl> bool CGUIMediaWindow : : GetAdvanceFilteredItems ( CFileItemList & items , bool & hasNew <nl> map < CStdString , CFileItemPtr > : : iterator itItem = lookup . find ( path ) ; <nl> if ( itItem ! = lookup . end ( ) ) <nl> { <nl> - / / if the item is a folder we need to copy the path of <nl> - / / the filtered item to be able to keep the applied filters <nl> - if ( item - > m_bIsFolder ) <nl> - item - > SetPath ( itItem - > second - > GetPath ( ) ) ; <nl> - <nl> / / add the item to the list of filtered items <nl> filteredItems . Add ( item ) ; <nl> <nl> bool CGUIMediaWindow : : GetAdvanceFilteredItems ( CFileItemList & items , bool & hasNew <nl> } <nl> <nl> if ( resultItems . Size ( ) > 0 ) <nl> - { <nl> - filteredItems . Append ( resultItems ) ; <nl> - hasNewItems = true ; <nl> - } <nl> + CLog : : Log ( LOGWARNING , " CGUIMediaWindow : : GetAdvanceFilteredItems ( ) : % d unknown items " , resultItems . Size ( ) ) ; <nl> <nl> items . ClearItems ( ) ; <nl> items . Append ( filteredItems ) ; <nl> mmm a / xbmc / windows / GUIMediaWindow . h <nl> ppp b / xbmc / windows / GUIMediaWindow . h <nl> class CGUIMediaWindow : public CGUIWindow <nl> virtual bool Refresh ( bool clearCache = false ) ; <nl> virtual void FormatAndSort ( CFileItemList & items ) ; <nl> virtual void OnPrepareFileItems ( CFileItemList & items ) ; <nl> + virtual void OnCacheFileItems ( CFileItemList & items ) ; <nl> virtual void OnFinalizeFileItems ( CFileItemList & items ) ; <nl> + virtual void GetGroupedItems ( CFileItemList & items ) { } <nl> <nl> void ClearFileItems ( ) ; <nl> virtual void SortItems ( CFileItemList & items ) ; <nl> class CGUIMediaWindow : public CGUIWindow <nl> which were not present in the original list <nl> \ sa GetFilteredItems <nl> * / <nl> - virtual bool GetAdvanceFilteredItems ( CFileItemList & items , bool & hasNewItems ) ; <nl> + virtual bool GetAdvanceFilteredItems ( CFileItemList & items ) ; <nl> <nl> / / check for a disc or connection <nl> virtual bool HaveDiscOrConnection ( const CStdString & strPath , int iDriveType ) ; <nl>
Merge pull request from Montellese / grouping
xbmc/xbmc
fc0d58b64dc753121c50598b8312bd8ca611b71e
2012-11-12T16:14:32Z
mmm a / aten / src / THCUNN / SpatialDilatedMaxPooling . cu <nl> ppp b / aten / src / THCUNN / SpatialDilatedMaxPooling . cu <nl> __global__ void MaxPoolForward ( const int nthreads , const Dtype * bottom_data , <nl> } <nl> } <nl> <nl> + const int BACKWARD_THREADS = 256 ; <nl> <nl> template < typename Dtype , typename AccType > <nl> + __launch_bounds__ ( BACKWARD_THREADS , 2048 / BACKWARD_THREADS ) <nl> __global__ void MaxPoolBackward ( const int nthreads , const Dtype * top_diff , <nl> const int64_t * top_mask , const int num , const int channels , <nl> const int height , const int width , const int pooled_height , <nl> __global__ void MaxPoolBackward ( const int nthreads , const Dtype * top_diff , <nl> const int stride_h , const int stride_w , const int pad_h , const int pad_w , <nl> const int dilation_h , const int dilation_w , <nl> Dtype * bottom_diff ) { <nl> - CUDA_KERNEL_LOOP ( index , nthreads ) { <nl> - / / find out the local index <nl> - / / find out the local offset <nl> - int w = index % width ; <nl> - int h = ( index / width ) % height ; <nl> - int c = ( index / width / height ) % channels ; <nl> - int n = index / width / height / channels ; <nl> - int phstart = <nl> - ( h + pad_h < ( ( kernel_h - 1 ) * dilation_h + 1 ) ) ? 0 : ( h + pad_h - ( ( kernel_h - 1 ) * dilation_h + 1 ) ) / stride_h + 1 ; <nl> - int phend = min ( ( h + pad_h ) / stride_h + 1 , pooled_height ) ; <nl> - int pwstart = <nl> + CUDA_KERNEL_LOOP ( index , height * width ) { <nl> + int h = index / width ; <nl> + int w = index - h * width ; <nl> + / / get some templating performance benefits without actually templating <nl> + int phstart , phend , pwstart , pwend ; <nl> + if ( stride_h = = 1 ) { <nl> + phstart = <nl> + ( h + pad_h < ( ( kernel_h - 1 ) * dilation_h + 1 ) ) ? 0 : ( h + pad_h - ( ( kernel_h - 1 ) * dilation_h + 1 ) ) + 1 ; <nl> + phend = min ( ( h + pad_h ) + 1 , pooled_height ) ; <nl> + } else if ( stride_h = = 2 ) { <nl> + phstart = <nl> + ( h + pad_h < ( ( kernel_h - 1 ) * dilation_h + 1 ) ) ? 0 : ( h + pad_h - ( ( kernel_h - 1 ) * dilation_h + 1 ) ) / 2 + 1 ; <nl> + phend = min ( ( h + pad_h ) / 2 + 1 , pooled_height ) ; <nl> + } else { <nl> + phstart = <nl> + ( h + pad_h < ( ( kernel_h - 1 ) * dilation_h + 1 ) ) ? 0 : ( h + pad_h - ( ( kernel_h - 1 ) * dilation_h + 1 ) ) / stride_h + 1 ; <nl> + phend = min ( ( h + pad_h ) / stride_h + 1 , pooled_height ) ; <nl> + } <nl> + if ( stride_w = = 1 ) { <nl> + pwstart = <nl> + ( w + pad_w < ( ( kernel_w - 1 ) * dilation_w + 1 ) ) ? 0 : ( w + pad_w - ( ( kernel_w - 1 ) * dilation_w + 1 ) ) + 1 ; <nl> + pwend = min ( ( w + pad_w ) + 1 , pooled_width ) ; <nl> + } else if ( stride_w = = 2 ) { <nl> + pwstart = <nl> + ( w + pad_w < ( ( kernel_w - 1 ) * dilation_w + 1 ) ) ? 0 : ( w + pad_w - ( ( kernel_w - 1 ) * dilation_w + 1 ) ) / 2 + 1 ; <nl> + pwend = min ( ( w + pad_w ) / 2 + 1 , pooled_width ) ; <nl> + } else { <nl> + pwstart = <nl> ( w + pad_w < ( ( kernel_w - 1 ) * dilation_w + 1 ) ) ? 0 : ( w + pad_w - ( ( kernel_w - 1 ) * dilation_w + 1 ) ) / stride_w + 1 ; <nl> - int pwend = min ( ( w + pad_w ) / stride_w + 1 , pooled_width ) ; <nl> + pwend = min ( ( w + pad_w ) / stride_w + 1 , pooled_width ) ; <nl> + } <nl> + for ( int n = blockIdx . y ; n < num ; n + = gridDim . y ) <nl> + for ( int c = blockIdx . z ; c < channels ; c + = gridDim . z ) { <nl> <nl> - AccType gradient = AccType ( 0 ) ; <nl> - int offset = ( n * channels + c ) * pooled_height * pooled_width ; <nl> - top_diff + = offset ; <nl> - top_mask + = offset ; <nl> - for ( int ph = phstart ; ph < phend ; + + ph ) { <nl> - for ( int pw = pwstart ; pw < pwend ; + + pw ) { <nl> - if ( top_mask [ ph * pooled_width + pw ] - TH_INDEX_BASE = = h * width + w ) { <nl> - gradient + = ScalarConvert < Dtype , AccType > : : to ( top_diff [ ph * pooled_width + pw ] ) ; <nl> + AccType gradient = AccType ( 0 ) ; <nl> + int offset = ( n * channels + c ) * pooled_height * pooled_width ; <nl> + top_diff + = offset ; <nl> + top_mask + = offset ; <nl> + / / get some templating performance benefits without actually templating <nl> + if ( ( phstart + 1 ! = phend ) | | ( pwstart + 1 ! = pwend ) ) { <nl> + for ( int ph = phstart ; ph < phend ; + + ph ) { <nl> + for ( int pw = pwstart ; pw < pwend ; + + pw ) { <nl> + if ( top_mask [ ph * pooled_width + pw ] - TH_INDEX_BASE = = h * width + w ) { <nl> + gradient + = ScalarConvert < Dtype , AccType > : : to ( top_diff [ ph * pooled_width + pw ] ) ; <nl> + } <nl> + } <nl> } <nl> + } else { <nl> + if ( top_mask [ phstart * pooled_width + pwstart ] - TH_INDEX_BASE = = h * width + w ) { <nl> + gradient + = ScalarConvert < Dtype , AccType > : : to ( top_diff [ phstart * pooled_width + pwstart ] ) ; <nl> + } <nl> + } <nl> + bottom_diff [ ( n * channels + c ) * height * width + index ] = ScalarConvert < AccType , Dtype > : : to ( gradient ) ; <nl> } <nl> - } <nl> - bottom_diff [ index ] = ScalarConvert < AccType , Dtype > : : to ( gradient ) ; <nl> } <nl> } <nl> <nl> mmm a / aten / src / THCUNN / generic / SpatialDilatedMaxPooling . cu <nl> ppp b / aten / src / THCUNN / generic / SpatialDilatedMaxPooling . cu <nl> void THNN_ ( SpatialDilatedMaxPooling_updateGradInput ) ( <nl> THCTensor_ ( resizeAs ) ( state , gradInput , input ) ; <nl> <nl> int count = THCTensor_ ( nElement ) ( state , input ) ; <nl> - <nl> - MaxPoolBackward < real , accreal > < < < GET_BLOCKS ( count ) , CUDA_NUM_THREADS , 0 , THCState_getCurrentStream ( state ) > > > <nl> + dim3 grid ; <nl> + int imgcount = nInputCols * nInputRows ; <nl> + const int blocks = ( imgcount + BACKWARD_THREADS - 1 ) / BACKWARD_THREADS ; <nl> + grid . x = blocks ; <nl> + grid . y = batchSize ; <nl> + grid . z = nInputPlane ; <nl> + uint64_t maxGridY = THCState_getCurrentDeviceProperties ( state ) - > maxGridSize [ 1 ] ; <nl> + uint64_t maxGridZ = THCState_getCurrentDeviceProperties ( state ) - > maxGridSize [ 2 ] ; <nl> + if ( maxGridY < grid . y ) grid . y = maxGridY ; <nl> + if ( maxGridZ < grid . z ) grid . z = maxGridZ ; <nl> + MaxPoolBackward < real , accreal > < < < grid , BACKWARD_THREADS , 0 , THCState_getCurrentStream ( state ) > > > <nl> ( count , <nl> THCTensor_ ( data ) ( state , gradOutput ) , <nl> THCIndexTensor_ ( data ) ( state , indices ) , <nl>
improve performance of maxpooling backwards ( )
pytorch/pytorch
0257f5d19f0585f9a82bc06e0c4987e2136332c9
2017-12-18T06:55:38Z
mmm a / tensorflow / compiler / xla / service / gpu / ir_emitter_unnested . cc <nl> ppp b / tensorflow / compiler / xla / service / gpu / ir_emitter_unnested . cc <nl> std : : unique_ptr < Thunk > IrEmitterUnnested : : BuildWhileThunk ( <nl> HloComputation * condition = hlo - > while_condition ( ) ; <nl> IrEmitterUnnested ir_emitter_condition ( hlo_module_config_ , condition , <nl> ir_emitter_context_ ) ; <nl> - TF_CHECK_OK ( condition - > root_instruction ( ) - > Accept ( & ir_emitter_condition ) ) ; <nl> + TF_CHECK_OK ( condition - > Accept ( & ir_emitter_condition ) ) ; <nl> <nl> / / Generate thunk sequence for while ' body ' . <nl> HloComputation * body = hlo - > while_body ( ) ; <nl> IrEmitterUnnested ir_emitter_body ( hlo_module_config_ , body , <nl> ir_emitter_context_ ) ; <nl> - TF_CHECK_OK ( body - > root_instruction ( ) - > Accept ( & ir_emitter_body ) ) ; <nl> + TF_CHECK_OK ( body - > Accept ( & ir_emitter_body ) ) ; <nl> <nl> return MakeUnique < WhileThunk > ( <nl> GetAllocationSlice ( * condition - > root_instruction ( ) ) , / / cond result <nl> std : : unique_ptr < Thunk > IrEmitterUnnested : : BuildForThunk ( <nl> HloComputation * body = hlo - > while_body ( ) ; <nl> IrEmitterUnnested ir_emitter_body ( hlo_module_config_ , body , <nl> ir_emitter_context_ ) ; <nl> - TF_CHECK_OK ( body - > root_instruction ( ) - > Accept ( & ir_emitter_body ) ) ; <nl> + TF_CHECK_OK ( body - > Accept ( & ir_emitter_body ) ) ; <nl> <nl> return MakeUnique < ForThunk > ( loop_limit , <nl> ir_emitter_body . ConsumeThunkSequence ( ) , hlo ) ; <nl> std : : unique_ptr < Thunk > IrEmitterUnnested : : BuildConditionalThunk ( <nl> HloComputation * true_computation = hlo - > true_computation ( ) ; <nl> IrEmitterUnnested ir_emitter_true ( hlo_module_config_ , true_computation , <nl> ir_emitter_context_ ) ; <nl> - TF_CHECK_OK ( true_computation - > root_instruction ( ) - > Accept ( & ir_emitter_true ) ) ; <nl> + TF_CHECK_OK ( true_computation - > Accept ( & ir_emitter_true ) ) ; <nl> <nl> HloComputation * false_computation = hlo - > false_computation ( ) ; <nl> IrEmitterUnnested ir_emitter_false ( hlo_module_config_ , false_computation , <nl> ir_emitter_context_ ) ; <nl> - TF_CHECK_OK ( false_computation - > root_instruction ( ) - > Accept ( & ir_emitter_false ) ) ; <nl> + TF_CHECK_OK ( false_computation - > Accept ( & ir_emitter_false ) ) ; <nl> <nl> return MakeUnique < ConditionalThunk > ( <nl> GetAllocationSlice ( * hlo - > operand ( 0 ) ) , <nl> mmm a / tensorflow / compiler / xla / tests / BUILD <nl> ppp b / tensorflow / compiler / xla / tests / BUILD <nl> xla_test ( <nl> ] , <nl> ) <nl> <nl> + xla_test ( <nl> + name = " outfeed_in_nested_computation_test " , <nl> + srcs = [ " outfeed_in_nested_computation_test . cc " ] , <nl> + deps = [ <nl> + " / / tensorflow / compiler / xla / tests : local_client_test_base " , <nl> + " / / tensorflow / compiler / xla / tests : xla_internal_test_main " , <nl> + " / / tensorflow / core : test " , <nl> + ] , <nl> + ) <nl> + <nl> tf_cc_test ( <nl> name = " hlo_metadata_test " , <nl> srcs = [ <nl> new file mode 100644 <nl> index 0000000000000 . . cea7006526f0c <nl> mmm / dev / null <nl> ppp b / tensorflow / compiler / xla / tests / outfeed_in_nested_computation_test . cc <nl> <nl> + / * Copyright 2018 The TensorFlow Authors . All Rights Reserved . <nl> + <nl> + Licensed under the Apache License , Version 2 . 0 ( the " License " ) ; <nl> + you may not use this file except in compliance with the License . <nl> + You may obtain a copy of the License at <nl> + <nl> + http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> + <nl> + Unless required by applicable law or agreed to in writing , software <nl> + distributed under the License is distributed on an " AS IS " BASIS , <nl> + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> + See the License for the specific language governing permissions and <nl> + limitations under the License . <nl> + = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * / <nl> + <nl> + # include " tensorflow / compiler / xla / tests / local_client_test_base . h " <nl> + # include " tensorflow / core / lib / core / status_test_util . h " <nl> + <nl> + namespace xla { <nl> + namespace { <nl> + <nl> + / / Tests that ensure outfeed instructions that are contained in nested <nl> + / / computations in non - root positions are executed . <nl> + <nl> + class LocalClientExecuteTest : public LocalClientTestBase { } ; <nl> + <nl> + TEST_F ( LocalClientExecuteTest , OutfeedInWhile ) { <nl> + XlaBuilder b ( TestName ( ) ) ; <nl> + <nl> + Shape state_tuple_array_shape = ShapeUtil : : MakeShape ( xla : : S32 , { 10 , 5 } ) ; <nl> + Shape int_shape = ShapeUtil : : MakeShape ( xla : : S32 , { } ) ; <nl> + Shape state_tuple_shape = <nl> + ShapeUtil : : MakeTupleShape ( { int_shape , state_tuple_array_shape } ) ; <nl> + Shape xfeed_shape = ShapeUtil : : MakeShape ( xla : : S32 , { 2 } ) ; <nl> + <nl> + XlaOp some_buffer = Broadcast ( ConstantR0 < int32_t > ( & b , 0 ) , { 10 , 5 } ) ; <nl> + XlaOp num_iter = Infeed ( & b , int_shape ) ; <nl> + XlaOp init_tuple = Tuple ( & b , { num_iter , some_buffer } ) ; <nl> + <nl> + TF_ASSERT_OK_AND_ASSIGN ( XlaComputation loop_cond , [ & ] { <nl> + / / Condition : iteration variable > 0 <nl> + XlaBuilder cond_builder ( " loop_condition " ) ; <nl> + XlaOp state_tuple = Parameter ( & cond_builder , 0 , state_tuple_shape , " state " ) ; <nl> + XlaOp loop_counter = GetTupleElement ( state_tuple , 0 ) ; <nl> + Outfeed ( loop_counter , int_shape , " " ) ; <nl> + Gt ( loop_counter , ConstantR0 < int32_t > ( & cond_builder , 0 ) ) ; <nl> + return cond_builder . Build ( ) ; <nl> + } ( ) ) ; <nl> + <nl> + TF_ASSERT_OK_AND_ASSIGN ( XlaComputation loop_body , [ & ] { <nl> + XlaBuilder body_builder ( " loop_body " ) ; <nl> + XlaOp state_tuple = Parameter ( & body_builder , 0 , state_tuple_shape , " state " ) ; <nl> + XlaOp loop_counter = GetTupleElement ( state_tuple , 0 ) ; <nl> + XlaOp buffer_inside = GetTupleElement ( state_tuple , 1 ) ; <nl> + <nl> + / / Read some stuff from Infeed . <nl> + XlaOp some_input = Infeed ( & body_builder , xfeed_shape ) ; <nl> + XlaOp sum = Add ( some_input , Broadcast ( loop_counter , { 2 } ) ) ; <nl> + Outfeed ( sum , xfeed_shape , " " ) ; <nl> + <nl> + XlaOp iter_left = Sub ( loop_counter , ConstantR0 < int32_t > ( & body_builder , 1 ) ) ; <nl> + <nl> + Tuple ( & body_builder , { iter_left , buffer_inside } ) ; <nl> + return body_builder . Build ( ) ; <nl> + } ( ) ) ; <nl> + <nl> + / / Build loop . <nl> + XlaOp result_tuple = While ( loop_cond , loop_body , init_tuple ) ; <nl> + GetTupleElement ( result_tuple , 0 ) ; <nl> + TF_ASSERT_OK_AND_ASSIGN ( XlaComputation computation , b . Build ( ) ) ; <nl> + <nl> + std : : unique_ptr < xla : : Literal > comp_result ; <nl> + std : : unique_ptr < tensorflow : : Thread > thread ( <nl> + tensorflow : : Env : : Default ( ) - > StartThread ( <nl> + tensorflow : : ThreadOptions ( ) , " execute_thread " , [ & ] { <nl> + comp_result = local_client_ - > ExecuteAndTransfer ( computation , { } ) <nl> + . ConsumeValueOrDie ( ) ; <nl> + } ) ) ; <nl> + <nl> + VLOG ( 1 ) < < " Transferring trip count to computation " ; <nl> + / / Transfer number of iterations to Infeed . <nl> + TF_ASSERT_OK ( <nl> + local_client_ - > TransferToInfeed ( * LiteralUtil : : CreateR0 < int32_t > ( 1 ) ) ) ; <nl> + <nl> + / / Pick up value from outfeed <nl> + { <nl> + VLOG ( 1 ) < < " Reading from condition outfeed " ; <nl> + TF_ASSERT_OK_AND_ASSIGN ( std : : unique_ptr < Literal > r , <nl> + local_client_ - > TransferFromOutfeed ( & int_shape ) ) ; <nl> + EXPECT_EQ ( r - > Get < int32 > ( { } ) , 1 ) ; <nl> + } <nl> + <nl> + VLOG ( 1 ) < < " Writing data to infeed " ; <nl> + / / Transfer some stuff to Infeed for use inside of loop . <nl> + TF_ASSERT_OK ( local_client_ - > TransferToInfeed ( <nl> + * LiteralUtil : : CreateR1 < int32_t > ( { 10 , 20 } ) ) ) ; <nl> + <nl> + / / Pick up value from outfeed <nl> + { <nl> + VLOG ( 1 ) < < " Reading from body outfeed " ; <nl> + TF_ASSERT_OK_AND_ASSIGN ( std : : unique_ptr < Literal > r , <nl> + local_client_ - > TransferFromOutfeed ( & xfeed_shape ) ) ; <nl> + EXPECT_EQ ( r - > Get < int32 > ( { 0 } ) , 11 ) ; <nl> + EXPECT_EQ ( r - > Get < int32 > ( { 1 } ) , 21 ) ; <nl> + } <nl> + <nl> + { <nl> + VLOG ( 1 ) < < " Reading from condition outfeed " ; <nl> + TF_ASSERT_OK_AND_ASSIGN ( std : : unique_ptr < Literal > r , <nl> + local_client_ - > TransferFromOutfeed ( & int_shape ) ) ; <nl> + EXPECT_EQ ( r - > Get < int32 > ( { } ) , 0 ) ; <nl> + } <nl> + <nl> + / / Joins the thread <nl> + thread . reset ( ) ; <nl> + <nl> + EXPECT_EQ ( comp_result - > Get < int32 > ( { } ) , 0 ) ; <nl> + } <nl> + <nl> + TEST_F ( LocalClientExecuteTest , OutfeedInConditional ) { <nl> + XlaBuilder b ( TestName ( ) ) ; <nl> + <nl> + Shape condition_shape = ShapeUtil : : MakeShape ( xla : : PRED , { } ) ; <nl> + Shape result_shape = ShapeUtil : : MakeShape ( xla : : PRED , { } ) ; <nl> + <nl> + TF_ASSERT_OK_AND_ASSIGN ( XlaComputation true_computation , [ & ] { <nl> + XlaBuilder inner_builder ( " true_computation " ) ; <nl> + XlaOp param = Parameter ( & inner_builder , 0 , result_shape , " param " ) ; <nl> + Outfeed ( param , result_shape , " " ) ; <nl> + Or ( param , param ) ; <nl> + return inner_builder . Build ( ) ; <nl> + } ( ) ) ; <nl> + <nl> + TF_ASSERT_OK_AND_ASSIGN ( XlaComputation false_computation , [ & ] { <nl> + XlaBuilder inner_builder ( " false_computation " ) ; <nl> + Parameter ( & inner_builder , 0 , result_shape , " param " ) ; <nl> + return inner_builder . Build ( ) ; <nl> + } ( ) ) ; <nl> + <nl> + XlaOp pred = Infeed ( & b , condition_shape ) ; <nl> + Conditional ( / * predicate = * / pred , / * true_operand = * / pred , <nl> + / * true_computation = * / true_computation , / * false_operand = * / pred , <nl> + / * false_computation = * / false_computation ) ; <nl> + <nl> + TF_ASSERT_OK_AND_ASSIGN ( XlaComputation computation , b . Build ( ) ) ; <nl> + <nl> + std : : unique_ptr < xla : : Literal > comp_result ; <nl> + std : : unique_ptr < tensorflow : : Thread > thread ( <nl> + tensorflow : : Env : : Default ( ) - > StartThread ( <nl> + tensorflow : : ThreadOptions ( ) , " execute_thread " , [ & ] { <nl> + comp_result = local_client_ - > ExecuteAndTransfer ( computation , { } ) <nl> + . ConsumeValueOrDie ( ) ; <nl> + } ) ) ; <nl> + <nl> + TF_ASSERT_OK ( <nl> + local_client_ - > TransferToInfeed ( * LiteralUtil : : CreateR0 < bool > ( true ) ) ) ; <nl> + <nl> + TF_ASSERT_OK_AND_ASSIGN ( std : : unique_ptr < Literal > r , <nl> + local_client_ - > TransferFromOutfeed ( & result_shape ) ) ; <nl> + <nl> + EXPECT_EQ ( r - > Get < bool > ( { } ) , true ) ; <nl> + <nl> + / / Join the thread <nl> + thread . reset ( ) ; <nl> + } <nl> + <nl> + } / / namespace <nl> + } / / namespace xla <nl>
[ XLA : GPU ] Remember to execute non - root outfeed instructions in nested computations
tensorflow/tensorflow
19e4d68cf1402b6594793b815f8041c04d9ce32d
2018-07-25T23:32:39Z
mmm a / ios / sdk / WeexSDK / Sources / Controller / WXBaseViewController . m <nl> ppp b / ios / sdk / WeexSDK / Sources / Controller / WXBaseViewController . m <nl> - ( void ) _renderWithURL : ( NSURL * ) sourceURL <nl> } <nl> <nl> [ _instance destroyInstance ] ; <nl> - if ( [ WXPrerenderManager isTaskExist : [ self . sourceURL absoluteString ] ] ) { <nl> + if ( [ WXPrerenderManager isTaskReady : [ self . sourceURL absoluteString ] ] ) { <nl> _instance = [ WXPrerenderManager instanceFromUrl : self . sourceURL . absoluteString ] ; <nl> } <nl> <nl> - ( void ) _renderWithURL : ( NSURL * ) sourceURL <nl> [ weakSelf _updateInstanceState : WeexInstanceAppear ] ; <nl> } ; <nl> <nl> - if ( [ WXPrerenderManager isTaskExist : [ self . sourceURL absoluteString ] ] ) { <nl> + if ( [ WXPrerenderManager isTaskReady : [ self . sourceURL absoluteString ] ] ) { <nl> WX_MONITOR_INSTANCE_PERF_START ( WXPTJSDownload , _instance ) ; <nl> WX_MONITOR_INSTANCE_PERF_END ( WXPTJSDownload , _instance ) ; <nl> WX_MONITOR_INSTANCE_PERF_START ( WXPTFirstScreenRender , _instance ) ; <nl> mmm a / ios / sdk / WeexSDK / Sources / Model / WXSDKInstance . m <nl> ppp b / ios / sdk / WeexSDK / Sources / Model / WXSDKInstance . m <nl> - ( void ) destroyInstance <nl> { <nl> NSString * url = @ " " ; <nl> if ( [ WXPrerenderManager isTaskExist : [ self . scriptURL absoluteString ] ] ) { <nl> - [ WXPrerenderManager removePrerenderTaskforUrl : [ self . scriptURL absoluteString ] ] ; <nl> url = [ self . scriptURL absoluteString ] ; <nl> } <nl> if ( ! self . instanceId ) { <nl> - ( void ) destroyInstance <nl> return ; <nl> } <nl> <nl> + [ WXPrerenderManager removePrerenderTaskforUrl : [ self . scriptURL absoluteString ] ] ; <nl> [ WXPrerenderManager destroyTask : self . instanceId ] ; <nl> <nl> [ [ WXSDKManager bridgeMgr ] destroyInstance : self . instanceId ] ; <nl> - ( void ) destroyInstance <nl> } ) ; <nl> } ) ; <nl> if ( url . length > 0 ) { <nl> - [ WXPrerenderManager addTask : url instanceId : @ " " callback : nil ] ; <nl> + [ WXPrerenderManager addGlobalTask : url callback : nil ] ; <nl> } <nl> } <nl> <nl> mmm a / ios / sdk / WeexSDK / Sources / Module / WXPrerenderManager . h <nl> ppp b / ios / sdk / WeexSDK / Sources / Module / WXPrerenderManager . h <nl> <nl> * * / <nl> + ( void ) addTask : ( NSString * ) url instanceId : ( NSString * ) instanceId callback : ( WXModuleCallback ) callback ; <nl> <nl> + / * * <nl> + * @ abstract add prerender task <nl> + * <nl> + * @ param url The prerender url string <nl> + * <nl> + * @ param callback the module method callback <nl> + * <nl> + * * / <nl> + + ( void ) addGlobalTask : ( NSString * ) url callback : ( WXModuleCallback ) callback ; <nl> + <nl> / * * <nl> * @ abstract Returns true if url is exist in task . <nl> * <nl> * * / <nl> + ( BOOL ) isTaskExist : ( NSString * ) url ; <nl> <nl> + / * * <nl> + * @ abstract Returns true if task ready . <nl> + * <nl> + * * / <nl> + + ( BOOL ) isTaskReady : ( NSString * ) url ; <nl> / * * <nl> * @ abstract Returns key from url . <nl> * <nl> mmm a / ios / sdk / WeexSDK / Sources / Module / WXPrerenderManager . m <nl> ppp b / ios / sdk / WeexSDK / Sources / Module / WXPrerenderManager . m <nl> @ interface WXPrerenderTask : NSObject <nl> @ property ( nonatomic , assign ) WXState state ; <nl> @ property ( nonatomic , strong ) NSDate * beginDate ; <nl> @ property ( nonatomic ) long long cacheTime ; <nl> + @ property ( nonatomic ) BOOL isCache ; / / if set cache , cachetime is no use <nl> <nl> @ end <nl> @ implementation WXPrerenderTask <nl> @ interface WXPrerenderManager ( ) <nl> @ property ( nonatomic , strong ) NSMutableDictionary < NSString * , WXPrerenderTask * > * prerenderTasks ; <nl> @ property ( nonatomic ) NSInteger maxCacheNumber ; <nl> <nl> - <nl> @ end <nl> <nl> @ implementation WXPrerenderManager <nl> + ( void ) addTask : ( NSString * ) url instanceId : ( NSString * ) instanceId callback : ( WXM <nl> WXPrerenderManager * manager = [ WXPrerenderManager sharedInstance ] ; <nl> __weak WXPrerenderManager * weakSelf = manager ; <nl> dispatch_async ( manager . queue , ^ { <nl> - [ weakSelf prerender : newUrl instanceId : instanceId callback : callback ] ; <nl> + [ weakSelf prerender : newUrl instanceId : instanceId isCache : NO callback : callback ] ; <nl> + } ) ; <nl> + } <nl> + <nl> + + ( void ) addGlobalTask : ( NSString * ) url callback : ( WXModuleCallback ) callback <nl> + { <nl> + NSURL * newUrl = [ NSURL URLWithString : url ] ; <nl> + if ( ! newUrl ) { <nl> + if ( callback ) { <nl> + callback ( @ { @ " url " : url , @ " message " : MSG_PRERENDER_INTERNAL_ERROR , @ " result " : @ " error " } ) ; <nl> + } <nl> + return ; <nl> + } <nl> + <nl> + WXPrerenderManager * manager = [ WXPrerenderManager sharedInstance ] ; <nl> + __weak WXPrerenderManager * weakSelf = manager ; <nl> + dispatch_async ( manager . queue , ^ { <nl> + [ weakSelf prerender : newUrl instanceId : @ " " isCache : YES callback : callback ] ; <nl> } ) ; <nl> } <nl> <nl> - ( BOOL ) isSwitchOn <nl> return YES ; <nl> } <nl> <nl> - - ( void ) prerender : ( NSURL * ) url instanceId : ( NSString * ) instanceId callback : ( WXModuleCallback ) callback { <nl> + - ( void ) prerender : ( NSURL * ) url instanceId : ( NSString * ) instanceId isCache : ( BOOL ) isCache callback : ( WXModuleCallback ) callback { <nl> <nl> NSString * str = url . absoluteString ; <nl> if ( str . length = = 0 ) { <nl> - ( void ) prerender : ( NSURL * ) url instanceId : ( NSString * ) instanceId callback : ( WXMo <nl> self . maxCacheNumber = max ; <nl> } <nl> } <nl> + <nl> + <nl> WXSDKInstance * instance = [ [ WXSDKInstance alloc ] init ] ; <nl> instance . needPrerender = YES ; <nl> task . instance = instance ; <nl> task . parentInstanceId = instanceId ; <nl> task . url = url . absoluteString ; <nl> + task . isCache = isCache ; <nl> <nl> if ( self . prerenderTasks & & self . prerenderTasks . count < self . maxCacheNumber ) { <nl> [ self . prerenderTasks setObject : task forKey : [ WXPrerenderManager getTaskKeyFromUrl : url . absoluteString ] ] ; <nl> - ( void ) prerender : ( NSURL * ) url instanceId : ( NSString * ) instanceId callback : ( WXMo <nl> } <nl> } <nl> <nl> - + ( BOOL ) isTaskExist : ( NSString * ) url { <nl> - return [ [ WXPrerenderManager sharedInstance ] isTaskExist : url ] ; <nl> + + ( BOOL ) isTaskReady : ( NSString * ) url { <nl> + return [ [ WXPrerenderManager sharedInstance ] isTaskReady : url ] ; <nl> } <nl> - <nl> - - ( BOOL ) isTaskExist : ( NSString * ) url <nl> + - ( BOOL ) isTaskReady : ( NSString * ) url <nl> { <nl> if ( ! url | | url . length = = 0 ) { <nl> return NO ; <nl> - ( BOOL ) isTaskExist : ( NSString * ) url <nl> } <nl> / / compare cache time with begin time <nl> NSTimeInterval time = [ [ NSDate date ] timeIntervalSinceDate : task . beginDate ] ; <nl> - if ( time > task . cacheTime ) { <nl> + if ( time > task . cacheTime & & ! task . isCache ) { <nl> return NO ; <nl> } <nl> <nl> + if ( ! task . view ) / / view not exist , not prerender <nl> + { <nl> + return NO ; <nl> + } <nl> + if ( task ) { <nl> + return YES ; <nl> + } <nl> + return NO ; <nl> + } <nl> + <nl> + + ( BOOL ) isTaskExist : ( NSString * ) url { <nl> + return [ [ WXPrerenderManager sharedInstance ] isTaskExist : url ] ; <nl> + } <nl> + <nl> + - ( BOOL ) isTaskExist : ( NSString * ) url <nl> + { <nl> + if ( ! url | | url . length = = 0 ) { <nl> + return NO ; <nl> + } <nl> + WXPrerenderTask * task = [ self . prerenderTasks objectForKey : [ WXPrerenderManager getTaskKeyFromUrl : url ] ] ; <nl> if ( task ) { <nl> return YES ; <nl> } <nl> - ( BOOL ) isTaskExist : ( NSString * ) url <nl> + ( void ) renderFromCache : ( NSString * ) url <nl> { <nl> WXPrerenderManager * manager = [ WXPrerenderManager sharedInstance ] ; <nl> - if ( [ manager isTaskExist : url ] ) <nl> + if ( [ manager isTaskReady : url ] ) <nl> { <nl> WXPrerenderTask * task = [ manager . prerenderTasks objectForKey : [ WXPrerenderManager getTaskKeyFromUrl : url ] ] ; <nl> <nl> + ( void ) removePrerenderTaskforUrl : ( NSString * ) url <nl> if ( url . length > 0 ) { <nl> WXPrerenderManager * manager = [ WXPrerenderManager sharedInstance ] ; <nl> if ( manager . prerenderTasks & & [ manager . prerenderTasks count ] > 0 ) { <nl> - [ manager . prerenderTasks removeObjectForKey : [ WXPrerenderManager getTaskKeyFromUrl : url ] ] ; <nl> + WXPrerenderTask * task = [ manager . prerenderTasks objectForKey : [ WXPrerenderManager getTaskKeyFromUrl : url ] ] ; <nl> + if ( task ) { <nl> + [ manager . prerenderTasks removeObjectForKey : [ WXPrerenderManager getTaskKeyFromUrl : url ] ] ; <nl> + } <nl> } <nl> } <nl> } <nl>
+ [ ios ] distinguish the global pretender and user pretender
apache/incubator-weex
e939607a98d8ffcdc7af7e747a753350003aa8d1
2017-08-29T05:09:43Z
mmm a / Marlin / Marlin . h <nl> ppp b / Marlin / Marlin . h <nl> void refresh_cmd_timeout ( void ) ; <nl> extern float homing_feedrate [ ] ; <nl> extern bool axis_relative_modes [ ] ; <nl> extern int feedmultiply ; <nl> - extern int extrudemultiply ; / / Sets extrude multiply factor ( in percent ) for all extruders <nl> extern bool volumetric_enabled ; <nl> extern int extruder_multiply [ EXTRUDERS ] ; / / sets extrude multiply factor ( in percent ) for each extruder individually <nl> extern float filament_size [ EXTRUDERS ] ; / / cross - sectional area of filament ( in millimeters ) , typically around 1 . 75 or 2 . 85 , 0 disables the volumetric calculations for the extruder . <nl> mmm a / Marlin / Marlin_main . cpp <nl> ppp b / Marlin / Marlin_main . cpp <nl> int homing_bump_divisor [ ] = HOMING_BUMP_DIVISOR ; <nl> bool axis_relative_modes [ ] = AXIS_RELATIVE_MODES ; <nl> int feedmultiply = 100 ; / / 100 - > 1 200 - > 2 <nl> int saved_feedmultiply ; <nl> - int extrudemultiply = 100 ; / / 100 - > 1 200 - > 2 <nl> int extruder_multiply [ EXTRUDERS ] = ARRAY_BY_EXTRUDERS ( 100 , 100 , 100 , 100 ) ; <nl> bool volumetric_enabled = false ; <nl> float filament_size [ EXTRUDERS ] = ARRAY_BY_EXTRUDERS ( DEFAULT_NOMINAL_FILAMENT_DIA , DEFAULT_NOMINAL_FILAMENT_DIA , DEFAULT_NOMINAL_FILAMENT_DIA , DEFAULT_NOMINAL_FILAMENT_DIA ) ; <nl> inline void gcode_M221 ( ) { <nl> extruder_multiply [ tmp_extruder ] = sval ; <nl> } <nl> else { <nl> - extrudemultiply = sval ; <nl> + extruder_multiply [ active_extruder ] = sval ; <nl> } <nl> } <nl> } <nl> inline void gcode_M400 ( ) { st_synchronize ( ) ; } <nl> / / SERIAL_PROTOCOLPGM ( " Filament dia ( measured mm ) : " ) ; <nl> / / SERIAL_PROTOCOL ( filament_width_meas ) ; <nl> / / SERIAL_PROTOCOLPGM ( " Extrusion ratio ( % ) : " ) ; <nl> - / / SERIAL_PROTOCOL ( extrudemultiply ) ; <nl> + / / SERIAL_PROTOCOL ( extruder_multiply [ active_extruder ] ) ; <nl> } <nl> <nl> / * * <nl> mmm a / Marlin / dogm_lcd_implementation . h <nl> ppp b / Marlin / dogm_lcd_implementation . h <nl> static void lcd_implementation_status_screen ( ) { <nl> lcd_printPGM ( PSTR ( " dia : " ) ) ; <nl> lcd_print ( ftostr12ns ( filament_width_meas ) ) ; <nl> lcd_printPGM ( PSTR ( " factor : " ) ) ; <nl> - lcd_print ( itostr3 ( extrudemultiply ) ) ; <nl> + lcd_print ( itostr3 ( extruder_multiply [ active_extruder ] ) ) ; <nl> lcd_print ( ' % ' ) ; <nl> } <nl> # endif <nl> mmm a / Marlin / planner . cpp <nl> ppp b / Marlin / planner . cpp <nl> float junction_deviation = 0 . 1 ; <nl> block - > steps [ Z_AXIS ] = labs ( dz ) ; <nl> block - > steps [ E_AXIS ] = labs ( de ) ; <nl> block - > steps [ E_AXIS ] * = volumetric_multiplier [ active_extruder ] ; <nl> - block - > steps [ E_AXIS ] * = extrudemultiply ; <nl> + block - > steps [ E_AXIS ] * = extruder_multiply [ active_extruder ] ; <nl> block - > steps [ E_AXIS ] / = 100 ; <nl> block - > step_event_count = max ( block - > steps [ X_AXIS ] , max ( block - > steps [ Y_AXIS ] , max ( block - > steps [ Z_AXIS ] , block - > steps [ E_AXIS ] ) ) ) ; <nl> <nl> float junction_deviation = 0 . 1 ; <nl> delta_mm [ Y_AXIS ] = dy / axis_steps_per_unit [ Y_AXIS ] ; <nl> # endif <nl> delta_mm [ Z_AXIS ] = dz / axis_steps_per_unit [ Z_AXIS ] ; <nl> - delta_mm [ E_AXIS ] = ( de / axis_steps_per_unit [ E_AXIS ] ) * volumetric_multiplier [ active_extruder ] * extrudemultiply / 100 . 0 ; <nl> + delta_mm [ E_AXIS ] = ( de / axis_steps_per_unit [ E_AXIS ] ) * volumetric_multiplier [ active_extruder ] * extruder_multiply [ active_extruder ] / 100 . 0 ; <nl> <nl> if ( block - > steps [ X_AXIS ] < = dropsegments & & block - > steps [ Y_AXIS ] < = dropsegments & & block - > steps [ Z_AXIS ] < = dropsegments ) { <nl> block - > millimeters = fabs ( delta_mm [ E_AXIS ] ) ; <nl> mmm a / Marlin / ultralcd . cpp <nl> ppp b / Marlin / ultralcd . cpp <nl> static void lcd_tune_menu ( ) { <nl> MENU_MULTIPLIER_ITEM_EDIT ( int3 , MSG_BED , & target_temperature_bed , 0 , BED_MAXTEMP - 15 ) ; <nl> # endif <nl> MENU_MULTIPLIER_ITEM_EDIT ( int3 , MSG_FAN_SPEED , & fanSpeed , 0 , 255 ) ; <nl> - MENU_ITEM_EDIT ( int3 , MSG_FLOW , & extrudemultiply , 10 , 999 ) ; <nl> + MENU_ITEM_EDIT ( int3 , MSG_FLOW , & extruder_multiply [ active_extruder ] , 10 , 999 ) ; <nl> MENU_ITEM_EDIT ( int3 , MSG_FLOW MSG_F0 , & extruder_multiply [ 0 ] , 10 , 999 ) ; <nl> # if TEMP_SENSOR_1 ! = 0 <nl> MENU_ITEM_EDIT ( int3 , MSG_FLOW MSG_F1 , & extruder_multiply [ 1 ] , 10 , 999 ) ; <nl>
Replace extrudemultiply by extruder_multiply [ active_extruder ]
MarlinFirmware/Marlin
50a732360acf54d53cbd8daccafd807b8db64f43
2015-03-30T11:35:03Z
mmm a / libs / CMakeLists . txt <nl> ppp b / libs / CMakeLists . txt <nl> endif ( ) <nl> add_subdirectory ( libcommon ) <nl> add_subdirectory ( libpocoext ) <nl> add_subdirectory ( libdaemon ) <nl> + add_subdirectory ( libmemcpy ) <nl> <nl> if ( USE_MYSQL ) <nl> add_subdirectory ( libmysqlxx ) <nl> new file mode 100644 <nl> index 00000000000 . . c06085aacca <nl> mmm / dev / null <nl> ppp b / libs / libmemcpy / CMakeLists . txt <nl> @ @ - 0 , 0 + 1 @ @ <nl> + add_library ( memcpy memcpy . c ) <nl> new file mode 100644 <nl> index 00000000000 . . 9e1b175bc57 <nl> mmm / dev / null <nl> ppp b / libs / libmemcpy / memcpy . c <nl> <nl> + # include " memcpy . h " <nl> + <nl> + / / / This is needed to generate an object file for linking . <nl> new file mode 100644 <nl> index 00000000000 . . 902133ed3ae <nl> mmm / dev / null <nl> ppp b / libs / libmemcpy / memcpy . h <nl> <nl> + # pragma once <nl> + <nl> + # ifdef __cplusplus <nl> + extern " C " <nl> + { <nl> + # endif <nl> + <nl> + # include " FastMemcpy . h " <nl> + <nl> + void * __attribute__ ( ( __weak__ ) ) memcpy ( void * __restrict destination , const void * __restrict source , size_t size ) <nl> + { <nl> + return memcpy_fast ( destination , source , size ) ; <nl> + } <nl> + <nl> + # ifdef __cplusplus <nl> + } <nl> + # endif <nl>
Added wrapper [ # CLICKHOUSE - 2 ] .
ClickHouse/ClickHouse
effbbfd035251b7732ef5a4a2083eab7d0f9a9d9
2017-09-15T09:51:56Z
new file mode 100644 <nl> index 0000000000 . . 49b1941072 <nl> mmm / dev / null <nl> ppp b / CONTRIBUTING . md <nl> <nl> + # Contributing to Protocol Buffers <nl> + <nl> + We welcome your contributions to protocol buffers . This doc describes the <nl> + process to contribute patches to protobuf and the general guidelines we <nl> + expect contributors to follow . <nl> + <nl> + # # Before You Start <nl> + <nl> + We accept patches in the form of github pull requests . If you are new to <nl> + github , please read [ How to create github pull requests ] ( https : / / help . github . com / articles / about - pull - requests / ) <nl> + first . <nl> + <nl> + # # # Contributor License Agreements <nl> + <nl> + Contributions to this project must be accompanied by a Contributor License <nl> + Agreement . You ( or your employer ) retain the copyright to your contribution , <nl> + this simply gives us permission to use and redistribute your contributions <nl> + as part of the project . <nl> + <nl> + * If you are an individual writing original source code and you ' re sure you <nl> + own the intellectual property , then you ' ll need to sign an [ individual CLA ] ( https : / / cla . developers . google . com / about / google - individual ? csw = 1 ) . <nl> + * If you work for a company that wants to allow you to contribute your work , <nl> + then you ' ll need to sign a [ corporate CLA ] ( https : / / cla . developers . google . com / about / google - corporate ? csw = 1 ) . <nl> + <nl> + # # # Coding Style <nl> + <nl> + This project follows [ Google ’ s Coding Style Guides ] ( https : / / github . com / google / styleguide ) . <nl> + Before sending out your pull request , please familiarize yourself with the <nl> + corresponding style guides and make sure the proposed code change is style <nl> + conforming . <nl> + <nl> + # # Contributing Process <nl> + <nl> + Most pull requests should go to the master branch and the change will be <nl> + included in the next major / minor version release ( e . g . , 3 . 6 . 0 release ) . If you <nl> + need to include a bug fix in a patch release ( e . g . , 3 . 5 . 2 ) , make sure it ’ s <nl> + already merged to master , and then create a pull request cherry - picking the <nl> + commits from master branch to the release branch ( e . g . , branch 3 . 5 . x ) . <nl> + <nl> + For each pull request , a protobuf team member will be assigned to review the <nl> + pull request . For minor cleanups , the pull request may be merged right away <nl> + after an initial review . For larger changes , you will likely receive multiple <nl> + rounds of comments and it may take some time to complete . We will try to keep <nl> + our response time within 7 - days but if you don ’ t get any response in a few <nl> + days , feel free to comment on the threads to get our attention . We also expect <nl> + you to respond to our comments within a reasonable amount of time . If we don ’ t <nl> + hear from you for 2 weeks or longer , we may close the pull request . You can <nl> + still send the pull request again once you have time to work on it . <nl> + <nl> + Once a pull request is merged , we will take care of the rest and get it into <nl> + the final release . <nl> + <nl> + # # Pull Request Guidelines <nl> + <nl> + * If you are a Googler , it is preferable to first create an internal CL and <nl> + have it reviewed and submitted . The code propagation process will deliver the <nl> + change to GitHub . <nl> + * Create small PRs that are narrowly focused on addressing a single concern . <nl> + We often receive PRs that are trying to fix several things at a time , but if <nl> + only one fix is considered acceptable , nothing gets merged and both author ' s <nl> + & review ' s time is wasted . Create more PRs to address different concerns and <nl> + everyone will be happy . <nl> + * For speculative changes , consider opening an issue and discussing it first . <nl> + If you are suggesting a behavioral or API change , make sure you get explicit <nl> + support from a protobuf team member before sending us the pull request . <nl> + * Provide a good PR description as a record of what change is being made and <nl> + why it was made . Link to a GitHub issue if it exists . <nl> + * Don ' t fix code style and formatting unless you are already changing that <nl> + line to address an issue . PRs with irrelevant changes won ' t be merged . If <nl> + you do want to fix formatting or style , do that in a separate PR . <nl> + * Unless your PR is trivial , you should expect there will be reviewer comments <nl> + that you ' ll need to address before merging . We expect you to be reasonably <nl> + responsive to those comments , otherwise the PR will be closed after 2 - 3 weeks <nl> + of inactivity . <nl> + * Maintain clean commit history and use meaningful commit messages . PRs with <nl> + messy commit history are difficult to review and won ' t be merged . Use rebase <nl> + - i upstream / master to curate your commit history and / or to bring in latest <nl> + changes from master ( but avoid rebasing in the middle of a code review ) . <nl> + * Keep your PR up to date with upstream / master ( if there are merge conflicts , <nl> + we can ' t really merge your change ) . <nl> + * All tests need to be passing before your change can be merged . We recommend <nl> + you run tests locally before creating your PR to catch breakages early on . <nl> + Ultimately , the green signal will be provided by our testing infrastructure . <nl> + The reviewer will help you if there are test failures that seem not related <nl> + to the change you are making . <nl>
Merge pull request from xfxyjwf / contrib
protocolbuffers/protobuf
d42ec0791ac63a12765cf9b09e9438bbcefdf1d1
2018-09-01T15:59:09Z
mmm a / cocos / 2d / CCSprite . cpp <nl> ppp b / cocos / 2d / CCSprite . cpp <nl> void Sprite : : setTexture ( const std : : string & filename ) <nl> setTexture ( texture ) ; <nl> <nl> Rect rect = Rect : : ZERO ; <nl> - rect . size = texture - > getContentSize ( ) ; <nl> + if ( texture ) <nl> + rect . size = texture - > getContentSize ( ) ; <nl> setTextureRect ( rect ) ; <nl> } <nl> <nl>
Merge pull request from starwing / check_settexture
cocos2d/cocos2d-x
9894c738c18a73293e5fa337f3ae71420cd75b26
2014-11-28T02:19:01Z
mmm a / doc / release - notes . md <nl> ppp b / doc / release - notes . md <nl> Fee Estimation Changes <nl> ( previously 25 ) and for RPC calls ( previously 2 ) . <nl> <nl> Removal of Priority Estimation <nl> mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> - Estimation of " priority " needed for a transaction to be included within a target <nl> number of blocks has been removed . The rpc calls are deprecated and will either <nl> P2P connection management <nl> <nl> - New connections to manually added peers are much faster . <nl> <nl> + Introduction of assumed - valid blocks <nl> + mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + <nl> + - A significant portion of the initial block download time is spent verifying <nl> + scripts / signatures . Although the verification must pass to ensure the security <nl> + of the system , no other result from this verification is needed : If the node <nl> + knew the history of a given block were valid it could skip checking scripts <nl> + for its ancestors . <nl> + <nl> + - A new configuration option ' assumevalid ' is provided to express this knowledge <nl> + to the software . Unlike the ' checkpoints ' in the past this setting does not <nl> + force the use of a particular chain : chains that are consistent with it are <nl> + processed quicker , but other chains are still accepted if they ' d otherwise <nl> + be chosen as best . Also unlike ' checkpoints ' the user can configure which <nl> + block history is assumed true , this means that even outdated software can <nl> + sync more quickly if the setting is updated by the user . <nl> + <nl> + - Because the validity of a chain history is a simple objective fact it is much <nl> + easier to review this setting . As a result the software ships with a default <nl> + value adjusted to match the current chain shortly before release . The use <nl> + of this default value can be disabled by setting - assumevalid = 0 <nl> <nl> 0 . 14 . 0 Change log <nl> = = = = = = = = = = = = = = = = = <nl> mmm a / doc / release - process . md <nl> ppp b / doc / release - process . md <nl> Before every minor and major release : <nl> * Update version in sources ( see below ) <nl> * Write release notes ( see below ) <nl> * Update ` src / chainparams . cpp ` nMinimumChainWork with information from the getblockchaininfo rpc . <nl> + * Update ` src / chainparams . cpp ` defaultAssumeValid with information from the getblockhash rpc . <nl> + - The selected value must not be orphaned so it may be useful to set the value two blocks back from the tip . <nl> + - Testnet should be set some tens of thousands back from the tip due to reorgs there . <nl> + - This update should be reviewed with a reindex - chainstate with assumevalid = 0 to catch any defect <nl> + that causes rejection of blocks in the past history . <nl> <nl> Before every major release : <nl> <nl> new file mode 100755 <nl> index 000000000000 . . e4bc22951b39 <nl> mmm / dev / null <nl> ppp b / qa / rpc - tests / assumevalid . py <nl> <nl> + # ! / usr / bin / env python3 <nl> + # Copyright ( c ) 2014 - 2016 The Bitcoin Core developers <nl> + # Distributed under the MIT software license , see the accompanying <nl> + # file COPYING or http : / / www . opensource . org / licenses / mit - license . php . <nl> + ' ' ' <nl> + assumevalid . py <nl> + <nl> + Test logic for skipping signature validation on blocks which we ' ve assumed <nl> + valid ( https : / / github . com / bitcoin / bitcoin / pull / 9484 ) <nl> + <nl> + We build a chain that includes and invalid signature for one of the <nl> + transactions : <nl> + <nl> + 0 : genesis block <nl> + 1 : block 1 with coinbase transaction output . <nl> + 2 - 101 : bury that block with 100 blocks so the coinbase transaction <nl> + output can be spent <nl> + 102 : a block containing a transaction spending the coinbase <nl> + transaction output . The transaction has an invalid signature . <nl> + 103 - 2202 : bury the bad block with just over two weeks ' worth of blocks <nl> + ( 2100 blocks ) <nl> + <nl> + Start three nodes : <nl> + <nl> + - node0 has no - assumevalid parameter . Try to sync to block 2202 . It will <nl> + reject block 102 and only sync as far as block 101 <nl> + - node1 has - assumevalid set to the hash of block 102 . Try to sync to <nl> + block 2202 . node1 will sync all the way to block 2202 . <nl> + - node2 has - assumevalid set to the hash of block 102 . Try to sync to <nl> + block 200 . node2 will reject block 102 since it ' s assumed valid , but it <nl> + isn ' t buried by at least two weeks ' work . <nl> + ' ' ' <nl> + <nl> + from test_framework . mininode import * <nl> + from test_framework . test_framework import BitcoinTestFramework <nl> + from test_framework . util import * <nl> + from test_framework . blocktools import create_block , create_coinbase <nl> + from test_framework . key import CECKey <nl> + from test_framework . script import * <nl> + <nl> + class BaseNode ( SingleNodeConnCB ) : <nl> + def __init__ ( self ) : <nl> + SingleNodeConnCB . __init__ ( self ) <nl> + self . last_inv = None <nl> + self . last_headers = None <nl> + self . last_block = None <nl> + self . last_getdata = None <nl> + self . block_announced = False <nl> + self . last_getheaders = None <nl> + self . disconnected = False <nl> + self . last_blockhash_announced = None <nl> + <nl> + def on_close ( self , conn ) : <nl> + self . disconnected = True <nl> + <nl> + def wait_for_disconnect ( self , timeout = 60 ) : <nl> + test_function = lambda : self . disconnected <nl> + assert ( wait_until ( test_function , timeout = timeout ) ) <nl> + return <nl> + <nl> + def send_header_for_blocks ( self , new_blocks ) : <nl> + headers_message = msg_headers ( ) <nl> + headers_message . headers = [ CBlockHeader ( b ) for b in new_blocks ] <nl> + self . send_message ( headers_message ) <nl> + <nl> + class SendHeadersTest ( BitcoinTestFramework ) : <nl> + def __init__ ( self ) : <nl> + super ( ) . __init__ ( ) <nl> + self . setup_clean_chain = True <nl> + self . num_nodes = 3 <nl> + <nl> + def setup_network ( self ) : <nl> + # Start node0 . We don ' t start the other nodes yet since <nl> + # we need to pre - mine a block with an invalid transaction <nl> + # signature so we can pass in the block hash as assumevalid . <nl> + self . nodes = [ ] <nl> + self . nodes . append ( start_node ( 0 , self . options . tmpdir , [ " - debug " ] ) ) <nl> + <nl> + def run_test ( self ) : <nl> + <nl> + # Connect to node0 <nl> + node0 = BaseNode ( ) <nl> + connections = [ ] <nl> + connections . append ( NodeConn ( ' 127 . 0 . 0 . 1 ' , p2p_port ( 0 ) , self . nodes [ 0 ] , node0 ) ) <nl> + node0 . add_connection ( connections [ 0 ] ) <nl> + <nl> + NetworkThread ( ) . start ( ) # Start up network handling in another thread <nl> + node0 . wait_for_verack ( ) <nl> + <nl> + # Build the blockchain <nl> + self . tip = int ( self . nodes [ 0 ] . getbestblockhash ( ) , 16 ) <nl> + self . block_time = self . nodes [ 0 ] . getblock ( self . nodes [ 0 ] . getbestblockhash ( ) ) [ ' time ' ] + 1 <nl> + <nl> + self . blocks = [ ] <nl> + <nl> + # Get a pubkey for the coinbase TXO <nl> + coinbase_key = CECKey ( ) <nl> + coinbase_key . set_secretbytes ( b " horsebattery " ) <nl> + coinbase_pubkey = coinbase_key . get_pubkey ( ) <nl> + <nl> + # Create the first block with a coinbase output to our key <nl> + height = 1 <nl> + block = create_block ( self . tip , create_coinbase ( height , coinbase_pubkey ) , self . block_time ) <nl> + self . blocks . append ( block ) <nl> + self . block_time + = 1 <nl> + block . solve ( ) <nl> + # Save the coinbase for later <nl> + self . block1 = block <nl> + self . tip = block . sha256 <nl> + height + = 1 <nl> + <nl> + # Bury the block 100 deep so the coinbase output is spendable <nl> + for i in range ( 100 ) : <nl> + block = create_block ( self . tip , create_coinbase ( height ) , self . block_time ) <nl> + block . solve ( ) <nl> + self . blocks . append ( block ) <nl> + self . tip = block . sha256 <nl> + self . block_time + = 1 <nl> + height + = 1 <nl> + <nl> + # Create a transaction spending the coinbase output with an invalid ( null ) signature <nl> + tx = CTransaction ( ) <nl> + tx . vin . append ( CTxIn ( COutPoint ( self . block1 . vtx [ 0 ] . sha256 , 0 ) , scriptSig = b " " ) ) <nl> + tx . vout . append ( CTxOut ( 49 * 100000000 , CScript ( [ OP_TRUE ] ) ) ) <nl> + tx . calc_sha256 ( ) <nl> + <nl> + block102 = create_block ( self . tip , create_coinbase ( height ) , self . block_time ) <nl> + self . block_time + = 1 <nl> + block102 . vtx . extend ( [ tx ] ) <nl> + block102 . hashMerkleRoot = block102 . calc_merkle_root ( ) <nl> + block102 . rehash ( ) <nl> + block102 . solve ( ) <nl> + self . blocks . append ( block102 ) <nl> + self . tip = block102 . sha256 <nl> + self . block_time + = 1 <nl> + height + = 1 <nl> + <nl> + # Bury the assumed valid block 2100 deep <nl> + for i in range ( 2100 ) : <nl> + block = create_block ( self . tip , create_coinbase ( height ) , self . block_time ) <nl> + block . nVersion = 4 <nl> + block . solve ( ) <nl> + self . blocks . append ( block ) <nl> + self . tip = block . sha256 <nl> + self . block_time + = 1 <nl> + height + = 1 <nl> + <nl> + # Start node1 and node2 with assumevalid so they accept a block with a bad signature . <nl> + self . nodes . append ( start_node ( 1 , self . options . tmpdir , <nl> + [ " - debug " , " - assumevalid = " + hex ( block102 . sha256 ) ] ) ) <nl> + node1 = BaseNode ( ) # connects to node1 <nl> + connections . append ( NodeConn ( ' 127 . 0 . 0 . 1 ' , p2p_port ( 1 ) , self . nodes [ 1 ] , node1 ) ) <nl> + node1 . add_connection ( connections [ 1 ] ) <nl> + node1 . wait_for_verack ( ) <nl> + <nl> + self . nodes . append ( start_node ( 2 , self . options . tmpdir , <nl> + [ " - debug " , " - assumevalid = " + hex ( block102 . sha256 ) ] ) ) <nl> + node2 = BaseNode ( ) # connects to node2 <nl> + connections . append ( NodeConn ( ' 127 . 0 . 0 . 1 ' , p2p_port ( 2 ) , self . nodes [ 2 ] , node2 ) ) <nl> + node2 . add_connection ( connections [ 2 ] ) <nl> + node2 . wait_for_verack ( ) <nl> + <nl> + # send header lists to all three nodes <nl> + node0 . send_header_for_blocks ( self . blocks [ 0 : 2000 ] ) <nl> + node0 . send_header_for_blocks ( self . blocks [ 2000 : ] ) <nl> + node1 . send_header_for_blocks ( self . blocks [ 0 : 2000 ] ) <nl> + node1 . send_header_for_blocks ( self . blocks [ 2000 : ] ) <nl> + node2 . send_header_for_blocks ( self . blocks [ 0 : 200 ] ) <nl> + <nl> + # Send 102 blocks to node0 . Block 102 will be rejected . <nl> + for i in range ( 101 ) : <nl> + node0 . send_message ( msg_block ( self . blocks [ i ] ) ) <nl> + node0 . sync_with_ping ( ) # make sure the most recent block is synced <nl> + node0 . send_message ( msg_block ( self . blocks [ 101 ] ) ) <nl> + assert_equal ( self . nodes [ 0 ] . getblock ( self . nodes [ 0 ] . getbestblockhash ( ) ) [ ' height ' ] , 101 ) <nl> + <nl> + # Send 3102 blocks to node1 . All blocks will be accepted . <nl> + for i in range ( 2202 ) : <nl> + node1 . send_message ( msg_block ( self . blocks [ i ] ) ) <nl> + node1 . sync_with_ping ( ) # make sure the most recent block is synced <nl> + assert_equal ( self . nodes [ 1 ] . getblock ( self . nodes [ 1 ] . getbestblockhash ( ) ) [ ' height ' ] , 2202 ) <nl> + <nl> + # Send 102 blocks to node2 . Block 102 will be rejected . <nl> + for i in range ( 101 ) : <nl> + node2 . send_message ( msg_block ( self . blocks [ i ] ) ) <nl> + node2 . sync_with_ping ( ) # make sure the most recent block is synced <nl> + node2 . send_message ( msg_block ( self . blocks [ 101 ] ) ) <nl> + assert_equal ( self . nodes [ 2 ] . getblock ( self . nodes [ 2 ] . getbestblockhash ( ) ) [ ' height ' ] , 101 ) <nl> + <nl> + if __name__ = = ' __main__ ' : <nl> + SendHeadersTest ( ) . main ( ) <nl> mmm a / src / chainparams . cpp <nl> ppp b / src / chainparams . cpp <nl> class CMainParams : public CChainParams { <nl> / / The best chain should have at least this much work . <nl> consensus . nMinimumChainWork = uint256S ( " 0x0000000000000000000000000000000000000000002cb971dd56d1c583c20f90 " ) ; <nl> <nl> + / / By default assume that the signatures in ancestors of this block are valid . <nl> + consensus . defaultAssumeValid = uint256S ( " 0x0000000000000000030abc968e1bd635736e880b946085c93152969b9a81a6e2 " ) ; / / 447235 <nl> + <nl> / * * <nl> * The message start string is designed to be unlikely to occur in normal data . <nl> * The characters are rarely used upper ASCII , not valid as UTF - 8 , and produce <nl> class CTestNetParams : public CChainParams { <nl> / / The best chain should have at least this much work . <nl> consensus . nMinimumChainWork = uint256S ( " 0x0000000000000000000000000000000000000000000000198b4def2baa9338d6 " ) ; <nl> <nl> + / / By default assume that the signatures in ancestors of this block are valid . <nl> + consensus . defaultAssumeValid = uint256S ( " 0x000000000871ee6842d3648317ccc8a435eb8cc3c2429aee94faff9ba26b05a0 " ) ; / / 1043841 <nl> + <nl> pchMessageStart [ 0 ] = 0x0b ; <nl> pchMessageStart [ 1 ] = 0x11 ; <nl> pchMessageStart [ 2 ] = 0x09 ; <nl> class CRegTestParams : public CChainParams { <nl> / / The best chain should have at least this much work . <nl> consensus . nMinimumChainWork = uint256S ( " 0x00 " ) ; <nl> <nl> + / / By default assume that the signatures in ancestors of this block are valid . <nl> + consensus . defaultAssumeValid = uint256S ( " 0x00 " ) ; <nl> + <nl> pchMessageStart [ 0 ] = 0xfa ; <nl> pchMessageStart [ 1 ] = 0xbf ; <nl> pchMessageStart [ 2 ] = 0xb5 ; <nl> mmm a / src / consensus / params . h <nl> ppp b / src / consensus / params . h <nl> struct Params { <nl> int64_t nPowTargetTimespan ; <nl> int64_t DifficultyAdjustmentInterval ( ) const { return nPowTargetTimespan / nPowTargetSpacing ; } <nl> uint256 nMinimumChainWork ; <nl> + uint256 defaultAssumeValid ; <nl> } ; <nl> } / / namespace Consensus <nl> <nl> mmm a / src / init . cpp <nl> ppp b / src / init . cpp <nl> std : : string HelpMessage ( HelpMessageMode mode ) <nl> strUsage + = HelpMessageOpt ( " - blocknotify = < cmd > " , _ ( " Execute command when the best block changes ( % s in cmd is replaced by block hash ) " ) ) ; <nl> if ( showDebug ) <nl> strUsage + = HelpMessageOpt ( " - blocksonly " , strprintf ( _ ( " Whether to operate in a blocks only mode ( default : % u ) " ) , DEFAULT_BLOCKSONLY ) ) ; <nl> - strUsage + = HelpMessageOpt ( " - checkblocks = < n > " , strprintf ( _ ( " How many blocks to check at startup ( default : % u , 0 = all ) " ) , DEFAULT_CHECKBLOCKS ) ) ; <nl> - strUsage + = HelpMessageOpt ( " - checklevel = < n > " , strprintf ( _ ( " How thorough the block verification of - checkblocks is ( 0 - 4 , default : % u ) " ) , DEFAULT_CHECKLEVEL ) ) ; <nl> + strUsage + = HelpMessageOpt ( " - assumevalid = < hex > " , strprintf ( _ ( " If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification ( 0 to verify all , default : % s , testnet : % s ) " ) , Params ( CBaseChainParams : : MAIN ) . GetConsensus ( ) . defaultAssumeValid . GetHex ( ) , Params ( CBaseChainParams : : TESTNET ) . GetConsensus ( ) . defaultAssumeValid . GetHex ( ) ) ) ; <nl> strUsage + = HelpMessageOpt ( " - conf = < file > " , strprintf ( _ ( " Specify configuration file ( default : % s ) " ) , BITCOIN_CONF_FILENAME ) ) ; <nl> if ( mode = = HMM_BITCOIND ) <nl> { <nl> std : : string HelpMessage ( HelpMessageMode mode ) <nl> strUsage + = HelpMessageOpt ( " - uacomment = < cmt > " , _ ( " Append comment to the user agent string " ) ) ; <nl> if ( showDebug ) <nl> { <nl> + strUsage + = HelpMessageOpt ( " - checkblocks = < n > " , strprintf ( _ ( " How many blocks to check at startup ( default : % u , 0 = all ) " ) , DEFAULT_CHECKBLOCKS ) ) ; <nl> + strUsage + = HelpMessageOpt ( " - checklevel = < n > " , strprintf ( _ ( " How thorough the block verification of - checkblocks is ( 0 - 4 , default : % u ) " ) , DEFAULT_CHECKLEVEL ) ) ; <nl> strUsage + = HelpMessageOpt ( " - checkblockindex " , strprintf ( " Do a full consistency check for mapBlockIndex , setBlockIndexCandidates , chainActive and mapBlocksUnlinked occasionally . Also sets - checkmempool ( default : % u ) " , Params ( CBaseChainParams : : MAIN ) . DefaultConsistencyChecks ( ) ) ) ; <nl> strUsage + = HelpMessageOpt ( " - checkmempool = < n > " , strprintf ( " Run checks every < n > transactions ( default : % u ) " , Params ( CBaseChainParams : : MAIN ) . DefaultConsistencyChecks ( ) ) ) ; <nl> strUsage + = HelpMessageOpt ( " - checkpoints " , strprintf ( " Disable expensive verification for known chain history ( default : % u ) " , DEFAULT_CHECKPOINTS_ENABLED ) ) ; <nl> bool AppInitParameterInteraction ( ) <nl> fCheckBlockIndex = GetBoolArg ( " - checkblockindex " , chainparams . DefaultConsistencyChecks ( ) ) ; <nl> fCheckpointsEnabled = GetBoolArg ( " - checkpoints " , DEFAULT_CHECKPOINTS_ENABLED ) ; <nl> <nl> + hashAssumeValid = uint256S ( GetArg ( " - assumevalid " , chainparams . GetConsensus ( ) . defaultAssumeValid . GetHex ( ) ) ) ; <nl> + if ( ! hashAssumeValid . IsNull ( ) ) <nl> + LogPrintf ( " Assuming ancestors of block % s have valid signatures . \ n " , hashAssumeValid . GetHex ( ) ) ; <nl> + else <nl> + LogPrintf ( " Validating signatures for all blocks . \ n " ) ; <nl> + <nl> / / mempool limits <nl> int64_t nMempoolSizeMax = GetArg ( " - maxmempool " , DEFAULT_MAX_MEMPOOL_SIZE ) * 1000000 ; <nl> int64_t nMempoolSizeMin = GetArg ( " - limitdescendantsize " , DEFAULT_DESCENDANT_SIZE_LIMIT ) * 1000 * 40 ; <nl> mmm a / src / validation . cpp <nl> ppp b / src / validation . cpp <nl> uint64_t nPruneTarget = 0 ; <nl> int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE ; <nl> bool fEnableReplacement = DEFAULT_ENABLE_REPLACEMENT ; <nl> <nl> + uint256 hashAssumeValid ; <nl> <nl> CFeeRate minRelayTxFee = CFeeRate ( DEFAULT_MIN_RELAY_TX_FEE ) ; <nl> CAmount maxTxFee = DEFAULT_TRANSACTION_MAXFEE ; <nl> bool CheckInputs ( const CTransaction & tx , CValidationState & state , const CCoinsVi <nl> / / Only if ALL inputs pass do we perform expensive ECDSA signature checks . <nl> / / Helps prevent CPU exhaustion attacks . <nl> <nl> - / / Skip ECDSA signature verification when connecting blocks before the <nl> - / / last block chain checkpoint . Assuming the checkpoints are valid this <nl> + / / Skip script verification when connecting blocks under the <nl> + / / assumedvalid block . Assuming the assumedvalid block is valid this <nl> / / is safe because block merkle hashes are still computed and checked , <nl> - / / and any change will be caught at the next checkpoint . Of course , if <nl> - / / the checkpoint is for a chain that ' s invalid due to false scriptSigs <nl> + / / Of course , if an assumed valid block is invalid due to false scriptSigs <nl> / / this optimization would allow an invalid chain to be accepted . <nl> if ( fScriptChecks ) { <nl> for ( unsigned int i = 0 ; i < tx . vin . size ( ) ; i + + ) { <nl> bool ConnectBlock ( const CBlock & block , CValidationState & state , CBlockIndex * pin <nl> } <nl> <nl> bool fScriptChecks = true ; <nl> - if ( fCheckpointsEnabled ) { <nl> - CBlockIndex * pindexLastCheckpoint = Checkpoints : : GetLastCheckpoint ( chainparams . Checkpoints ( ) ) ; <nl> - if ( pindexLastCheckpoint & & pindexLastCheckpoint - > GetAncestor ( pindex - > nHeight ) = = pindex ) { <nl> - / / This block is an ancestor of a checkpoint : disable script checks <nl> - fScriptChecks = false ; <nl> + if ( ! hashAssumeValid . IsNull ( ) ) { <nl> + / / We ' ve been configured with the hash of a block which has been externally verified to have a valid history . <nl> + / / A suitable default value is included with the software and updated from time to time . Because validity <nl> + / / relative to a piece of software is an objective fact these defaults can be easily reviewed . <nl> + / / This setting doesn ' t force the selection of any particular chain but makes validating some faster by <nl> + / / effectively caching the result of part of the verification . <nl> + BlockMap : : const_iterator it = mapBlockIndex . find ( hashAssumeValid ) ; <nl> + if ( it ! = mapBlockIndex . end ( ) ) { <nl> + if ( it - > second - > GetAncestor ( pindex - > nHeight ) = = pindex & & <nl> + pindexBestHeader - > GetAncestor ( pindex - > nHeight ) = = pindex & & <nl> + pindexBestHeader - > nChainWork > = UintToArith256 ( chainparams . GetConsensus ( ) . nMinimumChainWork ) ) { <nl> + / / This block is a member of the assumed verified chain and an ancestor of the best header . <nl> + / / The equivalent time check discourages hashpower from extorting the network via DOS attack <nl> + / / into accepting an invalid block through telling users they must manually set assumevalid . <nl> + / / Requiring a software change or burying the invalid block , regardless of the setting , makes <nl> + / / it hard to hide the implication of the demand . This also avoids having release candidates <nl> + / / that are hardly doing any signature verification at all in testing without having to <nl> + / / artificially set the default assumed verified block further back . <nl> + / / The test against nMinimumChainWork prevents the skipping when denied access to any chain at <nl> + / / least as good as the expected chain . <nl> + fScriptChecks = ( GetBlockProofEquivalentTime ( * pindexBestHeader , * pindex , * pindexBestHeader , chainparams . GetConsensus ( ) ) < = 60 * 60 * 24 * 7 * 2 ) ; <nl> + } <nl> } <nl> } <nl> <nl> mmm a / src / validation . h <nl> ppp b / src / validation . h <nl> extern CAmount maxTxFee ; <nl> extern int64_t nMaxTipAge ; <nl> extern bool fEnableReplacement ; <nl> <nl> + / * * Block hash whose ancestors we will assume to have valid scripts without checking them . * / <nl> + extern uint256 hashAssumeValid ; <nl> + <nl> / * * Best header we ' ve seen so far ( used for getheaders queries ' starting points ) . * / <nl> extern CBlockIndex * pindexBestHeader ; <nl> <nl>
Merge : Introduce assumevalid setting to skip validation presumed valid scripts .
bitcoin/bitcoin
812714fd80e96e28cd288c553c83838cecbfc2d9
2017-01-16T22:07:30Z
mmm a / src / mongo / shell / shell_utils . cpp <nl> ppp b / src / mongo / shell / shell_utils . cpp <nl> namespace mongo { <nl> } <nl> else { <nl> DBClientConnection conn ; <nl> - conn . connect ( " 127 . 0 . 0 . 1 : " + BSONObjBuilder : : numStr ( port ) ) ; <nl> try { <nl> + conn . connect ( " 127 . 0 . 0 . 1 : " + BSONObjBuilder : : numStr ( port ) ) ; <nl> conn . simpleCommand ( " admin " , NULL , " shutdown " ) ; <nl> } <nl> catch ( . . . ) { <nl>
avoid unhandled exception if the process is already gone
mongodb/mongo
671bad56b3e9c3dd9cd4b5f3e98d78032db769a1
2012-01-04T17:37:21Z
mmm a / test / lit . cfg <nl> ppp b / test / lit . cfg <nl> elif swift_run_only_tests = = ' long_tests ' : <nl> config . limit_to_features . add ( " long_test " ) <nl> elif swift_run_only_tests = = ' all_except_long ' : <nl> config . available_features . add ( " executable_test " ) <nl> - config . available_features . add ( " long_test " ) <nl> else : <nl> lit_config . fatal ( " Unknown test mode % r " % swift_run_only_tests ) <nl> <nl>
lit . cfg : don ' t run long tests in ' all_except_long ' mode
apple/swift
ad2fbec4305fa5af5cdc199e54dedf8178a2fe9c
2016-04-26T21:05:16Z
mmm a / xbmc / filesystem / DAVDirectory . cpp <nl> ppp b / xbmc / filesystem / DAVDirectory . cpp <nl> void CDAVDirectory : : ParseResponse ( const TiXmlElement * pElement , CFileItem & item ) <nl> else <nl> if ( CDAVCommon : : ValueWithoutNamespace ( pPropChild , " displayname " ) & & ! pPropChild - > NoChildren ( ) ) <nl> { <nl> - item . SetLabel ( pPropChild - > FirstChild ( ) - > ValueStr ( ) ) ; <nl> + item . SetLabel ( CURL : : Decode ( pPropChild - > FirstChild ( ) - > ValueStr ( ) ) ) ; <nl> } <nl> else <nl> if ( ! item . m_dateTime . IsValid ( ) & & CDAVCommon : : ValueWithoutNamespace ( pPropChild , " creationdate " ) & & ! pPropChild - > NoChildren ( ) ) <nl>
Merge pull request from rozhuk - im / master
xbmc/xbmc
7f765bb2c80e7bf240f4a133856f13d8e7e5a972
2018-09-17T06:01:27Z
mmm a / atom / browser / api / atom_api_app . cc <nl> ppp b / atom / browser / api / atom_api_app . cc <nl> mate : : ObjectTemplateBuilder App : : GetObjectTemplateBuilder ( <nl> . SetMethod ( " quit " , base : : Bind ( & Browser : : Quit , browser ) ) <nl> . SetMethod ( " exit " , base : : Bind ( & Browser : : Exit , browser ) ) <nl> . SetMethod ( " focus " , base : : Bind ( & Browser : : Focus , browser ) ) <nl> + . SetMethod ( " hide " , base : : Bind ( & Browser : : Hide , browser ) ) <nl> . SetMethod ( " getVersion " , base : : Bind ( & Browser : : GetVersion , browser ) ) <nl> . SetMethod ( " setVersion " , base : : Bind ( & Browser : : SetVersion , browser ) ) <nl> . SetMethod ( " getName " , base : : Bind ( & Browser : : GetName , browser ) ) <nl> mmm a / atom / browser / browser . h <nl> ppp b / atom / browser / browser . h <nl> class Browser : public WindowListObserver { <nl> / / Focus the application . <nl> void Focus ( ) ; <nl> <nl> + / / Focus the application . <nl> + void Hide ( ) ; <nl> + <nl> / / Returns the version of the executable ( or bundle ) . <nl> std : : string GetVersion ( ) const ; <nl> <nl> mmm a / atom / browser / browser_mac . mm <nl> ppp b / atom / browser / browser_mac . mm <nl> <nl> [ [ AtomApplication sharedApplication ] activateIgnoringOtherApps : YES ] ; <nl> } <nl> <nl> + void Browser : : Hide ( ) { <nl> + [ [ AtomApplication sharedApplication ] hide : nil ] ; <nl> + } <nl> + <nl> void Browser : : AddRecentDocument ( const base : : FilePath & path ) { <nl> NSString * path_string = base : : mac : : FilePathToNSString ( path ) ; <nl> if ( ! path_string ) <nl> mmm a / docs / api / app . md <nl> ppp b / docs / api / app . md <nl> This method guarantees that all ` beforeunload ` and ` unload ` event handlers are <nl> correctly executed . It is possible that a window cancels the quitting by <nl> returning ` false ` in the ` beforeunload ` event handler . <nl> <nl> + # # # ` app . hide ( ) ` _OS X_ <nl> + <nl> + Hides all application windows without minimising them . <nl> + <nl> # # # ` app . exit ( exitCode ) ` <nl> <nl> * ` exitCode ` Integer <nl>
: apple : Add ' Hide ' to App API for OS X only
electron/electron
7a370ccd0f0aee2480e9fec2704b77dfb9747373
2016-01-29T15:09:54Z
mmm a / modules / tools / rosbag / transcribe . py <nl> ppp b / modules / tools / rosbag / transcribe . py <nl> <nl> from modules . planning . proto import planning_pb2 <nl> from modules . prediction . proto import prediction_obstacle_pb2 <nl> from modules . routing . proto import routing_pb2 <nl> + from modules . perception . proto import perception_obstacle_pb2 <nl> <nl> g_args = None <nl> <nl> - toic_msg_dict = { <nl> - " / apollo / planning " : planning_pb2 . ADCTrajectory , <nl> - " / apollo / prediction " : prediction_obstacle_pb2 . PredictionObstacles , <nl> - " / apollo / routing_response " : routing_pb2 . RoutingResponse , <nl> + topic_msg_dict = { <nl> + " / apollo / planning " : planning_pb2 . ADCTrajectory , <nl> + " / apollo / prediction " : prediction_obstacle_pb2 . PredictionObstacles , <nl> + " / apollo / perception " : perception_obstacle_pb2 . PerceptionObstacles , <nl> + " / apollo / routing_response " : routing_pb2 . RoutingResponse , <nl> + " / apollo / routing_request " : routing_pb2 . RoutingRequest , <nl> } <nl> <nl> <nl> def transcribe ( proto_msg ) : <nl> g_args = parser . parse_args ( ) <nl> if not os . path . exists ( g_args . out_dir ) : <nl> os . makedirs ( g_args . out_dir ) <nl> - rospy . init_node ( ' trascribe_node ' , anonymous = True ) <nl> - if g_args . topic = = ' / apollo / planning ' : <nl> - rospy . Subscriber ( g_args . topic , planning_pb2 . ADCTrajectory , transcribe ) <nl> - if g_args . topic = = ' / apollo / prediction ' : <nl> - rospy . Subscriber ( g_args . topic , planning_pb2 . ADCTrajectory , transcribe ) <nl> - else : <nl> + if g_args . topic not in topic_msg_dict : <nl> print " Unknown topic name : % s " % ( g_args . topic ) <nl> + sys . exit ( 0 ) <nl> + rospy . init_node ( ' trascribe_node ' , anonymous = True ) <nl> + rospy . Subscriber ( g_args . topic , topic_msg_dict [ g_args . topic ] , transcribe ) <nl> rospy . spin ( ) <nl>
tools : fix transcribe tool
ApolloAuto/apollo
c70a61e2f5b3193fc6452deb012f6b977697e4f3
2017-10-16T18:07:40Z
mmm a / tools / buildsteps / defaultenv <nl> ppp b / tools / buildsteps / defaultenv <nl> PATH_CHANGE_REV_FILENAME = " . last_success_revision " <nl> FAILED_BUILD_FILENAME = " . last_failed_revision " <nl> # TARBALLS ENV - VAR is only used by android scripts atm <nl> TARBALLS = $ { TARBALLS : - " / opt / xbmc - tarballs " } <nl> + RENDER_SYSTEM = $ { RENDER_SYSTEM : - " Default " } <nl> <nl> BINARY_ADDONS_ROOT = tools / depends / target <nl> BINARY_ADDONS = " binary - addons " <nl> case $ XBMC_PLATFORM_DIR in <nl> linux * ) <nl> DEFAULT_XBMC_DEPENDS_ROOT = $ WORKSPACE / tools / depends / xbmc - depends <nl> DEFAULT_CONFIGURATION = " Debug " <nl> + DEFAULT_RENDER_SYSTEM = " gl " <nl> ; ; <nl> <nl> freebsd ) <nl> then <nl> DEBUG_SWITCH = ' - - disable - debug ' <nl> fi <nl> <nl> + if [ " $ RENDER_SYSTEM " = = " Default " ] <nl> + then <nl> + RENDER_SYSTEM = $ DEFAULT_RENDER_SYSTEM <nl> + fi <nl> + <nl> # helper functions <nl> <nl> # hash a dir based on the git revision , Configuration , SDK_PATH , NDK_PATH , NDK_VERSION , SDK_VERSION , TOOLCHAIN and XBMC_DEPENDS_ROOT <nl> mmm a / tools / buildsteps / linux - aarch64 - gbm / configure - depends <nl> ppp b / tools / buildsteps / linux - aarch64 - gbm / configure - depends <nl> XBMC_PLATFORM_DIR = linux - aarch64 - gbm <nl> if [ " $ ( pathChanged $ WORKSPACE / tools / depends ) " = = " 1 " ] <nl> then <nl> cd $ WORKSPACE / tools / depends ; . / configure \ <nl> - - - with - toolchain = / usr - - prefix = $ XBMC_DEPENDS_ROOT - - host = aarch64 - linux - gnu - - with - rendersystem = gles - - with - tarballs = $ TARBALLS $ DEBUG_SWITCH <nl> + - - with - toolchain = / usr - - prefix = $ XBMC_DEPENDS_ROOT - - host = aarch64 - linux - gnu - - with - rendersystem = $ RENDER_SYSTEM - - with - tarballs = $ TARBALLS $ DEBUG_SWITCH <nl> fi <nl> mmm a / tools / buildsteps / linux - arm - gbm / configure - depends <nl> ppp b / tools / buildsteps / linux - arm - gbm / configure - depends <nl> XBMC_PLATFORM_DIR = linux - arm - gbm <nl> if [ " $ ( pathChanged $ WORKSPACE / tools / depends ) " = = " 1 " ] <nl> then <nl> cd $ WORKSPACE / tools / depends ; . / configure \ <nl> - - - with - toolchain = / usr - - prefix = $ XBMC_DEPENDS_ROOT - - host = arm - linux - gnueabihf - - with - rendersystem = gles - - with - tarballs = $ TARBALLS $ DEBUG_SWITCH <nl> + - - with - toolchain = / usr - - prefix = $ XBMC_DEPENDS_ROOT - - host = arm - linux - gnueabihf - - with - rendersystem = $ RENDER_SYSTEM - - with - tarballs = $ TARBALLS $ DEBUG_SWITCH <nl> fi <nl> mmm a / tools / buildsteps / linux64 / configure - depends <nl> ppp b / tools / buildsteps / linux64 / configure - depends <nl> XBMC_PLATFORM_DIR = linux64 <nl> if [ " $ ( pathChanged $ WORKSPACE / tools / depends ) " = = " 1 " ] <nl> then <nl> cd $ WORKSPACE / tools / depends ; . / configure \ <nl> - - - with - toolchain = / usr - - prefix = $ XBMC_DEPENDS_ROOT - - host = x86_64 - linux - gnu - - with - rendersystem = gl - - with - tarballs = $ TARBALLS $ DEBUG_SWITCH <nl> + - - with - toolchain = / usr - - prefix = $ XBMC_DEPENDS_ROOT - - host = x86_64 - linux - gnu - - with - rendersystem = $ RENDER_SYSTEM - - with - tarballs = $ TARBALLS $ DEBUG_SWITCH <nl> fi <nl>
tools / buildsteps : allow specifying the render system via env variable
xbmc/xbmc
f0b91e1fc233d90e1690b7a001eee0fdfa4cec21
2020-10-27T20:29:58Z
mmm a / src / cmake_modules / FindTesseract . cmake <nl> ppp b / src / cmake_modules / FindTesseract . cmake <nl> include ( LibFindMacros ) <nl> find_path ( Tesseract_INCLUDE_BASEAPI_DIR <nl> NAMES tesseract / baseapi . h <nl> HINTS " / usr / include " <nl> + " / usr / include / tesseract " <nl> " / usr / local / include " <nl> + " / usr / local / include / tesseract " <nl> $ { Tesseract_PKGCONF_INCLUDE_DIRS } <nl> $ { CMAKE_SOURCE_DIR } / . . / libraries / tesseract - ocr / api / <nl> ) <nl> find_path ( Tesseract_INCLUDE_CCSTRUCT_DIR <nl> NAMES publictypes . h <nl> HINTS " / usr / include " <nl> + " / usr / include / tesseract " <nl> " / usr / local / include " <nl> + " / usr / local / include / tesseract " <nl> $ { Tesseract_PKGCONF_INCLUDE_DIRS } <nl> $ { CMAKE_SOURCE_DIR } / . . / libraries / tesseract - ocr / ccstruct / <nl> ) <nl> find_path ( Tesseract_INCLUDE_CCMAIN_DIR <nl> NAMES thresholder . h <nl> HINTS " / usr / include " <nl> + " / usr / include / tesseract " <nl> " / usr / local / include " <nl> + " / usr / local / include / tesseract " <nl> $ { Tesseract_PKGCONF_INCLUDE_DIRS } <nl> $ { CMAKE_SOURCE_DIR } / . . / libraries / tesseract - ocr / ccmain / <nl> ) <nl> find_path ( Tesseract_INCLUDE_CCUTIL_DIR <nl> NAMES platform . h <nl> HINTS " / usr / include " <nl> + " / usr / include / tesseract " <nl> " / usr / local / include " <nl> + " / usr / local / include / tesseract " <nl> $ { Tesseract_PKGCONF_INCLUDE_DIRS } <nl> $ { CMAKE_SOURCE_DIR } / . . / libraries / tesseract - ocr / ccutil / <nl> ) <nl>
Added extra hints for finding Tesseract includes
openalpr/openalpr
1f583be49e4d16f0b11b88423569d2316aaf5da8
2014-08-29T00:51:01Z
mmm a / test / lit . site . cfg . in <nl> ppp b / test / lit . site . cfg . in <nl> if " @ SWIFT_OPTIMIZED @ " = = " ON " or " @ SWIFT_OPTIMIZED @ " = = " YES " : <nl> config . available_features . add ( " optimized_stdlib " ) <nl> <nl> # Let the main config do the real work . <nl> - config . test_exec_root = os . path . dirname ( os . path . realpath ( __file__ ) ) <nl> + if config . test_exec_root is None : <nl> + config . test_exec_root = os . path . dirname ( os . path . realpath ( __file__ ) ) <nl> lit_config . load_config ( config , " @ SWIFT_SOURCE_DIR @ / test / lit . cfg " ) <nl> mmm a / validation - test / lit . site . cfg . in <nl> ppp b / validation - test / lit . site . cfg . in <nl> import platform <nl> <nl> # # Autogenerated by Swift configuration . <nl> # Do not edit ! <nl> + config . llvm_src_root = " @ LLVM_MAIN_SRC_DIR @ " <nl> + config . llvm_obj_root = " @ LLVM_BINARY_DIR @ " <nl> + config . llvm_tools_dir = " @ LLVM_TOOLS_DIR @ " <nl> + config . llvm_libs_dir = " @ LLVM_LIBS_DIR @ " <nl> + config . lit_tools_dir = " @ LLVM_LIT_TOOLS_DIR @ " <nl> + config . swift_src_root = " @ SWIFT_SOURCE_DIR @ " <nl> + config . swift_obj_root = " @ SWIFT_BINARY_DIR @ " <nl> + config . target_triple = " @ TARGET_TRIPLE @ " <nl> + config . targets_to_build = " @ TARGETS_TO_BUILD @ " <nl> + config . module_cache_path = " @ SWIFT_MODULE_CACHE_PATH @ " <nl> + config . modules_sdk = " @ MODULES_SDK @ " <nl> + <nl> + # Support substitution of the tools and libs dirs with user parameters . This is <nl> + # used when we can ' t determine the tool dir at configuration time . <nl> + try : <nl> + config . llvm_tools_dir = config . llvm_tools_dir % lit_config . params <nl> + config . llvm_libs_dir = config . llvm_libs_dir % lit_config . params <nl> + except KeyError : <nl> + e = sys . exc_info ( ) [ 1 ] <nl> + key , = e . args <nl> + lit_config . fatal ( " unable to find % r parameter , use ' - - param = % s = VALUE ' " % ( key , key ) ) <nl> <nl> # Let the main config do the real work . <nl> + config . test_exec_root = os . path . dirname ( os . path . realpath ( __file__ ) ) <nl> lit_config . load_config ( config , " @ SWIFT_SOURCE_DIR @ / validation - test / lit . cfg " ) <nl> <nl>
[ CMake ] Fix validation testing for variant build .
apple/swift
84514e536fc34efb9225b09926081c4a59b60c17
2014-08-08T22:50:43Z
mmm a / src / video_core / shader / decode / image . cpp <nl> ppp b / src / video_core / shader / decode / image . cpp <nl> u32 GetComponentSize ( TextureFormat format , std : : size_t component ) { <nl> return 0 ; <nl> case TextureFormat : : G24R8 : <nl> if ( component = = 0 ) { <nl> - return 8 ; <nl> + return 24 ; <nl> } <nl> if ( component = = 1 ) { <nl> - return 24 ; <nl> + return 8 ; <nl> } <nl> return 0 ; <nl> case TextureFormat : : G8R8 : <nl>
decoder / image : Fix incorrect G24R8 component sizes in GetComponentSize ( )
yuzu-emu/yuzu
b178c9a3492ea6c0db63f708beecd3dfb3d921fe
2020-04-16T02:10:44Z
mmm a / xbmc / utils / LangCodeExpander . cpp <nl> ppp b / xbmc / utils / LangCodeExpander . cpp <nl> typedef struct LCENTRY <nl> } LCENTRY ; <nl> <nl> extern const struct LCENTRY g_iso639_1 [ 145 ] ; <nl> - extern const struct LCENTRY g_iso639_2 [ 537 ] ; <nl> + extern const struct LCENTRY g_iso639_2 [ 538 ] ; <nl> <nl> struct CharCodeConvertionWithHack <nl> { <nl> extern const LCENTRY g_iso639_1 [ 145 ] = <nl> { MAKECODE ( ' \ 0 ' , ' \ 0 ' , ' z ' , ' u ' ) , " Zulu " } , <nl> } ; <nl> <nl> - extern const LCENTRY g_iso639_2 [ 537 ] = <nl> + extern const LCENTRY g_iso639_2 [ 538 ] = <nl> { <nl> { MAKECODE ( ' \ 0 ' , ' a ' , ' b ' , ' k ' ) , " Abkhaz " } , <nl> { MAKECODE ( ' \ 0 ' , ' a ' , ' b ' , ' k ' ) , " Abkhazian " } , <nl> extern const LCENTRY g_iso639_2 [ 537 ] = <nl> { MAKECODE ( ' \ 0 ' , ' z ' , ' h ' , ' a ' ) , " Zhuang " } , <nl> { MAKECODE ( ' \ 0 ' , ' z ' , ' u ' , ' l ' ) , " Zulu " } , <nl> { MAKECODE ( ' \ 0 ' , ' z ' , ' u ' , ' n ' ) , " Zuni " } , <nl> + { MAKECODE ( ' \ 0 ' , ' u ' , ' n ' , ' d ' ) , " Undetermined " } , / / non - ISO entry for Matroska special language code <nl> } ; <nl> <nl> const CharCodeConvertionWithHack CharCode2To3 [ 184 ] = <nl>
Merge pull request from Karlson2k / langcodexpander_fix_01
xbmc/xbmc
589e92f743576b096a1cf8ddb59e0772d11ef9fc
2013-10-15T17:26:57Z
new file mode 100644 <nl> index 000000000000 . . 7545dfb2caa0 <nl> Binary files / dev / null and b / tools / XBMCLive / SDK / Tools / squashfs - udeb / 2 . 6 . 31 - 14 - generic / kernel / fs / squashfs / squashfs . ko differ <nl> new file mode 100644 <nl> index 000000000000 . . 5237cba00f89 <nl> mmm / dev / null <nl> ppp b / tools / XBMCLive / SDK / Tools / squashfs - udeb / debian / changelog <nl> <nl> + squashfs - udeb ( 0 . 1 ) karmic ; urgency = low <nl> + <nl> + * Initial release <nl> + <nl> + - - Luigi Capriotti < l . capriotti @ xbmc . org > Fri , 06 Nov 2009 15 : 00 : 00 + 0100 <nl> new file mode 100644 <nl> index 000000000000 . . 59cdc3f8bc98 <nl> mmm / dev / null <nl> ppp b / tools / XBMCLive / SDK / Tools / squashfs - udeb / debian / control <nl> <nl> + Source : squashfs - udeb <nl> + Section : debian - installer <nl> + Priority : optional <nl> + Maintainer : Luigi Capriotti < l . capriotti @ xbmc . org > <nl> + Build - Depends : debhelper ( > = 5 . 0 . 22 ) <nl> + <nl> + Package : squashfs - udeb <nl> + Architecture : i386 <nl> + XC - Package - Type : udeb <nl> + Depends : $ { shlibs : Depends } , $ { misc : Depends } <nl> + Description : Squashfs kernel module for Debian Installer <nl> + <nl> + <nl> new file mode 100644 <nl> index 000000000000 . . 68d9327808d5 <nl> mmm / dev / null <nl> ppp b / tools / XBMCLive / SDK / Tools / squashfs - udeb / debian / install <nl> @ @ - 0 , 0 + 1 @ @ <nl> + 2 . 6 . 31 - 14 - generic lib / modules <nl> new file mode 100755 <nl> index 000000000000 . . 2d33f6ac8992 <nl> mmm / dev / null <nl> ppp b / tools / XBMCLive / SDK / Tools / squashfs - udeb / debian / rules <nl> <nl> + # ! / usr / bin / make - f <nl> + <nl> + % : <nl> + dh $ @ <nl> new file mode 100644 <nl> index 000000000000 . . bd7f3ed0cb57 <nl> mmm / dev / null <nl> ppp b / tools / XBMCLive / SDK / Tools / squashfs - udeb / debian / squashfs - udeb . postinst <nl> <nl> + # ! / bin / sh <nl> + <nl> + depmod - a <nl>
karmic ' s d - i does not include squashfs module ( fixed in lucid ) - forgot recursive
xbmc/xbmc
7013c890b6a156bcaaa2e18a4b4ca6175344d45e
2009-12-01T15:14:40Z
mmm a / PowerEditor / bin / change . log <nl> ppp b / PowerEditor / bin / change . log <nl> <nl> - Notepad + + v6 . 6 . 7 new feature and bug fixes : <nl> + Notepad + + v6 . 6 . 8 new feature and bug fixes : <nl> <nl> - 1 . Settings on cloud - OneDrive . <nl> - 2 . Fix the crash issue on start up for some context . <nl> + 1 . Settings on cloud - Google Drive . <nl> + 2 . Fix Settings on cloud - OneDrive detection error . <nl> + 3 . Make internal docking dialogs apply the selected theme ' s background and foreground colours . <nl> + 4 . Fix the bug that " backslash is escape char for SQL " setting is not saved correctly . <nl> + 5 . Fix the bug that user cannot disable " backslash is SQL escape char " without restarting . <nl> + 6 . Fix DocMap ' s syntax highlighting doesn ' t update while current doc apply a new syntax highlighting . <nl> + 7 . Add 2 new plugins APIs : NPPM_GETEDITORDEFAULTBACKGROUNDCOLOR & NPPM_GETEDITORDEFAULTFOREGROUNDCOLOR <nl> + 8 . Add new notification NPPN_SNAPSHOTDIRTYFILELOADED to notify plugins that a snapshot dirty file is loaded on startup . <nl> <nl> <nl> Included plugins : <nl> mmm a / PowerEditor / installer / nativeLang / chinese . xml <nl> ppp b / PowerEditor / installer / nativeLang / chinese . xml <nl> <nl> < ? xml version = " 1 . 0 " encoding = " Big5 " ? > <nl> < NotepadPlus > <nl> - < Native - Langue name = " ¤ ¤ ¤ åÁcÅé " filename = " chinese . xml " version = " 6 . 5 . 4 " > <nl> + < Native - Langue name = " ¤ ¤ ¤ åÁcÅé " filename = " chinese . xml " version = " 6 . 6 . 8 " > <nl> < Menu > <nl> < Main > <nl> < ! - - Main Menu Entries - - > <nl> mmm a / PowerEditor / installer / nativeLang / chineseSimplified . xml <nl> ppp b / PowerEditor / installer / nativeLang / chineseSimplified . xml <nl> <nl> < Item id = " 6508 " name = " ³ÌÐòÓïÑԲ˵ ¥ " / > <nl> < / LangMenu > <nl> <nl> - < TabSettings title = " Ñ ¡ Ïî ¿ ¨ ÉèÖà " > <nl> - < Item id = " 6301 " name = " Ñ ¡ Ïî ¿ ¨ ÉèÖà " / > <nl> - < Item id = " 6302 " name = " ʹÓà ¿ Õ ¸ ñÌæ » » " / > <nl> - < Item id = " 6303 " name = " Ñ ¡ Ïî ¿ ¨ ´ óÐ ¡ : " / > <nl> + < TabSettings title = " ÖÆ ± í · ûÉèÖà " > <nl> + < Item id = " 6301 " name = " ÖÆ ± í · ûÉèÖà " / > <nl> + < Item id = " 6302 " name = " × ª » » Ϊ ¿ Õ ¸ ñ " / > <nl> + < Item id = " 6303 " name = " ÖÆ ± í · û ¿ í ¶ È : " / > <nl> < Item id = " 6510 " name = " ʹÓÃÄ ¬ ÈÏÖµ " / > <nl> < / TabSettings > <nl> <nl> mmm a / PowerEditor / installer / nativeLang / english . xml <nl> ppp b / PowerEditor / installer / nativeLang / english . xml <nl> <nl> < ? xml version = " 1 . 0 " encoding = " Windows - 1252 " ? > <nl> < NotepadPlus > <nl> - < Native - Langue name = " English " filename = " english . xml " version = " 6 . 5 . 4 " > <nl> + < Native - Langue name = " English " filename = " english . xml " version = " 6 . 6 . 8 " > <nl> < Menu > <nl> < Main > <nl> < ! - - Main Menu Entries - - > <nl> mmm a / PowerEditor / installer / nativeLang / french . xml <nl> ppp b / PowerEditor / installer / nativeLang / french . xml <nl> <nl> < ? xml version = " 1 . 0 " encoding = " Windows - 1252 " ? > <nl> < NotepadPlus > <nl> - < Native - Langue name = " Français " filename = " french . xml " version = " 6 . 5 . 4 " > <nl> + < Native - Langue name = " Français " filename = " french . xml " version = " 6 . 6 . 8 " > <nl> < Menu > <nl> < Main > <nl> < ! - - Main Menu Entries - - > <nl> mmm a / PowerEditor / installer / nativeLang / german . xml <nl> ppp b / PowerEditor / installer / nativeLang / german . xml <nl> <nl> < ? xml version = " 1 . 0 " encoding = " Windows - 1252 " ? > <nl> + <nl> < ! - - <nl> - German localization for Notepad + + 6 . 4 . 2 <nl> - Last modified Tue , 9 July 2013 by Jan Schreiber . <nl> - Please e - mail errors , suggestions etc . to janschreiber ( at ) users . sf . net . <nl> + German localization for Notepad + + 6 . 6 . 7 , <nl> + last modified 2014 - 07 - 01 by Jan Schreiber . <nl> + <nl> + Please e - mail errors , suggestions etc . to janschreiber ( at ) users . sf . net , <nl> + or participate in the discussion in the sourceforge forum : <nl> + https : / / sourceforge . net / p / notepad - plus / discussion / 558104 / thread / ce46d9d8 / <nl> + <nl> + The most recent version of this file can usually be downloaded from <nl> + https : / / drive . google . com / file / d / 0B2khHHcwKI_hdlJ6Xy1tRUZNUFU / edit ? usp = sharing <nl> - - > <nl> + <nl> < NotepadPlus > <nl> < Native - Langue name = " Deutsch " filename = " german . xml " > <nl> < ! - - Menus : - - > <nl> <nl> < / Entries > <nl> < ! - - Sub Menus : - - > <nl> < SubEntries > <nl> + < Item subMenuId = " file - closeMore " name = " & amp ; Mehrere schließen " / > <nl> < Item subMenuId = " file - recentFiles " name = " Zuletzt & amp ; verwendet " / > <nl> + < Item subMenuId = " file - openFolder " name = " Aktuellen & amp ; Ordner öffnen " / > <nl> < Item subMenuId = " edit - copyToClipboard " name = " Datei & amp ; pfad kopieren " / > <nl> < Item subMenuId = " edit - indent " name = " Ein & amp ; rückung " / > <nl> < Item subMenuId = " edit - convertCaseTo " name = " & amp ; Groß - / Kleinschreibung " / > <nl> <nl> < Item subMenuId = " view - collapseLevel " name = " Te & amp ; xtblöcke schließen " / > <nl> < Item subMenuId = " view - uncollapseLevel " name = " Te & amp ; xtblöcke öffnen " / > <nl> < Item subMenuId = " view - project " name = " Projektver & amp ; waltung " / > <nl> + < Item subMenuId = " view - tab " name = " & amp ; Tabs " / > <nl> < Item subMenuId = " encoding - characterSets " name = " & amp ; Zeichensatz " / > <nl> < Item subMenuId = " encoding - arabic " name = " & amp ; Arabisch " / > <nl> < Item subMenuId = " encoding - baltic " name = " & amp ; Baltisch " / > <nl> <nl> < Item id = " 41006 " name = " & amp ; Speichern " / > <nl> < Item id = " 41007 " name = " & amp ; Alle speichern " / > <nl> < Item id = " 41008 " name = " Speichern & amp ; unter . . . " / > <nl> + < Item id = " 41009 " name = " Dateien & amp ; links schließen " / > <nl> < Item id = " 41010 " name = " & amp ; Drucken . . . " / > <nl> < Item id = " 41011 " name = " B & amp ; eenden " / > <nl> < Item id = " 41012 " name = " Sit & amp ; zung öffnen . . . " / > <nl> <nl> < Item id = " 41015 " name = " & amp ; Kopie speichern unter . . . " / > <nl> < Item id = " 41016 " name = " Von Datentr & amp ; äger löschen " / > <nl> < Item id = " 41017 " name = " Um & amp ; benennen . . . " / > <nl> + < Item id = " 41018 " name = " Dateien & amp ; rechts schließen " / > <nl> + < Item id = " 41019 " name = " E & amp ; xplorer " / > <nl> + < Item id = " 41020 " name = " & amp ; Kommandozeile " / > <nl> < Item id = " 42001 " name = " Aus & amp ; schneiden " / > <nl> < Item id = " 42002 " name = " & amp ; Kopieren " / > <nl> < Item id = " 42003 " name = " & amp ; Rückgängig " / > <nl> <nl> < Item id = " 42032 " name = " Makro & amp ; mehrfach ausführen . . . " / > <nl> < Item id = " 42033 " name = " Schreibsch & amp ; utz - Attribut löschen " / > <nl> < Item id = " 42034 " name = " & amp ; Block - Editor . . . " / > <nl> - < Item id = " 42035 " name = " Bloc & amp ; k auskommentieren " / > <nl> - < Item id = " 42036 " name = " Blo & amp ; ck einkommentieren " / > <nl> + < Item id = " 42035 " name = " Zeilen aus & amp ; kommentieren " / > <nl> + < Item id = " 42036 " name = " Zeilen ei & amp ; nkommentieren " / > <nl> < Item id = " 42037 " name = " Spalten - & amp ; Modus . . . " / > <nl> < Item id = " 42038 " name = " & amp ; HTML - Inhalt einfügen " / > <nl> < Item id = " 42039 " name = " & amp ; RTF - Inhalt einfügen " / > <nl> <nl> < Item id = " 42054 " name = " Leerzeichen in & amp ; Tabulatoren umwandeln ( alle ) " / > <nl> < Item id = " 42055 " name = " & amp ; Leerzeilen ( nur völlig leere ) löschen " / > <nl> < Item id = " 42056 " name = " Leerzeilen ( auch mit & amp ; Whitespace ) löschen " / > <nl> + < Item id = " 42057 " name = " Leerzeile & amp ; über aktueller Zeile einfügen " / > <nl> + < Item id = " 42058 " name = " Leerzeile u & amp ; nter aktueller Zeile einfügen " / > <nl> + < Item id = " 42059 " name = " Zeilen au & amp ; fsteigend sortieren " / > <nl> + < Item id = " 42060 " name = " Zeilen a & amp ; bsteigend sortieren " / > <nl> < Item id = " 43001 " name = " & amp ; Suchen . . . " / > <nl> < Item id = " 43002 " name = " & amp ; Weitersuchen " / > <nl> < Item id = " 43003 " name = " & amp ; Ersetzen . . . " / > <nl> <nl> < Item id = " 43050 " name = " Lesezeichen inver & amp ; tieren " / > <nl> < Item id = " 43051 " name = " & amp ; Zeilen ohne Lesezeichen löschen " / > <nl> < Item id = " 43052 " name = " Suche nach & amp ; Zeichencodes . . . " / > <nl> + < Item id = " 43053 " name = " Alles zwische & amp ; n Klammern auswählen " / > <nl> < Item id = " 44009 " name = " & amp ; Post - It " / > <nl> < Item id = " 44010 " name = " Alle Te & amp ; xtblöcke schließen " / > <nl> < Item id = " 44011 " name = " Benutzerdefinierte Spra & amp ; che . . . " / > <nl> <nl> < Item id = " 44081 " name = " Projektfenster & amp ; 1 " / > <nl> < Item id = " 44082 " name = " Projektfenster & amp ; 2 " / > <nl> < Item id = " 44083 " name = " Projektfenster & amp ; 3 " / > <nl> - < Item id = " 44084 " name = " Funktionslis & amp ; te " / > <nl> + < Item id = " 44084 " name = " & amp ; Funktionsliste " / > <nl> + < Item id = " 44086 " name = " & amp ; 1 . Tab " / > <nl> + < Item id = " 44087 " name = " & amp ; 2 . Tab " / > <nl> + < Item id = " 44088 " name = " & amp ; 3 . Tab " / > <nl> + < Item id = " 44089 " name = " & amp ; 4 . Tab " / > <nl> + < Item id = " 44090 " name = " & amp ; 5 . Tab " / > <nl> + < Item id = " 44091 " name = " & amp ; 6 . Tab " / > <nl> + < Item id = " 44092 " name = " & amp ; 7 . Tab " / > <nl> + < Item id = " 44093 " name = " & amp ; 8 . Tab " / > <nl> + < Item id = " 44094 " name = " & amp ; 9 . Tab " / > <nl> + < Item id = " 44095 " name = " & amp ; Nächster Tab " / > <nl> + < Item id = " 44096 " name = " & amp ; Vorheriger Tab " / > <nl> < Item id = " 45001 " name = " Konvertiere zu & amp ; Windows ( CR + LF ) " / > <nl> < Item id = " 45002 " name = " Konvertiere zu & amp ; UNIX ( LF ) " / > <nl> < Item id = " 45003 " name = " Konvertiere zu & amp ; Mac ( CR ) " / > <nl> <nl> < Item id = " 47000 " name = " & amp ; Info . . . " / > <nl> < Item id = " 47001 " name = " Notepad + + im & amp ; Web " / > <nl> < Item id = " 47002 " name = " Notepad + + bei & amp ; SourceForge " / > <nl> - < Item id = " 47003 " name = " & amp ; Online - Hilfe " / > <nl> < Item id = " 47004 " name = " & amp ; Forum " / > <nl> < Item id = " 47005 " name = " & amp ; Erweiterungen " / > <nl> < Item id = " 47006 " name = " Notepad + + aktualisieren " / > <nl> - < Item id = " 47007 " name = " FA & amp ; Q " / > <nl> < Item id = " 47008 " name = " In & amp ; halt . . . " / > <nl> + < Item id = " 47010 " name = " & amp ; Kommandozeilenparameter . . . " / > <nl> < Item id = " 48005 " name = " & amp ; Plugin ( s ) importieren . . . " / > <nl> < Item id = " 48006 " name = " & amp ; Design ( s ) importieren . . . " / > <nl> < Item id = " 48009 " name = " & amp ; Tastatur . . . " / > <nl> <nl> < Item id = " 50000 " name = " & amp ; Funktionsvervollständigung " / > <nl> < Item id = " 50001 " name = " & amp ; Wortvervollständigung " / > <nl> < Item id = " 50002 " name = " Funktions & amp ; parameter anzeigen " / > <nl> + < Item id = " 50006 " name = " & amp ; Dateipfad vervollständigen " / > <nl> < / Commands > <nl> < / Main > <nl> < Splitter / > <nl> <nl> < Item CMID = " 14 " name = " In neue & amp ; Instanz verschieben " / > <nl> < Item CMID = " 15 " name = " In neue Instan & amp ; z duplizieren " / > <nl> < Item CMID = " 16 " name = " Neu & amp ; laden " / > <nl> + < Item CMID = " 17 " name = " Dateien links schlie & amp ; ßen " / > <nl> + < Item CMID = " 18 " name = " Dateien rech & amp ; ts schließen " / > <nl> + < Item CMID = " 19 " name = " Ordner im E & amp ; xplorer öffnen " / > <nl> + < Item CMID = " 20 " name = " Kommandozeile im aktuellen & amp ; Ordner öffnen " / > <nl> < / TabBar > <nl> < / Menu > <nl> < ! - - Dialog Windows : - - > <nl> <nl> < Item id = " 21225 " name = " Mitte " / > <nl> < Item id = " 21226 " name = " Ende " / > <nl> < Item id = " 21227 " name = " Stil " / > <nl> - < Item id = " 21320 " name = " Textblöcke im Code 2 " / > <nl> + < Item id = " 21320 " name = " Textblöcke im Code 2 ( mit Trennzeichen ) " / > <nl> < Item id = " 21324 " name = " Anfang " / > <nl> < Item id = " 21325 " name = " Mitte " / > <nl> < Item id = " 21326 " name = " Ende " / > <nl> <nl> < Item id = " 6119 " name = " Mehrzeilig " / > <nl> < Item id = " 6120 " name = " Vertikal " / > <nl> < Item id = " 6121 " name = " Menüleiste " / > <nl> - < Item id = " 6122 " name = " Ausblenden ( wechseln : Alt oder F10 ) " / > <nl> + < Item id = " 6122 " name = " Menüleiste ausblenden ( wechseln : Alt oder F10 ) " / > <nl> < Item id = " 6123 " name = " Sprache der Benutzeroberfläche " / > <nl> - < Item id = " 6125 " name = " Liste der offenen Dateien ( Doc Switcher ) " / > <nl> + < Item id = " 6125 " name = " Liste der geöffneten Dateien " / > <nl> < Item id = " 6126 " name = " Anzeigen " / > <nl> + < Item id = " 6127 " name = " Erweiterungsspalte ausblenden " / > <nl> < / Global > <nl> + < MultiInstance title = " Mehrere Instanzen " > <nl> + < Item id = " 6151 " name = " Mehrere Instanzen " / > <nl> + < Item id = " 6152 " name = " Sitzungsdateien in einer neuen Instanz öffnen " / > <nl> + < Item id = " 6153 " name = " Immer im Mehrinstanzmodus " / > <nl> + < Item id = " 6154 " name = " Standard ( nur eine Instanz ) " / > <nl> + < Item id = " 6155 " name = " * Notepad + + muss neu gestartet werden " / > <nl> + < / MultiInstance > <nl> < Scintillas title = " Oberfläche 2 " > <nl> < Item id = " 6201 " name = " Textblock - Faltung " / > <nl> < Item id = " 6202 " name = " Plus / minus " / > <nl> < Item id = " 6203 " name = " Pfeile " / > <nl> - < Item id = " 6204 " name = " Kreise " / > <nl> + < Item id = " 6204 " name = " Kreise " / > <nl> < Item id = " 6205 " name = " Quadrate " / > <nl> < Item id = " 6206 " name = " Zeilennummernrand " / > <nl> < Item id = " 6207 " name = " Lesezeichenrand " / > <nl> <nl> < Item id = " 6229 " name = " Linksbündig " / > <nl> < Item id = " 6230 " name = " Hängend " / > <nl> < Item id = " 6231 " name = " Rahmenbreite " / > <nl> + < Item id = " 6234 " name = " Erweitertes Scrollen deaktivieren " / > <nl> < / Scintillas > <nl> + < Delimiter title = " Trennzeichen für erweiterte Auswahl " > <nl> + < Item id = " 6251 " name = " Trennzeichen ( Strg + Doppelklick ) " / > <nl> + < Item id = " 6252 " name = " Anfang " / > <nl> + < Item id = " 6255 " name = " Ende " / > <nl> + < Item id = " 6256 " name = " Über mehrere Zeilen " / > <nl> + < Item id = " 6257 " name = " bla bla bla bla bla bla " / > <nl> + < Item id = " 6258 " name = " bla bla bla bla bla bla bla bla bla bla bla bla " / > <nl> + < / Delimiter > <nl> < RecentFilesHistory title = " Zuletzt geöffnete Dateien " > <nl> < Item id = " 6304 " name = " Zuletzt geöffnete Dateien " / > <nl> < Item id = " 6305 " name = " Beim Programmstart nicht überprüfen " / > <nl> <nl> < Item id = " 6425 " name = " Nur Dateinamen " / > <nl> < Item id = " 6426 " name = " Namen mit vollem Pfad " / > <nl> < Item id = " 6427 " name = " Benutzerdefinierte Pfadlänge : " / > <nl> + < Item id = " 6429 " name = " Anzeige im Dateimenü " / > <nl> < / RecentFilesHistory > <nl> < NewDoc title = " Neue Dateien " > <nl> < Item id = " 6401 " name = " Zeilenende - Format " / > <nl> <nl> < MISC title = " Diverses " > <nl> < Item id = " 6307 " name = " Aktivieren " / > <nl> < Item id = " 6308 " name = " In Infobereich ( Tray ) minimieren " / > <nl> - < Item id = " 6309 " name = " Aktuelle Sitzung bis zum nächsten Start merken " / > <nl> < Item id = " 6312 " name = " Automatische Änderungserkennung " / > <nl> < Item id = " 6313 " name = " Ohne Rückfrage aktualisieren " / > <nl> < Item id = " 6114 " name = " Aktivieren " / > <nl> <nl> < Item id = " 6319 " name = " Aktivieren " / > <nl> < Item id = " 6320 " name = " Links nicht unterstreichen " / > <nl> < Item id = " 6322 " name = " Sitzungsdatei - Erw . : " / > <nl> - < Item id = " 6323 " name = " Automatisches Update aktivieren " / > <nl> + < Item id = " 6323 " name = " Automatische Updates aktivieren " / > <nl> < Item id = " 6324 " name = " Dokumentenumschalter ( Strg + Tab ) " / > <nl> < Item id = " 6325 " name = " Nach Aktualisierung zum Ende scrollen " / > <nl> < Item id = " 6326 " name = " Alle Wortvorkommnisse markieren " / > <nl> <nl> < Item id = " 6331 " name = " Nur Dateinamen in Titelleiste anzeigen " / > <nl> < Item id = " 6332 " name = " Groß - / Kleinschreibung unterscheiden " / > <nl> < Item id = " 6333 " name = " Mehrfache Markierung " / > <nl> - < Item id = " 6334 " name = " Enkodierung automatisch erkennen " / > <nl> + < Item id = " 6334 " name = " Kodierung automatisch erkennen " / > <nl> + < Item id = " 6335 " name = " Backslash ist Escapezeichen für SQL " / > <nl> < / MISC > <nl> - < Backup title = " Sicherheitskopie " > <nl> - < Item id = " 6801 " name = " Sicherheitskopie " / > <nl> - < Item id = " 6315 " name = " Keine " / > <nl> - < Item id = " 6316 " name = " Einfach " / > <nl> - < Item id = " 6317 " name = " Erweitert " / > <nl> - < Item id = " 6804 " name = " Verzeichnisangabe für die Sicherheitskopien " / > <nl> - < Item id = " 6803 " name = " Verzeichnis " / > <nl> + < Backup title = " Sicherheitskopien " > <nl> + < Item id = " 6801 " name = " Sicherheitskopie beim Speichern von Dateien " / > <nl> + < Item id = " 6315 " name = " keine " / > <nl> + < Item id = " 6316 " name = " einfach " / > <nl> + < Item id = " 6317 " name = " erweitert " / > <nl> + < Item id = " 6219 " name = " Verzeichnisangabe für die Sicherheitskopien " / > <nl> + < Item id = " 6803 " name = " Verzeichnis : " / > <nl> + < Item id = " 6817 " name = " Sitzungen automatisch speichern " / > <nl> + < Item id = " 6818 " name = " Sitzungen zeitgesteuert speichern " / > <nl> + < Item id = " 6819 " name = " Speichere Sitzung alle " / > <nl> + < Item id = " 6821 " name = " Sekunden " / > <nl> + < Item id = " 6822 " name = " Verzeichnis : " / > <nl> + < Item id = " 6309 " name = " Aktuelle Sitzung für den nächsten Start merken " / > <nl> < / Backup > <nl> + < ! - - TODO : - - > <nl> + < CloudSettings title = " Cloud " > <nl> + < Item id = " 6262 " name = " Einstellungen in der Cloud speichern " / > <nl> + < Item id = " 6263 " name = " aus " / > <nl> + < Item id = " 6264 " name = " Dropbox " / > <nl> + < Item id = " 6265 " name = " OneDrive " / > <nl> + < / CloudSettings > <nl> < AutoCompletion title = " Autovervollständigung " > <nl> < Item id = " 6807 " name = " Autovervollständigung " / > <nl> < Item id = " 6808 " name = " Autovervollständigung aktivieren " / > <nl> <nl> < Item id = " 6811 " name = " ab " / > <nl> < Item id = " 6813 " name = " Zeichen " / > <nl> < Item id = " 6814 " name = " ( mögliche Werte : 1 – 9 ) " / > <nl> - < Item id = " 6815 " name = " Funktionsparameter einblenden " / > <nl> + < Item id = " 6815 " name = " Funktionsparameter anzeigen " / > <nl> + < Item id = " 6816 " name = " Wort - und Funktionsvervollständigung " / > <nl> + < Item id = " 6851 " name = " Klammern automatisch schließen " / > <nl> + < Item id = " 6857 " name = " HTML / XML - Tags " / > <nl> + < Item id = " 6858 " name = " links " / > <nl> + < Item id = " 6859 " name = " rechts " / > <nl> + < Item id = " 6860 " name = " Zeichenpaar 1 : " / > <nl> + < Item id = " 6861 " name = " " / > <nl> + < Item id = " 6862 " name = " " / > <nl> + < Item id = " 6863 " name = " Zeichenpaar 2 : " / > <nl> + < Item id = " 6864 " name = " " / > <nl> + < Item id = " 6865 " name = " " / > <nl> + < Item id = " 6866 " name = " Zeichenpaar 3 : " / > <nl> + < Item id = " 6867 " name = " " / > <nl> + < Item id = " 6868 " name = " " / > <nl> < / AutoCompletion > <nl> < / Preference > <nl> < ! - - Run Macro Multiple Times : - - > <nl> <nl> < Item id = " 2 " name = " Abbre & amp ; chen " / > <nl> < / ColumnEditor > <nl> < / Dialog > <nl> + < ! - - Clipboard History : - - > <nl> + < ClipboardHistory > <nl> + < PanelTitle name = " Zwischenablage " / > <nl> + < / ClipboardHistory > <nl> + < ! - - Doc Switcher : - - > <nl> + < DocSwitcher > <nl> + < PanelTitle name = " Geöffnete Dateien " / > <nl> + < ColumnName name = " Name " / > <nl> + < ColumnExt name = " Erw . " / > <nl> + < / DocSwitcher > <nl> + < ! - - ASCII table : - - > <nl> + < AsciiInsertion > <nl> + < PanelTitle name = " Zeichentabelle " / > <nl> + < ColumnVal name = " Dezimal " / > <nl> + < ColumnChar name = " Zeichen " / > <nl> + < / AsciiInsertion > <nl> + < ! - - Document Map : - - > <nl> + < DocumentMap > <nl> + < PanelTitle name = " Miniaturansicht " / > <nl> + < / DocumentMap > <nl> + < ! - - Function List : - - > <nl> + < FunctionList > <nl> + < PanelTitle name = " Funktionsliste " / > <nl> + < SortTip name = " Sortieren " / > <nl> + < ReloadTip name = " Neu laden " / > <nl> + < / FunctionList > <nl> < ! - - Project Manager : - - > <nl> < ProjectManager > <nl> < PanelTitle name = " Projektverwaltung " / > <nl> mmm a / PowerEditor / installer / nativeLang / russian . xml <nl> ppp b / PowerEditor / installer / nativeLang / russian . xml <nl> <nl> < Item id = " 43006 " name = " Ê ñëåäóþùåé Çàêëàäêå " / > <nl> < Item id = " 43007 " name = " Ê ïðåäûäóùåé Çàêëàäêå " / > <nl> < Item id = " 43008 " name = " Óáðàòü âñå Çàêëàäêè " / > <nl> - < Item id = " 43009 " name = " Ïåðåéòè ê ïàðíîé ñêîáîêå " / > <nl> + < Item id = " 43009 " name = " Ïåðåéòè ê ïàðíîé ñêîáêå " / > <nl> < Item id = " 43010 " name = " Èñêàòü ðàíåå " / > <nl> < Item id = " 43011 " name = " Ïîèñê ïî ìåðå & amp ; íàáîðà . . . " / > <nl> < Item id = " 43013 " name = " Íàéòè â ôàéëàõ " / > <nl> <nl> < Item id = " 44023 " name = " Êðóïíåå ( Ctrl + Êîë . Ââåðõ ) " / > <nl> < Item id = " 44024 " name = " Ìåëü ÷ å ( Ctrl + Êîë . Âíèç ) " / > <nl> < Item id = " 44025 " name = " Îòîáðàæàòü Ïðîáåëû è Òàáóëÿöèè " / > <nl> - < Item id = " 44026 " name = " Îòîáðàæàòü ñèìâîë Êîíåöà Ñòðîêè " / > <nl> + < Item id = " 44026 " name = " Îòîáðàæàòü ñèìâîë Êîíöà Ñòðîêè " / > <nl> < Item id = " 44029 " name = " Ðàçâåðíóòü âñå áëîêè " / > <nl> < Item id = " 44030 " name = " Ñâåðíóòü òåêóùèé áëîê " / > <nl> < Item id = " 44031 " name = " Ðàçâåðíóòü òåêóùèé áëîê " / > <nl> <nl> < / GoToLine > <nl> <nl> < Run title = " Çàïóñê . . . " > <nl> - < Item id = " 1903 " name = " Ââåäèòå ïàðàìåòðà çàïóñêà ïðîãðàììû " / > <nl> + < Item id = " 1903 " name = " Ïðîãðàììà äëÿ çàïóñêà " / > <nl> < Item id = " 1 " name = " Çàïóñê ! " / > <nl> < Item id = " 2 " name = " Îòìåíà " / > <nl> < Item id = " 1904 " name = " Ñîõðàíèòü . . . " / > <nl> <nl> < Item id = " 6123 " name = " ßçûê èíòåðôåéñà " / > <nl> < Item id = " 6125 " name = " Ñïèñîê Äîêóìåíòîâ " / > <nl> < Item id = " 6126 " name = " Îòîáðàæàòü " / > <nl> - < Item id = " 6127 " name = " Îòêëþ ÷ èòü êîëîíêó ðàñøèðåíèÿ " / > <nl> + < Item id = " 6127 " name = " Îòêë . êîëîíêó ðàñøèðåíèÿ " / > <nl> < / Global > <nl> < Scintillas title = " Ïðàâêà " > <nl> < Item id = " 6201 " name = " Îôîðìëåíèå Òåêñò - áëîêà " / > <nl> <nl> < Item id = " 6404 " name = " Mac " / > <nl> < Item id = " 6405 " name = " Êîäèðîâêà " / > <nl> < Item id = " 6406 " name = " ANSI " / > <nl> - < Item id = " 6407 " name = " UTF - 8 áåç ìåòêè BOM " / > <nl> + < Item id = " 6407 " name = " UTF - 8 áåç BOM " / > <nl> < Item id = " 6408 " name = " UTF - 8 " / > <nl> < Item id = " 6409 " name = " UCS2 Big Endian " / > <nl> < Item id = " 6410 " name = " UCS2 Small Endian " / > <nl> mmm a / PowerEditor / installer / nativeLang / swedish . xml <nl> ppp b / PowerEditor / installer / nativeLang / swedish . xml <nl> <nl> < ? xml version = " 1 . 0 " encoding = " Windows - 1252 " ? > <nl> < NotepadPlus > <nl> - < Native - Langue name = " Svenska " filename = " swedish . xml " version = " 6 . 5 . 4 " > <nl> + < Native - Langue name = " Svenska " filename = " swedish . xml " version = " 6 . 6 . 7 " > <nl> < Menu > <nl> < Main > <nl> < ! - - Main Menu Entries - - > <nl> <nl> < / Menu > <nl> < Dialog > <nl> < Find title = " " titleFind = " Sök " titleReplace = " Ersätt " titleFindInFiles = " Sök i filer " titleMark = " Markera " > <nl> - < Item id = " 1 " name = " Sök nästa " / > <nl> + < Item id = " 1 " name = " Sök & amp ; nästa " / > <nl> < Item id = " 2 " name = " Stäng " / > <nl> - < Item id = " 1603 " name = " Sök hela ord " / > <nl> - < Item id = " 1604 " name = " Matcha små / stora bokstäver " / > <nl> - < Item id = " 1605 " name = " Reguljärt uttryck " / > <nl> - < Item id = " 1606 " name = " Loopa " / > <nl> - < Item id = " 1608 " name = " Ersätt " / > <nl> - < Item id = " 1609 " name = " Ersätt alla " / > <nl> + < Item id = " 1603 " name = " Sök & amp ; hela ord " / > <nl> + < Item id = " 1604 " name = " & amp ; Matcha små / stora bokstäver " / > <nl> + < Item id = " 1605 " name = " & amp ; Reguljärt uttryck " / > <nl> + < Item id = " 1606 " name = " & amp ; Loopa " / > <nl> + < Item id = " 1608 " name = " & amp ; Ersätt " / > <nl> + < Item id = " 1609 " name = " Ersätt & amp ; alla " / > <nl> < Item id = " 1611 " name = " Ersätt med . . . " / > <nl> < Item id = " 1612 " name = " Upp " / > <nl> < Item id = " 1613 " name = " Ner " / > <nl> <nl> < Item id = " 1620 " name = " Sök efter : " / > <nl> < Item id = " 1621 " name = " Sök " / > <nl> < Item id = " 1624 " name = " Sökläge " / > <nl> - < Item id = " 1625 " name = " Normal " / > <nl> - < Item id = " 1626 " name = " Utökat ( \ n , \ r , \ t , \ 0 , \ x . . . ) " / > <nl> - < Item id = " 1632 " name = " I markering " / > <nl> + < Item id = " 1625 " name = " N & amp ; ormal " / > <nl> + < Item id = " 1626 " name = " & amp ; Utökat ( \ n , \ r , \ t , \ 0 , \ x . . . ) " / > <nl> + < Item id = " 1632 " name = " I mar & amp ; kering " / > <nl> < Item id = " 1633 " name = " Rensa " / > <nl> < Item id = " 1635 " name = " Ersätt i öppnade filer " / > <nl> < Item id = " 1636 " name = " Sök i öppnade filer " / > <nl> <nl> < Item id = " 6123 " name = " Språk " / > <nl> < Item id = " 6125 " name = " Växla dokument " / > <nl> < Item id = " 6126 " name = " Visa " / > <nl> + < Item id = " 6127 " name = " Inaktivera filändelsekolumn " / > <nl> < / Global > <nl> < Scintillas title = " Redigera komponenter " > <nl> < Item id = " 6201 " name = " Mappliststil " / > <nl> <nl> < Item id = " 6117 " name = " Tillämpa senast använd - beteende ( MRU ) " / > <nl> < Item id = " 6307 " name = " Aktivera " / > <nl> < Item id = " 6308 " name = " Minimera till meddelandefältet " / > <nl> - < Item id = " 6309 " name = " Kom ihåg nuvarande session vid nästa körning " / > <nl> < Item id = " 6312 " name = " Automatisk avkänning av filstatus " / > <nl> < Item id = " 6313 " name = " Tyst uppdatering " / > <nl> < Item id = " 6318 " name = " Inställningar för klickbara länkar " / > <nl> <nl> < Item id = " 6331 " name = " Visa endast filnamn i titelrad " / > <nl> < Item id = " 6332 " name = " Matcha skiftläge " / > <nl> < Item id = " 6333 " name = " Smarta markeringar " / > <nl> + < Item id = " 6334 " name = " Automatisk igenkänning av teckenkodning " / > <nl> + < Item id = " 6335 " name = " Behandla backslash som escape - tecken för SQL " / > <nl> < / MISC > <nl> < Backup title = " Säkerhetskopiering " > <nl> + < Item id = " 6309 " name = " Kom ihåg nuvarande session vid nästa körning " / > <nl> < Item id = " 6315 " name = " Ingen " / > <nl> < Item id = " 6316 " name = " Enkel " / > <nl> < Item id = " 6317 " name = " Detaljerad " / > <nl> < Item id = " 6801 " name = " Säkerhetskopiering " / > <nl> < Item id = " 6803 " name = " Mapp : " / > <nl> < Item id = " 6804 " name = " Egen mapp för säkerhetskopiering " / > <nl> + < Item id = " 6817 " name = " Spara session och regelbunden säkerhetskopiering " / > <nl> + < Item id = " 6818 " name = " Aktivera spara session och regelbunden säkerhetskopiering " / > <nl> + < Item id = " 6819 " name = " Säkerhetskopiera var " / > <nl> + < Item id = " 6821 " name = " sekund " / > <nl> + < Item id = " 6822 " name = " Sökväg : " / > <nl> < / Backup > <nl> < AutoCompletion title = " Auto - komplettering " > <nl> < Item id = " 6807 " name = " Automatisk komplettering " / > <nl> <nl> < Item id = " 6255 " name = " Slut " / > <nl> < Item id = " 6256 " name = " Tillåt på flera rader " / > <nl> < / Delimiter > <nl> + < Cloud title = " Moln " > <nl> + < Item id = " 6262 " name = " Inställning för moln " / > <nl> + < Item id = " 6263 " name = " Inget moln " / > <nl> + < Item id = " 6264 " name = " Dropbox " / > <nl> + < Item id = " 6265 " name = " OneDrive " / > <nl> + < Item id = " 6266 " name = " Google Drive " / > <nl> + < / Cloud > <nl> < / Preference > <nl> < MultiMacro title = " Kör ett makro flera gånger " > <nl> < Item id = " 1 " name = " Kör " / > <nl> mmm a / PowerEditor / installer / nppSetup . nsi <nl> ppp b / PowerEditor / installer / nppSetup . nsi <nl> <nl> ; Define the application name <nl> ! define APPNAME " Notepad + + " <nl> <nl> - ! define APPVERSION " 6 . 6 . 7 " <nl> + ! define APPVERSION " 6 . 6 . 8 " <nl> ! define APPNAMEANDVERSION " $ { APPNAME } v $ { APPVERSION } " <nl> ! define VERSION_MAJOR 6 <nl> - ! define VERSION_MINOR 67 <nl> + ! define VERSION_MINOR 68 <nl> <nl> ! define APPWEBSITE " http : / / notepad - plus - plus . org / " <nl> <nl> mmm a / PowerEditor / installer / themes / Twilight . xml <nl> ppp b / PowerEditor / installer / themes / Twilight . xml <nl> <nl> <nl> Twilight <nl> Copyright ( c ) 2008 Fabio Zendhi Nagao < http : / / zend . lojcomm . com . br / > <nl> + 2011 - 2014 Renato Silva < br . renatosilva @ gmail . com > <nl> <nl> Permission is hereby granted , free of charge , to any person <nl> obtaining a copy of this software and associated documentation <nl> Credits : <nl> < WordsStyle name = " COMMENT DOC KEYWORD ERROR " styleID = " 18 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " objc " desc = " Objective - C " ext = " " > <nl> - < WordsStyle name = " DIRECTIVE " styleID = " 19 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> - < WordsStyle name = " DEFAULT " styleID = " 11 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " QUALIFIER " styleID = " 20 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> - < WordsStyle name = " PREPROCESSOR " styleID = " 9 " fgColor = " 8996A8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " INSTRUCTION WORD " styleID = " 5 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> - < WordsStyle name = " TYPE WORD " styleID = " 16 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> + < WordsStyle name = " DIRECTIVE " styleID = " 19 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 11 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " QUALIFIER " styleID = " 20 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> + < WordsStyle name = " PREPROCESSOR " styleID = " 9 " fgColor = " 8996A8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " INSTRUCTION WORD " styleID = " 5 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " TYPE WORD " styleID = " 16 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> < WordsStyle name = " NUMBER " styleID = " 4 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRING " styleID = " 6 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " CHARACTER " styleID = " 7 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> Credits : <nl> < WordsStyle name = " STRING " styleID = " 85 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRINGEOL " styleID = " 87 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " IDENTIFIER " styleID = " 86 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " ASPSYBOL " styleID = " 15 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " SCRIPTTYPE " styleID = " 16 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " ASPSYBOL " styleID = " 15 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " SCRIPTTYPE " styleID = " 16 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> - < LexerType name = " xml " desc = " XML " ext = " " > <nl> - < WordsStyle name = " XMLSTART " styleID = " 12 " fgColor = " 494949 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " XMLEND " styleID = " 13 " fgColor = " 494949 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " CCCCCC " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < LexerType name = " xml " desc = " XML " ext = " wpl " > <nl> + < WordsStyle name = " XMLSTART " styleID = " 12 " fgColor = " 494949 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " XMLEND " styleID = " 13 " fgColor = " 494949 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " CCCCCC " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " COMMENT " styleID = " 9 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " NUMBER " styleID = " 5 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " DOUBLESTRING " styleID = " 6 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> Credits : <nl> < WordsStyle name = " DATE " styleID = " 8 " fgColor = " 9B859D " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " css " desc = " CSS " ext = " " > <nl> - < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " TAG " styleID = " 1 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " Batang " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " CLASS " styleID = " 2 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " PSEUDOCLASS " styleID = " 3 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " UNKNOWN_PSEUDOCLASS " styleID = " 4 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " TAG " styleID = " 1 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " CLASS " styleID = " 2 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " PSEUDOCLASS " styleID = " 3 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " UNKNOWN_PSEUDOCLASS " styleID = " 4 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " OPERATOR " styleID = " 5 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " IDENTIFIER " styleID = " 6 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> < WordsStyle name = " UNKNOWN_IDENTIFIER " styleID = " 7 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> Credits : <nl> < WordsStyle name = " NUMBER " styleID = " 4 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRING " styleID = " 6 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " CHARACTER " styleID = " 7 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " OPERATOR " styleID = " 10 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " REGEX " styleID = " 17 " fgColor = " E9C062 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENT LINE " styleID = " 2 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " SCALAR " styleID = " 12 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " ARRAY " styleID = " 13 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " HASH " styleID = " 14 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " SYMBOL TABLE " styleID = " 15 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " PUNCTUATION " styleID = " 8 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " POD " styleID = " 3 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " ERROR " styleID = " 1 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " LONGQUOTE " styleID = " 19 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " DATASECTION " styleID = " 21 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " REGSUBST " styleID = " 18 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " BACKTICKS " styleID = " 20 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " OPERATOR " styleID = " 10 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " REGEX " styleID = " 17 " fgColor = " E9C062 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENT LINE " styleID = " 2 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " SCALAR " styleID = " 12 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " ARRAY " styleID = " 13 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " HASH " styleID = " 14 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " SYMBOL TABLE " styleID = " 15 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " PUNCTUATION " styleID = " 8 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " POD " styleID = " 3 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " ERROR " styleID = " 1 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " LONGQUOTE " styleID = " 19 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DATASECTION " styleID = " 21 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " REGSUBST " styleID = " 18 " fgColor = " E9C062 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " BACKTICKS " styleID = " 20 " fgColor = " E9C062 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " python " desc = " Python " ext = " " > <nl> - < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " COMMENTLINE " styleID = " 1 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " NUMBER " styleID = " 2 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRING " styleID = " 3 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> Credits : <nl> < WordsStyle name = " PREPROCESSOR " styleID = " 9 " fgColor = " 8996A8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " INSTRUCTION WORD " styleID = " 5 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> < WordsStyle name = " NUMBER " styleID = " 4 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING " styleID = " 6 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " CHARACTER " styleID = " 7 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " OPERATOR " styleID = " 10 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " FUNC1 " styleID = " 13 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> - < WordsStyle name = " FUNC2 " styleID = " 14 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> - < WordsStyle name = " FUNC3 " styleID = " 15 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> + < WordsStyle name = " STRING " styleID = " 6 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " CHARACTER " styleID = " 7 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " OPERATOR " styleID = " 10 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " FUNC1 " styleID = " 13 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> + < WordsStyle name = " FUNC2 " styleID = " 14 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> + < WordsStyle name = " FUNC3 " styleID = " 15 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> < / LexerType > <nl> < LexerType name = " tex " desc = " TeX " ext = " " > <nl> - < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " SPECIAL " styleID = " 1 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " GROUP " styleID = " 2 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " SYMBOL " styleID = " 3 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMAND " styleID = " 4 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " TEXT " styleID = " 5 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " SPECIAL " styleID = " 1 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " GROUP " styleID = " 2 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " SYMBOL " styleID = " 3 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMAND " styleID = " 4 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " TEXT " styleID = " 5 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " nsis " desc = " NSIS " ext = " " > <nl> < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> Credits : <nl> < WordsStyle name = " STRING DOUBLE QUOTE " styleID = " 2 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRING LEFT QUOTE " styleID = " 3 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRING RIGHT QUOTE " styleID = " 4 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " FUNCTION " styleID = " 5 " fgColor = " DAD085 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> - < WordsStyle name = " VARIABLE " styleID = " 6 " fgColor = " 7587A6 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> - < WordsStyle name = " LABEL " styleID = " 7 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> - < WordsStyle name = " USER DEFINED " styleID = " 8 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> - < WordsStyle name = " SECTION " styleID = " 9 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " SUBSECTION " styleID = " 10 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " IF DEFINE " styleID = " 11 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " MACRO " styleID = " 12 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING VAR " styleID = " 13 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " NUMBER " styleID = " 14 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " SECTION GROUP " styleID = " 15 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " PAGE EX " styleID = " 16 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " FUNCTION DEFINITIONS " styleID = " 17 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENT " styleID = " 18 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " FUNCTION " styleID = " 5 " fgColor = " DAD085 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " VARIABLE " styleID = " 6 " fgColor = " 7587A6 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> + < WordsStyle name = " LABEL " styleID = " 7 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> + < WordsStyle name = " USER DEFINED " styleID = " 8 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> + < WordsStyle name = " SECTION " styleID = " 9 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " SUBSECTION " styleID = " 10 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " IF DEFINE " styleID = " 11 " fgColor = " 8A97A8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " MACRO " styleID = " 12 " fgColor = " 8A97A8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRING VAR " styleID = " 13 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " NUMBER " styleID = " 14 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " SECTION GROUP " styleID = " 15 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " PAGE EX " styleID = " 16 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " FUNCTION DEFINITIONS " styleID = " 17 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENT " styleID = " 18 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " actionscript " desc = " ActionScript " ext = " " > <nl> < ! - - <nl> - < WordsStyle name = " DIRECTIVE " styleID = " 19 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " " fontSize = " 10 " keywordClass = " instre2 " / > <nl> + < WordsStyle name = " DIRECTIVE " styleID = " 19 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " " fontSize = " 10 " keywordClass = " instre2 " / > <nl> - - > <nl> - < WordsStyle name = " DEFAULT " styleID = " 11 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " FUNCTION " styleID = " 20 " fgColor = " DAD085 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 11 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " FUNCTION " styleID = " 20 " fgColor = " DAD085 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> < WordsStyle name = " PREPROCESSOR " styleID = " 9 " fgColor = " 8996A8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " INSTRUCTION WORD " styleID = " 5 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> < WordsStyle name = " TYPE WORD " styleID = " 16 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> Credits : <nl> < WordsStyle name = " COMMENT LINE " styleID = " 2 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " COMMENT DOC " styleID = " 3 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " COMMENT LINE DOC " styleID = " 15 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENT DOC KEYWORD " styleID = " 17 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENT DOC KEYWORD ERROR " styleID = " 18 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENT DOC KEYWORD " styleID = " 17 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENT DOC KEYWORD ERROR " styleID = " 18 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> - < LexerType name = " bash " desc = " bash " ext = " " > <nl> - < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " ERROR " styleID = " 1 " fgColor = " FF6464 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " INSTRUCTION WORD " styleID = " 4 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> + < LexerType name = " bash " desc = " bash " ext = " po " > <nl> + < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " ERROR " styleID = " 1 " fgColor = " FF6464 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " INSTRUCTION WORD " styleID = " 4 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> < WordsStyle name = " NUMBER " styleID = " 3 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRING " styleID = " 5 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " CHARACTER " styleID = " 6 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> Credits : <nl> < WordsStyle name = " STRING " styleID = " 3 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRING2 " styleID = " 4 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRINGEOL " styleID = " 5 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " OPERATOR " styleID = " 6 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " IDENTIFIER " styleID = " 7 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " INSTRUCTION WORD " styleID = " 8 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> - < WordsStyle name = " FUNCTION1 " styleID = " 9 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> - < WordsStyle name = " FUNCTION2 " styleID = " 10 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> - < WordsStyle name = " PREPROCESSOR " styleID = " 11 " fgColor = " 8996A8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " OPERATOR2 " styleID = " 12 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " LABEL " styleID = " 13 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " CONTINUATION " styleID = " 14 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " OPERATOR " styleID = " 6 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " IDENTIFIER " styleID = " 7 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " INSTRUCTION WORD " styleID = " 8 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " FUNCTION1 " styleID = " 9 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> + < WordsStyle name = " FUNCTION2 " styleID = " 10 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> + < WordsStyle name = " PREPROCESSOR " styleID = " 11 " fgColor = " 8996A8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " OPERATOR2 " styleID = " 12 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " LABEL " styleID = " 13 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " CONTINUATION " styleID = " 14 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " lisp " desc = " LISP " ext = " " > <nl> - < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENTLINE " styleID = " 1 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " NUMBER " styleID = " 2 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " FUNCTION WORD " styleID = " 3 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> - < WordsStyle name = " SYMBOL " styleID = " 5 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING " styleID = " 6 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRINGEOL " styleID = " 8 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " IDENTIFIER " styleID = " 9 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " OPERATOR " styleID = " 10 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> - < WordsStyle name = " SPECIAL " styleID = " 11 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENT " styleID = " 12 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENTLINE " styleID = " 1 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " NUMBER " styleID = " 2 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " FUNCTION WORD " styleID = " 3 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " SYMBOL " styleID = " 5 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRING " styleID = " 6 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRINGEOL " styleID = " 8 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " IDENTIFIER " styleID = " 9 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " OPERATOR " styleID = " 10 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> + < WordsStyle name = " SPECIAL " styleID = " 11 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENT " styleID = " 12 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " asm " desc = " Assembler " ext = " " > <nl> < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " COMMENT " styleID = " 1 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " NUMBER " styleID = " 2 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING " styleID = " 3 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " OPERATOR " styleID = " 4 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " IDENTIFIER " styleID = " 5 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " CPU INSTRUCTION " styleID = " 6 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> - < WordsStyle name = " MATH INSTRUCTION " styleID = " 7 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> - < WordsStyle name = " REGISTER " styleID = " 8 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> - < WordsStyle name = " DIRECTIVE " styleID = " 9 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> - < WordsStyle name = " DIRECTIVE OPERAND " styleID = " 10 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type3 " / > <nl> - < WordsStyle name = " COMMENT BLOCK " styleID = " 11 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " CHARACTER " styleID = " 12 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRINGEOL " styleID = " 13 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " EXT INSTRUCTION " styleID = " 14 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type4 " / > <nl> + < WordsStyle name = " STRING " styleID = " 3 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " OPERATOR " styleID = " 4 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " IDENTIFIER " styleID = " 5 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " CPU INSTRUCTION " styleID = " 6 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " MATH INSTRUCTION " styleID = " 7 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> + < WordsStyle name = " REGISTER " styleID = " 8 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> + < WordsStyle name = " DIRECTIVE " styleID = " 9 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> + < WordsStyle name = " DIRECTIVE OPERAND " styleID = " 10 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type3 " / > <nl> + < WordsStyle name = " COMMENT BLOCK " styleID = " 11 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " CHARACTER " styleID = " 12 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRINGEOL " styleID = " 13 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " EXT INSTRUCTION " styleID = " 14 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type4 " / > <nl> < / LexerType > <nl> < LexerType name = " ruby " desc = " Ruby " ext = " " > <nl> - < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " ERROR " styleID = " 1 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENTLINE " styleID = " 2 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " POD " styleID = " 3 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " NUMBER " styleID = " 4 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " ERROR " styleID = " 1 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENTLINE " styleID = " 2 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " POD " styleID = " 3 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " NUMBER " styleID = " 4 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " INSTRUCTION " styleID = " 5 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " > raise < / WordsStyle > <nl> - < WordsStyle name = " STRING " styleID = " 6 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRING " styleID = " 6 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " CHARACTER " styleID = " 7 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " CLASS NAME " styleID = " 8 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " DEF NAME " styleID = " 9 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> Credits : <nl> < WordsStyle name = " IDENTIFIER " styleID = " 11 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " REGEX " styleID = " 12 " fgColor = " E9C062 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " GLOBAL " styleID = " 13 " fgColor = " 7587A6 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " SYMBOL " styleID = " 14 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " MODULE NAME " styleID = " 15 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " INSTANCE VAR " styleID = " 16 " fgColor = " 7587A6 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " CLASS VAR " styleID = " 17 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " BACKTICKS " styleID = " 18 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " DATA SECTION " styleID = " 19 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING Q " styleID = " 24 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " SYMBOL " styleID = " 14 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " MODULE NAME " styleID = " 15 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " INSTANCE VAR " styleID = " 16 " fgColor = " 7587A6 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " CLASS VAR " styleID = " 17 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " BACKTICKS " styleID = " 18 " fgColor = " E9C062 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DATA SECTION " styleID = " 19 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRING Q " styleID = " 24 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " postscript " desc = " Postscript " ext = " " > <nl> - < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENT " styleID = " 1 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " DSC COMMENT " styleID = " 2 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " DSC VALUE " styleID = " 3 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " NUMBER " styleID = " 4 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " Name " styleID = " 5 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " INSTRUCTION " styleID = " 6 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> - < WordsStyle name = " LITERAL " styleID = " 7 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " IMMEVAL " styleID = " 8 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " PAREN ARRAY " styleID = " 9 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " PAREN DICT " styleID = " 10 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " PAREN PROC " styleID = " 11 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " TEXT " styleID = " 12 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " HEX STRING " styleID = " 13 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " BASE85 STRING " styleID = " 14 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENT " styleID = " 1 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DSC COMMENT " styleID = " 2 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DSC VALUE " styleID = " 3 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " NUMBER " styleID = " 4 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " Name " styleID = " 5 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " INSTRUCTION " styleID = " 6 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " LITERAL " styleID = " 7 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " IMMEVAL " styleID = " 8 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " PAREN ARRAY " styleID = " 9 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " PAREN DICT " styleID = " 10 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " PAREN PROC " styleID = " 11 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " TEXT " styleID = " 12 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " HEX STRING " styleID = " 13 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " BASE85 STRING " styleID = " 14 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " BAD STRING CHAR " styleID = " 15 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " vhdl " desc = " VHDL " ext = " " > <nl> Credits : <nl> < WordsStyle name = " NUMBER " styleID = " 3 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRING " styleID = " 4 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " OPERATOR " styleID = " 5 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " IDENTIFIER " styleID = " 6 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING EOL " styleID = " 7 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " INSTRUCTION " styleID = " 8 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> - < WordsStyle name = " STD OPERATOR " styleID = " 9 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> - < WordsStyle name = " ATTRIBUTE " styleID = " 10 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> - < WordsStyle name = " DIRECTIVE " styleID = " 9 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " DIRECTIVE OPERAND " styleID = " 10 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STD FUNCTION " styleID = " 11 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> - < WordsStyle name = " STD PACKAGE " styleID = " 12 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type3 " / > <nl> - < WordsStyle name = " STD TYPE " styleID = " 13 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type4 " / > <nl> - < WordsStyle name = " USER DEFINE " styleID = " 14 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type5 " / > <nl> + < WordsStyle name = " IDENTIFIER " styleID = " 6 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRING EOL " styleID = " 7 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " INSTRUCTION " styleID = " 8 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " STD OPERATOR " styleID = " 9 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> + < WordsStyle name = " ATTRIBUTE " styleID = " 10 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> + < WordsStyle name = " DIRECTIVE " styleID = " 9 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DIRECTIVE OPERAND " styleID = " 10 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STD FUNCTION " styleID = " 11 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> + < WordsStyle name = " STD PACKAGE " styleID = " 12 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type3 " / > <nl> + < WordsStyle name = " STD TYPE " styleID = " 13 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type4 " / > <nl> + < WordsStyle name = " USER DEFINE " styleID = " 14 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type5 " / > <nl> < / LexerType > <nl> < LexerType name = " smalltalk " desc = " Smalltalk " ext = " " > <nl> - < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRING " styleID = " 1 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " NUMBER " styleID = " 2 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENT " styleID = " 3 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " SYMBOL " styleID = " 4 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " BINARY " styleID = " 5 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " BOOL " styleID = " 6 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " SELF " styleID = " 7 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " SUPER " styleID = " 8 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " NIL " styleID = " 9 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " GLOBAL " styleID = " 10 " fgColor = " 7587A6 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " RETURN " styleID = " 11 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " SPECIAL " styleID = " 12 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " KWS END " styleID = " 13 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " ASSIGN " styleID = " 14 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " CHARACTER " styleID = " 15 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " SPECIAL SELECTOR " styleID = " 16 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " NUMBER " styleID = " 2 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENT " styleID = " 3 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " SYMBOL " styleID = " 4 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " BINARY " styleID = " 5 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " BOOL " styleID = " 6 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " SELF " styleID = " 7 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " SUPER " styleID = " 8 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " NIL " styleID = " 9 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " GLOBAL " styleID = " 10 " fgColor = " 7587A6 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " RETURN " styleID = " 11 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " SPECIAL " styleID = " 12 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " KWS END " styleID = " 13 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " ASSIGN " styleID = " 14 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " CHARACTER " styleID = " 15 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " SPECIAL SELECTOR " styleID = " 16 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " caml " desc = " Caml " ext = " " > <nl> - < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " IDENTIFIER " styleID = " 1 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " TAGNAME " styleID = " 2 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " INSTRUCTION WORD " styleID = " 3 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> - < WordsStyle name = " BUILIN FUNC & amp ; TYPE " styleID = " 4 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> - < WordsStyle name = " TYPE " styleID = " 5 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> - < WordsStyle name = " LINENUM " styleID = " 6 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " OPERATOR " styleID = " 7 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " NUMBER " styleID = " 8 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " CHARACTER " styleID = " 9 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " IDENTIFIER " styleID = " 1 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " TAGNAME " styleID = " 2 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " INSTRUCTION WORD " styleID = " 3 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " BUILIN FUNC & amp ; TYPE " styleID = " 4 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> + < WordsStyle name = " TYPE " styleID = " 5 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> + < WordsStyle name = " LINENUM " styleID = " 6 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " OPERATOR " styleID = " 7 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " NUMBER " styleID = " 8 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " CHARACTER " styleID = " 9 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRING " styleID = " 11 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " COMMENT " styleID = " 12 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " COMMENT LINE " styleID = " 13 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> Credits : <nl> < WordsStyle name = " PREPROCESSOR " styleID = " 9 " fgColor = " 8996A8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRING " styleID = " 6 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " COMMENT " styleID = " 1 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENT LINE " styleID = " 2 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENT LINE BANG " styleID = " 3 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING EOL " styleID = " 12 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " USER " styleID = " 19 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENT LINE " styleID = " 2 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENT LINE BANG " styleID = " 3 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRING EOL " styleID = " 12 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " USER " styleID = " 19 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " kix " desc = " KiXtart " ext = " " > <nl> < ! - - <nl> - < WordsStyle name = " " styleID = " 0 " fgColor = " " bgColor = " 141414 " fontName = " " fontStyle = " " fontSize = " 10 " / > <nl> + < WordsStyle name = " " styleID = " 0 " fgColor = " " bgColor = " 141414 " fontName = " " fontStyle = " " fontSize = " 10 " / > <nl> - - > <nl> - < WordsStyle name = " DEFAULT " styleID = " 31 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENT " styleID = " 1 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING " styleID = " 2 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING2 " styleID = " 3 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " NUMBER " styleID = " 4 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " VAR " styleID = " 5 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " MACRO " styleID = " 6 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> - < WordsStyle name = " INSTRUCTION WORD " styleID = " 7 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> - < WordsStyle name = " FUNCTION " styleID = " 8 " fgColor = " DAD085 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> - < WordsStyle name = " OPERATOR " styleID = " 9 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 31 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENT " styleID = " 1 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRING " styleID = " 2 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRING2 " styleID = " 3 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " NUMBER " styleID = " 4 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " VAR " styleID = " 5 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " MACRO " styleID = " 6 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> + < WordsStyle name = " INSTRUCTION WORD " styleID = " 7 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " FUNCTION " styleID = " 8 " fgColor = " DAD085 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> + < WordsStyle name = " OPERATOR " styleID = " 9 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " autoit " desc = " autoIt " ext = " " > <nl> < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " COMMENT LINE " styleID = " 1 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " COMMENT " styleID = " 2 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " NUMBER " styleID = " 3 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " FUNCTION " styleID = " 4 " fgColor = " DAD085 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> - < WordsStyle name = " INSTRUCTION WORD " styleID = " 5 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> - < WordsStyle name = " MACRO " styleID = " 6 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> - < WordsStyle name = " STRING " styleID = " 7 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " OPERATOR " styleID = " 8 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " VARIABLE " styleID = " 9 " fgColor = " 7587A6 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " SENT " styleID = " 10 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> - < WordsStyle name = " PREPROCESSOR " styleID = " 11 " fgColor = " 8996A8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type3 " / > <nl> - < WordsStyle name = " SPECIAL " styleID = " 12 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type4 " / > <nl> - < WordsStyle name = " EXPAND " styleID = " 13 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type5 " / > <nl> - < WordsStyle name = " COMOBJ " styleID = " 14 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " NUMBER " styleID = " 3 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " FUNCTION " styleID = " 4 " fgColor = " DAD085 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> + < WordsStyle name = " INSTRUCTION WORD " styleID = " 5 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " MACRO " styleID = " 6 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> + < WordsStyle name = " STRING " styleID = " 7 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " OPERATOR " styleID = " 8 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " VARIABLE " styleID = " 9 " fgColor = " 7587A6 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " SENT " styleID = " 10 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> + < WordsStyle name = " PREPROCESSOR " styleID = " 11 " fgColor = " 8996A8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type3 " / > <nl> + < WordsStyle name = " SPECIAL " styleID = " 12 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type4 " / > <nl> + < WordsStyle name = " EXPAND " styleID = " 13 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type5 " / > <nl> + < WordsStyle name = " COMOBJ " styleID = " 14 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " ada " desc = " ADA " ext = " " > <nl> - < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " INSTRUCTION WORD " styleID = " 1 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> - < WordsStyle name = " IDENTIFIER " styleID = " 2 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " NUMBER " styleID = " 3 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " DELIMITER " styleID = " 4 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " CHARACTER " styleID = " 5 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " CHARACTER EOL " styleID = " 6 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING " styleID = " 7 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING EOL " styleID = " 8 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " LABEL " styleID = " 9 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENT LINE " styleID = " 10 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " ILLEGAL " styleID = " 11 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " INSTRUCTION WORD " styleID = " 1 " fgColor = " F9EE98 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " IDENTIFIER " styleID = " 2 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " NUMBER " styleID = " 3 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DELIMITER " styleID = " 4 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " CHARACTER " styleID = " 5 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " CHARACTER EOL " styleID = " 6 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRING " styleID = " 7 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRING EOL " styleID = " 8 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " LABEL " styleID = " 9 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENT LINE " styleID = " 10 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " ILLEGAL " styleID = " 11 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " matlab " desc = " Matlab " ext = " " > <nl> - < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " COMMENT " styleID = " 1 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " COMMAND " styleID = " 2 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " NUMBER " styleID = " 3 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> Credits : <nl> < WordsStyle name = " IDENTIFIER " styleID = " 1 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " KEYWORD " styleID = " 2 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " NUMBER " styleID = " 3 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING " styleID = " 4 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " CHARACTER " styleID = " 5 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " CLASS " styleID = " 6 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " MODULE " styleID = " 7 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " CAPITAL " styleID = " 8 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " DATA " styleID = " 9 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " IMPORT " styleID = " 10 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " OPERATOR " styleID = " 11 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " INSTANCE " styleID = " 12 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENTLINE " styleID = " 13 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENTBLOCK " styleID = " 14 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENTBLOCK2 " styleID = " 15 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRING " styleID = " 4 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " CHARACTER " styleID = " 5 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " CLASS " styleID = " 6 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " MODULE " styleID = " 7 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " CAPITAL " styleID = " 8 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " DATA " styleID = " 9 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " IMPORT " styleID = " 10 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " OPERATOR " styleID = " 11 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " INSTANCE " styleID = " 12 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENTLINE " styleID = " 13 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENTBLOCK " styleID = " 14 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENTBLOCK2 " styleID = " 15 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " COMMENTBLOCK3 " styleID = " 16 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " inno " desc = " InnoSetup " ext = " " > <nl> - < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENT " styleID = " 1 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " KEYWORD " styleID = " 2 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> - < WordsStyle name = " PARAMETER " styleID = " 3 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> - < WordsStyle name = " SECTION " styleID = " 4 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> - < WordsStyle name = " PREPROCESSOR " styleID = " 5 " fgColor = " 8996A8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> - < WordsStyle name = " PREPROCESSOR INLINE " styleID = " 6 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMENT PASCAL " styleID = " 7 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " KEYWORD PASCAL " styleID = " 8 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type3 " / > <nl> - < WordsStyle name = " KEYWORD USER " styleID = " 9 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type4 " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENT " styleID = " 1 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " KEYWORD " styleID = " 2 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre2 " / > <nl> + < WordsStyle name = " PARAMETER " styleID = " 3 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> + < WordsStyle name = " SECTION " styleID = " 4 " fgColor = " 9B703F " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " PREPROCESSOR " styleID = " 5 " fgColor = " 8996A8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type2 " / > <nl> + < WordsStyle name = " PREPROCESSOR INLINE " styleID = " 6 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMENT PASCAL " styleID = " 7 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " KEYWORD PASCAL " styleID = " 8 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type3 " / > <nl> + < WordsStyle name = " KEYWORD USER " styleID = " 9 " fgColor = " CDA869 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type4 " / > <nl> < WordsStyle name = " STRING DOUBLE " styleID = " 10 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRING SINGLE " styleID = " 11 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " IDENTIFIER " styleID = " 12 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> Credits : <nl> < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " COMMENT " styleID = " 1 " fgColor = " 5F5A60 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WordsStyle name = " STRING D " styleID = " 2 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING L " styleID = " 3 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING R " styleID = " 4 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " COMMAND " styleID = " 5 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> - < WordsStyle name = " PARAMETER " styleID = " 6 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " VARIABLE " styleID = " 7 " fgColor = " 7587A6 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " USER DEFINED " styleID = " 8 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> - < WordsStyle name = " WHILEDEF " styleID = " 9 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " FOREACHDEF " styleID = " 10 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " IFDEF " styleID = " 11 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " MACRODEF " styleID = " 12 " fgColor = " 000000 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " STRING VARIABLE " styleID = " 13 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> - < WordsStyle name = " NUMBER " styleID = " 14 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRING L " styleID = " 3 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRING R " styleID = " 4 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " COMMAND " styleID = " 5 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " PARAMETER " styleID = " 6 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " VARIABLE " styleID = " 7 " fgColor = " 7587A6 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " USER DEFINED " styleID = " 8 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " keywordClass = " type1 " / > <nl> + < WordsStyle name = " WHILEDEF " styleID = " 9 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " FOREACHDEF " styleID = " 10 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " IFDEF " styleID = " 11 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " MACRODEF " styleID = " 12 " fgColor = " F8F8F8 " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " STRING VARIABLE " styleID = " 13 " fgColor = " 8F9D6A " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> + < WordsStyle name = " NUMBER " styleID = " 14 " fgColor = " CF6A4C " bgColor = " 141414 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < / LexerType > <nl> < LexerType name = " searchResult " desc = " Search result " ext = " " > <nl> < WordsStyle name = " Search Header " styleID = " 1 " fgColor = " 000080 " bgColor = " BBBBFF " fontName = " " fontStyle = " 1 " fontSize = " " / > <nl> Credits : <nl> < WidgetStyle name = " Find Mark Style " styleID = " 31 " fgColor = " CC0000 " bgColor = " EDD400 " fontName = " " fontStyle = " 0 " fontSize = " 10 " / > <nl> < WidgetStyle name = " Edge colour " styleID = " 0 " fgColor = " EEEEEC " / > <nl> < WidgetStyle name = " Line number margin " styleID = " 33 " fgColor = " EEEEEC " bgColor = " 2E3436 " fontName = " " fontStyle = " 0 " fontSize = " 8 " / > <nl> - < WidgetStyle name = " Fold " styleID = " 0 " fgColor = " 2E3436 " bgColor = " EEEEEC " / > <nl> - < WidgetStyle name = " Fold margin " styleID = " 0 " fgColor = " 555753 " bgColor = " 2E3436 " / > <nl> - < WidgetStyle name = " White space symbol " styleID = " 0 " fgColor = " FCAF3E " / > <nl> - < WidgetStyle name = " Smart HighLighting " styleID = " 29 " bgColor = " 00FF00 " fgColor = " 555753 " / > <nl> - < WidgetStyle name = " Find Mark Style " styleID = " 31 " bgColor = " FF0000 " fgColor = " FCAF3E " / > <nl> - < WidgetStyle name = " Mark Style 1 " styleID = " 25 " bgColor = " 00FFFF " / > <nl> - < WidgetStyle name = " Mark Style 2 " styleID = " 24 " bgColor = " FF8000 " / > <nl> + < WidgetStyle name = " Fold " styleID = " 0 " fgColor = " 2E3436 " bgColor = " EEEEEC " / > <nl> + < WidgetStyle name = " Fold margin " styleID = " 0 " fgColor = " 555753 " bgColor = " 2E3436 " / > <nl> + < WidgetStyle name = " White space symbol " styleID = " 0 " fgColor = " FCAF3E " / > <nl> + < WidgetStyle name = " Smart HighLighting " styleID = " 29 " bgColor = " 8000FF " fgColor = " 555753 " / > <nl> + < WidgetStyle name = " Find Mark Style " styleID = " 31 " bgColor = " FF0000 " fgColor = " FCAF3E " / > <nl> + < WidgetStyle name = " Mark Style 1 " styleID = " 25 " bgColor = " 00FFFF " / > <nl> + < WidgetStyle name = " Mark Style 2 " styleID = " 24 " bgColor = " FF8000 " / > <nl> < WidgetStyle name = " Mark Style 3 " styleID = " 23 " bgColor = " FFFF00 " / > <nl> - < WidgetStyle name = " Mark Style 4 " styleID = " 22 " bgColor = " 8000FF " / > <nl> - < WidgetStyle name = " Mark Style 5 " styleID = " 21 " bgColor = " 008000 " / > <nl> - < WidgetStyle name = " Incremental highlight all " styleID = " 28 " bgColor = " 0080FF " fgColor = " FFCAB0 " / > <nl> - < WidgetStyle name = " Tags match highlighting " styleID = " 27 " bgColor = " 8000FF " fgColor = " 000000 " / > <nl> - < WidgetStyle name = " Tags attribute " styleID = " 26 " bgColor = " FFFF00 " fgColor = " 8080C0 " / > <nl> - < WidgetStyle name = " Active tab focused indicator " styleID = " 0 " fgColor = " FAAA3C " bgColor = " FF0000 " / > <nl> - < WidgetStyle name = " Active tab unfocused indicator " styleID = " 0 " fgColor = " FFCAB0 " bgColor = " 80FF00 " / > <nl> + < WidgetStyle name = " Mark Style 4 " styleID = " 22 " bgColor = " 8000FF " / > <nl> + < WidgetStyle name = " Mark Style 5 " styleID = " 21 " bgColor = " 008000 " / > <nl> + < WidgetStyle name = " Incremental highlight all " styleID = " 28 " bgColor = " 0080FF " fgColor = " FFCAB0 " / > <nl> + < WidgetStyle name = " Tags match highlighting " styleID = " 27 " bgColor = " 663a04 " fgColor = " b5834a " / > <nl> + < WidgetStyle name = " Tags attribute " styleID = " 26 " bgColor = " FFFF00 " fgColor = " 8080C0 " / > <nl> + < WidgetStyle name = " Active tab focused indicator " styleID = " 0 " fgColor = " FAAA3C " bgColor = " FF0000 " / > <nl> + < WidgetStyle name = " Active tab unfocused indicator " styleID = " 0 " fgColor = " FFCAB0 " bgColor = " 80FF00 " / > <nl> < WidgetStyle name = " Active tab text " styleID = " 0 " fgColor = " 000000 " / > <nl> < WidgetStyle name = " Inactive tabs " styleID = " 0 " fgColor = " 808080 " bgColor = " C0C0C0 " / > <nl> < / GlobalStyles > <nl> mmm a / PowerEditor / installer / themes / Zenburn . xml <nl> ppp b / PowerEditor / installer / themes / Zenburn . xml <nl> Style Name : Zenburn <nl> Description : Zenburn - like style for Notepad + + . <nl> Inspired by the original Zenburn colorscheme for Vim by Jani Nurminen . <nl> Official Vim Zenburn home page : http : / / slinky . imukuppi . org / zenburnpage / <nl> - Supported languages : All the languages supported by release 6 . 2 . 3 <nl> + Supported languages : All the languages supported by release 6 . 6 . 6 <nl> Created by : Jani Kesänen ( jani dot kesanen gmail com ) <nl> - Released : 25 . 01 . 2013 <nl> + Released : 18 . 06 . 2014 <nl> License : Feel free to modify this style and re - release it . This style is available under the terms of the GNU Free License . <nl> - - > <nl> < NotepadPlus > <nl> License : Feel free to modify this style and re - release it . This styl <nl> < WordsStyle name = " STRING VARIABLE " styleID = " 13 " fgColor = " E3CEAB " bgColor = " 3F3F3F " fontName = " " fontStyle = " 2 " fontSize = " " / > <nl> < WordsStyle name = " NUMBER " styleID = " 14 " fgColor = " 8CD0D3 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> < / LexerType > <nl> - < LexerType name = " css " desc = " CSS " ext = " " > <nl> - < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " DCDCCC " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> - < WordsStyle name = " TAG " styleID = " 1 " fgColor = " E3CEAB " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> - < WordsStyle name = " CLASS " styleID = " 2 " fgColor = " CEDF99 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> - < WordsStyle name = " PSEUDOCLASS " styleID = " 3 " fgColor = " CEDF99 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 1 " fontSize = " " / > <nl> - < WordsStyle name = " UNKNOWN_PSEUDOCLASS " styleID = " 4 " fgColor = " CEDF99 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> - < WordsStyle name = " OPERATOR " styleID = " 5 " fgColor = " 9F9D6D " bgColor = " 3F3F3F " fontName = " " fontStyle = " 1 " fontSize = " " / > <nl> - < WordsStyle name = " IDENTIFIER " styleID = " 6 " fgColor = " C2BE9E " bgColor = " 3F3F3F " fontName = " " fontStyle = " 1 " fontSize = " " keywordClass = " instre1 " / > <nl> - < WordsStyle name = " UNKNOWN_IDENTIFIER " styleID = " 7 " fgColor = " DCDCCC " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> - < WordsStyle name = " VALUE " styleID = " 8 " fgColor = " 8CD0D3 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 1 " fontSize = " " / > <nl> - < WordsStyle name = " COMMENT " styleID = " 9 " fgColor = " 7F9F7F " bgColor = " 3F3F3F " fontName = " " fontStyle = " 3 " fontSize = " " / > <nl> - < WordsStyle name = " ID " styleID = " 10 " fgColor = " CEDF99 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 1 " fontSize = " " / > <nl> - < WordsStyle name = " IMPORTANT " styleID = " 11 " fgColor = " BFCAA9 " bgColor = " 274E27 " fontName = " " fontStyle = " 1 " fontSize = " " / > <nl> - < WordsStyle name = " DIRECTIVE " styleID = " 12 " fgColor = " CEDF99 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> - < / LexerType > <nl> < LexerType name = " cobol " desc = " COBOL " ext = " " > <nl> < WordsStyle name = " PREPROCESSOR " styleID = " 9 " fgColor = " DCDCCC " bgColor = " 3F3F3F " fontName = " " fontStyle = " 2 " fontSize = " " / > <nl> < WordsStyle name = " DEFAULT " styleID = " 11 " fgColor = " DCDCCC " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> License : Feel free to modify this style and re - release it . This styl <nl> < WordsStyle name = " COMMENT DOC KEYWORD " styleID = " 17 " fgColor = " 7F9F7F " bgColor = " 3F3F3F " fontName = " " fontStyle = " 3 " fontSize = " " / > <nl> < WordsStyle name = " COMMENT DOC KEYWORD ERROR " styleID = " 18 " fgColor = " 7F9F7F " bgColor = " 3F3F3F " fontName = " " fontStyle = " 2 " fontSize = " " / > <nl> < / LexerType > <nl> + < LexerType name = " coffeescript " desc = " CoffeeScript " ext = " " > <nl> + < WordsStyle name = " PREPROCESSOR " styleID = " 9 " fgColor = " FFCFAF " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> + < WordsStyle name = " DEFAULT " styleID = " 11 " fgColor = " DCDCCC " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> + < WordsStyle name = " INSTRUCTION WORD " styleID = " 5 " fgColor = " DFC47D " bgColor = " 3F3F3F " fontName = " " fontStyle = " 1 " fontSize = " " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " TYPE WORD " styleID = " 16 " fgColor = " CEDF99 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " keywordClass = " instre2 " / > <nl> + < WordsStyle name = " NUMBER " styleID = " 4 " fgColor = " 8CD0D3 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> + < WordsStyle name = " STRING " styleID = " 6 " fgColor = " E3CEAB " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> + < WordsStyle name = " CHARACTER " styleID = " 7 " fgColor = " DCA3A3 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> + < WordsStyle name = " OPERATOR " styleID = " 10 " fgColor = " 9F9D6D " bgColor = " 3F3F3F " fontName = " " fontStyle = " 1 " fontSize = " " / > <nl> + < WordsStyle name = " VERBATIM " styleID = " 13 " fgColor = " CC9393 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> + < WordsStyle name = " REGEX " styleID = " 14 " fgColor = " C89191 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 1 " fontSize = " " / > <nl> + < WordsStyle name = " COMMENT " styleID = " 1 " fgColor = " 7F9F7F " bgColor = " 3F3F3F " fontName = " " fontStyle = " 3 " fontSize = " " / > <nl> + < WordsStyle name = " COMMENT LINE " styleID = " 2 " fgColor = " 7F9F7F " bgColor = " 3F3F3F " fontName = " " fontStyle = " 3 " fontSize = " " / > <nl> + < WordsStyle name = " COMMENT DOC " styleID = " 3 " fgColor = " 7F9F7F " bgColor = " 3F3F3F " fontName = " " fontStyle = " 2 " fontSize = " " / > <nl> + < WordsStyle name = " COMMENT LINE DOC " styleID = " 15 " fgColor = " 7F9F7F " bgColor = " 3F3F3F " fontName = " " fontStyle = " 2 " fontSize = " " / > <nl> + < WordsStyle name = " COMMENT DOC KEYWORD " styleID = " 17 " fgColor = " 7F9F7F " bgColor = " 3F3F3F " fontName = " " fontStyle = " 3 " fontSize = " " / > <nl> + < WordsStyle name = " COMMENT DOC KEYWORD ERROR " styleID = " 18 " fgColor = " 7F9F7F " bgColor = " 3F3F3F " fontName = " " fontStyle = " 2 " fontSize = " " / > <nl> + < WordsStyle name = " PREDEFINED CONSTANT " styleID = " 19 " fgColor = " DCA3A3 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 1 " fontSize = " " keywordClass = " type2 " / > <nl> + < WordsStyle name = " COMMENT BLOCK " styleID = " 22 " fgColor = " 7F9F7F " bgColor = " 3F3F3F " fontName = " " fontStyle = " 2 " fontSize = " " / > <nl> + < WordsStyle name = " VERBOSE REGEX " styleID = " 23 " fgColor = " C89191 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 3 " fontSize = " " / > <nl> + < WordsStyle name = " VERBOSE REGEX COMMENT " styleID = " 24 " fgColor = " 7F9F7F " bgColor = " 3F3F3F " fontName = " " fontStyle = " 2 " fontSize = " " / > <nl> + < / LexerType > <nl> + < LexerType name = " css " desc = " CSS " ext = " " > <nl> + < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " DCDCCC " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> + < WordsStyle name = " TAG " styleID = " 1 " fgColor = " E3CEAB " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> + < WordsStyle name = " CLASS " styleID = " 2 " fgColor = " CEDF99 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> + < WordsStyle name = " PSEUDOCLASS " styleID = " 3 " fgColor = " CEDF99 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 1 " fontSize = " " / > <nl> + < WordsStyle name = " UNKNOWN_PSEUDOCLASS " styleID = " 4 " fgColor = " CEDF99 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> + < WordsStyle name = " OPERATOR " styleID = " 5 " fgColor = " 9F9D6D " bgColor = " 3F3F3F " fontName = " " fontStyle = " 1 " fontSize = " " / > <nl> + < WordsStyle name = " IDENTIFIER " styleID = " 6 " fgColor = " C2BE9E " bgColor = " 3F3F3F " fontName = " " fontStyle = " 1 " fontSize = " " keywordClass = " instre1 " / > <nl> + < WordsStyle name = " UNKNOWN_IDENTIFIER " styleID = " 7 " fgColor = " DCDCCC " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> + < WordsStyle name = " VALUE " styleID = " 8 " fgColor = " 8CD0D3 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 1 " fontSize = " " / > <nl> + < WordsStyle name = " COMMENT " styleID = " 9 " fgColor = " 7F9F7F " bgColor = " 3F3F3F " fontName = " " fontStyle = " 3 " fontSize = " " / > <nl> + < WordsStyle name = " ID " styleID = " 10 " fgColor = " CEDF99 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 1 " fontSize = " " / > <nl> + < WordsStyle name = " IMPORTANT " styleID = " 11 " fgColor = " BFCAA9 " bgColor = " 274E27 " fontName = " " fontStyle = " 1 " fontSize = " " / > <nl> + < WordsStyle name = " DIRECTIVE " styleID = " 12 " fgColor = " CEDF99 " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> + < / LexerType > <nl> < LexerType name = " d " desc = " D " ext = " " > <nl> < WordsStyle name = " DEFAULT " styleID = " 0 " fgColor = " DCDCCC " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> < WordsStyle name = " IDENTIFIER " styleID = " 14 " fgColor = " DCDCCC " bgColor = " 3F3F3F " fontName = " " fontStyle = " 0 " fontSize = " " / > <nl> License : Feel free to modify this style and re - release it . This styl <nl> < WidgetStyle name = " Fold margin " styleID = " 0 " fgColor = " 181818 " bgColor = " 101010 " / > <nl> < WidgetStyle name = " White space symbol " styleID = " 0 " fgColor = " 5F5F5F " / > <nl> < WidgetStyle name = " Smart HighLighting " styleID = " 29 " bgColor = " 358A35 " / > <nl> - < WidgetStyle name = " Find Mark Style " styleID = " 31 " bgColor = " FF0000 " / > <nl> + < WidgetStyle name = " Find Mark Style " styleID = " 31 " bgColor = " FF0080 " / > <nl> < WidgetStyle name = " Mark Style 1 " styleID = " 25 " bgColor = " 88B090 " / > <nl> < WidgetStyle name = " Mark Style 2 " styleID = " 24 " bgColor = " F8F893 " / > <nl> < WidgetStyle name = " Mark Style 3 " styleID = " 23 " bgColor = " F18C96 " / > <nl> License : Feel free to modify this style and re - release it . This styl <nl> < WidgetStyle name = " Active tab unfocused indicator " styleID = " 0 " fgColor = " 3FBA89 " / > <nl> < WidgetStyle name = " Active tab text " styleID = " 0 " fgColor = " 101010 " / > <nl> < WidgetStyle name = " Inactive tabs " styleID = " 0 " fgColor = " 808080 " bgColor = " C0C0C0 " / > <nl> + < WidgetStyle name = " URL hovered " styleID = " 0 " fgColor = " A3DCA3 " / > <nl> < / GlobalStyles > <nl> < / NotepadPlus > <nl> mmm a / PowerEditor / src / Notepad_plus . cpp <nl> ppp b / PowerEditor / src / Notepad_plus . cpp <nl> Quote quotes [ nbQuote ] = { <nl> { " Anonymous # 33 " , " Programmer - an organism that turns coffee into software . " } , <nl> { " Anonymous # 34 " , " It ' s not a bug - it ' s an undocumented feature . " } , <nl> { " Anonymous # 35 " , " Should array index start at 0 or 1 ? \ nMy compromised solution is 0 . 5 " } , <nl> - { " Anonymous # 36 " , " Every single time when I ' m about to hug someone extremely sexy , I hit the miror . " } , <nl> + { " Anonymous # 36 " , " Every single time when I ' m about to hug someone extremely sexy , I hit the mirror . " } , <nl> { " Anonymous # 37 " , " My software never has bugs . It just develops random features . " } , <nl> { " Anonymous # 38 " , " LISP = Lots of Irritating Silly Parentheses . " } , <nl> { " Anonymous # 39 " , " Perl , the only language that looks the same before and after RSA encryption . " } , <nl> mmm a / PowerEditor / src / WinControls / Preference / preference . rc <nl> ppp b / PowerEditor / src / WinControls / Preference / preference . rc <nl> BEGIN <nl> CONTROL " Simple backup " , IDC_RADIO_BKSIMPLE , " Button " , BS_AUTORADIOBUTTON , 104 , 104 , 111 , 10 <nl> CONTROL " Verbose backup " , IDC_RADIO_BKVERBOSE , " Button " , BS_AUTORADIOBUTTON , 104 , 117 , 111 , 10 <nl> GROUPBOX " Custom Backup Directory " , IDC_BACKUPDIR_USERCUSTOMDIR_GRPSTATIC , 95 , 135 , 260 , 40 <nl> - CONTROL " " , IDC_BACKUPDIR_CHECK , " Button " , BS_AUTOCHECKBOX | WS_TABSTOP , 91 , 132 , 8 , 10 <nl> + CONTROL " " , IDC_BACKUPDIR_CHECK , " Button " , BS_AUTOCHECKBOX | WS_TABSTOP , 91 , 135 , 8 , 10 <nl> RTEXT " Directory : " , IDD_BACKUPDIR_STATIC , 99 , 152 , 40 , 8 <nl> EDITTEXT IDC_BACKUPDIR_EDIT , 146 , 150 , 179 , 14 , ES_AUTOHSCROLL <nl> PUSHBUTTON " . . . " , IDD_BACKUPDIR_BROWSE_BUTTON , 332 , 150 , 16 , 14 <nl> mmm a / PowerEditor / src / resource . h <nl> ppp b / PowerEditor / src / resource . h <nl> <nl> # ifndef RESOURCE_H <nl> # define RESOURCE_H <nl> <nl> - # define NOTEPAD_PLUS_VERSION TEXT ( " Notepad + + v6 . 6 . 7 " ) <nl> + # define NOTEPAD_PLUS_VERSION TEXT ( " Notepad + + v6 . 6 . 8 " ) <nl> <nl> / / should be X . Y : ie . if VERSION_DIGITALVALUE = = 4 , 7 , 1 , 0 , then X = 4 , Y = 71 <nl> / / ex : # define VERSION_VALUE TEXT ( " 5 . 63 \ 0 " ) <nl> - # define VERSION_VALUE TEXT ( " 6 . 67 \ 0 " ) <nl> - # define VERSION_DIGITALVALUE 6 , 6 , 7 , 0 <nl> + # define VERSION_VALUE TEXT ( " 6 . 68 \ 0 " ) <nl> + # define VERSION_DIGITALVALUE 6 , 6 , 8 , 0 <nl> <nl> # ifndef IDC_STATIC <nl> # define IDC_STATIC - 1 <nl>
[ RELEASE ] Notepad + + 6 . 6 . 8 Release .
notepad-plus-plus/notepad-plus-plus
9418974c8735d8bff02e61635576899227253018
2014-07-27T22:54:02Z
mmm a / skflow / data_feeder . py <nl> ppp b / skflow / data_feeder . py <nl> def _feed_dict_fn ( ) : <nl> return _feed_dict_fn <nl> <nl> <nl> - class DaskDataFrameFeeder ( object ) : <nl> + class DaskDataFeeder ( object ) : <nl> <nl> train = dd . read_csv ( ' dbpedia_csv / train . csv ' , header = None ) <nl> train . divisions = tuple ( range ( 1 , len ( train . divisions ) + 1 ) ) <nl> def _feed_dict_fn ( ) : <nl> inp = np . zeros ( self . input_shape , dtype = self . input_dtype ) <nl> out = np . zeros ( self . output_shape , dtype = self . output_dtype ) <nl> for i in xrange ( self . batch_size ) : <nl> - # sample = self . random_state . randint ( 0 , self . X . shape [ 0 ] ) <nl> - # inp [ i , : ] = self . X [ sample , : ] <nl> - inp [ i , : ] = self . X . sample ( 1 , self . random_state ) <nl> + sample = self . random_state . randint ( 0 , self . X_shape [ 0 ] ) <nl> + inp [ i , : ] = self . X . loc [ sample ] . compute ( ) <nl> + out_value = self . y . loc [ sample ] . compute ( ) <nl> if self . n_classes > 1 : <nl> if len ( self . output_shape ) = = 2 : <nl> - out . itemset ( ( i , self . y [ sample ] ) , 1 . 0 ) <nl> + out . itemset ( ( i , out_value ) , 1 . 0 ) # TODO : sample needs to be index for y to work <nl> else : <nl> - for idx , value in enumerate ( self . y [ sample ] ) : <nl> + for idx , value in enumerate ( out_value ) : <nl> out . itemset ( tuple ( [ i , idx , value ] ) , 1 . 0 ) <nl> else : <nl> - out [ i ] = self . y [ sample ] <nl> + out [ i ] = out_value <nl> return { input_placeholder . name : inp , output_placeholder . name : out } <nl> return _feed_dict_fn <nl> <nl>
get_feed_dict_fn for dask data feeder
tensorflow/tensorflow
5059644b0184836d452925930928adc99d7fe11a
2015-12-30T19:26:38Z
mmm a / ports / sundials / portfile . cmake <nl> ppp b / ports / sundials / portfile . cmake <nl> vcpkg_download_distfile ( ARCHIVE_FILE <nl> ) <nl> vcpkg_extract_source_archive ( $ { ARCHIVE_FILE } ) <nl> <nl> + vcpkg_apply_patches ( <nl> + SOURCE_PATH $ { SOURCE_PATH } <nl> + PATCHES <nl> + $ { CMAKE_CURRENT_LIST_DIR } / uwp - c4703 - warning . patch <nl> + ) <nl> + <nl> vcpkg_configure_cmake ( <nl> SOURCE_PATH $ { SOURCE_PATH } <nl> OPTIONS - DEXAMPLES_ENABLE = OFF <nl> new file mode 100644 <nl> index 00000000000 . . 3718753cfba <nl> mmm / dev / null <nl> ppp b / ports / sundials / uwp - c4703 - warning . patch <nl> <nl> + diff - - git a / CMakeLists . txt b / CMakeLists . txt <nl> + index 4030f4d . . afef556 100644 <nl> + mmm a / CMakeLists . txt <nl> ppp + b / CMakeLists . txt <nl> + MARK_AS_ADVANCED ( FORCE SUNDIALS_DEVTESTS ) <nl> + <nl> + IF ( WIN32 ) <nl> + ADD_DEFINITIONS ( - D_CRT_SECURE_NO_WARNINGS ) <nl> + + ADD_COMPILE_OPTIONS ( / wd4703 ) # Needed for uwp <nl> + ENDIF ( WIN32 ) <nl> + <nl> + IF ( APPLE ) <nl>
[ sundials ] Add patch for uwp
microsoft/vcpkg
7d899bb45333006463bfd9512507131e81e2ec18
2018-06-13T05:22:18Z
mmm a / tests / runner . py <nl> ppp b / tests / runner . py <nl> def test_sdl_rotozoom ( self ) : <nl> shutil . copyfile ( path_from_root ( ' tests ' , ' screenshot . png ' ) , os . path . join ( self . get_dir ( ) , ' example . png ' ) ) <nl> self . btest ( ' sdl_rotozoom . c ' , reference = ' sdl_rotozoom . png ' , args = [ ' - - preload - file ' , ' example . png ' ] ) <nl> <nl> - def zzztest_sdl_canvas_palette_2 ( self ) : # XXX disabled until we have proper automation <nl> - open ( os . path . join ( self . get_dir ( ) , ' sdl_canvas_palette_2 . c ' ) , ' w ' ) . write ( self . with_report_result ( open ( path_from_root ( ' tests ' , ' sdl_canvas_palette_2 . c ' ) ) . read ( ) ) ) <nl> - open ( os . path . join ( self . get_dir ( ) , ' pre . js ' ) , ' w ' ) . write ( ' Module [ \ ' preRun \ ' ] = function ( ) { SDL . defaults . copyOnLock = false } ' ) <nl> + def test_sdl_canvas_palette_2 ( self ) : <nl> + open ( os . path . join ( self . get_dir ( ) , ' pre . js ' ) , ' w ' ) . write ( ' ' ' <nl> + Module [ ' preRun ' ] . push ( function ( ) { <nl> + SDL . defaults . copyOnLock = false ; <nl> + } ) ; <nl> + ' ' ' ) <nl> + <nl> + open ( os . path . join ( self . get_dir ( ) , ' args - r . js ' ) , ' w ' ) . write ( ' ' ' <nl> + Module [ ' arguments ' ] = [ ' - r ' ] ; <nl> + ' ' ' ) <nl> <nl> - Popen ( [ PYTHON , EMCC , os . path . join ( self . get_dir ( ) , ' sdl_canvas_palette_2 . c ' ) , ' - o ' , ' page . html ' , ' - - pre - js ' , ' pre . js ' ] ) . communicate ( ) <nl> - self . run_browser ( ' page . html ' , ' ' ) <nl> + open ( os . path . join ( self . get_dir ( ) , ' args - g . js ' ) , ' w ' ) . write ( ' ' ' <nl> + Module [ ' arguments ' ] = [ ' - g ' ] ; <nl> + ' ' ' ) <nl> + <nl> + open ( os . path . join ( self . get_dir ( ) , ' args - b . js ' ) , ' w ' ) . write ( ' ' ' <nl> + Module [ ' arguments ' ] = [ ' - b ' ] ; <nl> + ' ' ' ) <nl> + <nl> + self . btest ( ' sdl_canvas_palette_2 . c ' , reference = ' sdl_canvas_palette_r . png ' , args = [ ' - - pre - js ' , ' pre . js ' , ' - - pre - js ' , ' args - r . js ' ] ) <nl> + self . btest ( ' sdl_canvas_palette_2 . c ' , reference = ' sdl_canvas_palette_g . png ' , args = [ ' - - pre - js ' , ' pre . js ' , ' - - pre - js ' , ' args - g . js ' ] ) <nl> + self . btest ( ' sdl_canvas_palette_2 . c ' , reference = ' sdl_canvas_palette_b . png ' , args = [ ' - - pre - js ' , ' pre . js ' , ' - - pre - js ' , ' args - b . js ' ] ) <nl> <nl> def test_glbegin_points ( self ) : <nl> shutil . copyfile ( path_from_root ( ' tests ' , ' screenshot . png ' ) , os . path . join ( self . get_dir ( ) , ' screenshot . png ' ) ) <nl> mmm a / tests / sdl_canvas_palette_2 . c <nl> ppp b / tests / sdl_canvas_palette_2 . c <nl> <nl> # include < stdio . h > <nl> # include < SDL / SDL . h > <nl> # include < emscripten . h > <nl> + # include < string . h > <nl> <nl> static const int COLOR_COUNT = 32 ; <nl> <nl> static SDL_Surface * screen ; <nl> static SDL_Color pal [ COLOR_COUNT + 1 ] ; <nl> <nl> - void initializePalette ( ) { <nl> + void pallete ( int red , int green , int blue ) { <nl> / / initialize sdl palette <nl> - / / with red green and blue <nl> - / / colors <nl> + / / with gradient colors <nl> pal [ 0 ] . r = 0 ; <nl> pal [ 0 ] . g = 0 ; <nl> pal [ 0 ] . b = 0 ; <nl> pal [ 0 ] . unused = 0 ; <nl> <nl> for ( int i = 1 ; i < 1 + COLOR_COUNT ; i + + ) { <nl> - pal [ i ] . r = 255 / COLOR_COUNT * i ; <nl> - pal [ i ] . g = 0 ; <nl> - pal [ i ] . b = 0 ; <nl> + pal [ i ] . r = ( float ) red / COLOR_COUNT * i ; <nl> + pal [ i ] . g = ( float ) green / COLOR_COUNT * i ; <nl> + pal [ i ] . b = ( float ) blue / COLOR_COUNT * i ; <nl> pal [ i ] . unused = 0 ; <nl> } <nl> <nl> SDL_SetColors ( screen , pal , 0 , 1 + COLOR_COUNT ) ; <nl> } <nl> <nl> - void animatePalette ( ) { <nl> - SDL_Color temporary ; <nl> - temporary = pal [ 1 ] ; <nl> - for ( int i = 2 ; i < 1 + COLOR_COUNT ; i + + ) { <nl> - pal [ i - 1 ] = pal [ i ] ; <nl> - } <nl> - pal [ COLOR_COUNT ] = temporary ; <nl> - <nl> - SDL_SetColors ( screen , pal , 1 , COLOR_COUNT ) ; <nl> - <nl> - / / refreshing <nl> - SDL_LockSurface ( screen ) ; <nl> - SDL_UnlockSurface ( screen ) ; <nl> - <nl> - printf ( " yet another cycle \ n " ) ; <nl> - } <nl> - <nl> - int main ( ) { <nl> + int main ( int argc , char * * argv ) { <nl> SDL_Init ( SDL_INIT_VIDEO ) ; <nl> - screen = SDL_SetVideoMode ( 600 , 400 , 8 , SDL_HWSURFACE | SDL_HWPALETTE ) ; <nl> + screen = SDL_SetVideoMode ( 600 , 450 , 8 , SDL_HWSURFACE | SDL_HWPALETTE ) ; <nl> <nl> / / test empty pallete <nl> SDL_LockSurface ( screen ) ; <nl> SDL_UnlockSurface ( screen ) ; <nl> <nl> - initializePalette ( ) ; <nl> - <nl> - / / palette is red yellow blue <nl> + / / Draw gradient <nl> SDL_LockSurface ( screen ) ; <nl> int size = screen - > h * screen - > pitch ; <nl> char * color = screen - > pixels ; <nl> int main ( ) { <nl> } <nl> SDL_UnlockSurface ( screen ) ; <nl> <nl> - / / Animation <nl> - printf ( " you should see red gradient animation \ n " ) ; <nl> - emscripten_set_main_loop ( animatePalette , 0 , 1 ) ; <nl> + / / Set pallete <nl> + if ( argc > 1 ) { <nl> + printf ( " % s \ n " , argv [ 1 ] ) ; <nl> + if ( strcmp ( argv [ 1 ] , " - r " ) = = 0 ) { <nl> + printf ( " set [ red ] \ n " ) ; <nl> + pallete ( 255 , 0 , 0 ) ; <nl> + } <nl> + if ( strcmp ( argv [ 1 ] , " - g " ) = = 0 ) { <nl> + printf ( " set [ green ] \ n " ) ; <nl> + pallete ( 0 , 255 , 0 ) ; <nl> + } <nl> + if ( strcmp ( argv [ 1 ] , " - b " ) = = 0 ) { <nl> + printf ( " set [ blue ] \ n " ) ; <nl> + pallete ( 0 , 0 , 255 ) ; <nl> + } <nl> + } <nl> + <nl> + / / refreshing <nl> + SDL_LockSurface ( screen ) ; <nl> + SDL_UnlockSurface ( screen ) ; <nl> <nl> SDL_Quit ( ) ; <nl> <nl> new file mode 100644 <nl> index 00000000000 . . 54ed7e9af32 <nl> Binary files / dev / null and b / tests / sdl_canvas_palette_b . png differ <nl> new file mode 100644 <nl> index 00000000000 . . a2a5484db0e <nl> Binary files / dev / null and b / tests / sdl_canvas_palette_g . png differ <nl> new file mode 100644 <nl> index 00000000000 . . 29b8226b5df <nl> Binary files / dev / null and b / tests / sdl_canvas_palette_r . png differ <nl>
Merge pull request from caiiiycuk / palette_test
emscripten-core/emscripten
7b129450d48a3552dc8189d96ef695db8cc9c15b
2013-01-31T01:10:28Z