Hi,
For example, consider these alphasorted lines:
char	b;
int	a;
Type is 1st field and identifier is 2nd, separated by tab. If I want these sorted by identifier, result would be:
int	a;
char	b;
Lines without enough fields or empty lines can be collated first. If I want these sorted by 2nd field:
char	b;
label_y:
<NL>
int	a;
label_x:
Result would be:
<NL>
label_x:
label_y:
int	a;
char	b;
The above is ofcourse somewhat nonsensical. Here is intended usage scenario:
void	unmark_line_node(line_t *);
void	unset_active_nodes(line_t *, line_t *);
long	write_stream(FILE *, long, long);
int	put_stream_line(FILE *, const char *, int);
int	get_tty_line(void);
void	handle_hup(int);
int	append_lines(long);
int	cbc_encode(unsigned char *, int, FILE *);
long	get_line_node_addr(line_t *);
long	write_file(char *, const char *, long, long);
long	get_marked_node_addr(int);
void	add_line_node(line_t *);
int	apply_subst_template(const char *, regmatch_t *, int, int);
int	build_active_list(int);
long	get_matching_node_addr(pattern_t *, int);
int	cbc_decode(unsigned char *, FILE *);
int	put_tty_line(const char *, int, long, int);
Result would be, by 2nd field sort:
void	add_line_node(line_t *);
int	append_lines(long);
int	apply_subst_template(const char *, regmatch_t *, int, int);
int	build_active_list(int);
int	cbc_decode(unsigned char *, FILE *);
int	cbc_encode(unsigned char *, int, FILE *);
long	get_line_node_addr(line_t *);
long	get_marked_node_addr(int);
long	get_matching_node_addr(pattern_t *, int);
int	get_tty_line(void);
void	handle_hup(int);
int	put_stream_line(FILE *, const char *, int);
int	put_tty_line(const char *, int, long, int);
void	unmark_line_node(line_t *);
void	unset_active_nodes(line_t *, line_t *);
long	write_file(char *, const char *, long, long);
long	write_stream(FILE *, long, long);
Now prototypes are sorted by function name. Way more clean :-)