100+ results for 'php strcmp'

Not the results you expected?

pdf_parse.c (https://github.com/mescher/mupdf.git) C · 601 lines

334

335 /* for BI .. ID .. EI in content streams */

336 if (tok == PDF_TOK_KEYWORD && !strcmp(buf, "ID"))

337 {

338 *op = dict;

396 }

397 if (tok == PDF_TOK_CLOSE_DICT || tok == PDF_TOK_NAME ||

398 (tok == PDF_TOK_KEYWORD && !strcmp(buf, "ID")))

399 {

400 val = fz_new_int(a);

FinderTest.php (https://github.com/Yrwein/symfony.git) PHP · 333 lines

131 $finder = new Finder();

132 $this->assertSame($finder, $finder->ignoreVCS(false));

133 $this->assertIterator($this->toAbsolute(array('.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator());

134

135 $finder = new Finder();

168 $finder = new Finder();

169 $this->assertSame($finder, $finder->sortByAccessedTime());

170 $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'toto', 'test.py', 'foo')), $finder->in(self::$tmpDir)->getIterator());

171 }

172

223 $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator();

224

225 $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.DIRECTORY_SEPARATOR.'bootstrap.php', __DIR__.DIRECTORY_SEPARATOR.'GlobTest.php'), $iterator);

226 }

227

