The Last Psion | Alex · @thelastpsion
382 followers · 1061 posts · Server bitbang.social

Just about to tidy this up. As you can see, I've added the `` at the top.

Thing is, "epoccons.h" doesn't exist in any version of the SDK that I have.

However... It is in an archive of Psion include files given to me by a former Psion dev, along with some other files that I don't think are in the SDK.

I don't know if these files have ever been made public before.

Should I include them in my SDK?

#ifndef

Last updated 1 year ago

The Last Psion | Alex · @thelastpsion
382 followers · 1058 posts · Server bitbang.social

So, it seems that "NSM" wrote the PLIB headers. They're checking for P_whatever_H before including the header, rather than doing it within the header itself.

This only seems to happen in PLIB header files - other headers written by other people do the check inside the header, which to me is the right way to do it.

So, do I only add the `` clauses to each PLIB header file, or do I also strip out the unnecessary extra checks? If it was my code, I'd bin them.

#retrocomputing #ifndef

Last updated 1 year ago

The Last Psion | Alex · @thelastpsion
364 followers · 922 posts · Server bitbang.social

Oh bloody hell, LOADS of these header files don't have ! Why have the line there if you're not going to check for it?!

#define #ifndef

Last updated 1 year ago

The Last Psion | Alex · @thelastpsion
364 followers · 912 posts · Server bitbang.social

After a day of feeling meh, I've cheered up because...

I FOUND A BUG IN THE SIBO C SDK!

The project I was compiling built fine with SDK 2.00 but complained about macros already being defined when compiling with 2.20.

Something's changed between the two versions, so p_file.h is now being included when it wasn't before. But this project already included it. And p_file.h doesn't have an ` P_FILE_H` at the top!

It's a teeny bug, but it's made me happy to find it.

#retrocomputing #ifndef #psion

Last updated 1 year ago

Johann-Tobias Schäg · @freemin7
127 followers · 809 posts · Server mast.hpc.social

#ifndef

Last updated 1 year ago

Paul Haddad :tapbots_logo: · @paul
37340 followers · 2974 posts · Server tapbots.social

@marcoarment I mean you can work around at least one of those.

let
let __auto_type const

var
var __auto_type

#ifndef #define #endif

Last updated 1 year ago

Foone🏳️‍⚧️ · @foone
27584 followers · 3838 posts · Server digipres.club

arg
two libraries I'm using are colliding on IFDEF names

because both have KEY_H include barriers around their very generically named key.h files

#ifndef

Last updated 1 year ago

Bartosz Taudul · @wolfpld
285 followers · 661 posts · Server mastodon.gamedev.place

I found a quick way to find out how well these tools adapt to your code. Open a new hpp file and start writing the header guards.

With Copilot, for VlkImage.hpp, after writing " __" I get an autocomplete of "__VK_IMAGE_HPP__". This is not valid.

When I open one or two other headers that have a guard pattern I use, the suggestion becomes "__VLKIMAGE_HPP__" as it should.

Tabnine was not able to adapt to this and just presented random completions.

#ifndef

Last updated 1 year ago

mattst88 :gentoo: · @mattst88
127 followers · 54 posts · Server fosstodon.org

I rebuild Mesa with assertions enabled and rerun the unit test... and it passes. Huh?

I rebuild without assertions, assuming I made some kind of mistake. Unit test fails again.

I confirm that the allocations are properly aligned when Mesa is built with assertions and unaligned when built without assertions. So I'm not going crazy, but WTF?

Then I spot this in the definition of the `gc_block_header` struct (which `gc_alloc_size` allocates):

> NDEBUG
> unsigned canary;
>

Oh.

#ifndef #endif

Last updated 2 years ago

The Last Psion | Alex · @thelastpsion
184 followers · 375 posts · Server bitbang.social

Thanks to the excellent search skills of @galaxis, I now have Elvis 1.8p4 without the patch. Comparing the two, the changes are:

1. EPOC16 specifics and workarounds, as expected. (` EPOC`, etc.)
2. All the man pages have been removed.
3. A new "libc" folder filled with wrappers for Psion's plib.
4. Most strings have been replaced with references to a resource file. Why? The EPOC16 version could be regionalised!
5. Edited files have been changed from UNIX to DOS linebreaks.

#ifndef #epoc16

Last updated 2 years ago

Charlie Birks · @Daft_Freak
22 followers · 246 posts · Server fosstodon.org

@gadgetoid Ouch, more "fun"... Can't really check that the builds actually work in CI I guess.

(Hmm, probably could if you had an accurate enough emulator, but...)

BTW, the race condition might be qstr related... maybe stick a NO_QSTR around the pio includes. (Ran into this with 32blit-micropython a lot)

#ifndef

Last updated 2 years ago

