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
| /* Folder structure | |
| workspace | |
| |- build.bat -- listing below | |
| |- Glew dlls | |
| |- SDL2 dlls | |
| |- include\ | |
| |- SDL2\ -- SDL2 header files | |
| |- GL\ -- Glew header files | |
| |- lib\ | |
| |- Glew libs |
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
| ;;; 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")) |
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 "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. |
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
| #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 |
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
| (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." |
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
| (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))))) |
OlderNewer