function.cxx 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. * 'foo_void_function()' - Do foo with bar.
  3. *
  4. * Use the @link foo_float_function@ or @link foo_int_function@ functions
  5. * instead. Pass @code NULL@ for "three" then there is no string to print.
  6. *
  7. * @deprecated@
  8. */
  9. void
  10. foo_void_function(int one, /* I - Integer */
  11. float *two, /* O - Real number */
  12. const char *three) /* I - String */
  13. {
  14. if (one)
  15. {
  16. puts("Hello, World!");
  17. }
  18. else
  19. puts(three);
  20. *two = 2.0f;
  21. }
  22. /*
  23. * 'foo_float_function()' - Do foo with bar.
  24. *
  25. * @since 1.2@
  26. */
  27. float /* O - Real number */
  28. foo_float_function(int one, /* I - Integer */
  29. const char *two) /* I - String */
  30. {
  31. if (one)
  32. {
  33. puts("Hello, World!");
  34. }
  35. else
  36. puts(two);
  37. return (2.0f);
  38. }
  39. /*
  40. * 'foo_default_string()' - Do something with a defaulted string arg.
  41. */
  42. int /* O - Integer value */
  43. foo_default_string(int one, /* I - Integer */
  44. const char *two = "2")
  45. /* I - String */
  46. {
  47. if (one)
  48. {
  49. puts("Hello, World!");
  50. }
  51. else
  52. puts(two);
  53. return (2);
  54. }
  55. /*
  56. * 'foo_default_int()' - Do something with a defaulted int arg.
  57. */
  58. int /* O - Integer value */
  59. foo_default_int(int one, /* I - Integer */
  60. int two = 2) /* I - Integer */
  61. {
  62. if (one)
  63. {
  64. puts("Hello, World!");
  65. }
  66. else
  67. puts(two);
  68. return (2);
  69. }
  70. /*
  71. * 'foo_void_func()' - Function taking no arguments.
  72. */
  73. void
  74. foo_void_func(void)
  75. {
  76. puts("foo_void_func()");
  77. }
  78. /*
  79. * 'foo_private_func()' - Private function.
  80. *
  81. * @private@
  82. */
  83. void
  84. foo_private_func(void)
  85. {
  86. puts("foo_private_func()");
  87. }