aboutsummaryrefslogtreecommitdiff
path: root/sam/examples
diff options
context:
space:
mode:
Diffstat (limited to 'sam/examples')
-rw-r--r--sam/examples/comment-functions.cmd4
-rw-r--r--sam/examples/comment-functions.in15
2 files changed, 19 insertions, 0 deletions
diff --git a/sam/examples/comment-functions.cmd b/sam/examples/comment-functions.cmd
new file mode 100644
index 0000000..87d04c4
--- /dev/null
+++ b/sam/examples/comment-functions.cmd
@@ -0,0 +1,4 @@
+x/^static/+- g/ int / .,+/^\}/ {
+ i,#if 0\n,
+ a,\n#endif\n,
+}
diff --git a/sam/examples/comment-functions.in b/sam/examples/comment-functions.in
new file mode 100644
index 0000000..49c2452
--- /dev/null
+++ b/sam/examples/comment-functions.in
@@ -0,0 +1,15 @@
+static int addi(int a, int b) {
+ return a+b;
+}
+
+static long addl(long a, long b) {
+ return a+b;
+}
+
+static int muli(int a, int b) {
+ return a*b;
+}
+
+static long mull(long a, long b) {
+ return a*b;
+}