-void
-done(struct cc_usb *cc, int code)
-{
- cc_usb_close(cc);
- exit (code);
-}
-
-static int
-ends_with(char *whole, char *suffix)
-{
- int whole_len = strlen(whole);
- int suffix_len = strlen(suffix);
-
- if (suffix_len > whole_len)
- return 0;
- return strcmp(whole + whole_len - suffix_len, suffix) == 0;
-}
-
-static int
-starts_with(char *whole, char *prefix)
-{
- int whole_len = strlen(whole);
- int prefix_len = strlen(prefix);
-
- if (prefix_len > whole_len)
- return 0;
- return strncmp(whole, prefix, prefix_len) == 0;
-}
-