Last commit before tagging and releasing

This commit is contained in:
capitaomorte
2009-08-29 17:59:02 +00:00
parent 15c7703b5b
commit b8dcf61367
640 changed files with 4360 additions and 77 deletions

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# contributor: Translated from TextMate Snippet
# name: #endif
# binding: "~@."
# --
#endif

View File

@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# key: def
# contributor: Translated from TextMate Snippet
# name: #ifndef … #define … #endif
# --
#ifndef ${1/([A-Za-z0-9_]+).*/$1/}
#define ${1:SYMBOL} ${2:value}
#endif

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: inc
# contributor: Translated from TextMate Snippet
# name: #include "…"
# --
#include "${1:${TM_FILENAME/\..+$/.h/}}"

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: Inc
# contributor: Translated from TextMate Snippet
# name: #include <…>
# --
#include <${1:.h}>

View File

@@ -0,0 +1,11 @@
# -*- mode: snippet -*-
# key: mark
# contributor: Translated from TextMate Snippet
# name: #pragma mark
# --
#if 0
${1:#pragma mark -
}#pragma mark $2
#endif
$0

View File

View File

@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# key: for
# contributor: Translated from TextMate Snippet
# name: For Loop
# --
for(size_t ${2:i} = 0; $2 < ${1:count}; ${3:++$2})
{
${0:/* code */}
}

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: enum
# contributor: Translated from TextMate Snippet
# name: Enumeration
# --
enum ${1:name} { $0 };

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: td
# contributor: Translated from TextMate Snippet
# name: Typedef
# --
typedef ${1:int} ${2:MyCustomType};

View File

@@ -0,0 +1,14 @@
# -*- mode: snippet -*-
# key: cl
# contributor: Translated from TextMate Snippet
# name: Class
# --
class ${1:${TM_FILENAME/(.+)\..+|.*/(?1:\L$1_t:name)/}}
{
public:
${1/(\w+).*/$1/} (${2:arguments});
virtual ~${1/(\w+).*/$1/} ();
private:
${0:/* data */}
};

View File

@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# key: do
# contributor: Translated from TextMate Snippet
# name: Do While Loop
# --
do {
${0:/* code */}
} while(${1:/* condition */});

View File

@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# key: if
# contributor: Translated from TextMate Snippet
# name: If Condition
# --
if(${1:/* condition */})
{
${0:/* code */}
}

View File

@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# key: ns
# contributor: Translated from TextMate Snippet
# name: Namespace
# --
namespace${1/.+/ /m}${1:${TM_FILENAME/^((.*?)\..*)?$/(?1:\L$2:my)/}}
{
$0
}${1/.+/ \/* /m}$1${1/.+/ *\/ /m}

View File

@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# key: st
# contributor: Translated from TextMate Snippet
# name: Struct
# --
struct ${1:${TM_FILENAME/(.+)\..+|.*/(?1:\L$1_t:name)/}}
{
${0:/* data */}
};

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: tp
# contributor: Translated from TextMate Snippet
# name: template <typename …>
# --
template <typename ${1:_InputIter}>

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: beginend
# contributor: Translated from TextMate Snippet
# name: $1.begin(), $1.end()
# --
${1:v}${1/^.*?(-)?(>)?$/(?2::(?1:>:.))/}begin(), ${1:v}${1/^.*?(-)?(>)?$/(?2::(?1:>:.))/}end()

View File

@@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# key: main
# contributor: Translated from TextMate Snippet
# name: main()
# --
int main (int argc, char const${TM_C_POINTER: *}argv[])
{
${0:/* code */}
return 0;
}

View File

@@ -0,0 +1,17 @@
# -*- mode: snippet -*-
# key: once
# contributor: Translated from TextMate Snippet
# name: Header Include-Guard
# --
#ifndef ${1:`#!/usr/bin/env ruby -wKU -riconv
name = ENV["TM_FILENAME"] || "untitled"
name = Iconv.iconv("ASCII//TRANSLIT", "UTF-8", name).first
name = name.gsub(/[^a-z0-9]+/i, "_")
uuid = (rand * 2821109907455).round.to_s(36)
print "#{name}_#{uuid}".tr("[a-z]", "[A-Z]")
`}
#define $1
${TM_SELECTED_TEXT/\Z\n//}${0:}
#endif /* end of include guard: $1 */

View File

@@ -0,0 +1,13 @@
# -*- mode: snippet -*-
# key: readfile
# contributor: Translated from TextMate Snippet
# name: Read File Into Vector
# --
std::vector<char> v;
if(FILE${TM_C_POINTER: *}fp = fopen(${1:"filename"}, "r"))
{
char buf[1024];
while(size_t len = fread(buf, 1, sizeof(buf), fp))
v.insert(v.end(), buf, buf + len);
fclose(fp);
}

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: fprintf
# contributor: Translated from TextMate Snippet
# name: fprintf …
# --
fprintf(${1:stderr}, "${2:%s}\\n"${2/([^%]|%%)*(%.)?.*/(?2:, :\);)/}$3${2/([^%]|%%)*(%.)?.*/(?2:\);)/}

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: printf
# contributor: Translated from TextMate Snippet
# name: printf …
# --
printf("${1:%s}\\n"${1/([^%]|%%)*(%.)?.*/(?2:, :\);)/}$2${1/([^%]|%%)*(%.)?.*/(?2:\);)/}

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: map
# contributor: Translated from TextMate Snippet
# name: std::map
# --
std::map<${1:key}, ${2:value}> map$0;

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: vector
# contributor: Translated from TextMate Snippet
# name: std::vector
# --
std::vector<${1:char}> v$0;