Deutsch English Français Italiano |
<vrdifm$4n2o$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Richard Heathfield <rjh@cpax.org.uk> Newsgroups: comp.lang.c Subject: Re: Suggested method for returning a string from a C program? Date: Wed, 19 Mar 2025 04:51:02 +0000 Organization: Fix this later Lines: 23 Message-ID: <vrdifm$4n2o$1@dont-email.me> References: <vrd77d$3nvtf$2@dont-email.me> <87a59hvgyk.fsf@nosuchdomain.example.com> <vrdi0g$47cb$3@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 19 Mar 2025 05:51:02 +0100 (CET) Injection-Info: dont-email.me; posting-host="18bb9c70b229fe74b0a5a3e7c7b007b1"; logging-data="154712"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kzt08OdpqadFFM1vTQFKfqiG8o7z67vF5AeXNRrk87w==" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:49Y4r6FJK2z7g5pyGv1sIYgP2hs= In-Reply-To: <vrdi0g$47cb$3@dont-email.me> Content-Language: en-GB Bytes: 1668 On 19/03/2025 04:42, DFS wrote: > Pretty easy fixes: > > 1 use scanf() > 2 update int to long > 3 handle special case of n = 1 > 4 instead of collecting the results in a char variable, I print > them as they're calculated You've also fixed another glitch which may or may not have been significant: $ file post2.txt post2.txt: news, ASCII text So wherever that UTF-8 came from, it's gone now. -- Richard Heathfield Email: rjh at cpax dot org dot uk "Usenet is a strange place" - dmr 29 July 1999 Sig line 4 vacant - apply within