Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. mini parsing(char *input)
  2. {
  3. // 17:55 * CAR1
  4. long h, m;
  5. mini c;
  6. c.time = -1;
  7. c.st = '!';
  8. h = strtol(input, &input, 10);
  9. if (*input != ':')
  10. return c;
  11. ++input;
  12. m = strtol(input, &input, 10);
  13. c.time = h*60 + m;
  14. ++input;
  15. c.st = *input;
  16. return c;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement