aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorM.Gergő2020-05-07 00:22:25 +0200
committerM.Gergő2020-05-07 00:22:25 +0200
commit4cd4beaf0a6d8032fe88efbbc6cb42303766e9f6 (patch)
treec1629cdcaeac39a5e6d3bdafef4bff1e965adc12 /src/main.c
parent3cff0f1ab97bf61a53cc9c74b5e259947b3e2861 (diff)
downloadlightconfini-4cd4beaf0a6d8032fe88efbbc6cb42303766e9f6.tar.gz
lightconfini-4cd4beaf0a6d8032fe88efbbc6cb42303766e9f6.zip
README + LICENCE
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 1e6246f..728c6da 100644
--- a/src/main.c
+++ b/src/main.c
@@ -14,7 +14,7 @@ int main()
{
char filename[] = "tests/test.ini", *buff1, *buff2, *buff3, *buff4, *buff5;
lci_data *ini=NULL, *tmp=NULL;
- int len=0, elen=50;
+ int len=0, elen=50, lens=0, lenp=0, lenv=0, lenc=0;
FILE *fp;
fp = fopen(filename, "rb");
@@ -33,6 +33,11 @@ int main()
printf("\n");
+ lens=18;
+ lenp=18;
+ lenv=18;
+ lenc=44;
+
tmp = ini;
while(tmp != NULL){
@@ -44,7 +49,8 @@ int main()
snprintf(buff5, elen, "'%s' %3ld", tmp->errorMsg, tmp->errorMsgLen);
- printf("LN: %ld,\tLL: %ld,\tSE: %*s, P: %*s, V: %*s, C: %*s, ER: %*s \n", tmp->lineNum, tmp->lineLen,len+6, buff1, len+6, buff2, len+6, buff3, len+6, buff4, elen, buff5);
+ printf("LN: %ld,\tLL: %ld,\tSE: %*s,%2ld P: %*s,%2ld V: %*s,%2ld C: %*s,%2ld ER: %*s \n", tmp->lineNum, tmp->lineLen, lens, buff1,tmp->sectionStartPos,
+ lenp, buff2, tmp->paramStartPos, lenv, buff3, tmp->valueStartPos, lenc, buff4, tmp->commentStartPos, elen, buff5);
tmp=tmp->next;
}