aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--help-string.pd5
-rw-r--r--k_cext_generatecode.c21
2 files changed, 25 insertions, 1 deletions
diff --git a/help-string.pd b/help-string.pd
new file mode 100644
index 0000000..b303b4f
--- /dev/null
+++ b/help-string.pd
@@ -0,0 +1,5 @@
+#N canvas 0 0 450 300 10;
+#X msg 31 84 bang;
+#X obj 30 125 k_cext \; system(s<echo something>s) \;;
+#X text 26 40 Strings are started with s< and ended with >s;
+#X connect 0 0 1 0;
diff --git a/k_cext_generatecode.c b/k_cext_generatecode.c
index 254eb9f..93023a4 100644
--- a/k_cext_generatecode.c
+++ b/k_cext_generatecode.c
@@ -193,10 +193,28 @@ static void k_cext_gen_mainfunccode(t_k_cext *x,int argc, t_atom* argv,int i, st
break;
case A_SYMBOL:
sprintf(string,"%s",atom_getsymbolarg(i,argc,argv)->s_name);
+
+ printf("string: \"%s\"\n",string);
+
+ if(strstr(string,"s<")!=NULL){
+ char *pos=strstr(string,"s<");
+ pos[0]=' ';
+ pos[1]='\"';
+ printf("japp\n");
+ }
+
+ if(strstr(string,">s")!=NULL){
+ char *pos=strstr(string,">s");
+ pos[0]='\"';
+ pos[1]=' ';
+ printf("japp2n");
+ }
+
if(!strcmp(".",string)){
sprintf(string," ");
k->indentation++;
-
+
+
}else{if(!strcmp("DO",string)){
k->set_indentation[k->indentation]=1;
sprintf(string,"BEGIN");
@@ -253,6 +271,7 @@ static void k_cext_gen_mainfunccode(t_k_cext *x,int argc, t_atom* argv,int i, st
*/
}
}
+
fprintf(k->file,"%s",string);
if(string[strlen(string)-1]!='\n') fprintf(k->file," ");
break;