Date:2012-05-28 08:11:15 (11 years 10 months ago)
Author:Werner Almesberger
Commit:f2d3986600ad5722b1f2fd4f71a5495dcc540447
Message:fix whitespace anomalies

/ \t/, / $/, and /\t$/
Files: coord.c (1 diff)
expr.c (2 diffs)
fpd.l (1 diff)
fpd.y (2 diffs)
gui.c (3 diffs)
gui_frame.c (3 diffs)
gui_frame.h (1 diff)
gui_frame_drag.c (2 diffs)
gui_inst.c (1 diff)
gui_status.c (2 diffs)
gui_util.c (1 diff)
inst.c (1 diff)
inst.h (2 diffs)
kicad.c (1 diff)
meas.h (1 diff)
overlap.c (1 diff)
postscript.c (1 diff)
unparse.c (1 diff)
util.c (1 diff)

Change Details

coord.c
112112
113113struct coord neg_vec(struct coord v)
114114{
115    v.x = -v.x;
115    v.x = -v.x;
116116    v.y = -v.y;
117117    return v;
118118}
expr.c
330330    if (is_undef(res))
331331        return undef;
332332    if (!is_dimensionless(res)) {
333        fail("angle must be dimensionless");
333        fail("angle must be dimensionless");
334334        return undef;
335335    }
336336    res.n = fn(res.n/180.0*M_PI);
...... 
358358    if (is_undef(res))
359359        return undef;
360360    if (res.exponent & 1) {
361        fail("exponent of sqrt argument must be a multiple of two");
361        fail("exponent of sqrt argument must be a multiple of two");
362362        return undef;
363363    }
364364    if (res.n < 0) {
365        fail("argument of sqrt must be positive");
365        fail("argument of sqrt must be positive");
366366        return undef;
367367    }
368368    res.n = sqrt(res.n);
fpd.l
192192
193193^#\ [0-9]+\ \"[^"]*\"(\ [0-9]+)*\n {
194194                  if (!disable_keywords)
195                      BEGIN(INITIAL);
195                    BEGIN(INITIAL);
196196                  lineno = strtol(yytext+2, NULL, 0); }
197197
198198. return *yytext;
fpd.y
773773            n_vars++;
774774        }
775775    ;
776
776
777777opt_key:
778778        {
779779            $$ = 0;
...... 
973973            $$->u.arc.end = $4;
974974            $$->u.arc.width = $5;
975975        }
976    | TOK_FRAME ID
977        {
976    | TOK_FRAME ID
977        {
978978            $<num>$.n = lineno;
979979        }
980980            base
gui.c
9494
9595
9696static GtkItemFactoryEntry menu_entries[] = {
97    { "/File", NULL, NULL, 0, "<Branch>" },
97    { "/File", NULL, NULL, 0, "<Branch>" },
9898    { "/File/Save", NULL, save_fpd, 0, "<Item>" },
9999    { "/File/Save as", NULL, save_as_fpd, 0, "<Item>" },
100100        { "/File/sep1", NULL, NULL, 0, "<Separator>" },
...... 
277277
278278    paned = gtk_hpaned_new();
279279    gtk_box_pack_start(GTK_BOX(hbox), paned, TRUE, TRUE, 0);
280
280
281281    /* Frames */
282282
283283    frames_area = gtk_scrolled_window_new(NULL, NULL);
...... 
338338    after = inst_get_bbox();
339339    label_in_box_bg(active_frame->label, COLOR_FRAME_SELECTED);
340340    do_build_frames();
341    if (after.min.x < before.min.x || after.min.y < before.min.y ||
341    if (after.min.x < before.min.x || after.min.y < before.min.y ||
342342        after.max.x > before.max.x || after.max.y > before.max.y)
343343        zoom_to_extents();
344344    else
gui_frame.c
208208        can_add_frame());
209209
210210    enable_add_var(frame, factory_frame);
211
211
212212    pop_up(popup_frame_widget, event, frame);
213213}
214214
...... 
10381038            gtk_table_set_row_spacings(GTK_TABLE(tab), 1);
10391039            gtk_table_set_col_spacings(GTK_TABLE(tab), 1);
10401040        }
1041
1041
10421042        name = stralloc_printf("%s%s", var->key ? "?" : "", var->name);
10431043        field = label_in_box_new(name,
10441044            "Variable (column) name. Click to edit.");
...... 
11221122        n_var++;
11231123        n_vars++;
11241124    }
1125
11261125}
11271126
11281127
gui_frame.h
2222extern int show_vars;
2323
2424
25int find_var_in_frame(const struct frame *frame, const char *name,
25int find_var_in_frame(const struct frame *frame, const char *name,
2626    const struct var *self);
2727void reselect_var(struct var *var);
2828
gui_frame_drag.c
8686        NDX_n++; \
8787       NDX_n; })
8888
89#define NTH(first, n) \
89#define NTH(first, n) \
9090    ({ typeof(first) *NTH_walk; \
9191       int NTH_n = (n); \
9292       for (NTH_walk = &(first); NTH_n; NTH_n--) \
...... 
164164    b = pick_table_cell(table_b, b_col, b_row);
165165    if (a) {
166166        g_object_ref(a);
167            gtk_container_remove(GTK_CONTAINER(table_a), a);
167        gtk_container_remove(GTK_CONTAINER(table_a), a);
168168    }
169169    if (b) {
170170        g_object_ref(b);
171            gtk_container_remove(GTK_CONTAINER(table_b), b);
171        gtk_container_remove(GTK_CONTAINER(table_b), b);
172172    }
173173    if (a)
174174            gtk_table_attach_defaults(GTK_TABLE(table_b), a,
gui_inst.c
561561        abort();
562562    }
563563    return stralloc_printf(mm ?
564        "%s" MM_FORMAT_SHORT "%s" :
564        "%s" MM_FORMAT_SHORT "%s" :
565565        "%s" MIL_FORMAT_SHORT "%s",
566566        label, n, u);
567567}
gui_status.c
431431};
432432
433433
434void edit_unique(const char **s, int (*validate)(const char *s, void *ctx),
434void edit_unique(const char **s, int (*validate)(const char *s, void *ctx),
435435    void *ctx, const char *tooltip)
436436{
437437    static struct edit_unique_ctx unique_ctx;
...... 
10551055    status_entry_y = add_entry(tab, 2, 1);
10561056
10571057    status_entry_x = gtk_widget_ref(make_entry());
1058
1058
10591059    /* name and input */
10601060
10611061    status_name = add_label(tab, 1, 2);
gui_util.c
223223    gboolean (*cb)(GtkWidget *widget, GdkEventButton *event, gpointer data),
224224    gpointer data)
225225{
226    GtkWidget *image, *evbox;
226    GtkWidget *image, *evbox;
227227    GtkToolItem *item;
228228
229229    /*
inst.c
283283                best_dist = dist;
284284            }
285285        }
286
286
287287        if (selected_inst)
288288            goto selected;
289289    }
inst.h
5959    void (*save)(FILE *file, struct inst *self);
6060    void (*draw)(struct inst *self);
6161    struct pix_buf *(*hover)(struct inst *self);
62    unit_type (*distance)(struct inst *self, struct coord pos,
62    unit_type (*distance)(struct inst *self, struct coord pos,
6363        unit_type scale);
6464    void (*select)(struct inst *self);
6565    void (*begin_drag_move)(struct inst *from, int i);
...... 
207207void inst_draw(void);
208208void inst_highlight_vecs(int (*pick)(struct inst *inst, void *user),
209209     void *user);
210struct inst *inst_find_vec(struct coord pos,
210struct inst *inst_find_vec(struct coord pos,
211211    int (*pick)(struct inst *inst, void *user), void *user);
212212struct inst *insts_ip_vec(void);
213213
kicad.c
7777
7878    /*
7979     * name, shape (rectangle), Xsize, Ysize, Xdelta, Ydelta, Orientation
80      */
80     */
8181    fprintf(file, "Sh \"%s\" %c %d %d 0 0 0\n",
8282        inst->u.pad.name, inst->obj->u.pad.rounded ? 'O' : 'R',
8383        size.x, size.y);
meas.h
4545    /* low is obj->base */
4646    struct vec *high;
4747    struct expr *offset;
48
48
4949    /* frame qualifiers */
5050    struct frame_qual *low_qual;
5151    struct frame_qual *high_qual;
overlap.c
4040        abort();
4141    }
4242    sort_coord(&min_a, &max_a);
43
43
4444    min_b = b->base;
4545    switch (b->obj->type) {
4646    case ot_pad:
postscript.c
654654     * quantitative one, emphasizing the logical structure of the drawing
655655     * and not the actual sizes.
656656     *
657      * This could be done by ranking vectors by current, average, maximum,
657     * This could be done by ranking vectors by current, average, maximum,
658658     * etc. size, then let their size be determined by the amount of text
659659     * that's needed and the size of subordinate vectors. One difficulty
660660     * would be in making vectors with a fixed length ratio look correct,
unparse.c
8888    char tmp[100];
8989    char *buf, *temp;
9090
91
9291    if (prec > precedence(expr->op)) {
9392        temp = unparse_op(expr, prec_add);
9493        buf = alloc_size(strlen(temp)+3);
util.c
5252/* ----- identifier syntax check ------------------------------------------- */
5353
5454
55int is_id_char(char c, int first)
55int is_id_char(char c, int first)
5656{
5757    if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '_')
5858        return 1;

Archive Download the corresponding diff file

Branches:
master



interactive