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
a2015a13fbaa23a2a2097b8573a36e617d1eb980
baseutils/ls/tests/functional_test.c
baseutils/ls/tests/functional_test.c
/* * $FreeBSD$ * * Smoke test for `ls` utility */ #include <getopt.h> #include <stdio.h> #include <stdlib.h> #include "functional_test.h" int main(int argc, char *argv[]) { while ((opt = getopt_long(argc, argv, short_options, long_options, &option_index)) != -1) { switch(opt) { case 0: /* valid long option */ /* generate the valid command for execution */ snprintf(command, sizeof(command), "/bin/ls --%s > /dev/null", long_options[option_index].name); ret = system(command); if (ret == -1) { fprintf(stderr, "Failed to create child process\n"); exit(EXIT_FAILURE); } if (!WIFEXITED(ret)) { fprintf(stderr, "Child process failed to terminate normally\n"); exit(EXIT_FAILURE); } if (WEXITSTATUS(ret)) fprintf(stderr, "\nValid option '--%s' failed to execute\n", long_options[option_index].name); else printf("Successful: '--%s'\n", long_options[option_index].name); break; case '?': /* invalid long option */ break; default: printf("getopt_long returned character code %o\n", opt); } } exit(EXIT_SUCCESS); }
/* * $FreeBSD$ * * Smoke test for `ls` utility */ #include <getopt.h> #include <stdio.h> #include <stdlib.h> #include <sys/wait.h> #include "functional_test.h" int main(int argc, char *argv[]) { while ((opt = getopt_long(argc, argv, short_options, long_options, &option_index)) != -1) { switch(opt) { case 0: /* valid long option */ /* generate the valid command for execution */ snprintf(command, sizeof(command), "/bin/ls --%s > /dev/null", long_options[option_index].name); ret = system(command); if (ret == -1) { fprintf(stderr, "Failed to create child process\n"); exit(EXIT_FAILURE); } if (!WIFEXITED(ret)) { fprintf(stderr, "Child process failed to terminate normally\n"); exit(EXIT_FAILURE); } if (WEXITSTATUS(ret)) fprintf(stderr, "\nValid option '--%s' failed to execute\n", long_options[option_index].name); else printf("Successful: '--%s'\n", long_options[option_index].name); break; case '?': /* invalid long option */ break; default: printf("getopt_long returned character code %o\n", opt); } } exit(EXIT_SUCCESS); }
Fix compilation error on FreeBSD
Fix compilation error on FreeBSD Error log - ``` undefined reference to `WIFEXITED' undefined reference to `WEXITSTATUS' ``` Apparently the header file <sys/wait.h> has to be included in FreeBSD unlike on Linux (Ubuntu 16.10) since it is included by <stdlib.h>.
C
bsd-2-clause
shivansh/smoketestsuite,shivrai/smoketestsuite,shivrai/smoketestsuite,shivrai/smoketestsuite,shivansh/smoketestsuite,shivansh/smoketestsuite
150ea1ffddd8ade2bd1b7f146277210c5f182321
arduino/OpenROV/Settings.h
arduino/OpenROV/Settings.h
#ifndef __SETTINGS_H_ #define __SETTINGS_H_ #include <Arduino.h> #include "Device.h" // This section is for devices and their configuration //Kit: #define HAS_STD_LIGHTS (1) #define LIGHTS_PIN 5 #define HAS_STD_CAPE (1) #define HAS_STD_2X1_THRUSTERS (1) #define HAS_STD_PILOT (1) #define HAS_STD_CAMERAMOUNT (1) #define CAMERAMOUNT_PIN 3 #define CAPE_VOLTAGE_PIN 0 #define CAPE_CURRENT_PIN 3 //After Market: #define HAS_STD_CALIBRATIONLASERS (0) #define CALIBRATIONLASERS_PIN 6 #define HAS_POLOLU_MINIMUV (1) #define HAS_MS5803_14BA (0) #define MS5803_14BA_I2C_ADDRESS 0x76 #define MIDPOINT 1500 #define LOGGING (1) class Settings : public Device { public: static int smoothingIncriment; //How aggressive the throttle changes static int deadZone_min; static int deadZone_max; static int capability_bitarray; Settings():Device(){}; void device_setup(); void device_loop(Command cmd); }; #endif
#ifndef __SETTINGS_H_ #define __SETTINGS_H_ #include <Arduino.h> #include "Device.h" // This section is for devices and their configuration //Kit: #define HAS_STD_LIGHTS (1) #define LIGHTS_PIN 5 #define HAS_STD_CAPE (1) #define HAS_STD_2X1_THRUSTERS (1) #define HAS_STD_PILOT (1) #define HAS_STD_CAMERAMOUNT (1) #define CAMERAMOUNT_PIN 3 #define CAPE_VOLTAGE_PIN 0 #define CAPE_CURRENT_PIN 3 //After Market: #define HAS_STD_CALIBRATIONLASERS (0) #define CALIBRATIONLASERS_PIN 6 #define HAS_POLOLU_MINIMUV (0) #define HAS_MS5803_14BA (0) #define MS5803_14BA_I2C_ADDRESS 0x76 #define MIDPOINT 1500 #define LOGGING (1) class Settings : public Device { public: static int smoothingIncriment; //How aggressive the throttle changes static int deadZone_min; static int deadZone_max; static int capability_bitarray; Settings():Device(){}; void device_setup(); void device_loop(Command cmd); }; #endif
Reset default settings to stock kit configuration
Reset default settings to stock kit configuration
C
mit
BrianAdams/openrov-cockpit,BenjaminTsai/openrov-cockpit,kavi87/openrov-cockpit,johan--/openrov-cockpit,spiderkeys/openrov-cockpit,OpenROV/openrov-cockpit,johan--/openrov-cockpit,kavi87/openrov-cockpit,johan--/openrov-cockpit,kavi87/openrov-cockpit,chaudhryjunaid/openrov-cockpit,spiderkeys/openrov-cockpit,BrianAdams/openrov-cockpit,kavi87/openrov-cockpit,BenjaminTsai/openrov-cockpit,spiderkeys/openrov-cockpit,BenjaminTsai/openrov-cockpit,chaudhryjunaid/openrov-cockpit,BrianAdams/openrov-cockpit,BenjaminTsai/openrov-cockpit,chaudhryjunaid/openrov-cockpit,kavi87/openrov-cockpit,OpenROV/openrov-cockpit,spiderkeys/openrov-cockpit,johan--/openrov-cockpit,chaudhryjunaid/openrov-cockpit,BrianAdams/openrov-cockpit,BenjaminTsai/openrov-cockpit,BrianAdams/openrov-cockpit,spiderkeys/openrov-cockpit,chaudhryjunaid/openrov-cockpit,johan--/openrov-cockpit,OpenROV/openrov-cockpit
177e9089a4bfdb04d73a12eba6dc3b426b33b8d6
src/GtkApplicationDelegate.h
src/GtkApplicationDelegate.h
/* GTK+ Integration with platform-specific application-wide features * such as the OS X menubar and application delegate concepts. * * Copyright (C) 2009 Paul Davis * Copyright © 2010 John Ralls * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; version 2.1 * of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #import <Cocoa/Cocoa.h> @interface GtkApplicationDelegate : NSObject <NSApplicationDelegate> {} @end
/* GTK+ Integration with platform-specific application-wide features * such as the OS X menubar and application delegate concepts. * * Copyright (C) 2009 Paul Davis * Copyright © 2010 John Ralls * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; version 2.1 * of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #import <Cocoa/Cocoa.h> #include <AvailabilityMacros.h> #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 @interface GtkApplicationDelegate : NSObject <NSApplicationDelegate> {} #else @interface GtkApplicationDelegate : NSObject {} #endif @end
Fix compile error on Leopard & Tiger.
Fix compile error on Leopard & Tiger.
C
lgpl-2.1
GNOME/gtk-mac-integration,GNOME/gtk-mac-integration,sharoonthomas/gtk-mac-integration,GNOME/gtk-mac-integration,sharoonthomas/gtk-mac-integration,sharoonthomas/gtk-mac-integration,sharoonthomas/gtk-mac-integration,jralls/gtk-mac-integration,sharoonthomas/gtk-mac-integration,jralls/gtk-mac-integration,jralls/gtk-mac-integration
c253a5fdd7d8f46031f48901b84c606217637db8
bindings/terra/legion_terra_util.h
bindings/terra/legion_terra_util.h
/* Copyright 2015 Stanford University * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __LEGION_TERRA_UTIL_H__ #define __LEGION_TERRA_UTIL_H__ #include "legion_c_util.h" template<typename T, typename W = LegionRuntime::HighLevel::CObjectWrapper> void lua_push_opaque_object(lua_State* L, T obj) { void* ptr = W::unwrap(obj); lua_newtable(L); lua_pushstring(L, "impl"); lua_pushlightuserdata(L, ptr); lua_settable(L, -3); } template<typename T> void lua_push_opaque_object_array(lua_State* L, T* objs, unsigned num_objs) { lua_newtable(L); for(unsigned i = 0; i < num_objs; ++i) { lua_push_opaque_object(L, objs[i]); lua_pushinteger(L, i + 1); lua_insert(L, -2); lua_settable(L, -3); } } #define CHECK_LUA(EXP) \ if ((EXP) != 0) \ { \ fprintf(stderr, \ "error calling lua function : %s (%s:%d)\n", \ lua_tostring(L, -1), \ __FILE__, __LINE__); \ exit(-1); \ } \ struct ObjectWrapper { typedef LegionRuntime::HighLevel::Mapper::DomainSplit DomainSplit; static vector_legion_domain_split_t wrap(std::vector<DomainSplit>* slices) { vector_legion_domain_split_t slices_; slices_.impl = slices; return slices_; } static std::vector<DomainSplit>* unwrap(vector_legion_domain_split_t slices_) { return reinterpret_cast<std::vector<DomainSplit>*>(slices_.impl); } }; #endif // __LEGION_TERRA_UTIL_H__
Add a missing file for Terra bindings.
Add a missing file for Terra bindings.
C
apache-2.0
noahdesu/legion,chuckatkins/legion,SKA-ScienceDataProcessor/legion-sdp-clone,SKA-ScienceDataProcessor/legion-sdp-clone,sdalton1/legion,StanfordLegion/legion,noahdesu/legion,SKA-ScienceDataProcessor/legion-sdp-clone,StanfordLegion/legion,sdalton1/legion,chuckatkins/legion,StanfordLegion/legion,StanfordLegion/legion,chuckatkins/legion,sdalton1/legion,SKA-ScienceDataProcessor/legion-sdp-clone,StanfordLegion/legion,noahdesu/legion,StanfordLegion/legion,chuckatkins/legion,chuckatkins/legion,SKA-ScienceDataProcessor/legion-sdp-clone,sdalton1/legion,sdalton1/legion,StanfordLegion/legion,noahdesu/legion,sdalton1/legion,noahdesu/legion,chuckatkins/legion,StanfordLegion/legion,chuckatkins/legion
12521bf43e5415935befb6fc02f3bf8564252ddf
native/traceptprovider_doubleload/program.c
native/traceptprovider_doubleload/program.c
#include <dlfcn.h> int main(int argc, char* argv[]) { dlopen("1//libcoreclr.so", RTLD_NOW | RTLD_GLOBAL); dlopen("2//libcoreclrtraceptprovider.so", RTLD_LAZY); dlopen("2//libcoreclr.so", RTLD_NOW | RTLD_GLOBAL); return 0; }
//#define _GNU_SOURCE #include <dlfcn.h> #include <stdio.h> #include <string.h> void *dlopen(const char *filename, int flag) { static void* (*dlopenImpl)(const char *filename, int flag) = 0; if(!dlopenImpl) { dlopenImpl = dlsym(RTLD_NEXT, "dlopen"); } if(strcmp(filename, "2//libcoreclrtraceptprovider.so") == 0) { printf("Skip loading 2//libcoreclrtraceptprovider.so.\n"); return 0; } printf("Calling dlopen(%s).\n", filename); return dlopenImpl(filename, flag); } int main(int argc, char* argv[]) { dlopen("1//libcoreclr.so", RTLD_NOW | RTLD_GLOBAL); dlopen("2//libcoreclr.so", RTLD_NOW | RTLD_GLOBAL); return 0; }
Update implementation to hook calls to dlopen.
Update implementation to hook calls to dlopen.
C
mit
brianrob/coretests,brianrob/coretests
1b19c178ffecf125b9cbda8aa1bae11f49fcecf5
include/dsnutil/singleton.h
include/dsnutil/singleton.h
/// \file /// \brief Singleton design pattern /// /// \author Peter 'png' Hille <[email protected]> #ifndef SINGLETON_HH #define SINGLETON_HH 1 #include <dsnutil/compiler_features.h> namespace dsn { /// \brief Template for singleton classes /// /// This template can be used to implement the "singleton" design pattern /// on any class. template <class Derived> class Singleton { public: /// \brief Access singleton instance /// /// \return Reference to the instance of this singleton. static dsnutil_cpp_DEPRECATED Derived& getInstance() { return instanceRef(); } /// \brief Access singleton instance (by reference) /// /// \return Reference to the initialized singleton instance static Derived& instanceRef() { static Derived instance; return instance; } /// \brief Access singleton instance (by pointer) /// /// \return Pointer to the initialized singleton instance static Derived* instancePtr() { return &instanceRef(); } protected: /// \brief Default constructor /// /// \note This ctor is protected so that derived classes can implement /// their own logics for object initialization while still maintaining /// the impossibility of direct ctor calls! Singleton() {} private: /// \brief Copy constructor /// /// \note This ctor is private to prevent multiple instances of the same /// singleton from being created through object assignments! Singleton(const Singleton&) {} }; } #endif // !SINGLETON_HH
/// \file /// \brief Singleton design pattern /// /// \author Peter 'png' Hille <[email protected]> #ifndef SINGLETON_HH #define SINGLETON_HH 1 namespace dsn { /// \brief Template for singleton classes /// /// This template can be used to implement the "singleton" design pattern /// on any class. template <class Derived> class Singleton { public: /// \brief Access singleton instance (by reference) /// /// \return Reference to the initialized singleton instance static Derived& instanceRef() { static Derived instance; return instance; } /// \brief Access singleton instance (by pointer) /// /// \return Pointer to the initialized singleton instance static Derived* instancePtr() { return &instanceRef(); } protected: /// \brief Default constructor /// /// \note This ctor is protected so that derived classes can implement /// their own logics for object initialization while still maintaining /// the impossibility of direct ctor calls! Singleton() {} private: /// \brief Copy constructor /// /// \note This ctor is private to prevent multiple instances of the same /// singleton from being created through object assignments! Singleton(const Singleton&) {} }; } #endif // !SINGLETON_HH
Remove deprecated instance() method from Singleton
Remove deprecated instance() method from Singleton
C
bsd-3-clause
png85/dsnutil_cpp
00dc4cb5f356873e8c0b704e2cf2467f0f0a9a71
libc/sysdeps/linux/common/bits/uClibc_errno.h
libc/sysdeps/linux/common/bits/uClibc_errno.h
/* * Copyright (C) 2000-2006 Erik Andersen <[email protected]> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #ifndef _BITS_UCLIBC_ERRNO_H #define _BITS_UCLIBC_ERRNO_H 1 #ifdef IS_IN_rtld # undef errno # define errno _dl_errno extern int _dl_errno; // attribute_hidden; #elif defined __UCLIBC_HAS_THREADS__ # include <tls.h> # if defined USE___THREAD && USE___THREAD # undef errno # ifndef NOT_IN_libc # define errno __libc_errno # else # define errno errno # endif extern __thread int errno __attribute_tls_model_ie; # endif /* USE___THREAD */ #endif /* IS_IN_rtld */ #define __set_errno(val) (errno = (val)) #ifndef __ASSEMBLER__ extern int *__errno_location (void) __THROW __attribute__ ((__const__)) # ifdef IS_IN_rtld attribute_hidden # endif ; # if defined __UCLIBC_HAS_THREADS__ # include <tls.h> # if defined USE___THREAD && USE___THREAD libc_hidden_proto(__errno_location) # endif # endif #endif /* !__ASSEMBLER__ */ #endif
/* * Copyright (C) 2000-2006 Erik Andersen <[email protected]> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #ifndef _BITS_UCLIBC_ERRNO_H #define _BITS_UCLIBC_ERRNO_H 1 #ifdef IS_IN_rtld # undef errno # define errno _dl_errno extern int _dl_errno; // attribute_hidden; #elif defined __UCLIBC_HAS_THREADS__ # include <tls.h> # if defined USE___THREAD && USE___THREAD # undef errno # ifndef NOT_IN_libc # define errno __libc_errno # else # define errno errno # endif extern __thread int errno attribute_tls_model_ie; # endif /* USE___THREAD */ #endif /* IS_IN_rtld */ #define __set_errno(val) (errno = (val)) #ifndef __ASSEMBLER__ extern int *__errno_location (void) __THROW __attribute__ ((__const__)) # ifdef IS_IN_rtld attribute_hidden # endif ; # if defined __UCLIBC_HAS_THREADS__ # include <tls.h> # if defined USE___THREAD && USE___THREAD libc_hidden_proto(__errno_location) # endif # endif #endif /* !__ASSEMBLER__ */ #endif
Fix typo in macro for tls access model
Fix typo in macro for tls access model
C
lgpl-2.1
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
111468dc4e6fb96938654a259deba0a92d564cd6
docs/examples/memoryviews/C_func_file.c
docs/examples/memoryviews/C_func_file.c
#include "C_func_file.h" void multiply_by_10_in_C(double arr[], unsigned int n) { for (int i = 0; i < n; i++) { arr[i] *= 10; } }
#include "C_func_file.h" void multiply_by_10_in_C(double arr[], unsigned int n) { unsigned int i; for (i = 0; i < n; i++) { arr[i] *= 10; } }
Fix warning about "comparison between signed and unsigned" in example and make it fully C89 compatible.
Fix warning about "comparison between signed and unsigned" in example and make it fully C89 compatible.
C
apache-2.0
scoder/cython,cython/cython,da-woods/cython,cython/cython,scoder/cython,cython/cython,da-woods/cython,da-woods/cython,cython/cython,scoder/cython,scoder/cython,da-woods/cython
d29ef61ebb9064b8b78db0cf7ca1c9ab9f4ce2d9
tests/regression/00-sanity/28-wpoint-restart-sound.c
tests/regression/00-sanity/28-wpoint-restart-sound.c
// PARAM: --enable ana.int.interval #include <pthread.h> #include <assert.h> int g = 0; void *worker(void *arg ) { return NULL; } int main(int argc , char **argv ) { pthread_t tid; pthread_create(& tid, NULL, & worker, NULL); while (g >= 10) { } assert(1); // reachable g++; assert(1); // reachable return 0; }
Add regression test for TD3 wpoint restart soundness
Add regression test for TD3 wpoint restart soundness
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
39c7ec7b73483cc79999299df192383e58f6419c
ios/Firestack/FirestackDatabase.h
ios/Firestack/FirestackDatabase.h
// // FirestackDatabase.h // Firestack // // Created by Ari Lerner on 8/23/16. // Copyright © 2016 Facebook. All rights reserved. // #ifndef FirestackDatabase_h #define FirestackDatabase_h #import "Firebase.h" #import "RCTEventEmitter.h" #import "RCTBridgeModule.h" @interface FirestackDatabase : RCTEventEmitter <RCTBridgeModule> { } @property (nonatomic) NSDictionary *_DBHandles; @property (nonatomic, weak) FIRDatabaseReference *ref; @end #endif
// // FirestackDatabase.h // Firestack // // Created by Ari Lerner on 8/23/16. // Copyright © 2016 Facebook. All rights reserved. // #ifndef FirestackDatabase_h #define FirestackDatabase_h #import "Firebase.h" #import "RCTEventEmitter.h" #import "RCTBridgeModule.h" @interface FirestackDatabase : RCTEventEmitter <RCTBridgeModule> { } @property NSMutableDictionary *dbReferences; @property FIRDatabase *database; @end #endif
Update missing iOS header changes
Update missing iOS header changes
C
mit
sraka1/react-native-firestack,sraka1/react-native-firestack,sraka1/react-native-firestack,sraka1/react-native-firestack
438d7f05d34abfdf6a8a8954a957b97275162070
test/CodeGen/mrtd.c
test/CodeGen/mrtd.c
// RUN: %clang_cc1 -mrtd -triple i386-unknown-freebsd9.0 -emit-llvm -o - %s | FileCheck %s void baz(int arg); // CHECK: define x86_stdcallcc void @foo(i32 %arg) nounwind void foo(int arg) { // CHECK: call x86_stdcallcc i32 (...)* @bar(i32 %tmp) bar(arg); // CHECK: call x86_stdcallcc void @baz(i32 %tmp1) baz(arg); } // CHECK: declare x86_stdcallcc i32 @bar(...) // CHECK: declare x86_stdcallcc void @baz(i32)
// RUN: %clang_cc1 -mrtd -triple i386-unknown-freebsd9.0 -emit-llvm -o - %s | FileCheck %s void baz(int arg); // CHECK: define x86_stdcallcc void @foo(i32 %arg) nounwind void foo(int arg) { // CHECK: call x86_stdcallcc i32 (...)* @bar(i32 bar(arg); // CHECK: call x86_stdcallcc void @baz(i32 baz(arg); } // CHECK: declare x86_stdcallcc i32 @bar(...) // CHECK: declare x86_stdcallcc void @baz(i32)
Kill off more names to fix this test
Kill off more names to fix this test git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@126775 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/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,llvm-mirror/clang
1a387a296e9988792baa730fd2b0972d98158a68
kernel/include/bs_config_parser.h
kernel/include/bs_config_parser.h
#ifndef BS_CONFIG_PARSER_H #define BS_CONFIG_PARSER_H #include "bs_common.h" #include <map> #include <string> #include <vector> namespace blue_sky { struct wcfg; class BS_API bs_cfg_p { public: friend struct wcfg; typedef std::vector<std::string> vstr_t; typedef std::map<std::string,vstr_t> map_t; void parse_strings (const std::string &str, bool append = false); void read_file (const char *filename); void clear_env_map (); const map_t &env() const; vstr_t getenv(const char *e); private: bs_cfg_p (); map_t env_mp; }; typedef singleton< bs_cfg_p > cfg; } #endif // BS_CONFIG_PARSER_H
#ifndef BS_CONFIG_PARSER_H #define BS_CONFIG_PARSER_H #include "bs_common.h" #include <map> #include <string> #include <vector> namespace blue_sky { struct wcfg; class BS_API bs_cfg_p { public: friend struct wcfg; typedef std::vector<std::string> vstr_t; typedef std::map<std::string,vstr_t> map_t; void parse_strings (const std::string &str, bool append = false); void read_file (const char *filename); void clear_env_map (); const map_t &env() const; vstr_t getenv(const char *e); vstr_t operator[] (const char *e) { return getenv (e); } private: bs_cfg_p (); map_t env_mp; }; typedef singleton< bs_cfg_p > cfg; struct bs_config { bs_cfg_p::vstr_t operator [] (const char *e) { return cfg::Instance ()[e]; } }; } #endif // BS_CONFIG_PARSER_H
Add bs_config for hide bs_cfg_p::Instance () usage
Add bs_config for hide bs_cfg_p::Instance () usage And add operator[] to getenv
C
mpl-2.0
uentity/bluesky,uentity/bluesky,uentity/bluesky,uentity/bluesky,uentity/bluesky
a83b208ff6ddb81657e9da1f93d4117de9ba3d1b
chrome/gpu/gpu_config.h
chrome/gpu/gpu_config.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 CHROME_GPU_GPU_CONFIG_H_ #define CHROME_GPU_GPU_CONFIG_H_ // This file declares common preprocessor configuration for the GPU process. #include "build/build_config.h" #if defined(OS_LINUX) && !defined(ARCH_CPU_X86) // Only define GLX support for Intel CPUs for now until we can get the // proper dependencies and build setup for ARM. #define GPU_USE_GLX #endif #endif // CHROME_GPU_GPU_CONFIG_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 CHROME_GPU_GPU_CONFIG_H_ #define CHROME_GPU_GPU_CONFIG_H_ // This file declares common preprocessor configuration for the GPU process. #include "build/build_config.h" #if defined(OS_LINUX) && defined(ARCH_CPU_X86) // Only define GLX support for Intel CPUs for now until we can get the // proper dependencies and build setup for ARM. #define GPU_USE_GLX #endif #endif // CHROME_GPU_GPU_CONFIG_H_
Fix stupid error for Linux build.
Fix stupid error for Linux build. TEST=none BUG=none Review URL: http://codereview.chromium.org/555096 git-svn-id: http://src.chromium.org/svn/trunk/src@37093 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: 3c2fc5241d63758ffd4e4c072df9742c8dda3595
C
bsd-3-clause
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser
17d2ffa473430f9a09f717073f246f2b59e6e289
ir/be/test/fehler100.c
ir/be/test/fehler100.c
int incs[14]; int bla(int b); void simpleSort ( int lo, int hi, int d ) { int i, j, h, bigN, hp; int v; for (; hp >= 0; hp--) { h = incs[hp]; if (hp >= 5) bla(lo); i = lo + h; while (1) { if (i > hi) break; j = i; while (bla(d)) { j = j - h; } } } }
/* test for the spiller */ int incs[14]; int bla(int b); void simpleSort ( int lo, int hi, int d ) { int i, j, h, bigN, hp; int v; for (; hp >= 0; hp--) { h = incs[hp]; if (hp >= 5) bla(lo); i = lo + h; while (1) { if (i > hi) break; j = i; while (bla(d)) { j = j - h; } } } } int main(void) { return 0; }
Add a main to let it compile.
Add a main to let it compile. [r16318]
C
lgpl-2.1
MatzeB/libfirm,killbug2004/libfirm,killbug2004/libfirm,davidgiven/libfirm,killbug2004/libfirm,davidgiven/libfirm,jonashaag/libfirm,8l/libfirm,MatzeB/libfirm,8l/libfirm,davidgiven/libfirm,jonashaag/libfirm,killbug2004/libfirm,libfirm/libfirm,davidgiven/libfirm,libfirm/libfirm,MatzeB/libfirm,jonashaag/libfirm,jonashaag/libfirm,8l/libfirm,8l/libfirm,8l/libfirm,libfirm/libfirm,killbug2004/libfirm,libfirm/libfirm,killbug2004/libfirm,MatzeB/libfirm,libfirm/libfirm,MatzeB/libfirm,MatzeB/libfirm,8l/libfirm,jonashaag/libfirm,jonashaag/libfirm,davidgiven/libfirm,davidgiven/libfirm,jonashaag/libfirm,killbug2004/libfirm,MatzeB/libfirm,davidgiven/libfirm,8l/libfirm
6142283e4f51049c3ab867e5cdeaea9d6052eb6f
cpu/stm32l1/periph/cpuid.c
cpu/stm32l1/periph/cpuid.c
/* * Copyright (C) 2014 FU Berlin * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @addtogroup driver_periph * @{ * * @file * @brief Low-level CPUID driver implementation * * @author Thomas Eichinger <[email protected]> */ #include <string.h> #include "periph/cpuid.h" extern volatile uint32_t _cpuid_address; void cpuid_get(void *id) { memcpy(id, (void *)(_cpuid_address), CPUID_ID_LEN); } /** @} */
/* * Copyright (C) 2014 FU Berlin * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @addtogroup driver_periph * @{ * * @file * @brief Low-level CPUID driver implementation * * @author Thomas Eichinger <[email protected]> */ #include <string.h> #include "periph/cpuid.h" extern volatile uint32_t _cpuid_address; void cpuid_get(void *id) { memcpy(id, (void *)(&_cpuid_address), CPUID_ID_LEN); } /** @} */
Use the address of the variable instead of the value itself for the CPUID
Use the address of the variable instead of the value itself for the CPUID
C
lgpl-2.1
DipSwitch/RIOT,DipSwitch/RIOT,DipSwitch/RIOT,DipSwitch/RIOT,DipSwitch/RIOT,DipSwitch/RIOT
07313f73ce0b58a25a24ca632570f3cf80778e48
components/lua/src/proxy.c
components/lua/src/proxy.c
/* * proxy.c * lexer proxy for Lua parser -- implements __FILE__ and __LINE__ * Luiz Henrique de Figueiredo * This code is hereby placed in the public domain. * Add <<#include "proxy.c">> just before the definition of luaX_next in llex.c */ #include <string.h> static int nexttoken(LexState *ls, SemInfo *seminfo) { int t=llex(ls,seminfo); if (t==TK_NAME) { if (strcmp(getstr(seminfo->ts),"__FILE__")==0) { t=TK_STRING; seminfo->ts = ls->source; } else if (strcmp(getstr(seminfo->ts),"__LINE__")==0) { t=TK_NUMBER; seminfo->r = ls->linenumber; } } return t; } #define llex nexttoken
/* * proxy.c * lexer proxy for Lua parser -- implements __FILE__ and __LINE__ * Luiz Henrique de Figueiredo * This code is hereby placed in the public domain. * Add <<#include "proxy.c">> just before the definition of luaX_next in llex.c */ /* * Luiz's code changed, per his suggestion, to include some polishing * the name for __FILE__, taken from luaU_undump. * -- Jeffrey Kegler */ #include <string.h> static int nexttoken(LexState *ls, SemInfo *seminfo) { int t = llex (ls, seminfo); if (t == TK_NAME) { if (strcmp (getstr (seminfo->ts), "__FILE__") == 0) { const char *name = ls->source; t = TK_STRING; if (*name == '@' || *name == '=') name = name + 1; else if (*name == LUA_SIGNATURE[0]) name = "binary string"; seminfo->ts = name; } else if (strcmp (getstr (seminfo->ts), "__LINE__") == 0) { t = TK_NUMBER; seminfo->r = ls->linenumber; } } return t; } #define llex nexttoken
Add __FILE__, __LINE__ to Lua
Add __FILE__, __LINE__ to Lua
C
mit
pczarn/kollos,pczarn/kollos,jeffreykegler/kollos,jeffreykegler/kollos,pczarn/kollos,pczarn/kollos,jeffreykegler/kollos,jeffreykegler/kollos,jeffreykegler/kollos,pczarn/kollos
28f0e31c60f2fd60a72301a7fcf25385d8b895aa
src/core/incomingrequest.h
src/core/incomingrequest.h
#ifndef APIMOCK_INCOMING_REQUEST #define APIMOCK_INCOMING_REQUEST #include <string> namespace ApiMock { class IncomingRequest { public: virtual ~IncomingRequest() {} virtual std::string getRequestAsString() = 0; virtual void sendResponse(const std::string& responseAsString) = 0; }; } #endif
Add an incoming request object
Add an incoming request object
C
mit
Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock
a99ce834bdb9a9a42d0d779d74cb70af6a837716
features/cryptocell/FEATURE_CRYPTOCELL310/mbedtls_device.h
features/cryptocell/FEATURE_CRYPTOCELL310/mbedtls_device.h
/* * mbedtls_device.h * * Copyright (C) 2018-2019, Arm Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef __MBEDTLS_DEVICE__ #define __MBEDTLS_DEVICE__ #define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT #define MBEDTLS_AES_ALT #define MBEDTLS_CTR_DRBG_USE_128_BIT_KEY #define MBEDTLS_SHA1_ALT #define MBEDTLS_SHA256_ALT #define MBEDTLS_CCM_ALT #define MBEDTLS_ECDSA_VERIFY_ALT #define MBEDTLS_ECDSA_SIGN_ALT #define MBEDTLS_ECDSA_GENKEY_ALT #define MBEDTLS_ECDH_GEN_PUBLIC_ALT #define MBEDTLS_ECDH_COMPUTE_SHARED_ALT #endif //__MBEDTLS_DEVICE__
/* * mbedtls_device.h * * Copyright (C) 2018-2019, Arm Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef __MBEDTLS_DEVICE__ #define __MBEDTLS_DEVICE__ #define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT //#define MBEDTLS_AES_ALT #define MBEDTLS_CTR_DRBG_USE_128_BIT_KEY #define MBEDTLS_SHA1_ALT #define MBEDTLS_SHA256_ALT #define MBEDTLS_CCM_ALT #define MBEDTLS_ECDSA_VERIFY_ALT #define MBEDTLS_ECDSA_SIGN_ALT #define MBEDTLS_ECDSA_GENKEY_ALT #define MBEDTLS_ECDH_GEN_PUBLIC_ALT #define MBEDTLS_ECDH_COMPUTE_SHARED_ALT #endif //__MBEDTLS_DEVICE__
Make the alternative aes optional
Make the alternative aes optional Have the alternative aes undefined by default, in order not to break backwards compatability. `MBEDTLS_CTR_DRBG_USE_128_BIT_KEY` remains defined for better usability.
C
apache-2.0
kjbracey-arm/mbed,andcor02/mbed-os,kjbracey-arm/mbed,andcor02/mbed-os,mbedmicro/mbed,andcor02/mbed-os,mbedmicro/mbed,mbedmicro/mbed,andcor02/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed,andcor02/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed,andcor02/mbed-os
82d08a5310905d7f242501ea4f8d21e4a3ba88f0
fq_default_poly/test/t-init.c
fq_default_poly/test/t-init.c
/* Copyright (C) 2021 William Hart This file is part of FLINT. FLINT is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. See <https://www.gnu.org/licenses/>. */ #include "fq_default_poly.h" #include <stdlib.h> #include <stdio.h> #include <gmp.h> #include "flint.h" #include "nmod_poly.h" #include "ulong_extras.h" int main(void) { int i; FLINT_TEST_INIT(state); flint_printf("init/clear...."); fflush(stdout); for (i = 0; i < 100 * flint_test_multiplier(); i++) { fq_default_ctx_t ctx; fq_default_poly_t fq_poly; fmpz_t p; fmpz_init(p); fmpz_set_ui(p, 5); fq_default_ctx_init(ctx, p, 5, "x"); fq_default_poly_init(fq_poly, ctx); fq_default_poly_clear(fq_poly, ctx); fq_default_ctx_clear(ctx); fq_default_ctx_init(ctx, p, 16, "x"); fq_default_poly_init(fq_poly, ctx); fq_default_poly_clear(fq_poly, ctx); fq_default_ctx_clear(ctx); fmpz_set_str(p, "73786976294838206473", 10); fq_default_ctx_init(ctx, p, 1, "x"); fq_default_poly_init(fq_poly, ctx); fq_default_poly_clear(fq_poly, ctx); fq_default_ctx_clear(ctx); fmpz_clear(p); } FLINT_TEST_CLEANUP(state); flint_printf("PASS\n"); return 0; }
Add rudimentary test for fq_default_poly.
Add rudimentary test for fq_default_poly.
C
lgpl-2.1
wbhart/flint2,wbhart/flint2,fredrik-johansson/flint2,fredrik-johansson/flint2,wbhart/flint2,fredrik-johansson/flint2
eb434c1c76cdad0f5f841487dc9568c5079c6fb8
ReactCommon/react/test_utils/MockSurfaceHandler.h
ReactCommon/react/test_utils/MockSurfaceHandler.h
/* * Copyright (c) Meta Platforms, Inc. and 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 <gmock/gmock.h> #include <react/renderer/scheduler/SurfaceHandler.h> namespace facebook { namespace react { class MockSurfaceHandler : public SurfaceHandler { public: MockSurfaceHandler() : SurfaceHandler("moduleName", 0){}; MOCK_METHOD(void, setDisplayMode, (DisplayMode), (const, noexcept)); MOCK_METHOD(SurfaceId, getSurfaceId, (), (const, noexcept)); }; } // namespace react } // namespace facebook
/* * Copyright (c) Meta Platforms, Inc. and 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 <gmock/gmock.h> #include <react/renderer/scheduler/SurfaceHandler.h> namespace facebook { namespace react { class MockSurfaceHandler : public SurfaceHandler { public: MockSurfaceHandler() : SurfaceHandler("moduleName", 0){}; MOCK_QUALIFIED_METHOD1(setDisplayMode, const noexcept, void(DisplayMode)); MOCK_QUALIFIED_METHOD0(getSurfaceId, const noexcept, SurfaceId()); }; } // namespace react } // namespace facebook
Revert D34351084: Migrate from googletest 1.8 to googletest 1.10
Revert D34351084: Migrate from googletest 1.8 to googletest 1.10 Differential Revision: D34351084 (https://github.com/facebook/react-native/commit/94891ab5f883efa55146dc42e1cd9705506794f3) Original commit changeset: 939b3985ab63 Original Phabricator Diff: D34351084 (https://github.com/facebook/react-native/commit/94891ab5f883efa55146dc42e1cd9705506794f3) fbshipit-source-id: 2fd17e0ccd9d1f1d643f4a372d84cb95f5add1f8
C
mit
facebook/react-native,janicduplessis/react-native,janicduplessis/react-native,facebook/react-native,facebook/react-native,javache/react-native,facebook/react-native,facebook/react-native,javache/react-native,facebook/react-native,javache/react-native,janicduplessis/react-native,janicduplessis/react-native,javache/react-native,javache/react-native,javache/react-native,facebook/react-native,janicduplessis/react-native,javache/react-native,facebook/react-native,javache/react-native,facebook/react-native,janicduplessis/react-native,janicduplessis/react-native,javache/react-native,janicduplessis/react-native
2e64f96d3b0de90550a375223dbb0f98be057a9f
keyglove/setup_board_atmega1280.h
keyglove/setup_board_atmega1280.h
// Keyglove controller source code - Special hardware setup file // 7/17/2011 by Jeff Rowberg <[email protected]> /* ============================================ Controller code is placed under the MIT license Copyright (c) 2011 Jeff Rowberg 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. =============================================== */ #ifndef _SETUP_BOARD_ATMEGA1280_H_ #define _SETUP_BOARD_ATMEGA1280_H_ void setup_board() { } #endif // _SETUP_BOARD_ATMEGA1280_H_
Add board support for preliminary testing with Arduino Mega again
Add board support for preliminary testing with Arduino Mega again
C
mit
jrowberg/keyglove,jrowberg/keyglove,jrowberg/keyglove,jrowberg/keyglove,jrowberg/keyglove
0550c0c5192e009409d9a23f644419699c9eb500
libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-__syscall_rt_sigaction.c
libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-__syscall_rt_sigaction.c
/* * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com) * * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. */ #include <../../../../../../../libc/sysdeps/linux/arc/sigaction.c>
/* * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com) * * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. */ /* * ARC syscall ABI only has __NR_rt_sigaction, thus vanilla sigaction does * some SA_RESTORER tricks before calling __syscall_rt_sigaction. * However including that file here causes a redefinition of __libc_sigaction * in static links involving pthreads */ //#include <../../../../../../../libc/sysdeps/linux/arc/sigaction.c>
Fix __libc_sigaction redefinition with static links
ARC/NPTL: Fix __libc_sigaction redefinition with static links Signed-off-by: Vineet Gupta <[email protected]> Signed-off-by: Bernhard Reutner-Fischer <[email protected]>
C
lgpl-2.1
majek/uclibc-vx32,brgl/uclibc-ng,kraj/uClibc,kraj/uclibc-ng,majek/uclibc-vx32,kraj/uclibc-ng,foss-for-synopsys-dwc-arc-processors/uClibc,kraj/uClibc,wbx-github/uclibc-ng,wbx-github/uclibc-ng,brgl/uclibc-ng,wbx-github/uclibc-ng,kraj/uclibc-ng,kraj/uClibc,kraj/uclibc-ng,majek/uclibc-vx32,foss-for-synopsys-dwc-arc-processors/uClibc,majek/uclibc-vx32,wbx-github/uclibc-ng,foss-for-synopsys-dwc-arc-processors/uClibc,kraj/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,brgl/uclibc-ng,brgl/uclibc-ng
4e874c8a3ec1d524e5ab0df04994fb25243e9c72
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> #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
/* 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; }; struct MatrixBufferType { DirectX::XMMATRIX world; DirectX::XMMATRIX view; DirectX::XMMATRIX projection; }; 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 MatrixBufferType struct to hold current world, view, and projection matricies
CRATE_DEMO: Create MatrixBufferType struct to hold current world, view, and projection matricies
C
apache-2.0
RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject
c9c2c1696c1655ab178908e9f534d6c60da09539
SVPullToRefresh/SVPullToRefresh.h
SVPullToRefresh/SVPullToRefresh.h
// // SVPullToRefresh.h // SVPullToRefreshDemo // // Created by Sam Vermette on 23.04.12. // Copyright (c) 2012 samvermette.com. All rights reserved. // // https://github.com/samvermette/SVPullToRefresh // // this header file is provided for backwards compatibility and will be removed in the future // here's how you should import SVPullToRefresh now: #import "UIScrollView+SVPullToRefresh.h" #import "UIScrollView+SVInfiniteScrolling.h"
// // SVPullToRefresh.h // SVPullToRefreshDemo // // Created by Sam Vermette on 23.04.12. // Copyright (c) 2012 samvermette.com. All rights reserved. // // https://github.com/samvermette/SVPullToRefresh // // this header file is provided for backwards compatibility and will be removed in the future // here's how you should import SVPullToRefresh now: #import "UIScrollView+SVPullToRefresh.h" #import "UIScrollView+SVInfiniteScrolling.h" #import "SVPullToRefreshLoadingView.h" #import "SVInfiniteScrollingLoadingView.h"
Add loading view to SVPUllToRefresh header
Add loading view to SVPUllToRefresh header
C
mit
csutanyu/SVPullToRefresh
47f6c0599c0ba656c6e038c2259c09ae84d28483
drudge/canonpy.h
drudge/canonpy.h
/* vim: set filetype=cpp: */ /** Header file for canonpy. * * Currently it merely contains the definition of the object structure of the * classes defined in canonpy. They are put here in case a C API is intended * to be added for canonpy. */ #ifndef DRUDGE_CANONPY_H #define DRUDGE_CANONPY_H #include <Python.h> #include <libcanon/perm.h> using libcanon::Simple_perm; // // Permutation type // ---------------- // /** Object type for canonpy Perm objects. */ // clang-format off typedef struct { PyObject_HEAD Simple_perm perm; } Perm_object; // clang-format on #endif
/* vim: set filetype=cpp: */ /** Header file for canonpy. * * Currently it merely contains the definition of the object structure of the * classes defined in canonpy. They are put here in case a C API is intended * to be added for canonpy. */ #ifndef DRUDGE_CANONPY_H #define DRUDGE_CANONPY_H #include <Python.h> #include <memory> #include <libcanon/perm.h> #include <libcanon/sims.h> using libcanon::Simple_perm; using libcanon::Sims_transv; // // Permutation type // ---------------- // /** Object type for canonpy Perm objects. */ // clang-format off typedef struct { PyObject_HEAD Simple_perm perm; } Perm_object; // clang-format on // // Permutation group type // ---------------------- // // clang-format off typedef struct { PyObject_HEAD std::unique_ptr<Sims_transv<Simple_perm>> transv; } Group_object; // clang-format on #endif
Add object type for permutation groups
Add object type for permutation groups Inside a permutation group, the Sims transversal system is going to be stored.
C
mit
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
481aeecd9bf2e239c3fa911286bece5143246311
lottie-ios/Classes/PublicHeaders/Lottie.h
lottie-ios/Classes/PublicHeaders/Lottie.h
// // Lottie.h // Pods // // Created by brandon_withrow on 1/27/17. // // #if __has_feature(modules) @import Foundation; #else #import <Foundation/Foundation.h> #endif #ifndef Lottie_h #define Lottie_h //! Project version number for Lottie. FOUNDATION_EXPORT double LottieVersionNumber; //! Project version string for Lottie. FOUNDATION_EXPORT const unsigned char LottieVersionString[]; #import "LOTAnimationTransitionController.h" #import "LOTAnimationView.h" #endif /* Lottie_h */
// // Lottie.h // Pods // // Created by brandon_withrow on 1/27/17. // // #if __has_feature(modules) @import Foundation; #else #import <Foundation/Foundation.h> #endif #ifndef Lottie_h #define Lottie_h //! Project version number for Lottie. FOUNDATION_EXPORT double LottieVersionNumber; //! Project version string for Lottie. FOUNDATION_EXPORT const unsigned char LottieVersionString[]; #include <TargetConditionals.h> #if TARGET_OS_IPHONE #import "LOTAnimationTransitionController.h" #endif #import "LOTAnimationView.h" #endif /* Lottie_h */
Fix public header for macOS
Fix public header for macOS
C
apache-2.0
airbnb/lottie-ios,airbnb/lottie-ios,airbnb/lottie-ios
e845dd43efb19a6af37ab2dbf1cbd119022ff885
hard_way/ex13.c
hard_way/ex13.c
#include <stdio.h> int main(int argc, char *argv[]){ if(argc != 2){ printf("You must supply one argument!\n"); //this is how you abort a program. return 1; } return 0; }
#include <stdio.h> int main(int argc, char *argv[]){ if(argc != 2){ printf("You must supply one argument!\n"); //this is how you abort a program. return 1; } int i = 0; for(i = 0; argv[1][i] != '\0'; i++){ char letter = argv[1][i]; switch(letter){ case 'a': case 'A': printf("%d: 'A'\n",i); break; case 'e': case 'E': printf("%d: 'E'\n",i); break; case 'i': case 'I': printf("%d: 'I'\n",i); break; case 'o': case 'O': printf("%d: 'O'\n",i); break; case 'u': case 'U': printf("%d: 'U'\n",i); break; default: printf("%d:%c is not a vowel.\n",i,letter); } } return 0; }
Switch on vowels in argument
Switch on vowels in argument
C
mit
thewazir/learning_c
45f9522a638516520d39822f25c52d21c96b2923
ports/mimxrt10xx/boards/imxrt1060_evk/mpconfigboard.h
ports/mimxrt10xx/boards/imxrt1060_evk/mpconfigboard.h
#define MICROPY_HW_BOARD_NAME "iMX RT 1060 EVK" #define MICROPY_HW_MCU_NAME "IMXRT1062DVJ6A" // If you change this, then make sure to update the linker scripts as well to // make sure you don't overwrite code #define CIRCUITPY_INTERNAL_NVM_SIZE 0 #define BOARD_FLASH_SIZE (8 * 1024 * 1024) #define MICROPY_HW_LED_STATUS (&pin_GPIO_AD_B0_09) #define DEFAULT_I2C_BUS_SCL (&pin_GPIO_AD_B1_00) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO_AD_B1_01) #define DEFAULT_UART_BUS_RX (&pin_GPIO_AD_B1_07) #define DEFAULT_UART_BUS_TX (&pin_GPIO_AD_B1_06) #define CIRCUITPY_DEBUG_UART_TX (&pin_GPIO_AD_B0_12) #define CIRCUITPY_DEBUG_UART_RX (&pin_GPIO_AD_B0_13) // Put host on the first USB so that right angle OTG adapters can fit. This is // the right port when looking at the board. #define CIRCUITPY_USB_DEVICE_INSTANCE 1 #define CIRCUITPY_USB_HOST_INSTANCE 0
#define MICROPY_HW_BOARD_NAME "iMX RT 1060 EVK" #define MICROPY_HW_MCU_NAME "IMXRT1062DVJ6A" // If you change this, then make sure to update the linker scripts as well to // make sure you don't overwrite code #define CIRCUITPY_INTERNAL_NVM_SIZE 0 #define BOARD_FLASH_SIZE (8 * 1024 * 1024) #define MICROPY_HW_LED_STATUS (&pin_GPIO_AD_B0_09) #define MICROPY_HW_LED_STATUS_INVERTED (1) #define DEFAULT_I2C_BUS_SCL (&pin_GPIO_AD_B1_00) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO_AD_B1_01) #define DEFAULT_UART_BUS_RX (&pin_GPIO_AD_B1_07) #define DEFAULT_UART_BUS_TX (&pin_GPIO_AD_B1_06) #define CIRCUITPY_DEBUG_UART_TX (&pin_GPIO_AD_B0_12) #define CIRCUITPY_DEBUG_UART_RX (&pin_GPIO_AD_B0_13) // Put host on the first USB so that right angle OTG adapters can fit. This is // the right port when looking at the board. #define CIRCUITPY_USB_DEVICE_INSTANCE 1 #define CIRCUITPY_USB_HOST_INSTANCE 0
Fix EVK status led to be inverted
Fix EVK status led to be inverted
C
mit
adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython
4655534302e6a3601c77eae70cc65b202609ab66
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 78 #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 79 #endif
Update Skia milestone to 79
Update Skia milestone to 79 Change-Id: I248831c58b3c01d356942cd0de61447292720ccb Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239446 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,google/skia,google/skia,google/skia,HalCanary/skia-hc,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,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia
e3787b675f1a369697d97ba8e65bf6ba80ace51d
include/netpacket/packet.h
include/netpacket/packet.h
/* Definitions for use with Linux AF_PACKET sockets. Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifndef __NETPACKET_PACKET_H #define __NETPACKET_PACKET_H 1 struct sockaddr_ll { unsigned short int sll_family; unsigned short int sll_protocol; int sll_ifindex; unsigned short int sll_hatype; unsigned char sll_pkttype; unsigned char sll_halen; unsigned char sll_addr[8]; }; /* Packet types. */ #define PACKET_HOST 0 /* To us. */ #define PACKET_BROADCAST 1 /* To all. */ #define PACKET_MULTICAST 2 /* To group. */ #define PACKET_OTHERHOST 3 /* To someone else. */ #define PACKET_OUTGOING 4 /* Originated by us . */ #define PACKET_LOOPBACK 5 #define PACKET_FASTROUTE 6 /* Packet socket options. */ #define PACKET_ADD_MEMBERSHIP 1 #define PACKET_DROP_MEMBERSHIP 2 #define PACKET_RECV_OUTPUT 3 #define PACKET_RX_RING 5 #define PACKET_STATISTICS 6 struct packet_mreq { int mr_ifindex; unsigned short int mr_type; unsigned short int mr_alen; unsigned char mr_address[8]; }; #define PACKET_MR_MULTICAST 0 #define PACKET_MR_PROMISC 1 #define PACKET_MR_ALLMULTI 2 #endif /* netpacket/packet.h */
Make pump happy. Add in this header. -Erik
Make pump happy. Add in this header. -Erik
C
lgpl-2.1
groundwater/uClibc,skristiansson/uClibc-or1k,hjl-tools/uClibc,klee/klee-uclibc,czankel/xtensa-uclibc,ffainelli/uClibc,ChickenRunjyd/klee-uclibc,hjl-tools/uClibc,groundwater/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,wbx-github/uclibc-ng,mephi42/uClibc,atgreen/uClibc-moxie,waweber/uclibc-clang,foss-for-synopsys-dwc-arc-processors/uClibc,ndmsystems/uClibc,kraj/uClibc,foss-xtensa/uClibc,gittup/uClibc,czankel/xtensa-uclibc,gittup/uClibc,skristiansson/uClibc-or1k,ChickenRunjyd/klee-uclibc,kraj/uclibc-ng,atgreen/uClibc-moxie,kraj/uclibc-ng,m-labs/uclibc-lm32,groundwater/uClibc,waweber/uclibc-clang,ysat0/uClibc,gittup/uClibc,klee/klee-uclibc,mephi42/uClibc,ChickenRunjyd/klee-uclibc,hjl-tools/uClibc,ffainelli/uClibc,brgl/uclibc-ng,mephi42/uClibc,majek/uclibc-vx32,foss-xtensa/uClibc,ddcc/klee-uclibc-0.9.33.2,groundwater/uClibc,ndmsystems/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,ysat0/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,ddcc/klee-uclibc-0.9.33.2,hwoarang/uClibc,czankel/xtensa-uclibc,kraj/uclibc-ng,ysat0/uClibc,kraj/uClibc,hwoarang/uClibc,ndmsystems/uClibc,m-labs/uclibc-lm32,groundwater/uClibc,kraj/uClibc,ddcc/klee-uclibc-0.9.33.2,kraj/uclibc-ng,skristiansson/uClibc-or1k,wbx-github/uclibc-ng,ChickenRunjyd/klee-uclibc,ddcc/klee-uclibc-0.9.33.2,OpenInkpot-archive/iplinux-uclibc,majek/uclibc-vx32,majek/uclibc-vx32,waweber/uclibc-clang,ysat0/uClibc,brgl/uclibc-ng,m-labs/uclibc-lm32,ffainelli/uClibc,ndmsystems/uClibc,OpenInkpot-archive/iplinux-uclibc,mephi42/uClibc,atgreen/uClibc-moxie,hwoarang/uClibc,hjl-tools/uClibc,kraj/uClibc,wbx-github/uclibc-ng,atgreen/uClibc-moxie,brgl/uclibc-ng,foss-xtensa/uClibc,klee/klee-uclibc,waweber/uclibc-clang,OpenInkpot-archive/iplinux-uclibc,hwoarang/uClibc,gittup/uClibc,OpenInkpot-archive/iplinux-uclibc,foss-xtensa/uClibc,majek/uclibc-vx32,czankel/xtensa-uclibc,hjl-tools/uClibc,klee/klee-uclibc,brgl/uclibc-ng,ffainelli/uClibc,wbx-github/uclibc-ng,m-labs/uclibc-lm32,ffainelli/uClibc,skristiansson/uClibc-or1k
00f7b82571bef17086f65cd6c2f827c565eff40e
experiments.h
experiments.h
/* * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef WEBRTC_EXPERIMENTS_H_ #define WEBRTC_EXPERIMENTS_H_ #include "webrtc/typedefs.h" namespace webrtc { struct RemoteBitrateEstimatorMinRate { RemoteBitrateEstimatorMinRate() : min_rate(30000) {} RemoteBitrateEstimatorMinRate(uint32_t min_rate) : min_rate(min_rate) {} uint32_t min_rate; }; struct SkipEncodingUnusedStreams { SkipEncodingUnusedStreams() : enabled(false) {} explicit SkipEncodingUnusedStreams(bool set_enabled) : enabled(set_enabled) {} virtual ~SkipEncodingUnusedStreams() {} const bool enabled; }; struct AimdRemoteRateControl { AimdRemoteRateControl() : enabled(false) {} explicit AimdRemoteRateControl(bool set_enabled) : enabled(set_enabled) {} virtual ~AimdRemoteRateControl() {} const bool enabled; }; } // namespace webrtc #endif // WEBRTC_EXPERIMENTS_H_
/* * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef WEBRTC_EXPERIMENTS_H_ #define WEBRTC_EXPERIMENTS_H_ #include "webrtc/typedefs.h" namespace webrtc { struct RemoteBitrateEstimatorMinRate { RemoteBitrateEstimatorMinRate() : min_rate(30000) {} RemoteBitrateEstimatorMinRate(uint32_t min_rate) : min_rate(min_rate) {} uint32_t min_rate; }; struct AimdRemoteRateControl { AimdRemoteRateControl() : enabled(false) {} explicit AimdRemoteRateControl(bool set_enabled) : enabled(set_enabled) {} virtual ~AimdRemoteRateControl() {} const bool enabled; }; } // namespace webrtc #endif // WEBRTC_EXPERIMENTS_H_
Remove no longer used SkipEncodingUnusedStreams.
Remove no longer used SkipEncodingUnusedStreams. [email protected] Review URL: https://webrtc-codereview.appspot.com/18829004 git-svn-id: 03ae4fbe531b1eefc9d815f31e49022782c42458@6753 4adac7df-926f-26a2-2b94-8c16560cd09d
C
bsd-3-clause
Alkalyne/webrtctrunk,xin3liang/platform_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,svn2github/webrtc-Revision-8758,jgcaaprom/android_external_chromium_org_third_party_webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc,PersonifyInc/chromium_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,jchavanton/webrtc,sippet/webrtc,aleonliao/webrtc-trunk,Alkalyne/webrtctrunk,android-ia/platform_external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,jchavanton/webrtc,bpsinc-native/src_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,krieger-od/webrtc,bpsinc-native/src_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,krieger-od/nwjs_chromium_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,aleonliao/webrtc-trunk,sippet/webrtc,aleonliao/webrtc-trunk,krieger-od/nwjs_chromium_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,PersonifyInc/chromium_webrtc,Alkalyne/webrtctrunk,MIPS/external-chromium_org-third_party-webrtc,MIPS/external-chromium_org-third_party-webrtc,Omegaphora/external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,aleonliao/webrtc-trunk,sippet/webrtc,MIPS/external-chromium_org-third_party-webrtc,MIPS/external-chromium_org-third_party-webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,sippet/webrtc,Omegaphora/external_chromium_org_third_party_webrtc,jchavanton/webrtc,aleonliao/webrtc-trunk,android-ia/platform_external_chromium_org_third_party_webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,android-ia/platform_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc,krieger-od/nwjs_chromium_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,jchavanton/webrtc,krieger-od/webrtc,svn2github/webrtc-Revision-8758,bpsinc-native/src_third_party_webrtc,svn2github/webrtc-Revision-8758,xin3liang/platform_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,krieger-od/webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,PersonifyInc/chromium_webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc,krieger-od/nwjs_chromium_webrtc,MIPS/external-chromium_org-third_party-webrtc,svn2github/webrtc-Revision-8758,krieger-od/webrtc,krieger-od/webrtc,svn2github/webrtc-Revision-8758,Omegaphora/external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,MIPS/external-chromium_org-third_party-webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,krieger-od/nwjs_chromium_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,jchavanton/webrtc,jchavanton/webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,PersonifyInc/chromium_webrtc,krieger-od/nwjs_chromium_webrtc,aleonliao/webrtc-trunk,sippet/webrtc,sippet/webrtc,PersonifyInc/chromium_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,svn2github/webrtc-Revision-8758,PersonifyInc/chromium_webrtc,krieger-od/webrtc,Omegaphora/external_chromium_org_third_party_webrtc,jchavanton/webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc
47102b35d644a8c5a1343f9ec05c29b5d1e0e1b0
plat/arm/common/aarch64/arm_pauth.c
plat/arm/common/aarch64/arm_pauth.c
/* * Copyright (c) 2019, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <cdefs.h> #include <stdint.h> /* * Instruction pointer authentication key A. The low 64-bit are at [0], and the * high bits at [1]. They are run-time constants so they are placed in the * rodata section. They are written before MMU is turned on and the permissions * are effective. */ uint64_t plat_apiakey[2] __section("rodata.apiakey"); /* * This is only a toy implementation to generate a seemingly random 128-bit key * from sp and x30 values. A production system must re-implement this function * to generate keys from a reliable randomness source. */ uint64_t *plat_init_apiakey(void) { uintptr_t return_addr = (uintptr_t)__builtin_return_address(0U); uintptr_t frame_addr = (uintptr_t)__builtin_frame_address(0U); plat_apiakey[0] = (return_addr << 13) ^ frame_addr; plat_apiakey[1] = (frame_addr << 15) ^ return_addr; return plat_apiakey; }
/* * Copyright (c) 2019, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <cdefs.h> #include <stdint.h> /* * Instruction pointer authentication key A. The low 64-bit are at [0], and the * high bits at [1]. */ uint64_t plat_apiakey[2]; /* * This is only a toy implementation to generate a seemingly random 128-bit key * from sp and x30 values. A production system must re-implement this function * to generate keys from a reliable randomness source. */ uint64_t *plat_init_apiakey(void) { uintptr_t return_addr = (uintptr_t)__builtin_return_address(0U); uintptr_t frame_addr = (uintptr_t)__builtin_frame_address(0U); plat_apiakey[0] = (return_addr << 13) ^ frame_addr; plat_apiakey[1] = (frame_addr << 15) ^ return_addr; return plat_apiakey; }
Put Pointer Authentication key value in BSS section
Put Pointer Authentication key value in BSS section The dummy implementation of the plat_init_apiakey() platform API uses an internal 128-bit buffer to store the initial key value used for Pointer Authentication support. The intent - as stated in the file comments - was for this buffer to be write-protected by the MMU. Initialization of the buffer would be performed before enabling the MMU, thus bypassing write protection checks. However, the key buffer ended up into its own read-write section by mistake due to a typo on the section name ('rodata.apiakey' instead of '.rodata.apiakey', note the leading dot). As a result, the linker script was not pulling it into the .rodata output section. One way to address this issue could have been to fix the section name. However, this approach does not work well for BL1. Being the first image in the boot flow, it typically is sitting in real ROM so we don't have the capacity to update the key buffer at any time. The dummy implementation of plat_init_apiakey() provided at the moment is just there to demonstrate the Pointer Authentication feature in action. Proper key management and key generation would have to be a lot more careful on a production system. Therefore, the approach chosen here to leave the key buffer in writable memory but move it to the BSS section. This does mean that the key buffer could be maliciously updated for intalling unintended keys on the warm boot path but at the feature is only at an experimental stage right now, this is deemed acceptable. Change-Id: I121ccf35fe7bc86c73275a4586b32d4bc14698d6 Signed-off-by: Sandrine Bailleux <[email protected]>
C
bsd-3-clause
achingupta/arm-trusted-firmware,achingupta/arm-trusted-firmware
e989038c00cc0ef3885ed1cdcddbbbb0d87362a0
lib/haka/stat.c
lib/haka/stat.c
#include <stdio.h> #include <stdarg.h> #include <haka/stat.h> #include <haka/types.h> bool stat_printf(FILE *out, const char *format, ...) { va_list args; va_start(args, format); vfprintf(out, format, args); va_end(args); return true; } size_t format_bytes(size_t v, char *c) { if (v > (1 << 30)) { *c = 'g'; return (v / (1 << 30)); } else if (v > (1 << 20)) { *c = 'm'; return (v / (1 << 20)); } else if (v > (1 << 10)) { *c = 'k'; return (v / (1 << 10)); } else { *c = ' '; return v; } }
#include <stdio.h> #include <stdarg.h> #include <haka/stat.h> #include <haka/types.h> bool stat_printf(FILE *out, const char *format, ...) { va_list args; va_start(args, format); vfprintf(out, format, args); va_end(args); return true; } size_t format_bytes(size_t v, char *c) { if (v > (1 << 30)) { *c = 'G'; return (v / (1 << 30)); } else if (v > (1 << 20)) { *c = 'M'; return (v / (1 << 20)); } else if (v > (1 << 10)) { *c = 'k'; return (v / (1 << 10)); } else { *c = ' '; return v; } }
Use standard notations for mega (M) and giga (G)
Use standard notations for mega (M) and giga (G)
C
mpl-2.0
LubyRuffy/haka,nabilbendafi/haka,Wingless-Archangel/haka,haka-security/haka,nabilbendafi/haka,haka-security/haka,Wingless-Archangel/haka,lcheylus/haka,LubyRuffy/haka,haka-security/haka,lcheylus/haka,nabilbendafi/haka,lcheylus/haka
5ac905c512d06fdbd443374f5f9fafef10bef0e1
test/CodeGen/debug-info-abspath.c
test/CodeGen/debug-info-abspath.c
// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ // RUN: %s -emit-llvm -o - | FileCheck %s // RUN: cp %s %t.c // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ // RUN: %t.c -emit-llvm -o - | FileCheck %s --check-prefix=INTREE void foo() {} // Since %s is an absolute path, directory should be a nonempty // prefix, but the CodeGen part should be part of the filename. // CHECK: DIFile(filename: "{{.*}}CodeGen{{.*}}debug-info-abspath.c" // CHECK-SAME: directory: "{{.+}}") // INTREE: DIFile({{.*}}directory: "{{.+}}CodeGen{{.*}}")
// RUN: mkdir -p %t/UNIQUEISH_SENTINEL // RUN: cp %s %t/UNIQUEISH_SENTINEL/debug-info-abspath.c // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ // RUN: %t/UNIQUEISH_SENTINEL/debug-info-abspath.c -emit-llvm -o - \ // RUN: | FileCheck %s // RUN: cp %s %t.c // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ // RUN: %t.c -emit-llvm -o - | FileCheck %s --check-prefix=INTREE void foo() {} // Since %s is an absolute path, directory should be the common // prefix, but the directory part should be part of the filename. // CHECK: DIFile(filename: "{{.*}}UNIQUEISH_SENTINEL{{.*}}debug-info-abspath.c" // CHECK-NOT: directory: "{{.*}}UNIQUEISH_SENTINEL // INTREE: DIFile({{.*}}directory: "{{.+}}CodeGen{{.*}}")
Make testcase more robust for completely-out-of-tree builds.
Make testcase more robust for completely-out-of-tree builds. Thats to Dave Zarzycki for reprorting this! git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@348612 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
71fff3ac1cd1349b8cba13114ac6025d8e6eca73
tests/libfixmath_unittests/main.c
tests/libfixmath_unittests/main.c
/* * Copyright (C) 2014 René Kijewski <[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 as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * @ingroup tests * @{ * * @file * @brief execute libfixmath's unittests in RIOT * * @author René Kijewski <[email protected]> * * @} */ int main(void) { #include "fix16_unittests.inc" return 0; }
/* * Copyright (C) 2014 René Kijewski <[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 as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * @ingroup tests * @{ * * @file * @brief execute libfixmath's unittests in RIOT * * @author René Kijewski <[email protected]> * * @} */ #include <stdio.h> int main(void) { #include "fix16_unittests.inc" puts("All tests executed."); return 0; }
Add message when tests are finished.
tests/libfixmath_unittests: Add message when tests are finished.
C
lgpl-2.1
gebart/RIOT,robixnai/RIOT,jbeyerstedt/RIOT-OTA-update,roberthartung/RIOT,asanka-code/RIOT,Lexandro92/RIOT-CoAP,rousselk/RIOT,arvindpdmn/RIOT,immesys/RiSyn,shady33/RIOT,attdona/RIOT,josephnoir/RIOT,wentaoshang/RIOT,immesys/RiSyn,msolters/RIOT,OTAkeys/RIOT,kb2ma/RIOT,authmillenon/RIOT,RBartz/RIOT,stevenj/RIOT,gbarnett/RIOT,bartfaizoltan/RIOT,TobiasFredersdorf/RIOT,wentaoshang/RIOT,robixnai/RIOT,asanka-code/RIOT,khhhh/RIOT,khhhh/RIOT,alex1818/RIOT,openkosmosorg/RIOT,alex1818/RIOT,rfuentess/RIOT,RubikonAlpha/RIOT,RBartz/RIOT,mtausig/RIOT,lazytech-org/RIOT,kbumsik/RIOT,gebart/RIOT,thomaseichinger/RIOT,avmelnikoff/RIOT,plushvoxel/RIOT,zhuoshuguo/RIOT,herrfz/RIOT,ThanhVic/RIOT,beurdouche/RIOT,OlegHahm/RIOT,lazytech-org/RIOT,ThanhVic/RIOT,ks156/RIOT,luciotorre/RIOT,ks156/RIOT,neumodisch/RIOT,MarkXYang/RIOT,FrancescoErmini/RIOT,dkm/RIOT,dhruvvyas90/RIOT,centurysys/RIOT,abkam07/RIOT,haoyangyu/RIOT,dailab/RIOT,toonst/RIOT,jasonatran/RIOT,altairpearl/RIOT,PSHIVANI/Riot-Code,haoyangyu/RIOT,rousselk/RIOT,beurdouche/RIOT,cladmi/RIOT,gbarnett/RIOT,kb2ma/RIOT,jasonatran/RIOT,openkosmosorg/RIOT,MarkXYang/RIOT,toonst/RIOT,malosek/RIOT,khhhh/RIOT,kerneltask/RIOT,rakendrathapa/RIOT,msolters/RIOT,OTAkeys/RIOT,x3ro/RIOT,jremmert-phytec-iot/RIOT,kaspar030/RIOT,Lexandro92/RIOT-CoAP,watr-li/RIOT,jbeyerstedt/RIOT-OTA-update,ntrtrung/RIOT,ntrtrung/RIOT,rakendrathapa/RIOT,backenklee/RIOT,msolters/RIOT,DipSwitch/RIOT,avmelnikoff/RIOT,alignan/RIOT,JensErdmann/RIOT,Hyungsin/RIOT-OS,mtausig/RIOT,dailab/RIOT,kerneltask/RIOT,avmelnikoff/RIOT,brettswann/RIOT,d00616/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,Lexandro92/RIOT-CoAP,OlegHahm/RIOT,lazytech-org/RIOT,dailab/RIOT,jfischer-phytec-iot/RIOT,zhuoshuguo/RIOT,MarkXYang/RIOT,immesys/RiSyn,jremmert-phytec-iot/RIOT,mtausig/RIOT,LudwigOrtmann/RIOT,latsku/RIOT,Osblouf/RIOT,jbeyerstedt/RIOT-OTA-update,attdona/RIOT,rakendrathapa/RIOT,ks156/RIOT,luciotorre/RIOT,backenklee/RIOT,basilfx/RIOT,ant9000/RIOT,alignan/RIOT,katezilla/RIOT,biboc/RIOT,hamilton-mote/RIOT-OS,LudwigOrtmann/RIOT,zhuoshuguo/RIOT,Yonezawa-T2/RIOT,RIOT-OS/RIOT,l3nko/RIOT,Hyungsin/RIOT-OS,Lexandro92/RIOT-CoAP,automote/RIOT,haoyangyu/RIOT,tfar/RIOT,abkam07/RIOT,shady33/RIOT,herrfz/RIOT,thiagohd/RIOT,alignan/RIOT,miri64/RIOT,wentaoshang/RIOT,kYc0o/RIOT,centurysys/RIOT,automote/RIOT,abkam07/RIOT,brettswann/RIOT,JensErdmann/RIOT,gautric/RIOT,openkosmosorg/RIOT,mfrey/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,wentaoshang/RIOT,toonst/RIOT,TobiasFredersdorf/RIOT,RubikonAlpha/RIOT,MonsterCode8000/RIOT,Ell-i/RIOT,jasonatran/RIOT,kaspar030/RIOT,bartfaizoltan/RIOT,RIOT-OS/RIOT,yogo1212/RIOT,altairpearl/RIOT,neiljay/RIOT,RBartz/RIOT,ant9000/RIOT,stevenj/RIOT,msolters/RIOT,malosek/RIOT,smlng/RIOT,Josar/RIOT,MohmadAyman/RIOT,herrfz/RIOT,katezilla/RIOT,msolters/RIOT,A-Paul/RIOT,dhruvvyas90/RIOT,centurysys/RIOT,robixnai/RIOT,tdautc19841202/RIOT,kYc0o/RIOT,arvindpdmn/RIOT,ntrtrung/RIOT,haoyangyu/RIOT,adrianghc/RIOT,daniel-k/RIOT,A-Paul/RIOT,binarylemon/RIOT,hamilton-mote/RIOT-OS,immesys/RiSyn,rajma996/RIOT,rakendrathapa/RIOT,jremmert-phytec-iot/RIOT,cladmi/RIOT,OlegHahm/RIOT,attdona/RIOT,DipSwitch/RIOT,OTAkeys/RIOT,openkosmosorg/RIOT,rfuentess/RIOT,basilfx/RIOT,basilfx/RIOT,MohmadAyman/RIOT,stevenj/RIOT,RIOT-OS/RIOT,hamilton-mote/RIOT-OS,roberthartung/RIOT,roberthartung/RIOT,brettswann/RIOT,tdautc19841202/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,neiljay/RIOT,Yonezawa-T2/RIOT,Yonezawa-T2/RIOT,jasonatran/RIOT,asanka-code/RIOT,thiagohd/RIOT,adjih/RIOT,OTAkeys/RIOT,Ell-i/RIOT,rajma996/RIOT,LudwigKnuepfer/RIOT,toonst/RIOT,rfuentess/RIOT,d00616/RIOT,rakendrathapa/RIOT,basilfx/RIOT,adrianghc/RIOT,Osblouf/RIOT,TobiasFredersdorf/RIOT,asanka-code/RIOT,BytesGalore/RIOT,kaleb-himes/RIOT,dhruvvyas90/RIOT,plushvoxel/RIOT,kaspar030/RIOT,dhruvvyas90/RIOT,kbumsik/RIOT,daniel-k/RIOT,PSHIVANI/Riot-Code,thiagohd/RIOT,attdona/RIOT,MohmadAyman/RIOT,EmuxEvans/RIOT,brettswann/RIOT,roberthartung/RIOT,FrancescoErmini/RIOT,robixnai/RIOT,MarkXYang/RIOT,neumodisch/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,brettswann/RIOT,MohmadAyman/RIOT,katezilla/RIOT,kaspar030/RIOT,zhuoshuguo/RIOT,katezilla/RIOT,rousselk/RIOT,EmuxEvans/RIOT,latsku/RIOT,adrianghc/RIOT,RIOT-OS/RIOT,herrfz/RIOT,authmillenon/RIOT,tdautc19841202/RIOT,Darredevil/RIOT,backenklee/RIOT,malosek/RIOT,thomaseichinger/RIOT,Osblouf/RIOT,Ell-i/RIOT,Hyungsin/RIOT-OS,gautric/RIOT,immesys/RiSyn,mziegert/RIOT,roberthartung/RIOT,yogo1212/RIOT,patkan/RIOT,authmillenon/RIOT,PSHIVANI/Riot-Code,mziegert/RIOT,syin2/RIOT,adjih/RIOT,robixnai/RIOT,herrfz/RIOT,patkan/RIOT,neumodisch/RIOT,LudwigOrtmann/RIOT,daniel-k/RIOT,LudwigKnuepfer/RIOT,plushvoxel/RIOT,jfischer-phytec-iot/RIOT,ks156/RIOT,PSHIVANI/Riot-Code,avmelnikoff/RIOT,aeneby/RIOT,patkan/RIOT,kb2ma/RIOT,JensErdmann/RIOT,mziegert/RIOT,neumodisch/RIOT,patkan/RIOT,LudwigOrtmann/RIOT,jremmert-phytec-iot/RIOT,thomaseichinger/RIOT,centurysys/RIOT,thiagohd/RIOT,lebrush/RIOT,alex1818/RIOT,jfischer-phytec-iot/RIOT,watr-li/RIOT,shady33/RIOT,malosek/RIOT,kaspar030/RIOT,jremmert-phytec-iot/RIOT,khhhh/RIOT,arvindpdmn/RIOT,openkosmosorg/RIOT,rousselk/RIOT,watr-li/RIOT,DipSwitch/RIOT,jfischer-phytec-iot/RIOT,cladmi/RIOT,marcosalm/RIOT,josephnoir/RIOT,gebart/RIOT,openkosmosorg/RIOT,PSHIVANI/Riot-Code,kYc0o/RIOT,luciotorre/RIOT,ThanhVic/RIOT,Yonezawa-T2/RIOT,MonsterCode8000/RIOT,patkan/RIOT,asanka-code/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,RBartz/RIOT,kaleb-himes/RIOT,kb2ma/RIOT,alignan/RIOT,adjih/RIOT,mfrey/RIOT,dhruvvyas90/RIOT,tdautc19841202/RIOT,BytesGalore/RIOT,altairpearl/RIOT,Josar/RIOT,RBartz/RIOT,A-Paul/RIOT,beurdouche/RIOT,syin2/RIOT,miri64/RIOT,haoyangyu/RIOT,shady33/RIOT,binarylemon/RIOT,msolters/RIOT,lazytech-org/RIOT,wentaoshang/RIOT,PSHIVANI/Riot-Code,BytesGalore/RIOT,OlegHahm/RIOT,luciotorre/RIOT,Lexandro92/RIOT-CoAP,marcosalm/RIOT,bartfaizoltan/RIOT,watr-li/RIOT,cladmi/RIOT,BytesGalore/RIOT,abp719/RIOT,Osblouf/RIOT,zhuoshuguo/RIOT,MohmadAyman/RIOT,LudwigOrtmann/RIOT,lebrush/RIOT,asanka-code/RIOT,smlng/RIOT,daniel-k/RIOT,yogo1212/RIOT,josephnoir/RIOT,josephnoir/RIOT,tfar/RIOT,jfischer-phytec-iot/RIOT,altairpearl/RIOT,ThanhVic/RIOT,biboc/RIOT,alignan/RIOT,neiljay/RIOT,thomaseichinger/RIOT,thomaseichinger/RIOT,Darredevil/RIOT,Darredevil/RIOT,smlng/RIOT,neumodisch/RIOT,TobiasFredersdorf/RIOT,watr-li/RIOT,luciotorre/RIOT,beurdouche/RIOT,yogo1212/RIOT,ntrtrung/RIOT,avmelnikoff/RIOT,FrancescoErmini/RIOT,miri64/RIOT,Josar/RIOT,BytesGalore/RIOT,gbarnett/RIOT,OTAkeys/RIOT,smlng/RIOT,gautric/RIOT,latsku/RIOT,lebrush/RIOT,jasonatran/RIOT,alex1818/RIOT,RubikonAlpha/RIOT,ThanhVic/RIOT,x3ro/RIOT,aeneby/RIOT,dkm/RIOT,daniel-k/RIOT,Hyungsin/RIOT-OS,JensErdmann/RIOT,l3nko/RIOT,robixnai/RIOT,centurysys/RIOT,daniel-k/RIOT,marcosalm/RIOT,authmillenon/RIOT,Osblouf/RIOT,adrianghc/RIOT,luciotorre/RIOT,dailab/RIOT,centurysys/RIOT,aeneby/RIOT,lebrush/RIOT,abkam07/RIOT,MohmadAyman/RIOT,d00616/RIOT,Darredevil/RIOT,bartfaizoltan/RIOT,jbeyerstedt/RIOT-OTA-update,yogo1212/RIOT,tfar/RIOT,syin2/RIOT,rajma996/RIOT,thiagohd/RIOT,OlegHahm/RIOT,A-Paul/RIOT,mtausig/RIOT,abp719/RIOT,gautric/RIOT,Josar/RIOT,Yonezawa-T2/RIOT,DipSwitch/RIOT,RIOT-OS/RIOT,JensErdmann/RIOT,tfar/RIOT,arvindpdmn/RIOT,Lexandro92/RIOT-CoAP,marcosalm/RIOT,adrianghc/RIOT,thiagohd/RIOT,RubikonAlpha/RIOT,FrancescoErmini/RIOT,bartfaizoltan/RIOT,patkan/RIOT,zhuoshuguo/RIOT,ant9000/RIOT,rajma996/RIOT,automote/RIOT,gbarnett/RIOT,kbumsik/RIOT,ntrtrung/RIOT,binarylemon/RIOT,automote/RIOT,backenklee/RIOT,alex1818/RIOT,gebart/RIOT,biboc/RIOT,attdona/RIOT,backenklee/RIOT,brettswann/RIOT,smlng/RIOT,immesys/RiSyn,rousselk/RIOT,d00616/RIOT,dkm/RIOT,abkam07/RIOT,jremmert-phytec-iot/RIOT,x3ro/RIOT,beurdouche/RIOT,mfrey/RIOT,neiljay/RIOT,gebart/RIOT,MarkXYang/RIOT,aeneby/RIOT,MonsterCode8000/RIOT,plushvoxel/RIOT,hamilton-mote/RIOT-OS,gbarnett/RIOT,mfrey/RIOT,latsku/RIOT,kerneltask/RIOT,x3ro/RIOT,LudwigKnuepfer/RIOT,MarkXYang/RIOT,lazytech-org/RIOT,adjih/RIOT,miri64/RIOT,dailab/RIOT,d00616/RIOT,kerneltask/RIOT,kbumsik/RIOT,ThanhVic/RIOT,A-Paul/RIOT,rajma996/RIOT,Hyungsin/RIOT-OS,stevenj/RIOT,altairpearl/RIOT,kYc0o/RIOT,yogo1212/RIOT,DipSwitch/RIOT,hamilton-mote/RIOT-OS,RBartz/RIOT,toonst/RIOT,authmillenon/RIOT,mtausig/RIOT,kaleb-himes/RIOT,gautric/RIOT,EmuxEvans/RIOT,wentaoshang/RIOT,marcosalm/RIOT,basilfx/RIOT,gbarnett/RIOT,shady33/RIOT,lebrush/RIOT,binarylemon/RIOT,Darredevil/RIOT,altairpearl/RIOT,syin2/RIOT,automote/RIOT,rajma996/RIOT,stevenj/RIOT,rfuentess/RIOT,dhruvvyas90/RIOT,alex1818/RIOT,LudwigKnuepfer/RIOT,EmuxEvans/RIOT,x3ro/RIOT,Ell-i/RIOT,tdautc19841202/RIOT,rakendrathapa/RIOT,jbeyerstedt/RIOT-OTA-update,miri64/RIOT,FrancescoErmini/RIOT,RubikonAlpha/RIOT,neumodisch/RIOT,abp719/RIOT,herrfz/RIOT,l3nko/RIOT,LudwigOrtmann/RIOT,haoyangyu/RIOT,ant9000/RIOT,authmillenon/RIOT,l3nko/RIOT,watr-li/RIOT,kerneltask/RIOT,JensErdmann/RIOT,kb2ma/RIOT,mfrey/RIOT,dkm/RIOT,mziegert/RIOT,ant9000/RIOT,mziegert/RIOT,FrancescoErmini/RIOT,rfuentess/RIOT,biboc/RIOT,latsku/RIOT,LudwigKnuepfer/RIOT,TobiasFredersdorf/RIOT,Osblouf/RIOT,Ell-i/RIOT,syin2/RIOT,kbumsik/RIOT,josephnoir/RIOT,abp719/RIOT,rousselk/RIOT,khhhh/RIOT,plushvoxel/RIOT,kaleb-himes/RIOT,abkam07/RIOT,neiljay/RIOT,latsku/RIOT,l3nko/RIOT,ks156/RIOT,abp719/RIOT,ntrtrung/RIOT,mziegert/RIOT,automote/RIOT,kYc0o/RIOT,biboc/RIOT,d00616/RIOT,binarylemon/RIOT,khhhh/RIOT,RubikonAlpha/RIOT,lebrush/RIOT,MonsterCode8000/RIOT,shady33/RIOT,EmuxEvans/RIOT,tdautc19841202/RIOT,tfar/RIOT,MonsterCode8000/RIOT,arvindpdmn/RIOT,Josar/RIOT,attdona/RIOT,bartfaizoltan/RIOT,marcosalm/RIOT,kaleb-himes/RIOT,abp719/RIOT,Yonezawa-T2/RIOT,adjih/RIOT,DipSwitch/RIOT,katezilla/RIOT,Darredevil/RIOT,aeneby/RIOT,dkm/RIOT,malosek/RIOT,binarylemon/RIOT,l3nko/RIOT,cladmi/RIOT,malosek/RIOT,arvindpdmn/RIOT,MonsterCode8000/RIOT,stevenj/RIOT,EmuxEvans/RIOT
e6dedf514f1b16cffd6f17c9615fc65745ed2a47
MdePkg/Include/Library/PeiServicesTablePointerLib.h
MdePkg/Include/Library/PeiServicesTablePointerLib.h
/** @file PEI Services Table Pointer Library services Copyright (c) 2006, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #ifndef __PEI_SERVICES_TABLE_POINTER_LIB_H__ #define __PEI_SERVICES_TABLE_POINTER_LIB_H__ /** The function returns the pointer to PEI services. The function returns the pointer to PEI services. It will ASSERT() if the pointer to PEI services is NULL. @retval The pointer to PeiServices. **/ EFI_PEI_SERVICES ** EFIAPI GetPeiServicesTablePointer ( VOID ); /** The function set the pointer of PEI services immediately preceding the IDT table according to PI specification. @param PeiServicesTablePointer The address of PeiServices pointer. **/ VOID EFIAPI SetPeiServicesTablePointer ( EFI_PEI_SERVICES ** PeiServicesTablePointer ); /** After memory initialization in PEI phase, the IDT table in temporary memory should be migrated to memory, and the address of PeiServicesPointer also need to be updated immediately preceding the new IDT table. @param PeiServices The address of PeiServices pointer. **/ VOID EFIAPI MigrateIdtTable ( IN EFI_PEI_SERVICES **PeiServices ); #endif
/** @file PEI Services Table Pointer Library services Copyright (c) 2006, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #ifndef __PEI_SERVICES_TABLE_POINTER_LIB_H__ #define __PEI_SERVICES_TABLE_POINTER_LIB_H__ /** The function returns the pointer to PEI services. The function returns the pointer to PEI services. It will ASSERT() if the pointer to PEI services is NULL. @retval The pointer to PeiServices. **/ EFI_PEI_SERVICES ** EFIAPI GetPeiServicesTablePointer ( VOID ); /** The function set the pointer of PEI services immediately preceding the IDT table according to PI specification. @param PeiServicesTablePointer The address of PeiServices pointer. **/ VOID EFIAPI SetPeiServicesTablePointer ( EFI_PEI_SERVICES ** PeiServicesTablePointer ); #endif
Remove MigrateIDT interface from PeiServiceTableLib library class.
Remove MigrateIDT interface from PeiServiceTableLib library class. git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@5791 6f19259b-4bc3-4df7-8a09-765794883524
C
bsd-2-clause
MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2
ae056d53cc1566fdf3edd09d7e2612ae551c2a27
source/tools/IAudioSinkCallback.h
source/tools/IAudioSinkCallback.h
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef ANDROID_AUDIOSINKCALLBACK_H #define ANDROID_AUDIOSINKCALLBACK_H #include <cstdint> /** * Interface for a callback object that renders audio into a buffer. * This can be passed to an AudioSinkBase or its subclasses. */ class IAudioSinkCallback { public: IAudioSinkCallback() { } virtual ~IAudioSinkCallback() = default; typedef enum { CALLBACK_ERROR = -1, CALLBACK_CONTINUE = 0, CALLBACK_FINISHED = 1, // stop calling the callback } audio_sink_callback_result_t; virtual audio_sink_callback_result_t renderAudio(float *buffer, int32_t numFrames) = 0; }; #endif //ANDROID_AUDIOSINKCALLBACK_H
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef ANDROID_IAUDIOSINKCALLBACK_H #define ANDROID_IAUDIOSINKCALLBACK_H #include <cstdint> /** * Interface for a callback object that renders audio into a buffer. * This can be passed to an AudioSinkBase or its subclasses. */ class IAudioSinkCallback { public: IAudioSinkCallback() { } virtual ~IAudioSinkCallback() = default; typedef enum { CALLBACK_ERROR = -1, CALLBACK_CONTINUE = 0, CALLBACK_FINISHED = 1, // stop calling the callback } audio_sink_callback_result_t; virtual audio_sink_callback_result_t renderAudio(float *buffer, int32_t numFrames) = 0; }; #endif //ANDROID_IAUDIOSINKCALLBACK_H
Change protector macro to match the filename
Change protector macro to match the filename Test: builds OK Change-Id: I9d2ac3ee871a3380b32aecda6380b1b2da1dbed0
C
apache-2.0
google/synthmark,google/synthmark,google/synthmark,google/synthmark,google/synthmark
aaab81c1bbe221302ab0931f0700265932ecc18d
solutions/uri/1020/1020.c
solutions/uri/1020/1020.c
#include <stdio.h> int main() { int t, a = 0, m = 0, d = 0; while (scanf("%d", &t) != EOF) { if (t >= 365) { a = t / 365; t %= 365; } if (t >= 30) { m = t / 30; t %= 30; } d = t; printf("%d ano(s)\n", a); printf("%d mes(es)\n", m); printf("%d dia(s)\n", d); } return 0; }
Solve Age in Days in c
Solve Age in Days 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
91ee9e96426e8d3eb74869cfc965306f6f5603c9
src/rtcmix/command_line.c
src/rtcmix/command_line.c
/* command_line.c */ /* to return command line arguments */ #include "../H/ugens.h" #include "../Minc/defs.h" #include "../Minc/ext.h" extern int aargc; extern char *aargv[]; /* to pass commandline args to subroutines */ double f_arg(float *p, short n_args) { double atof(); return (((int)p[0]) < aargc - 1) ? (atof(aargv[(int)p[0]])) : 0.0; } double i_arg(float *p, short n_args) { int atoi(); return (((int)p[0]) < aargc - 1) ? (atoi(aargv[(int)p[0]])) : 0; } double s_arg(float *p,short n_args,double *pp) { char *name; int i1 = 0; if(((int)pp[0]) < aargc - 1) { name = aargv[(int)pp[0]]; i1 = (int) strsave(name); } return(i1); } double n_arg(float *p, short n_args) { return(aargc); }
/* command_line.c */ /* to return command line arguments */ #include <stdlib.h> #include <math.h> #include <ugens.h> #include "../Minc/ext.h" double f_arg(float *p, short n_args) { return (((int)p[0]) < aargc - 1) ? (atof(aargv[(int)p[0]])) : 0.0; } double i_arg(float *p, short n_args) { return (((int)p[0]) < aargc - 1) ? (atoi(aargv[(int)p[0]])) : 0; } double s_arg(float *p,short n_args,double *pp) { char *name; int i1 = 0; if(((int)pp[0]) < aargc - 1) { name = aargv[(int)pp[0]]; i1 = (int) strsave(name); } return(i1); } double n_arg(float *p, short n_args) { return(aargc); }
Delete some extern vars that were in ugens.h. Other minor cleanups.
Delete some extern vars that were in ugens.h. Other minor cleanups.
C
apache-2.0
RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix
a7ac1f5696d3f4e3e2136e86bf5f11a362d0f5e3
tree/ntuple/v7/test/CustomStructLinkDef.h
tree/ntuple/v7/test/CustomStructLinkDef.h
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class CustomStruct+; #pragma link C++ class DerivedA+; #pragma link C++ class DerivedA2+; #pragma link C++ class DerivedB+; #pragma link C++ class DerivedC+; #pragma link C++ class IAuxSetOption+; #pragma link C++ class PackedParameters+; #pragma link C++ class PackedContainer+; #endif
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class CustomStruct+; #pragma link C++ class DerivedA+; #pragma link C++ class DerivedA2+; #pragma link C++ class DerivedB+; #pragma link C++ class DerivedC+; #pragma link C++ class IAuxSetOption+; #pragma link C++ class PackedParameters+; #pragma link C++ class PackedContainer<int>+; #endif
Remove warning `Warning: Unused class rule: PackedContainer`
[ntuple] Remove warning `Warning: Unused class rule: PackedContainer`
C
lgpl-2.1
olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root
0a5490e174e79614f4b8e98a8091ad3b86d043a2
test/Misc/thinlto.c
test/Misc/thinlto.c
// RUN: %clang_cc1 -flto=thin -emit-llvm-bc < %s | llvm-bcanalyzer -dump | FileCheck %s // CHECK: <FUNCTION_SUMMARY_BLOCK // CHECK-NEXT: <PERMODULE_ENTRY // CHECK-NEXT: <PERMODULE_ENTRY // CHECK-NEXT: </FUNCTION_SUMMARY_BLOCK __attribute__((noinline)) void foo() {} int main() { foo(); }
// RUN: %clang_cc1 -flto=thin -emit-llvm-bc < %s | llvm-bcanalyzer -dump | FileCheck %s // CHECK: <GLOBALVAL_SUMMARY_BLOCK // CHECK-NEXT: <PERMODULE // CHECK-NEXT: <PERMODULE // CHECK-NEXT: </GLOBALVAL_SUMMARY_BLOCK __attribute__((noinline)) void foo() {} int main() { foo(); }
Update test case for llvm summary format changes in D17592.
Update test case for llvm summary format changes in D17592. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@263276 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/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,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
f3b2812917a934a84c2c4db1b402e6cb2ef22f43
thingc/execution/Symbol.h
thingc/execution/Symbol.h
#pragma once #include <memory> #include "Opcode.h" class Symbol { public: Symbol(Opcode opcode) : opcode(opcode) {}; Symbol(Opcode opcode, unsigned int target) : opcode(opcode), target(target) {}; void execute(); private: Opcode opcode; unsigned int target; };
#pragma once #include <memory> #include "Opcode.h" class Symbol { public: Symbol(Opcode opcode) : opcode(opcode) {}; Symbol(Opcode opcode, unsigned int target) : opcode(opcode), target(target) {}; Symbol(Opcode opcode, unsigned int target, unsigned int secondary) : opcode(opcode), target(target), secondary(secondary) {}; void execute(); private: Opcode opcode; unsigned int target = 0; unsigned int secondary = 0; };
Add optional secondary target argument
Add optional secondary target argument
C
mit
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
cd58e2e8514d2f8abd4abbeb2003722adc10c883
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.50" //================= 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.90" //================= 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 the upcoming alpha release.
Increment version number for the upcoming alpha release. svn path=/branches/KDE/3.5/kdepim/; revision=442706
C
lgpl-2.1
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
88f8bd2718d4941c67fbc0c7b7c8ab5750d9085d
obexd/src/plugin.h
obexd/src/plugin.h
/* * * OBEX Server * * Copyright (C) 2007-2009 Marcel Holtmann <[email protected]> * * * 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. * * 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 General Public License for more details. * * 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 St, Fifth Floor, Boston, MA 02110-1301 USA * */ struct obex_plugin_desc { const char *name; int (*init) (void); void (*exit) (void); }; #define OBEX_PLUGIN_DEFINE(name,init,exit) \ struct obex_plugin_desc obex_plugin_desc = { \ name, init, exit \ };
/* * * OBEX Server * * Copyright (C) 2007-2009 Marcel Holtmann <[email protected]> * * * 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. * * 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 General Public License for more details. * * 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 St, Fifth Floor, Boston, MA 02110-1301 USA * */ struct obex_plugin_desc { const char *name; int (*init) (void); void (*exit) (void); }; #define OBEX_PLUGIN_DEFINE(name,init,exit) \ extern struct obex_plugin_desc obex_plugin_desc \ __attribute__ ((visibility("default"))); \ struct obex_plugin_desc obex_plugin_desc = { \ name, init, exit \ };
Use GCC visibility for exporting symbols
obexd: Use GCC visibility for exporting symbols
C
lgpl-2.1
ComputeCycles/bluez,pkarasev3/bluez,ComputeCycles/bluez,ComputeCycles/bluez,pstglia/external-bluetooth-bluez,pkarasev3/bluez,silent-snowman/bluez,mapfau/bluez,pstglia/external-bluetooth-bluez,pstglia/external-bluetooth-bluez,pkarasev3/bluez,silent-snowman/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez,mapfau/bluez,mapfau/bluez,pkarasev3/bluez,mapfau/bluez,ComputeCycles/bluez,silent-snowman/bluez
a45e44a9c9095cfa266647cd805e7301a9b06aab
cbits/timefuncs.c
cbits/timefuncs.c
#define _XOPEN_SOURCE #include <time.h> #include <locale.h> void set_c_locale() { setlocale(LC_TIME, "C"); } time_t c_parse_http_time(char* s) { struct tm dest; strptime(s, "%a, %d %b %Y %H:%M:%S GMT", &dest); return mktime(&dest); } void c_format_http_time(time_t src, char* dest) { struct tm t; gmtime_r(&src, &t); strftime(dest, 40, "%a, %d %b %Y %H:%M:%S GMT", &t); }
#define _XOPEN_SOURCE #include <time.h> #include <locale.h> void set_c_locale() { setlocale(LC_TIME, "C"); } time_t c_parse_http_time(char* s) { struct tm dest; strptime(s, "%a, %d %b %Y %H:%M:%S GMT", &dest); return timegm(&dest); } void c_format_http_time(time_t src, char* dest) { struct tm t; gmtime_r(&src, &t); strftime(dest, 40, "%a, %d %b %Y %H:%M:%S GMT", &t); }
Fix timezone issue -- call the correct C function
Fix timezone issue -- call the correct C function
C
bsd-3-clause
23Skidoo/snap-core,sopvop/snap-core,snapframework/snap-core,23Skidoo/snap-core,snapframework/snap-core,f-me/snap-core,sopvop/snap-core,snapframework/snap-core,23Skidoo/snap-core,sopvop/snap-core,f-me/snap-core,f-me/snap-core
3abdc74015406d1582439810f3cb5c052dded0c6
src/tincan/bussignaldef.h
src/tincan/bussignaldef.h
#ifndef TIN_BUSSIGNALDEF_H #define TIN_BUSSIGNALDEF_H #include <cstdint> #include <string> namespace tin { enum class Byte_order : std::uint8_t { Intel, Moto }; enum class Value_sign : std::uint8_t { Signed, Unsigned }; struct Bus_signal_def { bool multiplex_switch; Byte_order order; Value_sign sign; std::int32_t multiplex_value; std::uint32_t pos; std::uint32_t len; double factor; double offset; double minimum; double maximum; std::string unit; std::string name; }; } // namespace tin #endif // TIN_BUSSIGNALDEF_H
#ifndef TIN_BUSSIGNALDEF_H #define TIN_BUSSIGNALDEF_H #include <cstdint> #include <string> #include <vector> namespace tin { enum class Byte_order : std::uint8_t { Intel, Moto }; enum class Value_sign : std::uint8_t { Signed, Unsigned }; struct Bus_signal_meta_data { std::int8_t factor_precision = 7; std::int8_t offset_precision = 7; std::int8_t minimum_precision = 7; std::int8_t maximum_precision = 7; }; struct Bus_signal_def { bool multiplex_switch; Byte_order order; Value_sign sign; std::int32_t multiplex_value; std::uint32_t pos; std::uint32_t len; double factor; double offset; double minimum; double maximum; std::string unit; std::string name; std::vector<std::string> receiver; Bus_signal_meta_data meta_data; }; } // namespace tin #endif // TIN_BUSSIGNALDEF_H
Add receiver and meta data
Add receiver and meta data
C
mit
jwkpeter/tincan
5b8106e848d99433f62310dbf3cb80ef9812e572
include/msvc_compat/C99/stdbool.h
include/msvc_compat/C99/stdbool.h
#ifndef stdbool_h #define stdbool_h #include <wtypes.h> /* MSVC doesn't define _Bool or bool in C, but does have BOOL */ /* Note this doesn't pass autoconf's test because (bool) 0.5 != true */ typedef BOOL _Bool; #define bool _Bool #define true 1 #define false 0 #define __bool_true_false_are_defined 1 #endif /* stdbool_h */
#ifndef stdbool_h #define stdbool_h #include <wtypes.h> /* MSVC doesn't define _Bool or bool in C, but does have BOOL */ /* Note this doesn't pass autoconf's test because (bool) 0.5 != true */ /* Clang-cl uses MSVC headers, so needs msvc_compat, but has _Bool as * a built-in type. */ #ifndef __clang__ typedef BOOL _Bool; #endif #define bool _Bool #define true 1 #define false 0 #define __bool_true_false_are_defined 1 #endif /* stdbool_h */
Allow to build with clang-cl
Allow to build with clang-cl
C
bsd-2-clause
geekboxzone/lollipop_external_jemalloc,TeamExodus/external_jemalloc,TeamExodus/external_jemalloc,geekboxzone/mmallow_external_jemalloc,xin3liang/platform_external_jemalloc,VRToxin/android_external_jemalloc,geekboxzone/lollipop_external_jemalloc,CMRemix/android_external_jemalloc,sudosurootdev/external_jemalloc,CMRemix/android_external_jemalloc,CyanogenMod/android_external_jemalloc,CyanogenMod/android_external_jemalloc,android-ia/platform_external_jemalloc,geekboxzone/mmallow_external_jemalloc,android-ia/platform_external_jemalloc,AndroidExternal/jemalloc,VRToxin/android_external_jemalloc,sudosurootdev/external_jemalloc,VRToxin/android_external_jemalloc,CMRemix/android_external_jemalloc,CyanogenMod/android_external_jemalloc,TeamExodus/external_jemalloc,geekboxzone/mmallow_external_jemalloc,AndroidExternal/jemalloc,AndroidExternal/jemalloc,android-ia/platform_external_jemalloc,CMRemix/android_external_jemalloc,geekboxzone/mmallow_external_jemalloc,VRToxin/android_external_jemalloc,AndroidExternal/jemalloc,xin3liang/platform_external_jemalloc,sudosurootdev/external_jemalloc,xin3liang/platform_external_jemalloc,geekboxzone/lollipop_external_jemalloc,geekboxzone/lollipop_external_jemalloc,sudosurootdev/external_jemalloc,xin3liang/platform_external_jemalloc,CyanogenMod/android_external_jemalloc,TeamExodus/external_jemalloc,android-ia/platform_external_jemalloc
7143facc65a8e86649d874f1910442615d367524
test/Driver/aarch64-rdm.c
test/Driver/aarch64-rdm.c
// RUN: %clang -target aarch64-none-none-eabi -march=armv8a+rdm -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-RDM %s // RUN: %clang -target aarch64-none-none-eabi -mcpu=generic+rdm -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-RDM %s // RUN: %clang -target aarch64-none-none-eabi -mcpu=falkor -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-RDM %s // RUN: %clang -target aarch64-none-none-eabi -mcpu=thunderx2t99 -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-RDM %s // CHECK-RDM: "-target-feature" "+rdm" // RUN: %clang -target aarch64-none-none-eabi -march=armv8a+nordm -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-NORDM %s // RUN: %clang -target aarch64-none-none-eabi -mcpu=generic+nordm -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-NORDM %s // CHECK-NORDM: "-target-feature" "-rdm"
Add tests for RDM feature.
[Driver][AArch64] Add tests for RDM feature. Differential Revision: https://reviews.llvm.org/D37106 git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@311660 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/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,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
030b5129d7f4693d8425740c0639a007c46902a7
code/Modules/Core/posix/precompiled.h
code/Modules/Core/posix/precompiled.h
#pragma once //------------------------------------------------------------------------------ /** @file core/posix/precompiled.h Standard includes for POSIX platforms. NOTE: keep as many headers out of here as possible, at least on compilers which don't have pre-compiled-headers turned on. */ #ifdef __STRICT_ANSI__ #undef __STRICT_ANSI__ #endif #include <cstddef>
#pragma once //------------------------------------------------------------------------------ /** @file core/posix/precompiled.h Standard includes for POSIX platforms. NOTE: keep as many headers out of here as possible, at least on compilers which don't have pre-compiled-headers turned on. */ // this is a workaround when using clang with the GNU std lib, // this fails without __STRICT_ANSI__ because clang doesn't // know the __float128 type #if __clang__ && ORYOL_LINUX && !defined __STRICT_ANSI__ #define __STRICT_ANSI__ #endif #include <cstddef>
Fix for compile error on Linux when using clang with GNU std c++ lib (__STRICT_ANSI__ is required)
Fix for compile error on Linux when using clang with GNU std c++ lib (__STRICT_ANSI__ is required)
C
mit
aonorin/oryol,floooh/oryol,aonorin/oryol,aonorin/oryol,aonorin/oryol,aonorin/oryol,aonorin/oryol,floooh/oryol,floooh/oryol,aonorin/oryol,floooh/oryol,floooh/oryol,floooh/oryol
8fc20aab3269a76b9791c98213a7eb3106da7a83
TJDropbox/TJDropboxAuthenticator.h
TJDropbox/TJDropboxAuthenticator.h
// // TJDropboxAuthenticator.h // Close-up // // Created by Tim Johnsen on 3/14/20. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN API_AVAILABLE(ios(10.0)) @interface TJDropboxAuthenticator : NSObject + (void)authenticateWithClientIdentifier:(NSString *const)clientIdentifier bypassingNativeAuth:(const BOOL)bypassNativeAuth completion:(void (^)(NSString *))completion; + (BOOL)tryHandleAuthenticationCallbackWithURL:(NSURL *const)url; @end NS_ASSUME_NONNULL_END
// // TJDropboxAuthenticator.h // Close-up // // Created by Tim Johnsen on 3/14/20. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN API_AVAILABLE(ios(10.0)) @interface TJDropboxAuthenticator : NSObject /** * Invoke this to initiate auth * @param clientIdentifier Your registered Dropbox client identifier. * @param bypassNativeAuth Pass @c YES to skip authentication via the Dropbox app and force auth to occur via the web. * @param completion Block invoked when auth is complete. @c accessToken will be @c nil if auth wasn't completed. */ + (void)authenticateWithClientIdentifier:(NSString *const)clientIdentifier bypassingNativeAuth:(const BOOL)bypassNativeAuth completion:(void (^)(NSString *_Nullable accessToken))completion; /// Invoke this from your app delegate's implementation of -application:openURL:options:, returns whether or not the URL was a completion callback to Dropbox auth. + (BOOL)tryHandleAuthenticationCallbackWithURL:(NSURL *const)url; @end NS_ASSUME_NONNULL_END
Add docs to authenticator header.
Add docs to authenticator header.
C
bsd-3-clause
timonus/TJDropbox
8294d17917c0031ec37a25dd7de2d21cea0c2c66
src/unit_VEHICLE/models/generic/Generic_RackPinion.h
src/unit_VEHICLE/models/generic/Generic_RackPinion.h
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All right reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of the distribution and at // http://projectchrono.org/license-chrono.txt. // // ============================================================================= // Authors: Radu Serban // ============================================================================= // // Generic rack-pinion steering model. // // ============================================================================= #ifndef GENERIC_RACKPINION_H #define GENERIC_RACKPINION_H #include "subsys/steering/ChRackPinion.h" class Generic_RackPinion : public chrono::ChRackPinion { public: Generic_RackPinion(const std::string& name) : ChRackPinion(name) {} ~Generic_RackPinion() {} virtual double GetSteeringLinkMass() const { return 9.0; } virtual const chrono::ChVector<>& GetSteeringLinkInertia() const { return chrono::ChVector<>(1, 1, 1); } virtual double GetSteeringLinkCOM() const { return 0.0; } virtual double GetSteeringLinkRadius() const { return 0.03; } virtual double GetSteeringLinkLength() const { return 0.896; } virtual double GetPinionRadius() const { return 0.1; } virtual double GetMaxAngle() const { return 0.87; } }; #endif
Add a generic rack-pinion steering subsystem.
Add a generic rack-pinion steering subsystem.
C
bsd-3-clause
armanpazouki/chrono,jcmadsen/chrono,projectchrono/chrono,dariomangoni/chrono,Bryan-Peterson/chrono,Milad-Rakhsha/chrono,jcmadsen/chrono,Milad-Rakhsha/chrono,andrewseidl/chrono,Bryan-Peterson/chrono,dariomangoni/chrono,jcmadsen/chrono,rserban/chrono,rserban/chrono,tjolsen/chrono,jcmadsen/chrono,armanpazouki/chrono,projectchrono/chrono,projectchrono/chrono,Bryan-Peterson/chrono,dariomangoni/chrono,rserban/chrono,armanpazouki/chrono,tjolsen/chrono,amelmquist/chrono,amelmquist/chrono,dariomangoni/chrono,andrewseidl/chrono,amelmquist/chrono,Bryan-Peterson/chrono,rserban/chrono,armanpazouki/chrono,Milad-Rakhsha/chrono,andrewseidl/chrono,rserban/chrono,armanpazouki/chrono,andrewseidl/chrono,jcmadsen/chrono,tjolsen/chrono,projectchrono/chrono,jcmadsen/chrono,amelmquist/chrono,dariomangoni/chrono,andrewseidl/chrono,rserban/chrono,tjolsen/chrono,amelmquist/chrono,projectchrono/chrono,dariomangoni/chrono,Milad-Rakhsha/chrono,armanpazouki/chrono,tjolsen/chrono,Bryan-Peterson/chrono,rserban/chrono,Milad-Rakhsha/chrono,projectchrono/chrono,jcmadsen/chrono,Milad-Rakhsha/chrono,amelmquist/chrono
a74363011638771c83555614cf2fafd1ef854bfd
hab/proxr/cb-set-resource.c
hab/proxr/cb-set-resource.c
#include <string.h> #include <stdlib.h> #include "proxrcmds.h" #include "sim-hab.h" void cb_set_resource(bionet_resource_t *resource, bionet_value_t *value) { double data; double content; char number[3]; char *res_name = NULL; long int id; bionet_node_t *node; bionet_value_get_double(value, &data); if(data < 0 || data > 255) return; node = bionet_resource_get_node(resource); bionet_split_resource_name(bionet_resource_get_name(resource), NULL, NULL, NULL, &res_name); // extract pot number from resource name number[0] = res_name[4]; number[1] = res_name[5]; number[2] = '\0'; id = strtol(number, NULL, 10); // command proxr to adjust to new value set_potentiometer(id, (int)data); // set resources datapoint to new value and report content = data*POT_CONVERSION; bionet_resource_set_double(resource, content, NULL); hab_report_datapoints(node); }
#include <string.h> #include <stdlib.h> #include "proxrcmds.h" #include "sim-hab.h" void cb_set_resource(bionet_resource_t *resource, bionet_value_t *value) { double data; double content; char number[3]; char *res_name = NULL; long int id; bionet_node_t *node; bionet_value_get_double(value, &data); if(data < 0) data = 0; if(data > 5) data = 5; node = bionet_resource_get_node(resource); bionet_split_resource_name(bionet_resource_get_name(resource), NULL, NULL, NULL, &res_name); // extract pot number from resource name number[0] = res_name[4]; number[1] = res_name[5]; number[2] = '\0'; id = strtol(number, NULL, 10); // proxr hardware works with 8 bit resolution 0-255 steps data = data/POT_CONVERSION; // command proxr to adjust to new value set_potentiometer(id, (int)data); // set resources datapoint to new value and report content = data*POT_CONVERSION; bionet_resource_set_double(resource, content, NULL); hab_report_datapoints(node); }
Change how proxr resources are set. Previously it was given a value 0-255 which the proxr hardware uses to set the voltage. now just give it a voltage and do the conversion in the hab. also if a voltage supplied is out of range it snaps to nearest in range.
Change how proxr resources are set. Previously it was given a value 0-255 which the proxr hardware uses to set the voltage. now just give it a voltage and do the conversion in the hab. also if a voltage supplied is out of range it snaps to nearest in range.
C
lgpl-2.1
ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead
41df6d94b734a98f77b27794b9289be2391bc29b
src/compiler/util/result.h
src/compiler/util/result.h
#ifndef COMPILER_UTIL_RESULT_H_ #define COMPILER_UTIL_RESULT_H_ #include <string> namespace tree_sitter { namespace util { template <typename Value> struct Result { Value value; std::string error; inline Result() : error("Empty") {} inline Result(Value &&v) : value(v) {} inline Result(const std::string &message) : error(message) {} inline Result(const char *message) : error(message) {} inline bool ok() const { return error.empty(); } }; } // namespace util } // namespace tree_sitter #endif // COMPILER_UTIL_RESULT_H_
#ifndef COMPILER_UTIL_RESULT_H_ #define COMPILER_UTIL_RESULT_H_ #include <string> namespace tree_sitter { namespace util { template <typename Value> struct Result { Value value; std::string error; inline Result() : error("Empty") {} inline Result(const Value &v) : value(v) {} inline Result(Value &&v) : value(std::move(v)) {} inline Result(const std::string &message) : error(message) {} inline Result(const char *message) : error(message) {} inline bool ok() const { return error.empty(); } }; } // namespace util } // namespace tree_sitter #endif // COMPILER_UTIL_RESULT_H_
Allow Result to be constructed with an l-value
Allow Result to be constructed with an l-value This fixes compile errors on old C++ compilers
C
mit
tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter
3e69b820d360bd96ce3c8c6714835115847c49a4
source/m3_api_defs.h
source/m3_api_defs.h
// // m3_api_defs.h // // Created by Volodymyr Shymanskyy on 12/20/19. // Copyright © 2019 Volodymyr Shymanskyy. All rights reserved. // #ifndef m3_api_defs_h #define m3_api_defs_h #include "m3_core.h" #define m3ApiReturnType(TYPE) TYPE* raw_return = ((TYPE*) (_sp)); #define m3ApiGetArg(TYPE, NAME) TYPE NAME = * ((TYPE *) (_sp++)); #define m3ApiGetArgMem(TYPE, NAME) TYPE NAME = (TYPE) (_mem + * (u32 *) _sp++); #define m3ApiRawFunction(NAME) void NAME (IM3Runtime runtime, u64 * _sp, u8 * _mem) #define m3ApiReturn(VALUE) { *raw_return = (VALUE); return; } #endif /* m3_api_defs_h */
// // m3_api_defs.h // // Created by Volodymyr Shymanskyy on 12/20/19. // Copyright © 2019 Volodymyr Shymanskyy. All rights reserved. // #ifndef m3_api_defs_h #define m3_api_defs_h #include "m3_core.h" #define m3ApiReturnType(TYPE) TYPE* raw_return = ((TYPE*) (_sp)); #define m3ApiGetArg(TYPE, NAME) TYPE NAME = * ((TYPE *) (_sp++)); #define m3ApiGetArgMem(TYPE, NAME) TYPE NAME = (TYPE) (_mem + * (u32 *) _sp++); #define m3ApiRawFunction(NAME) m3ret_t NAME (IM3Runtime runtime, u64 * _sp, u8 * _mem) #define m3ApiReturn(VALUE) { *raw_return = (VALUE); return NULL; } #endif /* m3_api_defs_h */
Fix type missmatch (crucial for wasienv)
Fix type missmatch (crucial for wasienv)
C
mit
wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3
81ac9438c400140ea6d56ee30ded7ea74135a8b3
include/payload.h
include/payload.h
#ifndef CPR_PAYLOAD_H #define CPR_PAYLOAD_H #include <memory> #include <string> #include <initializer_list> namespace cpr { struct Pair { Pair(const std::string& key, const std::string& value) : key{key}, value{value} {} Pair(const std::string& key, const int& value) : key{key}, value{std::to_string(value)} {} std::string key; std::string value; }; class Payload { public: Payload(const std::initializer_list<Pair>& pairs); Payload(const std::string& content) : content{content} {} Payload(std::string&& content) : content{std::move(content)} {} std::string content; }; } // namespace cpr #endif
#ifndef CPR_PAYLOAD_H #define CPR_PAYLOAD_H #include <memory> #include <string> #include <initializer_list> namespace cpr { struct Pair { Pair(const std::string& key, const std::string& value) : key{key}, value{value} {} Pair(const std::string& key, const int& value) : key{key}, value{std::to_string(value)} {} std::string key; std::string value; }; class Payload { public: Payload(const std::initializer_list<Pair>& pairs); std::string content; }; } // namespace cpr #endif
Remove unused and untested Payload constructor
Remove unused and untested Payload constructor
C
mit
skystrife/cpr,SuperV1234/cpr,whoshuu/cpr,msuvajac/cpr,skystrife/cpr,msuvajac/cpr,SuperV1234/cpr,SuperV1234/cpr,whoshuu/cpr,skystrife/cpr,msuvajac/cpr,whoshuu/cpr
e9cd0de60b2312738bd0e91fe7855b64f60dde73
libfxcg/misc/random.c
libfxcg/misc/random.c
static unsigned long next = 1; /* RAND_MAX assumed to be 32767 */ int sys_rand(void) { next = next * 1103515245 + 12345; return((unsigned)(next/65536) % 32768); } void sys_srand(unsigned seed) { next = seed; }
static unsigned long next = 1; /* RAND_MAX assumed to be 32767 */ int sys_rand(void) { next = next * 1103515245 + 12345; return((unsigned)(next/65536) % 32768); } void sys_srand(unsigned seed) { next = seed; } __attribute__((weak)) int rand(void) { return sys_rand(); } __attribute__((weak)) void srand(unsigned seed) { srand(seed); }
Add alias to sys_rand and sys_srand
Add alias to sys_rand and sys_srand
C
bsd-3-clause
Jonimoose/libfxcg,Jonimoose/libfxcg,Jonimoose/libfxcg
fb8222b63dc2877b058db5483e6fa02ec6f53949
CwlSignal/CwlSignal.h
CwlSignal/CwlSignal.h
// // CwlSignal.h // CwlSignal // // Created by Matt Gallagher on 11/6/16. // Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. // #import <Cocoa/Cocoa.h> //! Project version number for CwlSignal. FOUNDATION_EXPORT double CwlSignalVersionNumber; //! Project version string for CwlSignal. FOUNDATION_EXPORT const unsigned char CwlSignalVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <CwlSignal/PublicHeader.h> #import "CwlFrameAddress.h"
// // CwlSignal.h // CwlSignal // // Created by Matt Gallagher on 11/6/16. // Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. // #import <Foundation/Foundation.h> //! Project version number for CwlSignal. FOUNDATION_EXPORT double CwlSignalVersionNumber; //! Project version string for CwlSignal. FOUNDATION_EXPORT const unsigned char CwlSignalVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <CwlSignal/PublicHeader.h> #import "CwlFrameAddress.h"
Remove needless include of Cocoa.
Remove needless include of Cocoa.
C
isc
mattgallagher/CwlSignal,monyschuk/CwlSignal,mattgallagher/CwlSignal
fb3b9d76611d1e7ac1d7896aff469a52d36b6078
src/include/utils/dynahash.h
src/include/utils/dynahash.h
/*------------------------------------------------------------------------- * * dynahash-- * POSTGRES dynahash.h file definitions * * * Copyright (c) 1994, Regents of the University of California * * $Id: dynahash.h,v 1.1 1996/11/09 05:48:28 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef DYNAHASH_H #define DYNAHASH_H extern int my_log2(long num); #endif DYNAHASH_H /* DYNAHASH_H */
/*------------------------------------------------------------------------- * * dynahash-- * POSTGRES dynahash.h file definitions * * * Copyright (c) 1994, Regents of the University of California * * $Id: dynahash.h,v 1.2 1996/11/14 20:06:39 scrappy Exp $ * *------------------------------------------------------------------------- */ #ifndef DYNAHASH_H #define DYNAHASH_H extern int my_log2(long num); #endif /* DYNAHASH_H */
Fix a comment that wasn't commente'd out
Fix a comment that wasn't commente'd out Pointed out by: Erik Bertelsen <[email protected]>
C
apache-2.0
adam8157/gpdb,Chibin/gpdb,adam8157/gpdb,rubikloud/gpdb,kaknikhil/gpdb,kaknikhil/gpdb,tpostgres-projects/tPostgres,yuanzhao/gpdb,zeroae/postgres-xl,adam8157/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,oberstet/postgres-xl,Quikling/gpdb,chrishajas/gpdb,chrishajas/gpdb,zaksoup/gpdb,ashwinstar/gpdb,0x0FFF/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,tangp3/gpdb,arcivanov/postgres-xl,royc1/gpdb,atris/gpdb,rubikloud/gpdb,lisakowen/gpdb,rvs/gpdb,xuegang/gpdb,xinzweb/gpdb,yuanzhao/gpdb,randomtask1155/gpdb,ashwinstar/gpdb,ovr/postgres-xl,50wu/gpdb,ahachete/gpdb,lisakowen/gpdb,rubikloud/gpdb,janebeckman/gpdb,techdragon/Postgres-XL,ahachete/gpdb,royc1/gpdb,foyzur/gpdb,tangp3/gpdb,randomtask1155/gpdb,lisakowen/gpdb,kaknikhil/gpdb,edespino/gpdb,rvs/gpdb,tangp3/gpdb,lintzc/gpdb,Quikling/gpdb,atris/gpdb,randomtask1155/gpdb,yazun/postgres-xl,oberstet/postgres-xl,xinzweb/gpdb,CraigHarris/gpdb,chrishajas/gpdb,tangp3/gpdb,postmind-net/postgres-xl,Postgres-XL/Postgres-XL,xinzweb/gpdb,yazun/postgres-xl,foyzur/gpdb,lintzc/gpdb,lpetrov-pivotal/gpdb,atris/gpdb,Postgres-XL/Postgres-XL,tangp3/gpdb,xuegang/gpdb,ashwinstar/gpdb,zeroae/postgres-xl,randomtask1155/gpdb,edespino/gpdb,zeroae/postgres-xl,ahachete/gpdb,edespino/gpdb,CraigHarris/gpdb,rubikloud/gpdb,lintzc/gpdb,janebeckman/gpdb,randomtask1155/gpdb,50wu/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,Quikling/gpdb,cjcjameson/gpdb,CraigHarris/gpdb,Quikling/gpdb,cjcjameson/gpdb,Postgres-XL/Postgres-XL,lintzc/gpdb,janebeckman/gpdb,rvs/gpdb,cjcjameson/gpdb,edespino/gpdb,xinzweb/gpdb,royc1/gpdb,royc1/gpdb,tpostgres-projects/tPostgres,lisakowen/gpdb,kaknikhil/gpdb,snaga/postgres-xl,kaknikhil/gpdb,chrishajas/gpdb,yuanzhao/gpdb,edespino/gpdb,atris/gpdb,lintzc/gpdb,kmjungersen/PostgresXL,adam8157/gpdb,ovr/postgres-xl,tangp3/gpdb,ashwinstar/gpdb,xinzweb/gpdb,jmcatamney/gpdb,yuanzhao/gpdb,xinzweb/gpdb,zaksoup/gpdb,cjcjameson/gpdb,ovr/postgres-xl,pavanvd/postgres-xl,0x0FFF/gpdb,0x0FFF/gpdb,rvs/gpdb,Quikling/gpdb,rubikloud/gpdb,greenplum-db/gpdb,chrishajas/gpdb,0x0FFF/gpdb,royc1/gpdb,janebeckman/gpdb,0x0FFF/gpdb,rvs/gpdb,zaksoup/gpdb,CraigHarris/gpdb,arcivanov/postgres-xl,xuegang/gpdb,tpostgres-projects/tPostgres,zeroae/postgres-xl,lpetrov-pivotal/gpdb,CraigHarris/gpdb,foyzur/gpdb,rvs/gpdb,edespino/gpdb,Quikling/gpdb,lintzc/gpdb,yazun/postgres-xl,Quikling/gpdb,yuanzhao/gpdb,lisakowen/gpdb,adam8157/gpdb,postmind-net/postgres-xl,royc1/gpdb,xinzweb/gpdb,foyzur/gpdb,kaknikhil/gpdb,oberstet/postgres-xl,jmcatamney/gpdb,greenplum-db/gpdb,cjcjameson/gpdb,Chibin/gpdb,lpetrov-pivotal/gpdb,jmcatamney/gpdb,Chibin/gpdb,kaknikhil/gpdb,techdragon/Postgres-XL,jmcatamney/gpdb,Chibin/gpdb,Chibin/gpdb,Chibin/gpdb,foyzur/gpdb,Chibin/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,lintzc/gpdb,yuanzhao/gpdb,50wu/gpdb,rvs/gpdb,rvs/gpdb,atris/gpdb,pavanvd/postgres-xl,CraigHarris/gpdb,ahachete/gpdb,ahachete/gpdb,xuegang/gpdb,lintzc/gpdb,snaga/postgres-xl,Quikling/gpdb,janebeckman/gpdb,snaga/postgres-xl,postmind-net/postgres-xl,zaksoup/gpdb,CraigHarris/gpdb,janebeckman/gpdb,janebeckman/gpdb,ahachete/gpdb,tangp3/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,randomtask1155/gpdb,yazun/postgres-xl,techdragon/Postgres-XL,Quikling/gpdb,cjcjameson/gpdb,arcivanov/postgres-xl,0x0FFF/gpdb,kaknikhil/gpdb,snaga/postgres-xl,zaksoup/gpdb,postmind-net/postgres-xl,Chibin/gpdb,cjcjameson/gpdb,janebeckman/gpdb,zaksoup/gpdb,ashwinstar/gpdb,arcivanov/postgres-xl,xuegang/gpdb,zaksoup/gpdb,edespino/gpdb,50wu/gpdb,rubikloud/gpdb,tangp3/gpdb,chrishajas/gpdb,lpetrov-pivotal/gpdb,ahachete/gpdb,CraigHarris/gpdb,xuegang/gpdb,atris/gpdb,ahachete/gpdb,xuegang/gpdb,Postgres-XL/Postgres-XL,lisakowen/gpdb,greenplum-db/gpdb,lpetrov-pivotal/gpdb,chrishajas/gpdb,Chibin/gpdb,rubikloud/gpdb,tpostgres-projects/tPostgres,randomtask1155/gpdb,ovr/postgres-xl,jmcatamney/gpdb,rvs/gpdb,kmjungersen/PostgresXL,50wu/gpdb,kaknikhil/gpdb,techdragon/Postgres-XL,ashwinstar/gpdb,Quikling/gpdb,randomtask1155/gpdb,yuanzhao/gpdb,postmind-net/postgres-xl,ovr/postgres-xl,royc1/gpdb,lintzc/gpdb,xuegang/gpdb,lisakowen/gpdb,yazun/postgres-xl,lpetrov-pivotal/gpdb,cjcjameson/gpdb,greenplum-db/gpdb,tpostgres-projects/tPostgres,xuegang/gpdb,adam8157/gpdb,edespino/gpdb,Postgres-XL/Postgres-XL,pavanvd/postgres-xl,zaksoup/gpdb,oberstet/postgres-xl,foyzur/gpdb,0x0FFF/gpdb,kmjungersen/PostgresXL,yuanzhao/gpdb,foyzur/gpdb,janebeckman/gpdb,arcivanov/postgres-xl,snaga/postgres-xl,0x0FFF/gpdb,kmjungersen/PostgresXL,kmjungersen/PostgresXL,50wu/gpdb,zeroae/postgres-xl,CraigHarris/gpdb,50wu/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,adam8157/gpdb,edespino/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,Chibin/gpdb,chrishajas/gpdb,arcivanov/postgres-xl,kaknikhil/gpdb,rubikloud/gpdb,atris/gpdb,pavanvd/postgres-xl,atris/gpdb,lisakowen/gpdb,foyzur/gpdb,janebeckman/gpdb,xinzweb/gpdb,edespino/gpdb,lpetrov-pivotal/gpdb,techdragon/Postgres-XL,adam8157/gpdb,rvs/gpdb,oberstet/postgres-xl,royc1/gpdb,pavanvd/postgres-xl,50wu/gpdb
dcaf7dfa9b3cc3ff2e0e3915d69cd846c1456ca1
include/portable/pparsefp.h
include/portable/pparsefp.h
#ifndef PPARSEFP_H #define PPARSEFP_H /* * Parses a float or double number and returns the length parsed if * successful. The length argument is of limited value due to dependency * on `strtod` - buf[len] must be accessible and must not be part of * a valid number, including hex float numbers.. * * Unlike strtod, whitespace is not parsed. * * May return: * - null on error, * - buffer start if first character does start a number, * - or end of parse on success. * * Grisu3 is not part of the portable lib per se, it must be in the * include path. Grisu3 provides much faster printing and parsing in the * typical case with fallback to sprintf for printing and strod for * parsing. * * Either define PORTABLE_USE_GRISU3, or include the grisu3 header first. */ #include <math.h> /* for HUGE_VAL */ #if PORTABLE_USE_GRISU3 #include "grisu3/grisu3_parse.h" #endif #ifdef grisu3_parse_double_is_defined static inline const char *parse_double(const char *buf, int len, double *result) { return grisu3_parse_double(buf, len, result); } #else #include <stdio.h> static inline const char *parse_double(const char *buf, int len, double *result) { char *end; (void)len; *result = strtod(buf, &end); return end; } #endif static inline const char *parse_float(const char *buf, int len, float *result) { const char *end; double v; end = parse_double(buf, len, &v); *result = (float)v; return end; } #endif /* PPARSEFP_H */
Add portable floating point parsing with optional grisu3 support
Add portable floating point parsing with optional grisu3 support
C
apache-2.0
skhoroshavin/flatcc,skhoroshavin/flatcc,dvidelabs/flatcc,dvidelabs/flatcc,skhoroshavin/flatcc,dvidelabs/flatcc
fb096213f123f9f4b808e3d2ff57d0c984a27e63
libc/sysdeps/linux/arm/aeabi_memclr.c
libc/sysdeps/linux/arm/aeabi_memclr.c
/* Copyright (C) 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include <string.h> libc_hidden_proto(bzero) /* Clear memory. Can't alias to bzero because it's not defined in the same translation unit. */ void __aeabi_memclr (void *dest, size_t n) { bzero (dest, n); } /* Versions of the above which may assume memory alignment. */ strong_alias (__aeabi_memclr, __aeabi_memclr4) strong_alias (__aeabi_memclr, __aeabi_memclr8)
/* Copyright (C) 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include <string.h> libc_hidden_proto(memset) /* Clear memory. Can't alias to bzero because it's not defined in the same translation unit. */ void __aeabi_memclr (void *dest, size_t n) { memset (dest, 0, n); } /* Versions of the above which may assume memory alignment. */ strong_alias (__aeabi_memclr, __aeabi_memclr4) strong_alias (__aeabi_memclr, __aeabi_memclr8)
Use memset instead of bzero
Use memset instead of bzero
C
lgpl-2.1
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
055d3f2df632ffe49a10bd83956755bb71dc1a61
src/lib/ioloop-notify-none.c
src/lib/ioloop-notify-none.c
/* Copyright (C) 2003 Timo Sirainen */ #include "lib.h" #include "ioloop-internal.h" #ifdef IOLOOP_NOTIFY_NONE struct io *io_loop_notify_add(struct ioloop *ioloop __attr_unused__, const char *path __attr_unused__, io_callback_t *callback __attr_unused__, void *context __attr_unused__) { return NULL; } void io_loop_notify_remove(struct ioloop *ioloop __attr_unused__, struct io *io __attr_unused__) { } void io_loop_notify_handler_init(struct ioloop *ioloop __attr_unused__) { } void io_loop_notify_handler_deinit(struct ioloop *ioloop __attr_unused__) { } #endif
/* Copyright (C) 2003 Timo Sirainen */ #include "lib.h" #include "ioloop-internal.h" #ifdef IOLOOP_NOTIFY_NONE #undef io_add_notify struct io *io_add_notify(const char *path __attr_unused__, io_callback_t *callback __attr_unused__, void *context __attr_unused__) { return NULL; } void io_loop_notify_remove(struct ioloop *ioloop __attr_unused__, struct io *io __attr_unused__) { } void io_loop_notify_handler_deinit(struct ioloop *ioloop __attr_unused__) { } #endif
Fix for building without notify
Fix for building without notify
C
mit
Distrotech/dovecot,Distrotech/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,Distrotech/dovecot,damoxc/dovecot,Distrotech/dovecot,Distrotech/dovecot
50e9733e3c0f5324e09e6b411f97838f9f782a0f
src/fname.h
src/fname.h
#ifndef FHASH_H #define FHASH_H /* Box the filename pointer in a struct, for added typechecking. */ typedef struct fname { char *name; } fname; set *fname_new_set(int sz_factor); fname *fname_new(char *n, size_t len); fname *fname_add(set *wt, fname *f); void fname_free(void *w); #endif
#ifndef FNAME_H #define FNAME_H /* Box the filename pointer in a struct, for added typechecking. */ typedef struct fname { char *name; } fname; set *fname_new_set(int sz_factor); fname *fname_new(char *n, size_t len); fname *fname_add(set *wt, fname *f); void fname_free(void *w); #endif
Fix guards for renamed header files.
Fix guards for renamed header files.
C
isc
silentbicycle/glean,kaostao/glean,kaostao/glean,kaostao/glean,silentbicycle/glean
9933e4bd7dc07943f62a9ae17dddb815c4901972
include/llvm/Transforms/IPO/InlinerPass.h
include/llvm/Transforms/IPO/InlinerPass.h
//===- InlinerPass.h - Code common to all inliners --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file defines a simple policy-based bottom-up inliner. This file // implements all of the boring mechanics of the bottom-up inlining, while the // subclass determines WHAT to inline, which is the much more interesting // component. // //===----------------------------------------------------------------------===// #ifndef INLINER_H #define INLINER_H #include "llvm/CallGraphSCCPass.h" namespace llvm { class CallSite; /// Inliner - This class contains all of the helper code which is used to /// perform the inlining operations that does not depend on the policy. /// struct Inliner : public CallGraphSCCPass { Inliner(const void *ID); /// getAnalysisUsage - For this class, we declare that we require and preserve /// the call graph. If the derived class implements this method, it should /// always explicitly call the implementation here. virtual void getAnalysisUsage(AnalysisUsage &Info) const; // Main run interface method, this implements the interface required by the // Pass class. virtual bool runOnSCC(const std::vector<CallGraphNode *> &SCC); // doFinalization - Remove now-dead linkonce functions at the end of // processing to avoid breaking the SCC traversal. virtual bool doFinalization(CallGraph &CG); /// This method returns the value specified by the -inline-threshold value, /// specified on the command line. This is typically not directly needed. /// unsigned getInlineThreshold() const { return InlineThreshold; } /// getInlineCost - This method must be implemented by the subclass to /// determine the cost of inlining the specified call site. If the cost /// returned is greater than the current inline threshold, the call site is /// not inlined. /// virtual int getInlineCost(CallSite CS) = 0; private: // InlineThreshold - Cache the value here for easy access. unsigned InlineThreshold; }; } // End llvm namespace #endif
Move inliner pass header file.
Move inliner pass header file. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@37664 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap
25706992c211500250adb796b4e39ab7710326e0
include/visionaray/detail/spd/blackbody.h
include/visionaray/detail/spd/blackbody.h
// This file is distributed under the MIT license. // See the LICENSE file for details. #pragma once #ifndef VSNRAY_DETAIL_SPD_BLACKBODY_H #define VSNRAY_DETAIL_SPD_BLACKBODY_H 1 #include <cmath> #include "../macros.h" namespace visionaray { //------------------------------------------------------------------------------------------------- // Spectral power distribution for blackbody radiator // See: http://www.spectralcalc.com/blackbody/units_of_wavelength.html // Color temperature in Kelvin, sample SPD with wavelength (nm) // struct blackbody { blackbody(float T = 1500.0) : T(T) {} VSNRAY_FUNC float operator()(float lambda /* nm */) const { double const k = 1.3806488E-23; double const h = 6.62606957E-34; double const c = 2.99792458E8; lambda *= 1E-3; // nm to microns return ( ( 2.0 * 1E24 * h * c * c ) / pow(lambda, 5.0) ) * ( 1.0 / (exp((1E6 * h * c) / (lambda * k * T)) - 1.0) ); } private: double T; }; } // visionaray #endif // VSNRAY_DETAIL_SPD_BLACKBODY_H
// This file is distributed under the MIT license. // See the LICENSE file for details. #pragma once #ifndef VSNRAY_DETAIL_SPD_BLACKBODY_H #define VSNRAY_DETAIL_SPD_BLACKBODY_H 1 #include <cmath> #include "../macros.h" namespace visionaray { //------------------------------------------------------------------------------------------------- // Spectral power distribution for blackbody radiator // See: http://www.spectralcalc.com/blackbody/units_of_wavelength.html // Color temperature in Kelvin, sample SPD with wavelength (nm) // class blackbody { public: blackbody(float T = 1500.0) : T(T) {} VSNRAY_FUNC float operator()(float lambda /* nm */) const { double const k = 1.3806488E-23; double const h = 6.62606957E-34; double const c = 2.99792458E8; lambda *= 1E-3; // nm to microns return ( ( 2.0 * 1E24 * h * c * c ) / pow(lambda, 5.0) ) * ( 1.0 / (exp((1E6 * h * c) / (lambda * k * T)) - 1.0) ); } private: double T; }; } // visionaray #endif // VSNRAY_DETAIL_SPD_BLACKBODY_H
Use class for non-trivial types
Use class for non-trivial types
C
mit
szellmann/visionaray,szellmann/visionaray
6def8cef8c661ed9b68974ccb4871645efdafa2b
src/DeviceInterfaces/Networking.Sntp/nf_networking_sntp.h
src/DeviceInterfaces/Networking.Sntp/nf_networking_sntp.h
// // Copyright (c) 2018 The nanoFramework project contributors // Portions Copyright (c) Microsoft Corporation. All rights reserved. // See LICENSE file in the project root for full license information. // #ifndef _NF_NETWORKING_SNTP_H_ #define _NF_NETWORKING_SNTP_H_ #include <nanoCLR_Interop.h> #include <nanoCLR_Runtime.h> #include <nanoCLR_Checks.h> #include <nanoHAL_time.h> extern "C" { #include <apps/sntp.h> } struct Library_nf_networking_sntp_nanoFramework_Networking_Sntp { NANOCLR_NATIVE_DECLARE(Start___STATIC__VOID); NANOCLR_NATIVE_DECLARE(Stop___STATIC__VOID); NANOCLR_NATIVE_DECLARE(UpdateNow___STATIC__VOID); NANOCLR_NATIVE_DECLARE(get_IsStarted___STATIC__BOOLEAN); NANOCLR_NATIVE_DECLARE(get_Server1___STATIC__STRING); NANOCLR_NATIVE_DECLARE(set_Server1___STATIC__VOID__STRING); NANOCLR_NATIVE_DECLARE(get_Server2___STATIC__STRING); NANOCLR_NATIVE_DECLARE(set_Server2___STATIC__VOID__STRING); //--// }; extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_nanoFramework_Networking_Sntp; #endif //_NF_NETWORKING_SNTP_H_
// // Copyright (c) 2018 The nanoFramework project contributors // Portions Copyright (c) Microsoft Corporation. All rights reserved. // See LICENSE file in the project root for full license information. // #ifndef _NF_NETWORKING_SNTP_H_ #define _NF_NETWORKING_SNTP_H_ #include <nanoCLR_Interop.h> #include <nanoCLR_Runtime.h> #include <nanoCLR_Checks.h> #include <nanoHAL_time.h> extern "C" { #ifndef PLATFORM_ESP32 #include <apps/sntp.h> #else #include <apps/sntp/sntp.h> #endif } struct Library_nf_networking_sntp_nanoFramework_Networking_Sntp { NANOCLR_NATIVE_DECLARE(Start___STATIC__VOID); NANOCLR_NATIVE_DECLARE(Stop___STATIC__VOID); NANOCLR_NATIVE_DECLARE(UpdateNow___STATIC__VOID); NANOCLR_NATIVE_DECLARE(get_IsStarted___STATIC__BOOLEAN); NANOCLR_NATIVE_DECLARE(get_Server1___STATIC__STRING); NANOCLR_NATIVE_DECLARE(set_Server1___STATIC__VOID__STRING); NANOCLR_NATIVE_DECLARE(get_Server2___STATIC__STRING); NANOCLR_NATIVE_DECLARE(set_Server2___STATIC__VOID__STRING); //--// }; extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_nanoFramework_Networking_Sntp; #endif //_NF_NETWORKING_SNTP_H_
Fix headers so SNTP builds on Esp32
Fix headers so SNTP builds on Esp32
C
mit
Eclo/nf-interpreter,Eclo/nf-interpreter,Eclo/nf-interpreter,Eclo/nf-interpreter,nanoframework/nf-interpreter,nanoframework/nf-interpreter,nanoframework/nf-interpreter,nanoframework/nf-interpreter
7ae9b93a7d8f52dd01682b7c2e6df89f91a0cd29
include/llvm/Transforms/Instrumentation/TraceValues.h
include/llvm/Transforms/Instrumentation/TraceValues.h
//===- llvm/Transforms/Instrumentation/TraceValues.h - Tracing ---*- C++ -*--=// // // Support for inserting LLVM code to print values at basic block and method // exits. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H #define LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H #include "llvm/Pass.h" class InsertTraceCode : public Pass { bool TraceBasicBlockExits, TraceMethodExits; public: InsertTraceCode(bool traceBasicBlockExits, bool traceMethodExits) : TraceBasicBlockExits(traceBasicBlockExits), TraceMethodExits(traceMethodExits) {} //-------------------------------------------------------------------------- // Function InsertCodeToTraceValues // // Inserts tracing code for all live values at basic block and/or method exits // as specified by `traceBasicBlockExits' and `traceMethodExits'. // static bool doInsertTraceCode(Method *M, bool traceBasicBlockExits, bool traceMethodExits); // doPerMethodWork - This method does the work. Always successful. // bool doPerMethodWork(Method *M) { return doInsertTraceCode(M, TraceBasicBlockExits, TraceMethodExits); } }; #endif /*LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H*/
//===- llvm/Transforms/Instrumentation/TraceValues.h - Tracing ---*- C++ -*--=// // // Support for inserting LLVM code to print values at basic block and method // exits. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H #define LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H #include "llvm/Pass.h" class Method; class InsertTraceCode : public Pass { bool TraceBasicBlockExits, TraceMethodExits; Method *PrintfMeth; public: InsertTraceCode(bool traceBasicBlockExits, bool traceMethodExits) : TraceBasicBlockExits(traceBasicBlockExits), TraceMethodExits(traceMethodExits) {} // Add a prototype for printf if it is not already in the program. // bool doPassInitialization(Module *M); //-------------------------------------------------------------------------- // Function InsertCodeToTraceValues // // Inserts tracing code for all live values at basic block and/or method exits // as specified by `traceBasicBlockExits' and `traceMethodExits'. // static bool doit(Method *M, bool traceBasicBlockExits, bool traceMethodExits, Method *Printf); // doPerMethodWork - This method does the work. Always successful. // bool doPerMethodWork(Method *M) { return doit(M, TraceBasicBlockExits, TraceMethodExits, PrintfMeth); } }; #endif
Refactor trace values to work as a proper pass. Before it used to add methods while the pass was running which was a no no. Now it adds the printf method at pass initialization
Refactor trace values to work as a proper pass. Before it used to add methods while the pass was running which was a no no. Now it adds the printf method at pass initialization git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@1456 91177308-0d34-0410-b5e6-96231b3b80d8
C
bsd-2-clause
chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm
a0a4aa34596d60f28287fc386f598608c15ae680
webkit/support/webkit_support_gfx.h
webkit/support/webkit_support_gfx.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 WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #include <string> #include <vector> // TODO(darin): Remove once this #include has been upstreamed to ImageDiff.cpp. // ImageDiff.cpp expects that PATH_MAX has already been defined :-/ #include <limits.h> namespace webkit_support { // Decode a PNG into an RGBA pixel array. bool DecodePNG(const unsigned char* input, size_t input_size, std::vector<unsigned char>* output, int* width, int* height); // Encode an RGBA pixel array into a PNG. bool EncodeRGBAPNG(const unsigned char* input, int width, int height, int row_byte_width, std::vector<unsigned char>* output); // Encode an BGRA pixel array into a PNG. bool EncodeBGRAPNG(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, std::vector<unsigned char>* output); bool EncodeBGRAPNGWithChecksum(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, const std::string& checksum, std::vector<unsigned char>* output); } // namespace webkit_support #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_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 WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #include <string> #include <vector> namespace webkit_support { // Decode a PNG into an RGBA pixel array. bool DecodePNG(const unsigned char* input, size_t input_size, std::vector<unsigned char>* output, int* width, int* height); // Encode an RGBA pixel array into a PNG. bool EncodeRGBAPNG(const unsigned char* input, int width, int height, int row_byte_width, std::vector<unsigned char>* output); // Encode an BGRA pixel array into a PNG. bool EncodeBGRAPNG(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, std::vector<unsigned char>* output); bool EncodeBGRAPNGWithChecksum(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, const std::string& checksum, std::vector<unsigned char>* output); } // namespace webkit_support #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_
Remove an include which has been upstreamed to ImageDiff.cpp.
Remove an include which has been upstreamed to ImageDiff.cpp. BUG=none TEST=none Review URL: http://codereview.chromium.org/8392031 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@107382 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
gavinp/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,ropik/chromium,adobe/chromium,ropik/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,adobe/chromium
e1467dbfd5d1068c2dd69511f16bc218475a9396
test/Sema/align-arm-apcs-gnu.c
test/Sema/align-arm-apcs-gnu.c
// RUN: %clang_cc1 -triple arm-unknown-unknown -target-abi apcs-gnu -fsyntax-only -verify %s struct s0 { double f0; int f1; }; char chk0[__alignof__(struct s0) == 4 ? 1 : -1]; double g1; short chk1[__alignof__(g1) == 4 ? 1 : -1]; short chk2[__alignof__(double) == 4 ? 1 : -1]; long long g2; short chk1[__alignof__(g2) == 4 ? 1 : -1]; short chk2[__alignof__(long long) == 4 ? 1 : -1]; _Complex double g3; short chk1[__alignof__(g3) == 4 ? 1 : -1]; short chk2[__alignof__(_Complex double) == 4 ? 1 : -1];
// RUN: %clang_cc1 -triple arm-unknown-unknown -target-abi apcs-gnu -fsyntax-only -verify %s struct s0 { double f0; int f1; }; char chk0[__alignof__(struct s0) == 4 ? 1 : -1];
Fix r135934. Rename was intended, but without additional tests for double.
Fix r135934. Rename was intended, but without additional tests for double. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@135935 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
254b2638962bd632aa52b3102caf418c43ac25b5
test/Driver/masm.c
test/Driver/masm.c
// REQUIRES: x86-registered-target // RUN: %clang -target i386-unknown-linux -masm=intel %s -S -o - | FileCheck --check-prefix=CHECK-INTEL %s // RUN: %clang -target i386-unknown-linux -masm=att %s -S -o - | FileCheck --check-prefix=CHECK-ATT %s // RUN: not %clang -target i386-unknown-linux -masm=somerequired %s -S -o - 2>&1 | FileCheck --check-prefix=CHECK-SOMEREQUIRED %s // REQUIRES: arm-registered-target // RUN: %clang -target arm-unknown-eabi -masm=intel %s -S -o - 2>&1 | FileCheck --check-prefix=CHECK-ARM %s int f() { // CHECK-ATT: movl $0, %eax // CHECK-INTEL: mov eax, 0 // CHECK-SOMEREQUIRED: error: unsupported argument 'somerequired' to option 'masm=' // CHECK-ARM: warning: argument unused during compilation: '-masm=intel' return 0; }
// RUN: %clang -target i386-unknown-linux -masm=intel -S %s -### 2>&1 | FileCheck --check-prefix=CHECK-INTEL %s // RUN: %clang -target i386-unknown-linux -masm=att -S %s -### 2>&1 | FileCheck --check-prefix=CHECK-ATT %s // RUN: %clang -target i386-unknown-linux -S -masm=somerequired %s -### 2>&1 | FileCheck --check-prefix=CHECK-SOMEREQUIRED %s // RUN: %clang -target arm-unknown-eabi -S -masm=intel %s -### 2>&1 | FileCheck --check-prefix=CHECK-ARM %s int f() { // CHECK-INTEL: -x86-asm-syntax=intel // CHECK-ATT: -x86-asm-syntax=att // CHECK-SOMEREQUIRED: error: unsupported argument 'somerequired' to option 'masm=' // CHECK-ARM: warning: argument unused during compilation: '-masm=intel' return 0; }
Make this test target independent.
Make this test target independent. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@208725 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
6474370f2e67ed392c4685c98f2eb88dce79cff6
src/python_threads.h
src/python_threads.h
#ifndef PYTHON_THREADS #define PYTHON_THREADS #ifdef __EMSCRIPTEN__ static inline void init_python_threads() { } #else #include "Python.h" static inline void init_python_threads() { PyEval_InitThreads(); } #endif #endif
#ifndef PYTHON_THREADS #define PYTHON_THREADS #ifdef __EMSCRIPTEN__ static inline void init_python_threads(void) { } #else #include "Python.h" static inline void init_python_threads(void) { PyEval_InitThreads(); } #endif #endif
Add prototype to prevent warning.
Add prototype to prevent warning.
C
lgpl-2.1
renpy/pygame_sdl2,renpy/pygame_sdl2,renpy/pygame_sdl2,renpy/pygame_sdl2
6cbea9ce7e6598d25648d09987309dafeb794179
shell/android/platform_view_android.h
shell/android/platform_view_android.h
// Copyright 2015 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 SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ #define SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ #include "sky/shell/platform_view.h" struct ANativeWindow; namespace sky { namespace shell { class PlatformViewAndroid : public PlatformView { public: static bool Register(JNIEnv* env); ~PlatformViewAndroid() override; // Called from Java void Detach(JNIEnv* env, jobject obj); void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface); void SurfaceDestroyed(JNIEnv* env, jobject obj); private: void ReleaseWindow(); ANativeWindow* window_; DISALLOW_COPY_AND_ASSIGN(PlatformViewAndroid); }; } // namespace shell } // namespace sky #endif // SKY_SHELL_PLATFORM_VIEW_ANDROID_H_
// Copyright 2015 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 SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ #define SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ #include "sky/shell/platform_view.h" struct ANativeWindow; namespace sky { namespace shell { class PlatformViewAndroid : public PlatformView { public: static bool Register(JNIEnv* env); ~PlatformViewAndroid() override; // Called from Java void Detach(JNIEnv* env, jobject obj); void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface); void SurfaceDestroyed(JNIEnv* env, jobject obj); private: void ReleaseWindow(); DISALLOW_COPY_AND_ASSIGN(PlatformViewAndroid); }; } // namespace shell } // namespace sky #endif // SKY_SHELL_PLATFORM_VIEW_ANDROID_H_
Stop SkyShell from crashing on startup
Stop SkyShell from crashing on startup [email protected] Review URL: https://codereview.chromium.org/1178773002.
C
bsd-3-clause
aam/engine,flutter/engine,chinmaygarde/flutter_engine,tvolkert/engine,takaaptech/sky_engine,mxia/engine,chinmaygarde/flutter_engine,jason-simmons/flutter_engine,jason-simmons/flutter_engine,iansf/sky_engine,takaaptech/sky_engine,qiankunshe/sky_engine,mikejurka/engine,chinmaygarde/flutter_engine,krisgiesing/sky_engine,devoncarew/sky_engine,jamesr/sky_engine,Hixie/sky_engine,mdakin/engine,krisgiesing/sky_engine,mpcomplete/engine,iansf/sky_engine,iansf/sky_engine,devoncarew/sky_engine,axinging/sky_engine,jason-simmons/sky_engine,takaaptech/sky_engine,lyceel/engine,flutter/engine,mdakin/engine,jamesr/flutter_engine,chinmaygarde/sky_engine,devoncarew/engine,jamesr/flutter_engine,zhangxq5012/sky_engine,Hixie/sky_engine,mpcomplete/engine,zhangxq5012/sky_engine,flutter/engine,rmacnak-google/engine,mpcomplete/engine,mxia/engine,TribeMedia/sky_engine,mxia/engine,mikejurka/engine,chinmaygarde/sky_engine,qiankunshe/sky_engine,lyceel/engine,jason-simmons/flutter_engine,chinmaygarde/flutter_engine,mpcomplete/engine,jamesr/flutter_engine,jason-simmons/sky_engine,mpcomplete/engine,krisgiesing/sky_engine,jamesr/sky_engine,devoncarew/sky_engine,axinging/sky_engine,mpcomplete/flutter_engine,jamesr/sky_engine,tvolkert/engine,qiankunshe/sky_engine,abarth/sky_engine,TribeMedia/sky_engine,xunmengfeng/engine,krisgiesing/sky_engine,abarth/sky_engine,cdotstout/sky_engine,rmacnak-google/engine,jimsimon/sky_engine,mikejurka/engine,chinmaygarde/flutter_engine,jimsimon/sky_engine,rmacnak-google/engine,flutter/engine,TribeMedia/sky_engine,afandria/sky_engine,xunmengfeng/engine,cdotstout/sky_engine,TribeMedia/sky_engine,devoncarew/sky_engine,cdotstout/sky_engine,mpcomplete/flutter_engine,TribeMedia/sky_engine,mxia/engine,TribeMedia/sky_engine,zhangxq5012/sky_engine,tvolkert/engine,TribeMedia/sky_engine,jamesr/flutter_engine,qiankunshe/sky_engine,qiankunshe/sky_engine,tvolkert/engine,qiankunshe/sky_engine,jimsimon/sky_engine,Hixie/sky_engine,abarth/sky_engine,cdotstout/sky_engine,mpcomplete/engine,chinmaygarde/sky_engine,mikejurka/engine,flutter/engine,jamesr/flutter_engine,cdotstout/sky_engine,devoncarew/engine,afandria/sky_engine,afandria/sky_engine,jamesr/sky_engine,lyceel/engine,mdakin/engine,chinmaygarde/flutter_engine,mxia/engine,devoncarew/engine,qiankunshe/sky_engine,chinmaygarde/sky_engine,Hixie/sky_engine,takaaptech/sky_engine,takaaptech/sky_engine,aam/engine,flutter/engine,devoncarew/sky_engine,mikejurka/engine,lyceel/engine,jason-simmons/flutter_engine,devoncarew/sky_engine,aam/engine,xunmengfeng/engine,afandria/sky_engine,xunmengfeng/engine,afandria/sky_engine,takaaptech/sky_engine,qiankunshe/sky_engine,jamesr/sky_engine,jamesr/flutter_engine,TribeMedia/sky_engine,mpcomplete/flutter_engine,jamesr/flutter_engine,axinging/sky_engine,jason-simmons/sky_engine,xunmengfeng/engine,mdakin/engine,rmacnak-google/engine,jimsimon/sky_engine,abarth/sky_engine,axinging/sky_engine,rmacnak-google/engine,iansf/sky_engine,mpcomplete/engine,afandria/sky_engine,iansf/sky_engine,xunmengfeng/engine,zhangxq5012/sky_engine,Hixie/sky_engine,mdakin/engine,tvolkert/engine,abarth/sky_engine,jamesr/flutter_engine,axinging/sky_engine,jason-simmons/flutter_engine,takaaptech/sky_engine,flutter/engine,Hixie/sky_engine,aam/engine,aam/engine,jason-simmons/flutter_engine,zhangxq5012/sky_engine,Hixie/sky_engine,devoncarew/engine,mxia/engine,aam/engine,devoncarew/sky_engine,axinging/sky_engine,devoncarew/engine,abarth/sky_engine,aam/engine,jason-simmons/sky_engine,axinging/sky_engine,zhangxq5012/sky_engine,zhangxq5012/sky_engine,tvolkert/engine,chinmaygarde/sky_engine,tvolkert/engine,chinmaygarde/sky_engine,mikejurka/engine,krisgiesing/sky_engine,krisgiesing/sky_engine,jimsimon/sky_engine,rmacnak-google/engine,mdakin/engine,devoncarew/engine,jimsimon/sky_engine,jason-simmons/flutter_engine,takaaptech/sky_engine,chinmaygarde/flutter_engine,axinging/sky_engine,jimsimon/sky_engine,devoncarew/engine,mikejurka/engine,iansf/sky_engine,iansf/sky_engine,mikejurka/engine,mpcomplete/flutter_engine,jimsimon/sky_engine,xunmengfeng/engine,zhangxq5012/sky_engine,lyceel/engine,mdakin/engine,mpcomplete/engine,axinging/sky_engine,jimsimon/sky_engine,takaaptech/sky_engine,flutter/engine,jamesr/flutter_engine,chinmaygarde/sky_engine,mpcomplete/flutter_engine,jason-simmons/flutter_engine,iansf/sky_engine,rmacnak-google/engine,mikejurka/engine,aam/engine,afandria/sky_engine,cdotstout/sky_engine,zhangxq5012/sky_engine,cdotstout/sky_engine,jamesr/sky_engine,jamesr/sky_engine,jason-simmons/sky_engine,mxia/engine,lyceel/engine,abarth/sky_engine,jason-simmons/sky_engine,mxia/engine,jason-simmons/sky_engine,lyceel/engine,mpcomplete/flutter_engine,mdakin/engine,krisgiesing/sky_engine,TribeMedia/sky_engine,afandria/sky_engine,Hixie/sky_engine
dfc745d620ad31430ce88ba92007c1289061c0fc
libopenspotify/browse.h
libopenspotify/browse.h
#ifndef LIBOPENSPOTIFY_BROWSE_H #define LIBOPENSPOTIFY_BROWSE_H #include "buf.h" #include "sp_opaque.h" #define BROWSE_RETRY_TIMEOUT 30 int browse_process(sp_session *session, struct request *req); #endif
#ifndef LIBOPENSPOTIFY_BROWSE_H #define LIBOPENSPOTIFY_BROWSE_H #include <spotify/api.h> #include "buf.h" #include "request.h" #define BROWSE_RETRY_TIMEOUT 30 int browse_process(sp_session *session, struct request *req); #endif
Include spotify/api.h and request.h instead of sp_opaque.h
Include spotify/api.h and request.h instead of sp_opaque.h
C
bsd-2-clause
noahwilliamsson/openspotify,noahwilliamsson/openspotify
ee38cfbb3217cce85021efe883916823dbbd0f8d
tests/regression/24-octagon/18-problem-signed-unsigned-overflow.c
tests/regression/24-octagon/18-problem-signed-unsigned-overflow.c
// PARAM: --sets solver td3 --set ana.activated "['base','threadid','threadflag','mallocWrapper','octApron']" // Example from https://github.com/sosy-lab/sv-benchmarks/blob/master/c/bitvector-regression/signextension-1.c #include "stdio.h" #include <assert.h> int main() { // This test is a part taken from of 24 13 unsigned short int allbits = -1; short int signedallbits = allbits; int signedtosigned = signedallbits; assert(allbits == 65535); assert(signedallbits == -1); assert(signedtosigned == -1); if (signedtosigned == -1) { assert(1); } return (0); }
Add a test for octagon
Add a test for octagon
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
490fabb3cf7bd259a4d2a26cfece0c0c70564e37
src/loader.h
src/loader.h
/* * Copyright (c) 2014, 2016 Scott Bennett <[email protected]> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef LOADER_H #define LOADER_H #include "bool.h" bool load(const char * fileName); #endif /* LOADER_H */
/* * Written by Scott Bennett. * Public domain. */ #ifndef LOADER_H #define LOADER_H #include "bool.h" bool load(const char * fileName); #endif /* LOADER_H */
Move this file into public domain; it's too simple to copyright...
Move this file into public domain; it's too simple to copyright...
C
isc
sbennett1990/YESS,sbennett1990/YESS,sbennett1990/YESS
e2ef60a90646606999399bf1d7de7c189d6c62ca
test/ubsan/TestCases/Misc/unreachable_asan-compatibility.c
test/ubsan/TestCases/Misc/unreachable_asan-compatibility.c
// Ensure compatiblity of UBSan unreachable with ASan in the presence of // noreturn functions // RUN: %clang -O2 -fsanitize=address,unreachable %s -emit-llvm -S -o - | FileCheck %s // REQUIRES: ubsan-asan void bar(void) __attribute__((noreturn)); void foo() { bar(); } // CHECK-LABEL: define void @foo() // CHECK: call void @__asan_handle_no_return // CHECK-NEXT: call void @bar // CHECK-NEXT: call void @__asan_handle_no_return // CHECK-NEXT: call void @__ubsan_handle_builtin_unreachable // CHECK-NEXT: unreachable
// Ensure compatiblity of UBSan unreachable with ASan in the presence of // noreturn functions // RUN: %clang -O2 -fPIC -fsanitize=address,unreachable %s -emit-llvm -S -o - | FileCheck %s // REQUIRES: ubsan-asan void bar(void) __attribute__((noreturn)); void foo() { bar(); } // CHECK-LABEL: define void @foo() // CHECK: call void @__asan_handle_no_return // CHECK-NEXT: call void @bar // CHECK-NEXT: call void @__asan_handle_no_return // CHECK-NEXT: call void @__ubsan_handle_builtin_unreachable // CHECK-NEXT: unreachable
Fix test when isPICDefault() returns false after rCTE352003
[ubsan] Fix test when isPICDefault() returns false after rCTE352003 git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@352013 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
d31d8165f64cd4047a31ff5d5dd831829b1a4ad3
Sources/SPTPersistentCacheResponse+Private.h
Sources/SPTPersistentCacheResponse+Private.h
/* * Copyright (c) 2016 Spotify AB. * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ #import <SPTPersistentCache/SPTPersistentCacheResponse.h> NSString *NSStringFromSPTPersistentCacheResponseCode(SPTPersistentCacheResponseCode code); @interface SPTPersistentCacheResponse (Private) - (instancetype)initWithResult:(SPTPersistentCacheResponseCode)result error:(NSError *)error record:(SPTPersistentCacheRecord *)record; @end
/* * Copyright (c) 2016 Spotify AB. * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ #import <SPTPersistentCache/SPTPersistentCacheResponse.h> extern NSString *NSStringFromSPTPersistentCacheResponseCode(SPTPersistentCacheResponseCode code); @interface SPTPersistentCacheResponse (Private) - (instancetype)initWithResult:(SPTPersistentCacheResponseCode)result error:(NSError *)error record:(SPTPersistentCacheRecord *)record; @end
Add missing 'extern' when declaring NSStringFromSPTPersistentCacheResponseCode in header
Add missing 'extern' when declaring NSStringFromSPTPersistentCacheResponseCode in header
C
apache-2.0
chrisbtreats/SPTPersistentCache,FootballAddicts/SPTPersistentCache,iOSCowboy/SPTPersistentCache,iOSCowboy/SPTPersistentCache,FootballAddicts/SPTPersistentCache,chrisbtreats/SPTPersistentCache,spotify/SPTPersistentCache,spotify/SPTPersistentCache,chrisbtreats/SPTPersistentCache,FootballAddicts/SPTPersistentCache,spotify/SPTPersistentCache,FootballAddicts/SPTPersistentCache,iOSCowboy/SPTPersistentCache,chrisbtreats/SPTPersistentCache
4d0af5772e2a6865ce246e4a191279663b70d70b
simulator/simulator.h
simulator/simulator.h
/* * simulator.h - interface for simulator * Copyright 2018 MIPT-MIPS */ #ifndef SIMULATOR_H #define SIMULATOR_H #include <memory.h> #include <infra/types.h> #include <infra/log.h> class Simulator : public Log { public: Simulator( bool log = false) : Log( log) {} virtual void run(const std::string& tr, uint64 instrs_to_run) = 0; static std::unique_ptr<Simulator> create_simulator(const std::string& isa, bool functional_only, bool log); }; #endif // SIMULATOR_H
/* * simulator.h - interface for simulator * Copyright 2018 MIPT-MIPS */ #ifndef SIMULATOR_H #define SIMULATOR_H #include <memory.h> #include <infra/types.h> #include <infra/log.h> class Simulator : public Log { public: explicit Simulator( bool log = false) : Log( log) {} virtual void run(const std::string& tr, uint64 instrs_to_run) = 0; static std::unique_ptr<Simulator> create_simulator(const std::string& isa, bool functional_only, bool log); }; #endif // SIMULATOR_H
Add explicit specifier to Simulator ctor
Add explicit specifier to Simulator ctor
C
mit
MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips-2015
30e94c0aed4e84bd6a04691329f396d89bd739fb
sys/sparc64/include/idprom.h
sys/sparc64/include/idprom.h
/* * Copyright (c) 1993 Adam Glass * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. 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. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Adam Glass. * 4. The name of the Author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY Adam Glass ``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 REGENTS 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. * * from: NetBSD: idprom.h,v 1.2 1998/09/05 23:57:26 eeh Exp * * $FreeBSD$ */ #ifndef _MACHINE_IDPROM_H_ #define _MACHINE_IDPROM_H_ /* * ID prom format. The ``host id'' is set up by taking the machine * ID as the top byte and the hostid field as the remaining three. * The id_xxx0 field appears to contain some other number. The id_xxx1 * contains a bunch of 00's and a5's on my machines, suggesting it is * not actually used. The checksum seems to include them, however. */ struct idprom { u_char id_format; /* format identifier (= 1) */ u_char id_machine; /* machine type (see param.h) */ u_char id_ether[6]; /* ethernet address */ int id_date; /* date of manufacture */ u_char id_hostid[3]; /* ``host id'' bytes */ u_char id_checksum; /* xor of everything else */ char id_undef[16]; /* undefined */ }; #define ID_SUN4_100 0x22 #define ID_SUN4_200 0x21 #define ID_SUN4_300 0x23 #define ID_SUN4_400 0x24 #define IDPROM_VERSION 1 #endif /* !_MACHINE_IDPROM_H_ */
Add a structure defintion for the id prom contents.
Add a structure defintion for the id prom contents. Obtained from: NetBSD
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
ea3949ce981b558e47c28ca09a56095368ddf34a
src/memdumper.c
src/memdumper.c
#include <stdio.h> #include "memdumper.h" static const char HEX[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', }; void byteToHex(char byte, char* output) { output[0] = HEX[(byte >> 4) & 0x0F]; output[1] = HEX[byte & 0x0F]; } void dumpMemoryAsHex(char* data, char* dataEnd, int count) { static char hexbuff[2]; int i = 0; while(i < count) { if(&data[i] >= dataEnd) break; byteToHex(data[i++], hexbuff); printf("%s ", hexbuff); } /* Print padding */ for( ; i < count; i++) { printf(".. "); } } void dumpMemoryAsASCII(char* data, char* dataEnd, int count) { int i = 0; while(i < count) { char c; if(&data[i] >= dataEnd) break; c = data[i++]; printf("%c", (c < ' ' || c == (char)(127)) ? '.' : c); } /* Print padding */ for( ; i < count; i++) { printf("."); } }
#include <stdio.h> #include "memdumper.h" static const char HEX[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', }; void byteToHex(char byte, char* output) { output[0] = HEX[(byte >> 4) & 0x0F]; output[1] = HEX[byte & 0x0F]; } void dumpMemoryAsHex(char* data, char* dataEnd, int count) { static char hexbuff[3] = {0, 0, 0}; int i = 0; while(i < count) { if(&data[i] >= dataEnd) break; byteToHex(data[i++], hexbuff); printf("%s ", hexbuff); } /* Print padding */ for( ; i < count; i++) { printf(".. "); } } void dumpMemoryAsASCII(char* data, char* dataEnd, int count) { int i = 0; while(i < count) { char c; if(&data[i] >= dataEnd) break; c = data[i++]; printf("%c", (c < ' ' || c == (char)(127)) ? '.' : c); } /* Print padding */ for( ; i < count; i++) { printf("."); } }
Make hex string buffer guarantee a null terminator
Make hex string buffer guarantee a null terminator
C
mit
drdanick/apricos-fs-manager
8518e74f3e24b136c627534e30b0068836785575
include/llvm/Support/ValueHolder.h
include/llvm/Support/ValueHolder.h
//===-- llvm/Support/ValueHolder.h - Wrapper for Value's --------*- C++ -*-===// // // This class defines a simple subclass of User, which keeps a pointer to a // Value, which automatically updates when Value::replaceAllUsesWith is called. // This is useful when you have pointers to Value's in your pass, but the // pointers get invalidated when some other portion of the algorithm is // replacing Values with other Values. // //===----------------------------------------------------------------------===// #ifndef LLVM_SUPPORT_VALUEHOLDER_H #define LLVM_SUPPORT_VALUEHOLDER_H #include "llvm/User.h" struct ValueHolder : public User { ValueHolder(Value *V = 0); // Getters... const Value *get() const { return getOperand(0); } operator const Value*() const { return getOperand(0); } Value *get() { return getOperand(0); } operator Value*() { return getOperand(0); } // Setters... const ValueHolder &operator=(Value *V) { setOperand(0, V); return *this; } virtual void print(std::ostream& OS) const { OS << "ValueHolder"; } }; #endif
//===-- llvm/Support/ValueHolder.h - Wrapper for Value's --------*- C++ -*-===// // // This class defines a simple subclass of User, which keeps a pointer to a // Value, which automatically updates when Value::replaceAllUsesWith is called. // This is useful when you have pointers to Value's in your pass, but the // pointers get invalidated when some other portion of the algorithm is // replacing Values with other Values. // //===----------------------------------------------------------------------===// #ifndef LLVM_SUPPORT_VALUEHOLDER_H #define LLVM_SUPPORT_VALUEHOLDER_H #include "llvm/User.h" struct ValueHolder : public User { ValueHolder(Value *V = 0); ValueHolder(const ValueHolder &VH) : User(VH.getType(), Value::TypeVal) {} // Getters... const Value *get() const { return getOperand(0); } operator const Value*() const { return getOperand(0); } Value *get() { return getOperand(0); } operator Value*() { return getOperand(0); } // Setters... const ValueHolder &operator=(Value *V) { setOperand(0, V); return *this; } const ValueHolder &operator=(ValueHolder &VH) { setOperand(0, VH); return *this; } virtual void print(std::ostream& OS) const { OS << "ValueHolder"; } }; #endif
Add more methods to be more value-like
Add more methods to be more value-like git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@8074 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm
999de3c3fd59c197df0b12e3c11581560a07bfd4
tls/gnutls/gnutls-module.c
tls/gnutls/gnutls-module.c
/* GIO - GLib Input, Output and Streaming Library * * Copyright 2010 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General * Public License along with this library; if not, see * <http://www.gnu.org/licenses/>. */ #include "config.h" #include <gio/gio.h> #include "gtlsbackend-gnutls.h" #include "gtlsbackend-gnutls-pkcs11.h" void g_io_module_load (GIOModule *module) { g_tls_backend_gnutls_register (module); g_tls_backend_gnutls_pkcs11_register (module); } void g_io_module_unload (GIOModule *module) { } gchar ** g_io_module_query (void) { gchar *eps[] = { G_TLS_BACKEND_EXTENSION_POINT_NAME, NULL }; return g_strdupv (eps); }
/* GIO - GLib Input, Output and Streaming Library * * Copyright 2010 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General * Public License along with this library; if not, see * <http://www.gnu.org/licenses/>. */ #include "config.h" #include <gio/gio.h> #include "gtlsbackend-gnutls.h" #include "gtlsbackend-gnutls-pkcs11.h" void g_io_module_load (GIOModule *module) { g_tls_backend_gnutls_register (module); #ifdef HAVE_PKCS11 g_tls_backend_gnutls_pkcs11_register (module); #endif } void g_io_module_unload (GIOModule *module) { } gchar ** g_io_module_query (void) { gchar *eps[] = { G_TLS_BACKEND_EXTENSION_POINT_NAME, NULL }; return g_strdupv (eps); }
Fix unresolved symbol when pkcs11 is disabled
gnutls: Fix unresolved symbol when pkcs11 is disabled * Error would occur: libgiognutls.so: undefined symbol: \ g_tls_backend_gnutls_pkcs11_register
C
lgpl-2.1
Distrotech/glib-networking,GNOME/glib-networking,Distrotech/glib-networking,GNOME/glib-networking,GNOME/glib-networking,Distrotech/glib-networking
f34ee1e4aa493b3192226c77f6c7041efc47c6df
project/include/ByteArray.h
project/include/ByteArray.h
#ifndef NME_BYTE_ARRAY_H #define NME_BYTE_ARRAY_H #include <nme/Object.h> #include <nme/QuickVec.h> #include "Utils.h" namespace nme { // If you put this structure on the stack, then you do not have to worry about GC. // If you store this in a heap structure, then you will need to use GC roots for mValue... struct ByteArray { ByteArray(int inSize); ByteArray(const ByteArray &inRHS); ByteArray(); ByteArray(struct _value *Value); ByteArray(const QuickVec<unsigned char> &inValue); ByteArray(const char *inResourceName); void Resize(int inSize); int Size() const; unsigned char *Bytes(); const unsigned char *Bytes() const; bool Ok() { return mValue!=0; } struct _value *mValue; static ByteArray FromFile(const OSChar *inFilename); #ifdef HX_WINDOWS static ByteArray FromFile(const char *inFilename); #endif }; #ifdef ANDROID ByteArray AndroidGetAssetBytes(const char *); struct FileInfo { int fd; off_t offset; off_t length; }; FileInfo AndroidGetAssetFD(const char *); #endif } #endif
#ifndef NME_BYTE_ARRAY_H #define NME_BYTE_ARRAY_H #include <nme/Object.h> #include <nme/QuickVec.h> #include "Utils.h" #include <hx/CFFI.h> namespace nme { // If you put this structure on the stack, then you do not have to worry about GC. // If you store this in a heap structure, then you will need to use GC roots for mValue... struct ByteArray { ByteArray(int inSize); ByteArray(const ByteArray &inRHS); ByteArray(); ByteArray(value Value); ByteArray(const QuickVec<unsigned char> &inValue); ByteArray(const char *inResourceName); void Resize(int inSize); int Size() const; unsigned char *Bytes(); const unsigned char *Bytes() const; bool Ok() { return mValue!=0; } value mValue; static ByteArray FromFile(const OSChar *inFilename); #ifdef HX_WINDOWS static ByteArray FromFile(const char *inFilename); #endif }; #ifdef ANDROID ByteArray AndroidGetAssetBytes(const char *); struct FileInfo { int fd; off_t offset; off_t length; }; FileInfo AndroidGetAssetFD(const char *); #endif } #endif
Use correct cffi type for 'value'
Use correct cffi type for 'value'
C
mit
thomasuster/NME,haxenme/nme,haxenme/nme,haxenme/nme,haxenme/nme,madrazo/nme,thomasuster/NME,thomasuster/NME,madrazo/nme,thomasuster/NME,thomasuster/NME,madrazo/nme,thomasuster/NME,madrazo/nme,madrazo/nme,haxenme/nme,madrazo/nme
1dab0d1203f99f5ee5d3d8aa4e2c683ec92e80ca
verification/global_ocean.cs32x15/code_ad/GMREDI_OPTIONS.h
verification/global_ocean.cs32x15/code_ad/GMREDI_OPTIONS.h
C $Header$ C $Name$ C CPP options file for GM/Redi package C C Use this file for selecting options within the GM/Redi package C #ifndef GMREDI_OPTIONS_H #define GMREDI_OPTIONS_H #include "PACKAGES_CONFIG.h" #ifdef ALLOW_GMREDI #include "CPP_OPTIONS.h" C Designed to simplify the Ajoint code: C exclude the clipping/tapering part of the code that is not used #define GM_EXCLUDE_CLIPPING #define GM_EXCLUDE_AC02_TAP #define GM_EXCLUDE_FM07_TAP #undef GM_EXCLUDE_TAPERING C This allows to use Visbeck et al formulation to compute K_GM+Redi #undef GM_VISBECK_VARIABLE_K C This allows the leading diagonal (top two rows) to be non-unity C (a feature required when tapering adiabatically). #define GM_NON_UNITY_DIAGONAL C Allows to use different values of K_GM and K_Redi ; also to C be used with the advective form (Bolus velocity) of GM #define GM_EXTRA_DIAGONAL C Allows to use the advective form (Bolus velocity) of GM C instead of the Skew-Flux form (=default) #define GM_BOLUS_ADVEC #endif /* ALLOW_GMREDI */ #endif /* GMREDI_OPTIONS_H */
Add a missing config header
Add a missing config header
C
mit
altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h
122eaf409a0203d8f6e565e4cf361b7ca8f2844a
tests/sv-comp/observer/path_nofun_true-unreach-call.c
tests/sv-comp/observer/path_nofun_true-unreach-call.c
extern void __VERIFIER_error() __attribute__ ((__noreturn__)); extern int __VERIFIER_nondet_int(); int main() { int x, y; if (__VERIFIER_nondet_int()) { x = 0; y = 1; } else { x = 1; y = 0; } // if (!(x + y == 1)) if (x + y != 1) __VERIFIER_error(); return 0; } // ./goblint --enable ana.sv-comp --enable ana.wp --enable witness.uncil --disable ana.int.def_exc --enable ana.int.interval --set ana.activated '["base"]' --set phases '[{}, {"ana": {"activated": ["base", "observer"], "path_sens": ["observer"]}}]' --html tests/sv-comp/observer/path_nofun_true-unreach-call.c // ./goblint --enable ana.sv-comp --enable ana.wp --enable witness.uncil --disable ana.int.def_exc --enable ana.int.interval --set ana.activated '["base"]' --html tests/sv-comp/observer/path_nofun_true-unreach-call.c
extern void __VERIFIER_error() __attribute__ ((__noreturn__)); extern int __VERIFIER_nondet_int(); int main() { int x, y; if (__VERIFIER_nondet_int()) { x = 0; y = 1; } else { x = 1; y = 0; } // if (!(x + y == 1)) if (x + y != 1) __VERIFIER_error(); return 0; } // ./goblint --enable ana.sv-comp --enable ana.wp --enable witness.uncil --disable ana.int.def_exc --enable ana.int.interval --set ana.activated '["base"]' --html tests/sv-comp/observer/path_nofun_true-unreach-call.c
Remove phases command line from SV-COMP observer example
Remove phases command line from SV-COMP observer example
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
4cc782bd715a9202b2b6eb1190fbf66eaab3d8f1
yalex/src/demo.c
yalex/src/demo.c
#include <stdio.h> #include <string.h> #include "yalex.h" void replMessageCallback(const char* ptr) { if (ptr && strlen(ptr)>0) { printf("%s\n", ptr); } } int yalex(void) { yalex_world world; yalex_init(&world, replMessageCallback); replMessageCallback("welcome"); char word[256]; /**/ yalex_repl(&world, ":fibstep (R1R R2R + R3S R2R R1S R3R R2S R4R 1 + R4S rec)"); yalex_repl(&world, ":rec (R0R R4R 1 + < 'fibstep R3R select)"); yalex_repl(&world, ":fib (R0S 0 R1S 1 R2S 0 R3S 1 R4S rec)"); while (1) { word[0] = 0; fgets(word, sizeof(word), stdin); yalex_repl(&world, word); } return 0; } int main() { yalex(); return 0; }
#include <stdio.h> #include <string.h> #include "yalex.h" void replMessageCallback(const char* ptr) { if (ptr && strlen(ptr)>0) { printf("%s\n", ptr); } } int yalex(void) { yalex_world world; yalex_init(&world, replMessageCallback); replMessageCallback("welcome"); char word[256]; /**/ yalex_repl(&world, ":nset (R0S)"); yalex_repl(&world, ":n (R0R)"); yalex_repl(&world, ":t1set (R1S)"); yalex_repl(&world, ":t1 (R1R)"); yalex_repl(&world, ":t2set (R2S)"); yalex_repl(&world, ":t2 (R2R)"); yalex_repl(&world, ":resset (R3S)"); yalex_repl(&world, ":res (R3R)"); yalex_repl(&world, ":iset (R4S)"); yalex_repl(&world, ":i (R4R)"); yalex_repl(&world, ":fibstep (t1 t2 + resset t2 t1set res t2set i 1 + iset rec)"); yalex_repl(&world, ":rec (n i 1 + < 'fibstep res select)"); yalex_repl(&world, ":fib (nset 0 t1set 1 t2set 0 resset 1 iset rec)"); while (1) { word[0] = 0; fgets(word, sizeof(word), stdin); yalex_repl(&world, word); } return 0; } int main() { yalex(); return 0; }
Add register alias for verbosity and readability?
Add register alias for verbosity and readability?
C
mit
AlexanderBrevig/yalex
f2d28e13a2ddc7dba28f53e9a7e9dfe4edd85859
Runtime/Rendering/ConstantBufferDX11.h
Runtime/Rendering/ConstantBufferDX11.h
#pragma once #include "Rendering/BufferDX11.h" #include "Rendering/ShaderDX11.h" namespace Mile { class MEAPI ConstantBufferDX11 : public BufferDX11 { public: ConstantBufferDX11(RendererDX11* renderer); ~ConstantBufferDX11(); bool Init(unsigned int size); template <typename Buffer> bool Init() { return Init(sizeof(Buffer)); } virtual ERenderResourceType GetResourceType() const override { return ERenderResourceType::ConstantBuffer; } virtual void* Map(ID3D11DeviceContext& deviceContext) override; template <typename BufferType> BufferType* Map(ID3D11DeviceContext& deviceContext) { return reinterpret_cast<BufferType*>(Map(deviceContext)); } virtual bool UnMap(ID3D11DeviceContext& deviceContext) override; bool Bind(ID3D11DeviceContext& deviceContext, unsigned int slot, EShaderType shaderType); void Unbind(ID3D11DeviceContext& deviceContext); FORCEINLINE bool IsBound() const { return m_bIsBound; } FORCEINLINE unsigned int GetBoundSlot() const { return m_boundSlot; } FORCEINLINE EShaderType GetBoundShaderType() const { return m_boundShader; } private: bool m_bIsBound; unsigned int m_boundSlot; EShaderType m_boundShader; }; }
#pragma once #include "Rendering/BufferDX11.h" #include "Rendering/ShaderDX11.h" namespace Mile { class MEAPI ConstantBufferDX11 : public BufferDX11 { public: ConstantBufferDX11(RendererDX11* renderer); ~ConstantBufferDX11(); bool Init(unsigned int size); template <typename BufferType> bool Init() { return Init(sizeof(BufferType)); } virtual ERenderResourceType GetResourceType() const override { return ERenderResourceType::ConstantBuffer; } virtual void* Map(ID3D11DeviceContext& deviceContext) override; template <typename BufferType> BufferType* Map(ID3D11DeviceContext& deviceContext) { return reinterpret_cast<BufferType*>(Map(deviceContext)); } virtual bool UnMap(ID3D11DeviceContext& deviceContext) override; bool Bind(ID3D11DeviceContext& deviceContext, unsigned int slot, EShaderType shaderType); void Unbind(ID3D11DeviceContext& deviceContext); FORCEINLINE bool IsBound() const { return m_bIsBound; } FORCEINLINE unsigned int GetBoundSlot() const { return m_boundSlot; } FORCEINLINE EShaderType GetBoundShaderType() const { return m_boundShader; } private: bool m_bIsBound; unsigned int m_boundSlot; EShaderType m_boundShader; }; }
Modify constant buffer init method template type name
Modify constant buffer init method template type name
C
mit
HoRangDev/MileEngine,HoRangDev/MileEngine
dd3ef21ed70fa4d34f6713f83089c821b2707a60
Application.h
Application.h
#pragma once #include <SDL2/SDL.h> #include <string> class Application { private: // Main loop flag bool quit; // The window SDL_Window* window; // The window renderer SDL_Renderer* renderer; // The background color SDL_Color backgroundColor; // Window properties std::string title; unsigned int windowWidth; unsigned int windowHeight; bool isFullscreen; bool init(); void close(); void draw(); protected: // Event called after initialized virtual void on_init(); // Event called when before drawing the screen in the loop virtual void on_update(); // Event called when drawing the screen in the loop virtual void on_draw(SDL_Renderer* renderer); void set_background_color(SDL_Color color); public: Application(); Application(std::string title); Application(std::string title, unsigned int width, unsigned int height); Application(std::string title, unsigned int width, unsigned int height, bool fullscreen); ~Application(); void Run(); };
#pragma once #include <SDL2/SDL.h> #include <string> class Application { private: // Main loop flag bool quit; // The window SDL_Window* window; // The window renderer SDL_Renderer* renderer; // The background color SDL_Color backgroundColor; // Window properties std::string title; unsigned int windowWidth; unsigned int windowHeight; bool isFullscreen; bool init(); void close(); void draw(); protected: // Event called after initialized virtual void on_init(); // Event called when before drawing the screen in the loop virtual void on_update(); // Event called when drawing the screen in the loop virtual void on_draw(SDL_Renderer* renderer); void set_background_color(SDL_Color color); unsigned int get_window_height() { return windowHeight; } unsigned int get_window_width() { return windowWidth; } bool is_fullscreen() { return isFullscreen; } public: Application(); Application(std::string title); Application(std::string title, unsigned int width, unsigned int height); Application(std::string title, unsigned int width, unsigned int height, bool fullscreen); ~Application(); void Run(); };
Add getters for window constants
Add getters for window constants
C
mit
gldraphael/SdlTemplate
76f99cdff282275195f86b132b2daab6470900df
CreamMonkey.h
CreamMonkey.h
#import <Cocoa/Cocoa.h> @interface CreamMonkey : NSObject { } @end
/* * Copyright (c) 2006 KATO Kazuyoshi <[email protected]> * This source code is released under the MIT license. */ #import <Cocoa/Cocoa.h> @interface CreamMonkey : NSObject { } @end
Add copyright and license header.
Add copyright and license header.
C
mit
kzys/greasekit,sohocoke/greasekit,tbodt/greasekit,chrismessina/greasekit
181aa9e0febf808f95718c3eea1f74d9fdc0086c
QtVmbViewer.h
QtVmbViewer.h
#ifndef QTVMBVIEWER_H #define QTVMBVIEWER_H // Qt dependencies #include <QWidget> #include <QLabel> #include <QSlider> // Local dependency #include "VmbCamera.h" // Qt widget to display the images from an Allied Vision camera through the Vimba SDK class QtVmbViewer : public QWidget { // Macro to use Qt signals and slots Q_OBJECT // Public members public : // Constructor QtVmbViewer( QWidget *parent = 0 ); // Destructor ~QtVmbViewer(); // Qt slots public slots : // Slot to get the image from the camera and update the widget void UpdateImage(); // Slot to update the camera exposure void SetExposure(); // Private members private : // Label to display the camera image QLabel* label; // Slider to set the camera exposure time QSlider* slider; // Allied Vision camera VmbCamera* camera; }; #endif // QTVMBVIEWER_H
#ifndef QTVMBVIEWER_H #define QTVMBVIEWER_H // Qt dependencies #include <QWidget> #include <QLabel> #include <QSlider> // Local dependency #include "VmbCamera.h" // Qt widget to display the images from an Allied Vision camera through the Vimba SDK class QtVmbViewer : public QWidget { // Macro to use Qt signals and slots Q_OBJECT // Public members public : // Constructor QtVmbViewer( QWidget *parent = 0 ); // Destructor ~QtVmbViewer(); // Qt slots private slots : // Slot to get the image from the camera and update the widget void UpdateImage(); // Slot to update the camera exposure void SetExposure(); // Private members private : // Label to display the camera image QLabel* label; // Slider to set the camera exposure time QSlider* slider; // Allied Vision camera VmbCamera* camera; }; #endif // QTVMBVIEWER_H
Change to private Qt slots.
Change to private Qt slots.
C
mit
microy/QtVmbViewer
0374498753335e45920f20c1a3b224f430bb82f1
Sources/Faraday.h
Sources/Faraday.h
/* Faraday Faraday.h * * Copyright © 2015, 2016, Roy Ratcliffe, Pioneering Software, United Kingdom * * 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, EITHER * EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO * EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * ******************************************************************************/ #import <Foundation/Foundation.h> FOUNDATION_EXPORT double FaradayVersionNumber; FOUNDATION_EXPORT const unsigned char FaradayVersionString[];
/* Faraday Faraday.h * * Copyright © 2015, 2016, Roy Ratcliffe, Pioneering Software, United Kingdom * * 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, EITHER * EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO * EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * ******************************************************************************/ @import Foundation; FOUNDATION_EXPORT double FaradayVersionNumber; FOUNDATION_EXPORT const unsigned char FaradayVersionString[];
Use @import in Objective-C header
Use @import in Objective-C header
C
mit
royratcliffe/Faraday,royratcliffe/Faraday
c7e71ee6111ca152d16c317965ffb29a404ad4c4
test/wasm/soft/float/floatunditf.c
test/wasm/soft/float/floatunditf.c
#include "src/math/reinterpret.h" #include <stdint.h> #include <assert.h> uint64_t __fixunstfdi(long double); static _Bool run(uint64_t a) { return a == __fixunstfdi(a); } int main(void) { const uint64_t delta = 0x0008D46BA87B5A22; for (uint64_t i = 0x3FFFFFFFFFFFFFFF; i < 0x4340000000000000; i += delta) assert(run(reinterpret(double, i))); for (uint64_t i = 0; i <= UINT64_MAX / delta; ++i) assert(run(i * delta)); }
Test uint64_t -> long double
Test uint64_t -> long double
C
mit
jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic
908a9539d9beb242ab247b290a118dd1c1e6414f
backend/src/libocl/tmpl/ocl_defines.tmpl.h
backend/src/libocl/tmpl/ocl_defines.tmpl.h
#ifndef __OCL_COMMON_DEF_H__ #define __OCL_COMMON_DEF_H__ #define __OPENCL_VERSION__ 110 #define __CL_VERSION_1_0__ 100 #define __CL_VERSION_1_1__ 110 #define __ENDIAN_LITTLE__ 1 #define __IMAGE_SUPPORT__ 1 #define __kernel_exec(X, TYPE) __kernel __attribute__((work_group_size_hint(X,1,1))) \ __attribute__((vec_type_hint(TYPE))) #define kernel_exec(X, TYPE) __kernel_exec(X, TYPE) #define cl_khr_global_int32_base_atomics #define cl_khr_global_int32_extended_atomics #define cl_khr_local_int32_base_atomics #define cl_khr_local_int32_extended_atomics #define cl_khr_byte_addressable_store #define cl_khr_icd #define cl_khr_gl_sharing #endif /* end of __OCL_COMMON_DEF_H__ */
Add the ocl_defines header file into libocl
Add the ocl_defines header file into libocl This file will be used to define some common defines for both CL and the backend source code. Signed-off-by: Junyan He <[email protected]> Reviewed-by: Zhigang Gong <[email protected]>
C
lgpl-2.1
wdv4758h/beignet,wdv4758h/beignet,zhenyw/beignet,zhenyw/beignet,wdv4758h/beignet,freedesktop-unofficial-mirror/beignet,zhenyw/beignet,zhenyw/beignet,freedesktop-unofficial-mirror/beignet,wdv4758h/beignet,freedesktop-unofficial-mirror/beignet,freedesktop-unofficial-mirror/beignet,zhenyw/beignet,wdv4758h/beignet
bae6f787c319c9b2cafba0e5fd0027c5d3903fc6
src/gluonvarianttypes.h
src/gluonvarianttypes.h
/* <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> 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 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ ///TODO: Make this something entirely different... QVariant wrapped Eigen types, wooh! ;) #ifndef GLUON_VARIANTTYPES #define GLUON_VARIANTTYPES #ifndef EIGEN_CORE_H #warning This needs to be included AFTER Eigen and friends #endif #include <QVariant> #include <Eigen/Geometry> Q_DECLARE_METATYPE(Eigen::Vector3d) //qRegisterMetatype<Eigen::Vector3d>("Eigen::Vector3d"); #endif
/* <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> 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 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ ///TODO: Make this something entirely different... QVariant wrapped Eigen types, wooh! ;) #ifndef GLUON_VARIANTTYPES #define GLUON_VARIANTTYPES #include <QVariant> #include <QMetaType> #include <Eigen/Geometry> Q_DECLARE_METATYPE(Eigen::Vector3d) namespace { struct GluonVariantTypes { public: GluonVariantTypes() { qRegisterMetaType<Eigen::Vector3d>("Eigen::Vector3d"); } }; GluonVariantTypes gluonVariantTypes; } #endif
Make the varianttypes work more pleasantly - now you simply include the file, and stuff happens magically! (that is, Eigen::Vector3d is registered as a QVariant now... more to come!)
Make the varianttypes work more pleasantly - now you simply include the file, and stuff happens magically! (that is, Eigen::Vector3d is registered as a QVariant now... more to come!)
C
lgpl-2.1
pranavrc/example-gluon,cgaebel/gluon,cgaebel/gluon,cgaebel/gluon,pranavrc/example-gluon,KDE/gluon,KDE/gluon,KDE/gluon,pranavrc/example-gluon,pranavrc/example-gluon,cgaebel/gluon,KDE/gluon
66e5d79b94fc671581ad3ca63630d9462831a6fa
libyaul/scu/scu-internal.h
libyaul/scu/scu-internal.h
/* * Copyright (c) 2012 Israel Jacques * See LICENSE for details. * * Israel Jacques <[email protected]> */ #ifndef _SCU_INTERNAL_H_ #define _SCU_INTERNAL_H_ #include <inttypes.h> #include <stddef.h> /* Write and read directly to specified address */ #define MEMORY_WRITE(t, x, y) (*(volatile uint ## t ## _t *)(x) = (y)) #define MEMORY_READ(t, x) (*(volatile uint ## t ## _t *)(x)) /* Macros specific for processor */ #define SCU(x) (0x25FE0000 + (x)) #define CS0(x) (0x22400000 + (x)) #define CS1(x) (0x24000000 + (x)) #define DUMMY(x) (0x25000000 + (x)) /* SCU */ #define D0R 0x0000 #define D0W 0x0004 #define D0C 0x0008 #define D0AD 0x000C #define D0EN 0x0010 #define D0MD 0x0014 #define D1R 0x0020 #define D1W 0x0024 #define D1C 0x0028 #define D1AD 0x002C #define D1EN 0x0030 #define D1MD 0x0034 #define D2R 0x0040 #define D2W 0x0044 #define D2C 0x0048 #define D2AD 0x004C #define D2EN 0x0050 #define D2MD 0x0054 #define DSTA 0x007C #define PPAF 0x0080 #define PPD 0x0084 #define PDA 0x0088 #define PDD 0x008C #define T0C 0x0090 #define T1S 0x0094 #define T1MD 0x0098 #define IMS 0x00A0 #define IST 0x00A4 #define AIACK 0x00A8 #define ASR0 0x00B0 #define ASR1 0x00B4 #define AREF 0x00B8 #define RSEL 0x00C4 #define VER 0x00C8 #endif /* !_SCU_INTERNAL_H_ */
Add global SCU internal header file
Add global SCU internal header file
C
mit
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
64dfbcfad0d2b4820c53110f9622ab6ca726a123
gram/rsl_assist/source/globus_rsl_assist.h
gram/rsl_assist/source/globus_rsl_assist.h
/****************************************************************************** globus_rsl_assist.h Description: This header contains the interface prototypes for the rsl_assist library. CVS Information: $Source$ $Date$ $Revision$ $Author$ ******************************************************************************/ #ifndef _GLOBUS_RSL_ASSIST_INCLUDE_GLOBUS_RSL_ASSIST_H_ #define _GLOBUS_RSL_ASSIST_INCLUDE_GLOBUS_RSL_ASSIST_H_ #ifndef EXTERN_C_BEGIN #ifdef __cplusplus #define EXTERN_C_BEGIN extern "C" { #define EXTERN_C_END } #else #define EXTERN_C_BEGIN #define EXTERN_C_END #endif #endif #include "globus_common.h" #include "globus_rsl.h" char* globus_rsl_assist_get_rm_contact(char* resource); int globus_rsl_assist_replace_manager_name(globus_rsl_t * rsl); #endif
/* * globus_rsl_assist.h * * Description: * * This header contains the interface prototypes for the rsl_assist library. * * CVS Information: * * $Source$ * $Date$ * $Revision$ * $Author$ ******************************************************************************/ #ifndef _GLOBUS_RSL_ASSIST_INCLUDE_GLOBUS_RSL_ASSIST_H_ #define _GLOBUS_RSL_ASSIST_INCLUDE_GLOBUS_RSL_ASSIST_H_ #ifndef EXTERN_C_BEGIN #ifdef __cplusplus #define EXTERN_C_BEGIN extern "C" { #define EXTERN_C_END } #else #define EXTERN_C_BEGIN #define EXTERN_C_END #endif #endif #include "globus_common.h" #include "globus_rsl.h" char* globus_rsl_assist_get_rm_contact(char* resource); int globus_rsl_assist_replace_manager_name(globus_rsl_t * rsl); #endif
Make comment conform to coding standard...
Make comment conform to coding standard...
C
apache-2.0
gridcf/gct,globus/globus-toolkit,globus/globus-toolkit,gridcf/gct,globus/globus-toolkit,globus/globus-toolkit,globus/globus-toolkit,ellert/globus-toolkit,gridcf/gct,gridcf/gct,ellert/globus-toolkit,ellert/globus-toolkit,ellert/globus-toolkit,ellert/globus-toolkit,gridcf/gct,globus/globus-toolkit,gridcf/gct,globus/globus-toolkit,globus/globus-toolkit,ellert/globus-toolkit,ellert/globus-toolkit,ellert/globus-toolkit
593c4ae13535e52dab15af80618dbee90a4f818c
tests/regression/29-svcomp/04-lustre-minimal.c
tests/regression/29-svcomp/04-lustre-minimal.c
// PARAM: --enable ana.int.interval --enable ana.int.def_exc // issue #120 #include <assert.h> int main() { // should be LP64 unsigned long n = 16; unsigned long size = 4912; assert(!(0xffffffffffffffffUL / size < n)); // UNKNOWN (for now) }
// PARAM: --enable ana.int.interval --enable ana.int.def_exc // issue #120 #include <assert.h> int main() { // should be LP64 unsigned long n = 16; unsigned long size = 4912; assert(!(0xffffffffffffffffUL / size < n)); }
Remove UNKNOWN annotation from assert that now succeeds
Testcase: Remove UNKNOWN annotation from assert that now succeeds
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
d14bbc3782514a0488f776807005e40db82cc70f
subversion/libsvn_ra/util.c
subversion/libsvn_ra/util.c
/* * util.c: Repository access utility routines. * * ==================================================================== * Copyright (c) 2007 CollabNet. All rights reserved. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at http://subversion.tigris.org/license-1.html. * If newer versions of this license are posted there, you may use a * newer version instead, at your option. * * This software consists of voluntary contributions made by many * individuals. For exact contribution history, see the revision * history and logs, available at http://subversion.tigris.org/. * ==================================================================== */ /* ==================================================================== */ /*** Includes. ***/ #include <apr_pools.h> #include "svn_types.h" #include "svn_error.h" #include "svn_error_codes.h" #include "svn_ra.h" #include "svn_private_config.h" /* Return an error with code SVN_ERR_UNSUPPORTED_FEATURE, and an error message referencing PATH_OR_URL, if the "server" pointed to be RA_SESSION doesn't support Merge Tracking (e.g. is pre-1.5). Perform temporary allocations in POOL. */ svn_error_t * svn_ra__assert_mergeinfo_capable_server(svn_ra_session_t *ra_session, const char *path_or_url, apr_pool_t *pool) { svn_boolean_t mergeinfo_capable; SVN_ERR(svn_ra_has_capability(ra_session, &mergeinfo_capable, SVN_RA_CAPABILITY_MERGEINFO, pool)); if (! mergeinfo_capable) { if (path_or_url == NULL) { svn_error_t *err = svn_ra_get_session_url(ra_session, &path_or_url, pool); if (err) { /* The SVN_ERR_UNSUPPORTED_FEATURE error is more important, so dummy up the session's URL and chuck this error. */ svn_error_clear(err); path_or_url = "<repository>"; } } return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL, _("Retrieval of mergeinfo unsupported by '%s'"), svn_path_local_style(path_or_url, pool)); } return SVN_NO_ERROR; }
Make 'svn mergeinfo' and its underlying APIs error out when talking to a pre-1.5 repository.
Make 'svn mergeinfo' and its underlying APIs error out when talking to a pre-1.5 repository. This change includes tests capable of being run against either a 1.4 or 1.5 server (and was run against both). [ Note: All but subversion/libsvn_ra/util.c was committed in r28172. ] * TODO-1.5-branch Remove TODO item completed by this commit. * subversion/include/svn_client.h (svn_client_mergeinfo_get_merged, svn_client_mergeinfo_get_available): Document that an error with the code SVN_ERR_UNSUPPORTED_FEATURE is returned when the server doesn't support Merge Tracking. * subversion/include/svn_ra.h (svn_ra_get_mergeinfo): Ditto, with note about inapplicability to ra_local. * subversion/include/private/svn_ra_private.h Add new Subversion-private header file, which currently declares only the svn_ra__assert_mergeinfo_capable_server() API. * subversion/libsvn_client/mergeinfo.h (svn_client__get_repos_mergeinfo): Add SQUELCH_INCAPABLE parameter, used to ignore a SVN_ERR_UNSUPPORTED_FEATURE returned by a server that doesn't support Merge Tracking. * subversion/libsvn_client/mergeinfo.c Include private/svn_ra_private.h. (svn_client__get_repos_mergeinfo): Add SQUELCH_INCAPABLE parameter, used to ignore a SVN_ERR_UNSUPPORTED_FEATURE returned by a server that doesn't support Merge Tracking. (svn_client__get_wc_or_repos_mergeinfo): Adjust for svn_client__get_repos_mergeinfo() API change. (get_mergeinfo): Return an error if the server doesn't support Merge Tracking. Improve APR pool usage. (svn_client_mergeinfo_get_available): Call get_mergeinfo() first to leverage its new server Merge Tracking capabilities check. * subversion/libsvn_client/copy.c (calculate_target_mergeinfo): Adjust for svn_client__get_repos_mergeinfo() API change * subversion/libsvn_client/merge.c (filter_reflected_revisions): Ditto. * subversion/libsvn_ra/ra_loader.c Include private/svn_ra_private.h. (svn_ra_get_mergeinfo): Return an error if the server doesn't support Merge Tracking. * subversion/libsvn_ra/util.c Add new Subversion-private header file, which currently defines only the svn_ra__assert_mergeinfo_capable_server() API. * subversion/libsvn_ra_svn/client.c (ra_svn_get_mergeinfo): Remove SVN_RA_SVN_CAP_MERGEINFO capabilities check, which is now handled by ra_loader.c. * subversion/libsvn_ra_neon/mergeinfo.c (svn_ra_neon__get_mergeinfo)))): Don't squelch a 501 HTTP status code (which is otherwise subsequently converted into an svn_error_t) encountered while making a mergeinfo REPORT request. * subversion/libsvn_ra_serf/mergeinfo.c (svn_ra_serf__get_mergeinfo): Don't squelch an SVN_ERR_UNSUPPORTED_FEATURE error encountered while making a mergeinfo REPORT request. * subversion/tests/cmdline/mergeinfo_tests.py Import the server_has_mergeinfo() function. (adjust_error_for_server_version): Add a new function that returns the expected error regexp appropriate for the server version used by the test suite. (no_mergeinfo): Leverage adjust_error_for_server_version(), and adjust for run_and_verify_mergeinfo() API changes. (mergeinfo): Provide a very basic implementation of the test. * subversion/tests/cmdline/svntest/actions.py (run_and_verify_mergeinfo): Replace EXPECTED_PATHS, EXPECTED_SOURCE_PATHS, and EXPECTED_ELIGIBLE_REVS parameters with EXPECTED_OUTPUT, which is a dict of the format: { path : { source path : (merged ranges, eligible ranges) } } Correct/add parser expectations, adjust for parser API changes, and re-implement function accordingly. Be sure to bail out early if a 1.4 server is detected. * subversion/tests/cmdline/svntest/parsers.py (MergeinfoReportParser): Add a comment showing some sample output. (MergeinfoReportParser.STATE_MERGED_RANGES, MergeinfoReportParser.STATE_ELIGIBLE_RANGES): Add new constants, the latter a replacement for STATE_ELIGIBLE_REVS. (MergeinfoReportParser.STATE_TRANSITIONS): Correct/add possible state transitions. (MergeinfoReportParser.STATE_TOKENS): Correct/add tokens present in the output. (MergeinfoReportParser.__init__): Replace "paths", "source_paths", and "eligible_revs" instance members with "report" dict. Add "cur_target_path" and "cur_source_path" members to maintain some necessary parser state. Replace "state_to_storage" dict with "parser_callbacks" dict of callback functions. (parsed_target_path, parsed_source_path, parsed_merged_ranges, parsed_eligible_ranges): Add parser callback functions invoked from the "parser_callbacks" dict. (parse): Replace use of "state_to_storage" with "parser_callbacks".
C
apache-2.0
jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion
84d607040b1df3b151aabb226122bc2d29f2d74a
document/src/vespa/document/repo/document_type_repo_factory.h
document/src/vespa/document/repo/document_type_repo_factory.h
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <memory> #include <mutex> #include <map> namespace document { namespace internal { class InternalDocumenttypesType; } class DocumentTypeRepo; /* * Factory class for document type repos. Same instance is returned * for equal config. */ class DocumentTypeRepoFactory { using DocumenttypesConfig = const internal::InternalDocumenttypesType; struct DocumentTypeRepoEntry { std::weak_ptr<const DocumentTypeRepo> repo; std::unique_ptr<const DocumenttypesConfig> config; DocumentTypeRepoEntry(std::weak_ptr<const DocumentTypeRepo> repo_in, std::unique_ptr<const DocumenttypesConfig> config_in) : repo(std::move(repo_in)), config(std::move(config_in)) { } }; using DocumentTypeRepoMap = std::map<const void *, DocumentTypeRepoEntry>; class Deleter; static std::mutex _mutex; static DocumentTypeRepoMap _repos; static void deleteRepo(DocumentTypeRepo *repoRawPtr) noexcept; public: static std::shared_ptr<const DocumentTypeRepo> make(const DocumenttypesConfig &config); }; }
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <memory> #include <mutex> #include <map> namespace document { namespace internal { class InternalDocumenttypesType; } class DocumentTypeRepo; /* * Factory class for document type repos. Same instance is returned * for equal config. */ class DocumentTypeRepoFactory { using DocumenttypesConfig = const internal::InternalDocumenttypesType; struct DocumentTypeRepoEntry { std::weak_ptr<const DocumentTypeRepo> repo; std::unique_ptr<const DocumenttypesConfig> config; DocumentTypeRepoEntry(std::weak_ptr<const DocumentTypeRepo> repo_in, std::unique_ptr<const DocumenttypesConfig> config_in) : repo(std::move(repo_in)), config(std::move(config_in)) { } }; using DocumentTypeRepoMap = std::map<const void *, DocumentTypeRepoEntry>; class Deleter; static std::mutex _mutex; static DocumentTypeRepoMap _repos; static void deleteRepo(DocumentTypeRepo *repoRawPtr) noexcept; public: /* * Since same instance is returned for equal config, we return a shared * pointer to a const repo. The repo should be considered immutable. */ static std::shared_ptr<const DocumentTypeRepo> make(const DocumenttypesConfig &config); }; }
Add comment for document::DocumentTypeRepoFactory::make method.
Add comment for document::DocumentTypeRepoFactory::make method.
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
0ed54c92c849c3c62f6a61877472f1495ecd2025
Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/EMAC_ISR.c
Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/EMAC_ISR.c
#include "FreeRTOS.h" #include "Semphr.h" #include "task.h" /* The interrupt entry point. */ void vEMAC_ISR_Wrapper( void ) __attribute__((naked)); /* The handler that does the actual work. */ void vEMAC_ISR_Handler( void ); extern xSemaphoreHandle xEMACSemaphore; void vEMAC_ISR_Handler( void ) { portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; /* Clear the interrupt. */ MAC_INTCLEAR = 0xffff; VICVectAddr = 0; /* Ensure the uIP task is not blocked as data has arrived. */ xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken ); if( xHigherPriorityTaskWoken ) { /* Giving the semaphore woke a task. */ portYIELD_FROM_ISR(); } } /*-----------------------------------------------------------*/ void vEMAC_ISR_Wrapper( void ) { /* Save the context of the interrupted task. */ portSAVE_CONTEXT(); /* Call the handler. This must be a separate function unless you can guarantee that no stack will be used. */ vEMAC_ISR_Handler(); /* Restore the context of whichever task is going to run next. */ portRESTORE_CONTEXT(); }
#include "FreeRTOS.h" #include "semphr.h" #include "task.h" /* The interrupt entry point. */ void vEMAC_ISR_Wrapper( void ) __attribute__((naked)); /* The handler that does the actual work. */ void vEMAC_ISR_Handler( void ); extern xSemaphoreHandle xEMACSemaphore; void vEMAC_ISR_Handler( void ) { portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; /* Clear the interrupt. */ MAC_INTCLEAR = 0xffff; VICVectAddr = 0; /* Ensure the uIP task is not blocked as data has arrived. */ xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken ); if( xHigherPriorityTaskWoken ) { /* Giving the semaphore woke a task. */ portYIELD_FROM_ISR(); } } /*-----------------------------------------------------------*/ void vEMAC_ISR_Wrapper( void ) { /* Save the context of the interrupted task. */ portSAVE_CONTEXT(); /* Call the handler. This must be a separate function unless you can guarantee that no stack will be used. */ vEMAC_ISR_Handler(); /* Restore the context of whichever task is going to run next. */ portRESTORE_CONTEXT(); }
Correct case of include file to build on Linux.
Correct case of include file to build on Linux. git-svn-id: 43aea61533866f88f23079d48f4f5dc2d5288937@402 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
C
apache-2.0
Psykar/kubos,Psykar/kubos,Psykar/kubos,kubostech/KubOS,Psykar/kubos,Psykar/kubos,kubostech/KubOS,Psykar/kubos,Psykar/kubos
e77d038d2bed3605d18c83152402a5ddfd7255dd
Classes/SloppySwiper.h
Classes/SloppySwiper.h
// // SloppySwiper.h // // Created by Arkadiusz on 29-05-14. // #import <Foundation/Foundation.h> @interface SloppySwiper : NSObject <UINavigationControllerDelegate> // Designated initializer if the class isn't set in the Interface Builder. - (instancetype)initWithNavigationController:(UINavigationController *)navigationController; @end
// // SloppySwiper.h // // Created by Arkadiusz on 29-05-14. // #import <Foundation/Foundation.h> @interface SloppySwiper : NSObject <UINavigationControllerDelegate> /// Gesture recognizer used to recognize swiping to the right. @property (weak, nonatomic) UIPanGestureRecognizer *panRecognizer; /// Designated initializer if the class isn't used from the Interface Builder. - (instancetype)initWithNavigationController:(UINavigationController *)navigationController; @end
Improve comments in the header file
Improve comments in the header file
C
mit
toc2menow/SloppySwiper,ssowonny/SloppySwiper,stephenbalaban/SloppySwiper,fastred/SloppySwiper,msdgwzhy6/SloppySwiper,igroomgrim/SloppySwiper,barrettj/SloppySwiper,yusuga/SloppySwiper,xuvw/SloppySwiper