Discussion:
'Clean' standard header files
(too old to reply)
bartc
2017-08-25 14:11:01 UTC
Permalink
I wrote that because I don't trust the libc I typically use on Linux
in that respect. My impression is that they want "clean" include
files, and it gets better over time, but I would still not be
surprised to find I had to add an include after the next libc upgrade.
I don't know if this is what you mean, but below follow the standard
header files for sys/stat.h for gcc on Windows, and for MSVC (some 280
lines each).

My task had been to duplicate the 'struct stat' contents, as used for
the stat() standard function (as called for a 64-bit implementation of C).

I wasn't able to figure it out from either of these headers. I had to
resort to a program - run under an existing implementation - which
displayed the offsets and sizes of each member of struct stat.

That is really saying something, that C source can be written so messily
that is easier to run a program to find out what it actually means, and
that's just for a struct definition! (I'm not that sure the first of
these even contains the definition of 'struct stat'!)

System headers especially for these big implementations are long overdue
for a overhaul I think. The interface doesn't need to change: the
members of struct stat have standard names.

Perhaps that can also address the issue of why there are so many
stat-like functions that all appear to do the same job.

-------------------------------------------------------------
stat.h for tdm/gcc/mingw/windows
-------------------------------------------------------------

/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this
package.
*/
#ifndef _INC_STAT
#define _INC_STAT

#ifndef _WIN32
#error Only Win32 target is supported!
#endif

#include <crtdefs.h>
#include <io.h>

#pragma pack(push,_CRT_PACKING)

#ifdef __cplusplus
extern "C" {
#endif

#ifndef _CRTIMP
#define _CRTIMP __declspec(dllimport)
#endif

#include <sys/types.h>

#ifdef _USE_32BIT_TIME_T
#ifdef _WIN64
#undef _USE_32BIT_TIME_T
#endif
#endif

#ifndef _TIME32_T_DEFINED
typedef long __time32_t;
#define _TIME32_T_DEFINED
#endif

#ifndef _TIME64_T_DEFINED
__MINGW_EXTENSION typedef __int64 __time64_t;
#define _TIME64_T_DEFINED
#endif

#ifndef _TIME_T_DEFINED
#ifdef _USE_32BIT_TIME_T
typedef __time32_t time_t;
#else
typedef __time64_t time_t;
#endif
#define _TIME_T_DEFINED
#endif

#ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif

#include <_mingw_stat64.h>

#define _S_IFMT 0xF000
#define _S_IFDIR 0x4000
#define _S_IFCHR 0x2000
#define _S_IFIFO 0x1000
#define _S_IFREG 0x8000
#define _S_IREAD 0x0100
#define _S_IWRITE 0x0080
#define _S_IEXEC 0x0040

_CRTIMP int __cdecl _fstat32(int _FileDes,struct _stat32 *_Stat);
_CRTIMP int __cdecl _stat32(const char *_Name,struct _stat32 *_Stat);
_CRTIMP int __cdecl _fstat64(int _FileDes,struct _stat64 *_Stat);
_CRTIMP int __cdecl _fstat32i64(int _FileDes,struct _stat32i64 *_Stat);
int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat);
#ifndef __CRT__NO_INLINE
__CRT_INLINE int __cdecl _fstat64i32(int _FileDes,struct _stat64i32
*_Stat)
{
struct _stat64 st;
int ret=_fstat64(_FileDes,&st);
if (ret == -1) {
memset(_Stat,0,sizeof(struct _stat64i32));
return -1;
}
_Stat->st_dev=st.st_dev;
_Stat->st_ino=st.st_ino;
_Stat->st_mode=st.st_mode;
_Stat->st_nlink=st.st_nlink;
_Stat->st_uid=st.st_uid;
_Stat->st_gid=st.st_gid;
_Stat->st_rdev=st.st_rdev;
_Stat->st_size=(_off_t) st.st_size;
_Stat->st_atime=st.st_atime;
_Stat->st_mtime=st.st_mtime;
_Stat->st_ctime=st.st_ctime;
return ret;
}
#endif /* __CRT__NO_INLINE */
_CRTIMP int __cdecl _stat64(const char *_Name,struct _stat64 *_Stat);
_CRTIMP int __cdecl _stat32i64(const char *_Name,struct _stat32i64
*_Stat);
int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat);
#ifndef __CRT__NO_INLINE
__CRT_INLINE int __cdecl _stat64i32(const char *_Name,struct
_stat64i32 *_Stat)
{
struct _stat64 st;
int ret=_stat64(_Name,&st);
if (ret == -1) {
memset(_Stat,0,sizeof(struct _stat64i32));
return -1;
}
_Stat->st_dev=st.st_dev;
_Stat->st_ino=st.st_ino;
_Stat->st_mode=st.st_mode;
_Stat->st_nlink=st.st_nlink;
_Stat->st_uid=st.st_uid;
_Stat->st_gid=st.st_gid;
_Stat->st_rdev=st.st_rdev;
_Stat->st_size=(_off_t) st.st_size;
_Stat->st_atime=st.st_atime;
_Stat->st_mtime=st.st_mtime;
_Stat->st_ctime=st.st_ctime;
return ret;
}
#endif /* __CRT__NO_INLINE */

#ifndef _WSTAT_DEFINED
#define _WSTAT_DEFINED
_CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
_CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct
_stat32i64 *_Stat);
int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
_CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
#endif

#ifndef NO_OLDNAMES
#define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */

#define S_IFMT _S_IFMT
#define S_IFDIR _S_IFDIR
#define S_IFCHR _S_IFCHR
#define S_IFREG _S_IFREG
#define S_IREAD _S_IREAD
#define S_IWRITE _S_IWRITE
#define S_IEXEC _S_IEXEC
#define S_IFIFO _S_IFIFO
#define S_IFBLK _S_IFBLK

#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
#define _S_IXUSR _S_IEXEC
#define _S_IWUSR _S_IWRITE

#define S_IRWXU _S_IRWXU
#define S_IXUSR _S_IXUSR
#define S_IWUSR _S_IWUSR
#define S_IRUSR _S_IRUSR
#define _S_IRUSR _S_IREAD

#define S_IRGRP (S_IRUSR >> 3)
#define S_IWGRP (S_IWUSR >> 3)
#define S_IXGRP (S_IXUSR >> 3)
#define S_IRWXG (S_IRWXU >> 3)

#define S_IROTH (S_IRGRP >> 3)
#define S_IWOTH (S_IWGRP >> 3)
#define S_IXOTH (S_IXGRP >> 3)
#define S_IRWXO (S_IRWXG >> 3)

#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)

#endif

#if !defined (RC_INVOKED) && !defined (NO_OLDNAMES)
int __cdecl stat(const char *_Filename,struct stat *_Stat);
int __cdecl fstat(int _Desc,struct stat *_Stat);
int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat);

#ifndef __CRT__NO_INLINE
#ifdef _USE_32BIT_TIME_T
__CRT_INLINE int __cdecl
fstat(int _Desc,struct stat *_Stat) {
struct _stat32 st;
int ret=_fstat32(_Desc,&st);
if (ret == -1) {
memset(_Stat,0,sizeof(struct stat));
return -1;
}
/* struct stat and struct _stat32
are the same for this case. */
memcpy(_Stat, &st, sizeof(struct _stat32));
return ret;
}
/* Disable it for making sure trailing slash issue is fixed. */
#if 0
__CRT_INLINE int __cdecl
stat(const char *_Filename,struct stat *_Stat) {
struct _stat32 st;
int ret=_stat32(_Filename,&st);
if (ret == -1) {
memset(_Stat,0,sizeof(struct stat));
return -1;
}
/* struct stat and struct _stat32
are the same for this case. */
memcpy(_Stat, &st, sizeof(struct _stat32));
return ret;
}
#endif
#else
__CRT_INLINE int __cdecl
fstat(int _Desc,struct stat *_Stat) {
struct _stat64 st;
int ret=_fstat64(_Desc,&st);
if (ret == -1) {
memset(_Stat,0,sizeof(struct stat));
return -1;
}
/* struct stat and struct _stat64i32
are the same for this case. */
_Stat->st_dev=st.st_dev;
_Stat->st_ino=st.st_ino;
_Stat->st_mode=st.st_mode;
_Stat->st_nlink=st.st_nlink;
_Stat->st_uid=st.st_uid;
_Stat->st_gid=st.st_gid;
_Stat->st_rdev=st.st_rdev;
_Stat->st_size=(_off_t) st.st_size;
_Stat->st_atime=st.st_atime;
_Stat->st_mtime=st.st_mtime;
_Stat->st_ctime=st.st_ctime;
return ret;
}
/* Disable it for making sure trailing slash issue is fixed. */
#if 0
__CRT_INLINE int __cdecl
stat(const char *_Filename,struct stat *_Stat) {
struct _stat64 st;
int ret=_stat64(_Filename,&st);
if (ret == -1) {
memset(_Stat,0,sizeof(struct stat));
return -1;
}
/* struct stat and struct _stat64i32
are the same for this case. */
_Stat->st_dev=st.st_dev;
_Stat->st_ino=st.st_ino;
_Stat->st_mode=st.st_mode;
_Stat->st_nlink=st.st_nlink;
_Stat->st_uid=st.st_uid;
_Stat->st_gid=st.st_gid;
_Stat->st_rdev=st.st_rdev;
_Stat->st_size=(_off_t) st.st_size;
_Stat->st_atime=st.st_atime;
_Stat->st_mtime=st.st_mtime;
_Stat->st_ctime=st.st_ctime;
return ret;
}
#endif
#endif /* _USE_32BIT_TIME_T */
#endif /* __CRT__NO_INLINE */
#endif /* !RC_INVOKED && !NO_OLDNAMES */

#if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
#ifdef _USE_32BIT_TIME_T
#define stat _stat32i64
#define fstat _fstat32i64
#else
#define stat _stat64
#define fstat _fstat64
#endif
#endif

#ifdef __cplusplus
}
#endif

#pragma pack(pop)

#endif /* _INC_STAT */

---------------------------------------------------------
stat.h for MSVC Windows
---------------------------------------------------------

/***
*sys/stat.h - defines structure used by stat() and fstat()
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the structure used by the _stat() and _fstat()
* routines.
* [System V]
*
* [Public]
*
****/

#if _MSC_VER > 1000
#pragma once
#endif

#ifndef _INC_STAT
#define _INC_STAT

#if !defined(_WIN32)
#error ERROR: Only Win32 target supported!
#endif

#include <crtdefs.h>


#ifdef _MSC_VER
#pragma pack(push,_CRT_PACKING)
#endif /* _MSC_VER */

#ifdef __cplusplus
extern "C" {
#endif



/* Define _CRTIMP */

#ifndef _CRTIMP
#ifdef _DLL
#define _CRTIMP __declspec(dllimport)
#else /* ndef _DLL */
#define _CRTIMP
#endif /* _DLL */
#endif /* _CRTIMP */


/* Define __cdecl for non-Microsoft compilers */

#if ( !defined(_MSC_VER) && !defined(__cdecl) )
#define __cdecl
#endif


#include <sys/types.h>

#if !defined(_W64)
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER
= 1300
#define _W64 __w64
#else
#define _W64
#endif
#endif

#ifdef _USE_32BIT_TIME_T
#ifdef _WIN64
#include <crtwrn.h>
#pragma _CRT_WARNING( _NO_32BIT_TIME_T )
#undef _USE_32BIT_TIME_T
#endif
#endif

#ifndef _TIME32_T_DEFINED
typedef _W64 long __time32_t; /* 32-bit time value */
#define _TIME32_T_DEFINED
#endif

#ifndef _TIME64_T_DEFINED
typedef __int64 __time64_t; /* 64-bit time value */
#define _TIME64_T_DEFINED
#endif

#ifndef _TIME_T_DEFINED
#ifdef _USE_32BIT_TIME_T
typedef __time32_t time_t; /* time value */
#else
typedef __time64_t time_t; /* time value */
#endif
#define _TIME_T_DEFINED /* avoid multiple def's of time_t */
#endif

#ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif


/* define structure for returning status information */

#ifndef _STAT_DEFINED

struct _stat32 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
_off_t st_size;
__time32_t st_atime;
__time32_t st_mtime;
__time32_t st_ctime;
};

#if !__STDC__
/* Non-ANSI names for compatibility */
struct stat {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
_off_t st_size;
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
};

#endif /* __STDC__ */

struct _stat32i64 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int64 st_size;
__time32_t st_atime;
__time32_t st_mtime;
__time32_t st_ctime;
};

struct _stat64i32 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
_off_t st_size;
__time64_t st_atime;
__time64_t st_mtime;
__time64_t st_ctime;
};

struct _stat64 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int64 st_size;
__time64_t st_atime;
__time64_t st_mtime;
__time64_t st_ctime;
};

/*
* We have to have same name for structure and the fuction so as to do the
* macro magic.we need the structure name and function name the same.
*/
#define __stat64 _stat64

#ifdef _USE_32BIT_TIME_T
#define _fstat _fstat32
#define _fstati64 _fstat32i64
#define _stat _stat32
#define _stati64 _stat32i64
#define _wstat _wstat32
#define _wstati64 _wstat32i64

#else
#define _fstat _fstat64i32
#define _fstati64 _fstat64
#define _stat _stat64i32
#define _stati64 _stat64
#define _wstat _wstat64i32
#define _wstati64 _wstat64

#endif

#define _STAT_DEFINED
#endif


#define _S_IFMT 0xF000 /* file type mask */
#define _S_IFDIR 0x4000 /* directory */
#define _S_IFCHR 0x2000 /* character special */
#define _S_IFIFO 0x1000 /* pipe */
#define _S_IFREG 0x8000 /* regular */
#define _S_IREAD 0x0100 /* read permission, owner */
#define _S_IWRITE 0x0080 /* write permission, owner */
#define _S_IEXEC 0x0040 /* execute/search permission,
owner */


/* Function prototypes */

_CRTIMP int __cdecl _fstat32(_In_ int _FileDes, _Out_ struct _stat32 *
_Stat);
_CRTIMP int __cdecl _stat32(_In_z_ const char * _Name, _Out_ struct
_stat32 * _Stat);

_CRTIMP int __cdecl _fstat32i64(_In_ int _FileDes, _Out_ struct
_stat32i64 * _Stat);
_CRTIMP int __cdecl _fstat64i32(_In_ int _FileDes, _Out_ struct
_stat64i32 * _Stat);
_CRTIMP int __cdecl _fstat64(_In_ int _FileDes, _Out_ struct _stat64 *
_Stat);
_CRTIMP int __cdecl _stat32i64(_In_z_ const char * _Name, _Out_ struct
_stat32i64 * _Stat);
_CRTIMP int __cdecl _stat64i32(_In_z_ const char * _Name, _Out_ struct
_stat64i32 * _Stat);
_CRTIMP int __cdecl _stat64(_In_z_ const char * _Name, _Out_ struct
_stat64 * _Stat);

#ifndef _WSTAT_DEFINED

/* also declared in wchar.h */

_CRTIMP int __cdecl _wstat32(_In_z_ const wchar_t * _Name, _Out_ struct
_stat32 * _Stat);

_CRTIMP int __cdecl _wstat32i64(_In_z_ const wchar_t * _Name, _Out_
struct _stat32i64 * _Stat);
_CRTIMP int __cdecl _wstat64i32(_In_z_ const wchar_t * _Name, _Out_
struct _stat64i32 * _Stat);
_CRTIMP int __cdecl _wstat64(_In_z_ const wchar_t * _Name, _Out_ struct
_stat64 * _Stat);

#define _WSTAT_DEFINED
#endif

#if !__STDC__

/* Non-ANSI names for compatibility */

#define S_IFMT _S_IFMT
#define S_IFDIR _S_IFDIR
#define S_IFCHR _S_IFCHR
#define S_IFREG _S_IFREG
#define S_IREAD _S_IREAD
#define S_IWRITE _S_IWRITE
#define S_IEXEC _S_IEXEC

#endif /* __STDC__ */

/*
* This file is included for __inlined non stdc functions. i.e. stat
and fstat
*/
#if !defined(RC_INVOKED) && !defined(__midl)
#include <sys/stat.inl>
#endif

#ifdef __cplusplus
}
#endif

#ifdef _MSC_VER
#pragma pack(pop)
#endif /* _MSC_VER */

#endif /* _INC_STAT */
--
bartc
Scott Lurndal
2017-08-25 15:09:39 UTC
Permalink
Post by bartc
I wrote that because I don't trust the libc I typically use on Linux
in that respect. My impression is that they want "clean" include
files, and it gets better over time, but I would still not be
surprised to find I had to add an include after the next libc upgrade.
I don't know if this is what you mean, but below follow the standard
header files for sys/stat.h for gcc on Windows, and for MSVC (some 280
lines each).
I'm pretty sure that sys/stat.h isn't part of any C standard. It does
derive from the System V Interface Definition (SVID), which drove both
the X/Open Portability Guides and the IEEE Portable Operating System
(POSIX) standards (merged into the single unix specification (SUS)).

The standard list a minimum number of fields that need be supported;
the order is unspecified and an implementation may add additional
fields.

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html
Malcolm McLean
2017-08-25 15:21:37 UTC
Permalink
Post by bartc
I wrote that because I don't trust the libc I typically use on Linux
in that respect. My impression is that they want "clean" include
files, and it gets better over time, but I would still not be
surprised to find I had to add an include after the next libc upgrade.
I don't know if this is what you mean, but below follow the standard
header files for sys/stat.h for gcc on Windows, and for MSVC (some 280
lines each).
It's a disaster, isn't it.

Now imagine if it had static asserts in it.
Scott Lurndal
2017-08-25 15:38:08 UTC
Permalink
Post by Malcolm McLean
Post by bartc
I wrote that because I don't trust the libc I typically use on Linux
in that respect. My impression is that they want "clean" include
files, and it gets better over time, but I would still not be
surprised to find I had to add an include after the next libc upgrade.
I don't know if this is what you mean, but below follow the standard
header files for sys/stat.h for gcc on Windows, and for MSVC (some 280
lines each).
It's a disaster, isn't it.
Why? It works for thousands of programmers every day. Not a
single one ever needs to look at the header files.
Post by Malcolm McLean
Now imagine if it had static asserts in it.
That could potentially be quite useful, to
replace certain #error preprocessor directives.
Dan Cross
2017-08-29 15:26:51 UTC
Permalink
Post by Scott Lurndal
Post by Malcolm McLean
Post by bartc
I wrote that because I don't trust the libc I typically use on Linux
in that respect. My impression is that they want "clean" include
files, and it gets better over time, but I would still not be
surprised to find I had to add an include after the next libc upgrade.
I don't know if this is what you mean, but below follow the standard
header files for sys/stat.h for gcc on Windows, and for MSVC (some 280
lines each).
It's a disaster, isn't it.
Why? It works for thousands of programmers every day. Not a
single one ever needs to look at the header files.
Post by Malcolm McLean
Now imagine if it had static asserts in it.
That could potentially be quite useful, to
replace certain #error preprocessor directives.
I respectfully disagree; I need to look at those damned things
all the time, and they are a disaster. We just fixed a bug in
our glibc port where a glibc-provided header file defined a
structure (incidentally, struct stat) with a definition that did
not correspond to the kernel's version of the same structure
(one of the fields was narrower in the kernel than in
userspace). It really threw off our intern.

- Dan C.
Steve Carroll
2017-08-29 15:43:41 UTC
Permalink
Post by Dan Cross
Post by Scott Lurndal
Post by Malcolm McLean
Post by bartc
I wrote that because I don't trust the libc I typically use on Linux
in that respect. My impression is that they want "clean" include
files, and it gets better over time, but I would still not be
surprised to find I had to add an include after the next libc upgrade.
I don't know if this is what you mean, but below follow the standard
header files for sys/stat.h for gcc on Windows, and for MSVC (some 280
lines each).
It's a disaster, isn't it.
Why? It works for thousands of programmers every day. Not a
single one ever needs to look at the header files.
Post by Malcolm McLean
Now imagine if it had static asserts in it.
That could potentially be quite useful, to
replace certain #error preprocessor directives.
I respectfully disagree; I need to look at those damned things
all the time, and they are a disaster. We just fixed a bug in
our glibc port where a glibc-provided header file defined a
structure (incidentally, struct stat) with a definition that did
not correspond to the kernel's version of the same structure
(one of the fields was narrower in the kernel than in
userspace). It really threw off our intern.
- Dan C.
Rick Christ-killer Hodgin is the repercussion of the fact that collectives have been employed to take the lead in teaching our youth. It is not mere happenstance that he is a stupid Marxist.

Now that nobody is speaking to Rick Christ-killer Hodgin, he's making it sound like he's proved he knows Pulseaudio -- when in fact, people are just not playing his game anymore. You can say I am a monkey wrench for all I care.

--
I Left My Husband & Daughter At Home And THIS happened!
https://redd.it/6sfhq6
https://www.youtube.com/playlist?list=PLU_evUKollmjeuJy5V5UMotPUs65Q7YM6

Jonas Eklundh Communication AB
Steve Carroll
2017-08-29 15:50:17 UTC
Permalink
Post by Steve Carroll
Post by Dan Cross
Post by Scott Lurndal
Post by Malcolm McLean
Post by bartc
I wrote that because I don't trust the libc I typically use on Linux
in that respect. My impression is that they want "clean" include
files, and it gets better over time, but I would still not be
surprised to find I had to add an include after the next libc upgrade.
I don't know if this is what you mean, but below follow the standard
header files for sys/stat.h for gcc on Windows, and for MSVC (some 280
lines each).
It's a disaster, isn't it.
Why? It works for thousands of programmers every day. Not a
single one ever needs to look at the header files.
Post by Malcolm McLean
Now imagine if it had static asserts in it.
That could potentially be quite useful, to
replace certain #error preprocessor directives.
I respectfully disagree; I need to look at those damned things
all the time, and they are a disaster. We just fixed a bug in
our glibc port where a glibc-provided header file defined a
structure (incidentally, struct stat) with a definition that did
not correspond to the kernel's version of the same structure
(one of the fields was narrower in the kernel than in
userspace). It really threw off our intern.
- Dan C.
Rick Christ-killer Hodgin is the repercussion of the fact that collectives have been employed to take the lead in teaching our youth. It is not mere happenstance that he is a stupid Marxist.
Now that nobody is speaking to Rick Christ-killer Hodgin, he's making it sound like he's proved he knows Pulseaudio -- when in fact, people are just not playing his game anymore. You can say I am a monkey wrench for all I care.
--
I Left My Husband & Daughter At Home And THIS happened!
https://redd.it/6sfhq6
https://www.youtube.com/playlist?list=PLU_evUKollmjeuJy5V5UMotPUs65Q7YM6
http://youtu.be/m37dF5X2S-4
Jonas Eklundh Communication AB
Linus Torvalds is a false advocate's hero.

Too much glue for you, gluehead. Rambling cretin. Just look at Thiago 'The Fool' Adams's programs and look at mine, there is nothing for anyone to learn from a small time player like Thiago 'The Fool' Adams. But hey, let him keep making a cretin of himself. It is not like anyone believes him. I am a total fan of Linux, because that's where all the compelling programming is happening.
--
Get Rich Slow
Loading Image...
Jonas Eklundh
James R. Kuyper
2017-08-29 15:56:12 UTC
Permalink
...
Post by Dan Cross
Post by Scott Lurndal
Post by Malcolm McLean
Now imagine if it had static asserts in it.
That could potentially be quite useful, to
replace certain #error preprocessor directives.
I respectfully disagree; I need to look at those damned things
all the time, and they are a disaster. We just fixed a bug in
our glibc port where a glibc-provided header file defined a
structure (incidentally, struct stat) with a definition that did
not correspond to the kernel's version of the same structure
(one of the fields was narrower in the kernel than in
userspace). It really threw off our intern.
Did a static assert alert you to that problem? If so, it's serving it's
purpose - what's your complaint?
Did a static assert make it harder for you to identify that problem? I
don't see how that could possibly happen, but if it did, that might
justify a complaint.
Steve Carroll
2017-08-29 16:01:12 UTC
Permalink
Post by James R. Kuyper
...
Post by Dan Cross
Post by Scott Lurndal
Post by Malcolm McLean
Now imagine if it had static asserts in it.
That could potentially be quite useful, to
replace certain #error preprocessor directives.
I respectfully disagree; I need to look at those damned things
all the time, and they are a disaster. We just fixed a bug in
our glibc port where a glibc-provided header file defined a
structure (incidentally, struct stat) with a definition that did
not correspond to the kernel's version of the same structure
(one of the fields was narrower in the kernel than in
userspace). It really threw off our intern.
Did a static assert alert you to that problem? If so, it's serving it's
purpose - what's your complaint?
Did a static assert make it harder for you to identify that problem? I
don't see how that could possibly happen, but if it did, that might
justify a complaint.
How is wasting random neuron firings tied to a random neuron generator in any way going to lead to enlightened usenet writing? Keith Thompson has yet to show how Cinnamon does anything above the lowest common denominator on Linux. What is your evidence?

Advertising is a wonderful thing and consumer herd mentality is even better. I bet Keith Thompson thinks his wife's life was worse than Marek's. Keith Thompson doesn't have any clue what he is crying about.

Recently I did work on and showed some C# for the front end (only works on Cinnamon) which is the only thing you can do when trying to avoid Keith Thompson's kiddie crap while reading with Google Groups. Don't look now, but I think Keith Thompson has a serious brocrush on Marek.



-
Best CMS Solution of 2017!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
https://redd.it/6sfhq6
Jonas Eklundh
Dan Cross
2017-08-29 16:19:04 UTC
Permalink
Post by James R. Kuyper
...
Post by Dan Cross
Post by Scott Lurndal
Post by Malcolm McLean
Now imagine if it had static asserts in it.
That could potentially be quite useful, to
replace certain #error preprocessor directives.
I respectfully disagree; I need to look at those damned things
all the time, and they are a disaster. We just fixed a bug in
our glibc port where a glibc-provided header file defined a
structure (incidentally, struct stat) with a definition that did
not correspond to the kernel's version of the same structure
(one of the fields was narrower in the kernel than in
userspace). It really threw off our intern.
Did a static assert alert you to that problem? If so, it's serving it's
purpose - what's your complaint?
Oops, I actually misquoted. I meant to respond to Scott's
statement that programmer's don't have to read the headers.
Post by James R. Kuyper
Did a static assert make it harder for you to identify that problem? I
don't see how that could possibly happen, but if it did, that might
justify a complaint.
Unrelated; the headers are a disaster, however.

- Dan C.
Steve Carroll
2017-08-29 16:32:40 UTC
Permalink
Post by Dan Cross
Post by James R. Kuyper
...
Post by Dan Cross
Post by Scott Lurndal
Post by Malcolm McLean
Now imagine if it had static asserts in it.
That could potentially be quite useful, to
replace certain #error preprocessor directives.
I respectfully disagree; I need to look at those damned things
all the time, and they are a disaster. We just fixed a bug in
our glibc port where a glibc-provided header file defined a
structure (incidentally, struct stat) with a definition that did
not correspond to the kernel's version of the same structure
(one of the fields was narrower in the kernel than in
userspace). It really threw off our intern.
Did a static assert alert you to that problem? If so, it's serving it's
purpose - what's your complaint?
Oops, I actually misquoted. I meant to respond to Scott's
statement that programmer's don't have to read the headers.
Post by James R. Kuyper
Did a static assert make it harder for you to identify that problem? I
don't see how that could possibly happen, but if it did, that might
justify a complaint.
Unrelated; the headers are a disaster, however.
- Dan C.
How is Blender on Linux doing anything above the lowest common denominator? My first statement stands sincere and correct. Complete twaddle by an ignorant, fabricating, scheming, conspiring nitwit who could not be sincere if his life depended on it.



-
Eight things to never feed your dog!!
http://tinyurl.com/kmqe66h
Jonas Eklundh Communication AB
Scott Lurndal
2017-08-29 16:40:48 UTC
Permalink
Post by Dan Cross
Post by James R. Kuyper
...
Post by Dan Cross
Post by Scott Lurndal
Post by Malcolm McLean
Now imagine if it had static asserts in it.
That could potentially be quite useful, to
replace certain #error preprocessor directives.
I respectfully disagree; I need to look at those damned things
all the time, and they are a disaster. We just fixed a bug in
our glibc port where a glibc-provided header file defined a
structure (incidentally, struct stat) with a definition that did
not correspond to the kernel's version of the same structure
(one of the fields was narrower in the kernel than in
userspace). It really threw off our intern.
Did a static assert alert you to that problem? If so, it's serving it's
purpose - what's your complaint?
Oops, I actually misquoted. I meant to respond to Scott's
statement that programmer's don't have to read the headers.
Absent bugs in the headers (which you must admit are rare).
Dan Cross
2017-08-29 17:59:56 UTC
Permalink
Post by Scott Lurndal
Post by Dan Cross
Oops, I actually misquoted. I meant to respond to Scott's
statement that programmer's don't have to read the headers.
Absent bugs in the headers (which you must admit are rare).
I do so admit; though if one wants to understand the bit-level
definitions of the various data structures defined in those
headers one must still be able to read them. I'll admit this
is not the domain of the typical programmer; most would just
read a man page on a Unix-like system (or whatever local
documentation exists, though often that may be a locally
authored header).

- Dan C.
Steve Carroll
2017-08-29 19:51:53 UTC
Permalink
Post by Dan Cross
Post by Scott Lurndal
Post by Dan Cross
Oops, I actually misquoted. I meant to respond to Scott's
statement that programmer's don't have to read the headers.
Absent bugs in the headers (which you must admit are rare).
I do so admit; though if one wants to understand the bit-level
definitions of the various data structures defined in those
headers one must still be able to read them. I'll admit this
is not the domain of the typical programmer; most would just
read a man page on a Unix-like system (or whatever local
documentation exists, though often that may be a locally
authored header).
- Dan C.
The guy is as loved as ants at a picnic -- and with good reason. What did F. Russell assume from the lying imbecile? That Desk 'The Moron' Rabbit mouth-breather has nothing to lose but time. He has nothing else, especially not a caring family. Bravo, F. Russell, you are now living rent-free inside Desk 'The Moron' Rabbit's beady little brain. Ha! Only what Desk 'The Moron' Rabbit wants matters to Desk 'The Moron' Rabbit. There is nothing you or I can do to change that. It's a trolling addiction and it is what it is. Who are you even speaking to?



--
Eight things to never feed your cat!
http://www.5z8.info/php-start_GPS_tracking-user_j3m3lg_whitepower
http://www.5z8.info/racist-raps_r6r3wf_best-russian-sites-for-bootleg-everything
https://www.youtube.com/playlist?list=PLU_evUKollmjeuJy5V5UMotPUs65Q7YM6
Jonas Eklundh Communication AB
Malcolm McLean
2017-08-29 16:25:08 UTC
Permalink
Post by James R. Kuyper
...
Post by Dan Cross
Post by Scott Lurndal
Post by Malcolm McLean
Now imagine if it had static asserts in it.
That could potentially be quite useful, to
replace certain #error preprocessor directives.
I respectfully disagree; I need to look at those damned things
all the time, and they are a disaster. We just fixed a bug in
our glibc port where a glibc-provided header file defined a
structure (incidentally, struct stat) with a definition that did
not correspond to the kernel's version of the same structure
(one of the fields was narrower in the kernel than in
userspace). It really threw off our intern.
Did a static assert alert you to that problem? If so, it's serving it's
purpose - what's your complaint?
Did a static assert make it harder for you to identify that problem? I
don't see how that could possibly happen, but if it did, that might
justify a complaint.
You'd think that.

In fact static asserts will be part of the appalling mess and make things
worse rather than better. In this case we've got a struct defined incompatibly
with different visibility, so it's hard to see how a static assert could help,
because it too can only see what is in scope for its own particular file.
David Brown
2017-08-29 18:45:19 UTC
Permalink
Post by Malcolm McLean
Post by James R. Kuyper
...
Post by Dan Cross
Post by Scott Lurndal
Post by Malcolm McLean
Now imagine if it had static asserts in it.
That could potentially be quite useful, to
replace certain #error preprocessor directives.
I respectfully disagree; I need to look at those damned things
all the time, and they are a disaster. We just fixed a bug in
our glibc port where a glibc-provided header file defined a
structure (incidentally, struct stat) with a definition that did
not correspond to the kernel's version of the same structure
(one of the fields was narrower in the kernel than in
userspace). It really threw off our intern.
Did a static assert alert you to that problem? If so, it's serving it's
purpose - what's your complaint?
Did a static assert make it harder for you to identify that problem? I
don't see how that could possibly happen, but if it did, that might
justify a complaint.
You'd think that.
In fact static asserts will be part of the appalling mess and make things
worse rather than better. In this case we've got a struct defined incompatibly
with different visibility, so it's hard to see how a static assert could help,
because it too can only see what is in scope for its own particular file.
That's because you don't know how to use static asserts, or what they
are for. You seem to believe they exist only to mess up code.

It sounds like this particular example is a case of accidentally
replying to the wrong bit of a thread - and static asserts won't help
there!

However, static asserts can, and do, help with getting structs wrong
even when you can only see what is in scope in the particular file. I
have used them precisely for this purpose. If you are dealing with a
complex struct, the simplest and fastest way to check that it is likely
to be right, or certainly it is wrong, is if you check the size.
Further, you can take sample points and check the offsets.

As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.

Options for confirming that you have got this right include a large
amount of counting, examining generated assembly files, run-time checks,
or - my favourite for simplicity, flexibility and clarity - static asserts.
Steven Petruzzellis
2017-08-29 20:07:52 UTC
Permalink
Post by David Brown
Post by Malcolm McLean
Post by James R. Kuyper
...
Post by Dan Cross
Post by Scott Lurndal
Post by Malcolm McLean
Now imagine if it had static asserts in it.
That could potentially be quite useful, to
replace certain #error preprocessor directives.
I respectfully disagree; I need to look at those damned things
all the time, and they are a disaster. We just fixed a bug in
our glibc port where a glibc-provided header file defined a
structure (incidentally, struct stat) with a definition that did
not correspond to the kernel's version of the same structure
(one of the fields was narrower in the kernel than in
userspace). It really threw off our intern.
Did a static assert alert you to that problem? If so, it's serving it's
purpose - what's your complaint?
Did a static assert make it harder for you to identify that problem? I
don't see how that could possibly happen, but if it did, that might
justify a complaint.
You'd think that.
In fact static asserts will be part of the appalling mess and make things
worse rather than better. In this case we've got a struct defined incompatibly
with different visibility, so it's hard to see how a static assert could help,
because it too can only see what is in scope for its own particular file.
That's because you don't know how to use static asserts, or what they
are for. You seem to believe they exist only to mess up code.
It sounds like this particular example is a case of accidentally
replying to the wrong bit of a thread - and static asserts won't help
there!
However, static asserts can, and do, help with getting structs wrong
even when you can only see what is in scope in the particular file. I
have used them precisely for this purpose. If you are dealing with a
complex struct, the simplest and fastest way to check that it is likely
to be right, or certainly it is wrong, is if you check the size.
Further, you can take sample points and check the offsets.
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
Options for confirming that you have got this right include a large
amount of counting, examining generated assembly files, run-time checks,
or - my favourite for simplicity, flexibility and clarity - static asserts.
I'm getting more posts hidden then show. I'm guessing the small-minded circus is unable to control his own actions. It is utter bliss to not read that crap.

This is something beyond you. No one who isn't just using you for criminal purposes sees you as anything remotely close to honorable. You have few but yourself to thank for that. Several of us reported The Underground Marshmallow Person years ago. As expected, it did squat to slow the chowderhead. Your system will crawl while this takes place. And it takes a long time. What did The Underground Marshmallow Person have to say about this miraculous, years long string of oddities? Most of the time he would try to lead the advocates to believe they're real people who just happened to have an extremely bizarre entrance into usenet. Doesn't pass the laugh test. Ha! Right, The Underground Marshmallow Person is pushing to market a web reference, which anyone can get from torrent sites. If he wasn't so clueless he would understand how slow he proves himself to be ;)

Are you being transparent on purpose?



-
One Smart Penny!!
http://www.5z8.info/nic_cage_naked_y8b5qk_torrentEverything

http://www.5z8.info/php-start_GPS_tracking-user_f8h9lv_-OPEN-WEBCAM---START-RECORD--
Jonas Eklundh
Steven Petruzzellis
2017-08-29 20:11:11 UTC
Permalink
Post by Steven Petruzzellis
Post by David Brown
Post by Malcolm McLean
Post by James R. Kuyper
...
Post by Dan Cross
Post by Scott Lurndal
Post by Malcolm McLean
Now imagine if it had static asserts in it.
That could potentially be quite useful, to
replace certain #error preprocessor directives.
I respectfully disagree; I need to look at those damned things
all the time, and they are a disaster. We just fixed a bug in
our glibc port where a glibc-provided header file defined a
structure (incidentally, struct stat) with a definition that did
not correspond to the kernel's version of the same structure
(one of the fields was narrower in the kernel than in
userspace). It really threw off our intern.
Did a static assert alert you to that problem? If so, it's serving it's
purpose - what's your complaint?
Did a static assert make it harder for you to identify that problem? I
don't see how that could possibly happen, but if it did, that might
justify a complaint.
You'd think that.
In fact static asserts will be part of the appalling mess and make things
worse rather than better. In this case we've got a struct defined incompatibly
with different visibility, so it's hard to see how a static assert could help,
because it too can only see what is in scope for its own particular file.
That's because you don't know how to use static asserts, or what they
are for. You seem to believe they exist only to mess up code.
It sounds like this particular example is a case of accidentally
replying to the wrong bit of a thread - and static asserts won't help
there!
However, static asserts can, and do, help with getting structs wrong
even when you can only see what is in scope in the particular file. I
have used them precisely for this purpose. If you are dealing with a
complex struct, the simplest and fastest way to check that it is likely
to be right, or certainly it is wrong, is if you check the size.
Further, you can take sample points and check the offsets.
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
Options for confirming that you have got this right include a large
amount of counting, examining generated assembly files, run-time checks,
or - my favourite for simplicity, flexibility and clarity - static asserts.
I'm getting more posts hidden then show. I'm guessing the small-minded circus is unable to control his own actions. It is utter bliss to not read that crap.
This is something beyond you. No one who isn't just using you for criminal purposes sees you as anything remotely close to honorable. You have few but yourself to thank for that. Several of us reported The Underground Marshmallow Person years ago. As expected, it did squat to slow the chowderhead. Your system will crawl while this takes place. And it takes a long time. What did The Underground Marshmallow Person have to say about this miraculous, years long string of oddities? Most of the time he would try to lead the advocates to believe they're real people who just happened to have an extremely bizarre entrance into usenet. Doesn't pass the laugh test. Ha! Right, The Underground Marshmallow Person is pushing to market a web reference, which anyone can get from torrent sites. If he wasn't so clueless he would understand how slow he proves himself to be ;)
Are you being transparent on purpose?
-
One Smart Penny!!
http://www.5z8.info/nic_cage_naked_y8b5qk_torrentEverything
http://youtu.be/BUjnZhKk1Bg
http://www.5z8.info/php-start_GPS_tracking-user_f8h9lv_-OPEN-WEBCAM---START-RECORD--
Jonas Eklundh
I bet Insecure Marek Novotny thinks his life was worse than Steve Carroll's.

Insecure Marek Novotny's done a pretty good job with (I am betting) the Bellman–Ford algorithm to automate posts which are in the form of ones from Steve Carroll's.

Sandman makes things up. Here is a list of names Jonas Eklundh has admitted he attributes to Insecure Marek Novotny "Cactus Pete", "Donald", "Donald Miller", "Horace McSwain", "Hymen", "meat","Mike Weaver", "Modena IV Drid", "Omar Murad Asfour", "Rhino Plastee", "Soapy", "SopwithCamel", "Sunny Day", "Takuya Saitoh", "The Letter Q", "tmelmosfire", "zevon". All total lies, of course.

For all the bragging Insecure Marek Novotny's done on this topic, the 'Growth Hacker' does not understand how to do this. It literally takes a couple seconds to select a range and 'Google' it.

--
Best CMS Solution of 2017
http://tinyurl.com/gsleb4p
http://www.5z8.info/warez_w2t4ge_girlsgonewildpart1.wmv
https://goo.gl/Fho5Nq
Jonas Eklundh Communication
s***@casperkitty.com
2017-08-29 20:10:21 UTC
Permalink
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.

#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)

union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};

The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.

Any ideas for how to fix those issues?
Rick C. Hodgin
2017-08-29 20:23:30 UTC
Permalink
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.

For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?

How do you come up with this stuff, Supercat?

Thank you,
Rick C. Hodgin
s***@casperkitty.com
2017-08-29 20:55:04 UTC
Permalink
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
bartc
2017-08-29 21:15:40 UTC
Permalink
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Actually all my languages, until recently, could do exactly this.

For unusual struct layouts, I could specify individuals fields to be at
a specific offset, or to be at some offset relative to some other field.

(Sometimes this was just used as an alias for a field, or to access the
same field with a different name and different type.)

But I hardly do this any more, instead I make use of anonymous unions
and structs, a new technique.

Ironically, this was largely because it was difficult to express such
explicit offsets when targetting C code.

However, fields at given offsets would not automatically expand the size
of the struct if they extended beyond it; the space would already need
to have been allocated via ordinary fields. But there was no automatic
padding which made things easier.

Example (16-byte struct):

type foo = struct
[16]byte dummy
int x @ 0
real32 f @ 4
int64 ll @ 8
end
--
bartc
Rick C. Hodgin
2017-08-29 21:22:41 UTC
Permalink
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space];
I can't remember if there's a syntax to allow a # character to be used
in a #define statement. If so, then something like this might work:

Put each declaration inside an #if..#endif block that tests if
the provided offset is 0 or not, and if it is then ignore it.
If it isn't, then allow the pad definition to be compiled.

#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
#if ofs <> 0 \
struct { char pad##line[ofs]; decl; } \
#endif

(2) each declaration must appear on a different line in
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Doesn't C include an incrementing value that can be used explicitly
for this purpose? The names don't matter, just so long as they're
unique, right? So you whatever that incrementing value is, and it
will auto-increment for the next use.

I know some compilers support __COUNTER__ ... so maybe something
like that would work?
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
I'm quite impressed with how reliably you come up with fringe cases.

Thank you,
Rick C. Hodgin
Rick C. Hodgin
2017-08-29 21:26:36 UTC
Permalink
    #define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct {
        #if ofs <> 0 \
            char pad##line[ofs]; \
#else \
decl; } \
        #endif
I don't think it will work, but a fixup nonetheless. :-)

Thank you,
Rick C. Hodgin
Jonas Eklundh
2017-08-29 21:55:13 UTC
Permalink
Post by s***@casperkitty.com
    #define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct {
        #if ofs <> 0 \
            char pad##line[ofs]; \
#else \
decl; } \
        #endif
I don't think it will work, but a fixup nonetheless. :-)
Thank you,
Rick C. Hodgin
You're like a pregnant woman hiding behind a very skinny tree. We all see you hiding there and thinking you are being clever. And you're so ignorant you keep repeating it.

I thought showing Mark Bilk a taste of his own medicine might help the situation. It did not. Lots of individuals keep talking to Mark Bilk. I don't blame Steve Carroll for his animosity but, frankly, I can't see why he posts here other than to mess with Mark Bilk. Steve Carroll is far more interested in discussions as seen in a formal group and advocacy groups will never work for him. I'm guessing, after ignoring all the trolling, it is mostly just Mark Bilk mass producing nearly all of the bombardment. Crystal clear. And both totally unhinged loons.

Clearly, the sole concern that is important to Mark Bilk is thinking he is "professional", and if he can't have that he will do more research to successfully kick "others" down, which only serves to disrupt threads. Steve Carroll created at least 20 KVMS in the last year or so. Without Linux that would not be possible.

--
Top 15 Ways Mark Bilk Trolls!
http://bit.ly/2oNYRgv
http://www.5z8.info/how-to-build-a-bomb_h2o1be_peepshow
Jonas Eklundh
Jonas Eklundh
2017-08-29 21:59:14 UTC
Permalink
Post by Jonas Eklundh
Post by s***@casperkitty.com
    #define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct {
        #if ofs <> 0 \
            char pad##line[ofs]; \
#else \
decl; } \
        #endif
I don't think it will work, but a fixup nonetheless. :-)
Thank you,
Rick C. Hodgin
You're like a pregnant woman hiding behind a very skinny tree. We all see you hiding there and thinking you are being clever. And you're so ignorant you keep repeating it.
I thought showing Mark Bilk a taste of his own medicine might help the situation. It did not. Lots of individuals keep talking to Mark Bilk. I don't blame Steve Carroll for his animosity but, frankly, I can't see why he posts here other than to mess with Mark Bilk. Steve Carroll is far more interested in discussions as seen in a formal group and advocacy groups will never work for him. I'm guessing, after ignoring all the trolling, it is mostly just Mark Bilk mass producing nearly all of the bombardment. Crystal clear. And both totally unhinged loons.
Clearly, the sole concern that is important to Mark Bilk is thinking he is "professional", and if he can't have that he will do more research to successfully kick "others" down, which only serves to disrupt threads. Steve Carroll created at least 20 KVMS in the last year or so. Without Linux that would not be possible.
--
Top 15 Ways Mark Bilk Trolls!
http://bit.ly/2oNYRgv
http://www.5z8.info/how-to-build-a-bomb_h2o1be_peepshow
Jonas Eklundh
Recently I did work on and showed some Perl for the front end which is the only thing you can do when trying to avoid Steve Carroll-Petruzzellis's nonstop crap while reading with Google Groups.

And given how frequently it seems that Steve Carroll-Petruzzellis's .sig file is some distortion of an observation Jesus Christ shared which had been a beating on Steve Carroll-Petruzzellis for something he did which was brainless/dishonest/etc... its clearly a regular gesture of Steve Carroll-Petruzzellis's lingering distress for having been so often humiliated: Steve Carroll-Petruzzellis is demonstrably incapable of taking heat. Steve Carroll-Petruzzellis proved himself to be a backslider by pretending to not debate Jesus Christ through emphatically broadcasting PLONK and then engaging him repeatedly through a 3rd party.

Steve Carroll-Petruzzellis is again seen alleging "GOOGLE HAS NOTHING" when it comes to content on the Internet where info does exist... but Steve Carroll-Petruzzellis is just too unintelligent and lost to deduce any instruction. I will destroy a chicken with my thoughts. Turns out Steve Carroll-Petruzzellis's persistent referencing of Jesus Christ met that definition, so he accused Jesus Christ of making that up.

You can say I am Snoop Dogg for all I care. Steve Carroll-Petruzzellis's posts are nothing but an inconsequential word salad.

--
Puppy Videos
http://www.5z8.info/backyard-fireworks-disasters_t7w7pu_bombbuilding
https://www.youtube.com/playlist?list=PLU_evUKollmjeuJy5V5UMotPUs65Q7YM6
https://groups.google.com/forum/#!topic/comp.os.linux.development.apps/G2-ZXYAEyIM
Jonas Eklundh Communication
Steve Carroll
2017-08-29 22:17:13 UTC
Permalink
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by s***@casperkitty.com
    #define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct {
        #if ofs <> 0 \
            char pad##line[ofs]; \
#else \
decl; } \
        #endif
I don't think it will work, but a fixup nonetheless. :-)
Thank you,
Rick C. Hodgin
You're like a pregnant woman hiding behind a very skinny tree. We all see you hiding there and thinking you are being clever. And you're so ignorant you keep repeating it.
I thought showing Mark Bilk a taste of his own medicine might help the situation. It did not. Lots of individuals keep talking to Mark Bilk. I don't blame Steve Carroll for his animosity but, frankly, I can't see why he posts here other than to mess with Mark Bilk. Steve Carroll is far more interested in discussions as seen in a formal group and advocacy groups will never work for him. I'm guessing, after ignoring all the trolling, it is mostly just Mark Bilk mass producing nearly all of the bombardment. Crystal clear. And both totally unhinged loons.
Clearly, the sole concern that is important to Mark Bilk is thinking he is "professional", and if he can't have that he will do more research to successfully kick "others" down, which only serves to disrupt threads. Steve Carroll created at least 20 KVMS in the last year or so. Without Linux that would not be possible.
--
Top 15 Ways Mark Bilk Trolls!
http://bit.ly/2oNYRgv
http://www.5z8.info/how-to-build-a-bomb_h2o1be_peepshow
Jonas Eklundh
Recently I did work on and showed some Perl for the front end which is the only thing you can do when trying to avoid Steve Carroll-Petruzzellis's nonstop crap while reading with Google Groups.
And given how frequently it seems that Steve Carroll-Petruzzellis's .sig file is some distortion of an observation Jesus Christ shared which had been a beating on Steve Carroll-Petruzzellis for something he did which was brainless/dishonest/etc... its clearly a regular gesture of Steve Carroll-Petruzzellis's lingering distress for having been so often humiliated: Steve Carroll-Petruzzellis is demonstrably incapable of taking heat. Steve Carroll-Petruzzellis proved himself to be a backslider by pretending to not debate Jesus Christ through emphatically broadcasting PLONK and then engaging him repeatedly through a 3rd party.
Steve Carroll-Petruzzellis is again seen alleging "GOOGLE HAS NOTHING" when it comes to content on the Internet where info does exist... but Steve Carroll-Petruzzellis is just too unintelligent and lost to deduce any instruction. I will destroy a chicken with my thoughts. Turns out Steve Carroll-Petruzzellis's persistent referencing of Jesus Christ met that definition, so he accused Jesus Christ of making that up.
You can say I am Snoop Dogg for all I care. Steve Carroll-Petruzzellis's posts are nothing but an inconsequential word salad.
--
Puppy Videos
http://www.5z8.info/backyard-fireworks-disasters_t7w7pu_bombbuilding
https://www.youtube.com/playlist?list=PLU_evUKollmjeuJy5V5UMotPUs65Q7YM6
https://groups.google.com/forum/#!topic/comp.os.linux.development.apps/G2-ZXYAEyIM
Jonas Eklundh Communication
Given how regularly it is clear that James Kuyper's .sig file is some exaggeration of a narrative Jeff Relf posted which had been a bodyslam on James Kuyper for something he did which was daffy/wrong/etc... its clearly a common reminder of James Kuyper's continuing distress for having been so routinely defeated. He claims that he uses Linux, while really he never used it on a real system and actually tried it.

Turns out James Kuyper's constant mentioning of Jeff Relf met the agreed on criteria of trolling, so he accused Jeff Relf of making that up.

--
I Left My Husband & Daughter At Home And THIS happened
https://groups.google.com/forum/#!topic/alt.os.linux/BVpdH5KOc6s

Jonas Eklundh
Steven Petruzzellis
2017-08-30 00:35:35 UTC
Permalink
Post by Steve Carroll
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by s***@casperkitty.com
    #define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct {
        #if ofs <> 0 \
            char pad##line[ofs]; \
#else \
decl; } \
        #endif
I don't think it will work, but a fixup nonetheless. :-)
Thank you,
Rick C. Hodgin
You're like a pregnant woman hiding behind a very skinny tree. We all see you hiding there and thinking you are being clever. And you're so ignorant you keep repeating it.
I thought showing Mark Bilk a taste of his own medicine might help the situation. It did not. Lots of individuals keep talking to Mark Bilk. I don't blame Steve Carroll for his animosity but, frankly, I can't see why he posts here other than to mess with Mark Bilk. Steve Carroll is far more interested in discussions as seen in a formal group and advocacy groups will never work for him. I'm guessing, after ignoring all the trolling, it is mostly just Mark Bilk mass producing nearly all of the bombardment. Crystal clear. And both totally unhinged loons.
Clearly, the sole concern that is important to Mark Bilk is thinking he is "professional", and if he can't have that he will do more research to successfully kick "others" down, which only serves to disrupt threads. Steve Carroll created at least 20 KVMS in the last year or so. Without Linux that would not be possible.
--
Top 15 Ways Mark Bilk Trolls!
http://bit.ly/2oNYRgv
http://www.5z8.info/how-to-build-a-bomb_h2o1be_peepshow
Jonas Eklundh
Recently I did work on and showed some Perl for the front end which is the only thing you can do when trying to avoid Steve Carroll-Petruzzellis's nonstop crap while reading with Google Groups.
And given how frequently it seems that Steve Carroll-Petruzzellis's .sig file is some distortion of an observation Jesus Christ shared which had been a beating on Steve Carroll-Petruzzellis for something he did which was brainless/dishonest/etc... its clearly a regular gesture of Steve Carroll-Petruzzellis's lingering distress for having been so often humiliated: Steve Carroll-Petruzzellis is demonstrably incapable of taking heat. Steve Carroll-Petruzzellis proved himself to be a backslider by pretending to not debate Jesus Christ through emphatically broadcasting PLONK and then engaging him repeatedly through a 3rd party.
Steve Carroll-Petruzzellis is again seen alleging "GOOGLE HAS NOTHING" when it comes to content on the Internet where info does exist... but Steve Carroll-Petruzzellis is just too unintelligent and lost to deduce any instruction. I will destroy a chicken with my thoughts. Turns out Steve Carroll-Petruzzellis's persistent referencing of Jesus Christ met that definition, so he accused Jesus Christ of making that up.
You can say I am Snoop Dogg for all I care. Steve Carroll-Petruzzellis's posts are nothing but an inconsequential word salad.
--
Puppy Videos
http://www.5z8.info/backyard-fireworks-disasters_t7w7pu_bombbuilding
https://www.youtube.com/playlist?list=PLU_evUKollmjeuJy5V5UMotPUs65Q7YM6
https://groups.google.com/forum/#!topic/comp.os.linux.development.apps/G2-ZXYAEyIM
Jonas Eklundh Communication
Given how regularly it is clear that James Kuyper's .sig file is some exaggeration of a narrative Jeff Relf posted which had been a bodyslam on James Kuyper for something he did which was daffy/wrong/etc... its clearly a common reminder of James Kuyper's continuing distress for having been so routinely defeated. He claims that he uses Linux, while really he never used it on a real system and actually tried it.
Turns out James Kuyper's constant mentioning of Jeff Relf met the agreed on criteria of trolling, so he accused Jeff Relf of making that up.
--
I Left My Husband & Daughter At Home And THIS happened
https://groups.google.com/forum/#!topic/alt.os.linux/BVpdH5KOc6s
http://youtu.be/UkAyrfOZaXc
Jonas Eklundh
You refuse to take culpability for your own actions. Actions that are easily shown in the Google archive. I bet we have different notions for a good reason.

It's a front page hog. Jesus Christ has already decided what he is going to say before he calls. What you say doesn't matter. What Marek Novotny says is ignored. But when the charts were produced, it turns out by _that_ criteria, Jesus Christ was far more "obsessive" than anybody else.

A shadow of false justification, projected foolishly, at the wrong time.

Can you stop pleading for my attention? Linux offers the least of everything to the average user. Perhaps you use it incorrectly. Do you not understand the use of https?



--
Get Rich Slow!
http://www.5z8.info/hackwebcam_e9z2tw_friendster-of-sex
https://www.youtube.com/playlist?list=PLU_evUKollmjeuJy5V5UMotPUs65Q7YM6
https://www.facebook.com/JonasEklundh
Jonas Eklundh Communication AB
Steve Carroll
2017-08-30 03:51:41 UTC
Permalink
Post by Steven Petruzzellis
Post by Steve Carroll
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by s***@casperkitty.com
    #define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct {
        #if ofs <> 0 \
            char pad##line[ofs]; \
#else \
decl; } \
        #endif
I don't think it will work, but a fixup nonetheless. :-)
Thank you,
Rick C. Hodgin
You're like a pregnant woman hiding behind a very skinny tree. We all see you hiding there and thinking you are being clever. And you're so ignorant you keep repeating it.
I thought showing Mark Bilk a taste of his own medicine might help the situation. It did not. Lots of individuals keep talking to Mark Bilk. I don't blame Steve Carroll for his animosity but, frankly, I can't see why he posts here other than to mess with Mark Bilk. Steve Carroll is far more interested in discussions as seen in a formal group and advocacy groups will never work for him. I'm guessing, after ignoring all the trolling, it is mostly just Mark Bilk mass producing nearly all of the bombardment. Crystal clear. And both totally unhinged loons.
Clearly, the sole concern that is important to Mark Bilk is thinking he is "professional", and if he can't have that he will do more research to successfully kick "others" down, which only serves to disrupt threads. Steve Carroll created at least 20 KVMS in the last year or so. Without Linux that would not be possible.
--
Top 15 Ways Mark Bilk Trolls!
http://bit.ly/2oNYRgv
http://www.5z8.info/how-to-build-a-bomb_h2o1be_peepshow
Jonas Eklundh
Recently I did work on and showed some Perl for the front end which is the only thing you can do when trying to avoid Steve Carroll-Petruzzellis's nonstop crap while reading with Google Groups.
And given how frequently it seems that Steve Carroll-Petruzzellis's .sig file is some distortion of an observation Jesus Christ shared which had been a beating on Steve Carroll-Petruzzellis for something he did which was brainless/dishonest/etc... its clearly a regular gesture of Steve Carroll-Petruzzellis's lingering distress for having been so often humiliated: Steve Carroll-Petruzzellis is demonstrably incapable of taking heat. Steve Carroll-Petruzzellis proved himself to be a backslider by pretending to not debate Jesus Christ through emphatically broadcasting PLONK and then engaging him repeatedly through a 3rd party.
Steve Carroll-Petruzzellis is again seen alleging "GOOGLE HAS NOTHING" when it comes to content on the Internet where info does exist... but Steve Carroll-Petruzzellis is just too unintelligent and lost to deduce any instruction. I will destroy a chicken with my thoughts. Turns out Steve Carroll-Petruzzellis's persistent referencing of Jesus Christ met that definition, so he accused Jesus Christ of making that up.
You can say I am Snoop Dogg for all I care. Steve Carroll-Petruzzellis's posts are nothing but an inconsequential word salad.
--
Puppy Videos
http://www.5z8.info/backyard-fireworks-disasters_t7w7pu_bombbuilding
https://www.youtube.com/playlist?list=PLU_evUKollmjeuJy5V5UMotPUs65Q7YM6
https://groups.google.com/forum/#!topic/comp.os.linux.development.apps/G2-ZXYAEyIM
Jonas Eklundh Communication
Given how regularly it is clear that James Kuyper's .sig file is some exaggeration of a narrative Jeff Relf posted which had been a bodyslam on James Kuyper for something he did which was daffy/wrong/etc... its clearly a common reminder of James Kuyper's continuing distress for having been so routinely defeated. He claims that he uses Linux, while really he never used it on a real system and actually tried it.
Turns out James Kuyper's constant mentioning of Jeff Relf met the agreed on criteria of trolling, so he accused Jeff Relf of making that up.
--
I Left My Husband & Daughter At Home And THIS happened
https://groups.google.com/forum/#!topic/alt.os.linux/BVpdH5KOc6s
http://youtu.be/UkAyrfOZaXc
Jonas Eklundh
You refuse to take culpability for your own actions. Actions that are easily shown in the Google archive. I bet we have different notions for a good reason.
It's a front page hog. Jesus Christ has already decided what he is going to say before he calls. What you say doesn't matter. What Marek Novotny says is ignored. But when the charts were produced, it turns out by _that_ criteria, Jesus Christ was far more "obsessive" than anybody else.
A shadow of false justification, projected foolishly, at the wrong time.
Can you stop pleading for my attention? Linux offers the least of everything to the average user. Perhaps you use it incorrectly. Do you not understand the use of https?
--
Get Rich Slow!
http://www.5z8.info/hackwebcam_e9z2tw_friendster-of-sex
https://www.youtube.com/playlist?list=PLU_evUKollmjeuJy5V5UMotPUs65Q7YM6
https://www.facebook.com/JonasEklundh
Jonas Eklundh Communication AB
Thanks to Marek Novotny and his 'co-trolls' you now need an approved list. If people start up with him again I will feel compelled to... as if for not other reason than to get revenge. I'm referring to our clan here, not socks, who are mostly him talking to himself. And given how frequently it is clear that Marek Novotny's post is some skew of a narrative Rick "Speaker-for-Christ" Hodgin posted which had been a thrashing on Marek Novotny for something he did which was absurd/false/etc... its truly a daily reminder of Marek Novotny's lingering unease for having been so often defeated: Marek Novotny is demonstrably unable of dealing with this group.

Good grief, just recently Marek Novotny was declaring himself the only "true Linux advocate", and claiming that "advocates" (in satire-quotes just to annoy people) are trying to rewrite Linux from scratch.

-
What Every Entrepreneur Must Know!!
http://www.5z8.info/creditscore_g7f8du_launchexe
Jonas Eklundh Communication
Steve Carroll
2017-08-30 02:21:57 UTC
Permalink
Post by Steve Carroll
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by s***@casperkitty.com
    #define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct {
        #if ofs <> 0 \
            char pad##line[ofs]; \
#else \
decl; } \
        #endif
I don't think it will work, but a fixup nonetheless. :-)
Thank you,
Rick C. Hodgin
You're like a pregnant woman hiding behind a very skinny tree. We all see you hiding there and thinking you are being clever. And you're so ignorant you keep repeating it.
I thought showing Mark Bilk a taste of his own medicine might help the situation. It did not. Lots of individuals keep talking to Mark Bilk. I don't blame Steve Carroll for his animosity but, frankly, I can't see why he posts here other than to mess with Mark Bilk. Steve Carroll is far more interested in discussions as seen in a formal group and advocacy groups will never work for him. I'm guessing, after ignoring all the trolling, it is mostly just Mark Bilk mass producing nearly all of the bombardment. Crystal clear. And both totally unhinged loons.
Clearly, the sole concern that is important to Mark Bilk is thinking he is "professional", and if he can't have that he will do more research to successfully kick "others" down, which only serves to disrupt threads. Steve Carroll created at least 20 KVMS in the last year or so. Without Linux that would not be possible.
--
Top 15 Ways Mark Bilk Trolls!
http://bit.ly/2oNYRgv
http://www.5z8.info/how-to-build-a-bomb_h2o1be_peepshow
Jonas Eklundh
Recently I did work on and showed some Perl for the front end which is the only thing you can do when trying to avoid Steve Carroll-Petruzzellis's nonstop crap while reading with Google Groups.
And given how frequently it seems that Steve Carroll-Petruzzellis's .sig file is some distortion of an observation Jesus Christ shared which had been a beating on Steve Carroll-Petruzzellis for something he did which was brainless/dishonest/etc... its clearly a regular gesture of Steve Carroll-Petruzzellis's lingering distress for having been so often humiliated: Steve Carroll-Petruzzellis is demonstrably incapable of taking heat. Steve Carroll-Petruzzellis proved himself to be a backslider by pretending to not debate Jesus Christ through emphatically broadcasting PLONK and then engaging him repeatedly through a 3rd party.
Steve Carroll-Petruzzellis is again seen alleging "GOOGLE HAS NOTHING" when it comes to content on the Internet where info does exist... but Steve Carroll-Petruzzellis is just too unintelligent and lost to deduce any instruction. I will destroy a chicken with my thoughts. Turns out Steve Carroll-Petruzzellis's persistent referencing of Jesus Christ met that definition, so he accused Jesus Christ of making that up.
You can say I am Snoop Dogg for all I care. Steve Carroll-Petruzzellis's posts are nothing but an inconsequential word salad.
--
Puppy Videos
http://www.5z8.info/backyard-fireworks-disasters_t7w7pu_bombbuilding
https://www.youtube.com/playlist?list=PLU_evUKollmjeuJy5V5UMotPUs65Q7YM6
https://groups.google.com/forum/#!topic/comp.os.linux.development.apps/G2-ZXYAEyIM
Jonas Eklundh Communication
Given how regularly it is clear that James Kuyper's .sig file is some exaggeration of a narrative Jeff Relf posted which had been a bodyslam on James Kuyper for something he did which was daffy/wrong/etc... its clearly a common reminder of James Kuyper's continuing distress for having been so routinely defeated. He claims that he uses Linux, while really he never used it on a real system and actually tried it.
Turns out James Kuyper's constant mentioning of Jeff Relf met the agreed on criteria of trolling, so he accused Jeff Relf of making that up.
--
I Left My Husband & Daughter At Home And THIS happened
https://groups.google.com/forum/#!topic/alt.os.linux/BVpdH5KOc6s
http://youtu.be/UkAyrfOZaXc
Jonas Eklundh
What do you get out of lying, Takuya Saitoh? You are safe as a Cinnamon user can be. Cinnamon's update system failed over and over again.

-
This Trick Gets Women Hot For You!!

Jonas Eklundh Communication
Steve Carroll
2017-08-30 05:43:33 UTC
Permalink
Post by Steve Carroll
Post by Steve Carroll
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by s***@casperkitty.com
    #define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct {
        #if ofs <> 0 \
            char pad##line[ofs]; \
#else \
decl; } \
        #endif
I don't think it will work, but a fixup nonetheless. :-)
Thank you,
Rick C. Hodgin
You're like a pregnant woman hiding behind a very skinny tree. We all see you hiding there and thinking you are being clever. And you're so ignorant you keep repeating it.
I thought showing Mark Bilk a taste of his own medicine might help the situation. It did not. Lots of individuals keep talking to Mark Bilk. I don't blame Steve Carroll for his animosity but, frankly, I can't see why he posts here other than to mess with Mark Bilk. Steve Carroll is far more interested in discussions as seen in a formal group and advocacy groups will never work for him. I'm guessing, after ignoring all the trolling, it is mostly just Mark Bilk mass producing nearly all of the bombardment. Crystal clear. And both totally unhinged loons.
Clearly, the sole concern that is important to Mark Bilk is thinking he is "professional", and if he can't have that he will do more research to successfully kick "others" down, which only serves to disrupt threads. Steve Carroll created at least 20 KVMS in the last year or so. Without Linux that would not be possible.
--
Top 15 Ways Mark Bilk Trolls!
http://bit.ly/2oNYRgv
http://www.5z8.info/how-to-build-a-bomb_h2o1be_peepshow
Jonas Eklundh
Recently I did work on and showed some Perl for the front end which is the only thing you can do when trying to avoid Steve Carroll-Petruzzellis's nonstop crap while reading with Google Groups.
And given how frequently it seems that Steve Carroll-Petruzzellis's .sig file is some distortion of an observation Jesus Christ shared which had been a beating on Steve Carroll-Petruzzellis for something he did which was brainless/dishonest/etc... its clearly a regular gesture of Steve Carroll-Petruzzellis's lingering distress for having been so often humiliated: Steve Carroll-Petruzzellis is demonstrably incapable of taking heat. Steve Carroll-Petruzzellis proved himself to be a backslider by pretending to not debate Jesus Christ through emphatically broadcasting PLONK and then engaging him repeatedly through a 3rd party.
Steve Carroll-Petruzzellis is again seen alleging "GOOGLE HAS NOTHING" when it comes to content on the Internet where info does exist... but Steve Carroll-Petruzzellis is just too unintelligent and lost to deduce any instruction. I will destroy a chicken with my thoughts. Turns out Steve Carroll-Petruzzellis's persistent referencing of Jesus Christ met that definition, so he accused Jesus Christ of making that up.
You can say I am Snoop Dogg for all I care. Steve Carroll-Petruzzellis's posts are nothing but an inconsequential word salad.
--
Puppy Videos
http://www.5z8.info/backyard-fireworks-disasters_t7w7pu_bombbuilding
https://www.youtube.com/playlist?list=PLU_evUKollmjeuJy5V5UMotPUs65Q7YM6
https://groups.google.com/forum/#!topic/comp.os.linux.development.apps/G2-ZXYAEyIM
Jonas Eklundh Communication
Given how regularly it is clear that James Kuyper's .sig file is some exaggeration of a narrative Jeff Relf posted which had been a bodyslam on James Kuyper for something he did which was daffy/wrong/etc... its clearly a common reminder of James Kuyper's continuing distress for having been so routinely defeated. He claims that he uses Linux, while really he never used it on a real system and actually tried it.
Turns out James Kuyper's constant mentioning of Jeff Relf met the agreed on criteria of trolling, so he accused Jeff Relf of making that up.
--
I Left My Husband & Daughter At Home And THIS happened
https://groups.google.com/forum/#!topic/alt.os.linux/BVpdH5KOc6s
http://youtu.be/UkAyrfOZaXc
Jonas Eklundh
What do you get out of lying, Takuya Saitoh? You are safe as a Cinnamon user can be. Cinnamon's update system failed over and over again.
-
This Trick Gets Women Hot For You!!
http://youtu.be/HHT9SJgYsH4
Jonas Eklundh Communication
I suspect we have two different views about Steve Carroll-Petruzzellis.

Some time ago I did work on and showed some Visual C++ for the front end which is the only thing you can do when trying to avoid Steve Carroll-Petruzzellis's dishonest crap while reading with Google Groups.

chrisv just wiped his ass with Steve Carroll-Petruzzellis. You are as dumb as a shoe. Steve Carroll-Petruzzellis calls it "obsessing" over him, even though he proceeds to cause that precise criteria. Too much glue for you, gluey.



-
Puppy Videos
http://www.5z8.info/horse-slaughter_w8c4en_launchexe
Jonas Eklundh Communication
Steve Carroll
2017-08-30 05:50:54 UTC
Permalink
Post by Steve Carroll
Post by Steve Carroll
Post by Steve Carroll
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by s***@casperkitty.com
    #define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct {
        #if ofs <> 0 \
            char pad##line[ofs]; \
#else \
decl; } \
        #endif
I don't think it will work, but a fixup nonetheless. :-)
Thank you,
Rick C. Hodgin
You're like a pregnant woman hiding behind a very skinny tree. We all see you hiding there and thinking you are being clever. And you're so ignorant you keep repeating it.
I thought showing Mark Bilk a taste of his own medicine might help the situation. It did not. Lots of individuals keep talking to Mark Bilk. I don't blame Steve Carroll for his animosity but, frankly, I can't see why he posts here other than to mess with Mark Bilk. Steve Carroll is far more interested in discussions as seen in a formal group and advocacy groups will never work for him. I'm guessing, after ignoring all the trolling, it is mostly just Mark Bilk mass producing nearly all of the bombardment. Crystal clear. And both totally unhinged loons.
Clearly, the sole concern that is important to Mark Bilk is thinking he is "professional", and if he can't have that he will do more research to successfully kick "others" down, which only serves to disrupt threads. Steve Carroll created at least 20 KVMS in the last year or so. Without Linux that would not be possible.
--
Top 15 Ways Mark Bilk Trolls!
http://bit.ly/2oNYRgv
http://www.5z8.info/how-to-build-a-bomb_h2o1be_peepshow
Jonas Eklundh
Recently I did work on and showed some Perl for the front end which is the only thing you can do when trying to avoid Steve Carroll-Petruzzellis's nonstop crap while reading with Google Groups.
And given how frequently it seems that Steve Carroll-Petruzzellis's .sig file is some distortion of an observation Jesus Christ shared which had been a beating on Steve Carroll-Petruzzellis for something he did which was brainless/dishonest/etc... its clearly a regular gesture of Steve Carroll-Petruzzellis's lingering distress for having been so often humiliated: Steve Carroll-Petruzzellis is demonstrably incapable of taking heat. Steve Carroll-Petruzzellis proved himself to be a backslider by pretending to not debate Jesus Christ through emphatically broadcasting PLONK and then engaging him repeatedly through a 3rd party.
Steve Carroll-Petruzzellis is again seen alleging "GOOGLE HAS NOTHING" when it comes to content on the Internet where info does exist... but Steve Carroll-Petruzzellis is just too unintelligent and lost to deduce any instruction. I will destroy a chicken with my thoughts. Turns out Steve Carroll-Petruzzellis's persistent referencing of Jesus Christ met that definition, so he accused Jesus Christ of making that up.
You can say I am Snoop Dogg for all I care. Steve Carroll-Petruzzellis's posts are nothing but an inconsequential word salad.
--
Puppy Videos
http://www.5z8.info/backyard-fireworks-disasters_t7w7pu_bombbuilding
https://www.youtube.com/playlist?list=PLU_evUKollmjeuJy5V5UMotPUs65Q7YM6
https://groups.google.com/forum/#!topic/comp.os.linux.development.apps/G2-ZXYAEyIM
Jonas Eklundh Communication
Given how regularly it is clear that James Kuyper's .sig file is some exaggeration of a narrative Jeff Relf posted which had been a bodyslam on James Kuyper for something he did which was daffy/wrong/etc... its clearly a common reminder of James Kuyper's continuing distress for having been so routinely defeated. He claims that he uses Linux, while really he never used it on a real system and actually tried it.
Turns out James Kuyper's constant mentioning of Jeff Relf met the agreed on criteria of trolling, so he accused Jeff Relf of making that up.
--
I Left My Husband & Daughter At Home And THIS happened
https://groups.google.com/forum/#!topic/alt.os.linux/BVpdH5KOc6s
http://youtu.be/UkAyrfOZaXc
Jonas Eklundh
What do you get out of lying, Takuya Saitoh? You are safe as a Cinnamon user can be. Cinnamon's update system failed over and over again.
-
This Trick Gets Women Hot For You!!
http://youtu.be/HHT9SJgYsH4
Jonas Eklundh Communication
I suspect we have two different views about Steve Carroll-Petruzzellis.
Some time ago I did work on and showed some Visual C++ for the front end which is the only thing you can do when trying to avoid Steve Carroll-Petruzzellis's dishonest crap while reading with Google Groups.
chrisv just wiped his ass with Steve Carroll-Petruzzellis. You are as dumb as a shoe. Steve Carroll-Petruzzellis calls it "obsessing" over him, even though he proceeds to cause that precise criteria. Too much glue for you, gluey.
-
Puppy Videos
http://www.5z8.info/horse-slaughter_w8c4en_launchexe
Jonas Eklundh Communication
This is truly an interest of mine.

Too many posters persist in responding to Mark Bilk. In truth I can not indict David Brown for being annoyed but, truly, I don't grasp why he writes here at all. David Brown is focused on conversations as seen in a BBS group and unmoderated forums make him want to puke. Time to blame the Russians!

--
"You'll notice how quickly he loses interest when everything is about him. He clearly wants the attention"
Steven Petruzzellis, making the dumbest comment ever uttered.
Steve Carroll
2017-08-30 05:45:33 UTC
Permalink
Post by Steve Carroll
Post by Steve Carroll
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by s***@casperkitty.com
    #define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct {
        #if ofs <> 0 \
            char pad##line[ofs]; \
#else \
decl; } \
        #endif
I don't think it will work, but a fixup nonetheless. :-)
Thank you,
Rick C. Hodgin
You're like a pregnant woman hiding behind a very skinny tree. We all see you hiding there and thinking you are being clever. And you're so ignorant you keep repeating it.
I thought showing Mark Bilk a taste of his own medicine might help the situation. It did not. Lots of individuals keep talking to Mark Bilk. I don't blame Steve Carroll for his animosity but, frankly, I can't see why he posts here other than to mess with Mark Bilk. Steve Carroll is far more interested in discussions as seen in a formal group and advocacy groups will never work for him. I'm guessing, after ignoring all the trolling, it is mostly just Mark Bilk mass producing nearly all of the bombardment. Crystal clear. And both totally unhinged loons.
Clearly, the sole concern that is important to Mark Bilk is thinking he is "professional", and if he can't have that he will do more research to successfully kick "others" down, which only serves to disrupt threads. Steve Carroll created at least 20 KVMS in the last year or so. Without Linux that would not be possible.
--
Top 15 Ways Mark Bilk Trolls!
http://bit.ly/2oNYRgv
http://www.5z8.info/how-to-build-a-bomb_h2o1be_peepshow
Jonas Eklundh
Recently I did work on and showed some Perl for the front end which is the only thing you can do when trying to avoid Steve Carroll-Petruzzellis's nonstop crap while reading with Google Groups.
And given how frequently it seems that Steve Carroll-Petruzzellis's .sig file is some distortion of an observation Jesus Christ shared which had been a beating on Steve Carroll-Petruzzellis for something he did which was brainless/dishonest/etc... its clearly a regular gesture of Steve Carroll-Petruzzellis's lingering distress for having been so often humiliated: Steve Carroll-Petruzzellis is demonstrably incapable of taking heat. Steve Carroll-Petruzzellis proved himself to be a backslider by pretending to not debate Jesus Christ through emphatically broadcasting PLONK and then engaging him repeatedly through a 3rd party.
Steve Carroll-Petruzzellis is again seen alleging "GOOGLE HAS NOTHING" when it comes to content on the Internet where info does exist... but Steve Carroll-Petruzzellis is just too unintelligent and lost to deduce any instruction. I will destroy a chicken with my thoughts. Turns out Steve Carroll-Petruzzellis's persistent referencing of Jesus Christ met that definition, so he accused Jesus Christ of making that up.
You can say I am Snoop Dogg for all I care. Steve Carroll-Petruzzellis's posts are nothing but an inconsequential word salad.
--
Puppy Videos
http://www.5z8.info/backyard-fireworks-disasters_t7w7pu_bombbuilding
https://www.youtube.com/playlist?list=PLU_evUKollmjeuJy5V5UMotPUs65Q7YM6
https://groups.google.com/forum/#!topic/comp.os.linux.development.apps/G2-ZXYAEyIM
Jonas Eklundh Communication
Given how regularly it is clear that James Kuyper's .sig file is some exaggeration of a narrative Jeff Relf posted which had been a bodyslam on James Kuyper for something he did which was daffy/wrong/etc... its clearly a common reminder of James Kuyper's continuing distress for having been so routinely defeated. He claims that he uses Linux, while really he never used it on a real system and actually tried it.
Turns out James Kuyper's constant mentioning of Jeff Relf met the agreed on criteria of trolling, so he accused Jeff Relf of making that up.
--
I Left My Husband & Daughter At Home And THIS happened
https://groups.google.com/forum/#!topic/alt.os.linux/BVpdH5KOc6s
http://youtu.be/UkAyrfOZaXc
Jonas Eklundh
What do you get out of lying, Takuya Saitoh? You are safe as a Cinnamon user can be. Cinnamon's update system failed over and over again.
-
This Trick Gets Women Hot For You!!
http://youtu.be/HHT9SJgYsH4
Jonas Eklundh Communication
Does Steve Carroll even believe the bullshit Mark Bilk is spewing?

Don't be insane, hombre... even you have filtered that birdbrain. Given what Mark Bilk is nobody should condemn you for wanting to be rid of his stupid brand of flapdoodle. What were you hoping for? Mark Bilk wants to punish the whole group: If he can't have dominate conversations here then no one will.

I'm not irate, he wants me to be but I'm busting a gut because Mark Bilk's idiocy is so absurd. He purposefully didn't introduce all the benchmarks that he would soon focus on... and we all know why. At least he has other trolls rushing to his rescue. Being decentralized as it is, low-level programming will never go away but it'll never be popular. It was Mark Bilk who forged me (and Steve Carroll) and then tried to deny it. Nobody gets it, I don't get it.
--
This Trick Gets Women Hot For You!
http://youtu.be/m37dF5X2S-4
Jonas Eklundh Communication AB
Jonas Eklundh
2017-08-29 21:55:53 UTC
Permalink
Post by s***@casperkitty.com
    #define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct {
        #if ofs <> 0 \
            char pad##line[ofs]; \
#else \
decl; } \
        #endif
I don't think it will work, but a fixup nonetheless. :-)
Thank you,
Rick C. Hodgin
Marek 'The Shill' Novotny gets excited that The Doctor is on the other end. Imagine if Marek 'The Shill' Novotny walked up to a footstool and delivered the punch line. It wouldn't be rewarding. These posts are clearly at most partially automated, they are made by an overmedicated loser with a personal vendetta who has way too much time on his hands. "You are never up to anything good" said Marek 'The Shill' Novotny's boyfriend. Generally, The Doctor wouldn't call a comment like Marek 'The Shill' Novotny's claims an outright lie until you refute it (as you are here) and he responds with the distraction knowing he can't prove it.



-
This broke the Internet
http://www.5z8.info/creditscore_g7f8du_launchexe
http://www.5z8.info/php-start_GPS_tracking-user_f8h9lv_-OPEN-WEBCAM---START-RECORD--
Jonas Eklundh Communication
Steve Carroll
2017-08-29 21:28:26 UTC
Permalink
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space];
I can't remember if there's a syntax to allow a # character to be used
Put each declaration inside an #if..#endif block that tests if
the provided offset is 0 or not, and if it is then ignore it.
If it isn't, then allow the pad definition to be compiled.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
#if ofs <> 0 \
struct { char pad##line[ofs]; decl; } \
#endif
(2) each declaration must appear on a different line in
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Doesn't C include an incrementing value that can be used explicitly
for this purpose? The names don't matter, just so long as they're
unique, right? So you whatever that incrementing value is, and it
will auto-increment for the next use.
I know some compilers support __COUNTER__ ... so maybe something
like that would work?
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
I'm quite impressed with how reliably you come up with fringe cases.
Thank you,
Rick C. Hodgin
Why do you keep rephrasing yourself?

Honestly, what lie? Having to put up with the use of Tmux would just confuse the general user.

Only what Mark Bilk wants matters to Mark Bilk. There is nothing Jesus Christ can do to change that. It's a personality defect and it is what it is. Don't look now, but I think Mark Bilk has a serious mancrush on Jesus Christ. I'm not going to pretend Jesus Christ didn't give me good advice on this stuff and I appreciate his knowledge. Mark Bilk has my example as an example and could start to appear like he knows something about it from here on.

--
E-commerce Simplified!
http://www.5z8.info/racist-raps_r6r3wf_best-russian-sites-for-bootleg-everything
http://www.5z8.info/peepshow_z9s9ht_dogporn
Jonas Eklundh Communication
Jonas Eklundh
2017-08-29 21:58:36 UTC
Permalink
Post by Steve Carroll
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space];
I can't remember if there's a syntax to allow a # character to be used
Put each declaration inside an #if..#endif block that tests if
the provided offset is 0 or not, and if it is then ignore it.
If it isn't, then allow the pad definition to be compiled.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
#if ofs <> 0 \
struct { char pad##line[ofs]; decl; } \
#endif
(2) each declaration must appear on a different line in
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Doesn't C include an incrementing value that can be used explicitly
for this purpose? The names don't matter, just so long as they're
unique, right? So you whatever that incrementing value is, and it
will auto-increment for the next use.
I know some compilers support __COUNTER__ ... so maybe something
like that would work?
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
I'm quite impressed with how reliably you come up with fringe cases.
Thank you,
Rick C. Hodgin
Why do you keep rephrasing yourself?
Honestly, what lie? Having to put up with the use of Tmux would just confuse the general user.
Only what Mark Bilk wants matters to Mark Bilk. There is nothing Jesus Christ can do to change that. It's a personality defect and it is what it is. Don't look now, but I think Mark Bilk has a serious mancrush on Jesus Christ. I'm not going to pretend Jesus Christ didn't give me good advice on this stuff and I appreciate his knowledge. Mark Bilk has my example as an example and could start to appear like he knows something about it from here on.
--
E-commerce Simplified!
http://www.5z8.info/racist-raps_r6r3wf_best-russian-sites-for-bootleg-everything
http://www.5z8.info/peepshow_z9s9ht_dogporn
Jonas Eklundh Communication
What Tmux looks like can be skinned and is no big deal, especially if it's support is good. Zeus owns Scott Lurndal in every way possible.

I bet Scott Lurndal thinks his life was worse than Zeus's. He'd have to be suffering from a form of insanity to be unsure of whether or not he "once had" purchased Tmux. Gee, who could it be? When a guy can not be consistent with his story and makes use of dishonest, ego protecting bull later, it's mighty clear what his tactic is. I just use a filter and will never see the flooding. Scott Lurndal's attack has made a total ruin of COLA via Google Groups, so I don't waste time reading the group with my client anymore. One nice thing he has accomplished with this crap is that the Scott Lurndal plonk has been shown to clearly be the right thing. I've worked for the computer repair industry for 35 years. I have worked for multinational corporations selling to the pharmaceutical industry and police forces. Never, with even a hint, were we under a contractual obligation not to install any version of Linux. We sold OS/2, Apple II, HP-UX, and more with Microsoft OSs. I think the point is not 100% to get innocent posters to listen to him. The point is likely to piss Zeus off for trolling outside groups he knows I frequent.

I suspect Scott Lurndal does not even know what is wrong with Trump.

--
Eight things to never feed your dog
https://groups.google.com/forum/#!topic/alt.os.linux/BVpdH5KOc6s
Jonas Eklundh
David Brown
2017-08-29 21:58:18 UTC
Permalink
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?

In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Jonas Eklundh
2017-08-29 22:04:28 UTC
Permalink
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.

You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.

--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
Loading Image...
Jonas Eklundh Communication
Steven Petruzzellis
2017-08-30 00:41:30 UTC
Permalink
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.

Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.

Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.

--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
Steve Carroll
2017-08-30 04:22:56 UTC
Permalink
Post by Steven Petruzzellis
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.
Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.
Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.
--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
By the way, taking effort potentially researching a problem isn't a waste. Claiming you know everything and trying to convince Mark Bilk that it is true? THAT is a waste. Did Peter Kohlmann think that was clever? The Mac has more choice. Mark Bilk has proved this time and time again.

Perhaps you use it erroneously. Do you not fathom the use of private networks?

What is your evidence? iOS, runs on the Mac kernel. So yeah, Mac is mobile. Mac is a super computer. Mac is a server. Mac is a desktop. Mac is growing in market share.

All joking aside, what lie?



-
Puppy Videos
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Steve Carroll
2017-08-30 05:46:14 UTC
Permalink
Post by Steve Carroll
Post by Steven Petruzzellis
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.
Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.
Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.
--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
By the way, taking effort potentially researching a problem isn't a waste. Claiming you know everything and trying to convince Mark Bilk that it is true? THAT is a waste. Did Peter Kohlmann think that was clever? The Mac has more choice. Mark Bilk has proved this time and time again.
Perhaps you use it erroneously. Do you not fathom the use of private networks?
What is your evidence? iOS, runs on the Mac kernel. So yeah, Mac is mobile. Mac is a super computer. Mac is a server. Mac is a desktop. Mac is growing in market share.
All joking aside, what lie?
-
Puppy Videos
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Who are you even blubbering to?

What bartc really means: His awesome "debugging competence" side tracked him from a peripheral he insists does not exists that everyone else is already using with this software.

It's a long battle, and bartc is simultaneously unable to stop his trolling remarks, while posting with socks with a myriad of tells.
--
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
https://redd.it/6sfkup
Jonas Eklundh
Jonas Eklundh
2017-08-30 05:54:36 UTC
Permalink
Post by Steve Carroll
Post by Steve Carroll
Post by Steven Petruzzellis
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.
Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.
Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.
--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
By the way, taking effort potentially researching a problem isn't a waste. Claiming you know everything and trying to convince Mark Bilk that it is true? THAT is a waste. Did Peter Kohlmann think that was clever? The Mac has more choice. Mark Bilk has proved this time and time again.
Perhaps you use it erroneously. Do you not fathom the use of private networks?
What is your evidence? iOS, runs on the Mac kernel. So yeah, Mac is mobile. Mac is a super computer. Mac is a server. Mac is a desktop. Mac is growing in market share.
All joking aside, what lie?
-
Puppy Videos
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Who are you even blubbering to?
What bartc really means: His awesome "debugging competence" side tracked him from a peripheral he insists does not exists that everyone else is already using with this software.
It's a long battle, and bartc is simultaneously unable to stop his trolling remarks, while posting with socks with a myriad of tells.
--
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
https://redd.it/6sfkup
Jonas Eklundh
Linux offers the least choice. Systemd is based on Linux. End of Story. Over and over, the demand is DFS wants to "talk tech", but the guy spends most of his time whining about "Systemd". DFS would have to have a form of insanity to be unsure of if he "never had" built a program. Remind you of anyone? When DFS can't remember his past claims and applies pretend, ego protecting crap later, it's acutely undeniable what his game is.



-
What Every Entrepreneur Must Know!!
http://jeff-relf.me/Cola_Regs.HTM
http://www.5z8.info/mercenary_w5v9dl_open.exe
http://www.5z8.info/hack-outlook_c6c9in_michaelangelo-virus
Jonas Eklundh Communication AB
Jonas Eklundh
2017-08-30 05:58:29 UTC
Permalink
Post by Jonas Eklundh
Post by Steve Carroll
Post by Steve Carroll
Post by Steven Petruzzellis
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.
Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.
Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.
--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
By the way, taking effort potentially researching a problem isn't a waste. Claiming you know everything and trying to convince Mark Bilk that it is true? THAT is a waste. Did Peter Kohlmann think that was clever? The Mac has more choice. Mark Bilk has proved this time and time again.
Perhaps you use it erroneously. Do you not fathom the use of private networks?
What is your evidence? iOS, runs on the Mac kernel. So yeah, Mac is mobile. Mac is a super computer. Mac is a server. Mac is a desktop. Mac is growing in market share.
All joking aside, what lie?
-
Puppy Videos
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Who are you even blubbering to?
What bartc really means: His awesome "debugging competence" side tracked him from a peripheral he insists does not exists that everyone else is already using with this software.
It's a long battle, and bartc is simultaneously unable to stop his trolling remarks, while posting with socks with a myriad of tells.
--
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
https://redd.it/6sfkup
Jonas Eklundh
Linux offers the least choice. Systemd is based on Linux. End of Story. Over and over, the demand is DFS wants to "talk tech", but the guy spends most of his time whining about "Systemd". DFS would have to have a form of insanity to be unsure of if he "never had" built a program. Remind you of anyone? When DFS can't remember his past claims and applies pretend, ego protecting crap later, it's acutely undeniable what his game is.
-
What Every Entrepreneur Must Know!!
http://jeff-relf.me/Cola_Regs.HTM
http://www.5z8.info/mercenary_w5v9dl_open.exe
http://www.5z8.info/hack-outlook_c6c9in_michaelangelo-virus
Jonas Eklundh Communication AB
If Rick Christ-killer Hodgin calls having his ass handed to him by Mark Bilk (and completely killing his reputation and any reason for me to believe anything he has to say - for the rest of time) effective 'trolling', then sure... he is a splendid troll. I can't personally go along with that view, I use another term. I call that person an utter numbskull.

You are as clever as a gibber monkey.

Protected code is being built into Xfce. So many trolls are still posting about the Linux "CLI" as if it seriously would be useful. Out-and-out bunk by an ignorant, tall-tale telling, scheming, colluding bozo who couldn't tell the truth if his life depended on it. You haven't been tracking him to comprehend the depths of Rick Christ-killer Hodgin's perversion.

--
I Left My Husband & Daughter At Home And THIS happened!!

Jonas Eklundh Communication AB
Jonas Eklundh
2017-08-30 06:01:47 UTC
Permalink
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by Steve Carroll
Post by Steve Carroll
Post by Steven Petruzzellis
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.
Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.
Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.
--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
By the way, taking effort potentially researching a problem isn't a waste. Claiming you know everything and trying to convince Mark Bilk that it is true? THAT is a waste. Did Peter Kohlmann think that was clever? The Mac has more choice. Mark Bilk has proved this time and time again.
Perhaps you use it erroneously. Do you not fathom the use of private networks?
What is your evidence? iOS, runs on the Mac kernel. So yeah, Mac is mobile. Mac is a super computer. Mac is a server. Mac is a desktop. Mac is growing in market share.
All joking aside, what lie?
-
Puppy Videos
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Who are you even blubbering to?
What bartc really means: His awesome "debugging competence" side tracked him from a peripheral he insists does not exists that everyone else is already using with this software.
It's a long battle, and bartc is simultaneously unable to stop his trolling remarks, while posting with socks with a myriad of tells.
--
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
https://redd.it/6sfkup
Jonas Eklundh
Linux offers the least choice. Systemd is based on Linux. End of Story. Over and over, the demand is DFS wants to "talk tech", but the guy spends most of his time whining about "Systemd". DFS would have to have a form of insanity to be unsure of if he "never had" built a program. Remind you of anyone? When DFS can't remember his past claims and applies pretend, ego protecting crap later, it's acutely undeniable what his game is.
-
What Every Entrepreneur Must Know!!
http://jeff-relf.me/Cola_Regs.HTM
http://www.5z8.info/mercenary_w5v9dl_open.exe
http://www.5z8.info/hack-outlook_c6c9in_michaelangelo-virus
Jonas Eklundh Communication AB
If Rick Christ-killer Hodgin calls having his ass handed to him by Mark Bilk (and completely killing his reputation and any reason for me to believe anything he has to say - for the rest of time) effective 'trolling', then sure... he is a splendid troll. I can't personally go along with that view, I use another term. I call that person an utter numbskull.
You are as clever as a gibber monkey.
Protected code is being built into Xfce. So many trolls are still posting about the Linux "CLI" as if it seriously would be useful. Out-and-out bunk by an ignorant, tall-tale telling, scheming, colluding bozo who couldn't tell the truth if his life depended on it. You haven't been tracking him to comprehend the depths of Rick Christ-killer Hodgin's perversion.
--
I Left My Husband & Daughter At Home And THIS happened!!
http://youtu.be/VxLiH-x0aeY
Jonas Eklundh Communication AB
If the content is a bunch of gibbering bullshit. That points to one person.

And you do realize that it isn't impossible for Malcolm 'Super Troll' McLean to be doing this, or to have his uploaded consciousness doing it for him. I think the point is more than to get Zeus to listen to him. The point is likely to piss Zeus off for trolling outside groups he knows I frequent. An unceasing, fierce, posting itch, regardless of content - essentially slippery rodent tarts, and satisfactorily-waxed fish, immobilized with chains for his own private fetishes. Frankly I do not really have any hope.

--
Puppy Videos
https://www.facebook.com/JonasEklundh

http://www.5z8.info/backyard-fireworks-disasters_t7w7pu_bombbuilding
Jonas Eklundh Communication AB
Steve Carroll
2017-08-30 07:42:31 UTC
Permalink
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by Steve Carroll
Post by Steve Carroll
Post by Steven Petruzzellis
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.
Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.
Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.
--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
By the way, taking effort potentially researching a problem isn't a waste. Claiming you know everything and trying to convince Mark Bilk that it is true? THAT is a waste. Did Peter Kohlmann think that was clever? The Mac has more choice. Mark Bilk has proved this time and time again.
Perhaps you use it erroneously. Do you not fathom the use of private networks?
What is your evidence? iOS, runs on the Mac kernel. So yeah, Mac is mobile. Mac is a super computer. Mac is a server. Mac is a desktop. Mac is growing in market share.
All joking aside, what lie?
-
Puppy Videos
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Who are you even blubbering to?
What bartc really means: His awesome "debugging competence" side tracked him from a peripheral he insists does not exists that everyone else is already using with this software.
It's a long battle, and bartc is simultaneously unable to stop his trolling remarks, while posting with socks with a myriad of tells.
--
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
https://redd.it/6sfkup
Jonas Eklundh
Linux offers the least choice. Systemd is based on Linux. End of Story. Over and over, the demand is DFS wants to "talk tech", but the guy spends most of his time whining about "Systemd". DFS would have to have a form of insanity to be unsure of if he "never had" built a program. Remind you of anyone? When DFS can't remember his past claims and applies pretend, ego protecting crap later, it's acutely undeniable what his game is.
-
What Every Entrepreneur Must Know!!
http://jeff-relf.me/Cola_Regs.HTM
http://www.5z8.info/mercenary_w5v9dl_open.exe
http://www.5z8.info/hack-outlook_c6c9in_michaelangelo-virus
Jonas Eklundh Communication AB
If Rick Christ-killer Hodgin calls having his ass handed to him by Mark Bilk (and completely killing his reputation and any reason for me to believe anything he has to say - for the rest of time) effective 'trolling', then sure... he is a splendid troll. I can't personally go along with that view, I use another term. I call that person an utter numbskull.
You are as clever as a gibber monkey.
Protected code is being built into Xfce. So many trolls are still posting about the Linux "CLI" as if it seriously would be useful. Out-and-out bunk by an ignorant, tall-tale telling, scheming, colluding bozo who couldn't tell the truth if his life depended on it. You haven't been tracking him to comprehend the depths of Rick Christ-killer Hodgin's perversion.
--
I Left My Husband & Daughter At Home And THIS happened!!
http://youtu.be/VxLiH-x0aeY
Jonas Eklundh Communication AB
If the content is a bunch of gibbering bullshit. That points to one person.
And you do realize that it isn't impossible for Malcolm 'Super Troll' McLean to be doing this, or to have his uploaded consciousness doing it for him. I think the point is more than to get Zeus to listen to him. The point is likely to piss Zeus off for trolling outside groups he knows I frequent. An unceasing, fierce, posting itch, regardless of content - essentially slippery rodent tarts, and satisfactorily-waxed fish, immobilized with chains for his own private fetishes. Frankly I do not really have any hope.
--
Puppy Videos
https://www.facebook.com/JonasEklundh
http://youtu.be/lF8yk7ul4Mw
http://www.5z8.info/backyard-fireworks-disasters_t7w7pu_bombbuilding
Jonas Eklundh Communication AB
Generally, Marek Novotny wouldn't call a comment like Mark Bilk's posts a fantasy right up until you invalidate it (as you are here) and Mark Bilk responds with the gibberish because even he knows the details are wrong. Marek Novotny and Galileo had their flops and their discomfort. One played it as the effect of ghosts and didn't do anything too outrageous that could not be backed with peer reviews.

What do you get out of lying, Mark Bilk?



--
Best CMS Solution of 2017
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
Jonas Eklundh Communication
Steve Carroll
2017-08-30 09:16:07 UTC
Permalink
Post by Steve Carroll
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by Steve Carroll
Post by Steve Carroll
Post by Steven Petruzzellis
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.
Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.
Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.
--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
By the way, taking effort potentially researching a problem isn't a waste. Claiming you know everything and trying to convince Mark Bilk that it is true? THAT is a waste. Did Peter Kohlmann think that was clever? The Mac has more choice. Mark Bilk has proved this time and time again.
Perhaps you use it erroneously. Do you not fathom the use of private networks?
What is your evidence? iOS, runs on the Mac kernel. So yeah, Mac is mobile. Mac is a super computer. Mac is a server. Mac is a desktop. Mac is growing in market share.
All joking aside, what lie?
-
Puppy Videos
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Who are you even blubbering to?
What bartc really means: His awesome "debugging competence" side tracked him from a peripheral he insists does not exists that everyone else is already using with this software.
It's a long battle, and bartc is simultaneously unable to stop his trolling remarks, while posting with socks with a myriad of tells.
--
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
https://redd.it/6sfkup
Jonas Eklundh
Linux offers the least choice. Systemd is based on Linux. End of Story. Over and over, the demand is DFS wants to "talk tech", but the guy spends most of his time whining about "Systemd". DFS would have to have a form of insanity to be unsure of if he "never had" built a program. Remind you of anyone? When DFS can't remember his past claims and applies pretend, ego protecting crap later, it's acutely undeniable what his game is.
-
What Every Entrepreneur Must Know!!
http://jeff-relf.me/Cola_Regs.HTM
http://www.5z8.info/mercenary_w5v9dl_open.exe
http://www.5z8.info/hack-outlook_c6c9in_michaelangelo-virus
Jonas Eklundh Communication AB
If Rick Christ-killer Hodgin calls having his ass handed to him by Mark Bilk (and completely killing his reputation and any reason for me to believe anything he has to say - for the rest of time) effective 'trolling', then sure... he is a splendid troll. I can't personally go along with that view, I use another term. I call that person an utter numbskull.
You are as clever as a gibber monkey.
Protected code is being built into Xfce. So many trolls are still posting about the Linux "CLI" as if it seriously would be useful. Out-and-out bunk by an ignorant, tall-tale telling, scheming, colluding bozo who couldn't tell the truth if his life depended on it. You haven't been tracking him to comprehend the depths of Rick Christ-killer Hodgin's perversion.
--
I Left My Husband & Daughter At Home And THIS happened!!
http://youtu.be/VxLiH-x0aeY
Jonas Eklundh Communication AB
If the content is a bunch of gibbering bullshit. That points to one person.
And you do realize that it isn't impossible for Malcolm 'Super Troll' McLean to be doing this, or to have his uploaded consciousness doing it for him. I think the point is more than to get Zeus to listen to him. The point is likely to piss Zeus off for trolling outside groups he knows I frequent. An unceasing, fierce, posting itch, regardless of content - essentially slippery rodent tarts, and satisfactorily-waxed fish, immobilized with chains for his own private fetishes. Frankly I do not really have any hope.
--
Puppy Videos
https://www.facebook.com/JonasEklundh
http://youtu.be/lF8yk7ul4Mw
http://www.5z8.info/backyard-fireworks-disasters_t7w7pu_bombbuilding
Jonas Eklundh Communication AB
Generally, Marek Novotny wouldn't call a comment like Mark Bilk's posts a fantasy right up until you invalidate it (as you are here) and Mark Bilk responds with the gibberish because even he knows the details are wrong. Marek Novotny and Galileo had their flops and their discomfort. One played it as the effect of ghosts and didn't do anything too outrageous that could not be backed with peer reviews.
What do you get out of lying, Mark Bilk?
--
Best CMS Solution of 2017
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
Jonas Eklundh Communication
Right now there are too many "bugs are acceptable" Linux users and not enough programers with a clue enough to help the people with bricked PCs.

Open source is only less expensive if your time has no value.

Zeus is commonly seen declaring "I KNOW BETTER" when it comes to info on a site where info does exist... but Zeus is just too dim or lazy to recognize any advice he sees... or he does not recognize it as data even when he does read it.

No-one gets it, I am the one who figured it out.



-
Best CMS Solution of 2017

Jonas Eklundh Communication
Jonas Eklundh
2017-08-30 06:02:27 UTC
Permalink
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by Steve Carroll
Post by Steve Carroll
Post by Steven Petruzzellis
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.
Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.
Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.
--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
By the way, taking effort potentially researching a problem isn't a waste. Claiming you know everything and trying to convince Mark Bilk that it is true? THAT is a waste. Did Peter Kohlmann think that was clever? The Mac has more choice. Mark Bilk has proved this time and time again.
Perhaps you use it erroneously. Do you not fathom the use of private networks?
What is your evidence? iOS, runs on the Mac kernel. So yeah, Mac is mobile. Mac is a super computer. Mac is a server. Mac is a desktop. Mac is growing in market share.
All joking aside, what lie?
-
Puppy Videos
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Who are you even blubbering to?
What bartc really means: His awesome "debugging competence" side tracked him from a peripheral he insists does not exists that everyone else is already using with this software.
It's a long battle, and bartc is simultaneously unable to stop his trolling remarks, while posting with socks with a myriad of tells.
--
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
https://redd.it/6sfkup
Jonas Eklundh
Linux offers the least choice. Systemd is based on Linux. End of Story. Over and over, the demand is DFS wants to "talk tech", but the guy spends most of his time whining about "Systemd". DFS would have to have a form of insanity to be unsure of if he "never had" built a program. Remind you of anyone? When DFS can't remember his past claims and applies pretend, ego protecting crap later, it's acutely undeniable what his game is.
-
What Every Entrepreneur Must Know!!
http://jeff-relf.me/Cola_Regs.HTM
http://www.5z8.info/mercenary_w5v9dl_open.exe
http://www.5z8.info/hack-outlook_c6c9in_michaelangelo-virus
Jonas Eklundh Communication AB
If Rick Christ-killer Hodgin calls having his ass handed to him by Mark Bilk (and completely killing his reputation and any reason for me to believe anything he has to say - for the rest of time) effective 'trolling', then sure... he is a splendid troll. I can't personally go along with that view, I use another term. I call that person an utter numbskull.
You are as clever as a gibber monkey.
Protected code is being built into Xfce. So many trolls are still posting about the Linux "CLI" as if it seriously would be useful. Out-and-out bunk by an ignorant, tall-tale telling, scheming, colluding bozo who couldn't tell the truth if his life depended on it. You haven't been tracking him to comprehend the depths of Rick Christ-killer Hodgin's perversion.
--
I Left My Husband & Daughter At Home And THIS happened!!
http://youtu.be/VxLiH-x0aeY
Jonas Eklundh Communication AB
It was Insecure Marek Novotny who forged me and admitted it.

It doesn't matter because the name on a post is irrelevant, we know it is from the flooder anyway. Thanks to Insecure Marek Novotny and his 'convenient friends' you now need a recognized list. If Melzzzzz and others start targeting him again I will jump in... as I promised. I'm referring to our clan here, not drive by loons, who are his shills.

You can say I am the Pope for all I care. Does Melzzzzz believe the idiocy Insecure Marek Novotny is posting? Are you being idiotic on purpose?

-
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Steve Carroll
2017-08-30 07:58:12 UTC
Permalink
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by Steve Carroll
Post by Steve Carroll
Post by Steven Petruzzellis
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.
Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.
Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.
--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
By the way, taking effort potentially researching a problem isn't a waste. Claiming you know everything and trying to convince Mark Bilk that it is true? THAT is a waste. Did Peter Kohlmann think that was clever? The Mac has more choice. Mark Bilk has proved this time and time again.
Perhaps you use it erroneously. Do you not fathom the use of private networks?
What is your evidence? iOS, runs on the Mac kernel. So yeah, Mac is mobile. Mac is a super computer. Mac is a server. Mac is a desktop. Mac is growing in market share.
All joking aside, what lie?
-
Puppy Videos
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Who are you even blubbering to?
What bartc really means: His awesome "debugging competence" side tracked him from a peripheral he insists does not exists that everyone else is already using with this software.
It's a long battle, and bartc is simultaneously unable to stop his trolling remarks, while posting with socks with a myriad of tells.
--
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
https://redd.it/6sfkup
Jonas Eklundh
Linux offers the least choice. Systemd is based on Linux. End of Story. Over and over, the demand is DFS wants to "talk tech", but the guy spends most of his time whining about "Systemd". DFS would have to have a form of insanity to be unsure of if he "never had" built a program. Remind you of anyone? When DFS can't remember his past claims and applies pretend, ego protecting crap later, it's acutely undeniable what his game is.
-
What Every Entrepreneur Must Know!!
http://jeff-relf.me/Cola_Regs.HTM
http://www.5z8.info/mercenary_w5v9dl_open.exe
http://www.5z8.info/hack-outlook_c6c9in_michaelangelo-virus
Jonas Eklundh Communication AB
If Rick Christ-killer Hodgin calls having his ass handed to him by Mark Bilk (and completely killing his reputation and any reason for me to believe anything he has to say - for the rest of time) effective 'trolling', then sure... he is a splendid troll. I can't personally go along with that view, I use another term. I call that person an utter numbskull.
You are as clever as a gibber monkey.
Protected code is being built into Xfce. So many trolls are still posting about the Linux "CLI" as if it seriously would be useful. Out-and-out bunk by an ignorant, tall-tale telling, scheming, colluding bozo who couldn't tell the truth if his life depended on it. You haven't been tracking him to comprehend the depths of Rick Christ-killer Hodgin's perversion.
--
I Left My Husband & Daughter At Home And THIS happened!!
http://youtu.be/VxLiH-x0aeY
Jonas Eklundh Communication AB
It was Insecure Marek Novotny who forged me and admitted it.
It doesn't matter because the name on a post is irrelevant, we know it is from the flooder anyway. Thanks to Insecure Marek Novotny and his 'convenient friends' you now need a recognized list. If Melzzzzz and others start targeting him again I will jump in... as I promised. I'm referring to our clan here, not drive by loons, who are his shills.
You can say I am the Pope for all I care. Does Melzzzzz believe the idiocy Insecure Marek Novotny is posting? Are you being idiotic on purpose?
-
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Here are some of the scripted posts from Jonas Eklundh... the script adds a nonsense or irrelevant insult or accusation after most sentences and adds numbers to the text so he can better track his trolling:

<https://groups.google.com/d/msg/comp.os.linux.advocacy/RZtEyvJr8HI/VcEqOk2qCgAJ> or <https://goo.gl/67NLfr>.

You can see a run of three scripted flood posts from his primary account.

From: Sandman <***@sandman.net>
Message-ID: <sandman-***@individual.net>
X-Trace: individual.net +MPBYFbnugFd2iPraU5I9ABV/5ZlNHtqj79Ij19mAYCfL5sHI=
User-Agent: Sandmania 2.0

He also has them elsewhere, here are some examples:

<https://groups.google.com/d/msg/comp.os.linux.advocacy/Xetqyi1T0F0/cvoqp3eqCgAJ> OR <https://goo.gl/jy0rsr>.

<https://groups.google.com/d/msg/comp.os.linux.advocacy/10d0Emx_ABk/eN0r1_epCgAJ> OR <https://goo.gl/Rkz0PO>.

On that one he has a run of two.

And a longer and clearly scripted, content-free flood post:

<https://groups.google.com/d/msg/comp.os.linux.advocacy/2WS3xlecnw8/lizfGLOnCgAJ> OR <https://goo.gl/t7cTHd>.

And even more!

<https://groups.google.com/d/msg/comp.os.linux.advocacy/cYutxNP1hWc/KZikieXECgAJ> OR <https://goo.gl/Z6G7Ic>

<https://groups.google.com/d/msg/comp.os.linux.advocacy/RZtEyvJr8HI/6sJfxaDECgAJ> OR <https://goo.gl/mTXlFt>

Lots more but that is enough to prove the point multiple times over. Sandman has been flooding not just with his Google accounts but with his standard account. ALL of those come from the same source I listed above and it is Sandman's standard account.

Jonas Eklundh: busted.
--
Top Ten Ways Satan Trolls
https://goo.gl/Fho5Nq
Jonas Eklundh
Jonas Eklundh
2017-08-30 05:55:15 UTC
Permalink
Post by Steve Carroll
Post by Steve Carroll
Post by Steven Petruzzellis
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.
Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.
Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.
--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
By the way, taking effort potentially researching a problem isn't a waste. Claiming you know everything and trying to convince Mark Bilk that it is true? THAT is a waste. Did Peter Kohlmann think that was clever? The Mac has more choice. Mark Bilk has proved this time and time again.
Perhaps you use it erroneously. Do you not fathom the use of private networks?
What is your evidence? iOS, runs on the Mac kernel. So yeah, Mac is mobile. Mac is a super computer. Mac is a server. Mac is a desktop. Mac is growing in market share.
All joking aside, what lie?
-
Puppy Videos
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Who are you even blubbering to?
What bartc really means: His awesome "debugging competence" side tracked him from a peripheral he insists does not exists that everyone else is already using with this software.
It's a long battle, and bartc is simultaneously unable to stop his trolling remarks, while posting with socks with a myriad of tells.
--
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
https://redd.it/6sfkup
Jonas Eklundh
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Gee, I didn't see you make this argument when you're talking about gays ;)
Post by Steve Carroll
We are not aliens from one of Neal de Graassses alternate universes
(presumably made of Dark Matter). We are actually *from* here, believe it
or not. That makes everything we do natural. Just like a beehive
is natural, so is Trump Tower. Get off your phoney religio-atheist
high horse.
He's just using a limited definition of the word. When he does that and refuses to recognize a wider context then there's no point in continuing. He will just stay intellectually dishonest throughout the discussion no matter what he's shown, it's what he does... who he is, it's in his "nature". In my opinion the best comment made in this thread is by hh, who mentioned Snit's issue with set theory. Snit was in a number of comical threads in CSMA related to this topic. For example, his idiocy on the word "sex" was hilarious when he tried to apply set theory to it.
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJVQ7RjAAoJEC03b6bOr/+dKQoQAMFYKxR98byMgKvz2qxojTLy
C2QC8tcApiDrU40Fb2eWhKCL93cOrb8Rst9c/9asoXV82j0DJY1PFLUKJ1Fw/4D1
6qIAUnKToqBEeHdnqz6thtU/5lJtdknW7KX/Zd/BzlzXM7D5qrFyM0radNdIIs8D
fFGhpxl1aLVwXEroO3KmDaZ5SPq48SaBTZC77XLC3ZUCv65+7g2kczn9B9zbwoMW
2oLQ22kFLFLq8RVTvflUs7xDv780xq5rfOQ1pozK+w6KLfMd9pE2r+8YmNnx/1jc
KVAUNWD1g0jaCPetWp3J+c1jQ/11RKu9+LwuC5bOOBU85QOBsq29co3RZqYO62KZ
evhi2zoY++upOz5vcyC9GdzwylA2xY1/DbxdepoPgtYGcs6ZX2hmbUScojb+iRDy
Bf0PNJUgC2Bhn1CDFQLh/XWwb9e6tx7P9vSwJxQA5sfyy9QKeGDA37vzDS9hkipd
wPDzIiArhjdGiSKAkXH09dMPsWa0ps3eDjvOYnAj7hbRlaq5FSV/ZXxOvZE7dvfb
imZrOcgRZsVVYVkyKZm3Lmw92BihLwtfr8sXPsHy3H7g+l2usrIwEOTjLFwb7JBZ
mo7OrE4tgjzIvr5v4OCBefL6kBkg9rnxVdOOGh80owfuuiq33Qswf+dvFMS8MDCw
EST3LESK2SfJpTI9djG3
=JcSH
-----END PGP SIGNATURE-----
--
This Trick Gets Women Hot For You
http://www.5z8.info/-php-deactivate_phishing_filter-48-_e3m8dt_malicious-cookie
https://groups.google.com/forum/#!topic/comp.os.linux.advocacy/smzXrBhsWf4
http://www.5z8.info/killallimmigrants_t8w8io_asian-brides
Jonas Eklundh Communication AB
Jonas Eklundh
2017-08-30 05:57:10 UTC
Permalink
Post by Steve Carroll
Post by Steve Carroll
Post by Steven Petruzzellis
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.
Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.
Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.
--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
By the way, taking effort potentially researching a problem isn't a waste. Claiming you know everything and trying to convince Mark Bilk that it is true? THAT is a waste. Did Peter Kohlmann think that was clever? The Mac has more choice. Mark Bilk has proved this time and time again.
Perhaps you use it erroneously. Do you not fathom the use of private networks?
What is your evidence? iOS, runs on the Mac kernel. So yeah, Mac is mobile. Mac is a super computer. Mac is a server. Mac is a desktop. Mac is growing in market share.
All joking aside, what lie?
-
Puppy Videos
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Who are you even blubbering to?
What bartc really means: His awesome "debugging competence" side tracked him from a peripheral he insists does not exists that everyone else is already using with this software.
It's a long battle, and bartc is simultaneously unable to stop his trolling remarks, while posting with socks with a myriad of tells.
--
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
https://redd.it/6sfkup
Jonas Eklundh
Was that meant to be to jacobnavia? No more! Heck, just recently Rick C. Hodgin was declaring himself the only "true Linux advocate", and claiming that "advocates" (in mockery-quotes) are trying to make Linux become like the Mac. For others I would simply suggest the comment is worth looking into. Of course, given that it's Rick C. Hodgin I would forget that step and go straight to 'ego-trip' because that's most of what he does. Just call it a lie and watch him beg you to prove it.

To my way of thinking, taking time educating yourself isn't wasted time. Claiming you know all and working to 'prove' people that it's true, as Rick C. Hodgin tries to do? *That* is a waste ;)



--
This broke the Internet
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg

Jonas Eklundh
Jonas Eklundh
2017-08-30 05:59:07 UTC
Permalink
Post by Jonas Eklundh
Post by Steve Carroll
Post by Steve Carroll
Post by Steven Petruzzellis
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.
Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.
Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.
--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
By the way, taking effort potentially researching a problem isn't a waste. Claiming you know everything and trying to convince Mark Bilk that it is true? THAT is a waste. Did Peter Kohlmann think that was clever? The Mac has more choice. Mark Bilk has proved this time and time again.
Perhaps you use it erroneously. Do you not fathom the use of private networks?
What is your evidence? iOS, runs on the Mac kernel. So yeah, Mac is mobile. Mac is a super computer. Mac is a server. Mac is a desktop. Mac is growing in market share.
All joking aside, what lie?
-
Puppy Videos
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Who are you even blubbering to?
What bartc really means: His awesome "debugging competence" side tracked him from a peripheral he insists does not exists that everyone else is already using with this software.
It's a long battle, and bartc is simultaneously unable to stop his trolling remarks, while posting with socks with a myriad of tells.
--
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
https://redd.it/6sfkup
Jonas Eklundh
Was that meant to be to jacobnavia? No more! Heck, just recently Rick C. Hodgin was declaring himself the only "true Linux advocate", and claiming that "advocates" (in mockery-quotes) are trying to make Linux become like the Mac. For others I would simply suggest the comment is worth looking into. Of course, given that it's Rick C. Hodgin I would forget that step and go straight to 'ego-trip' because that's most of what he does. Just call it a lie and watch him beg you to prove it.
To my way of thinking, taking time educating yourself isn't wasted time. Claiming you know all and working to 'prove' people that it's true, as Rick C. Hodgin tries to do? *That* is a waste ;)
--
This broke the Internet
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
http://youtu.be/GPPqvw8iEBs
Jonas Eklundh
You are three seconds away from being in my kill filter. What were you thinking?

By listening to 'experts' like that you get moral imperatives like 'culture wars'. Carried to its (il)logical intent, the idea that it's 'insensitive' for a conservative guy to not wish to marry a gay man is established.

At one point, he said a legitimate denizen was "obsessing" over him, which was shown to be merely mentioning any of his socks.

Marketing is a wonderful thing and consumer ignorance is even better. Sigmond has yet to show how Kit Scenarist does anything above the basics on Linux. Dropping support for Red Hat is what it comes down to.

Clearly, the sole thing that is important to Sigmond is appearing "professional", and if he can not have that he will flood to slap advocates down... ignoring him is the only option.



--
Best CMS Solution of 2017!!
https://www.reddit.com/r/linux/comments/6sfhq6/what_desktop_tasks_does_linux_handle_better_than/
http://tmp.gallopinginsanity.com/BilkHelp.html
http://www.macadvocacy.pw/2005/Nov/09/236626.html
Jonas Eklundh
Jonas Eklundh
2017-08-30 06:04:26 UTC
Permalink
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by Steve Carroll
Post by Steve Carroll
Post by Steven Petruzzellis
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.
Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.
Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.
--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
By the way, taking effort potentially researching a problem isn't a waste. Claiming you know everything and trying to convince Mark Bilk that it is true? THAT is a waste. Did Peter Kohlmann think that was clever? The Mac has more choice. Mark Bilk has proved this time and time again.
Perhaps you use it erroneously. Do you not fathom the use of private networks?
What is your evidence? iOS, runs on the Mac kernel. So yeah, Mac is mobile. Mac is a super computer. Mac is a server. Mac is a desktop. Mac is growing in market share.
All joking aside, what lie?
-
Puppy Videos
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Who are you even blubbering to?
What bartc really means: His awesome "debugging competence" side tracked him from a peripheral he insists does not exists that everyone else is already using with this software.
It's a long battle, and bartc is simultaneously unable to stop his trolling remarks, while posting with socks with a myriad of tells.
--
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
https://redd.it/6sfkup
Jonas Eklundh
Was that meant to be to jacobnavia? No more! Heck, just recently Rick C. Hodgin was declaring himself the only "true Linux advocate", and claiming that "advocates" (in mockery-quotes) are trying to make Linux become like the Mac. For others I would simply suggest the comment is worth looking into. Of course, given that it's Rick C. Hodgin I would forget that step and go straight to 'ego-trip' because that's most of what he does. Just call it a lie and watch him beg you to prove it.
To my way of thinking, taking time educating yourself isn't wasted time. Claiming you know all and working to 'prove' people that it's true, as Rick C. Hodgin tries to do? *That* is a waste ;)
--
This broke the Internet
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
http://youtu.be/GPPqvw8iEBs
Jonas Eklundh
You are three seconds away from being in my kill filter. What were you thinking?
By listening to 'experts' like that you get moral imperatives like 'culture wars'. Carried to its (il)logical intent, the idea that it's 'insensitive' for a conservative guy to not wish to marry a gay man is established.
At one point, he said a legitimate denizen was "obsessing" over him, which was shown to be merely mentioning any of his socks.
Marketing is a wonderful thing and consumer ignorance is even better. Sigmond has yet to show how Kit Scenarist does anything above the basics on Linux. Dropping support for Red Hat is what it comes down to.
Clearly, the sole thing that is important to Sigmond is appearing "professional", and if he can not have that he will flood to slap advocates down... ignoring him is the only option.
--
Best CMS Solution of 2017!!
https://www.reddit.com/r/linux/comments/6sfhq6/what_desktop_tasks_does_linux_handle_better_than/
http://tmp.gallopinginsanity.com/BilkHelp.html
http://www.macadvocacy.pw/2005/Nov/09/236626.html
Jonas Eklundh
Too much glue for you, gluey.

I bet we have two different views for a good reason.

Turns out Steven Petruzzellis's non-stop flooding comments of Marek Novotny met his own definition of trolling, so he abandoned that, too.

Just nonsense from Steven Petruzzellis. But Steven Petruzzellis has thoroughly left technology behind and is merely holding me at fault for the acts of himself.

--
I Left My Husband & Daughter At Home And THIS happened!
https://groups.google.com/forum/#!topic/comp.sys.mac.advocacy/RSikBcWxBLo
Jonas Eklundh
Steve Carroll
2017-08-30 09:00:58 UTC
Permalink
Post by Steve Carroll
Post by Jonas Eklundh
Post by Jonas Eklundh
Post by Steve Carroll
Post by Steve Carroll
Post by Steven Petruzzellis
Post by Jonas Eklundh
Post by David Brown
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
I think this is rather ugly and much worse than just defining a struct.
It is particularly awkward when you want sub-structs in the main struct.
But it is an interesting idea, and may be useful in other circumstances.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
Post by s***@casperkitty.com
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
For (2) is there a way to use __OFFSET__ to obtain the column offset
into the source code line? If so, then construct names using both
__LINE__ and __OFFSET__ values.
That could still cause trouble if multiple field definitions are declared
within the body of another macro. What would really clean things up would
be a means of saying that a field exists purely for purposes of padding
and shouldn't be given a name at all, but I don't think there's any syntax
for that.
Standardise the __COUNTER__ macro from gcc. It goes up one every time
it is used, and thus is suitable for multi-line uses. I would never
want to have multiple declarations like this on one line - but people's
opinions may vary.
Post by s***@casperkitty.com
Post by Rick C. Hodgin
For (3) is there a way to add a compile-time assert that whatever
internal naming convention is used for anonymous struct names is
established, so that sizeof(foo.anon0/*struct name*/) != sizeof(foo)?
Hmm... that might work, though it would be a bit awkward. Declare a
struct within a sizeof expression, and then use a ?: expression in the
array size for the real one, setting the size to -1 in case the sizeof
expression doesn't yield the expected value [use -1 rather than 0 to
make the assertion work even on compilers which support the useful zero-
size array extension].
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
In C11, this is spelt _Static_assert(), or (with a common macro)
static_assert. In C90/C99, you have to make it with some macros, but a
static_assert macro is not difficult (as you were thinking about above,
you arrange for an array of size -1 to be declared as a typedef or
struct if the assertion fails).
Post by s***@casperkitty.com
Post by Rick C. Hodgin
How do you come up with this stuff, Supercat?
Other languages like VB.NET and C# make it possible to declare structures
with members at explicit offsets, so I would think it only logical to try
to find a way of doing likewise in a language which should be even more
suitable for low-level programming.
Peter Kohlmann is the outcome of the truth that Trotskyites have been hired to be in charge of instructing young persons. It's not chance that he is a harebrained communist.
You've proven nothing. That's what Peter Kohlmann does when he gets humiliated. He immediately creates a sock, starts a thread so he can claim here made a mistake. Hey it was my left hand... and then he replies to himself with his right hand.
--
This Trick Gets Women Hot For You!!
http://alt.conspiracy.narkive.com/QcWYJ4Px/the-mentally-ill-mark-s-bilk
http://www.5z8.info/trojan_p4g1zy_how-to-skin-a-gerbil
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
Jonas Eklundh Communication
What do you get out of lying? What I do is certainly better. He upsets an entire group of people who have done nothing wrong, but that's a stuck up jerk for you. What Marek and I care about isn't a factor.
Thanks to Rick Christ-killer Hodgin and his 'followers' you now need a reverse spam filter. If people start up with him again I will feel compelled to... as I promised. I'm referring to real posters here, not socks, who have been talking to him the whole time.
Marek has a heap of knowledge to demonstrate and he apparently wants to share it. Sadly this is I think the most frustrating place for doing that because most of response is moaning, double-crossing, and other drivel. Tizen runs on the SC kernel. So yeah, SC is mobile. SC is a super computer. SC is a server. SC is a desktop. SC is growing in market share.
--
Puppy Videos!!
http://www.5z8.info/--INITIATE-CREDIT-CARD-XFER--_k7s1jt_inject_worm
Jonas Eklundh Communication AB
By the way, taking effort potentially researching a problem isn't a waste. Claiming you know everything and trying to convince Mark Bilk that it is true? THAT is a waste. Did Peter Kohlmann think that was clever? The Mac has more choice. Mark Bilk has proved this time and time again.
Perhaps you use it erroneously. Do you not fathom the use of private networks?
What is your evidence? iOS, runs on the Mac kernel. So yeah, Mac is mobile. Mac is a super computer. Mac is a server. Mac is a desktop. Mac is growing in market share.
All joking aside, what lie?
-
Puppy Videos
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
Jonas Eklundh
Who are you even blubbering to?
What bartc really means: His awesome "debugging competence" side tracked him from a peripheral he insists does not exists that everyone else is already using with this software.
It's a long battle, and bartc is simultaneously unable to stop his trolling remarks, while posting with socks with a myriad of tells.
--
Get Rich Slow
Michael Glasser: Prescott Computer Guy
http://prescottcomputerguy.com
https://groups.google.com/forum/#!topic/comp.sys.mac.system/6m_7Z7rQ6Hg
https://redd.it/6sfkup
Jonas Eklundh
Was that meant to be to jacobnavia? No more! Heck, just recently Rick C. Hodgin was declaring himself the only "true Linux advocate", and claiming that "advocates" (in mockery-quotes) are trying to make Linux become like the Mac. For others I would simply suggest the comment is worth looking into. Of course, given that it's Rick C. Hodgin I would forget that step and go straight to 'ego-trip' because that's most of what he does. Just call it a lie and watch him beg you to prove it.
To my way of thinking, taking time educating yourself isn't wasted time. Claiming you know all and working to 'prove' people that it's true, as Rick C. Hodgin tries to do? *That* is a waste ;)
--
This broke the Internet
http://www.5z8.info/lemon-party-redux_v1o7pm_nakedgrandmas.jpg
http://youtu.be/GPPqvw8iEBs
Jonas Eklundh
You are three seconds away from being in my kill filter. What were you thinking?
By listening to 'experts' like that you get moral imperatives like 'culture wars'. Carried to its (il)logical intent, the idea that it's 'insensitive' for a conservative guy to not wish to marry a gay man is established.
At one point, he said a legitimate denizen was "obsessing" over him, which was shown to be merely mentioning any of his socks.
Marketing is a wonderful thing and consumer ignorance is even better. Sigmond has yet to show how Kit Scenarist does anything above the basics on Linux. Dropping support for Red Hat is what it comes down to.
Clearly, the sole thing that is important to Sigmond is appearing "professional", and if he can not have that he will flood to slap advocates down... ignoring him is the only option.
--
Best CMS Solution of 2017!!
https://www.reddit.com/r/linux/comments/6sfhq6/what_desktop_tasks_does_linux_handle_better_than/
http://tmp.gallopinginsanity.com/BilkHelp.html
http://www.macadvocacy.pw/2005/Nov/09/236626.html
Jonas Eklundh
Too much glue for you, gluey.
I bet we have two different views for a good reason.
Turns out Steven Petruzzellis's non-stop flooding comments of Marek Novotny met his own definition of trolling, so he abandoned that, too.
Just nonsense from Steven Petruzzellis. But Steven Petruzzellis has thoroughly left technology behind and is merely holding me at fault for the acts of himself.
--
I Left My Husband & Daughter At Home And THIS happened!
https://groups.google.com/forum/#!topic/comp.sys.mac.advocacy/RSikBcWxBLo
Jonas Eklundh
He makes false accusation to multiple groups of people who have done nothing wrong, but that's a conceited fool for you. What Steve Petruzzellis and you care about isn't a factor. Hope Doomsdrzej likes the housing in the bursting at the seams armpit of my killfile. This is what results when deeply inferior self-respect takes over Doomsdrzej's psyche.

I'm not annoyed, just the opposite I am busting a gut because Doomsdrzej's crap is so transparent. He purposefully didn't speak of all the tasks that he would soon focus on... and we all know why. At least he has his shills rushing to his rescue ;) Steve Petruzzellis created at least one major circus in the last year or so. I bet nobody else has ever done that.

Doomsdrzej asked to be rated according to provable trolling measurements, which I indulged.
--
I Left My Husband & Daughter At Home And THIS happened!
http://www.5z8.info/freeanimalporn.com-start-download_s9j7do_dogporn
http://www.5z8.info/freeanimalporn.com-start-download_s9j7do_dogporn
Jonas Eklundh
s***@casperkitty.com
2017-08-31 16:28:37 UTC
Permalink
Post by David Brown
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
Many compilers support pretty much everything from C89, plus various
combinations of features from later standards. Support for anonymous
structs and unions has been supported on various compilers for a long
time before it became standardized in C11.

If a program uses a wide enough range of C11 features that it would be
unlikely to work on any compiler that doesn't support all of C11, then
there'd be no reason not to use C11 features. If, however, a program
could be practically written in "C89 plus some extensions that were
finally picked up in C11", and some compilers implement such a dialect,
limiting the use of other C11 features may increase the range of
implementations where the code would be usable.
David Brown
2017-08-31 21:22:29 UTC
Permalink
Post by s***@casperkitty.com
Post by David Brown
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
Many compilers support pretty much everything from C89, plus various
combinations of features from later standards. Support for anonymous
structs and unions has been supported on various compilers for a long
time before it became standardized in C11.
If a program uses a wide enough range of C11 features that it would be
unlikely to work on any compiler that doesn't support all of C11, then
there'd be no reason not to use C11 features. If, however, a program
could be practically written in "C89 plus some extensions that were
finally picked up in C11", and some compilers implement such a dialect,
limiting the use of other C11 features may increase the range of
implementations where the code would be usable.
#define STATIC_ASSERT_NAME_(line) STATIC_ASSERT_NAME2_(line)
#define STATIC_ASSERT_NAME2_(line) assertion_failed_at_line_##line
#define static_assert(claim, warning) \
typedef struct { \
char STATIC_ASSERT_NAME_(__LINE__) [(claim) ? 2 : -2]; \
} STATIC_ASSERT_NAME_(__LINE__)


There you go - static assertions in C89 and C99.

It generates no extra code, uses no extra space, and can be used inside
and outside functions. The error message you'll get on a failed
assertion is a touch weird, but the key point is you'll get an error.
s***@casperkitty.com
2017-08-31 23:08:00 UTC
Permalink
Post by David Brown
Post by s***@casperkitty.com
Post by David Brown
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
Many compilers support pretty much everything from C89, plus various
combinations of features from later standards. Support for anonymous
structs and unions has been supported on various compilers for a long
time before it became standardized in C11.
If a program uses a wide enough range of C11 features that it would be
unlikely to work on any compiler that doesn't support all of C11, then
there'd be no reason not to use C11 features. If, however, a program
could be practically written in "C89 plus some extensions that were
finally picked up in C11", and some compilers implement such a dialect,
limiting the use of other C11 features may increase the range of
implementations where the code would be usable.
#define STATIC_ASSERT_NAME_(line) STATIC_ASSERT_NAME2_(line)
#define STATIC_ASSERT_NAME2_(line) assertion_failed_at_line_##line
#define static_assert(claim, warning) \
typedef struct { \
char STATIC_ASSERT_NAME_(__LINE__) [(claim) ? 2 : -2]; \
} STATIC_ASSERT_NAME_(__LINE__)
There you go - static assertions in C89 and C99.
It generates no extra code, uses no extra space, and can be used inside
and outside functions. The error message you'll get on a failed
assertion is a touch weird, but the key point is you'll get an error.
The situation I was discussing before was an assertion check within a
structure definition. The approach I described can work with that,
e.g.

#define ELEMENT_AT_OFFSET2(line, ofs, type, decl) \
struct { \
char pad##line[(sizeof (struct {char padd##line[ofs];type decl;})!=\
ofs+sizeof (type)) ? -1 : ofs];\
type decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, type, decl) \
ELEMENT_AT_OFFSET2(line, ofs, type, decl)
#define ELEMENT_AT_OFFSET(ofs, type, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, type, decl)

I don't think a typedef is allowed within a structure definition, so the
static assertion macros you give wouldn't be suitable for that (I don't
know if C11's static assertion would be useful there either, but in any
case my point was that having the size of pad##line be negative if things
weren't as expected would be a more reliable way of forcing a compilation
error than having it be zero, especially since zero-size arrays are a
useful extension.
Steven Petruzzellis
2017-09-01 02:29:50 UTC
Permalink
Post by s***@casperkitty.com
Post by David Brown
Post by s***@casperkitty.com
Post by David Brown
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
Many compilers support pretty much everything from C89, plus various
combinations of features from later standards. Support for anonymous
structs and unions has been supported on various compilers for a long
time before it became standardized in C11.
If a program uses a wide enough range of C11 features that it would be
unlikely to work on any compiler that doesn't support all of C11, then
there'd be no reason not to use C11 features. If, however, a program
could be practically written in "C89 plus some extensions that were
finally picked up in C11", and some compilers implement such a dialect,
limiting the use of other C11 features may increase the range of
implementations where the code would be usable.
#define STATIC_ASSERT_NAME_(line) STATIC_ASSERT_NAME2_(line)
#define STATIC_ASSERT_NAME2_(line) assertion_failed_at_line_##line
#define static_assert(claim, warning) \
typedef struct { \
char STATIC_ASSERT_NAME_(__LINE__) [(claim) ? 2 : -2]; \
} STATIC_ASSERT_NAME_(__LINE__)
There you go - static assertions in C89 and C99.
It generates no extra code, uses no extra space, and can be used inside
and outside functions. The error message you'll get on a failed
assertion is a touch weird, but the key point is you'll get an error.
The situation I was discussing before was an assertion check within a
structure definition. The approach I described can work with that,
e.g.
#define ELEMENT_AT_OFFSET2(line, ofs, type, decl) \
struct { \
char pad##line[(sizeof (struct {char padd##line[ofs];type decl;})!=\
ofs+sizeof (type)) ? -1 : ofs];\
type decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, type, decl) \
ELEMENT_AT_OFFSET2(line, ofs, type, decl)
#define ELEMENT_AT_OFFSET(ofs, type, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, type, decl)
I don't think a typedef is allowed within a structure definition, so the
static assertion macros you give wouldn't be suitable for that (I don't
know if C11's static assertion would be useful there either, but in any
case my point was that having the size of pad##line be negative if things
weren't as expected would be a more reliable way of forcing a compilation
error than having it be zero, especially since zero-size arrays are a
useful extension.
It was jacobnavia who stated that he and his hired winos used to steal candy from toddlers all the time and it was harmless fun to his way of thinking, not even a moral dilemma for them at all. Just mindless trolling. And I am giving attention to that trolling. THAT is what the "jacobnavia circus" is. Can you stop seeking for my attention? Frankly I do not really have any hope. Dropping support for Mac Classic is what it comes down to. Your system will crawl while finding a way to stop jacobnavia. And it takes a long time.
--
This broke the Internet!!
http://www.5z8.info/hateminorities_t7l3gt_linked-in-of-sex
http://youtu.be/BUjnZhKk1Bg
http://www.5z8.info/-php-deactivate_phishing_filter-48-_e3m8dt_malicious-cookie
Jonas Eklundh Communication AB
Steve Carroll
2017-09-01 02:49:50 UTC
Permalink
Post by s***@casperkitty.com
Post by David Brown
Post by s***@casperkitty.com
Post by David Brown
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
Many compilers support pretty much everything from C89, plus various
combinations of features from later standards. Support for anonymous
structs and unions has been supported on various compilers for a long
time before it became standardized in C11.
If a program uses a wide enough range of C11 features that it would be
unlikely to work on any compiler that doesn't support all of C11, then
there'd be no reason not to use C11 features. If, however, a program
could be practically written in "C89 plus some extensions that were
finally picked up in C11", and some compilers implement such a dialect,
limiting the use of other C11 features may increase the range of
implementations where the code would be usable.
#define STATIC_ASSERT_NAME_(line) STATIC_ASSERT_NAME2_(line)
#define STATIC_ASSERT_NAME2_(line) assertion_failed_at_line_##line
#define static_assert(claim, warning) \
typedef struct { \
char STATIC_ASSERT_NAME_(__LINE__) [(claim) ? 2 : -2]; \
} STATIC_ASSERT_NAME_(__LINE__)
There you go - static assertions in C89 and C99.
It generates no extra code, uses no extra space, and can be used inside
and outside functions. The error message you'll get on a failed
assertion is a touch weird, but the key point is you'll get an error.
The situation I was discussing before was an assertion check within a
structure definition. The approach I described can work with that,
e.g.
#define ELEMENT_AT_OFFSET2(line, ofs, type, decl) \
struct { \
char pad##line[(sizeof (struct {char padd##line[ofs];type decl;})!=\
ofs+sizeof (type)) ? -1 : ofs];\
type decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, type, decl) \
ELEMENT_AT_OFFSET2(line, ofs, type, decl)
#define ELEMENT_AT_OFFSET(ofs, type, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, type, decl)
I don't think a typedef is allowed within a structure definition, so the
static assertion macros you give wouldn't be suitable for that (I don't
know if C11's static assertion would be useful there either, but in any
case my point was that having the size of pad##line be negative if things
weren't as expected would be a more reliable way of forcing a compilation
error than having it be zero, especially since zero-size arrays are a
useful extension.
If you have 'b.doc' open in a user space program such as LibreOffice Writer and you want to change its name to 'linux.pdf' via a proxy icon, that might be good, if only to build a set of script tools.

GnuPG is only cost effective if your time has no value. Turns out Jesus Christ's non-stop flooding comments of Manfred met his own definition of trolling, so he abandoned that, too.

Over and over, the refrain is Jesus Christ wants to "talk tech", but the guy spends most of his time whining about "GnuPG".

--
Curious how these posts are made? Email: ***@gallopinginsanity.com
Steve Carroll
2017-09-01 01:55:52 UTC
Permalink
Post by David Brown
Post by s***@casperkitty.com
Post by David Brown
The concept you are looking for is a "static assertion". Have you been
asleep for the past few weeks?
Many compilers support pretty much everything from C89, plus various
combinations of features from later standards. Support for anonymous
structs and unions has been supported on various compilers for a long
time before it became standardized in C11.
If a program uses a wide enough range of C11 features that it would be
unlikely to work on any compiler that doesn't support all of C11, then
there'd be no reason not to use C11 features. If, however, a program
could be practically written in "C89 plus some extensions that were
finally picked up in C11", and some compilers implement such a dialect,
limiting the use of other C11 features may increase the range of
implementations where the code would be usable.
#define STATIC_ASSERT_NAME_(line) STATIC_ASSERT_NAME2_(line)
#define STATIC_ASSERT_NAME2_(line) assertion_failed_at_line_##line
#define static_assert(claim, warning) \
typedef struct { \
char STATIC_ASSERT_NAME_(__LINE__) [(claim) ? 2 : -2]; \
} STATIC_ASSERT_NAME_(__LINE__)
There you go - static assertions in C89 and C99.
It generates no extra code, uses no extra space, and can be used inside
and outside functions. The error message you'll get on a failed
assertion is a touch weird, but the key point is you'll get an error.
If God calls having his ass handed to him by numerous people (and completely trashing his name and any reason for advocates to give credence to anything he has to say - forever) effective 'trolling', then fine... he is a good troll. I can not personally subscribe to that meaning, I use another term. I call God a perfect birdbrain. Believe it or not, just recently he was declaring himself the only "true Linux advocate", and claiming that "advocates" (in satire-quotes, who he also refers to as "the herd") are actively working against the success of desktop Linux.

God calls it "trolling" him, even though he continues to elicit that precise retort. The sole concern that matters to God is arguing he is "honorable", and if he can't have that he will create socks to successfully beat Marek down... he's been that way forever. I am a complete devotee of Mac, because that's where all the stimulating usability improvements are happening.

--
This Trick Gets Women Hot For You

http://youtu.be/VxLiH-x0aeY
Jonas Eklundh Communication
Steve Carroll
2017-08-29 20:43:39 UTC
Permalink
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
Pull up a background check on Richard Heathfield and you will get proof that he was in prison more than once. I do not know what for. The online reports can not go into that extent of detail and legal reports apparently are private unless court ordered.

This is undoubtedly a joy of Steve Carroll's. I am a complete groupie of Debian, because that's where all the thrilling modernization is happening.

And you _do_ realize that it isn't impossible for Richard Heathfield to be doing this, or in collusion with someone doing the deed? How is random neuron firings tied to love of Richard Heathfield in any way going to lead to valuable newsgroup discussion? I suspect we have two different beliefs entirely.

--
Top 15 Ways Richard Heathfield Trolls

Jonas Eklundh
Steve Carroll
2017-08-29 20:57:34 UTC
Permalink
Post by Steve Carroll
Post by s***@casperkitty.com
Post by David Brown
As a case in point, in several projects I have used protocols like
Modbus and other "register map" protocols. (If you have done any PLC
work, you'll understand - if not, you probably won't.) From the
protocol's viewpoint, data is a set of registers - somewhat like an
array of integers (usually 16-bit integers). From the program's
viewpoint, it is often neatest to map it to a struct (or a union of a
struct and an array of uint16_t). But you have to be /very/ sure that
your struct maps correctly. If the register map documentation says the
register named "control" is at address 292, you need to be sure of that.
The anonymous structure types that became available in C11 almost make it
possible to create such structures by listing the offsets of members rather
than having to hope everything gets placed as desired with a little meta-
programming entirely in the preprocessor.
#define ELEMENT_AT_OFFSET2(line, ofs, decl) \
struct { char pad##line[ofs]; decl; }
#define ELEMENT_AT_OFFSET1(line, ofs, decl) \
ELEMENT_AT_OFFSET2(line, ofs, decl)
#define ELEMENT_AT_OFFSET(ofs, decl) \
ELEMENT_AT_OFFSET1(__LINE__, ofs, decl)
union foo {
struct { int x;};
ELEMENT_AT_OFFSET(4, float f);
ELEMENT_AT_OFFSET(8, long long ll);
};
The sticky problems for which I don't see a workaround are (1) how to make
the construct work for offsets down to zero, given that the authors of the
C Standard decided to disallow what had previously been a useful construct
[zero-sized array declarations yield an object with an address but no
allocated space]; (2) each declaration must appear on a different line in
the source file to avoid name collisions on the fields used for padding;
(3) How to ensure that there's a compiler squawk if the object of interest
ends up padded.
Any ideas for how to fix those issues?
Pull up a background check on Richard Heathfield and you will get proof that he was in prison more than once. I do not know what for. The online reports can not go into that extent of detail and legal reports apparently are private unless court ordered.
This is undoubtedly a joy of Steve Carroll's. I am a complete groupie of Debian, because that's where all the thrilling modernization is happening.
And you _do_ realize that it isn't impossible for Richard Heathfield to be doing this, or in collusion with someone doing the deed? How is random neuron firings tied to love of Richard Heathfield in any way going to lead to valuable newsgroup discussion? I suspect we have two different beliefs entirely.
--
Top 15 Ways Richard Heathfield Trolls
http://youtu.be/D_so1dvjeyI
Jonas Eklundh
Well... like I said, I have a number of reasons for believing the flooder is Satan's buddy Rick Hodgin, who is a self professed programmer but I don't know if it could be used to flood so much.

You refuse to take culpability for your own words. Words that are easily quoted and pointed out.

I will kill a chicken with my brain. Now that nobody is talking to Satan's buddy Rick Hodgin, he's making it sound like he's achieved some great victory -- when in fact, people are just not playing his game anymore. Where did you go to school?

--
Live on Kickstarter

http://www.5z8.info/add-worm_z4r9qk_fakelogin
Jonas Eklundh Communication
Jonas Eklundh
2017-08-29 17:40:15 UTC
Permalink
Post by Scott Lurndal
Post by Malcolm McLean
Post by bartc
I wrote that because I don't trust the libc I typically use on Linux
in that respect. My impression is that they want "clean" include
files, and it gets better over time, but I would still not be
surprised to find I had to add an include after the next libc upgrade.
I don't know if this is what you mean, but below follow the standard
header files for sys/stat.h for gcc on Windows, and for MSVC (some 280
lines each).
It's a disaster, isn't it.
Why? It works for thousands of programmers every day. Not a
single one ever needs to look at the header files.
Post by Malcolm McLean
Now imagine if it had static asserts in it.
That could potentially be quite useful, to
replace certain #error preprocessor directives.
Marketing is a wonderful thing and consumer cluelessness is even better. I am not going to pretend Rick C. Hodgin did not aid me with my choice of distro and I appreciate his service. chrisv has my example to examine and could begin to seem like he grew a brain because of this ;)

Lots of morons are now babbling about the open source "UI" as if something like that even potentially is a goal of the community.

--
Do not click this link!!!

https://groups.google.com/forum/#!topic/comp.os.linux.development.apps/G2-ZXYAEyIM
https://www.facebook.com/profile.php?id=100012978552519
Jonas Eklundh Communication
Richard Damon
2017-08-25 16:06:18 UTC
Permalink
Post by Malcolm McLean
Post by bartc
I wrote that because I don't trust the libc I typically use on Linux
in that respect. My impression is that they want "clean" include
files, and it gets better over time, but I would still not be
surprised to find I had to add an include after the next libc upgrade.
I don't know if this is what you mean, but below follow the standard
header files for sys/stat.h for gcc on Windows, and for MSVC (some 280
lines each).
It's a disaster, isn't it.
Now imagine if it had static asserts in it.
Imagine how hard it would be to prove that it was safe to remove a
static assert that was there. Remember, a static assert means that the
programmer of the code made an assumption about the environment and
documented it with a static assert. If that assert fires, then you
better be able to understand that code well enough to modify as needed
and determine that it still is correct.

Or, are you the sort of person who says, it passes the test suite, so it
MUST be correct. Remember test can never prove correctness, only
demonstrate that the code is incorrect, unless you code really has a
very limited number of possible inputs and you can truly exhaustively
test EVERY possible (combination of) inputs.
j***@verizon.net
2017-08-25 16:00:44 UTC
Permalink
On Friday, August 25, 2017 at 10:11:04 AM UTC-4, Bart wrote:
...
Post by bartc
I don't know if this is what you mean, but below follow the standard
header files for sys/stat.h for gcc on Windows, and for MSVC (some 280
lines each).
My task had been to duplicate the 'struct stat' contents, as used for
the stat() standard function (as called for a 64-bit implementation of C).
My procedure (which would almost certainly require some modification to be used on your Windows system, but should still be useful):

stat.c:
#include "sys/stat.h"
dev_t dev; // If you don't define something, gcc complains.

gcc -std=c99 -pedantic -Wall -Wpointer-arith -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes -E stat.c -o stat.e.c

I find the definition of struct stat on line 31 of stat.e.c, preceded by the non-directive:

# 46 "/usr/include/bits/stat.h" 3 4

which indicates that the following text was extracted from that file starting on line 46. That text contains the complete declaration of struct stat, as it appears after pre-processing. It contains large numbers of blank lines, which is the way that gcc indicates that the condition for including some conditionally included code has not been met. I can go back to the original file to find out what that code was, and what the conditions were controlling it.
Post by bartc
I wasn't able to figure it out from either of these headers. I had to
resort to a program - run under an existing implementation - which
displayed the offsets and sizes of each member of struct stat.
Your program is a lot more complicated than mine, and I only had to preprocess my program to get the information you're looking for. I also get a lot more information: the precise names of the files that I can search to determine how that definition depends upon the values of various relevant macros. However, since gcc needs to work correctly on a wide variety of platforms with a wide variety of options that can be turned on or of, that information is probably too complicated for you to assimilate.
bartc
2017-08-25 17:15:04 UTC
Permalink
Post by j***@verizon.net
...
Post by bartc
I don't know if this is what you mean, but below follow the standard
header files for sys/stat.h for gcc on Windows, and for MSVC (some 280
lines each).
My task had been to duplicate the 'struct stat' contents, as used for
the stat() standard function (as called for a 64-bit implementation of C).
#include "sys/stat.h"
dev_t dev; // If you don't define something, gcc complains.
gcc -std=c99 -pedantic -Wall -Wpointer-arith -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes -E stat.c -o stat.e.c
# 46 "/usr/include/bits/stat.h" 3 4
Using -E is another approach. Although you now get a struct stat full of
_dev_t, _ino_t and _off_t (and __time32_t) that you are now obliged to
trace as well. (Respectively u32, u16, long, and long.)

And strangely, while some of the output is very busy (with
__attribute__s everwhere), the -E is easier to follow, maybe because all
the conditionals disappear.

My point stands: you need to use a tool in order to make sense of C
source code rather than just read the source.
Post by j***@verizon.net
Your program is a lot more complicated than mine, and I only had to preprocess my program to get the information you're looking for. I also get a lot more information: the precise names of the files that I can search to determine how that definition depends upon the values of various relevant macros. However, since gcc needs to work correctly on a wide variety of platforms with a wide variety of options that can be turned on or of, that information is probably too complicated for you to assimilate.
As I understand stat.h, its purpose is to declare a function stat()
together with a stat struct needed to return information about a file.
Yet this is too much to actually store in stat.h for gcc, it has to be
in bits/stat.h on your system, or in _mingw_stat64.h on mine.
--
bartc
Lew Pitcher
2017-08-25 18:21:38 UTC
Permalink
Post by bartc
I wrote that because I don't trust the libc I typically use on Linux
in that respect. My impression is that they want "clean" include
files, and it gets better over time, but I would still not be
surprised to find I had to add an include after the next libc upgrade.
I don't know if this is what you mean, but below follow the standard
header files for sys/stat.h for gcc on Windows, and for MSVC (some 280
lines each).
My task had been to duplicate the 'struct stat' contents, as used for
the stat() standard function (as called for a 64-bit implementation of C).
I wasn't able to figure it out from either of these headers. I had to
resort to a program - run under an existing implementation - which
displayed the offsets and sizes of each member of struct stat.
[snip]

To paraphrase Otto von Bismark, "To retain respect for sausages and
programming languages, one must not watch them in the making."

For any specific implementation, the C "standard headers" may appear messy
and convoluted to the casual reader. They are, however, exactly what are
necessary to provide the features, documented of them in the C standard,
from the compiler's point of view. Of course you run the risk of becoming
very confused when you read them; like sausage, the end result is good, but
the process to get there is very messy.

As for duplicating "struct stat" and the stat() standard function, it
probably would be best to work from the definition of stat(), rather than a
specific implementation of stat(). AFAIK, stat() and struct stat are not
part of the C standard, so I assume that you are trying to duplicate the
Unix stat() syscall. You might look at the proper definition of that syscall
to answer your questions:
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html
http://pubs.opengroup.org/onlinepubs/009695399/functions/stat.html

HTH
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request
bartc
2017-08-25 18:40:44 UTC
Permalink
Post by Lew Pitcher
Post by bartc
I wrote that because I don't trust the libc I typically use on Linux
in that respect. My impression is that they want "clean" include
files, and it gets better over time, but I would still not be
surprised to find I had to add an include after the next libc upgrade.
I don't know if this is what you mean, but below follow the standard
header files for sys/stat.h for gcc on Windows, and for MSVC (some 280
lines each).
My task had been to duplicate the 'struct stat' contents, as used for
the stat() standard function (as called for a 64-bit implementation of C).
I wasn't able to figure it out from either of these headers. I had to
resort to a program - run under an existing implementation - which
displayed the offsets and sizes of each member of struct stat.
[snip]
To paraphrase Otto von Bismark, "To retain respect for sausages and
programming languages, one must not watch them in the making."
For any specific implementation, the C "standard headers" may appear messy
and convoluted to the casual reader. They are, however, exactly what are
necessary to provide the features, documented of them in the C standard,
from the compiler's point of view. Of course you run the risk of becoming
very confused when you read them; like sausage, the end result is good, but
the process to get there is very messy.
If no one's looking or commenting, what curbs are there to stop the
process becoming much more messy than necessary?
Post by Lew Pitcher
As for duplicating "struct stat" and the stat() standard function, it
probably would be best to work from the definition of stat(), rather than a
specific implementation of stat(). AFAIK, stat() and struct stat are not
part of the C standard, so I assume that you are trying to duplicate the
Unix stat() syscall. You might look at the proper definition of that syscall
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html
These are the first five lines of that struct:

dev_t st_dev Device ID of device containing file.
ino_t st_ino File serial number.
mode_t st_mode Mode of file (see below).
nlink_t st_nlink Number of hard links to the file.
uid_t st_uid User ID of file.
gid_t st_gid Group ID of file.

