This commit is contained in:
2024-04-30 07:08:23 +02:00
commit a711247971
2043 changed files with 16874 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
cc-mode
c-lang-common

6
snippets/c-mode/assert Normal file
View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: assert
# key: ass
# --
#include <assert.h>
$0

5
snippets/c-mode/compile Normal file
View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: compile
# key: compile
# --
// -*- compile-command: "${1:gcc -Wall -o ${2:dest} ${3:file}}" -*-

5
snippets/c-mode/define Normal file
View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: define
# key: d
# --
#define $0

5
snippets/c-mode/fgets Normal file
View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: fgets
# key: fgets
# --
fgets(${1:variable}, ${2:size}, ${3:stdin});

5
snippets/c-mode/fprintf Normal file
View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: fprintf
# key: fprintf
# --
fprintf(${1:stdout}, "${2:format string}", ${3:variable});

6
snippets/c-mode/malloc Normal file
View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: malloc
# key: malloc
# --
malloc(sizeof($1)${2: * ${3:3}});
$0

5
snippets/c-mode/packed Normal file
View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: packed
# key: packed
# --
__attribute__((__packed__))$0

5
snippets/c-mode/printf Normal file
View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: printf
# key: pr
# --
printf("${1:format string}"${2: ,a0,a1});

5
snippets/c-mode/scanf Normal file
View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: scanf
# key: scanf
# --
scanf("${1:format string}", ${2:&variable});

5
snippets/c-mode/stdio Normal file
View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: stdio
# key: io
# --
#include <stdio.h>

5
snippets/c-mode/stdlib Normal file
View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: stdlib
# key: std
# --
#include <stdlib.h>

5
snippets/c-mode/string Normal file
View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: string
# key: str
# --
#include <string.h>

5
snippets/c-mode/strstr Normal file
View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: strstr
# key: strstr
# --
strstr(${1:string}, ${2:string});

7
snippets/c-mode/union Normal file
View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: union
# key: union
# --
typedef union {
$0
} ${1:name};

5
snippets/c-mode/unistd Normal file
View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: unistd
# key: uni
# --
#include <unistd.h>