bosko lekovic
/
ETHtoCOM_10
nova verzija tcp+udp->serial com
Diff: clubbing.cpp
- Revision:
- 3:1196befeace0
- Parent:
- 2:45b351b4fc2a
- Child:
- 5:c9a908749d4c
diff -r 45b351b4fc2a -r 1196befeace0 clubbing.cpp --- a/clubbing.cpp Sun Apr 05 12:56:41 2020 +0000 +++ b/clubbing.cpp Wed Apr 08 08:41:16 2020 +0000 @@ -8,6 +8,30 @@ #include <ctype.h> + +/********************** PRINT-ovi *********************************/ + +void P_niz( char *s, char *niz, int val ) +{ + printf("%s",s); + for( int i=0; i < val; i++) printf("%c", niz[i]); + printf("\n\r"); + fflush(stdout); +} + +void P_int(char *s, int i ) +{ + printf("%s = %d\n\r", s, i); fflush(stdout); +} + +void P_str(const char *s, const char *p ) +{ + printf("%s = %s\n\r", s, p); fflush(stdout); +} + + + +/************************ IP testovi ****************************/ int test_num( char *s ) { int m=strlen(s), n=0, i; @@ -47,3 +71,5 @@ } + +