better identify commented pieces of code
This commit is contained in:
parent
05af59ac9d
commit
95c0ad1572
|
|
@ -59,50 +59,52 @@ void print_version()
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *escape_chars(char *dest, const char *source, int size)
|
#if 0
|
||||||
{
|
* char *escape_chars(char *dest, const char *source, int size)
|
||||||
int s=0;
|
* {
|
||||||
int d=0;
|
* int s=0;
|
||||||
size--; /* reserve space for \0 */
|
* int d=0;
|
||||||
while(source && source[s]) {
|
* size--; /* reserve space for \0 */
|
||||||
switch(source[s]) {
|
* while(source && source[s]) {
|
||||||
case '\n':
|
* switch(source[s]) {
|
||||||
if(d < size-1) {
|
* case '\n':
|
||||||
dest[d++] = '\\';
|
* if(d < size-1) {
|
||||||
dest[d++] = 'n';
|
* dest[d++] = '\\';
|
||||||
}
|
* dest[d++] = 'n';
|
||||||
break;
|
* }
|
||||||
case '\t':
|
* break;
|
||||||
if(d < size-1) {
|
* case '\t':
|
||||||
dest[d++] = '\\';
|
* if(d < size-1) {
|
||||||
dest[d++] = 't';
|
* dest[d++] = '\\';
|
||||||
}
|
* dest[d++] = 't';
|
||||||
break;
|
* }
|
||||||
case '\\':
|
* break;
|
||||||
case '\'':
|
* case '\\':
|
||||||
case ' ':
|
* case '\'':
|
||||||
case ';':
|
* case ' ':
|
||||||
case '$':
|
* case ';':
|
||||||
case '!':
|
* case '$':
|
||||||
case '#':
|
* case '!':
|
||||||
case '{':
|
* case '#':
|
||||||
case '}':
|
* case '{':
|
||||||
case '[':
|
* case '}':
|
||||||
case ']':
|
* case '[':
|
||||||
case '"':
|
* case ']':
|
||||||
if(d < size-1) {
|
* case '"':
|
||||||
dest[d++] = '\\';
|
* if(d < size-1) {
|
||||||
dest[d++] = source[s];
|
* dest[d++] = '\\';
|
||||||
}
|
* dest[d++] = source[s];
|
||||||
break;
|
* }
|
||||||
default:
|
* break;
|
||||||
if(d < size) dest[d++] = source[s];
|
* default:
|
||||||
}
|
* if(d < size) dest[d++] = source[s];
|
||||||
s++;
|
* }
|
||||||
}
|
* s++;
|
||||||
dest[d] = '\0';
|
* }
|
||||||
return dest;
|
* dest[d] = '\0';
|
||||||
}
|
* return dest;
|
||||||
|
* }
|
||||||
|
#endif
|
||||||
|
|
||||||
void set_snap(double newsnap) /* 20161212 set new snap factor and just notify new value */
|
void set_snap(double newsnap) /* 20161212 set new snap factor and just notify new value */
|
||||||
{
|
{
|
||||||
|
|
|
||||||
10
src/draw.c
10
src/draw.c
|
|
@ -68,11 +68,11 @@ void print_image()
|
||||||
else return;
|
else return;
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
for(tmp=0;tmp<cadlayers;tmp++) {
|
* for(tmp=0;tmp<cadlayers;tmp++) {
|
||||||
XSetClipRectangles(display, gc[tmp], 0,0, xctx->xrect, 1, Unsorted);
|
* XSetClipRectangles(display, gc[tmp], 0,0, xctx->xrect, 1, Unsorted);
|
||||||
XSetClipRectangles(display, gcstipple[tmp], 0,0, xctx->xrect, 1, Unsorted);
|
* XSetClipRectangles(display, gcstipple[tmp], 0,0, xctx->xrect, 1, Unsorted);
|
||||||
}
|
* }
|
||||||
XSetClipRectangles(display, xctx->gctiled, 0,0, xctx->xrect, 1, Unsorted);
|
* XSetClipRectangles(display, xctx->gctiled, 0,0, xctx->xrect, 1, Unsorted);
|
||||||
#endif
|
#endif
|
||||||
save_draw_grid = draw_grid;
|
save_draw_grid = draw_grid;
|
||||||
draw_grid=0;
|
draw_grid=0;
|
||||||
|
|
|
||||||
|
|
@ -25,24 +25,24 @@
|
||||||
#define Y_TO_PS(y) ( (y+xctx->yorigin)* xctx->mooz )
|
#define Y_TO_PS(y) ( (y+xctx->yorigin)* xctx->mooz )
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* FIXME: overflow check. Not used, BTW */
|
* /* FIXME: overflow check. Not used, BTW */
|
||||||
static char *strreplace(char s[], char token[], char replace[])
|
* static char *strreplace(char s[], char token[], char replace[])
|
||||||
{
|
* {
|
||||||
static char res[200];
|
* static char res[200];
|
||||||
char *p1, *p2;
|
* char *p1, *p2;
|
||||||
int l;
|
* int l;
|
||||||
|
*
|
||||||
res[0] = '\0';
|
* res[0] = '\0';
|
||||||
l = strlen(token);
|
* l = strlen(token);
|
||||||
p1 = p2 = s;
|
* p1 = p2 = s;
|
||||||
while( (p2 = strstr(p1, token)) ) {
|
* while( (p2 = strstr(p1, token)) ) {
|
||||||
strncat(res, p1, p2 - p1);
|
* strncat(res, p1, p2 - p1);
|
||||||
strcat(res, replace);
|
* strcat(res, replace);
|
||||||
p1 = p2 = p2 + l;
|
* p1 = p2 = p2 + l;
|
||||||
}
|
* }
|
||||||
strcat(res, p1);
|
* strcat(res, p1);
|
||||||
return res;
|
* return res;
|
||||||
}
|
* }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *utf8_enc[]={
|
char *utf8_enc[]={
|
||||||
|
|
|
||||||
|
|
@ -602,46 +602,46 @@ void svg_draw(void)
|
||||||
|
|
||||||
unused_layer = my_calloc(873, cadlayers, sizeof(int));
|
unused_layer = my_calloc(873, cadlayers, sizeof(int));
|
||||||
#if 0
|
#if 0
|
||||||
/* Determine used layers. Disabled since we want hilight colors */
|
* /* Determine used layers. Disabled since we want hilight colors */
|
||||||
for(c=0;c<cadlayers;c++) unused_layer[c] = 1;
|
* for(c=0;c<cadlayers;c++) unused_layer[c] = 1;
|
||||||
unused_layer[0] = 0; /* background */
|
* unused_layer[0] = 0; /* background */
|
||||||
for(i=0;i<xctx->texts;i++)
|
* for(i=0;i<xctx->texts;i++)
|
||||||
{
|
* {
|
||||||
textlayer = xctx->text[i].layer;
|
* textlayer = xctx->text[i].layer;
|
||||||
if(textlayer < 0 || textlayer >= cadlayers) textlayer = TEXTLAYER;
|
* if(textlayer < 0 || textlayer >= cadlayers) textlayer = TEXTLAYER;
|
||||||
unused_layer[textlayer] = 0;
|
* unused_layer[textlayer] = 0;
|
||||||
}
|
* }
|
||||||
for(c=0;c<cadlayers;c++)
|
* for(c=0;c<cadlayers;c++)
|
||||||
{
|
* {
|
||||||
xSymbol symptr = (xctx->inst[i].ptr + xctx->sym);
|
* xSymbol symptr = (xctx->inst[i].ptr + xctx->sym);
|
||||||
if(xctx->lines[c] || xctx->rects[c] || xctx->arcs[c] || xctx->polygons[c]) unused_layer[c] = 0;
|
* if(xctx->lines[c] || xctx->rects[c] || xctx->arcs[c] || xctx->polygons[c]) unused_layer[c] = 0;
|
||||||
if(xctx->wires) unused_layer[WIRELAYER] = 0;
|
* if(xctx->wires) unused_layer[WIRELAYER] = 0;
|
||||||
for(i=0;i<xctx->instances;i++) {
|
* for(i=0;i<xctx->instances;i++) {
|
||||||
if( (c == PINLAYER || enable_layer[c]) && symptr->lines[c] ) unused_layer[c] = 0;
|
* if( (c == PINLAYER || enable_layer[c]) && symptr->lines[c] ) unused_layer[c] = 0;
|
||||||
if( (c == PINLAYER || enable_layer[c]) && symptr->polygons[c] ) unused_layer[c] = 0;
|
* if( (c == PINLAYER || enable_layer[c]) && symptr->polygons[c] ) unused_layer[c] = 0;
|
||||||
if( (c == PINLAYER || enable_layer[c]) && symptr->arcs[c] ) unused_layer[c] = 0;
|
* if( (c == PINLAYER || enable_layer[c]) && symptr->arcs[c] ) unused_layer[c] = 0;
|
||||||
if( (c != PINLAYER || enable_layer[c]) && symptr->rects[c] ) unused_layer[c] = 0;
|
* if( (c != PINLAYER || enable_layer[c]) && symptr->rects[c] ) unused_layer[c] = 0;
|
||||||
if( (c==TEXTWIRELAYER && !(xctx->inst[i].flags&2) ) ||
|
* if( (c==TEXTWIRELAYER && !(xctx->inst[i].flags&2) ) ||
|
||||||
(sym_txt && (c==TEXTLAYER) && (xctx->inst[i].flags&2) ) )
|
* (sym_txt && (c==TEXTLAYER) && (xctx->inst[i].flags&2) ) )
|
||||||
{
|
* {
|
||||||
int j;
|
* int j;
|
||||||
for(j=0;j< symptr->texts;j++)
|
* for(j=0;j< symptr->texts;j++)
|
||||||
{
|
* {
|
||||||
textlayer = c;
|
* textlayer = c;
|
||||||
if( !(xctx->inst[i].color == PINLAYER)) {
|
* if( !(xctx->inst[i].color == PINLAYER)) {
|
||||||
textlayer = symptr->text[j].layer;
|
* textlayer = symptr->text[j].layer;
|
||||||
if(textlayer < 0 || textlayer >= cadlayers) textlayer = c;
|
* if(textlayer < 0 || textlayer >= cadlayers) textlayer = c;
|
||||||
}
|
* }
|
||||||
/* display PINLAYER colored instance texts even if PINLAYER disabled */
|
* /* display PINLAYER colored instance texts even if PINLAYER disabled */
|
||||||
if(xctx->inst[i].color == PINLAYER || enable_layer[textlayer]) {
|
* if(xctx->inst[i].color == PINLAYER || enable_layer[textlayer]) {
|
||||||
used_layer[textlayer] = 0;
|
* used_layer[textlayer] = 0;
|
||||||
}
|
* }
|
||||||
}
|
* }
|
||||||
}
|
* }
|
||||||
}
|
* }
|
||||||
dbg(1, "used_layer[%d] = %d\n", c, used_layer[c]);
|
* dbg(1, "used_layer[%d] = %d\n", c, used_layer[c]);
|
||||||
}
|
* }
|
||||||
/* End determine used layer */
|
* /* End determine used layer */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fprintf(fd, "<svg xmlns=\"http://www.w3.org/2000/svg\""
|
fprintf(fd, "<svg xmlns=\"http://www.w3.org/2000/svg\""
|
||||||
|
|
|
||||||
32
src/token.c
32
src/token.c
|
|
@ -1822,22 +1822,22 @@ void print_spice_element(FILE *fd, int inst)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* can't remember what the f**k this is supposed to do.
|
/* can't remember what the f**k this is supposed to do.
|
||||||
why eval( and not tcleval( ?
|
why eval( and not tcleval( ?
|
||||||
disable until some regression pops out
|
disable until some regression pops out
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 0
|
||||||
/* do a second round of substitutions, but without calling tcl */
|
* /* do a second round of substitutions, but without calling tcl */
|
||||||
if(result && strstr(result, "eval(") == result) {
|
* if(result && strstr(result, "eval(") == result) {
|
||||||
char *c = strrchr(result, ')');
|
* char *c = strrchr(result, ')');
|
||||||
if(c) while(1) { /* shift following characters back 1 char */
|
* if(c) while(1) { /* shift following characters back 1 char */
|
||||||
*c = c[1];
|
* *c = c[1];
|
||||||
c++;
|
* c++;
|
||||||
if(!*c) break;
|
* if(!*c) break;
|
||||||
}
|
* }
|
||||||
my_strdup2(88, &result, translate(inst, result+5));
|
* my_strdup2(88, &result, translate(inst, result+5));
|
||||||
}
|
* }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
fprintf(fd, "%s", result);
|
fprintf(fd, "%s", result);
|
||||||
|
|
|
||||||
10
src/xinit.c
10
src/xinit.c
|
|
@ -964,11 +964,11 @@ void resetcairo(int create, int clear, int force_or_resize)
|
||||||
cairo_set_line_join(xctx->cairo_ctx, CAIRO_LINE_JOIN_ROUND);
|
cairo_set_line_join(xctx->cairo_ctx, CAIRO_LINE_JOIN_ROUND);
|
||||||
cairo_set_line_cap(xctx->cairo_ctx, CAIRO_LINE_CAP_ROUND);
|
cairo_set_line_cap(xctx->cairo_ctx, CAIRO_LINE_CAP_ROUND);
|
||||||
#if 0
|
#if 0
|
||||||
#if HAS_XCB==1 && HAS_XRENDER==1
|
* #if HAS_XCB==1 && HAS_XRENDER==1
|
||||||
cairo_xcb_surface_set_size(xctx->cairo_sfc, xctx->xschem_w, xctx->xschem_h);
|
* cairo_xcb_surface_set_size(xctx->cairo_sfc, xctx->xschem_w, xctx->xschem_h);
|
||||||
#else
|
* #else
|
||||||
cairo_xlib_surface_set_size(xctx->cairo_sfc, xctx->xschem_w, xctx->xschem_h);
|
* cairo_xlib_surface_set_size(xctx->cairo_sfc, xctx->xschem_w, xctx->xschem_h);
|
||||||
#endif /* HAS_XCB && HAS_XRENDER */
|
* #endif /* HAS_XCB && HAS_XRENDER */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif /* HAS_CAIRO */
|
#endif /* HAS_CAIRO */
|
||||||
|
|
|
||||||
|
|
@ -1103,7 +1103,7 @@ extern void new_prop_string(int i, const char *old_prop,int fast, int dis_uniq_n
|
||||||
extern void hash_name(char *token, int remove);
|
extern void hash_name(char *token, int remove);
|
||||||
extern void hash_all_names(int n);
|
extern void hash_all_names(int n);
|
||||||
extern void symbol_bbox(int i, double *x1,double *y1, double *x2, double *y2);
|
extern void symbol_bbox(int i, double *x1,double *y1, double *x2, double *y2);
|
||||||
extern char *escape_chars(char *dest, const char *source, int size);
|
/* extern char *escape_chars(char *dest, const char *source, int size); */
|
||||||
|
|
||||||
extern void set_inst_prop(int i);
|
extern void set_inst_prop(int i);
|
||||||
extern void unselect_wire(int i);
|
extern void unselect_wire(int i);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue