GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
REVERSE(3) MBK UTILITY FUNCTIONS REVERSE(3)

reverse - reverse a list of chained elements

See the file man1/alc_origin.1.

#include "mut.h"
chain_list ∗reverse(ptold)
chain_list ∗ptold;

Pointer to a chain_list to be reversed

The reverse function allows to reverse the order of the elements of a chain_list. It means that the last element becomes the first one, the one before the last one the second one, and so on.

all mbk structures have for first field the NEXT field, so, with appropriate cast, one can reverse any mbk list. Let's notice that nothing in the C language description demands a structure to be defined in memory the same way its members are defined in C. But all compiler do it this way now a day. Let's hope it will continue!

reverse returns a pointer to the head of the reversed list.

#include "mut.h"
void reverse_con(p)
lofig_list ∗p;
{
	p->LOCON = (locon_list ∗)reverse((chain_list ∗)p->LOCON);
}

mbk(1), chain(3).

See the file man1/alc_bug_report.1.

October 1, 1997 ASIM/LIP6

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.