Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/3/85; site ukma.UUCP Path: utzoo!watmath!clyde!cbosgd!ukma!ken From: ken@ukma.UUCP (Ken Kubota) Newsgroups: net.micro.amiga Subject: sprintf problem Message-ID: <2449@ukma.UUCP> Date: Sat, 4-Jan-86 15:41:15 EST Article-I.D.: ukma.2449 Posted: Sat Jan 4 15:41:15 1986 Date-Received: Sun, 5-Jan-86 02:26:53 EST Organization: U of Kentucky, Mathematical Sciences, Lexington KY Lines: 19 Keywords: C, sprintf The sprintf function in the Lattice C library for the Amiga apparently has problems dealing with strings of length larger than 200. The following fragment moves only the first 200 characters from buf1 to buf2. #include main(){ char buf1[256], buf2[256]; setmem(buf1,210,'A'); buf1[210]='\0'; printf("buf1 has %d characters\n",strlen(buf1)); printf("wrote %d characters\n", sprintf(buf2,"%s",buf1)); printf("length = %d\n", strlen(buf2)); } cbosgd!ukma!ken ken@ukma.bitnet