Displaying 20 results from an estimated 162 matches for "strncasecmp".
Did you mean:
strcasecmp
2003 Nov 24
1
[PATCH] library functions
...tch format is intended for GNU patch command version 2.5 or
higher.
# This patch includes the following deltas:
# ChangeSet 1.247 -> 1.248
# klibc/Makefile 1.102 -> 1.103
# klibc/include/string.h 1.8 -> 1.9
# (new) -> 1.1 klibc/strncasecmp.c
# (new) -> 1.1 klibc/strcasecmp.c
# (new) -> 1.1 klibc/strndup.c
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/24 mort@green.i.bork.org 1.248
# Add a few new library functions:
#...
2020 May 19
1
[PATCH nbdkit] common/include: Add locale-safe ascii_strcasecmp and ascii_strncasecmp.
...NY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* Case insensitive string comparison functions (like strcasecmp,
+ * strncasecmp) which work correctly in any locale. They can only be
+ * used for comparison when one or both strings is 7 bit ASCII.
+ */
+
+#ifndef NBDKIT_ASCII_STRING_H
+#define NBDKIT_ASCII_STRING_H
+
+#include "ascii-ctype.h"
+
+static inline int
+ascii_strcasecmp (const char *s1, const char *s2)...
2014 Aug 28
1
RDNIS with tel: vs. sip: header
Has anyone had success patching chan_sip.c so that Asterisk will recognize
the tel: header for RDNIS information?
exten = get_in_brackets(tmp);
if (!strncasecmp(exten, "sip:", 4)) {
exten += 4;
} else if (!strncasecmp(exten, "sips:", 5)) {
exten += 5;
} else {
ast_log(LOG_WARNING, "Huh? Not an RDNIS SIP header
(%s)?\n", exten);
return -1;...
2019 Jul 02
1
[nbdkit PATCH] sh: Parse a larger number of error messages
...es.h>
#include <sys/wait.h>
+#include <ctype.h>
#include <nbdkit-plugin.h>
@@ -267,32 +268,36 @@ static void
handle_script_error (char *ebuf, size_t len)
{
int err;
- size_t skip;
+ size_t skip = 0;
char *p;
- if (strcmp (ebuf, "EPERM ") == 0) {
+ if (strncasecmp (ebuf, "EPERM", 5) == 0) {
err = EPERM;
- skip = 6;
+ skip = 5;
}
- else if (strcmp (ebuf, "EIO ") == 0) {
+ else if (strncasecmp (ebuf, "EIO", 3) == 0) {
err = EIO;
- skip = 4;
+ skip = 3;
}
- else if (strcmp (ebuf, "ENOMEM ")...
2005 Jul 13
0
Search with specified charset
...if (cd == (iconv_t)-1) {
- if (unknown_charset != NULL)
- *unknown_charset = TRUE;
- return NULL;
+ /* Try matching charset without "ISO" prefix */
+ if (strncasecmp(charset, "ISO-", 4) == 0 ||
+ strncasecmp(charset, "ISO ", 4) == 0)
+ cd = iconv_open("UTF-8", charset + 4);
+ else if (strncasecmp(charset, "ISO", 3) == 0)
+...
2004 Aug 06
2
icecast 2 compatibility with older clients
...avl_tree_rlock(source->parser->vars);
node = avl_get_first(source->parser->vars);
@@ -109,8 +114,12 @@ void format_send_general_headers(format_
var = (http_var_t *)node->key;
if (strcasecmp(var->name, "ice-password") &&
(!strncasecmp("ice-", var->name, 4) ||
- !strncasecmp("icy-", var->name, 4))) {
- bytes = sock_write(client->con->sock,
+ !strncasecmp("icy-", var->name, 4))) {
+ if (client_is_icy)
+ bytes = sock_write(client->con-...
2019 Apr 12
0
Wine release 4.6
...er_bit_encoding for storing local constants when available.
ddraw: Improve d3d_device7_GetClipStatus() stub.
xaudio2_7: Also preserve %ebx in call_on_voice_processing_pass_start().
Piotr Caban (33):
msvcr110: Fix __crtGetShowWindowMode implementation.
version: Don't use strncasecmp.
ver.dll16: Don't use strncasecmp.
user.exe16: Don't use strncasecmp.
tapi32: Don't use strncasecmp.
shell.dll16: Don't use strncasecmp.
ntoskrnl.exe: Don't use strcasecmp.
msvideo.dll16: Don't use strncasecmp.
msvfw32: Don't use...
2019 Jan 25
0
[klibc:update-dash] dash: Fix some cosmetic differences from upstream dash
...IG ; i++ ) {
- if ( sys_sigabbrev[i] &&
- !strcasecmp(string, sys_sigabbrev[i]) )
- return i;
+ for (signo = minsig; signo < NSIG; signo++) {
+ if (sys_sigabbrev[signo] &&
+ !strcasecmp(string, sys_sigabbrev[signo]))
+ return signo;
}
#ifdef SIGRTMIN
- if ( !strncasecmp(string, "RTMIN", 5) ) {
+ if (!strncasecmp(string, "RTMIN", 5)) {
char *ep;
- if ( string[5] && string[5] != '+' )
+ if (string[5] && string[5] != '+')
return -1;
- i = SIGRTMIN + strtol(string+5, &ep, 10);
- if ( *ep || i < SI...
2020 Mar 28
0
[klibc:update-dash] dash: Fix some cosmetic differences from upstream dash
...IG ; i++ ) {
- if ( sys_sigabbrev[i] &&
- !strcasecmp(string, sys_sigabbrev[i]) )
- return i;
+ for (signo = minsig; signo < NSIG; signo++) {
+ if (sys_sigabbrev[signo] &&
+ !strcasecmp(string, sys_sigabbrev[signo]))
+ return signo;
}
#ifdef SIGRTMIN
- if ( !strncasecmp(string, "RTMIN", 5) ) {
+ if (!strncasecmp(string, "RTMIN", 5)) {
char *ep;
- if ( string[5] && string[5] != '+' )
+ if (string[5] && string[5] != '+')
return -1;
- i = SIGRTMIN + strtol(string+5, &ep, 10);
- if ( *ep || i < SI...
2006 Apr 28
1
imaptest, with options!
I hacked some command line options into imaptest.
I dont think I broke it..
Place into dovecot-source root as usual and compile with:
gcc imaptest.c -o imaptest -Wall -W -I. -Isrc/lib -DHAVE_CONFIG_H
src/lib/liblib.a
As per Timo's instructions.
# imaptest -h imaptest [USER at IP:PORTNO] [pass=PASSWORD] [mbox=MBOX]
[clients=CC] [msgs=NMSG] [use_authenticate] [PORTNO]
USER = template for
2007 Apr 12
2
[PATCH] Make com32 printf obey width-restriction on %s
...00000
+0100
+++ syslinux-3.36/com32/lib/Makefile 2007-04-12 12:06:07.000000000 +0200
@@ -11,7 +11,7 @@
perror.o printf.o puts.o qsort.o realloc.o seed48.o snprintf.o \
sprintf.o srand48.o sscanf.o stack.o strcasecmp.o strcat.o \
strchr.o strcmp.o strcpy.o strdup.o strerror.o strlen.o \
- strncasecmp.o strncat.o strncmp.o strncpy.o strndup.o \
+ strncasecmp.o strncat.o strncmp.o strncpy.o strndup.o strnlen.o \
strntoimax.o strntoumax.o strrchr.o strsep.o strspn.o strstr.o \
strtoimax.o strtok.o strtol.o strtoll.o strtoul.o strtoull.o \
strtoumax.o vfprintf.o vprintf.o vsnprintf.o vspr...
2020 Jan 07
3
[PATCH] Fix lossy conversion of Content-Length
...ex 031bd32..fe1330e 100644
--- a/plugins/curl/curl.c
+++ b/plugins/curl/curl.c
@@ -389,7 +389,7 @@ curl_open (int readonly)
goto err;
}
- h->exportsize = (size_t) d;
+ h->exportsize = (int64_t) d;
nbdkit_debug ("content length: %" PRIi64, h->exportsize);
if (strncasecmp (url, "http://", strlen ("http://")) == 0 ||
--
2.17.1
2010 Jun 27
1
[PATCH] ROSH: Upgraded
...[ROSH_CMD_SZ];
+ int tlen;
do_exit = false;
ROSH_DEBUG("--cmd:'%s'\n", cmdstr);
+ tlen = rosh_parse_sp_1(tstr, cmdstr, 0);
switch (cmdstr[0]) {
case 'e':
case 'E':
case 'q':
case 'Q':
- do_exit = true;
+ if ((strncasecmp("exit", tstr, tlen) == 0) ||
+ (strncasecmp("quit", tstr, tlen) == 0))
+ do_exit = true;
+ else
+ rosh_help(1, NULL);
break;
case 'c':
case 'C': /* run 'cd' 'cat' 'cfg' */
switch (cmdstr[1]) {
case 'a'...
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...ically,
one class of change per change-set:
strcmp(...) == 0 to STREQ(...)
strcmp(...) != 0 to STRNEQ(...)
strncmp(...) == 0 to STREQLEN(...)
strncmp(...) != 0 to STRNEQLEN(...)
strcasecmp(...) == 0 to STRCASEEQ(...)
strcasecmp(...) != 0 to STRCASENEQ(...)
strncasecmp(...) == 0 to STRCASEEQLEN(...)
strncasecmp(...) != 0 to STRCASENEQLEN(...)
Then it enables the "make syntax-check" tests to ensure
no offending (convertable) use is introduced.
But there's one twist.
In order for the substitution commands to work as-is,
I first converted str*cmp...
2004 Aug 06
0
icecast 2 compatibility with older clients
...@@ -1,3 +1,4 @@
+/* -*- c-basic-offset: 4; -*- */
/* format.c
**
** format plugin implementation
@@ -109,8 +110,12 @@ void format_send_general_headers(format_
var = (http_var_t *)node->key;
if (strcasecmp(var->name, "ice-password") &&
(!strncasecmp("ice-", var->name, 4) ||
- !strncasecmp("icy-", var->name, 4))) {
- bytes = sock_write(client->con->sock,
+ !strncasecmp("icy-", var->name, 4))) {
+ if (source->format->type == FORMAT_TYPE_MP3)
+ by...
2005 Mar 07
0
gcc4 warnings
...d long c;
- int n, k;
+ unsigned int n;
+ int k;
unsigned long poly; /* polynomial exclusive-or pattern */
/* terms of polynomial defining this crc (except x^32): */
static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
--- syslinux-3.07/com32/lib/strncasecmp.c.gcc4 2004-11-10 17:31:50.000000000 -0500
+++ syslinux-3.07/com32/lib/strncasecmp.c 2005-03-07 11:26:46.000000000 -0500
@@ -7,7 +7,8 @@
int strncasecmp(const char *s1, const char *s2, size_t n)
{
- const unsigned char *c1 = s1, *c2 = s2;
+ const unsigned char *c1 = (const unsigned char *)s1;...
2002 Jul 25
3
[PATCH] prevent users from changing their environment
...ermitUserEnvironment:
+ intptr = &options->permit_user_env;
goto parse_flag;
case sUseLogin:
--- auth-options.c 21 Jul 2002 18:32:20 -0000 1.25
+++ auth-options.c 24 Jul 2002 16:55:25 -0000
@@ -133,7 +133,8 @@
goto next_option;
}
cp = "environment=\"";
- if (strncasecmp(opts, cp, strlen(cp)) == 0) {
+ if (options.permit_user_env &&
+ strncasecmp(opts, cp, strlen(cp)) == 0) {
char *s;
struct envstring *new_envstring;
--- session.c 22 Jul 2002 11:03:06 -0000 1.145
+++ session.c 24 Jul 2002 16:55:27 -0000
@@ -899,7 +899,7 @@
auth_sock_n...
1998 Apr 15
1
Code Page Problem with samba 1.9.18p4?
I am running samba version 1.9.18p4 on a sinix machine (unix svr4).
My NT workstations use the german code page 850.
In earlier versions of samba (1.9.17p2) the character mapping worked
just fine, using
character set = iso8859-1
client code page = 850
in my smb.conf.
Since upgrading to samba 1.9.18p4 this don't work any more.
Is this a known problem?
I tripple-checked my smb.conf entries,
1998 Apr 18
1
1.9.18p4 broke charset latin1
Hi!
updated to p4 the other day, and now the "character set = iso8859-1"
option doesn't work anymore. I didn't change anything in the smb.conf
file but this:
unix password sync = True
time server = yes
and it worked in 1.9.18p3 :/
Has anyone else seen this?
Samba runs on FreeBSD 2.2.6 from the ports collection. (I don't think
that password sync works for this
2023 Aug 05
11
[Bug 3599] New: How to scan for keys when sshd server has fips enabled?
https://bugzilla.mindrot.org/show_bug.cgi?id=3599
Bug ID: 3599
Summary: How to scan for keys when sshd server has fips
enabled?
Product: Portable OpenSSH
Version: 9.3p2
Hardware: All
OS: Linux
Status: NEW
Severity: critical
Priority: P5
Component: ssh-keyscan