patch-docs_man3_qbarray_h_3 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. --- libqb-0.16.0.orig/docs/man3/qbarray.h.3 2013-07-25 20:16:18.000000000 +0200
  2. +++ libqb-0.16.0/docs/man3/qbarray.h.3 2013-09-09 05:26:31.375811771 +0200
  3. @@ -1,4 +1,4 @@
  4. -.TH "qbarray.h" 3 "Thu Jul 25 2013" "Version 0.16.0" "libqb" \" -*- nroff -*-
  5. +.TH "qbarray.h" 3 "Mon Sep 9 2013" "Version 0.16.0" "libqb" \" -*- nroff -*-
  6. .ad l
  7. .nh
  8. .SH NAME
  9. @@ -69,28 +69,25 @@ This is a dynamic array (it can grow, bu
  10. .PP
  11. .nf
  12. -arr = qb_array_create_2(64, sizeof(struct my_struct), 256);
  13. -\&.\&.\&.
  14. -res = qb_array_index(arr, idx, (void**)&my_ptr);
  15. -if (res < 0) {
  16. - return res;
  17. -}
  18. -// use my_ptr, now even if there is a grow, this pointer will be valid\&.
  19. + arr = qb_array_create_2(64, sizeof(struct my_struct), 256);
  20. + \&.\&.\&.
  21. + res = qb_array_index(arr, idx, (void**)&my_ptr);
  22. + if (res < 0) {
  23. + return res;
  24. + }
  25. + // use my_ptr, now even if there is a grow, this pointer will be valid\&.
  26. .fi
  27. .PP
  28. .SH "Typedef Documentation"
  29. .PP
  30. -.SS "typedef void(* qb_array_new_bin_cb_fn)(\fBqb_array_t\fP *a, uint32_t bin)"
  31. -
  32. +.SS "typedef void(* \fBqb_array_new_bin_cb_fn\fP)(\fBqb_array_t\fP *a, uint32_t bin)"
  33. .SS "typedef struct qb_array \fBqb_array_t\fP"
  34. -
  35. .PP
  36. This is an opaque data type representing an instance of an array\&.
  37. .SH "Function Documentation"
  38. .PP
  39. -.SS "\fBqb_array_t\fP* qb_array_create (size_tmax_elements, size_telement_size)"
  40. -
  41. +.SS "\fBqb_array_t\fP* \fBqb_array_create\fP (size_tmax_elements, size_telement_size)"
  42. .PP
  43. Create an array with fixed sized elements\&. \fBParameters:\fP
  44. .RS 4
  45. @@ -105,8 +102,7 @@ array instance\&.
  46. .RE
  47. .PP
  48. -.SS "\fBqb_array_t\fP* qb_array_create_2 (size_tmax_elements, size_telement_size, size_tautogrow_elements)"
  49. -
  50. +.SS "\fBqb_array_t\fP* \fBqb_array_create_2\fP (size_tmax_elements, size_telement_size, size_tautogrow_elements)"
  51. .PP
  52. Create an array with fixed sized elements\&. \fBParameters:\fP
  53. .RS 4
  54. @@ -123,12 +119,10 @@ array instance\&.
  55. .RE
  56. .PP
  57. -.SS "size_t qb_array_elems_per_bin_get (\fBqb_array_t\fP *a)"
  58. -
  59. +.SS "size_t \fBqb_array_elems_per_bin_get\fP (\fBqb_array_t\fP *a)"
  60. .PP
  61. Get the number of elements per bin\&.
  62. -.SS "void qb_array_free (\fBqb_array_t\fP *a)"
  63. -
  64. +.SS "void \fBqb_array_free\fP (\fBqb_array_t\fP *a)"
  65. .PP
  66. Free all the memory used by the array\&. \fBParameters:\fP
  67. .RS 4
  68. @@ -136,8 +130,7 @@ Free all the memory used by the array\&.
  69. .RE
  70. .PP
  71. -.SS "int32_t qb_array_grow (\fBqb_array_t\fP *a, size_tmax_elements)"
  72. -
  73. +.SS "int32_t \fBqb_array_grow\fP (\fBqb_array_t\fP *a, size_tmax_elements)"
  74. .PP
  75. Grow the array\&. \fBParameters:\fP
  76. .RS 4
  77. @@ -152,8 +145,7 @@ Grow the array\&. \fBParameters:\fP
  78. .RE
  79. .PP
  80. -.SS "int32_t qb_array_index (\fBqb_array_t\fP *a, int32_tidx, void **element_out)"
  81. -
  82. +.SS "int32_t \fBqb_array_index\fP (\fBqb_array_t\fP *a, int32_tidx, void **element_out)"
  83. .PP
  84. Get an element at a particular index\&. \fBParameters:\fP
  85. .RS 4
  86. @@ -170,12 +162,10 @@ Get an element at a particular index\&.
  87. .RE
  88. .PP
  89. -.SS "int32_t qb_array_new_bin_cb_set (\fBqb_array_t\fP *a, \fBqb_array_new_bin_cb_fn\fPfn)"
  90. -
  91. +.SS "int32_t \fBqb_array_new_bin_cb_set\fP (\fBqb_array_t\fP *a, \fBqb_array_new_bin_cb_fn\fPfn)"
  92. .PP
  93. Get a callback when a new bin is allocated\&.
  94. -.SS "size_t qb_array_num_bins_get (\fBqb_array_t\fP *a)"
  95. -
  96. +.SS "size_t \fBqb_array_num_bins_get\fP (\fBqb_array_t\fP *a)"
  97. .PP
  98. Get the number of bins used or the array\&.
  99. .SH "Author"