Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

swaplwbytes(3) [ultrix man page]

swap_lw_bytes(3)					     Library Functions Manual						  swap_lw_bytes(3)

Name
       swap_lw_bytes, swap_word_bytes, swap_words - perform byte swapping operations

Syntax
       unsigned int swap_lw_bytes(buffer)
       unsigned int buffer;

       unsigned int swap_word_bytes(buffer)
       unsigned int buffer;

       unsigned int swap_words(buffer)
       unsigned int buffer;

Arguments
       buffer	 Specifies a 32-bit (4 bytes) quantity.

Description
       The  routine performs a long word byte swap.  The routine performs a short word byte swap.  The routine performs a word byte swap.  Because
       Digital devices support the little endian model of byte ordering, there is a need for these byte swapping routines.

       For the purposes of the following discussion, a long word is equal to 4 bytes; a short word is equal to 2 bytes; and 1 byte is equal  to  8
       bits.  The routine takes the 32-bit quantity specified by the buffer argument and swaps all four bytes.	The routine takes the 32-bit quan-
       tity specified by the buffer argument and swaps the individual bytes that make up each byte of the 32-bit quantity.  The routine takes  the
       32-bit quantity specified by the buffer argument and swaps the two words.

Return Values
       These routines return the result of the byte swapping.

																  swap_lw_bytes(3)

Check Out this Related Man Page

SWAB(3TIFF)															       SWAB(3TIFF)

NAME
TIFFGetBitRevTable, TIFFReverseBits, TIFFSwabShort, TIFFSwabLong, TIFFSwabArrayOfShort, TIFFSwabArrayOfLong - byte- and bit-swapping rou- tines SYNOPSIS
#include <tiffio.h> const unsigned char* TIFFGetBitRevTable(int reversed) void TIFFReverseBits(u_char *data, unsigned long nbytes) void TIFFSwabShort(uint16 *data) void TIFFSwabLong(uint32 *data) void TIFFSwabArrayOfShort(uint16 *data, unsigned long nshorts) void TIFFSwabArrayOfLong(uint32 *data, unsigned long nlongs) DESCRIPTION
The following routines are used by the library to swap 16- and 32-bit data and to reverse the order of bits in bytes. TIFFSwabShort and TIFFSwabLong swap the bytes in a single 16-bit and 32-bit item, respectively. TIFFSwabArrayOfShort and TIFFSwabArrayOf- Long swap the bytes in an array of 16-bit and 32-bit items, respectively. TIFFReverseBits replaces each byte in data with the equivalent bit-reversed value. This operation is performed with a lookup table, which is returned using the TIFFGetBitRevTable function. reversed parameter specifies which table should be returned. Supply 1 if you want bit reversal table. Supply 0 to get the table that do not reverse bit values. It is a lookup table that can be used as an identity function; i.e. TIFFNoBitRevTable[n] == n. DIAGNOSTICS
None. SEE ALSO
libtiff(3TIFF) Libtiff library home page: http://www.remotesensing.org/libtiff/ libtiff November 04, 2004 SWAB(3TIFF)
Man Page

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

A short history of UNIX by l.madden@ic.ac.uk

<h1>A short history of UNIX</h1> <p>In the late 1960's Ken Thompsom joined the computing-science research group at Bell Laboratories, which is the research arm of the giant American corporation ATT. He and many colleagues had been collaborating with MIT and GE on the development of an... (0 Replies)
Discussion started by: Neo
0 Replies

2. Answers to Frequently Asked Questions

Lost root password / Can't login as root

We have quite a few threads about this subject. I have collected some of them and arranged them by the OS which is primarily discussed in the thread. That is because the exact procedure depends on the OS involved. What's more, since you often need to interact with the boot process, the... (0 Replies)
Discussion started by: Perderabo
0 Replies

3. Programming

How do you detect keystrokes in canonical mode?

I'm writing a command shell, and I want to be able to detect when the user presses an arrow key (otherwise it just prints [[A, [[B, etc.). I know it's relatively easy (although somewhat more time-consuming) to detect keystrokes in noncanonical mode, but I've noticed that the bash shell detects... (4 Replies)
Discussion started by: Ultrix
4 Replies

4. UNIX for Dummies Questions & Answers

Linux (Ubuntu) = Unix (NOT IMPORTANT - NO RUSH)

I'm learning off Linux (Ubuntu) right now. I want to move up to Unix, but I don't want to rush like I did when it came to Windows --> to Linux. What is the best Unix OS that fits in pretty well with Ubuntu. In other words is there kind of an equal Linux with Unix? Also what do I need to... (10 Replies)
Discussion started by: Linux_Guy
10 Replies

5. IP Networking

Can I change my hostname without messing things up?

I noticed my hostname is <my-full-name>s-macbook.local. I'm not sure exactly what information leaves the local network, and whether the hostname is included, but if it is, this would mean people on the Internet can look at my hostname and see who I am. Before anyone says that's not possible,... (4 Replies)
Discussion started by: Ultrix
4 Replies