This file contains 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
int main() | |
{ | |
// ignore Ctrl-\ Ctrl-C Ctrl-Z signals | |
ignore_signal_for_shell(); | |
// set the prompt | |
set_prompt("swoorup % "); | |
while (1) |
This file contains 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
// keep getline in a loop in case interruption occurs | |
int again = 1; | |
while (again) { | |
again = 0; | |
printf("%s", getprompt()); | |
linebuffer = NULL; | |
len = 0; | |
ssize_t nread = getline(&linebuffer, &len, stdin); | |
if (nread <= 0 && errno == EINTR) { | |
again = 1; // signal interruption, read again |
This file contains 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
// parse the tokens into an abstract syntax tree | |
if (!lexerbuf.ntoks || parse(&lexerbuf, &exectree) != 0) { | |
continue; | |
} | |
execute_syntax_tree(exectree); |
This file contains 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
from struct import unpack | |
from cStringIO import StringIO | |
class SAPath(): | |
def __init__(self, node): | |
self.path = StringIO(open(node, "rb").read()) | |
self.header = {} | |
self.pathnodes = [] | |
self.navinodes = [] | |
self.links = [] |
This file contains 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
<command line> ::= <job> | |
| <job> '&' | |
| <job> '&' <command line> | |
| <job> ';' | |
| <job> ';' <command line> | |
<job> ::= <command> | |
| < job > '|' < command > | |
<command ::= <simple command> |
This file contains 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
typedef struct ASTreeNode | |
{ | |
int type; | |
char* szData; | |
struct ASTreeNode* left; | |
struct ASTreeNode* right; | |
} ASTreeNode; |
This file contains 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
Font=Sauce Code Powerline | |
ForegroundColour=131,148,150 | |
BackgroundColour=0,11,17 | |
CursorColour=220,50,47 | |
Black=7,54,66 | |
BoldBlack=0,43,54 | |
Red=220,50,47 | |
BoldRed=203,75,22 | |
Green=133,153,0 | |
BoldGreen=88,110,117 |
This file contains 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
alias tree='tree -C' | |
export EDITOR=vim | |
export PAGER="less" | |
export LESS="-R" | |
eval $( dircolors -b $HOME/.dircolors ) |
This file contains 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
;; This file was obtained from | |
;; http://forum.dlang.org/post/wcqxlaceqljsdsultiie@forum.dlang.org | |
(defun run-current-project-args (args) | |
(setq cmdStr (concat "time dub " args)) | |
(setq buffname (format "*%s*" cmdStr)) | |
(save-excursion | |
(message (concat "Running:" cmdStr)) | |
(if (not (eq nil (get-buffer buffname))) (kill-buffer buffname)) | |
(setq compilation-scroll-output t) |
This file contains 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
-*- mode: compilation; default-directory: "~/Dropbox/vulkan_experiments/vkapp/" -*- | |
Compilation started at Sat Dec 31 15:28:03 | |
time dub | |
Performing "debug" build using dmd for x86_64. | |
derelict-util 2.0.6: target for configuration "library" is up to date. | |
derelict-sdl2 2.0.2: target for configuration "library" is up to date. | |
xcb-d 2.1.0+1.11.1: target for configuration "library" is up to date. | |
xlib-d 0.1.1: target for configuration "library" is up to date. | |
vulkantriangled ~master: building configuration "application"... |
OlderNewer