Originally posted by ereptur
What do you mean it's not fixed? Are you printing out pages alphabetically? If that's the case, then you can do the modulus on the 60 lines records and also test for changes in the first letter of the record.
The number of lines of a record is not fixed mean
the first record maybe like this:
Name: Freddy
Address: Flat abc, xyz street
mnopq district,
hong kong
the second record maybe like this:
Name : Mary
Address: Room abc
15 floor,
DEF Bldg.,
XXX street,
qqq,
Hong Kong
so, the first record have 4 lines, if a A4 paper should write, say 60 lines, i can fill the remaining line by 56 times fwrite("\n")
but
the second record have 7 number of lines, it should write 53 times..
do u get what i mean??
sorry for my poor english /.\