Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
tools.c
Package: arena-beta-2b-src.tar.gz [view]
Upload User: zlh9724
Upload Date: 2007-01-04
Package Size: 1991k
Code Size: 1k
Category:
Browser Client
Development Platform:
Unix_Linux
- #include <stdio.h>
- #include <malloc.h>
- #include <unistd.h>
- #include "www.h"
- void *GetPointer(unsigned char **p)
- {
- #if defined POINTER_IS_64BIT
- unsigned long c1, c2; /* must hold a 64bit Pointer wm 19.Jan.95 */
- #else
- unsigned int c1, c2;
- #endif /* POINTER_IS_64BIT */
- long str;
- unsigned char *pp;
- pp=*p;
- c1 = *pp++; c2 = *pp++; str = (c1 | c2<<8);
- c1 = *pp++; c2 = *pp++; str |= (c1 | c2<<8) << 16;
- #if defined POINTER_IS_64BIT
- c1 = *pp++; c2 = *pp++; str |= (c1 | c2<<8) << 32;
- c1 = *pp++; c2 = *pp++; str |= (c1 | c2<<8) << 48;
- #endif /* POINTER_IS_64BIT */
- *p=pp;
- return (void *)str;
- }
- void PutPointer(unsigned char **p, void *ptr)
- {
- unsigned int ptr_16byte;
- unsigned char *pp;
- pp=*p;
- ptr_16byte = (unsigned int)((long)ptr & 0xFFFF);
- *pp++ = (unsigned char) ( ptr_16byte & 0xFF );
- *pp++ = (unsigned char) ( (ptr_16byte >> 8) & 0xFF );
- ptr_16byte = (unsigned int)( ((long)ptr >> 16) & 0xFFFF);
- *pp++ = (unsigned char) ( ptr_16byte & 0xFF );
- *pp++ = (unsigned char) ( (ptr_16byte >> 8) & 0xFF );
- #if defined POINTER_IS_64BIT
- ptr_16byte = (unsigned int)( ((long)ptr >> 32) & 0xFFFF);
- *pp++ = (unsigned char) ( ptr_16byte & 0xFF );
- *pp++ = (unsigned char) ( (ptr_16byte >> 8) & 0xFF );
- ptr_16byte = (unsigned int)( ((long)ptr >> 48) & 0xFFFF);
- *pp++ = (unsigned char) ( ptr_16byte & 0xFF );
- *pp++ = (unsigned char) ( (ptr_16byte >> 8) & 0xFF );
- #endif /* POINTER_IS_64BIT */
- *p=pp;
- }