#include "quotes.h" #include #include void quote_free(struct quote *q) { free(q->symbol); free(q->currency); free(q); } struct quote *quote_find(struct quote **quotes, int n_quotes, const char *symbol, const char *currency) { for (int i = 0; i < n_quotes; ++i) { if (strcmp(quotes[i]->symbol, symbol) == 0 && strcmp(quotes[i]->currency, currency) == 0) return quotes[i]; } return NULL; }