This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/utils.c b/src/utils.c | |
| index c5edd5a..37ae12a 100644 | |
| --- a/src/utils.c | |
| +++ b/src/utils.c | |
| @@ -2154,30 +2154,35 @@ const gchar *utils_resource_dir(GeanyResourceDirType type) | |
| void utils_start_new_geany_instance(const gchar *doc_path) | |
| { | |
| - const gchar *const *argv; | |
| const gchar *command = is_osx_bundle() ? "open" : "geany"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <clang-c/Index.h> | |
| enum CXChildVisitResult | |
| onVisitCursor(CXCursor cursor, CXCursor parent, CXClientData client_data) | |
| { | |
| if (clang_getCursorKind(cursor) == CXCursor_InclusionDirective) { | |
| CXFile file = clang_getIncludedFile(cursor); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AC_DEFUN([AX_POSIX], [ | |
| AC_MSG_CHECKING([for POSIX 2008 support]) | |
| AC_COMPILE_IFELSE([AC_LANG_SOURCE([ | |
| #define _POSIX_C_SOURCE 200809L | |
| #include <unistd.h> | |
| # if !defined(_POSIX_VERSION) || _POSIX_VERSION < 200809L | |
| # error "Not POSIX 2008" | |
| #endif | |
| int main() { return 0; } | |
| ])], [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/document.c b/src/document.c | |
| index 8a57d93..edaed0d 100644 | |
| --- a/src/document.c | |
| +++ b/src/document.c | |
| @@ -226,16 +226,8 @@ GeanyDocument *document_find_by_filename(const gchar *utf8_filename) | |
| /* returns the document which has sci, or NULL. */ | |
| GeanyDocument *document_find_by_sci(ScintillaObject *sci) | |
| { | |
| - guint i; | |
| - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %{ | |
| #include "stdinc.h" | |
| #include "parser.h" | |
| #include "tokens.h" | |
| #include "lexer.h" | |
| static void parser_error(YYLTYPE *locp, struct Parser* par, const char *message); | |
| #define parser_lex(a,b,c) parser_lex(a,b,(c)->scanner) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Inspired by: https://exyr.org/2011/inotify-run/ | |
| # base source dir, found from script's dir, in my case it's `..` to the base srcdir | |
| SRCDIR=$(cd "$(dirname $(dirname "$0"))"; pwd -P) | |
| # command to run initially and on file changes, in my case in `build` dir | |
| COMMAND="make -C $SRCDIR/build" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import argparse | |
| import json | |
| import re | |
| import sys | |
| from collections import OrderedDict | |
| from subprocess import Popen, PIPE | |
| RE_INC = re.compile(r'^(?P<target>.+?):\s+(?P<deps>.+?)$', re.MULTILINE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #include <utility> | |
| namespace ScopeExitNamespace__ { | |
| template<typename T> struct OnScopeExit__ { | |
| T func; | |
| OnScopeExit__(T func) : func(std::move(func)) {} | |
| ~OnScopeExit__() noexcept { func(); } | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // test.ast - Sample AST description for treegen | |
| // | |
| target CPlusPlus { | |
| // In string literals, | |
| // $$ is target/variable (for externs) | |
| // $_ is "this" or "self", etc. (for nodes and externs) | |
| // $@ is the type (for nodes and externs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <setjmp.h> | |
| #include <stdio.h> | |
| #define WHILE(while_expr) { \ | |
| int jumped____; \ | |
| jmp_buf redo_target____; \ | |
| int restarted____; \ | |
| restarted____ = setjmp(redo_target____); \ | |
| jumped____ = 1; \ | |
| while ((while_expr)||(jumped____=0)) { |