Re: Wrapping a C library

Adam Fedor <[email protected]>
Newsgroups gmane.comp.lib.gnustep.user
Message-ID <[email protected]>
On Feb 2, 2005, at 8:09 AM, Graham J Lee wrote:
> 		if(!strcasecmp(input,"define"))
> 		{
> 			struct ld_defanswer **d;
> 			printf("Define word: ");
> 			fgets(arg1,BUFSIZ,stdin);
> 			arg1[strlen(arg1)-1]='\0';
> 			a1=[NSString stringWithCString:arg1];
> 			d=[da define:a1];
> 			if(d==NULL)
> 			{
> 				printf("No results for '%s'\n",arg1);
> 			}
> 			else
> 			{
> 				while(d[i]!=NULL)
> 				{
> 					printf("Got HERE too, d[i]=%d\n",d[i]);
> 					printf("Found definition:\n%s\n",d[i]->ld_ansdef);
> 					i++;
> 				}
> 			}
> 			continue;
>

It doesn't appear that you ever set i = 0 anywhere, although perhaps 
you did not show this.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.