home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Mail / mailapp-utilities-2.1-MIHS / Source / mailutil.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-14  |  1.9 KB  |  60 lines

  1. /* -*-C-*-
  2. *******************************************************************************
  3. *
  4. * File:         mailutil.h
  5. * RCS:          /usr/local/sources/CVS/mailapp-utilities/mailutil.h,v 1.7 1998/02/14 17:34:46 tom Exp
  6. * Description:  Header file for all Mail.app utilities
  7. * Author:       Carl Edman
  8. * Created:      Sun Apr 25 10:27:09 1993
  9. * Modified:     Sat May 31 18:07:01 1997 Tom Hageman <tom@basil.icce.rug.nl>
  10. * Language:     C
  11. * Package:      N/A
  12. * Status:       Experimental (Do Not Distribute)
  13. *
  14. * (C) Copyright 1993, but otherwise this file is perfect freeware.
  15. *
  16. *******************************************************************************
  17. */
  18.  
  19. #import "compat.h"
  20. #import <sys/types.h>
  21. #import <time.h>
  22.  
  23. #if RHAPSODY
  24. #  define MAIL_APP   "MailViewer"
  25. #else
  26. #  define MAIL_APP   "Mail"
  27. #endif
  28.  
  29. #define LINELEN 10240
  30.  
  31. int mailboxdir(char *buf);
  32. int cd_mbox(const char *name,int createflag);
  33. int uncd_mbox(void);
  34.  
  35. int try_lock_mbox_file(const char *lockfile,char *lockhost,char *lockuser,int *lockpid);
  36. int lock_mbox_file(const char *lockfile, int nowaitflg);
  37. int unlock_mbox_file(const char *lockfile);
  38. int try_lock_mbox(char *lockhost,char *lockuser,int *lockpid);
  39. int lock_mbox(int nowaitflg);
  40. int unlock_mbox(void);
  41.  
  42. #define LOCK_USER_FMT    "%s\320[%s]"
  43. #define LOCK_USER_RE    "\\(.*\\)\320\\[\\(.*\\)\\]"
  44.  
  45. time_t mtime(const char *path);
  46. off_t filesize(const char *path);
  47. int dirsize(char *path);
  48.  
  49. char *strpcpy(char *to,const char *beg,const char *end);
  50. char *strpcat(char *to,const char *beg,const char *end);
  51. int strpequ(char *to,const char *beg,const char *end);
  52. int strpcaseequ(char *to,const char *beg,const char *end);
  53.  
  54. void appstring(char **string,int *len,int *maxlen,const char *app,const int alen);
  55. char *growstring(char **string,int *len,int *maxlen,const int alen);
  56.  
  57. unsigned long int calc_crc(const char *beg,int len);
  58.  
  59. void forall_mboxes(void (*func)(const char *));
  60.