From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [Comm] =?iso-8859-5?Q?=C1?= =?iso-8859-5?Q?_=DF=E0=DE=D3=E0=D0=DC=DC=D8=E1=E2?= =?iso-8859-5?Q?=EB?= =?iso-8859-5?Q?_=DF=DE=DC=DE=D3=D8=E2=D5?= =?iso-8859-5?Q?_=DF=DE=D6=D0=DB=E3=D9=E1=E2=D0=2E?= From: Yura Kalinichenko To: community@altlinux.ru In-Reply-To: <13110556872.20050228123131@narod.ru> References: <13110556872.20050228123131@narod.ru> Content-Type: text/plain; charset=koi8-u Organization: iceB Software Group Date: Mon, 28 Feb 2005 12:05:57 +0200 Message-Id: <1109585157.5872.23.camel@yuk.home.int> Mime-Version: 1.0 X-Mailer: Evolution 1.5.92 (1.5.92-alt0.5) Content-Transfer-Encoding: quoted-printable X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: community@altlinux.ru List-Id: Mailing list for ALT Linux users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2005 10:09:01 -0000 Archived-At: List-Archive: List-Post: On =F0=CE=C4, 2005-02-28 at 12:31 +0300, Oleg Pan wrote: > Hello , >=20 > Master 2.4 > gcc version 3.3.3 20040412 (ALT Linux, build 3.3.3-alt5) >=20 > =CB=CF=CD=D0=C9=CC=D1=C3=C9=D1 gcc file.c =C2=C5=DA =CF=DB=C9=C2=CF=CB > =D0=D2=C9 =DA=C1=D0=D5=D3=CB=C5 SegFault > =D1 =C4=D5=CD=C1=C0 =D4=C1=CD /**/ =CF=CE =CE=C5 =CD=CF=D6=C5=D4 =D7=D9= =D0=CF=CC=CE=C9=D4=D8 strtok >=20 #include #include #define MAXS 80 int main(){ char string[MAXS]; const char *delim =3D ","; char *token; strncpy(string, "a string, of , ,tokens", MAXS-1); token =3D strtok(string,delim); /**/ while (token !=3DNULL) { printf("%s\n",token); token =3D strtok(NULL,delim); }; return 0; }; [yuk@yuk tmp]$ cc -O2 tst.c -o tst [yuk@yuk tmp]$ ./tst a string of=20 =20 tokens --=20 Yura Kalinichenko