adapted from this blog
# YAML
name: Jon
# YAML
object:
/* | |
Example of a C program embedding ECL with callbacks to C functions. | |
Compiled via: gcc ecldemo.c -lecl | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include "ecl/ecl.h" | |
#define DEFUN(name,fun,args) \ | |
cl_def_c_function(c_string_to_object(name), \ |
#include <stdio.h> | |
#include <libguile.h> | |
int main(int argc, char** argv) { | |
SCM func; | |
scm_init_guile(); | |
scm_c_primitive_load("c_call_guile.scm"); | |
func = scm_variable_ref(scm_c_lookup("show-me")); | |
scm_call_0(func); |
adapted from this blog
# YAML
name: Jon
# YAML
object:
#include "HMyClass.h" | |
#include <stdio.h> | |
void my_eh( const char * error_message, void * unused) | |
{ | |
printf("my_eh: %s\n", error_message); | |
} | |
int main() | |
{ |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
if(NOT HOME) | |
if(WIN32) | |
string(REPLACE "\\" "/" HOME "$ENV{USERPROFILE}") | |
else() | |
set(HOME $ENV{HOME}) | |
endif() | |
endif() | |
### Useful Functions and Macros ### | |
# Prints a list of messages, each one in a new line |
if (NOT INSTALLING) | |
set (WORKING DIRECTORY "${CMAKECURRENTBINARYDIR}/Install") | |
file (MAKEDIRECTORY "${DIRECTORY}") | |
executeprocess (COMMAND "${CMAKECOMMAND}" | |
-DINSTALLING=TRUE | |
-DINSTALLPREFIX=${MYINSTALLPREFIX} "${CMAKECURRENTSOURCEDIR}" | |
WORKING_DIRECTORY "${DIRECTORY}" | |
) | |
executeprocess (COMMAND "${CMAKECOMMAND}" | |
--build . |
--- src/Makefile.original2015-02-27 10:53:53.130125907 -0500 | |
+++ src/Makefile 2015-02-27 10:53:24.674126798 -0500 | |
@@ -7,7 +7,7 @@ | |
PLAT= none | |
CC= gcc -std=gnu99 | |
-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS) | |
+CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS) -fPIC | |
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) | |
LIBS= -lm $(SYSLIBS) $(MYLIBS) |
#include "Foo.hpp" | |
#include <iostream> | |
using namespace std; | |
Foo::Foo(int _a, int _b): a(_a), b(_b){ | |
cout << "C++ side, constructor" << endl; | |
} | |
Foo::~Foo(){ |
emacs --daemon
to run in the background.
emacsclient.emacs24 <filename/dirname>
to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
C-/
C-?
M-c
2. Upper Case : M-u
M-l