56 lines
858 B
C
56 lines
858 B
C
#include <stdio.h>
|
|
#include "stdlib.h"
|
|
#include <string.h>
|
|
#define SIZE 100
|
|
#include "a_station.h"
|
|
|
|
struct station {
|
|
struct car** tracks;
|
|
int track_count;
|
|
};
|
|
|
|
struct car {
|
|
int capacity;
|
|
char value[SIZE];
|
|
struct car* next;
|
|
};
|
|
|
|
struct station* create_station() {
|
|
struct station* s = calloc(1, sizeof(struct station));
|
|
s->tracks = calloc(STATION_SIZE, sizeof(struct car*));
|
|
s->track_count = STATION_SIZE;
|
|
return s;
|
|
}
|
|
|
|
int select_track(struct station* s, const char* target) {
|
|
|
|
}
|
|
|
|
void add_target_capacity(struct station* s, const char* target, int capacity) {
|
|
|
|
}
|
|
|
|
struct car* find_target(struct station* s, const char* target) {
|
|
|
|
}
|
|
|
|
int get_total_targets(struct station* s) {
|
|
|
|
}
|
|
|
|
int get_total_capacity(struct station* s) {
|
|
|
|
}
|
|
|
|
void print_station(struct station* s) {
|
|
|
|
}
|
|
|
|
void destroy_station(struct station* s) {
|
|
|
|
}
|
|
|
|
|
|
|
|
|