File: api_brow.h

package info (click to toggle)
smapi 2.4.0%2Brc2-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, sarge
  • size: 1,016 kB
  • ctags: 1,831
  • sloc: ansic: 11,304; pascal: 394; makefile: 137; asm: 125
file content (102 lines) | stat: -rw-r--r-- 3,146 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*
 *  SMAPI; Modified Squish MSGAPI
 *
 *  Squish MSGAPI0 is copyright 1991 by Scott J. Dudley.  All rights reserved.
 *  Modifications released to the public domain.
 *
 *  Use of this file is subject to the restrictions contain in the Squish
 *  MSGAPI0 licence agreement.  Please refer to licence.txt for complete
 *  details of the licencing restrictions.  If you do not find the text
 *  of this agreement in licence.txt, or if you do not have this file,
 *  you should contact Scott Dudley at FidoNet node 1:249/106 or Internet
 *  e-mail Scott.Dudley@f106.n249.z1.fidonet.org.
 *
 *  In no event should you proceed to use any of the source files in this
 *  archive without having accepted the terms of the MSGAPI0 licensing
 *  agreement, or such other agreement as you are able to reach with the
 *  author.
 */

#ifndef __API_BROW_H__
#define __API_BROW_H__

#define BROWSE_ACUR   0x0001    /* Scan current area only */
#define BROWSE_ATAG   0x0002    /* Scan only marked areas */
#define BROWSE_AALL   0x0004    /* Scan ALL areas */

#define BROWSE_ALL    0x0008    /* Scan all messages in area */
#define BROWSE_NEW    0x0010    /* Scan only msgs since lastread */
#define BROWSE_SEARCH 0x0020    /* Search all msgs in area based on criteria */
#define BROWSE_FROM   0x0040    /* Search from msg#XX and up */

#define BROWSE_READ   0x0100    /* Show messages in full form */
#define BROWSE_LIST   0x0200    /* Display msg headers only */
#define BROWSE_QWK    0x0400    /* QWK file format download */

#define BROWSE_GETTXT 0x0800    /* We have to read msg text when scanning */
#define BROWSE_EXACT  0x1000    /* Match search strings EXACTLY, ie. use
                                 * stricmp(), not stristr(). */
#define BROWSE_HASH   0x2000    /* Use hash compare for this one only */

#define BROWSE_AREA (BROWSE_ACUR | BROWSE_ATAG | BROWSE_AALL)
#define BROWSE_TYPE (BROWSE_ALL | BROWSE_NEW | BROWSE_SEARCH | BROWSE_FROM)
#define BROWSE_DISPLAY (BROWSE_READ | BROWSE_LIST | BROWSE_QWK)

#define SF_HAS_ATTR   0x01
#define SF_NOT_ATTR   0x02
#define SF_OR         0x04
#define SF_AND        0x08

#define WHERE_TO      0x01
#define WHERE_FROM    0x02
#define WHERE_SUBJ    0x04
#define WHERE_BODY    0x08

#define WHERE_ALL (WHERE_TO | WHERE_FROM | WHERE_SUBJ | WHERE_BODY)

#define SCAN_BLOCK_SDM  48  /* # of msgs to read in from scanfile at once
                             * from SCANFILE.DAT. */
#define SCAN_BLOCK_SQUISH 512   /* Same as above, but for xxxxxxxx.SQI */

typedef struct _search
{
    struct _search *next;

    long attr;
    int flag;

    char *txt;
    char where;
}
SEARCH;

struct _browse;
typedef struct _browse BROWSE;

struct _browse
{
    char *path;
    word type;

    word bflag;
    dword bdata;
    SEARCH *first;
    char *nonstop;

    dword msgn;

    MSGA *sq;
    MSGH *m;
    XMSG msg;
    word matched;

    int (*Begin_Ptr) (BROWSE * b);
    int (*Status_Ptr) (BROWSE * b, char *aname, int colour);
    int (*Idle_Ptr) (BROWSE * b);
    int (*Display_Ptr) (BROWSE * b);
    int (*After_Ptr) (BROWSE * b);
    int (*End_Ptr) (BROWSE * b);
    int (*Match_Ptr) (BROWSE * b);
};

#endif