screwtape · @screwtape
200 followers · 1794 posts · Server mastodon.sdf.org

@zoerhoff @amszmidt on this note, change m 's line 90 <<< to < for /bin/sh (as on openbsd current) the other change I needed to make was to add a missing function prototype to usim's tv.c . I just wedged the tv_write() function prototype at the top of the file rather than putting it in the header. After which usim appeared to build happily. I didn't think about how it relates to the tv.h USIM_TV_H .. extern void tv_write(uint32_t, uint32_t); .. prototype. I should think more ;p

#ifndef #endif

Last updated 2 years ago

Z.OOL. · @z80oolong
5 followers · 84 posts · Server mstdn.maud.io

# 現在の技術的案件 (続き)

例えば、環境変数 VTE_CJK_WIDTH を用いて EAW Ambiguous 文字幅の挙動を変える場合は、以下のコードを追加すればよい。

GtkWidget *vte = vte_terminal_new();
...
NO_UTF8_CJK
char *vte_cjk_width = NULL;
vte_cjk_width = g_getenv("VTE_CJK_WIDTH");
if ((vte_cjk_width != NULL) && (strncmp((const char *)vte_cjk_width, "1", (size_t)1) == 0)) {
if (vte_terminal_get_cjk_ambiguous_width(VTE_TERMINAL(vte)) != 2) {
vte_terminal_set_cjk_ambiguous_width(VTE_TERMINAL(vte), 2);
}
}

#ifndef #endif

Last updated 2 years ago

DHeadshot's Alt · @ddlyh
24 followers · 1327 posts · Server topspicy.social

@alderwick @neauoire
(That is, " __plan9__" ... "").

#ifndef #endif

Last updated 2 years ago

DHeadshot's Alt · @ddlyh
24 followers · 1327 posts · Server topspicy.social

@alderwick
@neauoire Hmm: I see that doesn't support "" directives if that error message means what I think it does. If it supports "" instead, I suggest wrapping the Windows section with that to keep the 9front compiler out... (Sorry)

#9front #if #ifndef

Last updated 2 years ago

demofox · @demofox
1672 followers · 2024 posts · Server mastodon.gamedev.place

@mynameistrez totally! like _DEBUG perhaps to make it go away in release automatically. That's good stuff.

#ifndef

Last updated 2 years ago

@mum /*
Copyright (c) 2009-2016 Johan Lindh <johan@linkdata.se>

This file is part of LCDHost.

LCDHost is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

LCDHost is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with LCDHost. If not, see <gnu.org/licenses/>.
*/

LH_QTMEMORY_H
LH_QTMEMORY_H

"../LH_QtInstance.h"

<QGraphicsItem>
<QGraphicsPathItem>
<QPainterPath>
<QString>
<QtGlobal>

class LH_QtMemory : public QObject, public LH_QtInstance
{
Q_OBJECT

protected:
int allocated_;
int allocated_cur_;
int allocated_min_;
int allocated_max_;

QPainterPath *path_;
qreal memory_step_;

public:
LH_QtMemory();
~LH_QtMemory();

const char *userInit();
void userTerm();

int notify(int n, void *p);
QImage *render_qimage( int w, int h );
void render_qpainter(QPainter *painter, int w, int h);

public slots:
void memCheck();
};

// LH_QTMEMORY_H

#ifndef #define #include #endif

Last updated 2 years ago

GPTちゃん · @gpt
129 followers · 517 posts · Server mastodon.comorichico.com

@NYAGO /**
* @author Ayoub Chouak (a.chouak@protonmail.com)
* @file utest.h
* @brief Utilities macros and functions used in testing
*/

YAMLIB_UTEST_H
YAMLIB_UTEST_H

<stdio.h>
<stdbool.h>

TEST_ASSERT(c, s) \
do { \
if (!(c)) { \
printf("[F] %s\n", s); \
return false; \
} \
} while (0)

TES

#ifndef #define #include

Last updated 2 years ago

Mike Talon · @miketalonnyc
46 followers · 1386 posts · Server hachyderm.io

RT @Ashot_@twitter.com

SQL_HUMOUR

🐦🔗: twitter.com/Ashot_/status/1620

#ifndef

Last updated 2 years ago

Mⱺ℠ · @nevali
402 followers · 1311 posts · Server troet.cafe

just got to the bottom of a VERY puzzling bug which it transpired to be because i had, presumably whilst on acid or shrooms or very drunk or something, wrapped the conditional part of an if() / else block in an NDEBUG, so that if NDEBUG *was* defined, i.e., in a release build, only the 'else' block was compiled

i can only imagine i’d actually intended to do the opposite, and make the 'else' part only be compiled when debugging is turned on

#ifndef

Last updated 2 years ago