コード例 #1
0
ファイル: goaccess.c プロジェクト: kingland/goaccess
static void
parse_cmd_line (int argc, char **argv)
{
  read_option_args (argc, argv);

  /* Not outputting to a terminal */
  if (!isatty (STDOUT_FILENO) || conf.output_format != NULL)
    conf.output_html = 1;
  /* Log piped, and a file is in used */
  if (conf.ifile != NULL && !isatty (STDIN_FILENO) && !conf.output_html)
    cmd_help ();
  /* No data piped and no file was used */
  if (conf.ifile == NULL && isatty (STDIN_FILENO) && conf.output_format == NULL)
    cmd_help ();

  set_default_static_files ();
}
コード例 #2
0
ファイル: goaccess.c プロジェクト: 0-T-0/goaccess
static void
parse_cmd_line (int argc, char **argv)
{
  read_option_args (argc, argv);

  /* Not outputting to a terminal */
  if (!isatty (STDOUT_FILENO) || conf.output_format != NULL)
    conf.output_html = 1;
  /* Log piped, and log file passed */
  if (conf.ifile && !isatty (STDIN_FILENO) && !conf.output_html)
    cmd_help ();
  /* No data piped, no file was used and not loading from disk */
  if (!conf.ifile && isatty (STDIN_FILENO) && !conf.load_from_disk)
    cmd_help ();

  set_default_static_files ();
}