From 6511bfd79af479bd889a2d9250631a5ed78ecf51 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 27 Sep 2016 10:37:35 +0900 Subject: Removed trailing spaces --- include/mruby.h | 78 +++++++++++++++++++++++++------------------------- include/mruby/string.h | 16 +++++------ 2 files changed, 47 insertions(+), 47 deletions(-) (limited to 'include') diff --git a/include/mruby.h b/include/mruby.h index 5375529dc..25514ee2c 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -222,7 +222,7 @@ MRB_API struct RClass *mrb_define_class(mrb_state *mrb, const char *name, struct /** * Defines a new module. - * + * * @param [mrb_state *] mrb_state* The current mruby state. * @param [const char *] char* The name of the module. * @return [struct RClass *] Reference to the newly defined module. @@ -232,11 +232,11 @@ MRB_API mrb_value mrb_singleton_class(mrb_state*, mrb_value); /** * Include a module in another class or module. - * Equivalent to: + * Equivalent to: * - * module B - * include A - * end + * module B + * include A + * end * @param [mrb_state *] mrb_state* The current mruby state. * @param [struct RClass *] RClass* A reference to module or a class. * @param [struct RClass *] RClass* A reference to the module to be included. @@ -253,7 +253,7 @@ MRB_API void mrb_include_module(mrb_state*, struct RClass*, struct RClass*); * @param [mrb_state *] mrb_state* The current mruby state. * @param [struct RClass *] RClass* A reference to module or a class. * @param [struct RClass *] RClass* A reference to the module to be prepended. - */ + */ MRB_API void mrb_prepend_module(mrb_state*, struct RClass*, struct RClass*); /** @@ -302,7 +302,7 @@ MRB_API void mrb_define_method(mrb_state *mrb, struct RClass *cla, const char *n * foo = mrb_define_class(mrb, "Foo", mrb->object_class); * mrb_define_class_method(mrb, foo, "bar", bar_method, MRB_ARGS_NONE()); * } - * @param [mrb_state *] mrb_state* The MRuby state reference. + * @param [mrb_state *] mrb_state* The MRuby state reference. * @param [struct RClass *] RClass* The class where the class method will be defined. * @param [const char *] char* The name of the class method being defined. * @param [mrb_func_t] mrb_func_t The function pointer to the class method definition. @@ -317,23 +317,23 @@ MRB_API void mrb_define_singleton_method(mrb_state*, struct RObject*, const char * Example: * * # Ruby style - * module Foo + * module Foo * def Foo.bar - * end - * end - * // C style + * end + * end + * // C style * mrb_value bar_method(mrb_state* mrb, mrb_value self){ - * return mrb_nil_value(); - * } - * void mrb_example_gem_init(mrb_state* mrb){ + * return mrb_nil_value(); + * } + * void mrb_example_gem_init(mrb_state* mrb){ * struct RClass *foo; - * foo = mrb_define_module(mrb, "Foo"); + * foo = mrb_define_module(mrb, "Foo"); * mrb_define_module_function(mrb, foo, "bar", bar_method, MRB_ARGS_NONE()); - * } + * } * @param [mrb_state *] mrb_state* The MRuby state reference. * @param [struct RClass *] RClass* The module where the module function will be defined. * @param [const char *] char* The name of the module function being defined. - * @param [mrb_func_t] mrb_func_t The function pointer to the module function definition. + * @param [mrb_func_t] mrb_func_t The function pointer to the module function definition. * @param [mrb_aspec] mrb_aspec The method parameters declaration. */ MRB_API void mrb_define_module_function(mrb_state*, struct RClass*, const char*, mrb_func_t, mrb_aspec); @@ -348,9 +348,9 @@ MRB_API void mrb_define_module_function(mrb_state*, struct RClass*, const char*, * AGE = 22 * end * // C style - * #include + * #include * #include - * + * * void * mrb_example_gem_init(mrb_state* mrb){ * mrb_define_const(mrb, mrb->kernel_module, "AGE", mrb_fixnum_value(22)); @@ -389,7 +389,7 @@ MRB_API void mrb_define_const(mrb_state*, struct RClass*, const char *name, mrb_ * // C style * #include * #include - * + * * mrb_value * mrb_example_method(mrb_state *mrb){ * return mrb_str_new_cstr(mrb, "example"); @@ -400,14 +400,14 @@ MRB_API void mrb_define_const(mrb_state*, struct RClass*, const char *name, mrb_ * struct RClass *example_class_a; * struct RClass *example_class_b; * struct RClass *example_class_c; - * + * * example_class_a = mrb_define_class(mrb, "ExampleClassA", mrb->object_class); * mrb_define_method(mrb, example_class_a, "example_method", mrb_example_method, MRB_ARGS_NONE()); * example_class_b = mrb_define_class(mrb, "ExampleClassB", example_class_a); * example_class_c = mrb_define_class(mrb, "ExampleClassC", example_class_b); * mrb_undef_method(mrb, example_class_c, "example_method"); * } - * + * * mrb_example_gem_final(mrb_state* mrb){ * } * @param [mrb_state*] mrb_state* The mruby state reference. @@ -428,16 +428,16 @@ MRB_API void mrb_undef_method(mrb_state*, struct RClass*, const char*); * end * * ExampleClass.example_method - * + * * // C style * #include - * #include + * #include * * mrb_value * mrb_example_method(mrb_state *mrb){ - * return mrb_str_new_cstr(mrb, "example"); + * return mrb_str_new_cstr(mrb, "example"); * } - * + * * void * mrb_example_gem_init(mrb_state* mrb){ * struct RClass *example_class; @@ -445,7 +445,7 @@ MRB_API void mrb_undef_method(mrb_state*, struct RClass*, const char*); * mrb_define_class_method(mrb, example_class, "example_method", mrb_example_method, MRB_ARGS_NONE()); * mrb_undef_class_method(mrb, example_class, "example_method"); * } - * + * * void * mrb_example_gem_final(mrb_state* mrb){ * } @@ -476,7 +476,7 @@ MRB_API void mrb_undef_class_method(mrb_state*, struct RClass*, const char*); * example_class = mrb_define_class(mrb, "ExampleClass", mrb->object_class); # => class ExampleClass; end * obj = mrb_obj_new(mrb, example_class, 0, NULL); # => ExampleClass.new * mrb_p(mrb, obj); // => Kernel#p - * } + * } * @param [mrb_state*] mrb The current mruby state. * @param [RClass*] c Reference to the class of the new object. * @param [mrb_int] argc Number of arguments in argv @@ -501,7 +501,7 @@ MRB_API mrb_value mrb_instance_new(mrb_state *mrb, mrb_value cv); * void * mrb_example_gem_init(mrb_state* mrb) { * struct RClass *example_class; - * + * * mrb_value obj; * example_class = mrb_class_new(mrb, mrb->object_class); * obj = mrb_obj_new(mrb, example_class, 0, NULL); // => #<#:0x9a94588> @@ -521,7 +521,7 @@ MRB_API struct RClass * mrb_class_new(mrb_state *mrb, struct RClass *super); * void * mrb_example_gem_init(mrb_state* mrb) { * struct RClass *example_module; - * + * * example_module = mrb_module_new(mrb); * } * @@ -541,7 +541,7 @@ MRB_API struct RClass * mrb_module_new(mrb_state *mrb); * * example_class = mrb_define_class(mrb, "ExampleClass", mrb->object_class); * cd = mrb_class_defined(mrb, "ExampleClass"); - * + * * // If mrb_class_defined returns 1 then puts "True" * // If mrb_class_defined returns 0 then puts "False" * if (cd == 1){ @@ -597,7 +597,7 @@ MRB_API mrb_value mrb_notimplement_m(mrb_state*, mrb_value); * Duplicate an object. * * Equivalent to: - * Object#dup + * Object#dup * @param [mrb_state*] mrb The current mruby state. * @param [mrb_value] obj Object to be duplicate. * @return [mrb_value] The newly duplicated object. @@ -629,7 +629,7 @@ MRB_API mrb_value mrb_check_to_integer(mrb_state *mrb, mrb_value val, const char * mrb_define_method(mrb, example_class, "example_method", exampleMethod, MRB_ARGS_NONE()); * mid = mrb_intern_str(mrb, mrb_str_new_cstr(mrb, "example_method" )); * obj_resp = mrb_obj_respond_to(mrb, example_class, mid); // => 1(true in Ruby world) - * + * * // If mrb_obj_respond_to returns 1 then puts "True" * // If mrb_obj_respond_to returns 0 then puts "False" * if (obj_resp == 1) { @@ -780,13 +780,13 @@ mrb_get_argc(mrb_state *mrb) /* get argc */ * #include * #include * #include "mruby/compile.h" - * + * * int * main() * { * mrb_int i = 99; * mrb_state *mrb = mrb_open(); - * + * * if (!mrb) { } * FILE *fp = fopen("test.rb","r"); * mrb_value obj = mrb_load_file(mrb,fp); @@ -804,7 +804,7 @@ mrb_get_argc(mrb_state *mrb) /* get argc */ MRB_API mrb_value mrb_funcall(mrb_state*, mrb_value, const char*, mrb_int,...); /** * Call existing ruby functions. This is basically the type safe version of mrb_funcall. - * + * * #include * #include * #include "mruby/compile.h" @@ -813,10 +813,10 @@ MRB_API mrb_value mrb_funcall(mrb_state*, mrb_value, const char*, mrb_int,...); * { * mrb_int i = 99; * mrb_state *mrb = mrb_open(); - * + * * if (!mrb) { } * mrb_sym m_sym = mrb_intern_cstr(mrb, "method_name"); // Symbol for method. - * + * * FILE *fp = fopen("test.rb","r"); * mrb_value obj = mrb_load_file(mrb,fp); * mrb_funcall_argv(mrb, obj, m_sym, 1, &obj); // Calling ruby function from test.rb. @@ -841,7 +841,7 @@ MRB_API mrb_value mrb_funcall_with_block(mrb_state*, mrb_value, mrb_sym, mrb_int * * # Ruby style: * :pizza # => :pizza - * + * * // C style: * mrb_sym m_sym = mrb_intern_cstr(mrb, "pizza"); // => :pizza * @param [mrb_state*] mrb_state* The current mruby state. diff --git a/include/mruby/string.h b/include/mruby/string.h index c4af0963e..e45846e87 100644 --- a/include/mruby/string.h +++ b/include/mruby/string.h @@ -91,12 +91,12 @@ MRB_API void mrb_str_modify(mrb_state*, struct RString*); /* * Appends self to other. Returns self as a concatnated string. * - * + * * Example: * * !!!c * int - * main(int argc, + * main(int argc, * char **argv) * { * // Variable declarations. @@ -138,12 +138,12 @@ MRB_API void mrb_str_concat(mrb_state*, mrb_value, mrb_value); /* * Adds two strings together. * - * + * * Example: * * !!!c * int - * main(int argc, + * main(int argc, * char **argv) * { * // Variable declarations. @@ -215,7 +215,7 @@ MRB_API mrb_value mrb_obj_as_string(mrb_state *mrb, mrb_value obj); * * !!!c * int - * main(int argc, + * main(int argc, * char **argv) * { * // Variable declaration. @@ -224,11 +224,11 @@ MRB_API mrb_value mrb_obj_as_string(mrb_state *mrb, mrb_value obj); * mrb_state *mrb = mrb_open(); * if (!mrb) * { - * // handle error + * // handle error * } * // Creates a new string. * str = mrb_str_new_cstr(mrb, "Hello, world!"); - * // Returns 5 characters of + * // Returns 5 characters of * mrb_str_resize(mrb, str, 5); * mrb_p(mrb, str); * @@ -254,7 +254,7 @@ MRB_API mrb_value mrb_str_resize(mrb_state *mrb, mrb_value str, mrb_int len); * * !!!c * int - * main(int argc, + * main(int argc, * char const **argv) * { * // Variable declarations. -- cgit v1.2.3