Skip to content

Commit

Permalink
change:core:Reformat all files for ci check (even those i havent touc…
Browse files Browse the repository at this point in the history
…hed)
  • Loading branch information
jkoan committed May 28, 2020
1 parent 9f85b14 commit aff19d0
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 21 deletions.
3 changes: 2 additions & 1 deletion navit/browserplugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ NP_Shutdown() {
return NPERR_NO_ERROR;
}

NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData * saved) {
NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char *argn[], char *argv[],
NPSavedData * saved) {
char *args[]= {"/usr/bin/navit",NULL};
// Make sure we can render this plugin
NPBool browserSupportsWindowless = false;
Expand Down
5 changes: 3 additions & 2 deletions navit/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ static void command_evaluate_to(struct attr *attr, const char *expr, struct cont
}

enum attr_type command_evaluate_to_attr(struct attr *attr, char *expr, int *error, struct attr *ret) {
struct result res={{0,},};
struct result res= {{0,},};
struct context ctx;
command_evaluate_to(attr, expr, &ctx, &res);
if (ctx.error)
Expand Down Expand Up @@ -1501,7 +1501,8 @@ void command_interpreter(struct attr *attr) {
}
#endif

static void command_table_call(struct command_table *table, int count, void *data, char *command, struct attr **in, struct attr ***out, int *valid) {
static void command_table_call(struct command_table *table, int count, void *data, char *command, struct attr **in,
struct attr ***out, int *valid) {
int i;
for (i = 0 ; i < count ; i++) {
if (!strcmp(command,table->command)) {
Expand Down
21 changes: 14 additions & 7 deletions navit/graphics/gd/graphics_gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ static struct graphics_gc_priv *gc_new(struct graphics_priv *gr, struct graphics
}


static struct graphics_image_priv *image_new(struct graphics_priv *gr, struct graphics_image_methods *meth, char *name, int *w, int *h, struct point *hot, int rotation) {
static struct graphics_image_priv *image_new(struct graphics_priv *gr, struct graphics_image_methods *meth, char *name,
int *w, int *h, struct point *hot, int rotation) {
FILE *file;
struct graphics_image_priv *ret=NULL;
gdImagePtr im=NULL;
Expand Down Expand Up @@ -376,7 +377,8 @@ static void draw_circle(struct graphics_priv *gr, struct graphics_gc_priv *gc, s
}


static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy) {
static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg,
struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy) {
struct font_freetype_text *t;
struct font_freetype_glyph *g, **gp;
gdImagePtr im;
Expand Down Expand Up @@ -428,7 +430,8 @@ static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, str
gr->freetype_methods.text_destroy(t);
}

static void draw_image(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, struct graphics_image_priv *img) {
static void draw_image(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p,
struct graphics_image_priv *img) {
gdImageCopy(gr->im, img->im, p->x, p->y, 0, 0, img->im->sx, img->im->sy);
}

Expand Down Expand Up @@ -507,7 +510,8 @@ static void draw_mode(struct graphics_priv *gr, enum draw_mode_num mode) {
}
}

static struct graphics_priv * overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int wraparound);
static struct graphics_priv * overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p,
int w, int h, int wraparound);

static void add_overlays(struct graphics_priv *overlay, gdImagePtr im) {
while (overlay) {
Expand Down Expand Up @@ -756,7 +760,8 @@ static struct graphics_methods graphics_methods = {
NULL, /* hide_native_keyboard */
};

static struct graphics_priv *overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int wraparound) {
static struct graphics_priv *overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p,
int w, int h, int wraparound) {
struct font_priv * (*font_freetype_new)(void *meth);
struct graphics_priv *ret;

Expand Down Expand Up @@ -784,7 +789,8 @@ static void emit_callback(struct graphics_priv *priv) {
}


static struct graphics_priv *graphics_gd_new(struct navit *nav, struct graphics_methods *meth, struct attr **attrs, struct callback_list *cbl) {
static struct graphics_priv *graphics_gd_new(struct navit *nav, struct graphics_methods *meth, struct attr **attrs,
struct callback_list *cbl) {
struct font_priv * (*font_freetype_new)(void *meth);
struct graphics_priv *ret;
event_request_system("glib","graphics_gd_new");
Expand All @@ -794,7 +800,8 @@ static struct graphics_priv *graphics_gd_new(struct navit *nav, struct graphics_
*meth=graphics_methods;
ret=g_new0(struct graphics_priv, 1);
font_freetype_new(&ret->freetype_methods);
meth->font_new=(struct graphics_font_priv *(*)(struct graphics_priv *, struct graphics_font_methods *, char *, int, int))ret->freetype_methods.font_new;
meth->font_new=(struct graphics_font_priv *(*)(struct graphics_priv *, struct graphics_font_methods *, char *, int,
int))ret->freetype_methods.font_new;
meth->get_text_bbox=ret->freetype_methods.get_text_bbox;
ret->cb=callback_new_attr_1(callback_cast(emit_callback), attr_navit, ret);
navit_add_callback(nav, ret->cb);
Expand Down
24 changes: 16 additions & 8 deletions navit/graphics/null/graphics_null.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ static struct graphics_font_methods font_methods = {
font_destroy
};

static struct graphics_font_priv *font_new(struct graphics_priv *gr, struct graphics_font_methods *meth, char *font, int size, int flags) {
static struct graphics_font_priv *font_new(struct graphics_priv *gr, struct graphics_font_methods *meth, char *font,
int size, int flags) {
*meth=font_methods;
return &graphics_font_priv;
}
Expand Down Expand Up @@ -98,7 +99,8 @@ static struct graphics_gc_priv *gc_new(struct graphics_priv *gr, struct graphics
return &graphics_gc_priv;
}

static struct graphics_image_priv *image_new(struct graphics_priv *gr, struct graphics_image_methods *meth, char *path, int *w, int *h, struct point *hot, int rotation) {
static struct graphics_image_priv *image_new(struct graphics_priv *gr, struct graphics_image_methods *meth, char *path,
int *w, int *h, struct point *hot, int rotation) {
return &graphics_image_priv;
}

Expand All @@ -115,10 +117,12 @@ static void draw_circle(struct graphics_priv *gr, struct graphics_gc_priv *gc, s
}


static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy) {
static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg,
struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy) {
}

static void draw_image(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, struct graphics_image_priv *img) {
static void draw_image(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p,
struct graphics_image_priv *img) {
}

static void draw_drag(struct graphics_priv *gr, struct point *p) {
Expand All @@ -130,7 +134,8 @@ static void background_gc(struct graphics_priv *gr, struct graphics_gc_priv *gc)
static void draw_mode(struct graphics_priv *gr, enum draw_mode_num mode) {
}

static struct graphics_priv * overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int wraparound);
static struct graphics_priv * overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p,
int w, int h, int wraparound);

static void resize_callback(int w, int h) {
callback_list_call_attr_2(callbacks, attr_resize, GINT_TO_POINTER(1), GINT_TO_POINTER(1));
Expand Down Expand Up @@ -159,7 +164,8 @@ static void *get_data(struct graphics_priv *this, char const *type) {
static void image_free(struct graphics_priv *gr, struct graphics_image_priv *priv) {
}

static void get_text_bbox(struct graphics_priv *gr, struct graphics_font_priv *font, char *text, int dx, int dy, struct point *ret, int estimate) {
static void get_text_bbox(struct graphics_priv *gr, struct graphics_font_priv *font, char *text, int dx, int dy,
struct point *ret, int estimate) {
}

static void overlay_disable(struct graphics_priv *gr, int disable) {
Expand Down Expand Up @@ -193,13 +199,15 @@ static struct graphics_methods graphics_methods = {
NULL, /* hide_native_keyboard */
};

static struct graphics_priv *overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int wraparound) {
static struct graphics_priv *overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p,
int w, int h, int wraparound) {
*meth=graphics_methods;
return &graphics_priv;
}


static struct graphics_priv *graphics_null_new(struct navit *nav, struct graphics_methods *meth, struct attr **attrs, struct callback_list *cbl) {
static struct graphics_priv *graphics_null_new(struct navit *nav, struct graphics_methods *meth, struct attr **attrs,
struct callback_list *cbl) {
struct attr *event_loop_system = NULL;
*meth=graphics_methods;

Expand Down
6 changes: 4 additions & 2 deletions navit/graphics/opengl/graphics_opengl_x11.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ static void *graphics_opengl_get_window(struct graphics_opengl_window_system *x1
return (void *)x11->window;
}

static void graphics_opengl_set_callbacks(struct graphics_opengl_window_system *x11, void *data, void *resize, void *button, void *motion, void *keypress) {
static void graphics_opengl_set_callbacks(struct graphics_opengl_window_system *x11, void *data, void *resize,
void *button, void *motion, void *keypress) {
x11->data=data;
x11->resize=resize;
x11->button=button;
Expand Down Expand Up @@ -104,7 +105,8 @@ static void graphics_opengl_x11_watch(struct graphics_opengl_window_system *x11)
}

struct graphics_opengl_window_system *
graphics_opengl_x11_new(void *displayname, int w, int h, int depth, struct graphics_opengl_window_system_methods **methods) {
graphics_opengl_x11_new(void *displayname, int w, int h, int depth,
struct graphics_opengl_window_system_methods **methods) {
struct graphics_opengl_window_system *ret=g_new0(struct graphics_opengl_window_system, 1);
XSetWindowAttributes attributes;
unsigned long valuemask;
Expand Down
2 changes: 1 addition & 1 deletion navit/speech/espeak/speak.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ int GetFileLength(const char *filename) {
return(statbuf.st_size);
}

void MarkerEvent(int type, unsigned int char_position, int value, int value2, unsigned char *out_ptr){
void MarkerEvent(int type, unsigned int char_position, int value, int value2, unsigned char *out_ptr) {
}

char *Alloc(int size) {
Expand Down

0 comments on commit aff19d0

Please sign in to comment.