Re: [cc65] Input string routine for a line of data?

From: Joseph Rose <rose.joseph121yahoo.com>
Date: 2011-06-08 14:55:44
This is my latest version of the example routine:
 
 printf ("Type in name of file to compress: ");
 fgets(f,17,stdin);
 putchar ('\n');
 strcat (f,",p");

Does it work onyour system?

From: "silverdr1wfmh.org.pl" <silverdr1wfmh.org.pl>
To: cc651musoftware.de
Sent: Monday, June 6, 2011 12:42 PM
Subject: Re: [cc65] Input string routine for a line of data?

> I can always borrow the input routine from my dead adventure game.

Cool!

>  BTW: I use cc65 v. 2.13.2.

I use cl65 V2.13.9 - and although I can't be sure (and don't feel like taking the effort to verify it for you), I doubt fgets() was broken in 2.13.2.

-- 
SD!

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo1musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.




On 2011-06-06, at 18:11, Joseph Rose wrote:

> Both gets() and fgets() at first acccept my input but then, when I press Enter, ask for more input then do the same with the cursor indented.

Well, the example I gave you

> > #include <stdio.h>
> > 
> > int main()
> > {
> >  char text[20];
> >  fputs("enter some text: ", stdout);
> >  fflush(stdout); /* http://c-faq.com/stdio/fflush.html */
> >  fgets(text, sizeof text, stdin);
> >  printf("text = \"%s\"\n", text);
> >  return 0;
> > }

certainly doesn't do this. Are you sure you followed it?

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Jun 8 14:56:00 2011

This archive was generated by hypermail 2.1.8 : 2011-06-08 14:56:03 CEST