blob: f59a4b96eaafceb230e8a0bc9bba0f732a1ed157 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include <stdlib.h>
#include <stdbool.h>
#include "icclient/product.h"
#include "icclient/ord.h"
void icclient_ord_init(struct icclient_ord_order *order)
{
order->subtotal = .0;
order->shipping = .0;
order->subtotal = .0;
order->nitems = 0;
}
void icclient_ord_free(struct icclient_ord_order *order)
{
for (size_t i = 0; i < order->nitems; i++)
icclient_product_free(order->items[i]->product);
}
|