[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Oprettelse af en .rc fil



Frank Damgaard wrote:
> 
> In article <sslug@sslug> you wrote:
> 
> ....
> >   while ( fgets(lnbuf,BUFFERLEN,stdin) ) {
> >      *dummy='\0';
> >      if ((n=sscanf(lnbuf,"%30[a-zA-Z]=%80[^\n]",var,val))<2)
> >       n=sscanf(lnbuf,"%30[a-zA-Z]%*[^=]=%80[^\n]",var,val);
> >      printf("*%d [%s] = [%s]\n",n,var,val);
> >   }
> 
> Kan gøres bedre, se nedenfor.
> 
> Men skal man anvende lidt mere avanceret input
> så er "flex" (lex) løsningen.
> Er det endnu mere avanceret så er det bison + flex (yacc+lex)
> 
Jeg prøvede din kode og den virker perfekt til mit problem. Jeg prøvede
at bruge redhats popt, men det kunne jeg ikke rigtig få til at virke.
Ligemeget, det er alligevel overkill.

Er det noget kode du selv har lavet eller kommer det et andet sted fra?

-- 
/Allan


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *