NetBSD Source Changes · @netbsdsrc
24 followers · 4997 posts · Server mstdn.social

sys/arch/hpcmips/tx: tx39ir.c

andvar: remove unneeded TX39IRDEBUG.

cvsweb.netbsd.org/bsdweb.cgi/s

#undef

Last updated 1 year ago

NetBSD Source Changes · @netbsdsrc
24 followers · 4992 posts · Server mstdn.social

sys/arch/hpcmips/dev: plumvideo.c

andvar: Remove " PLUMVIDEODEBUG", it is not defined by default.

cvsweb.netbsd.org/bsdweb.cgi/s

#undef

Last updated 1 year ago

Alexander Shendi · @alexshendi
160 followers · 1935 posts · Server rollenspiel.social

__CHICKEN_MEETING__

#undef

Last updated 1 year ago

Mark Tomczak · @mtomczak
62 followers · 554 posts · Server qoto.org

Google: “The problems introduced by macros are especially severe when they are used to define pieces of a C++ API… As a consequence, we specifically disallow using macros in this way.”

Also Google:

// clang-format off        switch (fd.value.type.base_type) {        #define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, ...) \          case BASE_TYPE_ ## ENUM: \            if (!GenField<CTYPE>(fd, table, struct_def.fixed, elem_indent)) { \              return false; \            } \            break;            FLATBUFFERS_GEN_TYPES_SCALAR(FLATBUFFERS_TD)        #undef FLATBUFFERS_TD

#define #undef

Last updated 1 year ago

Mark Tomczak · @mtomczak
62 followers · 554 posts · Server qoto.org

Google: “The problems introduced by macros are especially severe when they are used to define pieces of a C++ API… As a consequence, we specifically disallow using macros in this way.”

Also Google:

// clang-format off        switch (fd.value.type.base_type) {        #define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, ...) \          case BASE_TYPE_ ## ENUM: \            if (!GenField<CTYPE>(fd, table, struct_def.fixed, elem_indent)) { \              return false; \            } \            break;            FLATBUFFERS_GEN_TYPES_SCALAR(FLATBUFFERS_TD)        #undef FLATBUFFERS_TD

#define #undef

Last updated 1 year ago

F4JWJ, Pierre · @F4JWJ
44 followers · 206 posts · Server mastodon.radio

@vk3tcp
Wow, the K3NG code has many features beside the keyer itself.
(Now, I remember to have seen it times ago).

Seems that most "extra" functionalities can be

I only want to drive my collection of Oldies like the Heathkit SB-300 and SB-102 or my 2 Yaesu FT-101ZD (still on the bench).

For those interested, I found some directions for a minimalist K3NG keyer configuration here:
egloff.eu/index.php?Itemid=635

#undef

Last updated 1 year ago

Sergey Bugaev · @bugaevc
814 followers · 806 posts · Server floss.social

@amdg2 aha, right, good point about conditional includes! And the same defer mechanism would be just as useful for undefining macros. So, I imagine something like this:

// in stdlib.h

__cplusplus
<algorithm>


__cplusplus
<algorithm>

static inline void qsort(whatever) {
// Efficient implementation using std::sort
}

#define #include #defer #undef #uninclude #enddefer

Last updated 1 year ago

James Widman · @JamesWidman
82 followers · 217 posts · Server mastodon.social

abolish the institution of private ownership of real estate.

"ownership" is not a naturally occurring phenomenon.
It's a bad LARP rule. It could just be 'd, and we'd all be better off.

curbed.com
/2023/01/nyc-real-estate-covid-more-apartments-higher-rent.html

#undef

Last updated 2 years ago

白田まお · @blackhole
309 followers · 4836 posts · Server oransns.com

みんなまとめて してやる

#undef

Last updated 2 years ago

Pkgsrc Changes · @pkgsrcchanges
10 followers · 2018 posts · Server mstdn.social
Kruniak :WolfPat: · @kruniak
14 followers · 437 posts · Server nerdculture.de

!defined(PETME)
PETME
TY
SADNESS

#if #define #undef #endif

Last updated 2 years ago

FRWessling ✅🌴🍍 · @frwessling
86 followers · 289 posts · Server infosec.exchange

@jb0x168 @TheGibson

Future

int reality(void)
{
Future;
//This is a simulation
return(22/0);

return();

}

#undef #ifdef #else #endif

Last updated 2 years ago

Cy · @cy
179 followers · 9278 posts · Server mstdn.io

So an interface uses macros as arguments then 's them, then the implementation uses those macros and uh... OK so that means the interface must separate into start, and undef, so the implemenation can put code in between.
Then something uses that snippet, and itself has to include start and undef headers, so its implementation can use those definitions.
Then something uses that snippet twice, to define two different data types, and uhh... nothing works it can't be fixed it's broken forever.

#undef

Last updated 3 years ago

Phil · @suivran
108 followers · 7160 posts · Server elekk.xyz

Angband does a pretty interesting thing to define game elements

It has files called list-[name].h that just contain something like this (this is from list-terrain-flags.h):

TF(NONE,        "")
TF(LOS, "Allows line of sight")
TF(PROJECT, "Allows projections to pass through")
TF(PASSABLE, "Can be passed through by all creatures")
TF(INTERESTING,"Is noticed on looking around")
TF(PERMANENT, "Is permanent")
TF(EASY, "Is easily passed through")
TF(TRAP, "Can hold a trap")
TF(NO_SCENT, "Cannot store scent")
// ... more of this, you get the idea

and any place that needs to do something over the entire list does

 TF(a, b) // whatever the result should be
"list-terrain-flags.h"
TF

Pretty cool method to centralize the declarative data and make it possible to do things with it in multiple places.

Probably wouldn't do that way with Rust tho.

#undef #include #define

Last updated 3 years ago

Alexey Yerin · @yyp
194 followers · 1502 posts · Server fosstodon.org

@floppy Introducing: , and

#ifdef #ifndef #undef

Last updated 3 years ago

nytpu · @nytpu
563 followers · 10139 posts · Server tilde.zone

@m455 Alongside your existing compiler flags for optimization and such, you can use something like -Wall -Wextra -std=c89 -pedantic in Clang or GCC to get strict ANSI enforcement. Make sure to some feature test macros (gnu.org/software/libc/manual/h) like _POSIX_C_SOURCE if you want truly portable code without extensions.

#undef

Last updated 3 years ago

derf · @derf
283 followers · 2232 posts · Server social.antifa.gmbh

TIL: Es gibt einen wunderbaren C++-Hack, um auch an private Methoden heranzukommen.

private public
<something>
private

#undef #include #define

Last updated 3 years ago

Josh Rickmar · @jrick
38 followers · 232 posts · Server bsd.network

@bcallah from gcc 10.2 stddef.h (beware: gpl3)

if defined (_STDDEF_H) || defined (__need_NULL)
NULL /* in case <stdio.h> has defined it. */
__GNUG__
NULL __null
/* G++ */
__cplusplus
NULL ((void *)0)
/* C++ */
NULL 0
/* C++ */
/* G++ */
/* NULL not defined and <stddef.h> or need NULL. */
__need_NULL

#undef #ifdef #define #else #ifndef #endif

Last updated 4 years ago

claude · @mathr
288 followers · 2739 posts · Server post.lurk.org

Source code for the core formula definition:

```

/*
Experimental Magnet-Mandelbrot bulb triplex fractal.
Type 1: z_{n+1} = [(z_n^2 + c-1) / (2z_n + c-2)]^2
*/

MAGNETBULB(TRIPLEX, VEC, real) \
void Magnetbulb1Triplex(inout VEC w, in VEC c) \
{ \
TRIPLEX one = TRIPLEX(real(1), real(0), real(0)); \
TRIPLEX two = TRIPLEX(real(2), real(0), real(0)); \
TRIPLEX d = TRIPLEX(c.v[0], c.v[1], c.v[2]); \
TRIPLEX z = TRIPLEX(w.v[0], w.v[1], w.v[2]); \
z = sqr(div(add(sqr(z), sub(d, one)), add(add(z, z), sub(d, two)))); \
w.v[0] = z.x; \
w.v[1] = z.y; \
w.v[2] = z.z; \
w = add(w, c); \
}
MAGNETBULB(Triplexfx, Vec3fx, floatx)
MAGNETBULB(TriplexDual3f, Vec3Dual3f, dual3f)
MAGNETBULB
```

The rest of the framework is Too Big To Toot.

#undef #define #donotrun

Last updated 4 years ago

Baudouin Feildel · @amdg2
177 followers · 6449 posts · Server diaspodon.fr

@prx@bsd.network je viens de penser que sinon tu peux faire des trucs un peu sale à base de .

```
main smu_main
"smu.c"
main

// ton code
```

#define #include #undef

Last updated 5 years ago