Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Indent the rest of the code (examples, buildtools, doc...) except for examples/SMPI...
[simgrid.git] / tools / tesh2 / include / reader.h
index fa47ca4..3a731d2 100644 (file)
@@ -1,28 +1,62 @@
-#ifndef __READER_H
-#define __READER_H
-
-#include <com.h>
-
-#ifdef __cplusplus
+/*\r
+ * include/reader.h - type representing the object used to read from the stdin \r
+ * (redirected) of a command.\r
+ *\r
+ * Copyright 2008,2009 Martin Quinson, Malek Cherier All right reserved. \r
+ *\r
+ * This program is free software; you can redistribute it and/or modify it \r
+ * under the terms of the license (GNU LGPL) which comes with this package.\r
+ *\r
+ * Purpose:\r
+ *             This file contains all the declarations of the functions related with\r
+ *             the tesh writer type.\r
+ *\r
+ */  \r
+    \r
+#ifndef __READER_H\r
+#define __READER_H\r
+    \r
+#include <com.h>\r
+    \r
+#ifdef __cplusplus\r
 extern "C" {
-#endif
-
-
-
-reader_t
-reader_new(command_t command);
-
-void
-reader_free(reader_t* reader);
-
-void
-reader_read(reader_t reader);
-
-void
-reader_wait(reader_t reader);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !__READER_H */
+  \r
+#endif  /* \r */
+  \r \r
+/*! \brief reader_new - create a new reader.\r
+ *\r
+ * \param command      The command owning the stdout readed by the reader.\r
+ *\r
+ * \return                     If successful the function returns the newly created\r
+ *                                     reader. Otherwise the function returns NULL and sets the\r
+ *                                     global variable errno with the appropiate error code.\r
+ *\r
+ * errors :\r
+ *                                     [EINVAL] if the parameter is invalid.\r
+ *                                     [ENOMEM] if the system has not enough space to allocate\r
+ *                                              the reader.\r
+ */ \r
+  reader_t \r reader_new(command_t command);
+  \r \r
+/*! \brief reader_free - destroy a reader object.\r
+ *\r
+ * \param ptr          A pointer to the reader object to destroy.\r
+ *\r
+ * \return                     If successful the function returns the 0. Otherwise \r
+ *                                     the function returns -1 and sets the global variable \r
+ *                                     errno with the appropiate error code.\r
+ *\r
+ * errors :\r
+ *                                     [EINVAL] if the reader object pointed to by the parameter ptr is invalid.\r
+ *                                     \r
+ *                                     \r
+ */ \r
+  int \r reader_free(reader_t * ptr);
+  \r \r void \r reader_read(reader_t reader);
+  \r \r void \r reader_wait(reader_t reader);
+  \r \r
+#ifdef __cplusplus\r
+} \r
+#endif  /* \r */
+\r
+#endif  /* !__READER_H */\r