1SORTLOCON(3)                 MBK LOGICAL FUNCTIONS                SORTLOCON(3)
2
3
4

NAME

6       sortlocon - sort the logical connectors of a figure by name
7

SYNOPSIS

9       #include "mlo.h"
10       void sortlocon(connectors)
11       locon_list ∗∗connectors;
12

PARAMETERS

14       connectors          Pointer  to  the head of the connector list that is
15                           to be sorted
16

DESCRIPTION

18       sortlocon sorts the list of logical connectors pointed to  by  ∗connec‐
19       tors.  The connectors are sorted by names, using a numerical comparison
20       function that ensures x_12 > x_2.
21       The standard qsort(3) function library is called for  sorting.   There‐
22       fore,  a  table  the number of connectors wide is created.  This is not
23       very memory consuming since the  number  of  connectors  in  a  circuit
24       interface  is quite small, nor very time consuming since this algorithm
25       runs in a n log n time.
26

EXAMPLE

28       #include "mlo.h"
29       void savesorted(figname)
30       char ∗figname;
31       {
32       lofig_list ∗figure = getlocon(figname, 'A');
33         sortlocon(&figure->LOCON);
34         sortlosig(&figure->LOSIG);
35         savelofig(figure);
36       }
37

SEE ALSO

39       mbk(1),   locon(3),   addlocon(3),   dellocon(3),   checkloconorder(3),
40       qsort(3).
41
42
43
44
45
46
47ASIM/LIP6                       October 1, 1997                   SORTLOCON(3)
Impressum