This below is not a best way to do debugging printf(s)


printf("\n debug21 <%s>",&var1[19+namelen]);


This below is better in most if not all use cases.


fprintf(stderr, " debug21...