]> rtime.felk.cvut.cz Git - sysless.git/blobdiff - libs4c/cmdproc/cmd_proc.h
cmdproc: Add more comments
[sysless.git] / libs4c / cmdproc / cmd_proc.h
index 1f0cf00194cf7fb03d06039fafe260cffeb60140..db6d423d1f38ba592c0e047ccd8f8af8ddcfeb27 100644 (file)
@@ -28,7 +28,9 @@
 
 #define FL_ELB_ECHO   0x10      /* Read characters are echoed back */
 #define FL_ELB_INSEND 0x20      /* The line is currently being sent */
-#define FL_ELB_NOCRLF 0x40      /* CR and/or LF will not start the new line */
+#define FL_ELB_NOCRLF 0x40      /* CR and/or LF will not start a new
+                                * line (used for out buffers to store
+                                * more than a single line) */
 #define CMD_DES_CONTINUE_AT_ID ((cmd_des_t*)1)
 #define CMD_DES_INCLUDE_SUBLIST_ID ((cmd_des_t*)2)
 #define CMD_DES_CONTINUE_AT(list)     CMD_DES_CONTINUE_AT_ID,((cmd_des_t*)list)
@@ -58,8 +60,11 @@ typedef struct cmd_io{
   int (*read)(struct cmd_io *cmd_io,void *buf,int count);
   union {
     struct {
-      ed_line_buf_t *in;
-      ed_line_buf_t *out;
+      ed_line_buf_t *in;  /* Buffer for storing the read command line */
+      ed_line_buf_t *out; /* Temporarily stores characters to be sent
+                          * out (until the send operation is
+                          * finished). This is not used for echo
+                          * handling. */
       struct cmd_io *io_stack;
     } ed_line;
     struct {