Re: [9fans] sam and 'here documents' on Unix [WAS: Re: Making multiple changes to dot using sam -d]

2022-05-16 Thread Mart Zirnask
Sorry for the late reply -- great hint, thanks very much. In a perfect world, I would need a solution that also works on Windows (with the ported unix/p9 tools), but I'll probably build the sam9f-unix port by iru- [1] for now. Btw, can anybody point me to the initial ^ and/or _ command patch? In

Re: [9fans] void*

2022-05-16 Thread Lucio De Re
On 5/16/22, hiro <23h...@gmail.com> wrote: > i still don't understand it. if you want a pointer of size 1 what > keeps you from using a generic char or uint8 pointer? > I think what he's asking is "what's keeping everyone else from using...". I guess we're all evangelists at heart. Lucio. --

Re: [9fans] void*

2022-05-16 Thread hiro
i still don't understand it. if you want a pointer of size 1 what keeps you from using a generic char or uint8 pointer? On 5/16/22, adr wrote: > On Mon, 16 May 2022, Charles Forsyth wrote: >> it's void* because that can be assigned between other pointer types >> without a cast.x = malloc(sizeof(*

Re: [9fans] void*

2022-05-16 Thread adr
On Mon, 16 May 2022, Charles Forsyth wrote: it's void* because that can be assigned between other pointer types without a cast.x = malloc(sizeof(*x)); instead of x = (T*)malloc(sizeof(*x)); which just adds clutter. Similarly it's just free(x) instead of free((void*)x); (or free((uchar*)x) as I

Re: [9fans] void*

2022-05-16 Thread Charles Forsyth
it's void* because that can be assigned between other pointer types without a cast. x = malloc(sizeof(*x)); instead of x = (T*)malloc(sizeof(*x)); which just adds clutter. Similarly it's just free(x) instead of free((void*)x); (or free((uchar*)x) as I understand your suggestion). On Sun, 15 May 2

Re: [9fans] void*

2022-05-16 Thread Bakul Shah
I can see some use of void* arithmetic for malloc/free or when you’re doing your own allocation for various object types, where a size of 1 would be handy. I wonder what a FarC would like! > On May 15, 2022, at 11:27 PM, Skip Tavakkolian > wrote: > >  > If void can have a size, why not 4, 8 o

Re: [9fans] void*

2022-05-16 Thread Humm
Quoth Skip Tavakkolian: If void can have a size, why not 4, 8 or 16? Really, if it would have a size, it should be zero. And thus p+n==p. Not too useful. It’s fine as it is. -- Humm -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fan