Wstringop-overread-6.c (https://gitlab.com/adotout/gcc) C · 574 lines

34 char* strrchr (const char*, int);

35

36 int strcmp (const char*, const char*);

37 int strncmp (const char*, const char*, size_t);

38

307

308

309 int warn_strcmp_1 (const char *s)

310 {

311 return strcmp (unterm, s); // { dg-warning "-Wstringop-overread" }

312 }

313

314 int warn_strcmp_2 (const char *s)

315 {

316 return strcmp (s, unterm); // { dg-warning "-Wstringop-overread" }

eina_test_strbuf.c (https://github.com/kakaroto/e17.git) C · 449 lines

39

40 eina_strbuf_append(buf, TEXT);

41 fail_if(strcmp(eina_strbuf_string_get(buf), TEXT));

42 fail_if(strlen(eina_strbuf_string_get(buf)) != eina_strbuf_length_get(buf));

43 eina_strbuf_append(buf, TEXT);

44 fail_if(strcmp(eina_strbuf_string_get(buf), TEXT TEXT));

45 fail_if(strlen(eina_strbuf_string_get(buf)) != eina_strbuf_length_get(buf));

46 txt = eina_strbuf_string_steal(buf);

47 fail_if(strlen(eina_strbuf_string_get(buf)) != eina_strbuf_length_get(buf));

48 fail_if(strcmp(txt, TEXT TEXT));

49 free(txt);

50 fail_if(eina_strbuf_length_get(buf) != 0);

mmutil.c (https://github.com/vbraun/Sources.git) C · 235 lines

103 (void)fprintf( stderr, "block %x allocated in: %s, line no %d\n",

104 (int)what, what->fname, what->lineno );

105 if (strcmp(msg,"size")==0)

106 (void)fprintf( stderr, "size is: %d, but free call said %d \n",

107 (int)what->size, given_size );

paypal.php (https://gitlab.com/Gashler/sg) PHP · 174 lines

1 <?php

2

3 /**

162 $response = wp_remote_post( $this->gateway_url, $params );

163

164 if ( !is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 && (strcmp( $response['body'], "VERIFIED" ) == 0) ) {

165 return true;

166 } else {

Settings.php (https://github.com/wangzifeng/yolanda.git) PHP · 196 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Widget

23 * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

181 protected function _sortWidgets($a, $b)

182 {

183 return strcmp($a["label"], $b["label"]);

184 }

185

test-model.c (https://github.com/nobled/clutter.git) C · 435 lines

389 g_print ("column[0]: %s, type: %s\n", name, g_type_name (type));

390

391 g_assert (strcmp (name, "text-column") == 0);

392 g_assert (type == G_TYPE_STRING);

393

398 g_print ("column[2]: %s, type: %s\n", name, g_type_name (type));

399

400 g_assert (strcmp (name, "actor-column") == 0);

401 g_assert (type == CLUTTER_TYPE_RECTANGLE);

402

406 clutter_model_iter_get_value (iter, 0, &value);

407 g_assert (G_VALUE_HOLDS_STRING (&value));

408 g_assert (strcmp (g_value_get_string (&value), "text-row-1") == 0);

409 g_value_unset (&value);

410

test_unpack.c (https://gitlab.com/Ornim/obs-old) C · 381 lines

79 j = json_string("foo");

80 rv = json_unpack(j, "s", &s);

81 if(rv || strcmp(s, "foo"))

82 fail("json_unpack string failed");

83 json_decref(j);

86 j = json_string("foo");

87 rv = json_unpack(j, "s%", &s, &z);

88 if(rv || strcmp(s, "foo") || z != 3)

89 fail("json_unpack string with length (size_t) failed");

90 json_decref(j);

294 j = json_pack("{s:s, s:i}", "foo", "bar", "baz", 42);

295 rv = json_unpack(j, "{sssi!}", "foo", &s, "baz", &i1);

296 if(rv || strcmp(s, "bar") != 0 || i1 != 42)

297 fail("json_unpack object with strict validation failed");

298 json_decref(j);

bench_internal.c (https://gitlab.com/vectorci/rippled) C · 318 lines

2 * Copyright (c) 2014-2015 Pieter Wuille *

3 * Distributed under the MIT software license, see the accompanying *

4 * file COPYING or http://www.opensource.org/licenses/mit-license.php.*

5 **********************************************************************/

6 #include <stdio.h>

279 }

280 while (argv != NULL && argv != argm) {

281 if (strcmp(*argv, flag) == 0) return 1;

282 argv++;

283 }

basic.php (https://bitbucket.org/simancms/simancms.git) PHP · 105 lines

1 <?php

2

3 //------------------------------------------------------------------------------

83 }

84

85 function sm_strcmp($str1, $str2)

86 {

87 return strcmp(sm_null_safe_str($str1), sm_null_safe_str($str2));

100 function sm_auto_class_loader($classname)

101 {

102 if (strcmp(substr($classname, 0, 3), 'SM\\')==0)

103 include_once(dirname(dirname(__FILE__)).'/'.str_replace('\\', '/', $classname).'.php');

mucbz.c (https://gitlab.com/zimumavo/mupdf) C · 244 lines

188 cbz_lookup_metadata(fz_context *ctx, cbz_document *doc, const char *key, char *buf, int size)

189 {

190 if (!strcmp(key, "format"))

191 return (int) fz_strlcpy(buf, fz_archive_format(ctx, doc->arch), size);

192 return -1;

222 {

223 char *ext = strrchr(magic, '.');

224 if ((ext && !fz_strcasecmp(ext, ".cbz")) || !strcmp(magic, "cbz") ||

225 !strcmp(magic, "application/x-cbz"))

226 return 100;

227 if ((ext && !fz_strcasecmp(ext, ".zip")) || !strcmp(magic, "zip") ||

228 !strcmp(magic, "application/zip"))

229 return 100;

230 if ((ext && !fz_strcasecmp(ext, ".tar")) || !strcmp(magic, "tar") ||

231 !strcmp(magic, "application/x-tar"))

BCGDrawJPG.php (https://gitlab.com/talueses/SIPVE) PHP · 102 lines

1 <?php

2 /**

3 *--------------------------------------------------------------------

7 *--------------------------------------------------------------------

8 * Copyright (C) Jean-Sebastien Goupil

9 * http://www.barcodephp.com

10 */

11 include_once('BCGDraw.php');

89

90 private function internalSetC(&$bin) {

91 if(strcmp(substr($bin, 0, 4), pack('H*', 'FFD8FFE0')) === 0) {

92 $offset = 4 + (ord($bin[4]) << 8 | ord($bin[5]));

93 $firstPart = substr($bin, 0, $offset);

VendorsModel.php (https://gitlab.com/7slayer/h-node) PHP · 82 lines

1 <?php

2

3 // h-source, a web software to build a community of people that want to share their hardware information.

34 if (preg_match('/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/',$id))

35 {

36 $clean['bus'] = strcmp($interface,'USB') === 0 ? "USB" : "PCI";

37

38 $temp = explode(':',$id);

53 if ($this->check($id,$interface))

54 {

55 $clean['bus'] = strcmp($interface,'USB') === 0 ? "USB" : "PCI";

56

57 $temp = explode(':',$id);

strverscmp.c (https://gitlab.com/rawko3/iphone-dev) C · 159 lines

29 value follows the same conventions as found in the @code{strverscmp}

30 function. In fact, if @var{s1} and @var{s2} contain no digits,

31 @code{strverscmp} behaves like @code{strcmp}.

32

33 Basically, we compare strings normally (character by character), until

55 @smallexample

56 strverscmp ("no digit", "no digit")

57 @result{} 0 // @r{same behavior as strcmp.}

58 strverscmp ("item#99", "item#100")

59 @result{} <0 // @r{same prefix, but 99 < 100.}

register.php (https://github.com/wangaiying/elgg4ysu.git) PHP · 79 lines

1 <?php

2 /**

3 * Elgg registration action

24 }

25

26 if (strcmp($password, $password2) != 0) {

27 throw new RegistrationException(elgg_echo('RegistrationException:PasswordMismatch'));

28 }

goblinclient.php (https://github.com/tehsis/Goblin.git) PHP · 70 lines

1 <?php

2 /*

3 * Name: The Goblin Search Client

49 $memcache_obj = new Memcache;

50 $memcache_obj->connect('localhost',11211);

51 if(strcmp($memcache_obj->get('LastTag'),$tags) == 0) {

52 $this->found = $memcache_obj->get('search');

53 } else {

FUXmlWriter.cpp (https://bitbucket.org/ardalanaz/dava.framework.git) C++ · 259 lines

4 Copyright (C) 2005-2007 Sony Computer Entertainment America

5

6 MIT License: http://www.opensource.org/licenses/mit-license.php

7 */

8

226 {

227 if (p->type != XML_ELEMENT_NODE) continue;

228 if (strcmp((const char*) p->name, (const char*) child->name) <= 0)

229 {

230 xmlAddNextSibling(p, child);

LinkedList.c (https://github.com/macchina-io/macchina.io.git) C · 501 lines

9 * http://www.eclipse.org/legal/epl-v10.html

10 * and the Eclipse Distribution License is available at

11 * http://www.eclipse.org/org/documents/edl-v10.php.

12 *

13 * Contributors:

441 int stringcompare(void* a, void* b)

442 {

443 return strcmp((char*)a, (char*)b) == 0;

444 }

445

strncmp-1-0.asm (https://github.com/kframework/X86-64-semantics.git) Assembly · 711 lines

43 popq %rbp

44 ret

45 .globl strcmp

46 strcmp:

FinderTest.php (https://github.com/l3l0/BehatExamples.git) PHP · 274 lines

107 $finder = new Finder();

108 $this->assertSame($finder, $finder->files()->size('< 1K')->size('> 500'));

109 $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator());

110 }

111

171 $finder = new Finder();

172 $this->assertSame($finder, $finder->followLinks());

173 $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator());

174 }

175

187 $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator();

188

189 $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.DIRECTORY_SEPARATOR.'GlobTest.php'), $iterator);

190 }

191

format.php (https://github.com/iarenaza/moodle.git) PHP · 392 lines

1 <?php

2

3

10 ////////////////////////////////////////////////////////////////////////////

11

12 // Based on default.php, included by ../import.php

13 /**

14 * @package questionbank

15 * @subpackage importexport

16 */

17 require_once ("$CFG->libdir/xmlize.php");

18

19 class qformat_blackboard extends qformat_default {

118 $id = $choices[0]["@"]["id"];

119

120 if (strcmp($id, $correct_answer) == 0) { // true is correct

121 $question->answer = 1;

122 $question->feedbacktrue = trim(@$thisquestion["#"]["GRADABLE"][0]["#"]["FEEDBACK_WHEN_CORRECT"][0]["#"]);

ValidMethodNameSniff.php (https://github.com/p4ul/CodeIgniter-for-PHP_CodeSniffer.git) PHP · 161 lines

11 * @license http://thomas.ernest.fr/developement/php_cs/licence GNU General Public License

12 * @link http://pear.php.net/package/PHP_CodeSniffer

13 */

14

38 * @license http://thomas.ernest.fr/developement/php_cs/licence GNU General Public License

39 * @link http://pear.php.net/package/PHP_CodeSniffer

40 */

41 class CodeIgniter_Sniffs_NamingConventions_ValidMethodNameSniff extends PHP_CodeSniffer_Standards_AbstractScopeSniff

75 * Processes the tokens within the scope.

76 *

77 * @param PHP_CodeSniffer_File $phpcsFile The file being processed.

78 * @param int $stackPtr The position where this token was

79 * found.

82 * @return void

83 */

84 protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope)

85 {

86 $methodName = $phpcsFile->getDeclarationName($stackPtr);

vfs.c (https://gitlab.com/adam.lukaitis/osdev) C · 249 lines

26 for(int i = 0; i < last_mount_id; i++)

27 {

28 if(strcmp(loc, mount_points[i]->loc) == 0)

29 {

30 return mount_points[i]->dev;

101 {

102 if(!mount_points[i]) break;

103 if(strcmp(mount_points[i]->loc, orig) == 0)

104 {

105 /* Adjust the orig to make it relative to fs/dev */

111 }

112 }

113 if(strcmp(orig, "/") == 0)

114 break;

115 str_backspace(orig, '/');

string.php (https://bitbucket.org/ctala/pa_proyectos.git) PHP · 237 lines

1 <?php

2 /**

3 * Parses unified or context diffs output from eg. the diff utility.

11 * </code>

12 *

13 * $Horde: framework/Text_Diff/Diff/Engine/string.php,v 1.5.2.5 2008/09/10 08:31:58 jan Exp $

14 *

15 * Copyright 2005 rjan Persson <o@42mm.org>

17 *

18 * See the enclosed file COPYING for license information (LGPL). If you did

19 * not receive this file, see http://opensource.org/licenses/lgpl-license.php.

20 *

21 * @author rjan Persson <o@42mm.org>

159 while ($i < $max_i &&

160 $j < $max_j &&

161 strcmp($diff[$i], $diff[$j]) == 0) {

162 $array[] = substr($diff[$i], 2);

163 $i++;

JStringTest.php (https://github.com/orware/joomla-platform.git) PHP · 439 lines

1 <?php

2 /**

3 * @package Joomla.UnitTest

8 */

9

10 require_once JPATH_PLATFORM.'/joomla/utilities/string.php';

11 require_once 'TestHelpers/JString-helper-dataset.php';

13 /**

14 * Test class for JString.

15 * Generated by PHPUnit on 2009-10-26 at 22:29:34.

16 */

17 class JStringTest extends PHPUnit_Framework_TestCase

75 }

76

77 static public function strcmpData() {

78 return JStringTest_DataSet::$strcmpTests;

SkPostConfig.h (https://github.com/Jib-BAOSP/platform_external_skia.git) C Header · 258 lines

170 #ifndef sk_strcmp

171 #define sk_strcmp(s, t) strcmp(s, t)

172 #endif

173 #ifndef sk_strncmp

187 #endif

188

189 #define sk_strequal(s, t) (!sk_strcmp(s, t))

190 #define sk_strnequal(s, t, n) (!sk_strncmp(s, t, n))

191 #endif

string_helper.php (https://github.com/notjosh/seaforium.git) PHP · 310 lines

1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

2 /**

3 * CodeIgniter

4 *

5 * An open source application development framework for PHP 4.3.2 or newer

6 *

7 * @package CodeIgniter

127 * except those found in http://

128 *

129 * http://www.some-site.com//index.php

130 *

131 * becomes:

132 *

133 * http://www.some-site.com/index.php

134 *

135 * @access public

FlSetMoverLimits.m (http://atf2flightsim.googlecode.com/svn/trunk/) Objective C · 158 lines

45 camset=[];

46 for ele=GIRDER{igir}.Element(1):GIRDER{igir}.Element(end)

47 if strcmp(BEAMLINE{ele}.Class,'QUAD')

48 camset=camsettings.quad;

49 break

50 elseif strcmp(BEAMLINE{ele}.Class,'SEXT')

51 camset=camsettings.sext;

52 break

test_file.cpp (https://github.com/somaen/scummvm.git) C++ · 195 lines

185 assert(int16val == 10);

186 assert(int64val == -20202);

187 assert(strcmp(str1, "test.tmp") == 0);

188 assert(strcmp(str2, very_long_string) == 0);

pref2inf.m (http://calib.googlecode.com/svn/trunk/) Objective C · 196 lines

185 nodename = gp.nodes.functions.active_name_UC{afid_ind};

186

187 if strcmpi(nodename,'times') || strcmpi(nodename,'minus') || strcmpi(nodename,'plus') || strcmpi(nodename,'rdivide')

188

189 sendup=['(' arg1 ')' node '(' arg2 ')'];

worktree.c (https://gitlab.com/181gaming/git) C · 303 lines

227 state.branch &&

228 starts_with(target, "refs/heads/") &&

229 !strcmp(state.branch, target + strlen("refs/heads/")));

230 free(state.branch);

231 free(state.onto);

243 state.branch &&

244 starts_with(target, "refs/heads/") &&

245 !strcmp(state.branch, target + strlen("refs/heads/"));

246 free(state.branch);

247 return found_rebase;

270 struct worktree *wt = worktrees[i];

271

272 if (wt->is_detached && !strcmp(symref, "HEAD")) {

273 if (is_worktree_being_rebased(wt, target)) {

274 existing = wt;

riak_curl.c (https://github.com/maxbeutel/ext.riak.git) C · 365 lines

1 #include <php.h>

2

3 #include <ext/json/php_json.h>

4

5 #include "ext/standard/php_smart_str.h"

6

7 #include <curl/curl.h>

12

13

14 PHPAPI riakCurlRequestHeader* riak_curl_create_request_header() {

15 size_t block_size;

16 block_size = 2;

33 }

34

35 PHPAPI void riak_curl_delete_request_header(riakCurlRequestHeader* request_header) {

36 char **iter;

37

LoadFreenectData.m (https://gitlab.com/anima_tcs/kinectcapture) Objective C · 205 lines

51 if(fp~=-1)

52 fheader = fgets(fp, 4);

53 if(~strcmp(fheader, 'FNK0')&&~strcmp(fheader, 'FNK1'))

54 FData.ErrorMessage = 'File Format Mismatch';

55 FData.Error = 1;

181

182 if(bincontent(1,1)==1)

183 if(strcmp(fheader, 'FNK0'))

184 FData.DepthImage = (reshape(fread(fp, 640*480, 'ubit24'), [640 480]).');

185 else

script_ext_date.cpp (https://github.com/heather162/scummvm.git) C++ · 310 lines

23 /*

24 * This file is based on WME Lite.

25 * http://dead-code.org/redir.php?target=wmelite

26 * Copyright (c) 2011 Jan Nedoma

27 */

78 // GetYear

79 //////////////////////////////////////////////////////////////////////////

80 if (strcmp(name, "GetYear") == 0) {

81 stack->correctParams(0);

82 stack->pushInt(_tm.tm_year + 1900);

86 // GetMonth

87 //////////////////////////////////////////////////////////////////////////

88 else if (strcmp(name, "GetMonth") == 0) {

89 stack->correctParams(0);

90 stack->pushInt(_tm.tm_mon + 1);

protocol.class.php (https://bitbucket.org/atulsavaliya/all-in-one-social-post.git) PHP · 516 lines

1 <?php

2 require 'decode.php';

3 require 'exception.php';

4

5 class IncompleteMessageException extends CustomException

73 if ($this->_children) {

74 foreach ($this->_children as $child) {

75 if (strcmp($child->_tag, $tag) == 0) {

76 return $child;

77 }

libip6t_LOG.c (https://gitlab.com/envieidoc/advancedtomato2) C · 314 lines

262 }

263

264 if (strcmp(loginfo->prefix, "") != 0)

265 printf("prefix `%s' ", loginfo->prefix);

266 }

274 = (const struct ip6t_log_info *)target->data;

275

276 if (strcmp(loginfo->prefix, "") != 0)

277 printf("--log-prefix \"%s\" ", loginfo->prefix);

278

ClosingLocationCommentSniff.php (https://github.com/p4ul/CodeIgniter-for-PHP_CodeSniffer.git) PHP · 181 lines

11 * @license http://thomas.ernest.fr/developement/php_cs/licence GNU General Public License

12 * @link http://pear.php.net/package/PHP_CodeSniffer

13 */

14

42 * @license http://thomas.ernest.fr/developement/php_cs/licence GNU General Public License

43 * @link http://pear.php.net/package/PHP_CodeSniffer

44 */

45 class CodeIgniter_Sniffs_Files_ClosingLocationCommentSniff extends CodeIgniter_Sniffs_Files_AbstractClosingCommentSniff

64 * Processes this test, when one of its tokens is encountered.

65 *

66 * @param PHP_CodeSniffer_File $phpcsFile The current file being scanned.

67 * @param int $stackPtr The position of the current token

68 * in the stack passed in $tokens.

70 * @return void

71 */

72 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)

73 {

74 // We are only interested if this is the first open tag.

ps.c (https://gitlab.com/infraredbg/android_system_core-mt6589) C · 301 lines

253

254 while(argc > 1){

255 if(!strcmp(argv[1],"-t")) {

256 threads = 1;

257 } else if(!strcmp(argv[1],"-n")) {

258 display_flags |= SHOW_NUMERIC_UID;

259 } else if(!strcmp(argv[1],"-x")) {

260 display_flags |= SHOW_TIME;

261 } else if(!strcmp(argv[1], "-Z")) {

262 display_flags |= SHOW_MACLABEL;

263 } else if(!strcmp(argv[1],"-P")) {

264 display_flags |= SHOW_POLICY;

265 } else if(!strcmp(argv[1],"-p")) {

crypto.c (https://github.com/yz2365/linux-2.6.git) C · 485 lines

461 int ceph_key_match(const struct key *key, const void *description)

462 {

463 return strcmp(key->description, description) == 0;

464 }

465

bindings.c (https://gitlab.com/pendingchaos/WIP29) C · 410 lines

64

65 const char* name = l_to_str(2);

66 if (!strcmp(name, "textures"))

67 l_push_obj(bin_texture_map_class, &bin);

68 else if (!strcmp(name, "cubemaps"))

69 l_push_obj(bin_cubemap_map_class, &bin);

70 else if (!strcmp(name, "shaders"))

71 l_push_obj(bin_shader_map_class, &bin);

72 else if (!strcmp(name, "materials"))

73 l_push_obj(bin_material_map_class, &bin);

74 else if (!strcmp(name, "meshes"))

75 l_push_obj(bin_mesh_map_class, &bin);

76 else if (!strcmp(name, "scenes"))

class.php (https://github.com/dyron/userguide-de.git) PHP · 238 lines

1 <?php defined('SYSPATH') or die('No direct script access.');

2 /**

3 * Class documentation generator.

7 * @author Kohana Team

8 * @copyright (c) 2009 Kohana Team

9 * @license http://kohanaphp.com/license

10 */

11 class Kohana_Kodoc_Class extends Kodoc {

42

43 /**

44 * Loads a class and uses [reflection](http://php.net/reflection) to parse

45 * the class. Reads the class modifiers, constants and comment. Parses the

46 * comment to find the description and tags.

149

150 // Otherwise just do alphabetical

151 return strcmp($a->name, $b->name);

152 }

153

spm_eeg_average_TF.m (https://bitbucket.org/matthewbrett/spm-versions.git) Objective C · 205 lines

55 %-Check data type

56 %--------------------------------------------------------------------------

57 if ~strcmp(D.type, 'single')

58 error('This function can only be applied to single trial data');

59 end

63 end

64

65 if strcmp(D.transformtype, 'TFphase')

66 if ~isequal(S.robust, 0)

67 warning('Robust averaging is not applicable to phase data and will not be used.');

126 %-Straight average

127 %------------------------------------------------------------------

128 if ~strcmp(D.transformtype, 'TFphase')

129 if ~robust

130 Dnew(:, :, j, i) = mean(D(:, :, j, w), 4);

filespec.c (https://bitbucket.org/olioengr/dmd.git) C · 424 lines

145 {

146 *p2 = '\0';

147 if (strcmp(p, "..") == 0) /* move up cwd */

148 /* remove last directory from cwd */

149 *((char *)strrchr(cwd, DIRCHAR)) = '\0';

150 else if (strcmp(p, ".") != 0) /* not current directory */

151 {

152 cwd_t = cwd;

164 p2++;

165 }

166 else if (strcmp(p,"..") == 0) /* move up cwd */

167 {

168 /* remove last directory from cwd */

imraa_io.c (https://gitlab.com/mraa/mraa) C · 161 lines

79 }

80 // starting io configuration

81 if (strcmp(mraa_io_obj[i].type, "gpio") == 0) {

82 mraa_gpio_context gpio = NULL;

83 if (mraa_io_obj[i].raw) {

107 }

108 mraa_gpio_close(gpio);

109 } else if (strcmp(mraa_io_obj[i].type, "i2c") == 0) {

110 mraa_i2c_context i2c = NULL;

111 if (mraa_io_obj[i].raw) {

117 mraa_i2c_stop(i2c);

118 }

119 } else if (strcmp(mraa_io_obj[i].type, "pwm") == 0) {

120 mraa_pwm_context pwm = NULL;

121 if (mraa_io_obj[i].raw) {

admin.c (https://github.com/panzhao/chatRoom.git) C · 273 lines

122 }

123

124 if (strcmp(temp->user_msg.name, "admin\n") == 0)

125 {

126 strcpy(tran_msg->m_name, "Server\n");

Player.php (https://github.com/hifi-unmaintained/cncnet3-frontend.git) PHP · 169 lines

1 <?php

2

3 /*

65 {

66 $pass_hash = hash ( $this->hashalgo, $password . $row->pass_salt );

67 if ( strcmp ( $pass_hash, $row->pass_hash ) == 0 )

68 {

69 // correct password

94 {

95 $pass_hash = hash ( $this->hashalgo, $oldpass . $row->pass_salt );

96 if ( strcmp ( $pass_hash, $row->pass_hash ) == 0 )

97 {

98 // correct password

125 if ( $row )

126 {

127 if ( strcmp ( $ip, $row->ip ) == 0 )

128 {

129 // TODO: Make this a bit better.

realpath.c (https://bitbucket.org/kmv/aeriebsd-src.git) C · 193 lines

107 if (next_token[0] == '\0')

108 continue;

109 else if (strcmp(next_token, ".") == 0)

110 continue;

111 else if (strcmp(next_token, "..") == 0) {

string.c (https://github.com/jbush001/GPGPU.git) C · 167 lines

30 }

31

32 int __attribute__((noinline)) noinline_strcmp(const char *str1, const char *str2)

33 {

34 return strcmp(str1, str2);

92 char dest[64];

93

94 printf("1.1 %d\n", get_sign(noinline_strcmp("foo", "foot"))); // CHECK: 1.1 -1

95 printf("1.2 %d\n", get_sign(noinline_strcmp("foo", "fpo"))); // CHECK: 1.2 -1

96 printf("1.3 %d\n", get_sign(noinline_strcmp("foo", "foo"))); // CHECK: 1.3 0

97 printf("1.4 %d\n", get_sign(noinline_strcmp("foot", "foo"))); // CHECK: 1.4 1

98 printf("1.5 %d\n", get_sign(noinline_strcmp("fpo", "foo"))); // CHECK: 1.5 1

99

100 printf("2.1 %d\n", get_sign(noinline_memcmp("aaa", "aab", 3))); // CHECK: 2.1 -1

Handle.php (https://github.com/riaf/ethna.git) PHP · 210 lines

1 <?php

2 // vim: foldmethod=marker

3 /**

4 * Handle.php

5 *

6 * @author Masaki Fujimoto <fujimoto@php.net>

7 * @license http://www.opensource.org/licenses/bsd-license.php The BSD License

8 * @package Ethna

9 * @version $Id: f3d32974043c7fbc97d1dec586714c59b834c285 $

14 * Manager class of Ethna (Command Line) Handlers

15 *

16 * @author Masaki Fujimoto <fujimoto@php.net>

17 * @access public

18 * @package Ethna

parser.c.BASE.10308.c (https://github.com/guocongwudi/9315ass2.git) C · 308 lines

58 purl->scheme = str_n_dup(c, d - c);

59 // must be "http" or "https"

60 if (strcmp(purl->scheme, "http") != 0 && strcmp(purl->scheme, "https") != 0)

61 return freeParsedURL(purl);

62

90 }

91 // else {

92 // if (strcmp(purl->scheme, "http") == 0)

93 // purl->port = "80";

94 //

289 {

290 if (

291 (strcmp(a->scheme,b->scheme) == 0 && strcmp(a->port,b->port) == 0)

292 ||

293 (

294 (strcmp(a->scheme,"http") == 0 || strcmp(b->scheme,"https") == 0) &&

295 (strcmp(b->scheme,"http") == 0 || strcmp(a->scheme,"https") == 0) &&

test_unpack.c (https://github.com/ezzymny/moai-beta.git) C · 341 lines

78 j = json_string("foo");

79 rv = json_unpack(j, "s", &s);

80 if(rv || strcmp(s, "foo"))

81 fail("json_unpack string failed");

82 json_decref(j);

286 j = json_pack("{s:s, s:i}", "foo", "bar", "baz", 42);

287 rv = json_unpack(j, "{sssi!}", "foo", &s, "baz", &i1);

288 if(rv || strcmp(s, "bar") != 0 || i1 != 42)

289 fail("json_unpack object with strict validation failed");

290 json_decref(j);

parser.c.BACKUP.10308.c (https://github.com/guocongwudi/9315ass2.git) C · 306 lines

53 purl->scheme = str_n_dup(c, d - c);

54 // must be "http" or "https"

55 if (strcmp(purl->scheme, "http") != 0 && strcmp(purl->scheme, "https") != 0)

56 return freeParsedURL(purl);

57

84 }

85 // else {

86 // if (strcmp(purl->scheme, "http") == 0)

87 // purl->port = "80";

88 //

197 int isUrlEqual(Url* a, Url* b) {

198 int isEqual = 1; // 1 means equal

199 if (strcmp(a->host, b->host) == 0 && strcmp(a->path, b->path) == 0 &&

200

201 strcmp(a->params, b->params) == 0 && isEqual)

205

206 if (isEqual) {

207 if ((strcmp(a->scheme, b->scheme) == 0 && strcmp(a->port, b->port) == 0)

208 || ((strcmp(a->scheme, "http") == 0

tc.disc.c (https://github.com/rhuitl/uClinux.git) C · 200 lines

142

143 if (ioctl(f, TXGETLD, (ioctl_t) & tx) == 0) {

144 if (strcmp(tx.tx_name, strPOSIX) != 0)

145 if (ioctl(f, TXADDCD, (ioctl_t) strPOSIX) == 0) {

146 add_discipline = 1;

ChangeName.php (https://bitbucket.org/shashwat_dinasource/bitscentral.git) PHP · 212 lines

1 <?php

2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

3

5 * Add a directory to the public name of all the files of a reader

6 *

7 * PHP versions 4 and 5

8 *

9 * This library is free software; you can redistribute it and/or

23 * @category File Formats

24 * @package File_Archive

25 * @author Vincent Lascaux <vincentlascaux@php.net>

26 * @copyright 1997-2005 The PHP Group

27 * @license http://www.gnu.org/copyleft/lesser.html LGPL

28 * @version CVS: $Id: ChangeName.php,v 1.19 2005/07/09 12:54:35 vincentlascaux Exp $

29 * @link http://pear.php.net/package/File_Archive

courses-feed.php (https://github.com/danielwiener/RISD-English.git) PHP · 184 lines

15 <div class="aside">

16

17 <?php get_template_part( 'menu', 'secondary' ); // Loads the menu-secondary.php template. ?>

18

19 <?php get_sidebar( 'primary' ); // Loads the sidebar-primary.php template. ?>

37 <?php do_atomic( 'before_entry' ); // oxygen_before_entry ?>

38

39 <div id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">

40

41 <?php do_atomic( 'open_entry' ); // oxygen_open_entry ?>

147 else: ?>

148 <li>

149 <a href="#"><?php echo $spring_course->COURSENAME ?> - <strong><?php echo $spring_course->COURSETITLE ?></strong></a>

150 <div class="cdesc">

151 <p><?php echo $spring_course->COURSEDESC; ?>

182 <?php do_atomic( 'after_content' ); // oxygen_after_content ?>

183

184 <?php get_footer(); // Loads the footer.php template. ?>

FoFiType1.cc (https://bitbucket.org/preining/tex-live.git) C++ · 338 lines

270 } else {

271 if (strtok(buf, " \t") &&

272 (p = strtok(NULL, " \t\n\r")) && !strcmp(p, "def")) {

273 break;

274 }

multi_file_test.c (https://github.com/tzuryby/mod_conference-admin.git) C · 239 lines

81 int test_count = 0 ;

82

83 if (argc == 3 && strcmp (argv [2], "-v") == 0)

84 { verbose = SF_TRUE ;

85 argc -- ;

103 } ;

104

105 do_all = !strcmp (argv [1], "all") ;

106

107 if (do_all || ! strcmp (argv [1], "wav"))

110 } ;

111

112 if (do_all || ! strcmp (argv [1], "aiff"))

113 { multi_file_test ("multi_aiff.dat", aiff_formats, ARRAY_LEN (aiff_formats)) ;

114 test_count++ ;

emtexdir.c (https://bitbucket.org/preining/tex-live.git) C · 405 lines

59 {

60 if ((find.attr & 0x10)

61 && !(strcmp (find.name, ".") == 0 || strcmp (find.name, "..") == 0))

62 {

63 len = strlen (find.name);

string.d (https://gitlab.com/4144/gcc) D · 213 lines

191 }

192

193 int dstrcmp( scope const char[] s1, scope const char[] s2 ) @trusted

194 {

195 immutable len = s1.length <= s2.length ? s1.length : s2.length;

functions.php (https://github.com/BenBE/ispCP.git) PHP · 275 lines

1 <?php

2 function todo_init(&$todos) {

3 if (defined('SM_PATH'))

4 include_once(SM_PATH . 'functions/prefs.php');

5 else

6 include_once('../functions/prefs.php');

175 $d2 = todo_get_todo_dl_s($todo2);

176

177 if(strcmp($d1,$d2) == 0)

178 return ($p1 < $p2)?-1:1;

179 else

180 return strcmp($d1,$d2);

181 }

182

linuxglue.c (https://github.com/BlitzMaxModules/bah.mod.git) C · 254 lines

203

204 /* Special case desktop for historical compatibility */

205 if (strcmp (type, "DESKTOP") == 0)

206 {

207 user_dir = (char*) malloc (strlen (home_dir) + strlen ("/Desktop") + 1);

Pak.cpp (https://bitbucket.org/veltarn/nectar-editor.git) C++ · 306 lines

173 pakfile.read((char*)&m_header, sizeof(sPAKHeader));

174

175 if( strcmp( m_header.uniqueID, "NECP" ) == 0 )

176 {

177 //Puis on lit chaque entrée de la table des fichiers

Navigation.php (https://bitbucket.org/simancms/simancms.git) PHP · 218 lines

1 <?php

2

3 //==============================================================================

165 (sm_strcmp($main_suburl.$itemparams['attrs']['href'], $sm['server']['REQUEST_URI'])==0

166 ||

167 sm_strcmp($main_suburl.$itemparams['attrs']['href'], $sm['server']['REQUEST_URI'].'index.php')==0)

168 || (sm_is_index_page() && sm_strcmp($itemparams['attrs']['href'], $sm['s']['page']['scheme'].'://'.$sm['_s']['resource_url'])==0)

descriptor.c (https://github.com/Epictetus/postgres.git) C · 346 lines

107 for (i = descriptors; i; lastptr = &i->next, i = i->next)

108 {

109 if (!strcmp(name, i->name))

110 {

111 if ((!connection && !i->connection)

112 || (connection && i->connection

113 && !strcmp(connection, i->connection)))

114 {

115 *lastptr = i->next;

136 for (i = descriptors; i; i = i->next)

137 {

138 if (!strcmp(name, i->name))

139 {

140 if ((!connection && !i->connection)

ezsetupcommon.php (https://github.com/edorfaus/ezpublish.git) PHP · 206 lines

1 <?php

2 /**

3 * @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved.

156 for ( $n = 0; $n < count( $languageList ) - 1; $n++ )

157 {

158 if ( strcmp( $languageList[$n]->attribute( 'language_name' ), $languageList[$n+1]->attribute( 'language_name' ) ) > 0 )

159 {

160 $tmpElement = $languageList[$n];

manage.c (https://github.com/genesi/linux-legacy.git) C · 262 lines

165 }

166

167 if (strcmp(str, "poweroff") == 0 ||

168 strcmp(str, "halt") == 0) {

169 shutting_down = SHUTDOWN_POWEROFF;

170 orderly_poweroff(false);

171 } else if (strcmp(str, "reboot") == 0) {

172 shutting_down = SHUTDOWN_POWEROFF; /* ? */

173 ctrl_alt_del();

174 #ifdef CONFIG_PM_SLEEP

175 } else if (strcmp(str, "suspend") == 0) {

176 do_suspend();

177 #endif

CustomDeviceRepository.php (https://bitbucket.org/jerwinse/iagh-cms.git) PHP · 252 lines

1 <?php

2 /**

3 * Copyright (c) 2012 ScientiaMobile, Inc.

154 $capabilityValue = null;

155 // TODO: Prevent infinite recursion

156 while (strcmp($deviceId, "root")) {

157 $device = $this->persistenceStorage->load($deviceId);

158 if (!$device) {

205 public function getDeviceHierarchy($deviceId) {

206 $devices = array();

207 while (strcmp($deviceId, "root")) {

208 $device = $this->getDevice($deviceId);

209 $devices[] = $device;

graphics_aantal_accounts.php (https://github.com/HBL/klassenboek.git) PHP · 84 lines

1 <? require_once('include/init.php');

2 check_login();

3 $result = mysql_query_safe(<<<EOT

26 $day = 0;

27 for ($i = 1; $i < mysql_num_rows($result); $i++) {

28 while (strcmp($date, date("d-m-Y", mysql_result($result, $i, 0)))) {

29 $day++;

30 $lasttime += 24*60*60;

csyslogd-config.c (https://gitlab.com/Blueprint-Marketing/ossec-hids) C · 208 lines

59 merror(XML_VALUENULL, __local_name, node[i]->element);

60 goto fail;

61 } else if (strcmp(node[i]->element, xml_syslog_level) == 0) {

62 if (!OS_StrIsNum(node[i]->content)) {

63 merror(XML_VALUEERR, __local_name, node[i]->element, node[i]->content);

66

67 syslog_config[s]->level = (unsigned int) atoi(node[i]->content);

68 } else if (strcmp(node[i]->element, xml_syslog_port) == 0) {

69 if (!OS_StrIsNum(node[i]->content)) {

70 merror(XML_VALUEERR, __local_name, node[i]->element, node[i]->content);

73

74 syslog_config[s]->port = (unsigned int) atoi(node[i]->content);

75 } else if (strcmp(node[i]->element, xml_syslog_server) == 0) {

76 os_strdup(node[i]->content, syslog_config[s]->server);

77 } else if (strcmp(node[i]->element, xml_syslog_id) == 0) {

test_bitmap.c (https://github.com/gby/linux.git) C · 387 lines

58 {

59 snprintf(pbl_buffer, sizeof(pbl_buffer), "%*pbl", nbits, bitmap);

60 if (strcmp(expected_pbl, pbl_buffer)) {

61 pr_warn("[%s:%u] expected \"%s\", got \"%s\"\n",

62 srcfile, line,

LessonPlanLesson.php (https://github.com/VivekVish/Veda-Project-API.git) PHP · 316 lines

1 <?php

2

3 require_once("classes/resources/Material.php");

4 require_once("classes/resources/LessonAddition.php");

5

6 class LessonPlanLesson

201 }

202

203 if(strcmp($newPath,$oldPath)==0)

204 {

205 if($this->order>$newOrder)

ElggMenuBuilder.php (https://github.com/wangaiying/elgg4ysu.git) PHP · 268 lines

1 <?php

2 /**

3 * Elgg Menu Builder

172 * Sort the menu sections and trees

173 *

174 * @param mixed $sort_by Sort type as string or php callback

175 * @return void

176 */

250 $b = $b->getName();

251

252 return strcmp($a, $b);

253 }

254

nghttp2_map_test.c (https://gitlab.com/thanhnhat041/padavan-ng) C · 181 lines

51

52 CU_ASSERT(0 == nghttp2_map_insert(&map, &foo.map_entry));

53 CU_ASSERT(strcmp("foo", ((strentry *)nghttp2_map_find(&map, 1))->str) == 0);

54 CU_ASSERT(1 == nghttp2_map_size(&map));

55

58

59 CU_ASSERT(1 == nghttp2_map_size(&map));

60 CU_ASSERT(strcmp("foo", ((strentry *)nghttp2_map_find(&map, 1))->str) == 0);

61

62 CU_ASSERT(0 == nghttp2_map_insert(&map, &bar.map_entry));

69 CU_ASSERT(4 == nghttp2_map_size(&map));

70

71 CU_ASSERT(strcmp("baz", ((strentry *)nghttp2_map_find(&map, 3))->str) == 0);

72

73 nghttp2_map_remove(&map, 3);

oauth.php (https://github.com/Tidwell/HMXSongs-PHP-API.git) PHP · 217 lines

1 <?php defined('SYSPATH') OR die('No direct access allowed.');

2 /**

3 * OAuth Library

41 $input = rawurlencode($input);

42

43 if (version_compare(PHP_VERSION, '<', '5.3'))

44 {

45 // rawurlencode() is RFC3986 compliant in PHP 5.3

104 // OAuth Spec 9.1.1 (1)

105 // "Parameters are sorted by name, using lexicographical byte value ordering."

106 uksort($params, 'strcmp');

107

108 // Create a new query string

147 public static function parse_url($url)

148 {

149 if ($query = parse_url($url, PHP_URL_QUERY))

150 {

151 // Remove the query string from the URL

FlowGraphProxy.cpp (https://gitlab.com/dahbearz/CRYENGINE) C++ · 224 lines

19

20 //////////////////////////////////////////////////////////////////////////

21 CFlowGraphProxy::CFlowGraphProxy()

22 {

23 m_pEntity = NULL;

26

27 //////////////////////////////////////////////////////////////////////////

28 CFlowGraphProxy::~CFlowGraphProxy()

29 {

30 }

102 }

103

104 void CFlowGraphProxy::RemoveEventListener(IEntityEventListener* pListener)

105 {

106 stl::find_and_erase(m_listeners, pListener);

sys__tinyclr.cpp (https://bitbucket.org/pmfsampaio/netmf-lpc.git) C++ · 323 lines

273 sys_thread_t sys_thread_new(char *name, void (* thread)(void *arg), void *arg, int stacksize, int prio)

274 {

275 if(strcmp(name,TCPIP_THREAD_NAME) == 0)

276 {

277 SOCKETS_CreateTcpIpProcessor(thread, arg);

283 void sys_thread_free(char *name)

284 {

285 if(strcmp(name,TCPIP_THREAD_NAME) == 0)

286 {

287 // the tcip thread will be aborted later

ArrayUtils.php (https://gitlab.com/link233/bootmw) PHP · 187 lines

1 <?php

2 /**

3 * Methods to play with arrays.

34 * Keys are preserved. The input array is modified in place.

35 *

36 * Note: Benchmarking on PHP 5.3 and 5.4 indicates that for small

37 * strings, md5() is only 10% slower than hash('joaat',...) etc.,

38 * since the function call overhead dominates. So there's not much

53 }

54 uasort( $array, function ( $a, $b ) use ( $hashes ) {

55 return strcmp( $hashes[$a], $hashes[$b] );

56 } );

57 }

104 * indexed from 0 to $valueCount - 1

105 * @param callable $comparisonCallback A callback to compare two values, returning

106 * -1, 0 or 1 in the style of strcmp().

107 * @param string $target The target value to find.

108 *

ModuleController.php (https://github.com/faktoral/axiscommerce.git) PHP · 209 lines

1 <?php

2 /**

3 * Axis

199 $result = version_compare($a['version'], $b['version']);

200 } else {

201 $result = strcmp($a[$field], $b[$field]);

202 }

203

alter_table.y (https://github.com/cwida/duckdb.git) Happy · 458 lines

107 | SET SeqOptElem

108 {

109 if (strcmp($2->defname, "as") == 0 ||

110 strcmp($2->defname, "restart") == 0 ||

111 strcmp($2->defname, "owned_by") == 0)

112 ereport(ERROR,

113 (errcode(PG_ERRCODE_SYNTAX_ERROR),

glh_genext.h (https://bitbucket.org/lindenlab/viewer-beta/) C++ Header · 1675 lines ✨ Summary

This C++ code snippet is a part of the OpenGL API, specifically for loading and using extensions. It checks if an OpenGL extension is supported by the system and loads its functions into memory, allowing developers to use those extensions in their applications. The GLH_EXT_NAME macro is used to get the function names from the extension’s name.

550 return FALSE;

551 #ifdef GL_ARB_multitexture

552 } else if (0 == strcmp(extension, "GL_ARB_multitexture")) {

553 GLH_EXT_NAME(glMultiTexCoord1dARB) = (PFNGLMULTITEXCOORD1DARBPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord1dARB");

554 if (NULL == GLH_EXT_NAME(glMultiTexCoord1dARB))

656

657 #ifdef GL_ARB_texture_border_clamp

658 } else if (0 == strcmp(extension, "GL_ARB_texture_border_clamp")) {

659 #endif

660

661 #ifdef GL_ARB_texture_compression

662 } else if (0 == strcmp(extension, "GL_ARB_texture_compression")) {

663 GLH_EXT_NAME(glCompressedTexImage3DARB) = (PFNGLCOMPRESSEDTEXIMAGE3DARBPROC)GLH_EXT_GET_PROC_ADDRESS("glCompressedTexImage3DARB");

664 if (NULL == GLH_EXT_NAME(glCompressedTexImage3DARB))

module.c (https://github.com/dpapavas/luaprompt.git) C · 230 lines

70 }

71

72 if (!strcmp(k, "prompts")) {

73 const char *single, *multi;

74

79 lua_pushstring(L, multi);

80 lua_rawseti(L, -2, 2);

81 } else if (!strcmp(k, "colorize")) {

82 int colorize;

83

84 luap_getcolor(L, &colorize);

85 lua_pushboolean(L, colorize);

86 } else if (!strcmp(k, "history")) {

87 const char *history;

88

ksort.h (https://github.com/rrwick/Unicycler.git) C Header · 159 lines

41 #define KSORT_INIT(name, type_t, __sort_lt) \

42 size_t ks_lis_##name(size_t n, const type_t *a, size_t *b, size_t *_p) \

43 { /* translated from: http://www.algorithmist.com/index.php/Longest_Increasing_Subsequence.cpp */ \

44 size_t i, u, v, *top = b, *p; \

45 if (n == 0) return 0; \

97

98 #define ks_lt_generic(a, b) ((a) < (b))

99 #define ks_lt_str(a, b) (strcmp((a), (b)) < 0)

100

101 typedef const char *ksstr_t;

cache.c (https://gitlab.com/dj-tech/reactos) C · 287 lines

70 cleanable(char *path)

71 {

72 if (strcmp(basename(path),DEF_OPT_DIR) == 0)

73 return 1;

74 return 0;

lex.c (https://bitbucket.org/vrrm/brl-cad-copy-for-fast-history-browsing-in-git.git) C · 277 lines

264 register struct bu_lex_key *kp;

265 for (kp=keywords;kp->tok_val; kp++) {

266 if (strcmp(kp->string, unit) == 0) {

267 token->type = BU_LEX_KEYWORD;

268 token->t_key.value = kp->tok_val;

zend-functions.cpp (https://github.com/tstarling/hiphop-php.git) C++ · 207 lines

1 /*

2 +----------------------------------------------------------------------+

3 | HipHop for PHP |

4 +----------------------------------------------------------------------+

5 | Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |

16 */

17

18 #include "hphp/runtime/base/zend-functions.h"

19 #include "hphp/runtime/base/zend-strtod.h"

20

21 namespace HPHP {

22

23 #define SIZEOF_LONG 8

171 if (type == KindOfInt64) {

172 if (digits == MAX_LENGTH_OF_LONG - 1) {

173 int cmp = strcmp(&ptr[-digits], long_min_digits);

174 if (!(cmp < 0 || (cmp == 0 && *str == '-'))) {

175 if (dval) {

sysfs.c (https://bitbucket.org/fwilliams/ncm.git) C · 210 lines

35 static ssize_t ncm_sysfs_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) {

36 u32 channels;

37 if(strcmp(attr->attr.name, "code") == 0){

38 // dump the interpreter array

39 memcpy(buf, sysfs.program->instructions, sizeof(ncm_instr_t) * sysfs.program->length);

40 return sizeof(ncm_instr_t) * sysfs.program->length;

41 } else if(strcmp(attr->attr.name, "control") == 0){

42 if(is_running(sysfs.ncm_interp)){

43 memcpy(buf, "running\n", sizeof("running\n"));

47 return sizeof("not running\n");

48 }

49 } else if(strcmp(attr->attr.name, "params") == 0){

50 channels = sysfs.interp_params->network.channels;

51 memcpy(buf, sysfs.interp_params, sizeof(sysfs.interp_params->network.channels));

about.cpp (http://windowpicker.googlecode.com/svn/trunk/) C++ · 82 lines

12 BOOL About_OnInitDialog(HWND hwnd, HWND, LPARAM) {

13

14 g_phPages[PAGE_ABOUT] = hwnd;

15

16 if (g_pfnEnableThemeDialogTexture)

47 case NM_RETURN: {

48 PNMLINK pnmlink = reinterpret_cast<PNMLINK>(lParam);

49 if (!lstrcmp(pnmlink->item.szID, L"idHome")) {

50 ShellExecute(NULL, L"open", pnmlink->item.szUrl, NULL, NULL, SW_SHOWNORMAL);

51 }

58 case NM_RETURN: {

59 PNMLINK pnmlink = reinterpret_cast<PNMLINK>(lParam);

60 if (!lstrcmp(pnmlink->item.szID, L"idTranslatorMail") || !lstrcmp(pnmlink->item.szID, L"idTranslatorHome")) {

61 ShellExecute(NULL, L"open", pnmlink->item.szUrl, NULL, NULL, SW_SHOWNORMAL);

62 }

CCNotificationCenter.cpp (https://bitbucket.org/nesdavid/cocos2dx.git) C++ · 301 lines

84 continue;

85

86 if (!strcmp(observer->getName(),name) && observer->getTarget() == target && observer->getSender() == sender)

87 return true;

88 }

118 continue;

119

120 if (!strcmp(observer->getName(),name) && observer->getTarget() == target)

121 {

122 _observers->removeObject(observer);

171 continue;

172

173 if ( !strcmp(observer->getName(),name) && observer->getTarget() == target)

174 {

175 _observers->removeObject(observer);

spm_eeg_inv_help.m (https://bitbucket.org/matthewbrett/spm-versions.git) Objective C · 142 lines

66 % get sensor locations

67 %--------------------------------------------------------------------------

68 if strcmp(D.modality,'EEG')

69 sensors = headshape;

70 else

pdf_cmap_parse.c (https://github.com/Lafriks/mupdf.git) C · 490 lines

25 pdf_cmap_token_from_keyword(char *key)

26 {

27 if (!strcmp(key, "usecmap")) return TOK_USECMAP;

28 if (!strcmp(key, "begincodespacerange")) return TOK_BEGIN_CODESPACE_RANGE;

29 if (!strcmp(key, "endcodespacerange")) return TOK_END_CODESPACE_RANGE;

30 if (!strcmp(key, "beginbfchar")) return TOK_BEGIN_BF_CHAR;

31 if (!strcmp(key, "endbfchar")) return TOK_END_BF_CHAR;

32 if (!strcmp(key, "beginbfrange")) return TOK_BEGIN_BF_RANGE;

33 if (!strcmp(key, "endbfrange")) return TOK_END_BF_RANGE;

34 if (!strcmp(key, "begincidchar")) return TOK_BEGIN_CID_CHAR;

35 if (!strcmp(key, "endcidchar")) return TOK_END_CID_CHAR;

36 if (!strcmp(key, "begincidrange")) return TOK_BEGIN_CID_RANGE;

page_model.php (https://github.com/medieteknik/Medieteknik.nu.git) PHP · 255 lines

1 <?php

2 class Page_model extends CI_Model

3 {

245 // update the translation, and if the texts have not been changed then dont update the last_edit field

246 $theTime = date("Y-m-d H:i:s", time());

247 $sql = 'UPDATE page_content SET last_edit = IF(STRCMP(header, "'.$theHeader.'") = 0, IF(STRCMP(content, "'.$theContent.'") = 0, last_edit, "'.$theTime.'"), "'.$theTime.'"), header = "'.$theHeader.'", content = "'.$theContent.'" WHERE page_id = "'.$page_id.'" AND lang_id = "'.$lang_id.'" ';

248 $this->db->query($sql);

249 return true;

function.strnatcasecmp.html (https://github.com/cue-taro/emacs-setting-files.git) HTML · 110 lines

10 <div class="next" style="text-align: right; float: right;"><a href="function.strnatcmp.html">strnatcmp</a></div>

11 <div class="up"><a href="ref.strings.html">String 関数</a></div>

12 <div class="home"><a href="index.html">PHP Manual</a></div>

13 </div><hr /><div id="function.strnatcasecmp" class="refentry">

14 <div class="refnamediv">

15 <h1 class="refname">strnatcasecmp</h1>

16 <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">strnatcasecmp</span> &mdash; <span class="dc-title">&quot;自然順&quot;アルゴリズムにより大文字小文字を区別しない文字列比較を行う</span></p>

17

18 </div>

90 <ul class="simplelist">

91 <li class="member"><span class="function"><a href="function.preg-match.html" class="function" rel="rdfs-seeAlso">preg_match()</a> - 正規表現によるマッチングを行う</span></li>

92 <li class="member"><span class="function"><a href="function.strcmp.html" class="function" rel="rdfs-seeAlso">strcmp()</a> - バイナリセーフな文字列比較</span></li>

93 <li class="member"><span class="function"><a href="function.strcasecmp.html" class="function" rel="rdfs-seeAlso">strcasecmp()</a> - 大文字小文字を区別しないバイナリセーフな文字列比較を行う</span></li>

94 <li class="member"><span class="function"><a href="function.substr.html" class="function" rel="rdfs-seeAlso">substr()</a> - 文字列の一部分を返す</span></li>

nochex.php (https://gitlab.com/reclamare/mao) PHP · 131 lines

1 <?php

2 // Nochex via form will work for both simple "Seller" account and "Merchant" account holders

3 // Nochex via APC maybe only avaiable to "Merchant" account holders only - site docs a bit vague on this point

119 curl_close($curl);

120

121 if (strcmp($response, 'AUTHORISED') == 0) {

122 $this->model_checkout_order->addOrderHistory($order_id, $this->config->get('nochex_order_status_id'));

123 } else {

libc.rb (https://github.com/postmodern/ffi-libc.git) Ruby · 220 lines

81 attach_function :strcpy, [:buffer_out, :string], :pointer

82 attach_function :strncpy, [:buffer_out, :string, :size_t], :pointer

83 attach_function :strcmp, [:buffer_in, :buffer_in], :int

84 attach_function :strncmp, [:buffer_in, :buffer_in, :size_t], :int

85 attach_function :strlen, [:buffer_in], :size_t

tree.c (https://github.com/ArtifexSoftware/mupdf.git) C · 115 lines

39 while (node != &tree_sentinel)

40 {

41 int c = strcmp(key, node->key);

42 if (c == 0)

43 return node->value;

85 if (node && node != &tree_sentinel)

86 {

87 int c = strcmp(key, node->key);

88 if (c < 0)

89 node->left = fz_tree_insert(ctx, node->left, key, value);

mxml-attr.c (https://gitlab.com/pine64-android/linux-3.10) C · 314 lines

12 * missing or damaged, see the license at:

13 *

14 * http://www.msweet.org/projects.php/Mini-XML

15 */

16

69 #endif /* DEBUG */

70

71 if (!strcmp(attr->name, name))

72 {

73 /*

131 #endif /* DEBUG */

132

133 if (!strcmp(attr->name, name))

134 {

135 #ifdef DEBUG

CPcalculateStatistics.m (https://github.com/aherbert/openmicroscopy.git) Objective C · 113 lines

16 ObjectName = char(ObjectFields(i));

17 %%% Filter out Experiment and Image fields

18 if ~strcmp(ObjectName,'Experiment')

19

20 try

28 MeasureFeatureName = char(MeasureFields(j));

29 if length(MeasureFeatureName) > 7

30 if strcmp(MeasureFeatureName(end-7:end),'Features')

31

32 %%% Not placed with above if statement since

33 %%% MeasureFeatureName may not be 8 characters long

34 if ~strcmp(MeasureFeatureName(1:8),'Location')

35

36 if strcmp(MeasureFeatureName,'ModuleErrorFeatures')

getdataME.m (git://github.com/tobin/lentickle.git) Objective C · 142 lines ✨ Summary

This function, getdataME, retrieves data from a frame file and returns the data as a vector dat and an optional time vector t. It takes in various arguments such as file name, starting time, sampling frequency, and channel names. The function loads data from one or more files, resamples it if necessary, and returns the data with the specified sampling frequency.

46 if ~iscell(file)

47 if isstr(file)

48 if strcmp(file, 'trend')

49 file = {'/virgoData/ffl/trend.ffl'};

50 else

doh.h (https://swig.svn.sourceforge.net/svnroot/swig) C++ Header · 447 lines ✨ Summary

This is a C++ header file that provides a set of data structures and functions for working with objects, strings, files, and other data types. It defines classes and functions for managing memory, performing operations on data, and handling errors. The code appears to be part of a larger library or framework, providing a way to interact with various types of data in a consistent and efficient manner.

96 #define DohNewStringWithSize DOH_NAMESPACE(NewStringWithSize)

97 #define DohNewStringf DOH_NAMESPACE(NewStringf)

98 #define DohStrcmp DOH_NAMESPACE(Strcmp)

99 #define DohStrncmp DOH_NAMESPACE(Strncmp)

100 #define DohStrstr DOH_NAMESPACE(Strstr)

282 extern DOHString *DohNewStringf(const DOH *fmt, ...);

283

284 extern int DohStrcmp(const DOHString_or_char *s1, const DOHString_or_char *s2);

285 extern int DohStrncmp(const DOHString_or_char *s1, const DOHString_or_char *s2, int n);

286 extern char *DohStrstr(const DOHString_or_char *s1, const DOHString_or_char *s2);

418 #define NewVoid DohNewVoid

419 #define Keys DohKeys

420 #define Strcmp DohStrcmp

421 #define Strncmp DohStrncmp

422 #define Strstr DohStrstr

tsexp.c (http://get-a-robot-vpnc.googlecode.com/svn/trunk/) C · 457 lines ✨ Summary

This C code is a test suite for the GnuPG library, specifically testing its error handling and parsing functionality. It checks various scenarios such as invalid input, missing parentheses, and memory warnings to ensure the library behaves correctly in different situations. The tests are run with varying verbosity levels and report any errors encountered during execution.

442 main (int argc, char **argv)

443 {

444 if (argc > 1 && !strcmp (argv[1], "--verbose"))

445 verbose = 1;

446

UnixFileSystem.php (git://github.com/alexgorbatchev/SyntaxHighlighter.git) text · 0 lines

1 <?php

2 /*

3 * $Id: UnixFileSystem.php 258 2007-10-21 00:46:45Z hans $

20 */

21

22 include_once 'phing/system/io/FileSystem.php';

23

24 /**

25 * UnixFileSystem class. This class encapsulates the basic file system functions

26 * for platforms using the unix (posix)-stylish filesystem. It wraps php native

27 * functions suppressing normal PHP error reporting and instead uses Exception

29 *

30 * This class is part of a oop based filesystem abstraction and targeted to run

31 * on all supported php platforms.

32 *

33 * Note: For debugging turn track_errors on in the php.ini. The error messages

margin-left.patch (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 270 lines

59 @@ -2140,6 +2142,10 @@

60 }

61 else if (strcmp(temp, "--cookies") == 0)

62 file_cookies(temp2);

63 + else if (strcmp(temp, "--stylesheet") == 0)

string.c (https://swig.svn.sourceforge.net/svnroot/swig) C · 912 lines ✨ Summary

This C code defines a string data type and its associated functions for manipulating strings, such as creating new strings, comparing strings, searching for substrings, and reading/writing files. It also provides object-oriented features like inheritance and polymorphism through the use of DohObjInfo and DohStringType structures. The code is part of a larger programming framework or library.

887

888 /* -----------------------------------------------------------------------------

889 * Strcmp()

890 * Strncmp()

891 * Strstr()

895 * ----------------------------------------------------------------------------- */

896

897 int DohStrcmp(const DOHString_or_char *s1, const DOHString_or_char *s2) {

898 return strcmp(Char(s1),Char(s2));

SetUicontrolFontUnits.cpp (git://pkgs.fedoraproject.org/scilab) C++ · 73 lines

33 fontUnits = getStringFromStack(stackPointer);

34

35 if (strcmp(fontUnits, "points") == 0)

36 {

37 pUICONTROL_FEATURE(sciObj)->fontUnits = POINTS_UNITS;

38 }

39 else if(strcmp(fontUnits, "normalized") == 0)

40 {

41 pUICONTROL_FEATURE(sciObj)->fontUnits = NORMALIZED_UNITS;

42 }

43 else if(strcmp(fontUnits, "inches") == 0)

44 {

45 pUICONTROL_FEATURE(sciObj)->fontUnits = INCHES_UNITS;