UNLESS OTHERWISE NOTED, THE CONTENTS OF THESE PUBLIC GISTS ARE LICENSED UNDER THE CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE.
This section is a human-readable summary of (and not a substitute for) the full license included below.
| (in-package #:cl-user) | |
| ;;; Parsing the grid | |
| (defun read-char! (in k-char k-eos) | |
| "Returns (k-char char). If end of stream returns (k-eos)" | |
| (let ((char (read-char in nil nil))) | |
| (cond | |
| (char (funcall k-char char)) | |
| (t (funcall k-eos))))) |
| (cl:defpackage #:pipe-client | |
| (:use #:cl)) | |
| (in-package #:pipe-client) | |
| ;;; Create/Close pipe | |
| (defun create-pipe-client! (pipe-filename) | |
| "Creates a pipe-client with the given pipe-filename. | |
| Returns a valid pipe handle or signals an error. | |
| Assumes a pipe-server is already open with the same pipe-filname." |
| #ifndef RUN_PIPE_SERVER_H | |
| #define RUN_PIPE_SERVER_H | |
| #include <stdint.h> | |
| #ifndef REQUEST_BUFFER_SIZE | |
| #define REQUEST_BUFFER_SIZE (1024*1024*128) | |
| #endif | |
| #ifndef RESPONSE_BUFFER_SIZE |
| #include "run_pipe_server.h" | |
| #include <windows.h> | |
| #include <stdio.h> | |
| // Create a named pipe with the given pipe_filename. | |
| static Pipe CreateServerPipe(String pipe_filename); | |
| // Wait for a client connection to pipe. | |
| static b4 ConnectPipe(Pipe); | |
| // Loop that processes and responds to client requests from Pipe, until the client disconnects. |
| ;;; Slime/Swank Setup | |
| (defun multiline? (string) | |
| "True if the string has multiple lines." | |
| (position ?\n string)) | |
| (defun multiline-comment (string) | |
| "Return string formatted as a multi-line Lisp comment" | |
| (concat "#||\n" string "\n||#\n")) |
| /* Folder structure | |
| workspace | |
| |- build.bat -- listing below | |
| |- Glew dlls | |
| |- SDL2 dlls | |
| |- include\ | |
| |- SDL2\ -- SDL2 header files | |
| |- GL\ -- Glew header files | |
| |- lib\ | |
| |- Glew libs |
UNLESS OTHERWISE NOTED, THE CONTENTS OF THESE PUBLIC GISTS ARE LICENSED UNDER THE CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE.
This section is a human-readable summary of (and not a substitute for) the full license included below.
| /* | |
| map ,g :!clang -DDEBUG % -o %:r -lncurses && ./%:r <CR> | |
| gcc pacman.c -o pacman -lncurses | |
| ./pacman | |
| */ | |
| /* | |
| * TODO | |
| * minor: ghosts should go all the way to their bottom positions (TILE_CENTER) |
| /* | |
| map ,g :!gcc % -o %:r -lncurses && ./%:r <CR> | |
| gcc freecell.c -o freecell -lncurses | |
| ./freecell | |
| */ | |
| #include <assert.h> | |
| #include <stdint.h> | |
| #include <ncurses.h> |
| /* | |
| map <leader>g :!gcc % -o %:r -lncurses && ./%:r <CR> | |
| gcc tetris.c -o tetris -lncurses | |
| ./tetris | |
| */ | |
| #include <stdint.h> | |
| #include <string.h> | |
| #include <stdlib.h> |