Deutsch English Français Italiano |
<v3ru84$1eafb$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!.POSTED!not-for-mail From: David Brown <david.brown@hesbynett.no> Newsgroups: comp.lang.c Subject: Re: Running an editor from ANSI C Date: Thu, 6 Jun 2024 11:07:16 +0200 Organization: A noiseless patient Spider Lines: 33 Message-ID: <v3ru84$1eafb$1@dont-email.me> References: <v3pge7$uf2i$1@dont-email.me> <v3r2pl$16mtl$1@dont-email.me> <v3r7v8$1b57j$1@dont-email.me> <v3rek5$1c4i5$1@dont-email.me> <v3rrtm$1e6g8$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 06 Jun 2024 11:07:16 +0200 (CEST) Injection-Info: dont-email.me; posting-host="91a6c337793424aa616a7fe06360d4a1"; logging-data="1518059"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+2NF0hfcjBduOEEHWz5bkEYgVC29F2hGM=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cancel-Lock: sha1:8t5MTWL8DgHVgpjMgfxkICC/m5A= In-Reply-To: <v3rrtm$1e6g8$1@dont-email.me> Content-Language: en-GB Bytes: 2598 On 06/06/2024 10:27, Malcolm McLean wrote: > It does work. But my compiler warns about rmpnam() being deprecated. > I presume you mean "tmpnam()" here. No, it has not been deprecated - not even in C23. I could be wrong, but this sounds like one of MSVC's arbitrary self-declared deprecations, using scare tactics to encourage people to use MSVC's own functions rather than standard C functions, thus locking you into their tools and platform. I gather you are doing all this for fun, which is great. You have set yourself a challenge with a total disregard for practicality or reality, and are writing this stuff for your own enjoyment. We all need that kind of project at times. But it seems strange to limit yourself to an ancient and impractical language (C89/C90, which you inaccurately call "ANSI C") for "portability" and then worry about compiler-specific warnings. If you want to check if something is /actually/ deprecated or obsolescent, I'd recommend using a good source - such as future C standards (<https://open-std.org/JTC1/SC22/WG14/www/docs/n3220.pdf>) or the cppreference.com site <https://en.cppreference.com/w/c/io/tmpnam>. (Of course, tmpnam() does have plenty of potential problems, and for real code, you'd be better off using Windows-specific and/or POSIX-specific functions for this kind of thing. But that would be against your rules.)