From d6b247e85f35583a0e10c5000a3f93063c4b807c Mon Sep 17 00:00:00 2001 From: Jose A Ortega Ruiz Date: Mon, 25 Jun 2007 23:20:06 +0000 Subject: GPL v3 notices git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-43 --- mixlib/xmix_io.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'mixlib/xmix_io.c') diff --git a/mixlib/xmix_io.c b/mixlib/xmix_io.c index a43d284..24e672b 100644 --- a/mixlib/xmix_io.c +++ b/mixlib/xmix_io.c @@ -1,22 +1,22 @@ /* -*-c-*- ------------------ xmix_io.c : * Implementation of the functions declared in xmix_io.h * ------------------------------------------------------------------ - * Copyright (C) 2000 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2007 Free Software Foundation, Inc. + * * 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 + * the Free Software Foundation; either version 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * + * */ #include @@ -36,20 +36,20 @@ io_init_from_fdesc_(mix_iochannel_t *ioc, int fdesc) mix_fmode_t mode; int flags = fcntl(fdesc, F_GETFL); - if ( (flags&O_RDONLY) == O_RDONLY ) + if ( (flags&O_RDONLY) == O_RDONLY ) mode = mix_io_READ; else if ( (flags&O_WRONLY) == O_WRONLY ) mode = mix_io_WRITE; else if ( (flags&O_RDWR) == O_RDWR ) mode = mix_io_RDWRT; - else + else return FALSE; - + file = fdopen(fdesc, fmode_to_type_(mode)); g_return_val_if_fail(file != NULL, FALSE); if (mode == mix_io_RDWRT) rewind (file); io_init_from_file_(ioc, file); - + return TRUE; } -- cgit v1.2.3