EZ_SSheetSortColumns man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

EZ_SSheetSortRegion(3)		EZWGL Functions		EZ_SSheetSortRegion(3)

NAME
       EZ_SSheetSortRegion - sort the specified spread sheet region

SYNOPSIS
       #include <EZ.h>

       void EZ_SSheetSortRegion( EZ_Widget *ssheet, int r1, int c1, int r2, int c2
		   int col, int (*cmp)(CONSTvoid*,CONSTvoid*))

       void EZ_SSheetSortRegionR( EZ_Widget *ssheet, int r1, int c1, int r2, int c2
		   int row, int (*cmp)(CONSTvoid*,CONSTvoid*))

       void EZ_SSheetSortColumns( EZ_Widget *ssheet, int r1, int c1, int r2, int c2
		    int (*cmp)(CONSTvoid*,CONSTvoid*))

       void EZ_SSheetSortRows( EZ_Widget *ssheet, int r1, int c1, int r2, int c2
		    int (*cmp)(CONSTvoid*,CONSTvoid*))

ARGUMENTS
       ssheet  Specifies a spread sheet widget.

       r1,c1,r2,c2  Specify the upper left and lower right corner of a rectan‐
       gular region.

       col Specifies a key column.

       row Specifies a key row.

       cmp  Specify a comparision function.

DESCRIPTION
       EZ_SSheetSortRegion uses qsort to sort the specified region  using  the
       cells  in  the key column.  cmp is used to compare two strings. See the
       manual page of qsort for details. If cmp is NULL,  this	function  will
       use an internal comparision function to sort the contents of the region
       in lexical order. The internal comparision is listed below.

       EZ_SSheetSortRegionR sort the specified region using the cells  in  the
       key row.

       EZ_SSheetSortColumns  sort  each	 column	 individually in the specified
       region.

       EZ_SSheetSortColumns  sort  each	 row  individually  in	the  specified
       region.

       The internal comparision function.
       int EZ_CompareStr(CONST void *vaptr, CONST void *vbptr)
       {
	 char **aptr = (char **)vaptr;
	 char **bptr = (char **)vbptr;
	 char *a = *aptr, *b = *bptr;
	 if(a == NULL) return(1);
	 else if( b == NULL) return(-1);
	 while(*a && *b && *a == *b) {a++; b++;}
	 if(*a == 0) return(-1);
	 else if(*b == 0) return(1);
	 return( (*a > *b)? 1: -1);
       }

SEE ALSO
       EZ_SSheetFindCell(3),  EZ_SSheetSetTabChar(3)

EZWGL							EZ_SSheetSortRegion(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net