Skip to content

Commit

Permalink
rm whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
roco committed Apr 30, 2012
1 parent 6b739d9 commit 4ec6d41
Show file tree
Hide file tree
Showing 78 changed files with 19,541 additions and 19,541 deletions.
4 changes: 2 additions & 2 deletions include/mrbconf.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** mrbconf.h - mruby core configuration
**
**
** See Copyright Notice in mruby.h
*/

Expand Down Expand Up @@ -42,4 +42,4 @@ typedef intptr_t mrb_sym;
# define TRUE 1
#endif

#endif /* MRUBYCONF_H */
#endif /* MRUBYCONF_H */
28 changes: 14 additions & 14 deletions include/mruby.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
** mruby - An embeddable Ruby implementaion
**
**
** Copyright (c) mruby developers 2010-2012
**
**
** Permission is hereby granted, free of charge, to any person obtaining
** a copy of this software and associated documentation files (the
** "Software"), to deal in the Software without restriction, including
Expand Down Expand Up @@ -33,7 +33,7 @@

enum mrb_vtype {
MRB_TT_FALSE = 0, /* 0 */
MRB_TT_FREE, /* 1 */
MRB_TT_FREE, /* 1 */
MRB_TT_TRUE, /* 2 */
MRB_TT_FIXNUM, /* 3 */
MRB_TT_SYMBOL, /* 4 */
Expand Down Expand Up @@ -276,8 +276,8 @@ typedef struct mrb_state {
mrb_int gc_step_ratio;

mrb_sym symidx;
struct kh_n2s *name2sym; /* symbol table */
struct kh_s2n *sym2name; /* reverse symbol table */
struct kh_n2s *name2sym; /* symbol table */
struct kh_s2n *sym2name; /* reverse symbol table */
struct RNode *local_svar;/* regexp */

struct RClass *eException_class;
Expand Down Expand Up @@ -310,22 +310,22 @@ struct RClass * mrb_define_class_under(mrb_state *mrb, struct RClass *outer, con
struct RClass * mrb_define_module_under(mrb_state *mrb, struct RClass *outer, const char *name);

/* required arguments */
#define ARGS_REQ(n) (((n)&0x1f) << 19)
#define ARGS_REQ(n) (((n)&0x1f) << 19)
/* optional arguments */
#define ARGS_OPT(n) (((n)&0x1f) << 14)
#define ARGS_OPT(n) (((n)&0x1f) << 14)
/* rest argument */
#define ARGS_REST() (1 << 13)
#define ARGS_REST() (1 << 13)
/* required arguments after rest */
#define ARGS_POST(n) (((n)&0x1f) << 8)
#define ARGS_POST(n) (((n)&0x1f) << 8)
/* keyword arguments (n of keys, kdict) */
#define ARGS_KEY(n1,n2) ((((n1)&0x1f) << 3) | ((n2)?(1<<2):0))
#define ARGS_KEY(n1,n2) ((((n1)&0x1f) << 3) | ((n2)?(1<<2):0))
/* block argument */
#define ARGS_BLOCK() (1 << 1)
#define ARGS_BLOCK() (1 << 1)

/* accept any number of arguments */
#define ARGS_ANY() ARGS_REST()
#define ARGS_ANY() ARGS_REST()
/* accept no arguments */
#define ARGS_NONE() 0
#define ARGS_NONE() 0

int mrb_get_args(mrb_state *mrb, const char *format, ...);

Expand Down Expand Up @@ -600,4 +600,4 @@ int mrb_sourceline(void);
void ruby_default_signal(int sig);
mrb_value mrb_attr_get(mrb_state *mrb, mrb_value obj, mrb_sym id);

#endif /* MRUBY_H */
#endif /* MRUBY_H */
4 changes: 2 additions & 2 deletions include/mruby/array.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** array.h - Array class
**
**
** See Copyright Notice in mruby.h
*/

Expand Down Expand Up @@ -45,4 +45,4 @@ mrb_value mrb_ary_tmp_new(mrb_state *mrb, long capa);
mrb_value mrb_ary_sort(mrb_state *mrb, mrb_value ary);
mrb_value mrb_ary_shift(mrb_state *mrb, mrb_value self);

#endif /* MRUBY_ARRAY_H */
#endif /* MRUBY_ARRAY_H */
2 changes: 1 addition & 1 deletion include/mruby/cdump.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** cdump.h - mruby binary dumper (C source format)
**
**
** See Copyright Notice in mruby.h
*/

Expand Down
4 changes: 2 additions & 2 deletions include/mruby/class.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** class.h - Class class
**
**
** See Copyright Notice in mruby.h
*/

Expand Down Expand Up @@ -74,4 +74,4 @@ void mrb_define_method_id(mrb_state *mrb, struct RClass *c, mrb_sym mid, mrb_fun

void mrb_obj_call_init(mrb_state *mrb, mrb_value obj, int argc, mrb_value *argv);

#endif /* MRUBY_CLASS_H */
#endif /* MRUBY_CLASS_H */
4 changes: 2 additions & 2 deletions include/mruby/data.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** data.h - Data class
**
**
** See Copyright Notice in mruby.h
*/

Expand All @@ -13,7 +13,7 @@ extern "C" {


struct mrb_data_type {
const char *struct_name;
const char *struct_name;
void (*dfree)(mrb_state *mrb, void*);
};

Expand Down
2 changes: 1 addition & 1 deletion include/mruby/dump.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** dump.h - mruby binary dumper (Rite binary format)
**
**
** See Copyright Notice in mruby.h
*/

Expand Down
8 changes: 4 additions & 4 deletions include/mruby/hash.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** hash.h - Hash class
**
**
** See Copyright Notice in mruby.h
*/

Expand All @@ -15,9 +15,9 @@ struct RHash {

#define N 624
#define M 397
#define MATRIX_A 0x9908b0dfU /* constant vector a */
#define UMASK 0x80000000U /* most significant w-r bits */
#define LMASK 0x7fffffffU /* least significant r bits */
#define MATRIX_A 0x9908b0dfU /* constant vector a */
#define UMASK 0x80000000U /* most significant w-r bits */
#define LMASK 0x7fffffffU /* least significant r bits */
#define MIXBITS(u,v) ( ((u) & UMASK) | ((v) & LMASK) )
#define TWIST(u,v) ((MIXBITS(u,v) >> 1) ^ ((v)&1U ? MATRIX_A : 0U))
enum {MT_MAX_STATE = N};
Expand Down
4 changes: 2 additions & 2 deletions include/mruby/irep.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** irep.h - mrb_irep structure
**
**
** See Copyright Notice in mruby.h
*/

Expand All @@ -26,4 +26,4 @@ typedef struct mrb_irep {

void mrb_add_irep(mrb_state *mrb, int n);

#endif /* MRUBY_IREP_H */
#endif /* MRUBY_IREP_H */
2 changes: 1 addition & 1 deletion include/mruby/khash.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** ritehash.c - Rite Hash for mruby
**
**
** See Copyright Notice in mruby.h
*/

Expand Down
4 changes: 2 additions & 2 deletions include/mruby/numeric.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** numeric.h - Numeric, Integer, Float, Fixnum class
**
**
** See Copyright Notice in mruby.h
*/

Expand All @@ -20,4 +20,4 @@ mrb_value mrb_flt2big(mrb_state *mrb, float d);
void mrb_num_zerodiv(mrb_state *mrb);
mrb_value mrb_fix2str(mrb_state *mrb, mrb_value x, int base);

#endif /* MRUBY_NUMERIC_H */
#endif /* MRUBY_NUMERIC_H */
6 changes: 3 additions & 3 deletions include/mruby/object.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
** object.h - Object, NilClass, TrueClass, FalseClass class
**
**
** See Copyright Notice in mruby.h
*/

#ifndef MRUBY_OBJECT_H
#define MRUBY_OBJECT_H

#define MRUBY_OBJECT_HEADER \
#define MRUBY_OBJECT_HEADER \
enum mrb_vtype tt:8;\
int color:3;\
unsigned int flags:21;\
Expand Down Expand Up @@ -49,4 +49,4 @@ struct RObject {
#define ROBJECT(v) ((struct RObject*)((v).value.p))
#define ROBJECT_IVPTR(v) (((struct RObject*)((v).value.p))->iv)
#define ROBJECT_NUMIV(v) (ROBJECT_IVPTR(v) ? ROBJECT_IVPTR(v)->size : 0)
#endif /* MRUBY_OBJECT_H */
#endif /* MRUBY_OBJECT_H */
18 changes: 9 additions & 9 deletions include/mruby/proc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** proc.h - Proc class
**
**
** See Copyright Notice in mruby.h
*/

Expand Down Expand Up @@ -28,13 +28,13 @@ struct RProc {
};

/* aspec access */
#define ARGS_GETREQ(a) (((a) >> 19) & 0x1f)
#define ARGS_GETOPT(a) (((a) >> 14) & 0x1f)
#define ARGS_GETREST(a) ((a) & (1<<13))
#define ARGS_GETPOST(a) (((a) >> 8) & 0x1f)
#define ARGS_GETKEY(a) (((a) >> 3) & 0x1f))
#define ARGS_GETKDICT(a) ((a) & (1<<2))
#define ARGS_GETBLOCK(a) ((a) & (1<<1))
#define ARGS_GETREQ(a) (((a) >> 19) & 0x1f)
#define ARGS_GETOPT(a) (((a) >> 14) & 0x1f)
#define ARGS_GETREST(a) ((a) & (1<<13))
#define ARGS_GETPOST(a) (((a) >> 8) & 0x1f)
#define ARGS_GETKEY(a) (((a) >> 3) & 0x1f))
#define ARGS_GETKDICT(a) ((a) & (1<<2))
#define ARGS_GETBLOCK(a) ((a) & (1<<1))

#define MRB_PROC_CFUNC 128
#define MRB_PROC_CFUNC_P(p) ((p)->flags & MRB_PROC_CFUNC)
Expand All @@ -47,4 +47,4 @@ struct RProc *mrb_proc_new(mrb_state*, mrb_irep*);
struct RProc *mrb_proc_new_cfunc(mrb_state*, mrb_func_t);
struct RProc *mrb_closure_new(mrb_state*, mrb_irep*);

#endif /* MRUBY_STRING_H */
#endif /* MRUBY_STRING_H */
4 changes: 2 additions & 2 deletions include/mruby/range.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** range.h - Range class
**
**
** See Copyright Notice in mruby.h
*/

Expand All @@ -24,4 +24,4 @@ mrb_int mrb_range_beg_len(mrb_state *mrb, mrb_value range, mrb_int *begp, mrb_in
int mrb_obj_is_instance_of(mrb_state *mrb, mrb_value obj, struct RClass* c);
struct RClass* mrb_class_real(struct RClass* cl);

#endif /* MRUBY_RANGE_H */
#endif /* MRUBY_RANGE_H */
2 changes: 1 addition & 1 deletion include/mruby/string.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** string.h - String class
**
**
** See Copyright Notice in mruby.h
*/

Expand Down
2 changes: 1 addition & 1 deletion include/mruby/struct.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** struct.h - Struct class
**
**
** See Copyright Notice in mruby.h
*/

Expand Down
4 changes: 2 additions & 2 deletions include/mruby/variable.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** variable.h - mruby variables
**
**
** See Copyright Notice in mruby.h
*/

Expand Down Expand Up @@ -44,4 +44,4 @@ mrb_value mrb_f_global_variables(mrb_state *mrb, mrb_value self);
mrb_value mrb_gv_get(mrb_state *mrb, mrb_sym sym);
void mrb_gv_set(mrb_state *mrb, mrb_sym sym, mrb_value val);

#endif /* MRUBY_VARIABLE_H */
#endif /* MRUBY_VARIABLE_H */
2 changes: 1 addition & 1 deletion src/array.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** array.c - Array class
**
**
** See Copyright Notice in mruby.h
*/

Expand Down
4 changes: 2 additions & 2 deletions src/cdump.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** cdump.c - mruby binary dumper (C source format)
**
**
** See Copyright Notice in mruby.h
*/

Expand Down Expand Up @@ -124,7 +124,7 @@ make_cdump_irep(mrb_state *mrb, int irep_no, FILE *f)
SOURCE_CODE (" irep->syms = mrb_malloc(mrb, sizeof(mrb_sym)*%d);", irep->slen);
for (n=0; n<irep->slen; n++)
if (irep->syms[n]) {
SOURCE_CODE (" irep->syms[%d] = mrb_intern(mrb, \"%s\");", n, mrb_sym2name(mrb, irep->syms[n]));
SOURCE_CODE (" irep->syms[%d] = mrb_intern(mrb, \"%s\");", n, mrb_sym2name(mrb, irep->syms[n]));
}
}
else
Expand Down
Loading

0 comments on commit 4ec6d41

Please sign in to comment.