64eaca5bfa
https://origsvn.digium.com/svn/libpri/branches/1.2 ........ r610 | kpfleming | 2008-08-05 17:16:58 -0500 (Tue, 05 Aug 2008) | 2 lines clean up license headers, and explicitly grant additional permissions when used with Asterisk ........ git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@611 2fbb986a-6c06-0410-b554-c9c1f0a7f128
48 lines
1.3 KiB
C
48 lines
1.3 KiB
C
/*
|
|
* libpri: An implementation of Primary Rate ISDN
|
|
*
|
|
* Written by Mark Spencer <markster@digium.com>
|
|
*
|
|
* Copyright (C) 2005, Digium, Inc.
|
|
* All Rights Reserved.
|
|
*/
|
|
|
|
/*
|
|
* See http://www.asterisk.org for more information about
|
|
* the Asterisk project. Please do not directly contact
|
|
* any of the maintainers of this project for assistance;
|
|
* the project provides a web site, mailing lists and IRC
|
|
* channels for your use.
|
|
*
|
|
* This program is free software, distributed under the terms of
|
|
* the GNU General Public License Version 2 as published by the
|
|
* Free Software Foundation. See the LICENSE file included with
|
|
* this program for more details.
|
|
*
|
|
* In addition, when this program is distributed with Asterisk in
|
|
* any form that would qualify as a 'combined work' or as a
|
|
* 'derivative work' (but not mere aggregation), you can redistribute
|
|
* and/or modify the combination under the terms of the license
|
|
* provided with that copy of Asterisk, instead of the license
|
|
* terms granted here.
|
|
*/
|
|
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "compiler.h"
|
|
#include "libpri.h"
|
|
#include "pri_internal.h"
|
|
|
|
void libpri_copy_string(char *dst, const char *src, size_t size)
|
|
{
|
|
while (*src && size) {
|
|
*dst++ = *src++;
|
|
size--;
|
|
}
|
|
if (__builtin_expect(!size, 0))
|
|
dst--;
|
|
*dst = '\0';
|
|
}
|