#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <wchar.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <getopt.h>
#include <locale.h>
#include "fallback.h"
#include "util.h"
#include "common.h"
#include "wutil.h"
#include "halloc.h"
#include "halloc_util.h"
#include "tokenizer.h"
#include "print_help.h"
#include "parser_keywords.h"
Defines | |
| #define | GETOPT_STRING "hvi" |
| The string describing the single-character options accepted by the main fish binary. | |
Functions | |
| static void | read_file (FILE *f, string_buffer_t *b) |
| Read the entire contents of a file into the specified string_Buffer_t. | |
| static void | insert_tabs (string_buffer_t *out, int indent) |
| Insert the specified number of tabe into the output buffer. | |
| static int | indent (string_buffer_t *out, wchar_t *in, int flags) |
| Indent the specified input. | |
| static wchar_t * | trim (wchar_t *in) |
| Remove any prefix and suffix newlines from the specified string. | |
| int | main (int argc, char **argv) |
| The main mathod. | |
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
The main mathod.
Run the program.
References _, buffer::buff, GETOPT_STRING, halloc_util_destroy(), halloc_util_init(), indent(), no_argument, print_help(), program_name, read_file(), sb_init(), sb_out, trim(), wsetlocale(), wutil_destroy(), and wutil_init().
| static wchar_t* trim | ( | wchar_t * | in | ) | [static] |
Remove any prefix and suffix newlines from the specified string.
Does not allocete a new string, edits the string in place and returns a pointer somewhere into the string.
Referenced by main().
1.5.6