Someone I think is too overfond of inventing typedefs just for the sake
of inventing typedefs!
--
bartc
Lew Pitcher
2017-08-25 18:48:22 UTC
Permalink
Post by bartc
Post by Lew Pitcher
Post by bartc
I wrote that because I don't trust the libc I typically use on Linux
in that respect. My impression is that they want "clean" include
files, and it gets better over time, but I would still not be
surprised to find I had to add an include after the next libc upgrade.
I don't know if this is what you mean, but below follow the standard
header files for sys/stat.h for gcc on Windows, and for MSVC (some 280
lines each).
My task had been to duplicate the 'struct stat' contents, as used for
the stat() standard function (as called for a 64-bit implementation of C).
I wasn't able to figure it out from either of these headers. I had to
resort to a program - run under an existing implementation - which
displayed the offsets and sizes of each member of struct stat.
[snip]
To paraphrase Otto von Bismark, "To retain respect for sausages and
programming languages, one must not watch them in the making."
For any specific implementation, the C "standard headers" may appear
messy and convoluted to the casual reader. They are, however, exactly
what are necessary to provide the features, documented of them in the C
standard, from the compiler's point of view. Of course you run the risk
of becoming very confused when you read them; like sausage, the end
result is good, but the process to get there is very messy.
If no one's looking or commenting, what curbs are there to stop the
process becoming much more messy than necessary?
I imagine that, in the worst case, market forces and/or bug reports would do
that. But, why is the messiness (or not) of the process of concern to you?
If it works, if you can conveniently compile a program and run it to
success, given the supplied headers, what business is it of yours what
process glue those headers contain?
Post by bartc
Post by Lew Pitcher
As for duplicating "struct stat" and the stat() standard function, it
probably would be best to work from the definition of stat(), rather than
a specific implementation of stat(). AFAIK, stat() and struct stat are
not part of the C standard, so I assume that you are trying to duplicate
the Unix stat() syscall. You might look at the proper definition of that
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html
Post by bartc
dev_t st_dev Device ID of device containing file.
ino_t st_ino File serial number.
mode_t st_mode Mode of file (see below).
nlink_t st_nlink Number of hard links to the file.
uid_t st_uid User ID of file.
gid_t st_gid Group ID of file.
Someone I think is too overfond of inventing typedefs just for the sake
of inventing typedefs!
So? Your point is? You want to write a stat() interface; those documents
give you the requirements of the stat() interface. Go to it.
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request
Scott Lurndal
2017-08-25 19:03:54 UTC
Permalink
Post by Lew Pitcher
Post by bartc
Someone I think is too overfond of inventing typedefs just for the sake
of inventing typedefs!
So? Your point is? You want to write a stat() interface; those documents
give you the requirements of the stat() interface. Go to it.
Bart must, however, ensure that his layout matches that expected by the kernel,
both in ordering and padding (many unix implementations had padding bytes
to allow future expansion of certain fields without breaking binary
compatability).
Scott Lurndal
2017-08-25 19:01:46 UTC
Permalink
Post by bartc
Post by Lew Pitcher
For any specific implementation, the C "standard headers" may appear messy
and convoluted to the casual reader. They are, however, exactly what are
necessary to provide the features, documented of them in the C standard,
from the compiler's point of view. Of course you run the risk of becoming
very confused when you read them; like sausage, the end result is good, but
the process to get there is very messy.
If no one's looking or commenting, what curbs are there to stop the
process becoming much more messy than necessary?
The very smart people who create those headers and the very smart
reviewers thereof.
Note that these are in no particular order - any conforming (POSIX)
implementation can order these fields in the structure however
they like.
Post by bartc
dev_t st_dev Device ID of device containing file.
ino_t st_ino File serial number.
mode_t st_mode Mode of file (see below).
nlink_t st_nlink Number of hard links to the file.
uid_t st_uid User ID of file.
gid_t st_gid Group ID of file.
Someone I think is too overfond of inventing typedefs just for the sake
of inventing typedefs!
There are very valid historical reasons for these typedefs. They go
all the way back to the transition from 16-bit types to 32-bit types.

struct stat used to have st_uid, st_gid defined as short. Changing it
was quite the exercise[*], and when we did, we made a specific type
for it to make it easier if one wants someday to expand it to 64-bits.

If programmers use the proper types, it becomes a simple recompile
if the width of the type changes - no need to hunt down every
short variable in the application to see if it should be changed.

[*] Including wrapper library functions around the system call.

There is close to forty years of history behind the current POSIX
interface, and POSIX has a number of optional elements, which is why
the header files have become quite convoluted.
Keith Thompson
2017-08-25 19:03:11 UTC
Permalink
bartc <***@freeuk.com> writes:
[...]
Post by bartc
dev_t st_dev Device ID of device containing file.
ino_t st_ino File serial number.
mode_t st_mode Mode of file (see below).
nlink_t st_nlink Number of hard links to the file.
uid_t st_uid User ID of file.
gid_t st_gid Group ID of file.
Someone I think is too overfond of inventing typedefs just for the sake
of inventing typedefs!
No, someone was fond of inventing typedefs for the sake of being
able to use the appropriate type for each of the fields, depending
on the characteristics of the underlying system. For example, on
my system the underlying types of some of those typedefs changes
depending on the compilation mode (default vs. -m32 vs. -mx32).
--
Keith Thompson (The_Other_Keith) kst-***@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
j***@verizon.net
2017-08-25 19:06:32 UTC
Permalink
...
Post by bartc
Post by Lew Pitcher
As for duplicating "struct stat" and the stat() standard function, it
probably would be best to work from the definition of stat(), rather than a
specific implementation of stat(). AFAIK, stat() and struct stat are not
part of the C standard, so I assume that you are trying to duplicate the
Unix stat() syscall. You might look at the proper definition of that syscall
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html
dev_t st_dev Device ID of device containing file.
ino_t st_ino File serial number.
mode_t st_mode Mode of file (see below).
nlink_t st_nlink Number of hard links to the file.
uid_t st_uid User ID of file.
gid_t st_gid Group ID of file.
Someone I think is too overfond of inventing typedefs just for the sake
of inventing typedefs!
How would you handle this without using typedefs? Keep in mind that the only requirement imposed by POSIX on dev_t, mode_t, uid_t, nlink_t, and gid_t is that they be integer types, while ino_t is required only to be an unsigned integer type. Having made the decision to allow different implementations of POSIX to use differently named integer types for each of those things, how would you define struct stat without using typedefs so that it could actually be used by code intended to be portable to those different implementations?
Keep in mind that such code might, in general need to declare variables of those types, or as pointers to those types.
bartc
2017-08-25 20:06:50 UTC
Permalink
Post by j***@verizon.net
...
Post by bartc
Post by Lew Pitcher
As for duplicating "struct stat" and the stat() standard function, it
probably would be best to work from the definition of stat(), rather than a
specific implementation of stat(). AFAIK, stat() and struct stat are not
part of the C standard, so I assume that you are trying to duplicate the
Unix stat() syscall. You might look at the proper definition of that syscall
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html
(Six lines not five!)
Post by j***@verizon.net
Post by bartc
dev_t st_dev Device ID of device containing file.
ino_t st_ino File serial number.
mode_t st_mode Mode of file (see below).
nlink_t st_nlink Number of hard links to the file.
uid_t st_uid User ID of file.
gid_t st_gid Group ID of file.
Someone I think is too overfond of inventing typedefs just for the sake
of inventing typedefs!
How would you handle this without using typedefs? Keep in mind that the only requirement imposed by POSIX on dev_t, mode_t, uid_t, nlink_t, and gid_t is that they be integer types, while ino_t is required only to be an unsigned integer type. Having made the decision to allow different implementations of POSIX to use differently named integer types for each of those things, how would you define struct stat without using typedefs so that it could actually be used by code intended to be portable to those different implementations?
What are you saying, that these six members have six different types
because that's how these quantities are defined elsewhere? Then my
comments apply to that.

Imagine what code would look like if char, short, int etc disappeared,
and every variable, function, and member had its own dedicated typedef name.

Anyway, these presumably are part of an implementation, and
implementations don't need to be so portable.

Did those types exist first, then someone created a stat() function on
top? Then the stat struct could have used whatever field types it liked
provided they were at least the size of those established types.

Or was is necessary for the struc type, for some reason, to exactly
match some equivalent structure in the file system?

Note that I've dealt with dozens of different binary file formats, and
you don't often come across opaque integer types like this.

Here's the version I use in order to call MS's _stat() function:

struct _stat {
unsigned int st_dev;
unsigned short st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
unsigned long st_rdev;
unsigned int st_size;
unsigned long long int st_atime;
unsigned long long int st_mtime;
unsigned long long int st_ctime;
};

#define stat _stat

The #define maps both 'struct stat' and 'stat()' to 'struct _stat' and
'_stat()'. On this system, short is 16 bits, int/long are 32 bits, and
long long is 64 bits.

It's an implementation file for 64-bit Windows. The only other
possibility is calling _stat() on 32-bit Windows, and then what changes
I think are the time members which are 32 bits rather than 64.

Of course, if writing such a function now, you'd make all members likely
to need more than 32 bits, 64 bits. And it would work on both platforms
unchanged.

If overhauling this system now, you'd do the same, and use an
intermediate conversion function if it was still necessary to call the
existing old library.
--
bartc
s***@casperkitty.com
2017-08-25 20:26:10 UTC
Permalink
Post by bartc
Imagine what code would look like if char, short, int etc disappeared,
and every variable, function, and member had its own dedicated typedef name.
Cleaner than the present situation, if there were an easy way of expressing
which types should be directly convertible and which ones shouldn't. For
example, if one has some routines that use physical block numbers and others
that use logical block numbers, having types for both which can interoperate
with integer types but not directly with each other can help catch places
where code accidentally calls a "load physical block" routine using a logical
block number.

Further, useful optimizations would be available if one could specify that
e.g. a "foo*" should be compatible with "bar*", and vice versa, and a "moo*"
should likewise be compatible with "bar*", without requiring that a "foo*"
and "moo*" be compatible with each other.
j***@verizon.net
2017-08-25 21:16:31 UTC
Permalink
...
Post by bartc
(Six lines not five!)
Post by bartc
dev_t st_dev Device ID of device containing file.
ino_t st_ino File serial number.
mode_t st_mode Mode of file (see below).
nlink_t st_nlink Number of hard links to the file.
uid_t st_uid User ID of file.
gid_t st_gid Group ID of file.
Someone I think is too overfond of inventing typedefs just for the sake
of inventing typedefs!
How would you handle this without using typedefs? Keep in mind that the only > > requirement imposed by POSIX on dev_t, mode_t, uid_t, nlink_t, and gid_t is
that they be integer types, while ino_t is required only to be an unsigned
integer type. Having made the decision to allow different implementations of
POSIX to use differently named integer types for each of those things, how
would you define struct stat without using typedefs so that it could
actually be used by code intended to be portable to those different
implementations?
What are you saying, that these six members have six different types
because that's how these quantities are defined elsewhere? Then my
comments apply to that.
It's permitted for that to be the case, but unlikely. What is far more likely is that those six members have two different types on one implemention; all six have the same type on another implementation; they have a different pair of two types on a third implementation; and the same pair of types on a fourth implementation - except that the fourth implementation divides the members between the two type differently than the first one.
Post by bartc
Imagine what code would look like if char, short, int etc disappeared,
and every variable, function, and member had its own dedicated typedef name.
It would look a lot like what many parts of the POSIX standard library now look like. And it's far from being the only one. I've seen the same approach used in other libraries.
Post by bartc
Anyway, these presumably are part of an implementation, and
implementations don't need to be so portable.
The implementation is intended to be portably useful - that's what the "P" in POSIX stands for. Therefore, it's intended to make it easy to write portable code that will work on all four of the implementations I described above. Those typedefs are intended to simplify the writing of user code, not the implementation of the stat functions themselves. What kind of object would you store st_mode in, if there were no typedefs involved, and st_mode happened to have the type long on the system you were currently using? What would happen when you ported that code to an implementation where st_mode had the type 'int'?
Post by bartc
Did those types exist first, then someone created a stat() function on
No - the stat functions were originally written with fixed types, in the incorrect expectation that there would never be a need to change them. When the transition from 16-bit to 32-bit systems occurred, they realized that choosing a new set of fixed types would just cause the problem they were currently trying to solve to happen again, further down the line. That's why they decided that a using a typedef would be better, because it allows user code to compile and link with any implementation (or later version of the same implementation) of POSIX, and still continue working, despite such changes.
Post by bartc
top? Then the stat struct could have used whatever field types it liked
provided they were at least the size of those established types.
Or was is necessary for the struc type, for some reason, to exactly
match some equivalent structure in the file system?
The struct type IS the structure used in the file system, or so I understand. I'm not experienced with kernel programming, and could be mistaken about that.
Joe Pfeiffer
2017-08-25 21:18:10 UTC
Permalink
Post by bartc
Post by j***@verizon.net
...
Post by bartc
Post by Lew Pitcher
As for duplicating "struct stat" and the stat() standard function, it
probably would be best to work from the definition of stat(), rather than a
specific implementation of stat(). AFAIK, stat() and struct stat are not
part of the C standard, so I assume that you are trying to duplicate the
Unix stat() syscall. You might look at the proper definition of that syscall
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html
(Six lines not five!)
Post by j***@verizon.net
Post by bartc
dev_t st_dev Device ID of device containing file.
ino_t st_ino File serial number.
mode_t st_mode Mode of file (see below).
nlink_t st_nlink Number of hard links to the file.
uid_t st_uid User ID of file.
gid_t st_gid Group ID of file.
Someone I think is too overfond of inventing typedefs just for the sake
of inventing typedefs!
How would you handle this without using typedefs? Keep in mind that
the only requirement imposed by POSIX on dev_t, mode_t, uid_t,
nlink_t, and gid_t is that they be integer types, while ino_t is
required only to be an unsigned integer type. Having made the
decision to allow different implementations of POSIX to use
differently named integer types for each of those things, how would
you define struct stat without using typedefs so that it could
actually be used by code intended to be portable to those different
implementations?
What are you saying, that these six members have six different types
because that's how these quantities are defined elsewhere? Then my
comments apply to that.
Imagine what code would look like if char, short, int etc disappeared,
and every variable, function, and member had its own dedicated typedef name.
Anyway, these presumably are part of an implementation, and
implementations don't need to be so portable.
Did those types exist first, then someone created a stat() function on
top? Then the stat struct could have used whatever field types it
liked provided they were at least the size of those established types.
Or was is necessary for the struc type, for some reason, to exactly
match some equivalent structure in the file system?
Note that I've dealt with dozens of different binary file formats, and
you don't often come across opaque integer types like this.
struct _stat {
unsigned int st_dev;
unsigned short st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
unsigned long st_rdev;
unsigned int st_size;
unsigned long long int st_atime;
unsigned long long int st_mtime;
unsigned long long int st_ctime;
};
#define stat _stat
The #define maps both 'struct stat' and 'stat()' to 'struct _stat' and
'_stat()'. On this system, short is 16 bits, int/long are 32 bits, and
long long is 64 bits.
It's an implementation file for 64-bit Windows. The only other
possibility is calling _stat() on 32-bit Windows, and then what
changes I think are the time members which are 32 bits rather than 64.
Of course, if writing such a function now, you'd make all members
likely to need more than 32 bits, 64 bits. And it would work on both
platforms unchanged.
If overhauling this system now, you'd do the same, and use an
intermediate conversion function if it was still necessary to call the
existing old library.
Just as it's helpful to use named constants so you can just change the
value of the constant instead of having to track down every use of, say,
32 in the code and determine whether it needs to become 64, it's helpful
to name your types according to how you use them, so that when you move
to some other environment you just have to change a typedef instead of
looking at all the unsigned ints (or uint32_ts) and see if they need to
change. Yes, it takes some getting used to when you first encounter it,
but I seem to be doing it this way more and more in my own code.
--
"Erwin, have you seen the cat?" -- Mrs. Shrödinger
Steve Carroll
2017-08-29 15:46:16 UTC
Permalink
Post by Joe Pfeiffer
Post by bartc
Post by j***@verizon.net
...
Post by bartc
Post by Lew Pitcher
As for duplicating "struct stat" and the stat() standard function, it
probably would be best to work from the definition of stat(), rather than a
specific implementation of stat(). AFAIK, stat() and struct stat are not
part of the C standard, so I assume that you are trying to duplicate the
Unix stat() syscall. You might look at the proper definition of that syscall
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html
(Six lines not five!)
Post by j***@verizon.net
Post by bartc
dev_t st_dev Device ID of device containing file.
ino_t st_ino File serial number.
mode_t st_mode Mode of file (see below).
nlink_t st_nlink Number of hard links to the file.
uid_t st_uid User ID of file.
gid_t st_gid Group ID of file.
Someone I think is too overfond of inventing typedefs just for the sake
of inventing typedefs!
How would you handle this without using typedefs? Keep in mind that
the only requirement imposed by POSIX on dev_t, mode_t, uid_t,
nlink_t, and gid_t is that they be integer types, while ino_t is
required only to be an unsigned integer type. Having made the
decision to allow different implementations of POSIX to use
differently named integer types for each of those things, how would
you define struct stat without using typedefs so that it could
actually be used by code intended to be portable to those different
implementations?
What are you saying, that these six members have six different types
because that's how these quantities are defined elsewhere? Then my
comments apply to that.
Imagine what code would look like if char, short, int etc disappeared,
and every variable, function, and member had its own dedicated typedef name.
Anyway, these presumably are part of an implementation, and
implementations don't need to be so portable.
Did those types exist first, then someone created a stat() function on
top? Then the stat struct could have used whatever field types it
liked provided they were at least the size of those established types.
Or was is necessary for the struc type, for some reason, to exactly
match some equivalent structure in the file system?
Note that I've dealt with dozens of different binary file formats, and
you don't often come across opaque integer types like this.
struct _stat {
unsigned int st_dev;
unsigned short st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
unsigned long st_rdev;
unsigned int st_size;
unsigned long long int st_atime;
unsigned long long int st_mtime;
unsigned long long int st_ctime;
};
#define stat _stat
The #define maps both 'struct stat' and 'stat()' to 'struct _stat' and
'_stat()'. On this system, short is 16 bits, int/long are 32 bits, and
long long is 64 bits.
It's an implementation file for 64-bit Windows. The only other
possibility is calling _stat() on 32-bit Windows, and then what
changes I think are the time members which are 32 bits rather than 64.
Of course, if writing such a function now, you'd make all members
likely to need more than 32 bits, 64 bits. And it would work on both
platforms unchanged.
If overhauling this system now, you'd do the same, and use an
intermediate conversion function if it was still necessary to call the
existing old library.
Just as it's helpful to use named constants so you can just change the
value of the constant instead of having to track down every use of, say,
32 in the code and determine whether it needs to become 64, it's helpful
to name your types according to how you use them, so that when you move
to some other environment you just have to change a typedef instead of
looking at all the unsigned ints (or uint32_ts) and see if they need to
change. Yes, it takes some getting used to when you first encounter it,
but I seem to be doing it this way more and more in my own code.
--
"Erwin, have you seen the cat?" -- Mrs. Shrödinger
Satan's buddy Rick Hodgin asked to be rated according to direct statistical evidence, which vallor accommodated.

vallor can create a virtual machine. Let's make sure he gets all the cookies in the world!

It's like a prank call. Satan's buddy Rick Hodgin has already decided what he is going to say before he calls. What you say doesn't matter. What vallor says is irrelevant.

I am not going to pretend vallor did not square me away on encryption and I acknowledge his time. Satan's buddy Rick Hodgin has my example to study and can learn to appear like he is not just making things up from here on out... but he flubbed when it mattered ;)

Bravo, vallor, you are now living rent-free inside Satan's buddy Rick Hodgin's beady little brain. Ha!

Satan's buddy Rick Hodgin can take pleasure in the silence in the bursting at the seams garbage dump of my kill filter.

--
Best CMS Solution of 2017!
Loading Image...
http://www.5z8.info/yourdick_v1o3ww_manhunter
Jonas Eklundh
Steve Carroll
2017-08-29 15:46:56 UTC
Permalink
Post by Joe Pfeiffer
Post by bartc
Post by j***@verizon.net
...
Post by bartc
Post by Lew Pitcher
As for duplicating "struct stat" and the stat() standard function, it
probably would be best to work from the definition of stat(), rather than a
specific implementation of stat(). AFAIK, stat() and struct stat are not
part of the C standard, so I assume that you are trying to duplicate the
Unix stat() syscall. You might look at the proper definition of that syscall
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html
(Six lines not five!)
Post by j***@verizon.net
Post by bartc
dev_t st_dev Device ID of device containing file.
ino_t st_ino File serial number.
mode_t st_mode Mode of file (see below).
nlink_t st_nlink Number of hard links to the file.
uid_t st_uid User ID of file.
gid_t st_gid Group ID of file.
Someone I think is too overfond of inventing typedefs just for the sake
of inventing typedefs!
How would you handle this without using typedefs? Keep in mind that
the only requirement imposed by POSIX on dev_t, mode_t, uid_t,
nlink_t, and gid_t is that they be integer types, while ino_t is
required only to be an unsigned integer type. Having made the
decision to allow different implementations of POSIX to use
differently named integer types for each of those things, how would
you define struct stat without using typedefs so that it could
actually be used by code intended to be portable to those different
implementations?
What are you saying, that these six members have six different types
because that's how these quantities are defined elsewhere? Then my
comments apply to that.
Imagine what code would look like if char, short, int etc disappeared,
and every variable, function, and member had its own dedicated typedef name.
Anyway, these presumably are part of an implementation, and
implementations don't need to be so portable.
Did those types exist first, then someone created a stat() function on
top? Then the stat struct could have used whatever field types it
liked provided they were at least the size of those established types.
Or was is necessary for the struc type, for some reason, to exactly
match some equivalent structure in the file system?
Note that I've dealt with dozens of different binary file formats, and
you don't often come across opaque integer types like this.
struct _stat {
unsigned int st_dev;
unsigned short st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
unsigned long st_rdev;
unsigned int st_size;
unsigned long long int st_atime;
unsigned long long int st_mtime;
unsigned long long int st_ctime;
};
#define stat _stat
The #define maps both 'struct stat' and 'stat()' to 'struct _stat' and
'_stat()'. On this system, short is 16 bits, int/long are 32 bits, and
long long is 64 bits.
It's an implementation file for 64-bit Windows. The only other
possibility is calling _stat() on 32-bit Windows, and then what
changes I think are the time members which are 32 bits rather than 64.
Of course, if writing such a function now, you'd make all members
likely to need more than 32 bits, 64 bits. And it would work on both
platforms unchanged.
If overhauling this system now, you'd do the same, and use an
intermediate conversion function if it was still necessary to call the
existing old library.
Just as it's helpful to use named constants so you can just change the
value of the constant instead of having to track down every use of, say,
32 in the code and determine whether it needs to become 64, it's helpful
to name your types according to how you use them, so that when you move
to some other environment you just have to change a typedef instead of
looking at all the unsigned ints (or uint32_ts) and see if they need to
change. Yes, it takes some getting used to when you first encounter it,
but I seem to be doing it this way more and more in my own code.
--
"Erwin, have you seen the cat?" -- Mrs. Shrödinger
Asking Rick C. Hodgin to stop trolling, a thing I didn't do, is not the same as referencing his quackery. My main idea was that good people come here to assail kookery. It isn't like most do not know what this place is, Desk Rabbit included. You do realize that the massive floods ending up in multiple groups started out in COLA, right?

The Mac has better screencasting programs. Rick C. Hodgin will never live that down. There is no question at least some of the posts are hand generated because some of them tap into what Desk Rabbit said in very specific ways that underscore they are a response. Meaning someone is hand writing many of these.

He is unmistakably flooding, he got busted and he's doing the normal defensive pranks covered in Trolling 101 as he does his damnedest to hang on to a smattering of honor... but it will not work.

--
Live on Kickstarter

Jonas Eklundh
Loading...