[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: PCB - How To Find A Component?



> Maybe I'm overlooking something very obvious and better should restart
> tomorrow morning after some coffee.

Close!  Elements don't always have names.  You also didn't check for
missing arguments.  Try this bit of code:


        if (argc == 0 || strcasecmp (argv[0], "") == 0)
        {
                Message ("WARNING: in FindElement the argument should be a non-empty string value.\n");
                return 0;
        }
        else
        {

                SET_FLAG (NAMEONPCBFLAG, PCB);
                ELEMENT_LOOP(PCB->Data);
                {
                        if (NAMEONPCB_NAME(element)
			    && strcmp (argv[0], NAMEONPCB_NAME(element)) == 0)
                        {


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user