summaryrefslogtreecommitdiffstats
path: root/bta/sys/utl.c
diff options
context:
space:
mode:
Diffstat (limited to 'bta/sys/utl.c')
-rw-r--r--bta/sys/utl.c53
1 files changed, 33 insertions, 20 deletions
diff --git a/bta/sys/utl.c b/bta/sys/utl.c
index 1487f2e..4bb1d95 100644
--- a/bta/sys/utl.c
+++ b/bta/sys/utl.c
@@ -1,13 +1,26 @@
-/*****************************************************************************
-**
-** Name: utl.c
-**
-** Description: This file contains utility functions.
-**
-** Copyright (c) 2003, Widcomm Inc., All Rights Reserved.
-** Widcomm Bluetooth Core. Proprietary and confidential.
-**
-*****************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2003-2012 Broadcom Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************/
+
+/******************************************************************************
+ *
+ * This file contains utility functions.
+ *
+ ******************************************************************************/
#include "utl.h"
#include "gki.h"
#include "btm_api.h"
@@ -20,7 +33,7 @@
** integer. Acceptable values in string are 0-9. If invalid
** string or string value too large, -1 is returned. Leading
** spaces are skipped.
-**
+**
**
** Returns Integer value or -1 on error.
**
@@ -60,7 +73,7 @@ INT16 utl_str2int(const char *p_s)
** String p_s must be uppercase. String p_t is converted to
** uppercase if lowercase. If p_s ends first, the substring
** match is counted as a match.
-**
+**
**
** Returns 0 if strings match, nonzero otherwise.
**
@@ -100,7 +113,7 @@ int utl_strucmp(const char *p_s, const char *p_t)
** Description This utility function converts a UINT16 to a string. The
** string is NULL-terminated. The length of the string is
** returned;
-**
+**
**
** Returns Length of string.
**
@@ -140,7 +153,7 @@ UINT8 utl_itoa(UINT16 i, char *p_s)
** Description This function calls GKI_freebuf to free the buffer passed
** in, if buffer pointer is not NULL, and also initializes
** buffer pointer to NULL.
-**
+**
**
** Returns Nothing.
**
@@ -161,7 +174,7 @@ void utl_freebuf(void **p)
**
** Description This function updates the local Device Class.
**
-** Parameters:
+** Parameters:
** p_cod - Pointer to the device class to set to
**
** cmd - the fields of the device class to update.
@@ -234,9 +247,9 @@ BOOLEAN utl_set_device_class(tBTA_UTL_COD *p_cod, UINT8 cmd)
**
** Function utl_isintstr
**
-** Description This utility function checks if the given string is an
+** Description This utility function checks if the given string is an
** integer string or not
-**
+**
**
** Returns TRUE if successful, Otherwise FALSE
**
@@ -258,9 +271,9 @@ BOOLEAN utl_isintstr(const char *p_s)
**
** Function utl_isdialstr
**
-** Description This utility function checks if the given string contains
+** Description This utility function checks if the given string contains
** only dial digits or not
-**
+**
**
** Returns TRUE if successful, Otherwise FALSE
**
@@ -271,7 +284,7 @@ BOOLEAN utl_isdialstr(const char *p_s)
for(i=0; p_s[i] != 0; i++)
{
- if(!(((p_s[i] >= '0') && (p_s[i] <= '9'))
+ if(!(((p_s[i] >= '0') && (p_s[i] <= '9'))
|| (p_s[i] == '*') || (p_s[i] == '+') || (p_s[i] == '#') || (p_s[i] == ';')
|| ((p_s[i] >= 'A') && (p_s[i] <= 'C'))))
return FALSE;