File: VIews.h.svn-base

package info (click to toggle)
gopher 3.0.7sarge2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,264 kB
  • ctags: 1,212
  • sloc: ansic: 13,865; sh: 1,448; makefile: 407
file content (101 lines) | stat: -rw-r--r-- 2,971 bytes parent folder | download | duplicates (8)
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
/********************************************************************
 * $Author: jgoerzen $
 * $Revision: 1.1 $
 * $Date: 2000/08/19 00:28:56 $
 * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/VIews.h,v $
 * $State: Exp $
 *
 * Paul Lindner, University of Minnesota CIS.
 *
 * Copyright 1991, 1992 by the Regents of the University of Minnesota
 * see the file "Copyright" in the distribution for conditions of use.
 *********************************************************************
 * MODULE: VIews.h
 * Header file, abstraction of a gopher+ view.
 *********************************************************************
 * Revision History:
 * $Log: VIews.h,v $
 * Revision 1.1  2000/08/19 00:28:56  jgoerzen
 * Initial revision
 *
 * Revision 3.5  1995/09/26  05:16:33  lindner
 * more fixes...
 *
 * Revision 3.4  1995/09/25  22:07:22  lindner
 * Ansification
 *
 * Revision 3.3  1993/07/23  04:49:07  lindner
 * Added PrettyView fcn
 *
 * Revision 3.2  1993/02/19  21:33:24  lindner
 * Gopher1.2b2 release
 *
 * Revision 3.1.1.1  1993/02/11  18:03:07  lindner
 * Gopher+1.2beta release
 *
 * Revision 2.1  1993/02/09  22:48:34  lindner
 * Changes for multilingual views
 *
 * Revision 1.1  1993/01/31  00:34:40  lindner
 * Initial revision
 *
 *
 *********************************************************************/

#ifndef VIEWS_H
#define VIEWS_H


#include "STRstring.h"
#include "boolean.h"

struct view_struct 
{
     String *Type;
     String *Lang;
     String *Size;
     String *comments;
};

typedef struct view_struct VIewobj;

#define VIgetType(a)     ((STRget((a)->Type)))
#define VIgetLang(a)     ((STRget((a)->Lang)))
#define VIgetSize(a)     ((STRget((a)->Size)))
#define VIgetComments(a) ((STRget((a)->comments)))
     
#define VIsetType(a,b)     (STRset((a)->Type,(b)))
#define VIsetLang(a,b)     (STRset((a)->Lang,(b)))
#define VIsetSize(a,b)     (STRset((a)->Size,(b)))
#define VIsetComments(a,b) (STRset((a)->comments,(b)))

/** Real view functions in VIews.c **/
VIewobj *VInew();
void     VIinit(VIewobj *vi);
void     VIcpy(VIewobj *videst, VIewobj *viorig);
void     VIdestroy(VIewobj *vi);
void     VItoLine(VIewobj *vi, char *tmpstr);
boolean  VIfromLine(VIewobj *vi, char *line);
char    *VIgetViewnLang(VIewobj *vi, char *line);
char    *VIgetPrettyView(VIewobj *vi, char *line);
char    *VIprettyLang(VIewobj *vi, char *currentlang);

/*******************************************************/
/** This stuff is for a dynamic array of VIewobjs     **/

#include "DAarray.h"

typedef DynArray VIewArray;
#define VIAnew(a)        (DAnew((a),VInew,VIinit,VIdestroy,VIcpy))
#define VIAinit(a)       (DAinit((a)))
#define VIAgetTop(a)     (DAgetTop(a))
#define VIAgetEntry(a,b) (VIewobj*)(DAgetEntry(a,b))
#define VIApush(a,b)     (DApush((DynArray*)(a),(char*)(b)))
#define VIAdestroy(a)    (DAdestroy(a))
#define VIAcpy(a,b)      (DAcpy(a,b))

#include "BLblock.h"

void     VIAfromBL(VIewArray *via, Blockobj *bl);

#endif