_io Struct Reference

I/O. More...

#include <io.h>

Data Fields

char * in_path
 Input path, if given on the command line.
int in
 Input file descriptor.
int out
 Output file descriptor.
int in_ready
 Flag: Input source is ready to be read.
int out_ready
 Flag: Output source is ready to be written to.
int eof_in
 Flag: End of input has been reached.
int eof_out
 Flag: End of output has been reached.
size_t buffer_size
 The size of the I/O buffer.
char * buffer
 A pointer to the I/O buffer.
size_t buffer_head
 The location of the start of the ring buffer.
size_t buffer_used
 The length of the ring buffer.
ssize_t last_read
 The number of bytes read the last time I/O was performed.
ssize_t last_write
 The number of bytes written the last time I/O was performed.
uint64 total_read
 The total number of bytes read.
uint64 total_write
 The total number of bytes written.
uint64 total_size
 The total size of the input stream, if known.
uint64 continue_size
 If continuing from a previously interrupted stream, assume that this many bytes have already been read and written.
int total_size_known
 Flag: Whether or not the total size of the input stream is known.
uint32 timeout
 The number of microseconds to wait for a change in I/O state.
time_t current_time
 The current time, used for throttling input.
uint64 throttle
 The maximum number of bytes per second that we're allowed to read.
uint64 throttle_count
 The number if bytes read so far for this second.
uint64 block_size
 The size of a block in bytes, used for calculating total_size and buffer_size.

Detailed Description

I/O.

Definition at line 12 of file io.h.


Field Documentation

The size of a block in bytes, used for calculating total_size and buffer_size.

Definition at line 62 of file io.h.

Referenced by ioInit(), parse_block_size_value(), and parse_num().

char* _io::buffer

A pointer to the I/O buffer.

Definition at line 32 of file io.h.

Referenced by ioBegin(), ioEnd(), ioInit(), ioRead(), ioWrite(), and main().

The location of the start of the ring buffer.

Definition at line 34 of file io.h.

Referenced by ioInit(), ioRead(), and ioWrite().

The size of the I/O buffer.

Definition at line 30 of file io.h.

Referenced by ioBegin(), ioCheck(), ioInit(), ioRead(), ioWrite(), parse_buffer_size_value(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().

The length of the ring buffer.

Definition at line 36 of file io.h.

Referenced by ioCheck(), ioEnd(), ioInit(), ioIsDone(), ioRead(), and ioWrite().

If continuing from a previously interrupted stream, assume that this many bytes have already been read and written.

Definition at line 49 of file io.h.

Referenced by ioInit(), and parse_completed_value().

The current time, used for throttling input.

Definition at line 55 of file io.h.

Referenced by ioInit(), and ioRead().

Flag: End of input has been reached.

Definition at line 26 of file io.h.

Referenced by ioInit(), ioIsDone(), ioRead(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().

Flag: End of output has been reached.

Definition at line 28 of file io.h.

Referenced by ioInit(), ioIsDone(), ioWrite(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().

int _io::in

Input file descriptor.

Definition at line 18 of file io.h.

Referenced by ioBegin(), ioCheck(), ioEnd(), ioInit(), ioRead(), main(), parse_args(), parse_infile_value(), sig_int(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().

char* _io::in_path

Input path, if given on the command line.

This is used when copying a file into a directory, the base filename of the input file is used as the filename in the destination directory, so we need to keep it around.

Definition at line 16 of file io.h.

Referenced by ioInit(), parse_infile_value(), and parse_outfile_value().

Flag: Input source is ready to be read.

Definition at line 22 of file io.h.

Referenced by ioCheck(), ioRead(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().

ssize_t _io::last_read

The number of bytes read the last time I/O was performed.

Definition at line 38 of file io.h.

Referenced by ioInit(), ioRead(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().

ssize_t _io::last_write

The number of bytes written the last time I/O was performed.

Definition at line 40 of file io.h.

Referenced by ioInit(), ioWrite(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().

int _io::out

Output file descriptor.

Definition at line 20 of file io.h.

Referenced by ioBegin(), ioCheck(), ioEnd(), ioInit(), ioWrite(), main(), parse_args(), parse_outfile_value(), sig_int(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().

Flag: Output source is ready to be written to.

Definition at line 24 of file io.h.

Referenced by ioCheck(), ioWrite(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().

The maximum number of bytes per second that we're allowed to read.

Definition at line 57 of file io.h.

Referenced by ioInit(), ioRead(), and parse_throttle_value().

The number if bytes read so far for this second.

Definition at line 59 of file io.h.

Referenced by ioInit(), and ioRead().

The number of microseconds to wait for a change in I/O state.

Definition at line 53 of file io.h.

Referenced by ioCheck(), ioInit(), parse_timeout_value(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().

The total number of bytes read.

Definition at line 42 of file io.h.

Referenced by ioInit(), ioRead(), parse_completed_value(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().

The total size of the input stream, if known.

Definition at line 46 of file io.h.

Referenced by calculatePercentComplete(), displayPrint(), ioInit(), parse_infile_value(), parse_size_value(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().

Flag: Whether or not the total size of the input stream is known.

Definition at line 51 of file io.h.

Referenced by calculatePercentComplete(), displayEnd(), displayPrint(), ioInit(), parse_infile_value(), parse_size_value(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().

The total number of bytes written.

Definition at line 44 of file io.h.

Referenced by calculateCountDisplay(), calculatePercentComplete(), calculateThroughputDisplay(), displayPrint(), displayTwiddle(), ioInit(), ioWrite(), parse_completed_value(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().


The documentation for this struct was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Defines

Generated on Thu Aug 26 16:20:09 2010 for bar by  doxygen 1.6.1