avoiding strdup() (was: Re: [OT] UTF-8 sig.)

Liste des GroupesRevenir à cl c 
Sujet : avoiding strdup() (was: Re: [OT] UTF-8 sig.)
De : vallor (at) *nospam* cultnix.org (vallor)
Groupes : comp.lang.c
Date : 09. Mar 2024, 14:19:07
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <ushnkb$1rnlb$4@dont-email.me>
References : 1 2 3 4 5 6 7
User-Agent : Pan/0.155 (Kherson; c0bf34e gitlab.gnome.org/GNOME/pan.git; x86_64-pc-linux-gnu)
On Sat, 9 Mar 2024 10:40:07 -0000 (UTC), Ben <ben.usenet@bsb.me.uk> wrote
in <ushea7$28prq$2@dont-email.me>:

On Sat, 9 Mar 2024 06:27:44 -0000 (UTC), Blue-Maned_Hawk wrote:
 
Ben wrote:
 
On Thu, 7 Mar 2024 06:48:19 -0000 (UTC), Blue-Maned_Hawk wrote:
 
Ben Bacarisse wrote:
 
Blue-Maned_Hawk <bluemanedhawk@invalid.invalid> writes:
<cut>
 Since you are clearly happy to post using UTF-8, can I urge you to
fix your sig so that it comes out looking right?
 Since it is my newsreader that is corrupting it, it is the fault of
the newsreader,
 I don't think that's the case.  Here is a test post using the same
newsreader and something that is probably close to what you want in
your sig.  (Yours is too messed up for me to work out exactly what you
want it to look like.)
 
It does not happen immediately; instead, the signature that the
software saves gets more and more corrupted each time the software is
opened.
 Do you mean the problem is not with Pan after all?  "The software" is
