Develop and Download Open Source Software

Browse CVS Repository

Annotation of /xoonips/AL/common.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.18.4.1 - (hide annotations) (download) (as text)
Tue May 9 08:50:17 2006 UTC (17 years, 11 months ago) by yamaji
Branch: XOONIPS_STABLE_2
CVS Tags: tag20060615, tag20061115, RELENG_2_0_0a_RELEASE, tag20060622
Changes since 1.18: +2 -1 lines
File MIME type: text/x-chdr
maybe there is no harm, so ...

1 youi 1.2 /*
2 tani 1.17 * --------------------------------------------------------------------------
3     * XooNiPs Xoops modules for Neuroinformatics Platforms
4     * Copyright (C) 2005 RIKEN, Japan. All rights reserved.
5     * http://sourceforge.jp/projects/xoonips/
6     * --------------------------------------------------------------------------
7     * This program is free software; you can redistribute it and/or
8     * modify it under the terms of the GNU General Public License
9     * as published by the Free Software Foundation; either version 2
10     * of the License, or (at your option) any later version.
11     *
12     * This program is distributed in the hope that it will be useful,
13     * but WITHOUT ANY WARRANTY; without even the implied warranty of
14     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     * GNU General Public License for more details.
16     *
17     * You should have received a copy of the GNU General Public License
18     * along with this program; if not, write to the Free Software
19     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20     * --------------------------------------------------------------------------
21     *
22 yamaji 1.18.4.1 * $Revision: 1.18 $
23 youi 1.2 */
24 youi 1.1 #if !defined( COMMON_H )
25     #define COMMON_H
26 youi 1.2
27 tani 1.15
28 tani 1.16 #if defined(__BORLANDC__)
29 tani 1.15 #define PROTOTYPES 1
30     #include "md5/global.h"
31 tani 1.17 #ifdef __cplusplus
32     extern "C" {
33     #endif
34 tani 1.15 #include "md5/md5.h"
35 tani 1.17 #ifdef __cplusplus
36     }
37     #endif
38 tani 1.15
39     #define MD5_Init MD5Init
40     #define MD5_Update MD5Update
41     #define MD5_Final MD5Final
42    
43     #define snprintf _snprintf
44    
45     #else
46 yamaji 1.18.4.1 #include <sys/types.h>
47 youi 1.13 #include <openssl/md5.h>
48 tani 1.15 #endif
49 aga 1.3 #include<string>
50 youi 1.13
51 aga 1.9 using namespace std;
52 youi 1.2 typedef enum {
53     RES_OK = 0,
54     RES_ERROR,
55 youi 1.6 RES_DB_NOT_INITIALIZED,
56 aga 1.5 RES_LOGIN_FAILURE,
57 youi 1.2 RES_NO_SUCH_SESSION,
58     RES_NO_SUCH_USER,
59 youi 1.6 RES_NO_SUCH_GROUP,
60 youi 1.2 RES_DB_QUERY_ERROR,
61     RES_DB_CONNECT_ERROR,
62 aga 1.8 RES_DB_INITIALIZE_ERROR,
63 youi 1.11 RES_NO_SUCH_ITEM,
64 aga 1.10 RES_NO_WRITE_ACCESS_RIGHT,
65     RES_NO_READ_ACCESS_RIGHT,
66 tani 1.18 RES_GROUPNAME_ALREADY_EXISTS,
67 aga 1.8
68     RES_PHP_NONREF=1000
69 youi 1.2 } result_t;
70 aga 1.14
71     typedef enum {
72     DBTYPE_MYSQL = 1,
73     DBTYPE_SQLITE = 2
74     } dbtype_t;
75 youi 1.1
76     char* str_dup( const char* );
77     char* setValue( char** , const char* );
78 aga 1.3 string intToString( int i );
79 aga 1.4 string unsignedIntToString( unsigned int i );
80 tani 1.15 string doubleToString( double d );
81 youi 1.13
82     #define MD5_DIGEST_STRING_LENGTH (MD5_DIGEST_LENGTH*2+1)
83    
84     char* md5str( char str[MD5_DIGEST_STRING_LENGTH], unsigned char* data, int len );
85 youi 1.1
86     #endif
87    
88    

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26