File: util.h

package info (click to toggle)
everybuddy 0.2.1beta6-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,936 kB
  • ctags: 5,627
  • sloc: ansic: 50,783; sh: 8,559; yacc: 191; makefile: 182; perl: 97; lex: 50
file content (30 lines) | stat: -rw-r--r-- 1,131 bytes parent folder | download | duplicates (5)
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
/* Copyright (C) 1998 Sean Gabriel <gabriel@korsoft.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */


#ifndef __UTIL_H__
#define __UTIL_H__

Contact_Member* contact(guint32 uin);
Contact_Member* contact_from_socket(gint sock);
guint32 Chars_2_DW(guchar* buf);
guint16 Chars_2_Word(guchar* buf);
void DW_2_Chars(guchar* buf, guint32 num);
void Word_2_Chars(guchar* buf, guint16 num);
size_t SOCKWRITE(gint sok, void* ptr, size_t len);
size_t SOCKREAD(gint sok, void* ptr, size_t len);

#endif /* __UTIL_H__ */