commit
stringlengths
40
40
old_file
stringlengths
4
112
new_file
stringlengths
4
112
old_contents
stringlengths
0
2.05k
new_contents
stringlengths
28
3.9k
subject
stringlengths
17
736
message
stringlengths
18
4.78k
lang
stringclasses
1 value
license
stringclasses
13 values
repos
stringlengths
7
111k
adee120a170ac38009f875d4819f89be5eac9198
src/lib/llist.h
src/lib/llist.h
#ifndef LLIST_H #define LLIST_H /* Doubly linked list */ #define DLLIST_PREPEND(list, item) STMT_START { \ (item)->prev = NULL; \ (item)->next = *(list); \ if (*(list) != NULL) (*(list))->prev = (item); \ *(list) = (item); \ } STMT_END #define DLLIST_REMOVE(list, item) STMT_START { \ if ((item)->prev == NULL) \ *(list) = (item)->next; \ else \ (item)->prev->next = (item)->next; \ if ((item)->next != NULL) \ (item)->next->prev = (item)->prev; \ } STMT_END #endif
#ifndef LLIST_H #define LLIST_H /* Doubly linked list */ #define DLLIST_PREPEND(list, item) STMT_START { \ (item)->prev = NULL; \ (item)->next = *(list); \ if (*(list) != NULL) (*(list))->prev = (item); \ *(list) = (item); \ } STMT_END #define DLLIST_REMOVE(list, item) STMT_START { \ if ((item)->prev == NULL) \ *(list) = (item)->next; \ else \ (item)->prev->next = (item)->next; \ if ((item)->next != NULL) { \ (item)->next->prev = (item)->prev; \ (item)->next = NULL; \ } \ (item)->prev = NULL; \ } STMT_END #endif
Set removed item's prev/next pointers to NULL.
DLLIST_REMOVE(): Set removed item's prev/next pointers to NULL.
C
mit
Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot
1bda1ddc5ccd30b92da0511428055b4d3230e6d4
chrome/app/scoped_ole_initializer.h
chrome/app/scoped_ole_initializer.h
// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_APP_SCOPED_OLE_INITIALIZER_H_ #define CHROME_APP_SCOPED_OLE_INITIALIZER_H_ // Wraps OLE initialization in a cross-platform class meant to be used on the // stack so init/uninit is done with scoping. This class is ok for use by // non-windows platforms; it just doesn't do anything. #if defined(OS_WIN) #include <ole2.h> class ScopedOleInitializer { public: ScopedOleInitializer() { int ole_result = OleInitialize(NULL); DCHECK(ole_result == S_OK); } ~ScopedOleInitializer() { OleUninitialize(); } }; #else class ScopedOleInitializer { public: // Empty, this class does nothing on non-win32 systems. Empty ctor is // necessary to avoid "unused variable" warning on gcc. ScopedOleInitializer() { } }; #endif #endif // CHROME_APP_SCOPED_OLE_INITIALIZER_H_
// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_APP_SCOPED_OLE_INITIALIZER_H_ #define CHROME_APP_SCOPED_OLE_INITIALIZER_H_ #include "base/logging.h" #include "build/build_config.h" // Wraps OLE initialization in a cross-platform class meant to be used on the // stack so init/uninit is done with scoping. This class is ok for use by // non-windows platforms; it just doesn't do anything. #if defined(OS_WIN) #include <ole2.h> class ScopedOleInitializer { public: ScopedOleInitializer() { int ole_result = OleInitialize(NULL); DCHECK(ole_result == S_OK); } ~ScopedOleInitializer() { OleUninitialize(); } }; #else class ScopedOleInitializer { public: // Empty, this class does nothing on non-win32 systems. Empty ctor is // necessary to avoid "unused variable" warning on gcc. ScopedOleInitializer() { } }; #endif #endif // CHROME_APP_SCOPED_OLE_INITIALIZER_H_
Make ScopedOleInitializer work on windows if you aren't including build_config already.
Make ScopedOleInitializer work on windows if you aren't including build_config already. BUG=none TEST=none Review URL: http://codereview.chromium.org/19640 git-svn-id: http://src.chromium.org/svn/trunk/src@8835 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: 11ecac55348eb103e2cbcd25cb01178584faa57f
C
bsd-3-clause
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser
6c9ccbc59bb5d98785b5e45acd139704241ecebb
test/Interop/Cxx/class/Inputs/access-specifiers.h
test/Interop/Cxx/class/Inputs/access-specifiers.h
class PublicPrivate { public: int PublicMemberVar; static int PublicStaticMemberVar; void publicMemberFunc(); typedef int PublicTypedef; struct PublicStruct {}; enum PublicEnum { PublicEnumValue1 }; enum { PublicAnonymousEnumValue }; enum PublicClosedEnum { PublicClosedEnumValue1 } __attribute__((enum_extensibility(closed))); enum PublicOpenEnum { PublicOpenEnumValue1 } __attribute__((enum_extensibility(open))); enum PublicFlagEnum {} __attribute__((flag_enum)); private: int PrivateMemberVar; static int PrivateStaticMemberVar; void privateMemberFunc() {} typedef int PrivateTypedef; struct PrivateStruct {}; enum PrivateEnum { PrivateEnumValue1 }; enum { PrivateAnonymousEnumValue1 }; enum PrivateClosedEnum { PrivateClosedEnumValue1 } __attribute__((enum_extensibility(closed))); enum PrivateOpenEnum { PrivateOpenEnumValue1 } __attribute__((enum_extensibility(open))); enum PrivateFlagEnum {} __attribute__((flag_enum)); };
#ifndef TEST_INTEROP_CXX_CLASS_INPUTS_ACCESS_SPECIFIERS_H #define TEST_INTEROP_CXX_CLASS_INPUTS_ACCESS_SPECIFIERS_H class PublicPrivate { public: int PublicMemberVar; static int PublicStaticMemberVar; void publicMemberFunc(); typedef int PublicTypedef; struct PublicStruct {}; enum PublicEnum { PublicEnumValue1 }; enum { PublicAnonymousEnumValue }; enum PublicClosedEnum { PublicClosedEnumValue1 } __attribute__((enum_extensibility(closed))); enum PublicOpenEnum { PublicOpenEnumValue1 } __attribute__((enum_extensibility(open))); enum PublicFlagEnum {} __attribute__((flag_enum)); private: int PrivateMemberVar; static int PrivateStaticMemberVar; void privateMemberFunc() {} typedef int PrivateTypedef; struct PrivateStruct {}; enum PrivateEnum { PrivateEnumValue1 }; enum { PrivateAnonymousEnumValue1 }; enum PrivateClosedEnum { PrivateClosedEnumValue1 } __attribute__((enum_extensibility(closed))); enum PrivateOpenEnum { PrivateOpenEnumValue1 } __attribute__((enum_extensibility(open))); enum PrivateFlagEnum {} __attribute__((flag_enum)); }; #endif
Add header guards for test input headers
Add header guards for test input headers
C
apache-2.0
harlanhaskins/swift,roambotics/swift,harlanhaskins/swift,gregomni/swift,JGiola/swift,stephentyrone/swift,allevato/swift,CodaFi/swift,rudkx/swift,gregomni/swift,JGiola/swift,jmgc/swift,apple/swift,jmgc/swift,rudkx/swift,atrick/swift,hooman/swift,tkremenek/swift,jckarter/swift,nathawes/swift,harlanhaskins/swift,roambotics/swift,harlanhaskins/swift,allevato/swift,aschwaighofer/swift,JGiola/swift,harlanhaskins/swift,stephentyrone/swift,CodaFi/swift,atrick/swift,xwu/swift,CodaFi/swift,rudkx/swift,ahoppen/swift,atrick/swift,nathawes/swift,stephentyrone/swift,roambotics/swift,benlangmuir/swift,allevato/swift,apple/swift,jmgc/swift,jckarter/swift,jckarter/swift,hooman/swift,xwu/swift,parkera/swift,CodaFi/swift,stephentyrone/swift,nathawes/swift,CodaFi/swift,allevato/swift,jckarter/swift,ahoppen/swift,glessard/swift,xwu/swift,parkera/swift,roambotics/swift,jckarter/swift,JGiola/swift,parkera/swift,rudkx/swift,stephentyrone/swift,aschwaighofer/swift,parkera/swift,atrick/swift,apple/swift,airspeedswift/swift,airspeedswift/swift,stephentyrone/swift,apple/swift,aschwaighofer/swift,jmgc/swift,hooman/swift,allevato/swift,apple/swift,jmgc/swift,parkera/swift,glessard/swift,aschwaighofer/swift,stephentyrone/swift,ahoppen/swift,jmgc/swift,tkremenek/swift,atrick/swift,airspeedswift/swift,airspeedswift/swift,allevato/swift,airspeedswift/swift,parkera/swift,tkremenek/swift,gregomni/swift,rudkx/swift,gregomni/swift,aschwaighofer/swift,atrick/swift,ahoppen/swift,harlanhaskins/swift,parkera/swift,benlangmuir/swift,hooman/swift,nathawes/swift,benlangmuir/swift,tkremenek/swift,xwu/swift,aschwaighofer/swift,jmgc/swift,tkremenek/swift,roambotics/swift,hooman/swift,harlanhaskins/swift,JGiola/swift,gregomni/swift,ahoppen/swift,xwu/swift,nathawes/swift,tkremenek/swift,hooman/swift,benlangmuir/swift,allevato/swift,JGiola/swift,jckarter/swift,gregomni/swift,parkera/swift,glessard/swift,aschwaighofer/swift,rudkx/swift,apple/swift,xwu/swift,xwu/swift,CodaFi/swift,airspeedswift/swift,glessard/swift,nathawes/swift,hooman/swift,nathawes/swift,glessard/swift,ahoppen/swift,benlangmuir/swift,benlangmuir/swift,tkremenek/swift,glessard/swift,airspeedswift/swift,roambotics/swift,CodaFi/swift,jckarter/swift
deb71d745847f5b923ef798fc813d71f5bf9e675
folly/executors/SequencedExecutor.h
folly/executors/SequencedExecutor.h
/* * Copyright (c) Facebook, Inc. and its affiliates. * * 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. */ #pragma once #include <folly/Executor.h> namespace folly { // SequencedExecutor is an executor that provides the following guarantee: // if add(A) and add(B) were sequenced (i.e. add(B) was called after add(A) call // had returned to the caller) then execution of A and B will be sequenced // (i.e. B() can be called only after A() returns) too. class SequencedExecutor : public virtual Executor { public: virtual ~SequencedExecutor() {} }; } // namespace folly
/* * Copyright (c) Facebook, Inc. and its affiliates. * * 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. */ #pragma once #include <folly/Executor.h> namespace folly { // SequencedExecutor is an executor that provides the following guarantee: // if add(A) and add(B) were sequenced (i.e. add(B) was called after add(A) call // had returned to the caller) then execution of A and B will be sequenced // (i.e. B() can be called only after A() returns) too. class SequencedExecutor : public virtual Executor { public: virtual ~SequencedExecutor() override {} }; } // namespace folly
Mark some destructors that are overriden as `override`
Mark some destructors that are overriden as `override` Summary: This satisfies a new error in llvm11 Reviewed By: smeenai Differential Revision: D27421459 fbshipit-source-id: 963d809a4f430a365223786ea7d2591fe239062f
C
apache-2.0
facebook/folly,facebook/folly,facebook/folly,facebook/folly,facebook/folly
bc22dc60adc9d59e9a0b5d940ce6222056d35acc
task1.c
task1.c
#include <stdio.h> #include <fcntl.h> #include <unistd.h> int main(int argc, char* argv[]) { if (argc > 1) { int fdWrite = open(argv[1], O_WRONLY | O_CREAT, 0666); if (fdWrite == -1) { write(2, "Cannot open file", 16); return 1; } int fdRead = open(argv[1], O_RDONLY); if (fdRead == -1) { write(2, "Cannot open file", 16); return 1; } lseek(fdWrite, -1, SEEK_END); char c; while (read(fdRead, &c, 1)) { if (c >= '0' && c <= '9') break; write(fdWrite, &c, 1); } char buff[100]; int readCount; while (readCount = read(fdRead, buff, 100)) write(1, buff, readCount); } else { printf("No file name provided"); } return 0; }
#include <stdio.h> #include <fcntl.h> #include <unistd.h> int main(int argc, char* argv[]) { if (argc > 1) { int stdoutCopy = dup(1); close(1); int fdWrite = open(argv[1], O_WRONLY | O_CREAT | O_APPEND, 0666); if (fdWrite == -1) { write(2, "Cannot open file", 16); return 1; } close(0); int fdRead = open(argv[1], O_RDONLY); if (fdRead == -1) { write(2, "Cannot open file", 16); return 1; } char c; while (read(0, &c, 1) && !(c >= '0' && c <= '9')) { write(1, &c, 1); } char buff[100]; int readCount; close(1); dup(stdoutCopy); while (readCount = read(0, buff, 100)) write(1, buff, readCount); } else { printf("No file name provided"); } return 0; }
Add stdin and stdout redirects
Add stdin and stdout redirects
C
mit
zdravkoandonov/sysprog
4d26eeb21841892bbab01c023a32f285e94a84bb
cc/CatchCvExceptionWorker.h
cc/CatchCvExceptionWorker.h
#include "NativeNodeUtils.h" #ifndef __FF_CATCHCVEXCEPTIONWORKER_H__ #define __FF_CATCHCVEXCEPTIONWORKER_H__ struct CatchCvExceptionWorker : public FF::SimpleWorker { public: std::string execute() { try { return executeCatchCvExceptionWorker(); } catch (std::exception e) { return std::string(e.what()); } } virtual std::string executeCatchCvExceptionWorker() = 0; }; #endif
#include "NativeNodeUtils.h" #ifndef __FF_CATCHCVEXCEPTIONWORKER_H__ #define __FF_CATCHCVEXCEPTIONWORKER_H__ struct CatchCvExceptionWorker : public FF::SimpleWorker { public: std::string execute() { try { return executeCatchCvExceptionWorker(); } catch (std::exception &e) { return std::string(e.what()); } } virtual std::string executeCatchCvExceptionWorker() = 0; }; #endif
Add more helpful C++ error messages
Add more helpful C++ error messages
C
mit
justadudewhohacks/opencv4nodejs,justadudewhohacks/opencv4nodejs,justadudewhohacks/opencv4nodejs,justadudewhohacks/opencv4nodejs,justadudewhohacks/opencv4nodejs,justadudewhohacks/opencv4nodejs
ed94ce0fde0f1c74a9e1af40b4848b9d92557173
doc/tutorial/code/basic.c
doc/tutorial/code/basic.c
#include <stdint.h> uint32_t add(uint32_t x, uint32_t y) { return x + y; } uint32_t dbl(uint32_t x) { return add(x, x); }
Add missing LLVM example to tutorial
Add missing LLVM example to tutorial
C
bsd-3-clause
GaloisInc/saw-script,GaloisInc/saw-script,GaloisInc/saw-script,GaloisInc/saw-script,GaloisInc/saw-script
72ffe721cd865da2222166e4afbbc06d2f6cf099
lib/vpsc/remove_rectangle_overlap.h
lib/vpsc/remove_rectangle_overlap.h
/** * \brief remove overlaps between a set of rectangles. * * Authors: * Tim Dwyer <[email protected]> * * Copyright (C) 2005 Authors * * This version is released under the CPL (Common Public License) with * the Graphviz distribution. * A version is also available under the LGPL as part of the Adaptagrams * project: http://sourceforge.net/projects/adaptagrams. * If you make improvements or bug fixes to this code it would be much * appreciated if you could also contribute those changes back to the * Adaptagrams repository. */ #ifndef REMOVE_RECTANGLE_OVERLAP_H_SEEN #define REMOVE_RECTANGLE_OVERLAP_H_SEEN class Rectangle; void removeRectangleOverlap(Rectangle *rs[], int n, double xBorder, double yBorder); #endif /* !REMOVE_RECTANGLE_OVERLAP_H_SEEN */
Add the vpsc library for IPSEPCOLA features
Add the vpsc library for IPSEPCOLA features
C
epl-1.0
tkelman/graphviz,tkelman/graphviz,pixelglow/graphviz,MjAbuz/graphviz,ellson/graphviz,kbrock/graphviz,kbrock/graphviz,jho1965us/graphviz,tkelman/graphviz,MjAbuz/graphviz,jho1965us/graphviz,ellson/graphviz,BMJHayward/graphviz,pixelglow/graphviz,jho1965us/graphviz,pixelglow/graphviz,kbrock/graphviz,tkelman/graphviz,pixelglow/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,kbrock/graphviz,tkelman/graphviz,jho1965us/graphviz,kbrock/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,tkelman/graphviz,pixelglow/graphviz,MjAbuz/graphviz,pixelglow/graphviz,kbrock/graphviz,tkelman/graphviz,jho1965us/graphviz,MjAbuz/graphviz,kbrock/graphviz,MjAbuz/graphviz,kbrock/graphviz,kbrock/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,tkelman/graphviz,BMJHayward/graphviz,jho1965us/graphviz,ellson/graphviz,jho1965us/graphviz,jho1965us/graphviz,ellson/graphviz,tkelman/graphviz,pixelglow/graphviz,tkelman/graphviz,pixelglow/graphviz,ellson/graphviz,BMJHayward/graphviz,kbrock/graphviz,BMJHayward/graphviz,jho1965us/graphviz,jho1965us/graphviz,ellson/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,kbrock/graphviz,ellson/graphviz,tkelman/graphviz,ellson/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,pixelglow/graphviz,ellson/graphviz,ellson/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,pixelglow/graphviz,jho1965us/graphviz,pixelglow/graphviz,ellson/graphviz
ad6fff03ba1840e7b62fdf2a2f1da1dda7600bc2
main.c
main.c
#include "siphash.h" #include <stdio.h> int main(void) { uint8_t key[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; uint64_t k0 = *(uint64_t*)(key + 0); uint64_t k1 = *(uint64_t*)(key + 8); uint8_t msg[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e}; uint64_t s = siphash24(k0, k1, msg, sizeof(msg)); printf("SipHash-2-4 test: 0x%016llx (expected 0x%016llx)\n", s, 0xa129ca6149be45e5ull); return 0; }
#include "siphash.h" #include <stdio.h> int main(void) { uint8_t key[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; uint64_t k0 = *(uint64_t*)(key + 0); uint64_t k1 = *(uint64_t*)(key + 8); uint8_t msg[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e}; uint8_t res[] = {0xe5, 0x45, 0xbe, 0x49, 0x61, 0xca, 0x29, 0xa1}; uint64_t r = *(uint64_t*)res; uint64_t s = siphash24(k0, k1, msg, sizeof(msg)); printf("SipHash-2-4 test: 0x%016llx (expected 0x%016llx)\n", s, r); return 0; }
Make expected test result endianness-neutral
Make expected test result endianness-neutral Signed-off-by: Gregory Petrosyan <[email protected]>
C
mit
flyingmutant/siphash
abc56d775ef19f709b75c676a23fcb9b6c99762d
test/CodeGen/debug-info-version.c
test/CodeGen/debug-info-version.c
// RUN: %clang -g -S -emit-llvm -o - %s | FileCheck %s // RUN: %clang -S -emit-llvm -o - %s | FileCheck %s --check-prefix=NO_DEBUG int main (void) { return 0; } // CHECK: i32 2, !"Debug Info Version", i32 2} // NO_DEBUG-NOT: metadata !"Debug Info Version"
// RUN: %clang -g -S -emit-llvm -o - %s | FileCheck %s // RUN: %clang -S -emit-llvm -o - %s | FileCheck %s --check-prefix=NO_DEBUG int main (void) { return 0; } // CHECK: i32 2, !"Debug Info Version", i32 2} // NO_DEBUG-NOT: !"Debug Info Version"
Update this testcase for the new metadata assembler syntax.
Update this testcase for the new metadata assembler syntax. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@224262 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
594f834700f5dc7c3881195db73d299b5d47ac14
src/modules/os/methods/homedir.c
src/modules/os/methods/homedir.c
#include "duktape.h" #include "mininode.h" #include "uv.h" #include <unistd.h> duk_ret_t mn_bi_os_homedir(duk_context *ctx) { char buf[PATH_MAX]; size_t len = sizeof(buf); const int err = uv_os_homedir(buf, &len); if (err) { duk_push_string(ctx, "uv_os_homedir() error!"); duk_throw(ctx); } duk_push_string(ctx, buf); return 1; }
#include "duktape.h" #include "mininode.h" #include "uv.h" #include <unistd.h> duk_ret_t mn_bi_os_homedir(duk_context *ctx) { char buf[PATH_MAX]; size_t len = sizeof(buf); const int err = uv_os_homedir(buf, &len); if (err) { duk_push_string(ctx, "uv_os_homedir() error!"); duk_throw(ctx); } else { duk_push_string(ctx, buf); return 1; } }
Make the branches explicit rather than implicit
Make the branches explicit rather than implicit
C
mit
hypoalex/mininode,hypoalex/mininode,hypoalex/mininode
907b0aa7b72d7786b824a573868df93723acafd3
Source/Typhoon.h
Source/Typhoon.h
//////////////////////////////////////////////////////////////////////////////// // // JASPER BLUES // Copyright 2013 Jasper Blues // All Rights Reserved. // // NOTICE: Jasper Blues permits you to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // //////////////////////////////////////////////////////////////////////////////// #import "TyphoonDefinition.h" #import "TyphoonInitializer.h" #import "TyphoonPropertyPlaceholderConfigurer.h" #import "TyphoonResource.h" #import "TyphoonBundleResource.h" #import "TyphoonComponentFactory.h" #import "TyphoonComponentFactory+InstanceBuilder.h" #import "TyphoonXmlComponentFactory.h" #import "TyphoonComponentFactoryMutator.h" #import "TyphoonRXMLElement+XmlComponentFactory.h" #import "TyphoonRXMLElement.h" #import "TyphoonTestUtils.h" #import "TyphoonIntrospectionUtils.h" #import "TyphoonAssembly.h" //TODO: Possibly move this to make explicit #import "TyphoonBlockComponentFactory.h" #import "TyphoonAutowire.h" #import "TyphoonShorthand.h"
//////////////////////////////////////////////////////////////////////////////// // // JASPER BLUES // Copyright 2013 Jasper Blues // All Rights Reserved. // // NOTICE: Jasper Blues permits you to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // //////////////////////////////////////////////////////////////////////////////// #import "TyphoonDefinition.h" #import "TyphoonInitializer.h" #import "TyphoonPropertyPlaceholderConfigurer.h" #import "TyphoonResource.h" #import "TyphoonBundleResource.h" #import "TyphoonComponentFactory.h" #import "TyphoonComponentFactory+InstanceBuilder.h" #import "TyphoonXmlComponentFactory.h" #import "TyphoonComponentFactoryMutator.h" #import "TyphoonRXMLElement+XmlComponentFactory.h" #import "TyphoonRXMLElement.h" #import "TyphoonTestUtils.h" #import "TyphoonIntrospectionUtils.h" #import "TyphoonAssembly.h" //TODO: Possibly move this to make explicit #import "TyphoonBlockComponentFactory.h" #import "TyphoonAutowire.h" #import "TyphoonShorthand.h" //TODO: Add debug and info level logs #define Typhoon_LogDealloc() NSLog(@"******* %@ in dealloc ****", NSStringFromClass([self class]));
Add Logger for dealloc methods.
Add Logger for dealloc methods.
C
apache-2.0
eyeem/Typhoon,gaurav1981/Typhoon,dmueller39/Typhoon,literator/Typhoon,1yvT0s/Typhoon,zjh171/Typhoon,pomozoff/Typhoon,r2B3Challenge/Typhoon,1yvT0s/Typhoon,eyeem/Typhoon,manicakes/Typhoon,zjh171/Typhoon,eyeem/Typhoon,eyeem/Typhoon,r2B3Challenge/Typhoon,dmueller39/Typhoon,nickynick/Typhoon,mbaltaks/Typhoon,r2B3Challenge/Typhoon,r2B3Challenge/Typhoon,pomozoff/Typhoon,mbaltaks/Typhoon,1yvT0s/Typhoon,gaurav1981/Typhoon,eyeem/Typhoon,pomozoff/Typhoon,zjh171/Typhoon,manicakes/Typhoon,r2B3Challenge/Typhoon,zjh171/Typhoon,nickynick/Typhoon,mbaltaks/Typhoon,gaurav1981/Typhoon,eyeem/Typhoon,manicakes/Typhoon,literator/Typhoon,manicakes/Typhoon,1yvT0s/Typhoon,literator/Typhoon,1yvT0s/Typhoon,literator/Typhoon,pomozoff/Typhoon,manicakes/Typhoon,literator/Typhoon,gaurav1981/Typhoon,mbaltaks/Typhoon,1yvT0s/Typhoon,r2B3Challenge/Typhoon,pomozoff/Typhoon,manicakes/Typhoon,dmueller39/Typhoon,mbaltaks/Typhoon,literator/Typhoon,mbaltaks/Typhoon,dmueller39/Typhoon,dmueller39/Typhoon,zjh171/Typhoon,nickynick/Typhoon,gaurav1981/Typhoon,zjh171/Typhoon,nickynick/Typhoon,nickynick/Typhoon,gaurav1981/Typhoon
dcc03187070b26677f38056ab4f7b3209202a52e
constants.h
constants.h
#ifndef CONSTANTS_H_ #define CONSTANTS_H_ #include <math.h> #define PRIME_FIELD_BINARY_BIT_LENGTH (64) #define LIMB_SIZE_IN_BITS (64) #define LIMB_SIZE_IN_BYTES (LIMB_SIZE_IN_BITS / 8) #define LIMB_SIZE_IN_HEX (LIMB_SIZE_IN_BITS / 4) // +1 is important for basic operations like addition that may overflow to the // next limb #define NUM_LIMBS ((unsigned int) ceil((PRIME_FIELD_BINARY_BIT_LENGTH + 1)/ ((double) LIMB_SIZE_IN_BITS))) #define PRIME_FIELD_FULL_HEX_LENGTH (NUM_LIMBS * LIMB_SIZE_IN_HEX) #endif
#ifndef CONSTANTS_H_ #define CONSTANTS_H_ #include <math.h> // Modify PRIME_FIELD_BINARY_BIT_LENGTH at will #define PRIME_FIELD_BINARY_BIT_LENGTH (131) // Do not modify anything below #define LIMB_SIZE_IN_BITS (64) #define LIMB_SIZE_IN_BYTES (LIMB_SIZE_IN_BITS / 8) #define LIMB_SIZE_IN_HEX (LIMB_SIZE_IN_BITS / 4) #define NUM_LIMBS ((unsigned int) ceil((PRIME_FIELD_BINARY_BIT_LENGTH)/ ((double) LIMB_SIZE_IN_BITS))) #define PRIME_FIELD_FULL_HEX_LENGTH (NUM_LIMBS * LIMB_SIZE_IN_HEX) #if (PRIME_FIELD_BINARY_BIT_LENGTH % LIMB_SIZE_IN_BITS) == 0 #error "PRIME_FIELD_BINARY_BIT_LENGTH must not be a multiple of LIMB_SIZE_IN_BITS" #endif #endif
Add compile-time check for bit length of prime field
Add compile-time check for bit length of prime field
C
unlicense
sahandKashani/prime-field-arithmetic-AVX2,sahandKashani/prime-field-arithmetic-AVX2,sahandKashani/prime-field-arithmetic-AVX2
4d3b86d589a605c04cde6af4e483adc7d58c994e
plugins.h
plugins.h
/* This file is part of MAMBO, a low-overhead dynamic binary modification tool: https://github.com/beehive-lab/mambo Copyright 2013-2016 Cosmin Gorgovan <cosmin at linux-geek dot org> 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. */ #include "dbm.h" #include "scanner_public.h" #ifdef __arm__ #include "api/emit_thumb.h" #include "api/emit_arm.h" #elif __aarch64__ #include "api/emit_a64.h" #endif #include "api/helpers.h" #include "scanner_common.h"
/* This file is part of MAMBO, a low-overhead dynamic binary modification tool: https://github.com/beehive-lab/mambo Copyright 2013-2016 Cosmin Gorgovan <cosmin at linux-geek dot org> 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. */ #include "dbm.h" #include "scanner_public.h" #ifdef __arm__ #include "api/emit_thumb.h" #include "api/emit_arm.h" #include "pie/pie-arm-field-decoder.h" #include "pie/pie-arm-decoder.h" #include "pie/pie-thumb-field-decoder.h" #include "pie/pie-thumb-decoder.h" #elif __aarch64__ #include "api/emit_a64.h" #include "pie/pie-a64-field-decoder.h" #include "pie/pie-a64-decoder.h" #endif #include "api/helpers.h" #include "scanner_common.h"
Add the decoder and field decoder headers to plugin.h
Add the decoder and field decoder headers to plugin.h This header file is included by plugins.
C
apache-2.0
beehive-lab/mambo,beehive-lab/mambo
83c3058f205532ba510dbbc5e95b96fd228f0125
texor.c
texor.c
#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <termios.h> #include <unistd.h> struct termios orig_termios; void disableRawMode() { tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios); } void enableRawMode() { tcgetattr(STDIN_FILENO, &orig_termios); atexit(disableRawMode); struct termios raw = orig_termios; raw.c_iflag &= ~(ICRNL | IXON); raw.c_oflag &= ~(OPOST); raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw); } int main() { enableRawMode(); char c; while (read(STDIN_FILENO, &c, 1) == 1 && c!= 'q') { if (iscntrl(c)) { printf("%d\n", c); } else { printf("%d ('%c')\n", c, c); } } return 0; }
#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <termios.h> #include <unistd.h> struct termios orig_termios; void disableRawMode() { tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios); } void enableRawMode() { tcgetattr(STDIN_FILENO, &orig_termios); atexit(disableRawMode); struct termios raw = orig_termios; raw.c_iflag &= ~(ICRNL | IXON); raw.c_oflag &= ~(OPOST); raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw); } int main() { enableRawMode(); char c; while (read(STDIN_FILENO, &c, 1) == 1 && c!= 'q') { if (iscntrl(c)) { printf("%d\r\n", c); } else { printf("%d ('%c')\r\n", c, c); } } return 0; }
Add a carriage return with the newline
Add a carriage return with the newline
C
bsd-2-clause
kyletolle/texor
c36abb6c9776724e3d614da0c241544b8a795dc2
matrix.c
matrix.c
#include <magick/api.h> #include "macros.h" #include "quantum.h" void image_matrix(const Image *image, double **out, ExceptionInfo *ex) { register long y; register long x; register const PixelPacket *p; unsigned int width = image->columns; for(y = 0; y < image->rows; ++y) { p = ACQUIRE_IMAGE_PIXELS(image, 0, y, width, 1, ex); if (!p) { continue; } for (x = 0; x < width; x++, p++) { // image is GRAY, so all color channels are the same. out[x][y] = ScaleQuantumToChar(p->red) / 255.0; } } }
Add missing file from previous commit
Add missing file from previous commit
C
mit
etix/magick,500px/magick,500px/magick,500px/magick,rainycape/magick,rainycape/magick,zuriu/magick,rainycape/magick,zuriu/magick,zuriu/magick,etix/magick,etix/magick
33a5982e32963ed1e0e86608acc9ef116006e32a
src/reverse_iterator.h
src/reverse_iterator.h
// Taken from https://gist.github.com/arvidsson/7231973 #ifndef BITCOIN_REVERSE_ITERATOR_HPP #define BITCOIN_REVERSE_ITERATOR_HPP /** * Template used for reverse iteration in C++11 range-based for loops. * * std::vector<int> v = {1, 2, 3, 4, 5}; * for (auto x : reverse_iterate(v)) * std::cout << x << " "; */ template <typename T> class reverse_range { T &x; public: reverse_range(T &x) : x(x) {} auto begin() const -> decltype(this->x.rbegin()) { return x.rbegin(); } auto end() const -> decltype(this->x.rend()) { return x.rend(); } }; template <typename T> reverse_range<T> reverse_iterate(T &x) { return reverse_range<T>(x); } #endif // BITCOIN_REVERSE_ITERATOR_HPP
// Taken from https://gist.github.com/arvidsson/7231973 #ifndef BITCOIN_REVERSE_ITERATOR_H #define BITCOIN_REVERSE_ITERATOR_H /** * Template used for reverse iteration in C++11 range-based for loops. * * std::vector<int> v = {1, 2, 3, 4, 5}; * for (auto x : reverse_iterate(v)) * std::cout << x << " "; */ template <typename T> class reverse_range { T &m_x; public: reverse_range(T &x) : m_x(x) {} auto begin() const -> decltype(this->m_x.rbegin()) { return m_x.rbegin(); } auto end() const -> decltype(this->m_x.rend()) { return m_x.rend(); } }; template <typename T> reverse_range<T> reverse_iterate(T &x) { return reverse_range<T>(x); } #endif // BITCOIN_REVERSE_ITERATOR_H
Rename member field according to the style guide.
Rename member field according to the style guide.
C
mit
Justaphf/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited
bbd8d17bee25486c09a6d255d3a43c4a66ad1399
include/tiramisu/MainPage.h
include/tiramisu/MainPage.h
/** \file * This file only exists to contain the front-page of the documentation */ /** \mainpage Documentation of the API if the Tiramisu Compiler * * Tiramisu provides few classes to enable users to represent their program: * - The \ref tiramisu::function class: a function in Tiramisu is equivalent to a function in C. It is composed of multiple computations. Each computation is the equivalent of a statement in C. * - The \ref tiramisu::input class: an input is used to represent inputs passed to Tiramisu. An input can represent a buffer or a scalar. * - The \ref tiramisu::constant class: a constant is designed to represent constants that are supposed to be declared at the beginning of a Tiramisu function. * - The \ref tiramisu::var class: used to represent loop iterators. Usually we declare a var (a loop iterator) and then use it for the declaration of computations. The range of that variable defines the loop range. When use witha buffer it defines the buffer size and when used with an input it defines the input size. * - The \ref tiramisu::computation class: a computation in Tiramisu is the equivalent of a statement in C. It is composed of an expression and an iteration domain. * - The \ref tiramisu::buffer class: a class to represent memory buffers. */
/** \file * This file only exists to contain the front-page of the documentation */ /** \mainpage Documentation of the Tiramisu Compiler API * * Tiramisu provides few classes to enable users to represent their program: * - The \ref tiramisu::function class: used to declare Tiramisu functions. A function in Tiramisu is equivalent to a function in C. It is composed of multiple computations where each computation is the equivalent of a statement in C. * - The \ref tiramisu::input class: used to represent inputs passed to Tiramisu. An input can represent a buffer or a scalar. * - The \ref tiramisu::constant class: a constant is designed to represent constants that are supposed to be declared at the beginning of a Tiramisu function. This can be used only to declare constant scalars. * - The \ref tiramisu::var class: used to represent loop iterators. Usually we declare a var (a loop iterator) and then use it for the declaration of computations. The range of that variable defines the range of the loop around the computation (its iteration domain). When used to declare a buffer it defines the buffer size and when used with an input it defines the input size. * - The \ref tiramisu::computation class: used to declare a computation which is the equivalent of a statement in C. A computation has an expression (tiramisu::expr) and iteration domain defined using an iterator variable. * - The \ref tiramisu::buffer class: a class to represent memory buffers. * - The \ref tiramisu::expr class: used to declare Tiramisu expressions (e.g., 4, 4 + 4, 4 * i, A(i, j), ...). */
Fix the documentation main page
Fix the documentation main page
C
mit
rbaghdadi/tiramisu,rbaghdadi/COLi,rbaghdadi/ISIR,rbaghdadi/ISIR,rbaghdadi/tiramisu,rbaghdadi/tiramisu,rbaghdadi/tiramisu,rbaghdadi/COLi
a2daf4586b6ffd054d2ba8471e83808d06e65509
examples/getartist_c.c
examples/getartist_c.c
/* Get artist by id. * * Usage: * getartist 'artist id' * * $Id$ */ #include <stdio.h> #include <musicbrainz3/mb_c.h> int main(int argc, char **argv) { MBQuery query; MBArtist artist; char data[256]; if (argc < 2) { printf("Usage: getartist 'artist id'\n"); return 1; } mb_webservice_init(); query = mb_query_new(NULL, NULL); artist = mb_query_get_artist_by_id(query, argv[1], NULL); if (!artist) { printf("No artist returned.\n"); mb_query_free(query); return 1; } mb_artist_get_id(artist, data, 256); printf("Id : %s\n", data); mb_artist_get_type(artist, data, 256); printf("Type : %s\n", data); mb_artist_get_name(artist, data, 256); printf("Name : %s\n", data); mb_artist_get_sortname(artist, data, 256); printf("SortName: %s\n", data); mb_artist_free(artist); mb_query_free(query); return 0; }
/* Get artist by id. * * Usage: * getartist 'artist id' * * $Id$ */ #include <stdio.h> #include <musicbrainz3/mb_c.h> int main(int argc, char **argv) { MbQuery query; MbArtist artist; char data[256]; if (argc < 2) { printf("Usage: getartist 'artist id'\n"); return 1; } mb_webservice_init(); query = mb_query_new(NULL, NULL); artist = mb_query_get_artist_by_id(query, argv[1], NULL); if (!artist) { printf("No artist returned.\n"); mb_query_free(query); return 1; } mb_artist_get_id(artist, data, 256); printf("Id : %s\n", data); mb_artist_get_type(artist, data, 256); printf("Type : %s\n", data); mb_artist_get_name(artist, data, 256); printf("Name : %s\n", data); mb_artist_get_sortname(artist, data, 256); printf("SortName: %s\n", data); mb_artist_free(artist); mb_query_free(query); return 0; }
Rename MBArtist to MbArtist to make it compile.
Rename MBArtist to MbArtist to make it compile.
C
lgpl-2.1
matthewruhland/libmusicbrainz,metabrainz/libmusicbrainz,ianmcorvidae/libmusicbrainz,matthewruhland/libmusicbrainz,sebastinas/libmusicbrainz,ianmcorvidae/libmusicbrainz,matthewruhland/libmusicbrainz,metabrainz/libmusicbrainz,metabrainz/libmusicbrainz,sebastinas/libmusicbrainz,sebastinas/libmusicbrainz
f1c400b56e0bd233a28553053e6fbf70f2d87331
TestSupport/QCOMockAlertVerifier.h
TestSupport/QCOMockAlertVerifier.h
// MockUIAlertController by Jon Reid, http://qualitycoding.org/about/ // Copyright 2015 Jonathan M. Reid. See LICENSE.txt #import <UIKit/UIKit.h> #import "QCOMockPopoverPresentationController.h" // Convenience import instead of @class /** Captures QCOMockAlertController arguments. */ @interface QCOMockAlertVerifier : NSObject @property (nonatomic, assign) NSUInteger presentedCount; @property (nonatomic, strong) NSNumber *animated; @property (nonatomic, copy) NSString *title; @property (nonatomic, copy) NSString *message; @property (nonatomic, assign) UIAlertControllerStyle preferredStyle; @property (nonatomic, readonly) NSArray *actionTitles; @property (nonatomic, strong) QCOMockPopoverPresentationController *popover; - (UIAlertActionStyle)styleForButtonWithTitle:(NSString *)title; - (void)executeActionForButtonWithTitle:(NSString *)title; @end
// MockUIAlertController by Jon Reid, http://qualitycoding.org/about/ // Copyright 2015 Jonathan M. Reid. See LICENSE.txt #import <UIKit/UIKit.h> #import "QCOMockPopoverPresentationController.h" // Convenience import instead of @class /** Captures mocked UIAlertController arguments. */ @interface QCOMockAlertVerifier : NSObject @property (nonatomic, assign) NSUInteger presentedCount; @property (nonatomic, strong) NSNumber *animated; @property (nonatomic, copy) NSString *title; @property (nonatomic, copy) NSString *message; @property (nonatomic, assign) UIAlertControllerStyle preferredStyle; @property (nonatomic, readonly) NSArray *actionTitles; @property (nonatomic, strong) QCOMockPopoverPresentationController *popover; - (UIAlertActionStyle)styleForButtonWithTitle:(NSString *)title; - (void)executeActionForButtonWithTitle:(NSString *)title; @end
Change comment to eliminate reference to eliminated test double
Change comment to eliminate reference to eliminated test double
C
mit
foulkesjohn/MockUIAlertController,yas375/MockUIAlertController,carabina/MockUIAlertController
595c211b7e9e60b34564a9fe0239ea4d88bf9546
include/WOCStdLib/winnt.h
include/WOCStdLib/winnt.h
//****************************************************************************** // // Copyright (c) 2015 Microsoft Corporation. All rights reserved. // // This code is licensed under the MIT License (MIT). // // 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. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // //****************************************************************************** #pragma once #include_next <winnt.h>
//****************************************************************************** // // Copyright (c) 2015 Microsoft Corporation. All rights reserved. // // This code is licensed under the MIT License (MIT). // // 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. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // //****************************************************************************** #pragma once #ifdef _ARM_ // winnt.h includes some ARM intrinsics that aren't supported in // clang and cause front end compilation breaks. Because of this, // change the MSC version to be less than what is needed to // support that option. #pragma push_macro("_MSC_FULL_VER") #if (_MSC_FULL_VER >= 170040825) #undef _MSC_FULL_VER #define _MSC_FULL_VER 170040824 #endif #include_next <winnt.h> #pragma pop_macro("_MSC_FULL_VER") #else // Not _ARM_ #include_next <winnt.h> #endif
Fix ARM build in CoreFoundation
Fix ARM build in CoreFoundation Description: winnt.h includes some ARM intrinsics that aren't supported in clang and cause front end compilation breaks. Because of this, change the MSC version to be less than what is needed to support that option. How verified: Builds now Reviewed by: jaredh, duhowett, jordansa
C
mit
pradipd/WinObjC,bbowman/WinObjC,bbowman/WinObjC,bbowman/WinObjC,bSr43/WinObjC,yweijiang/WinObjC,nathpete-msft/WinObjC,bSr43/WinObjC,bSr43/WinObjC,rajsesh-msft/WinObjC,ehren/WinObjC,Microsoft/WinObjC,MSFTFox/WinObjC,autodesk-forks/WinObjC,autodesk-forks/WinObjC,nathpete-msft/WinObjC,afaruqui/WinObjC,ehren/WinObjC,autodesk-forks/WinObjC,rajsesh-msft/WinObjC,vkvenkat/WinObjC,ehren/WinObjC,ehren/WinObjC,pradipd/WinObjC,pradipd/WinObjC,afaruqui/WinObjC,vkvenkat/WinObjC,yweijiang/WinObjC,Microsoft/WinObjC,MSFTFox/WinObjC,yweijiang/WinObjC,pradipd/WinObjC,ehren/WinObjC,afaruqui/WinObjC,nathpete-msft/WinObjC,autodesk-forks/WinObjC,MSFTFox/WinObjC,rajsesh-msft/WinObjC,Microsoft/WinObjC,vkvenkat/WinObjC,nathpete-msft/WinObjC,afaruqui/WinObjC,bSr43/WinObjC,bbowman/WinObjC,pradipd/WinObjC,vkvenkat/WinObjC,Microsoft/WinObjC,bbowman/WinObjC,yweijiang/WinObjC,rajsesh-msft/WinObjC,MSFTFox/WinObjC,nathpete-msft/WinObjC
e2262de49c039d58bdff68da136bb08309ef57d2
test/default/cmptest.h
test/default/cmptest.h
#ifndef __CMPTEST_H__ #define __CMPTEST_H__ #include <stdio.h> #include "sodium.h" #define TEST_NAME_RES TEST_NAME ".res" #define TEST_NAME_OUT TEST_SRCDIR "/" TEST_NAME ".exp" #ifdef HAVE_ARC4RANDOM # undef rand # define rand(X) arc4random(X) #endif FILE *fp_res; int xmain(void); int main(void) { FILE *fp_out; int c; if ((fp_res = fopen(TEST_NAME_RES, "w+")) == NULL) { perror("fopen(" TEST_NAME_RES ")"); return 99; } if (sodium_init() != 0) { return 99; } if (xmain() != 0) { return 99; } rewind(fp_res); if ((fp_out = fopen(TEST_NAME_OUT, "r")) == NULL) { perror("fopen(" TEST_NAME_OUT ")"); return 99; } do { if ((c = fgetc(fp_res)) != fgetc(fp_out)) { return 99; } } while (c != EOF); return 0; } #undef printf #define printf(...) fprintf(fp_res, __VA_ARGS__) #define main xmain #endif
#ifndef __CMPTEST_H__ #define __CMPTEST_H__ #include <stdio.h> #include "sodium.h" #ifndef TEST_SRCDIR # define TEST_SRCDIR "." #endif #define TEST_NAME_RES TEST_NAME ".res" #define TEST_NAME_OUT TEST_SRCDIR "/" TEST_NAME ".exp" #ifdef HAVE_ARC4RANDOM # undef rand # define rand(X) arc4random(X) #endif FILE *fp_res; int xmain(void); int main(void) { FILE *fp_out; int c; if ((fp_res = fopen(TEST_NAME_RES, "w+")) == NULL) { perror("fopen(" TEST_NAME_RES ")"); return 99; } if (sodium_init() != 0) { return 99; } if (xmain() != 0) { return 99; } rewind(fp_res); if ((fp_out = fopen(TEST_NAME_OUT, "r")) == NULL) { perror("fopen(" TEST_NAME_OUT ")"); return 99; } do { if ((c = fgetc(fp_res)) != fgetc(fp_out)) { return 99; } } while (c != EOF); return 0; } #undef printf #define printf(...) fprintf(fp_res, __VA_ARGS__) #define main xmain #endif
Add a default value for TEST_SRCDIR
Add a default value for TEST_SRCDIR
C
isc
optedoblivion/android_external_libsodium,optedoblivion/android_external_libsodium,pyparallel/libsodium,paragonie-scott/libsodium,rustyhorde/libsodium,rustyhorde/libsodium,donpark/libsodium,mvduin/libsodium,zhuqling/libsodium,donpark/libsodium,kytvi2p/libsodium,SpiderOak/libsodium,CyanogenMod/android_external_dnscrypt_libsodium,CyanogenMod/android_external_dnscrypt_libsodium,rustyhorde/libsodium,soumith/libsodium,pyparallel/libsodium,kytvi2p/libsodium,JackWink/libsodium,mvduin/libsodium,GreatFruitOmsk/libsodium,HappyYang/libsodium,akkakks/libsodium,soumith/libsodium,JackWink/libsodium,pmienk/libsodium,GreatFruitOmsk/libsodium,netroby/libsodium,eburkitt/libsodium,SpiderOak/libsodium,Payshare/libsodium,Payshare/libsodium,CyanogenMod/android_external_dnscrypt_libsodium,eburkitt/libsodium,eburkitt/libsodium,kytvi2p/libsodium,akkakks/libsodium,netroby/libsodium,zhuqling/libsodium,GreatFruitOmsk/libsodium,Payshares/libsodium,Payshares/libsodium,zhuqling/libsodium,soumith/libsodium,JackWink/libsodium,mvduin/libsodium,SpiderOak/libsodium,rustyhorde/libsodium,SpiderOak/libsodium,akkakks/libsodium,tml/libsodium,paragonie-scott/libsodium,optedoblivion/android_external_libsodium,netroby/libsodium,pmienk/libsodium,Payshare/libsodium,donpark/libsodium,akkakks/libsodium,HappyYang/libsodium,pyparallel/libsodium,tml/libsodium,tml/libsodium,HappyYang/libsodium,pmienk/libsodium,paragonie-scott/libsodium,Payshares/libsodium
ee185b401e49842c5a12dcf76bb82f853ba6c947
firmware/src/Channel.h
firmware/src/Channel.h
#include <inttypes.h> #include "Effect.h" #include "Inputs.h" #include "Output.h" class Channel { public: Channel(uint8_t _inputId, Output *_output); void read(Inputs *inputs); void setEffect(Effect *newEffect); void runEffect(); inline Effect *getEffect() {return effect;}; uint8_t inputId; Effect *effect; private: uint16_t level; Output *output; };
#include <inttypes.h> #include "Effect.h" #include "Inputs.h" #include "Output.h" class Channel { public: Channel(uint8_t _inputId, Output *_output); void read(Inputs *inputs); void setEffect(Effect *newEffect); void runEffect(); inline Effect *getEffect() {return effect;}; uint8_t inputId; Effect *effect; Output *output; private: uint16_t level; };
Make vu meter react to trigger level
Make vu meter react to trigger level
C
apache-2.0
Miceuz/leds-got-waxed,Miceuz/leds-got-waxed,Miceuz/leds-got-waxed,Miceuz/leds-got-waxed,Miceuz/leds-got-waxed
3350085ed7177cdc387d162a71073b787ba401be
simulator/mips/mips.h
simulator/mips/mips.h
/** * mips.h - all the aliases to MIPS ISA * @author Aleksandr Misevich * Copyright 2018 MIPT-MIPS */ #ifndef MIPS_H_ #define MIPS_H_ #include <infra/instrcache/instr_cache_memory.h> #include "mips_instr.h" struct MIPS { using FuncInstr = MIPSInstr; using Register = MIPSRegister; using Memory = InstrMemory<MIPSInstr>; using RegisterUInt = uint32; using RegDstUInt = uint64; }; #endif // MIPS_H_
/** * mips.h - all the aliases to MIPS ISA * @author Aleksandr Misevich * Copyright 2018 MIPT-MIPS */ #ifndef MIPS_H_ #define MIPS_H_ #include <infra/instrcache/instr_cache_memory.h> #include "mips_instr.h" struct MIPS { using FuncInstr = MIPSInstr; using Register = MIPSRegister; using Memory = InstrMemory<MIPSInstr>; using RegisterUInt = uint32; using RegDstUInt = doubled_t<uint32>; // MIPS may produce output to 2x HI/LO register }; #endif // MIPS_H_
Use doubled_t for MIPS defines
Use doubled_t for MIPS defines
C
mit
MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips-2015
df8d6af61cacabf64ec3e470f2bb4d0f985a86bb
src/utility/pimpl_impl.h
src/utility/pimpl_impl.h
#ifndef PIMPL_IMPL_H #define PIMPL_IMPL_H #include <utility> template<typename T> pimpl<T>::pimpl() : m{ new T{} } { } template<typename T> template<typename ...Args> pimpl<T>::pimpl( Args&& ...args ) : m{ new T{ std::forward<Args>(args)... } } { } template<typename T> pimpl<T>::~pimpl() { } template<typename T> T* pimpl<T>::operator->() { return m.get(); } template<typename T> const T* pimpl<T>::operator->() const { return m.get(); } template<typename T> T& pimpl<T>::operator*() { return *m.get(); } #endif
#ifndef PIMPL_IMPL_H #define PIMPL_IMPL_H #include "make_unique.h" #include <utility> template<typename T> pimpl<T>::pimpl() : m{ make_unique<T>() } { } template<typename T> template<typename ...Args> pimpl<T>::pimpl( Args&& ...args ) : m{ make_unique<T>(std::forward<Args>(args)...) } { } template<typename T> pimpl<T>::~pimpl() { } template<typename T> T* pimpl<T>::operator->() { return m.get(); } template<typename T> const T* pimpl<T>::operator->() const { return m.get(); } template<typename T> T& pimpl<T>::operator*() { return *m.get(); } #endif
Use make_unique in pimpl helper
Use make_unique in pimpl helper
C
mit
adolby/Kryvos,adolby/Kryvos,adolby/Kryvos
61f591fe949c76b918ae3342ae8d87b2bd5ce072
DDMathParser/DDMathParserMacros.h
DDMathParser/DDMathParserMacros.h
// // DDMathParserMacros.h // DDMathParser // // Created by Dave DeLong on 2/19/11. // Copyright 2011 __MyCompanyName__. All rights reserved. // #import <Foundation/Foundation.h> #import "DDTypes.h" #ifndef ERR_ASSERT #define ERR_ASSERT(_e) NSAssert((_e) != nil, @"NULL out error") #endif #ifndef ERR #define DD_ERR(_c,_f,...) [NSError errorWithDomain:DDMathParserErrorDomain code:(_c) userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:(_f), ##__VA_ARGS__]}] #endif #define DDMathParserDeprecated(_r) __attribute__((deprecated(_r)))
// // DDMathParserMacros.h // DDMathParser // // Created by Dave DeLong on 2/19/11. // Copyright 2011 __MyCompanyName__. All rights reserved. // #import <Foundation/Foundation.h> #import "DDTypes.h" #ifndef ERR_ASSERT #define ERR_ASSERT(_e) NSAssert((_e) != nil, @"NULL out error") #endif #ifndef DD_ERR #define DD_ERR(_c,_f,...) [NSError errorWithDomain:DDMathParserErrorDomain code:(_c) userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:(_f), ##__VA_ARGS__]}] #endif #define DDMathParserDeprecated(_r) __attribute__((deprecated(_r)))
Correct conditional on DD_ERR macro
Correct conditional on DD_ERR macro
C
mit
mrackwitz/DDMathParser,carabina/DDMathParser,davedelong/DDMathParser,carabina/DDMathParser,mrackwitz/DDMathParser,davedelong/DDMathParser
b48d845e623ac1c3e470a91dec2dac88b0c57578
lib/msun/src/w_cabsl.c
lib/msun/src/w_cabsl.c
/* * cabs() wrapper for hypot(). * * Written by J.T. Conklin, <[email protected]> * Placed into the Public Domain, 1994. * * Modified by Steven G. Kargl for the long double type. */ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #include <complex.h> #include <math.h> long double cabsl(long double complex z) { return hypotl(creall(z), cimagl(z)); }
Implement cabsl() in terms of hypotl().
Implement cabsl() in terms of hypotl(). Submitted by: Steve Kargl <[email protected]>
C
bsd-3-clause
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
53c0296d81d591bc0544cd6fad5472928224abcc
test/wasm/soft/lshrti3.c
test/wasm/soft/lshrti3.c
/* This file is part of Metallic, a runtime library for WebAssembly. * * Copyright (C) 2018 Chen-Pang He <[email protected]> * * This Source Code Form is subject to the terms of the Mozilla * Public License v. 2.0. If a copy of the MPL was not distributed * with this file, You can obtain one at http://mozilla.org/MPL/2.0/ */ #include "../assert.h" static void run(unsigned __int128 x) { unsigned __int128 y = x; for (int shift = 0; shift < 128; ++shift) { metallic_assert(x >> shift == y); y >>= 1; } } int main(void) { for (unsigned __int128 x = 1; x; x *= 2) run(x); for (unsigned __int128 x = 1; x >> 104 != 0x313370; x *= 3) run(x); }
Test unsigned __int128 right shift
Test unsigned __int128 right shift
C
mit
jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic
734b14cd1de225a5cdf82ef14c1cd697fbc01b6d
src/condor_ckpt/condor_syscalls.h
src/condor_ckpt/condor_syscalls.h
#ifndef _CONDOR_SYSCALLS_H #define _CONDOR_SYSCALLS_H #if defined( AIX32) # include "syscall.aix32.h" #else # include <syscall.h> #endif typedef int BOOL; static const int SYS_LOCAL = 1; static const int SYS_REMOTE = 0; static const int SYS_RECORDED = 2; static const int SYS_MAPPED = 2; static const int SYS_UNRECORDED = 0; static const int SYS_UNMAPPED = 0; #if defined(__cplusplus) extern "C" { #endif int SetSyscalls( int mode ); BOOL LocalSysCalls(); BOOL RemoteSysCalls(); BOOL MappingFileDescriptors(); int REMOTE_syscall( int syscall_num, ... ); #if 0 #if defined(AIX32) && defined(__cplusplus) int syscall( ... ); #elif defined(ULTRIX42) && defined(__cplusplus) int syscall( ... ); #else int syscall( int, ... ); #endif #endif #if defined(OSF1) int syscall( int, ... ); #endif #if defined(__cplusplus) } #endif #endif
#ifndef _CONDOR_SYSCALLS_H #define _CONDOR_SYSCALLS_H #if defined( AIX32) # include "syscall.aix32.h" #else # include <syscall.h> #endif typedef int BOOL; static const int SYS_LOCAL = 1; static const int SYS_REMOTE = 0; static const int SYS_RECORDED = 2; static const int SYS_MAPPED = 2; static const int SYS_UNRECORDED = 0; static const int SYS_UNMAPPED = 0; #if defined(__cplusplus) extern "C" { #endif int SetSyscalls( int mode ); BOOL LocalSysCalls(); BOOL RemoteSysCalls(); BOOL MappingFileDescriptors(); int REMOTE_syscall( int syscall_num, ... ); #if defined(OSF1) || defined(HPUX9) int syscall( int, ... ); #endif #if defined(__cplusplus) } #endif #endif
Set up syscall() prototype for HP-UX 9 machines.
Set up syscall() prototype for HP-UX 9 machines.
C
apache-2.0
bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,djw8605/condor,htcondor/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,djw8605/condor,neurodebian/htcondor,bbockelm/condor-network-accounting,htcondor/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,htcondor/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,clalancette/condor-dcloud,htcondor/htcondor,htcondor/htcondor,djw8605/htcondor,djw8605/condor,zhangzhehust/htcondor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,djw8605/condor,neurodebian/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,djw8605/condor,djw8605/htcondor,clalancette/condor-dcloud,zhangzhehust/htcondor,htcondor/htcondor,neurodebian/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,clalancette/condor-dcloud,htcondor/htcondor,clalancette/condor-dcloud,djw8605/condor,neurodebian/htcondor,clalancette/condor-dcloud,djw8605/condor,neurodebian/htcondor,djw8605/condor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,zhangzhehust/htcondor,htcondor/htcondor,zhangzhehust/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,zhangzhehust/htcondor,djw8605/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,djw8605/htcondor,zhangzhehust/htcondor,zhangzhehust/htcondor
6f6f54e6c55154ae69e8d835ff2eba1ba590b2d4
SDWebImage/NSData+ImageContentType.h
SDWebImage/NSData+ImageContentType.h
/* * This file is part of the SDWebImage package. * (c) Olivier Poitrey <[email protected]> * (c) Fabrice Aneche * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ #import <Foundation/Foundation.h> #import "SDWebImageCompat.h" typedef NS_ENUM(NSInteger, SDImageFormat) { SDImageFormatUndefined = -1, SDImageFormatJPEG = 0, SDImageFormatPNG, SDImageFormatGIF, SDImageFormatTIFF, SDImageFormatWebP, SDImageFormatHEIC }; @interface NSData (ImageContentType) /** * Return image format * * @param data the input image data * * @return the image format as `SDImageFormat` (enum) */ + (SDImageFormat)sd_imageFormatForImageData:(nullable NSData *)data; /** Convert SDImageFormat to UTType @param format Format as SDImageFormat @return The UTType as CFStringRef */ + (nonnull CFStringRef)sd_UTTypeFromSDImageFormat:(SDImageFormat)format; @end
/* * This file is part of the SDWebImage package. * (c) Olivier Poitrey <[email protected]> * (c) Fabrice Aneche * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ #import <Foundation/Foundation.h> #import "SDWebImageCompat.h" typedef NS_ENUM(NSInteger, SDImageFormat) { SDImageFormatUndefined = -1, SDImageFormatJPEG = 0, SDImageFormatPNG, SDImageFormatGIF, SDImageFormatTIFF, SDImageFormatWebP, SDImageFormatHEIC }; @interface NSData (ImageContentType) /** * Return image format * * @param data the input image data * * @return the image format as `SDImageFormat` (enum) */ + (SDImageFormat)sd_imageFormatForImageData:(nullable NSData *)data; /** Convert SDImageFormat to UTType @param format Format as SDImageFormat @return The UTType as CFStringRef */ + (nonnull CFStringRef)sd_UTTypeFromSDImageFormat:(SDImageFormat)format CF_RETURNS_NOT_RETAINED; @end
Mark one function which return value should follow the GET rule
Mark one function which return value should follow the GET rule
C
mit
zhang-yawei/SDWebImage,awkward/SDWebImage,dreampiggy/SDWebImage,dreampiggy/SDWebImage,awkward/SDWebImage,dreampiggy/SDWebImage,tualatrix/SDWebImage,rs/SDWebImage,awkward/SDWebImage
dc6b3f5ae020c950e12a97ef4e3baca21e027e08
slof/OF.h
slof/OF.h
/****************************************************************************** * Copyright (c) 2020 IBM Corporation * All rights reserved. * This program and the accompanying materials * are made available under the terms of the BSD License * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/bsd-license.php * * Contributors: * IBM Corporation - initial implementation *****************************************************************************/ #ifndef _SLOF_OF_H #define _SLOF_OF_H /* from OF.lds */ extern long _slof_text; extern long _slof_text_end; #endif
Make linker script variables accessible
slof: Make linker script variables accessible Make linker script variables related to 'text' addresses available to the code so we can measure the static core root of trust contents. When hashing the 'data' part of SLOF we do not end up with the same measurements for the same firmware when booting with different configurations, so we don't make those available. Signed-off-by: Stefan Berger <[email protected]> Signed-off-by: Alexey Kardashevskiy <[email protected]>
C
bsd-3-clause
stefanberger/SLOF-tpm,qemu/SLOF,aik/SLOF,aik/SLOF,stefanberger/SLOF-tpm,qemu/SLOF,aik/SLOF,qemu/SLOF,stefanberger/SLOF-tpm
4eb2ccf261f739ad9b91455f28c1dece573a30d6
tests/023-define-extra-whitespace.c
tests/023-define-extra-whitespace.c
#define noargs() 1 # define onearg(foo) foo # define twoargs( x , y ) x y # define threeargs( a , b , c ) a b c noargs ( ) onearg ( 2 ) twoargs ( 3 , 4 ) threeargs ( 5 , 6 , 7 )
Add test with extra whitespace in macro defintions and invocations.
Add test with extra whitespace in macro defintions and invocations. This whitespace is not dealt with in an elegant way yet so this test does not pass currently.
C
mit
adobe/glsl2agal,adobe/glsl2agal,adobe/glsl2agal,wolf96/glsl-optimizer,zeux/glsl-optimizer,mapbox/glsl-optimizer,wolf96/glsl-optimizer,KTXSoftware/glsl2agal,mapbox/glsl-optimizer,mapbox/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,metora/MesaGLSLCompiler,tokyovigilante/glsl-optimizer,tokyovigilante/glsl-optimizer,djreep81/glsl-optimizer,benaadams/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,djreep81/glsl-optimizer,metora/MesaGLSLCompiler,zz85/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,mcanthony/glsl-optimizer,benaadams/glsl-optimizer,djreep81/glsl-optimizer,djreep81/glsl-optimizer,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,KTXSoftware/glsl2agal,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,dellis1972/glsl-optimizer,mapbox/glsl-optimizer,KTXSoftware/glsl2agal,KTXSoftware/glsl2agal,zz85/glsl-optimizer,wolf96/glsl-optimizer,zeux/glsl-optimizer,zz85/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,wolf96/glsl-optimizer,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,KTXSoftware/glsl2agal,wolf96/glsl-optimizer,mcanthony/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,mapbox/glsl-optimizer,bkaradzic/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,adobe/glsl2agal,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,tokyovigilante/glsl-optimizer,tokyovigilante/glsl-optimizer,metora/MesaGLSLCompiler,jbarczak/glsl-optimizer,adobe/glsl2agal
56599de34fd91581d03bee6106b45f52591c15f6
testsuite/libffi.call/va_pointer.c
testsuite/libffi.call/va_pointer.c
/* Area: ffi_call Purpose: Test passing pointers in variable argument lists. Limitations: none. PR: none. Originator: www.frida.re */ /* { dg-do run } */ #include "ffitest.h" #include <stdarg.h> typedef void * T; static T test_fn (T a, T b, ...) { va_list ap; T c; va_start (ap, b); c = va_arg (ap, T); printf ("%p %p %p\n", a, b, c); va_end (ap); return a + 1; } int main (void) { ffi_cif cif; ffi_type* arg_types[3]; T a, b, c; T args[3]; ffi_arg res; arg_types[0] = &ffi_type_pointer; arg_types[1] = &ffi_type_pointer; arg_types[2] = &ffi_type_pointer; CHECK(ffi_prep_cif_var (&cif, FFI_DEFAULT_ABI, 2, 3, &ffi_type_pointer, arg_types) == FFI_OK); a = (T)0x11223344; b = (T)0x55667788; c = (T)0xAABBCCDD; args[0] = &a; args[1] = &b; args[2] = &c; ffi_call (&cif, FFI_FN (test_fn), &res, args); /* { dg-output "0x11223344 0x55667788 0xAABBCCDD" } */ printf("res: %p\n", (T)res); /* { dg-output "\nres: 0x11223345" } */ return 0; }
Add test for variadic invocation with pointers
Add test for variadic invocation with pointers
C
mit
s1341/libffi,s1341/libffi,s1341/libffi,s1341/libffi
d131cc1413550bbc489a0b42b32bc381575fd0a6
include/PhysicsLX56.h
include/PhysicsLX56.h
/* OpenLieroX physic simulation interface code under LGPL created on 9/2/2008 */ #ifndef __PHYSICSLX56_H__ #define __PHYSICSLX56_H__ #include "Physics.h" PhysicsEngine* CreatePhysicsEngineLX56(); #define LX56PhysicsFixedFPS 100 #define LX56PhysicsDT TimeDiff(1000 / LX56PhysicsFixedFPS) #endif
/* OpenLieroX physic simulation interface code under LGPL created on 9/2/2008 */ #ifndef __PHYSICSLX56_H__ #define __PHYSICSLX56_H__ #include "Physics.h" PhysicsEngine* CreatePhysicsEngineLX56(); #define LX56PhysicsFixedFPS 84 #define LX56PhysicsDT TimeDiff(1000 / LX56PhysicsFixedFPS) #endif
Put physics FPS to 84 - that's the common value in LX .56. So far it seems it behaves exactly like old LX, needs still testing though.
Put physics FPS to 84 - that's the common value in LX .56. So far it seems it behaves exactly like old LX, needs still testing though. git-svn-id: 0634bf30b6d7a21f2003d4a9f34c102a3ffa6fda@4471 34602234-ff1f-0410-a465-ea8f3b77ab7f
C
lgpl-2.1
ProfessorKaos64/openlierox,ProfessorKaos64/openlierox,ProfessorKaos64/openlierox,ProfessorKaos64/openlierox,ProfessorKaos64/openlierox,ProfessorKaos64/openlierox,ProfessorKaos64/openlierox
82a1df8942be8551ab365db20e35ca6a2b7e0d85
include/sha1prng.h
include/sha1prng.h
/************************************************* * SHA1PRNG RNG Header File * * (C) 2007 FlexSecure GmbH / Manuel Hartl * * (C) 2008 Jack Lloyd * *************************************************/ #ifndef BOTAN_SHA1PRNG_H__ #define BOTAN_SHA1PRNG_H__ #include <botan/rng.h> #include <botan/base.h> namespace Botan { /************************************************* * SHA1PRNG * *************************************************/ class SHA1PRNG : public RandomNumberGenerator { public: void randomize(byte[], u32bit) throw(PRNG_Unseeded); bool is_seeded() const; void clear() throw(); std::string name() const; SHA1PRNG(RandomNumberGenerator* = 0); ~SHA1PRNG(); private: void add_randomness(const byte[], u32bit); void update_state(byte[]); RandomNumberGenerator* prng; HashFunction* hash; SecureVector<byte> buffer; SecureVector<byte> state; int buf_pos; }; } #endif
/************************************************* * SHA1PRNG RNG Header File * * (C) 2007 FlexSecure GmbH / Manuel Hartl * * (C) 2008 Jack Lloyd * *************************************************/ #ifndef BOTAN_SHA1PRNG_H__ #define BOTAN_SHA1PRNG_H__ #include <botan/rng.h> #include <botan/base.h> namespace Botan { /************************************************* * SHA1PRNG * *************************************************/ class BOTAN_DLL SHA1PRNG : public RandomNumberGenerator { public: void randomize(byte[], u32bit) throw(PRNG_Unseeded); bool is_seeded() const; void clear() throw(); std::string name() const; SHA1PRNG(RandomNumberGenerator* = 0); ~SHA1PRNG(); private: void add_randomness(const byte[], u32bit); void update_state(byte[]); RandomNumberGenerator* prng; HashFunction* hash; SecureVector<byte> buffer; SecureVector<byte> state; int buf_pos; }; } #endif
Add missing BOTAN_DLL decl to SHA1PRNG class declaration
Add missing BOTAN_DLL decl to SHA1PRNG class declaration
C
bsd-2-clause
webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,randombit/botan
e9f9848a4f93f2114ceb770f22c481ccd76de64e
ObjectivePGP/PGPPublicKeyPacket.h
ObjectivePGP/PGPPublicKeyPacket.h
// // OpenPGPPublicKey.h // ObjectivePGP // // Created by Marcin Krzyzanowski on 04/05/14. // Copyright (c) 2014 Marcin Krzyżanowski. All rights reserved. // // Tag 6 #import <Foundation/Foundation.h> #import "PGPTypes.h" #import "PGPPacketFactory.h" #import "PGPKeyID.h" #import "PGPFingerprint.h" @class PGPMPI; @interface PGPPublicKeyPacket : PGPPacket <NSCopying> @property (assign, readonly) UInt8 version; @property (assign, readonly) NSDate *createDate; @property (assign, readonly) UInt16 V3validityPeriod; // obsolete @property (assign, readonly) PGPPublicKeyAlgorithm publicKeyAlgorithm; @property (strong, readwrite) NSArray *publicMPIArray; @property (assign, readonly) NSUInteger keySize; @property (strong, nonatomic, readonly) PGPFingerprint *fingerprint; @property (strong, nonatomic, readonly) PGPKeyID *keyID; - (NSData *) exportPacket:(NSError *__autoreleasing*)error; - (NSData *) exportPublicPacketOldStyle; - (NSData *) buildPublicKeyBodyData:(BOOL)forceV4; - (PGPMPI *) publicMPI:(NSString *)identifier; - (NSData *) encryptData:(NSData *)data withPublicKeyAlgorithm:(PGPPublicKeyAlgorithm)publicKeyAlgorithm; @end
// // OpenPGPPublicKey.h // ObjectivePGP // // Created by Marcin Krzyzanowski on 04/05/14. // Copyright (c) 2014 Marcin Krzyżanowski. All rights reserved. // // Tag 6 #import <Foundation/Foundation.h> #import "PGPTypes.h" #import "PGPPacketFactory.h" #import "PGPKeyID.h" #import "PGPFingerprint.h" @class PGPMPI; @interface PGPPublicKeyPacket : PGPPacket <NSCopying> @property (assign, readonly) UInt8 version; @property (strong, readonly) NSDate* createDate; @property (assign, readonly) UInt16 V3validityPeriod; // obsolete @property (assign, readonly) PGPPublicKeyAlgorithm publicKeyAlgorithm; @property (strong, readwrite) NSArray* publicMPIArray; @property (assign, readonly) NSUInteger keySize; @property (strong, nonatomic, readonly) PGPFingerprint* fingerprint; @property (strong, nonatomic, readonly) PGPKeyID* keyID; - (NSData*)exportPacket:(NSError* __autoreleasing*)error; - (NSData*)exportPublicPacketOldStyle; - (NSData*)buildPublicKeyBodyData:(BOOL)forceV4; - (PGPMPI*)publicMPI:(NSString*)identifier; - (NSData*)encryptData:(NSData*)data withPublicKeyAlgorithm:(PGPPublicKeyAlgorithm)publicKeyAlgorithm; @end
Fix NSDate property management attribute assign->strong
Fix NSDate property management attribute assign->strong
C
bsd-2-clause
alexkunitsa/ObjectivePGP,1and1/ObjectivePGP
a748dcc2b1d0723d229e13c97e8e3b0602eda593
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2010 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k7"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2010 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k8"
Update driver version to 5.02.00-k8
[SCSI] qla4xxx: Update driver version to 5.02.00-k8 Signed-off-by: Vikas Chaudhary <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas
88397c279d6d113ef67be254bc145d198e733844
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2013 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.04.00-k1"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2013 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.04.00-k2"
Update driver version to 5.04.00-k2
[SCSI] qla4xxx: Update driver version to 5.04.00-k2 Signed-off-by: Adheer Chandravanshi <[email protected]> Signed-off-by: Vikas Chaudhary <[email protected]> Signed-off-by: James Bottomley <[email protected]>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
892b1603154e1b8271016cb2920ac098c091df7d
la-log.h
la-log.h
#ifndef _LA_LOG_H #define _LA_LOG_H #include <stdarg.h> #include <stdint.h> #include <stdio.h> #ifndef _WIN32 #include <syslog.h> #else #define LOG_INFO 1 #define LOG_ERR 2 #define LOG_CRIT 3 #endif #include <time.h> void la_log_syslog_open(); void la_log(int priority, const char *format, ...); void la_log_unsuppress(); class LALog { public: LALog() : _time_period_start(time(NULL)) { } void syslog_open(); void log(int priority, const char *format, ...); void log_ap(int priority, const char *format, va_list ap); void unsupress(); bool should_suppress(); bool suppressing() {return _suppressing; } private: // really rough rate limiting for log messages. We could keep a // hash here of formats and selectively supress based on format. bool _suppressing = false; const uint8_t _time_period = 5; // seconds const uint8_t _max_messages_per_time_period = 10; uint32_t _suppressed_message_count = 0; uint8_t _message_count_this_time_period = 0; time_t _time_period_start; bool use_syslog = false; }; #endif
#ifndef _LA_LOG_H #define _LA_LOG_H #include <stdarg.h> #include <stdint.h> #include <stdio.h> #ifndef _WIN32 #include <syslog.h> #else #define LOG_DEBUG 0 #define LOG_INFO 1 #define LOG_ERR 2 #define LOG_CRIT 3 #endif #include <time.h> void la_log_syslog_open(); void la_log(int priority, const char *format, ...); void la_log_unsuppress(); class LALog { public: LALog() : _time_period_start(time(NULL)) { } void syslog_open(); void log(int priority, const char *format, ...); void log_ap(int priority, const char *format, va_list ap); void unsupress(); bool should_suppress(); bool suppressing() {return _suppressing; } private: // really rough rate limiting for log messages. We could keep a // hash here of formats and selectively supress based on format. bool _suppressing = false; const uint8_t _time_period = 5; // seconds const uint8_t _max_messages_per_time_period = 10; uint32_t _suppressed_message_count = 0; uint8_t _message_count_this_time_period = 0; time_t _time_period_start; bool use_syslog = false; }; #endif
Fix obvious issue which probably broke build on windows.
Fix obvious issue which probably broke build on windows.
C
apache-2.0
dronekit/dronekit-la,peterbarker/dronekit-la,dronekit/dronekit-la,peterbarker/dronekit-la,peterbarker/dronekit-la,peterbarker/dronekit-la,dronekit/dronekit-la,dronekit/dronekit-la
bb7aa6ace39ad6ce1e71f9f177441a6744814855
Additions/FSFrequencyPlotView.h
Additions/FSFrequencyPlotView.h
/* * This file is part of the FreeStreamer project, * (C)Copyright 2011-2015 Matias Muhonen <[email protected]> * See the file ''LICENSE'' for using the code. * * https://github.com/muhku/FreeStreamer */ #include "FSFrequencyDomainAnalyzer.h" #define kFSFrequencyPlotViewMaxCount 64 @interface FSFrequencyPlotView : UIView <FSFrequencyDomainAnalyzerDelegate> { float _levels[kFSFrequencyPlotViewMaxCount]; NSUInteger _count; BOOL _drawing; } - (void)frequenceAnalyzer:(FSFrequencyDomainAnalyzer *)analyzer levelsAvailable:(float *)levels count:(NSUInteger)count; - (void)reset; @end
/* * This file is part of the FreeStreamer project, * (C)Copyright 2011-2015 Matias Muhonen <[email protected]> * See the file ''LICENSE'' for using the code. * * https://github.com/muhku/FreeStreamer */ #import <UIKit/UIKit.h> #include "FSFrequencyDomainAnalyzer.h" #define kFSFrequencyPlotViewMaxCount 64 @interface FSFrequencyPlotView : UIView <FSFrequencyDomainAnalyzerDelegate> { float _levels[kFSFrequencyPlotViewMaxCount]; NSUInteger _count; BOOL _drawing; } - (void)frequenceAnalyzer:(FSFrequencyDomainAnalyzer *)analyzer levelsAvailable:(float *)levels count:(NSUInteger)count; - (void)reset; @end
Add a missing UIKit import.
Add a missing UIKit import.
C
bsd-3-clause
mjasa/FreeStreamer,christophercotton/FreeStreamer,alecgorge/FreeStreamer,alecgorge/FreeStreamer,mjasa/FreeStreamer,christophercotton/FreeStreamer,ren6/FreeStreamer,zdw19840929/FreeStreamer,christophercotton/FreeStreamer,zdw19840929/FreeStreamer,zdw19840929/FreeStreamer,ren6/FreeStreamer,mjasa/FreeStreamer,nKey/FreeStreamer,nKey/FreeStreamer,nKey/FreeStreamer,alecgorge/FreeStreamer,ren6/FreeStreamer
ea8eed7e9540ff9136df34ecb70255cd2ab74dd4
logger.c
logger.c
#include "logger.h" #include <stdio.h> #include <errno.h> #include <libpp/map-lists.h> #include <libpp/separators.h> #include <libtypes/types.h> Logger logger__new_( Logger options ) { if ( options.log == NULL ) { options.log = logger__default_log; } return options; } int logger__default_log( Logger const logger, LogLevel const level, char const * const format, va_list var_args ) { if ( format == NULL ) { return EINVAL; } else if ( level.severity < logger.min_severity ) { return 0; } char const * const logger_name = logger.s; if ( ( logger_name != NULL && fprintf( stderr, "%s: ", logger_name ) < 0 ) || ( level.name != NULL && fprintf( stderr, "%s: ", level.name ) < 0 ) || vfprintf( stderr, format, var_args ) < 0 || fprintf( stderr, "\n" ) < 0 ) { return EIO; } return 0; } #define DEF_FUNC( L, U ) \ LOG_FUNC_DEF( L, log_level_##L ) PP_MAP_LISTS( DEF_FUNC, PP_SEP_NONE, LOG_LEVELS ) #undef DEF_FUNC
#include "logger.h" #include <stdio.h> #include <errno.h> #include <libpp/map-lists.h> #include <libpp/separators.h> #include <libtypes/types.h> Logger logger__new_( Logger options ) { if ( options.log == NULL ) { options.log = logger__default_log; } return options; } int logger__default_log( Logger const logger, LogLevel const level, char const * const format, va_list var_args ) { if ( format == NULL ) { return EINVAL; } else if ( level.severity < logger.min_severity ) { return 0; } char const * const logger_name = logger.c; if ( ( logger_name != NULL && fprintf( stderr, "%s: ", logger_name ) < 0 ) || ( level.name != NULL && fprintf( stderr, "%s: ", level.name ) < 0 ) || vfprintf( stderr, format, var_args ) < 0 || fprintf( stderr, "\n" ) < 0 ) { return EIO; } return 0; } #define DEF_FUNC( L, U ) \ LOG_FUNC_DEF( L, log_level_##L ) PP_MAP_LISTS( DEF_FUNC, PP_SEP_NONE, LOG_LEVELS ) #undef DEF_FUNC
Fix member access issue stopping compile
Fix member access issue stopping compile
C
agpl-3.0
mcinglis/liblogging
b09cbbdb383a73ad46a016cc4dcc54ad62c92732
jets/c/xeb.c
jets/c/xeb.c
/* j/3/xeb.c ** */ #include "all.h" /* functions */ u3_noun u3qc_xeb(u3_atom a) { mpz_t a_mp; if ( __(u3a_is_dog(a)) ) { u3r_mp(a_mp, a); size_t log = mpz_sizeinbase(a_mp, 2); mpz_t b_mp; mpz_init_set_ui(b_mp, log); return u3i_mp(b_mp); } else { mpz_init_set_ui(a_mp, a); c3_d x = mpz_sizeinbase(a_mp, 2); mpz_t b_mp; mpz_init_set_ui(b_mp, x); return u3i_mp(b_mp); } } u3_noun u3wc_xeb( u3_noun cor) { u3_noun a; if ( (u3_none == (a = u3r_at(u3x_sam, cor))) || (c3n == u3ud(a)) ) { return u3m_bail(c3__exit); } else { return u3qc_xeb(a); } }
/* j/3/xeb.c ** */ #include "all.h" /* functions */ u3_noun u3qc_xeb(u3_atom a) { mpz_t a_mp; if ( __(u3a_is_dog(a)) ) { u3r_mp(a_mp, a); c3_d x = mpz_sizeinbase(a_mp, 2); mpz_t b_mp; mpz_init_set_ui(b_mp, x); return u3i_mp(b_mp); } else { mpz_init_set_ui(a_mp, a); c3_d x = mpz_sizeinbase(a_mp, 2); mpz_t b_mp; mpz_init_set_ui(b_mp, x); return u3i_mp(b_mp); } } u3_noun u3wc_xeb( u3_noun cor) { u3_noun a; if ( (u3_none == (a = u3r_at(u3x_sam, cor))) || (c3n == u3ud(a)) ) { return u3m_bail(c3__exit); } else { return u3qc_xeb(a); } }
Use urbit types instead of size_t
Use urbit types instead of size_t
C
mit
cgyarvin/urbit-1,ohAitch/urbit,cgyarvin/urbit-1,ohAitch/urbit,max19/urbit,juped/your-urbit,jfranklin9000/urbit,juped/your-urbit,juped/your-urbit,ngzax/urbit,ohAitch/urbit,max19/urbit,ngzax/urbit,urbit/urbit,urbit/urbit,juped/urbit,max19/urbit,ngzax/urbit,jfranklin9000/urbit,juped/your-urbit,juped/your-urbit,ngzax/urbit,max19/urbit,juped/urbit,urbit/urbit,juped/urbit,urbit/urbit,ohAitch/urbit,juped/urbit,jfranklin9000/urbit,jfranklin9000/urbit,juped/your-urbit,jfranklin9000/urbit,cgyarvin/urbit-1,juped/your-urbit,ngzax/urbit,cgyarvin/urbit-1,urbit/urbit,max19/urbit,ohAitch/urbit,juped/urbit,ohAitch/urbit,cgyarvin/urbit-1,cgyarvin/urbit-1,max19/urbit,cgyarvin/urbit-1,juped/urbit,juped/your-urbit,urbit/urbit,ohAitch/urbit,urbit/urbit,juped/urbit,max19/urbit,ngzax/urbit,ohAitch/urbit,jfranklin9000/urbit,juped/your-urbit,cgyarvin/urbit-1,max19/urbit,ohAitch/urbit,ohAitch/urbit,juped/your-urbit,ngzax/urbit,jfranklin9000/urbit,juped/urbit
5b5437349aa475c23b624e9b0f5919250cd0ab8c
libvirt-utils.h
libvirt-utils.h
/* * libvirt-utils.h: misc helper APIs for python binding * * Copyright (C) 2013 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see * <http://www.gnu.org/licenses/>. * */ #ifndef __LIBVIRT_UTILS_H__ # define __LIBVIRT_UTILS_H__ # define STREQ(a,b) (strcmp(a,b) == 0) #endif /* __LIBVIRT_UTILS_H__ */
/* * libvirt-utils.h: misc helper APIs for python binding * * Copyright (C) 2013 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see * <http://www.gnu.org/licenses/>. * */ #ifndef __LIBVIRT_UTILS_H__ # define __LIBVIRT_UTILS_H__ # define STREQ(a,b) (strcmp(a,b) == 0) # ifndef MIN # define MIN(a,b) (((a) < (b)) ? (a) : (b)) # endif #endif /* __LIBVIRT_UTILS_H__ */
Add decl of MIN macro
Add decl of MIN macro Signed-off-by: Daniel P. Berrange <[email protected]>
C
lgpl-2.1
libvirt/libvirt-python,libvirt/libvirt-python,libvirt/libvirt-python
4af33c260559bb3715da2c84be637156473d731c
test/CFrontend/bit-accurate-int.c
test/CFrontend/bit-accurate-int.c
// RUN: %llvmgcc -S %s -o - /dev/null // XFAIL: * #define ATTR_BITS(N) __attribute__((bitwidth(N))) typedef int ATTR_BITS( 4) My04BitInt; typedef int ATTR_BITS(16) My16BitInt; typedef int ATTR_BITS(17) My17BitInt; typedef int ATTR_BITS(37) My37BitInt; typedef int ATTR_BITS(65) My65BitInt; struct MyStruct { My04BitInt i4Field; short ATTR_BITS(12) i12Field; long ATTR_BITS(17) i17Field; My37BitInt i37Field; }; My37BitInt doit( short ATTR_BITS(23) num) { My17BitInt i; struct MyStruct strct; int bitsize1 = sizeof(My17BitInt); int __attribute__((bitwidth(9))) j; int bitsize2 = sizeof(j); int result = bitsize1 + bitsize2; strct.i17Field = result; result += sizeof(struct MyStruct); return result; } int main ( int argc, char** argv) { return (int ATTR_BITS(32)) doit((short ATTR_BITS(23))argc); }
Add a test case for bit accurate integer types in llvm-gcc. This is XFAILed for now until llvm-gcc changes are committed.
Add a test case for bit accurate integer types in llvm-gcc. This is XFAILed for now until llvm-gcc changes are committed. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@33261 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm
142bbaf120ee82473e557c2b1d0b8fd1c1de0603
ops/eq.h
ops/eq.h
// Copyright 2022 Google LLC // // 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 // // https://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. #pragma once #include <concepts> namespace sus::ops { // Type `A` and `B` are `Eq<A, B>` if an object of each type can be compared for // equality with the `==` operator. // // TODO: How do we do PartialEq? Can we even? Can we require Ord to be Eq? But // then it depends on ::num? template <class Lhs, class Rhs> concept Eq = requires(const Lhs& lhs, const Rhs& rhs) { { lhs == rhs } -> std::same_as<bool>; { rhs == lhs } -> std::same_as<bool>; }; } // namespace sus::ops
// Copyright 2022 Google LLC // // 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 // // https://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. #pragma once #include <concepts> namespace sus::ops { // Type `A` and `B` are `Eq<A, B>` if an object of each type can be compared for // equality with the `==` operator. // // TODO: How do we do PartialEq? Can we even? Can we require Ord to be Eq? But // then it depends on ::num? template <class Lhs, class Rhs> concept Eq = requires(const Lhs& lhs, const Rhs& rhs) { { lhs == rhs } -> std::same_as<bool>; }; } // namespace sus::ops
Remove redundant == in Eq
Remove redundant == in Eq
C
apache-2.0
chromium/subspace,chromium/subspace
b2192eb67960c6943b266a0456b672ee93483952
libjc/arch/i386/i386_definitions.h
libjc/arch/i386/i386_definitions.h
/* * Copyright 2005 The Apache Software Foundation or its licensors, * as applicable. * * 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. * * $Id$ */ #ifndef _ARCH_I386_DEFINITIONS_H_ #define _ARCH_I386_DEFINITIONS_H_ #if !defined(__i386__) #error "This include file is for the i386 architecture only" #endif #define _JC_PAGE_SHIFT 12 /* 4096 byte pages */ #define _JC_STACK_ALIGN 2 #define _JC_BIG_ENDIAN 0 #ifdef __CYGWIN__ #undef _JC_LIBRARY_FMT #define _JC_LIBRARY_FMT "cyg%s.dll" #endif #endif /* _ARCH_I386_DEFINITIONS_H_ */
/* * Copyright 2005 The Apache Software Foundation or its licensors, * as applicable. * * 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. * * $Id$ */ #ifndef _ARCH_I386_DEFINITIONS_H_ #define _ARCH_I386_DEFINITIONS_H_ #if !defined(__i386__) #error "This include file is for the i386 architecture only" #endif #define _JC_PAGE_SHIFT 12 /* 4096 byte pages */ #define _JC_STACK_ALIGN 2 #define _JC_BIG_ENDIAN 0 /* Fixes for Cygwin */ #ifdef __CYGWIN__ #undef _JC_LIBRARY_FMT #define _JC_LIBRARY_FMT "cyg%s.dll" #define sched_get_priority_max(x) (15) #define sched_get_priority_min(x) (1) #endif #endif /* _ARCH_I386_DEFINITIONS_H_ */
Add Cygwin fixes for sched_get_priority_min() and sched_get_priority_max().
Add Cygwin fixes for sched_get_priority_min() and sched_get_priority_max(). svn path=/incubator/harmony/enhanced/jchevm/; revision=379838
C
apache-2.0
freeVM/freeVM,freeVM/freeVM,freeVM/freeVM,freeVM/freeVM,freeVM/freeVM
54a13d2d9754a44f26dbe5f8b4485267a13a0217
drudge/canonpy.h
drudge/canonpy.h
/* vim: set filetype=cpp: */ /** Header file for canonpy. * * Currently it merely contains the definition of the object structure of the * classes defined in canonpy. They are put here in case a C API is intended * to be added for canonpy. */ #ifndef DRUDGE_CANONPY_H #define DRUDGE_CANONPY_H #include <Python.h> #include <memory> #include <libcanon/perm.h> #include <libcanon/sims.h> using libcanon::Simple_perm; using libcanon::Sims_transv; // // Permutation type // ---------------- // /** Object type for canonpy Perm objects. */ // clang-format off typedef struct { PyObject_HEAD Simple_perm perm; } Perm_object; // clang-format on // // Permutation group type // ---------------------- // // clang-format off typedef struct { PyObject_HEAD std::unique_ptr<Sims_transv<Simple_perm>> transv; } Group_object; // clang-format on #endif
/* vim: set filetype=cpp: */ /** Header file for canonpy. * * Currently it merely contains the definition of the object structure of the * classes defined in canonpy. They are put here in case a C API is intended * to be added for canonpy. */ #ifndef DRUDGE_CANONPY_H #define DRUDGE_CANONPY_H #include <Python.h> #include <memory> #include <libcanon/perm.h> #include <libcanon/sims.h> using libcanon::Simple_perm; using libcanon::Sims_transv; // // Permutation type // ---------------- // /** Object type for canonpy Perm objects. */ // clang-format off typedef struct { PyObject_HEAD Simple_perm perm; } Perm_object; // clang-format on // // Permutation group type // ---------------------- // using Transv = Sims_transv<Simple_perm>; using Transv_ptr = std::unique_ptr<Transv>; // clang-format off typedef struct { PyObject_HEAD Transv_ptr transv; } Group_object; // clang-format on #endif
Add type aliases for Group
Add type aliases for Group With these aliases, the code for permutation group manipulation can be written more succinctly.
C
mit
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
3d9077bafe6cb2f97ce16157d1db252a719e24a0
src/appjs_window.h
src/appjs_window.h
#ifndef APPJS_WINDOW_H #define APPJS_WINDOW_H #pragma once #include "appjs.h" // GTK+ binding for linux #if defined(__LINUX__) #include "linux/mainwindow.h" // Mac files #elif defined(__MAC__) #include "mac/mainwindow.h" // Windows necessary files #elif defined(__WIN__) #include "windows/mainwindow.h" #endif namespace appjs { using namespace v8; class Window : public node::ObjectWrap { DECLARE_NODE_OBJECT_FACTORY(Window); DEFINE_CPP_METHOD(OpenDevTools); DEFINE_CPP_METHOD(CloseDevTools); DEFINE_CPP_METHOD(Show); DEFINE_CPP_METHOD(Hide); DEFINE_CPP_METHOD(Destroy); DEFINE_CPP_METHOD(RunInBrowser); DEFINE_CPP_METHOD(SendSync); DEFINE_CPP_METHOD(SetMaximize); DEFINE_CPP_METHOD(SetMinimize); }; } /* appjs */ #endif /* end of APPJS_WINDOW_H */
#ifndef APPJS_WINDOW_H #define APPJS_WINDOW_H #pragma once #include "appjs.h" // GTK+ binding for linux #if defined(__LINUX__) #include "linux/mainwindow.h" // Mac files #elif defined(__MAC__) #include "mac/mainwindow.h" // Windows necessary files #elif defined(__WIN__) #include "windows/mainwindow.h" #endif namespace appjs { using namespace v8; class Window : public node::ObjectWrap { DECLARE_NODE_OBJECT_FACTORY(Window); DEFINE_CPP_METHOD(OpenDevTools); DEFINE_CPP_METHOD(CloseDevTools); DEFINE_CPP_METHOD(Show); DEFINE_CPP_METHOD(Hide); DEFINE_CPP_METHOD(Destroy); DEFINE_CPP_METHOD(RunInBrowser); DEFINE_CPP_METHOD(SendSync); DEFINE_CPP_METHOD(SetMaximize); DEFINE_CPP_METHOD(SetMinimize); DEFINE_CPP_METHOD(SetMaximize); DEFINE_CPP_METHOD(SetMinimize); }; } /* appjs */ #endif /* end of APPJS_WINDOW_H */
Add minimize and maximize function on Linux
Add minimize and maximize function on Linux
C
mit
reekoheek/appjs,reekoheek/appjs,reekoheek/appjs
6c0a304f881440303b1fe1af781b2cf1ddccc3ef
src/data/linkedlist.h
src/data/linkedlist.h
/** * An efficient c++ simulation demo * * @author Skylar Kelty <[email protected]> */ #pragma once #include "src/common.h" /** * A linked list */ template <typename T> class LinkedList { private: LLNode<T> *head; LLNode<T> *tail; public: LinkedList(); ~LinkedList(); void append(LLNode<T> *node); /** * Get the first element of the list */ inline LLNode<T> *first() { return this->head; } /** * Get the last element of the list */ inline LLNode<T> *last() { return this->tail; } /** * Get the length of the list */ inline int length() { return this->head->length(); } };
/** * An efficient c++ simulation demo * * @author Skylar Kelty <[email protected]> */ #pragma once #include "src/common.h" /** * A linked list */ template <typename T> class LinkedList { friend class Engine; private: LLNode<T> *head; LLNode<T> *tail; protected: void append(LLNode<T> *node); public: LinkedList(); ~LinkedList(); /** * Get the first element of the list */ inline LLNode<T> *first() { return this->head; } /** * Get the last element of the list */ inline LLNode<T> *last() { return this->tail; } /** * Get the length of the list */ inline int length() { return this->head->length(); } };
Enforce actor addition through Engine
Enforce actor addition through Engine
C
apache-2.0
SkylarKelty/Simulation
196992d9be7b1dcbb706a1c229ff3786d7c4935b
libplatsupport/plat_include/pc99/platsupport/plat/pit.h
libplatsupport/plat_include/pc99/platsupport/plat/pit.h
/* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #ifndef _PLATSUPPORT_PIT_H #define _PLATSUPPORT_PIT_H #include <platsupport/timer.h> #include <platsupport/io.h> #define PIT_INTERRUPT 0 /* * Get the pit interface. This may only be called once. * * @param io_port_ops io port operations. This is all the pit requires. * @return initialised interface, NULL on error. */ pstimer_t * pit_get_timer(ps_io_port_ops_t *io_port_ops); #endif /* _PLATSUPPORT_PIT_H */
/* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #ifndef _PLATSUPPORT_PIT_H #define _PLATSUPPORT_PIT_H #include <autoconf.h> #include <platsupport/timer.h> #include <platsupport/io.h> #ifdef CONFIG_IRQ_PIC #define PIT_INTERRUPT 0 #else #define PIT_INTERRUPT 2 #endif /* * Get the pit interface. This may only be called once. * * @param io_port_ops io port operations. This is all the pit requires. * @return initialised interface, NULL on error. */ pstimer_t * pit_get_timer(ps_io_port_ops_t *io_port_ops); #endif /* _PLATSUPPORT_PIT_H */
Define PIT interrupt more correctly if using the IOAPIC
libplatsupport: Define PIT interrupt more correctly if using the IOAPIC The definition is not really correct as you cannot really talk about interrupts by a single number. But this does provide the path of least resistance for legacy code using the PIT when the IOAPIC is enabled
C
bsd-2-clause
agacek/util_libs,agacek/util_libs,agacek/util_libs,agacek/util_libs
313f680c4ff21c2fb5d33d472090f9a41d2fd063
tests/ifds/reach/pass-address-of-aggregate.c
tests/ifds/reach/pass-address-of-aggregate.c
#include <stdlib.h> int y; int *g = &y; int* arr[100]; void f(int *p) { g = p; } int main() { y = rand(); /* y = 1; */ /* y *= 10; */ f(&arr[y]); y = y / 4; return 0; }
#include <stdlib.h> int y; int *g = &y; int arr[100]; void f(int *p) { g = p; } int main() { y = rand(); /* y = 1; */ /* y *= 10; */ f(&arr[y]); y = y / 4; return 0; }
Fix types in this test case
Fix types in this test case
C
bsd-3-clause
wangxiayang/llvm-analysis,wangxiayang/llvm-analysis,travitch/llvm-analysis,travitch/llvm-analysis
36881897a4d772e3141bfe08953c63e08cb5c317
packages/conf-openblas/conf-openblas.0.2.1/files/test.c
packages/conf-openblas/conf-openblas.0.2.1/files/test.c
#include <cblas.h> #include <lapacke.h> int main(int argc, char **argv) { int N = 3; double X[] = { 1, 2, 3 }; int INCX = 1; double res = cblas_dnrm2(N, X, INCX); return 0; }
#define _GNU_SOURCE #include <cblas.h> #include <lapacke.h> int main(int argc, char **argv) { int N = 3; double X[] = { 1, 2, 3 }; int INCX = 1; double res = cblas_dnrm2(N, X, INCX); return 0; }
Fix alpine (cblas bug fixed in 0.3.16. cpu_set_t isn't defined unless _GNU_SOURCE is)
conf-openblas: Fix alpine (cblas bug fixed in 0.3.16. cpu_set_t isn't defined unless _GNU_SOURCE is)
C
cc0-1.0
jonludlam/opam-repository,nberth/opam-repository,mjambon/opam-repository,nberth/opam-repository,djs55/opam-repository,codinuum/opam-repository,Leonidas-from-XIV/opam-repository,pirbo/opam-repository,emillon/opam-repository,kkirstein/opam-repository,djs55/opam-repository,Chris00/opam-repository,pirbo/opam-repository,astrada/opam-repository,fpottier/opam-repository,yallop/opam-repository,andersfugmann/opam-repository,astrada/opam-repository,lefessan/opam-repository,mjambon/opam-repository,toots/opam-repository,emillon/opam-repository,kkirstein/opam-repository,jhwoodyatt/opam-repository,ocaml/opam-repository,toots/opam-repository,Chris00/opam-repository,Leonidas-from-XIV/opam-repository,c-cube/opam-repository,andersfugmann/opam-repository,jonludlam/opam-repository,lefessan/opam-repository,yallop/opam-repository,hannesm/opam-repository,fpottier/opam-repository,c-cube/opam-repository,ocaml/opam-repository,jhwoodyatt/opam-repository,codinuum/opam-repository,pqwy/opam-repository,pqwy/opam-repository,hannesm/opam-repository
6f245f8f098efa6c9c9e2dcafec83670921c8ea6
src/scanner/scanner.c
src/scanner/scanner.c
#include "scanner.h"
#include "scanner.h" void scanner_init() { scanner_token_init(); current_symbol = T_EOF; scanner_get_symbol(); } void scanner_token_init() { T_EOF = -1; } void scanner_get_symbol() { }
Add first (dummy) implementation of functions to make it compile
Add first (dummy) implementation of functions to make it compile
C
mit
danielkocher/ocelot2
b41ef42f8f551006949b177015ca5792b9d093a0
inc/ogvr/Util/DeviceCallbackTypesC.h
inc/ogvr/Util/DeviceCallbackTypesC.h
/** @file @brief Header declaring device callback types Must be c-safe! @date 2014 @author Ryan Pavlik <[email protected]> <http://sensics.com> */ /* // Copyright 2014 Sensics, Inc. // // All rights reserved. // // (Final version intended to be licensed under // the Apache License, Version 2.0) */ #ifndef INCLUDED_DeviceCallbackTypesC_h_GUID_46F72CEE_3327_478F_2DED_ADAAF2EC783C #define INCLUDED_DeviceCallbackTypesC_h_GUID_46F72CEE_3327_478F_2DED_ADAAF2EC783C /* Internal Includes */ #include <ogvr/Util/ReturnCodesC.h> /* Library/third-party includes */ /* none */ /* Standard includes */ /* none */ OGVR_EXTERN_C_BEGIN /** @addtogroup PluginKit @{ */ /** @brief Function type of a Sync Device Update callback */ typedef OGVR_ReturnCode (*OGVR_SyncDeviceUpdateCallback)(void *userData); /** @brief Function type of an Async Device Wait callback */ typedef OGVR_ReturnCode (*OGVR_AsyncDeviceWaitCallback)(void *userData); /** @} */ OGVR_EXTERN_C_END #endif
/** @file @brief Header declaring device callback types Must be c-safe! @date 2014 @author Ryan Pavlik <[email protected]> <http://sensics.com> */ /* // Copyright 2014 Sensics, Inc. // // All rights reserved. // // (Final version intended to be licensed under // the Apache License, Version 2.0) */ #ifndef INCLUDED_DeviceCallbackTypesC_h_GUID_46F72CEE_3327_478F_2DED_ADAAF2EC783C #define INCLUDED_DeviceCallbackTypesC_h_GUID_46F72CEE_3327_478F_2DED_ADAAF2EC783C /* Internal Includes */ #include <ogvr/Util/APIBaseC.h> #include <ogvr/Util/ReturnCodesC.h> /* Library/third-party includes */ /* none */ /* Standard includes */ /* none */ OGVR_EXTERN_C_BEGIN /** @addtogroup PluginKit @{ */ /** @brief Function type of a Sync Device Update callback */ typedef OGVR_ReturnCode (*OGVR_SyncDeviceUpdateCallback)(void *userData); /** @brief Function type of an Async Device Wait callback */ typedef OGVR_ReturnCode (*OGVR_AsyncDeviceWaitCallback)(void *userData); /** @} */ OGVR_EXTERN_C_END #endif
Include a header we use.
Include a header we use.
C
apache-2.0
Armada651/OSVR-Core,feilen/OSVR-Core,feilen/OSVR-Core,godbyk/OSVR-Core,leemichaelRazer/OSVR-Core,godbyk/OSVR-Core,Armada651/OSVR-Core,godbyk/OSVR-Core,godbyk/OSVR-Core,OSVR/OSVR-Core,OSVR/OSVR-Core,d235j/OSVR-Core,Armada651/OSVR-Core,OSVR/OSVR-Core,OSVR/OSVR-Core,Armada651/OSVR-Core,OSVR/OSVR-Core,godbyk/OSVR-Core,d235j/OSVR-Core,leemichaelRazer/OSVR-Core,leemichaelRazer/OSVR-Core,leemichaelRazer/OSVR-Core,d235j/OSVR-Core,leemichaelRazer/OSVR-Core,d235j/OSVR-Core,Armada651/OSVR-Core,feilen/OSVR-Core,feilen/OSVR-Core,feilen/OSVR-Core,OSVR/OSVR-Core,godbyk/OSVR-Core,d235j/OSVR-Core
d480cb74aca87fb0b8f371c8ccaba5a771a01166
YZLibrary/NSData+YZLibrary.h
YZLibrary/NSData+YZLibrary.h
// // NSData+YZLibrary.h // YZLibrary // // Copyright (c) 2016 Yichi Zhang // https://github.com/yichizhang // [email protected] // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // 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. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. // #import <Foundation/Foundation.h> @interface NSData (YZLibrary) - (NSString *)yz_MD5String; @end
// // NSData+YZLibrary.h // YZLibrary // // Copyright (c) 2016 Yichi Zhang // https://github.com/yichizhang // [email protected] // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // 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. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. // #import <Foundation/Foundation.h> @interface NSData (YZLibrary) /** * Returns the MD5 hash of data contained in the receiver. */ - (NSString *)yz_MD5String; @end
Add comment to NSData's MD5 category method
Add comment to NSData's MD5 category method
C
mit
yichizhang/YZLibrary,yichizhang/YZLibrary,yichizhang/YZLibrary
8c2a1124874edf83fab68bac1df3e1f5a4a45baa
avogadro/core/mutex.h
avogadro/core/mutex.h
/****************************************************************************** This source file is part of the Avogadro project. Copyright 2013 Kitware, Inc. This source code is released under the New BSD License, (the "License"). 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. ******************************************************************************/ #ifndef AVOGADRO_CORE_MUTEX_H #define AVOGADRO_CORE_MUTEX_H #include "avogadrocore.h" namespace Avogadro { namespace Core { /** * @class Mutex mutex.h <avogadro/core/mutex.h> * @brief The Mutex class provides a simple wrapper for the C++11 or Boost mutex * class * @author Marcus D. Hanwell * * A very simple, and thin wrapper around the C++11 (or Boost fallback) mutex * class, allowing for lock, tryLock and unlock. */ class AVOGADROCORE_EXPORT Mutex { public: Mutex(); ~Mutex(); /** * @brief Obtain an exclusive lock. */ void lock(); /** * @brief Attempt to obtain an exclusive lock. * @return True on success, false on failure. */ bool tryLock(); /** * @brief Unlocks the lock. */ void unlock(); private: class PIMPL; PIMPL* d; }; } } #endif // AVOGADRO_CORE_MUTEX_H
/****************************************************************************** This source file is part of the Avogadro project. Copyright 2013 Kitware, Inc. This source code is released under the New BSD License, (the "License"). 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. ******************************************************************************/ #ifndef AVOGADRO_CORE_MUTEX_H #define AVOGADRO_CORE_MUTEX_H #include "avogadrocore.h" namespace Avogadro { namespace Core { /** * @class Mutex mutex.h <avogadro/core/mutex.h> * @brief The Mutex class provides a simple wrapper for the C++11 mutex * class * @author Marcus D. Hanwell * * A very simple, and thin wrapper around the C++11 mutex class, allowing for * lock, tryLock and unlock. */ class AVOGADROCORE_EXPORT Mutex { public: Mutex(); ~Mutex(); /** * @brief Obtain an exclusive lock. */ void lock(); /** * @brief Attempt to obtain an exclusive lock. * @return True on success, false on failure. */ bool tryLock(); /** * @brief Unlocks the lock. */ void unlock(); private: class PIMPL; PIMPL* d; }; } } #endif // AVOGADRO_CORE_MUTEX_H
Update the documentation - no more Boost
Update the documentation - no more Boost This was missed when moving away from the Boost fallback - it is just a simple wrapper for the C++11 class now. Signed-off-by: Marcus D. Hanwell <[email protected]>
C
bsd-3-clause
OpenChemistry/avogadrolibs,OpenChemistry/avogadrolibs,ghutchis/avogadrolibs,OpenChemistry/avogadrolibs,ghutchis/avogadrolibs,ghutchis/avogadrolibs,ghutchis/avogadrolibs,ghutchis/avogadrolibs,OpenChemistry/avogadrolibs,OpenChemistry/avogadrolibs
4c6bf1e18030906506913e9b14a745fb5f59d182
q/bit_array_sort/bit_array_sort.c
q/bit_array_sort/bit_array_sort.c
#include <stdio.h> int main() { unsigned int bit_array = 0; unsigned int a = 1; unsigned int result; FILE *fr; FILE *fw; char row[10]; fr = fopen("out/testdata", "r"); if (!fr) { puts("read error"); exit(1); } while(fgets(row, sizeof(row), fr) != NULL) { int x = atoi(row); bit_array = bit_array | (a << x); } fclose(fr); fw = fopen("out/output_bit_array_sort", "w"); unsigned i; for (i = 0; i < 1000000; i++) { if(fprintf(fw , "%07u\n", bit_array & i) < 0) { puts("write error"); exit(1); } } fclose(fw); return 0; }
Add sort of numerical sequence by bit array
Add sort of numerical sequence by bit array
C
mit
bati11/study-algorithm,bati11/study-algorithm,bati11/study-algorithm,bati11/study-algorithm,bati11/study-algorithm,bati11/study-algorithm
98387099470e2909fabc63c392b034424be13584
src/HunspellContext.h
src/HunspellContext.h
#ifndef HunspellContext_H #define HunspellContext_H #include <hunspell.hxx> #include <napi.h> #include <mutex> #include <shared_mutex> class HunspellContext { public: Hunspell* instance; HunspellContext(Hunspell* instance): instance(instance) {}; ~HunspellContext() { if (instance) { delete instance; instance = NULL; } } void lockRead() { rwLock.lock_shared(); } void unlockRead() { rwLock.unlock_shared(); } void lockWrite() { rwLock.lock(); } void unlockWrite() { rwLock.unlock(); } private: /* * The Hunspell instance is not thread safe, so we use a mutex * to manage asynchronous usage. */ std::shared_mutex rwLock; }; #endif
#ifndef HunspellContext_H #define HunspellContext_H #include <hunspell.hxx> #include <napi.h> #include <mutex> #include <shared_mutex> #include <uv.h> class HunspellContext { public: Hunspell* instance; HunspellContext(Hunspell* instance): instance(instance) { uv_rwlock_init(&rwLock); }; ~HunspellContext() { if (instance) { delete instance; instance = NULL; } uv_rwlock_destroy(&rwLock); } void lockRead() { uv_rwlock_rdlock(&rwLock); } void unlockRead() { uv_rwlock_rdunlock(&rwLock); } void lockWrite() { uv_rwlock_wrlock(&rwLock); } void unlockWrite() { uv_rwlock_wrunlock(&rwLock); } private: /* * The Hunspell instance is not thread safe, so we use a mutex * to manage asynchronous usage. */ uv_rwlock_t rwLock; }; #endif
Switch from std::shared_mutex to libuv's uv_rwlock
Switch from std::shared_mutex to libuv's uv_rwlock
C
mit
Wulf/nodehun,nathanjsweet/nodehun,Wulf/nodehun,nathanjsweet/nodehun,Wulf/nodehun,Wulf/nodehun
02436bea03b1f9a61fb0bc39b2a9f821ac4f6118
src/node.h
src/node.h
#ifndef SRC_NODE_H_ #define SRC_NODE_H_ #include <boost/serialization/serialization.hpp> #include <boost/serialization/access.hpp> #include <boost/serialization/nvp.hpp> #include <memory> #include "./graphics/render_data.h" #include "./math/obb.h" #include "./graphics/gl.h" /** * \brief Base class for nodes which are managed by the * Nodes class * * The only virtual method which must be implemented is * Node::render. */ class Node { public: virtual ~Node() { } virtual void render(Graphics::Gl *gl, RenderData renderData) = 0; virtual std::shared_ptr<Math::Obb> getObb() { return std::shared_ptr<Math::Obb>(); } bool isPersistable() { return persistable; } protected: Node() { } bool persistable = true; private: friend class boost::serialization::access; template <class Archive> void serialize(Archive &ar, unsigned int version) const { } }; #endif // SRC_NODE_H_
#ifndef SRC_NODE_H_ #define SRC_NODE_H_ #include <boost/serialization/serialization.hpp> #include <boost/serialization/access.hpp> #include <boost/serialization/nvp.hpp> #include <memory> #include "./graphics/render_data.h" #include "./math/obb.h" #include "./graphics/gl.h" #include "./graphics/ha_buffer.h" /** * \brief Base class for nodes which are managed by the * Nodes class * * The only virtual method which must be implemented is * Node::render. */ class Node { public: virtual ~Node() { } virtual void render(Graphics::Gl *gl, RenderData renderData) = 0; void render(Graphics::Gl *gl, std::shared_ptr<Graphics::HABuffer> haBuffer, RenderData renderData) { this->haBuffer = haBuffer; render(gl, renderData); } virtual std::shared_ptr<Math::Obb> getObb() { return std::shared_ptr<Math::Obb>(); } bool isPersistable() { return persistable; } protected: Node() { } bool persistable = true; std::shared_ptr<Graphics::HABuffer> haBuffer; private: friend class boost::serialization::access; template <class Archive> void serialize(Archive &ar, unsigned int version) const { } }; #endif // SRC_NODE_H_
Store haBuffer shared_ptr in Node.
Store haBuffer shared_ptr in Node.
C
mit
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
cdb2eaafed65da729c51179cab0d0b31692cfea7
src/imap/cmd-create.c
src/imap/cmd-create.c
/* Copyright (C) 2002 Timo Sirainen */ #include "common.h" #include "commands.h" int cmd_create(struct client *client) { struct mail_storage *storage; const char *mailbox; int directory; size_t len; /* <mailbox> */ if (!client_read_string_args(client, 1, &mailbox)) return FALSE; storage = client_find_storage(client, &mailbox); if (storage == NULL) return TRUE; len = strlen(mailbox); if (mailbox[len-1] != mail_storage_get_hierarchy_sep(storage)) directory = FALSE; else { /* name ends with hierarchy separator - client is just informing us that it wants to create children under this mailbox. */ directory = TRUE; mailbox = t_strndup(mailbox, len-1); } if (!client_verify_mailbox_name(client, mailbox, FALSE, TRUE)) return TRUE; if (mail_storage_mailbox_create(storage, mailbox, directory) < 0) client_send_storage_error(client, storage); else client_send_tagline(client, "OK Create completed."); return TRUE; }
/* Copyright (C) 2002 Timo Sirainen */ #include "common.h" #include "commands.h" int cmd_create(struct client *client) { struct mail_storage *storage; const char *mailbox, *full_mailbox; int directory; size_t len; /* <mailbox> */ if (!client_read_string_args(client, 1, &mailbox)) return FALSE; full_mailbox = mailbox; storage = client_find_storage(client, &mailbox); if (storage == NULL) return TRUE; len = strlen(mailbox); if (mailbox[len-1] != mail_storage_get_hierarchy_sep(storage)) directory = FALSE; else { /* name ends with hierarchy separator - client is just informing us that it wants to create children under this mailbox. */ directory = TRUE; mailbox = t_strndup(mailbox, len-1); } if (!client_verify_mailbox_name(client, full_mailbox, FALSE, TRUE)) return TRUE; if (mail_storage_mailbox_create(storage, mailbox, directory) < 0) client_send_storage_error(client, storage); else client_send_tagline(client, "OK Create completed."); return TRUE; }
CREATE was broken if namespace prefixes were set. Patch by Andreas Fuchs.
CREATE was broken if namespace prefixes were set. Patch by Andreas Fuchs.
C
mit
LTD-Beget/dovecot,Distrotech/dovecot,damoxc/dovecot,damoxc/dovecot,Distrotech/dovecot,LTD-Beget/dovecot,Distrotech/dovecot,damoxc/dovecot,LTD-Beget/dovecot,damoxc/dovecot,LTD-Beget/dovecot,damoxc/dovecot,Distrotech/dovecot,Distrotech/dovecot,LTD-Beget/dovecot
ce2291a23cef5aba2b58bfce2cc57751f58a1c2c
common/guiddatabase.h
common/guiddatabase.h
/* guiddatabase.h Copyright (c) 2017, LongSoft. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ #ifndef GUID_DATABASE_H #define GUID_DATABASE_H #include <map> #include <string> #include "basetypes.h" #include "ustring.h" #include "ffsparser.h" #include "ffs.h" #include "utility.h" struct OperatorLessForGuids : public std::binary_function<EFI_GUID, EFI_GUID, bool> { bool operator()(const EFI_GUID& lhs, const EFI_GUID& rhs) const { return (memcmp(&lhs, &rhs, sizeof(EFI_GUID)) < 0); } }; typedef std::map<EFI_GUID, UString, OperatorLessForGuids> GuidDatabase; UString guidDatabaseLookup(const EFI_GUID & guid); void initGuidDatabase(const UString & path = "", UINT32* numEntries = NULL); GuidDatabase guidDatabaseFromTreeRecursive(TreeModel * model, const UModelIndex index); USTATUS guidDatabaseExportToFile(const UString & outPath, GuidDatabase & db); #endif // GUID_DATABASE_H
/* guiddatabase.h Copyright (c) 2017, LongSoft. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ #ifndef GUID_DATABASE_H #define GUID_DATABASE_H #include <map> #include <string> #include "basetypes.h" #include "ustring.h" #include "ffsparser.h" #include "ffs.h" #include "utility.h" struct OperatorLessForGuids { bool operator()(const EFI_GUID& lhs, const EFI_GUID& rhs) const { return (memcmp(&lhs, &rhs, sizeof(EFI_GUID)) < 0); } }; typedef std::map<EFI_GUID, UString, OperatorLessForGuids> GuidDatabase; UString guidDatabaseLookup(const EFI_GUID & guid); void initGuidDatabase(const UString & path = "", UINT32* numEntries = NULL); GuidDatabase guidDatabaseFromTreeRecursive(TreeModel * model, const UModelIndex index); USTATUS guidDatabaseExportToFile(const UString & outPath, GuidDatabase & db); #endif // GUID_DATABASE_H
Fix CMAKE_CXX_STANDARD 17 build on Windows
Fix CMAKE_CXX_STANDARD 17 build on Windows
C
bsd-2-clause
LongSoft/UEFITool,LongSoft/UEFITool,LongSoft/UEFITool
2c0940f05fc6c53a20fb4f3d6ad1b1e39459dbbb
mud/include/kotaka/paths/utility.h
mud/include/kotaka/paths/utility.h
/* * This file is part of Kotaka, a mud library for DGD * http://github.com/shentino/kotaka * * Copyright (C) 2018 Raymond Jennings * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> /* daemons */ #define MATHD (USR_DIR + "/Utility/sys/mathd") #define SORTD (USR_DIR + "/Utility/sys/sortd") #define SUBD (USR_DIR + "/Utility/sys/subd")
/* * This file is part of Kotaka, a mud library for DGD * http://github.com/shentino/kotaka * * Copyright (C) 2018 Raymond Jennings * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> /* daemons */ #define SUBD (USR_DIR + "/Utility/sys/subd")
Remove MATHD and SORTD macros
Remove MATHD and SORTD macros
C
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
eeb2918922a49522b73cb10d41ea0fbd03af1180
libc/sysdeps/linux/common/getgid.c
libc/sysdeps/linux/common/getgid.c
/* vi: set sw=4 ts=4: */ /* * getgid() for uClibc * * Copyright (C) 2000-2006 Erik Andersen <[email protected]> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #include "syscalls.h" #include <unistd.h> #if defined __NR_getxgid # define __NR_getgid __NR_getxgid #endif _syscall0(gid_t, getgid); libc_hidden_proto(getgid) libc_hidden_def(getgid)
/* vi: set sw=4 ts=4: */ /* * getgid() for uClibc * * Copyright (C) 2000-2006 Erik Andersen <[email protected]> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #include "syscalls.h" #include <unistd.h> #if defined __NR_getxgid # define __NR_getgid __NR_getxgid #endif libc_hidden_proto(getgid) _syscall0(gid_t, getgid); libc_hidden_def(getgid)
Make gcc4 happy as well
Make gcc4 happy as well
C
lgpl-2.1
waweber/uclibc-clang,czankel/xtensa-uclibc,skristiansson/uClibc-or1k,ChickenRunjyd/klee-uclibc,ndmsystems/uClibc,mephi42/uClibc,ChickenRunjyd/klee-uclibc,waweber/uclibc-clang,foss-for-synopsys-dwc-arc-processors/uClibc,brgl/uclibc-ng,groundwater/uClibc,atgreen/uClibc-moxie,hwoarang/uClibc,kraj/uClibc,ysat0/uClibc,gittup/uClibc,ffainelli/uClibc,waweber/uclibc-clang,m-labs/uclibc-lm32,ffainelli/uClibc,ddcc/klee-uclibc-0.9.33.2,groundwater/uClibc,ddcc/klee-uclibc-0.9.33.2,ysat0/uClibc,hjl-tools/uClibc,klee/klee-uclibc,kraj/uclibc-ng,m-labs/uclibc-lm32,majek/uclibc-vx32,skristiansson/uClibc-or1k,ysat0/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,brgl/uclibc-ng,ChickenRunjyd/klee-uclibc,klee/klee-uclibc,atgreen/uClibc-moxie,czankel/xtensa-uclibc,ffainelli/uClibc,kraj/uClibc,OpenInkpot-archive/iplinux-uclibc,groundwater/uClibc,foss-xtensa/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,ddcc/klee-uclibc-0.9.33.2,atgreen/uClibc-moxie,skristiansson/uClibc-or1k,groundwater/uClibc,ffainelli/uClibc,mephi42/uClibc,wbx-github/uclibc-ng,skristiansson/uClibc-or1k,waweber/uclibc-clang,hjl-tools/uClibc,klee/klee-uclibc,hjl-tools/uClibc,majek/uclibc-vx32,wbx-github/uclibc-ng,kraj/uclibc-ng,gittup/uClibc,hjl-tools/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,ChickenRunjyd/klee-uclibc,OpenInkpot-archive/iplinux-uclibc,hjl-tools/uClibc,czankel/xtensa-uclibc,ddcc/klee-uclibc-0.9.33.2,ysat0/uClibc,ndmsystems/uClibc,ndmsystems/uClibc,majek/uclibc-vx32,ffainelli/uClibc,m-labs/uclibc-lm32,gittup/uClibc,hwoarang/uClibc,czankel/xtensa-uclibc,hwoarang/uClibc,majek/uclibc-vx32,atgreen/uClibc-moxie,ndmsystems/uClibc,foss-xtensa/uClibc,wbx-github/uclibc-ng,kraj/uclibc-ng,kraj/uClibc,foss-xtensa/uClibc,m-labs/uclibc-lm32,gittup/uClibc,OpenInkpot-archive/iplinux-uclibc,brgl/uclibc-ng,kraj/uClibc,OpenInkpot-archive/iplinux-uclibc,groundwater/uClibc,foss-xtensa/uClibc,brgl/uclibc-ng,hwoarang/uClibc,mephi42/uClibc,klee/klee-uclibc,kraj/uclibc-ng,wbx-github/uclibc-ng,mephi42/uClibc
ad3ed34bd544c0edc4a6afbe0e3278be2f3bcc06
src/modtypes/socket.h
src/modtypes/socket.h
#pragma once #include "../main.h" class Socket { public: virtual ~Socket() {} virtual unsigned int apiVersion() = 0; virtual void connect(const std::string& server, const std::string& port, const std::string& bindAddr = "") {} virtual std::string receive() { return ""; } virtual void send(const std::string& data) {} virtual void closeConnection() {} bool isConnected() { return connected; } protected: bool connected; };
#pragma once #include "../main.h" class Socket { public: virtual ~Socket() {} virtual unsigned int apiVersion() = 0; virtual void connectServer(const std::string& server, const std::string& port, const std::string& bindAddr = "") {} virtual std::string receive() { return ""; } virtual void send(const std::string& data) {} virtual void closeConnection() {} bool isConnected() { return connected; } protected: bool connected; };
Rename function to not be the same as another function that does the actual job
Rename function to not be the same as another function that does the actual job
C
mit
ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo
e285db1f6f9f42e98ac7f3f36de4cc21d743e9ad
source/Pictus/actionmap.h
source/Pictus/actionmap.h
#ifndef PICTUS_ACTIONMAP_H #define PICTUS_ACTIONMAP_H #include <boost/function.hpp> #include <map> namespace App { template <typename _key, typename _param> class ActionMapParam { public: typedef boost::function<void(_param)> Function_Type; void AddAction(_key id, Function_Type f) { m_map[id] = f; } bool Execute(_key id, _param e) { auto i = m_map.find(id); if(i == m_map.end()) return false; (i->second)(e); return true; } private: typedef std::map<_key, Function_Type> FunctionMap; FunctionMap m_map; }; template <typename _key> class ActionMapNoParam { public: typedef boost::function<void()> Function_Type; void AddAction(_key id, Function_Type f) { m_map[id] = f; } bool Execute(_key id) { auto i = m_map.find(id); if(i == m_map.end()) return false; (i->second)(); return true; } private: typedef std::map<_key, Function_Type> FunctionMap; FunctionMap m_map; }; } #endif
#ifndef PICTUS_ACTIONMAP_H #define PICTUS_ACTIONMAP_H #include <functional> #include <map> namespace App { template <typename _key, typename _param> class ActionMapParam { public: typedef typename std::function<void(_param)> Function_Type; void AddAction(_key id, Function_Type f) { m_map[id] = f; } bool Execute(_key id, _param e) { auto i = m_map.find(id); if(i == m_map.end()) return false; (i->second)(e); return true; } private: typedef std::map<_key, Function_Type> FunctionMap; FunctionMap m_map; }; template <typename _key> class ActionMapNoParam { public: typedef std::function<void()> Function_Type; void AddAction(_key id, Function_Type f) { m_map[id] = f; } bool Execute(_key id) { auto i = m_map.find(id); if(i == m_map.end()) return false; (i->second)(); return true; } private: typedef std::map<_key, Function_Type> FunctionMap; FunctionMap m_map; }; } #endif
Use std::function instead of boost::function
Use std::function instead of boost::function
C
mit
poppeman/Pictus,poppeman/Pictus,poppeman/Pictus
7379cffcf2c992c22f948ce379d19061be4ef310
src/shk/src/dummy_invocation_log.h
src/shk/src/dummy_invocation_log.h
#pragma once #include "invocation_log.h" namespace shk { class DummyInvocationLog : public InvocationLog { public: void createdDirectory(const std::string &path) throw(IoError) {} void removedDirectory(const std::string &path) throw(IoError) {} void ranCommand( const Hash &build_step_hash, std::unordered_set<std::string> &&output_files, std::unordered_map<std::string, DependencyType> &&input_files) throw(IoError) {} void cleanedCommand( const Hash &build_step_hash) throw(IoError) {} }; } // namespace shk
#pragma once #include "invocation_log.h" namespace shk { class DummyInvocationLog : public InvocationLog { public: void createdDirectory(const std::string &path) throw(IoError) override {} void removedDirectory(const std::string &path) throw(IoError) override {} void ranCommand( const Hash &build_step_hash, std::unordered_set<std::string> &&output_files, std::unordered_map<std::string, DependencyType> &&input_files) throw(IoError) override {} void cleanedCommand( const Hash &build_step_hash) throw(IoError) override {} }; } // namespace shk
Use override keyword on methods in DummyInvocationLog
Use override keyword on methods in DummyInvocationLog
C
apache-2.0
per-gron/shuriken,per-gron/shuriken,per-gron/shuriken,per-gron/shuriken
3a7eff1835fa925382f1130d6fdc34cf4d2966b1
sys/boot/i386/libi386/biosmem.c
sys/boot/i386/libi386/biosmem.c
/* * mjs copyright */ /* * Obtain memory configuration information from the BIOS * * Note that we don't try too hard here; knowing the size of * base memory and extended memory out to 16 or 64M is enough for * the requirements of the bootstrap. * * We also maintain a pointer to the top of physical memory * once called to allow rangechecking of load/copy requests. */ #include <stand.h> #include "btxv86.h" vm_offset_t memtop; /* * Return base memory size in kB. */ int getbasemem(void) { v86.ctl = 0; v86.addr = 0x1a; /* int 0x12 */ v86int(); return(v86.eax & 0xffff); } /* * Return extended memory size in kB */ int getextmem(void) { int extkb; v86.ctl = 0; v86.addr = 0x15; /* int 0x12 function 0x88*/ v86.eax = 0x8800; v86int(); extkb = v86.eax & 0xffff; /* Set memtop to actual top or 16M, whicheve is less */ memtop = min((0x100000 + (extkb * 1024)), (16 * 1024 * 1024)); return(extkb); }
/* * mjs copyright */ /* * Obtain memory configuration information from the BIOS * * Note that we don't try too hard here; knowing the size of * base memory and extended memory out to 16 or 64M is enough for * the requirements of the bootstrap. * * We also maintain a pointer to the top of physical memory * once called to allow rangechecking of load/copy requests. */ #include <stand.h> #include "btxv86.h" vm_offset_t memtop; /* * Return base memory size in kB. */ int getbasemem(void) { v86.ctl = 0; v86.addr = 0x12; /* int 0x12 */ v86int(); return(v86.eax & 0xffff); } /* * Return extended memory size in kB */ int getextmem(void) { int extkb; v86.ctl = 0; v86.addr = 0x15; /* int 0x15 function 0x88*/ v86.eax = 0x8800; v86int(); extkb = v86.eax & 0xffff; /* Set memtop to actual top or 16M, whicheve is less */ memtop = min((0x100000 + (extkb * 1024)), (16 * 1024 * 1024)); return(extkb); }
Fix typos.. The vector for "int 0x12" (get base mem) is not written in hex as "0x1a". :-) Fix a comment about the extended memory checks, that's int 0x15.
Fix typos.. The vector for "int 0x12" (get base mem) is not written in hex as "0x1a". :-) Fix a comment about the extended memory checks, that's int 0x15.
C
bsd-3-clause
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
35adf7726b1d4bc8d21efca06f2f628b48caf120
thrust/detail/casts.h
thrust/detail/casts.h
/* * Copyright 2008-2009 NVIDIA 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. */ /*! \file casts.h * \brief Unsafe casts for internal use. */ #pragma once #include <thrust/iterator/iterator_traits.h> namespace thrust { namespace detail { namespace dispatch { template<typename TrivialIterator> typename thrust::iterator_traits<TrivialIterator>::value_type * raw_pointer_cast(TrivialIterator i, thrust::random_access_host_iterator_tag) { typedef typename thrust::iterator_traits<TrivialIterator>::value_type * Pointer; // cast away constness return const_cast<Pointer>(&*i); } // end raw_pointer_cast() // this path will work for device_ptr & device_vector::iterator template<typename TrivialIterator> typename thrust::iterator_traits<TrivialIterator>::value_type * raw_pointer_cast(TrivialIterator i, thrust::random_access_device_iterator_tag) { typedef typename thrust::iterator_traits<TrivialIterator>::value_type * Pointer; // cast away constness return const_cast<Pointer>((&*i).get()); } // end raw_pointer_cast() } // end dispatch template<typename TrivialIterator> typename thrust::iterator_traits<TrivialIterator>::value_type *raw_pointer_cast(TrivialIterator i) { return detail::dispatch::raw_pointer_cast(i, thrust::iterator_traits<TrivialIterator>::iterator_category()); } // end raw_pointer_cast() } // end detail } // end thrust
Add git r done version of detail::raw_pointer_cast
Add git r done version of detail::raw_pointer_cast --HG-- extra : convert_revision : svn%3A83215879-3e5a-4751-8c9d-778f44bb06a5/trunk%40150
C
apache-2.0
jbrownbridge/thrust,jbrownbridge/thrust,jbrownbridge/thrust,jbrownbridge/thrust
92fc5c6fd7c347abf8e8b63c9714981630b0612f
src/condor_ckpt/condor_syscalls.c
src/condor_ckpt/condor_syscalls.c
/******************************************************************* ** ** Manage system call mode and do remote system calls. ** *******************************************************************/ #define _POSIX_SOURCE #include <stdio.h> #include "condor_syscalls.h" static int SyscallMode; int SetSyscalls( int mode ) { int answer; answer = SyscallMode; SyscallMode = mode; return answer; } BOOL LocalSysCalls() { return SyscallMode & SYS_LOCAL; } BOOL RemoteSysCalls() { return (SyscallMode & SYS_LOCAL) == 0; } BOOL MappingFileDescriptors() { return (SyscallMode & SYS_MAPPED); } int REMOTE_syscall( int syscall_num, ... ) { fprintf( stderr, "Don't know how to do system call %d remotely - yet\n", syscall_num ); abort(); return -1; }
/******************************************************************* ** ** Manage system call mode and do remote system calls. ** *******************************************************************/ #define _POSIX_SOURCE #include <stdio.h> #include "condor_syscalls.h" static int SyscallMode; int SetSyscalls( int mode ) { int answer; answer = SyscallMode; SyscallMode = mode; return answer; } BOOL LocalSysCalls() { return SyscallMode & SYS_LOCAL; } BOOL RemoteSysCalls() { return (SyscallMode & SYS_LOCAL) == 0; } BOOL MappingFileDescriptors() { return (SyscallMode & SYS_MAPPED); } int REMOTE_syscall( int syscall_num, ... ) { fprintf( stderr, "Don't know how to do system call %d remotely - yet\n", syscall_num ); abort(); return -1; } #if defined(AIX32) /* Just to test linking */ int syscall( int num, ... ) { return 0; } #endif
Add dummy "syscall()" routine for AIX so we can at least test compiling and linking.
Add dummy "syscall()" routine for AIX so we can at least test compiling and linking.
C
apache-2.0
mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,neurodebian/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,neurodebian/htcondor,clalancette/condor-dcloud,clalancette/condor-dcloud,djw8605/htcondor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,htcondor/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,htcondor/htcondor,neurodebian/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,djw8605/condor,djw8605/condor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,clalancette/condor-dcloud,htcondor/htcondor,djw8605/condor,djw8605/condor,htcondor/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,neurodebian/htcondor,djw8605/condor,djw8605/htcondor,clalancette/condor-dcloud,djw8605/htcondor,zhangzhehust/htcondor,htcondor/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,djw8605/condor,htcondor/htcondor,djw8605/htcondor,zhangzhehust/htcondor,djw8605/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,mambelli/osg-bosco-marco,djw8605/condor,zhangzhehust/htcondor,htcondor/htcondor,djw8605/condor,zhangzhehust/htcondor,htcondor/htcondor
bb3f92d53d0051862d7351650c327cab0a6e1065
unittests/core/main.c
unittests/core/main.c
#include <stdio.h> #include <CUnit/CUnit.h> #include <CUnit/Basic.h> #include "hashtable/hashtable.h" #include "dll/dll.h" int main(int argc, char *argv[]) { CU_initialize_registry(); test_hashtable_init(); test_dll_init(); CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); unsigned int nr_of_fails = CU_get_number_of_tests_failed(); nr_of_fails += CU_get_number_of_failures(); CU_cleanup_registry(); return nr_of_fails > 0 ? 1 : 0; }
#include <stdio.h> #include <CUnit/CUnit.h> #include <CUnit/Basic.h> #include "hashtable/hashtable.h" #include "dll/dll.h" int main(int argc, char *argv[]) { CU_initialize_registry(); test_hashtable_init(); test_dll_init(); CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); unsigned int nr_of_fails = CU_get_number_of_tests_failed(); nr_of_fails += CU_get_number_of_failures(); CU_cleanup_registry(); if(nr_of_fails == 0) { printf("\n\x1b[1;37;42m\x1b[2K%s\n\x1b[0m\x1b[37;41m\x1b[0m\x1b[2K\n", "Success!"); } else { printf("\n\x1b[1;37;41m\x1b[2K%s\n\x1b[0m\x1b[37;41m\x1b[2K\x1b[0m\x1b[2K\n", "FAILURES!"); } return nr_of_fails > 0 ? 1 : 0; }
Add success / error message
unittests: Add success / error message
C
bsd-3-clause
steazzalini/saffire,Drarok/saffire,saffire/saffire,saffire/saffire,saffire/saffire,saffire/saffire,jaytaph/saffire,jaytaph/saffire,steazzalini/saffire,steazzalini/saffire,jaytaph/saffire,steazzalini/saffire,Drarok/saffire,jaytaph/saffire,jaytaph/saffire,steazzalini/saffire,saffire/saffire,Drarok/saffire,Drarok/saffire,Drarok/saffire
df77843052134b05dbabd4cae9d56a7de298a82e
elog/thread_win32.h
elog/thread_win32.h
#ifndef ELOG_THREAD_WIN32_H_ #define ELOG_THREAD_WIN32_H_ #include <functional> #include <process.h> #include <windows.h> #include "util.h" namespace LOG { class ScopedThreadHandle : NonCopyable { public: explicit ScopedThreadHandle(HANDLE handle = NULL) : handle_(handle) { } ~ScopedThreadHandle() { Reset(); } HANDLE Get() const { return handle_; } void Reset(HANDLE handle = NULL) { if (handle_) { CloseHandle(handle_); } handle_ = handle; } private: HANDLE handle_; }; class Thread : NonCopyable { public: Thread() { } template <typename ThreadBody> explicit Thread(ThreadBody thread_body) : thread_body_(thread_body) { } ~Thread() { } template <typename ThreadBody> void set_thread_body(ThreadBody thread_body) { thread_body_ = thread_body; } void Run() { HANDLE handle = reinterpret_cast<HANDLE>( _beginthreadex(NULL, 0, StaticThreadBody, NULL, 0, NULL)); thread_handle_.Reset(handle); } void Detach() { // do nothing } void Join() { HANDLE handle = thread_handle_.Get(); if (handle) { WaitForSingleObject(handle, INFINITE); } } private: static int WINAPI StaticThreadBody(LPVOID self_ptr) { Thread& self = *reinterpret_cast<Thread*>(self_ptr); self.thread_body_(); return NULL; } ScopedThreadHandle thread_handle_; std::tr1::function<void ()> thread_body_; }; } // namespace LOG #endif // ELOG_THREAD_WIN32_H_
Add Thread support on Win32 API
Add Thread support on Win32 API
C
mit
beam2d/elog,beam2d/elog,beam2d/elog
e1120b1d6a22c36f5deb12643e462e57a8fc3171
C/Input.h
C/Input.h
#include <stdio.h> #include <stdlib.h> char* Input(char *buffer){ unsigned int size = 10; unsigned int len = 0; int ch; buffer = malloc(sizeof(char)*size); if(!buffer){ printf("Error allocating memory"); return buffer; } while((ch = fgetc(stdin)) != EOF && ch != '\n'){ buffer[len] = ch; if(len == size-1){ size = size << 4; buffer = realloc(buffer,sizeof(char)*size); if(!buffer){ printf("Error reallocating memory"); return buffer; } } len++; } buffer[len] = '\0'; buffer = realloc(buffer,sizeof(buffer)); return buffer; }
Fix OOB indexing, buffer check, realloc size
Fix OOB indexing, buffer check, realloc size
C
mit
mita4829/EspressoMachine,mita4829/EspressoMachine
f3301cf50b291cd4160d67740f54bd8a03d2e74b
util/rvalue_wrapper.h
util/rvalue_wrapper.h
/** * rvalue_wrapper.h */ #ifndef UTIL_RVALUE_WRAPPER_H_ #define UTIL_RVALUE_WRAPPER_H_ /** * A wrapper for holding and passing rvalues through std::bind. The rvalue wrapped will be stored * inside the wrapper until the functor returned by std::bind is invoked, at when the stored rvalue * will be moved from. The functor can be invoked ONLY ONCE. */ template<typename T> struct RValueWrapper { public: template<typename = typename std::enable_if<std::is_rvalue_reference<T&&>::value>::type> explicit RValueWrapper(T &&t) noexcept : t(std::move(t)) { } RValueWrapper(const RValueWrapper &rhs) = default; RValueWrapper(RValueWrapper &&rhs) = default; RValueWrapper& operator=(const RValueWrapper &rhs) = default; RValueWrapper& operator=(RValueWrapper &&rhs) = default; template <class ...Args> T &&operator()(Args ...) { return std::move(t); } private: T t; }; namespace std { template<typename T> struct is_bind_expression<RValueWrapper<T>> : std::true_type { }; } template<typename T, typename = typename std::enable_if<std::is_rvalue_reference<T&&>::value>::type> RValueWrapper<T> rval(T &&t) { return RValueWrapper<T>(std::move(t)); } template<typename T> RValueWrapper<T> rval(T &t) { return RValueWrapper<T>(T(t)); } #endif /* UTIL_RVALUE_WRAPPER_H_ */
Add RValueWrapper, a wrapper for passing rvalue through std::bind and allow binding to function with rvalue reference parameters.
Add RValueWrapper, a wrapper for passing rvalue through std::bind and allow binding to function with rvalue reference parameters.
C
bsd-2-clause
jasonszang/concurrency-cpp11,jasonszang/concurrency-cpp11
44757e8d5b49d27a1dce19039100b9e2d2196ec9
DocFormats/DFCommon.h
DocFormats/DFCommon.h
// Copyright 2012-2014 UX Productivity Pty Ltd // // 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. #ifndef DocFormats_DFCommon_h #define DocFormats_DFCommon_h #include <assert.h> #include <ctype.h> #include <dirent.h> #include <errno.h> #include <fcntl.h> #include <iconv.h> #include <limits.h> #include <math.h> #include <stdarg.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #endif
// Copyright 2012-2014 UX Productivity Pty Ltd // // 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. #ifndef DocFormats_DFCommon_h #define DocFormats_DFCommon_h #include "DFTypes.h" #include <assert.h> #include <ctype.h> #include <errno.h> #include <fcntl.h> #include <iconv.h> #include <limits.h> #include <math.h> #include <stdarg.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #ifdef WIN32 #include <io.h> #define open _open #define creat _creat #define read _read #define write _write #define close _close #define snprintf _snprintf #define vsnprintf _vsnprintf #define strcasecmp _stricmp #define strncasecmp _strnicmp #define strdup _strdup #else // not WIN32 #include <dirent.h> #include <unistd.h> #endif #endif
Add macros for common functions like strdup
Win32: Add macros for common functions like strdup For some reason, Microsoft have an aversion to including functions like strdup, open, read, write, and close that are part of the POSIX standard, but still keep them present with a _ prefix. This commit adds #defines for some of these functions so that we can keep using the existing code without having to add all lots of ugly underscores everywhere.
C
apache-2.0
corinthia/corinthia-docformats,apache/incubator-corinthia,corinthia/corinthia-docformats,apache/incubator-corinthia,corinthia/corinthia-docformats,apache/incubator-corinthia,apache/incubator-corinthia,apache/incubator-corinthia,apache/incubator-corinthia,corinthia/corinthia-docformats,corinthia/corinthia-docformats,apache/incubator-corinthia
3f683f5b6f6e77a8453bc578c330d08f57284331
src/vistk/image/instantiate.h
src/vistk/image/instantiate.h
/*ckwg +5 * Copyright 2011-2012 by Kitware, Inc. All Rights Reserved. Please refer to * KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, * Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. */ #include <boost/cstdint.hpp> #define VISTK_IMAGE_INSTANTIATE(cls) \ template class cls<bool>; \ template class cls<uint8_t>; \ template class cls<float>; \ template class cls<double>
/*ckwg +5 * Copyright 2011-2012 by Kitware, Inc. All Rights Reserved. Please refer to * KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, * Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. */ #ifndef VISTK_IMAGE_INSTANTIATE_H #define VISTK_IMAGE_INSTANTIATE_H #include <boost/cstdint.hpp> /** * \file image/instantiate.h * * \brief Types for instantiation of image library templates. */ #define VISTK_IMAGE_INSTANTIATE_INT(cls) \ template class cls<bool>; \ template class cls<uint8_t> #define VISTK_IMAGE_INSTANTIATE_FLOAT(cls) \ template class cls<float>; \ template class cls<double> #define VISTK_IMAGE_INSTANTIATE(cls) \ VISTK_IMAGE_INSTANTIATE_INT(cls); \ VISTK_IMAGE_INSTANTIATE_FLOAT(cls) #endif // VISTK_IMAGE_INSTANTIATE_H
Split int from float instantiations
Split int from float instantiations
C
bsd-3-clause
linus-sherrill/sprokit,Kitware/sprokit,linus-sherrill/sprokit,Kitware/sprokit,linus-sherrill/sprokit,Kitware/sprokit,linus-sherrill/sprokit,mathstuf/sprokit,mathstuf/sprokit,mathstuf/sprokit,mathstuf/sprokit,Kitware/sprokit
e2e0d27071f3314068b5adf990d54dd978ce966b
libctest.h
libctest.h
#ifndef __testing__ #define __testing__ extern void ct_init(const char * module_name); extern void ct_report(const char * test_name, int success); extern void ct_terminate(void); #endif
#ifndef __ctest__ #define __ctest__ extern void ct_init(const char * module_name); extern void ct_report(const char * test_name, int success); extern void ct_print_stats(void); extern void ct_terminate(void); extern void ct_print_stats_and_terminate(void); #endif
Split statistics printing from memory cleanup
Split statistics printing from memory cleanup Created ct_print_stats that outputs stats without freeing memory, and ct_print_stats_and_terminate which does both, along with ct_terminate which only frees memory.
C
unlicense
Mikko-Finell/ctest
d09c68789741abff55f51ac60a8600d9ee0264cc
tensorflow/core/platform/init_main.h
tensorflow/core/platform/init_main.h
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. 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. ==============================================================================*/ #ifndef TENSORFLOW_CORE_PLATFORM_INIT_MAIN_H_ #define TENSORFLOW_CORE_PLATFORM_INIT_MAIN_H_ namespace tensorflow { namespace port { // Platform-specific initialization routine that may be invoked by a // main() program that uses TensorFlow. // // Default implementation does nothing. void InitMain(const char* usage, int* argc, char*** argv); } // namespace port } // namespace tensorflow #endif // TENSORFLOW_CORE_PLATFORM_INIT_MAIN_H_
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. 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. ==============================================================================*/ #ifndef TENSORFLOW_CORE_PLATFORM_INIT_MAIN_H_ #define TENSORFLOW_CORE_PLATFORM_INIT_MAIN_H_ namespace tensorflow { namespace port { // Platform-specific initialization routine that should be invoked by a // main() program that uses TensorFlow. // This performs necessary initialization on some platforms; TensorFlow // may not work unless it has been called. void InitMain(const char* usage, int* argc, char*** argv); } // namespace port } // namespace tensorflow #endif // TENSORFLOW_CORE_PLATFORM_INIT_MAIN_H_
Clarify the need for calling tensorflow::port::InitMain() before using the rest of TensorFlow.
Clarify the need for calling tensorflow::port::InitMain() before using the rest of TensorFlow. PiperOrigin-RevId: 219185259
C
apache-2.0
brchiu/tensorflow,freedomtan/tensorflow,chemelnucfin/tensorflow,freedomtan/tensorflow,DavidNorman/tensorflow,dongjoon-hyun/tensorflow,ppwwyyxx/tensorflow,ghchinoy/tensorflow,cxxgtxy/tensorflow,karllessard/tensorflow,DavidNorman/tensorflow,asimshankar/tensorflow,aam-at/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,Bismarrck/tensorflow,kevin-coder/tensorflow-fork,jbedorf/tensorflow,apark263/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,aam-at/tensorflow,cxxgtxy/tensorflow,petewarden/tensorflow,hfp/tensorflow-xsmm,renyi533/tensorflow,chemelnucfin/tensorflow,gautam1858/tensorflow,kevin-coder/tensorflow-fork,brchiu/tensorflow,ageron/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,davidzchen/tensorflow,chemelnucfin/tensorflow,Bismarrck/tensorflow,frreiss/tensorflow-fred,gunan/tensorflow,seanli9jan/tensorflow,apark263/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,xzturn/tensorflow,annarev/tensorflow,seanli9jan/tensorflow,yongtang/tensorflow,petewarden/tensorflow,ppwwyyxx/tensorflow,ghchinoy/tensorflow,gautam1858/tensorflow,aam-at/tensorflow,asimshankar/tensorflow,paolodedios/tensorflow,dongjoon-hyun/tensorflow,arborh/tensorflow,seanli9jan/tensorflow,aldian/tensorflow,brchiu/tensorflow,chemelnucfin/tensorflow,jendap/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,jbedorf/tensorflow,DavidNorman/tensorflow,chemelnucfin/tensorflow,Intel-Corporation/tensorflow,Intel-tensorflow/tensorflow,Bismarrck/tensorflow,gunan/tensorflow,freedomtan/tensorflow,aldian/tensorflow,cxxgtxy/tensorflow,asimshankar/tensorflow,gautam1858/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,brchiu/tensorflow,frreiss/tensorflow-fred,ppwwyyxx/tensorflow,jendap/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,ppwwyyxx/tensorflow,DavidNorman/tensorflow,arborh/tensorflow,gunan/tensorflow,arborh/tensorflow,petewarden/tensorflow,tensorflow/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Bismarrck/tensorflow,Intel-tensorflow/tensorflow,sarvex/tensorflow,alsrgv/tensorflow,karllessard/tensorflow,alsrgv/tensorflow,davidzchen/tensorflow,xzturn/tensorflow,theflofly/tensorflow,sarvex/tensorflow,seanli9jan/tensorflow,seanli9jan/tensorflow,ageron/tensorflow,xzturn/tensorflow,theflofly/tensorflow,freedomtan/tensorflow,ppwwyyxx/tensorflow,hfp/tensorflow-xsmm,kevin-coder/tensorflow-fork,chemelnucfin/tensorflow,jendap/tensorflow,asimshankar/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,jbedorf/tensorflow,seanli9jan/tensorflow,ghchinoy/tensorflow,jendap/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,frreiss/tensorflow-fred,sarvex/tensorflow,frreiss/tensorflow-fred,renyi533/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,DavidNorman/tensorflow,hfp/tensorflow-xsmm,tensorflow/tensorflow-pywrap_saved_model,theflofly/tensorflow,seanli9jan/tensorflow,paolodedios/tensorflow,asimshankar/tensorflow,DavidNorman/tensorflow,jendap/tensorflow,renyi533/tensorflow,Bismarrck/tensorflow,yongtang/tensorflow,frreiss/tensorflow-fred,kevin-coder/tensorflow-fork,paolodedios/tensorflow,tensorflow/tensorflow,jendap/tensorflow,dongjoon-hyun/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,theflofly/tensorflow,davidzchen/tensorflow,asimshankar/tensorflow,xzturn/tensorflow,brchiu/tensorflow,Intel-tensorflow/tensorflow,apark263/tensorflow,hehongliang/tensorflow,gunan/tensorflow,annarev/tensorflow,frreiss/tensorflow-fred,gunan/tensorflow,petewarden/tensorflow,annarev/tensorflow,freedomtan/tensorflow,dongjoon-hyun/tensorflow,gautam1858/tensorflow,renyi533/tensorflow,renyi533/tensorflow,aldian/tensorflow,chemelnucfin/tensorflow,aldian/tensorflow,annarev/tensorflow,kevin-coder/tensorflow-fork,davidzchen/tensorflow,Intel-Corporation/tensorflow,jbedorf/tensorflow,jbedorf/tensorflow,davidzchen/tensorflow,kevin-coder/tensorflow-fork,frreiss/tensorflow-fred,ghchinoy/tensorflow,alsrgv/tensorflow,annarev/tensorflow,gautam1858/tensorflow,asimshankar/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Bismarrck/tensorflow,kevin-coder/tensorflow-fork,Bismarrck/tensorflow,freedomtan/tensorflow,ppwwyyxx/tensorflow,kevin-coder/tensorflow-fork,yongtang/tensorflow,Intel-tensorflow/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,hfp/tensorflow-xsmm,adit-chandra/tensorflow,dongjoon-hyun/tensorflow,ageron/tensorflow,sarvex/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,seanli9jan/tensorflow,ppwwyyxx/tensorflow,jhseu/tensorflow,petewarden/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gunan/tensorflow,DavidNorman/tensorflow,ageron/tensorflow,annarev/tensorflow,sarvex/tensorflow,aldian/tensorflow,jbedorf/tensorflow,jbedorf/tensorflow,Intel-tensorflow/tensorflow,arborh/tensorflow,brchiu/tensorflow,renyi533/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,renyi533/tensorflow,hfp/tensorflow-xsmm,Intel-tensorflow/tensorflow,dongjoon-hyun/tensorflow,ageron/tensorflow,adit-chandra/tensorflow,brchiu/tensorflow,arborh/tensorflow,theflofly/tensorflow,arborh/tensorflow,Intel-Corporation/tensorflow,hfp/tensorflow-xsmm,Intel-tensorflow/tensorflow,gunan/tensorflow,aam-at/tensorflow,theflofly/tensorflow,alsrgv/tensorflow,brchiu/tensorflow,gunan/tensorflow,tensorflow/tensorflow,theflofly/tensorflow,davidzchen/tensorflow,apark263/tensorflow,aam-at/tensorflow,ppwwyyxx/tensorflow,jendap/tensorflow,jbedorf/tensorflow,hfp/tensorflow-xsmm,Intel-Corporation/tensorflow,arborh/tensorflow,petewarden/tensorflow,adit-chandra/tensorflow,ghchinoy/tensorflow,jbedorf/tensorflow,karllessard/tensorflow,apark263/tensorflow,jhseu/tensorflow,hehongliang/tensorflow,frreiss/tensorflow-fred,cxxgtxy/tensorflow,frreiss/tensorflow-fred,chemelnucfin/tensorflow,yongtang/tensorflow,alsrgv/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,asimshankar/tensorflow,aam-at/tensorflow,jhseu/tensorflow,hehongliang/tensorflow,asimshankar/tensorflow,yongtang/tensorflow,theflofly/tensorflow,adit-chandra/tensorflow,Bismarrck/tensorflow,karllessard/tensorflow,freedomtan/tensorflow,ageron/tensorflow,seanli9jan/tensorflow,jendap/tensorflow,cxxgtxy/tensorflow,Intel-Corporation/tensorflow,arborh/tensorflow,hehongliang/tensorflow,Intel-Corporation/tensorflow,freedomtan/tensorflow,Bismarrck/tensorflow,gunan/tensorflow,jbedorf/tensorflow,yongtang/tensorflow,chemelnucfin/tensorflow,dongjoon-hyun/tensorflow,petewarden/tensorflow,jbedorf/tensorflow,alsrgv/tensorflow,sarvex/tensorflow,apark263/tensorflow,paolodedios/tensorflow,xzturn/tensorflow,apark263/tensorflow,ageron/tensorflow,theflofly/tensorflow,gautam1858/tensorflow,davidzchen/tensorflow,alsrgv/tensorflow,annarev/tensorflow,aldian/tensorflow,dongjoon-hyun/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,ghchinoy/tensorflow,brchiu/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,jhseu/tensorflow,xzturn/tensorflow,apark263/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,Bismarrck/tensorflow,hehongliang/tensorflow,seanli9jan/tensorflow,xzturn/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,paolodedios/tensorflow,ageron/tensorflow,apark263/tensorflow,arborh/tensorflow,jendap/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,kevin-coder/tensorflow-fork,asimshankar/tensorflow,adit-chandra/tensorflow,aldian/tensorflow,jhseu/tensorflow,davidzchen/tensorflow,hfp/tensorflow-xsmm,apark263/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,brchiu/tensorflow,gunan/tensorflow,cxxgtxy/tensorflow,petewarden/tensorflow,yongtang/tensorflow,karllessard/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,hfp/tensorflow-xsmm,jhseu/tensorflow,tensorflow/tensorflow-pywrap_saved_model,xzturn/tensorflow,alsrgv/tensorflow,tensorflow/tensorflow,aam-at/tensorflow,Intel-Corporation/tensorflow,xzturn/tensorflow,karllessard/tensorflow,aam-at/tensorflow,ageron/tensorflow,renyi533/tensorflow,davidzchen/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,chemelnucfin/tensorflow,ghchinoy/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,dongjoon-hyun/tensorflow,karllessard/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-pywrap_saved_model,arborh/tensorflow,dongjoon-hyun/tensorflow,asimshankar/tensorflow,paolodedios/tensorflow,alsrgv/tensorflow,renyi533/tensorflow,ghchinoy/tensorflow,yongtang/tensorflow,hfp/tensorflow-xsmm,gautam1858/tensorflow,yongtang/tensorflow,DavidNorman/tensorflow,hfp/tensorflow-xsmm,apark263/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,renyi533/tensorflow,ageron/tensorflow,ageron/tensorflow,adit-chandra/tensorflow,jhseu/tensorflow,renyi533/tensorflow,jhseu/tensorflow,arborh/tensorflow,annarev/tensorflow,kevin-coder/tensorflow-fork,ageron/tensorflow,DavidNorman/tensorflow,gautam1858/tensorflow,cxxgtxy/tensorflow,theflofly/tensorflow,gautam1858/tensorflow,adit-chandra/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,jhseu/tensorflow,tensorflow/tensorflow-pywrap_saved_model,dongjoon-hyun/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow,alsrgv/tensorflow,Bismarrck/tensorflow,kevin-coder/tensorflow-fork,adit-chandra/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow,cxxgtxy/tensorflow,jhseu/tensorflow,tensorflow/tensorflow,alsrgv/tensorflow,chemelnucfin/tensorflow,seanli9jan/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,xzturn/tensorflow,davidzchen/tensorflow,DavidNorman/tensorflow,theflofly/tensorflow,adit-chandra/tensorflow,ppwwyyxx/tensorflow,hehongliang/tensorflow,ghchinoy/tensorflow,brchiu/tensorflow,sarvex/tensorflow,hehongliang/tensorflow,jendap/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,alsrgv/tensorflow,frreiss/tensorflow-fred,ppwwyyxx/tensorflow,theflofly/tensorflow,ppwwyyxx/tensorflow,DavidNorman/tensorflow,gunan/tensorflow,jbedorf/tensorflow,freedomtan/tensorflow,ghchinoy/tensorflow,karllessard/tensorflow,arborh/tensorflow,aldian/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,annarev/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,renyi533/tensorflow,jendap/tensorflow,annarev/tensorflow,xzturn/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,gunan/tensorflow
4d1a3e0b677dd00a5233ea50d944b11079468483
ports/gtk-webkit/next-gtk-webkit.c
ports/gtk-webkit/next-gtk-webkit.c
/* Copyright © 2018-2019 Atlas Engineer LLC. Use of this file is governed by the license that can be found in LICENSE. */ #include <gtk/gtk.h> #include <stdlib.h> #include "server.h" static void on_name_acquired(GDBusConnection *connection, const gchar *name, gpointer user_data) { g_message("Starting platform port"); } static void on_name_lost(GDBusConnection *_connection, const gchar *_name, gpointer _user_data) { g_message("Platform port disconnected"); // TODO: Call stop_server here? exit(1); } int main(int argc, char *argv[]) { // TODO: Use GtkApplication? guint owner_id = g_bus_own_name(G_BUS_TYPE_SESSION, PLATFORM_PORT_NAME, G_BUS_NAME_OWNER_FLAGS_NONE, start_server, on_name_acquired, on_name_lost, NULL, NULL); // TODO: Start the RPC server first? If GUI is started, then we can // report RPC startup issues graphically. gtk_main(); stop_server(); g_bus_unown_name(owner_id); return EXIT_SUCCESS; }
/* Copyright © 2018-2019 Atlas Engineer LLC. Use of this file is governed by the license that can be found in LICENSE. */ #include <gtk/gtk.h> #include <stdlib.h> #include "server.h" static void on_name_acquired(GDBusConnection *connection, const gchar *name, gpointer user_data) { g_message("Starting platform port"); } static void on_name_lost(GDBusConnection *_connection, const gchar *_name, gpointer _user_data) { g_message("Platform port disconnected"); // TODO: Call stop_server here? exit(1); } int main(int argc, char *argv[]) { // It's safer to initialize GTK before the server is started. In particular, // without it the program would crash if hardware acceleration is disabled // (e.g. with the WEBKIT_DISABLE_COMPOSITING_MODE=1 environment variable). gtk_init(NULL, NULL); // TODO: Use GtkApplication? guint owner_id = g_bus_own_name(G_BUS_TYPE_SESSION, PLATFORM_PORT_NAME, G_BUS_NAME_OWNER_FLAGS_NONE, start_server, on_name_acquired, on_name_lost, NULL, NULL); // TODO: Start the RPC server first? If GUI is started, then we can // report RPC startup issues graphically. gtk_main(); stop_server(); g_bus_unown_name(owner_id); return EXIT_SUCCESS; }
Fix crash when hardware acceleration is disabled.
ports/gtk-webkit: Fix crash when hardware acceleration is disabled.
C
bsd-3-clause
jmercouris/NeXT,jmercouris/NeXT
184509531a7477bfa89bc075e3873a2a504a9448
tests/gc_instrumentation/gc_noinst.c
tests/gc_instrumentation/gc_noinst.c
/* * Copyright 2010 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can * be found in the LICENSE file. */ /* * gc_noinst.c : Functions that shouldn't be instrumented by the compiler */ __thread unsigned int thread_suspend_if_needed_count = 0; /* TODO(elijahtaylor): This will need to be changed * when the compiler instrumentation changes. */ void __nacl_suspend_thread_if_needed() { thread_suspend_if_needed_count++; }
/* * Copyright (c) 2011 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /* * gc_noinst.c : Functions that shouldn't be instrumented by the compiler */ __thread unsigned int thread_suspend_if_needed_count = 0; /* TODO(elijahtaylor): This will need to be changed * when the compiler instrumentation changes. */ volatile int __nacl_thread_suspension_needed = 1; void __nacl_suspend_thread_if_needed() { thread_suspend_if_needed_count++; }
Fix the gc_instrumentation test on toolchain bots.
Fix the gc_instrumentation test on toolchain bots. The compiler now inserts explicit references to the suspension flag, which then fails to link when the flag is not present. BUG=none TEST=run_gc_instrumentation_test # with freshly uploaded toolchain Review URL: http://codereview.chromium.org/8336018 git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@6962 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
C
bsd-3-clause
nacl-webkit/native_client,nacl-webkit/native_client,sbc100/native_client,sbc100/native_client,nacl-webkit/native_client,sbc100/native_client,nacl-webkit/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,nacl-webkit/native_client
6cfdf1a8a98e6fd02227724fb6cab225671cb016
iOS/FBDefines/FBMacros.h
iOS/FBDefines/FBMacros.h
/* * Copyright (c) 2004-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the LICENSE * file in the root directory of this source tree. * */ #ifndef FB_SK_MACROS_H #define FB_SK_MACROS_H #define FB_LINK_REQUIRE_(NAME, UNIQUE) #define FB_LINKABLE(NAME) #define FB_LINK_REQUIRE(NAME) #endif
/* * Copyright (c) 2004-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the LICENSE * file in the root directory of this source tree. * */ #ifndef FB_SK_MACROS_H #define FB_SK_MACROS_H #define FB_LINK_REQUIRE_(NAME) #define FB_LINKABLE(NAME) #define FB_LINK_REQUIRE(NAME) #endif
Delete second argument to FB_LINK_REQUIRE_
Delete second argument to FB_LINK_REQUIRE_ Summary: It is now always NAME. Reviewed By: adamjernst Differential Revision: D13577665 fbshipit-source-id: 9d9330fd17b7e214ef807760d0314c34bd06ebd5
C
mit
facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper
b41ede1d9b93268b96e686ca3299dd20624a9812
strdump.c
strdump.c
/* strdump.c -- similar to hexdump but with ascii strings */ #include <stdio.h> #include <string.h> int strdump(FILE *fo, FILE *fi) { int c, n; n = 0; fputs("\"", fo); c = fgetc(fi); while (c != -1) { if (c == '\n' || c == '\r') fputs("\\n\"\n\"", fo); else putc(c, fo); c = fgetc(fi); n ++; } fputs("\"\n", fo); return n; } int main(int argc, char **argv) { FILE *fo; FILE *fi; char name[256]; char *realname; char *p; int i, len; if (argc < 3) { fprintf(stderr, "usage: hexdump output.c input.dat\n"); return 1; } fo = fopen(argv[1], "wb"); if (!fo) { fprintf(stderr, "hexdump: could not open output file\n"); return 1; } for (i = 2; i < argc; i++) { fi = fopen(argv[i], "rb"); if (!fi) { fprintf(stderr, "hexdump: could not open input file\n"); return 1; } realname = strrchr(argv[i], '/'); if (!realname) realname = strrchr(argv[i], '\\'); if (realname) realname ++; else realname = argv[i]; strcpy(name, argv[i]); p = name; while (*p) { if ((*p == '/') || (*p == '.') || (*p == '\\') || (*p == '-')) *p = '_'; p ++; } fprintf(fo, "const char %s_name[] = \"%s\";\n", name, realname); fprintf(fo, "const char %s_buf[] = {\n", name); len = strdump(fo, fi); fprintf(fo, "};\n"); fprintf(fo, "const int %s_len = %d;\n", name, len); fprintf(fo, "\n"); fclose(fi); } return 0; }
Add a tool similar to hexdump, but for text files.
Add a tool similar to hexdump, but for text files.
C
agpl-3.0
lustersir/MuPDF,hackqiang/mupdf,TamirEvan/mupdf,lolo32/mupdf-mirror,FabriceSalvaire/mupdf-cmake,ylixir/mupdf,ziel/mupdf,geetakaur/NewApps,PuzzleFlow/mupdf,MokiMobility/muPDF,asbloomf/mupdf,hjiayz/forkmupdf,tribals/mupdf,crow-misia/mupdf,FabriceSalvaire/mupdf-cmake,TamirEvan/mupdf,MokiMobility/muPDF,xiangxw/mupdf,FabriceSalvaire/mupdf-v1.3,flipstudio/MuPDF,ylixir/mupdf,seagullua/MuPDF,zeniko/mupdf,poor-grad-student/mupdf,hxx0215/MuPDFMirror,andyhan/mupdf,seagullua/MuPDF,cgogolin/penandpdf,clchiou/mupdf,loungeup/mupdf,wzhsunn/mupdf,zeniko/mupdf,michaelcadilhac/pdfannot,wzhsunn/mupdf,derek-watson/mupdf,TamirEvan/mupdf,muennich/mupdf,PuzzleFlow/mupdf,robamler/mupdf-nacl,robamler/mupdf-nacl,TamirEvan/mupdf,tophyr/mupdf,TamirEvan/mupdf,lamemate/mupdf,asbloomf/mupdf,tophyr/mupdf,zeniko/mupdf,lustersir/MuPDF,crow-misia/mupdf,seagullua/MuPDF,hjiayz/forkmupdf,zeniko/mupdf,benoit-pierre/mupdf,michaelcadilhac/pdfannot,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,wzhsunn/mupdf,andyhan/mupdf,kobolabs/mupdf,poor-grad-student/mupdf,andyhan/mupdf,benoit-pierre/mupdf,derek-watson/mupdf,loungeup/mupdf,nqv/mupdf,hackqiang/mupdf,nqv/mupdf,FabriceSalvaire/mupdf-v1.3,lolo32/mupdf-mirror,muennich/mupdf,wild0/opened_mupdf,hjiayz/forkmupdf,michaelcadilhac/pdfannot,derek-watson/mupdf,kobolabs/mupdf,github201407/MuPDF,Kalp695/mupdf,TamirEvan/mupdf,ArtifexSoftware/mupdf,crow-misia/mupdf,issuestand/mupdf,asbloomf/mupdf,hxx0215/MuPDFMirror,kobolabs/mupdf,benoit-pierre/mupdf,isavin/humblepdf,andyhan/mupdf,ArtifexSoftware/mupdf,PuzzleFlow/mupdf,poor-grad-student/mupdf,seagullua/MuPDF,benoit-pierre/mupdf,isavin/humblepdf,muennich/mupdf,michaelcadilhac/pdfannot,ylixir/mupdf,github201407/MuPDF,wild0/opened_mupdf,loungeup/mupdf,Kalp695/mupdf,lamemate/mupdf,andyhan/mupdf,wild0/opened_mupdf,sebras/mupdf,robamler/mupdf-nacl,robamler/mupdf-nacl,Kalp695/mupdf,clchiou/mupdf,zeniko/mupdf,ArtifexSoftware/mupdf,robamler/mupdf-nacl,xiangxw/mupdf,poor-grad-student/mupdf,lolo32/mupdf-mirror,sebras/mupdf,lustersir/MuPDF,xiangxw/mupdf,issuestand/mupdf,issuestand/mupdf,isavin/humblepdf,samturneruk/mupdf_secure_android,tophyr/mupdf,flipstudio/MuPDF,PuzzleFlow/mupdf,wild0/opened_mupdf,Kalp695/mupdf,andyhan/mupdf,asbloomf/mupdf,ziel/mupdf,knielsen/mupdf,ziel/mupdf,fluks/mupdf-x11-bookmarks,kobolabs/mupdf,samturneruk/mupdf_secure_android,ccxvii/mupdf,lolo32/mupdf-mirror,tribals/mupdf,cgogolin/penandpdf,kobolabs/mupdf,nqv/mupdf,knielsen/mupdf,derek-watson/mupdf,samturneruk/mupdf_secure_android,asbloomf/mupdf,knielsen/mupdf,ziel/mupdf,samturneruk/mupdf_secure_android,wild0/opened_mupdf,isavin/humblepdf,Kalp695/mupdf,muennich/mupdf,tribals/mupdf,github201407/MuPDF,nqv/mupdf,muennich/mupdf,knielsen/mupdf,cgogolin/penandpdf,wild0/opened_mupdf,FabriceSalvaire/mupdf-cmake,Kalp695/mupdf,nqv/mupdf,xiangxw/mupdf,tribals/mupdf,hackqiang/mupdf,wzhsunn/mupdf,tribals/mupdf,fluks/mupdf-x11-bookmarks,Kalp695/mupdf,ccxvii/mupdf,zeniko/mupdf,clchiou/mupdf,samturneruk/mupdf_secure_android,xiangxw/mupdf,TamirEvan/mupdf,MokiMobility/muPDF,tophyr/mupdf,FabriceSalvaire/mupdf-cmake,fluks/mupdf-x11-bookmarks,PuzzleFlow/mupdf,lustersir/MuPDF,isavin/humblepdf,geetakaur/NewApps,robamler/mupdf-nacl,poor-grad-student/mupdf,fluks/mupdf-x11-bookmarks,flipstudio/MuPDF,geetakaur/NewApps,seagullua/MuPDF,github201407/MuPDF,sebras/mupdf,ArtifexSoftware/mupdf,flipstudio/MuPDF,hxx0215/MuPDFMirror,isavin/humblepdf,loungeup/mupdf,clchiou/mupdf,ccxvii/mupdf,issuestand/mupdf,knielsen/mupdf,tribals/mupdf,github201407/MuPDF,kobolabs/mupdf,benoit-pierre/mupdf,ArtifexSoftware/mupdf,michaelcadilhac/pdfannot,FabriceSalvaire/mupdf-v1.3,wzhsunn/mupdf,hxx0215/MuPDFMirror,xiangxw/mupdf,lamemate/mupdf,flipstudio/MuPDF,tophyr/mupdf,nqv/mupdf,sebras/mupdf,MokiMobility/muPDF,clchiou/mupdf,loungeup/mupdf,PuzzleFlow/mupdf,crow-misia/mupdf,derek-watson/mupdf,PuzzleFlow/mupdf,crow-misia/mupdf,ylixir/mupdf,hackqiang/mupdf,lustersir/MuPDF,ziel/mupdf,fluks/mupdf-x11-bookmarks,hxx0215/MuPDFMirror,muennich/mupdf,FabriceSalvaire/mupdf-v1.3,ylixir/mupdf,sebras/mupdf,derek-watson/mupdf,ylixir/mupdf,isavin/humblepdf,FabriceSalvaire/mupdf-v1.3,asbloomf/mupdf,ccxvii/mupdf,fluks/mupdf-x11-bookmarks,lolo32/mupdf-mirror,lolo32/mupdf-mirror,cgogolin/penandpdf,wild0/opened_mupdf,benoit-pierre/mupdf,poor-grad-student/mupdf,fluks/mupdf-x11-bookmarks,FabriceSalvaire/mupdf-v1.3,lustersir/MuPDF,MokiMobility/muPDF,flipstudio/MuPDF,hackqiang/mupdf,cgogolin/penandpdf,issuestand/mupdf,lamemate/mupdf,geetakaur/NewApps,FabriceSalvaire/mupdf-cmake,lamemate/mupdf,hjiayz/forkmupdf,clchiou/mupdf,hxx0215/MuPDFMirror,knielsen/mupdf,lolo32/mupdf-mirror,github201407/MuPDF,seagullua/MuPDF,issuestand/mupdf,ziel/mupdf,MokiMobility/muPDF,geetakaur/NewApps,hjiayz/forkmupdf,hjiayz/forkmupdf,ccxvii/mupdf,muennich/mupdf,michaelcadilhac/pdfannot,lamemate/mupdf,ArtifexSoftware/mupdf,wzhsunn/mupdf,FabriceSalvaire/mupdf-cmake,xiangxw/mupdf,TamirEvan/mupdf,ccxvii/mupdf,cgogolin/penandpdf,kobolabs/mupdf,samturneruk/mupdf_secure_android,tophyr/mupdf,loungeup/mupdf,sebras/mupdf,hackqiang/mupdf,geetakaur/NewApps,crow-misia/mupdf
4903f961a88751e684f703aaf08511cd5c486a84
wangle/concurrent/FiberIOExecutor.h
wangle/concurrent/FiberIOExecutor.h
/* * Copyright (c) 2016, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pragma once #include <folly/experimental/fibers/FiberManagerMap.h> #include <wangle/concurrent/IOExecutor.h> namespace wangle { /** * @class FiberIOExecutor * @brief An IOExecutor that executes funcs under mapped fiber context * * A FiberIOExecutor wraps an IOExecutor, but executes funcs on the FiberManager * mapped to the underlying IOExector's event base. */ class FiberIOExecutor : public IOExecutor { public: explicit FiberIOExecutor( const std::shared_ptr<IOExecutor>& ioExecutor) : ioExecutor_(ioExecutor) {} virtual void add(std::function<void()> f) override { auto eventBase = ioExecutor_->getEventBase(); getFiberManager(*eventBase).add(std::move(f)); } virtual EventBase* getEventBase() override { return ioExecutor_->getEventBase(); } private: std::shared_ptr<IOExecutor> ioExecutor_; }; } // namespace wangle
/* * Copyright (c) 2016, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pragma once #include <folly/fibers/FiberManagerMap.h> #include <wangle/concurrent/IOExecutor.h> namespace wangle { /** * @class FiberIOExecutor * @brief An IOExecutor that executes funcs under mapped fiber context * * A FiberIOExecutor wraps an IOExecutor, but executes funcs on the FiberManager * mapped to the underlying IOExector's event base. */ class FiberIOExecutor : public IOExecutor { public: explicit FiberIOExecutor( const std::shared_ptr<IOExecutor>& ioExecutor) : ioExecutor_(ioExecutor) {} virtual void add(std::function<void()> f) override { auto eventBase = ioExecutor_->getEventBase(); getFiberManager(*eventBase).add(std::move(f)); } virtual EventBase* getEventBase() override { return ioExecutor_->getEventBase(); } private: std::shared_ptr<IOExecutor> ioExecutor_; }; } // namespace wangle
Move fibers out of experimental
Move fibers out of experimental Summary: folly::fibers have been used by mcrouter for more than 2 years, so not really experimental. Reviewed By: pavlo-fb Differential Revision: D3320595 fbshipit-source-id: 68188f92b71a4206d57222993848521ca5437ef5
C
apache-2.0
facebook/wangle,facebook/wangle,facebook/wangle
290c4c88ae6bf7ff5b9f89632f374017a8189e57
include/JSON_checker.h
include/JSON_checker.h
/* JSON_checker.h */ #ifdef JSON_checker_EXPORTS #if defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550) #define JSON_CHECKER_PUBLIC_API __global #elif defined __GNUC__ #define JSON_CHECKER_PUBLIC_API __attribute__ ((visibility("default"))) #elif defined(_MSC_VER) #define JSON_CHECKER_PUBLIC_API __declspec(dllexport) #else /* unknown compiler */ #define JSON_CHECKER_PUBLIC_API #endif #else #if defined(_MSC_VER) #define JSON_CHECKER_PUBLIC_API __declspec(dllimport) #else #define JSON_CHECKER_PUBLIC_API #endif #endif #ifdef __cplusplus extern "C" { #endif JSON_CHECKER_PUBLIC_API int checkUTF8JSON(const unsigned char* data, size_t size); #ifdef __cplusplus } #endif
/* JSON_checker.h */ #pragma once #ifdef JSON_checker_EXPORTS #if defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550) #define JSON_CHECKER_PUBLIC_API __global #elif defined __GNUC__ #define JSON_CHECKER_PUBLIC_API __attribute__ ((visibility("default"))) #elif defined(_MSC_VER) #define JSON_CHECKER_PUBLIC_API __declspec(dllexport) #else /* unknown compiler */ #define JSON_CHECKER_PUBLIC_API #endif #else #if defined(_MSC_VER) #define JSON_CHECKER_PUBLIC_API __declspec(dllimport) #else #define JSON_CHECKER_PUBLIC_API #endif #endif #ifdef __cplusplus extern "C" { #endif JSON_CHECKER_PUBLIC_API int checkUTF8JSON(const unsigned char* data, size_t size); #ifdef __cplusplus } #endif
Fix 'redundant redeclaration' warning due to missing include guard
Fix 'redundant redeclaration' warning due to missing include guard Change-Id: Ifa8273d9e95ec4d16e52fec64db2d3ebd50e4e4b Reviewed-on: http://review.couchbase.org/51690 Tested-by: buildbot <[email protected]> Reviewed-by: Trond Norbye <[email protected]>
C
apache-2.0
vmx/platform,vmx/platform
e17efd0f000b06be56c1608e783e0718c8419076
Hauth/HauthStreamsController.h
Hauth/HauthStreamsController.h
// // HauteStreamsController.h // Hauth // // Created by Rizwan Sattar on 11/7/15. // Copyright © 2015 Rizwan Sattar. All rights reserved. // #import <Foundation/Foundation.h> @interface HauthStreamsController : NSObject @property (strong, nonatomic, nullable) NSInputStream *inputStream; @property (strong, nonatomic, nullable) NSOutputStream *outputStream; @property (assign, nonatomic) NSUInteger streamOpenCount; - (void)openStreams; - (void)closeStreams; - (void)sendData:(nonnull NSData *)data; - (void)handleReceivedData:(nonnull NSData *)data; - (void)handleStreamEnd:(NSStream *)stream; @end
// // HauteStreamsController.h // Hauth // // Created by Rizwan Sattar on 11/7/15. // Copyright © 2015 Rizwan Sattar. All rights reserved. // #import <Foundation/Foundation.h> @interface HauthStreamsController : NSObject @property (strong, nonatomic, nullable) NSInputStream *inputStream; @property (strong, nonatomic, nullable) NSOutputStream *outputStream; @property (assign, nonatomic) NSUInteger streamOpenCount; - (void)openStreams; - (void)closeStreams; - (void)sendData:(nonnull NSData *)data; - (void)handleReceivedData:(nonnull NSData *)data; - (void)handleStreamEnd:(nonnull NSStream *)stream; @end
Fix warning for a missing nonnull
Fix warning for a missing nonnull
C
mit
rsattar/Voucher,rsattar/Voucher,almas73/Voucher,almas73/Voucher
d10cb7ab26c297e650fdf74714f648caaeb37035
src/util.h
src/util.h
#pragma once namespace std { template <typename T> auto cbegin(const T &c) { return c.cbegin(); } template <typename T> auto crbegin(const T &c) { return c.crbegin(); } template <typename T> auto cend(const T &c) { return c.crbegin(); } template <typename T> auto crend(const T &c) { return c.crbegin(); } }
Add {c|r}{begin|end} since gcc doesnt know it.
Add {c|r}{begin|end} since gcc doesnt know it.
C
bsd-3-clause
hannesweisbach/channelcoding
95bc604b9b54258e3ea6d0bed280a4a0a1545d35
base/message_pump_uv.h
base/message_pump_uv.h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_MESSAGE_PUMP_UV_H_ #define BASE_MESSAGE_PUMP_UV_H_ #pragma once #include "base/message_pump.h" #include "base/time.h" #include "base/base_export.h" #include "third_party/libuv/include/uv.h" namespace base { class BASE_EXPORT MessagePumpUV : public MessagePump { public: MessagePumpUV(); virtual ~MessagePumpUV(); // MessagePump methods: virtual void Run(Delegate* delegate) OVERRIDE; virtual void Quit() OVERRIDE; virtual void ScheduleWork() OVERRIDE; virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE; private: // This flag is set to false when Run should return. bool keep_running_; struct uv_async_s wakeup_event_; TimeTicks delayed_work_time_; DISALLOW_COPY_AND_ASSIGN(MessagePumpUV); }; } // namespace base #endif // BASE_MESSAGE_PUMP_UV_H_
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_MESSAGE_PUMP_UV_H_ #define BASE_MESSAGE_PUMP_UV_H_ #pragma once #include "base/message_pump.h" #include "base/time.h" #include "base/base_export.h" #include "third_party/libuv/include/uv.h" namespace base { class BASE_EXPORT MessagePumpUV : public MessagePump { public: MessagePumpUV(); // MessagePump methods: virtual void Run(Delegate* delegate) OVERRIDE; virtual void Quit() OVERRIDE; virtual void ScheduleWork() OVERRIDE; virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE; private: virtual ~MessagePumpUV(); // This flag is set to false when Run should return. bool keep_running_; struct uv_async_s wakeup_event_; TimeTicks delayed_work_time_; DISALLOW_COPY_AND_ASSIGN(MessagePumpUV); }; } // namespace base #endif // BASE_MESSAGE_PUMP_UV_H_
Put destructor to private according to chromium style
Put destructor to private according to chromium style
C
bsd-3-clause
littlstar/chromium.src,ondra-novak/chromium.src,littlstar/chromium.src,littlstar/chromium.src,littlstar/chromium.src,patrickm/chromium.src,ondra-novak/chromium.src,ondra-novak/chromium.src,patrickm/chromium.src,patrickm/chromium.src,littlstar/chromium.src,ondra-novak/chromium.src,ondra-novak/chromium.src,patrickm/chromium.src,ondra-novak/chromium.src,ondra-novak/chromium.src,patrickm/chromium.src,patrickm/chromium.src,patrickm/chromium.src,patrickm/chromium.src,littlstar/chromium.src,ondra-novak/chromium.src,littlstar/chromium.src,ondra-novak/chromium.src,patrickm/chromium.src,littlstar/chromium.src
0792fc5f0e66031338143ee8ed46a91907b37f81
PHPHub/Constants/APIConstant.h
PHPHub/Constants/APIConstant.h
// // APIConstant.h // PHPHub // // Created by Aufree on 9/30/15. // Copyright (c) 2015 ESTGroup. All rights reserved. // #define APIAccessTokenURL [NSString stringWithFormat:@"%@%@", APIBaseURL, @"/oauth/access_token"] #define QiniuUploadTokenIdentifier @"QiniuUploadTokenIdentifier" #if DEBUG #define APIBaseURL @"https://staging_api.phphub.org" #else #define APIBaseURL @"https://api.phphub.org" #endif #define PHPHubHost @"phphub.org" #define PHPHubUrl @"https://phphub.org/" #define GitHubURL @"https://github.com/" #define TwitterURL @"https://twitter.com/" #define ProjectURL @"https://github.com/phphub/phphub-ios" #define AboutPageURL @"https://phphub.org/about" #define ESTGroupURL @"http://est-group.org" #define PHPHubGuide @"https://phphub.org/helps/qr-login-guide" #define PHPHubTopicURL @"https://phphub.org/topics/" #define SinaRedirectURL @"http://sns.whalecloud.com/sina2/callback"
// // APIConstant.h // PHPHub // // Created by Aufree on 9/30/15. // Copyright (c) 2015 ESTGroup. All rights reserved. // #define APIAccessTokenURL [NSString stringWithFormat:@"%@%@", APIBaseURL, @"/oauth/access_token"] #define QiniuUploadTokenIdentifier @"QiniuUploadTokenIdentifier" #if DEBUG #define APIBaseURL @"https://staging_api.phphub.org" #else #define APIBaseURL @"https://api.phphub.org" #endif #define PHPHubHost @"phphub.org" #define PHPHubUrl @"https://phphub.org/" #define GitHubURL @"https://github.com/" #define TwitterURL @"https://twitter.com/" #define ProjectURL @"https://github.com/phphub/phphub-ios" #define AboutPageURL @"https://phphub.org/about" #define ESTGroupURL @"http://est-group.org" #define PHPHubGuide @"http://7xnqwn.com1.z0.glb.clouddn.com/index.html" #define PHPHubTopicURL @"https://phphub.org/topics/" #define SinaRedirectURL @"http://sns.whalecloud.com/sina2/callback"
Change scan to login guide url
Change scan to login guide url
C
mit
Aufree/phphub-ios
a1acae4dc417e3f138a4a924754f376fffed9ef0
src/core/mutex.h
src/core/mutex.h
/** * Mutex management astraction layer */ #ifndef EPYX_MUTEX_H #define EPYX_MUTEX_H #include <pthread.h> #include "exception.h" namespace Epyx { class Mutex { private: pthread_mutex_t mutex; public: inline Mutex () { int status = pthread_mutex_init (&(this->mutex), NULL); if (status) throw FailException("Mutex", "pthread_mutex init error"); } inline ~Mutex () { int status = pthread_mutex_destroy (&(this->mutex)); if (status) throw FailException("Mutex", "pthread_mutex destroy error"); } inline void lock () { int status = pthread_mutex_lock (&(this->mutex)); if (status) throw FailException("Mutex", "pthread_mutex lock error"); } inline void unlock () { int status = pthread_mutex_unlock (&(this->mutex)); if (status) throw FailException("Mutex", "pthread_mutex unlock error"); } }; } #endif /* EPYX_THREAD_H */
/** * Mutex management astraction layer */ #ifndef EPYX_MUTEX_H #define EPYX_MUTEX_H #include <pthread.h> #include "exception.h" namespace Epyx { class Mutex { private: pthread_mutex_t mutex; // Disable copy construction and assignment. Mutex (const Mutex&); const Mutex &operator = (const Mutex&); public: inline Mutex () { int status = pthread_mutex_init (&(this->mutex), NULL); if (status) throw FailException("Mutex", "pthread_mutex init error"); } inline ~Mutex () { int status = pthread_mutex_destroy (&(this->mutex)); if (status) throw FailException("Mutex", "pthread_mutex destroy error"); } inline void lock () { int status = pthread_mutex_lock (&(this->mutex)); if (status) throw FailException("Mutex", "pthread_mutex lock error"); } inline void unlock () { int status = pthread_mutex_unlock (&(this->mutex)); if (status) throw FailException("Mutex", "pthread_mutex unlock error"); } }; } #endif /* EPYX_THREAD_H */
Disable copy on Mutex objects
Disable copy on Mutex objects
C
apache-2.0
Kangz/epyx,Kangz/epyx
fb96a6bf54b67cf147fc1e8b95721be69b031a3c
Future/toImplement/macroClassInfo.c
Future/toImplement/macroClassInfo.c
#define GET_CLASS_INFO_EXTENDS(extends, ...) \ extends #define GET_CLASS_INFO_IMPLEMENTS(x, y, implements...) \ implements #define GET_CLASS_INFO_NB_IMPLEMENTS(x, nb, ...) \ nb #define GET_CLASS_INFO(what, extends, nbInter, interfaces...) \ GET_CLASS_INFO_ ## what(extends, nbInter, ##interfaces) #define CLASS_INFO_String(what) \ GET_CLASS_INFO(what, Object, 1, toString) #define CLASS_INFO(name, what) \ CLASS_INFO_ ## name(what) CLASS_INFO(String, EXTENDS) CLASS_INFO(String, IMPLEMENTS) CLASS_INFO(String, NB_IMPLEMENTS)
#define GET_CLASS_INFO_EXTENDS(extends, ...) \ extends #define GET_CLASS_INFO_IMPLEMENTS(x, y, implements...) \ implements #define GET_CLASS_INFO_NB_IMPLEMENTS(x, nb, ...) \ nb #define CLASS_INFO_String(what) \ GET_CLASS_INFO_ ## what(Object, 2, toString, Serializable) #define CLASS_INFO(name, what) \ CLASS_INFO_ ## name(what) CLASS_INFO(String, EXTENDS) CLASS_INFO(String, NB_IMPLEMENTS) CLASS_INFO(String, IMPLEMENTS)
Improve new file in future
Improve new file in future
C
mit
DaemonSnake/ObjectC,swac31/ObjectC,DaemonSnake/ObjectC,DaemonSnake/ObjectC,swac31/ObjectC,swac31/ObjectC
8be3b4631892e10b18d0a4cc8cad6099c1f6803b
tensorflow/core/platform/regexp.h
tensorflow/core/platform/regexp.h
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. 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. ==============================================================================*/ #ifndef TENSORFLOW_PLATFORM_REGEXP_H_ #define TENSORFLOW_PLATFORM_REGEXP_H_ #include "tensorflow/core/platform/platform.h" #include "tensorflow/core/platform/types.h" #if defined(PLATFORM_GOOGLE) || defined(PLATFORM_GOOGLE_ANDROID) || \ defined(GOOGLE_RE2) #include "tensorflow/core/platform/google/build_config/re2.h" namespace tensorflow { typedef ::StringPiece RegexpStringPiece; } // namespace tensorflow #else #include "re2/re2.h" namespace tensorflow { typedef re2::StringPiece RegexpStringPiece; } // namespace tensorflow #endif #endif // TENSORFLOW_PLATFORM_REGEXP_H_
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. 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. ==============================================================================*/ #ifndef TENSORFLOW_PLATFORM_REGEXP_H_ #define TENSORFLOW_PLATFORM_REGEXP_H_ #include "absl/strings/string_view.h" #include "tensorflow/core/platform/platform.h" #include "tensorflow/core/platform/types.h" #if defined(PLATFORM_GOOGLE) || defined(PLATFORM_GOOGLE_ANDROID) || \ defined(GOOGLE_RE2) #include "tensorflow/core/platform/google/build_config/re2.h" namespace tensorflow { typedef absl::string_view RegexpStringPiece; } // namespace tensorflow #else #include "re2/re2.h" namespace tensorflow { typedef re2::StringPiece RegexpStringPiece; } // namespace tensorflow #endif #endif // TENSORFLOW_PLATFORM_REGEXP_H_
Migrate ::StringPiece to absl::string_view. PiperOrigin-RevId: 222828687
Migrate ::StringPiece to absl::string_view. PiperOrigin-RevId: 222828687
C
apache-2.0
aldian/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,apark263/tensorflow,jendap/tensorflow,theflofly/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ppwwyyxx/tensorflow,apark263/tensorflow,arborh/tensorflow,theflofly/tensorflow,aam-at/tensorflow,jendap/tensorflow,freedomtan/tensorflow,renyi533/tensorflow,cxxgtxy/tensorflow,arborh/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,chemelnucfin/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,jendap/tensorflow,annarev/tensorflow,gunan/tensorflow,DavidNorman/tensorflow,frreiss/tensorflow-fred,Bismarrck/tensorflow,tensorflow/tensorflow,adit-chandra/tensorflow,karllessard/tensorflow,Intel-Corporation/tensorflow,petewarden/tensorflow,jhseu/tensorflow,kevin-coder/tensorflow-fork,petewarden/tensorflow,Bismarrck/tensorflow,cxxgtxy/tensorflow,chemelnucfin/tensorflow,kevin-coder/tensorflow-fork,cxxgtxy/tensorflow,arborh/tensorflow,alsrgv/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,annarev/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,aldian/tensorflow,asimshankar/tensorflow,annarev/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,jbedorf/tensorflow,chemelnucfin/tensorflow,DavidNorman/tensorflow,gunan/tensorflow,ppwwyyxx/tensorflow,freedomtan/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,asimshankar/tensorflow,chemelnucfin/tensorflow,jbedorf/tensorflow,hfp/tensorflow-xsmm,asimshankar/tensorflow,Intel-tensorflow/tensorflow,davidzchen/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_tf_optimizer,apark263/tensorflow,Intel-tensorflow/tensorflow,ageron/tensorflow,renyi533/tensorflow,adit-chandra/tensorflow,Intel-tensorflow/tensorflow,jhseu/tensorflow,ghchinoy/tensorflow,xzturn/tensorflow,kevin-coder/tensorflow-fork,alsrgv/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,theflofly/tensorflow,apark263/tensorflow,tensorflow/tensorflow-pywrap_saved_model,arborh/tensorflow,jhseu/tensorflow,paolodedios/tensorflow,DavidNorman/tensorflow,freedomtan/tensorflow,gautam1858/tensorflow,hfp/tensorflow-xsmm,aam-at/tensorflow,sarvex/tensorflow,sarvex/tensorflow,jhseu/tensorflow,theflofly/tensorflow,aam-at/tensorflow,paolodedios/tensorflow,arborh/tensorflow,paolodedios/tensorflow,DavidNorman/tensorflow,asimshankar/tensorflow,asimshankar/tensorflow,ageron/tensorflow,freedomtan/tensorflow,ghchinoy/tensorflow,xzturn/tensorflow,apark263/tensorflow,karllessard/tensorflow,jendap/tensorflow,ageron/tensorflow,aam-at/tensorflow,theflofly/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,DavidNorman/tensorflow,frreiss/tensorflow-fred,chemelnucfin/tensorflow,chemelnucfin/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,davidzchen/tensorflow,adit-chandra/tensorflow,hfp/tensorflow-xsmm,petewarden/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,ghchinoy/tensorflow,hfp/tensorflow-xsmm,tensorflow/tensorflow,jendap/tensorflow,theflofly/tensorflow,gunan/tensorflow,jbedorf/tensorflow,kevin-coder/tensorflow-fork,ppwwyyxx/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,apark263/tensorflow,asimshankar/tensorflow,renyi533/tensorflow,jbedorf/tensorflow,Intel-Corporation/tensorflow,kevin-coder/tensorflow-fork,Bismarrck/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-pywrap_saved_model,sarvex/tensorflow,sarvex/tensorflow,apark263/tensorflow,asimshankar/tensorflow,DavidNorman/tensorflow,aldian/tensorflow,xzturn/tensorflow,jhseu/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gunan/tensorflow,ageron/tensorflow,aam-at/tensorflow,annarev/tensorflow,renyi533/tensorflow,freedomtan/tensorflow,xzturn/tensorflow,ghchinoy/tensorflow,aldian/tensorflow,ageron/tensorflow,karllessard/tensorflow,renyi533/tensorflow,xzturn/tensorflow,adit-chandra/tensorflow,davidzchen/tensorflow,jbedorf/tensorflow,freedomtan/tensorflow,sarvex/tensorflow,Intel-tensorflow/tensorflow,aam-at/tensorflow,gautam1858/tensorflow,gunan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,theflofly/tensorflow,xzturn/tensorflow,theflofly/tensorflow,yongtang/tensorflow,xzturn/tensorflow,asimshankar/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,ageron/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,alsrgv/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,asimshankar/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,Bismarrck/tensorflow,paolodedios/tensorflow,alsrgv/tensorflow,gunan/tensorflow,aam-at/tensorflow,hfp/tensorflow-xsmm,karllessard/tensorflow,karllessard/tensorflow,gunan/tensorflow,Bismarrck/tensorflow,jhseu/tensorflow,Bismarrck/tensorflow,renyi533/tensorflow,jbedorf/tensorflow,Bismarrck/tensorflow,Bismarrck/tensorflow,paolodedios/tensorflow,alsrgv/tensorflow,DavidNorman/tensorflow,yongtang/tensorflow,hfp/tensorflow-xsmm,Intel-tensorflow/tensorflow,ppwwyyxx/tensorflow,paolodedios/tensorflow,jendap/tensorflow,ghchinoy/tensorflow,apark263/tensorflow,frreiss/tensorflow-fred,aam-at/tensorflow,ageron/tensorflow,gunan/tensorflow,apark263/tensorflow,Intel-Corporation/tensorflow,Intel-tensorflow/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,chemelnucfin/tensorflow,tensorflow/tensorflow,jendap/tensorflow,jendap/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,ghchinoy/tensorflow,asimshankar/tensorflow,gunan/tensorflow,arborh/tensorflow,karllessard/tensorflow,freedomtan/tensorflow,DavidNorman/tensorflow,gautam1858/tensorflow,jbedorf/tensorflow,ageron/tensorflow,annarev/tensorflow,alsrgv/tensorflow,davidzchen/tensorflow,ageron/tensorflow,aldian/tensorflow,tensorflow/tensorflow-pywrap_saved_model,jhseu/tensorflow,xzturn/tensorflow,jhseu/tensorflow,tensorflow/tensorflow,DavidNorman/tensorflow,asimshankar/tensorflow,gautam1858/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,freedomtan/tensorflow,arborh/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,hfp/tensorflow-xsmm,chemelnucfin/tensorflow,renyi533/tensorflow,alsrgv/tensorflow,chemelnucfin/tensorflow,yongtang/tensorflow,jbedorf/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,petewarden/tensorflow,sarvex/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow,renyi533/tensorflow,yongtang/tensorflow,kevin-coder/tensorflow-fork,ghchinoy/tensorflow,ageron/tensorflow,ageron/tensorflow,gunan/tensorflow,xzturn/tensorflow,adit-chandra/tensorflow,jbedorf/tensorflow,theflofly/tensorflow,adit-chandra/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,annarev/tensorflow,Bismarrck/tensorflow,jbedorf/tensorflow,hfp/tensorflow-xsmm,Intel-Corporation/tensorflow,alsrgv/tensorflow,renyi533/tensorflow,kevin-coder/tensorflow-fork,frreiss/tensorflow-fred,cxxgtxy/tensorflow,theflofly/tensorflow,yongtang/tensorflow,yongtang/tensorflow,karllessard/tensorflow,renyi533/tensorflow,tensorflow/tensorflow,adit-chandra/tensorflow,aldian/tensorflow,jhseu/tensorflow,gunan/tensorflow,DavidNorman/tensorflow,jendap/tensorflow,cxxgtxy/tensorflow,gautam1858/tensorflow,frreiss/tensorflow-fred,cxxgtxy/tensorflow,xzturn/tensorflow,arborh/tensorflow,sarvex/tensorflow,ghchinoy/tensorflow,Bismarrck/tensorflow,ghchinoy/tensorflow,annarev/tensorflow,alsrgv/tensorflow,chemelnucfin/tensorflow,annarev/tensorflow,aldian/tensorflow,ppwwyyxx/tensorflow,gautam1858/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow,arborh/tensorflow,Intel-tensorflow/tensorflow,aldian/tensorflow,paolodedios/tensorflow,chemelnucfin/tensorflow,hfp/tensorflow-xsmm,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,xzturn/tensorflow,freedomtan/tensorflow,alsrgv/tensorflow,jhseu/tensorflow,kevin-coder/tensorflow-fork,jhseu/tensorflow,adit-chandra/tensorflow,sarvex/tensorflow,arborh/tensorflow,adit-chandra/tensorflow,jhseu/tensorflow,paolodedios/tensorflow,jendap/tensorflow,davidzchen/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_saved_model,theflofly/tensorflow,davidzchen/tensorflow,freedomtan/tensorflow,kevin-coder/tensorflow-fork,ppwwyyxx/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ghchinoy/tensorflow,apark263/tensorflow,gunan/tensorflow,freedomtan/tensorflow,adit-chandra/tensorflow,frreiss/tensorflow-fred,hfp/tensorflow-xsmm,davidzchen/tensorflow,frreiss/tensorflow-fred,paolodedios/tensorflow,freedomtan/tensorflow,hfp/tensorflow-xsmm,arborh/tensorflow,renyi533/tensorflow,theflofly/tensorflow,ppwwyyxx/tensorflow,yongtang/tensorflow,davidzchen/tensorflow,cxxgtxy/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Bismarrck/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ppwwyyxx/tensorflow,annarev/tensorflow,jbedorf/tensorflow,ppwwyyxx/tensorflow,renyi533/tensorflow,adit-chandra/tensorflow,ageron/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,chemelnucfin/tensorflow,alsrgv/tensorflow,annarev/tensorflow,ppwwyyxx/tensorflow,jendap/tensorflow,frreiss/tensorflow-fred,xzturn/tensorflow,apark263/tensorflow,aam-at/tensorflow,jbedorf/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,ghchinoy/tensorflow,yongtang/tensorflow,kevin-coder/tensorflow-fork,aam-at/tensorflow,arborh/tensorflow,alsrgv/tensorflow,kevin-coder/tensorflow-fork,davidzchen/tensorflow,aam-at/tensorflow,petewarden/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,yongtang/tensorflow,annarev/tensorflow
42e4da04ad4740ab12e955f67c36b557d8a56169
drake/solvers/LinearSystemSolver.h
drake/solvers/LinearSystemSolver.h
#pragma once #include "drake/drakeOptimization_export.h" #include "drake/solvers/MathematicalProgram.h" namespace drake { namespace solvers { class DRAKEOPTIMIZATION_EXPORT LinearSystemSolver : public MathematicalProgramSolverInterface { public: // This solver is implemented in various pieces depending on if // Ipopt was available during compilation. bool available() const override; SolutionResult Solve(OptimizationProblem& prog) const override; }; } // namespace solvers } // namespace drake
#pragma once #include "drake/drakeOptimization_export.h" #include "drake/solvers/MathematicalProgram.h" namespace drake { namespace solvers { class DRAKEOPTIMIZATION_EXPORT LinearSystemSolver : public MathematicalProgramSolverInterface { public: bool available() const override; SolutionResult Solve(OptimizationProblem& prog) const override; }; } // namespace solvers } // namespace drake
Remove errant comment from copypasta
Remove errant comment from copypasta
C
bsd-3-clause
billhoffman/drake,sheim/drake,sheim/drake,billhoffman/drake,billhoffman/drake,sheim/drake,billhoffman/drake,billhoffman/drake,sheim/drake,billhoffman/drake,sheim/drake,billhoffman/drake,sheim/drake,sheim/drake,billhoffman/drake,sheim/drake
a8fc38797593f288ee3f2a71b40780473b22f3e9
algorithms/binsearch.h
algorithms/binsearch.h
/* * Copyright (c) 2014-2015, NVIDIA CORPORATION * Copyright (c) 2015, Nuno Subtil <[email protected]> * Copyright (c) 2015, Roche Molecular Systems Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY 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. */ #pragma once #include "../types.h" namespace lift { // perform a binary search on a sorted array // returns the index of any element in the array that is equal to val, or -1 if not found template <typename T> CUDA_HOST_DEVICE uint32 binary_search(const T *data, uint32 size, const T val) { uint32 first = 0; uint32 last = size; while(last - first > 0) { uint32 i = first + ((last - first) / 2); if (data[i] == val) return i; if (data[i] < val) { if (i == first) { first++; } else { first = i; } } else { if (i == last) { last--; } else { last = i; } } } return uint32(-1); } } // namespace lift
Add basic binary search implementation
algorithms: Add basic binary search implementation
C
bsd-3-clause
nsubtil/lift,chuckseberino/lift,chuckseberino/lift,nsubtil/lift,chuckseberino/lift,nsubtil/lift
6d76222e1a57deaba1562ce3d3312b5f21888bd1
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2010 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k15"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2010 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k16"
Update driver version to 5.02.00-k16
[SCSI] qla4xxx: Update driver version to 5.02.00-k16 Signed-off-by: Vikas Chaudhary <[email protected]> Signed-off-by: James Bottomley <[email protected]>
C
apache-2.0
TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas
56163c233d35c20698a9de0d4f640bb02251a926
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2012 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k20"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2012 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.03.00-k0"
Update driver version to 5.03.00-k0
[SCSI] qla4xxx: Update driver version to 5.03.00-k0 Signed-off-by: Vikas Chaudhary <[email protected]> Signed-off-by: James Bottomley <[email protected]>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs
0563c8912eaa758bb51d03c8dbfc48f3a4c91b69
tests/regression/03-practical/21-pfscan_combine_minimal.c
tests/regression/03-practical/21-pfscan_combine_minimal.c
#include <pthread.h> struct __anonstruct_PQUEUE_63 { int closed ; pthread_mutex_t mtx ; }; typedef struct __anonstruct_PQUEUE_63 PQUEUE; PQUEUE pqb; int pqueue_init(PQUEUE *qp) { qp->closed = 0; pthread_mutex_init(& qp->mtx, NULL); return (0); } void pqueue_close(PQUEUE *qp ) { pthread_mutex_lock(& qp->mtx); qp->closed = 1; pthread_mutex_unlock(& qp->mtx); return; } int pqueue_put(PQUEUE *qp) { pthread_mutex_lock(& qp->mtx); if (qp->closed) { // pfscan actually has a bug and is missing the following unlock at early return // pthread_mutex_unlock(& qp->mtx); return (0); } pthread_mutex_unlock(& qp->mtx); return (1); } void *worker(void *arg ) { return NULL; } int main(int argc , char **argv ) { pthread_t tid; PQUEUE *qp = &pqb; pqueue_init(& pqb); pthread_create(& tid, NULL, & worker, NULL); for (int i = 1; i < argc; i++) { pqueue_put(& pqb); } pqueue_close(& pqb); return 0; }
Add minimal pfscan regression test due to combine problem
Add minimal pfscan regression test due to combine problem
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
b04327565559b5585bd94bc49316f0341f30f72d
tests/regression/01-cpa/42-non-injective-mult-def-exc.c
tests/regression/01-cpa/42-non-injective-mult-def-exc.c
//PARAM: --enable ana.int.def_exc #include<assert.h> int main() { unsigned int top; unsigned int x; top = 7; if (top == 3){ return 0; } x = top * 1073741824u; assert(x != 3221225472u); // UNKNOWN! return 0; }
Add failing test case for multiplication with DefExc
Add failing test case for multiplication with DefExc
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
bb20ba06733ae80756392b75198de2b813bdd0eb
runtime/src/chplexit.c
runtime/src/chplexit.c
#include <stdio.h> #include <stdlib.h> #include "chplcomm.h" #include "chplexit.h" #include "chplmem.h" #include "chplrt.h" #include "gdb.h" #undef exit static void _chpl_exit_common(int status, int all) { fflush(stdout); fflush(stderr); if (status != 0) { gdbShouldBreakHere(); } if (all) { exitChplThreads(); // tear down the threads } if (all) { _chpl_comm_barrier("_chpl_comm_exit_all"); _chpl_comm_exit_all(status); } else { _chpl_comm_exit_any(status); } exit(status); } void _chpl_exit_all(int status) { printFinalMemStat(0, 0); // print the final memory statistics _chpl_exit_common(status, 1); } void _chpl_exit_any(int status) { _chpl_exit_common(status, 0); }
#include <stdio.h> #include <stdlib.h> #include "chplcomm.h" #include "chplexit.h" #include "chplmem.h" #include "chplrt.h" #include "gdb.h" #undef exit static void _chpl_exit_common(int status, int all) { fflush(stdout); fflush(stderr); if (status != 0) { gdbShouldBreakHere(); } if (all) { _chpl_comm_barrier("_chpl_comm_exit_all"); exitChplThreads(); // tear down the threads _chpl_comm_exit_all(status); } else { _chpl_comm_exit_any(status); } exit(status); } void _chpl_exit_all(int status) { printFinalMemStat(0, 0); // print the final memory statistics _chpl_exit_common(status, 1); } void _chpl_exit_any(int status) { _chpl_exit_common(status, 0); }
Move a call to exitChplThreads() to after the final barrier
Move a call to exitChplThreads() to after the final barrier When it was before the barrier, all nodes except 0 called it very early, but it should only be called at the very end of execution. git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@15138 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
C
apache-2.0
sungeunchoi/chapel,sungeunchoi/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,chizarlicious/chapel,chizarlicious/chapel,CoryMcCartan/chapel,CoryMcCartan/chapel,chizarlicious/chapel,hildeth/chapel,chizarlicious/chapel,sungeunchoi/chapel,sungeunchoi/chapel,chizarlicious/chapel,CoryMcCartan/chapel,hildeth/chapel,sungeunchoi/chapel,sungeunchoi/chapel,chizarlicious/chapel,sungeunchoi/chapel,hildeth/chapel,hildeth/chapel,CoryMcCartan/chapel,hildeth/chapel,CoryMcCartan/chapel,hildeth/chapel,CoryMcCartan/chapel,chizarlicious/chapel,hildeth/chapel
b0c8228755e6d86a77f3a74999216b31feb44a6b
webrtc/experiments.h
webrtc/experiments.h
/* * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef WEBRTC_EXPERIMENTS_H_ #define WEBRTC_EXPERIMENTS_H_ #include "webrtc/typedefs.h" namespace webrtc { struct RemoteBitrateEstimatorMinRate { RemoteBitrateEstimatorMinRate() : min_rate(30000) {} RemoteBitrateEstimatorMinRate(uint32_t min_rate) : min_rate(min_rate) {} uint32_t min_rate; }; struct SkipEncodingUnusedStreams { SkipEncodingUnusedStreams() : enabled(false) {} explicit SkipEncodingUnusedStreams(bool set_enabled) : enabled(set_enabled) {} virtual ~SkipEncodingUnusedStreams() {} const bool enabled; }; struct AimdRemoteRateControl { AimdRemoteRateControl() : enabled(false) {} explicit AimdRemoteRateControl(bool set_enabled) : enabled(set_enabled) {} virtual ~AimdRemoteRateControl() {} const bool enabled; }; } // namespace webrtc #endif // WEBRTC_EXPERIMENTS_H_
/* * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef WEBRTC_EXPERIMENTS_H_ #define WEBRTC_EXPERIMENTS_H_ #include "webrtc/typedefs.h" namespace webrtc { struct RemoteBitrateEstimatorMinRate { RemoteBitrateEstimatorMinRate() : min_rate(30000) {} RemoteBitrateEstimatorMinRate(uint32_t min_rate) : min_rate(min_rate) {} uint32_t min_rate; }; struct AimdRemoteRateControl { AimdRemoteRateControl() : enabled(false) {} explicit AimdRemoteRateControl(bool set_enabled) : enabled(set_enabled) {} virtual ~AimdRemoteRateControl() {} const bool enabled; }; } // namespace webrtc #endif // WEBRTC_EXPERIMENTS_H_
Remove no longer used SkipEncodingUnusedStreams.
Remove no longer used SkipEncodingUnusedStreams. [email protected] Review URL: https://webrtc-codereview.appspot.com/18829004 git-svn-id: 917f5d3ca488f358c4d40eaec14422cf392ccec9@6753 4adac7df-926f-26a2-2b94-8c16560cd09d
C
bsd-3-clause
mwgoldsmith/libilbc,TimothyGu/libilbc,mwgoldsmith/ilbc,mwgoldsmith/ilbc,ShiftMediaProject/libilbc,TimothyGu/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,mwgoldsmith/libilbc,ShiftMediaProject/libilbc,ShiftMediaProject/libilbc,ShiftMediaProject/libilbc,mwgoldsmith/ilbc,mwgoldsmith/libilbc,mwgoldsmith/ilbc,TimothyGu/libilbc,TimothyGu/libilbc,mwgoldsmith/libilbc
5ec3db45d6b637c695baa406b4128ef95edef02b
include/flatcc/portable/pstdalign.h
include/flatcc/portable/pstdalign.h
#ifndef PSTDALIGN_H #define PSTDALIGN_H #ifndef __alignas_is_defined #ifndef __cplusplus #if ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 7)) || defined(__IBMC__) #undef PORTABLE_C11_STDALIGN_MISSING #define PORTABLE_C11_STDALIGN_MISSING #endif #if (defined(__STDC__) && __STDC__ && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && \ !defined(PORTABLE_C11_STDALIGN_MISSING) /* C11 or newer */ #include <stdalign.h> #else #if defined(__GNUC__) || defined (__IBMC__) || defined(__clang__) #define _Alignas(t) __attribute__((__aligned__(t))) #define _Alignof(t) __alignof__(t) #elif defined(_MSC_VER) #define _Alignas(t) __declspec (align(t)) #define _Alignof(t) __alignof(t) #define alignas _Alignas #define alignof _Alignof #define __alignas_is_defined 1 #define __alignof_is_defined 1 #else #error please update pstdalign.h with support for current compiler #endif #endif /* __STDC__ */ #endif /* __cplusplus */ #endif /* __alignas__is_defined */ #endif /* PSTDALIGN_H */
#ifndef PSTDALIGN_H #define PSTDALIGN_H #ifndef __alignas_is_defined #ifndef __cplusplus #if ((defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 7))) || defined(__IBMC__)) #undef PORTABLE_C11_STDALIGN_MISSING #define PORTABLE_C11_STDALIGN_MISSING #endif #if (defined(__STDC__) && __STDC__ && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && \ !defined(PORTABLE_C11_STDALIGN_MISSING) /* C11 or newer */ #include <stdalign.h> #else #if defined(__GNUC__) || defined (__IBMC__) || defined(__clang__) #define _Alignas(t) __attribute__((__aligned__(t))) #define _Alignof(t) __alignof__(t) #elif defined(_MSC_VER) #define _Alignas(t) __declspec (align(t)) #define _Alignof(t) __alignof(t) #define alignas _Alignas #define alignof _Alignof #define __alignas_is_defined 1 #define __alignof_is_defined 1 #else #error please update pstdalign.h with support for current compiler #endif #endif /* __STDC__ */ #endif /* __cplusplus */ #endif /* __alignas__is_defined */ #endif /* PSTDALIGN_H */
Check for GCC before checking version
Check for GCC before checking version
C
apache-2.0
skhoroshavin/flatcc,skhoroshavin/flatcc,dvidelabs/flatcc,dvidelabs/flatcc,skhoroshavin/flatcc,dvidelabs/flatcc
e62b57a8e9fce54fc356a8379b22a065e510450b
deps/libressl-2.0.0/include/string.h
deps/libressl-2.0.0/include/string.h
#include_next <string.h> #ifndef LIBCRYPTOCOMPAT_STRING_H #define LIBCRYPTOCOMPAT_STRING_H #include <sys/types.h> #ifdef __sun /* Some functions historically defined in string.h were placed in strings.h by * SUS. Use the same hack as OS X and FreeBSD use to work around on Solaris. */ #include <strings.h> #endif size_t strlcpy(char *dst, const char *src, size_t siz); size_t strlcat(char *dst, const char *src, size_t siz); void explicit_bzero(void *, size_t); int timingsafe_bcmp(const void *b1, const void *b2, size_t n); int timingsafe_memcmp(const void *b1, const void *b2, size_t len); #ifdef __pnacl__ inline int strncasecmp(const char *str1, const char *str2, size_t n) { size_t i = 0; for(; str1[i] == str2[i] && str1[i] != '\0' && str2[i] != '\0' && i < n; ++i) { } return (int)(str1[i] - str2[i]); } inline int strcasecmp(const char *str1, const char *str2) { size_t i = 0; for(; str1[i] == str2[i] && str1[i] != '\0' && str2[i] != '\0'; ++i) { } return (int)(str1[i] - str2[i]); } #endif /* __pnacl__ */ #endif
#include_next <string.h> #ifndef LIBCRYPTOCOMPAT_STRING_H #define LIBCRYPTOCOMPAT_STRING_H #include <sys/types.h> #ifdef __sun /* Some functions historically defined in string.h were placed in strings.h by * SUS. Use the same hack as OS X and FreeBSD use to work around on Solaris. */ #include <strings.h> #endif size_t strlcpy(char *dst, const char *src, size_t siz); size_t strlcat(char *dst, const char *src, size_t siz); void explicit_bzero(void *, size_t); int timingsafe_bcmp(const void *b1, const void *b2, size_t n); int timingsafe_memcmp(const void *b1, const void *b2, size_t len); #endif
Fix multiple def errors for strcasecmp && strncasecmp.
Fix multiple def errors for strcasecmp && strncasecmp.
C
mpl-2.0
DiamondLovesYou/rust-ppapi,DiamondLovesYou/rust-ppapi,DiamondLovesYou/rust-ppapi,DiamondLovesYou/rust-ppapi