Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Line read from csv file with fgets has two characters before the terminating one Date: Thu, 15 Dec 2016 09:49:33 -0800 Organization: None to speak of Lines: 25 Message-ID: References: <457d2715-2a7a-4131-8083-637dc0919fb3@googlegroups.com> <616cc4c3-d560-4146-8f03-93e76bedf1fd@googlegroups.com> <94c39458-6789-4eaa-b773-36bc4d2d9976@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="d13fb784dfa5b4f5223d68f3ab06c5fb"; logging-data="8257"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18eedNQ02Y4OZxqho2dBgjf" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:yolm0QJV3X0eyOUEQMSGDsC63w0= sha1:wz2ff2v9IC9eor3QgeA3cPcZJ0U= Xref: csiph.com comp.lang.c:99540 BartC writes: > On 15/12/2016 12:50, Richard Heathfield wrote: >> If you don't have it, here's a primitive hex dump program that you could >> use. It doesn't show character interpretations of the hex values (adding >> them is a simple exercise), > > Here's a slightly better version: > > #include > #include > #include > > int main (int nparams, char** params) { [snip] I'll restrict myself to just one question. Why did you decide to call the parameters to main "nparams" and "params", rather than the universally conventional "argc" and "argv"? -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"