Skip to content

Instantly share code, notes, and snippets.

@dragoon2014
dragoon2014 / xdndfile.c
Last active March 27, 2022 06:40
xdndfile.c
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <stdio.h>
#define DEFINE_ATOM(n) Atom n = XInternAtom(d, ""#n, False); printf("%s is %ld(0x%lx)\n", ""#n, n, n);
#define DEFINE_ATOM2(n, m) Atom n = XInternAtom(d, m, False); printf("%s(%s) is %ld(0x%lx)\n", ""#n, m, n, n);
int main(void){
Display* d;
// Example program:
// Using SDL2 to create an application window
#include <SDL2/SDL.h>
#include <stdio.h>
int main(string[] args) {
SDL_Window *window; // Declare a pointer
diff --git a/source/dpp/runtime/app.d b/source/dpp/runtime/app.d
index 8e79a82..7fc8f05 100644
--- a/source/dpp/runtime/app.d
+++ b/source/dpp/runtime/app.d
@@ -54,8 +54,24 @@ void preprocess(File)(in from!"dpp.runtime.options".Options options,
// write preamble code
outputFile.writeln(preamble);
+ import std.file: exists, isFile;
+ auto cacheFileName = outputFileName ~ ".cache-dpp";
// Compile Time D-man Locomotive
// https://qiita.com/dragoon2014/items/2217ab9578c875ecdf69
import std.meta;
import std.range;
import std.algorithm;
const int w = 70;
const int p = 10;
const int delay = 100;
foo
bar