1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-25 22:13:44 +02:00

eeshow/: fix some whitespace issues

- trailing space
- space before semicolon
- indentation with spaces instead of tabs (copy & paste)
This commit is contained in:
Werner Almesberger 2016-08-04 19:25:31 -03:00
parent e18c146323
commit 1c6116a8d6
11 changed files with 23 additions and 15 deletions

View File

@ -8,6 +8,8 @@ Parsing and input processing:
Data model:
- implement destructors
- check for memory leaks
- sheets appearing multiple times are parsed anew each time. Should we try
to combine them ?
Visualization (dwg.c and such):
- glabel: build for "right" style, then rotate poly (like hlabel)
@ -21,6 +23,8 @@ Visualization (dwg.c and such):
Rendering:
- better text size guessing also for FIG
- consider switching to Hershey fonts (that's what eeschema uses, right ?)
(goal: prevent font geometry from changing when scaling)
- support fonts attributes ?
- support line thickness ?
- ~ as overline (grep for ~ in out.fig)
@ -34,3 +38,7 @@ GUI:
- fonts grow beyond their bounding boxes when zooming in
- dragging can be slow. maybe reusing old content and only redrawing new
will help ?
On-going:
- use Pango to support markup in overlay boxes:
https://developer.gnome.org/pango/unstable/PangoMarkupFormat.html

View File

@ -110,7 +110,7 @@ static void fig_circ(void *ctx, int x, int y, int r,
{
// Type Thick Depth StyleV Cx Rx Sx Ex
// SubTy Color Pen Dir Cy Ry Sy Ey
// Style FillCol AreaFil Angle
// Style FillCol AreaFil Angle
printf("1 3 0 %d %d %d %d -1 %d 0.0 1 0.0 %d %d %d %d %d %d %d %d\n",
color == -1 ? 0 : WIDTH_COMP_DWG, color, fill_color, layer,
fill_color == -1 ? -1 : 20,

View File

@ -58,7 +58,7 @@ void gfx_arc(int x, int y, int r, int sa, int ea,
int color, int fill_color, unsigned layer);
void gfx_text(int x, int y, const char *s, unsigned size,
enum text_align align, int rot, unsigned color, unsigned layer);
void gfx_tag(const char *s,
void gfx_tag(const char *s,
unsigned points, const int x[points], int const y[points]);
unsigned gfx_text_width(const char *s, unsigned size);

View File

@ -312,7 +312,7 @@ static const void *get_data(git_repository *repo, git_tree_entry *entry,
}
if (verbose > 2) {
git_buf buf = { 0 } ;
git_buf buf = { 0 };
if (git_object_short_id(&buf, obj)) {
const git_error *e = giterr_last();
@ -459,7 +459,7 @@ struct vcs_git *vcs_git_open(const char *revision, const char *name,
void vcs_git_read(void *ctx, struct file *file,
bool (*parse)(const struct file *file, void *user, const char *line),
bool (*parse)(const struct file *file, void *user, const char *line),
void *user)
{
const struct vcs_git *vcs_git = ctx;

View File

@ -17,7 +17,7 @@
struct aoi {
int x, y, w, h; /* activation box, eeschema coordinates */
int x, y, w, h; /* activation box, eeschema coordinates */
/* points to hovered aoi, or NULL */
bool (*hover)(void *user, bool on);

View File

@ -124,7 +124,7 @@ struct overlay *overlay_add(struct overlay **overlays, const char *s,
{
struct overlay *over;
struct overlay **anchor;
over = alloc_type(struct overlay);
over->s = stralloc(s);

View File

@ -153,7 +153,7 @@ static void pan_update(struct gui_ctx *ctx, int x, int y)
{
if (!ctx->panning)
return;
ctx->x -= (x - ctx->pan_x) << ctx->zoom;
ctx->y -= (y - ctx->pan_y) << ctx->zoom;
ctx->pan_x = x;
@ -433,7 +433,7 @@ static void select_subsheet(void *user)
const struct sheet_aoi_ctx *aoi_ctx = user;
struct gui_ctx *ctx = aoi_ctx->gui_ctx;
const struct sch_obj *obj = aoi_ctx->obj;
struct gui_sheet *sheet;
struct gui_sheet *sheet;
for (sheet = ctx->sheets; sheet; sheet = sheet->next)
if (sheet->sch == obj->u.sheet.sheet) {

View File

@ -235,7 +235,7 @@ static bool lib_parse_line(const struct file *file,
return 1;
}
if (sscanf(line, "X %ms %ms %d %d %d %c %d %d %u %u %c",
&obj->u.pin.name, &obj->u.pin.number,
&obj->u.pin.name, &obj->u.pin.number,
&obj->u.pin.x, &obj->u.pin.y, &obj->u.pin.length,
&obj->u.pin.orient,
&obj->u.pin.number_size, &obj->u.pin.name_size,

View File

@ -91,7 +91,7 @@ struct comp {
const char *name;
unsigned units;
unsigned visible; /* visible fields, bit mask */
unsigned visible; /* visible fields, bit mask */
bool show_pin_name;
bool show_pin_num;
unsigned name_offset;

View File

@ -84,7 +84,7 @@ while read line; do
$quiet || echo "$file" 1>&2
./eeshow $libs `dirname "$1"`/$file \
-- fig $template "TITLE=$name" NUMBER=$num |
-- fig $template "TITLE=$name" NUMBER=$num |
fig2dev -L pdf >_tmp.pdf
pdfunite "$out" _tmp.pdf _tmp2.pdf
mv _tmp2.pdf "$out"

View File

@ -28,11 +28,11 @@ enum text_style {
};
struct text {
const char *s;
const char *s;
int size;
int x, y;
int rot;
enum text_align hor;
int x, y;
int rot;
enum text_align hor;
enum text_align vert;
};