File: print_help.c

package info (click to toggle)
fish 1.23.0-5
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 6,416 kB
  • ctags: 2,503
  • sloc: ansic: 35,998; sh: 2,818; makefile: 566
file content (22 lines) | stat: -rw-r--r-- 356 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

/** \file print_help.c
	Print help message for the specified command
*/

#include <stdlib.h>
#include <stdio.h>


#include "print_help.h"

#define CMD_LEN 1024

void print_help( char *c, int fd )
{
	char cmd[ CMD_LEN];
	int printed = snprintf( cmd, CMD_LEN, "fish -c '__fish_print_help %s >&%d'", c, fd );
	
	if( printed < CMD_LEN )
		system( cmd );
		
}