aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorM.Gergő2020-05-08 21:10:20 +0200
committerM.Gergő2020-05-08 21:10:20 +0200
commit1ed4114bb3b9e701dcf6b2d8f1c6da2b47979d4d (patch)
tree5527f11faed55f5eb5e5f27ac24207cb36435a73 /src/main.c
parent8b42a04bf6df46fa06e2333a0b41b3c92e7ef4f1 (diff)
downloadlightconfini-1ed4114bb3b9e701dcf6b2d8f1c6da2b47979d4d.tar.gz
lightconfini-1ed4114bb3b9e701dcf6b2d8f1c6da2b47979d4d.zip
escaping
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 72f1718..9aa15e5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2,7 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-#include <stdbool.h>
+#include <stdbool.h>
#include <linux/limits.h> /* PATH_MAX*/
#include "ini_rw.h"
@@ -26,12 +26,36 @@ int main()
buff3 = malloc((len+3)*sizeof(char));
buff4 = malloc((len+3)*sizeof(char));
buff5 = malloc((elen+3)*sizeof(char));
+memset(buff1, 0, (len+3)*sizeof(char));
+memset(buff2, 0, (len+3)*sizeof(char));
+memset(buff3, 0, (len+3)*sizeof(char));
+memset(buff4, 0, (len+3)*sizeof(char));
+memset(buff5, 0, (elen+3)*sizeof(char));
+ char *aa, *bb, *cc;
+ aa = (char *) malloc(20*sizeof(char));
+ aa[0] = 'q';
+ aa[1] = 'w';
+ aa[2] = 'e';
+ aa[3] = '\0';
+ bb = (char *) malloc(30*sizeof(char));
+
+ cc=aa;
+ strncpy(bb,aa,20);
+ free(aa);
+ free(NULL);
+
+ printf("\n%s\n", bb);
+
+
- ini = iniReadOut(filename);
+
- printf("\n");
+
+ printf("\nLineMax: %d\n\n",len);
+
+ ini = iniReadOut(filename);
lens=18;
lenp=18;