Fixed comments
Showing
1 changed file
with
15 additions
and
13 deletions
... | @@ -43,6 +43,7 @@ | ... | @@ -43,6 +43,7 @@ |
43 | #include <mailutils/tls.h> | 43 | #include <mailutils/tls.h> |
44 | #include <mailutils/error.h> | 44 | #include <mailutils/error.h> |
45 | #include <mailutils/mutil.h> | 45 | #include <mailutils/mutil.h> |
46 | #include <mailutils/mime.h> | ||
46 | 47 | ||
47 | static char* show_field; | 48 | static char* show_field; |
48 | static int show_to; | 49 | static int show_to; |
... | @@ -99,7 +100,7 @@ abbreviation of those is also accepted."); | ... | @@ -99,7 +100,7 @@ abbreviation of those is also accepted."); |
99 | 100 | ||
100 | /* Attribute table handling */ | 101 | /* Attribute table handling */ |
101 | 102 | ||
102 | /* Prepares the table for use: computes minimum abbreviation lengths */ | 103 | /* Prepares the table for use. Computes minimum abbreviation lengths. */ |
103 | static void | 104 | static void |
104 | prepare_attrs (void) | 105 | prepare_attrs (void) |
105 | { | 106 | { |
... | @@ -205,7 +206,7 @@ parse_opt (int key, char *arg, struct argp_state *state) | ... | @@ -205,7 +206,7 @@ parse_opt (int key, char *arg, struct argp_state *state) |
205 | case 'Q': | 206 | case 'Q': |
206 | /* Very silent. */ | 207 | /* Very silent. */ |
207 | be_quiet += 2; | 208 | be_quiet += 2; |
208 | if (freopen("/dev/null", "w", stdout) == NULL) | 209 | if (freopen ("/dev/null", "w", stdout) == NULL) |
209 | { | 210 | { |
210 | perror (_("Can not be very quiet")); | 211 | perror (_("Can not be very quiet")); |
211 | exit (3); | 212 | exit (3); |
... | @@ -326,7 +327,7 @@ get_personal (header_t hdr, const char *field, char *personal, size_t buflen) | ... | @@ -326,7 +327,7 @@ get_personal (header_t hdr, const char *field, char *personal, size_t buflen) |
326 | return status; | 327 | return status; |
327 | } | 328 | } |
328 | 329 | ||
329 | /* Observable Action this is being call at every message discover. */ | 330 | /* Observable action is being called on discovery of each message. */ |
330 | /* FIXME: The format of the display is poorly done, please correct. */ | 331 | /* FIXME: The format of the display is poorly done, please correct. */ |
331 | static int | 332 | static int |
332 | action (observer_t o, size_t type) | 333 | action (observer_t o, size_t type) |
... | @@ -351,8 +352,8 @@ action (observer_t o, size_t type) | ... | @@ -351,8 +352,8 @@ action (observer_t o, size_t type) |
351 | message_get_header (msg, &hdr); | 352 | message_get_header (msg, &hdr); |
352 | 353 | ||
353 | if (((select_attribute & IS_READ) && (!attribute_is_read (attr))) | 354 | if (((select_attribute & IS_READ) && (!attribute_is_read (attr))) |
354 | || (select_attribute & IS_NEW) && (!attribute_is_recent (attr)) | 355 | || ((select_attribute & IS_NEW) && (!attribute_is_recent (attr))) |
355 | || (select_attribute & IS_OLD) && (!attribute_is_seen (attr))) | 356 | || ((select_attribute & IS_OLD) && (!attribute_is_seen (attr)))) |
356 | break; | 357 | break; |
357 | 358 | ||
358 | if (attribute_is_recent (attr)) | 359 | if (attribute_is_recent (attr)) |
... | @@ -419,11 +420,11 @@ action (observer_t o, size_t type) | ... | @@ -419,11 +420,11 @@ action (observer_t o, size_t type) |
419 | } | 420 | } |
420 | 421 | ||
421 | /* This is a clone of the elm program call "frm". It is a good example on | 422 | /* This is a clone of the elm program call "frm". It is a good example on |
422 | how to use the observable(callback) of libmailutils. "frm" has to | 423 | how to use the observable(callback) of libmailbox. "frm" has to |
423 | be very interactive, it is not possible to call mailbox_messages_count() | 424 | be very interactive, it is not possible to call mailbox_messages_count() |
424 | and wait for the scanning to finish before displaying. As soon as the scan | 425 | and wait for the scanning to finish before displaying. As soon as the scan |
425 | find a new message we want to know about it, this is done by registering | 426 | finds a new message we want to know about it. This is done by registering |
426 | an observable type MU_MAILBOX_MSG_ADD. The rest is formating code. */ | 427 | an observable type MU_MAILBOX_MSG_ADD. The rest is formatting code. */ |
427 | 428 | ||
428 | int | 429 | int |
429 | main (int argc, char **argv) | 430 | main (int argc, char **argv) |
... | @@ -524,7 +525,7 @@ cleanup: | ... | @@ -524,7 +525,7 @@ cleanup: |
524 | 525 | ||
525 | mailbox_destroy (&mbox); | 526 | mailbox_destroy (&mbox); |
526 | 527 | ||
527 | if(status != 0) | 528 | if (status != 0) |
528 | return 3; | 529 | return 3; |
529 | } | 530 | } |
530 | 531 | ||
... | @@ -537,10 +538,11 @@ cleanup: | ... | @@ -537,10 +538,11 @@ cleanup: |
537 | if (show_query && have_new_mail) | 538 | if (show_query && have_new_mail) |
538 | printf (_("You have new mail.\n")); | 539 | printf (_("You have new mail.\n")); |
539 | 540 | ||
540 | /* 0 - selected messages discover. | 541 | /* EXIT STATUS |
541 | 1 - have messages. | 542 | Frm returns a zero status ("true") if messages matching `status' are |
542 | 2 - no message. | 543 | present. Frm returns 1 if no messages matching `status' are present, |
543 | */ | 544 | but there are some messages, returns 2 if there are no messages at |
545 | all, or returns 3 if an error occurred. */ | ||
544 | 546 | ||
545 | if (selected) | 547 | if (selected) |
546 | status = 0; | 548 | status = 0; | ... | ... |
-
Please register or sign in to post a comment