1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-12-23 16:46:25 +02:00

sch2fig/: compile with -Wmissing-prototypes -Wmissing-declarations

This commit is contained in:
Werner Almesberger 2016-07-31 14:07:29 -03:00
parent b3ffcab90c
commit 8dddf961b6
3 changed files with 16 additions and 15 deletions

View File

@ -14,6 +14,7 @@ NAME = sch2fig
OBJS = main.o sch.o lib.o style.o fig.o cairo.o gfx.o dwg.o text.o misc.o
CFLAGS = -g -O -Wall -Wextra -Wno-unused-parameter -Wshadow \
-Wmissing-prototypes -Wmissing-declarations \
`pkg-config --cflags cairo`
LIBS = -lm `pkg-config --libs cairo`

View File

@ -102,7 +102,7 @@ static void paint(cairo_t *cr, int color, int fill_color)
/* ----- General items ----------------------------------------------------- */
void cr_poly(void *ctx, int points, int x[points], int y[points],
static void cr_poly(void *ctx, int points, int x[points], int y[points],
int color, int fill_color, unsigned layer)
{
struct cairo_ctx *cc = ctx;
@ -125,7 +125,7 @@ void cr_poly(void *ctx, int points, int x[points], int y[points],
}
void cr_circ(void *ctx, int x, int y, int r,
static void cr_circ(void *ctx, int x, int y, int r,
int color, int fill_color, unsigned layer)
{
struct cairo_ctx *cc = ctx;
@ -136,7 +136,7 @@ void cr_circ(void *ctx, int x, int y, int r,
}
void cr_arc(void *ctx, int x, int y, int r, int sa, int ea,
static void cr_arc(void *ctx, int x, int y, int r, int sa, int ea,
int color, int fill_color, unsigned layer)
{
struct cairo_ctx *cc = ctx;
@ -151,7 +151,7 @@ void cr_arc(void *ctx, int x, int y, int r, int sa, int ea,
#define TEXT_STRETCH 1.3
void cr_text(void *ctx, int x, int y, const char *s, unsigned size,
static void cr_text(void *ctx, int x, int y, const char *s, unsigned size,
enum text_align align, int rot, unsigned color, unsigned layer)
{
struct cairo_ctx *cc = ctx;
@ -186,7 +186,7 @@ void cr_text(void *ctx, int x, int y, const char *s, unsigned size,
}
unsigned cr_text_width(void *ctx, const char *s, unsigned size)
static unsigned cr_text_width(void *ctx, const char *s, unsigned size)
{
struct cairo_ctx *cc = ctx;
cairo_text_extents_t ext;
@ -200,7 +200,7 @@ unsigned cr_text_width(void *ctx, const char *s, unsigned size)
/* ----- Initializatio and termination ------------------------------------- */
void *cr_init(const char *template, int n_vars, const char **vars)
static void *cr_init(const char *template, int n_vars, const char **vars)
{
struct cairo_ctx *cc;
@ -219,7 +219,7 @@ void *cr_init(const char *template, int n_vars, const char **vars)
}
void cr_end(void *ctx)
static void cr_end(void *ctx)
{
struct cairo_ctx *cc = ctx;

View File

@ -52,7 +52,7 @@ static inline float pt(int x)
/* ----- Schematics items -------------------------------------------------- */
void fig_line(void *ctx, int sx, int sy, int ex, int ey,
static void fig_line(void *ctx, int sx, int sy, int ex, int ey,
int color, unsigned layer)
{
// TypeStyle FillCol AreaFil Cap FwdAr
@ -67,7 +67,7 @@ void fig_line(void *ctx, int sx, int sy, int ex, int ey,
/* ----- General items ----------------------------------------------------- */
void fig_rect(void *ctx, int sx, int sy, int ex, int ey,
static void fig_rect(void *ctx, int sx, int sy, int ex, int ey,
int color, int fill_color, unsigned layer)
{
// Type Thick Depth StyleV Rad
@ -82,7 +82,7 @@ void fig_rect(void *ctx, int sx, int sy, int ex, int ey,
}
void fig_poly(void *ctx, int points, int x[points], int y[points],
static void fig_poly(void *ctx, int points, int x[points], int y[points],
int color, int fill_color, unsigned layer)
{
int i;
@ -102,7 +102,7 @@ void fig_poly(void *ctx, int points, int x[points], int y[points],
}
void fig_circ(void *ctx, int x, int y, int r,
static void fig_circ(void *ctx, int x, int y, int r,
int color, int fill_color, unsigned layer)
{
// Type Thick Depth StyleV Cx Rx Sx Ex
@ -132,7 +132,7 @@ static int ay(int x, int y, int r, int angle)
}
void fig_arc(void *ctx, int x, int y, int r, int sa, int ea,
static void fig_arc(void *ctx, int x, int y, int r, int sa, int ea,
int color, int fill_color, unsigned layer)
{
int ma = (sa + ea) / 2;
@ -150,7 +150,7 @@ void fig_arc(void *ctx, int x, int y, int r, int sa, int ea,
}
void fig_text(void *ctx, int x, int y, const char *s, unsigned size,
static void fig_text(void *ctx, int x, int y, const char *s, unsigned size,
enum text_align align, int rot, unsigned color, unsigned layer)
{
// Type Depth FontSiz Height
@ -162,7 +162,7 @@ void fig_text(void *ctx, int x, int y, const char *s, unsigned size,
}
unsigned fig_text_width(void *ctx, const char *s, unsigned size)
static unsigned fig_text_width(void *ctx, const char *s, unsigned size)
{
/*
* Note that we stretch the text size, so the ratio is larger than
@ -214,7 +214,7 @@ static bool apply_vars(char *buf, int n_vars, const char **vars)
}
void *fig_init(const char *template, int n_vars, const char **vars)
static void *fig_init(const char *template, int n_vars, const char **vars)
{
FILE *file;
char buf[1000];