summaryrefslogtreecommitdiff
path: root/tools/checkwps/checkwps.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/checkwps/checkwps.c')
-rw-r--r--tools/checkwps/checkwps.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c
index 32d7ef16fd..6760d6215e 100644
--- a/tools/checkwps/checkwps.c
+++ b/tools/checkwps/checkwps.c
@@ -98,36 +98,6 @@ unsigned int htole32(unsigned int x)
98} 98}
99#endif 99#endif
100 100
101int read_line(int fd, char* buffer, int buffer_size)
102{
103 int count = 0;
104 int num_read = 0;
105
106 errno = 0;
107
108 while (count < buffer_size)
109 {
110 unsigned char c;
111
112 if (1 != read(fd, &c, 1))
113 break;
114
115 num_read++;
116
117 if ( c == '\n' )
118 break;
119
120 if ( c == '\r' )
121 continue;
122
123 buffer[count++] = c;
124 }
125
126 buffer[MIN(count, buffer_size - 1)] = 0;
127
128 return errno ? -1 : num_read;
129}
130
131int recalc_dimension(struct dim *dst, struct dim *src) 101int recalc_dimension(struct dim *dst, struct dim *src)
132{ 102{
133 return 0; 103 return 0;