+int Coke_int_GetSlotStatus(char *Buffer, int Slot)
+{
+ regmatch_t matches[4];
+ int ret;
+ char *status;
+
+ // Parse status response
+ ret = RunRegex(&gCoke_StatusRegex, Buffer, sizeof(matches)/sizeof(matches[0]), matches, "Bad Response");
+ if( ret ) {
+ return -1;
+ }
+
+ // Get slot status
+ Buffer[ matches[3].rm_eo ] = '\0';
+ status = &Buffer[ matches[3].rm_so ];
+
+ #if TRACE_COKE
+ printf("Coke_CanDispense: Machine responded slot status '%s'\n", status);
+ #endif
+
+ if( strcmp(status, "full") == 0 ) {
+ gaCoke_CachedStatus[Slot] = 0; // 0: Avaliiable
+ return 0;
+ }
+ else {
+ gaCoke_CachedStatus[Slot] = 1; // 1: Empty
+ return 1;
+ }
+}
+
+void Coke_int_UpdateSlotStatuses(void)