/****************************************************************************** * $Id: xdr_types.h,v 1.2 1994/01/05 15:30:16 courtel Exp $ * * Kind: C test program * Abstract: Mix C and Ada program using XDR coding for data * * Copyright 1990,1993 Centre d'Etudes de la Navigation Aerienne (CENA) ******************************************************************************/ #include enum product_form {SOLID = 0, LIQUID = 1}; typedef long price; #define PRICE_COEF 32 /* For Ada fixed type */ #define ToAdaPrice(x) (int)(PRICE_COEF * x + 0.5) typedef float kilograms; typedef float liters; #define MAX_PHONE 8 struct supplier { char *phone; }; union how_much { kilograms weight; liters volume; }; #define MAX_NAME 30 struct product { enum product_form form; char * name; price cost; int quantity; int last_sellings[3]; struct supplier *from; union how_much how_much; }; typedef struct client *client_list; struct client { int id; client_list next; }; extern bool_t xdr_supplier (); extern bool_t xdr_product (); extern bool_t xdr_client (); extern bool_t xdr_client_list ();