11.07.2014 Views

Flute acoustics: measurement, modelling and design - School of ...

Flute acoustics: measurement, modelling and design - School of ...

Flute acoustics: measurement, modelling and design - School of ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

APPENDIX B. PROGRAM LISTINGS 297<br />

/*<br />

Point.h<br />

By Andrew Botros, 2001-2004<br />

Listing B.23: Point.h<br />

A data point ADT.<br />

*/<br />

#ifndef POINT_H_PROTECTOR<br />

#define POINT_H_PROTECTOR<br />

/* Point: { x, y } */<br />

typedef struct point_str {<br />

double x;<br />

double y;<br />

} *Point;<br />

void printPoint(Point p);<br />

/*<br />

Prints the contents <strong>of</strong> a Point struct to stdout.<br />

Parameters:<br />

p: the Point struct.<br />

*/<br />

void printImpedancePoint(Point p);<br />

/*<br />

Prints the contents <strong>of</strong> a Point struct to stdout in the Impedance<br />

format.<br />

Parameters:<br />

p: the Point struct.<br />

*/<br />

Point parseImpedancePoint(char* line, int series);<br />

/*<br />

Parses a line <strong>of</strong> text into its impedance point data.<br />

Parameters:<br />

line: the line <strong>of</strong> data.<br />

Returns:<br />

A Point struct representing the data.<br />

NULL if line does not contain two numbers.<br />

*/<br />

#endif

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!