aaio.c 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * AAIO Advanced I/O
  3. * -----------------
  4. *
  5. * Many people moving from Windows programming to UNIX program have problems
  6. * with the missing non-blocking getch() and getche() functions provided by
  7. * conio.h. This library provides the functionality of getch(), getche() and
  8. * kbhit(). It does not require an initialization (like curses) and does
  9. * not abuse the terminal (i.e. whenever the mode of the terminal is
  10. * changed its state is stored so it can be restored). For increased
  11. * efficiency there exists funcionality to allow abuse of the terminal as well
  12. * as functions to restore or reset the terminal when the application exits.
  13. */
  14. /*
  15. -----BEGIN PGP SIGNED MESSAGE-----
  16. Hash: SHA1
  17. * Copyright (c) 2004-2005 by Daniel Aarno - <[email protected]>
  18. * M. Sc. Electrical Engineering * http://www.nada.kth.se/~bishop
  19. *
  20. * All Rights Reserved
  21. * ATTRIBUTION ASSURANCE LICENSE (adapted from the original BSD license)
  22. * Redistribution and use in source and binary forms, with or without
  23. * modification, are permitted provided that the conditions below are met.
  24. * These conditions require a modest attribution to (the
  25. * "Author"), who hopes that its promotional value may help justify the
  26. * thousands of dollars in otherwise billable time invested in writing
  27. * this and other freely available, open-source software.
  28. *
  29. * 1. Redistributions of source code, in whole or part and with or without
  30. * modification (the "Code"), must prominently display this GPG-signed
  31. * text in verifiable form.
  32. * 2. Redistributions of the Code in binary form must be accompanied by
  33. * this GPG-signed text in any documentation and, each time the resulting
  34. * executable program or a program dependent thereon is launched, a
  35. * prominent display (e.g., splash screen or banner text) of the Author's
  36. * attribution information, which includes:
  37. * (a) Name ("Daniel Aarno"),
  38. * (b) Professional identification ("M. Sc. Electrical Engineering"), and
  39. * (c) URL ("http://www.nada.kth.se/~bishop").
  40. * 3. Neither the name nor any trademark of the Author may be used to
  41. * endorse or promote products derived from this software without specific
  42. * prior written permission.
  43. * 4. Users are entirely responsible, to the exclusion of the Author and
  44. * any other persons, for compliance with (1) regulations set by owners or
  45. * administrators of employed equipment, (2) licensing terms of any other
  46. * software, and (3) local regulations regarding use, including those
  47. * regarding import, export, and use of encryption software.
  48. *
  49. * THIS FREE SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND
  50. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  51. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  52. * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  53. * EVENT SHALL THE AUTHOR OR ANY CONTRIBUTOR BE LIABLE FOR
  54. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  55. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  56. * EFFECTS OF UNAUTHORIZED OR MALICIOUS NETWORK ACCESS;
  57. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  58. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  59. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  60. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  61. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  62. * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  63. -----BEGIN PGP SIGNATURE-----
  64. Version: GnuPG v1.2.4 (GNU/Linux)
  65. iD8DBQFCHuXui6ECThHTSIkRAk9qAKCVs7kMSUtv5YhljeQsAA52EcjTFgCeNflz
  66. w0lAUG3zeHQcJ+7t6tpce4s=
  67. =qlVs
  68. -----END PGP SIGNATURE-----
  69. */
  70. #ifdef OLD_STYLE
  71. #define _L_AAIO1_
  72. #else
  73. #define _L_AAIO2_
  74. #endif
  75. #ifdef _L_AAIO1_
  76. #include "aaio1.c"
  77. #endif
  78. #ifdef _L_AAIO2_
  79. #include "aaio2.c"
  80. #endif