deliberately vague and I don't know why Pan would be saving the
signature file.  It just reads it as far as I can tell.
--
/blu.mɛin.dʰak/ | shortens to "Hawk" | he/him/his/himself/Mr.
Perhaps he is using a "Text" type signature, instead of a "Text File"
type signature?
(Would love to discuss it, but in news.software.readers.)
ObC:
Gradually being dragged into the new millenium, where I'm
comfortable with the following:
char something[] = "writable string initializer";
And gcc has -fsanitize=address -- a lovely thing to behold
if it fires off.
Meanwhile, saw someone in another group write:
char * something;
something = strdup("writable string etc.");
if( something == NULL ) { etc. }
But that won't work if --std=c99, does work for g99 and c2x.
The (Linux) man page says:
/* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
I asked Google about it being a POSIX extension
added at that late date, and it gave me an answer
about the C standard:
"C9X London meeting update"
https://groups.google.com/g/comp.std.c/c/pMaEU_8Rb7w
 _ _ _ _ _
2. strsep and strdup are not being added. strsep() is out because
not enough people wanted it to vote it in; strdup() lost on the
grounds that it would be the *ONLY* function other than *alloc()
in the entire library whose return could be sanely passed to free(),
and this is surprising.
 _ _ _ _ _
Also: <https://stackoverflow.com/questions/32944390/what-is-the-rationale-
for-not-including-strdup-in-the-c-standard>
Anyway, pointed out that they can just use an initializer, something
about which I was clued in by a friendly person in this very group.
--
-v

Date Sujet#  Auteur
7 Mar 24 * Re: [OT] UTF-8 sig. Was: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"51Ben
9 Mar 24 `* Re: [OT] UTF-8 sig. Was: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"50Blue-Maned_Hawk
9 Mar 24  +* Re: [OT] UTF-8 sig. Was: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"5Keith Thompson
9 Mar 24  i`* Re: [OT] UTF-8 sig. Was: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"4Blue-Maned_Hawk
9 Mar 24  i `* Re: [OT] UTF-8 sig.3vallor
10 Mar 24  i  `* Re: [OT] UTF-8 sig.2Blue-Maned_Hawk
21 Mar 24  i   `- Re: [OT] UTF-8 sig.1Anton Shepelev
9 Mar 24  `* Re: [OT] UTF-8 sig.44Ben
9 Mar 24   +* Re: [OT] UTF-8 sig.3Richard Harnden
10 Mar 24   i`* Re: [OT] UTF-8 sig.2Ben Bacarisse
10 Mar 24   i `- Re: [OT] UTF-8 sig.1Richard Harnden
9 Mar 24   +* Re: [OT] UTF-8 sig.7Blue-Maned_Hawk
9 Mar 24   i`* Re: [OT] UTF-8 sig.6Richard Harnden
10 Mar 24   i +- Re: [OT] UTF-8 sig.1Blue-Maned_Hawk
10 Mar 24   i `* Re: [OT] UTF-8 sig.4Ben Bacarisse
10 Mar 24   i  `* Re: [OT] UTF-8 sig.3Michael S
10 Mar 24   i   +- Re: [OT] UTF-8 sig.1Blue-Maned_Hawk
10 Mar 24   i   `- Re: [OT] UTF-8 sig.1Kaz Kylheku
9 Mar 24   `* avoiding strdup() (was: Re: [OT] UTF-8 sig.)33vallor
9 Mar 24    +- Re: avoiding strdup()1Spiros Bousbouras
10 Mar 24    +* Re: avoiding strdup()30Keith Thompson
10 Mar 24    i`* Re: avoiding strdup()29Michael S
10 Mar 24    i +- Re: avoiding strdup()1Blue-Maned_Hawk
10 Mar 24    i `* Re: avoiding strdup()27Kaz Kylheku
10 Mar 24    i  +- Re: avoiding strdup()1Richard Harnden
11 Mar 24    i  +* Re: avoiding strdup()22Malcolm McLean
11 Mar 24    i  i+* Re: avoiding strdup()10Michael S
11 Mar 24    i  ii+* Re: avoiding strdup()6Keith Thompson
11 Mar 24    i  iii+* Re: avoiding strdup()2Kaz Kylheku
11 Mar 24    i  iiii`- Re: avoiding strdup()1Keith Thompson
11 Mar 24    i  iii+- Re: avoiding strdup()1Keith Thompson
11 Mar 24    i  iii`* Re: avoiding strdup()2Spiros Bousbouras
11 Mar 24    i  iii `- Re: avoiding strdup()1Keith Thompson
11 Mar 24    i  ii`* Re: avoiding strdup()3Michael S
11 Mar 24    i  ii +- Re: avoiding strdup()1Michael S
11 Mar 24    i  ii `- Re: avoiding strdup()1Spiros Bousbouras
11 Mar 24    i  i+* Re: avoiding strdup()3Kaz Kylheku
11 Mar 24    i  ii`* Re: avoiding strdup()2Richard Kettlewell
11 Mar 24    i  ii `- Re: avoiding strdup()1Keith Thompson
12 Mar 24    i  i`* Re: avoiding strdup()8Malcolm McLean
12 Mar 24    i  i `* Re: avoiding strdup()7Keith Thompson
12 Mar 24    i  i  +* Re: avoiding strdup()3Malcolm McLean
13 Mar 24    i  i  i`* Re: avoiding strdup()2Keith Thompson
13 Mar 24    i  i  i `- Re: avoiding strdup()1Malcolm McLean
13 Mar 24    i  i  `* Re: avoiding strdup()3Malcolm McLean
13 Mar 24    i  i   `* Re: avoiding strdup()2James Kuyper
13 Mar 24    i  i    `- Re: avoiding strdup()1David Brown
29 Apr 24    i  `* Re: avoiding strdup()3Lawrence D'Oliveiro
29 Apr 24    i   `* Re: avoiding strdup()2i
1 May 24    i    `- Re: avoiding strdup()1steve
10 Mar 24    `- Re: avoiding strdup()1Richard Harnden

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal