[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: convert_sym.c
User: pcjc2
Date: 06/12/27 12:37:58
Modified: . Tag: noscreen convert_sym.c sarlacc_schem.c
Log:
sync with trunk
Revision Changes Path
No revision
No revision
1.15.2.1 +31 -38 eda/geda/gaf/utils/src/convert_sym.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: convert_sym.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/utils/src/convert_sym.c,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -b -r1.15 -r1.15.2.1
--- convert_sym.c 12 Dec 2006 18:11:41 -0000 1.15
+++ convert_sym.c 27 Dec 2006 17:37:58 -0000 1.15.2.1
@@ -33,7 +33,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
*
- * $Id: convert_sym.c,v 1.15 2006/12/12 18:11:41 werner Exp $
+ * $Id: convert_sym.c,v 1.15.2.1 2006/12/27 17:37:58 pcjc2 Exp $
*/
#include <stdio.h>
@@ -50,13 +50,6 @@
#include <dmalloc.h>
#endif
-/* __FUNCTION__ seems to be a gcc thing */
-#ifndef __GNUC__
-#define __FUNCTION1(a,b) a ":" #b
-#define __FUNCTION2(a,b) __FUNCTION1(a,b)
-#define __FUNCTION__ __FUNCTION2(__FILE__,__LINE__)
-#endif
-
/*
* make it so we can use __attribute__((unused)) on gcc without
* breaking non-gcc
@@ -72,7 +65,7 @@
#endif
#ifndef lint
-static char vcid[] ATTRIBUTE_UNUSED = "$Id: convert_sym.c,v 1.15 2006/12/12 18:11:41 werner Exp $";
+static char vcid[] ATTRIBUTE_UNUSED = "$Id: convert_sym.c,v 1.15.2.1 2006/12/27 17:37:58 pcjc2 Exp $";
#endif /* lint */
#ifndef OPTARG_IN_UNISTD
@@ -415,7 +408,7 @@
if(infile == NULL)
{
fprintf(stderr,"Error: Unable to open file `%s' in %s()\n",
- infileName,__FUNCTION__);
+ infileName,__func__);
return 1;
}
@@ -564,7 +557,7 @@
if(fscanf(fp,"%d %d %d %d\n", &minx, &miny, &maxx, &maxy) != 4)
{
fprintf(stderr,"Error: Invalid bounding box record #%d in %s()\n",
- records_processed, __FUNCTION__);
+ records_processed, __func__);
exit(1);
}
@@ -611,7 +604,7 @@
{
fprintf(stderr,"Error: Invalid Unattached attribute record #%d "
"in %s()\n",
- records_processed, __FUNCTION__);
+ records_processed, __func__);
exit(1);
}
@@ -653,7 +646,7 @@
default:
fprintf(stderr,"Error: Invalid visibility value %d in "
"viewlogic file at record #%d in function %s()\n",
- viewvis, records_processed, __FUNCTION__);
+ viewvis, records_processed, __func__);
return;
}
@@ -695,7 +688,7 @@
&viewvis) != 6)
{
fprintf(stderr,"Error: Invalid attached attribute record #%d"
- " in %s()\n", records_processed, __FUNCTION__);
+ " in %s()\n", records_processed, __func__);
exit(1);
}
@@ -736,7 +729,7 @@
default:
fprintf(stderr,"Error: Invalid visibility value %d in "
"viewlogic file at record #%d, in function %s()\n",
- viewvis, records_processed, __FUNCTION__);
+ viewvis, records_processed, __func__);
return;
}
@@ -814,7 +807,7 @@
else
{
fprintf(stderr,"Error: Invalid or unknown pin type \"%s\" for record "
- "#%d in %s()\n", value, records_processed, __FUNCTION__);
+ "#%d in %s()\n", value, records_processed, __func__);
exit(1);
}
@@ -909,7 +902,7 @@
&origin) != 5)
{
fprintf(stderr,"Error: Invalid text record #%d in %s()\n",
- records_processed, __FUNCTION__);
+ records_processed, __func__);
exit(1);
}
@@ -954,7 +947,7 @@
{
fprintf(stderr,"Error: Unable to read number of line pairs "
"for record #%d, in %s()\n",
- records_processed, __FUNCTION__);
+ records_processed, __func__);
exit(1);
}
@@ -965,7 +958,7 @@
{
fprintf(stderr,"Error: unable to read %dth coodinate pair "
"for record #%d, in %s()\n",
- i+1, records_processed, __FUNCTION__);
+ i+1, records_processed, __func__);
exit(1);
}
@@ -1014,7 +1007,7 @@
&pindir, &pinsense) != 6)
{
fprintf(stderr,"Error:Invalid pin record #%d in %s()\n",
- records_processed, __FUNCTION__);
+ records_processed, __func__);
exit(1);
}
@@ -1101,7 +1094,7 @@
/* Invalid pin direction */
fprintf(stderr,"Error: Invalid pin direction %d in "
"ViewLogic file at record #%d, in function %s()\n",
- pindir, records_processed, __FUNCTION__);
+ pindir, records_processed, __func__);
exit(1);
}
@@ -1153,7 +1146,7 @@
if(fscanf(fp, "%d %d %d %d\n", &x1, &y1, &x2, &y2) != 4)
{
fprintf(stderr, "Error: Invalid box record #%d in %s()\n",
- records_processed, __FUNCTION__);
+ records_processed, __func__);
exit(1);
}
@@ -1190,7 +1183,7 @@
if(fscanf(fp,"%d %d %u\n",&x, &y, &radius) != 3)
{
fprintf(stderr,"Error: Invalid circle record #%d in %s()\n",
- records_processed, __FUNCTION__);
+ records_processed, __func__);
exit(1);
}
@@ -1231,7 +1224,7 @@
&x1, &y1, &x2, &y2, &x3, &y3) != 6)
{
fprintf(stderr,"Error: Invalid arc record #%d, in %s()\n",
- records_processed, __FUNCTION__);
+ records_processed, __func__);
exit(1);
}
@@ -1322,7 +1315,7 @@
&global, &visibility, &overbar) != 8)
{
fprintf(stderr,"Error: Invalid label record #%d in %s()\n",
- records_processed, __FUNCTION__);
+ records_processed, __func__);
exit(1);
}
@@ -1417,7 +1410,7 @@
{
fprintf(stderr,"Error: too many nodes on a net at record #%d, "
"in %s(), try increasing\n"
- "\tMAX_NODES\n", records_processed, __FUNCTION__);
+ "\tMAX_NODES\n", records_processed, __func__);
exit(1); /* this is fatal */
}
@@ -1425,7 +1418,7 @@
if(fscanf(fp,"%d %d %d\n",&x, &y, &type) < 2)
{
fprintf(stderr,"Error: Invalid net node record #%d in %s()\n",
- records_processed, __FUNCTION__);
+ records_processed, __func__);
exit(1);
}
@@ -1453,7 +1446,7 @@
if(fscanf(fp,"%u %u\n",&n1, &n2) != 2)
{
fprintf(stderr,"Error: Invalid net segment record #%d in %s()\n",
- records_processed, __FUNCTION__);
+ records_processed, __func__);
exit(1);
}
@@ -1484,7 +1477,7 @@
if(fscanf(fp,"%u %u\n",&n1, &n2) != 2)
{
fprintf(stderr,"Error: Invalid bus segment record #%d in %s()\n",
- records_processed, __FUNCTION__);
+ records_processed, __func__);
exit(1);
}
@@ -1547,7 +1540,7 @@
fprintf(stderr,"Error: Invalid instance record #%d in %s()\n"
"lib:'%s', name:'%s'\n"
"extension:%d, x:%d, y:%d\n",
- records_processed, __FUNCTION__, lib,name,extension, x, y);
+ records_processed, __func__, lib,name,extension, x, y);
exit(1);
}
@@ -1706,7 +1699,7 @@
default:
fprintf(stderr,"Error: invalid show_name_value: %d at record #%d, "
"in %s()\n",
- show_name_value, records_processed, __FUNCTION__);
+ show_name_value, records_processed, __func__);
return;
}
@@ -1805,7 +1798,7 @@
#ifdef DEBUG
printf("Comparing `%s' to `%s' in %s()\n",tmpName,
- translations[i].origName,__FUNCTION__);
+ translations[i].origName,__func__);
#endif
if(strcmp(tmpName,translations[i].origName) == 0) /* match? */
@@ -1833,7 +1826,7 @@
default:
fprintf(stderr,"Error: Unknown action code for attribute\n"
"`%s=%s' at record #%d in %s()\n",
- tmpName,tmpValue,records_processed,__FUNCTION__);
+ tmpName,tmpValue,records_processed,__func__);
exit(1);
}
}
@@ -2070,7 +2063,7 @@
ungetc(c,fp); /* push back last char, obviously wasn't a + */
#ifdef DEBUG
- printf("Buffer:'%s' in %s()\n",buf,__FUNCTION__);
+ printf("Buffer:'%s' in %s()\n",buf,__func__);
#endif
return 0;
@@ -2090,7 +2083,7 @@
if(fscanf(fp,"%u %u %u\n", colour, &vdfillstyle, &vdlinestyle) != 3)
{
fprintf(stderr,"Error: Invalid modifier record #%d in %s()\n",
- records_processed, __FUNCTION__);
+ records_processed, __func__);
exit(1);
}
@@ -2099,7 +2092,7 @@
{
fprintf(stderr,"Error: Invalid colour number %u in record #%d, "
"in %s()\n",
- *colour,records_processed, __FUNCTION__);
+ *colour,records_processed, __func__);
exit(1);
}
*colour = colormap[*colour];
@@ -2109,7 +2102,7 @@
{
fprintf(stderr,"Warning: Invalid fill style %u in record #%d, "
"in %s(). Assuming \"Hollow\" fill style.\n",
- vdfillstyle,records_processed, __FUNCTION__);
+ vdfillstyle,records_processed, __func__);
vdfillstyle = 0;
}
memcpy(fillstyle, &fillmap[vdfillstyle], sizeof(struct FillStyle));
@@ -2119,7 +2112,7 @@
{
fprintf(stderr,"Warning: Invalid line style %u in record #%d, "
"in %s(). Assuming \"Solid\" line style.\n",
- vdlinestyle,records_processed, __FUNCTION__);
+ vdlinestyle,records_processed, __func__);
vdlinestyle = 0;
}
memcpy(linestyle, &linemap[vdlinestyle], sizeof(struct LineStyle));
1.8.6.1 +2 -2 eda/geda/gaf/utils/src/sarlacc_schem.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: sarlacc_schem.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/utils/src/sarlacc_schem.c,v
retrieving revision 1.8
retrieving revision 1.8.6.1
diff -u -b -r1.8 -r1.8.6.1
--- sarlacc_schem.c 7 Feb 2005 23:57:14 -0000 1.8
+++ sarlacc_schem.c 27 Dec 2006 17:37:58 -0000 1.8.6.1
@@ -65,7 +65,7 @@
int retval;
retval = ((base[offset+1] & 255) <<8) | (base[offset] & 255);
if(base[offset+1]&128)
- retval = retval | (65535<<16);
+ retval = retval | (65535U << 16);
return retval;
}
@@ -296,7 +296,7 @@
}
cfp = fopen(full_filename, "r");
- if (cfp > 0) {
+ if (cfp != NULL) {
/* "sarlacc_dim=" set by sarlacc_sym */
while (!feof(cfp)) {
fgets(buff, 128, cfp);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs