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
92429ddd879d22bb4d18e142ef0ff82d455f9be8
test/Analysis/func.c
test/Analysis/func.c
// RUN: clang -checker-simple -verify %s void f(void) { void (*p)(void); p = f; p = &f; p(); (*p)(); }
// RUN: clang -checker-simple -verify %s void f(void) { void (*p)(void); p = f; p = &f; p(); (*p)(); } void g(void (*fp)(void)); void f2() { g(f); }
Add test for SCA region store.
Add test for SCA region store. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@58235 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
4d0e6e5c7405ffa88b925a5b781cfb942da79882
sources/filechecker.h
sources/filechecker.h
#ifndef QTCSVFILECHECKER_H #define QTCSVFILECHECKER_H #include <QString> #include <QFileInfo> namespace QtCSV { // Check if path to csv file is valid // @input: // - filePath - string with absolute path to csv-file // @output: // - bool - True if file is OK, else False inline bool CheckFile(const QString& filePath) { QFileInfo fileInfo(filePath); if ( fileInfo.isAbsolute() && "csv" == fileInfo.suffix() ) { return true; } return false; } } #endif // QTCSVFILECHECKER_H
#ifndef QTCSVFILECHECKER_H #define QTCSVFILECHECKER_H #include <QString> #include <QFileInfo> #include <QDebug> namespace QtCSV { // Check if path to csv file is valid // @input: // - filePath - string with absolute path to csv-file // @output: // - bool - True if file is OK, else False inline bool CheckFile(const QString& filePath) { QFileInfo fileInfo(filePath); if ( fileInfo.isAbsolute() && fileInfo.isFile() ) { if ( "csv" != fileInfo.suffix() ) { qDebug() << __FUNCTION__ << "Warning - file suffix is not .csv"; } return true; } return false; } } #endif // QTCSVFILECHECKER_H
Remove requirement for a .csv suffix. Print warning if working with file that have suffix other than .csv
Remove requirement for a .csv suffix. Print warning if working with file that have suffix other than .csv
C
mit
apollo13/qtcsv,apollo13/qtcsv,iamantony/qtcsv,iamantony/qtcsv
fec3cd28f55fa0d220054c0034d5f55345006721
library/strings_format.h
library/strings_format.h
#pragma once #define TINYFORMAT_USE_VARIADIC_TEMPLATES #include "dependencies/tinyformat/tinyformat.h" #include "library/strings.h" namespace OpenApoc { template <typename... Args> static UString format(const UString &fmt, Args &&... args) { return tfm::format(fmt.cStr(), std::forward<Args>(args)...); } UString tr(const UString &str, const UString domain = "ufo_string"); } // namespace OpenApoc
#pragma once #define TINYFORMAT_USE_VARIADIC_TEMPLATES #ifdef __GNUC__ // Tinyformat has a number of non-annotated switch fallthrough cases #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" #endif #include "dependencies/tinyformat/tinyformat.h" #ifdef __GNUC__ #pragma GCC diagnostic pop #endif #include "library/strings.h" namespace OpenApoc { template <typename... Args> static UString format(const UString &fmt, Args &&... args) { return tfm::format(fmt.cStr(), std::forward<Args>(args)...); } UString tr(const UString &str, const UString domain = "ufo_string"); } // namespace OpenApoc
Disable -Wimplicit-fallthrough when including tinyformat
Disable -Wimplicit-fallthrough when including tinyformat We assume anything that defines __GNUC__ also copes with GCC #pragmas
C
mit
pmprog/OpenApoc,steveschnepp/OpenApoc,steveschnepp/OpenApoc,Istrebitel/OpenApoc,Istrebitel/OpenApoc,pmprog/OpenApoc
732d189a86d86f281a8b779dce4e28365624f918
tests/regression/02-base/98-refine-unsigned.c
tests/regression/02-base/98-refine-unsigned.c
// PARAM: --enable ana.int.interval #include <stdlib.h> #include <assert.h> int main() { unsigned long ul; if (ul <= 0UL) { __goblint_check(ul == 0UL); } else { __goblint_check(ul != 0UL); } if (ul > 0UL) { __goblint_check(ul != 0UL); } else { __goblint_check(ul == 0UL); } if (! (ul > 0UL)) { __goblint_check(ul == 0UL); } else { __goblint_check(ul != 0UL); } unsigned int iu; if (iu <= 0UL) { __goblint_check(iu == 0UL); } else { __goblint_check(iu != 0UL); } if (iu > 0UL) { __goblint_check(iu != 0UL); } else { __goblint_check(iu == 0UL); } if (! (iu > 0UL)) { __goblint_check(iu == 0UL); } else { __goblint_check(iu != 0UL); } int i; if (! (i > 0)) { } else { __goblint_check(i != 0); } return 0; }
// PARAM: --enable ana.int.interval #include <stdlib.h> #include <assert.h> int main() { unsigned long ul; if (ul <= 0UL) { __goblint_check(ul == 0UL); } else { __goblint_check(ul != 0UL); } if (ul > 0UL) { __goblint_check(ul != 0UL); } else { __goblint_check(ul == 0UL); } if (! (ul > 0UL)) { __goblint_check(ul == 0UL); } else { __goblint_check(ul != 0UL); } unsigned int iu; if (iu <= 0UL) { __goblint_check(iu == 0UL); } else { __goblint_check(iu != 0UL); } if (iu > 0UL) { __goblint_check(iu != 0UL); } else { __goblint_check(iu == 0UL); } if (! (iu > 0UL)) { __goblint_check(iu == 0UL); } else { __goblint_check(iu != 0UL); } int i; if (! (i > 0)) { } else { __goblint_check(i != 0); } return 0; }
Remove trailing spaces in test case.
Remove trailing spaces in test case.
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
6ebd618ef522838e0478ebacfc60adc7ecc9d8fa
src/server/wsgi_version.h
src/server/wsgi_version.h
#ifndef WSGI_VERSION_H #define WSGI_VERSION_H /* ------------------------------------------------------------------------- */ /* * Copyright 2007-2021 GRAHAM DUMPLETON * * 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. */ /* ------------------------------------------------------------------------- */ /* Module version information. */ #define MOD_WSGI_MAJORVERSION_NUMBER 4 #define MOD_WSGI_MINORVERSION_NUMBER 9 #define MOD_WSGI_MICROVERSION_NUMBER 0 #define MOD_WSGI_VERSION_STRING "4.9.0" /* ------------------------------------------------------------------------- */ #endif /* vi: set sw=4 expandtab : */
#ifndef WSGI_VERSION_H #define WSGI_VERSION_H /* ------------------------------------------------------------------------- */ /* * Copyright 2007-2021 GRAHAM DUMPLETON * * 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. */ /* ------------------------------------------------------------------------- */ /* Module version information. */ #define MOD_WSGI_MAJORVERSION_NUMBER 4 #define MOD_WSGI_MINORVERSION_NUMBER 9 #define MOD_WSGI_MICROVERSION_NUMBER 1 #define MOD_WSGI_VERSION_STRING "4.9.1.dev1" /* ------------------------------------------------------------------------- */ #endif /* vi: set sw=4 expandtab : */
Increment version to 4.9.1 for new development work.
Increment version to 4.9.1 for new development work.
C
apache-2.0
GrahamDumpleton/mod_wsgi,GrahamDumpleton/mod_wsgi,GrahamDumpleton/mod_wsgi
48acc8c91b26cf424086151a6a625b663196b1c7
src/statistic_histogram.h
src/statistic_histogram.h
/* * statistic_histogram.h * */ #ifndef STATISTIC_HISTOGRAM_H_ #define STATISTIC_HISTOGRAM_H_ #include <stdio.h> #include <vector> class Statistic_histogram { public: Statistic_histogram(std::string h_name, const ssize_t domain_start, const ssize_t domain_end, const size_t range_size); void inc_val(uint64_t val); size_t report(char * report_buffer, size_t report_buffer_size); private: std::string name; ssize_t dstart; ssize_t dend; size_t rsize; typedef std::vector<uint64_t>::iterator hv_iterator; std::vector<uint64_t> hval; }; #endif /* STATISTIC_HISTOGRAM_H_ */
/* Copyright (c) 2015, Edward Haas 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 st_histogram 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 HOLDER 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. statistic_histogram.h */ #ifndef STATISTIC_HISTOGRAM_H_ #define STATISTIC_HISTOGRAM_H_ #include <stdio.h> #include <vector> class Statistic_histogram { public: Statistic_histogram(std::string h_name, const ssize_t domain_start, const ssize_t domain_end, const size_t range_size); void inc_val(uint64_t val); size_t report(char * report_buffer, size_t report_buffer_size); private: std::string name; ssize_t dstart; ssize_t dend; size_t rsize; typedef std::vector<uint64_t>::iterator hv_iterator; std::vector<uint64_t> hval; }; #endif /* STATISTIC_HISTOGRAM_H_ */
Update license in header file
Update license in header file
C
bsd-3-clause
EdDev/st_histogram,EdDev/st_histogram
ac82354ab52fcb74909c57d408da60fad767a012
solutions/uri/1026/1026.c
solutions/uri/1026/1026.c
#include <stdio.h> int main() { unsigned int a, b; while (scanf("%u %u", &a, &b) != EOF) { printf("%u\n", a ^ b); } return 0; }
Solve To Carry or not to Carry in c
Solve To Carry or not to Carry in c
C
mit
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground
3654f9926d4015a10d62ab6bb93087974d510daf
framegrab.h
framegrab.h
#ifndef FRAMEGRAB_H_ #define FRAMEGRAB_H_ #include <unistd.h> typedef void *fg_handle; /* fourcc constants */ #define FG_FORMAT_YUYV 0x56595559 #define FG_FORMAT_RGB24 0x33424752 struct fg_image { int width; int height; int format; }; fg_handle fg_init(char *, int); int fg_deinit(fg_handle); int fg_start(fg_handle); int fg_stop(fg_handle); int fg_set_format(fg_handle, struct fg_image *); int fg_get_format(fg_handle, struct fg_image *); int fg_get_frame(fg_handle, void *, size_t len); int fg_write_jpeg(char *, int, struct fg_image *, void *); #endif
#ifndef FRAMEGRAB_H_ #define FRAMEGRAB_H_ #ifdef __cplusplus extern "C" { #endif #include <stdlib.h> #if defined(_WIN32) && !defined(__CYGWIN__) # ifdef BUILDING_DLL # define EXPORT __declspec(dllexport) # else # define EXPORT __declspec(dllimport) # endif #elif __GNUC__ >= 4 || defined(__HP_cc) # define EXPORT __attribute__((visibility ("default"))) #elif defined(__SUNPRO_C) # define EXPORT __global #else # define EXPORT #endif typedef void *fg_handle; /* fourcc constants */ #define FG_FORMAT_YUYV 0x56595559 #define FG_FORMAT_RGB24 0x33424752 struct fg_image { int width; int height; int format; }; EXPORT fg_handle fg_init(char *, int); EXPORT int fg_deinit(fg_handle); EXPORT int fg_start(fg_handle); EXPORT int fg_stop(fg_handle); EXPORT int fg_set_format(fg_handle, struct fg_image *); EXPORT int fg_get_format(fg_handle, struct fg_image *); EXPORT int fg_get_frame(fg_handle, void *, size_t len); EXPORT int fg_write_jpeg(char *, int, struct fg_image *, void *); #ifdef __cplusplus } #endif #endif
Add C++ and shared library stuff to header file
Add C++ and shared library stuff to header file We're not using it yet, but it's a nice thing to have. Signed-off-by: Claudio Matsuoka <[email protected]>
C
mit
cmatsuoka/framegrab,cmatsuoka/framegrab
f7faee03e671d7ac088951ed187e6f867e2255a5
test/Driver/sysroot.c
test/Driver/sysroot.c
// Check that --sysroot= also applies to header search paths. // RUN: %clang -ccc-host-triple unknown --sysroot=/FOO -### -E %s 2> %t1 // RUN: FileCheck --check-prefix=CHECK-SYSROOTEQ < %t1 %s // CHECK-SYSROOTEQ: "-cc1"{{.*}} "-isysroot" "/FOO" // Apple Darwin uses -isysroot as the syslib root, too. // RUN: touch %t2.o // RUN: %clang -ccc-host-triple i386-apple-darwin10 \ // RUN: -isysroot /FOO -### %t2.o 2> %t2 // RUN: FileCheck --check-prefix=CHECK-APPLE-ISYSROOT < %t2 %s // CHECK-APPLE-ISYSROOT: "-arch" "i386"{{.*}} "-syslibroot" "/FOO" // Check that honor --sysroot= over -isysroot, for Apple Darwin. // RUN: touch %t3.o // RUN: %clang -ccc-host-triple i386-apple-darwin10 \ // RUN: -isysroot /FOO --sysroot=/BAR -### %t3.o 2> %t3 // RUN: FileCheck --check-prefix=CHECK-APPLE-SYSROOT < %t3 %s // CHECK-APPLE-SYSROOT: "-arch" "i386"{{.*}} "-syslibroot" "/BAR"
// Check that --sysroot= also applies to header search paths. // RUN: %clang -ccc-host-triple i386-unk-unk --sysroot=/FOO -### -E %s 2> %t1 // RUN: FileCheck --check-prefix=CHECK-SYSROOTEQ < %t1 %s // CHECK-SYSROOTEQ: "-cc1"{{.*}} "-isysroot" "/FOO" // Apple Darwin uses -isysroot as the syslib root, too. // RUN: touch %t2.o // RUN: %clang -ccc-host-triple i386-apple-darwin10 \ // RUN: -isysroot /FOO -### %t2.o 2> %t2 // RUN: FileCheck --check-prefix=CHECK-APPLE-ISYSROOT < %t2 %s // CHECK-APPLE-ISYSROOT: "-arch" "i386"{{.*}} "-syslibroot" "/FOO" // Check that honor --sysroot= over -isysroot, for Apple Darwin. // RUN: touch %t3.o // RUN: %clang -ccc-host-triple i386-apple-darwin10 \ // RUN: -isysroot /FOO --sysroot=/BAR -### %t3.o 2> %t3 // RUN: FileCheck --check-prefix=CHECK-APPLE-SYSROOT < %t3 %s // CHECK-APPLE-SYSROOT: "-arch" "i386"{{.*}} "-syslibroot" "/BAR"
Tweak test to at least use a standard arch, to ensure we try to invoke Clang.
tests: Tweak test to at least use a standard arch, to ensure we try to invoke Clang. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@130861 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
41f2f1829f3227b2d405feb75751ac5debfcc1e8
components/libc/compilers/minilibc/sys/types.h
components/libc/compilers/minilibc/sys/types.h
#ifndef __TYPES_H__ #define __TYPES_H__ typedef long off_t; typedef unsigned long size_t; typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */ typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; typedef int mode_t; typedef unsigned long clockid_t; typedef int pid_t; typedef unsigned long clock_t; /* clock() */ #ifndef NULL #define NULL (0) #endif #define __u_char_defined #endif
#ifndef __TYPES_H__ #define __TYPES_H__ typedef long off_t; typedef unsigned long size_t; typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */ typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; typedef int mode_t; typedef unsigned long clockid_t; typedef int pid_t; typedef int gid_t; typedef int uid_t; typedef int dev_t; typedef int ino_t; typedef int mode_t; typedef int caddr_t; typedef unsigned int wint_t; typedef unsigned long useconds_t; typedef unsigned long clock_t; /* clock() */ #ifndef NULL #define NULL (0) #endif #define __u_char_defined #endif
Add more typedef in minilibc.
[libc] Add more typedef in minilibc.
C
apache-2.0
geniusgogo/rt-thread,weety/rt-thread,nongxiaoming/rt-thread,weiyuliang/rt-thread,ArdaFu/rt-thread,nongxiaoming/rt-thread,AubrCool/rt-thread,FlyLu/rt-thread,armink/rt-thread,weiyuliang/rt-thread,FlyLu/rt-thread,hezlog/rt-thread,RT-Thread/rt-thread,hezlog/rt-thread,armink/rt-thread,armink/rt-thread,yongli3/rt-thread,hezlog/rt-thread,yongli3/rt-thread,weety/rt-thread,hezlog/rt-thread,zhaojuntao/rt-thread,weety/rt-thread,igou/rt-thread,igou/rt-thread,hezlog/rt-thread,hezlog/rt-thread,weiyuliang/rt-thread,gbcwbz/rt-thread,weety/rt-thread,FlyLu/rt-thread,AubrCool/rt-thread,ArdaFu/rt-thread,FlyLu/rt-thread,nongxiaoming/rt-thread,ArdaFu/rt-thread,weiyuliang/rt-thread,igou/rt-thread,FlyLu/rt-thread,igou/rt-thread,gbcwbz/rt-thread,geniusgogo/rt-thread,weiyuliang/rt-thread,AubrCool/rt-thread,zhaojuntao/rt-thread,zhaojuntao/rt-thread,wolfgangz2013/rt-thread,geniusgogo/rt-thread,igou/rt-thread,wolfgangz2013/rt-thread,AubrCool/rt-thread,gbcwbz/rt-thread,ArdaFu/rt-thread,weety/rt-thread,weety/rt-thread,gbcwbz/rt-thread,armink/rt-thread,RT-Thread/rt-thread,nongxiaoming/rt-thread,zhaojuntao/rt-thread,gbcwbz/rt-thread,gbcwbz/rt-thread,RT-Thread/rt-thread,wolfgangz2013/rt-thread,AubrCool/rt-thread,geniusgogo/rt-thread,geniusgogo/rt-thread,nongxiaoming/rt-thread,nongxiaoming/rt-thread,weiyuliang/rt-thread,AubrCool/rt-thread,RT-Thread/rt-thread,igou/rt-thread,RT-Thread/rt-thread,ArdaFu/rt-thread,yongli3/rt-thread,geniusgogo/rt-thread,armink/rt-thread,yongli3/rt-thread,AubrCool/rt-thread,RT-Thread/rt-thread,zhaojuntao/rt-thread,wolfgangz2013/rt-thread,yongli3/rt-thread,armink/rt-thread,ArdaFu/rt-thread,zhaojuntao/rt-thread,weety/rt-thread,yongli3/rt-thread,yongli3/rt-thread,zhaojuntao/rt-thread,weiyuliang/rt-thread,igou/rt-thread,gbcwbz/rt-thread,wolfgangz2013/rt-thread,nongxiaoming/rt-thread,FlyLu/rt-thread,wolfgangz2013/rt-thread,hezlog/rt-thread,geniusgogo/rt-thread,armink/rt-thread,RT-Thread/rt-thread,ArdaFu/rt-thread,FlyLu/rt-thread,wolfgangz2013/rt-thread
839a6a1504ffd335c43a8ad27043c51aecacecd1
OLEContainerScrollView/OLEContainerScrollView+Swizzling.h
OLEContainerScrollView/OLEContainerScrollView+Swizzling.h
/* OLEContainerScrollView Copyright (c) 2014 Ole Begemann. https://github.com/ole/OLEContainerScrollView */ void swizzleUICollectionViewLayoutFinalizeCollectionViewUpdates(); void swizzleUITableView();
/* OLEContainerScrollView Copyright (c) 2014 Ole Begemann. https://github.com/ole/OLEContainerScrollView */ void swizzleUICollectionViewLayoutFinalizeCollectionViewUpdates(void); void swizzleUITableView(void);
Fix compiler warning in Xcode 9
Fix compiler warning in Xcode 9
C
mit
ole/OLEContainerScrollView
a0bbb6ec64c6a6a74231206368be6af0c3d4d5e9
DominantColor/Shared/INVector3.h
DominantColor/Shared/INVector3.h
// // INVector3.h // DominantColor // // Created by Indragie on 12/21/14. // Copyright (c) 2014 Indragie Karunaratne. All rights reserved. // #import <GLKit/GLKit.h> // Wrapping GLKVector3 values in a struct so that it can be used from Swift. typedef struct { float x; float y; float z; } INVector3; GLKVector3 INVector3ToGLKVector3(INVector3 vector); INVector3 GLKVector3ToINVector3(GLKVector3 vector); INVector3 INVector3Add(INVector3 v1, INVector3 v2); INVector3 INVector3DivideScalar(INVector3 vector, float scalar);
// // INVector3.h // DominantColor // // Created by Indragie on 12/21/14. // Copyright (c) 2014 Indragie Karunaratne. All rights reserved. // #import <GLKit/GLKit.h> // Wrapping GLKVector3 values in a struct so that it can be used from Swift. typedef struct { float x; float y; float z; } INVector3; GLKVector3 INVector3ToGLKVector3(INVector3 vector); INVector3 GLKVector3ToINVector3(GLKVector3 vector);
Remove function declarations from header
Remove function declarations from header
C
mit
objcio/DominantColor,lydonchandra/DominantColor,indragiek/DominantColor,objcio/DominantColor,marinehero/DominantColor,objcio/DominantColor,marinehero/DominantColor,marinehero/DominantColor,lydonchandra/DominantColor,lydonchandra/DominantColor,objcio/DominantColor,indragiek/DominantColor,indragiek/DominantColor,marinehero/DominantColor
baf1cdaeb105781fd457bfd9d2a161e17c272a2d
tests/utils/core-utils.h
tests/utils/core-utils.h
/* * This file is part of meego-im-framework * * * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * Contact: Nokia Corporation ([email protected]) * * If you have questions regarding the use of this file, please contact * Nokia at [email protected]. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef CORE_UTILS_H__ #define CORE_UTILS_H__ #include <QString> #include <QObject> namespace MaliitTestUtils { bool isTestingInSandbox(); QString getTestPluginPath(); QString getTestDataPath(); void waitForSignal(const QObject* object, const char* signal, int timeout); void waitAndProcessEvents(int waitTime); } #endif // CORE_UTILS_H__
/* * This file is part of meego-im-framework * * * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * Contact: Nokia Corporation ([email protected]) * * If you have questions regarding the use of this file, please contact * Nokia at [email protected]. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef CORE_UTILS_H__ #define CORE_UTILS_H__ #include <QString> #include <QObject> #include "abstractsurfacegroup.h" #include "abstractsurfacegroupfactory.h" namespace MaliitTestUtils { bool isTestingInSandbox(); QString getTestPluginPath(); QString getTestDataPath(); void waitForSignal(const QObject* object, const char* signal, int timeout); void waitAndProcessEvents(int waitTime); class TestSurfaceGroup : public Maliit::Server::AbstractSurfaceGroup { public: TestSurfaceGroup() {} Maliit::Plugins::AbstractSurfaceFactory *factory() { return 0; } void activate() {} void deactivate() {} void setRotation(Maliit::OrientationAngle) {} }; class TestSurfaceGroupFactory : public Maliit::Server::AbstractSurfaceGroupFactory { public: TestSurfaceGroupFactory() {} QSharedPointer<Maliit::Server::AbstractSurfaceGroup> createSurfaceGroup() { return QSharedPointer<Maliit::Server::AbstractSurfaceGroup>(new TestSurfaceGroup); } }; } #endif // CORE_UTILS_H__
Add surface server side implementation for tests
Add surface server side implementation for tests Add a TestSurfaceGroup and TestSurfaceGroupFactory class for tests. RevBy: TrustMe. Full, original commit at 4dc9c4567301f2481b12965bdcf02a7281963b61 in maliit-framework
C
lgpl-2.1
maliit/inputcontext-gtk,maliit/inputcontext-gtk
e250aa36cd2bf836fabaa32905e76e800b0fc756
src/qt/qtipcserver.h
src/qt/qtipcserver.h
#ifndef QTIPCSERVER_H #define QTIPCSERVER_H // Define Bitcoin-Qt message queue name #define BITCOINURI_QUEUE_NAME "BitcoinURI" void ipcScanRelay(int argc, char *argv[]); void ipcInit(int argc, char *argv[]); #endif // QTIPCSERVER_H
#ifndef QTIPCSERVER_H #define QTIPCSERVER_H // Define Bitcoin-Qt message queue name #define BITCOINURI_QUEUE_NAME "NovaCoinURI" void ipcScanRelay(int argc, char *argv[]); void ipcInit(int argc, char *argv[]); #endif // QTIPCSERVER_H
Set correct name for boost IPC
Set correct name for boost IPC
C
mit
ALEXIUMCOIN/alexium,landcoin-ldc/landcoin,IOCoin/DIONS,IOCoin/DIONS,Rimbit/Wallets,gades/novacoin,ALEXIUMCOIN/alexium,valorbit/valorbit,nochowderforyou/clams,nochowderforyou/clams,nochowderforyou/clams,rat4/blackcoin,vectorcoindev/Vector,iadix/iadixcoin,thunderrabbit/clams,MOIN/moin,CoinBlack/bitcoin,iadix/iadixcoin,Kefkius/clams,vectorcoindev/Vector,novacoin-project/novacoin,novacoin-project/novacoin,lateminer/DopeCoinGold,byncoin-project/byncoin,elambert2014/novacoin,okcashpro/okcash,AquariusNetwork/ARCO,iadix/iadixcoin,Whitecoin-org/Whitecoin,pinkmagicdev/SwagBucks,Jheguy2/Mercury,shadowproject/shadow,ALEXIUMCOIN/alexium,elambert2014/cbx2,thunderrabbit/clams,iadix/iadixcoin,effectsToCause/vericoin,CoinBlack/blackcoin,fsb4000/novacoin,nochowderforyou/clams,elambert2014/cbx2,Kefkius/clams,robvanmieghem/clams,valorbit/valorbit-oss,shadowproject/shadow,benzhi888/renminbi,LanaCoin/lanacoin,iadix/iadixcoin,shadowproject/shadow,landcoin-ldc/landcoin,greencoin-dev/GreenCoinV2,GeopaymeEE/e-goldcoin,fsb4000/novacoin,som4paul/BolieC,landcoin-ldc/landcoin,Whitecoin-org/Whitecoin,Kefkius/clams,IOCoin/DIONS,thunderrabbit/clams,MOIN/moin,IOCoin/iocoin,robvanmieghem/clams,valorbit/valorbit-oss,okcashpro/okcash,nochowderforyou/clams,benzhi888/renminbi,novacoin-project/novacoin,som4paul/BolieC,VsyncCrypto/Vsync,CoinBlack/blackcoin,jyap808/jumbucks,TheoremCrypto/TheoremCoin,GeopaymeEE/e-goldcoin,blackcoinhelp/blackcoin,jyap808/jumbucks,IOCoin/iocoin,dopecoin-dev/DopeCoinGold,IOCoin/iocoin,Kefkius/clams,pinkmagicdev/SwagBucks,elambert2014/novacoin,gades/novacoin,VsyncCrypto/Vsync,greencoin-dev/GreenCoinV2,xranby/blackcoin,vectorcoindev/Vector,byncoin-project/byncoin,jyap808/jumbucks,elambert2014/novacoin,IOCoin/DIONS,pinkmagicdev/SwagBucks,novacoin-project/novacoin,ghostlander/Orbitcoin,xranby/blackcoin,valorbit/valorbit,iadix/iadixcoin,stamhe/novacoin,penek/novacoin,rat4/blackcoin,xranby/blackcoin,AquariusNetwork/ARCOv2,AquariusNetwork/ARCO,stamhe/novacoin,som4paul/BolieC,valorbit/valorbit-oss,TheoremCrypto/TheoremCoin,landcoin-ldc/landcoin,CoinBlack/bitcoin,LanaCoin/lanacoin,iadix/iadixcoin,dooglus/clams,prodigal-son/blackcoin,elambert2014/cbx2,rat4/blackcoin,blackcoinhelp/blackcoin,penek/novacoin,effectsToCause/vericoin,prodigal-son/blackcoin,IOCoin/iocoin,benzhi888/renminbi,lateminer/DopeCoinGold,CoinBlack/bitcoin,ghostlander/Orbitcoin,gades/novacoin,shadowproject/shadow,stamhe/novacoin,Jheguy2/Mercury,byncoin-project/byncoin,novacoin-project/novacoin,dooglus/clams,Jheguy2/Mercury,GeopaymeEE/e-goldcoin,AquariusNetwork/ARCOv2,shadowproject/shadow,ghostlander/Orbitcoin,robvanmieghem/clams,robvanmieghem/clams,valorbit/valorbit-oss,Whitecoin-org/Whitecoin,VsyncCrypto/Vsync,CoinBlack/blackcoin,robvanmieghem/clams,byncoin-project/byncoin,okcashpro/okcash,lateminer/DopeCoinGold,blackcoinhelp/blackcoin,AquariusNetwork/ARCOv2,elambert2014/cbx2,GeopaymeEE/e-goldcoin,okcashpro/okcash,MOIN/moin,CoinBlack/blackcoin,TheoremCrypto/TheoremCoin,pinkmagicdev/SwagBucks,Rimbit/Wallets,MOIN/moin,LanaCoin/lanacoin,effectsToCause/vericoin,thunderrabbit/clams,CoinBlack/bitcoin,effectsToCause/vericoin,ALEXIUMCOIN/alexium,gades/novacoin,TheoremCrypto/TheoremCoin,MOIN/moin,landcoin-ldc/landcoin,okcashpro/okcash,prodigal-son/blackcoin,byncoin-project/byncoin,iadix/iadixcoin,blackcoinhelp/blackcoin,dopecoin-dev/DopeCoinGold,vectorcoindev/Vector,MOIN/moin,som4paul/BolieC,fsb4000/novacoin,VsyncCrypto/Vsync,jyap808/jumbucks,dooglus/clams,vectorcoindev/Vector,elambert2014/novacoin,iadix/iadixcoin,CoinBlack/bitcoin,AquariusNetwork/ARCOv2,VsyncCrypto/Vsync,effectsToCause/vericoin,GeopaymeEE/e-goldcoin,AquariusNetwork/ARCO,AquariusNetwork/ARCOv2,rat4/blackcoin,valorbit/valorbit-oss,TheoremCrypto/TheoremCoin,Rimbit/Wallets,novacoin-project/novacoin,elambert2014/novacoin,Jheguy2/Mercury,stamhe/novacoin,lateminer/DopeCoinGold,stamhe/novacoin,dopecoin-dev/DopeCoinGold,penek/novacoin,AquariusNetwork/ARCO,iadix/iadixcoin,fsb4000/novacoin,xranby/blackcoin,IOCoin/iocoin,iadix/iadixcoin,dooglus/clams,dopecoin-dev/DopeCoinGold,som4paul/BolieC,jyap808/jumbucks,LanaCoin/lanacoin,gades/novacoin,greencoin-dev/GreenCoinV2,shadowproject/shadow,valorbit/valorbit,Whitecoin-org/Whitecoin,penek/novacoin,dooglus/clams,byncoin-project/byncoin,elambert2014/cbx2,Kefkius/clams,dopecoin-dev/DopeCoinGold,Rimbit/Wallets,okcashpro/okcash,IOCoin/DIONS,CoinBlack/bitcoin,valorbit/valorbit,pinkmagicdev/SwagBucks,greencoin-dev/GreenCoinV2,rat4/blackcoin,ghostlander/Orbitcoin,Jheguy2/Mercury,lateminer/DopeCoinGold,penek/novacoin,IOCoin/DIONS,penek/novacoin,elambert2014/novacoin,fsb4000/novacoin,thunderrabbit/clams,blackcoinhelp/blackcoin,valorbit/valorbit,ghostlander/Orbitcoin,IOCoin/DIONS,prodigal-son/blackcoin,ALEXIUMCOIN/alexium,gades/novacoin,benzhi888/renminbi,benzhi888/renminbi,LanaCoin/lanacoin,Whitecoin-org/Whitecoin,greencoin-dev/GreenCoinV2,IOCoin/DIONS,Rimbit/Wallets,prodigal-son/blackcoin,CoinBlack/blackcoin,fsb4000/novacoin,AquariusNetwork/ARCO
183797ed24d24f6dad3755e37e6053d60916dd5f
projects/sample/tools/sample/main.c
projects/sample/tools/sample/main.c
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include "sample.h" int main (int argc, char ** argv) { printf ("%d\n", compute_sample (5)); exit (0); }
#include "sample.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main (int argc, char ** argv) { printf ("%d\n", compute_sample (5)); exit (0); }
Clean up the sample include orderings, not that it really matters...
Clean up the sample include orderings, not that it really matters... git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@169253 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap
f0d960a2d303d1b7f8ee3bca2d52eee15f4c853e
test/CodeGen/2008-07-31-promotion-of-compound-pointer-arithmetic.c
test/CodeGen/2008-07-31-promotion-of-compound-pointer-arithmetic.c
// RUN: clang -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis | grep "ret i32 1" | count 3 // <rdr://6115726> int f0() { int x; unsigned short n = 1; int *a = &x; int *b = &x; a = a - n; b -= n; return a == b; } int f1(int *a) { int b = a - (int*) 1; a -= (int*) 1; return b == (int) a; } int f2(int n) { int *b = n + (int*) 1; n += (int*) 1; return b == (int*) n; }
// RUN: clang -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis | grep "ret i32 1" | count 3 // <rdr://6115726> int f0() { int x; unsigned short n = 1; int *a = &x; int *b = &x; a = a - n; b -= n; return a == b; } int f1(int *a) { long b = a - (int*) 1; a -= (int*) 1; return b == (long) a; } int f2(long n) { int *b = n + (int*) 1; n += (int*) 1; return b == (int*) n; }
Fix testcase for 64-bit systems.
Fix testcase for 64-bit systems. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@59099 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
f4370ff2104c52e41aa4a01935f22aae342e07f7
src/icalc/icalc/icalc.h
src/icalc/icalc/icalc.h
typedef CI_Config void*; CI_Result CI_submit(char const* input);
/* * C Interface between calcterm and a calculator. * A shared library must implement this interface * to be loadable by calcterm. */ extern "C" { struct CI_Config { int flag; }; struct CI_Result { char* one_line; char** grid; int y; }; void CI_init( CI_Config* config ); CI_Result* CI_submit( char const* input ); void CI_result_release( CI_Result* result ); } /* extern "C" */
Add a basic interface for calcterm
Add a basic interface for calcterm
C
bsd-2-clause
dpacbach/calcterm,dpacbach/calcterm,dpacbach/calcterm,dpacbach/calcterm
3e278c99fdb82b839fafd8972402440e952c2cd4
zephyr/projects/volteer/include/i2c_map.h
zephyr/projects/volteer/include/i2c_map.h
/* Copyright 2020 The Chromium OS 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 __ZEPHYR_CHROME_I2C_MAP_H #define __ZEPHYR_CHROME_I2C_MAP_H #include <devicetree.h> #include "config.h" /* We need registers.h to get the chip specific defines for now */ #include "registers.h" #define I2C_PORT_ACCEL I2C_PORT_SENSOR #define I2C_PORT_SENSOR NPCX_I2C_PORT0_0 #define I2C_PORT_USB_C0 NPCX_I2C_PORT1_0 #define I2C_PORT_USB_C1 NPCX_I2C_PORT2_0 #define I2C_PORT_USB_1_MIX NPCX_I2C_PORT3_0 #define I2C_PORT_POWER NPCX_I2C_PORT5_0 #define I2C_PORT_EEPROM NPCX_I2C_PORT7_0 #define I2C_ADDR_EEPROM_FLAGS 0x50 #endif /* __ZEPHYR_CHROME_I2C_MAP_H */
/* Copyright 2020 The Chromium OS 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 __ZEPHYR_CHROME_I2C_MAP_H #define __ZEPHYR_CHROME_I2C_MAP_H #include <devicetree.h> #include "config.h" /* We need registers.h to get the chip specific defines for now */ #include "i2c/i2c.h" #define I2C_PORT_ACCEL I2C_PORT_SENSOR #define I2C_PORT_SENSOR NAMED_I2C(sensor) #define I2C_PORT_USB_C0 NAMED_I2C(usb_c0) #define I2C_PORT_USB_C1 NAMED_I2C(usb_c1) #define I2C_PORT_USB_1_MIX NAMED_I2C(usb1_mix) #define I2C_PORT_POWER NAMED_I2C(power) #define I2C_PORT_EEPROM NAMED_I2C(eeprom) #define I2C_ADDR_EEPROM_FLAGS 0x50 #endif /* __ZEPHYR_CHROME_I2C_MAP_H */
Remove dependency on npcx specific registers
volteer: Remove dependency on npcx specific registers This change removes the dependency on the npcx specific headers which are normally included via registers.h. It instead transitions to relying on i2c/i2c.h which defines various enums and the NAMED_I2C macro. BUG=b:175249000 TEST=zmake testall Cq-Depend: chromium:2582819 Change-Id: I7d8e98cc4228496b0c7603c0794eb92e0f79c01d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/zephyr-chrome/+/2583272 Tested-by: Jack Rosenthal <[email protected]> Reviewed-by: Jack Rosenthal <[email protected]> Commit-Queue: Jack Rosenthal <[email protected]> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2630155 Reviewed-by: Simon Glass <[email protected]>
C
bsd-3-clause
coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec
19504cb1467d31cbb7e429e66222fad5a84050ef
os/arch/arm/src/rda5981/rda5981x_allocateheap.c
os/arch/arm/src/rda5981/rda5981x_allocateheap.c
#include <tinyara/config.h> #include <tinyara/kmalloc.h> /**************************************************************************** * Name: up_addregion * * Description: * Memory may be added in non-contiguous chunks. Additional chunks are * added by calling this function. * ****************************************************************************/ #if CONFIG_MM_REGIONS > 1 void up_addregion(void) { kumm_addregion((FAR void *)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE); } #endif
Add RDA5981x D_SRAM for heap usage, test program also attached
Add RDA5981x D_SRAM for heap usage, test program also attached Signed-off-by: Tianfu Huang <[email protected]>
C
apache-2.0
tizenrt/tizen_rt,tizenrt/tizen_rt,tizenrt/tizen_rt,tizenrt/tizen_rt,tizenrt/tizen_rt,tizenrt/tizen_rt
30a6736adb3f0e9ff032e296770cf00ae4442ea3
tests/regression/10-synch/05-two_unique_two_lock.c
tests/regression/10-synch/05-two_unique_two_lock.c
// PARAM: --set ana.activated[+] thread #include <pthread.h> #include <stdio.h> int myglobal; pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER; void *f1(void *arg) { pthread_mutex_lock(&A); myglobal=1; // RACE! (with just 4) pthread_mutex_unlock(&A); pthread_mutex_lock(&B); myglobal=2; // RACE! (with just 3) pthread_mutex_unlock(&B); return NULL; } void *f2(void *arg) { pthread_mutex_lock(&A); myglobal=3; // RACE! (with just 2) pthread_mutex_unlock(&A); pthread_mutex_lock(&B); myglobal=4; // RACE! (with just 1) pthread_mutex_unlock(&B); return NULL; } int main(void) { pthread_t t1, t2; pthread_create(&t1, NULL, f1, NULL); pthread_create(&t2, NULL, f2, NULL); return 0; }
Add test where race warnings can be grouped
Add test where race warnings can be grouped
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
ba61ebd978b1f3a7646f220ece3bab09c44c55cd
SSPSolution/SSPSolution/GameStateHandler.h
SSPSolution/SSPSolution/GameStateHandler.h
#ifndef SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H #define SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H #include "GameState.h" #include "StartState.h" #include "LevelSelectState.h" #include <vector> //#define START_WITHOUT_MENU class GameStateHandler { private: std::vector<GameState*> m_stateStack; std::vector<GameState*> m_statesToRemove; public: GameStateHandler(); ~GameStateHandler(); int ShutDown(); int Initialize(ComponentHandler* cHandler, Camera* cameraRef); int Update(float dt, InputHandler* inputHandler); //Push a state to the stack int PushStateToStack(GameState* state); private: }; #endif
#ifndef SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H #define SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H #include "GameState.h" #include "StartState.h" #include "LevelSelectState.h" #include <vector> #define START_WITHOUT_MENU class GameStateHandler { private: std::vector<GameState*> m_stateStack; std::vector<GameState*> m_statesToRemove; public: GameStateHandler(); ~GameStateHandler(); int ShutDown(); int Initialize(ComponentHandler* cHandler, Camera* cameraRef); int Update(float dt, InputHandler* inputHandler); //Push a state to the stack int PushStateToStack(GameState* state); private: }; #endif
UPDATE defined start without menu
UPDATE defined start without menu
C
apache-2.0
Chringo/SSP,Chringo/SSP
c43332e636fb372919959d58e25554dcb52148ba
src/shared/platform/win/nacl_exit.c
src/shared/platform/win/nacl_exit.c
/* * Copyright 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. */ #include <stdlib.h> #include "native_client/src/include/portability.h" #include "native_client/src/shared/platform/nacl_exit.h" #include "native_client/src/trusted/service_runtime/nacl_signal.h" void NaClAbort(void) { #ifdef COVERAGE /* Give coverage runs a chance to flush coverage data */ exit((-SIGABRT) & 0xFF); #else /* Return an 8 bit value for SIGABRT */ TerminateProcess(GetCurrentProcess(),(-SIGABRT) & 0xFF); #endif } void NaClExit(int err_code) { #ifdef COVERAGE /* Give coverage runs a chance to flush coverage data */ exit(err_code); #else TerminateProcess(GetCurrentProcess(), err_code); #endif }
/* * Copyright 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. */ #include <stdlib.h> #include <stdio.h> #include "native_client/src/include/portability.h" #include "native_client/src/shared/platform/nacl_exit.h" #include "native_client/src/trusted/service_runtime/nacl_signal.h" void NaClAbort(void) { NaClExit(-SIGABRT); } void NaClExit(int err_code) { #ifdef COVERAGE /* Give coverage runs a chance to flush coverage data */ exit(err_code); #else /* If the process is scheduled for termination, wait for it.*/ if (TerminateProcess(GetCurrentProcess(), err_code)) { printf("Terminate passed, but returned.\n"); while(1); } printf("Terminate failed with %d.\n", GetLastError()); /* Otherwise use the standard C process exit to bybass destructors. */ ExitProcess(err_code); #endif }
Fix exit issue on Vista/Win7Atom
Fix exit issue on Vista/Win7Atom TerminateProcess returns causing "exit" to fall through. This is causing the buildbots to go red. To fix this, We must add a check to verify termination was scheduled, then loop. As a seperate CL we should find a way to do this without allowing a return on an untrusted stack. BUG= nacl1618 TEST= buildbot Review URL: http://codereview.chromium.org/6804029 git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@4774 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,sbc100/native_client,sbc100/native_client,nacl-webkit/native_client,sbc100/native_client,nacl-webkit/native_client
e30fef0c0d6097e10595077076df1e2357802c21
INPopoverController/INPopoverControllerDefines.h
INPopoverController/INPopoverControllerDefines.h
// // INPopoverControllerDefines.h // Copyright 2011-2014 Indragie Karunaratne. All rights reserved. // typedef NS_ENUM(NSUInteger, INPopoverArrowDirection) { INPopoverArrowDirectionUndefined = 0, INPopoverArrowDirectionLeft = NSMaxXEdge, INPopoverArrowDirectionRight = NSMinXEdge, INPopoverArrowDirectionUp = NSMaxYEdge, INPopoverArrowDirectionDown = NSMinYEdge }; typedef NS_ENUM(NSInteger, INPopoverAnimationType) { INPopoverAnimationTypePop = 0, // Pop animation similar to NSPopover INPopoverAnimationTypeFadeIn, // Fade in only, no fade out INPopoverAnimationTypeFadeOut, // Fade out only, no fade in INPopoverAnimationTypeFadeInOut // Fade in and out };
// // INPopoverControllerDefines.h // Copyright 2011-2014 Indragie Karunaratne. All rights reserved. // typedef NS_ENUM(NSUInteger, INPopoverArrowDirection) { INPopoverArrowDirectionUndefined = 0, INPopoverArrowDirectionLeft, INPopoverArrowDirectionRight, INPopoverArrowDirectionUp, INPopoverArrowDirectionDown }; typedef NS_ENUM(NSInteger, INPopoverAnimationType) { INPopoverAnimationTypePop = 0, // Pop animation similar to NSPopover INPopoverAnimationTypeFadeIn, // Fade in only, no fade out INPopoverAnimationTypeFadeOut, // Fade out only, no fade in INPopoverAnimationTypeFadeInOut // Fade in and out };
Remove references to NS...Edge in enum
Remove references to NS...Edge in enum
C
bsd-2-clause
dbrisinda/INPopoverController,RobotsAndPencils/INPopoverController,bradjasper/INPopoverController
e6750f301c2a173eedd6d7222034168ce3490a60
Straw/STWServiceCall.h
Straw/STWServiceCall.h
#import <Foundation/Foundation.h> /** STWServiceCall is the domain model class which represents the Straw Service Call from Browser. */ @interface STWServiceCall : NSObject /** Service name to call */ @property (nonatomic, retain) NSString *service; /** Service Method name to call */ @property (nonatomic, retain) NSString *method; /** Service Method paramter to call */ @property (nonatomic, retain) NSDictionary *params; /** id of the Service Method call */ @property (nonatomic, retain) NSNumber *callId; /** Return the selector's name. @return the selector's name */ - (NSString *)selectorName; /** Return the selector corresponding to the method. @return the selector corresponding to the method */ - (SEL)selector; @end
#import <Foundation/Foundation.h> /** STWServiceCall is the domain model class which represents the Straw Service Call from Browser. */ @interface STWServiceCall : NSObject /** Service name to call */ @property (nonatomic, retain) NSString *service; /** Service Method name to call */ @property (nonatomic, retain) NSString *method; /** Service Method paramter to call */ @property (nonatomic, retain) NSDictionary *params; /** id of the Service Method call */ @property (nonatomic, retain) NSString *callId; /** Return the selector's name. @return the selector's name */ - (NSString *)selectorName; /** Return the selector corresponding to the method. @return the selector corresponding to the method */ - (SEL)selector; @end
Change the type of callId property
Change the type of callId property
C
mit
strawjs/straw-ios
a94670bd08cd52a19bf72223d63e2cc808b6b057
include/core/SkMilestone.h
include/core/SkMilestone.h
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 75 #endif
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 76 #endif
Update Skia milestone to 76
Update Skia milestone to 76 Change-Id: I146f97bd27d17bffd51fc572ecee84552b238e20 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209160 Reviewed-by: Heather Miller <[email protected]> Commit-Queue: Heather Miller <[email protected]> Auto-Submit: Heather Miller <[email protected]>
C
bsd-3-clause
HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia
92ba6f31ba91bf1050ea11ba219d4f3dc1fce031
Pod/Classes/BFTaskCenter.h
Pod/Classes/BFTaskCenter.h
// // BFTaskCenter.h // Pods // // Created by Superbil on 2015/8/22. // // #import <Foundation/Foundation.h> #import "Bolts.h" @interface BFTaskCenter : NSObject + (nonnull instancetype)defaultCenter; - (nullable id)addTaskBlockToCallbacks:(nonnull BFContinuationBlock)taskBlock forKey:(nonnull NSString *)key; - (void)removeTaskBlock:(nonnull id)taskBlock forKey:(nonnull NSString *)key; - (void)clearAllCallbacksForKey:(nonnull NSString *)key; - (void)sendToCallbacksWithKey:(nonnull NSString *)key result:(nullable id)result; - (void)sendToCallbacksWithKey:(nonnull NSString *)key error:(nonnull NSError *)error; - (nonnull BFTaskCompletionSource *)sourceOfSendToCallbacksForKey:(nonnull NSString *)key executor:(nonnull BFExecutor *)executor cancellationToken:(nullable BFCancellationToken *)cancellationToken; @end
// // BFTaskCenter.h // Pods // // Created by Superbil on 2015/8/22. // // #import "Bolts.h" @interface BFTaskCenter : NSObject + (nonnull instancetype)defaultCenter; - (nullable id)addTaskBlockToCallbacks:(nonnull BFContinuationBlock)taskBlock forKey:(nonnull NSString *)key; - (void)removeTaskBlock:(nonnull id)taskBlock forKey:(nonnull NSString *)key; - (void)clearAllCallbacksForKey:(nonnull NSString *)key; - (void)sendToCallbacksWithKey:(nonnull NSString *)key result:(nullable id)result; - (void)sendToCallbacksWithKey:(nonnull NSString *)key error:(nonnull NSError *)error; - (nullable BFTaskCompletionSource *)sourceOfSendToCallbacksForKey:(nonnull NSString *)key executor:(nonnull BFExecutor *)executor cancellationToken:(nullable BFCancellationToken *)cancellationToken; @end
Fix wrong header for sourceOfSendToCallbacksForKey
Fix wrong header for sourceOfSendToCallbacksForKey
C
mit
Superbil/BFTaskCenter,Superbil/BFTaskCenter
48658eef3458ee99291bf3c89be06004bf487b13
You-DataStore/datastore.h
You-DataStore/datastore.h
#pragma once #ifndef YOU_DATASTORE_DATASTORE_H_ #define YOU_DATASTORE_DATASTORE_H_ #include <deque> #include <functional> #include "boost/variant.hpp" #include "task_typedefs.h" #include "internal/operation.h" #include "transaction.h" namespace You { namespace DataStore { namespace UnitTests {} class DataStore { public: Transaction&& begin(); // Modifying methods bool post(TaskId, SerializedTask&); bool put(TaskId, SerializedTask&); bool erase(TaskId); std::vector<SerializedTask> getAllTask(); private: static DataStore& get(); bool isServing = false; std::deque<Internal::IOperation> operationsQueue; }; } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_DATASTORE_H_
#pragma once #ifndef YOU_DATASTORE_DATASTORE_H_ #define YOU_DATASTORE_DATASTORE_H_ #include <deque> #include <functional> #include "boost/variant.hpp" #include "task_typedefs.h" #include "internal/operation.h" #include "transaction.h" namespace You { namespace DataStore { namespace UnitTests {} class DataStore { public: Transaction && begin(); // Modifying methods bool post(TaskId, SerializedTask&); bool put(TaskId, SerializedTask&); bool erase(TaskId); std::vector<SerializedTask> getAllTask(); private: static DataStore& get(); bool isServing = false; std::deque<Internal::IOperation> operationsQueue; }; } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_DATASTORE_H_
Fix lint error, whitespace around &&
Fix lint error, whitespace around &&
C
mit
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
ab745f07fa1102090b79a330b94e2bea4c1820e2
lib/types.h
lib/types.h
#pragma once #include <boost/variant.hpp> #include <atomic> #include <vector> namespace grml { enum class BasicType { INT, BOOL, REAL }; struct TypeVariable { int64_t id; TypeVariable() : id(counter++) {} TypeVariable(int64_t i) : id(i) {} friend bool operator==(const TypeVariable& lhs, const TypeVariable& rhs) { return lhs.id == rhs.id; } private: static std::atomic_int64_t counter; }; struct FunctionType; using Type = boost::variant< BasicType, TypeVariable, boost::recursive_wrapper<FunctionType> >; struct FunctionType { using Parameters = std::vector<Type>; Type result; Parameters parameters; FunctionType(Type r, Parameters ps) : result(std::move(r)), parameters(std::move(ps)) {} friend bool operator==(const FunctionType& lhs, const FunctionType& rhs) { return lhs.result == rhs.result && lhs.parameters == rhs.parameters; } }; }
#pragma once #include <boost/variant.hpp> #include <atomic> #include <vector> #include <unordered_map> namespace grml { enum class BasicType { INT, BOOL, REAL }; struct TypeVariable { int64_t id; TypeVariable() : id(counter++) {} TypeVariable(int64_t i) : id(i) {} friend bool operator==(const TypeVariable& lhs, const TypeVariable& rhs) { return lhs.id == rhs.id; } private: static std::atomic_int64_t counter; }; struct FunctionType; using Type = boost::variant< BasicType, TypeVariable, boost::recursive_wrapper<FunctionType> >; struct FunctionType { using Parameters = std::vector<Type>; Type result; Parameters parameters; FunctionType(Type r, Parameters ps) : result(std::move(r)), parameters(std::move(ps)) {} friend bool operator==(const FunctionType& lhs, const FunctionType& rhs) { return lhs.result == rhs.result && lhs.parameters == rhs.parameters; } }; struct TypeVariableHasher { std::size_t operator()(const TypeVariable& tv) const { return tv.id; } }; using Substitution = std::unordered_map<TypeVariable, Type, TypeVariableHasher>; Substitution unify(const Type& lhs, const Type& rhs); Substitution combine(const Substitution& lhs, const Substitution& rhs); Type substitute(const Type& type, const Substitution& substitution); }
Add unify combine substitute stubs
Add unify combine substitute stubs
C
unlicense
v0lat1le/grml
a91ac9638745816d19c7ea12ea90cdb8c8dbebe3
src/cmdline.h
src/cmdline.h
#ifndef CMDLINE_H #define CMDLINE_H typedef struct cmdOptions{ int populationSize; int geneSize; }cmdoptions_t; class CMDLINE { int argc; char *argv[]; public: CMDLINE (int, char**); // Constructor int parseCommandLine(cmdoptions_t *CMDoptions); private: // Function like help and version int help(); int version(); }; #endif
Add the class 'CMDLINE'. So the user is able to change default setting.
Add the class 'CMDLINE'. So the user is able to change default setting.
C
mit
wkohlenberg/simple_GA
7508c0b8948668b45c38cfc3dd4e2a9c4709dd3e
kernel/core/test.c
kernel/core/test.c
#include <arch/x64/port.h> #include <truth/panic.h> #define TEST_RESULT_PORT_NUMBER 0xf4 void test_shutdown_status(enum status status) { logf(Log_Debug, "Test shutting down with status %s (%d)\n", status_message(status), status); write_port(status, TEST_RESULT_PORT_NUMBER); halt(); assert(Not_Reached); }
#include <arch/x64/port.h> #include <truth/panic.h> #define Test_Result_Port_Number 0xf4 void test_shutdown_status(enum status status) { logf(Log_Debug, "Test shutting down with status %s (%d)\n", status_message(status), status); write_port(status, Test_Result_Port_Number); }
Exit with a code in debug builds
Exit with a code in debug builds
C
mit
iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth
1581fbd86b5beb465b07d575fc74e61073ec8893
hab/td-p210/td-radio-read.c
hab/td-p210/td-radio-read.c
#include <errno.h> #include <signal.h> #include <string.h> #include <unistd.h> #include <stdbool.h> #include <arpa/inet.h> #include <netinet/in.h> #include <sys/socket.h> #include <sys/types.h> #include <glib.h> #include "td-radio.h" #include "td-radio-scan.h" /* * Send the RESPONDER message to the radio. */ int radio_read(int fd, char* buffer) { bool debug = true; int bytes = 0; memset(buffer, '\0', BUFFER_SZ); if (debug) { g_message("radio_read(): enter"); g_message("\ts_addr = %d", radio_address.sin_addr.s_addr); g_message("\tsin_port = %d", radio_address.sin_port); } socklen_t socklen = sizeof(radio_address); bytes = recvfrom(fd, buffer, BUFFER_SZ, 0, (struct sockaddr *) &radio_address, &socklen); if (debug) { g_message("bytes = %d", bytes); } if (bytes < 0) { g_warning("\tradio_read(): recvfrom failed, %s", strerror(errno)); g_message("\tradio_read(): exit"); } if (debug) { g_message("radio_read(): exit"); } return bytes; }
#include <errno.h> #include <signal.h> #include <string.h> #include <unistd.h> #include <stdbool.h> #include <arpa/inet.h> #include <netinet/in.h> #include <sys/socket.h> #include <sys/types.h> #include <glib.h> #include "td-radio.h" #include "td-radio-scan.h" /* * Send the RESPONDER message to the radio. */ int radio_read(int fd, char* buffer) { bool debug = false; int bytes = 0; memset(buffer, '\0', BUFFER_SZ); socklen_t socklen = sizeof(radio_address); bytes = recvfrom(fd, buffer, BUFFER_SZ, 0, 0, 0); if (bytes < 0) { g_warning("\tradio_read(): recvfrom failed, %s", strerror(errno)); g_error("\tradio_read(): exiting..."); } return bytes; }
Clean up some debugging cruft.
Clean up some debugging cruft.
C
lgpl-2.1
ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead
ca1bf2d0ae025b77910a2e2f8dc91e1cbd802f76
test/test.h
test/test.h
#define ASSERT(x) \ do{ \ if(!(x)){ \ printf("failed assert (%d): %s\n", __LINE__, #x); \ exit(1); \ }\ }while(0) #define INIT_SOCKETS_FOR_WINDOWS \ { \ WSADATA out; \ WSAStartup(MAKEWORD(2,2), &out); \ }
#include <stdlib.h> #define ASSERT(x) \ do{ \ if(!(x)){ \ printf("failed assert (%d): %s\n", __LINE__, #x); \ exit(1); \ }\ }while(0) #ifdef _WIN32 #define INIT_SOCKETS_FOR_WINDOWS \ do{ \ WSADATA out; \ WSAStartup(MAKEWORD(2,2), &out); \ } while(0) #else #define INIT_SOCKETS_FOR_WINDOWS do {} while(0) #endif
Make everything work on linux again
Make everything work on linux again
C
apache-2.0
HeliumProject/mongo-c,mongodb/mongo-c-driver-legacy,Elastica/mongo-c-driver-legacy,mongodb/mongo-c-driver-legacy,mongodb/mongo-c-driver-legacy,Elastica/mongo-c-driver-legacy,Elastica/mongo-c-driver-legacy,HeliumProject/mongo-c,Elastica/mongo-c-driver-legacy,mongodb/mongo-c-driver-legacy,HeliumProject/mongo-c,HeliumProject/mongo-c
61e49bf492c99d95ce46a57a54a7589ee5e184cb
inc/random_hao.h
inc/random_hao.h
#ifndef RANDOM_HAO #define RANDOM_HAO #define SIMPLE_SPRNG #ifdef MPI_HAO #include <mpi.h> #define USE_MPI #endif #include "sprng.h" void random_hao_init(int seed=985456376, int gtype=1); double uniform_hao(); double gaussian_hao(); #endif
#ifndef RANDOM_HAO_H #define RANDOM_HAO_H #define SIMPLE_SPRNG #ifdef MPI_HAO #include <mpi.h> #define USE_MPI #endif #include "sprng.h" void random_hao_init(int seed=985456376, int gtype=1); double uniform_hao(); double gaussian_hao(); #endif
Set the header protection to end with _H.
Set the header protection to end with _H.
C
mit
hshi/random_lib_hao,hshi/random_lib_hao
53ef02baf80130a81d019e85c528fdc13af9db33
providers/implementations/ciphers/cipher_rc5.h
providers/implementations/ciphers/cipher_rc5.h
/* * Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ #include <openssl/rc5.h> #include "prov/ciphercommon.h" typedef struct prov_blowfish_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ union { OSSL_UNION_ALIGN; RC5_32_KEY ks; /* key schedule */ } ks; unsigned int rounds; /* number of rounds */ } PROV_RC5_CTX; const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_cbc(size_t keybits); const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_ecb(size_t keybits); const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_ofb64(size_t keybits); const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_cfb64(size_t keybits);
/* * Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ #include <openssl/rc5.h> #include "prov/ciphercommon.h" typedef struct prov_rc5_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ union { OSSL_UNION_ALIGN; RC5_32_KEY ks; /* key schedule */ } ks; unsigned int rounds; /* number of rounds */ } PROV_RC5_CTX; const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_cbc(size_t keybits); const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_ecb(size_t keybits); const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_ofb64(size_t keybits); const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_cfb64(size_t keybits);
Fix PROV_RC5_CTX's original structure name
Fix PROV_RC5_CTX's original structure name It looks like a typo when copy & pasting the structure from blowfish. Reviewed-by: Shane Lontis <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/19186)
C
apache-2.0
openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl
e01f9a4f0f658c37b10eba1058204c85a0ed79f3
windows/include/config.h
windows/include/config.h
/* liblouis Braille Translation and Back-Translation Library Copyright (C) 2014 ViewPlus Technologies, Inc. www.viewplus.com and the liblouis team. http://liblouis.org All rights reserved This file is free software; you can redistribute it and/or modify it under the terms of the Lesser or Library GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This file 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 Library GNU General Public License for more details. You should have received a copy of the Library GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #define PACKAGE_VERSION "liblouis-2.5.2"
/* liblouis Braille Translation and Back-Translation Library Copyright (C) 2014 ViewPlus Technologies, Inc. www.viewplus.com and the liblouis team. http://liblouis.org All rights reserved This file is free software; you can redistribute it and/or modify it under the terms of the Lesser or Library GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This file 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 Library GNU General Public License for more details. You should have received a copy of the Library GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #define PACKAGE_VERSION "liblouis-2.6.3"
Update the version number in the windows directory
Update the version number in the windows directory
C
lgpl-2.1
BueVest/liblouis,liblouis/liblouis,IndexBraille/liblouis,liblouis/liblouis,hammera/liblouis,vsmontalvao/liblouis,vsmontalvao/liblouis,hammera/liblouis,IndexBraille/liblouis,liblouis/liblouis,IndexBraille/liblouis,vsmontalvao/liblouis,liblouis/liblouis,hammera/liblouis,vsmontalvao/liblouis,hammera/liblouis,vsmontalvao/liblouis,BueVest/liblouis,BueVest/liblouis,hammera/liblouis,IndexBraille/liblouis,BueVest/liblouis,IndexBraille/liblouis,hammera/liblouis,liblouis/liblouis,BueVest/liblouis,BueVest/liblouis,liblouis/liblouis
cb5b3d5fa6244b0d20258203bd9df7e3148af57b
json-glib/tests/node-test.c
json-glib/tests/node-test.c
#include <glib/gtestutils.h> #include <json-glib/json-types.h> #include <string.h> static void test_null (void) { JsonNode *node = json_node_new (JSON_NODE_NULL); g_assert_cmpint (node->type, ==, JSON_NODE_NULL); g_assert_cmpint (json_node_get_value_type (node), ==, G_TYPE_INVALID); g_assert_cmpstr (json_node_type_name (node), ==, "NULL"); json_node_free (node); } int main (int argc, char *argv[]) { g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/nodes/null-node", test_null); return g_test_run (); }
#include <glib/gtestutils.h> #include <json-glib/json-types.h> #include <string.h> static void test_copy (void) { JsonNode *node = json_node_new (JSON_NODE_NULL); JsonNode *copy = json_node_copy (node); g_assert_cmpint (node->type, ==, copy->type); g_assert_cmpint (json_node_get_value_type (node), ==, json_node_get_value_type (copy)); g_assert_cmpstr (json_node_type_name (node), ==, json_node_type_name (copy)); json_node_free (copy); json_node_free (node); } static void test_null (void) { JsonNode *node = json_node_new (JSON_NODE_NULL); g_assert_cmpint (node->type, ==, JSON_NODE_NULL); g_assert_cmpint (json_node_get_value_type (node), ==, G_TYPE_INVALID); g_assert_cmpstr (json_node_type_name (node), ==, "NULL"); json_node_free (node); } int main (int argc, char *argv[]) { g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/nodes/null-node", test_null); g_test_add_func ("/nodes/copy-node", test_copy); return g_test_run (); }
Add a JsonNode copy test unit
Add a JsonNode copy test unit The test unit copies a NULL JsonNode and checks that the copy and the original nodes are equivalent.
C
lgpl-2.1
Distrotech/json-glib,GNOME/json-glib,robtaylor/json-glib-gvariant,robtaylor/json-glib-gvariant,ebassi/json-glib,ebassi/json-glib,brauliobo/json-glib,oerdnj/json-glib,frida/json-glib,oerdnj/json-glib,ebassi/json-glib,oerdnj/json-glib,brauliobo/json-glib,frida/json-glib,brauliobo/json-glib,Distrotech/json-glib,GNOME/json-glib,oerdnj/json-glib,Distrotech/json-glib
d62ff6ee49fcd6b033a01d5a0b067d865c4c4fc8
lib/libc/locale/nomacros.c
lib/libc/locale/nomacros.c
#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* * Tell <ctype.h> to generate extern versions of all its inline * functions. The extern versions get called if the system doesn't * support inlines or the user defines _DONT_USE_CTYPE_INLINE_ * before including <ctype.h>. */ #define _EXTERNALIZE_CTYPE_INLINES_ #include <ctype.h>
#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* * Tell <ctype.h> to generate extern versions of all its inline * functions. The extern versions get called if the system doesn't * support inlines or the user defines _DONT_USE_CTYPE_INLINE_ * before including <ctype.h>. */ #define _EXTERNALIZE_CTYPE_INLINES_ /* * Also make sure <runetype.h> does not generate an inline definition * of __getCurrentRuneLocale(). */ #define __RUNETYPE_INTERNAL #include <ctype.h>
Fix build of libc.so after r232620. This caused a duplicate definition of __getCurrentRuneLocale().
Fix build of libc.so after r232620. This caused a duplicate definition of __getCurrentRuneLocale(). Pointy hat to: me
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
f47fb07147844b0f12e36137d3c65b97b5a59f99
src/json_utils.h
src/json_utils.h
/* * GeeXboX Valhalla: tiny media scanner API. * Copyright (C) 2016 Mathieu Schroeter <[email protected]> * * This file is part of libvalhalla. * * libvalhalla 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. * * libvalhalla 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 libvalhalla; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef VALHALLA_JSON_UTILS_H #define VALHALLA_JSON_UTILS_H #include <json-c/json_tokener.h> char *vh_json_get_str (json_object *json, const char *path); int vh_json_get_int (json_object *json, const char *path); #endif /* VALHALLA_JSON_UTILS_H */
/* * GeeXboX Valhalla: tiny media scanner API. * Copyright (C) 2016 Mathieu Schroeter <[email protected]> * * This file is part of libvalhalla. * * libvalhalla 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. * * libvalhalla 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 libvalhalla; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef VALHALLA_JSON_UTILS_H #define VALHALLA_JSON_UTILS_H #include <json-c/json_tokener.h> json_object *vh_json_get (json_object *json, const char *path); char *vh_json_get_str (json_object *json, const char *path); int vh_json_get_int (json_object *json, const char *path); #endif /* VALHALLA_JSON_UTILS_H */
Add vh_json_get in the API
Add vh_json_get in the API
C
lgpl-2.1
GeeXboX/libvalhalla,GeeXboX/libvalhalla,GeeXboX/libvalhalla,GeeXboX/libvalhalla,GeeXboX/libvalhalla
0cb191b07c9bae9123655267c50f1210da07a48f
AdjustIo/AIResponseData.h
AdjustIo/AIResponseData.h
// // AIResponseData.h // AdjustIo // // Created by Christian Wellenbrock on 07.02.14. // Copyright (c) 2014 adeven. All rights reserved. // typedef enum { AIActivityKindUnknown = 0, AIActivityKindSession = 1, AIActivityKindEvent = 2, AIActivityKindRevenue = 3, // only possible when server could be reached because the SDK can't know // whether or not a session might be an install or reattribution AIActivityKindInstall = 4, AIActivityKindReattribution = 5, } AIActivityKind; @interface AIResponseData : NSObject @property (nonatomic, assign) AIActivityKind activityKind; @property (nonatomic, copy) NSString *trackerToken; @property (nonatomic, copy) NSString *trackerName; @property (nonatomic, copy) NSString *error; + (AIResponseData *)dataWithJsonString:(NSString *)string; - (id)initWithJsonString:(NSString *)string; @end
// // AIResponseData.h // AdjustIo // // Created by Christian Wellenbrock on 07.02.14. // Copyright (c) 2014 adeven. All rights reserved. // typedef enum { AIActivityKindUnknown = 0, AIActivityKindSession = 1, AIActivityKindEvent = 2, AIActivityKindRevenue = 3, // only possible when server could be reached because the SDK can't know // whether or not a session might be an install or reattribution AIActivityKindInstall = 4, AIActivityKindReattribution = 5, } AIActivityKind; @class AIActivityPackage; /* * Information about the result of a tracking attempt * * Will be passed to the delegate function adjustIoTrackedActivityWithResponse */ @interface AIResponseData : NSObject // the kind of activity (install, session, event, etc.) // see the AIActivity definition above @property (nonatomic, assign) AIActivityKind activityKind; // true when the activity was tracked successfully // might be true even if response could not be parsed @property (nonatomic, assign) BOOL success; // true if the server was not reachable and the request will be tried again later @property (nonatomic, assign) BOOL willRetry; // nil if activity was tracked successfully and response could be parsed // might be not nil even when activity was tracked successfully @property (nonatomic, copy) NSString *error; // the following attributes are only set when error is nil // (when activity was tracked successfully and response could be parsed) // tracker token of current device @property (nonatomic, copy) NSString *trackerToken; // tracker name of current device @property (nonatomic, copy) NSString *trackerName; + (AIResponseData *)dataWithJsonString:(NSString *)string; + (AIResponseData *)dataWithError:(NSString *)error; - (id)initWithJsonString:(NSString *)string; - (id)initWithError:(NSString *)error; @end
Add flags success and willRetry to ResponseData
Add flags success and willRetry to ResponseData
C
mit
akolov/adjust,dannycxh/ios_sdk,Threadflip/adjust_ios_sdk,BlueCrystalLabs/ios_sdk,nicolas-brugneaux-sociomantic/ios_sdk,trademob/ios_sdk,pitchtarget/adjust-ios-sdk,mseegers/ios_sdk,yutmr/ios_sdk
ebe94114b14418c11e829e952c2ee92ea42585cb
test/CodeGen/tentative-decls.c
test/CodeGen/tentative-decls.c
// RUN: clang-cc -emit-llvm -o %t %s && // RUN: grep '@r = common global \[1 x .*\] zeroinitializer' %t && int r[]; int (*a)[] = &r; struct s0; struct s0 x; // RUN: grep '@x = common global .struct.s0 zeroinitializer' %t && struct s0 y; // RUN: grep '@y = common global .struct.s0 zeroinitializer' %t && struct s0 *f0() { return &y; } struct s0 { int x; }; // RUN: grep '@b = common global \[1 x .*\] zeroinitializer' %t && int b[]; int *f1() { return b; } // Check that the most recent tentative definition wins. // RUN: grep '@c = common global \[4 x .*\] zeroinitializer' %t && int c[]; int c[4]; // RUN: true
// RUN: clang-cc -emit-llvm -o %t %s && // RUN: grep '@r = common global \[1 x .*\] zeroinitializer' %t && int r[]; int (*a)[] = &r; struct s0; struct s0 x; // RUN: grep '@x = common global .struct.s0 zeroinitializer' %t && struct s0 y; // RUN: grep '@y = common global .struct.s0 zeroinitializer' %t && struct s0 *f0() { return &y; } struct s0 { int x; }; // RUN: grep '@b = common global \[1 x .*\] zeroinitializer' %t && int b[]; int *f1() { return b; } // Check that the most recent tentative definition wins. // RUN: grep '@c = common global \[4 x .*\] zeroinitializer' %t && int c[]; int c[4]; // Check that we emit static tentative definitions // RUN: grep '@c5 = internal global \[1 x .*\] zeroinitializer' %t && static int c5[]; static int func() { return c5[0]; } int callfunc() { return func(); } // RUN: true
Add testcase that illustrates the problem from r69699 regarding tentative definitions of statics
Add testcase that illustrates the problem from r69699 regarding tentative definitions of statics git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@70543 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
5856e5d8890058e383f53dc94e1f0f96645ebbe3
knode/resource.h
knode/resource.h
/* resource.h KNode, the KDE newsreader Copyright (c) 1999-2005 the KNode authors. See file AUTHORS for details This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US */ #ifndef RESSOURCE_H #define RESSOURCE_H #ifdef HAVE_CONFIG_H #include <config.h> #endif //========= KNode Version Information ============ #define KNODE_VERSION "0.9.91" //================= StatusBar ==================== #define SB_MAIN 4000005 #define SB_GROUP 4000010 #define SB_FILTER 4000030 //================== Folders ===================== #define FOLD_DRAFTS 200010 #define FOLD_SENT 200020 #define FOLD_OUTB 200030 #endif // RESOURCE_H
/* resource.h KNode, the KDE newsreader Copyright (c) 1999-2005 the KNode authors. See file AUTHORS for details This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US */ #ifndef RESSOURCE_H #define RESSOURCE_H #ifdef HAVE_CONFIG_H #include <config.h> #endif //========= KNode Version Information ============ #define KNODE_VERSION "0.9.92" //================= StatusBar ==================== #define SB_MAIN 4000005 #define SB_GROUP 4000010 #define SB_FILTER 4000030 //================== Folders ===================== #define FOLD_DRAFTS 200010 #define FOLD_SENT 200020 #define FOLD_OUTB 200030 #endif // RESOURCE_H
Increment version number for 3.5 beta2.
Increment version number for 3.5 beta2. svn path=/branches/KDE/3.5/kdepim/; revision=466310
C
lgpl-2.1
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
5f611e7fd3bf3624dd1202c0e433bc83806e90a4
SIT151/C/PC3/exercice1.c
SIT151/C/PC3/exercice1.c
#include <stdio.h> typedef struct { char last_name[20]; char first_name[15]; int age; } Person; int ask() { printf("1. Add user\n"); printf("2. Quit\n"); return getchar() - 48; } Person createPerson() { Person p; printf("Last name: "); scanf("%s", p.last_name); printf("First name: "); scanf("%s", p.first_name); printf("Age: "); scanf("%d", &p.age); return p; } int main() { FILE *f; if ((f = fopen("users.txt", "a")) != NULL) { int choice; while ((choice = ask()) != 2) { if (choice == 1) { Person p = createPerson(); fprintf(f, "%s_%s_%d\n", p.last_name, p.first_name, p.age); } } fclose(f); } else { printf("Error while opening users.txt\n"); } return 0; }
Add SIT151 C PC3 Ex1
Add SIT151 C PC3 Ex1
C
mit
maxmouchet/tb,maxmouchet/tb,maxmouchet/tb,maxmouchet/tb,maxmouchet/tb,maxmouchet/tb
e0eaf53867defbf7549ac18520fed3f9ded45396
FastEasyMapping/Source/Utility/FEMTypes.h
FastEasyMapping/Source/Utility/FEMTypes.h
// For License please refer to LICENSE file in the root of FastEasyMapping project #import <Foundation/Foundation.h> typedef __nullable id (^FEMMapBlock)(id value __nonnull);
// For License please refer to LICENSE file in the root of FastEasyMapping project #import <Foundation/Foundation.h> typedef __nullable id (^FEMMapBlock)(__nonnull id value);
Add nullability specifiers to FEMMapBlock
Add nullability specifiers to FEMMapBlock
C
mit
langziguilai/FastEasyMapping,pomozoff/FastEasyMapping,k06a/FastEasyMapping
e8ca05d549a6768b697255f42125e940912c7163
Realm/RLMObject_Private.h
Realm/RLMObject_Private.h
//////////////////////////////////////////////////////////////////////////// // // TIGHTDB CONFIDENTIAL // __________________ // // [2011] - [2014] TightDB Inc // All Rights Reserved. // // NOTICE: All information contained herein is, and remains // the property of TightDB Incorporated and its suppliers, // if any. The intellectual and technical concepts contained // herein are proprietary to TightDB Incorporated // and its suppliers and may be covered by U.S. and Foreign Patents, // patents in process, and are protected by trade secret or copyright law. // Dissemination of this information or reproduction of this material // is strictly forbidden unless prior written permission is obtained // from TightDB Incorporated. // //////////////////////////////////////////////////////////////////////////// #import "RLMObject.h" #import "RLMAccessor.h" #import "RLMObjectSchema.h" // RLMObject accessor and read/write realm @interface RLMObject () <RLMAccessor> @property (nonatomic, readwrite) RLMRealm *realm; @property (nonatomic) RLMObjectSchema *schema; @end
//////////////////////////////////////////////////////////////////////////// // // TIGHTDB CONFIDENTIAL // __________________ // // [2011] - [2014] TightDB Inc // All Rights Reserved. // // NOTICE: All information contained herein is, and remains // the property of TightDB Incorporated and its suppliers, // if any. The intellectual and technical concepts contained // herein are proprietary to TightDB Incorporated // and its suppliers and may be covered by U.S. and Foreign Patents, // patents in process, and are protected by trade secret or copyright law. // Dissemination of this information or reproduction of this material // is strictly forbidden unless prior written permission is obtained // from TightDB Incorporated. // //////////////////////////////////////////////////////////////////////////// #import "RLMObject.h" #import "RLMAccessor.h" #import "RLMObjectSchema.h" // RLMObject accessor and read/write realm @interface RLMObject () <RLMAccessor> -(instancetype)initWithDefaultValues:(BOOL)useDefaults; @property (nonatomic, readwrite) RLMRealm *realm; @property (nonatomic) RLMObjectSchema *schema; @end
Declare initWithDefaultValues in private category
Declare initWithDefaultValues in private category
C
apache-2.0
AlexanderMazaletskiy/realm-cocoa,codyDu/realm-cocoa,Palleas/realm-cocoa,sunzeboy/realm-cocoa,duk42111/realm-cocoa,isaacroldan/realm-cocoa,Palleas/realm-cocoa,hejunbinlan/realm-cocoa,nathankot/realm-cocoa,brasbug/realm-cocoa,kevinmlong/realm-cocoa,lumoslabs/realm-cocoa,ChenJian345/realm-cocoa,bestwpw/realm-cocoa,kylebshr/realm-cocoa,iOS--wsl--victor/realm-cocoa,lumoslabs/realm-cocoa,HuylensHu/realm-cocoa,duk42111/realm-cocoa,kevinmlong/realm-cocoa,amuramoto/realm-objc,lumoslabs/realm-cocoa,hejunbinlan/realm-cocoa,amuramoto/realm-objc,sunfei/realm-cocoa,codyDu/realm-cocoa,zilaiyedaren/realm-cocoa,tenebreux/realm-cocoa,iOS--wsl--victor/realm-cocoa,dilizarov/realm-cocoa,zilaiyedaren/realm-cocoa,isaacroldan/realm-cocoa,imjerrybao/realm-cocoa,sunfei/realm-cocoa,amuramoto/realm-objc,yuuki1224/realm-cocoa,tenebreux/realm-cocoa,yuuki1224/realm-cocoa,ul7290/realm-cocoa,kylebshr/realm-cocoa,lumoslabs/realm-cocoa,codyDu/realm-cocoa,nathankot/realm-cocoa,hejunbinlan/realm-cocoa,isaacroldan/realm-cocoa,nathankot/realm-cocoa,AlexanderMazaletskiy/realm-cocoa,duk42111/realm-cocoa,brasbug/realm-cocoa,ul7290/realm-cocoa,imjerrybao/realm-cocoa,isaacroldan/realm-cocoa,neonichu/realm-cocoa,nathankot/realm-cocoa,dilizarov/realm-cocoa,sunfei/realm-cocoa,iOSCowboy/realm-cocoa,bugix/realm-cocoa,ChenJian345/realm-cocoa,Palleas/realm-cocoa,bestwpw/realm-cocoa,hejunbinlan/realm-cocoa,iOSCowboy/realm-cocoa,iOSCowboy/realm-cocoa,lumoslabs/realm-cocoa,neonichu/realm-cocoa,kylebshr/realm-cocoa,amuramoto/realm-objc,ChenJian345/realm-cocoa,xmartlabs/realm-cocoa,thdtjsdn/realm-cocoa,kevinmlong/realm-cocoa,iOS--wsl--victor/realm-cocoa,xmartlabs/realm-cocoa,tenebreux/realm-cocoa,AlexanderMazaletskiy/realm-cocoa,vuchau/realm-cocoa,AlexanderMazaletskiy/realm-cocoa,bestwpw/realm-cocoa,codyDu/realm-cocoa,brasbug/realm-cocoa,kevinmlong/realm-cocoa,kylebshr/realm-cocoa,xmartlabs/realm-cocoa,imjerrybao/realm-cocoa,dilizarov/realm-cocoa,iOSCowboy/realm-cocoa,codyDu/realm-cocoa,dilizarov/realm-cocoa,xmartlabs/realm-cocoa,nathankot/realm-cocoa,vuchau/realm-cocoa,dilizarov/realm-cocoa,hejunbinlan/realm-cocoa,bugix/realm-cocoa,neonichu/realm-cocoa,duk42111/realm-cocoa,sunzeboy/realm-cocoa,tenebreux/realm-cocoa,sunzeboy/realm-cocoa,ul7290/realm-cocoa,Havi4/realm-cocoa,neonichu/realm-cocoa,yuuki1224/realm-cocoa,imjerrybao/realm-cocoa,ul7290/realm-cocoa,vuchau/realm-cocoa,HuylensHu/realm-cocoa,amuramoto/realm-objc,sunfei/realm-cocoa,HuylensHu/realm-cocoa,yuuki1224/realm-cocoa,neonichu/realm-cocoa,Havi4/realm-cocoa,brasbug/realm-cocoa,zilaiyedaren/realm-cocoa,isaacroldan/realm-cocoa,AlexanderMazaletskiy/realm-cocoa,ChenJian345/realm-cocoa,Havi4/realm-cocoa,vuchau/realm-cocoa,brasbug/realm-cocoa,Palleas/realm-cocoa,thdtjsdn/realm-cocoa,thdtjsdn/realm-cocoa,Havi4/realm-cocoa,bugix/realm-cocoa,bugix/realm-cocoa,thdtjsdn/realm-cocoa,bestwpw/realm-cocoa,tenebreux/realm-cocoa,HuylensHu/realm-cocoa,sunfei/realm-cocoa,xmartlabs/realm-cocoa,kylebshr/realm-cocoa,duk42111/realm-cocoa,iOSCowboy/realm-cocoa,sunzeboy/realm-cocoa,sunzeboy/realm-cocoa,iOS--wsl--victor/realm-cocoa,ChenJian345/realm-cocoa,thdtjsdn/realm-cocoa,bugix/realm-cocoa,iOS--wsl--victor/realm-cocoa,HuylensHu/realm-cocoa,bestwpw/realm-cocoa,imjerrybao/realm-cocoa,zilaiyedaren/realm-cocoa,kevinmlong/realm-cocoa,Havi4/realm-cocoa,Palleas/realm-cocoa,zilaiyedaren/realm-cocoa,ul7290/realm-cocoa,vuchau/realm-cocoa,yuuki1224/realm-cocoa
6e1c270aefe2b1387fabd533c8a48cd1a37bdfe7
exec/cnex/support.h
exec/cnex/support.h
#ifndef SUPPORT_H #define SUPPORT_H #include <stdio.h> struct tagTModule; typedef struct tagTExtensionModule { char *module; void *handle; } TExtensionModule; typedef struct tagTExtensions { TExtensionModule *modules; size_t size; } TExtenstions; void path_initPaths(const char *source_path); void path_freePaths(); void path_readModule(struct tagTModule *m); void path_dumpPaths(); FILE *path_findModule(const char *name, char *modulePath); char *path_getFileNameOnly(char *path); char *path_getPathOnly(char *path); TExtensionModule *ext_findModule(const char *moduleName); void ext_insertModule(const char *name, void *handle); void ext_cleanup(void); #endif
#ifndef SUPPORT_H #define SUPPORT_H #include <stdio.h> struct tagTModule; typedef struct tagTExtensionModule { char *module; void *handle; } TExtensionModule; typedef struct tagTExtensions { TExtensionModule *modules; size_t size; } TExtenstions; void path_initPaths(const char *source_path); void path_freePaths(); void path_readModule(struct tagTModule *m); void path_dumpPaths(); FILE *path_findModule(const char *name, char *modulePath); char *path_getFileNameOnly(char *path); char *path_getPathOnly(char *path); TExtensionModule *ext_findModule(const char *moduleName); void ext_insertModule(const char *name, void *handle); void ext_cleanup(void); #endif
Fix incorrect indentation in TExtensionModule struct
Fix incorrect indentation in TExtensionModule struct
C
mit
gitlarryf/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,ghewgill/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,gitlarryf/neon-lang,gitlarryf/neon-lang,gitlarryf/neon-lang
568b603030b89d01f4914c1d9196440337bab3e7
ext/pycall/thread.c
ext/pycall/thread.c
#include "pycall_internal.h" #if defined(PYCALL_THREAD_WIN32) int pycall_tls_create(pycall_tls_key *tls_key) { *tls_key = TlsAlloc(); return *tls_key == TLS_OUT_OF_INDEXES; } void *pycall_tls_get(pycall_tls_key tls_key) { return TlsGetValue(tls_key); } int pycall_tls_set(pycall_tls_key tls_key, void *ptr) { return TlsSetValue(tls_key, th) == 0; } #endif #if defined(PYCALL_THREAD_PTHREAD) int pycall_tls_create(pycall_tls_key *tls_key) { return pthread_key_create(tls_key, NULL); } void *pycall_tls_get(pycall_tls_key tls_key) { return pthread_getspecific(tls_key); } int pycall_tls_set(pycall_tls_key tls_key, void *ptr) { return pthread_setspecific(tls_key, ptr); } #endif
#include "pycall_internal.h" #if defined(PYCALL_THREAD_WIN32) int pycall_tls_create(pycall_tls_key *tls_key) { *tls_key = TlsAlloc(); return *tls_key == TLS_OUT_OF_INDEXES; } void *pycall_tls_get(pycall_tls_key tls_key) { return TlsGetValue(tls_key); } int pycall_tls_set(pycall_tls_key tls_key, void *ptr) { return 0 == TlsSetValue(tls_key, ptr); } #endif #if defined(PYCALL_THREAD_PTHREAD) int pycall_tls_create(pycall_tls_key *tls_key) { return pthread_key_create(tls_key, NULL); } void *pycall_tls_get(pycall_tls_key tls_key) { return pthread_getspecific(tls_key); } int pycall_tls_set(pycall_tls_key tls_key, void *ptr) { return pthread_setspecific(tls_key, ptr); } #endif
Fix compile error on Windows
Fix compile error on Windows
C
mit
mrkn/pycall,mrkn/pycall,mrkn/pycall.rb,mrkn/pycall,mrkn/pycall.rb,mrkn/pycall,mrkn/pycall.rb,mrkn/pycall.rb
9a6d7f4f5c4e29d69a151b6218ff6e8cc9582e7f
timing-test.c
timing-test.c
#include "lib/timing.h" task main() { writeDebugStreamLine("Waiting 1 second"); resetTimeDelta(); getTimeDelta(); wait1Msec(1000); writeDebugStreamLine("delta: %d", getTimeDelta()); writeDebugStreamLine("Waiting 5 seconds"); resetTimeDelta(); getTimeDelta(); wait1Msec(5000); writeDebugStreamLine("delta: %d", getTimeDelta()); writeDebugStreamLine("Waiting 10 seconds"); resetTimeDelta(); getTimeDelta(); wait1Msec(10000); writeDebugStreamLine("delta: %d", getTimeDelta()); }
#include "lib/timing.h" task main() { // getTimeDelta() writeDebugStreamLine("Testing getTimeDelta()"); writeDebugStreamLine("Waiting 1 second"); resetTimeDelta(); getTimeDelta(); wait1Msec(1000); writeDebugStreamLine("delta: %d", getTimeDelta()); writeDebugStreamLine("Waiting 5 seconds"); resetTimeDelta(); getTimeDelta(); wait1Msec(5000); writeDebugStreamLine("delta: %d", getTimeDelta()); writeDebugStreamLine("Waiting 10 seconds"); resetTimeDelta(); getTimeDelta(); wait1Msec(10000); writeDebugStreamLine("delta: %d", getTimeDelta()); writeDebugStreamLine("Testing getTimeDeltaTimer() (using default timer)"); writeDebugStreamLine("Waiting 1 second"); resetTimeDeltaTimer(); getTimeDeltaTimer(); wait1Msec(1000); writeDebugStreamLine("delta: %d", getTimeDeltaTimer()); writeDebugStreamLine("Waiting 5 seconds"); resetTimeDeltaTimer(); getTimeDeltaTimer(); wait1Msec(5000); writeDebugStreamLine("delta: %d", getTimeDeltaTimer()); writeDebugStreamLine("Waiting 10 seconds"); resetTimeDeltaTimer(); getTimeDeltaTimer(); wait1Msec(10000); writeDebugStreamLine("delta: %d", getTimeDeltaTimer()); }
Add tests for alternative timing method
Add tests for alternative timing method
C
mit
patrickmess/ftc-2013,patrickmess/ftc-2013
b933e0fbb8c85434bf54f772dd07b57e52440089
cocoa/BugsnagReactNative.h
cocoa/BugsnagReactNative.h
#import <Foundation/Foundation.h> #import <React/RCTBridgeModule.h> #if __has_include(<React/RCTBridge.h>) // React Native >= 0.40 #import <React/RCTBridge.h> #else // React Native <= 0.39 #import "RCTBridge.h" #endif @class BugsnagConfiguration; @interface BugsnagReactNative: NSObject <RCTBridgeModule> /** * Initializes the crash handler with the default options and using the API key * stored in the Info.plist using the key "BugsnagAPIKey" */ + (void)start; /** * Initializes the crash handler with the default options * @param APIKey the API key to use when sending error reports */ + (void)startWithAPIKey:(NSString *)APIKey; /** * Initializes the crash handler with custom options * @param config the configuration options to use */ + (void)startWithConfiguration:(BugsnagConfiguration *)config; - (void)startWithOptions:(NSDictionary *)options; - (void)leaveBreadcrumb:(NSDictionary *)options; - (void)notify:(NSDictionary *)payload; - (void)setUser:(NSDictionary *)userInfo; - (void)clearUser; - (void)startSession; @end
#import <Foundation/Foundation.h> #import <React/RCTBridgeModule.h> #if __has_include(<React/RCTBridge.h>) // React Native >= 0.40 #import <React/RCTBridge.h> #else // React Native <= 0.39 #import "RCTBridge.h" #endif @class BugsnagConfiguration; @interface BugsnagReactNative: NSObject <RCTBridgeModule> /** * Initializes the crash handler with the default options and using the API key * stored in the Info.plist using the key "BugsnagAPIKey" */ + (void)start; /** * Initializes the crash handler with the default options * @param APIKey the API key to use when sending error reports */ + (void)startWithAPIKey:(NSString *)APIKey; /** * Initializes the crash handler with custom options * @param config the configuration options to use */ + (void)startWithConfiguration:(BugsnagConfiguration *)config; - (void)startWithOptions:(NSDictionary *)options; - (void)leaveBreadcrumb:(NSDictionary *)options; - (void)notify:(NSDictionary *)payload resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject; - (void)setUser:(NSDictionary *)userInfo; - (void)clearUser; - (void)startSession; @end
Synchronize decl and impl of notify(…)
fix: Synchronize decl and impl of notify(…)
C
mit
bugsnag/bugsnag-react-native,bugsnag/bugsnag-react-native,bugsnag/bugsnag-react-native,bugsnag/bugsnag-react-native,bugsnag/bugsnag-react-native
322b07ff24932fb0e59114e30620e47501a84191
core/imt/inc/LinkDef.h
core/imt/inc/LinkDef.h
#ifdef __CLING__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; // Only for the autoload, autoparse. No IO of these classes is foreseen! #pragma link C++ class ROOT::Internal::TPoolManager-; #pragma link C++ class ROOT::TThreadExecutor-; #pragma link C++ class ROOT::Experimental::TTaskGroup-; #endif
#ifdef __CLING__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; // Only for the autoload, autoparse. No IO of these classes is foreseen! // Exclude in case ROOT does not have IMT support #ifdef R__USE_IMT #pragma link C++ class ROOT::Internal::TPoolManager-; #pragma link C++ class ROOT::TThreadExecutor-; #pragma link C++ class ROOT::Experimental::TTaskGroup-; #endif #endif
Fix warning during dictionary generation in no-imt builds
[IMT] Fix warning during dictionary generation in no-imt builds
C
lgpl-2.1
karies/root,olifre/root,olifre/root,karies/root,karies/root,olifre/root,olifre/root,olifre/root,olifre/root,root-mirror/root,root-mirror/root,root-mirror/root,olifre/root,root-mirror/root,root-mirror/root,olifre/root,karies/root,karies/root,karies/root,root-mirror/root,root-mirror/root,olifre/root,karies/root,karies/root,karies/root,root-mirror/root,olifre/root,karies/root,olifre/root,root-mirror/root,root-mirror/root,root-mirror/root,karies/root
b858676194b9e384789bc9d506136c37e5da015a
src/validation.h
src/validation.h
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Dash Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_VALIDATION_H #define BITCOIN_VALIDATION_H #include <stdint.h> #include <string> static const int64_t DEFAULT_MAX_TIP_AGE = 6 * 60 * 60; // ~144 blocks behind -> 2 x fork detection time, was 24 * 60 * 60 in bitcoin extern int64_t nMaxTipAge; FILE* OpenBlockFile(unsigned int nFile, unsigned int nBlockPos, const char* pszMode="rb"); FILE* AppendBlockFile(unsigned int& nFileRet); bool IsInitialBlockDownload(); #endif // BITCOIN_VALIDATION_H
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Dash Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_VALIDATION_H #define BITCOIN_VALIDATION_H #include <stdint.h> #include <string> static const int64_t DEFAULT_MAX_TIP_AGE = 1 * 60 * 60; // ~45 blocks behind -> 2 x fork detection time, was 24 * 60 * 60 in bitcoin extern int64_t nMaxTipAge; FILE* OpenBlockFile(unsigned int nFile, unsigned int nBlockPos, const char* pszMode="rb"); FILE* AppendBlockFile(unsigned int& nFileRet); bool IsInitialBlockDownload(); #endif // BITCOIN_VALIDATION_H
Adjust default max tip age
Adjust default max tip age
C
mit
neutroncoin/neutron,neutroncoin/neutron,neutroncoin/neutron,neutroncoin/neutron
40e67dea90605c430fae7e010090886f137d5107
searchlib/src/vespa/searchlib/common/sequencedtaskexecutor.h
searchlib/src/vespa/searchlib/common/sequencedtaskexecutor.h
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "isequencedtaskexecutor.h" #include <vector> namespace vespalib { struct ExecutorStats; class SyncableThreadExecutor; } namespace search { /** * Class to run multiple tasks in parallel, but tasks with same * id has to be run in sequence. */ class SequencedTaskExecutor final : public ISequencedTaskExecutor { using Stats = vespalib::ExecutorStats; std::unique_ptr<std::vector<std::unique_ptr<vespalib::SyncableThreadExecutor>>> _executors; SequencedTaskExecutor(std::unique_ptr<std::vector<std::unique_ptr<vespalib::SyncableThreadExecutor>>> executor); public: enum class Optimize {LATENCY, THROUGHPUT}; using ISequencedTaskExecutor::getExecutorId; ~SequencedTaskExecutor(); void setTaskLimit(uint32_t taskLimit) override; void executeTask(ExecutorId id, vespalib::Executor::Task::UP task) override; void sync() override; Stats getStats() override; static std::unique_ptr<ISequencedTaskExecutor> create(uint32_t threads, uint32_t taskLimit = 1000, Optimize optimize = Optimize::THROUGHPUT); }; } // namespace search
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "isequencedtaskexecutor.h" #include <vector> namespace vespalib { struct ExecutorStats; class SyncableThreadExecutor; } namespace search { /** * Class to run multiple tasks in parallel, but tasks with same * id has to be run in sequence. */ class SequencedTaskExecutor final : public ISequencedTaskExecutor { using Stats = vespalib::ExecutorStats; std::unique_ptr<std::vector<std::unique_ptr<vespalib::SyncableThreadExecutor>>> _executors; SequencedTaskExecutor(std::unique_ptr<std::vector<std::unique_ptr<vespalib::SyncableThreadExecutor>>> executor); public: enum class Optimize {LATENCY, THROUGHPUT}; using ISequencedTaskExecutor::getExecutorId; ~SequencedTaskExecutor(); void setTaskLimit(uint32_t taskLimit) override; void executeTask(ExecutorId id, vespalib::Executor::Task::UP task) override; void sync() override; Stats getStats() override; /* * Note that if you choose Optimize::THROUGHPUT, you must ensure only a single producer, or synchronize on the outside. */ static std::unique_ptr<ISequencedTaskExecutor> create(uint32_t threads, uint32_t taskLimit = 1000, Optimize optimize = Optimize::LATENCY); }; } // namespace search
Add comment about thread safety.
Add comment about thread safety.
C
apache-2.0
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
b640cc489b65153efcb519feb9038d658b4bf005
components/run_command.c
components/run_command.c
/* See LICENSE file for copyright and license details. */ #include <errno.h> #include <stdio.h> #include <string.h> #include "../util.h" const char * run_command(const char *cmd) { char *p; FILE *fp; if (!(fp = popen(cmd, "r"))) { warn("popen '%s':", cmd); return NULL; } p = fgets(buf, sizeof(buf) - 1, fp); pclose(fp); if (!p) { return NULL; } if ((p = strrchr(buf, '\n'))) { p[0] = '\0'; } return buf[0] ? buf : NULL; }
/* See LICENSE file for copyright and license details. */ #include <errno.h> #include <stdio.h> #include <string.h> #include "../util.h" const char * run_command(const char *cmd) { char *p; FILE *fp; if (!(fp = popen(cmd, "r"))) { warn("popen '%s':", cmd); return NULL; } p = fgets(buf, sizeof(buf) - 1, fp); if (pclose(fp) < 0) { warn("pclose '%s':", cmd); return NULL; } if (!p) { return NULL; } if ((p = strrchr(buf, '\n'))) { p[0] = '\0'; } return buf[0] ? buf : NULL; }
Check return value of pclose()
Check return value of pclose()
C
isc
drkh5h/slstatus,drkhsh/slstatus
355f66f9f5de18497e7a3bb364d266cdd4e91cda
mud/home/Verb/initd.c
mud/home/Verb/initd.c
/* * 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 <kotaka/paths/system.h> #include <kotaka/privilege.h> inherit LIB_INITD; inherit UTILITY_COMPILE; private void load() { load_dir("sys"); } private void set_limits() { reset_limits(); } static void create() { load(); set_limits(); } void upgrade() { ACCESS_CHECK(previous_program() == OBJECTD); set_limits(); }
/* * 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 <kotaka/paths/system.h> #include <kotaka/privilege.h> inherit LIB_INITD; inherit UTILITY_COMPILE; private void load() { load_dir("sys"); } private void set_limits() { reset_limits(); } static void create() { set_limits(); load(); } void upgrade() { ACCESS_CHECK(previous_program() == OBJECTD); set_limits(); }
Set resource limits before loading
Set resource limits before loading
C
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
3dd39e7abbe813ad63fe0137e6a1e17fcaa506c1
tests/regression/29-svcomp/31-dd-address-meet.c
tests/regression/29-svcomp/31-dd-address-meet.c
// PARAM: --enable annotation.int.enabled #include <stdlib.h> #include <goblint.h> struct slotvec { size_t size ; char *val ; }; static char slot0[256] ; static struct slotvec slotvec0 = {sizeof(slot0), slot0}; static void install_signal_handlers(void) { { if(!(slotvec0.val == & slot0[0LL])) { reach_error(); abort(); } }; } int main(int argc , char **argv ) { // Goblint used to consider both branches in this condition to be dead, because the meet on addresses with different active int domains was broken { if(!(slotvec0.val == & slot0[0LL])) { reach_error(); abort(); } }; install_signal_handlers(); // Should be reachable __goblint_check(1); return 0; }
// PARAM: --enable annotation.int.enabled // This option enables ALL int domains for globals #include <stdlib.h> #include <goblint.h> struct slotvec { size_t size ; char *val ; }; static char slot0[256] ; static struct slotvec slotvec0 = {sizeof(slot0), slot0}; static void install_signal_handlers(void) { { if(!(slotvec0.val == & slot0[0LL])) { reach_error(); abort(); } }; } int main(int argc , char **argv ) { // Goblint used to consider both branches in this condition to be dead, because the meet on addresses with different active int domains was broken { if(!(slotvec0.val == & slot0[0LL])) { reach_error(); abort(); } }; install_signal_handlers(); // Should be reachable __goblint_check(1); return 0; }
Add comment explaining impact of option in test case
Add comment explaining impact of option in test case Co-authored-by: Michael Schwarz <[email protected]>
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
85dc3a8945fca037d130134cb687e6e6b188b596
src/math/p_ln.c
src/math/p_ln.c
#include <pal.h> /** * * Calculates the natural logarithm of 'a', (where the base is 'e'=2.71828) * * @param a Pointer to input vector * * @param c Pointer to output vector * * @param n Size of 'a' and 'c' vector. * * @param p Number of processor to use (task parallelism) * * @param team Team to work with * * @return None * */ #include <math.h> void p_ln_f32(const float *a, float *c, int n, int p, p_team_t team) { int i; for (i = 0; i < n; i++) { *(c + i) = logf(*(a + i)); } }
#include <pal.h> /** * * Calculates the natural logarithm of 'a', (where the base is 'e'=2.71828) * * @param a Pointer to input vector * * @param c Pointer to output vector * * @param n Size of 'a' and 'c' vector. * * @param p Number of processor to use (task parallelism) * * @param team Team to work with * * @return None * */ void p_ln_f32(const float *a, float *c, int n, int p, p_team_t team) { int i; for (i = 0; i < n; i++) { union { float f; uint32_t i; } u = { *(a + i) }; // Calculate the exponent (which is the floor of the logarithm) minus one int e = ((u.i >> 23) & 0xff) - 0x80; // Mask off the exponent, leaving just the mantissa u.i = (u.i & 0x7fffff) + 0x3f800000; // Interpolate using a cubic minimax polynomial derived with // the Remez exchange algorithm. Coefficients courtesy of Alex Kan. // This approximates 1 + log2 of the mantissa. float r = ((0.15824870f * u.f - 1.05187502f) * u.f + 3.04788415f) * u.f - 1.15360271f; // The log2 of the complete value is then the sum // of the previous quantities (the 1's cancel), and // we find the natural log by scaling by log2(e). *(c + i) = (e + r) * 0.69314718f; } }
Implement faster natural log function
Implement faster natural log function Signed-off-by: Warren Moore <[email protected]>
C
apache-2.0
eliteraspberries/pal,parallella/pal,olajep/pal,aolofsson/pal,debug-de-su-ka/pal,debug-de-su-ka/pal,olajep/pal,parallella/pal,aolofsson/pal,eliteraspberries/pal,8l/pal,8l/pal,RafaelRMA/pal,aolofsson/pal,olajep/pal,parallella/pal,8l/pal,Adamszk/pal3,8l/pal,eliteraspberries/pal,mateunho/pal,Adamszk/pal3,mateunho/pal,parallella/pal,eliteraspberries/pal,eliteraspberries/pal,RafaelRMA/pal,debug-de-su-ka/pal,aolofsson/pal,Adamszk/pal3,RafaelRMA/pal,Adamszk/pal3,mateunho/pal,mateunho/pal,mateunho/pal,RafaelRMA/pal,debug-de-su-ka/pal,parallella/pal,olajep/pal,debug-de-su-ka/pal
e836bae30c73e4d63e1126c3308dccba350a4154
include/llvm/CodeGen/SSARegMap.h
include/llvm/CodeGen/SSARegMap.h
//===-- llvm/CodeGen/SSARegMap.h --------------------------------*- C++ -*-===// // // Map register numbers to register classes that are correctly sized (typed) to // hold the information. Assists register allocation. Contained by // MachineFunction, should be deleted by register allocator when it is no // longer needed. // //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_SSAREGMAP_H #define LLVM_CODEGEN_SSAREGMAP_H #include "llvm/Target/MRegisterInfo.h" class TargetRegisterClass; class SSARegMap { std::vector<const TargetRegisterClass*> RegClassMap; unsigned rescale(unsigned Reg) { return Reg - MRegisterInfo::FirstVirtualRegister; } public: const TargetRegisterClass* getRegClass(unsigned Reg) { unsigned actualReg = rescale(Reg); assert(actualReg < RegClassMap.size() && "Register out of bounds"); return RegClassMap[actualReg]; } void addRegMap(unsigned Reg, const TargetRegisterClass* RegClass) { assert(rescale(Reg) == RegClassMap.size() && "Register mapping not added in sequential order!"); RegClassMap.push_back(RegClass); } }; #endif
//===-- llvm/CodeGen/SSARegMap.h --------------------------------*- C++ -*-===// // // Map register numbers to register classes that are correctly sized (typed) to // hold the information. Assists register allocation. Contained by // MachineFunction, should be deleted by register allocator when it is no // longer needed. // //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_SSAREGMAP_H #define LLVM_CODEGEN_SSAREGMAP_H #include "llvm/Target/MRegisterInfo.h" class TargetRegisterClass; class SSARegMap { std::vector<const TargetRegisterClass*> RegClassMap; unsigned rescale(unsigned Reg) { return Reg - MRegisterInfo::FirstVirtualRegister; } public: const TargetRegisterClass* getRegClass(unsigned Reg) { unsigned actualReg = rescale(Reg); assert(actualReg < RegClassMap.size() && "Register out of bounds"); return RegClassMap[actualReg]; } /// createVirtualRegister - Create and return a new virtual register in the /// function with the specified register class. /// unsigned createVirtualRegister(const TargetRegisterClass *RegClass) { RegClassMap.push_back(RegClass); return RegClassMap.size()+MRegisterInfo::FirstVirtualRegister-1; } }; #endif
Simplify interface to creating a register
Simplify interface to creating a register git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@5211 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm
c0d2000ad1a76b23efb1773cf8db0c45cef560d0
Source/UnrealCV/Private/libs/cnpy.h
Source/UnrealCV/Private/libs/cnpy.h
// Copyright (C) 2011 Carl Rogers // Released under MIT License // Simplied by Weichao Qiu ([email protected]) from https://github.com/rogersce/cnpy #pragma once #include <vector> namespace cnpy { template<typename T> std::vector<char> create_npy_header(const T* data, const std::vector<int> shape); template<typename T> std::vector<char>& operator+=(std::vector<char>& lhs, const T rhs) { //write in little endian for (char byte = 0; byte < sizeof(T); byte++) { char val = *((char*)&rhs + byte); lhs.push_back(val); } return lhs; } template<> std::vector<char>& operator+=(std::vector<char>& lhs, const std::string rhs); template<> std::vector<char>& operator+=(std::vector<char>& lhs, const char* rhs); }
// Copyright (C) 2011 Carl Rogers // Released under MIT License // Simplied by Weichao Qiu ([email protected]) from https://github.com/rogersce/cnpy #pragma once #include <vector> #include <string> namespace cnpy { template<typename T> std::vector<char> create_npy_header(const T* data, const std::vector<int> shape); template<typename T> std::vector<char>& operator+=(std::vector<char>& lhs, const T rhs) { //write in little endian for (char byte = 0; byte < sizeof(T); byte++) { char val = *((char*)&rhs + byte); lhs.push_back(val); } return lhs; } template<> std::vector<char>& operator+=(std::vector<char>& lhs, const std::string rhs); template<> std::vector<char>& operator+=(std::vector<char>& lhs, const char* rhs); }
Fix a compilation error for UE4.12.
Fix a compilation error for UE4.12.
C
mit
unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv
8597a0bd12c09d88dc5a41072446af219055b1ae
messagebox.c
messagebox.c
#include <stdlib.h> #include <stdio.h> #include <errno.h> #include <windows.h> #define URL "https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505\ (v=vs.85).aspx" #define VERSION "0.1.0" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPSTR lpCmdLine, int nShowCmd) { LPWSTR *szArgList; int argCount; szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount); if (szArgList == NULL) { fprintf(stderr, "Unable to parse the command line.\n"); return 255; } if (argCount < 3 || argCount > 4) { fprintf(stderr, "Batch MessageBox v" VERSION "\n", szArgList[0]); fprintf(stderr, "Usage: %ls message title [type]\n\n", szArgList[0]); fprintf(stderr, "Calls MessageBoxW() with the given arguments. See\n" URL "\nfor the possible values of \"type\". " "ERRORLEVEL is the return value or 255 on\nerror.\n"); return 255; } int type = _wtoi(szArgList[3]); int button = MessageBoxW(NULL, szArgList[1], szArgList[2], type); LocalFree(szArgList); return button; }
#include <stdlib.h> #include <stdio.h> #include <errno.h> #include <windows.h> #define URL "https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505\ (v=vs.85).aspx" #define VERSION "0.1.0" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPSTR lpCmdLine, int nShowCmd) { LPWSTR *szArgList; int argCount; szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount); if (szArgList == NULL) { fprintf(stderr, "Unable to parse the command line.\n"); return 255; } if (argCount < 3 || argCount > 4) { fprintf(stderr, "Batch MessageBox v" VERSION "\n"); fprintf(stderr, "Usage: %ls message title [type]\n\n", szArgList[0]); fprintf(stderr, "Calls MessageBoxW() with the given arguments. See\n" URL "\nfor the possible values of \"type\". " "ERRORLEVEL is the return value or 255 on\nerror.\n"); return 255; } /* Ignore _wtoi errors. */ int type = _wtoi(szArgList[3]); int button = MessageBoxW(NULL, szArgList[1], szArgList[2], type); LocalFree(szArgList); return button; }
Remove unused fprintf arg; add comment on _wtoi
Remove unused fprintf arg; add comment on _wtoi
C
mit
dbohdan/messagebox,dbohdan/messagebox
780f85f9521ae28669cd25bad8ffe8d74f7c913c
src/hexutil/basics/datum.h
src/hexutil/basics/datum.h
#ifndef DATUM_H #define DATUM_H #include "hexutil/basics/atom.h" // The variant must be wrapped like this, otherwise the compiler will get confused about which overload to use struct Datum { Datum(): value(0) { } Datum(int x): value(x) { } boost::variant<Atom, int, float, std::string> value; Datum& operator=(const Datum& x) { value = x.value; return *this; } bool operator==(const Datum& x) const { return value == x.value; } Datum& operator=(const int& x) { value = x; return *this; } bool operator==(const int& x) const { return boost::get<int>(value) == x; } template<typename T> operator T() const { return boost::get<T>(value); } template<typename T> bool is() const { return boost::get<T>(&value) != nullptr; } template<typename T> const T& get() const { return boost::get<T>(value); } std::string get_as_str() const; Atom get_as_atom() const; int get_as_int() const; }; std::ostream& operator<<(std::ostream& os, const Datum& atom); #endif
#ifndef DATUM_H #define DATUM_H #include "hexutil/basics/atom.h" // The variant must be wrapped like this, otherwise the compiler will get confused about which overload to use struct Datum { Datum(): value(0) { } Datum(int x): value(x) { } Datum(const std::string& x): value(x) { } boost::variant<Atom, int, float, std::string> value; Datum& operator=(const Datum& x) { value = x.value; return *this; } bool operator==(const Datum& x) const { return value == x.value; } Datum& operator=(const Atom& x) { value = x; return *this; } bool operator==(const Atom& x) const { return boost::get<Atom>(value) == x; } Datum& operator=(const int& x) { value = x; return *this; } bool operator==(const int& x) const { return boost::get<int>(value) == x; } template<typename T> operator T() const { return boost::get<T>(value); } template<typename T> bool is() const { return boost::get<T>(&value) != nullptr; } template<typename T> const T& get() const { return boost::get<T>(value); } std::string get_as_str() const; Atom get_as_atom() const; int get_as_int() const; }; std::ostream& operator<<(std::ostream& os, const Datum& atom); #endif
Support comparing Datums against Atoms.
Support comparing Datums against Atoms.
C
mit
ejrh/hex,ejrh/hex
ed52a05fc53cd69c6155ba72467b35f7994a68ce
libredex/SpartaInterprocedural.h
libredex/SpartaInterprocedural.h
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Analyzer.h" #include "CallGraph.h" #include "DexClass.h" #include "MonotonicFixpointIterator.h" namespace sparta_interprocedural { struct AnalysisAdaptorBase { using Function = const DexMethod*; using Program = const Scope&; using CallGraphInterface = call_graph::GraphInterface; // Uses the serial fixpoint iterator by default. The user can override this // type alias to use the parallel fixpoint. template <typename GraphInterface, typename Domain> using FixpointIteratorBase = sparta::MonotonicFixpointIterator<GraphInterface, Domain>; // The summary argument is unused in the adaptor base. Only certain // analyses will require this argument, in which case this function // should be *overriden* in the derived class. template <typename FunctionSummaries> static call_graph::Graph call_graph_of(const Scope& scope, FunctionSummaries* /*summaries*/) { // TODO: build method override graph and merge them together? // TODO: build once and cache it in the memory because the framework // will call it on every top level iteration. return call_graph::single_callee_graph(scope); } }; } // namespace sparta_interprocedural
Create IR adaptor for sparta interprocedural facilities
Create IR adaptor for sparta interprocedural facilities Summary: If the IR has a call graph and the GraphInterface is already defined for Sparta, this should be easy. Reviewed By: jeremydubreil Differential Revision: D19665016 fbshipit-source-id: f987f9a94152e1040f2d82c7d3d72f18282d2309
C
mit
facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex
55ad95c141b0962dda7f3d530e6ec9c7f143ec1d
test/src/main.c
test/src/main.c
#include <stdio.h> #include "main.h" int main() { printf("Test goes here.\n"); }
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include "rtree.h" #include "minunit.h" #include "main.h" int tests_run = 0; static char *test_all_kept() { for (int count = 0; count < 1000; count++) { rtree_t *rt = rtree_create(); for (uintptr_t i = 0; i < count; i++) { rtree_add(rt, (void *) i, (double) drand48()); } char *recvd = calloc(count, sizeof(char)); for (int i = 0; i < count; i++) { int pos = (int) ((uintptr_t) rtree_rpop(rt)); recvd[pos]++; } for (int i = 0; i < count; i++) { char *err_msg = calloc(80, sizeof(char)); sprintf(err_msg, "Expected exactly 1 elt with value %d, but was %d\n", i, recvd[i]); mu_assert(err_msg, recvd[i] == 1); free(err_msg); } free(recvd); rtree_destroy(rt); } return 0; } static char *all_tests() { mu_run_test(test_all_kept); return 0; } int main() { char *result = all_tests(); if (result != 0) { printf("%s\n", result); } else { printf("All tests passed.\n"); } printf("Tests run: %d\n", tests_run); return result != 0; }
Add in check to ensure all elements are included.
Add in check to ensure all elements are included.
C
mit
hyPiRion/roulette-tree,hyPiRion/roulette-tree
9bce7326cef3665966a756236c5b9284e776aeed
src/omnicore/sto.h
src/omnicore/sto.h
#ifndef OMNICORE_STO_H #define OMNICORE_STO_H #include <stdint.h> #include <set> #include <string> #include <utility> namespace mastercore { //! Comparator for owner/receiver entries struct SendToOwners_compare { bool operator()(const std::pair<int64_t, std::string>& p1, const std::pair<int64_t, std::string>& p2) const; }; //! Fee required to be paid per owner/receiver, nominated in willets const int64_t TRANSFER_FEE_PER_OWNER = 1; const int64_t TRANSFER_FEE_PER_OWNER_V1 = 100; //! Set of owner/receivers, sorted by amount they own or might receive typedef std::set<std::pair<int64_t, std::string>, SendToOwners_compare> OwnerAddrType; /** Determines the receivers and amounts to distribute. */ OwnerAddrType STO_GetReceivers(const std::string& sender, uint32_t property, int64_t amount); } #endif // OMNICORE_STO_H
#ifndef OMNICORE_STO_H #define OMNICORE_STO_H #include <stdint.h> #include <set> #include <string> #include <utility> namespace mastercore { //! Comparator for owner/receiver entries struct SendToOwners_compare { bool operator()(const std::pair<int64_t, std::string>& p1, const std::pair<int64_t, std::string>& p2) const; }; //! Fee required to be paid per owner/receiver, nominated in willets const int64_t TRANSFER_FEE_PER_OWNER = 1; const int64_t TRANSFER_FEE_PER_OWNER_V1 = 1000; //! Set of owner/receivers, sorted by amount they own or might receive typedef std::set<std::pair<int64_t, std::string>, SendToOwners_compare> OwnerAddrType; /** Determines the receivers and amounts to distribute. */ OwnerAddrType STO_GetReceivers(const std::string& sender, uint32_t property, int64_t amount); } #endif // OMNICORE_STO_H
Change STOv1 fee per recipient to 0.00001000 OMNI
Change STOv1 fee per recipient to 0.00001000 OMNI
C
mit
OmniLayer/omnicore,OmniLayer/omnicore,OmniLayer/omnicore,OmniLayer/omnicore,OmniLayer/omnicore,OmniLayer/omnicore
e28dd839113fb558faf877c9c097de6c7dcf5361
games/hack/hack.version.c
games/hack/hack.version.c
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.version.c - version 1.0.3 */ /* $Header: hack.version.c,v 1.5 85/05/09 00:40:41 aeb Exp $ */ #include "date.h" doversion(){ pline("%s 1.0.3 - last edit %s.", ( #ifdef QUEST "Quest" #else "Hack" #endif QUEST ), datestring); return(0); }
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.version.c - version 1.0.3 */ /* $Id$ */ #include "date.h" doversion(){ pline("%s 1.0.3 - last edit %s.", ( #ifdef QUEST "Quest" #else "Hack" #endif QUEST ), datestring); return(0); }
Use Id instead of Header.
Use Id instead of Header.
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
d14e9e78e427139e30c538242c5e65e895890067
test/FrontendC/2007-03-27-VarLengthArray.c
test/FrontendC/2007-03-27-VarLengthArray.c
// RUN: %llvmgcc -S %s -o - | grep {getelementptr i32} extern void f(int *); int e(int m, int n) { int x[n]; f(x); return x[m]; }
// RUN: %llvmgcc -S %s -o - | grep {getelementptr \\\[0 x i32\\\]} extern void f(int *); int e(int m, int n) { int x[n]; f(x); return x[m]; }
Adjust this test for recent llvm-gcc changes.
Adjust this test for recent llvm-gcc changes. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@65771 91177308-0d34-0410-b5e6-96231b3b80d8
C
bsd-2-clause
dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm
7dc6acf0160e2e66043e90a632aea9b03bf76f93
iPhoneClient/Classes/model/NearbyObjectProtocol.h
iPhoneClient/Classes/model/NearbyObjectProtocol.h
// // NearbyObjectProtocol.h // ARIS // // Created by Brian Deith on 5/15/09. // Copyright 2009 __MyCompanyName__. All rights reserved. // enum { NearbyObjectNPC = 1, NearbyObjectItem = 2, NearbyObjectNode = 3 }; typedef UInt32 nearbyObjectKind; @protocol NearbyObjectProtocol - (NSString *)name; - (nearbyObjectKind)kind; - (BOOL)forcedDisplay; - (void)display; @end
Include nearby object protocol file
Include nearby object protocol file
C
mit
fielddaylab/sifter-ios,fielddaylab/sifter-ios
9562add2370844336a6cc14034fcada04b34fe4a
lib/Target/X86/X86InstrBuilder.h
lib/Target/X86/X86InstrBuilder.h
//===-- X86InstrBuilder.h - Functions to aid building x86 insts -*- C++ -*-===// // // This file exposes functions that may be used with BuildMI from the // MachineInstrBuilder.h file to handle X86'isms in a clean way. // // The BuildMem function may be used with the BuildMI function to add entire // memory references in a single, typed, function call. X86 memory references // can be very complex expressions (described in the README), so wrapping them // up behind an easier to use interface makes sense. Descriptions of the // functions are included below. // //===----------------------------------------------------------------------===// #ifndef X86INSTRBUILDER_H #define X86INSTRBUILDER_H #include "llvm/CodeGen/MachineInstrBuilder.h" /// addDirectMem - This function is used to add a direct memory reference to the /// current instruction. Because memory references are always represented with /// four values, this adds: Reg, [1, NoReg, 0] to the instruction /// inline const MachineInstrBuilder &addDirectMem(const MachineInstrBuilder &MIB, unsigned Reg) { return MIB.addReg(Reg).addZImm(1).addMReg(0).addSImm(0); } #endif
Add functions to buld X86 specific constructs
Add functions to buld X86 specific constructs git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@4714 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm
32d67adf4196541bd6b4bc425886eb30e760978f
mud/home/Account/lib/blacklist.c
mud/home/Account/lib/blacklist.c
#include <kernel/kernel.h> #include <kotaka/paths/account.h> static int is_control_garbage(string input) { if (strlen(input) >= 1 && input[0] < ' ') { return 1; } return 0; } static int is_http_garbage(string input) { if (strlen(input) >= 4 && input[0 .. 3] == "GET ") { return 1; } return 0; } static string garbage(string input) { if (is_http_garbage(input)) { return "http"; } if (is_control_garbage(input)) { return "control"; } return nil; } static void siteban(string ip, string reason) { string creator; mapping ban; ban = ([ ]); creator = DRIVER->creator(object_name(this_object())); ban["message"] = reason; ban["expire"] = time() + 90 * 86400; ban["issuer"] = creator; BAND->ban_site(ip + "/32", ban); }
#include <kernel/kernel.h> #include <kotaka/paths/account.h> static int is_control_garbage(string input) { if (strlen(input) >= 1 && input[0] < ' ') { return 1; } return 0; } static int is_http_garbage(string input) { if (strlen(input) >= 4 && input[0 .. 3] == "GET ") { return 1; } return 0; } static string garbage(string input) { if (is_control_garbage(input)) { return "control"; } if (is_http_garbage(input)) { return "http"; } return nil; } static void siteban(string ip, string reason) { string creator; mapping ban; ban = ([ ]); creator = DRIVER->creator(object_name(this_object())); ban["message"] = reason; ban["expire"] = time() + 90 * 86400; ban["issuer"] = creator; BAND->ban_site(ip + "/32", ban); }
Check for control garbage before http garbage, httpd isn't detecting control garbage because it has http whitelisted
Check for control garbage before http garbage, httpd isn't detecting control garbage because it has http whitelisted
C
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
1bc3089d0dbfd30a3384c3e7d387a6269bc9f69f
kernel/arch/x86/x86.h
kernel/arch/x86/x86.h
#pragma once #include <stdint.h> #include <cpuid.h> #define cpu_equals(name) __builtin_cpu_is(name) #define cpu_supports(feature) __builtin_cpu_supports(feature) #define get_cpuid(a, b, c, d) __get_cpuid(0, a, b, c, d) typedef struct regs { uint32_t gs, fs, es, ds; uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; uint32_t int_no, err_code; uint32_t eip, cs, eflags, useresp, ss; } regs_t; #define IRQ_CHAIN_SIZE 16 #define IRQ_CHAIN_DEPTH 4 typedef void (*irq_handler_t) (regs_t *); typedef int (*irq_handler_chain_t) (regs_t *);
#pragma once #include <stdint.h> #include <cpuid.h> #define cpu_equals(name) __builtin_cpu_is(name) #define cpu_supports(feature) __builtin_cpu_supports(feature) #define get_cpuid(in, a, b, c, d) __get_cpuid(in, a, b, c, d) typedef struct regs { uint32_t gs, fs, es, ds; uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; uint32_t int_no, err_code; uint32_t eip, cs, eflags, useresp, ss; } regs_t; #define IRQ_CHAIN_SIZE 16 #define IRQ_CHAIN_DEPTH 4 typedef void (*irq_handler_t) (regs_t *); typedef int (*irq_handler_chain_t) (regs_t *);
Add first parameter to get_cpuid definition.
Add first parameter to get_cpuid definition.
C
mit
DirectMyFile/Raptor,DirectMyFile/Raptor
4814a4f313437938e31f150c2b8b9d4b25b659f3
extensions/ringraylib/ring_raylib.c
extensions/ringraylib/ring_raylib.c
/* Copyright (c) 2019 Mahmoud Fayed <[email protected]> */ #define RING_EXTENSION // Don't call : windows.h (Avoid conflict with raylib.h) #include <ring.h> #include <raylib.h> RING_FUNC(ring_InitWindow) { if ( RING_API_PARACOUNT != 3 ) { RING_API_ERROR(RING_API_MISS3PARA); return ; } if ( ! RING_API_ISNUMBER(1) ) { RING_API_ERROR(RING_API_BADPARATYPE); return ; } if ( ! RING_API_ISNUMBER(2) ) { RING_API_ERROR(RING_API_BADPARATYPE); return ; } if ( ! RING_API_ISSTRING(3) ) { RING_API_ERROR(RING_API_BADPARATYPE); return ; } InitWindow( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2),RING_API_GETSTRING(3)); } RING_API void ringlib_init(RingState *pRingState) { ring_vm_funcregister("initwindow",ring_InitWindow); }
/* Copyright (c) 2019 Mahmoud Fayed <[email protected]> */ #define RING_EXTENSION // Don't call : windows.h (Avoid conflict with raylib.h) #include <ring.h> #include <raylib.h> RING_FUNC(ring_InitWindow) { if ( RING_API_PARACOUNT != 3 ) { RING_API_ERROR(RING_API_MISS3PARA); return ; } if ( ! RING_API_ISNUMBER(1) ) { RING_API_ERROR(RING_API_BADPARATYPE); return ; } if ( ! RING_API_ISNUMBER(2) ) { RING_API_ERROR(RING_API_BADPARATYPE); return ; } if ( ! RING_API_ISSTRING(3) ) { RING_API_ERROR(RING_API_BADPARATYPE); return ; } InitWindow( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2),RING_API_GETSTRING(3)); } RING_FUNC(ring_WindowShouldClose) { if ( RING_API_PARACOUNT != 0 ) { RING_API_ERROR(RING_API_BADPARACOUNT); return ; } RING_API_RETNUMBER(WindowShouldClose()); } RING_API void ringlib_init(RingState *pRingState) { ring_vm_funcregister("initwindow",ring_InitWindow); ring_vm_funcregister("windowshouldclose",ring_WindowShouldClose); }
Update RingRayLib - raylib.c - Add Function : bool WindowShouldClose(void)
Update RingRayLib - raylib.c - Add Function : bool WindowShouldClose(void)
C
mit
ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring
38bb672422fc9c08c33b6caa424c5bb7a9296c15
turboencabulator/entropy.h
turboencabulator/entropy.h
uint32_t _rng_state = millis() void init_rng() { _rng_state = 75380540 - millis() for (int i=0; i<100; i++) tiny_prng() } uint32_t tiny_prng() { uint32_t x = _rng_state; x ^= x << 13; x ^= x >> 17; x ^= x << 5; _rng_state = x; return x; }
Add tiny rng for volume control
Add tiny rng for volume control
C
mit
coup-de-foudre/teensy-interruptor,coup-de-foudre/teensy-interruptor,coup-de-foudre/teensy-interruptor
3895b6735a6ae19211bd663e0eb6bfe48dbd1906
Components.h
Components.h
/* MIT License Copyright (c) 2017 ZeroUnix 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. */ // **Note: Please read the 'README.md' first // The following ifdef block is the standard way of creating macros which make exporting // from a DLL simpler. All files within this DLL are compiled with the DLLEXPORTPROJ_EXPORTS // symbol defined on the command line. This symbol should not be defined on any project // that uses this DLL. This way any other project whose source files include this file see // DLLEXPORTPROJ_API functions as being imported from a DLL, whereas this DLL sees symbols // defined with this macro as being exported. #ifdef DLLEXPORTPROJ_EXPORTS #define DLLEXPORTPROJ_API __declspec(dllexport) #else #define DLLEXPORTPROJ_API __declspec(dllimport) #endif //Windows Header #include <windows.h> #include <windowsx.h> #include <AccCtrl.h> #include <AclAPI.h> #include <shellapi.h> #include <stdlib.h> DLLEXPORTPROJ_API BOOL AdministratorPrivilege(VOID); DLLEXPORTPROJ_API VOID ElevateCurrentProcess(VOID); DLLEXPORTPROJ_API BOOL IsStartup(LPWSTR pszAppName, LPWSTR hSubKey); DLLEXPORTPROJ_API BOOL RegisterApp(LPWSTR pszAppName, LPWSTR pathToExe, LPWSTR args, LPWSTR hSubKey); DLLEXPORTPROJ_API VOID EnableStartup(LPWSTR pszAppName, LPWSTR args);
Add functions, headers & description
Add functions, headers & description
C
mit
Z3r0Un1x/zeroDll
69da97a9d0b256a4d9448bfa5f9569ac38156c1f
source/crate_demo/graphics_manager.h
source/crate_demo/graphics_manager.h
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #ifndef CRATE_DEMO_GRAPHICS_MANAGER_H #define CRATE_DEMO_GRAPHICS_MANAGER_H #include "common/graphics_manager_base.h" #include <d3d11.h> namespace CrateDemo { class GameStateManager; class GraphicsManager : public Common::GraphicsManagerBase { public: GraphicsManager(GameStateManager *gameStateManager); private: GameStateManager *m_gameStateManager; ID3D11RenderTargetView *m_renderTargetView; public: bool Initialize(int clientWidth, int clientHeight, HWND hwnd); void Shutdown(); void DrawFrame(); void OnResize(int newClientWidth, int newClientHeight); void GamePaused(); void GameUnpaused(); }; } // End of namespace CrateDemo #endif
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #ifndef CRATE_DEMO_GRAPHICS_MANAGER_H #define CRATE_DEMO_GRAPHICS_MANAGER_H #include "common/graphics_manager_base.h" #include <d3d11.h> #include "DirectXMath.h" namespace CrateDemo { class GameStateManager; struct Vertex { DirectX::XMFLOAT3 pos; DirectX::XMFLOAT4 color; }; class GraphicsManager : public Common::GraphicsManagerBase { public: GraphicsManager(GameStateManager *gameStateManager); private: GameStateManager *m_gameStateManager; ID3D11RenderTargetView *m_renderTargetView; public: bool Initialize(int clientWidth, int clientHeight, HWND hwnd); void Shutdown(); void DrawFrame(); void OnResize(int newClientWidth, int newClientHeight); void GamePaused(); void GameUnpaused(); }; } // End of namespace CrateDemo #endif
Create Vertex struct to hold vertex info
CRATE_DEMO: Create Vertex struct to hold vertex info
C
apache-2.0
RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject
cdcefd8721e2f8df853cdc0cd8a7a67a122b7be1
webkit/glue/simple_webmimeregistry_impl.h
webkit/glue/simple_webmimeregistry_impl.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 WEBMIMEREGISTRY_IMPL_H_ #define WEBMIMEREGISTRY_IMPL_H_ #include "third_party/WebKit/WebKit/chromium/public/WebMimeRegistry.h" namespace webkit_glue { class SimpleWebMimeRegistryImpl : public WebKit::WebMimeRegistry { public: // WebMimeRegistry methods: virtual WebKit::WebMimeRegistry::SupportsType supportsMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsImageMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsJavaScriptMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsMediaMIMEType( const WebKit::WebString&, const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsNonImageMIMEType( const WebKit::WebString&); virtual WebKit::WebString mimeTypeForExtension(const WebKit::WebString&); virtual WebKit::WebString mimeTypeFromFile(const WebKit::WebString&); virtual WebKit::WebString preferredExtensionForMIMEType( const WebKit::WebString&); }; } // namespace webkit_glue #endif // WEBMIMEREGISTRY_IMPL_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 WEBMIMEREGISTRY_IMPL_H_ #define WEBMIMEREGISTRY_IMPL_H_ #include "third_party/WebKit/WebKit/chromium/public/WebMimeRegistry.h" namespace webkit_glue { class SimpleWebMimeRegistryImpl : public WebKit::WebMimeRegistry { public: SimpleWebMimeRegistryImpl() {} virtual ~SimpleWebMimeRegistryImpl() {} // WebMimeRegistry methods: virtual WebKit::WebMimeRegistry::SupportsType supportsMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsImageMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsJavaScriptMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsMediaMIMEType( const WebKit::WebString&, const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsNonImageMIMEType( const WebKit::WebString&); virtual WebKit::WebString mimeTypeForExtension(const WebKit::WebString&); virtual WebKit::WebString mimeTypeFromFile(const WebKit::WebString&); virtual WebKit::WebString preferredExtensionForMIMEType( const WebKit::WebString&); }; } // namespace webkit_glue #endif // WEBMIMEREGISTRY_IMPL_H_
Add a virtual destructor to SimpleWebMimeRegistryImpl so that child class destructors get called correctly.
Add a virtual destructor to SimpleWebMimeRegistryImpl so that child class destructors get called correctly. BUG=62828 TEST=No memory leak in TestShellWebMimeRegistryImpl Review URL: http://codereview.chromium.org/4880002 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@65967 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,dednal/chromium.src,patrickm/chromium.src,zcbenz/cefode-chromium,hujiajie/pa-chromium,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,dednal/chromium.src,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,keishi/chromium,keishi/chromium,bright-sparks/chromium-spacewalk,littlstar/chromium.src,krieger-od/nwjs_chromium.src,rogerwang/chromium,anirudhSK/chromium,robclark/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,robclark/chromium,Fireblend/chromium-crosswalk,M4sse/chromium.src,littlstar/chromium.src,nacl-webkit/chrome_deps,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,axinging/chromium-crosswalk,robclark/chromium,Chilledheart/chromium,nacl-webkit/chrome_deps,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,mogoweb/chromium-crosswalk,M4sse/chromium.src,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,littlstar/chromium.src,nacl-webkit/chrome_deps,ltilve/chromium,anirudhSK/chromium,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,jaruba/chromium.src,zcbenz/cefode-chromium,zcbenz/cefode-chromium,hujiajie/pa-chromium,ltilve/chromium,junmin-zhu/chromium-rivertrail,robclark/chromium,markYoungH/chromium.src,dushu1203/chromium.src,anirudhSK/chromium,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,dushu1203/chromium.src,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,Fireblend/chromium-crosswalk,jaruba/chromium.src,littlstar/chromium.src,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,hujiajie/pa-chromium,M4sse/chromium.src,hgl888/chromium-crosswalk,ltilve/chromium,Just-D/chromium-1,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,keishi/chromium,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,markYoungH/chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,rogerwang/chromium,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,markYoungH/chromium.src,ltilve/chromium,ChromiumWebApps/chromium,Just-D/chromium-1,Chilledheart/chromium,jaruba/chromium.src,chuan9/chromium-crosswalk,rogerwang/chromium,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,M4sse/chromium.src,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,dushu1203/chromium.src,ondra-novak/chromium.src,Jonekee/chromium.src,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,anirudhSK/chromium,ChromiumWebApps/chromium,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,keishi/chromium,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,rogerwang/chromium,dednal/chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,Jonekee/chromium.src,ondra-novak/chromium.src,timopulkkinen/BubbleFish,Jonekee/chromium.src,M4sse/chromium.src,ltilve/chromium,robclark/chromium,anirudhSK/chromium,Jonekee/chromium.src,robclark/chromium,pozdnyakov/chromium-crosswalk,keishi/chromium,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,anirudhSK/chromium,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,zcbenz/cefode-chromium,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,patrickm/chromium.src,rogerwang/chromium,markYoungH/chromium.src,patrickm/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk,patrickm/chromium.src,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,Just-D/chromium-1,rogerwang/chromium,nacl-webkit/chrome_deps,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,dushu1203/chromium.src,keishi/chromium,Chilledheart/chromium,mogoweb/chromium-crosswalk,keishi/chromium,junmin-zhu/chromium-rivertrail,keishi/chromium,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,Just-D/chromium-1,ChromiumWebApps/chromium,robclark/chromium,keishi/chromium,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,timopulkkinen/BubbleFish,markYoungH/chromium.src,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,dednal/chromium.src,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,jaruba/chromium.src,mogoweb/chromium-crosswalk,dednal/chromium.src,M4sse/chromium.src,dushu1203/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,Just-D/chromium-1,dushu1203/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,markYoungH/chromium.src,zcbenz/cefode-chromium,hujiajie/pa-chromium,ChromiumWebApps/chromium,rogerwang/chromium,robclark/chromium,anirudhSK/chromium,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,dushu1203/chromium.src,keishi/chromium,chuan9/chromium-crosswalk,Just-D/chromium-1,jaruba/chromium.src,dednal/chromium.src,timopulkkinen/BubbleFish,patrickm/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,M4sse/chromium.src,Just-D/chromium-1,littlstar/chromium.src,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,robclark/chromium,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,ondra-novak/chromium.src,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,zcbenz/cefode-chromium,axinging/chromium-crosswalk,rogerwang/chromium,M4sse/chromium.src,markYoungH/chromium.src,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,ltilve/chromium,ltilve/chromium,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,chuan9/chromium-crosswalk,jaruba/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk,robclark/chromium,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish
6db0074fe5c581587b4d47b45308d59afcd560d6
ReactiveCocoaFramework/ReactiveCocoa/NSUserDefaults+RACSupport.h
ReactiveCocoaFramework/ReactiveCocoa/NSUserDefaults+RACSupport.h
// // NSUserDefaults+RACSupport.h // ReactiveCocoa // // Created by Matt Diephouse on 12/19/13. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // #import <Foundation/Foundation.h> @class RACChannelTerminal; @interface NSUserDefaults (RACSupport) // Creates and returns a terminal for binding the user defaults key. // // key - The user defaults key to create the channel terminal for. // // This makes it easy to bind a property to a default by assigning to // `RACChannelTo`. // // Returns a channel terminal. - (RACChannelTerminal *)rac_channelTerminalForKey:(NSString *)key; @end
// // NSUserDefaults+RACSupport.h // ReactiveCocoa // // Created by Matt Diephouse on 12/19/13. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // #import <Foundation/Foundation.h> @class RACChannelTerminal; @interface NSUserDefaults (RACSupport) // Creates and returns a terminal for binding the user defaults key. // // key - The user defaults key to create the channel terminal for. // // This makes it easy to bind a property to a default by assigning to // `RACChannelTo`. // // The terminal will send the value of the user defaults key upon subscription. // // Returns a channel terminal. - (RACChannelTerminal *)rac_channelTerminalForKey:(NSString *)key; @end
Clarify that the terminal sends a value upon subscription
Clarify that the terminal sends a value upon subscription
C
mit
Carthage/ReactiveCocoa,chieryw/ReactiveCocoa,Pingco/ReactiveCocoa,dachaoisme/ReactiveCocoa,sdhzwm/ReactiveCocoa,huiping192/ReactiveCocoa,eyu1988/ReactiveCocoa,chieryw/ReactiveCocoa,on99/ReactiveCocoa,OneSmallTree/ReactiveCocoa,pzw224/ReactiveCocoa,eliperkins/ReactiveCocoa,loupman/ReactiveCocoa,SuPair/ReactiveCocoa,Ray0218/ReactiveCocoa,shaohung001/ReactiveCocoa,clg0118/ReactiveCocoa,wpstarnice/ReactiveCocoa,WEIBP/ReactiveCocoa,ikesyo/ReactiveCocoa,brasbug/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,zxq3220122/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,PSPDFKit-labs/ReactiveCocoa,walkingsmarts/ReactiveCocoa,sujeking/ReactiveCocoa,Liquidsoul/ReactiveCocoa,terry408911/ReactiveCocoa,eliperkins/ReactiveCocoa,mattpetters/ReactiveCocoa,jaylib/ReactiveCocoa,ioshger0125/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,LHDsimon/ReactiveCocoa,add715/ReactiveCocoa,wangqi211/ReactiveCocoa,Rupert-RR/ReactiveCocoa,xumaolin/ReactiveCocoa,cstars135/ReactiveCocoa,icepy/ReactiveCocoa,SanChain/ReactiveCocoa,clg0118/ReactiveCocoa,dz1111/ReactiveCocoa,ericzhou2008/ReactiveCocoa,esttorhe/ReactiveCocoa,bscarano/ReactiveCocoa,Pingco/ReactiveCocoa,jaylib/ReactiveCocoa,pzw224/ReactiveCocoa,BrooksWon/ReactiveCocoa,wpstarnice/ReactiveCocoa,hj3938/ReactiveCocoa,ailyanlu/ReactiveCocoa,BlessNeo/ReactiveCocoa,richeterre/ReactiveCocoa,cstars135/ReactiveCocoa,buildo/ReactiveCocoa,dachaoisme/ReactiveCocoa,sandyway/ReactiveCocoa,LHDsimon/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,mtxs007/ReactiveCocoa,ddc391565320/ReactiveCocoa,yonekawa/ReactiveCocoa,andersio/ReactiveCocoa,mxxiv/ReactiveCocoa,hoanganh6491/ReactiveCocoa,ohwutup/ReactiveCocoa,towik/ReactiveCocoa,Remitly/ReactiveCocoa,jianwoo/ReactiveCocoa,JohnJin007/ReactiveCocoa,hj3938/ReactiveCocoa,SuPair/ReactiveCocoa,yonekawa/ReactiveCocoa,cogddo/ReactiveCocoa,smilypeda/ReactiveCocoa,sugar2010/ReactiveCocoa,tonyarnold/ReactiveCocoa,Ray0218/ReactiveCocoa,liufeigit/ReactiveCocoa,Pingco/ReactiveCocoa,zzzworm/ReactiveCocoa,bensonday/ReactiveCocoa,monkeydbobo/ReactiveCocoa,stevielu/ReactiveCocoa,ericzhou2008/ReactiveCocoa,dachaoisme/ReactiveCocoa,ailyanlu/ReactiveCocoa,mxxiv/ReactiveCocoa,koamac/ReactiveCocoa,koamac/ReactiveCocoa,jaylib/ReactiveCocoa,dullgrass/ReactiveCocoa,stupidfive/ReactiveCocoa,kaylio/ReactiveCocoa,AllanChen/ReactiveCocoa,eliperkins/ReactiveCocoa,loupman/ReactiveCocoa,ShawnLeee/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,tonyarnold/ReactiveCocoa,walkingsmarts/ReactiveCocoa,KJin99/ReactiveCocoa,zhenlove/ReactiveCocoa,almassapargali/ReactiveCocoa,Adlai-Holler/ReactiveCocoa,ztchena/ReactiveCocoa,ShawnLeee/ReactiveCocoa,PSPDFKit-labs/ReactiveCocoa,libiao88/ReactiveCocoa,mattpetters/ReactiveCocoa,WEIBP/ReactiveCocoa,msdgwzhy6/ReactiveCocoa,loupman/ReactiveCocoa,kaylio/ReactiveCocoa,jsslai/ReactiveCocoa,liufeigit/ReactiveCocoa,howandhao/ReactiveCocoa,Ricowere/ReactiveCocoa,200895045/ReactiveCocoa,nikita-leonov/ReactiveCocoa,msdgwzhy6/ReactiveCocoa,imkerberos/ReactiveCocoa,esttorhe/ReactiveCocoa,vincentiss/ReactiveCocoa,Khan/ReactiveCocoa,natestedman/ReactiveCocoa,Farteen/ReactiveCocoa,Rupert-RR/ReactiveCocoa,calebd/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,emodeqidao/ReactiveCocoa,ioshger0125/ReactiveCocoa,esttorhe/ReactiveCocoa,zzzworm/ReactiveCocoa,hoanganh6491/ReactiveCocoa,yoichitgy/ReactiveCocoa,kiurentu/ReactiveCocoa,andersio/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,zzqiltw/ReactiveCocoa,libiao88/ReactiveCocoa,dullgrass/ReactiveCocoa,xiaobing2007/ReactiveCocoa,jsslai/ReactiveCocoa,tiger8888/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,icepy/ReactiveCocoa,CQXfly/ReactiveCocoa,ohwutup/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,vincentiss/ReactiveCocoa,nickcheng/ReactiveCocoa,rpowelll/ReactiveCocoa,windgo/ReactiveCocoa,andersio/ReactiveCocoa,JackLian/ReactiveCocoa,hilllinux/ReactiveCocoa,calebd/ReactiveCocoa,Pikdays/ReactiveCocoa,dskatz22/ReactiveCocoa,alvinvarghese/ReactiveCocoa,llb1119/test,tzongw/ReactiveCocoa,natan/ReactiveCocoa,tornade0913/ReactiveCocoa,Ricowere/ReactiveCocoa,ddc391565320/ReactiveCocoa,takeshineshiro/ReactiveCocoa,bencochran/ReactiveCocoa,nickcheng/ReactiveCocoa,tornade0913/ReactiveCocoa,BrooksWon/ReactiveCocoa,200895045/ReactiveCocoa,xulibao/ReactiveCocoa,jrmiddle/ReactiveCocoa,j364960953/ReactiveCocoa,longv2go/ReactiveCocoa,yoichitgy/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,walkingsmarts/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,Eveian/ReactiveCocoa,Pikdays/ReactiveCocoa,brasbug/ReactiveCocoa,zhaoguohui/ReactiveCocoa,cstars135/ReactiveCocoa,Ethan89/ReactiveCocoa,yizzuide/ReactiveCocoa,dskatz22/ReactiveCocoa,brightcove/ReactiveCocoa,cogddo/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,CQXfly/ReactiveCocoa,eyu1988/ReactiveCocoa,windgo/ReactiveCocoa,zzzworm/ReactiveCocoa,ceekayel/ReactiveCocoa,BlessNeo/ReactiveCocoa,Remitly/ReactiveCocoa,cogddo/ReactiveCocoa,ztchena/ReactiveCocoa,JohnJin007/ReactiveCocoa,BrooksWon/ReactiveCocoa,jam891/ReactiveCocoa,KJin99/ReactiveCocoa,zhigang1992/ReactiveCocoa,itschaitanya/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,clg0118/ReactiveCocoa,tipbit/ReactiveCocoa,eyu1988/ReactiveCocoa,zhiwen1024/ReactiveCocoa,335g/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,xiaoliyang/ReactiveCocoa,jam891/ReactiveCocoa,qq644531343/ReactiveCocoa,yoichitgy/ReactiveCocoa,Ricowere/ReactiveCocoa,nickcheng/ReactiveCocoa,sugar2010/ReactiveCocoa,Farteen/ReactiveCocoa,yytong/ReactiveCocoa,zhukaixy/ReactiveCocoa,lixar/ReactiveCocoa,Farteen/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,ericzhou2008/ReactiveCocoa,alvinvarghese/ReactiveCocoa,kiurentu/ReactiveCocoa,Adlai-Holler/ReactiveCocoa,xiaobing2007/ReactiveCocoa,bencochran/ReactiveCocoa,leichunfeng/ReactiveCocoa,SanChain/ReactiveCocoa,beni55/ReactiveCocoa,monkeydbobo/ReactiveCocoa,ohwutup/ReactiveCocoa,add715/ReactiveCocoa,emodeqidao/ReactiveCocoa,kevin-zqw/ReactiveCocoa,tonyli508/ReactiveCocoa,FelixYin66/ReactiveCocoa,on99/ReactiveCocoa,KuPai32G/ReactiveCocoa,beni55/ReactiveCocoa,SmartEncounter/ReactiveCocoa,yizzuide/ReactiveCocoa,DreamHill/ReactiveCocoa,tonyarnold/ReactiveCocoa,terry408911/ReactiveCocoa,zxq3220122/ReactiveCocoa,Carthage/ReactiveCocoa,zhiwen1024/ReactiveCocoa,esttorhe/ReactiveCocoa,monkeydbobo/ReactiveCocoa,yizzuide/ReactiveCocoa,fhchina/ReactiveCocoa,j364960953/ReactiveCocoa,PSPDFKit-labs/ReactiveCocoa,DreamHill/ReactiveCocoa,zhiwen1024/ReactiveCocoa,j364960953/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,AndyZhaoHe/ReactiveCocoa,chao95957/ReactiveCocoa,brightcove/ReactiveCocoa,tiger8888/ReactiveCocoa,Eveian/ReactiveCocoa,brightcove/ReactiveCocoa,fanghao085/ReactiveCocoa,Liquidsoul/ReactiveCocoa,KuPai32G/ReactiveCocoa,ceekayel/ReactiveCocoa,stupidfive/ReactiveCocoa,fanghao085/ReactiveCocoa,ztchena/ReactiveCocoa,victorlin/ReactiveCocoa,jeelun/ReactiveCocoa,buildo/ReactiveCocoa,Ray0218/ReactiveCocoa,Pikdays/ReactiveCocoa,imkerberos/ReactiveCocoa,Khan/ReactiveCocoa,DreamHill/ReactiveCocoa,jackywpy/ReactiveCocoa,huiping192/ReactiveCocoa,xulibao/ReactiveCocoa,goodheart/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,beni55/ReactiveCocoa,pzw224/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,jam891/ReactiveCocoa,paulyoung/ReactiveCocoa,victorlin/ReactiveCocoa,KJin99/ReactiveCocoa,cnbin/ReactiveCocoa,shaohung001/ReactiveCocoa,SmartEncounter/ReactiveCocoa,tzongw/ReactiveCocoa,leelili/ReactiveCocoa,imkerberos/ReactiveCocoa,llb1119/test,natestedman/ReactiveCocoa,leichunfeng/ReactiveCocoa,stevielu/ReactiveCocoa,calebd/ReactiveCocoa,Ricowere/ReactiveCocoa,hilllinux/ReactiveCocoa,sujeking/ReactiveCocoa,hbucius/ReactiveCocoa,isghe/ReactiveCocoa,FelixYin66/ReactiveCocoa,nickcheng/ReactiveCocoa,jackywpy/ReactiveCocoa,dskatz22/ReactiveCocoa,natan/ReactiveCocoa,sdhzwm/ReactiveCocoa,itschaitanya/ReactiveCocoa,longv2go/ReactiveCocoa,Ethan89/ReactiveCocoa,goodheart/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,takeshineshiro/ReactiveCocoa,JackLian/ReactiveCocoa,kevin-zqw/ReactiveCocoa,OneSmallTree/ReactiveCocoa,kaylio/ReactiveCocoa,yytong/ReactiveCocoa,leelili/ReactiveCocoa,richeterre/ReactiveCocoa,AlanJN/ReactiveCocoa,brasbug/ReactiveCocoa,wangqi211/ReactiveCocoa,Khan/ReactiveCocoa,gabemdev/ReactiveCocoa,Juraldinio/ReactiveCocoa,almassapargali/ReactiveCocoa,natestedman/ReactiveCocoa,zhigang1992/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,ikesyo/ReactiveCocoa,jrmiddle/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,kiurentu/ReactiveCocoa,rpowelll/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,ddc391565320/ReactiveCocoa,goodheart/ReactiveCocoa,kevin-zqw/ReactiveCocoa,nikita-leonov/ReactiveCocoa,stupidfive/ReactiveCocoa,zzqiltw/ReactiveCocoa,llb1119/test,zhukaixy/ReactiveCocoa,ioshger0125/ReactiveCocoa,AlanJN/ReactiveCocoa,tiger8888/ReactiveCocoa,gabemdev/ReactiveCocoa,LHDsimon/ReactiveCocoa,stevielu/ReactiveCocoa,zhigang1992/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,BlessNeo/ReactiveCocoa,natan/ReactiveCocoa,shaohung001/ReactiveCocoa,emodeqidao/ReactiveCocoa,SanChain/ReactiveCocoa,howandhao/ReactiveCocoa,howandhao/ReactiveCocoa,OneSmallTree/ReactiveCocoa,Liquidsoul/ReactiveCocoa,dz1111/ReactiveCocoa,KuPai32G/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,takeshineshiro/ReactiveCocoa,JohnJin007/ReactiveCocoa,qq644531343/ReactiveCocoa,jaylib/ReactiveCocoa,leelili/ReactiveCocoa,buildo/ReactiveCocoa,ShawnLeee/ReactiveCocoa,leichunfeng/ReactiveCocoa,jeelun/ReactiveCocoa,Carthage/ReactiveCocoa,taylormoonxu/ReactiveCocoa,tonyli508/ReactiveCocoa,cnbin/ReactiveCocoa,valleyman86/ReactiveCocoa,rpowelll/ReactiveCocoa,smilypeda/ReactiveCocoa,zhaoguohui/ReactiveCocoa,Ethan89/ReactiveCocoa,longv2go/ReactiveCocoa,mtxs007/ReactiveCocoa,add715/ReactiveCocoa,hbucius/ReactiveCocoa,Juraldinio/ReactiveCocoa,fanghao085/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,200895045/ReactiveCocoa,nikita-leonov/ReactiveCocoa,tipbit/ReactiveCocoa,zhenlove/ReactiveCocoa,yytong/ReactiveCocoa,xiaoliyang/ReactiveCocoa,xumaolin/ReactiveCocoa,lixar/ReactiveCocoa,sandyway/ReactiveCocoa,chao95957/ReactiveCocoa,dz1111/ReactiveCocoa,xumaolin/ReactiveCocoa,mxxiv/ReactiveCocoa,smilypeda/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,terry408911/ReactiveCocoa,gengjf/ReactiveCocoa,almassapargali/ReactiveCocoa,victorlin/ReactiveCocoa,hbucius/ReactiveCocoa,taylormoonxu/ReactiveCocoa,luerhouhou/ReactiveCocoa,towik/ReactiveCocoa,isghe/ReactiveCocoa,jianwoo/ReactiveCocoa,xiaobing2007/ReactiveCocoa,xiaoliyang/ReactiveCocoa,libiao88/ReactiveCocoa,jsslai/ReactiveCocoa,luerhouhou/ReactiveCocoa,Rupert-RR/ReactiveCocoa,zhenlove/ReactiveCocoa,taylormoonxu/ReactiveCocoa,335g/ReactiveCocoa,on99/ReactiveCocoa,xulibao/ReactiveCocoa,hoanganh6491/ReactiveCocoa,valleyman86/ReactiveCocoa,luerhouhou/ReactiveCocoa,richeterre/ReactiveCocoa,zhukaixy/ReactiveCocoa,sdhzwm/ReactiveCocoa,bensonday/ReactiveCocoa,sujeking/ReactiveCocoa,AllanChen/ReactiveCocoa,jrmiddle/ReactiveCocoa,isghe/ReactiveCocoa,sugar2010/ReactiveCocoa,jeelun/ReactiveCocoa,liufeigit/ReactiveCocoa,koamac/ReactiveCocoa,wangqi211/ReactiveCocoa,dullgrass/ReactiveCocoa,itschaitanya/ReactiveCocoa,paulyoung/ReactiveCocoa,windgo/ReactiveCocoa,hj3938/ReactiveCocoa,alvinvarghese/ReactiveCocoa,chieryw/ReactiveCocoa,yonekawa/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,fhchina/ReactiveCocoa,mattpetters/ReactiveCocoa,jackywpy/ReactiveCocoa,gengjf/ReactiveCocoa,towik/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,zzqiltw/ReactiveCocoa,bscarano/ReactiveCocoa,icepy/ReactiveCocoa,bscarano/ReactiveCocoa,ailyanlu/ReactiveCocoa,valleyman86/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,Adlai-Holler/ReactiveCocoa,AlanJN/ReactiveCocoa,Remitly/ReactiveCocoa,chao95957/ReactiveCocoa,bensonday/ReactiveCocoa,335g/ReactiveCocoa,zxq3220122/ReactiveCocoa,mtxs007/ReactiveCocoa,jianwoo/ReactiveCocoa,huiping192/ReactiveCocoa,wpstarnice/ReactiveCocoa,SuPair/ReactiveCocoa,qq644531343/ReactiveCocoa,lixar/ReactiveCocoa,tornade0913/ReactiveCocoa,AndyZhaoHe/ReactiveCocoa,Juraldinio/ReactiveCocoa,paulyoung/ReactiveCocoa,sandyway/ReactiveCocoa,FelixYin66/ReactiveCocoa,cnbin/ReactiveCocoa,tonyli508/ReactiveCocoa,Eveian/ReactiveCocoa,vincentiss/ReactiveCocoa,ceekayel/ReactiveCocoa,JackLian/ReactiveCocoa,huiping192/ReactiveCocoa,WEIBP/ReactiveCocoa,gengjf/ReactiveCocoa,AndyZhaoHe/ReactiveCocoa,bencochran/ReactiveCocoa,tzongw/ReactiveCocoa,CQXfly/ReactiveCocoa,fhchina/ReactiveCocoa,zhaoguohui/ReactiveCocoa,hilllinux/ReactiveCocoa,msdgwzhy6/ReactiveCocoa
ab3d51e895884d5beb0ad836fa88dfe702408c07
common/sys_attr.h
common/sys_attr.h
/* * The OpenDiamond Platform for Interactive Search * Version 4 * * Copyright (c) 2002-2005 Intel Corporation * All rights reserved. * * This software is distributed under the terms of the Eclipse Public * License, Version 1.0 which can be found in the file named LICENSE. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS SOFTWARE CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT */ #ifndef _SYS_ATTR_H_ #define _SYS_ATTR_H_ /* * Names for some of the system defined attributes. * XXX update these from the spec. */ #define SIZE "SYS_SIZE" #define UID "SYS_UID" #define GID "SYS_GID" #define BLK_SIZE "SYS_BLKSIZE" #define ATIME "SYS_ATIME" #define MTIME "SYS_MTIME" #define CTIME "SYS_CTIME" #define OBJ_ID "_ObjectID" #define OBJ_DATA "" #define DISPLAY_NAME "Display-Name" #define DEVICE_NAME "Device-Name" #define OBJ_PATH "_path.cstring" #define FLTRTIME "_FIL_TIME.time" #define FLTRTIME_FN "_FIL_TIME_%s.time" #define PERMEABILITY_FN "_FIL_STAT_%s_permeability.float" #endif /* _SYS_ATTR_H_ */
/* * The OpenDiamond Platform for Interactive Search * Version 4 * * Copyright (c) 2002-2005 Intel Corporation * All rights reserved. * * This software is distributed under the terms of the Eclipse Public * License, Version 1.0 which can be found in the file named LICENSE. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS SOFTWARE CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT */ #ifndef _SYS_ATTR_H_ #define _SYS_ATTR_H_ /* * Names for some of the system defined attributes. */ #define OBJ_ID "_ObjectID" #define OBJ_DATA "" #define DISPLAY_NAME "Display-Name" #define DEVICE_NAME "Device-Name" #define FLTRTIME "_FIL_TIME.time" #define FLTRTIME_FN "_FIL_TIME_%s.time" #endif /* _SYS_ATTR_H_ */
Drop definitions of unused object attributes
Drop definitions of unused object attributes
C
epl-1.0
cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond
532f3759d71d1fceb494212187dacc5a78295dc3
arch/sh/include/asm/gpio.h
arch/sh/include/asm/gpio.h
/* * include/asm-sh/gpio.h * * Generic GPIO API and pinmux table support for SuperH. * * Copyright (c) 2008 Magnus Damm * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. */ #ifndef __ASM_SH_GPIO_H #define __ASM_SH_GPIO_H #include <linux/kernel.h> #include <linux/errno.h> #if defined(CONFIG_CPU_SH3) #include <cpu/gpio.h> #endif #define ARCH_NR_GPIOS 512 #include <linux/sh_pfc.h> #ifdef CONFIG_GPIOLIB static inline int gpio_get_value(unsigned gpio) { return __gpio_get_value(gpio); } static inline void gpio_set_value(unsigned gpio, int value) { __gpio_set_value(gpio, value); } static inline int gpio_cansleep(unsigned gpio) { return __gpio_cansleep(gpio); } static inline int gpio_to_irq(unsigned gpio) { WARN_ON(1); return -ENOSYS; } static inline int irq_to_gpio(unsigned int irq) { WARN_ON(1); return -EINVAL; } #endif /* CONFIG_GPIOLIB */ #endif /* __ASM_SH_GPIO_H */
/* * include/asm-sh/gpio.h * * Generic GPIO API and pinmux table support for SuperH. * * Copyright (c) 2008 Magnus Damm * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. */ #ifndef __ASM_SH_GPIO_H #define __ASM_SH_GPIO_H #include <linux/kernel.h> #include <linux/errno.h> #if defined(CONFIG_CPU_SH3) #include <cpu/gpio.h> #endif #define ARCH_NR_GPIOS 512 #include <linux/sh_pfc.h> #ifdef CONFIG_GPIOLIB static inline int gpio_get_value(unsigned gpio) { return __gpio_get_value(gpio); } static inline void gpio_set_value(unsigned gpio, int value) { __gpio_set_value(gpio, value); } static inline int gpio_cansleep(unsigned gpio) { return __gpio_cansleep(gpio); } static inline int gpio_to_irq(unsigned gpio) { return __gpio_to_irq(gpio); } static inline int irq_to_gpio(unsigned int irq) { return -ENOSYS; } #endif /* CONFIG_GPIOLIB */ #endif /* __ASM_SH_GPIO_H */
Allow GPIO chips to register IRQ mappings.
sh: Allow GPIO chips to register IRQ mappings. As non-PFC chips are added that may support IRQs, pass through to the generic helper instead of triggering the WARN_ON(). Signed-off-by: Paul Mundt <[email protected]>
C
apache-2.0
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,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas
c587b66bb438b95ad32c3c6ec9a329eea9f4ef8a
include/actions/MastodonAddVariableAction.h
include/actions/MastodonAddVariableAction.h
/*************************************************/ /* DO NOT MODIFY THIS HEADER */ /* */ /* MASTODON */ /* */ /* (c) 2015 Battelle Energy Alliance, LLC */ /* ALL RIGHTS RESERVED */ /* */ /* Prepared by Battelle Energy Alliance, LLC */ /* With the U. S. Department of Energy */ /* */ /* See COPYRIGHT for full restrictions */ /*************************************************/ /** * This action automatically creates the displacement Variables and the * velocity, acceleration, stress and strain AuxVariables based on the dimension of the mesh * of the problem. **/ #ifndef MASTODONADDVARIABLEACTION_H #define MASTODONADDVARIABLEACTION_H #include "Action.h" class MastodonAddVariableAction : public Action { public: MastodonAddVariableAction(const InputParameters & params); virtual void act() override; private: }; template <> InputParameters validParams<MastodonAddVariableAction>(); #endif // MASTODONADDVARIABLEACTION_H
/*************************************************/ /* DO NOT MODIFY THIS HEADER */ /* */ /* MASTODON */ /* */ /* (c) 2015 Battelle Energy Alliance, LLC */ /* ALL RIGHTS RESERVED */ /* */ /* Prepared by Battelle Energy Alliance, LLC */ /* With the U. S. Department of Energy */ /* */ /* See COPYRIGHT for full restrictions */ /*************************************************/ /** * This action automatically creates the displacement Variables and the * velocity, acceleration, stress and strain AuxVariables based on the dimension of the mesh * of the problem. **/ #ifndef MASTODONADDVARIABLEACTION_H #define MASTODONADDVARIABLEACTION_H #include "Action.h" class MastodonAddVariableAction : public Action { public: MastodonAddVariableAction(const InputParameters & params); virtual void act() override; }; template <> InputParameters validParams<MastodonAddVariableAction>(); #endif // MASTODONADDVARIABLEACTION_H
Remove private keyword that is not needed
Remove private keyword that is not needed (refs #100)
C
lgpl-2.1
idaholab/mastodon,idaholab/mastodon,idaholab/mastodon,idaholab/mastodon
d60cc9416f92dc9dd4e59ecc9883b77ad7acfb3f
packager/media/file/file_closer.h
packager/media/file/file_closer.h
// Copyright 2014 Google Inc. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd #ifndef MEDIA_FILE_FILE_CLOSER_H_ #define MEDIA_FILE_FILE_CLOSER_H_ #include "packager/base/logging.h" #include "packager/media/file/file.h" namespace edash_packager { namespace media { /// Used by scoped_ptr to automatically close the file when it goes out of /// scope. struct FileCloser { inline void operator()(File* file) const { if (file != NULL && !file->Close()) { LOG(WARNING) << "Failed to close the file properly: " << file->file_name(); } } }; } // namespace media } // namespace edash_packager #endif // MEDIA_FILE_FILE_CLOSER_H_
// Copyright 2014 Google Inc. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd #ifndef MEDIA_FILE_FILE_CLOSER_H_ #define MEDIA_FILE_FILE_CLOSER_H_ #include "packager/base/logging.h" #include "packager/media/file/file.h" namespace edash_packager { namespace media { /// Used by scoped_ptr to automatically close the file when it goes out of /// scope. struct FileCloser { inline void operator()(File* file) const { if (file != NULL) { const std::string filename = file->file_name(); if (!file->Close()) { LOG(WARNING) << "Failed to close the file properly: " << filename; } } } }; } // namespace media } // namespace edash_packager #endif // MEDIA_FILE_FILE_CLOSER_H_
Fix a possible crash if a file fails to be closed
Fix a possible crash if a file fails to be closed Change-Id: I6bc806a68b81ea5bde09bada1175f257c296afcd
C
bsd-3-clause
nevil/edash-packager,nevil/edash-packager,nevil/edash-packager
83bd4414808a6862969bd803631d26782ba3453e
include/gpu/vk/GrVkDefines.h
include/gpu/vk/GrVkDefines.h
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef GrVkDefines_DEFINED #define GrVkDefines_DEFINED #ifdef SK_VULKAN #if defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_WIN32) # if !defined(VK_USE_PLATFORM_WIN32_KHR) # define VK_USE_PLATFORM_WIN32_KHR # endif #elif defined(SK_BUILD_FOR_ANDROID) # if !defined(VK_USE_PLATFORM_ANDROID_KHR) # define VK_USE_PLATFORM_ANDROID_KHR # endif #elif defined(SK_BUILD_FOR_UNIX) # if defined(__Fuchsia__) # if !defined(VK_USE_PLATFORM_MAGMA_KHR) # define VK_USE_PLATFORM_MAGMA_KHR # endif # else # if !defined(VK_USE_PLATFORM_XCB_KHR) # define VK_USE_PLATFORM_XCB_KHR # endif # endif #endif #include <vulkan/vulkan.h> #define SKIA_REQUIRED_VULKAN_HEADER_VERSION 17 #if VK_HEADER_VERSION < SKIA_REQUIRED_VULKAN_HEADER_VERSION #error "Vulkan header version is too low" #endif #endif #endif
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef GrVkDefines_DEFINED #define GrVkDefines_DEFINED #ifdef SK_VULKAN #if defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_WIN32) # if !defined(VK_USE_PLATFORM_WIN32_KHR) # define VK_USE_PLATFORM_WIN32_KHR # endif #elif defined(SK_BUILD_FOR_ANDROID) # if !defined(VK_USE_PLATFORM_ANDROID_KHR) # define VK_USE_PLATFORM_ANDROID_KHR # endif #elif defined(SK_BUILD_FOR_UNIX) # if defined(__Fuchsia__) # if !defined(VK_USE_PLATFORM_MAGMA_KHR) # define VK_USE_PLATFORM_MAGMA_KHR # endif # else # if !defined(VK_USE_PLATFORM_XCB_KHR) # define VK_USE_PLATFORM_XCB_KHR # endif # endif #endif // We create our own function table and never directly call any functions via vk*(). So no need to // include the prototype functions. #ifndef VK_NO_PROTOTYPES #define VK_NO_PROTOTYPES #endif #include <vulkan/vulkan.h> #define SKIA_REQUIRED_VULKAN_HEADER_VERSION 17 #if VK_HEADER_VERSION < SKIA_REQUIRED_VULKAN_HEADER_VERSION #error "Vulkan header version is too low" #endif #endif #endif
Set VK_NO_PROTOTYPES for vulkan backend
Set VK_NO_PROTOTYPES for vulkan backend Bug: skia: Change-Id: Id740efe6030b70271b0eb3a3bd6a111202f28fd8 Reviewed-on: https://skia-review.googlesource.com/69160 Commit-Queue: Greg Daniel <[email protected]> Reviewed-by: Chris Dalton <[email protected]>
C
bsd-3-clause
google/skia,aosp-mirror/platform_external_skia,google/skia,rubenvb/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,google/skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,rubenvb/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,google/skia,google/skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,google/skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,google/skia
97cf67c3c5e9324a6567f74ee3a272bdad24524d
hashtag-warrior/Game/Constants/Constants.h
hashtag-warrior/Game/Constants/Constants.h
// // Constants.h // hashtag-warrior // // Created by Daniel Wood on 20/04/2013. // Copyright (c) 2013 Ossum Games. All rights reserved. // #ifndef hashtag_warrior_Constants_h #define hashtag_warrior_Constants_h // UI & appearance #define kHWBackgroundColor ccc4(142, 193, 218, 255) #define kHWTextColor ccc3(8, 90, 124); #define kHWTextHeadingFamily @"Marker Felt" #define kHWTextBodyFamily @"Arial" // Gameplay #define kHWMinProjectileSize 2.0f // TODO net yet used #define kHWMaxProjectileSize 10.0f // TODO net yet used #define kHWMinProjectileStartVelocity 2.0f // TODO net yet used #define kHWMaxProjectileStartVelocity 8.0f // TODO net yet used #define kHWMinProjectileStartAngle -5 // TODO net yet used #define kHWMaxProjectileStartAngle 30 // TODO net yet used // Environment #define kHWMaxVelocity 10.0f #define kHWForceMagnifier 5 #endif
// // Constants.h // hashtag-warrior // // Created by Daniel Wood on 20/04/2013. // Copyright (c) 2013 Ossum Games. All rights reserved. // #ifndef hashtag_warrior_Constants_h #define hashtag_warrior_Constants_h // UI & appearance #define kHWBackgroundColor ccc4(142, 193, 218, 255) #define kHWTextColor ccc3(8, 90, 124); #define kHWTextHeadingFamily @"Marker Felt" #define kHWTextBodyFamily @"Arial" // Gameplay #define kHWMinProjectileSize 2.0f // TODO net yet used #define kHWMaxProjectileSize 10.0f // TODO net yet used #define kHWMinProjectileStartVelocity 2.0f // TODO net yet used #define kHWMaxProjectileStartVelocity 8.0f // TODO net yet used #define kHWMinProjectileStartAngle -5 // TODO net yet used #define kHWMaxProjectileStartAngle 30 // TODO net yet used // Environment #define kHWMaxVelocity 10.0f #define kHWForceMagnifier 5 // Misc #define kHWIsDebug 0 #endif
Add a constant for detecting whether we are in debug mode.
Add a constant for detecting whether we are in debug mode.
C
mit
TuftEntertainment/hashtag-warrior,TuftEntertainment/hashtag-warrior,TuftEntertainment/hashtag-warrior,TuftEntertainment/hashtag-warrior,TuftEntertainment/hashtag-warrior,TuftEntertainment/hashtag-warrior,TuftEntertainment/hashtag-warrior,TuftEntertainment/hashtag-warrior
01110b91b54b7a5aada4ba2c15819c608cce9633
c/ppb_find.h
c/ppb_find.h
// Copyright (c) 2010 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 PPAPI_C_PPB_FIND_H_ #define PPAPI_C_PPB_FIND_H_ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_stdint.h" #define PPB_FIND_INTERFACE "PPB_Find;1" typedef struct _ppb_Find { // Updates the number of find results for the current search term. If // there are no matches 0 should be passed in. Only when the plugin has // finished searching should it pass in the final count with finalResult set // to true. void NumberOfFindResultsChanged(PP_Instance instance, int32_t total, bool final_result); // Updates the index of the currently selected search item. void SelectedFindResultChanged(PP_Instance instance, int32_t index); } PPB_Find; #endif // PPAPI_C_PPB_FIND_H_
// Copyright (c) 2010 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 PPAPI_C_PPB_FIND_H_ #define PPAPI_C_PPB_FIND_H_ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_stdint.h" #define PPB_FIND_INTERFACE "PPB_Find;1" typedef struct _ppb_Find { // Updates the number of find results for the current search term. If // there are no matches 0 should be passed in. Only when the plugin has // finished searching should it pass in the final count with finalResult set // to true. void (*NumberOfFindResultsChanged)(PP_Instance instance, int32_t total, bool final_result); // Updates the index of the currently selected search item. void (*SelectedFindResultChanged)(PP_Instance instance, int32_t index); } PPB_Find; #endif // PPAPI_C_PPB_FIND_H_
Structure member should be function pointer
Structure member should be function pointer BUG=none TEST=compiles Review URL: http://codereview.chromium.org/2972004
C
bsd-3-clause
lio972/ppapi,Iwan12/ppapi,lio972/ppapi,macressler/ppapi,melchi45/ppapi,LinRaise/ppapi,kaijajan/ppapi,lio972/ppapi,lio972/ppapi,kaijajan/ppapi,thecocce/ppapi,Iwan12/ppapi,kaijajan/ppapi,Iwan12/ppapi,jmnjmn/ppapi,LinRaise/ppapi,LinRaise/ppapi,melchi45/ppapi,kaijajan/ppapi,LinRaise/ppapi,johnnnylm/ppapi,thecocce/ppapi,iofcas/ppapi,melchi45/ppapi,macressler/ppapi,Iwan12/ppapi,iofcas/ppapi,thecocce/ppapi,iofcas/ppapi,melchi45/ppapi,macressler/ppapi,jmnjmn/ppapi,johnnnylm/ppapi,johnnnylm/ppapi,humanai/ppapi,johnnnylm/ppapi,humanai/ppapi,humanai/ppapi,jmnjmn/ppapi,macressler/ppapi,Gitzk/ppapi,jmnjmn/ppapi,johnnnylm/ppapi,lio972/ppapi,iofcas/ppapi,Gitzk/ppapi,jmnjmn/ppapi,thecocce/ppapi,Gitzk/ppapi,thecocce/ppapi,melchi45/ppapi,LinRaise/ppapi,humanai/ppapi,kaijajan/ppapi,macressler/ppapi,iofcas/ppapi,Iwan12/ppapi,humanai/ppapi,Gitzk/ppapi,Gitzk/ppapi
986a9fa1b91d2ab0e0e11fb1dc5d05fa2e1a4a0d
lib/Target/CppBackend/CPPTargetMachine.h
lib/Target/CppBackend/CPPTargetMachine.h
//===-- CPPTargetMachine.h - TargetMachine for the C++ backend --*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file declares the TargetMachine that is used by the C++ backend. // //===----------------------------------------------------------------------===// #ifndef CPPTARGETMACHINE_H #define CPPTARGETMACHINE_H #include "llvm/IR/DataLayout.h" #include "llvm/Target/TargetMachine.h" namespace llvm { class formatted_raw_ostream; struct CPPTargetMachine : public TargetMachine { CPPTargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) : TargetMachine(T, TT, CPU, FS, Options) {} bool addPassesToEmitFile(PassManagerBase &PM, formatted_raw_ostream &Out, CodeGenFileType FileType, bool DisableVerify, AnalysisID StartAfter, AnalysisID StopAfter) override; const DataLayout *getDataLayout() const override { return nullptr; } }; extern Target TheCppBackendTarget; } // End llvm namespace #endif
//===-- CPPTargetMachine.h - TargetMachine for the C++ backend --*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file declares the TargetMachine that is used by the C++ backend. // //===----------------------------------------------------------------------===// #ifndef CPPTARGETMACHINE_H #define CPPTARGETMACHINE_H #include "llvm/IR/DataLayout.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetSubtargetInfo.h" namespace llvm { class formatted_raw_ostream; class CPPSubtarget : public TargetSubtargetInfo { }; struct CPPTargetMachine : public TargetMachine { CPPTargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) : TargetMachine(T, TT, CPU, FS, Options), Subtarget() {} private: CPPSubtarget Subtarget; public: const CPPSubtarget *getSubtargetImpl() const override { return &Subtarget; } bool addPassesToEmitFile(PassManagerBase &PM, formatted_raw_ostream &Out, CodeGenFileType FileType, bool DisableVerify, AnalysisID StartAfter, AnalysisID StopAfter) override; }; extern Target TheCppBackendTarget; } // End llvm namespace #endif
Add a dummy subtarget to the CPP backend target machine. This will allow us to forward all of the standard TargetMachine calls to the subtarget and still return null as we were before.
Add a dummy subtarget to the CPP backend target machine. This will allow us to forward all of the standard TargetMachine calls to the subtarget and still return null as we were before. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@214727 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm
57cc9fcf75e31ef88d66e03588bc2c0a08b0b2aa
src/framework/framework.h
src/framework/framework.h
// framework.h #ifndef HEADER_FRAMEWORK #define HEADER_FRAMEWORK // forward declaration typedef struct wookie_framework wookie_framework; /* Send an HTTP request back to the framework */ void *wookie_framework_request(void*); #include "../http_parser/parser.h" #include "../server.h" #include "framework.c" /* Create new framework */ wookie_framework *wookie_new_framework(char*, int); /* Add a route to the framework */ void wookie_add_route(wookie_framework*, wookie_route*); /* Start the framework */ int wookie_start_framework(wookie_framework*); #endif
// framework.h #ifndef HEADER_FRAMEWORK #define HEADER_FRAMEWORK // forward declaration typedef struct wookie_framework wookie_framework; /* Send an HTTP request back to the framework */ void *wookie_framework_request(void*); #include "../http_parser/parser.h" #include "../http_parser/http_response.h" #include "../server.h" #include "framework.c" /* Create new framework */ wookie_framework *wookie_new_framework(char*, int); /* Add a route to the framework */ void wookie_add_route(wookie_framework*, wookie_route*); /* Start the framework */ int wookie_start_framework(wookie_framework*); #endif
Include HTTP responses in server
Include HTTP responses in server
C
mit
brendanashworth/wookie,brendanashworth/wookie
2978caa3dace55323940bac7d35eefc11ad25c50
src/printdird/printdird.c
src/printdird/printdird.c
#include <sys/inotify.h> #include <unistd.h> #include <sys/wait.h> #include <limits.h> #define BUF_LEN ( sizeof(struct inotify_event) + NAME_MAX + 1 ) int main(int argc, char *argv[]) { int notify; char buf[BUF_LEN]; struct inotify_event *event; const char *watchpath = "/home/ian/.PRINT"; notify = inotify_init(); if (inotify_add_watch(notify, watchpath, IN_CLOSE_WRITE) == -1) return 1; if (chdir(watchpath) !=0) return 1; while (1) { read(notify, buf, BUF_LEN); event = (struct inotify_event *) &buf[0]; if (event->name[0] == '.') continue; if(fork() == 0) { execlp("lpr" ,"-r" , event->name, NULL); return 0; } wait(NULL); unlink(event->name); } }
#include <sys/inotify.h> #include <unistd.h> #include <sys/wait.h> #include <limits.h> #define BUF_LEN ( sizeof(struct inotify_event) + NAME_MAX + 1 ) int main(int argc, char *argv[]) { int notify; char buf[BUF_LEN]; struct inotify_event *event; const char *watchpath = "/home/ian/.PRINT"; notify = inotify_init(); if (inotify_add_watch(notify, watchpath, IN_CLOSE_WRITE) == -1) return 1; if (chdir(watchpath) !=0) return 1; while (1) { read(notify, buf, BUF_LEN); event = (struct inotify_event *) &buf[0]; if (event->name[0] == '.') continue; if(fork() == 0) { execlp("lpr" ,"-r" , event->name, NULL); return 0; } wait(NULL); unlink(event->name); } }
Replace tab w/ 4-space indent
Replace tab w/ 4-space indent
C
mit
ids1024/Utilities,ids1024/Utilities,ids1024/Utilities
0b08d34452583460b74fb31624a3e743641fc615
src/printdird/printdird.c
src/printdird/printdird.c
#include <sys/inotify.h> #include <unistd.h> #include <limits.h> #include <cups/cups.h> #define BUF_LEN ( sizeof(struct inotify_event) + NAME_MAX + 1 ) int main(int argc, char *argv[]) { int notify; char buf[BUF_LEN]; struct inotify_event *event; cups_dest_t *dest; char *printer; char *filename; int job_id; const char *watchpath = "/home/ian/.PRINT"; notify = inotify_init(); if (inotify_add_watch(notify, watchpath, IN_CLOSE_WRITE) == -1) return 1; if (chdir(watchpath) !=0) return 1; //Get default printer if ((dest = cupsGetNamedDest(NULL, NULL, NULL)) == NULL ) return 1; printer = dest->name; while (1) { read(notify, buf, BUF_LEN); event = (struct inotify_event *) &buf[0]; filename = event->name; if (filename[0] == '.') continue; job_id = cupsPrintFile(printer, filename, filename, 0, NULL); cupsStartDocument(CUPS_HTTP_DEFAULT, printer, job_id, NULL, CUPS_FORMAT_AUTO, 1); unlink(filename); } }
#include <sys/inotify.h> #include <unistd.h> #include <limits.h> #include <cups/cups.h> #define BUF_LEN ( sizeof(struct inotify_event) + NAME_MAX + 1 ) int main(int argc, char *argv[]) { int notify; cups_dest_t *dest; char *printer; const char *watchpath = "/home/ian/.PRINT"; notify = inotify_init(); if (inotify_add_watch(notify, watchpath, IN_CLOSE_WRITE) == -1) return 1; if (chdir(watchpath) !=0) return 1; //Get default printer if ((dest = cupsGetNamedDest(NULL, NULL, NULL)) == NULL ) return 1; printer = dest->name; while (1) { char buf[BUF_LEN]; struct inotify_event *event; char *filename; int job_id; read(notify, buf, BUF_LEN); event = (struct inotify_event *) &buf[0]; filename = event->name; if (filename[0] == '.') continue; job_id = cupsPrintFile(printer, filename, filename, 0, NULL); cupsStartDocument(CUPS_HTTP_DEFAULT, printer, job_id, NULL, CUPS_FORMAT_AUTO, 1); unlink(filename); } }
Move variable declarations to while loop
Move variable declarations to while loop
C
mit
ids1024/Utilities,ids1024/Utilities,ids1024/Utilities
f0d5e3667099a34ca060fc13de19ef5be0c84db2
inc/filter/movingaverage.h
inc/filter/movingaverage.h
#pragma once #include <array> namespace filter { template <typename T, size_t N> class MovingAverage { public: MovingAverage(T initial_value=static_cast<T>(0)); T output() const; // return average of data in buffer T output(T input); // add new value to buffer and return average private: std::array<T, N> m_data; // circular buffer containing samples size_t m_data_index; // index of oldest circular buffer element T m_sum; // sum of all elements in buffer }; } // namespace filter #include "filter/movingaverage.hh"
#pragma once #include <array> namespace filter { /* * Warning: This class does not protect against sum overflow. It is possible * that the sum of values exceeds the maximum value T can store. */ template <typename T, size_t N> class MovingAverage { public: MovingAverage(T initial_value=static_cast<T>(0)); T output() const; // return average of data in buffer T output(T input); // add new value to buffer and return average private: std::array<T, N> m_data; // circular buffer containing samples size_t m_data_index; // index of oldest circular buffer element T m_sum; // sum of all elements in buffer }; } // namespace filter #include "filter/movingaverage.hh"
Document possibility of sum overflow in MovingAverage
Document possibility of sum overflow in MovingAverage
C
bsd-2-clause
oliverlee/phobos,oliverlee/phobos,oliverlee/phobos,oliverlee/phobos
1d6ea657a965cbe59fa1b669d01422f3b8cbb193
src/modules/conf_randr/e_smart_randr.h
src/modules/conf_randr/e_smart_randr.h
#ifdef E_TYPEDEFS #else # ifndef E_SMART_RANDR_H # define E_SMART_RANDR_H Evas_Object *e_smart_randr_add(Evas *evas); void e_smart_randr_layout_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h); void e_smart_randr_current_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h); void e_smart_randr_monitors_create(Evas_Object *obj); void e_smart_randr_monitor_add(Evas_Object *obj, Evas_Object *mon); void e_smart_randr_monitor_del(Evas_Object *obj, Evas_Object *mon); Eina_List *e_smart_randr_monitors_get(Evas_Object *obj); Eina_Bool e_smart_randr_changed_get(Evas_Object *obj); void e_smart_randr_changes_apply(Evas_Object *obj, Ecore_X_Window root); # endif #endif
#ifdef E_TYPEDEFS #else # ifndef E_SMART_RANDR_H # define E_SMART_RANDR_H Evas_Object *e_smart_randr_add(Evas *evas); void e_smart_randr_layout_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h); void e_smart_randr_current_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h); void e_smart_randr_monitors_create(Evas_Object *obj); void e_smart_randr_monitor_add(Evas_Object *obj, Evas_Object *mon); void e_smart_randr_monitor_del(Evas_Object *obj, Evas_Object *mon); Eina_List *e_smart_randr_monitors_get(Evas_Object *obj); Eina_Bool e_smart_randr_changed_get(Evas_Object *obj); void e_smart_randr_changes_apply(Evas_Object *obj); # endif #endif
Remove root window as a function paramater (not used anymore).
Remove root window as a function paramater (not used anymore). Signed-off-by: Christopher Michael <[email protected]> SVN revision: 81262
C
bsd-2-clause
FlorentRevest/Enlightenment,FlorentRevest/Enlightenment,tasn/enlightenment,tasn/enlightenment,tasn/enlightenment,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment,rvandegrift/e,rvandegrift/e,tizenorg/platform.upstream.enlightenment,tizenorg/platform.upstream.enlightenment,rvandegrift/e
ee701dc2f7f1459af75f099c9c901352bc77c94e
SSPSolution/SSPSolution/System.h
SSPSolution/SSPSolution/System.h
#ifndef SSPAPPLICATION_CORE_SYSTEM_H #define SSPAPPLICATION_CORE_SYSTEM_H #include <SDL.h> #include <SDL_syswm.h> #include <iostream> #include "../GraphicsDLL/GraphicsHandler.h" #include "../GraphicsDLL/Camera.h" #include "InputHandler.h" #include "../physicsDLL/physicsDLL/PhysicsHandler.h" #pragma comment (lib, "../Debug/PhysicsDLL") const int SCREEN_WIDTH = 1280; const int SCREEN_HEIGHT = 720; class System { private: bool m_fullscreen; bool m_running; //The glorious window handle for the sdl window HWND m_hwnd; HINSTANCE m_hinstance; LPCWSTR m_applicationName; //This is the window we render to SDL_Window* m_window; Camera* m_camera; //These are the subsystems GraphicsHandler* m_graphicsHandler; InputHandler* m_inputHandler; //this is a physicsHandler PhysicsHandler m_physicsHandler; public: System(); ~System(); int Shutdown(); int Initialize(); //Do not place things here without talking to the system designers. Place any update method in the System::Update(float dt) method int Run(); int Update(float deltaTime); private: int HandleEvents(); int FullscreenToggle(); }; #endif
#ifndef SSPAPPLICATION_CORE_SYSTEM_H #define SSPAPPLICATION_CORE_SYSTEM_H #include <SDL.h> #include <SDL_syswm.h> #include <iostream> #include "../GraphicsDLL/GraphicsHandler.h" #include "../GraphicsDLL/Camera.h" #include "InputHandler.h" #include "../physicsDLL/PhysicsHandler.h" #pragma comment (lib, "../Debug/PhysicsDLL") const int SCREEN_WIDTH = 1280; const int SCREEN_HEIGHT = 720; class System { private: bool m_fullscreen; bool m_running; //The glorious window handle for the sdl window HWND m_hwnd; HINSTANCE m_hinstance; LPCWSTR m_applicationName; //This is the window we render to SDL_Window* m_window; Camera* m_camera; //These are the subsystems GraphicsHandler* m_graphicsHandler; InputHandler* m_inputHandler; //this is a physicsHandler PhysicsHandler m_physicsHandler; public: System(); ~System(); int Shutdown(); int Initialize(); //Do not place things here without talking to the system designers. Place any update method in the System::Update(float dt) method int Run(); int Update(float deltaTime); private: int HandleEvents(); int FullscreenToggle(); }; #endif
FIX physicsDLL include path FOR DLL to work
FIX physicsDLL include path FOR DLL to work
C
apache-2.0
Chringo/SSP,Chringo/SSP
753ceda15f9730e7e0a660b1a0e9d387a3c1bf66
Classes/NBNPhotoChooserViewController.h
Classes/NBNPhotoChooserViewController.h
#import <UIKit/UIKit.h> @protocol NBNPhotoChooserViewControllerDelegate; @interface NBNPhotoChooserViewController : UIViewController - (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate; - (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate maxCellWidth:(CGFloat)maxCellWidth cellSpacing:(CGFloat)cellSpacing; @property (nonatomic) NSString *navigationBarTitle; @property (nonatomic) NSString *cancelButtonTitle; @property (nonatomic) BOOL shouldAnimateImagePickerTransition; @end @protocol NBNPhotoChooserViewControllerDelegate <NSObject> - (void)photoChooserController:(NBNPhotoChooserViewController *)photoChooser didChooseImage:(UIImage *)image; - (void)photoChooserDidCancel:(NBNPhotoChooserViewController *)photoChooser; @end
#import <UIKit/UIKit.h> @protocol NBNPhotoChooserViewControllerDelegate; @interface NBNPhotoChooserViewController : UIViewController - (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate; - (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate maxCellWidth:(CGFloat)maxCellWidth cellSpacing:(CGFloat)cellSpacing; @property (nonatomic) NSString *navigationBarTitle; @property (nonatomic) NSString *cancelButtonTitle; @property (nonatomic) BOOL shouldAnimateImagePickerTransition; @end @protocol NBNPhotoChooserViewControllerDelegate <NSObject> - (void)photoChooserController:(NBNPhotoChooserViewController *)photoChooser didChooseImage:(UIImage *)image; @optional - (void)photoChooserDidCancel:(NBNPhotoChooserViewController *)photoChooser; @end
Make delegate method optional (cancellation is handled automatically when using UINavigationController)
Make delegate method optional (cancellation is handled automatically when using UINavigationController)
C
mit
nerdishbynature/NBNPhotoChooser,kimar/NBNPhotoChooser
a3f92d3c91b784747173ac16bdca620da2fbb7a3
lib/vpsc/variable.h
lib/vpsc/variable.h
/** * * 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 SEEN_REMOVEOVERLAP_VARIABLE_H #define SEEN_REMOVEOVERLAP_VARIABLE_H #include <vector> #include <iostream> class Block; class Constraint; #include "block.h" typedef std::vector<Constraint*> Constraints; class Variable { friend std::ostream& operator <<(std::ostream &os, const Variable &v); public: const int id; // useful in log files double desiredPosition; const double weight; double offset; Block *block; bool visited; Constraints in; Constraints out; char *toString(); inline Variable(const int id, const double desiredPos, const double weight) : id(id) , desiredPosition(desiredPos) , weight(weight) , offset(0) , visited(false) { } inline double Variable::position() const { return block->posn+offset; } //double position() const; ~Variable(void){ in.clear(); out.clear(); } }; #endif // SEEN_REMOVEOVERLAP_VARIABLE_H
Add the vpsc library for IPSEPCOLA features
Add the vpsc library for IPSEPCOLA features
C
epl-1.0
BMJHayward/graphviz,pixelglow/graphviz,tkelman/graphviz,tkelman/graphviz,pixelglow/graphviz,BMJHayward/graphviz,jho1965us/graphviz,jho1965us/graphviz,MjAbuz/graphviz,tkelman/graphviz,ellson/graphviz,MjAbuz/graphviz,pixelglow/graphviz,kbrock/graphviz,tkelman/graphviz,kbrock/graphviz,kbrock/graphviz,tkelman/graphviz,tkelman/graphviz,ellson/graphviz,jho1965us/graphviz,BMJHayward/graphviz,pixelglow/graphviz,kbrock/graphviz,BMJHayward/graphviz,kbrock/graphviz,tkelman/graphviz,ellson/graphviz,kbrock/graphviz,MjAbuz/graphviz,tkelman/graphviz,kbrock/graphviz,BMJHayward/graphviz,tkelman/graphviz,ellson/graphviz,pixelglow/graphviz,MjAbuz/graphviz,pixelglow/graphviz,BMJHayward/graphviz,jho1965us/graphviz,pixelglow/graphviz,jho1965us/graphviz,BMJHayward/graphviz,pixelglow/graphviz,BMJHayward/graphviz,jho1965us/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,ellson/graphviz,kbrock/graphviz,jho1965us/graphviz,pixelglow/graphviz,ellson/graphviz,MjAbuz/graphviz,ellson/graphviz,ellson/graphviz,MjAbuz/graphviz,pixelglow/graphviz,kbrock/graphviz,jho1965us/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,tkelman/graphviz,jho1965us/graphviz,BMJHayward/graphviz,jho1965us/graphviz,jho1965us/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,pixelglow/graphviz,ellson/graphviz,tkelman/graphviz,ellson/graphviz,kbrock/graphviz,ellson/graphviz,kbrock/graphviz
0a7fe1761cdb101263afa617fd31c3cef357ad40
Pod/Classes/OCKCarePlanEvent+CMHealth.h
Pod/Classes/OCKCarePlanEvent+CMHealth.h
#import <CareKit/CareKit.h> typedef void(^CMHCareSaveCompletion)(NSString *_Nullable uploadStatus, NSError *_Nullable error); @interface OCKCarePlanEvent (CMHealth) @property (nonatomic, nonnull, readonly) NSString *cmh_objectId; - (void)cmh_saveWithCompletion:(_Nullable CMHCareSaveCompletion)block; @end
#import <CareKit/CareKit.h> typedef void(^CMHCareSaveCompletion)(NSString *_Nullable uploadStatus, NSError *_Nullable error); /** * This category adds properties and methods to the `OCKCarePlanEvent` class which * allow instances to be identified uniquely and saved to CloudMine's * HIPAA compliant Connected Health Cloud. */ @interface OCKCarePlanEvent (CMHealth) /** * The unique identifier assigned to this event based on its `OCKCarePlanActivity` * identifier, its schedule, and its days since start. * * @warning the CareKit component of this SDK is experimental and subject to change. Your * feedback is welcomed! */ @property (nonatomic, nonnull, readonly) NSString *cmh_objectId; /** * Save a representation of this `OCKCarePlanEvent` isntance to CloudMine. * The event is given a unique identifier based on its `OCKCarePlanActivity` identifier, * its schedule, and its days since start. Saving an event multiple times will update * the instance of that event on CloudMine. The callback will provide a string value * of `created` or `updated` if the operation was successful. * * @warning the CareKit component of this SDK is experimental and subject to change. Your * feedback is welcomed! * * @param block Executes when the request completes successfully or fails with an error. */ - (void)cmh_saveWithCompletion:(_Nullable CMHCareSaveCompletion)block; @end
Add appledoc header comments to the 'OCKCarePlanEvent' class
Add appledoc header comments to the 'OCKCarePlanEvent' class
C
mit
cloudmine/CMHealthSDK-iOS,cloudmine/CMHealthSDK-iOS,cloudmine/CMHealthSDK
03a80e429b8eb1568052406520957291b878dbbe
ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c
ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries * * 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. */ #include "supervisor/board.h" void board_init(void) { } bool board_requests_safe_mode(void) { return false; } void reset_board(void) { } void board_deinit(void) { }
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries * * 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. */ #include "supervisor/board.h" void board_init(void) { } bool board_requests_safe_mode(void) { return false; } void reset_board(void) { } void board_deinit(void) { }
Add new line for pre-commit
Add new line for pre-commit
C
mit
adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython
f069298847ebaf5d964a5056128171d441938d76
CroquetPlugin/sqWin32CroquetPlugin.c
CroquetPlugin/sqWin32CroquetPlugin.c
#include <windows.h> #include "CroquetPlugin.h" static int loaded = 0; static HMODULE hAdvApi32 = NULL; static BOOLEAN (*RtlGenRandom)(PVOID, ULONG) = NULL; int ioGatherEntropy(char *bufPtr, int bufSize) { if(!loaded) { loaded = 1; hAdvApi32 = LoadLibrary("advapi32.dll"); (void*)RtlGenRandom = GetProcAddress(hAdvApi32, "SystemFunction036"); } if(!RtlGenRandom) return 0; return RtlGenRandom(bufPtr, bufSize); }
Add Win32 specific code for CroquetPlugin.
Add Win32 specific code for CroquetPlugin. git-svn-id: f18ccec24f938f15aa42574278fe0cc52f637e81@1398 fa1542d4-bde8-0310-ad64-8ed1123d492a
C
mit
peteruhnak/pharo-vm,timfel/squeakvm,timfel/squeakvm,peteruhnak/pharo-vm,timfel/squeakvm,OpenSmalltalk/vm,bencoman/pharo-vm,bencoman/pharo-vm,OpenSmalltalk/vm,bencoman/pharo-vm,timfel/squeakvm,bencoman/pharo-vm,peteruhnak/pharo-vm,timfel/squeakvm,peteruhnak/pharo-vm,peteruhnak/pharo-vm,OpenSmalltalk/vm,OpenSmalltalk/vm,timfel/squeakvm,bencoman/pharo-vm,OpenSmalltalk/vm,bencoman/pharo-vm,bencoman/pharo-vm,OpenSmalltalk/vm,peteruhnak/pharo-vm,timfel/squeakvm,peteruhnak/pharo-vm,peteruhnak/pharo-vm,bencoman/pharo-vm,OpenSmalltalk/vm,OpenSmalltalk/vm,bencoman/pharo-vm,timfel/squeakvm
c1f5a1944657ba6abe375e3bb2a3238a46849f70
fs/ext3/bitmap.c
fs/ext3/bitmap.c
/* * linux/fs/ext3/bitmap.c * * Copyright (C) 1992, 1993, 1994, 1995 * Remy Card ([email protected]) * Laboratoire MASI - Institut Blaise Pascal * Universite Pierre et Marie Curie (Paris VI) */ #ifdef EXT3FS_DEBUG #include <linux/buffer_head.h> #include "ext3_fs.h" static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0}; unsigned long ext3_count_free (struct buffer_head * map, unsigned int numchars) { unsigned int i; unsigned long sum = 0; if (!map) return (0); for (i = 0; i < numchars; i++) sum += nibblemap[map->b_data[i] & 0xf] + nibblemap[(map->b_data[i] >> 4) & 0xf]; return (sum); } #endif /* EXT3FS_DEBUG */
/* * linux/fs/ext3/bitmap.c * * Copyright (C) 1992, 1993, 1994, 1995 * Remy Card ([email protected]) * Laboratoire MASI - Institut Blaise Pascal * Universite Pierre et Marie Curie (Paris VI) */ #include <linux/buffer_head.h> #include <linux/jbd.h> #include <linux/ext3_fs.h> #ifdef EXT3FS_DEBUG static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0}; unsigned long ext3_count_free (struct buffer_head * map, unsigned int numchars) { unsigned int i; unsigned long sum = 0; if (!map) return (0); for (i = 0; i < numchars; i++) sum += nibblemap[map->b_data[i] & 0xf] + nibblemap[(map->b_data[i] >> 4) & 0xf]; return (sum); } #endif /* EXT3FS_DEBUG */
Fix debug logging-only compilation error
[PATCH] ext3: Fix debug logging-only compilation error When EXT3FS_DEBUG is #define-d, the compile breaks due to #include file issues. Signed-off-by: Kirk True <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
C
mit
KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,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,KristFoundation/Programs,KristFoundation/Programs
e2170f8cc32db962f0c67dc7862cca7c59e828d3
ui/gfx/favicon_size.h
ui/gfx/favicon_size.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 UI_GFX_FAVICON_SIZE_H_ #define UI_GFX_FAVICON_SIZE_H_ #pragma once namespace gfx { // Size (along each axis) of the favicon. extern const int kFaviconSize; // If the width or height is bigger than the favicon size, a new width/height // is calculated and returned in width/height that maintains the aspect // ratio of the supplied values. void CalculateFaviconTargetSize(int* width, int* height); } // namespace gfx #endif // UI_GFX_FAVICON_SIZE_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 UI_GFX_FAVICON_SIZE_H_ #define UI_GFX_FAVICON_SIZE_H_ #pragma once #include "ui/base/ui_export.h" namespace gfx { // Size (along each axis) of the favicon. UI_EXPORT extern const int kFaviconSize; // If the width or height is bigger than the favicon size, a new width/height // is calculated and returned in width/height that maintains the aspect // ratio of the supplied values. UI_EXPORT void CalculateFaviconTargetSize(int* width, int* height); } // namespace gfx #endif // UI_GFX_FAVICON_SIZE_H_
Fix Linux shared build by adding missing UI_EXPORT annotations.
ui/gfx: Fix Linux shared build by adding missing UI_EXPORT annotations. [email protected] Review URL: http://codereview.chromium.org/8028029 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@102765 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,Just-D/chromium-1,Just-D/chromium-1,rogerwang/chromium,nacl-webkit/chrome_deps,rogerwang/chromium,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,littlstar/chromium.src,Just-D/chromium-1,nacl-webkit/chrome_deps,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,chuan9/chromium-crosswalk,anirudhSK/chromium,Jonekee/chromium.src,chuan9/chromium-crosswalk,Jonekee/chromium.src,timopulkkinen/BubbleFish,dushu1203/chromium.src,ondra-novak/chromium.src,ltilve/chromium,junmin-zhu/chromium-rivertrail,axinging/chromium-crosswalk,dednal/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,dednal/chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,ltilve/chromium,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,keishi/chromium,ChromiumWebApps/chromium,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,Chilledheart/chromium,Jonekee/chromium.src,hujiajie/pa-chromium,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,dednal/chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,markYoungH/chromium.src,Jonekee/chromium.src,nacl-webkit/chrome_deps,M4sse/chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,patrickm/chromium.src,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,keishi/chromium,keishi/chromium,chuan9/chromium-crosswalk,M4sse/chromium.src,Chilledheart/chromium,Jonekee/chromium.src,patrickm/chromium.src,jaruba/chromium.src,ChromiumWebApps/chromium,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,dushu1203/chromium.src,littlstar/chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,zcbenz/cefode-chromium,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,anirudhSK/chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,anirudhSK/chromium,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,keishi/chromium,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,Just-D/chromium-1,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,robclark/chromium,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,ltilve/chromium,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,robclark/chromium,pozdnyakov/chromium-crosswalk,ltilve/chromium,Jonekee/chromium.src,hujiajie/pa-chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,rogerwang/chromium,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,rogerwang/chromium,timopulkkinen/BubbleFish,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,littlstar/chromium.src,zcbenz/cefode-chromium,M4sse/chromium.src,patrickm/chromium.src,zcbenz/cefode-chromium,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,keishi/chromium,dushu1203/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail,robclark/chromium,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium,fujunwei/chromium-crosswalk,robclark/chromium,ondra-novak/chromium.src,keishi/chromium,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,jaruba/chromium.src,axinging/chromium-crosswalk,robclark/chromium,keishi/chromium,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,rogerwang/chromium,M4sse/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,dednal/chromium.src,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,chuan9/chromium-crosswalk,littlstar/chromium.src,dednal/chromium.src,bright-sparks/chromium-spacewalk,patrickm/chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,dednal/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,zcbenz/cefode-chromium,robclark/chromium,Jonekee/chromium.src,jaruba/chromium.src,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,robclark/chromium,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,Jonekee/chromium.src,ondra-novak/chromium.src,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ltilve/chromium,patrickm/chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,dushu1203/chromium.src,dednal/chromium.src,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,anirudhSK/chromium,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,robclark/chromium,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,keishi/chromium,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,robclark/chromium,timopulkkinen/BubbleFish,M4sse/chromium.src,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,ChromiumWebApps/chromium,ltilve/chromium,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,M4sse/chromium.src,M4sse/chromium.src,keishi/chromium,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,ondra-novak/chromium.src,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,rogerwang/chromium,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,robclark/chromium,rogerwang/chromium,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,patrickm/chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,jaruba/chromium.src,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,ondra-novak/chromium.src,ltilve/chromium,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,rogerwang/chromium,rogerwang/chromium,zcbenz/cefode-chromium,Chilledheart/chromium,Just-D/chromium-1,markYoungH/chromium.src,rogerwang/chromium,keishi/chromium,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,fujunwei/chromium-crosswalk,anirudhSK/chromium,jaruba/chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium
46d883dacaba3d481e47cc96c163e33c43c2e33a
prime_divisors/benchmark.c
prime_divisors/benchmark.c
#include "stdio.h" #define MAX_SIZE 10000001 #define MAX_FACTORS 10000 int primes(int n) { int i, d; int factors[MAX_FACTORS]; for(i=0;i < MAX_FACTORS; i++) factors[i] = 0; i = 0; d = 2; while(d*d <= n){ if(n%d == 0){ while(n%d == 0){ n /= d; factors[i] = d; } i++; } d++; } if(n > 1) factors[i++] = d; return i; } int count(int a, int b, int k){ int ans = 0; for(int i = a; i < (b+1); i++){ if (primes(i)==k) ans++; } return ans; } int main(void) { int t,n,a,b,k; a = 2; b = 10000000; k = 2; printf(" Number of integers between %d and %d, each having exactly %d prime divisors : %d" ,a,b,k,count(a,b,k)); return 1; }
#include "stdio.h" #define MAX_SIZE 10000001 #define MAX_FACTORS 10000 int primes(int n) { int i, d; int factors[MAX_FACTORS]; for(i=0;i < MAX_FACTORS; i++) factors[i] = 0; i = 0; d = 2; while(d*d <= n){ if(n%d == 0){ while(n%d == 0){ n /= d; factors[i] = d; } i++; } d++; } if(n > 1) factors[i++] = d; return i; } int count(int a, int b, int k){ int ans = 0; for(int i = a; i < (b+1); i++){ if (primes(i)==k) ans++; } return ans; } int main(void) { int t,n,a,b,k; a = 2; b = 10000000; k = 2; printf(" Number of integers between %d and %d, each having exactly %d prime divisors : %d" ,a,b,k,count(a,b,k)); return 0; }
Fix return value of C program
Fix return value of C program
C
mit
zbard/benchmark,zbard/benchmark,zbard/benchmark,zbard/benchmark,zbard/benchmark
22fd3d429ee81a0d773d30b9a7b80741bdac8aba
lab3/timer.h
lab3/timer.h
#ifndef TIMER_H #define TIMER_H struct timespec t0, t1; /* Start/end time for timer */ /* Timer macros */ #define TIMER_START() clock_gettime(CLOCK_MONOTONIC_RAW, &t0) #define TIMER_STOP() clock_gettime(CLOCK_MONOTONIC_RAW, &t1) #define TIMER_ELAPSED_NS() \ (t1.tv_sec * 1000000000 + t1.tv_nsec) - \ (t0.tv_sec * 1000000000 + t0.tv_nsec) #define TIMER_ELAPSED_US() \ (t1.tv_sec * 1000000 + (double)t1.tv_nsec / 1000) - \ (t0.tv_sec * 1000000 + (double)t0.tv_nsec / 1000) #endif /* TIMER_H */
#ifndef TIMER_H #define TIMER_H struct timespec t0, t1; /* Start/end time for timer */ /* Timer macros */ #define TIMER_START() clock_gettime(CLOCK_MONOTONIC, &t0) #define TIMER_STOP() clock_gettime(CLOCK_MONOTONIC, &t1) #define TIMER_ELAPSED_NS() \ (t1.tv_sec * 1000000000 + t1.tv_nsec) - \ (t0.tv_sec * 1000000000 + t0.tv_nsec) #define TIMER_ELAPSED_US() \ (t1.tv_sec * 1000000 + (double)t1.tv_nsec / 1000) - \ (t0.tv_sec * 1000000 + (double)t0.tv_nsec / 1000) #endif /* TIMER_H */
Use CLOCK_MONOTONIC instead of CLOCK_MONOTONIC_RAW.
Use CLOCK_MONOTONIC instead of CLOCK_MONOTONIC_RAW. shell.it.kth.se doesn't have _RAW.
C
mit
estan/ID2200,estan/ID2200
b8bcd304039bba9c1bc8d826e5202e94f7122a7d
Animation.h
Animation.h
#ifndef ANIMATION_H #define ANIMATION_H #include <vector> #include "Blittable.h" #include "Logger.h" namespace hm { class Animation { public: Animation(); ~Animation(); void add(Blittable& b); void remove(Blittable& b); void removeAll(); int getUnits(); void setUnits(const int units); unsigned int getFrames(); void setFrames(const unsigned int frames); void setAnimationSpeed(const int units, const unsigned int frames = 1); virtual void animate() = 0; protected: int units; unsigned int frames; std::vector<Blittable*> targets; }; } #endif
#ifndef ANIMATION_H #define ANIMATION_H #include <vector> #include "Blittable.h" #include "Logger.h" namespace hm { class Animation { public: Animation(); ~Animation(); void add(Blittable& b); void remove(Blittable& b); void removeAll(); int getUnits(); void setUnits(const int units); unsigned int getFrames(); void setFrames(const unsigned int frames); void setAnimationSpeed(const int units, const unsigned int frames = 1); virtual void animate() = 0; virtual bool isComplete() = 0; protected: int units; unsigned int frames; std::vector<Blittable*> targets; }; } #endif
Add pure virtual isComplete() function.
Add pure virtual isComplete() function. This function can be used to determine whether an animation has finished it's task or not.
C
lgpl-2.1
mdclyburn/hume
f3fa0c81d09d352a89c91fdf624ab26bfddf5eb8
system_hooks.h
system_hooks.h
#ifndef __BOMALLOC_SYSTEM #define __BOMALLOC_SYSTEM #include <stdbool.h> #include <stdlib.h> #include <unistd.h> bool speculating(void); void record_allocation(void * p, size_t t); int getuniqueid(void); #endif
Add header file with prototypes that bomalloc needs from the surrounding enviroment
[core] Add header file with prototypes that bomalloc needs from the surrounding enviroment
C
mit
benohalloran/ipa,benohalloran/noomr,benohalloran/ipa,benohalloran/bomalloc,benohalloran/bomalloc,benohalloran/noomr
2bfcd96325b8f0a677658a13440c7ac0066915e2
include/stm8_gpio.h
include/stm8_gpio.h
#include "stm8s003_reg.h" typedef enum { PORT_A = PA_ODR, PORT_B = PB_ODR, PORT_C = PB_, PORT_D, PORT_E, PORT_F } port_t; void toggle_port_a_pin(uint8_t pin); void set_high_port_a_pin(uint8_t pin); void set_low_port_a_pin(uint8_t pin); void set
#include "stm8s003_reg.h" #include <stdint.h> struct input_pin_config { bool pull_up_enable; bool interrupt_enable; }; struct output_pin_config { bool open_drain_enable; bool fast_mode_enable; }; inline void set_port_a(uint8_t value) { PA_ODR = value; } inline void toggle_port_a_pin(uint8_t pin) { set_port_a((*(uart16_t *) PA_ODR) ^ ~(1 << pin)); } inline void set_high_port_a_pin(uint8_t pin) { set_port_a((*(uint16_t *) PA_ODR) | (1 << pin)); } inline void set_low_port_a_pin(uint8_t pin) { set_port_a((*(uart16_t *) PA_ODR) & ~(1 << pin)); } inline void read_port_a(uint8_t * value) { &value = (uint16_t *) PA_IDR; } inline bool read_port_a_pin(uint8_t pin) { uint8_t value; read_port_a_pin(value); return value >> pin; } inline void configure_port_a_input_pin(struct input_pin_config * config); inline void configure_port_a_output_pin(struct output_pin_config * config);
Add some inline functions for configuring gpio.
Add some inline functions for configuring gpio.
C
mit
tderensis/stm8_lib,tderensis/stm8_lib