Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
att
GitHub Repository: att/ast
Path: blob/master/src/lib/libodelta/update.h
1808 views
1
/***********************************************************************
2
* *
3
* This software is part of the ast package *
4
* Copyright (c) 1989-2011 AT&T Intellectual Property *
5
* and is licensed under the *
6
* Eclipse Public License, Version 1.0 *
7
* by AT&T Intellectual Property *
8
* *
9
* A copy of the License is available at *
10
* http://www.eclipse.org/org/documents/epl-v10.html *
11
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
12
* *
13
* Information and Software Systems Research *
14
* AT&T Research *
15
* Florham Park NJ *
16
* *
17
* Phong Vo <[email protected]> *
18
* *
19
***********************************************************************/
20
#pragma prototyped
21
#ifndef _UPDATE_H
22
#define _UPDATE_H
23
24
#include <ast.h>
25
26
/* values for the instruction field */
27
#define DELTA_TYPE 0300
28
#define DELTA_MOVE 0200
29
#define DELTA_ADD 0100
30
31
/* number of bytes required to code a value */
32
#define BASE 256
33
#define ONE (BASE)
34
#define TWO (BASE*BASE)
35
#define THREE (BASE*BASE*BASE)
36
#define NBYTE(v) ((v) < ONE ? 1 : ((v) < TWO ? 2 : ((v) < THREE ? 3 : 4)))
37
38
#define BUFSIZE 2048
39
40
#ifndef NULL
41
#define NULL (0L)
42
#endif
43
44
extern int delta(char*, long, char*, long, int);
45
extern long mtchstring(char*, long, char*, long, char**);
46
extern int update(int, long, int, int);
47
48
#endif
49
50