I want unsigned char * string literals

M

Malcolm McLean

Michael B Allen said:
Oh please. I appreciate your input. It's usually good advice. But spare
me the drama. Just because I think The C Standard Library is useless
[1], that has little impact on using C The Language.
I grew up on systems without a standard library.
Just about the first thing I always did when getting new hardware was to
implement a cut down stdlib for it.
 
M

Mark McIntyre

Michael said:
[...]
I never said that the exiting malloc(3) function should be changed to
have a context object. I just said it was useless [...]

For the Nth time: Forget about C and find a language
more suited to your tastes.
Just because I think The C Standard Library is useless
[1], that has little impact on using C The Language.

The point is, the Standard Library is part of the language definition.
You are also apparently taking exception to how C defines a string
variable. This is a fundamental part of C. And claiming that malloc is
useless is just plain stupid (tm).

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
R

Richard Bos

Michael B Allen said:
Incedentially, the current malloc is reentrant and thread-safe because
it uses locks (although I don't recall of the top of my head if that
is a standards requirement).

_The_ current malloc()? I suspect you don't grasp the real situation,
here.

Richard
 
D

David Thompson

Ben Pfaff wrote On 07/23/07 17:08,:

Extra code. For example, the PDP-11 MOVB instruction
performed sign extension when loading an 8-bit byte into
a 16-bit register (the hardware equivalent of "promotion").
To get unsigned semantics, you'd need more instructions to
do something about the high-order bits (maybe SUB R0,R0
followed by BISB byte,R0 -- two instructions instead of one).
Or more idiomatically just CLR Rd then BISB as stated.
(From memory 00500d, 15ss0d [srcwrd] ... checking ... yes!)

But I've finally -- more than 30 years later -- forgotten the PDP-8
handboot (Read-In-Mode aka RIM loader). Fortunately(?) it's now almost
certainly on the web.

- formerly david.thompson1 || achar(64) || worldnet.att.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top