File: common.c

package info (click to toggle)
mbrola 3.3%2Bdfsg-9
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm, forky, sid, trixie
  • size: 812 kB
  • sloc: ansic: 5,389; sh: 204; makefile: 170
file content (46 lines) | stat: -rw-r--r-- 1,381 bytes parent folder | download | duplicates (3)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * FPMs-TCTS SOFTWARE LIBRARY
 *
 * File:    common.c
 * Time-stamp: <00/03/29 14:36:29 pagel>
 * Purpose: common defines and utilities
 * Author:  Vincent Pagel
 * Email :  mbrola@tcts.fpms.ac.be
 *
 * Copyright (c) 1995-2018 Faculte Polytechnique de Mons (TCTS lab)
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 * 29/02/96 : Created. Put here all little usefull functions
 * and symbols common to the different sources.
 *
 */

#include "common.h"

#if defined(TARGET_OS_VMS) || defined(TARGET_OS_BEOS) || defined(TARGET_OS_MAC)
void swab( const char *from, char *to, int nbytes)
/* A quick definition of SWAB for VAX-VMS  */
{
	int i;
	char tmp;
    
	for (i=0; i<nbytes; i+=2)
    {
		tmp=from[i];
		to[i]=from[i+1];
		to[i+1]=tmp;
    }
}

#endif