ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/util.h
(Generate patch)

Comparing gvpe/src/util.h (file contents):
Revision 1.7 by pcg, Mon Apr 7 01:12:56 2003 UTC vs.
Revision 1.9 by pcg, Thu Oct 16 02:41:21 2003 UTC

1/* 1/*
2 util.h -- process management and other utility functions 2 util.h -- process management and other utility functions
3 Copyright (C) 1998-2002 Ivo Timmermans <ivo@o2w.nl> 3 Copyright (C) 1998-2002 Ivo Timmermans <ivo@o2w.nl>
4 2000-2002 Guus Sliepen <guus@sliepen.eu.org> 4 2000-2002 Guus Sliepen <guus@sliepen.eu.org>
5 2003 Marc Lehmannn <pcg@goof.com> 5 2003 Marc Lehmann <pcg@goof.com>
6 6
7 This program is free software; you can redistribute it and/or modify 7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or 9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
48/* 48/*
49 * check wether the given path is an absolute pathname 49 * check wether the given path is an absolute pathname
50 */ 50 */
51#define ABSOLUTE_PATH(c) ((c)[0] == '/') 51#define ABSOLUTE_PATH(c) ((c)[0] == '/')
52 52
53static inline void
54id2mac (unsigned int id, void *m) 53extern void id2mac (unsigned int id, void *m);
55{
56 mac &p = *(mac *)m;
57 54
58 p[0] = 0xfe;
59 p[1] = 0xfd;
60 p[2] = 0x80;
61 p[3] = 0x00;
62 p[4] = id >> 8;
63 p[5] = id;
64}
65
66#define mac2id(p) (p[0] & 0x01 ? 0 : (p[4] << 8) | p[5]) 55#define mac2id(p) ((p)[0] & 0x01 ? 0 : ((p)[4] << 8) | (p)[5])
67 56
68struct sliding_window { 57struct sliding_window {
69 u32 v[(WINDOWSIZE + 31) / 32]; 58 u32 v[(WINDOWSIZE + 31) / 32];
70 u32 seq; 59 u32 seq;
71 60

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines