Index: uspace/lib/posix/stdlib.c
===================================================================
--- uspace/lib/posix/stdlib.c	(revision ca1f1eceb26a32fe6170a6432c28d9c08c765234)
+++ uspace/lib/posix/stdlib.c	(revision 087c87980bf17015f89d56dc5abfb18a9c54e33b)
@@ -31,5 +31,5 @@
  * @{
  */
-/** @file
+/** @file Standard library definitions.
  */
 
@@ -59,4 +59,5 @@
 
 /**
+ * Integer absolute value.
  * 
  * @param i Input value.
@@ -69,4 +70,5 @@
 
 /**
+ * Long integer absolute value.
  * 
  * @param i Input value.
@@ -79,4 +81,5 @@
 
 /**
+ * Long long integer absolute value.
  * 
  * @param i Input value.
@@ -88,4 +91,11 @@
 }
 
+/**
+ * Compute the quotient and remainder of an integer division.
+ *
+ * @param numer Numerator.
+ * @param denom Denominator.
+ * @return Quotient and remainder packed into structure.
+ */
 posix_div_t posix_div(int numer, int denom)
 {
@@ -93,4 +103,11 @@
 }
 
+/**
+ * Compute the quotient and remainder of a long integer division.
+ *
+ * @param numer Numerator.
+ * @param denom Denominator.
+ * @return Quotient and remainder packed into structure.
+ */
 posix_ldiv_t posix_ldiv(long numer, long denom)
 {
@@ -98,4 +115,11 @@
 }
 
+/**
+ * Compute the quotient and remainder of a long long integer division.
+ *
+ * @param numer Numerator.
+ * @param denom Denominator.
+ * @return Quotient and remainder packed into structure.
+ */
 posix_lldiv_t posix_lldiv(long long numer, long long denom)
 {
@@ -109,5 +133,4 @@
  * @param elem2 Second element to compare.
  * @param compare Comparison function without userdata parameter.
- *
  * @return Relative ordering of the elements.
  */
@@ -121,8 +144,8 @@
  * Array sorting utilizing the quicksort algorithm.
  *
- * @param array
- * @param count
- * @param size
- * @param compare
+ * @param array Array of elements to sort.
+ * @param count Number of elements in the array.
+ * @param size Width of each element.
+ * @param compare Decides relative ordering of two elements.
  */
 void posix_qsort(void *array, size_t count, size_t size,
@@ -171,9 +194,10 @@
 /**
  * Retrieve a value of the given environment variable.
+ *
  * Since HelenOS doesn't support env variables at the moment,
  * this function always returns NULL.
  *
- * @param name
- * @return Always NULL.
+ * @param name Name of the variable.
+ * @return Value of the variable or NULL if such variable does not exist.
  */
 char *posix_getenv(const char *name)
@@ -195,7 +219,10 @@
 
 /**
- *
- * @param string String to be passed to a command interpreter.
- * @return
+ * Issue a command.
+ *
+ * @param string String to be passed to a command interpreter or NULL.
+ * @return Termination status of the command if the command is not NULL,
+ *     otherwise indicate whether there is a command interpreter (non-zero)
+ *     or not (zero).
  */
 int posix_system(const char *string) {
@@ -205,10 +232,14 @@
 
 /**
- * 
- * @param name
- * @param resolved
- * @return
- */
-char *posix_realpath(const char *name, char *resolved)
+ * Resolve absolute pathname.
+ * 
+ * @param name Pathname to be resolved.
+ * @param resolved Either buffer for the resolved absolute pathname or NULL.
+ * @return On success, either resolved (if it was not NULL) or pointer to the
+ *     newly allocated buffer containing the absolute pathname (if resolved was
+ *     NULL). Otherwise NULL.
+ *
+ */
+char *posix_realpath(const char *restrict name, char *restrict resolved)
 {
 	#ifndef PATH_MAX
@@ -254,6 +285,6 @@
  * its native representation. See posix_strtold().
  *
- * @param nptr
- * @return
+ * @param nptr String representation of a floating-point number.
+ * @return Double-precision number resulting from the string conversion.
  */
 double posix_atof(const char *nptr)
@@ -266,7 +297,8 @@
  * its native representation. See posix_strtold().
  *
- * @param nptr
- * @param endptr
- * @return
+ * @param nptr String representation of a floating-point number.
+ * @param endptr Pointer to the final part of the string which
+ *     was not used for conversion.
+ * @return Single-precision number resulting from the string conversion.
  */
 float posix_strtof(const char *restrict nptr, char **restrict endptr)
@@ -279,7 +311,8 @@
  * its native representation. See posix_strtold().
  *
- * @param nptr
- * @param endptr
- * @return
+ * @param nptr String representation of a floating-point number.
+ * @param endptr Pointer to the final part of the string which
+ *     was not used for conversion.
+ * @return Double-precision number resulting from the string conversion.
  */
 double posix_strtod(const char *restrict nptr, char **restrict endptr)
@@ -289,7 +322,8 @@
 
 /**
- *
- * @param size
- * @return
+ * Allocate memory chunk.
+ *
+ * @param size Size of the chunk to allocate.
+ * @return Either pointer to the allocated chunk or NULL if not possible.
  */
 void *posix_malloc(size_t size)
@@ -299,8 +333,9 @@
 
 /**
- *
- * @param nelem
- * @param elsize
- * @return
+ * Allocate memory for an array of elements.
+ *
+ * @param nelem Number of elements in the array.
+ * @param elsize Size of each element.
+ * @return Either pointer to the allocated array or NULL if not possible.
  */
 void *posix_calloc(size_t nelem, size_t elsize)
@@ -310,8 +345,9 @@
 
 /**
- *
- * @param ptr
- * @param size
- * @return
+ * Reallocate memory chunk to a new size.
+ *
+ * @param ptr Memory chunk to reallocate. Might be NULL.
+ * @param size Size of the reallocated chunk. Might be zero.
+ * @return Either NULL or the pointer to the newly reallocated chunk.
  */
 void *posix_realloc(void *ptr, size_t size)
@@ -321,6 +357,7 @@
 
 /**
- *
- * @param ptr
+ * Free allocated memory chunk.
+ *
+ * @param ptr Memory chunk to be freed.
  */
 void posix_free(void *ptr)
@@ -343,9 +380,11 @@
 
 /**
- * Should read system load statistics. Not supported. Always returns -1.
- *
- * @param loadavg
- * @param nelem
- * @return
+ * Get system load average statistics.
+ *
+ * Not supported. Always returns -1.
+ *
+ * @param loadavg Array where the load averages shall be placed.
+ * @param nelem Maximum number of elements to be placed into the array.
+ * @return Number of elements placed into the array on success, -1 otherwise.
  */
 int bsd_getloadavg(double loadavg[], int nelem)
