MCPcopy Create free account
hub / github.com/NetHack/NetHack / speednum

Function speednum

sys/share/unixtty.c:156–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154
155#ifdef POSIX_TYPES
156static int
157speednum(speed_t speed)
158{
159 switch (speed) {
160 case B0:
161 return 0;
162 case B50:
163 return 1;
164 case B75:
165 return 2;
166 case B110:
167 return 3;
168 case B134:
169 return 4;
170 case B150:
171 return 5;
172 case B200:
173 return 6;
174 case B300:
175 return 7;
176 case B600:
177 return 8;
178 case B1200:
179 return 9;
180 case B1800:
181 return 10;
182 case B2400:
183 return 11;
184 case B4800:
185 return 12;
186 case B9600:
187 return 13;
188 case B19200:
189 return 14;
190 case B38400:
191 return 15;
192 }
193
194 return 0;
195}
196#endif
197
198static void

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected