Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Optimization hinders evolution.


devel / comp.lang.clipper.visual-objects / Unions

SubjectAuthor
o UnionsJohn Kniewasser

1
Unions

<4d052d56-f134-4a70-a6dd-51312452b625n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1205&group=comp.lang.clipper.visual-objects#1205

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:ae9:dc01:0:b0:6fa:aee9:9d40 with SMTP id q1-20020ae9dc01000000b006faaee99d40mr83945299qkf.194.1670972113387;
Tue, 13 Dec 2022 14:55:13 -0800 (PST)
X-Received: by 2002:a25:4846:0:b0:719:5348:2931 with SMTP id
v67-20020a254846000000b0071953482931mr1601920yba.446.1670972113207; Tue, 13
Dec 2022 14:55:13 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Tue, 13 Dec 2022 14:55:12 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=205.250.135.156; posting-account=ESppqQoAAABng8LkauId5X9jz8ObRsCJ
NNTP-Posting-Host: 205.250.135.156
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4d052d56-f134-4a70-a6dd-51312452b625n@googlegroups.com>
Subject: Unions
From: itb.john.kniewasser@gmail.com (John Kniewasser)
Injection-Date: Tue, 13 Dec 2022 22:55:13 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1880
 by: John Kniewasser - Tue, 13 Dec 2022 22:55 UTC

Good day to you all!

I am looking for some help with this union, specifically with the alignment required.

At the end of each struct are statements
} Compressed;
} Windows;
} File;

I believe this relates to the alignment of the struct.

union
{
struct struct_compressed_memory
{
HGLOBAL hData; /* internal use */
L_VOID L_HUGE*pData; /* internal use */
} Compressed;

struct struct_window_memory
{
HGLOBAL hData; /* Internal use */
L_UCHAR L_FAR *pData; /* Internal use */
} Windows;

struct struct_file_memory
{
L_INT fd; /* Internal use */
L_CHAR L_FAR *Filename;/* Internal use */
} File;
} Addr;

Thank you if anyone can decipher this!

Cheers, JK

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor