misc := bash_completion
headers := para.h server.h SFont.h crypt.h list.h http.h send.h ortp.h rc4.h \
close_on_fork.h afs.h db.h gcc-compat.h recv.h filter.h audiod.h \
- grab_client.h error.h net.h ringbuffer.h daemon.h string.h ipc.h dccp.h
+ grab_client.h error.h net.h ringbuffer.h daemon.h string.h ipc.h dccp.h \
+ fd.h
scripts := install-sh configure
autocrap := Makefile.in config.h.in configure.ac autogen.sh
tarball := web/sync/doc pics fonts $(c_sources) $(sample_conf) $(headers) \
www: $(gen_html) $(gruta_html) $(web_pics) $(web_misc) $(shots) tags doxygen
client_objs = client.cmdline.o client.o net.o string.o crypt.o
-gui_objs = gui.cmdline.o gui.o gui_common.o exec.o close_on_fork.o signal.o string.o gui_theme.o stat.o ringbuffer.o
-sdl_gui_objs = sdl_gui.cmdline.o SFont.o sdl_gui.o gui_common.o exec.o close_on_fork.o string.o stat.o
+gui_objs = gui.cmdline.o gui.o gui_common.o exec.o close_on_fork.o signal.o \
+ string.o gui_theme.o stat.o ringbuffer.o fd.o
+sdl_gui_objs = sdl_gui.cmdline.o SFont.o sdl_gui.o gui_common.o exec.o \
+ close_on_fork.o string.o stat.o fd.o
dbadm_objs = dbadm.o exec.o close_on_fork.o string.o
-fade_objs = fade.cmdline.o fade.o exec.o close_on_fork.o string.o
+fade_objs = fade.cmdline.o fade.o exec.o close_on_fork.o string.o fd.o
krell_objs = krell.o string.o
slider_objs = slider.o string.o
audioc_objs = audioc.cmdline.o audioc.o string.o net.o
#include "net.h"
#include "daemon.h"
#include "string.h"
+#include "fd.h"
/** define the array of error lists needed by para_audiod */
INIT_AUDIOD_ERRLISTS;
audiod_cmdline_objs="audiod.cmdline grab_client.cmdline compress_filter.cmdline
http_recv.cmdline dccp_recv.cmdline"
audiod_errlist_objs="audiod exec close_on_fork signal string daemon stat net
- time grab_client filter_chain wav compress http_recv dccp dccp_recv recv_common"
+ time grab_client filter_chain wav compress http_recv dccp dccp_recv recv_common fd"
audiod_ldflags=""
server_cmdline_objs="server.cmdline"
SS_DCCP,
SS_DCCP_RECV,
SS_DCCP_SEND,
+ SS_FD,
SS_RINGBUFFER};
#define NUM_SS (SS_RINGBUFFER + 1)
#define DAEMON_ERRORS
#define ORTP_SEND_ERRORS
#define RINGBUFFER_ERRORS
+#define FD_ERRORS
/**
SS_ENUM(DCCP);
SS_ENUM(DCCP_RECV);
SS_ENUM(DCCP_SEND);
+SS_ENUM(FD);
SS_ENUM(RINGBUFFER);
/** \endcond */
#undef PARA_ERROR
return ret;
}
-/**
- * check whether a file exists
- *
- * \param fn the file name
- *
- * \return Non-zero iff file exists.
- */
-int file_exists(const char *fn)
-{
- struct stat statbuf;
-
- return !stat(fn, &statbuf);
-}
#include "fade.cmdline.h"
#include "para.h"
+#include "fd.h"
#include <ctype.h>
#include <curses.h>
--- /dev/null
+#include "para.h"
+/**
+ * check whether a file exists
+ *
+ * \param fn the file name
+ *
+ * \return Non-zero iff file exists.
+ */
+int file_exists(const char *fn)
+{
+ struct stat statbuf;
+
+ return !stat(fn, &statbuf);
+}
--- /dev/null
+/*
+ * Copyright (C) 2006 Andre Noll <maan@systemlinux.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ */
+
+/** \file fd.h file handling functions */
+
+int file_exists(const char *);
#include <curses.h>
#include "ringbuffer.h"
#include "string.h"
+#include "fd.h"
extern const char *status_item_list[NUM_STAT_ITEMS];
static char *stat_content[NUM_STAT_ITEMS];
int read_audiod_pipe(int, void (*)(char *));
/* exec */
-int file_exists(const char *);
int para_exec_cmdline_pid(pid_t *pid, const char *cmdline, int *fds);
/* signal */
#include "para.h"
#include "string.h"
+#include "fd.h"
#include <SDL/SDL.h>