.\" $Id: sortlocon.3,v 1.1 2002/03/08 13:51:04 fred Exp $ .\" @(#)sortlocon.2 2.11 91/08/22 ; Labo masi cao-vlsi; Author : Frederic Petrot .if t \{\ .XS \n% .ti 0.2i sortlocon .XE .XS2 \n% .ti 0.2i sortlocon .XE2 \} .TH SORTLOCON 3 "October 1, 1997" "ASIM/LIP6" "MBK LOGICAL FUNCTIONS" .SH NAME sortlocon \- sort the logical connectors of a figure by name .so jessie/alliance/alc_origin.1.en.gz .SH SYNOPSYS .nf .if n \{\ .ft B \} .if t \{\ .ft CR \} #include "mlo.h" void sortlocon(connectors) locon_list \(**\(**connectors; .ft R .fi .SH PARAMETERS .TP 20 \fIconnectors\fP Pointer to the head of the connector list that is to be sorted .SH DESCRIPTION \fBsortlocon\fP sorts the list of logical connectors pointed to by \fI\(**connectors\fP. The connectors are sorted by names, using a numerical comparison function that ensures \fBx_12 > x_2\fP. .br The standart \fBqsort\fP(3) function library is called for sorting. Therefore, a table the number of connectors wide is created. This is not very memory consuming since the number of connectors in a circuit interface is quite small, nor very time consuming since this algorithm runs in a n log n time. .SH EXAMPLE .ta 3n 6n 9n 12n 15n 18n 21n .nf .if n \{\ .ft B \} .if t \{\ .ft CR \} #include "mlo.h" void savesorted(figname) char \(**figname; { lofig_list \(**figure = getlocon(figname, 'A'); sortlocon(&figure->LOCON); sortlosig(&figure->LOSIG); savelofig(figure); } .ft R .fi .SH SEE ALSO .BR mbk (1), .BR locon (3), .BR addlocon (3), .BR dellocon (3), .BR checkloconorder (3), .BR qsort (3). .so jessie/alliance/alc_bug_report.1.en.gz