list.c (99112) | list.c (173439) |
---|---|
1/* 2 * Copyright (c) 1980, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 23 unchanged lines hidden (view full) --- 32 */ 33 34#ifndef lint 35#if 0 36static char sccsid[] = "@(#)list.c 8.4 (Berkeley) 5/1/95"; 37#endif 38#endif /* not lint */ 39#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1980, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 23 unchanged lines hidden (view full) --- 32 */ 33 34#ifndef lint 35#if 0 36static char sccsid[] = "@(#)list.c 8.4 (Berkeley) 5/1/95"; 37#endif 38#endif /* not lint */ 39#include <sys/cdefs.h> |
40__FBSDID("$FreeBSD: head/usr.bin/mail/list.c 99112 2002-06-30 05:25:07Z obrien $"); | 40__FBSDID("$FreeBSD: head/usr.bin/mail/list.c 173439 2007-11-08 11:13:03Z dds $"); |
41 42#include "rcv.h" 43#include <ctype.h> 44#include "extern.h" 45 46/* 47 * Mail -- a mail program 48 * --- 44 unchanged lines hidden (view full) --- 93#define CMDELETED 010 /* Deleted messages */ 94#define CMREAD 020 /* Read messages */ 95 96/* 97 * The following table describes the letters which can follow 98 * the colon and gives the corresponding modifier bit. 99 */ 100 | 41 42#include "rcv.h" 43#include <ctype.h> 44#include "extern.h" 45 46/* 47 * Mail -- a mail program 48 * --- 44 unchanged lines hidden (view full) --- 93#define CMDELETED 010 /* Deleted messages */ 94#define CMREAD 020 /* Read messages */ 95 96/* 97 * The following table describes the letters which can follow 98 * the colon and gives the corresponding modifier bit. 99 */ 100 |
101struct coltab { | 101static struct coltab { |
102 char co_char; /* What to find past : */ 103 int co_bit; /* Associated modifier bit */ 104 int co_mask; /* m_status bits to mask */ 105 int co_equal; /* ... must equal this */ 106} coltab[] = { 107 { 'n', CMNEW, MNEW, MNEW }, 108 { 'o', CMOLD, MNEW, 0 }, 109 { 'u', CMUNREAD, MREAD, 0 }, --- 384 unchanged lines hidden (view full) --- 494 495/* 496 * scan out a single lexical item and return its token number, 497 * updating the string pointer passed **p. Also, store the value 498 * of the number or string scanned in lexnumber or lexstring as 499 * appropriate. In any event, store the scanned `thing' in lexstring. 500 */ 501 | 102 char co_char; /* What to find past : */ 103 int co_bit; /* Associated modifier bit */ 104 int co_mask; /* m_status bits to mask */ 105 int co_equal; /* ... must equal this */ 106} coltab[] = { 107 { 'n', CMNEW, MNEW, MNEW }, 108 { 'o', CMOLD, MNEW, 0 }, 109 { 'u', CMUNREAD, MREAD, 0 }, --- 384 unchanged lines hidden (view full) --- 494 495/* 496 * scan out a single lexical item and return its token number, 497 * updating the string pointer passed **p. Also, store the value 498 * of the number or string scanned in lexnumber or lexstring as 499 * appropriate. In any event, store the scanned `thing' in lexstring. 500 */ 501 |
502struct lex { | 502static struct lex { |
503 char l_char; 504 char l_token; 505} singles[] = { 506 { '$', TDOLLAR }, 507 { '.', TDOT }, 508 { '^', TUP }, 509 { '*', TSTAR }, 510 { '-', TDASH }, --- 170 unchanged lines hidden (view full) --- 681 682/* 683 * See if the passed name received the passed message number. Return true 684 * if so. 685 */ 686 687static char *to_fields[] = { "to", "cc", "bcc", NULL }; 688 | 503 char l_char; 504 char l_token; 505} singles[] = { 506 { '$', TDOLLAR }, 507 { '.', TDOT }, 508 { '^', TUP }, 509 { '*', TSTAR }, 510 { '-', TDASH }, --- 170 unchanged lines hidden (view full) --- 681 682/* 683 * See if the passed name received the passed message number. Return true 684 * if so. 685 */ 686 687static char *to_fields[] = { "to", "cc", "bcc", NULL }; 688 |
689int | 689static int |
690matchto(str, mesg) 691 char *str; 692 int mesg; 693{ 694 struct message *mp; 695 char *cp, **to; 696 697 str++; --- 20 unchanged lines hidden (view full) --- 718 * with the substring 'y' in the 'Subject'. The search is case insensitive. 719 * 720 * The form '/to:y' is a special case, and will match all messages 721 * containing the substring 'y' in the 'To', 'Cc', or 'Bcc' header 722 * fields. The search for 'to' is case sensitive, so that '/To:y' can 723 * be used to limit the search to just the 'To' field. 724 */ 725 | 690matchto(str, mesg) 691 char *str; 692 int mesg; 693{ 694 struct message *mp; 695 char *cp, **to; 696 697 str++; --- 20 unchanged lines hidden (view full) --- 718 * with the substring 'y' in the 'Subject'. The search is case insensitive. 719 * 720 * The form '/to:y' is a special case, and will match all messages 721 * containing the substring 'y' in the 'To', 'Cc', or 'Bcc' header 722 * fields. The search for 'to' is case sensitive, so that '/To:y' can 723 * be used to limit the search to just the 'To' field. 724 */ 725 |
726char lastscan[STRINGLEN]; | 726static char lastscan[STRINGLEN]; |
727int 728matchfield(str, mesg) 729 char *str; 730 int mesg; 731{ 732 struct message *mp; 733 char *cp, *cp2; 734 --- 107 unchanged lines hidden --- | 727int 728matchfield(str, mesg) 729 char *str; 730 int mesg; 731{ 732 struct message *mp; 733 char *cp, *cp2; 734 --- 107 unchanged lines hidden --- |