Table of Contents

Name

reverse - reverse a list of chained elements

Origin

This software belongs to the ALLIANCE CAD system from the CAO-VLSI team at ASIM/LIP6/UPMC laboratory.
LIP6/ASIM
University P. et M. Curie 4, place Jussieu 75252 PARIS Cedex 05 FRANCE
Fax : {33/0} 1.44.27.62.86
E-mail support : alliance-support@asim.lip6.fr

Synopsys

#include mut315.h"
chain_list *reverse(ptold)
chain_list *ptold;

Parameter

ptold
Pointer to a chain_list to be reversed

Description

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.

remark :
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!

Return Value

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

Example

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

See Also

mbk(1) , chain(3) .

Bug Report

This tool is under development at the ASIM/LIP6/UPMC laboratory, cao-vlsi research team.
We need your feedbak to improve documentation and tools. If you find bugs, please fill-in the form at http://asim.lip6.fr/alliance/support/bug-report/ Thanks for doing this.


Table of Contents

 



Alliance Web Site © 1997, 2002 ASIM/LIP6/UPMC, page maintained by Czo [Olivier Sirol] , last updated on 26 May 2000.