Commit fd498c68a141bb5340e79a1ce7da9b43b8ca7830

Authored by henyxia
1 parent e4e1a578

Some more features, but more leak too

Showing 3 changed files with 6 additions and 26 deletions   Show diff stats
log.txt deleted
@@ -1,20 +0,0 @@ @@ -1,20 +0,0 @@
1 -==7664== Memcheck, a memory error detector  
2 -==7664== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.  
3 -==7664== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info  
4 -==7664== Command: ./tweekd  
5 -==7664==  
6 -==7664==  
7 -==7664== HEAP SUMMARY:  
8 -==7664== in use at exit: 408 bytes in 3 blocks  
9 -==7664== total heap usage: 16 allocs, 13 frees, 2,428 bytes allocated  
10 -==7664==  
11 -==7664== LEAK SUMMARY:  
12 -==7664== definitely lost: 0 bytes in 0 blocks  
13 -==7664== indirectly lost: 0 bytes in 0 blocks  
14 -==7664== possibly lost: 408 bytes in 3 blocks  
15 -==7664== still reachable: 0 bytes in 0 blocks  
16 -==7664== suppressed: 0 bytes in 0 blocks  
17 -==7664== Rerun with --leak-check=full to see details of leaked memory  
18 -==7664==  
19 -==7664== For counts of detected and suppressed errors, rerun with: -v  
20 -==7664== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)  
@@ -18,12 +18,11 @@ float start; @@ -18,12 +18,11 @@ float start;
18 18
19 void removeCharFromString(char c, char *str) 19 void removeCharFromString(char c, char *str)
20 { 20 {
21 -/* int len = strlen(str)+1; 21 + int len = strlen(str)+1;
22 22
23 for(int i=0; i<len; i++) 23 for(int i=0; i<len; i++)
24 if(str[i] == c) 24 if(str[i] == c)
25 strncpy(&str[i],&str[i+1],len-i); 25 strncpy(&str[i],&str[i+1],len-i);
26 -*/  
27 } 26 }
28 27
29 bool initLog() 28 bool initLog()
@@ -129,10 +129,11 @@ char* fillLogWithSpaces(char* buf, char* text) @@ -129,10 +129,11 @@ char* fillLogWithSpaces(char* buf, char* text)
129 } 129 }
130 130
131 char* fillStatusWithSpaces(char* buf, char* text) 131 char* fillStatusWithSpaces(char* buf, char* text)
132 -{/*  
133 - strncpy(buf, text, LOG_LENGTH);  
134 - strncat(buf, SPACES, LOG_LENGTH-strlen(buf)-1-7);  
135 -*/ 132 +{
  133 + //TODO
  134 + //strncpy(buf, text, LOG_LENGTH);
  135 + //strncat(buf, SPACES, LOG_LENGTH-strlen(buf)-1-8);
  136 +
136 return buf; 137 return buf;
137 } 138 }
138 139