diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2004-04-28 12:09:32 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2004-04-28 12:09:32 +0000 |
commit | 72074e1e63e6cbe934c1e5eb9fd583ec81057a22 (patch) | |
tree | 21e96c12369edb35db6503aee9540e16509e3b76 /hcid/lib.c | |
parent | b66d3f9b2cb8934a0eb7ac07f347001984488ac6 (diff) |
Unify copyright and license information
Diffstat (limited to 'hcid/lib.c')
-rw-r--r-- | hcid/lib.c | 76 |
1 files changed, 42 insertions, 34 deletions
@@ -1,28 +1,36 @@ -/* - BlueZ - Bluetooth protocol stack for Linux - Copyright (C) 2000-2001 Qualcomm Incorporated - - Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation; - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. - IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY CLAIM, - OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER - RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE - USE OR PERFORMANCE OF THIS SOFTWARE. - - ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, COPYRIGHTS, - TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS SOFTWARE IS DISCLAIMED. -*/ /* - * $Id$ - */ + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2000-2001 Qualcomm Incorporated + * Copyright (C) 2002-2003 Maxim Krasnyansky <maxk@qualcomm.com> + * Copyright (C) 2002-2004 Marcel Holtmann <marcel@holtmann.org> + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY + * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, + * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS + * SOFTWARE IS DISCLAIMED. + * + * + * $Id$ + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <stdlib.h> #include <string.h> @@ -45,7 +53,7 @@ volatile sig_atomic_t __io_canceled; * Device name expansion * %d - device id */ -char * expand_name(char *dst, char *str, int dev_id) +char *expand_name(char *dst, char *str, int dev_id) { register int sp, np, olen; char *opt, buf[10]; @@ -75,16 +83,16 @@ char * expand_name(char *dst, char *str, int dev_id) default: sp++; continue; - } + } if (opt) { /* substitute */ olen = strlen(opt); - memcpy(dst + np, opt, olen); - np += olen; - } - sp += 2; - continue; + memcpy(dst + np, opt, olen); + np += olen; + } + sp += 2; + continue; case '\\': sp++; @@ -93,9 +101,9 @@ char * expand_name(char *dst, char *str, int dev_id) dst[np++] = str[sp++]; break; } - } - dst[np] = '\0'; - return dst; + } + dst[np] = '\0'; + return dst; } /* Returns current host name */ |